]> git.sur5r.net Git - openldap/blob - configure
update SASL compat test to check for 1.5 compatibility
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.417 2002/05/13 16:48:37 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-x-compile      enable cross compiling [no]"
48 ac_help="$ac_help
49   --with-cyrus-sasl       with Cyrus SASL support [auto]"
50 ac_help="$ac_help
51   --with-fetch            with freeBSD fetch URL support [auto]"
52 ac_help="$ac_help
53   --with-kerberos         with Kerberos support [auto]"
54 ac_help="$ac_help
55   --with-readline         with readline support [auto]"
56 ac_help="$ac_help
57   --with-threads          with threads [auto]"
58 ac_help="$ac_help
59   --with-tls              with TLS/SSL support [auto]"
60 ac_help="$ac_help
61   --with-yielding-select  with implicitly yielding select [auto]"
62 ac_help="$ac_help
63
64 SLAPD (Standalone LDAP Daemon) Options:"
65 ac_help="$ac_help
66   --enable-slapd          enable building slapd [yes]"
67 ac_help="$ac_help
68     --enable-aci          enable per-object ACIs (experimental) [no]"
69 ac_help="$ac_help
70     --enable-cleartext    enable cleartext passwords [yes]"
71 ac_help="$ac_help
72     --enable-crypt        enable crypt(3) passwords [no]"
73 ac_help="$ac_help
74     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
75 ac_help="$ac_help
76     --enable-kpasswd      enable Kerberos password verification [no]"
77 ac_help="$ac_help
78     --enable-lmpasswd     enable LAN Manager passwords [no]"
79 ac_help="$ac_help
80     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
81 ac_help="$ac_help
82     --enable-modules      enable dynamic module support [no]"
83 ac_help="$ac_help
84     --enable-phonetic     enable phonetic/soundex [no]"
85 ac_help="$ac_help
86     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
87 ac_help="$ac_help
88     --enable-rlookups     enable reverse lookups of client hostnames [no]"
89 ac_help="$ac_help
90     --enable-slp          enable SLPv2 support [no]"
91 ac_help="$ac_help
92     --enable-wrappers     enable tcp wrapper support [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend [yes]"
95 ac_help="$ac_help
96     --with-bdb-module     module type static|dynamic [static]"
97 ac_help="$ac_help
98     --enable-dnssrv       enable dnssrv backend [no]"
99 ac_help="$ac_help
100     --with-dnssrv-module  module type static|dynamic [static]"
101 ac_help="$ac_help
102     --enable-ldap         enable ldap backend [no]"
103 ac_help="$ac_help
104     --with-ldap-module    module type static|dynamic [static]"
105 ac_help="$ac_help
106     --enable-ldbm         enable ldbm backend [no]"
107 ac_help="$ac_help
108     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
109 ac_help="$ac_help
110     --with-ldbm-module    module type static|dynamic [static]"
111 ac_help="$ac_help
112     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
113 ac_help="$ac_help
114     --enable-meta         enable metadirectory backend [no]"
115 ac_help="$ac_help
116     --with-meta-module    module type static|dynamic [static]"
117 ac_help="$ac_help
118     --enable-monitor      enable monitor backend [no]"
119 ac_help="$ac_help
120     --with-monitor-module module type static|dynamic [static]"
121 ac_help="$ac_help
122     --enable-null         enable null backend [no]"
123 ac_help="$ac_help
124     --with-null-module    module type static|dynamic [static]"
125 ac_help="$ac_help
126     --enable-passwd       enable passwd backend [no]"
127 ac_help="$ac_help
128     --with-passwd-module  module type static|dynamic [static]"
129 ac_help="$ac_help
130     --enable-perl         enable perl backend [no]"
131 ac_help="$ac_help
132     --with-perl-module    module type static|dynamic [static]"
133 ac_help="$ac_help
134     --enable-shell        enable shell backend [no]"
135 ac_help="$ac_help
136     --with-shell-module   module type static|dynamic [static]"
137 ac_help="$ac_help
138     --enable-sql          enable sql backend [no]"
139 ac_help="$ac_help
140     --with-sql-module     module type static|dynamic [static]"
141 ac_help="$ac_help
142     --enable-tcl          enable tcl backend [no]"
143 ac_help="$ac_help
144     --with-tcl-module     module type static|dynamic [static]"
145 ac_help="$ac_help
146
147 SLURPD (Replication Daemon) Options:"
148 ac_help="$ac_help
149   --enable-slurpd         enable building slurpd [auto]"
150 ac_help="$ac_help
151
152 Library Generation & Linking Options"
153 ac_help="$ac_help
154   --enable-static[=PKGS]  build static libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-shared[=PKGS]  build shared libraries [default=yes]"
157 ac_help="$ac_help
158   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
159 ac_help="$ac_help
160   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
161
162 # Find the correct PATH separator.  Usually this is `:', but
163 # DJGPP uses `;' like DOS.
164 if test "X${PATH_SEPARATOR+set}" != Xset; then
165   UNAME=${UNAME-`uname 2>/dev/null`}
166   case X$UNAME in
167     *-DOS) lt_cv_sys_path_separator=';' ;;
168     *)     lt_cv_sys_path_separator=':' ;;
169   esac
170   PATH_SEPARATOR=$lt_cv_sys_path_separator
171 fi
172
173
174 # Check that we are running under the correct shell.
175 SHELL=${CONFIG_SHELL-/bin/sh}
176
177 case X$ECHO in
178 X*--fallback-echo)
179   # Remove one level of quotation (which was required for Make).
180   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
181   ;;
182 esac
183
184 echo=${ECHO-echo}
185 if test "X$1" = X--no-reexec; then
186   # Discard the --no-reexec flag, and continue.
187   shift
188 elif test "X$1" = X--fallback-echo; then
189   # Avoid inline document here, it may be left over
190   :
191 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
192   # Yippee, $echo works!
193   :
194 else
195   # Restart under the correct shell.
196   exec $SHELL "$0" --no-reexec ${1+"$@"}
197 fi
198
199 if test "X$1" = X--fallback-echo; then
200   # used as fallback echo
201   shift
202   cat <<EOF
203
204 EOF
205   exit 0
206 fi
207
208 # The HP-UX ksh and POSIX shell print the target directory to stdout
209 # if CDPATH is set.
210 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
211
212 if test -z "$ECHO"; then
213 if test "X${echo_test_string+set}" != Xset; then
214 # find a string as large as possible, as long as the shell can cope with it
215   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
216     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
217     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
218        echo_test_string="`eval $cmd`" &&
219        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
220     then
221       break
222     fi
223   done
224 fi
225
226 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
227    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
228    test "X$echo_testing_string" = "X$echo_test_string"; then
229   :
230 else
231   # The Solaris, AIX, and Digital Unix default echo programs unquote
232   # backslashes.  This makes it impossible to quote backslashes using
233   #   echo "$something" | sed 's/\\/\\\\/g'
234   #
235   # So, first we look for a working echo in the user's PATH.
236
237   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
238   for dir in $PATH /usr/ucb; do
239     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
240        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
241        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
242        test "X$echo_testing_string" = "X$echo_test_string"; then
243       echo="$dir/echo"
244       break
245     fi
246   done
247   IFS="$save_ifs"
248
249   if test "X$echo" = Xecho; then
250     # We didn't find a better echo, so look for alternatives.
251     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
252        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
253        test "X$echo_testing_string" = "X$echo_test_string"; then
254       # This shell has a builtin print -r that does the trick.
255       echo='print -r'
256     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
257          test "X$CONFIG_SHELL" != X/bin/ksh; then
258       # If we have ksh, try running configure again with it.
259       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
260       export ORIGINAL_CONFIG_SHELL
261       CONFIG_SHELL=/bin/ksh
262       export CONFIG_SHELL
263       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
264     else
265       # Try using printf.
266       echo='printf %s\n'
267       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
268          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
269          test "X$echo_testing_string" = "X$echo_test_string"; then
270         # Cool, printf works
271         :
272       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
273            test "X$echo_testing_string" = 'X\t' &&
274            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
275            test "X$echo_testing_string" = "X$echo_test_string"; then
276         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
277         export CONFIG_SHELL
278         SHELL="$CONFIG_SHELL"
279         export SHELL
280         echo="$CONFIG_SHELL $0 --fallback-echo"
281       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
282            test "X$echo_testing_string" = 'X\t' &&
283            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
284            test "X$echo_testing_string" = "X$echo_test_string"; then
285         echo="$CONFIG_SHELL $0 --fallback-echo"
286       else
287         # maybe with a smaller string...
288         prev=:
289
290         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
291           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
292           then
293             break
294           fi
295           prev="$cmd"
296         done
297
298         if test "$prev" != 'sed 50q "$0"'; then
299           echo_test_string=`eval $prev`
300           export echo_test_string
301           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
302         else
303           # Oops.  We lost completely, so just stick with echo.
304           echo=echo
305         fi
306       fi
307     fi
308   fi
309 fi
310 fi
311
312 # Copy echo and quote the copy suitably for passing to libtool from
313 # the Makefile, instead of quoting the original, which is used later.
314 ECHO=$echo
315 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
316    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
317 fi
318
319
320 ac_help="$ac_help
321   --disable-libtool-lock  avoid locking (might break parallel builds)"
322 ac_help="$ac_help
323   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
324 ac_help="$ac_help
325
326 See INSTALL file for further details."
327
328 # Initialize some variables set by options.
329 # The variables have the same names as the options, with
330 # dashes changed to underlines.
331 build=NONE
332 cache_file=./config.cache
333 exec_prefix=NONE
334 host=NONE
335 no_create=
336 nonopt=NONE
337 no_recursion=
338 prefix=NONE
339 program_prefix=NONE
340 program_suffix=NONE
341 program_transform_name=s,x,x,
342 silent=
343 site=
344 srcdir=
345 target=NONE
346 verbose=
347 x_includes=NONE
348 x_libraries=NONE
349 bindir='${exec_prefix}/bin'
350 sbindir='${exec_prefix}/sbin'
351 libexecdir='${exec_prefix}/libexec'
352 datadir='${prefix}/share'
353 sysconfdir='${prefix}/etc'
354 sharedstatedir='${prefix}/com'
355 localstatedir='${prefix}/var'
356 libdir='${exec_prefix}/lib'
357 includedir='${prefix}/include'
358 oldincludedir='/usr/include'
359 infodir='${prefix}/info'
360 mandir='${prefix}/man'
361
362 # Initialize some other variables.
363 subdirs=
364 MFLAGS= MAKEFLAGS=
365 SHELL=${CONFIG_SHELL-/bin/sh}
366 # Maximum number of lines to put in a shell here document.
367 ac_max_here_lines=12
368
369 ac_prev=
370 for ac_option
371 do
372
373   # If the previous option needs an argument, assign it.
374   if test -n "$ac_prev"; then
375     eval "$ac_prev=\$ac_option"
376     ac_prev=
377     continue
378   fi
379
380   case "$ac_option" in
381   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
382   *) ac_optarg= ;;
383   esac
384
385   # Accept the important Cygnus configure options, so we can diagnose typos.
386
387   case "$ac_option" in
388
389   -bindir | --bindir | --bindi | --bind | --bin | --bi)
390     ac_prev=bindir ;;
391   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
392     bindir="$ac_optarg" ;;
393
394   -build | --build | --buil | --bui | --bu)
395     ac_prev=build ;;
396   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
397     build="$ac_optarg" ;;
398
399   -cache-file | --cache-file | --cache-fil | --cache-fi \
400   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
401     ac_prev=cache_file ;;
402   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
403   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
404     cache_file="$ac_optarg" ;;
405
406   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
407     ac_prev=datadir ;;
408   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
409   | --da=*)
410     datadir="$ac_optarg" ;;
411
412   -disable-* | --disable-*)
413     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
414     # Reject names that are not valid shell variable names.
415     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
416       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
417     fi
418     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
419     eval "enable_${ac_feature}=no" ;;
420
421   -enable-* | --enable-*)
422     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
423     # Reject names that are not valid shell variable names.
424     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
425       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
426     fi
427     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
428     case "$ac_option" in
429       *=*) ;;
430       *) ac_optarg=yes ;;
431     esac
432     eval "enable_${ac_feature}='$ac_optarg'" ;;
433
434   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
435   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
436   | --exec | --exe | --ex)
437     ac_prev=exec_prefix ;;
438   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
439   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
440   | --exec=* | --exe=* | --ex=*)
441     exec_prefix="$ac_optarg" ;;
442
443   -gas | --gas | --ga | --g)
444     # Obsolete; use --with-gas.
445     with_gas=yes ;;
446
447   -help | --help | --hel | --he)
448     # Omit some internal or obsolete options to make the list less imposing.
449     # This message is too long to be a string in the A/UX 3.1 sh.
450     cat << EOF
451 Usage: configure [options] [host]
452 Options: [defaults in brackets after descriptions]
453 Configuration:
454   --cache-file=FILE       cache test results in FILE
455   --help                  print this message
456   --no-create             do not create output files
457   --quiet, --silent       do not print \`checking...' messages
458   --version               print the version of autoconf that created configure
459 Directory and file names:
460   --prefix=PREFIX         install architecture-independent files in PREFIX
461                           [$ac_default_prefix]
462   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
463                           [same as prefix]
464   --bindir=DIR            user executables in DIR [EPREFIX/bin]
465   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
466   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
467   --datadir=DIR           read-only architecture-independent data in DIR
468                           [PREFIX/share]
469   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
470   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
471                           [PREFIX/com]
472   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
473   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
474   --includedir=DIR        C header files in DIR [PREFIX/include]
475   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
476   --infodir=DIR           info documentation in DIR [PREFIX/info]
477   --mandir=DIR            man documentation in DIR [PREFIX/man]
478   --srcdir=DIR            find the sources in DIR [configure dir or ..]
479   --program-prefix=PREFIX prepend PREFIX to installed program names
480   --program-suffix=SUFFIX append SUFFIX to installed program names
481   --program-transform-name=PROGRAM
482                           run sed PROGRAM on installed program names
483 EOF
484     cat << EOF
485 Host type:
486   --build=BUILD           configure for building on BUILD [BUILD=HOST]
487   --host=HOST             configure for HOST [guessed]
488   --target=TARGET         configure for TARGET [TARGET=HOST]
489 Features and packages:
490   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
491   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
492   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
493   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
494   --x-includes=DIR        X include files are in DIR
495   --x-libraries=DIR       X library files are in DIR
496 EOF
497     if test -n "$ac_help"; then
498       echo "--enable and --with options recognized:$ac_help"
499     fi
500     exit 0 ;;
501
502   -host | --host | --hos | --ho)
503     ac_prev=host ;;
504   -host=* | --host=* | --hos=* | --ho=*)
505     host="$ac_optarg" ;;
506
507   -includedir | --includedir | --includedi | --included | --include \
508   | --includ | --inclu | --incl | --inc)
509     ac_prev=includedir ;;
510   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
511   | --includ=* | --inclu=* | --incl=* | --inc=*)
512     includedir="$ac_optarg" ;;
513
514   -infodir | --infodir | --infodi | --infod | --info | --inf)
515     ac_prev=infodir ;;
516   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
517     infodir="$ac_optarg" ;;
518
519   -libdir | --libdir | --libdi | --libd)
520     ac_prev=libdir ;;
521   -libdir=* | --libdir=* | --libdi=* | --libd=*)
522     libdir="$ac_optarg" ;;
523
524   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
525   | --libexe | --libex | --libe)
526     ac_prev=libexecdir ;;
527   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
528   | --libexe=* | --libex=* | --libe=*)
529     libexecdir="$ac_optarg" ;;
530
531   -localstatedir | --localstatedir | --localstatedi | --localstated \
532   | --localstate | --localstat | --localsta | --localst \
533   | --locals | --local | --loca | --loc | --lo)
534     ac_prev=localstatedir ;;
535   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
536   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
537   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
538     localstatedir="$ac_optarg" ;;
539
540   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
541     ac_prev=mandir ;;
542   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
543     mandir="$ac_optarg" ;;
544
545   -nfp | --nfp | --nf)
546     # Obsolete; use --without-fp.
547     with_fp=no ;;
548
549   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
550   | --no-cr | --no-c)
551     no_create=yes ;;
552
553   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
554   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
555     no_recursion=yes ;;
556
557   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
558   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
559   | --oldin | --oldi | --old | --ol | --o)
560     ac_prev=oldincludedir ;;
561   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
562   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
563   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
564     oldincludedir="$ac_optarg" ;;
565
566   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
567     ac_prev=prefix ;;
568   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
569     prefix="$ac_optarg" ;;
570
571   -program-prefix | --program-prefix | --program-prefi | --program-pref \
572   | --program-pre | --program-pr | --program-p)
573     ac_prev=program_prefix ;;
574   -program-prefix=* | --program-prefix=* | --program-prefi=* \
575   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
576     program_prefix="$ac_optarg" ;;
577
578   -program-suffix | --program-suffix | --program-suffi | --program-suff \
579   | --program-suf | --program-su | --program-s)
580     ac_prev=program_suffix ;;
581   -program-suffix=* | --program-suffix=* | --program-suffi=* \
582   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
583     program_suffix="$ac_optarg" ;;
584
585   -program-transform-name | --program-transform-name \
586   | --program-transform-nam | --program-transform-na \
587   | --program-transform-n | --program-transform- \
588   | --program-transform | --program-transfor \
589   | --program-transfo | --program-transf \
590   | --program-trans | --program-tran \
591   | --progr-tra | --program-tr | --program-t)
592     ac_prev=program_transform_name ;;
593   -program-transform-name=* | --program-transform-name=* \
594   | --program-transform-nam=* | --program-transform-na=* \
595   | --program-transform-n=* | --program-transform-=* \
596   | --program-transform=* | --program-transfor=* \
597   | --program-transfo=* | --program-transf=* \
598   | --program-trans=* | --program-tran=* \
599   | --progr-tra=* | --program-tr=* | --program-t=*)
600     program_transform_name="$ac_optarg" ;;
601
602   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
603   | -silent | --silent | --silen | --sile | --sil)
604     silent=yes ;;
605
606   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
607     ac_prev=sbindir ;;
608   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
609   | --sbi=* | --sb=*)
610     sbindir="$ac_optarg" ;;
611
612   -sharedstatedir | --sharedstatedir | --sharedstatedi \
613   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
614   | --sharedst | --shareds | --shared | --share | --shar \
615   | --sha | --sh)
616     ac_prev=sharedstatedir ;;
617   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
618   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
619   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
620   | --sha=* | --sh=*)
621     sharedstatedir="$ac_optarg" ;;
622
623   -site | --site | --sit)
624     ac_prev=site ;;
625   -site=* | --site=* | --sit=*)
626     site="$ac_optarg" ;;
627
628   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
629     ac_prev=srcdir ;;
630   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
631     srcdir="$ac_optarg" ;;
632
633   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
634   | --syscon | --sysco | --sysc | --sys | --sy)
635     ac_prev=sysconfdir ;;
636   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
637   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
638     sysconfdir="$ac_optarg" ;;
639
640   -target | --target | --targe | --targ | --tar | --ta | --t)
641     ac_prev=target ;;
642   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
643     target="$ac_optarg" ;;
644
645   -v | -verbose | --verbose | --verbos | --verbo | --verb)
646     verbose=yes ;;
647
648   -version | --version | --versio | --versi | --vers)
649     echo "configure generated by autoconf version 2.13.1"
650     exit 0 ;;
651
652   -with-* | --with-*)
653     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
654     # Reject names that are not valid shell variable names.
655     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
656       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
657     fi
658     ac_package=`echo $ac_package| sed 's/-/_/g'`
659     case "$ac_option" in
660       *=*) ;;
661       *) ac_optarg=yes ;;
662     esac
663     eval "with_${ac_package}='$ac_optarg'" ;;
664
665   -without-* | --without-*)
666     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
667     # Reject names that are not valid shell variable names.
668     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
669       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
670     fi
671     ac_package=`echo $ac_package| sed 's/-/_/g'`
672     eval "with_${ac_package}=no" ;;
673
674   --x)
675     # Obsolete; use --with-x.
676     with_x=yes ;;
677
678   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
679   | --x-incl | --x-inc | --x-in | --x-i)
680     ac_prev=x_includes ;;
681   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
682   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
683     x_includes="$ac_optarg" ;;
684
685   -x-libraries | --x-libraries | --x-librarie | --x-librari \
686   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
687     ac_prev=x_libraries ;;
688   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
689   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
690     x_libraries="$ac_optarg" ;;
691
692   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
693     ;;
694
695   *)
696     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
697       echo "configure: warning: $ac_option: invalid host type" 1>&2
698     fi
699     if test "x$nonopt" != xNONE; then
700       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
701     fi
702     nonopt="$ac_option"
703     ;;
704
705   esac
706 done
707
708 if test -n "$ac_prev"; then
709   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
710 fi
711
712 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
713
714 # File descriptor usage:
715 # 0 standard input
716 # 1 file creation
717 # 2 errors and warnings
718 # 3 some systems may open it to /dev/tty
719 # 4 used on the Kubota Titan
720 # 6 checking for... messages and results
721 # 5 compiler messages saved in config.log
722 if test "$silent" = yes; then
723   exec 6>/dev/null
724 else
725   exec 6>&1
726 fi
727 exec 5>./config.log
728
729 echo "\
730 This file contains any messages produced by compilers while
731 running configure, to aid debugging if configure makes a mistake.
732 " 1>&5
733
734 # Strip out --no-create and --no-recursion so they do not pile up.
735 # Also quote any args containing shell metacharacters.
736 ac_configure_args=
737 for ac_arg
738 do
739   case "$ac_arg" in
740   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
741   | --no-cr | --no-c) ;;
742   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
743   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
744   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
745   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
746   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
747   esac
748 done
749
750 # NLS nuisances.
751 # Only set these to C if already set.  These must not be set unconditionally
752 # because not all systems understand e.g. LANG=C (notably SCO).
753 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
754 # Non-C LC_CTYPE values break the ctype check.
755 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
756 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
757 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
758 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
759
760 # confdefs.h avoids OS command line length limits that DEFS can exceed.
761 rm -rf conftest* confdefs.h
762 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
763 echo > confdefs.h
764
765 # A filename unique to this package, relative to the directory that
766 # configure is in, which we can look for to find out if srcdir is correct.
767 ac_unique_file=build/version.sh
768
769 # Find the source files, if location was not specified.
770 if test -z "$srcdir"; then
771   ac_srcdir_defaulted=yes
772   # Try the directory containing this script, then its parent.
773   ac_prog=$0
774   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
775   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
776   srcdir=$ac_confdir
777   if test ! -r $srcdir/$ac_unique_file; then
778     srcdir=..
779   fi
780 else
781   ac_srcdir_defaulted=no
782 fi
783 if test ! -r $srcdir/$ac_unique_file; then
784   if test "$ac_srcdir_defaulted" = yes; then
785     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
786   else
787     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
788   fi
789 fi
790 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
791
792 # Prefer explicitly selected file to automatically selected ones.
793 if test -z "$CONFIG_SITE"; then
794   if test "x$prefix" != xNONE; then
795     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
796   else
797     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
798   fi
799 fi
800 for ac_site_file in $CONFIG_SITE; do
801   if test -r "$ac_site_file"; then
802     echo "loading site script $ac_site_file"
803     . "$ac_site_file"
804   fi
805 done
806
807
808 ac_ext=c
809 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810 ac_cpp='$CPP $CPPFLAGS'
811 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813 cross_compiling=$ac_cv_prog_cc_cross
814
815 ac_exeext=
816 ac_objext=o
817 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
818   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
819   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
820     ac_n= ac_c='
821 ' ac_t='        '
822   else
823     ac_n=-n ac_c= ac_t=
824   fi
825 else
826   ac_n= ac_c='\c' ac_t=
827 fi
828
829
830 # set unset (borrowed from autoconf 2.49c)
831 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
832   ol_unset=unset
833 else
834   ol_unset=false
835 fi
836 # unset CDPATH
837 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
838
839 ac_aux_dir=
840 for ac_dir in build $srcdir/build; do
841   if test -f $ac_dir/install-sh; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/install-sh -c"
844     break
845   elif test -f $ac_dir/install.sh; then
846     ac_aux_dir=$ac_dir
847     ac_install_sh="$ac_aux_dir/install.sh -c"
848     break
849   elif test -f $ac_dir/shtool; then
850     ac_aux_dir=$ac_dir
851     ac_install_sh="$ac_aux_dir/shtool install -c"
852     break
853   fi
854 done
855 if test -z "$ac_aux_dir"; then
856   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
857 fi
858 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
859 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
860 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
861
862 eval `$ac_aux_dir/version.sh`
863 if test -z "$OL_STRING"; then
864         { echo "configure: error: could not determine version" 1>&2; exit 1; }
865 fi
866
867 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
868         ac_cv_shtool="$ac_aux_dir/shtool"
869 else
870         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
871 fi
872
873 SHTOOL="$ac_cv_shtool"
874
875 TB=`$SHTOOL echo -e %B`
876 TN=`$SHTOOL echo -e %b`
877
878 echo "Configuring $TB$OL_STRING$TN ..."
879
880
881 echo $ac_n "checking host system type""... $ac_c" 1>&6
882 echo "configure:883: checking host system type" >&5
883 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
884
885 # Make sure we can run config.sub.
886   if $ac_config_sub sun4 >/dev/null 2>&1; then :
887     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
888   fi
889
890   ac_cv_host_alias=$host
891   case "$ac_cv_host_alias" in
892   NONE)
893     case $nonopt in
894     NONE)
895       if ac_cv_host_alias=`$ac_config_guess`; then :
896       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
897       fi ;;
898     *) ac_cv_host_alias=$nonopt ;;
899     esac ;;
900   esac
901
902   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
903   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
904   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
905   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
906 else
907   echo $ac_n "(cached) $ac_c" 1>&6
908 fi
909
910 echo "$ac_t""$ac_cv_host" 1>&6
911
912 host=$ac_cv_host
913 host_alias=$ac_cv_host_alias
914 host_cpu=$ac_cv_host_cpu
915 host_vendor=$ac_cv_host_vendor
916 host_os=$ac_cv_host_os
917
918
919
920
921
922 echo $ac_n "checking target system type""... $ac_c" 1>&6
923 echo "configure:924: checking target system type" >&5
924 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
925
926 # Make sure we can run config.sub.
927   if $ac_config_sub sun4 >/dev/null 2>&1; then :
928     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
929   fi
930
931   ac_cv_target_alias=$target
932   case "$ac_cv_target_alias" in
933   NONE)
934     case $nonopt in
935     NONE)
936       ac_cv_target_alias=$host_alias ;;
937
938     *) ac_cv_target_alias=$nonopt ;;
939     esac ;;
940   esac
941
942   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
943   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
944   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
945   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
946 else
947   echo $ac_n "(cached) $ac_c" 1>&6
948 fi
949
950 echo "$ac_t""$ac_cv_target" 1>&6
951
952 target=$ac_cv_target
953 target_alias=$ac_cv_target_alias
954 target_cpu=$ac_cv_target_cpu
955 target_vendor=$ac_cv_target_vendor
956 target_os=$ac_cv_target_os
957
958
959
960
961
962 echo $ac_n "checking build system type""... $ac_c" 1>&6
963 echo "configure:964: checking build system type" >&5
964 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
965
966 # Make sure we can run config.sub.
967   if $ac_config_sub sun4 >/dev/null 2>&1; then :
968     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
969   fi
970
971   ac_cv_build_alias=$build
972   case "$ac_cv_build_alias" in
973   NONE)
974     case $nonopt in
975     NONE)
976       ac_cv_build_alias=$host_alias ;;
977
978     *) ac_cv_build_alias=$nonopt ;;
979     esac ;;
980   esac
981
982   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
983   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
984   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
985   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
986 else
987   echo $ac_n "(cached) $ac_c" 1>&6
988 fi
989
990 echo "$ac_t""$ac_cv_build" 1>&6
991
992 build=$ac_cv_build
993 build_alias=$ac_cv_build_alias
994 build_cpu=$ac_cv_build_cpu
995 build_vendor=$ac_cv_build_vendor
996 build_os=$ac_cv_build_os
997
998
999
1000
1001
1002 # Do some error checking and defaulting for the host and target type.
1003 # The inputs are:
1004 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1005 #
1006 # The rules are:
1007 # 1. You are not allowed to specify --host, --target, and nonopt at the
1008 #    same time.
1009 # 2. Host defaults to nonopt.
1010 # 3. If nonopt is not specified, then host defaults to the current host,
1011 #    as determined by config.guess.
1012 # 4. Target and build default to nonopt.
1013 # 5. If nonopt is not specified, then target and build default to host.
1014
1015 # The aliases save the names the user supplied, while $host etc.
1016 # will get canonicalized.
1017 case $host---$target---$nonopt in
1018 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1019 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1020 esac
1021
1022 test "$host_alias" != "$target_alias" &&
1023   test "$program_prefix$program_suffix$program_transform_name" = \
1024     NONENONEs,x,x, &&
1025   program_prefix=${target_alias}-
1026
1027
1028 # Find a good install program.  We prefer a C program (faster),
1029 # so one script is as good as another.  But avoid the broken or
1030 # incompatible versions:
1031 # SysV /etc/install, /usr/sbin/install
1032 # SunOS /usr/etc/install
1033 # IRIX /sbin/install
1034 # AIX /bin/install
1035 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1036 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1037 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1038 # ./install, which can be erroneously created by make from ./install.sh.
1039 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1040 echo "configure:1041: checking for a BSD compatible install" >&5
1041 if test -z "$INSTALL"; then
1042 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1043   echo $ac_n "(cached) $ac_c" 1>&6
1044 else
1045     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1046   for ac_dir in $PATH; do
1047     # Account for people who put trailing slashes in PATH elements.
1048     case "$ac_dir/" in
1049     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1050     *)
1051       # OSF1 and SCO ODT 3.0 have their own names for install.
1052       # Don't use installbsd from OSF since it installs stuff as root
1053       # by default.
1054       for ac_prog in ginstall scoinst install; do
1055         if test -f $ac_dir/$ac_prog; then
1056           if test $ac_prog = install &&
1057             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1058             # AIX install.  It has an incompatible calling convention.
1059             :
1060           elif test $ac_prog = install &&
1061             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1062             # program-specific install script used by HP pwplus--don't use.
1063             :
1064           else
1065             ac_cv_path_install="$ac_dir/$ac_prog -c"
1066             break 2
1067           fi
1068         fi
1069       done
1070       ;;
1071     esac
1072   done
1073   IFS="$ac_save_IFS"
1074
1075 fi
1076   if test "${ac_cv_path_install+set}" = set; then
1077     INSTALL="$ac_cv_path_install"
1078   else
1079     # As a last resort, use the slow shell script.  We don't cache a
1080     # path for INSTALL within a source directory, because that will
1081     # break other packages using the cache if that directory is
1082     # removed, or if the path is relative.
1083     INSTALL="$ac_install_sh"
1084   fi
1085 fi
1086 echo "$ac_t""$INSTALL" 1>&6
1087
1088 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1089 # It thinks the first close brace ends the variable substitution.
1090 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1091
1092 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1093
1094 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1095
1096 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1097 echo "configure:1098: checking whether build environment is sane" >&5
1098 # Just in case
1099 sleep 1
1100 echo timestamp > conftestfile
1101 # Do `set' in a subshell so we don't clobber the current shell's
1102 # arguments.  Must try -L first in case configure is actually a
1103 # symlink; some systems play weird games with the mod time of symlinks
1104 # (eg FreeBSD returns the mod time of the symlink's containing
1105 # directory).
1106 if (
1107    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1108    if test "$*" = "X"; then
1109       # -L didn't work.
1110       set X `ls -t $srcdir/configure conftestfile`
1111    fi
1112    if test "$*" != "X $srcdir/configure conftestfile" \
1113       && test "$*" != "X conftestfile $srcdir/configure"; then
1114
1115       # If neither matched, then we have a broken ls.  This can happen
1116       # if, for instance, CONFIG_SHELL is bash and it inherits a
1117       # broken ls alias from the environment.  This has actually
1118       # happened.  Such a system could not be considered "sane".
1119       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1120 alias in your environment" 1>&2; exit 1; }
1121    fi
1122
1123    test "$2" = conftestfile
1124    )
1125 then
1126    # Ok.
1127    :
1128 else
1129    { echo "configure: error: newly created file is older than distributed files!
1130 Check your system clock" 1>&2; exit 1; }
1131 fi
1132 rm -f conftest*
1133 echo "$ac_t""yes" 1>&6
1134 if test "$program_transform_name" = s,x,x,; then
1135   program_transform_name=
1136 else
1137   # Double any \ or $.  echo might interpret backslashes.
1138   cat <<\EOF_SED > conftestsed
1139 s,\\,\\\\,g; s,\$,$$,g
1140 EOF_SED
1141   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1142   rm -f conftestsed
1143 fi
1144 test "$program_prefix" != NONE &&
1145   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1146 # Use a double $ so make ignores it.
1147 test "$program_suffix" != NONE &&
1148   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1149
1150 # sed with no file args requires a program.
1151 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1152
1153 for ac_prog in mawk gawk nawk awk
1154 do
1155 # Extract the first word of "$ac_prog", so it can be a program name with args.
1156 set dummy $ac_prog; ac_word=$2
1157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1158 echo "configure:1159: checking for $ac_word" >&5
1159 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1160   echo $ac_n "(cached) $ac_c" 1>&6
1161 else
1162   if test -n "$AWK"; then
1163   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1164 else
1165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1166   ac_dummy="$PATH"
1167   for ac_dir in $ac_dummy; do
1168     test -z "$ac_dir" && ac_dir=.
1169     if test -f $ac_dir/$ac_word; then
1170       ac_cv_prog_AWK="$ac_prog"
1171       break
1172     fi
1173   done
1174   IFS="$ac_save_ifs"
1175 fi
1176 fi
1177 AWK="$ac_cv_prog_AWK"
1178 if test -n "$AWK"; then
1179   echo "$ac_t""$AWK" 1>&6
1180 else
1181   echo "$ac_t""no" 1>&6
1182 fi
1183
1184 test -n "$AWK" && break
1185 done
1186
1187 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1188 echo "configure:1189: checking whether ${MAKE-make} sets \${MAKE}" >&5
1189 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1190 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1191   echo $ac_n "(cached) $ac_c" 1>&6
1192 else
1193   cat > conftestmake <<\EOF
1194 all:
1195         @echo 'ac_maketemp="${MAKE}"'
1196 EOF
1197 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1198 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1199 if test -n "$ac_maketemp"; then
1200   eval ac_cv_prog_make_${ac_make}_set=yes
1201 else
1202   eval ac_cv_prog_make_${ac_make}_set=no
1203 fi
1204 rm -f conftestmake
1205 fi
1206 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1207   echo "$ac_t""yes" 1>&6
1208   SET_MAKE=
1209 else
1210   echo "$ac_t""no" 1>&6
1211   SET_MAKE="MAKE=${MAKE-make}"
1212 fi
1213
1214
1215
1216 PACKAGE=$OL_PACKAGE
1217
1218 VERSION=$OL_VERSION
1219
1220 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1221   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1222 fi
1223
1224
1225
1226 missing_dir=`cd $ac_aux_dir && pwd`
1227 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1228 echo "configure:1229: checking for working aclocal" >&5
1229 # Run test in a subshell; some versions of sh will print an error if
1230 # an executable is not found, even if stderr is redirected.
1231 # Redirect stdin to placate older versions of autoconf.  Sigh.
1232 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1233    ACLOCAL=aclocal
1234    echo "$ac_t""found" 1>&6
1235 else
1236    ACLOCAL="$missing_dir/missing aclocal"
1237    echo "$ac_t""missing" 1>&6
1238 fi
1239
1240 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1241 echo "configure:1242: checking for working autoconf" >&5
1242 # Run test in a subshell; some versions of sh will print an error if
1243 # an executable is not found, even if stderr is redirected.
1244 # Redirect stdin to placate older versions of autoconf.  Sigh.
1245 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1246    AUTOCONF=autoconf
1247    echo "$ac_t""found" 1>&6
1248 else
1249    AUTOCONF="$missing_dir/missing autoconf"
1250    echo "$ac_t""missing" 1>&6
1251 fi
1252
1253 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1254 echo "configure:1255: checking for working automake" >&5
1255 # Run test in a subshell; some versions of sh will print an error if
1256 # an executable is not found, even if stderr is redirected.
1257 # Redirect stdin to placate older versions of autoconf.  Sigh.
1258 if (automake --version) < /dev/null > /dev/null 2>&1; then
1259    AUTOMAKE=automake
1260    echo "$ac_t""found" 1>&6
1261 else
1262    AUTOMAKE="$missing_dir/missing automake"
1263    echo "$ac_t""missing" 1>&6
1264 fi
1265
1266 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1267 echo "configure:1268: checking for working autoheader" >&5
1268 # Run test in a subshell; some versions of sh will print an error if
1269 # an executable is not found, even if stderr is redirected.
1270 # Redirect stdin to placate older versions of autoconf.  Sigh.
1271 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1272    AUTOHEADER=autoheader
1273    echo "$ac_t""found" 1>&6
1274 else
1275    AUTOHEADER="$missing_dir/missing autoheader"
1276    echo "$ac_t""missing" 1>&6
1277 fi
1278
1279 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1280 echo "configure:1281: checking for working makeinfo" >&5
1281 # Run test in a subshell; some versions of sh will print an error if
1282 # an executable is not found, even if stderr is redirected.
1283 # Redirect stdin to placate older versions of autoconf.  Sigh.
1284 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1285    MAKEINFO=makeinfo
1286    echo "$ac_t""found" 1>&6
1287 else
1288    MAKEINFO="$missing_dir/missing makeinfo"
1289    echo "$ac_t""missing" 1>&6
1290 fi
1291
1292 install_sh="$missing_dir/install-sh"
1293 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1294
1295 for ac_prog in gnutar gtar tar
1296 do
1297 # Extract the first word of "$ac_prog", so it can be a program name with args.
1298 set dummy $ac_prog; ac_word=$2
1299 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1300 echo "configure:1301: checking for $ac_word" >&5
1301 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1302   echo $ac_n "(cached) $ac_c" 1>&6
1303 else
1304   if test -n "$AMTAR"; then
1305   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1306 else
1307   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1308   ac_dummy="$PATH"
1309   for ac_dir in $ac_dummy; do
1310     test -z "$ac_dir" && ac_dir=.
1311     if test -f $ac_dir/$ac_word; then
1312       ac_cv_prog_AMTAR="$ac_prog"
1313       break
1314     fi
1315   done
1316   IFS="$ac_save_ifs"
1317 fi
1318 fi
1319 AMTAR="$ac_cv_prog_AMTAR"
1320 if test -n "$AMTAR"; then
1321   echo "$ac_t""$AMTAR" 1>&6
1322 else
1323   echo "$ac_t""no" 1>&6
1324 fi
1325
1326 test -n "$AMTAR" && break
1327 done
1328
1329
1330 AMTARFLAGS=
1331 if test -n "$AMTAR"; then
1332   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1333         AMTARFLAGS=o
1334   fi
1335 fi
1336
1337 cat >> confdefs.h <<EOF
1338 #define OPENLDAP_PACKAGE "$PACKAGE"
1339 EOF
1340
1341 cat >> confdefs.h <<EOF
1342 #define OPENLDAP_VERSION "$VERSION"
1343 EOF
1344
1345
1346 cat >> confdefs.h <<EOF
1347 #define LDAP_VENDOR_VERSION $OL_API_INC
1348 EOF
1349
1350 cat >> confdefs.h <<EOF
1351 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1352 EOF
1353
1354 cat >> confdefs.h <<EOF
1355 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1356 EOF
1357
1358 cat >> confdefs.h <<EOF
1359 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1360 EOF
1361
1362
1363 OPENLDAP_LIBVERSION=$OL_API_LIB
1364
1365
1366
1367 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1368 echo "configure:1369: checking configure arguments" >&5
1369
1370
1371 top_builddir=`pwd`
1372
1373 ldap_subdir="/openldap"
1374
1375 # Check whether --with-subdir or --without-subdir was given.
1376 if test "${with_subdir+set}" = set; then
1377   withval="$with_subdir"
1378   case "$withval" in
1379         no) ldap_subdir=""
1380                 ;;
1381         yes)
1382                 ;;
1383         /*|\\*)
1384                 ldap_subdir="$withval"
1385                 ;;
1386         *)
1387                 ldap_subdir="/$withval"
1388                 ;;
1389 esac
1390
1391 fi
1392
1393
1394 # OpenLDAP --enable-debug
1395         # Check whether --enable-debug or --disable-debug was given.
1396 if test "${enable_debug+set}" = set; then
1397   enableval="$enable_debug"
1398   
1399         ol_arg=invalid
1400         for ol_val in auto yes no ; do
1401                 if test "$enableval" = "$ol_val" ; then
1402                         ol_arg="$ol_val"
1403                 fi
1404         done
1405         if test "$ol_arg" = "invalid" ; then
1406                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1407         fi
1408         ol_enable_debug="$ol_arg"
1409
1410 else
1411         ol_enable_debug="yes"
1412 fi
1413 # end --enable-debug
1414 # OpenLDAP --enable-syslog
1415         # Check whether --enable-syslog or --disable-syslog was given.
1416 if test "${enable_syslog+set}" = set; then
1417   enableval="$enable_syslog"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto yes no ; do
1421                 if test "$enableval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1427         fi
1428         ol_enable_syslog="$ol_arg"
1429
1430 else
1431         ol_enable_syslog="auto"
1432 fi
1433 # end --enable-syslog
1434 # OpenLDAP --enable-proctitle
1435         # Check whether --enable-proctitle or --disable-proctitle was given.
1436 if test "${enable_proctitle+set}" = set; then
1437   enableval="$enable_proctitle"
1438   
1439         ol_arg=invalid
1440         for ol_val in auto yes no ; do
1441                 if test "$enableval" = "$ol_val" ; then
1442                         ol_arg="$ol_val"
1443                 fi
1444         done
1445         if test "$ol_arg" = "invalid" ; then
1446                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1447         fi
1448         ol_enable_proctitle="$ol_arg"
1449
1450 else
1451         ol_enable_proctitle="yes"
1452 fi
1453 # end --enable-proctitle
1454 # OpenLDAP --enable-cache
1455         # Check whether --enable-cache or --disable-cache was given.
1456 if test "${enable_cache+set}" = set; then
1457   enableval="$enable_cache"
1458   
1459         ol_arg=invalid
1460         for ol_val in auto yes no ; do
1461                 if test "$enableval" = "$ol_val" ; then
1462                         ol_arg="$ol_val"
1463                 fi
1464         done
1465         if test "$ol_arg" = "invalid" ; then
1466                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1467         fi
1468         ol_enable_cache="$ol_arg"
1469
1470 else
1471         ol_enable_cache="no"
1472 fi
1473 # end --enable-cache
1474 # OpenLDAP --enable-referrals
1475         # Check whether --enable-referrals or --disable-referrals was given.
1476 if test "${enable_referrals+set}" = set; then
1477   enableval="$enable_referrals"
1478   
1479         ol_arg=invalid
1480         for ol_val in auto yes no ; do
1481                 if test "$enableval" = "$ol_val" ; then
1482                         ol_arg="$ol_val"
1483                 fi
1484         done
1485         if test "$ol_arg" = "invalid" ; then
1486                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1487         fi
1488         ol_enable_referrals="$ol_arg"
1489
1490 else
1491         ol_enable_referrals="no"
1492 fi
1493 # end --enable-referrals
1494 # OpenLDAP --enable-kbind
1495         # Check whether --enable-kbind or --disable-kbind was given.
1496 if test "${enable_kbind+set}" = set; then
1497   enableval="$enable_kbind"
1498   
1499         ol_arg=invalid
1500         for ol_val in auto yes no ; do
1501                 if test "$enableval" = "$ol_val" ; then
1502                         ol_arg="$ol_val"
1503                 fi
1504         done
1505         if test "$ol_arg" = "invalid" ; then
1506                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1507         fi
1508         ol_enable_kbind="$ol_arg"
1509
1510 else
1511         ol_enable_kbind="no"
1512 fi
1513 # end --enable-kbind
1514 # OpenLDAP --enable-ipv6
1515         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1516 if test "${enable_ipv6+set}" = set; then
1517   enableval="$enable_ipv6"
1518   
1519         ol_arg=invalid
1520         for ol_val in auto yes no ; do
1521                 if test "$enableval" = "$ol_val" ; then
1522                         ol_arg="$ol_val"
1523                 fi
1524         done
1525         if test "$ol_arg" = "invalid" ; then
1526                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1527         fi
1528         ol_enable_ipv6="$ol_arg"
1529
1530 else
1531         ol_enable_ipv6="auto"
1532 fi
1533 # end --enable-ipv6
1534 # OpenLDAP --enable-local
1535         # Check whether --enable-local or --disable-local was given.
1536 if test "${enable_local+set}" = set; then
1537   enableval="$enable_local"
1538   
1539         ol_arg=invalid
1540         for ol_val in auto yes no ; do
1541                 if test "$enableval" = "$ol_val" ; then
1542                         ol_arg="$ol_val"
1543                 fi
1544         done
1545         if test "$ol_arg" = "invalid" ; then
1546                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1547         fi
1548         ol_enable_local="$ol_arg"
1549
1550 else
1551         ol_enable_local="auto"
1552 fi
1553 # end --enable-local
1554 # OpenLDAP --enable-x_compile
1555         # Check whether --enable-x_compile or --disable-x_compile was given.
1556 if test "${enable_x_compile+set}" = set; then
1557   enableval="$enable_x_compile"
1558   
1559         ol_arg=invalid
1560         for ol_val in yes no ; do
1561                 if test "$enableval" = "$ol_val" ; then
1562                         ol_arg="$ol_val"
1563                 fi
1564         done
1565         if test "$ol_arg" = "invalid" ; then
1566                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1567         fi
1568         ol_enable_x_compile="$ol_arg"
1569
1570 else
1571         ol_enable_x_compile="no"
1572 fi
1573 # end --enable-x_compile
1574
1575
1576 # OpenLDAP --with-cyrus_sasl
1577         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1578 if test "${with_cyrus_sasl+set}" = set; then
1579   withval="$with_cyrus_sasl"
1580   
1581         ol_arg=invalid
1582         for ol_val in auto yes no  ; do
1583                 if test "$withval" = "$ol_val" ; then
1584                         ol_arg="$ol_val"
1585                 fi
1586         done
1587         if test "$ol_arg" = "invalid" ; then
1588                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1589         fi
1590         ol_with_cyrus_sasl="$ol_arg"
1591
1592 else
1593         ol_with_cyrus_sasl="auto"
1594 fi
1595 # end --with-cyrus_sasl
1596
1597 # OpenLDAP --with-fetch
1598         # Check whether --with-fetch or --without-fetch was given.
1599 if test "${with_fetch+set}" = set; then
1600   withval="$with_fetch"
1601   
1602         ol_arg=invalid
1603         for ol_val in auto yes no  ; do
1604                 if test "$withval" = "$ol_val" ; then
1605                         ol_arg="$ol_val"
1606                 fi
1607         done
1608         if test "$ol_arg" = "invalid" ; then
1609                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1610         fi
1611         ol_with_fetch="$ol_arg"
1612
1613 else
1614         ol_with_fetch="auto"
1615 fi
1616 # end --with-fetch
1617
1618 # OpenLDAP --with-kerberos
1619         # Check whether --with-kerberos or --without-kerberos was given.
1620 if test "${with_kerberos+set}" = set; then
1621   withval="$with_kerberos"
1622   
1623         ol_arg=invalid
1624         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1625                 if test "$withval" = "$ol_val" ; then
1626                         ol_arg="$ol_val"
1627                 fi
1628         done
1629         if test "$ol_arg" = "invalid" ; then
1630                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1631         fi
1632         ol_with_kerberos="$ol_arg"
1633
1634 else
1635         ol_with_kerberos="auto"
1636 fi
1637 # end --with-kerberos
1638
1639 # OpenLDAP --with-readline
1640         # Check whether --with-readline or --without-readline was given.
1641 if test "${with_readline+set}" = set; then
1642   withval="$with_readline"
1643   
1644         ol_arg=invalid
1645         for ol_val in auto yes no  ; do
1646                 if test "$withval" = "$ol_val" ; then
1647                         ol_arg="$ol_val"
1648                 fi
1649         done
1650         if test "$ol_arg" = "invalid" ; then
1651                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1652         fi
1653         ol_with_readline="$ol_arg"
1654
1655 else
1656         ol_with_readline="auto"
1657 fi
1658 # end --with-readline
1659
1660 # OpenLDAP --with-threads
1661         # Check whether --with-threads or --without-threads was given.
1662 if test "${with_threads+set}" = set; then
1663   withval="$with_threads"
1664   
1665         ol_arg=invalid
1666         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1667                 if test "$withval" = "$ol_val" ; then
1668                         ol_arg="$ol_val"
1669                 fi
1670         done
1671         if test "$ol_arg" = "invalid" ; then
1672                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1673         fi
1674         ol_with_threads="$ol_arg"
1675
1676 else
1677         ol_with_threads="auto"
1678 fi
1679 # end --with-threads
1680
1681 # OpenLDAP --with-tls
1682         # Check whether --with-tls or --without-tls was given.
1683 if test "${with_tls+set}" = set; then
1684   withval="$with_tls"
1685   
1686         ol_arg=invalid
1687         for ol_val in auto ssleay openssl yes no  ; do
1688                 if test "$withval" = "$ol_val" ; then
1689                         ol_arg="$ol_val"
1690                 fi
1691         done
1692         if test "$ol_arg" = "invalid" ; then
1693                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1694         fi
1695         ol_with_tls="$ol_arg"
1696
1697 else
1698         ol_with_tls="auto"
1699 fi
1700 # end --with-tls
1701
1702 # OpenLDAP --with-yielding_select
1703         # Check whether --with-yielding_select or --without-yielding_select was given.
1704 if test "${with_yielding_select+set}" = set; then
1705   withval="$with_yielding_select"
1706   
1707         ol_arg=invalid
1708         for ol_val in auto yes no manual  ; do
1709                 if test "$withval" = "$ol_val" ; then
1710                         ol_arg="$ol_val"
1711                 fi
1712         done
1713         if test "$ol_arg" = "invalid" ; then
1714                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1715         fi
1716         ol_with_yielding_select="$ol_arg"
1717
1718 else
1719         ol_with_yielding_select="auto"
1720 fi
1721 # end --with-yielding_select
1722
1723
1724
1725 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1726 if test "${with_xxslapdoptions+set}" = set; then
1727   withval="$with_xxslapdoptions"
1728   :
1729 fi
1730
1731 # OpenLDAP --enable-slapd
1732         # Check whether --enable-slapd or --disable-slapd was given.
1733 if test "${enable_slapd+set}" = set; then
1734   enableval="$enable_slapd"
1735   
1736         ol_arg=invalid
1737         for ol_val in auto yes no ; do
1738                 if test "$enableval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1744         fi
1745         ol_enable_slapd="$ol_arg"
1746
1747 else
1748         ol_enable_slapd="yes"
1749 fi
1750 # end --enable-slapd
1751 # OpenLDAP --enable-aci
1752         # Check whether --enable-aci or --disable-aci was given.
1753 if test "${enable_aci+set}" = set; then
1754   enableval="$enable_aci"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1764         fi
1765         ol_enable_aci="$ol_arg"
1766
1767 else
1768         ol_enable_aci="no"
1769 fi
1770 # end --enable-aci
1771 # OpenLDAP --enable-cleartext
1772         # Check whether --enable-cleartext or --disable-cleartext was given.
1773 if test "${enable_cleartext+set}" = set; then
1774   enableval="$enable_cleartext"
1775   
1776         ol_arg=invalid
1777         for ol_val in auto yes no ; do
1778                 if test "$enableval" = "$ol_val" ; then
1779                         ol_arg="$ol_val"
1780                 fi
1781         done
1782         if test "$ol_arg" = "invalid" ; then
1783                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1784         fi
1785         ol_enable_cleartext="$ol_arg"
1786
1787 else
1788         ol_enable_cleartext="yes"
1789 fi
1790 # end --enable-cleartext
1791 # OpenLDAP --enable-crypt
1792         # Check whether --enable-crypt or --disable-crypt was given.
1793 if test "${enable_crypt+set}" = set; then
1794   enableval="$enable_crypt"
1795   
1796         ol_arg=invalid
1797         for ol_val in auto yes no ; do
1798                 if test "$enableval" = "$ol_val" ; then
1799                         ol_arg="$ol_val"
1800                 fi
1801         done
1802         if test "$ol_arg" = "invalid" ; then
1803                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1804         fi
1805         ol_enable_crypt="$ol_arg"
1806
1807 else
1808         ol_enable_crypt="no"
1809 fi
1810 # end --enable-crypt
1811 # OpenLDAP --enable-dynamic
1812         # Check whether --enable-dynamic or --disable-dynamic was given.
1813 if test "${enable_dynamic+set}" = set; then
1814   enableval="$enable_dynamic"
1815   
1816         ol_arg=invalid
1817         for ol_val in auto yes no ; do
1818                 if test "$enableval" = "$ol_val" ; then
1819                         ol_arg="$ol_val"
1820                 fi
1821         done
1822         if test "$ol_arg" = "invalid" ; then
1823                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1824         fi
1825         ol_enable_dynamic="$ol_arg"
1826
1827 else
1828         ol_enable_dynamic="no"
1829 fi
1830 # end --enable-dynamic
1831 # OpenLDAP --enable-kpasswd
1832         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1833 if test "${enable_kpasswd+set}" = set; then
1834   enableval="$enable_kpasswd"
1835   
1836         ol_arg=invalid
1837         for ol_val in auto yes no ; do
1838                 if test "$enableval" = "$ol_val" ; then
1839                         ol_arg="$ol_val"
1840                 fi
1841         done
1842         if test "$ol_arg" = "invalid" ; then
1843                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1844         fi
1845         ol_enable_kpasswd="$ol_arg"
1846
1847 else
1848         ol_enable_kpasswd="no"
1849 fi
1850 # end --enable-kpasswd
1851 # OpenLDAP --enable-lmpasswd
1852         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1853 if test "${enable_lmpasswd+set}" = set; then
1854   enableval="$enable_lmpasswd"
1855   
1856         ol_arg=invalid
1857         for ol_val in auto yes no ; do
1858                 if test "$enableval" = "$ol_val" ; then
1859                         ol_arg="$ol_val"
1860                 fi
1861         done
1862         if test "$ol_arg" = "invalid" ; then
1863                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1864         fi
1865         ol_enable_lmpasswd="$ol_arg"
1866
1867 else
1868         ol_enable_lmpasswd="no"
1869 fi
1870 # end --enable-lmpasswd
1871 # OpenLDAP --enable-spasswd
1872         # Check whether --enable-spasswd or --disable-spasswd was given.
1873 if test "${enable_spasswd+set}" = set; then
1874   enableval="$enable_spasswd"
1875   
1876         ol_arg=invalid
1877         for ol_val in auto yes no ; do
1878                 if test "$enableval" = "$ol_val" ; then
1879                         ol_arg="$ol_val"
1880                 fi
1881         done
1882         if test "$ol_arg" = "invalid" ; then
1883                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1884         fi
1885         ol_enable_spasswd="$ol_arg"
1886
1887 else
1888         ol_enable_spasswd="no"
1889 fi
1890 # end --enable-spasswd
1891 # OpenLDAP --enable-modules
1892         # Check whether --enable-modules or --disable-modules was given.
1893 if test "${enable_modules+set}" = set; then
1894   enableval="$enable_modules"
1895   
1896         ol_arg=invalid
1897         for ol_val in auto yes no ; do
1898                 if test "$enableval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1904         fi
1905         ol_enable_modules="$ol_arg"
1906
1907 else
1908         ol_enable_modules="no"
1909 fi
1910 # end --enable-modules
1911 # OpenLDAP --enable-phonetic
1912         # Check whether --enable-phonetic or --disable-phonetic was given.
1913 if test "${enable_phonetic+set}" = set; then
1914   enableval="$enable_phonetic"
1915   
1916         ol_arg=invalid
1917         for ol_val in auto yes no ; do
1918                 if test "$enableval" = "$ol_val" ; then
1919                         ol_arg="$ol_val"
1920                 fi
1921         done
1922         if test "$ol_arg" = "invalid" ; then
1923                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1924         fi
1925         ol_enable_phonetic="$ol_arg"
1926
1927 else
1928         ol_enable_phonetic="no"
1929 fi
1930 # end --enable-phonetic
1931 # OpenLDAP --enable-rewrite
1932         # Check whether --enable-rewrite or --disable-rewrite was given.
1933 if test "${enable_rewrite+set}" = set; then
1934   enableval="$enable_rewrite"
1935   
1936         ol_arg=invalid
1937         for ol_val in auto yes no ; do
1938                 if test "$enableval" = "$ol_val" ; then
1939                         ol_arg="$ol_val"
1940                 fi
1941         done
1942         if test "$ol_arg" = "invalid" ; then
1943                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1944         fi
1945         ol_enable_rewrite="$ol_arg"
1946
1947 else
1948         ol_enable_rewrite="no"
1949 fi
1950 # end --enable-rewrite
1951 # OpenLDAP --enable-rlookups
1952         # Check whether --enable-rlookups or --disable-rlookups was given.
1953 if test "${enable_rlookups+set}" = set; then
1954   enableval="$enable_rlookups"
1955   
1956         ol_arg=invalid
1957         for ol_val in auto yes no ; do
1958                 if test "$enableval" = "$ol_val" ; then
1959                         ol_arg="$ol_val"
1960                 fi
1961         done
1962         if test "$ol_arg" = "invalid" ; then
1963                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1964         fi
1965         ol_enable_rlookups="$ol_arg"
1966
1967 else
1968         ol_enable_rlookups="no"
1969 fi
1970 # end --enable-rlookups
1971 # OpenLDAP --enable-slp
1972         # Check whether --enable-slp or --disable-slp was given.
1973 if test "${enable_slp+set}" = set; then
1974   enableval="$enable_slp"
1975   
1976         ol_arg=invalid
1977         for ol_val in auto yes no ; do
1978                 if test "$enableval" = "$ol_val" ; then
1979                         ol_arg="$ol_val"
1980                 fi
1981         done
1982         if test "$ol_arg" = "invalid" ; then
1983                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1984         fi
1985         ol_enable_slp="$ol_arg"
1986
1987 else
1988         ol_enable_slp="no"
1989 fi
1990 # end --enable-slp
1991 # OpenLDAP --enable-wrappers
1992         # Check whether --enable-wrappers or --disable-wrappers was given.
1993 if test "${enable_wrappers+set}" = set; then
1994   enableval="$enable_wrappers"
1995   
1996         ol_arg=invalid
1997         for ol_val in auto yes no ; do
1998                 if test "$enableval" = "$ol_val" ; then
1999                         ol_arg="$ol_val"
2000                 fi
2001         done
2002         if test "$ol_arg" = "invalid" ; then
2003                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
2004         fi
2005         ol_enable_wrappers="$ol_arg"
2006
2007 else
2008         ol_enable_wrappers="no"
2009 fi
2010 # end --enable-wrappers
2011
2012 # OpenLDAP --enable-bdb
2013         # Check whether --enable-bdb or --disable-bdb was given.
2014 if test "${enable_bdb+set}" = set; then
2015   enableval="$enable_bdb"
2016   
2017         ol_arg=invalid
2018         for ol_val in auto yes no ; do
2019                 if test "$enableval" = "$ol_val" ; then
2020                         ol_arg="$ol_val"
2021                 fi
2022         done
2023         if test "$ol_arg" = "invalid" ; then
2024                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2025         fi
2026         ol_enable_bdb="$ol_arg"
2027
2028 else
2029         ol_enable_bdb="yes"
2030 fi
2031 # end --enable-bdb
2032 # OpenLDAP --with-bdb_module
2033         # Check whether --with-bdb_module or --without-bdb_module was given.
2034 if test "${with_bdb_module+set}" = set; then
2035   withval="$with_bdb_module"
2036   
2037         ol_arg=invalid
2038         for ol_val in static dynamic ; do
2039                 if test "$withval" = "$ol_val" ; then
2040                         ol_arg="$ol_val"
2041                 fi
2042         done
2043         if test "$ol_arg" = "invalid" ; then
2044                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2045         fi
2046         ol_with_bdb_module="$ol_arg"
2047
2048 else
2049         ol_with_bdb_module="static"
2050 fi
2051 # end --with-bdb_module
2052
2053 # OpenLDAP --enable-dnssrv
2054         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2055 if test "${enable_dnssrv+set}" = set; then
2056   enableval="$enable_dnssrv"
2057   
2058         ol_arg=invalid
2059         for ol_val in auto yes no ; do
2060                 if test "$enableval" = "$ol_val" ; then
2061                         ol_arg="$ol_val"
2062                 fi
2063         done
2064         if test "$ol_arg" = "invalid" ; then
2065                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2066         fi
2067         ol_enable_dnssrv="$ol_arg"
2068
2069 else
2070         ol_enable_dnssrv="no"
2071 fi
2072 # end --enable-dnssrv
2073 # OpenLDAP --with-dnssrv_module
2074         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2075 if test "${with_dnssrv_module+set}" = set; then
2076   withval="$with_dnssrv_module"
2077   
2078         ol_arg=invalid
2079         for ol_val in static dynamic ; do
2080                 if test "$withval" = "$ol_val" ; then
2081                         ol_arg="$ol_val"
2082                 fi
2083         done
2084         if test "$ol_arg" = "invalid" ; then
2085                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2086         fi
2087         ol_with_dnssrv_module="$ol_arg"
2088
2089 else
2090         ol_with_dnssrv_module="static"
2091 fi
2092 # end --with-dnssrv_module
2093
2094 # OpenLDAP --enable-ldap
2095         # Check whether --enable-ldap or --disable-ldap was given.
2096 if test "${enable_ldap+set}" = set; then
2097   enableval="$enable_ldap"
2098   
2099         ol_arg=invalid
2100         for ol_val in auto yes no ; do
2101                 if test "$enableval" = "$ol_val" ; then
2102                         ol_arg="$ol_val"
2103                 fi
2104         done
2105         if test "$ol_arg" = "invalid" ; then
2106                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2107         fi
2108         ol_enable_ldap="$ol_arg"
2109
2110 else
2111         ol_enable_ldap="no"
2112 fi
2113 # end --enable-ldap
2114 # OpenLDAP --with-ldap_module
2115         # Check whether --with-ldap_module or --without-ldap_module was given.
2116 if test "${with_ldap_module+set}" = set; then
2117   withval="$with_ldap_module"
2118   
2119         ol_arg=invalid
2120         for ol_val in static dynamic ; do
2121                 if test "$withval" = "$ol_val" ; then
2122                         ol_arg="$ol_val"
2123                 fi
2124         done
2125         if test "$ol_arg" = "invalid" ; then
2126                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2127         fi
2128         ol_with_ldap_module="$ol_arg"
2129
2130 else
2131         ol_with_ldap_module="static"
2132 fi
2133 # end --with-ldap_module
2134
2135 # OpenLDAP --enable-ldbm
2136         # Check whether --enable-ldbm or --disable-ldbm was given.
2137 if test "${enable_ldbm+set}" = set; then
2138   enableval="$enable_ldbm"
2139   
2140         ol_arg=invalid
2141         for ol_val in auto yes no ; do
2142                 if test "$enableval" = "$ol_val" ; then
2143                         ol_arg="$ol_val"
2144                 fi
2145         done
2146         if test "$ol_arg" = "invalid" ; then
2147                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2148         fi
2149         ol_enable_ldbm="$ol_arg"
2150
2151 else
2152         ol_enable_ldbm="no"
2153 fi
2154 # end --enable-ldbm
2155 # OpenLDAP --with-ldbm_api
2156         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2157 if test "${with_ldbm_api+set}" = set; then
2158   withval="$with_ldbm_api"
2159   
2160         ol_arg=invalid
2161         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2162                 if test "$withval" = "$ol_val" ; then
2163                         ol_arg="$ol_val"
2164                 fi
2165         done
2166         if test "$ol_arg" = "invalid" ; then
2167                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2168         fi
2169         ol_with_ldbm_api="$ol_arg"
2170
2171 else
2172         ol_with_ldbm_api="auto"
2173 fi
2174 # end --with-ldbm_api
2175
2176 # OpenLDAP --with-ldbm_module
2177         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2178 if test "${with_ldbm_module+set}" = set; then
2179   withval="$with_ldbm_module"
2180   
2181         ol_arg=invalid
2182         for ol_val in static dynamic ; do
2183                 if test "$withval" = "$ol_val" ; then
2184                         ol_arg="$ol_val"
2185                 fi
2186         done
2187         if test "$ol_arg" = "invalid" ; then
2188                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2189         fi
2190         ol_with_ldbm_module="$ol_arg"
2191
2192 else
2193         ol_with_ldbm_module="static"
2194 fi
2195 # end --with-ldbm_module
2196
2197 # OpenLDAP --with-ldbm_type
2198         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2199 if test "${with_ldbm_type+set}" = set; then
2200   withval="$with_ldbm_type"
2201   
2202         ol_arg=invalid
2203         for ol_val in auto btree hash ; do
2204                 if test "$withval" = "$ol_val" ; then
2205                         ol_arg="$ol_val"
2206                 fi
2207         done
2208         if test "$ol_arg" = "invalid" ; then
2209                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2210         fi
2211         ol_with_ldbm_type="$ol_arg"
2212
2213 else
2214         ol_with_ldbm_type="auto"
2215 fi
2216 # end --with-ldbm_type
2217
2218 # OpenLDAP --enable-meta
2219         # Check whether --enable-meta or --disable-meta was given.
2220 if test "${enable_meta+set}" = set; then
2221   enableval="$enable_meta"
2222   
2223         ol_arg=invalid
2224         for ol_val in auto yes no ; do
2225                 if test "$enableval" = "$ol_val" ; then
2226                         ol_arg="$ol_val"
2227                 fi
2228         done
2229         if test "$ol_arg" = "invalid" ; then
2230                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2231         fi
2232         ol_enable_meta="$ol_arg"
2233
2234 else
2235         ol_enable_meta="no"
2236 fi
2237 # end --enable-meta
2238 # OpenLDAP --with-meta_module
2239         # Check whether --with-meta_module or --without-meta_module was given.
2240 if test "${with_meta_module+set}" = set; then
2241   withval="$with_meta_module"
2242   
2243         ol_arg=invalid
2244         for ol_val in static dynamic ; do
2245                 if test "$withval" = "$ol_val" ; then
2246                         ol_arg="$ol_val"
2247                 fi
2248         done
2249         if test "$ol_arg" = "invalid" ; then
2250                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2251         fi
2252         ol_with_meta_module="$ol_arg"
2253
2254 else
2255         ol_with_meta_module="static"
2256 fi
2257 # end --with-meta_module
2258
2259 # OpenLDAP --enable-monitor
2260         # Check whether --enable-monitor or --disable-monitor was given.
2261 if test "${enable_monitor+set}" = set; then
2262   enableval="$enable_monitor"
2263   
2264         ol_arg=invalid
2265         for ol_val in auto yes no ; do
2266                 if test "$enableval" = "$ol_val" ; then
2267                         ol_arg="$ol_val"
2268                 fi
2269         done
2270         if test "$ol_arg" = "invalid" ; then
2271                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2272         fi
2273         ol_enable_monitor="$ol_arg"
2274
2275 else
2276         ol_enable_monitor="no"
2277 fi
2278 # end --enable-monitor
2279 # OpenLDAP --with-monitor_module
2280         # Check whether --with-monitor_module or --without-monitor_module was given.
2281 if test "${with_monitor_module+set}" = set; then
2282   withval="$with_monitor_module"
2283   
2284         ol_arg=invalid
2285         for ol_val in static dynamic ; do
2286                 if test "$withval" = "$ol_val" ; then
2287                         ol_arg="$ol_val"
2288                 fi
2289         done
2290         if test "$ol_arg" = "invalid" ; then
2291                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2292         fi
2293         ol_with_monitor_module="$ol_arg"
2294
2295 else
2296         ol_with_monitor_module="static"
2297 fi
2298 # end --with-monitor_module
2299
2300 # OpenLDAP --enable-null
2301         # Check whether --enable-null or --disable-null was given.
2302 if test "${enable_null+set}" = set; then
2303   enableval="$enable_null"
2304   
2305         ol_arg=invalid
2306         for ol_val in auto yes no ; do
2307                 if test "$enableval" = "$ol_val" ; then
2308                         ol_arg="$ol_val"
2309                 fi
2310         done
2311         if test "$ol_arg" = "invalid" ; then
2312                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2313         fi
2314         ol_enable_null="$ol_arg"
2315
2316 else
2317         ol_enable_null="no"
2318 fi
2319 # end --enable-null
2320 # OpenLDAP --with-null_module
2321         # Check whether --with-null_module or --without-null_module was given.
2322 if test "${with_null_module+set}" = set; then
2323   withval="$with_null_module"
2324   
2325         ol_arg=invalid
2326         for ol_val in static dynamic ; do
2327                 if test "$withval" = "$ol_val" ; then
2328                         ol_arg="$ol_val"
2329                 fi
2330         done
2331         if test "$ol_arg" = "invalid" ; then
2332                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2333         fi
2334         ol_with_null_module="$ol_arg"
2335
2336 else
2337         ol_with_null_module="static"
2338 fi
2339 # end --with-null_module
2340
2341 # OpenLDAP --enable-passwd
2342         # Check whether --enable-passwd or --disable-passwd was given.
2343 if test "${enable_passwd+set}" = set; then
2344   enableval="$enable_passwd"
2345   
2346         ol_arg=invalid
2347         for ol_val in auto yes no ; do
2348                 if test "$enableval" = "$ol_val" ; then
2349                         ol_arg="$ol_val"
2350                 fi
2351         done
2352         if test "$ol_arg" = "invalid" ; then
2353                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2354         fi
2355         ol_enable_passwd="$ol_arg"
2356
2357 else
2358         ol_enable_passwd="no"
2359 fi
2360 # end --enable-passwd
2361 # OpenLDAP --with-passwd_module
2362         # Check whether --with-passwd_module or --without-passwd_module was given.
2363 if test "${with_passwd_module+set}" = set; then
2364   withval="$with_passwd_module"
2365   
2366         ol_arg=invalid
2367         for ol_val in static dynamic ; do
2368                 if test "$withval" = "$ol_val" ; then
2369                         ol_arg="$ol_val"
2370                 fi
2371         done
2372         if test "$ol_arg" = "invalid" ; then
2373                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2374         fi
2375         ol_with_passwd_module="$ol_arg"
2376
2377 else
2378         ol_with_passwd_module="static"
2379 fi
2380 # end --with-passwd_module
2381
2382 # OpenLDAP --enable-perl
2383         # Check whether --enable-perl or --disable-perl was given.
2384 if test "${enable_perl+set}" = set; then
2385   enableval="$enable_perl"
2386   
2387         ol_arg=invalid
2388         for ol_val in auto yes no ; do
2389                 if test "$enableval" = "$ol_val" ; then
2390                         ol_arg="$ol_val"
2391                 fi
2392         done
2393         if test "$ol_arg" = "invalid" ; then
2394                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2395         fi
2396         ol_enable_perl="$ol_arg"
2397
2398 else
2399         ol_enable_perl="no"
2400 fi
2401 # end --enable-perl
2402 # OpenLDAP --with-perl_module
2403         # Check whether --with-perl_module or --without-perl_module was given.
2404 if test "${with_perl_module+set}" = set; then
2405   withval="$with_perl_module"
2406   
2407         ol_arg=invalid
2408         for ol_val in static dynamic ; do
2409                 if test "$withval" = "$ol_val" ; then
2410                         ol_arg="$ol_val"
2411                 fi
2412         done
2413         if test "$ol_arg" = "invalid" ; then
2414                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2415         fi
2416         ol_with_perl_module="$ol_arg"
2417
2418 else
2419         ol_with_perl_module="static"
2420 fi
2421 # end --with-perl_module
2422
2423 # OpenLDAP --enable-shell
2424         # Check whether --enable-shell or --disable-shell was given.
2425 if test "${enable_shell+set}" = set; then
2426   enableval="$enable_shell"
2427   
2428         ol_arg=invalid
2429         for ol_val in auto yes no ; do
2430                 if test "$enableval" = "$ol_val" ; then
2431                         ol_arg="$ol_val"
2432                 fi
2433         done
2434         if test "$ol_arg" = "invalid" ; then
2435                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2436         fi
2437         ol_enable_shell="$ol_arg"
2438
2439 else
2440         ol_enable_shell="no"
2441 fi
2442 # end --enable-shell
2443 # OpenLDAP --with-shell_module
2444         # Check whether --with-shell_module or --without-shell_module was given.
2445 if test "${with_shell_module+set}" = set; then
2446   withval="$with_shell_module"
2447   
2448         ol_arg=invalid
2449         for ol_val in static dynamic ; do
2450                 if test "$withval" = "$ol_val" ; then
2451                         ol_arg="$ol_val"
2452                 fi
2453         done
2454         if test "$ol_arg" = "invalid" ; then
2455                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2456         fi
2457         ol_with_shell_module="$ol_arg"
2458
2459 else
2460         ol_with_shell_module="static"
2461 fi
2462 # end --with-shell_module
2463
2464 # OpenLDAP --enable-sql
2465         # Check whether --enable-sql or --disable-sql was given.
2466 if test "${enable_sql+set}" = set; then
2467   enableval="$enable_sql"
2468   
2469         ol_arg=invalid
2470         for ol_val in auto yes no ; do
2471                 if test "$enableval" = "$ol_val" ; then
2472                         ol_arg="$ol_val"
2473                 fi
2474         done
2475         if test "$ol_arg" = "invalid" ; then
2476                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2477         fi
2478         ol_enable_sql="$ol_arg"
2479
2480 else
2481         ol_enable_sql="no"
2482 fi
2483 # end --enable-sql
2484 # OpenLDAP --with-sql_module
2485         # Check whether --with-sql_module or --without-sql_module was given.
2486 if test "${with_sql_module+set}" = set; then
2487   withval="$with_sql_module"
2488   
2489         ol_arg=invalid
2490         for ol_val in static dynamic ; do
2491                 if test "$withval" = "$ol_val" ; then
2492                         ol_arg="$ol_val"
2493                 fi
2494         done
2495         if test "$ol_arg" = "invalid" ; then
2496                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2497         fi
2498         ol_with_sql_module="$ol_arg"
2499
2500 else
2501         ol_with_sql_module="static"
2502 fi
2503 # end --with-sql_module
2504
2505 # OpenLDAP --enable-tcl
2506         # Check whether --enable-tcl or --disable-tcl was given.
2507 if test "${enable_tcl+set}" = set; then
2508   enableval="$enable_tcl"
2509   
2510         ol_arg=invalid
2511         for ol_val in auto yes no ; do
2512                 if test "$enableval" = "$ol_val" ; then
2513                         ol_arg="$ol_val"
2514                 fi
2515         done
2516         if test "$ol_arg" = "invalid" ; then
2517                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2518         fi
2519         ol_enable_tcl="$ol_arg"
2520
2521 else
2522         ol_enable_tcl="no"
2523 fi
2524 # end --enable-tcl
2525 # OpenLDAP --with-tcl_module
2526         # Check whether --with-tcl_module or --without-tcl_module was given.
2527 if test "${with_tcl_module+set}" = set; then
2528   withval="$with_tcl_module"
2529   
2530         ol_arg=invalid
2531         for ol_val in static dynamic ; do
2532                 if test "$withval" = "$ol_val" ; then
2533                         ol_arg="$ol_val"
2534                 fi
2535         done
2536         if test "$ol_arg" = "invalid" ; then
2537                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2538         fi
2539         ol_with_tcl_module="$ol_arg"
2540
2541 else
2542         ol_with_tcl_module="static"
2543 fi
2544 # end --with-tcl_module
2545
2546
2547 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2548 if test "${with_xxslurpdoptions+set}" = set; then
2549   withval="$with_xxslurpdoptions"
2550   :
2551 fi
2552
2553 # OpenLDAP --enable-slurpd
2554         # Check whether --enable-slurpd or --disable-slurpd was given.
2555 if test "${enable_slurpd+set}" = set; then
2556   enableval="$enable_slurpd"
2557   
2558         ol_arg=invalid
2559         for ol_val in auto yes no ; do
2560                 if test "$enableval" = "$ol_val" ; then
2561                         ol_arg="$ol_val"
2562                 fi
2563         done
2564         if test "$ol_arg" = "invalid" ; then
2565                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2566         fi
2567         ol_enable_slurpd="$ol_arg"
2568
2569 else
2570         ol_enable_slurpd="auto"
2571 fi
2572 # end --enable-slurpd
2573
2574 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2575 if test "${with_xxliboptions+set}" = set; then
2576   withval="$with_xxliboptions"
2577   :
2578 fi
2579
2580 # Check whether --enable-static or --disable-static was given.
2581 if test "${enable_static+set}" = set; then
2582   enableval="$enable_static"
2583   p=${PACKAGE-default}
2584 case $enableval in
2585 yes) enable_static=yes ;;
2586 no) enable_static=no ;;
2587 *)
2588   enable_static=no
2589   # Look at the argument we got.  We use all the common list separators.
2590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2591   for pkg in $enableval; do
2592     if test "X$pkg" = "X$p"; then
2593       enable_static=yes
2594     fi
2595   done
2596   IFS="$ac_save_ifs"
2597   ;;
2598 esac
2599 else
2600   enable_static=yes
2601 fi
2602
2603 # Check whether --enable-shared or --disable-shared was given.
2604 if test "${enable_shared+set}" = set; then
2605   enableval="$enable_shared"
2606   p=${PACKAGE-default}
2607 case $enableval in
2608 yes) enable_shared=yes ;;
2609 no) enable_shared=no ;;
2610 *)
2611   enable_shared=no
2612   # Look at the argument we got.  We use all the common list separators.
2613   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2614   for pkg in $enableval; do
2615     if test "X$pkg" = "X$p"; then
2616       enable_shared=yes
2617     fi
2618   done
2619   IFS="$ac_save_ifs"
2620   ;;
2621 esac
2622 else
2623   enable_shared=yes
2624 fi
2625
2626
2627
2628 # validate options
2629 if test $ol_enable_slapd = no ; then
2630                 if test $ol_enable_bdb = yes ; then
2631                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2632         fi
2633         if test $ol_enable_dnssrv = yes ; then
2634                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2635         fi
2636         if test $ol_enable_ldap = yes ; then
2637                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2638         fi
2639         if test $ol_enable_ldbm = yes ; then
2640                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2641         fi
2642         if test $ol_enable_meta = yes ; then
2643                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2644         fi
2645         if test $ol_enable_monitor = yes ; then
2646                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2647         fi
2648         if test $ol_enable_null = yes ; then
2649                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2650         fi
2651         if test $ol_enable_passwd = yes ; then
2652                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2653         fi
2654         if test $ol_enable_perl = yes ; then
2655                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2656         fi
2657         if test $ol_enable_shell = yes ; then
2658                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2659         fi
2660         if test $ol_enable_tcl = yes ; then
2661                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2662         fi
2663         if test $ol_enable_sql = yes ; then
2664                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2665         fi
2666         if test $ol_enable_modules = yes ; then
2667                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2668         fi
2669         if test $ol_enable_wrappers = yes ; then
2670                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2671         fi
2672         if test $ol_enable_phonetic = yes ; then
2673                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2674         fi
2675         if test $ol_enable_rlookups = yes ; then
2676                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2677         fi
2678         if test $ol_enable_aci = yes ; then
2679                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2680         fi
2681         if test $ol_with_ldbm_api != auto ; then
2682                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2683         fi
2684         if test $ol_with_ldbm_type != auto ; then
2685                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2686         fi
2687         if test $ol_with_bdb_module != static ; then
2688                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2689         fi
2690         if test $ol_with_dnssrv_module != static ; then
2691                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2692         fi
2693         if test $ol_with_ldap_module != static ; then
2694                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2695         fi
2696         if test $ol_with_ldbm_module != static ; then
2697                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2698         fi
2699         if test $ol_with_meta_module != static ; then
2700                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2701         fi
2702         if test $ol_with_monitor_module != static ; then
2703                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2704         fi
2705         if test $ol_with_null_module != static ; then
2706                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2707         fi
2708         if test $ol_with_passwd_module != static ; then
2709                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2710         fi
2711         if test $ol_with_perl_module != static ; then
2712                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2713         fi
2714         if test $ol_with_shell_module != static ; then
2715                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2716         fi
2717         if test $ol_with_tcl_module != static ; then
2718                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2719         fi
2720         if test $ol_with_sql_module != static ; then
2721                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2722         fi
2723         if test $ol_enable_slurpd = yes ; then
2724                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2725         fi
2726         if test $ol_enable_rewrite = yes ; then
2727                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2728         fi
2729
2730         # force settings to no
2731         ol_enable_bdb=no
2732         ol_enable_dnssrv=no
2733         ol_enable_ldap=no
2734         ol_enable_ldbm=no
2735         ol_enable_meta=no
2736         ol_enable_monitor=no
2737         ol_enable_null=no
2738         ol_enable_passwd=no
2739         ol_enable_perl=no
2740         ol_enable_shell=no
2741         ol_enable_tcl=no
2742         ol_enable_sql=no
2743
2744         ol_enable_modules=no
2745         ol_enable_phonetic=no
2746         ol_enable_rlookups=no
2747         ol_enable_aci=no
2748         ol_enable_wrappers=no
2749         ol_enable_dynamic=no
2750
2751         ol_with_ldbm_api=no
2752         ol_with_ldbm_type=no
2753
2754         ol_with_bdb_module=static
2755         ol_with_dnssrv_module=static
2756         ol_with_ldap_module=static
2757         ol_with_ldbm_module=static
2758         ol_with_meta_module=static
2759         ol_with_monitor_module=static
2760         ol_with_null_module=static
2761         ol_with_passwd_module=static
2762         ol_with_perl_module=static
2763         ol_with_shell_module=static
2764         ol_with_tcl_module=static
2765         ol_with_sql_module=static
2766
2767         ol_enable_slurpd=no
2768
2769         ol_enable_rewrite=no
2770
2771 elif test $ol_enable_ldbm = no ; then
2772         
2773         if test $ol_with_ldbm_api != auto ; then
2774                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2775         fi
2776
2777         if test $ol_with_ldbm_type != auto ; then
2778                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2779         fi
2780
2781         if test $ol_with_ldbm_module != static ; then
2782                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2783         fi
2784
2785         if test $ol_enable_modules != yes -a \
2786                 $ol_enable_bdb = no -a \
2787                 $ol_enable_dnssrv = no -a \
2788                 $ol_enable_ldap = no -a \
2789                 $ol_enable_meta = no -a \
2790                 $ol_enable_monitor = no -a \
2791                 $ol_enable_null = no -a \
2792                 $ol_enable_passwd = no -a \
2793                 $ol_enable_perl = no -a \
2794                 $ol_enable_shell = no -a \
2795                 $ol_enable_sql = no -a \
2796                 $ol_enable_tcl = no ; then
2797
2798                 if test $ol_enable_slapd = yes ; then
2799                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2800                 else
2801                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2802                         ol_enable_slapd=no
2803                 fi
2804         fi
2805
2806         ol_with_ldbm_api=no
2807         ol_with_ldbm_type=no
2808         ol_with_ldbm_module=static
2809
2810         if test $ol_enable_bdb != no ; then
2811                 ol_with_ldbm_api=berkeley
2812         fi
2813
2814 else
2815                 if test $ol_with_ldbm_api = gdbm -a \
2816                 $ol_with_ldbm_type = btree ; then
2817                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2818         fi
2819         if test $ol_with_ldbm_api = mdbm -a \
2820                 $ol_with_ldbm_type = btree ; then
2821                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2822         fi
2823         if test $ol_with_ldbm_api = ndbm -a \
2824                 $ol_with_ldbm_type = btree ; then
2825                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2826         fi
2827
2828         if test $ol_enable_bdb = yes ; then
2829                 if test $ol_with_ldbm_api = auto ; then
2830                         ol_with_ldbm_api=berkeley
2831                 elif test $ol_with_ldbm_api != berkeley ; then
2832                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2833                 fi
2834
2835         elif test $ol_enable_bdb = auto ; then
2836                 if test $ol_with_ldbm_api != berkeley \
2837                         -o $ol_with_ldbm_api != auto ; then
2838                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2839                         ol_enable_bdb=no
2840                 fi
2841         fi
2842 fi
2843
2844 if test $ol_enable_slurpd = yes ; then
2845                 if test $ol_with_threads = no ; then
2846                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2847         fi
2848 fi
2849
2850 if test $ol_enable_lmpasswd = yes ; then
2851         if test $ol_with_tls = no ; then
2852                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2853         fi
2854 fi
2855
2856 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2857         if test $ol_with_kerberos = no ; then
2858                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2859         elif test $ol_with_kerberos = auto ; then
2860                 ol_with_kerberos=yes
2861         fi
2862
2863 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2864         if test $ol_with_kerberos = auto ; then
2865                 ol_with_kerberos=no
2866         elif test $ol_with_kerberos != no ; then
2867                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2868                 ol_with_kerberos=no
2869         fi
2870 fi
2871
2872 if test $ol_enable_spasswd = yes ; then
2873         if test $ol_with_cyrus_sasl = no ; then
2874                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2875         fi
2876         ol_with_cyrus_sasl=yes
2877 fi
2878
2879 echo "$ac_t""done" 1>&6
2880
2881 LDAP_LIBS=
2882 LDIF_LIBS=
2883 LDBM_LIB=
2884 LDBM_LIBS=
2885 LTHREAD_LIBS=
2886 LUTIL_LIBS=
2887
2888 SLAPD_LIBS=
2889 SLURPD_LIBS=
2890
2891 BUILD_SLAPD=no
2892 BUILD_SLURPD=no
2893
2894 BUILD_THREAD=no
2895
2896 BUILD_BDB=no
2897 BUILD_DNSSRV=no
2898 BUILD_LDAP=no
2899 BUILD_LDBM=no
2900 BUILD_META=no
2901 BUILD_MONITOR=no
2902 BUILD_NULL=no
2903 BUILD_PASSWD=no
2904 BUILD_PERL=no
2905 BUILD_SHELL=no
2906 BUILD_SQL=no
2907 BUILD_TCL=no
2908
2909 BUILD_BDB_DYNAMIC=static
2910 BUILD_DNSSRV_DYNAMIC=static
2911 BUILD_LDAP_DYNAMIC=static
2912 BUILD_LDBM_DYNAMIC=static
2913 BUILD_META_DYNAMIC=static
2914 BUILD_MONITOR_DYNAMIC=static
2915 BUILD_NULL_DYNAMIC=static
2916 BUILD_PASSWD_DYNAMIC=static
2917 BUILD_PERL_DYNAMIC=static
2918 BUILD_SHELL_DYNAMIC=static
2919 BUILD_TCL_DYNAMIC=static
2920 BUILD_SQL_DYNAMIC=static
2921
2922 SLAPD_MODULES_LDFLAGS=
2923 SLAPD_MODULES_CPPFLAGS=
2924 SLAPD_MODULES_LIST=
2925
2926 SLAPD_STATIC_BACKENDS=
2927 SLAPD_DYNAMIC_BACKENDS=
2928
2929 SLAPD_PERL_LDFLAGS=
2930 MOD_PERL_LDFLAGS=
2931 PERL_CPPFLAGS=
2932
2933 SLAPD_SQL_LDFLAGS=
2934 SLAPD_SQL_LIBS=
2935 SLAPD_SQL_INCLUDES=
2936
2937 MOD_TCL_LIB=
2938 KRB4_LIBS=
2939 KRB5_LIBS=
2940 READLINE_LIBS=
2941 SASL_LIBS=
2942 TERMCAP_LIBS=
2943 TLS_LIBS=
2944 MODULES_LIBS=
2945 AUTH_LIBS=
2946
2947 SLAPD_SLP_LIBS=
2948
2949
2950 # Find a good install program.  We prefer a C program (faster),
2951 # so one script is as good as another.  But avoid the broken or
2952 # incompatible versions:
2953 # SysV /etc/install, /usr/sbin/install
2954 # SunOS /usr/etc/install
2955 # IRIX /sbin/install
2956 # AIX /bin/install
2957 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2958 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2959 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2960 # ./install, which can be erroneously created by make from ./install.sh.
2961 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2962 echo "configure:2963: checking for a BSD compatible install" >&5
2963 if test -z "$INSTALL"; then
2964 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2965   echo $ac_n "(cached) $ac_c" 1>&6
2966 else
2967     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2968   for ac_dir in $PATH; do
2969     # Account for people who put trailing slashes in PATH elements.
2970     case "$ac_dir/" in
2971     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2972     *)
2973       # OSF1 and SCO ODT 3.0 have their own names for install.
2974       # Don't use installbsd from OSF since it installs stuff as root
2975       # by default.
2976       for ac_prog in ginstall scoinst install; do
2977         if test -f $ac_dir/$ac_prog; then
2978           if test $ac_prog = install &&
2979             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2980             # AIX install.  It has an incompatible calling convention.
2981             :
2982           elif test $ac_prog = install &&
2983             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2984             # program-specific install script used by HP pwplus--don't use.
2985             :
2986           else
2987             ac_cv_path_install="$ac_dir/$ac_prog -c"
2988             break 2
2989           fi
2990         fi
2991       done
2992       ;;
2993     esac
2994   done
2995   IFS="$ac_save_IFS"
2996
2997 fi
2998   if test "${ac_cv_path_install+set}" = set; then
2999     INSTALL="$ac_cv_path_install"
3000   else
3001     # As a last resort, use the slow shell script.  We don't cache a
3002     # path for INSTALL within a source directory, because that will
3003     # break other packages using the cache if that directory is
3004     # removed, or if the path is relative.
3005     INSTALL="$ac_install_sh"
3006   fi
3007 fi
3008 echo "$ac_t""$INSTALL" 1>&6
3009
3010 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3011 # It thinks the first close brace ends the variable substitution.
3012 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3013
3014 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3015
3016 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3017
3018
3019 cat >> confdefs.h <<\EOF
3020 #define HAVE_MKVERSION 1
3021 EOF
3022
3023
3024
3025
3026 ol_aix_threads=no
3027 case "$target" in
3028 *-*-aix*)       if test -z "$CC" ; then
3029                 case "$ol_with_threads" in
3030                 auto | yes |  posix) ol_aix_threads=yes ;;
3031                 esac
3032         fi
3033 ;;
3034 esac
3035
3036 if test $ol_aix_threads = yes ; then
3037         if test -z "${CC}" ; then
3038                 for ac_prog in cc_r xlc_r cc
3039 do
3040 # Extract the first word of "$ac_prog", so it can be a program name with args.
3041 set dummy $ac_prog; ac_word=$2
3042 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3043 echo "configure:3044: checking for $ac_word" >&5
3044 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3045   echo $ac_n "(cached) $ac_c" 1>&6
3046 else
3047   if test -n "$CC"; then
3048   ac_cv_prog_CC="$CC" # Let the user override the test.
3049 else
3050   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3051   ac_dummy="$PATH"
3052   for ac_dir in $ac_dummy; do
3053     test -z "$ac_dir" && ac_dir=.
3054     if test -f $ac_dir/$ac_word; then
3055       ac_cv_prog_CC="$ac_prog"
3056       break
3057     fi
3058   done
3059   IFS="$ac_save_ifs"
3060 fi
3061 fi
3062 CC="$ac_cv_prog_CC"
3063 if test -n "$CC"; then
3064   echo "$ac_t""$CC" 1>&6
3065 else
3066   echo "$ac_t""no" 1>&6
3067 fi
3068
3069 test -n "$CC" && break
3070 done
3071
3072
3073                 if test "$CC" = cc ; then
3074                                                 if test $ol_with_threads != auto ; then
3075                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3076                         else
3077                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3078                         fi
3079                         ol_with_threads=no
3080                 fi
3081         fi
3082
3083         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3084                 ol_with_threads=posix
3085                 ol_cv_pthread_create=yes
3086         fi
3087 fi
3088
3089 if test -z "${CC}"; then
3090         for ac_prog in cc
3091 do
3092 # Extract the first word of "$ac_prog", so it can be a program name with args.
3093 set dummy $ac_prog; ac_word=$2
3094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3095 echo "configure:3096: checking for $ac_word" >&5
3096 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3097   echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099   if test -n "$CC"; then
3100   ac_cv_prog_CC="$CC" # Let the user override the test.
3101 else
3102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3103   ac_dummy="$PATH"
3104   for ac_dir in $ac_dummy; do
3105     test -z "$ac_dir" && ac_dir=.
3106     if test -f $ac_dir/$ac_word; then
3107       ac_cv_prog_CC="$ac_prog"
3108       break
3109     fi
3110   done
3111   IFS="$ac_save_ifs"
3112 fi
3113 fi
3114 CC="$ac_cv_prog_CC"
3115 if test -n "$CC"; then
3116   echo "$ac_t""$CC" 1>&6
3117 else
3118   echo "$ac_t""no" 1>&6
3119 fi
3120
3121 test -n "$CC" && break
3122 done
3123
3124 fi
3125
3126
3127 if test -z "${AR}"; then
3128         for ac_prog in ar gar
3129 do
3130 # Extract the first word of "$ac_prog", so it can be a program name with args.
3131 set dummy $ac_prog; ac_word=$2
3132 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3133 echo "configure:3134: checking for $ac_word" >&5
3134 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3135   echo $ac_n "(cached) $ac_c" 1>&6
3136 else
3137   if test -n "$AR"; then
3138   ac_cv_prog_AR="$AR" # Let the user override the test.
3139 else
3140   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3141   ac_dummy="$PATH"
3142   for ac_dir in $ac_dummy; do
3143     test -z "$ac_dir" && ac_dir=.
3144     if test -f $ac_dir/$ac_word; then
3145       ac_cv_prog_AR="$ac_prog"
3146       break
3147     fi
3148   done
3149   IFS="$ac_save_ifs"
3150 fi
3151 fi
3152 AR="$ac_cv_prog_AR"
3153 if test -n "$AR"; then
3154   echo "$ac_t""$AR" 1>&6
3155 else
3156   echo "$ac_t""no" 1>&6
3157 fi
3158
3159 test -n "$AR" && break
3160 done
3161 test -n "$AR" || AR="missing"
3162
3163
3164         if test "${AR}" = "missing" ; then
3165                 { echo "configure: error: Unable to locate ar(1).  Check PATH or set AR." 1>&2; exit 1; }
3166         fi
3167 fi
3168
3169
3170
3171 # Find the correct PATH separator.  Usually this is `:', but
3172 # DJGPP uses `;' like DOS.
3173 if test "X${PATH_SEPARATOR+set}" != Xset; then
3174   UNAME=${UNAME-`uname 2>/dev/null`}
3175   case X$UNAME in
3176     *-DOS) lt_cv_sys_path_separator=';' ;;
3177     *)     lt_cv_sys_path_separator=':' ;;
3178   esac
3179   PATH_SEPARATOR=$lt_cv_sys_path_separator
3180 fi
3181
3182 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3183 echo "configure:3184: checking for Cygwin environment" >&5
3184 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3185   echo $ac_n "(cached) $ac_c" 1>&6
3186 else
3187   cat > conftest.$ac_ext <<EOF
3188 #line 3189 "configure"
3189 #include "confdefs.h"
3190
3191 int main() {
3192
3193 #ifndef __CYGWIN__
3194 #define __CYGWIN__ __CYGWIN32__
3195 #endif
3196 return __CYGWIN__;
3197 ; return 0; }
3198 EOF
3199 if { (eval echo configure:3200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3200   rm -rf conftest*
3201   ac_cv_cygwin=yes
3202 else
3203   echo "configure: failed program was:" >&5
3204   cat conftest.$ac_ext >&5
3205   rm -rf conftest*
3206   ac_cv_cygwin=no
3207 fi
3208 rm -f conftest*
3209 fi
3210
3211 echo "$ac_t""$ac_cv_cygwin" 1>&6
3212 CYGWIN=
3213 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3214 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3215 echo "configure:3216: checking for mingw32 environment" >&5
3216 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3217   echo $ac_n "(cached) $ac_c" 1>&6
3218 else
3219   cat > conftest.$ac_ext <<EOF
3220 #line 3221 "configure"
3221 #include "confdefs.h"
3222
3223 int main() {
3224 return __MINGW32__;
3225 ; return 0; }
3226 EOF
3227 if { (eval echo configure:3228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3228   rm -rf conftest*
3229   ac_cv_mingw32=yes
3230 else
3231   echo "configure: failed program was:" >&5
3232   cat conftest.$ac_ext >&5
3233   rm -rf conftest*
3234   ac_cv_mingw32=no
3235 fi
3236 rm -f conftest*
3237 fi
3238
3239 echo "$ac_t""$ac_cv_mingw32" 1>&6
3240 MINGW32=
3241 test "$ac_cv_mingw32" = yes && MINGW32=yes
3242 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3243 echo "configure:3244: checking for EMX OS/2 environment" >&5
3244 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3245   echo $ac_n "(cached) $ac_c" 1>&6
3246 else
3247   cat > conftest.$ac_ext <<EOF
3248 #line 3249 "configure"
3249 #include "confdefs.h"
3250
3251 int main() {
3252 return __EMX__;
3253 ; return 0; }
3254 EOF
3255 if { (eval echo configure:3256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3256   rm -rf conftest*
3257   ac_cv_emxos2=yes
3258 else
3259   echo "configure: failed program was:" >&5
3260   cat conftest.$ac_ext >&5
3261   rm -rf conftest*
3262   ac_cv_emxos2=no
3263 fi
3264 rm -f conftest*
3265 fi
3266
3267 echo "$ac_t""$ac_cv_emxos2" 1>&6
3268 EMXOS2=
3269 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3270 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3271 echo "configure:3272: checking how to run the C preprocessor" >&5
3272 # On Suns, sometimes $CPP names a directory.
3273 if test -n "$CPP" && test -d "$CPP"; then
3274   CPP=
3275 fi
3276 if test -z "$CPP"; then
3277 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3278   echo $ac_n "(cached) $ac_c" 1>&6
3279 else
3280     # This must be in double quotes, not single quotes, because CPP may get
3281   # substituted into the Makefile and "${CC-cc}" will confuse make.
3282   CPP="${CC-cc} -E"
3283   # On the NeXT, cc -E runs the code through the compiler's parser,
3284   # not just through cpp.
3285   cat > conftest.$ac_ext <<EOF
3286 #line 3287 "configure"
3287 #include "confdefs.h"
3288 #include <assert.h>
3289 Syntax Error
3290 EOF
3291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3292 { (eval echo configure:3293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3294 if test -z "$ac_err"; then
3295   :
3296 else
3297   echo "$ac_err" >&5
3298   echo "configure: failed program was:" >&5
3299   cat conftest.$ac_ext >&5
3300   rm -rf conftest*
3301   CPP="${CC-cc} -E -traditional-cpp"
3302   cat > conftest.$ac_ext <<EOF
3303 #line 3304 "configure"
3304 #include "confdefs.h"
3305 #include <assert.h>
3306 Syntax Error
3307 EOF
3308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3309 { (eval echo configure:3310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3311 if test -z "$ac_err"; then
3312   :
3313 else
3314   echo "$ac_err" >&5
3315   echo "configure: failed program was:" >&5
3316   cat conftest.$ac_ext >&5
3317   rm -rf conftest*
3318   CPP="${CC-cc} -nologo -E"
3319   cat > conftest.$ac_ext <<EOF
3320 #line 3321 "configure"
3321 #include "confdefs.h"
3322 #include <assert.h>
3323 Syntax Error
3324 EOF
3325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3326 { (eval echo configure:3327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3328 if test -z "$ac_err"; then
3329   :
3330 else
3331   echo "$ac_err" >&5
3332   echo "configure: failed program was:" >&5
3333   cat conftest.$ac_ext >&5
3334   rm -rf conftest*
3335   CPP=/lib/cpp
3336 fi
3337 rm -f conftest*
3338 fi
3339 rm -f conftest*
3340 fi
3341 rm -f conftest*
3342   ac_cv_prog_CPP="$CPP"
3343 fi
3344   CPP="$ac_cv_prog_CPP"
3345 else
3346   ac_cv_prog_CPP="$CPP"
3347 fi
3348 echo "$ac_t""$CPP" 1>&6
3349
3350 # Check whether --enable-fast-install or --disable-fast-install was given.
3351 if test "${enable_fast_install+set}" = set; then
3352   enableval="$enable_fast_install"
3353   p=${PACKAGE-default}
3354 case $enableval in
3355 yes) enable_fast_install=yes ;;
3356 no) enable_fast_install=no ;;
3357 *)
3358   enable_fast_install=no
3359   # Look at the argument we got.  We use all the common list separators.
3360   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3361   for pkg in $enableval; do
3362     if test "X$pkg" = "X$p"; then
3363       enable_fast_install=yes
3364     fi
3365   done
3366   IFS="$ac_save_ifs"
3367   ;;
3368 esac
3369 else
3370   enable_fast_install=yes
3371 fi
3372
3373 # Extract the first word of "gcc", so it can be a program name with args.
3374 set dummy gcc; ac_word=$2
3375 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3376 echo "configure:3377: checking for $ac_word" >&5
3377 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3378   echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380   if test -n "$CC"; then
3381   ac_cv_prog_CC="$CC" # Let the user override the test.
3382 else
3383   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3384   ac_dummy="$PATH"
3385   for ac_dir in $ac_dummy; do
3386     test -z "$ac_dir" && ac_dir=.
3387     if test -f $ac_dir/$ac_word; then
3388       ac_cv_prog_CC="gcc"
3389       break
3390     fi
3391   done
3392   IFS="$ac_save_ifs"
3393 fi
3394 fi
3395 CC="$ac_cv_prog_CC"
3396 if test -n "$CC"; then
3397   echo "$ac_t""$CC" 1>&6
3398 else
3399   echo "$ac_t""no" 1>&6
3400 fi
3401
3402 if test -z "$CC"; then
3403   # Extract the first word of "cc", so it can be a program name with args.
3404 set dummy cc; ac_word=$2
3405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3406 echo "configure:3407: checking for $ac_word" >&5
3407 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3408   echo $ac_n "(cached) $ac_c" 1>&6
3409 else
3410   if test -n "$CC"; then
3411   ac_cv_prog_CC="$CC" # Let the user override the test.
3412 else
3413   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3414   ac_prog_rejected=no
3415   ac_dummy="$PATH"
3416   for ac_dir in $ac_dummy; do
3417     test -z "$ac_dir" && ac_dir=.
3418     if test -f $ac_dir/$ac_word; then
3419       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3420         ac_prog_rejected=yes
3421         continue
3422       fi
3423       ac_cv_prog_CC="cc"
3424       break
3425     fi
3426   done
3427   IFS="$ac_save_ifs"
3428 if test $ac_prog_rejected = yes; then
3429   # We found a bogon in the path, so make sure we never use it.
3430   set dummy $ac_cv_prog_CC
3431   shift
3432   if test $# -gt 0; then
3433     # We chose a different compiler from the bogus one.
3434     # However, it has the same basename, so the bogon will be chosen
3435     # first if we set CC to just the basename; use the full file name.
3436     shift
3437     set dummy "$ac_dir/$ac_word" "$@"
3438     shift
3439     ac_cv_prog_CC="$@"
3440   fi
3441 fi
3442 fi
3443 fi
3444 CC="$ac_cv_prog_CC"
3445 if test -n "$CC"; then
3446   echo "$ac_t""$CC" 1>&6
3447 else
3448   echo "$ac_t""no" 1>&6
3449 fi
3450
3451   if test -z "$CC"; then
3452     case "`uname -s`" in
3453     *win32* | *WIN32* | *CYGWIN*)
3454       # Extract the first word of "cl", so it can be a program name with args.
3455 set dummy cl; ac_word=$2
3456 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3457 echo "configure:3458: checking for $ac_word" >&5
3458 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3459   echo $ac_n "(cached) $ac_c" 1>&6
3460 else
3461   if test -n "$CC"; then
3462   ac_cv_prog_CC="$CC" # Let the user override the test.
3463 else
3464   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3465   ac_dummy="$PATH"
3466   for ac_dir in $ac_dummy; do
3467     test -z "$ac_dir" && ac_dir=.
3468     if test -f $ac_dir/$ac_word; then
3469       ac_cv_prog_CC="cl"
3470       break
3471     fi
3472   done
3473   IFS="$ac_save_ifs"
3474 fi
3475 fi
3476 CC="$ac_cv_prog_CC"
3477 if test -n "$CC"; then
3478   echo "$ac_t""$CC" 1>&6
3479 else
3480   echo "$ac_t""no" 1>&6
3481 fi
3482  ;;
3483     esac
3484   fi
3485   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3486 fi
3487
3488 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3489 echo "configure:3490: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3490
3491 ac_ext=c
3492 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3493 ac_cpp='$CPP $CPPFLAGS'
3494 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3495 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3496 cross_compiling=$ac_cv_prog_cc_cross
3497
3498 cat > conftest.$ac_ext << EOF
3499
3500 #line 3501 "configure"
3501 #include "confdefs.h"
3502
3503 main(){return(0);}
3504 EOF
3505 if { (eval echo configure:3506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3506   ac_cv_prog_cc_works=yes
3507   # If we can't run a trivial program, we are probably using a cross compiler.
3508   if (./conftest; exit) 2>/dev/null; then
3509     ac_cv_prog_cc_cross=no
3510   else
3511     ac_cv_prog_cc_cross=yes
3512   fi
3513 else
3514   echo "configure: failed program was:" >&5
3515   cat conftest.$ac_ext >&5
3516   ac_cv_prog_cc_works=no
3517 fi
3518 rm -fr conftest*
3519 ac_ext=c
3520 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3521 ac_cpp='$CPP $CPPFLAGS'
3522 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3523 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3524 cross_compiling=$ac_cv_prog_cc_cross
3525
3526 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3527 if test $ac_cv_prog_cc_works = no; then
3528   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3529 fi
3530 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3531 echo "configure:3532: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3532 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3533 cross_compiling=$ac_cv_prog_cc_cross
3534
3535 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3536 echo "configure:3537: checking whether we are using GNU C" >&5
3537 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3538   echo $ac_n "(cached) $ac_c" 1>&6
3539 else
3540   cat > conftest.c <<EOF
3541 #ifdef __GNUC__
3542   yes;
3543 #endif
3544 EOF
3545 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3546   ac_cv_prog_gcc=yes
3547 else
3548   ac_cv_prog_gcc=no
3549 fi
3550 fi
3551
3552 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3553
3554 if test $ac_cv_prog_gcc = yes; then
3555   GCC=yes
3556 else
3557   GCC=
3558 fi
3559
3560 ac_test_CFLAGS="${CFLAGS+set}"
3561 ac_save_CFLAGS="$CFLAGS"
3562 CFLAGS=
3563 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3564 echo "configure:3565: checking whether ${CC-cc} accepts -g" >&5
3565 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3566   echo $ac_n "(cached) $ac_c" 1>&6
3567 else
3568   echo 'void f(){}' > conftest.c
3569 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3570   ac_cv_prog_cc_g=yes
3571 else
3572   ac_cv_prog_cc_g=no
3573 fi
3574 rm -f conftest*
3575
3576 fi
3577
3578 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3579 if test "$ac_test_CFLAGS" = set; then
3580   CFLAGS="$ac_save_CFLAGS"
3581 elif test $ac_cv_prog_cc_g = yes; then
3582   if test "$GCC" = yes; then
3583     CFLAGS="-g -O2"
3584   else
3585     CFLAGS="-g"
3586   fi
3587 else
3588   if test "$GCC" = yes; then
3589     CFLAGS="-O2"
3590   else
3591     CFLAGS=
3592   fi
3593 fi
3594
3595 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3596 if test "${with_gnu_ld+set}" = set; then
3597   withval="$with_gnu_ld"
3598   test "$withval" = no || with_gnu_ld=yes
3599 else
3600   with_gnu_ld=no
3601 fi
3602
3603 ac_prog=ld
3604 if test "$GCC" = yes; then
3605   # Check if gcc -print-prog-name=ld gives a path.
3606   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3607 echo "configure:3608: checking for ld used by GCC" >&5
3608   case $host in
3609   *-*-mingw*)
3610     # gcc leaves a trailing carriage return which upsets mingw
3611     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3612   *)
3613     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3614   esac
3615   case $ac_prog in
3616     # Accept absolute paths.
3617     [\\/]* | [A-Za-z]:[\\/]*)
3618       re_direlt='/[^/][^/]*/\.\./'
3619       # Canonicalize the path of ld
3620       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3621       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3622         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3623       done
3624       test -z "$LD" && LD="$ac_prog"
3625       ;;
3626   "")
3627     # If it fails, then pretend we aren't using GCC.
3628     ac_prog=ld
3629     ;;
3630   *)
3631     # If it is relative, then search for the first ld in PATH.
3632     with_gnu_ld=unknown
3633     ;;
3634   esac
3635 elif test "$with_gnu_ld" = yes; then
3636   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3637 echo "configure:3638: checking for GNU ld" >&5
3638 else
3639   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3640 echo "configure:3641: checking for non-GNU ld" >&5
3641 fi
3642 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3643   echo $ac_n "(cached) $ac_c" 1>&6
3644 else
3645   if test -z "$LD"; then
3646   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3647   for ac_dir in $PATH; do
3648     test -z "$ac_dir" && ac_dir=.
3649     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3650       lt_cv_path_LD="$ac_dir/$ac_prog"
3651       # Check to see if the program is GNU ld.  I'd rather use --version,
3652       # but apparently some GNU ld's only accept -v.
3653       # Break only if it was the GNU/non-GNU ld that we prefer.
3654       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3655         test "$with_gnu_ld" != no && break
3656       else
3657         test "$with_gnu_ld" != yes && break
3658       fi
3659     fi
3660   done
3661   IFS="$ac_save_ifs"
3662 else
3663   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3664 fi
3665 fi
3666
3667 LD="$lt_cv_path_LD"
3668 if test -n "$LD"; then
3669   echo "$ac_t""$LD" 1>&6
3670 else
3671   echo "$ac_t""no" 1>&6
3672 fi
3673 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3674 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3675 echo "configure:3676: checking if the linker ($LD) is GNU ld" >&5
3676 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3680 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3681   lt_cv_prog_gnu_ld=yes
3682 else
3683   lt_cv_prog_gnu_ld=no
3684 fi
3685 fi
3686
3687 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3688 with_gnu_ld=$lt_cv_prog_gnu_ld
3689
3690
3691 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3692 echo "configure:3693: checking for $LD option to reload object files" >&5
3693 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3694   echo $ac_n "(cached) $ac_c" 1>&6
3695 else
3696   lt_cv_ld_reload_flag='-r'
3697 fi
3698
3699 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3700 reload_flag=$lt_cv_ld_reload_flag
3701 test -n "$reload_flag" && reload_flag=" $reload_flag"
3702
3703 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3704 echo "configure:3705: checking for BSD-compatible nm" >&5
3705 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3706   echo $ac_n "(cached) $ac_c" 1>&6
3707 else
3708   if test -n "$NM"; then
3709   # Let the user override the test.
3710   lt_cv_path_NM="$NM"
3711 else
3712   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3713   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3714     test -z "$ac_dir" && ac_dir=.
3715     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3716     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3717       # Check to see if the nm accepts a BSD-compat flag.
3718       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3719       #   nm: unknown option "B" ignored
3720       # Tru64's nm complains that /dev/null is an invalid object file
3721       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3722         lt_cv_path_NM="$tmp_nm -B"
3723         break
3724       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3725         lt_cv_path_NM="$tmp_nm -p"
3726         break
3727       else
3728         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3729         continue # so that we can try to find one that supports BSD flags
3730       fi
3731     fi
3732   done
3733   IFS="$ac_save_ifs"
3734   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3735 fi
3736 fi
3737
3738 NM="$lt_cv_path_NM"
3739 echo "$ac_t""$NM" 1>&6
3740
3741 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3742 echo "configure:3743: checking whether ln -s works" >&5
3743 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3744   echo $ac_n "(cached) $ac_c" 1>&6
3745 else
3746   rm -f conftestdata
3747 if ln -s X conftestdata 2>/dev/null
3748 then
3749   rm -f conftestdata
3750   ac_cv_prog_LN_S="ln -s"
3751 else
3752   ac_cv_prog_LN_S=ln
3753 fi
3754 fi
3755 LN_S="$ac_cv_prog_LN_S"
3756 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3757   echo "$ac_t""yes" 1>&6
3758 else
3759   echo "$ac_t""no" 1>&6
3760 fi
3761
3762 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3763 echo "configure:3764: checking how to recognise dependant libraries" >&5
3764 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3765   echo $ac_n "(cached) $ac_c" 1>&6
3766 else
3767   lt_cv_file_magic_cmd='$MAGIC_CMD'
3768 lt_cv_file_magic_test_file=
3769 lt_cv_deplibs_check_method='unknown'
3770 # Need to set the preceding variable on all platforms that support
3771 # interlibrary dependencies.
3772 # 'none' -- dependencies not supported.
3773 # `unknown' -- same as none, but documents that we really don't know.
3774 # 'pass_all' -- all dependencies passed with no checks.
3775 # 'test_compile' -- check by making test program.
3776 # 'file_magic [[regex]]' -- check by looking for files in library path
3777 # which responds to the $file_magic_cmd with a given egrep regex.
3778 # If you have `file' or equivalent on your system and you're not sure
3779 # whether `pass_all' will *always* work, you probably want this one.
3780
3781 case $host_os in
3782 aix4* | aix5*)
3783   lt_cv_deplibs_check_method=pass_all
3784   ;;
3785
3786 beos*)
3787   lt_cv_deplibs_check_method=pass_all
3788   ;;
3789
3790 bsdi4*)
3791   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3792   lt_cv_file_magic_cmd='/usr/bin/file -L'
3793   lt_cv_file_magic_test_file=/shlib/libc.so
3794   ;;
3795
3796 cygwin* | mingw* | pw32*)
3797   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3798   lt_cv_file_magic_cmd='$OBJDUMP -f'
3799   ;;
3800
3801 darwin* | rhapsody*)
3802   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3803   lt_cv_file_magic_cmd='/usr/bin/file -L'
3804   case "$host_os" in
3805   rhapsody* | darwin1.[012])
3806     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3807     ;;
3808   *) # Darwin 1.3 on
3809     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3810     ;;
3811   esac
3812   ;;
3813
3814 freebsd*)
3815   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3816     case $host_cpu in
3817     i*86 )
3818       # Not sure whether the presence of OpenBSD here was a mistake.
3819       # Let's accept both of them until this is cleared up.
3820       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3821       lt_cv_file_magic_cmd=/usr/bin/file
3822       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3823       ;;
3824     esac
3825   else
3826     lt_cv_deplibs_check_method=pass_all
3827   fi
3828   ;;
3829
3830 gnu*)
3831   lt_cv_deplibs_check_method=pass_all
3832   ;;
3833
3834 hpux10.20*|hpux11*)
3835   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3836   lt_cv_file_magic_cmd=/usr/bin/file
3837   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3838   ;;
3839
3840 irix5* | irix6*)
3841   case $host_os in
3842   irix5*)
3843     # this will be overridden with pass_all, but let us keep it just in case
3844     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3845     ;;
3846   *)
3847     case $LD in
3848     *-32|*"-32 ") libmagic=32-bit;;
3849     *-n32|*"-n32 ") libmagic=N32;;
3850     *-64|*"-64 ") libmagic=64-bit;;
3851     *) libmagic=never-match;;
3852     esac
3853     # this will be overridden with pass_all, but let us keep it just in case
3854     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3855     ;;
3856   esac
3857   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3858   lt_cv_deplibs_check_method=pass_all
3859   ;;
3860
3861 # This must be Linux ELF.
3862 linux-gnu*)
3863   case $host_cpu in
3864   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3865     lt_cv_deplibs_check_method=pass_all ;;
3866   *)
3867     # glibc up to 2.1.1 does not perform some relocations on ARM
3868     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3869   esac
3870   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3871   ;;
3872
3873 netbsd*)
3874   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3875     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3876   else
3877     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3878   fi
3879   ;;
3880
3881 newos6*)
3882   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3883   lt_cv_file_magic_cmd=/usr/bin/file
3884   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3885   ;;
3886
3887 openbsd*)
3888   lt_cv_file_magic_cmd=/usr/bin/file
3889   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3890   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3891     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3892   else
3893     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3894   fi
3895   ;;
3896
3897 osf3* | osf4* | osf5*)
3898   # this will be overridden with pass_all, but let us keep it just in case
3899   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3900   lt_cv_file_magic_test_file=/shlib/libc.so
3901   lt_cv_deplibs_check_method=pass_all
3902   ;;
3903
3904 sco3.2v5*)
3905   lt_cv_deplibs_check_method=pass_all
3906   ;;
3907
3908 solaris*)
3909   lt_cv_deplibs_check_method=pass_all
3910   lt_cv_file_magic_test_file=/lib/libc.so
3911   ;;
3912
3913 sysv5uw[78]* | sysv4*uw2*)
3914   lt_cv_deplibs_check_method=pass_all
3915   ;;
3916
3917 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3918   case $host_vendor in
3919   motorola)
3920     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]'
3921     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3922     ;;
3923   ncr)
3924     lt_cv_deplibs_check_method=pass_all
3925     ;;
3926   sequent)
3927     lt_cv_file_magic_cmd='/bin/file'
3928     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3929     ;;
3930   sni)
3931     lt_cv_file_magic_cmd='/bin/file'
3932     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3933     lt_cv_file_magic_test_file=/lib/libc.so
3934     ;;
3935   esac
3936   ;;
3937 esac
3938
3939 fi
3940
3941 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3942 file_magic_cmd=$lt_cv_file_magic_cmd
3943 deplibs_check_method=$lt_cv_deplibs_check_method
3944
3945 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3946 echo "configure:3947: checking for object suffix" >&5
3947 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3948   echo $ac_n "(cached) $ac_c" 1>&6
3949 else
3950   rm -f conftest*
3951 echo 'int i = 1;' > conftest.$ac_ext
3952 if { (eval echo configure:3953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3953   for ac_file in conftest.*; do
3954     case $ac_file in
3955     *.c) ;;
3956     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3957     esac
3958   done
3959 else
3960   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3961 fi
3962 rm -f conftest*
3963 fi
3964
3965 echo "$ac_t""$ac_cv_objext" 1>&6
3966 OBJEXT=$ac_cv_objext
3967 ac_objext=$ac_cv_objext
3968
3969
3970
3971
3972 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3973 echo "configure:3974: checking for executable suffix" >&5
3974 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3975   echo $ac_n "(cached) $ac_c" 1>&6
3976 else
3977   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3978   ac_cv_exeext=.exe
3979 else
3980   rm -f conftest*
3981   echo 'int main () { return 0; }' > conftest.$ac_ext
3982   ac_cv_exeext=
3983   if { (eval echo configure:3984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3984     for file in conftest.*; do
3985       case $file in
3986       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3987       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3988       esac
3989     done
3990   else
3991     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3992   fi
3993   rm -f conftest*
3994   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3995 fi
3996 fi
3997
3998 EXEEXT=""
3999 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4000 echo "$ac_t""${ac_cv_exeext}" 1>&6
4001 ac_exeext=$EXEEXT
4002
4003 if test $host != $build; then
4004   ac_tool_prefix=${host_alias}-
4005 else
4006   ac_tool_prefix=
4007 fi
4008
4009
4010
4011
4012 # Check for command to grab the raw symbol name followed by C symbol from nm.
4013 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4014 echo "configure:4015: checking command to parse $NM output" >&5
4015 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4016   echo $ac_n "(cached) $ac_c" 1>&6
4017 else
4018   
4019 # These are sane defaults that work on at least a few old systems.
4020 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4021
4022 # Character class describing NM global symbol codes.
4023 symcode='[BCDEGRST]'
4024
4025 # Regexp to match symbols that can be accessed directly from C.
4026 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4027
4028 # Transform the above into a raw symbol and a C symbol.
4029 symxfrm='\1 \2\3 \3'
4030
4031 # Transform an extracted symbol line into a proper C declaration
4032 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4033
4034 # Transform an extracted symbol line into symbol name and symbol address
4035 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
4036
4037 # Define system-specific variables.
4038 case $host_os in
4039 aix*)
4040   symcode='[BCDT]'
4041   ;;
4042 cygwin* | mingw* | pw32*)
4043   symcode='[ABCDGISTW]'
4044   ;;
4045 hpux*) # Its linker distinguishes data from code symbols
4046   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4047   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'"
4048   ;;
4049 irix*)
4050   symcode='[BCDEGRST]'
4051   ;;
4052 solaris* | sysv5*)
4053   symcode='[BDT]'
4054   ;;
4055 sysv4)
4056   symcode='[DFNSTU]'
4057   ;;
4058 esac
4059
4060 # Handle CRLF in mingw tool chain
4061 opt_cr=
4062 case $host_os in
4063 mingw*)
4064   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4065   ;;
4066 esac
4067
4068 # If we're using GNU nm, then use its standard symbol codes.
4069 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4070   symcode='[ABCDGISTW]'
4071 fi
4072
4073 # Try without a prefix undercore, then with it.
4074 for ac_symprfx in "" "_"; do
4075
4076   # Write the raw and C identifiers.
4077 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4078
4079   # Check to see that the pipe works correctly.
4080   pipe_works=no
4081   rm -f conftest*
4082   cat > conftest.$ac_ext <<EOF
4083 #ifdef __cplusplus
4084 extern "C" {
4085 #endif
4086 char nm_test_var;
4087 void nm_test_func(){}
4088 #ifdef __cplusplus
4089 }
4090 #endif
4091 int main(){nm_test_var='a';nm_test_func();return(0);}
4092 EOF
4093
4094   if { (eval echo configure:4095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4095     # Now try to grab the symbols.
4096     nlist=conftest.nm
4097     if { (eval echo configure:4098: \"$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
4098       # Try sorting and uniquifying the output.
4099       if sort "$nlist" | uniq > "$nlist"T; then
4100         mv -f "$nlist"T "$nlist"
4101       else
4102         rm -f "$nlist"T
4103       fi
4104
4105       # Make sure that we snagged all the symbols we need.
4106       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4107         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4108           cat <<EOF > conftest.$ac_ext
4109 #ifdef __cplusplus
4110 extern "C" {
4111 #endif
4112
4113 EOF
4114           # Now generate the symbol file.
4115           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4116
4117           cat <<EOF >> conftest.$ac_ext
4118 #if defined (__STDC__) && __STDC__
4119 # define lt_ptr void *
4120 #else
4121 # define lt_ptr char *
4122 # define const
4123 #endif
4124
4125 /* The mapping between symbol names and symbols. */
4126 const struct {
4127   const char *name;
4128   lt_ptr address;
4129 }
4130 lt_preloaded_symbols[] =
4131 {
4132 EOF
4133           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4134           cat <<\EOF >> conftest.$ac_ext
4135   {0, (lt_ptr) 0}
4136 };
4137
4138 #ifdef __cplusplus
4139 }
4140 #endif
4141 EOF
4142           # Now try linking the two files.
4143           mv conftest.$ac_objext conftstm.$ac_objext
4144           save_LIBS="$LIBS"
4145           save_CFLAGS="$CFLAGS"
4146           LIBS="conftstm.$ac_objext"
4147           CFLAGS="$CFLAGS$no_builtin_flag"
4148           if { (eval echo configure:4149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4149             pipe_works=yes
4150           fi
4151           LIBS="$save_LIBS"
4152           CFLAGS="$save_CFLAGS"
4153         else
4154           echo "cannot find nm_test_func in $nlist" >&5
4155         fi
4156       else
4157         echo "cannot find nm_test_var in $nlist" >&5
4158       fi
4159     else
4160       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4161     fi
4162   else
4163     echo "$progname: failed program was:" >&5
4164     cat conftest.$ac_ext >&5
4165   fi
4166   rm -f conftest* conftst*
4167
4168   # Do not use the global_symbol_pipe unless it works.
4169   if test "$pipe_works" = yes; then
4170     break
4171   else
4172     lt_cv_sys_global_symbol_pipe=
4173   fi
4174 done
4175
4176 fi
4177
4178 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4179 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4180   global_symbol_to_cdecl=
4181   global_symbol_to_c_name_address=
4182 else
4183   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4184   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4185 fi
4186 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4187 then
4188   echo "$ac_t""failed" 1>&6
4189 else
4190   echo "$ac_t""ok" 1>&6
4191 fi
4192
4193 for ac_hdr in dlfcn.h
4194 do
4195 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4196 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4197 echo "configure:4198: checking for $ac_hdr" >&5
4198 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4199   echo $ac_n "(cached) $ac_c" 1>&6
4200 else
4201   cat > conftest.$ac_ext <<EOF
4202 #line 4203 "configure"
4203 #include "confdefs.h"
4204 #include <$ac_hdr>
4205 EOF
4206 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4207 { (eval echo configure:4208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4208 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4209 if test -z "$ac_err"; then
4210   rm -rf conftest*
4211   eval "ac_cv_header_$ac_safe=yes"
4212 else
4213   echo "$ac_err" >&5
4214   echo "configure: failed program was:" >&5
4215   cat conftest.$ac_ext >&5
4216   rm -rf conftest*
4217   eval "ac_cv_header_$ac_safe=no"
4218 fi
4219 rm -f conftest*
4220 fi
4221 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4222   echo "$ac_t""yes" 1>&6
4223     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4224   cat >> confdefs.h <<EOF
4225 #define $ac_tr_hdr 1
4226 EOF
4227  
4228 else
4229   echo "$ac_t""no" 1>&6
4230 fi
4231 done
4232
4233
4234
4235
4236
4237 # Only perform the check for file, if the check method requires it
4238 case $deplibs_check_method in
4239 file_magic*)
4240   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4241     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4242 echo "configure:4243: checking for ${ac_tool_prefix}file" >&5
4243 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4244   echo $ac_n "(cached) $ac_c" 1>&6
4245 else
4246   case $MAGIC_CMD in
4247   /*)
4248   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4249   ;;
4250   ?:/*)
4251   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4252   ;;
4253   *)
4254   ac_save_MAGIC_CMD="$MAGIC_CMD"
4255   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4256   ac_dummy="/usr/bin:$PATH"
4257   for ac_dir in $ac_dummy; do
4258     test -z "$ac_dir" && ac_dir=.
4259     if test -f $ac_dir/${ac_tool_prefix}file; then
4260       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4261       if test -n "$file_magic_test_file"; then
4262         case $deplibs_check_method in
4263         "file_magic "*)
4264           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4265           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4266           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4267             egrep "$file_magic_regex" > /dev/null; then
4268             :
4269           else
4270             cat <<EOF 1>&2
4271
4272 *** Warning: the command libtool uses to detect shared libraries,
4273 *** $file_magic_cmd, produces output that libtool cannot recognize.
4274 *** The result is that libtool may fail to recognize shared libraries
4275 *** as such.  This will affect the creation of libtool libraries that
4276 *** depend on shared libraries, but programs linked with such libtool
4277 *** libraries will work regardless of this problem.  Nevertheless, you
4278 *** may want to report the problem to your system manager and/or to
4279 *** bug-libtool@gnu.org
4280
4281 EOF
4282           fi ;;
4283         esac
4284       fi
4285       break
4286     fi
4287   done
4288   IFS="$ac_save_ifs"
4289   MAGIC_CMD="$ac_save_MAGIC_CMD"
4290   ;;
4291 esac
4292 fi
4293
4294 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4295 if test -n "$MAGIC_CMD"; then
4296   echo "$ac_t""$MAGIC_CMD" 1>&6
4297 else
4298   echo "$ac_t""no" 1>&6
4299 fi
4300
4301 if test -z "$lt_cv_path_MAGIC_CMD"; then
4302   if test -n "$ac_tool_prefix"; then
4303     echo $ac_n "checking for file""... $ac_c" 1>&6
4304 echo "configure:4305: checking for file" >&5
4305 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4306   echo $ac_n "(cached) $ac_c" 1>&6
4307 else
4308   case $MAGIC_CMD in
4309   /*)
4310   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4311   ;;
4312   ?:/*)
4313   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4314   ;;
4315   *)
4316   ac_save_MAGIC_CMD="$MAGIC_CMD"
4317   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4318   ac_dummy="/usr/bin:$PATH"
4319   for ac_dir in $ac_dummy; do
4320     test -z "$ac_dir" && ac_dir=.
4321     if test -f $ac_dir/file; then
4322       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4323       if test -n "$file_magic_test_file"; then
4324         case $deplibs_check_method in
4325         "file_magic "*)
4326           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4327           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4328           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4329             egrep "$file_magic_regex" > /dev/null; then
4330             :
4331           else
4332             cat <<EOF 1>&2
4333
4334 *** Warning: the command libtool uses to detect shared libraries,
4335 *** $file_magic_cmd, produces output that libtool cannot recognize.
4336 *** The result is that libtool may fail to recognize shared libraries
4337 *** as such.  This will affect the creation of libtool libraries that
4338 *** depend on shared libraries, but programs linked with such libtool
4339 *** libraries will work regardless of this problem.  Nevertheless, you
4340 *** may want to report the problem to your system manager and/or to
4341 *** bug-libtool@gnu.org
4342
4343 EOF
4344           fi ;;
4345         esac
4346       fi
4347       break
4348     fi
4349   done
4350   IFS="$ac_save_ifs"
4351   MAGIC_CMD="$ac_save_MAGIC_CMD"
4352   ;;
4353 esac
4354 fi
4355
4356 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4357 if test -n "$MAGIC_CMD"; then
4358   echo "$ac_t""$MAGIC_CMD" 1>&6
4359 else
4360   echo "$ac_t""no" 1>&6
4361 fi
4362
4363   else
4364     MAGIC_CMD=:
4365   fi
4366 fi
4367
4368   fi
4369   ;;
4370 esac
4371
4372 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4373 set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}\" = set"; then
4377   echo $ac_n "(cached) $ac_c" 1>&6
4378 else
4379   if test -n "$RANLIB"; then
4380   ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
4388       break
4389     fi
4390   done
4391   IFS="$ac_save_ifs"
4392 fi
4393 fi
4394 RANLIB="$ac_cv_prog_RANLIB"
4395 if test -n "$RANLIB"; then
4396   echo "$ac_t""$RANLIB" 1>&6
4397 else
4398   echo "$ac_t""no" 1>&6
4399 fi
4400
4401
4402 if test -z "$ac_cv_prog_RANLIB"; then
4403 if test -n "$ac_tool_prefix"; then
4404   # Extract the first word of "ranlib", so it can be a program name with args.
4405 set dummy ranlib; 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_RANLIB+set}\" = set"; then
4409   echo $ac_n "(cached) $ac_c" 1>&6
4410 else
4411   if test -n "$RANLIB"; then
4412   ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="ranlib"
4420       break
4421     fi
4422   done
4423   IFS="$ac_save_ifs"
4424   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4425 fi
4426 fi
4427 RANLIB="$ac_cv_prog_RANLIB"
4428 if test -n "$RANLIB"; then
4429   echo "$ac_t""$RANLIB" 1>&6
4430 else
4431   echo "$ac_t""no" 1>&6
4432 fi
4433
4434 else
4435   RANLIB=":"
4436 fi
4437 fi
4438
4439 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4440 set dummy ${ac_tool_prefix}strip; ac_word=$2
4441 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4442 echo "configure:4443: checking for $ac_word" >&5
4443 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4444   echo $ac_n "(cached) $ac_c" 1>&6
4445 else
4446   if test -n "$STRIP"; then
4447   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4448 else
4449   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4450   ac_dummy="$PATH"
4451   for ac_dir in $ac_dummy; do
4452     test -z "$ac_dir" && ac_dir=.
4453     if test -f $ac_dir/$ac_word; then
4454       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4455       break
4456     fi
4457   done
4458   IFS="$ac_save_ifs"
4459 fi
4460 fi
4461 STRIP="$ac_cv_prog_STRIP"
4462 if test -n "$STRIP"; then
4463   echo "$ac_t""$STRIP" 1>&6
4464 else
4465   echo "$ac_t""no" 1>&6
4466 fi
4467
4468
4469 if test -z "$ac_cv_prog_STRIP"; then
4470 if test -n "$ac_tool_prefix"; then
4471   # Extract the first word of "strip", so it can be a program name with args.
4472 set dummy strip; ac_word=$2
4473 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4474 echo "configure:4475: checking for $ac_word" >&5
4475 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4476   echo $ac_n "(cached) $ac_c" 1>&6
4477 else
4478   if test -n "$STRIP"; then
4479   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4480 else
4481   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4482   ac_dummy="$PATH"
4483   for ac_dir in $ac_dummy; do
4484     test -z "$ac_dir" && ac_dir=.
4485     if test -f $ac_dir/$ac_word; then
4486       ac_cv_prog_STRIP="strip"
4487       break
4488     fi
4489   done
4490   IFS="$ac_save_ifs"
4491   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4492 fi
4493 fi
4494 STRIP="$ac_cv_prog_STRIP"
4495 if test -n "$STRIP"; then
4496   echo "$ac_t""$STRIP" 1>&6
4497 else
4498   echo "$ac_t""no" 1>&6
4499 fi
4500
4501 else
4502   STRIP=":"
4503 fi
4504 fi
4505
4506
4507 enable_dlopen=yes
4508 enable_win32_dll=yes
4509
4510 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4511 if test "${enable_libtool_lock+set}" = set; then
4512   enableval="$enable_libtool_lock"
4513   :
4514 fi
4515
4516 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4517
4518 # Some flags need to be propagated to the compiler or linker for good
4519 # libtool support.
4520 case $host in
4521 *-*-irix6*)
4522   # Find out which ABI we are using.
4523   echo '#line 4524 "configure"' > conftest.$ac_ext
4524   if { (eval echo configure:4525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4525     case `/usr/bin/file conftest.$ac_objext` in
4526     *32-bit*)
4527       LD="${LD-ld} -32"
4528       ;;
4529     *N32*)
4530       LD="${LD-ld} -n32"
4531       ;;
4532     *64-bit*)
4533       LD="${LD-ld} -64"
4534       ;;
4535     esac
4536   fi
4537   rm -rf conftest*
4538   ;;
4539
4540 *-*-sco3.2v5*)
4541   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4542   SAVE_CFLAGS="$CFLAGS"
4543   CFLAGS="$CFLAGS -belf"
4544   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4545 echo "configure:4546: checking whether the C compiler needs -belf" >&5
4546 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4547   echo $ac_n "(cached) $ac_c" 1>&6
4548 else
4549   
4550      ac_ext=c
4551 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4552 ac_cpp='$CPP $CPPFLAGS'
4553 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4554 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4555 cross_compiling=$ac_cv_prog_cc_cross
4556
4557      cat > conftest.$ac_ext <<EOF
4558 #line 4559 "configure"
4559 #include "confdefs.h"
4560
4561 int main() {
4562
4563 ; return 0; }
4564 EOF
4565 if { (eval echo configure:4566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4566   rm -rf conftest*
4567   lt_cv_cc_needs_belf=yes
4568 else
4569   echo "configure: failed program was:" >&5
4570   cat conftest.$ac_ext >&5
4571   rm -rf conftest*
4572   lt_cv_cc_needs_belf=no
4573 fi
4574 rm -f conftest*
4575      ac_ext=c
4576 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4577 ac_cpp='$CPP $CPPFLAGS'
4578 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4579 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4580 cross_compiling=$ac_cv_prog_cc_cross
4581
4582 fi
4583
4584 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4585   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4586     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4587     CFLAGS="$SAVE_CFLAGS"
4588   fi
4589   ;;
4590
4591 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4592   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4593 set dummy ${ac_tool_prefix}dlltool; 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_DLLTOOL+set}\" = set"; then
4597   echo $ac_n "(cached) $ac_c" 1>&6
4598 else
4599   if test -n "$DLLTOOL"; then
4600   ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool"
4608       break
4609     fi
4610   done
4611   IFS="$ac_save_ifs"
4612 fi
4613 fi
4614 DLLTOOL="$ac_cv_prog_DLLTOOL"
4615 if test -n "$DLLTOOL"; then
4616   echo "$ac_t""$DLLTOOL" 1>&6
4617 else
4618   echo "$ac_t""no" 1>&6
4619 fi
4620
4621
4622 if test -z "$ac_cv_prog_DLLTOOL"; then
4623 if test -n "$ac_tool_prefix"; then
4624   # Extract the first word of "dlltool", so it can be a program name with args.
4625 set dummy dlltool; 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_DLLTOOL+set}\" = set"; then
4629   echo $ac_n "(cached) $ac_c" 1>&6
4630 else
4631   if test -n "$DLLTOOL"; then
4632   ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="dlltool"
4640       break
4641     fi
4642   done
4643   IFS="$ac_save_ifs"
4644   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4645 fi
4646 fi
4647 DLLTOOL="$ac_cv_prog_DLLTOOL"
4648 if test -n "$DLLTOOL"; then
4649   echo "$ac_t""$DLLTOOL" 1>&6
4650 else
4651   echo "$ac_t""no" 1>&6
4652 fi
4653
4654 else
4655   DLLTOOL="false"
4656 fi
4657 fi
4658
4659   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4660 set dummy ${ac_tool_prefix}as; 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_AS+set}\" = set"; then
4664   echo $ac_n "(cached) $ac_c" 1>&6
4665 else
4666   if test -n "$AS"; then
4667   ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as"
4675       break
4676     fi
4677   done
4678   IFS="$ac_save_ifs"
4679 fi
4680 fi
4681 AS="$ac_cv_prog_AS"
4682 if test -n "$AS"; then
4683   echo "$ac_t""$AS" 1>&6
4684 else
4685   echo "$ac_t""no" 1>&6
4686 fi
4687
4688
4689 if test -z "$ac_cv_prog_AS"; then
4690 if test -n "$ac_tool_prefix"; then
4691   # Extract the first word of "as", so it can be a program name with args.
4692 set dummy as; 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_AS+set}\" = set"; then
4696   echo $ac_n "(cached) $ac_c" 1>&6
4697 else
4698   if test -n "$AS"; then
4699   ac_cv_prog_AS="$AS" # 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_AS="as"
4707       break
4708     fi
4709   done
4710   IFS="$ac_save_ifs"
4711   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4712 fi
4713 fi
4714 AS="$ac_cv_prog_AS"
4715 if test -n "$AS"; then
4716   echo "$ac_t""$AS" 1>&6
4717 else
4718   echo "$ac_t""no" 1>&6
4719 fi
4720
4721 else
4722   AS="false"
4723 fi
4724 fi
4725
4726   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4727 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4728 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4729 echo "configure:4730: checking for $ac_word" >&5
4730 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4731   echo $ac_n "(cached) $ac_c" 1>&6
4732 else
4733   if test -n "$OBJDUMP"; then
4734   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4735 else
4736   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4737   ac_dummy="$PATH"
4738   for ac_dir in $ac_dummy; do
4739     test -z "$ac_dir" && ac_dir=.
4740     if test -f $ac_dir/$ac_word; then
4741       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4742       break
4743     fi
4744   done
4745   IFS="$ac_save_ifs"
4746 fi
4747 fi
4748 OBJDUMP="$ac_cv_prog_OBJDUMP"
4749 if test -n "$OBJDUMP"; then
4750   echo "$ac_t""$OBJDUMP" 1>&6
4751 else
4752   echo "$ac_t""no" 1>&6
4753 fi
4754
4755
4756 if test -z "$ac_cv_prog_OBJDUMP"; then
4757 if test -n "$ac_tool_prefix"; then
4758   # Extract the first word of "objdump", so it can be a program name with args.
4759 set dummy objdump; ac_word=$2
4760 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4761 echo "configure:4762: checking for $ac_word" >&5
4762 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4763   echo $ac_n "(cached) $ac_c" 1>&6
4764 else
4765   if test -n "$OBJDUMP"; then
4766   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4767 else
4768   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4769   ac_dummy="$PATH"
4770   for ac_dir in $ac_dummy; do
4771     test -z "$ac_dir" && ac_dir=.
4772     if test -f $ac_dir/$ac_word; then
4773       ac_cv_prog_OBJDUMP="objdump"
4774       break
4775     fi
4776   done
4777   IFS="$ac_save_ifs"
4778   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4779 fi
4780 fi
4781 OBJDUMP="$ac_cv_prog_OBJDUMP"
4782 if test -n "$OBJDUMP"; then
4783   echo "$ac_t""$OBJDUMP" 1>&6
4784 else
4785   echo "$ac_t""no" 1>&6
4786 fi
4787
4788 else
4789   OBJDUMP="false"
4790 fi
4791 fi
4792
4793
4794   # recent cygwin and mingw systems supply a stub DllMain which the user
4795   # can override, but on older systems we have to supply one
4796   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4797 echo "configure:4798: checking if libtool should supply DllMain function" >&5
4798 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4799   echo $ac_n "(cached) $ac_c" 1>&6
4800 else
4801   cat > conftest.$ac_ext <<EOF
4802 #line 4803 "configure"
4803 #include "confdefs.h"
4804
4805 int main() {
4806 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4807       DllMain (0, 0, 0);
4808 ; return 0; }
4809 EOF
4810 if { (eval echo configure:4811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4811   rm -rf conftest*
4812   lt_cv_need_dllmain=no
4813 else
4814   echo "configure: failed program was:" >&5
4815   cat conftest.$ac_ext >&5
4816   rm -rf conftest*
4817   lt_cv_need_dllmain=yes
4818 fi
4819 rm -f conftest*
4820 fi
4821
4822 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4823
4824   case $host/$CC in
4825   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4826     # old mingw systems require "-dll" to link a DLL, while more recent ones
4827     # require "-mdll"
4828     SAVE_CFLAGS="$CFLAGS"
4829     CFLAGS="$CFLAGS -mdll"
4830     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4831 echo "configure:4832: checking how to link DLLs" >&5
4832 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4833   echo $ac_n "(cached) $ac_c" 1>&6
4834 else
4835   cat > conftest.$ac_ext <<EOF
4836 #line 4837 "configure"
4837 #include "confdefs.h"
4838
4839 int main() {
4840
4841 ; return 0; }
4842 EOF
4843 if { (eval echo configure:4844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4844   rm -rf conftest*
4845   lt_cv_cc_dll_switch=-mdll
4846 else
4847   echo "configure: failed program was:" >&5
4848   cat conftest.$ac_ext >&5
4849   rm -rf conftest*
4850   lt_cv_cc_dll_switch=-dll
4851 fi
4852 rm -f conftest*
4853 fi
4854
4855 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4856     CFLAGS="$SAVE_CFLAGS" ;;
4857   *-*-cygwin* | *-*-pw32*)
4858     # cygwin systems need to pass --dll to the linker, and not link
4859     # crt.o which will require a WinMain@16 definition.
4860     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4861   esac
4862   ;;
4863   
4864 esac
4865
4866 # Sed substitution that helps us do robust quoting.  It backslashifies
4867 # metacharacters that are still active within double-quoted strings.
4868 Xsed='sed -e s/^X//'
4869 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4870
4871 # Same as above, but do not quote variable references.
4872 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4873
4874 # Sed substitution to delay expansion of an escaped shell variable in a
4875 # double_quote_subst'ed string.
4876 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4877
4878 # Constants:
4879 rm="rm -f"
4880
4881 # Global variables:
4882 default_ofile=libtool
4883 can_build_shared=yes
4884
4885 # All known linkers require a `.a' archive for static linking (except M$VC,
4886 # which needs '.lib').
4887 libext=a
4888 ltmain="$ac_aux_dir/ltmain.sh"
4889 ofile="$default_ofile"
4890 with_gnu_ld="$lt_cv_prog_gnu_ld"
4891 need_locks="$enable_libtool_lock"
4892
4893 old_CC="$CC"
4894 old_CFLAGS="$CFLAGS"
4895
4896 # Set sane defaults for various variables
4897 test -z "$AR" && AR=ar
4898 test -z "$AR_FLAGS" && AR_FLAGS=cru
4899 test -z "$AS" && AS=as
4900 test -z "$CC" && CC=cc
4901 test -z "$DLLTOOL" && DLLTOOL=dlltool
4902 test -z "$LD" && LD=ld
4903 test -z "$LN_S" && LN_S="ln -s"
4904 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4905 test -z "$NM" && NM=nm
4906 test -z "$OBJDUMP" && OBJDUMP=objdump
4907 test -z "$RANLIB" && RANLIB=:
4908 test -z "$STRIP" && STRIP=:
4909 test -z "$ac_objext" && ac_objext=o
4910
4911 if test x"$host" != x"$build"; then
4912   ac_tool_prefix=${host_alias}-
4913 else
4914   ac_tool_prefix=
4915 fi
4916
4917 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4918 case $host_os in
4919 linux-gnu*) ;;
4920 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4921 esac
4922
4923 case $host_os in
4924 aix3*)
4925   # AIX sometimes has problems with the GCC collect2 program.  For some
4926   # reason, if we set the COLLECT_NAMES environment variable, the problems
4927   # vanish in a puff of smoke.
4928   if test "X${COLLECT_NAMES+set}" != Xset; then
4929     COLLECT_NAMES=
4930     export COLLECT_NAMES
4931   fi
4932   ;;
4933 esac
4934
4935 # Determine commands to create old-style static archives.
4936 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4937 old_postinstall_cmds='chmod 644 $oldlib'
4938 old_postuninstall_cmds=
4939
4940 if test -n "$RANLIB"; then
4941   case $host_os in
4942   openbsd*)
4943     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4944     ;;
4945   *)
4946     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4947     ;;
4948   esac
4949   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4950 fi
4951
4952 # Allow CC to be a program name with arguments.
4953 set dummy $CC
4954 compiler="$2"
4955
4956 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4957 echo "configure:4958: checking for objdir" >&5
4958 rm -f .libs 2>/dev/null
4959 mkdir .libs 2>/dev/null
4960 if test -d .libs; then
4961   objdir=.libs
4962 else
4963   # MS-DOS does not allow filenames that begin with a dot.
4964   objdir=_libs
4965 fi
4966 rmdir .libs 2>/dev/null
4967 echo "$ac_t""$objdir" 1>&6
4968
4969
4970 # Check whether --with-pic or --without-pic was given.
4971 if test "${with_pic+set}" = set; then
4972   withval="$with_pic"
4973   pic_mode="$withval"
4974 else
4975   pic_mode=default
4976 fi
4977
4978 test -z "$pic_mode" && pic_mode=default
4979
4980 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4981 # in isolation, and that seeing it set (from the cache) indicates that
4982 # the associated values are set (in the cache) correctly too.
4983 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4984 echo "configure:4985: checking for $compiler option to produce PIC" >&5
4985 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4986   echo $ac_n "(cached) $ac_c" 1>&6
4987 else
4988    lt_cv_prog_cc_pic=
4989   lt_cv_prog_cc_shlib=
4990   lt_cv_prog_cc_wl=
4991   lt_cv_prog_cc_static=
4992   lt_cv_prog_cc_no_builtin=
4993   lt_cv_prog_cc_can_build_shared=$can_build_shared
4994
4995   if test "$GCC" = yes; then
4996     lt_cv_prog_cc_wl='-Wl,'
4997     lt_cv_prog_cc_static='-static'
4998
4999     case $host_os in
5000     aix*)
5001       # Below there is a dirty hack to force normal static linking with -ldl
5002       # The problem is because libdl dynamically linked with both libc and
5003       # libC (AIX C++ library), which obviously doesn't included in libraries
5004       # list by gcc. This cause undefined symbols with -static flags.
5005       # This hack allows C programs to be linked with "-static -ldl", but
5006       # not sure about C++ programs.
5007       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5008       ;;
5009     amigaos*)
5010       # FIXME: we need at least 68020 code to build shared libraries, but
5011       # adding the `-m68020' flag to GCC prevents building anything better,
5012       # like `-m68040'.
5013       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5014       ;;
5015     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
5016       # PIC is the default for these OSes.
5017       ;;
5018     darwin* | rhapsody*)
5019       # PIC is the default on this platform
5020       # Common symbols not allowed in MH_DYLIB files
5021       lt_cv_prog_cc_pic='-fno-common'
5022       ;;
5023     cygwin* | mingw* | pw32* | os2*)
5024       # This hack is so that the source file can tell whether it is being
5025       # built for inclusion in a dll (and should export symbols for example).
5026       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5027       ;;
5028     sysv4*MP*)
5029       if test -d /usr/nec; then
5030          lt_cv_prog_cc_pic=-Kconform_pic
5031       fi
5032       ;;
5033     *)
5034       lt_cv_prog_cc_pic='-fPIC'
5035       ;;
5036     esac
5037   else
5038     # PORTME Check for PIC flags for the system compiler.
5039     case $host_os in
5040     aix3* | aix4* | aix5*)
5041       lt_cv_prog_cc_wl='-Wl,'
5042       # All AIX code is PIC.
5043       if test "$host_cpu" = ia64; then
5044         # AIX 5 now supports IA64 processor
5045         lt_cv_prog_cc_static='-Bstatic'
5046       else
5047         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5048       fi
5049       ;;
5050
5051     hpux9* | hpux10* | hpux11*)
5052       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5053       lt_cv_prog_cc_wl='-Wl,'
5054       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5055       lt_cv_prog_cc_pic='+Z'
5056       ;;
5057
5058     irix5* | irix6*)
5059       lt_cv_prog_cc_wl='-Wl,'
5060       lt_cv_prog_cc_static='-non_shared'
5061       # PIC (with -KPIC) is the default.
5062       ;;
5063
5064     cygwin* | mingw* | pw32* | os2*)
5065       # This hack is so that the source file can tell whether it is being
5066       # built for inclusion in a dll (and should export symbols for example).
5067       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5068       ;;
5069
5070     newsos6)
5071       lt_cv_prog_cc_pic='-KPIC'
5072       lt_cv_prog_cc_static='-Bstatic'
5073       ;;
5074
5075     osf3* | osf4* | osf5*)
5076       # All OSF/1 code is PIC.
5077       lt_cv_prog_cc_wl='-Wl,'
5078       lt_cv_prog_cc_static='-non_shared'
5079       ;;
5080
5081     sco3.2v5*)
5082       lt_cv_prog_cc_pic='-Kpic'
5083       lt_cv_prog_cc_static='-dn'
5084       lt_cv_prog_cc_shlib='-belf'
5085       ;;
5086
5087     solaris*)
5088       lt_cv_prog_cc_pic='-KPIC'
5089       lt_cv_prog_cc_static='-Bstatic'
5090       lt_cv_prog_cc_wl='-Wl,'
5091       ;;
5092
5093     sunos4*)
5094       lt_cv_prog_cc_pic='-PIC'
5095       lt_cv_prog_cc_static='-Bstatic'
5096       lt_cv_prog_cc_wl='-Qoption ld '
5097       ;;
5098
5099     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5100       lt_cv_prog_cc_pic='-KPIC'
5101       lt_cv_prog_cc_static='-Bstatic'
5102       if test "x$host_vendor" = xsni; then
5103         lt_cv_prog_cc_wl='-LD'
5104       else
5105         lt_cv_prog_cc_wl='-Wl,'
5106       fi
5107       ;;
5108
5109     uts4*)
5110       lt_cv_prog_cc_pic='-pic'
5111       lt_cv_prog_cc_static='-Bstatic'
5112       ;;
5113
5114     sysv4*MP*)
5115       if test -d /usr/nec ;then
5116         lt_cv_prog_cc_pic='-Kconform_pic'
5117         lt_cv_prog_cc_static='-Bstatic'
5118       fi
5119       ;;
5120
5121     *)
5122       lt_cv_prog_cc_can_build_shared=no
5123       ;;
5124     esac
5125   fi
5126
5127 fi
5128
5129 if test -z "$lt_cv_prog_cc_pic"; then
5130   echo "$ac_t""none" 1>&6
5131 else
5132   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5133
5134   # Check to make sure the pic_flag actually works.
5135   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5136 echo "configure:5137: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5137   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5138   echo $ac_n "(cached) $ac_c" 1>&6
5139 else
5140       save_CFLAGS="$CFLAGS"
5141     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
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_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5151   rm -rf conftest*
5152         case $host_os in
5153       hpux9* | hpux10* | hpux11*)
5154         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5155         # they create non-PIC objects.  So, if there were any warnings, we
5156         # assume that PIC is not supported.
5157         if test -s conftest.err; then
5158           lt_cv_prog_cc_pic_works=no
5159         else
5160           lt_cv_prog_cc_pic_works=yes
5161         fi
5162         ;;
5163       *)
5164         lt_cv_prog_cc_pic_works=yes
5165         ;;
5166       esac
5167     
5168 else
5169   echo "configure: failed program was:" >&5
5170   cat conftest.$ac_ext >&5
5171   rm -rf conftest*
5172         lt_cv_prog_cc_pic_works=no
5173     
5174 fi
5175 rm -f conftest*
5176     CFLAGS="$save_CFLAGS"
5177   
5178 fi
5179
5180
5181   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5182     lt_cv_prog_cc_pic=
5183     lt_cv_prog_cc_can_build_shared=no
5184   else
5185     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5186   fi
5187
5188   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5189 fi
5190
5191 # Check for any special shared library compilation flags.
5192 if test -n "$lt_cv_prog_cc_shlib"; then
5193   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5194   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5195   else
5196    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5197     lt_cv_prog_cc_can_build_shared=no
5198   fi
5199 fi
5200
5201 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5202 echo "configure:5203: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5203 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5204   echo $ac_n "(cached) $ac_c" 1>&6
5205 else
5206     lt_cv_prog_cc_static_works=no
5207   save_LDFLAGS="$LDFLAGS"
5208   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5209   cat > conftest.$ac_ext <<EOF
5210 #line 5211 "configure"
5211 #include "confdefs.h"
5212
5213 int main() {
5214
5215 ; return 0; }
5216 EOF
5217 if { (eval echo configure:5218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5218   rm -rf conftest*
5219   lt_cv_prog_cc_static_works=yes
5220 else
5221   echo "configure: failed program was:" >&5
5222   cat conftest.$ac_ext >&5
5223 fi
5224 rm -f conftest*
5225   LDFLAGS="$save_LDFLAGS"
5226
5227 fi
5228
5229
5230 # Belt *and* braces to stop my trousers falling down:
5231 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5232 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5233
5234 pic_flag="$lt_cv_prog_cc_pic"
5235 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5236 wl="$lt_cv_prog_cc_wl"
5237 link_static_flag="$lt_cv_prog_cc_static"
5238 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5239 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5240
5241
5242 # Check to see if options -o and -c are simultaneously supported by compiler
5243 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5244 echo "configure:5245: checking if $compiler supports -c -o file.$ac_objext" >&5
5245 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5246   echo $ac_n "(cached) $ac_c" 1>&6
5247 else
5248   
5249 $rm -r conftest 2>/dev/null
5250 mkdir conftest
5251 cd conftest
5252 echo "int some_variable = 0;" > conftest.$ac_ext
5253 mkdir out
5254 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5255 # that will create temporary files in the current directory regardless of
5256 # the output directory.  Thus, making CWD read-only will cause this test
5257 # to fail, enabling locking or at least warning the user not to do parallel
5258 # builds.
5259 chmod -w .
5260 save_CFLAGS="$CFLAGS"
5261 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5262 compiler_c_o=no
5263 if { (eval echo configure:5264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5264   # The compiler can only warn and ignore the option if not recognized
5265   # So say no if there are warnings
5266   if test -s out/conftest.err; then
5267     lt_cv_compiler_c_o=no
5268   else
5269     lt_cv_compiler_c_o=yes
5270   fi
5271 else
5272   # Append any errors to the config.log.
5273   cat out/conftest.err 1>&5
5274   lt_cv_compiler_c_o=no
5275 fi
5276 CFLAGS="$save_CFLAGS"
5277 chmod u+w .
5278 $rm conftest* out/*
5279 rmdir out
5280 cd ..
5281 rmdir conftest
5282 $rm -r conftest 2>/dev/null
5283
5284 fi
5285
5286 compiler_c_o=$lt_cv_compiler_c_o
5287 echo "$ac_t""$compiler_c_o" 1>&6
5288
5289 if test x"$compiler_c_o" = x"yes"; then
5290   # Check to see if we can write to a .lo
5291   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5292 echo "configure:5293: checking if $compiler supports -c -o file.lo" >&5
5293   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5294   echo $ac_n "(cached) $ac_c" 1>&6
5295 else
5296   
5297   lt_cv_compiler_o_lo=no
5298   save_CFLAGS="$CFLAGS"
5299   CFLAGS="$CFLAGS -c -o conftest.lo"
5300   save_objext="$ac_objext"
5301   ac_objext=lo
5302   cat > conftest.$ac_ext <<EOF
5303 #line 5304 "configure"
5304 #include "confdefs.h"
5305
5306 int main() {
5307 int some_variable = 0;
5308 ; return 0; }
5309 EOF
5310 if { (eval echo configure:5311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5311   rm -rf conftest*
5312       # The compiler can only warn and ignore the option if not recognized
5313     # So say no if there are warnings
5314     if test -s conftest.err; then
5315       lt_cv_compiler_o_lo=no
5316     else
5317       lt_cv_compiler_o_lo=yes
5318     fi
5319   
5320 else
5321   echo "configure: failed program was:" >&5
5322   cat conftest.$ac_ext >&5
5323 fi
5324 rm -f conftest*
5325   ac_objext="$save_objext"
5326   CFLAGS="$save_CFLAGS"
5327   
5328 fi
5329
5330   compiler_o_lo=$lt_cv_compiler_o_lo
5331   echo "$ac_t""$compiler_o_lo" 1>&6
5332 else
5333   compiler_o_lo=no
5334 fi
5335
5336 # Check to see if we can do hard links to lock some files if needed
5337 hard_links="nottested"
5338 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5339   # do not overwrite the value of need_locks provided by the user
5340   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5341 echo "configure:5342: checking if we can lock with hard links" >&5
5342   hard_links=yes
5343   $rm conftest*
5344   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5345   touch conftest.a
5346   ln conftest.a conftest.b 2>&5 || hard_links=no
5347   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5348   echo "$ac_t""$hard_links" 1>&6
5349   if test "$hard_links" = no; then
5350     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5351     need_locks=warn
5352   fi
5353 else
5354   need_locks=no
5355 fi
5356
5357 if test "$GCC" = yes; then
5358   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5359   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5360 echo "configure:5361: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5361   echo "int some_variable = 0;" > conftest.$ac_ext
5362   save_CFLAGS="$CFLAGS"
5363   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5364   compiler_rtti_exceptions=no
5365   cat > conftest.$ac_ext <<EOF
5366 #line 5367 "configure"
5367 #include "confdefs.h"
5368
5369 int main() {
5370 int some_variable = 0;
5371 ; return 0; }
5372 EOF
5373 if { (eval echo configure:5374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5374   rm -rf conftest*
5375       # The compiler can only warn and ignore the option if not recognized
5376     # So say no if there are warnings
5377     if test -s conftest.err; then
5378       compiler_rtti_exceptions=no
5379     else
5380       compiler_rtti_exceptions=yes
5381     fi
5382   
5383 else
5384   echo "configure: failed program was:" >&5
5385   cat conftest.$ac_ext >&5
5386 fi
5387 rm -f conftest*
5388   CFLAGS="$save_CFLAGS"
5389   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5390
5391   if test "$compiler_rtti_exceptions" = "yes"; then
5392     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5393   else
5394     no_builtin_flag=' -fno-builtin'
5395   fi
5396 fi
5397
5398 # See if the linker supports building shared libraries.
5399 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5400 echo "configure:5401: checking whether the linker ($LD) supports shared libraries" >&5
5401
5402 allow_undefined_flag=
5403 no_undefined_flag=
5404 need_lib_prefix=unknown
5405 need_version=unknown
5406 # when you set need_version to no, make sure it does not cause -set_version
5407 # flags to be left without arguments
5408 archive_cmds=
5409 archive_expsym_cmds=
5410 old_archive_from_new_cmds=
5411 old_archive_from_expsyms_cmds=
5412 export_dynamic_flag_spec=
5413 whole_archive_flag_spec=
5414 thread_safe_flag_spec=
5415 hardcode_into_libs=no
5416 hardcode_libdir_flag_spec=
5417 hardcode_libdir_separator=
5418 hardcode_direct=no
5419 hardcode_minus_L=no
5420 hardcode_shlibpath_var=unsupported
5421 runpath_var=
5422 link_all_deplibs=unknown
5423 always_export_symbols=no
5424 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5425 # include_expsyms should be a list of space-separated symbols to be *always*
5426 # included in the symbol list
5427 include_expsyms=
5428 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5429 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5430 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5431 # as well as any symbol that contains `d'.
5432 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5433 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5434 # platforms (ab)use it in PIC code, but their linkers get confused if
5435 # the symbol is explicitly referenced.  Since portable code cannot
5436 # rely on this symbol name, it's probably fine to never include it in
5437 # preloaded symbol tables.
5438 extract_expsyms_cmds=
5439
5440 case $host_os in
5441 cygwin* | mingw* | pw32*)
5442   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5443   # When not using gcc, we currently assume that we are using
5444   # Microsoft Visual C++.
5445   if test "$GCC" != yes; then
5446     with_gnu_ld=no
5447   fi
5448   ;;
5449 openbsd*)
5450   with_gnu_ld=no
5451   ;;
5452 esac
5453
5454 ld_shlibs=yes
5455 if test "$with_gnu_ld" = yes; then
5456   # If archive_cmds runs LD, not CC, wlarc should be empty
5457   wlarc='${wl}'
5458
5459   # See if GNU ld supports shared libraries.
5460   case $host_os in
5461   aix3* | aix4* | aix5*)
5462     # On AIX, the GNU linker is very broken
5463     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5464     ld_shlibs=no
5465     cat <<EOF 1>&2
5466
5467 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5468 *** to be unable to reliably create shared libraries on AIX.
5469 *** Therefore, libtool is disabling shared libraries support.  If you
5470 *** really care for shared libraries, you may want to modify your PATH
5471 *** so that a non-GNU linker is found, and then restart.
5472
5473 EOF
5474     ;;
5475
5476   amigaos*)
5477     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)'
5478     hardcode_libdir_flag_spec='-L$libdir'
5479     hardcode_minus_L=yes
5480
5481     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5482     # that the semantics of dynamic libraries on AmigaOS, at least up
5483     # to version 4, is to share data among multiple programs linked
5484     # with the same dynamic library.  Since this doesn't match the
5485     # behavior of shared libraries on other platforms, we can use
5486     # them.
5487     ld_shlibs=no
5488     ;;
5489
5490   beos*)
5491     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5492       allow_undefined_flag=unsupported
5493       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5494       # support --undefined.  This deserves some investigation.  FIXME
5495       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5496     else
5497       ld_shlibs=no
5498     fi
5499     ;;
5500
5501   cygwin* | mingw* | pw32*)
5502     # hardcode_libdir_flag_spec is actually meaningless, as there is
5503     # no search path for DLLs.
5504     hardcode_libdir_flag_spec='-L$libdir'
5505     allow_undefined_flag=unsupported
5506     always_export_symbols=yes
5507
5508     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5509       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5510       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5511       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5512       else $CC -o impgen impgen.c ; fi)~
5513       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5514
5515     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5516
5517     # cygwin and mingw dlls have different entry points and sets of symbols
5518     # to exclude.
5519     # FIXME: what about values for MSVC?
5520     dll_entry=__cygwin_dll_entry@12
5521     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5522     case $host_os in
5523     mingw*)
5524       # mingw values
5525       dll_entry=_DllMainCRTStartup@12
5526       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5527       ;;
5528     esac
5529
5530     # mingw and cygwin differ, and it's simplest to just exclude the union
5531     # of the two symbol sets.
5532     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5533
5534     # recent cygwin and mingw systems supply a stub DllMain which the user
5535     # can override, but on older systems we have to supply one (in ltdll.c)
5536     if test "x$lt_cv_need_dllmain" = "xyes"; then
5537       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5538       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~
5539         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5540     else
5541       ltdll_obj=
5542       ltdll_cmds=
5543     fi
5544
5545     # Extract the symbol export list from an `--export-all' def file,
5546     # then regenerate the def file from the symbol export list, so that
5547     # the compiled dll only exports the symbol export list.
5548     # Be careful not to strip the DATA tag left be newer dlltools.
5549     export_symbols_cmds="$ltdll_cmds"'
5550       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5551       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5552
5553     # If the export-symbols file already is a .def file (1st line
5554     # is EXPORTS), use it as is.
5555     # If DATA tags from a recent dlltool are present, honour them!
5556     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5557         cp $export_symbols $output_objdir/$soname-def;
5558       else
5559         echo EXPORTS > $output_objdir/$soname-def;
5560         _lt_hint=1;
5561         cat $export_symbols | while read symbol; do
5562          set dummy \$symbol;
5563          case \$# in
5564            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5565            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5566          esac;
5567          _lt_hint=`expr 1 + \$_lt_hint`;
5568         done;
5569       fi~
5570       '"$ltdll_cmds"'
5571       $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~
5572       $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~
5573       $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~
5574       $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~
5575       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5576     ;;
5577
5578   netbsd*)
5579     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5580       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5581       wlarc=
5582     else
5583       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5584       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5585     fi
5586     ;;
5587
5588   solaris* | sysv5*)
5589     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5590       ld_shlibs=no
5591       cat <<EOF 1>&2
5592
5593 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5594 *** create shared libraries on Solaris systems.  Therefore, libtool
5595 *** is disabling shared libraries support.  We urge you to upgrade GNU
5596 *** binutils to release 2.9.1 or newer.  Another option is to modify
5597 *** your PATH or compiler configuration so that the native linker is
5598 *** used, and then restart.
5599
5600 EOF
5601     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5602       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5603       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5604     else
5605       ld_shlibs=no
5606     fi
5607     ;;
5608
5609   sunos4*)
5610     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5611     wlarc=
5612     hardcode_direct=yes
5613     hardcode_shlibpath_var=no
5614     ;;
5615
5616   *)
5617     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5618       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5619       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5620     else
5621       ld_shlibs=no
5622     fi
5623     ;;
5624   esac
5625
5626   if test "$ld_shlibs" = yes; then
5627     runpath_var=LD_RUN_PATH
5628     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5629     export_dynamic_flag_spec='${wl}--export-dynamic'
5630     case $host_os in
5631     cygwin* | mingw* | pw32*)
5632       # dlltool doesn't understand --whole-archive et. al.
5633       whole_archive_flag_spec=
5634       ;;
5635     *)
5636       # ancient GNU ld didn't support --whole-archive et. al.
5637       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5638         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5639       else
5640         whole_archive_flag_spec=
5641       fi
5642       ;;
5643     esac
5644   fi
5645 else
5646   # PORTME fill in a description of your system's linker (not GNU ld)
5647   case $host_os in
5648   aix3*)
5649     allow_undefined_flag=unsupported
5650     always_export_symbols=yes
5651     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'
5652     # Note: this linker hardcodes the directories in LIBPATH if there
5653     # are no directories specified by -L.
5654     hardcode_minus_L=yes
5655     if test "$GCC" = yes && test -z "$link_static_flag"; then
5656       # Neither direct hardcoding nor static linking is supported with a
5657       # broken collect2.
5658       hardcode_direct=unsupported
5659     fi
5660     ;;
5661
5662   aix4* | aix5*)
5663     if test "$host_cpu" = ia64; then
5664       # On IA64, the linker does run time linking by default, so we don't
5665       # have to do anything special.
5666       aix_use_runtimelinking=no
5667       exp_sym_flag='-Bexport'
5668       no_entry_flag=""
5669     else
5670       aix_use_runtimelinking=no
5671
5672       # Test if we are trying to use run time linking or normal
5673       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5674       # need to do runtime linking.
5675       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5676         for ld_flag in $LDFLAGS; do
5677           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5678             aix_use_runtimelinking=yes
5679             break
5680           fi
5681         done
5682       esac
5683
5684       exp_sym_flag='-bexport'
5685       no_entry_flag='-bnoentry'
5686     fi
5687
5688     # When large executables or shared objects are built, AIX ld can
5689     # have problems creating the table of contents.  If linking a library
5690     # or program results in "error TOC overflow" add -mminimal-toc to
5691     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5692     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5693
5694     hardcode_direct=yes
5695     archive_cmds=''
5696     hardcode_libdir_separator=':'
5697     if test "$GCC" = yes; then
5698       case $host_os in aix4.[012]|aix4.[012].*)
5699         collect2name=`${CC} -print-prog-name=collect2`
5700         if test -f "$collect2name" && \
5701           strings "$collect2name" | grep resolve_lib_name >/dev/null
5702         then
5703           # We have reworked collect2
5704           hardcode_direct=yes
5705         else
5706           # We have old collect2
5707           hardcode_direct=unsupported
5708           # It fails to find uninstalled libraries when the uninstalled
5709           # path is not listed in the libpath.  Setting hardcode_minus_L
5710           # to unsupported forces relinking
5711           hardcode_minus_L=yes
5712           hardcode_libdir_flag_spec='-L$libdir'
5713           hardcode_libdir_separator=
5714         fi
5715       esac
5716
5717       shared_flag='-shared'
5718     else
5719       # not using gcc
5720       if test "$host_cpu" = ia64; then
5721         shared_flag='${wl}-G'
5722       else
5723         if test "$aix_use_runtimelinking" = yes; then
5724           shared_flag='${wl}-G'
5725         else
5726           shared_flag='${wl}-bM:SRE'
5727         fi
5728       fi
5729     fi
5730
5731     # It seems that -bexpall can do strange things, so it is better to
5732     # generate a list of symbols to export.
5733     always_export_symbols=yes
5734     if test "$aix_use_runtimelinking" = yes; then
5735       # Warning - without using the other runtime loading flags (-brtl),
5736       # -berok will link without error, but may produce a broken library.
5737       allow_undefined_flag='-berok'
5738       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5739       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"
5740     else
5741       if test "$host_cpu" = ia64; then
5742         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5743         allow_undefined_flag="-z nodefs"
5744         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"
5745       else
5746         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5747         # Warning - without using the other run time loading flags,
5748         # -berok will link without error, but may produce a broken library.
5749         allow_undefined_flag='${wl}-berok'
5750         # This is a bit strange, but is similar to how AIX traditionally builds
5751         # it's shared libraries.
5752         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'
5753       fi
5754     fi
5755     ;;
5756
5757   amigaos*)
5758     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)'
5759     hardcode_libdir_flag_spec='-L$libdir'
5760     hardcode_minus_L=yes
5761     # see comment about different semantics on the GNU ld section
5762     ld_shlibs=no
5763     ;;
5764
5765   cygwin* | mingw* | pw32*)
5766     # When not using gcc, we currently assume that we are using
5767     # Microsoft Visual C++.
5768     # hardcode_libdir_flag_spec is actually meaningless, as there is
5769     # no search path for DLLs.
5770     hardcode_libdir_flag_spec=' '
5771     allow_undefined_flag=unsupported
5772     # Tell ltmain to make .lib files, not .a files.
5773     libext=lib
5774     # FIXME: Setting linknames here is a bad hack.
5775     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5776     # The linker will automatically build a .lib file if we build a DLL.
5777     old_archive_from_new_cmds='true'
5778     # FIXME: Should let the user specify the lib program.
5779     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5780     fix_srcfile_path='`cygpath -w "$srcfile"`'
5781     ;;
5782
5783   darwin* | rhapsody*)
5784     case "$host_os" in
5785     rhapsody* | darwin1.[012])
5786       allow_undefined_flag='-undefined suppress'
5787       ;;
5788     *) # Darwin 1.3 on
5789       allow_undefined_flag='-flat_namespace -undefined suppress'
5790       ;;
5791     esac
5792     # FIXME: Relying on posixy $() will cause problems for
5793     #        cross-compilation, but unfortunately the echo tests do not
5794     #        yet detect zsh echo's removal of \ escapes.
5795     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'
5796     # We need to add '_' to the symbols in $export_symbols first
5797     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5798     hardcode_direct=yes
5799     hardcode_shlibpath_var=no
5800     whole_archive_flag_spec='-all_load $convenience'
5801     ;;
5802
5803   freebsd1*)
5804     ld_shlibs=no
5805     ;;
5806
5807   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5808   # support.  Future versions do this automatically, but an explicit c++rt0.o
5809   # does not break anything, and helps significantly (at the cost of a little
5810   # extra space).
5811   freebsd2.2*)
5812     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5813     hardcode_libdir_flag_spec='-R$libdir'
5814     hardcode_direct=yes
5815     hardcode_shlibpath_var=no
5816     ;;
5817
5818   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5819   freebsd2*)
5820     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5821     hardcode_direct=yes
5822     hardcode_minus_L=yes
5823     hardcode_shlibpath_var=no
5824     ;;
5825
5826   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5827   freebsd*)
5828     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5829     hardcode_libdir_flag_spec='-R$libdir'
5830     hardcode_direct=yes
5831     hardcode_shlibpath_var=no
5832     ;;
5833
5834   hpux9* | hpux10* | hpux11*)
5835     case $host_os in
5836     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' ;;
5837     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5838     esac
5839     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5840     hardcode_libdir_separator=:
5841     hardcode_direct=yes
5842     hardcode_minus_L=yes # Not in the search PATH, but as the default
5843                          # location of the library.
5844     export_dynamic_flag_spec='${wl}-E'
5845     ;;
5846
5847   irix5* | irix6*)
5848     if test "$GCC" = yes; then
5849       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'
5850     else
5851       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'
5852     fi
5853     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5854     hardcode_libdir_separator=:
5855     link_all_deplibs=yes
5856     ;;
5857
5858   netbsd*)
5859     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5860       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5861     else
5862       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5863     fi
5864     hardcode_libdir_flag_spec='-R$libdir'
5865     hardcode_direct=yes
5866     hardcode_shlibpath_var=no
5867     ;;
5868
5869   newsos6)
5870     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5871     hardcode_direct=yes
5872     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5873     hardcode_libdir_separator=:
5874     hardcode_shlibpath_var=no
5875     ;;
5876
5877   openbsd*)
5878     hardcode_direct=yes
5879     hardcode_shlibpath_var=no
5880     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5881       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5882       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5883       export_dynamic_flag_spec='${wl}-E'
5884     else
5885       case "$host_os" in
5886       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5887         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5888         hardcode_libdir_flag_spec='-R$libdir'
5889         ;;
5890       *)
5891         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5892         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5893         ;;
5894       esac
5895     fi
5896     ;;
5897
5898   os2*)
5899     hardcode_libdir_flag_spec='-L$libdir'
5900     hardcode_minus_L=yes
5901     allow_undefined_flag=unsupported
5902     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'
5903     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5904     ;;
5905
5906   osf3*)
5907     if test "$GCC" = yes; then
5908       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5909       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5910     else
5911       allow_undefined_flag=' -expect_unresolved \*'
5912       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'
5913     fi
5914     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5915     hardcode_libdir_separator=:
5916     ;;
5917
5918   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5919     if test "$GCC" = yes; then
5920       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5921       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'
5922       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5923     else
5924       allow_undefined_flag=' -expect_unresolved \*'
5925       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'
5926       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5927       $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'
5928
5929       #Both c and cxx compiler support -rpath directly
5930       hardcode_libdir_flag_spec='-rpath $libdir'
5931     fi
5932     hardcode_libdir_separator=:
5933     ;;
5934
5935   sco3.2v5*)
5936     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5937     hardcode_shlibpath_var=no
5938     runpath_var=LD_RUN_PATH
5939     hardcode_runpath_var=yes
5940     export_dynamic_flag_spec='${wl}-Bexport'
5941     ;;
5942
5943   solaris*)
5944     # gcc --version < 3.0 without binutils cannot create self contained
5945     # shared libraries reliably, requiring libgcc.a to resolve some of
5946     # the object symbols generated in some cases.  Libraries that use
5947     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5948     # a copy of libgcc.a into every shared library to guarantee resolving
5949     # such symbols causes other problems:  According to Tim Van Holder
5950     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5951     # (to the application) exception stack for one thing.
5952     no_undefined_flag=' -z defs'
5953     if test "$GCC" = yes; then
5954       case `$CC --version 2>/dev/null` in
5955       [12].*)
5956         cat <<EOF 1>&2
5957
5958 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5959 *** create self contained shared libraries on Solaris systems, without
5960 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5961 *** -no-undefined support, which will at least allow you to build shared
5962 *** libraries.  However, you may find that when you link such libraries
5963 *** into an application without using GCC, you have to manually add
5964 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5965 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5966 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5967
5968 EOF
5969         no_undefined_flag=
5970         ;;
5971       esac
5972     fi
5973     # $CC -shared without GNU ld will not create a library from C++
5974     # object files and a static libstdc++, better avoid it by now
5975     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5976     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5977                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5978     hardcode_libdir_flag_spec='-R$libdir'
5979     hardcode_shlibpath_var=no
5980     case $host_os in
5981     solaris2.[0-5] | solaris2.[0-5].*) ;;
5982     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5983       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5984     esac
5985     link_all_deplibs=yes
5986     ;;
5987
5988   sunos4*)
5989     if test "x$host_vendor" = xsequent; then
5990       # Use $CC to link under sequent, because it throws in some extra .o
5991       # files that make .init and .fini sections work.
5992       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5993     else
5994       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5995     fi
5996     hardcode_libdir_flag_spec='-L$libdir'
5997     hardcode_direct=yes
5998     hardcode_minus_L=yes
5999     hardcode_shlibpath_var=no
6000     ;;
6001
6002   sysv4)
6003     if test "x$host_vendor" = xsno; then
6004       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
6005       hardcode_direct=yes # is this really true???
6006     else
6007       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6008       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6009     fi
6010     runpath_var='LD_RUN_PATH'
6011     hardcode_shlibpath_var=no
6012     ;;
6013
6014   sysv4.3*)
6015     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6016     hardcode_shlibpath_var=no
6017     export_dynamic_flag_spec='-Bexport'
6018     ;;
6019
6020   sysv5*)
6021     no_undefined_flag=' -z text'
6022     # $CC -shared without GNU ld will not create a library from C++
6023     # object files and a static libstdc++, better avoid it by now
6024     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6025     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6026                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6027     hardcode_libdir_flag_spec=
6028     hardcode_shlibpath_var=no
6029     runpath_var='LD_RUN_PATH'
6030     ;;
6031
6032   uts4*)
6033     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6034     hardcode_libdir_flag_spec='-L$libdir'
6035     hardcode_shlibpath_var=no
6036     ;;
6037
6038   dgux*)
6039     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6040     hardcode_libdir_flag_spec='-L$libdir'
6041     hardcode_shlibpath_var=no
6042     ;;
6043
6044   sysv4*MP*)
6045     if test -d /usr/nec; then
6046       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6047       hardcode_shlibpath_var=no
6048       runpath_var=LD_RUN_PATH
6049       hardcode_runpath_var=yes
6050       ld_shlibs=yes
6051     fi
6052     ;;
6053
6054   sysv4.2uw2*)
6055     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6056     hardcode_direct=yes
6057     hardcode_minus_L=no
6058     hardcode_shlibpath_var=no
6059     hardcode_runpath_var=yes
6060     runpath_var=LD_RUN_PATH
6061     ;;
6062
6063   sysv5uw7* | unixware7*)
6064     no_undefined_flag='${wl}-z ${wl}text'
6065     if test "$GCC" = yes; then
6066       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6067     else
6068       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6069     fi
6070     runpath_var='LD_RUN_PATH'
6071     hardcode_shlibpath_var=no
6072     ;;
6073
6074   *)
6075     ld_shlibs=no
6076     ;;
6077   esac
6078 fi
6079 echo "$ac_t""$ld_shlibs" 1>&6
6080 test "$ld_shlibs" = no && can_build_shared=no
6081
6082 # Check hardcoding attributes.
6083 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6084 echo "configure:6085: checking how to hardcode library paths into programs" >&5
6085 hardcode_action=
6086 if test -n "$hardcode_libdir_flag_spec" || \
6087    test -n "$runpath_var"; then
6088
6089   # We can hardcode non-existant directories.
6090   if test "$hardcode_direct" != no &&
6091      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6092      # have to relink, otherwise we might link with an installed library
6093      # when we should be linking with a yet-to-be-installed one
6094      ## test "$hardcode_shlibpath_var" != no &&
6095      test "$hardcode_minus_L" != no; then
6096     # Linking always hardcodes the temporary library directory.
6097     hardcode_action=relink
6098   else
6099     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6100     hardcode_action=immediate
6101   fi
6102 else
6103   # We cannot hardcode anything, or else we can only hardcode existing
6104   # directories.
6105   hardcode_action=unsupported
6106 fi
6107 echo "$ac_t""$hardcode_action" 1>&6
6108
6109 striplib=
6110 old_striplib=
6111 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6112 echo "configure:6113: checking whether stripping libraries is possible" >&5
6113 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6114   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6115   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6116   echo "$ac_t""yes" 1>&6
6117 else
6118   echo "$ac_t""no" 1>&6
6119 fi
6120
6121 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6122 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6123
6124 # PORTME Fill in your ld.so characteristics
6125 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6126 echo "configure:6127: checking dynamic linker characteristics" >&5
6127 library_names_spec=
6128 libname_spec='lib$name'
6129 soname_spec=
6130 postinstall_cmds=
6131 postuninstall_cmds=
6132 finish_cmds=
6133 finish_eval=
6134 shlibpath_var=
6135 shlibpath_overrides_runpath=unknown
6136 version_type=none
6137 dynamic_linker="$host_os ld.so"
6138 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6139 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6140
6141 case $host_os in
6142 aix3*)
6143   version_type=linux
6144   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6145   shlibpath_var=LIBPATH
6146
6147   # AIX has no versioning support, so we append a major version to the name.
6148   soname_spec='${libname}${release}.so$major'
6149   ;;
6150
6151 aix4* | aix5*)
6152   version_type=linux
6153   if test "$host_cpu" = ia64; then
6154     # AIX 5 supports IA64
6155     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6156     shlibpath_var=LD_LIBRARY_PATH
6157   else
6158     # With GCC up to 2.95.x, collect2 would create an import file
6159     # for dependence libraries.  The import file would start with
6160     # the line `#! .'.  This would cause the generated library to
6161     # depend on `.', always an invalid library.  This was fixed in
6162     # development snapshots of GCC prior to 3.0.
6163     case $host_os in
6164       aix4 | aix4.[01] | aix4.[01].*)
6165         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6166              echo ' yes '
6167              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6168           :
6169         else
6170           can_build_shared=no
6171         fi
6172         ;;
6173     esac
6174     # AIX (on Power*) has no versioning support, so currently we can
6175     # not hardcode correct soname into executable. Probably we can
6176     # add versioning support to collect2, so additional links can
6177     # be useful in future.
6178     if test "$aix_use_runtimelinking" = yes; then
6179       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6180       # instead of lib<name>.a to let people know that these are not
6181       # typical AIX shared libraries.
6182       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6183     else
6184       # We preserve .a as extension for shared libraries through AIX4.2
6185       # and later when we are not doing run time linking.
6186       library_names_spec='${libname}${release}.a $libname.a'
6187       soname_spec='${libname}${release}.so$major'
6188     fi
6189     shlibpath_var=LIBPATH
6190   fi
6191   ;;
6192
6193 amigaos*)
6194   library_names_spec='$libname.ixlibrary $libname.a'
6195   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6196   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'
6197   ;;
6198
6199 beos*)
6200   library_names_spec='${libname}.so'
6201   dynamic_linker="$host_os ld.so"
6202   shlibpath_var=LIBRARY_PATH
6203   ;;
6204
6205 bsdi4*)
6206   version_type=linux
6207   need_version=no
6208   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6209   soname_spec='${libname}${release}.so$major'
6210   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6211   shlibpath_var=LD_LIBRARY_PATH
6212   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6213   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6214   export_dynamic_flag_spec=-rdynamic
6215   # the default ld.so.conf also contains /usr/contrib/lib and
6216   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6217   # libtool to hard-code these into programs
6218   ;;
6219
6220 cygwin* | mingw* | pw32*)
6221   version_type=windows
6222   need_version=no
6223   need_lib_prefix=no
6224   case $GCC,$host_os in
6225   yes,cygwin*)
6226     library_names_spec='$libname.dll.a'
6227     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6228     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6229       dldir=$destdir/`dirname \$dlpath`~
6230       test -d \$dldir || mkdir -p \$dldir~
6231       $install_prog .libs/$dlname \$dldir/$dlname'
6232     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6233       dlpath=$dir/\$dldll~
6234        $rm \$dlpath'
6235     ;;
6236   yes,mingw*)
6237     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6238     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6239     ;;
6240   yes,pw32*)
6241     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6242     ;;
6243   *)
6244     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6245     ;;
6246   esac
6247   dynamic_linker='Win32 ld.exe'
6248   # FIXME: first we should search . and the directory the executable is in
6249   shlibpath_var=PATH
6250   ;;
6251
6252 darwin* | rhapsody*)
6253   dynamic_linker="$host_os dyld"
6254   version_type=darwin
6255   need_lib_prefix=no
6256   need_version=no
6257   # FIXME: Relying on posixy $() will cause problems for
6258   #        cross-compilation, but unfortunately the echo tests do not
6259   #        yet detect zsh echo's removal of \ escapes.
6260   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)'
6261   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6262   shlibpath_overrides_runpath=yes
6263   shlibpath_var=DYLD_LIBRARY_PATH
6264   ;;
6265
6266 freebsd1*)
6267   dynamic_linker=no
6268   ;;
6269
6270 freebsd*)
6271   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6272   version_type=freebsd-$objformat
6273   case $version_type in
6274     freebsd-elf*)
6275       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6276       need_version=no
6277       need_lib_prefix=no
6278       ;;
6279     freebsd-*)
6280       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6281       need_version=yes
6282       ;;
6283   esac
6284   shlibpath_var=LD_LIBRARY_PATH
6285   case $host_os in
6286   freebsd2*)
6287     shlibpath_overrides_runpath=yes
6288     ;;
6289   *)
6290     shlibpath_overrides_runpath=no
6291     hardcode_into_libs=yes
6292     ;;
6293   esac
6294   ;;
6295
6296 gnu*)
6297   version_type=linux
6298   need_lib_prefix=no
6299   need_version=no
6300   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6301   soname_spec='${libname}${release}.so$major'
6302   shlibpath_var=LD_LIBRARY_PATH
6303   hardcode_into_libs=yes
6304   ;;
6305
6306 hpux9* | hpux10* | hpux11*)
6307   # Give a soname corresponding to the major version so that dld.sl refuses to
6308   # link against other versions.
6309   dynamic_linker="$host_os dld.sl"
6310   version_type=sunos
6311   need_lib_prefix=no
6312   need_version=no
6313   shlibpath_var=SHLIB_PATH
6314   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6315   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6316   soname_spec='${libname}${release}.sl$major'
6317   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6318   postinstall_cmds='chmod 555 $lib'
6319   ;;
6320
6321 irix5* | irix6*)
6322   version_type=irix
6323   need_lib_prefix=no
6324   need_version=no
6325   soname_spec='${libname}${release}.so$major'
6326   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6327   case $host_os in
6328   irix5*)
6329     libsuff= shlibsuff=
6330     ;;
6331   *)
6332     case $LD in # libtool.m4 will add one of these switches to LD
6333     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6334     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6335     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6336     *) libsuff= shlibsuff= libmagic=never-match;;
6337     esac
6338     ;;
6339   esac
6340   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6341   shlibpath_overrides_runpath=no
6342   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6343   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6344   ;;
6345
6346 # No shared lib support for Linux oldld, aout, or coff.
6347 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6348   dynamic_linker=no
6349   ;;
6350
6351 # This must be Linux ELF.
6352 linux-gnu*)
6353   version_type=linux
6354   need_lib_prefix=no
6355   need_version=no
6356   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6357   soname_spec='${libname}${release}.so$major'
6358   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6359   shlibpath_var=LD_LIBRARY_PATH
6360   shlibpath_overrides_runpath=no
6361   # This implies no fast_install, which is unacceptable.
6362   # Some rework will be needed to allow for fast_install
6363   # before this can be enabled.
6364   hardcode_into_libs=yes
6365
6366   # We used to test for /lib/ld.so.1 and disable shared libraries on
6367   # powerpc, because MkLinux only supported shared libraries with the
6368   # GNU dynamic linker.  Since this was broken with cross compilers,
6369   # most powerpc-linux boxes support dynamic linking these days and
6370   # people can always --disable-shared, the test was removed, and we
6371   # assume the GNU/Linux dynamic linker is in use.
6372   dynamic_linker='GNU/Linux ld.so'
6373   ;;
6374
6375 netbsd*)
6376   version_type=sunos
6377   need_lib_prefix=no
6378   need_version=no
6379   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6380     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6381     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6382     dynamic_linker='NetBSD (a.out) ld.so'
6383   else
6384     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6385     soname_spec='${libname}${release}.so$major'
6386     dynamic_linker='NetBSD ld.elf_so'
6387   fi
6388   shlibpath_var=LD_LIBRARY_PATH
6389   shlibpath_overrides_runpath=yes
6390   hardcode_into_libs=yes
6391   ;;
6392
6393 newsos6)
6394   version_type=linux
6395   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6396   shlibpath_var=LD_LIBRARY_PATH
6397   shlibpath_overrides_runpath=yes
6398   ;;
6399
6400 openbsd*)
6401   version_type=sunos
6402   need_lib_prefix=no
6403   need_version=no
6404   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6405     case "$host_os" in
6406     openbsd2.[89] | openbsd2.[89].*)
6407       shlibpath_overrides_runpath=no
6408       ;;
6409     *)
6410       shlibpath_overrides_runpath=yes
6411       ;;
6412     esac
6413   else
6414     shlibpath_overrides_runpath=yes
6415   fi
6416   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6417   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6418   shlibpath_var=LD_LIBRARY_PATH
6419   ;;
6420
6421 os2*)
6422   libname_spec='$name'
6423   need_lib_prefix=no
6424   library_names_spec='$libname.dll $libname.a'
6425   dynamic_linker='OS/2 ld.exe'
6426   shlibpath_var=LIBPATH
6427   ;;
6428
6429 osf3* | osf4* | osf5*)
6430   version_type=osf
6431   need_version=no
6432   soname_spec='${libname}${release}.so'
6433   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6434   shlibpath_var=LD_LIBRARY_PATH
6435   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6436   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6437   ;;
6438
6439 sco3.2v5*)
6440   version_type=osf
6441   soname_spec='${libname}${release}.so$major'
6442   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6443   shlibpath_var=LD_LIBRARY_PATH
6444   ;;
6445
6446 solaris*)
6447   version_type=linux
6448   need_lib_prefix=no
6449   need_version=no
6450   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6451   soname_spec='${libname}${release}.so$major'
6452   shlibpath_var=LD_LIBRARY_PATH
6453   shlibpath_overrides_runpath=yes
6454   hardcode_into_libs=yes
6455   # ldd complains unless libraries are executable
6456   postinstall_cmds='chmod +x $lib'
6457   ;;
6458
6459 sunos4*)
6460   version_type=sunos
6461   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6462   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6463   shlibpath_var=LD_LIBRARY_PATH
6464   shlibpath_overrides_runpath=yes
6465   if test "$with_gnu_ld" = yes; then
6466     need_lib_prefix=no
6467   fi
6468   need_version=yes
6469   ;;
6470
6471 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6472   version_type=linux
6473   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6474   soname_spec='${libname}${release}.so$major'
6475   shlibpath_var=LD_LIBRARY_PATH
6476   case $host_vendor in
6477     sni)
6478       shlibpath_overrides_runpath=no
6479       ;;
6480     motorola)
6481       need_lib_prefix=no
6482       need_version=no
6483       shlibpath_overrides_runpath=no
6484       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6485       ;;
6486   esac
6487   ;;
6488
6489 uts4*)
6490   version_type=linux
6491   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6492   soname_spec='${libname}${release}.so$major'
6493   shlibpath_var=LD_LIBRARY_PATH
6494   ;;
6495
6496 dgux*)
6497   version_type=linux
6498   need_lib_prefix=no
6499   need_version=no
6500   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6501   soname_spec='${libname}${release}.so$major'
6502   shlibpath_var=LD_LIBRARY_PATH
6503   ;;
6504
6505 sysv4*MP*)
6506   if test -d /usr/nec ;then
6507     version_type=linux
6508     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6509     soname_spec='$libname.so.$major'
6510     shlibpath_var=LD_LIBRARY_PATH
6511   fi
6512   ;;
6513
6514 *)
6515   dynamic_linker=no
6516   ;;
6517 esac
6518 echo "$ac_t""$dynamic_linker" 1>&6
6519 test "$dynamic_linker" = no && can_build_shared=no
6520
6521 # Report the final consequences.
6522 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6523 echo "configure:6524: checking if libtool supports shared libraries" >&5
6524 echo "$ac_t""$can_build_shared" 1>&6
6525
6526 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6527 echo "configure:6528: checking whether to build shared libraries" >&5
6528 test "$can_build_shared" = "no" && enable_shared=no
6529
6530 # On AIX, shared libraries and static libraries use the same namespace, and
6531 # are all built from PIC.
6532 case "$host_os" in
6533 aix3*)
6534   test "$enable_shared" = yes && enable_static=no
6535   if test -n "$RANLIB"; then
6536     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6537     postinstall_cmds='$RANLIB $lib'
6538   fi
6539   ;;
6540
6541 aix4*)
6542   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6543     test "$enable_shared" = yes && enable_static=no
6544   fi
6545   ;;
6546 esac
6547 echo "$ac_t""$enable_shared" 1>&6
6548
6549 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6550 echo "configure:6551: checking whether to build static libraries" >&5
6551 # Make sure either enable_shared or enable_static is yes.
6552 test "$enable_shared" = yes || enable_static=yes
6553 echo "$ac_t""$enable_static" 1>&6
6554
6555 if test "$hardcode_action" = relink; then
6556   # Fast installation is not supported
6557   enable_fast_install=no
6558 elif test "$shlibpath_overrides_runpath" = yes ||
6559      test "$enable_shared" = no; then
6560   # Fast installation is not necessary
6561   enable_fast_install=needless
6562 fi
6563
6564 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6565 if test "$GCC" = yes; then
6566   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6567 fi
6568
6569 if test "x$enable_dlopen" != xyes; then
6570   enable_dlopen=unknown
6571   enable_dlopen_self=unknown
6572   enable_dlopen_self_static=unknown
6573 else
6574   lt_cv_dlopen=no
6575   lt_cv_dlopen_libs=
6576
6577   case $host_os in
6578   beos*)
6579     lt_cv_dlopen="load_add_on"
6580     lt_cv_dlopen_libs=
6581     lt_cv_dlopen_self=yes
6582     ;;
6583
6584   cygwin* | mingw* | pw32*)
6585     lt_cv_dlopen="LoadLibrary"
6586     lt_cv_dlopen_libs=
6587    ;;
6588
6589   *)
6590     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6591 echo "configure:6592: checking for shl_load" >&5
6592 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6593   echo $ac_n "(cached) $ac_c" 1>&6
6594 else
6595   cat > conftest.$ac_ext <<EOF
6596 #line 6597 "configure"
6597 #include "confdefs.h"
6598 /* System header to define __stub macros and hopefully few prototypes,
6599     which can conflict with char shl_load(); below.  */
6600 #include <assert.h>
6601 /* Override any gcc2 internal prototype to avoid an error.  */
6602 /* We use char because int might match the return type of a gcc2
6603     builtin and then its argument prototype would still apply.  */
6604 char shl_load();
6605 char (*f)();
6606
6607 int main() {
6608
6609 /* The GNU C library defines this for functions which it implements
6610     to always fail with ENOSYS.  Some functions are actually named
6611     something starting with __ and the normal name is an alias.  */
6612 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6613 choke me
6614 #else
6615 f = shl_load;
6616 #endif
6617
6618 ; return 0; }
6619 EOF
6620 if { (eval echo configure:6621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6621   rm -rf conftest*
6622   eval "ac_cv_func_shl_load=yes"
6623 else
6624   echo "configure: failed program was:" >&5
6625   cat conftest.$ac_ext >&5
6626   rm -rf conftest*
6627   eval "ac_cv_func_shl_load=no"
6628 fi
6629 rm -f conftest*
6630 fi
6631
6632 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6633   echo "$ac_t""yes" 1>&6
6634   lt_cv_dlopen="shl_load"
6635 else
6636   echo "$ac_t""no" 1>&6
6637 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6638 echo "configure:6639: checking for shl_load in -ldld" >&5
6639 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6640 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6641   echo $ac_n "(cached) $ac_c" 1>&6
6642 else
6643   ac_save_LIBS="$LIBS"
6644 LIBS="-ldld  $LIBS"
6645 cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648 /* Override any gcc2 internal prototype to avoid an error.  */
6649 /* We use char because int might match the return type of a gcc2
6650     builtin and then its argument prototype would still apply.  */
6651 char shl_load();
6652
6653 int main() {
6654 shl_load()
6655 ; return 0; }
6656 EOF
6657 if { (eval echo configure:6658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6658   rm -rf conftest*
6659   eval "ac_cv_lib_$ac_lib_var=yes"
6660 else
6661   echo "configure: failed program was:" >&5
6662   cat conftest.$ac_ext >&5
6663   rm -rf conftest*
6664   eval "ac_cv_lib_$ac_lib_var=no"
6665 fi
6666 rm -f conftest*
6667 LIBS="$ac_save_LIBS"
6668
6669 fi
6670 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6671   echo "$ac_t""yes" 1>&6
6672   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6673 else
6674   echo "$ac_t""no" 1>&6
6675 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6676 echo "configure:6677: checking for dlopen" >&5
6677 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6678   echo $ac_n "(cached) $ac_c" 1>&6
6679 else
6680   cat > conftest.$ac_ext <<EOF
6681 #line 6682 "configure"
6682 #include "confdefs.h"
6683 /* System header to define __stub macros and hopefully few prototypes,
6684     which can conflict with char dlopen(); below.  */
6685 #include <assert.h>
6686 /* Override any gcc2 internal prototype to avoid an error.  */
6687 /* We use char because int might match the return type of a gcc2
6688     builtin and then its argument prototype would still apply.  */
6689 char dlopen();
6690 char (*f)();
6691
6692 int main() {
6693
6694 /* The GNU C library defines this for functions which it implements
6695     to always fail with ENOSYS.  Some functions are actually named
6696     something starting with __ and the normal name is an alias.  */
6697 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6698 choke me
6699 #else
6700 f = dlopen;
6701 #endif
6702
6703 ; return 0; }
6704 EOF
6705 if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6706   rm -rf conftest*
6707   eval "ac_cv_func_dlopen=yes"
6708 else
6709   echo "configure: failed program was:" >&5
6710   cat conftest.$ac_ext >&5
6711   rm -rf conftest*
6712   eval "ac_cv_func_dlopen=no"
6713 fi
6714 rm -f conftest*
6715 fi
6716
6717 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6718   echo "$ac_t""yes" 1>&6
6719   lt_cv_dlopen="dlopen"
6720 else
6721   echo "$ac_t""no" 1>&6
6722 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6723 echo "configure:6724: checking for dlopen in -ldl" >&5
6724 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6725 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6726   echo $ac_n "(cached) $ac_c" 1>&6
6727 else
6728   ac_save_LIBS="$LIBS"
6729 LIBS="-ldl  $LIBS"
6730 cat > conftest.$ac_ext <<EOF
6731 #line 6732 "configure"
6732 #include "confdefs.h"
6733 /* Override any gcc2 internal prototype to avoid an error.  */
6734 /* We use char because int might match the return type of a gcc2
6735     builtin and then its argument prototype would still apply.  */
6736 char dlopen();
6737
6738 int main() {
6739 dlopen()
6740 ; return 0; }
6741 EOF
6742 if { (eval echo configure:6743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6743   rm -rf conftest*
6744   eval "ac_cv_lib_$ac_lib_var=yes"
6745 else
6746   echo "configure: failed program was:" >&5
6747   cat conftest.$ac_ext >&5
6748   rm -rf conftest*
6749   eval "ac_cv_lib_$ac_lib_var=no"
6750 fi
6751 rm -f conftest*
6752 LIBS="$ac_save_LIBS"
6753
6754 fi
6755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6756   echo "$ac_t""yes" 1>&6
6757   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6758 else
6759   echo "$ac_t""no" 1>&6
6760 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6761 echo "configure:6762: checking for dlopen in -lsvld" >&5
6762 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6763 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6764   echo $ac_n "(cached) $ac_c" 1>&6
6765 else
6766   ac_save_LIBS="$LIBS"
6767 LIBS="-lsvld  $LIBS"
6768 cat > conftest.$ac_ext <<EOF
6769 #line 6770 "configure"
6770 #include "confdefs.h"
6771 /* Override any gcc2 internal prototype to avoid an error.  */
6772 /* We use char because int might match the return type of a gcc2
6773     builtin and then its argument prototype would still apply.  */
6774 char dlopen();
6775
6776 int main() {
6777 dlopen()
6778 ; return 0; }
6779 EOF
6780 if { (eval echo configure:6781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6781   rm -rf conftest*
6782   eval "ac_cv_lib_$ac_lib_var=yes"
6783 else
6784   echo "configure: failed program was:" >&5
6785   cat conftest.$ac_ext >&5
6786   rm -rf conftest*
6787   eval "ac_cv_lib_$ac_lib_var=no"
6788 fi
6789 rm -f conftest*
6790 LIBS="$ac_save_LIBS"
6791
6792 fi
6793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6794   echo "$ac_t""yes" 1>&6
6795   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6796 else
6797   echo "$ac_t""no" 1>&6
6798 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6799 echo "configure:6800: checking for dld_link in -ldld" >&5
6800 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6801 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6802   echo $ac_n "(cached) $ac_c" 1>&6
6803 else
6804   ac_save_LIBS="$LIBS"
6805 LIBS="-ldld  $LIBS"
6806 cat > conftest.$ac_ext <<EOF
6807 #line 6808 "configure"
6808 #include "confdefs.h"
6809 /* Override any gcc2 internal prototype to avoid an error.  */
6810 /* We use char because int might match the return type of a gcc2
6811     builtin and then its argument prototype would still apply.  */
6812 char dld_link();
6813
6814 int main() {
6815 dld_link()
6816 ; return 0; }
6817 EOF
6818 if { (eval echo configure:6819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6819   rm -rf conftest*
6820   eval "ac_cv_lib_$ac_lib_var=yes"
6821 else
6822   echo "configure: failed program was:" >&5
6823   cat conftest.$ac_ext >&5
6824   rm -rf conftest*
6825   eval "ac_cv_lib_$ac_lib_var=no"
6826 fi
6827 rm -f conftest*
6828 LIBS="$ac_save_LIBS"
6829
6830 fi
6831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6832   echo "$ac_t""yes" 1>&6
6833   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6834 else
6835   echo "$ac_t""no" 1>&6
6836 fi
6837
6838               
6839 fi
6840
6841             
6842 fi
6843
6844           
6845 fi
6846
6847         
6848 fi
6849
6850       
6851 fi
6852
6853     ;;
6854   esac
6855
6856   if test "x$lt_cv_dlopen" != xno; then
6857     enable_dlopen=yes
6858   else
6859     enable_dlopen=no
6860   fi
6861
6862   case $lt_cv_dlopen in
6863   dlopen)
6864     save_CPPFLAGS="$CPPFLAGS"
6865         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6866
6867     save_LDFLAGS="$LDFLAGS"
6868     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6869
6870     save_LIBS="$LIBS"
6871     LIBS="$lt_cv_dlopen_libs $LIBS"
6872
6873     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6874 echo "configure:6875: checking whether a program can dlopen itself" >&5
6875 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6876   echo $ac_n "(cached) $ac_c" 1>&6
6877 else
6878           if test "$cross_compiling" = yes; then :
6879   lt_cv_dlopen_self=cross
6880 else
6881     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6882   lt_status=$lt_dlunknown
6883   cat > conftest.$ac_ext <<EOF
6884 #line 6885 "configure"
6885 #include "confdefs.h"
6886
6887 #if HAVE_DLFCN_H
6888 #include <dlfcn.h>
6889 #endif
6890
6891 #include <stdio.h>
6892
6893 #ifdef RTLD_GLOBAL
6894 #  define LT_DLGLOBAL           RTLD_GLOBAL
6895 #else
6896 #  ifdef DL_GLOBAL
6897 #    define LT_DLGLOBAL         DL_GLOBAL
6898 #  else
6899 #    define LT_DLGLOBAL         0
6900 #  endif
6901 #endif
6902
6903 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6904    find out it does not work in some platform. */
6905 #ifndef LT_DLLAZY_OR_NOW
6906 #  ifdef RTLD_LAZY
6907 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6908 #  else
6909 #    ifdef DL_LAZY
6910 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6911 #    else
6912 #      ifdef RTLD_NOW
6913 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6914 #      else
6915 #        ifdef DL_NOW
6916 #          define LT_DLLAZY_OR_NOW      DL_NOW
6917 #        else
6918 #          define LT_DLLAZY_OR_NOW      0
6919 #        endif
6920 #      endif
6921 #    endif
6922 #  endif
6923 #endif
6924
6925 #ifdef __cplusplus
6926 extern "C" void exit (int);
6927 #endif
6928
6929 void fnord() { int i=42;}
6930 int main ()
6931 {
6932   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6933   int status = $lt_dlunknown;
6934
6935   if (self)
6936     {
6937       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6938       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6939       /* dlclose (self); */
6940     }
6941
6942     exit (status);
6943 }
6944 EOF
6945   if { (eval echo configure:6946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6946     (./conftest; exit; ) 2>/dev/null
6947     lt_status=$?
6948     case x$lt_status in
6949       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6950       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6951       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6952     esac
6953   else :
6954     # compilation failed
6955     lt_cv_dlopen_self=no
6956   fi
6957 fi
6958 rm -fr conftest*
6959
6960     
6961 fi
6962
6963 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6964
6965     if test "x$lt_cv_dlopen_self" = xyes; then
6966       LDFLAGS="$LDFLAGS $link_static_flag"
6967       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6968 echo "configure:6969: checking whether a statically linked program can dlopen itself" >&5
6969 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6970   echo $ac_n "(cached) $ac_c" 1>&6
6971 else
6972           if test "$cross_compiling" = yes; then :
6973   lt_cv_dlopen_self_static=cross
6974 else
6975     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6976   lt_status=$lt_dlunknown
6977   cat > conftest.$ac_ext <<EOF
6978 #line 6979 "configure"
6979 #include "confdefs.h"
6980
6981 #if HAVE_DLFCN_H
6982 #include <dlfcn.h>
6983 #endif
6984
6985 #include <stdio.h>
6986
6987 #ifdef RTLD_GLOBAL
6988 #  define LT_DLGLOBAL           RTLD_GLOBAL
6989 #else
6990 #  ifdef DL_GLOBAL
6991 #    define LT_DLGLOBAL         DL_GLOBAL
6992 #  else
6993 #    define LT_DLGLOBAL         0
6994 #  endif
6995 #endif
6996
6997 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6998    find out it does not work in some platform. */
6999 #ifndef LT_DLLAZY_OR_NOW
7000 #  ifdef RTLD_LAZY
7001 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7002 #  else
7003 #    ifdef DL_LAZY
7004 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7005 #    else
7006 #      ifdef RTLD_NOW
7007 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7008 #      else
7009 #        ifdef DL_NOW
7010 #          define LT_DLLAZY_OR_NOW      DL_NOW
7011 #        else
7012 #          define LT_DLLAZY_OR_NOW      0
7013 #        endif
7014 #      endif
7015 #    endif
7016 #  endif
7017 #endif
7018
7019 #ifdef __cplusplus
7020 extern "C" void exit (int);
7021 #endif
7022
7023 void fnord() { int i=42;}
7024 int main ()
7025 {
7026   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7027   int status = $lt_dlunknown;
7028
7029   if (self)
7030     {
7031       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7032       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7033       /* dlclose (self); */
7034     }
7035
7036     exit (status);
7037 }
7038 EOF
7039   if { (eval echo configure:7040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7040     (./conftest; exit; ) 2>/dev/null
7041     lt_status=$?
7042     case x$lt_status in
7043       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7044       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7045       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7046     esac
7047   else :
7048     # compilation failed
7049     lt_cv_dlopen_self_static=no
7050   fi
7051 fi
7052 rm -fr conftest*
7053
7054       
7055 fi
7056
7057 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7058     fi
7059
7060     CPPFLAGS="$save_CPPFLAGS"
7061     LDFLAGS="$save_LDFLAGS"
7062     LIBS="$save_LIBS"
7063     ;;
7064   esac
7065
7066   case $lt_cv_dlopen_self in
7067   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7068   *) enable_dlopen_self=unknown ;;
7069   esac
7070
7071   case $lt_cv_dlopen_self_static in
7072   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7073   *) enable_dlopen_self_static=unknown ;;
7074   esac
7075 fi
7076
7077
7078 if test "$enable_shared" = yes && test "$GCC" = yes; then
7079   case $archive_cmds in
7080   *'~'*)
7081     # FIXME: we may have to deal with multi-command sequences.
7082     ;;
7083   '$CC '*)
7084     # Test whether the compiler implicitly links with -lc since on some
7085     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7086     # to ld, don't add -lc before -lgcc.
7087     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7088 echo "configure:7089: checking whether -lc should be explicitly linked in" >&5
7089     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7090   echo $ac_n "(cached) $ac_c" 1>&6
7091 else
7092   $rm conftest*
7093     echo 'static int dummy;' > conftest.$ac_ext
7094
7095     if { (eval echo configure:7096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7096       soname=conftest
7097       lib=conftest
7098       libobjs=conftest.$ac_objext
7099       deplibs=
7100       wl=$lt_cv_prog_cc_wl
7101       compiler_flags=-v
7102       linker_flags=-v
7103       verstring=
7104       output_objdir=.
7105       libname=conftest
7106       save_allow_undefined_flag=$allow_undefined_flag
7107       allow_undefined_flag=
7108       if { (eval echo configure:7109: \"$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; }
7109       then
7110         lt_cv_archive_cmds_need_lc=no
7111       else
7112         lt_cv_archive_cmds_need_lc=yes
7113       fi
7114       allow_undefined_flag=$save_allow_undefined_flag
7115     else
7116       cat conftest.err 1>&5
7117     fi
7118 fi
7119
7120     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7121     ;;
7122   esac
7123 fi
7124 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7125
7126 # The second clause should only fire when bootstrapping the
7127 # libtool distribution, otherwise you forgot to ship ltmain.sh
7128 # with your package, and you will get complaints that there are
7129 # no rules to generate ltmain.sh.
7130 if test -f "$ltmain"; then
7131   :
7132 else
7133   # If there is no Makefile yet, we rely on a make rule to execute
7134   # `config.status --recheck' to rerun these tests and create the
7135   # libtool script then.
7136   test -f Makefile && make "$ltmain"
7137 fi
7138
7139 if test -f "$ltmain"; then
7140   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7141   $rm -f "${ofile}T"
7142
7143   echo creating $ofile
7144
7145   # Now quote all the things that may contain metacharacters while being
7146   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7147   # variables and quote the copies for generation of the libtool script.
7148   for var in echo old_CC old_CFLAGS \
7149     AR AR_FLAGS CC LD LN_S NM SHELL \
7150     reload_flag reload_cmds wl \
7151     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7152     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7153     library_names_spec soname_spec \
7154     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7155     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7156     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7157     old_striplib striplib file_magic_cmd export_symbols_cmds \
7158     deplibs_check_method allow_undefined_flag no_undefined_flag \
7159     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7160     global_symbol_to_c_name_address \
7161     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7162     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7163     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7164
7165     case $var in
7166     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7167     old_postinstall_cmds | old_postuninstall_cmds | \
7168     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7169     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7170     postinstall_cmds | postuninstall_cmds | \
7171     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7172       # Double-quote double-evaled strings.
7173       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7174       ;;
7175     *)
7176       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7177       ;;
7178     esac
7179   done
7180
7181   cat <<__EOF__ > "${ofile}T"
7182 #! $SHELL
7183
7184 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7185 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7186 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7187 #
7188 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7189 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7190 #
7191 # This program is free software; you can redistribute it and/or modify
7192 # it under the terms of the GNU General Public License as published by
7193 # the Free Software Foundation; either version 2 of the License, or
7194 # (at your option) any later version.
7195 #
7196 # This program is distributed in the hope that it will be useful, but
7197 # WITHOUT ANY WARRANTY; without even the implied warranty of
7198 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7199 # General Public License for more details.
7200 #
7201 # You should have received a copy of the GNU General Public License
7202 # along with this program; if not, write to the Free Software
7203 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7204 #
7205 # As a special exception to the GNU General Public License, if you
7206 # distribute this file as part of a program that contains a
7207 # configuration script generated by Autoconf, you may include it under
7208 # the same distribution terms that you use for the rest of that program.
7209
7210 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7211 Xsed="sed -e s/^X//"
7212
7213 # The HP-UX ksh and POSIX shell print the target directory to stdout
7214 # if CDPATH is set.
7215 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7216
7217 # ### BEGIN LIBTOOL CONFIG
7218
7219 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7220
7221 # Shell to use when invoking shell scripts.
7222 SHELL=$lt_SHELL
7223
7224 # Whether or not to build shared libraries.
7225 build_libtool_libs=$enable_shared
7226
7227 # Whether or not to build static libraries.
7228 build_old_libs=$enable_static
7229
7230 # Whether or not to add -lc for building shared libraries.
7231 build_libtool_need_lc=$need_lc
7232
7233 # Whether or not to optimize for fast installation.
7234 fast_install=$enable_fast_install
7235
7236 # The host system.
7237 host_alias=$host_alias
7238 host=$host
7239
7240 # An echo program that does not interpret backslashes.
7241 echo=$lt_echo
7242
7243 # The archiver.
7244 AR=$lt_AR
7245 AR_FLAGS=$lt_AR_FLAGS
7246
7247 # The default C compiler.
7248 CC=$lt_CC
7249
7250 # Is the compiler the GNU C compiler?
7251 with_gcc=$GCC
7252
7253 # The linker used to build libraries.
7254 LD=$lt_LD
7255
7256 # Whether we need hard or soft links.
7257 LN_S=$lt_LN_S
7258
7259 # A BSD-compatible nm program.
7260 NM=$lt_NM
7261
7262 # A symbol stripping program
7263 STRIP=$STRIP
7264
7265 # Used to examine libraries when file_magic_cmd begins "file"
7266 MAGIC_CMD=$MAGIC_CMD
7267
7268 # Used on cygwin: DLL creation program.
7269 DLLTOOL="$DLLTOOL"
7270
7271 # Used on cygwin: object dumper.
7272 OBJDUMP="$OBJDUMP"
7273
7274 # Used on cygwin: assembler.
7275 AS="$AS"
7276
7277 # The name of the directory that contains temporary libtool files.
7278 objdir=$objdir
7279
7280 # How to create reloadable object files.
7281 reload_flag=$lt_reload_flag
7282 reload_cmds=$lt_reload_cmds
7283
7284 # How to pass a linker flag through the compiler.
7285 wl=$lt_wl
7286
7287 # Object file suffix (normally "o").
7288 objext="$ac_objext"
7289
7290 # Old archive suffix (normally "a").
7291 libext="$libext"
7292
7293 # Executable file suffix (normally "").
7294 exeext="$exeext"
7295
7296 # Additional compiler flags for building library objects.
7297 pic_flag=$lt_pic_flag
7298 pic_mode=$pic_mode
7299
7300 # Does compiler simultaneously support -c and -o options?
7301 compiler_c_o=$lt_compiler_c_o
7302
7303 # Can we write directly to a .lo ?
7304 compiler_o_lo=$lt_compiler_o_lo
7305
7306 # Must we lock files when doing compilation ?
7307 need_locks=$lt_need_locks
7308
7309 # Do we need the lib prefix for modules?
7310 need_lib_prefix=$need_lib_prefix
7311
7312 # Do we need a version for libraries?
7313 need_version=$need_version
7314
7315 # Whether dlopen is supported.
7316 dlopen_support=$enable_dlopen
7317
7318 # Whether dlopen of programs is supported.
7319 dlopen_self=$enable_dlopen_self
7320
7321 # Whether dlopen of statically linked programs is supported.
7322 dlopen_self_static=$enable_dlopen_self_static
7323
7324 # Compiler flag to prevent dynamic linking.
7325 link_static_flag=$lt_link_static_flag
7326
7327 # Compiler flag to turn off builtin functions.
7328 no_builtin_flag=$lt_no_builtin_flag
7329
7330 # Compiler flag to allow reflexive dlopens.
7331 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7332
7333 # Compiler flag to generate shared objects directly from archives.
7334 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7335
7336 # Compiler flag to generate thread-safe objects.
7337 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7338
7339 # Library versioning type.
7340 version_type=$version_type
7341
7342 # Format of library name prefix.
7343 libname_spec=$lt_libname_spec
7344
7345 # List of archive names.  First name is the real one, the rest are links.
7346 # The last name is the one that the linker finds with -lNAME.
7347 library_names_spec=$lt_library_names_spec
7348
7349 # The coded name of the library, if different from the real name.
7350 soname_spec=$lt_soname_spec
7351
7352 # Commands used to build and install an old-style archive.
7353 RANLIB=$lt_RANLIB
7354 old_archive_cmds=$lt_old_archive_cmds
7355 old_postinstall_cmds=$lt_old_postinstall_cmds
7356 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7357
7358 # Create an old-style archive from a shared archive.
7359 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7360
7361 # Create a temporary old-style archive to link instead of a shared archive.
7362 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7363
7364 # Commands used to build and install a shared archive.
7365 archive_cmds=$lt_archive_cmds
7366 archive_expsym_cmds=$lt_archive_expsym_cmds
7367 postinstall_cmds=$lt_postinstall_cmds
7368 postuninstall_cmds=$lt_postuninstall_cmds
7369
7370 # Commands to strip libraries.
7371 old_striplib=$lt_old_striplib
7372 striplib=$lt_striplib
7373
7374 # Method to check whether dependent libraries are shared objects.
7375 deplibs_check_method=$lt_deplibs_check_method
7376
7377 # Command to use when deplibs_check_method == file_magic.
7378 file_magic_cmd=$lt_file_magic_cmd
7379
7380 # Flag that allows shared libraries with undefined symbols to be built.
7381 allow_undefined_flag=$lt_allow_undefined_flag
7382
7383 # Flag that forces no undefined symbols.
7384 no_undefined_flag=$lt_no_undefined_flag
7385
7386 # Commands used to finish a libtool library installation in a directory.
7387 finish_cmds=$lt_finish_cmds
7388
7389 # Same as above, but a single script fragment to be evaled but not shown.
7390 finish_eval=$lt_finish_eval
7391
7392 # Take the output of nm and produce a listing of raw symbols and C names.
7393 global_symbol_pipe=$lt_global_symbol_pipe
7394
7395 # Transform the output of nm in a proper C declaration
7396 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7397
7398 # Transform the output of nm in a C name address pair
7399 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7400
7401 # This is the shared library runtime path variable.
7402 runpath_var=$runpath_var
7403
7404 # This is the shared library path variable.
7405 shlibpath_var=$shlibpath_var
7406
7407 # Is shlibpath searched before the hard-coded library search path?
7408 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7409
7410 # How to hardcode a shared library path into an executable.
7411 hardcode_action=$hardcode_action
7412
7413 # Whether we should hardcode library paths into libraries.
7414 hardcode_into_libs=$hardcode_into_libs
7415
7416 # Flag to hardcode \$libdir into a binary during linking.
7417 # This must work even if \$libdir does not exist.
7418 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7419
7420 # Whether we need a single -rpath flag with a separated argument.
7421 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7422
7423 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7424 # resulting binary.
7425 hardcode_direct=$hardcode_direct
7426
7427 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7428 # resulting binary.
7429 hardcode_minus_L=$hardcode_minus_L
7430
7431 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7432 # the resulting binary.
7433 hardcode_shlibpath_var=$hardcode_shlibpath_var
7434
7435 # Variables whose values should be saved in libtool wrapper scripts and
7436 # restored at relink time.
7437 variables_saved_for_relink="$variables_saved_for_relink"
7438
7439 # Whether libtool must link a program against all its dependency libraries.
7440 link_all_deplibs=$link_all_deplibs
7441
7442 # Compile-time system search path for libraries
7443 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7444
7445 # Run-time system search path for libraries
7446 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7447
7448 # Fix the shell variable \$srcfile for the compiler.
7449 fix_srcfile_path="$fix_srcfile_path"
7450
7451 # Set to yes if exported symbols are required.
7452 always_export_symbols=$always_export_symbols
7453
7454 # The commands to list exported symbols.
7455 export_symbols_cmds=$lt_export_symbols_cmds
7456
7457 # The commands to extract the exported symbol list from a shared archive.
7458 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7459
7460 # Symbols that should not be listed in the preloaded symbols.
7461 exclude_expsyms=$lt_exclude_expsyms
7462
7463 # Symbols that must always be exported.
7464 include_expsyms=$lt_include_expsyms
7465
7466 # ### END LIBTOOL CONFIG
7467
7468 __EOF__
7469
7470   case $host_os in
7471   aix3*)
7472     cat <<\EOF >> "${ofile}T"
7473
7474 # AIX sometimes has problems with the GCC collect2 program.  For some
7475 # reason, if we set the COLLECT_NAMES environment variable, the problems
7476 # vanish in a puff of smoke.
7477 if test "X${COLLECT_NAMES+set}" != Xset; then
7478   COLLECT_NAMES=
7479   export COLLECT_NAMES
7480 fi
7481 EOF
7482     ;;
7483   esac
7484
7485   case $host_os in
7486   cygwin* | mingw* | pw32* | os2*)
7487     cat <<'EOF' >> "${ofile}T"
7488       # This is a source program that is used to create dlls on Windows
7489       # Don't remove nor modify the starting and closing comments
7490 # /* ltdll.c starts here */
7491 # #define WIN32_LEAN_AND_MEAN
7492 # #include <windows.h>
7493 # #undef WIN32_LEAN_AND_MEAN
7494 # #include <stdio.h>
7495 #
7496 # #ifndef __CYGWIN__
7497 # #  ifdef __CYGWIN32__
7498 # #    define __CYGWIN__ __CYGWIN32__
7499 # #  endif
7500 # #endif
7501 #
7502 # #ifdef __cplusplus
7503 # extern "C" {
7504 # #endif
7505 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7506 # #ifdef __cplusplus
7507 # }
7508 # #endif
7509 #
7510 # #ifdef __CYGWIN__
7511 # #include <cygwin/cygwin_dll.h>
7512 # DECLARE_CYGWIN_DLL( DllMain );
7513 # #endif
7514 # HINSTANCE __hDllInstance_base;
7515 #
7516 # BOOL APIENTRY
7517 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7518 # {
7519 #   __hDllInstance_base = hInst;
7520 #   return TRUE;
7521 # }
7522 # /* ltdll.c ends here */
7523         # This is a source program that is used to create import libraries
7524         # on Windows for dlls which lack them. Don't remove nor modify the
7525         # starting and closing comments
7526 # /* impgen.c starts here */
7527 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7528 #
7529 #  This file is part of GNU libtool.
7530 #
7531 #  This program is free software; you can redistribute it and/or modify
7532 #  it under the terms of the GNU General Public License as published by
7533 #  the Free Software Foundation; either version 2 of the License, or
7534 #  (at your option) any later version.
7535 #
7536 #  This program is distributed in the hope that it will be useful,
7537 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7538 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7539 #  GNU General Public License for more details.
7540 #
7541 #  You should have received a copy of the GNU General Public License
7542 #  along with this program; if not, write to the Free Software
7543 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7544 #  */
7545 #
7546 # #include <stdio.h>            /* for printf() */
7547 # #include <unistd.h>           /* for open(), lseek(), read() */
7548 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7549 # #include <string.h>           /* for strdup() */
7550 #
7551 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7552 # #ifndef O_BINARY
7553 # #define O_BINARY 0
7554 # #endif
7555 #
7556 # static unsigned int
7557 # pe_get16 (fd, offset)
7558 #      int fd;
7559 #      int offset;
7560 # {
7561 #   unsigned char b[2];
7562 #   lseek (fd, offset, SEEK_SET);
7563 #   read (fd, b, 2);
7564 #   return b[0] + (b[1]<<8);
7565 # }
7566 #
7567 # static unsigned int
7568 # pe_get32 (fd, offset)
7569 #     int fd;
7570 #     int offset;
7571 # {
7572 #   unsigned char b[4];
7573 #   lseek (fd, offset, SEEK_SET);
7574 #   read (fd, b, 4);
7575 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7576 # }
7577 #
7578 # static unsigned int
7579 # pe_as32 (ptr)
7580 #      void *ptr;
7581 # {
7582 #   unsigned char *b = ptr;
7583 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7584 # }
7585 #
7586 # int
7587 # main (argc, argv)
7588 #     int argc;
7589 #     char *argv[];
7590 # {
7591 #     int dll;
7592 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7593 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7594 #     unsigned long name_rvas, nexp;
7595 #     unsigned char *expdata, *erva;
7596 #     char *filename, *dll_name;
7597 #
7598 #     filename = argv[1];
7599 #
7600 #     dll = open(filename, O_RDONLY|O_BINARY);
7601 #     if (dll < 1)
7602 #       return 1;
7603 #
7604 #     dll_name = filename;
7605 #
7606 #     for (i=0; filename[i]; i++)
7607 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7608 #           dll_name = filename + i +1;
7609 #
7610 #     pe_header_offset = pe_get32 (dll, 0x3c);
7611 #     opthdr_ofs = pe_header_offset + 4 + 20;
7612 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7613 #
7614 #     if (num_entries < 1) /* no exports */
7615 #       return 1;
7616 #
7617 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7618 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7619 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7620 #     secptr = (pe_header_offset + 4 + 20 +
7621 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7622 #
7623 #     expptr = 0;
7624 #     for (i = 0; i < nsections; i++)
7625 #     {
7626 #       char sname[8];
7627 #       unsigned long secptr1 = secptr + 40 * i;
7628 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7629 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7630 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7631 #       lseek(dll, secptr1, SEEK_SET);
7632 #       read(dll, sname, 8);
7633 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7634 #       {
7635 #           expptr = fptr + (export_rva - vaddr);
7636 #           if (export_rva + export_size > vaddr + vsize)
7637 #               export_size = vsize - (export_rva - vaddr);
7638 #           break;
7639 #       }
7640 #     }
7641 #
7642 #     expdata = (unsigned char*)malloc(export_size);
7643 #     lseek (dll, expptr, SEEK_SET);
7644 #     read (dll, expdata, export_size);
7645 #     erva = expdata - export_rva;
7646 #
7647 #     nexp = pe_as32 (expdata+24);
7648 #     name_rvas = pe_as32 (expdata+32);
7649 #
7650 #     printf ("EXPORTS\n");
7651 #     for (i = 0; i<nexp; i++)
7652 #     {
7653 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7654 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7655 #     }
7656 #
7657 #     return 0;
7658 # }
7659 # /* impgen.c ends here */
7660
7661 EOF
7662     ;;
7663   esac
7664
7665   # We use sed instead of cat because bash on DJGPP gets confused if
7666   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7667   # text mode, it properly converts lines to CR/LF.  This bash problem
7668   # is reportedly fixed, but why not run on old versions too?
7669   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7670
7671   mv -f "${ofile}T" "$ofile" || \
7672     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7673   chmod +x "$ofile"
7674 fi
7675
7676
7677
7678
7679
7680 # This can be used to rebuild libtool when needed
7681 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7682
7683 # Always use our own libtool.
7684 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7685
7686 # Prevent multiple expansion
7687
7688
7689
7690 for ac_prog in mawk gawk nawk awk
7691 do
7692 # Extract the first word of "$ac_prog", so it can be a program name with args.
7693 set dummy $ac_prog; ac_word=$2
7694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7695 echo "configure:7696: checking for $ac_word" >&5
7696 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7697   echo $ac_n "(cached) $ac_c" 1>&6
7698 else
7699   if test -n "$AWK"; then
7700   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7701 else
7702   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7703   ac_dummy="$PATH"
7704   for ac_dir in $ac_dummy; do
7705     test -z "$ac_dir" && ac_dir=.
7706     if test -f $ac_dir/$ac_word; then
7707       ac_cv_prog_AWK="$ac_prog"
7708       break
7709     fi
7710   done
7711   IFS="$ac_save_ifs"
7712 fi
7713 fi
7714 AWK="$ac_cv_prog_AWK"
7715 if test -n "$AWK"; then
7716   echo "$ac_t""$AWK" 1>&6
7717 else
7718   echo "$ac_t""no" 1>&6
7719 fi
7720
7721 test -n "$AWK" && break
7722 done
7723
7724 # test for ln hardlink support
7725 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7726 echo "configure:7727: checking whether ln works" >&5
7727 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7728   echo $ac_n "(cached) $ac_c" 1>&6
7729 else
7730   rm -f conftest.src conftest.dst
7731 echo "conftest" > conftest.src
7732 if ln conftest.src conftest.dst 2>/dev/null
7733 then
7734   ol_cv_prog_LN_H="ln"
7735 else
7736   ol_cv_prog_LN_H="cp"
7737 fi
7738 rm -f conftest.src conftest.dst
7739
7740 fi
7741 LN_H="$ol_cv_prog_LN_H"
7742 if test "$ol_cv_prog_LN_H" = "ln"; then
7743         echo "$ac_t""yes" 1>&6
7744 else
7745         echo "$ac_t""no" 1>&6
7746 fi
7747
7748 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7749 echo "configure:7750: checking whether ln -s works" >&5
7750 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7751   echo $ac_n "(cached) $ac_c" 1>&6
7752 else
7753   rm -f conftestdata
7754 if ln -s X conftestdata 2>/dev/null
7755 then
7756   rm -f conftestdata
7757   ac_cv_prog_LN_S="ln -s"
7758 else
7759   ac_cv_prog_LN_S=ln
7760 fi
7761 fi
7762 LN_S="$ac_cv_prog_LN_S"
7763 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7764   echo "$ac_t""yes" 1>&6
7765 else
7766   echo "$ac_t""no" 1>&6
7767 fi
7768
7769
7770 # Extract the first word of "sendmail", so it can be a program name with args.
7771 set dummy sendmail; ac_word=$2
7772 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7773 echo "configure:7774: checking for $ac_word" >&5
7774 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7775   echo $ac_n "(cached) $ac_c" 1>&6
7776 else
7777   case "$SENDMAIL" in
7778   /*)
7779   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7780   ;;
7781   ?:/*)
7782   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7783   ;;
7784   *)
7785   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7786   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7787   for ac_dir in $ac_dummy; do 
7788     test -z "$ac_dir" && ac_dir=.
7789     if test -f $ac_dir/$ac_word; then
7790       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7791       break
7792     fi
7793   done
7794   IFS="$ac_save_ifs"
7795   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7796   ;;
7797 esac
7798 fi
7799 SENDMAIL="$ac_cv_path_SENDMAIL"
7800 if test -n "$SENDMAIL"; then
7801   echo "$ac_t""$SENDMAIL" 1>&6
7802 else
7803   echo "$ac_t""no" 1>&6
7804 fi
7805
7806 # Extract the first word of "vi", so it can be a program name with args.
7807 set dummy vi; ac_word=$2
7808 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7809 echo "configure:7810: checking for $ac_word" >&5
7810 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7811   echo $ac_n "(cached) $ac_c" 1>&6
7812 else
7813   case "$EDITOR" in
7814   /*)
7815   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7816   ;;
7817   ?:/*)
7818   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7819   ;;
7820   *)
7821   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7822   ac_dummy="$PATH:/usr/ucb"
7823   for ac_dir in $ac_dummy; do 
7824     test -z "$ac_dir" && ac_dir=.
7825     if test -f $ac_dir/$ac_word; then
7826       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7827       break
7828     fi
7829   done
7830   IFS="$ac_save_ifs"
7831   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7832   ;;
7833 esac
7834 fi
7835 EDITOR="$ac_cv_path_EDITOR"
7836 if test -n "$EDITOR"; then
7837   echo "$ac_t""$EDITOR" 1>&6
7838 else
7839   echo "$ac_t""no" 1>&6
7840 fi
7841
7842
7843 ol_link_perl=no
7844 if test $ol_enable_perl != no ; then
7845         # Extract the first word of "perl", so it can be a program name with args.
7846 set dummy perl; ac_word=$2
7847 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7848 echo "configure:7849: checking for $ac_word" >&5
7849 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7850   echo $ac_n "(cached) $ac_c" 1>&6
7851 else
7852   case "$PERLBIN" in
7853   /*)
7854   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7855   ;;
7856   ?:/*)
7857   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7858   ;;
7859   *)
7860   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7861   ac_dummy="$PATH"
7862   for ac_dir in $ac_dummy; do 
7863     test -z "$ac_dir" && ac_dir=.
7864     if test -f $ac_dir/$ac_word; then
7865       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7866       break
7867     fi
7868   done
7869   IFS="$ac_save_ifs"
7870   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7871   ;;
7872 esac
7873 fi
7874 PERLBIN="$ac_cv_path_PERLBIN"
7875 if test -n "$PERLBIN"; then
7876   echo "$ac_t""$PERLBIN" 1>&6
7877 else
7878   echo "$ac_t""no" 1>&6
7879 fi
7880
7881
7882         if test "no$PERLBIN" = "no" ; then
7883                 if test $ol_enable_perl = yes ; then
7884                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7885                 fi
7886
7887         else
7888                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7889                 if test x"$ol_with_perl_module" = "xstatic" ; then
7890                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7891                 else
7892                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7893                 fi
7894                                 ol_link_perl=yes
7895         fi
7896 fi
7897
7898 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7899 echo "configure:7900: checking how to run the C preprocessor" >&5
7900 # On Suns, sometimes $CPP names a directory.
7901 if test -n "$CPP" && test -d "$CPP"; then
7902   CPP=
7903 fi
7904 if test -z "$CPP"; then
7905 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7906   echo $ac_n "(cached) $ac_c" 1>&6
7907 else
7908     # This must be in double quotes, not single quotes, because CPP may get
7909   # substituted into the Makefile and "${CC-cc}" will confuse make.
7910   CPP="${CC-cc} -E"
7911   # On the NeXT, cc -E runs the code through the compiler's parser,
7912   # not just through cpp.
7913   cat > conftest.$ac_ext <<EOF
7914 #line 7915 "configure"
7915 #include "confdefs.h"
7916 #include <assert.h>
7917 Syntax Error
7918 EOF
7919 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7920 { (eval echo configure:7921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7921 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7922 if test -z "$ac_err"; then
7923   :
7924 else
7925   echo "$ac_err" >&5
7926   echo "configure: failed program was:" >&5
7927   cat conftest.$ac_ext >&5
7928   rm -rf conftest*
7929   CPP="${CC-cc} -E -traditional-cpp"
7930   cat > conftest.$ac_ext <<EOF
7931 #line 7932 "configure"
7932 #include "confdefs.h"
7933 #include <assert.h>
7934 Syntax Error
7935 EOF
7936 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7937 { (eval echo configure:7938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7938 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7939 if test -z "$ac_err"; then
7940   :
7941 else
7942   echo "$ac_err" >&5
7943   echo "configure: failed program was:" >&5
7944   cat conftest.$ac_ext >&5
7945   rm -rf conftest*
7946   CPP="${CC-cc} -nologo -E"
7947   cat > conftest.$ac_ext <<EOF
7948 #line 7949 "configure"
7949 #include "confdefs.h"
7950 #include <assert.h>
7951 Syntax Error
7952 EOF
7953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7954 { (eval echo configure:7955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7956 if test -z "$ac_err"; then
7957   :
7958 else
7959   echo "$ac_err" >&5
7960   echo "configure: failed program was:" >&5
7961   cat conftest.$ac_ext >&5
7962   rm -rf conftest*
7963   CPP=/lib/cpp
7964 fi
7965 rm -f conftest*
7966 fi
7967 rm -f conftest*
7968 fi
7969 rm -f conftest*
7970   ac_cv_prog_CPP="$CPP"
7971 fi
7972   CPP="$ac_cv_prog_CPP"
7973 else
7974   ac_cv_prog_CPP="$CPP"
7975 fi
7976 echo "$ac_t""$CPP" 1>&6
7977
7978
7979 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7980         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7981
7982 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7983         echo "configure: warning: programs compiled here do run here..." 1>&2
7984         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7985
7986 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7987         echo "configure: warning: programs compiled here do not run here..." 1>&2
7988         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7989 fi
7990
7991
7992 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7993 echo "configure:7994: checking for Cygwin environment" >&5
7994 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7995   echo $ac_n "(cached) $ac_c" 1>&6
7996 else
7997   cat > conftest.$ac_ext <<EOF
7998 #line 7999 "configure"
7999 #include "confdefs.h"
8000
8001 int main() {
8002
8003 #ifndef __CYGWIN__
8004 #define __CYGWIN__ __CYGWIN32__
8005 #endif
8006 return __CYGWIN__;
8007 ; return 0; }
8008 EOF
8009 if { (eval echo configure:8010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8010   rm -rf conftest*
8011   ac_cv_cygwin=yes
8012 else
8013   echo "configure: failed program was:" >&5
8014   cat conftest.$ac_ext >&5
8015   rm -rf conftest*
8016   ac_cv_cygwin=no
8017 fi
8018 rm -f conftest*
8019 fi
8020
8021 echo "$ac_t""$ac_cv_cygwin" 1>&6
8022 CYGWIN=
8023 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8024 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8025 echo "configure:8026: checking for mingw32 environment" >&5
8026 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8027   echo $ac_n "(cached) $ac_c" 1>&6
8028 else
8029   cat > conftest.$ac_ext <<EOF
8030 #line 8031 "configure"
8031 #include "confdefs.h"
8032
8033 int main() {
8034 return __MINGW32__;
8035 ; return 0; }
8036 EOF
8037 if { (eval echo configure:8038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8038   rm -rf conftest*
8039   ac_cv_mingw32=yes
8040 else
8041   echo "configure: failed program was:" >&5
8042   cat conftest.$ac_ext >&5
8043   rm -rf conftest*
8044   ac_cv_mingw32=no
8045 fi
8046 rm -f conftest*
8047 fi
8048
8049 echo "$ac_t""$ac_cv_mingw32" 1>&6
8050 MINGW32=
8051 test "$ac_cv_mingw32" = yes && MINGW32=yes
8052
8053
8054
8055 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8056 echo "configure:8057: checking for executable suffix" >&5
8057 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8058   echo $ac_n "(cached) $ac_c" 1>&6
8059 else
8060   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8061   ac_cv_exeext=.exe
8062 else
8063   rm -f conftest*
8064   echo 'int main () { return 0; }' > conftest.$ac_ext
8065   ac_cv_exeext=
8066   if { (eval echo configure:8067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8067     for file in conftest.*; do
8068       case $file in
8069       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8070       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8071       esac
8072     done
8073   else
8074     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8075   fi
8076   rm -f conftest*
8077   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8078 fi
8079 fi
8080
8081 EXEEXT=""
8082 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8083 echo "$ac_t""${ac_cv_exeext}" 1>&6
8084 ac_exeext=$EXEEXT
8085
8086 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8087 echo "configure:8088: checking for object suffix" >&5
8088 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8089   echo $ac_n "(cached) $ac_c" 1>&6
8090 else
8091   rm -f conftest*
8092 echo 'int i = 1;' > conftest.$ac_ext
8093 if { (eval echo configure:8094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8094   for ac_file in conftest.*; do
8095     case $ac_file in
8096     *.c) ;;
8097     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8098     esac
8099   done
8100 else
8101   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8102 fi
8103 rm -f conftest*
8104 fi
8105
8106 echo "$ac_t""$ac_cv_objext" 1>&6
8107 OBJEXT=$ac_cv_objext
8108 ac_objext=$ac_cv_objext
8109
8110
8111 cat >> confdefs.h <<EOF
8112 #define EXEEXT "${EXEEXT}"
8113 EOF
8114
8115
8116 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8117 echo "configure:8118: checking for be_app in -lbe" >&5
8118 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8120   echo $ac_n "(cached) $ac_c" 1>&6
8121 else
8122   ac_save_LIBS="$LIBS"
8123 LIBS="-lbe -lroot -lnet $LIBS"
8124 cat > conftest.$ac_ext <<EOF
8125 #line 8126 "configure"
8126 #include "confdefs.h"
8127 /* Override any gcc2 internal prototype to avoid an error.  */
8128 /* We use char because int might match the return type of a gcc2
8129     builtin and then its argument prototype would still apply.  */
8130 char be_app();
8131
8132 int main() {
8133 be_app()
8134 ; return 0; }
8135 EOF
8136 if { (eval echo configure:8137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8137   rm -rf conftest*
8138   eval "ac_cv_lib_$ac_lib_var=yes"
8139 else
8140   echo "configure: failed program was:" >&5
8141   cat conftest.$ac_ext >&5
8142   rm -rf conftest*
8143   eval "ac_cv_lib_$ac_lib_var=no"
8144 fi
8145 rm -f conftest*
8146 LIBS="$ac_save_LIBS"
8147
8148 fi
8149 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8150   echo "$ac_t""yes" 1>&6
8151   LIBS="$LIBS -lbe -lroot -lnet"
8152 else
8153   echo "$ac_t""no" 1>&6
8154 :
8155 fi
8156
8157
8158
8159
8160
8161 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8162 echo "configure:8163: checking for ${CC-cc} option to accept ANSI C" >&5
8163 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8164   echo $ac_n "(cached) $ac_c" 1>&6
8165 else
8166   am_cv_prog_cc_stdc=no
8167 ac_save_CC="$CC"
8168 # Don't try gcc -ansi; that turns off useful extensions and
8169 # breaks some systems' header files.
8170 # AIX                   -qlanglvl=ansi
8171 # Ultrix and OSF/1      -std1
8172 # HP-UX 10.20 and later -Ae
8173 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8174 # SVR4                  -Xc -D__EXTENSIONS__
8175 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8176 do
8177   CC="$ac_save_CC $ac_arg"
8178   cat > conftest.$ac_ext <<EOF
8179 #line 8180 "configure"
8180 #include "confdefs.h"
8181 #include <stdarg.h>
8182 #include <stdio.h>
8183 #include <sys/types.h>
8184 #include <sys/stat.h>
8185 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8186 struct buf { int x; };
8187 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8188 static char *e (p, i)
8189      char **p;
8190      int i;
8191 {
8192   return p[i];
8193 }
8194 static char *f (char * (*g) (char **, int), char **p, ...)
8195 {
8196   char *s;
8197   va_list v;
8198   va_start (v,p);
8199   s = g (p, va_arg (v,int));
8200   va_end (v);
8201   return s;
8202 }
8203 int test (int i, double x);
8204 struct s1 {int (*f) (int a);};
8205 struct s2 {int (*f) (double a);};
8206 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8207 int argc;
8208 char **argv;
8209
8210 int main() {
8211
8212 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8213
8214 ; return 0; }
8215 EOF
8216 if { (eval echo configure:8217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8217   rm -rf conftest*
8218   am_cv_prog_cc_stdc="$ac_arg"; break
8219 else
8220   echo "configure: failed program was:" >&5
8221   cat conftest.$ac_ext >&5
8222 fi
8223 rm -f conftest*
8224 done
8225 CC="$ac_save_CC"
8226
8227 fi
8228
8229 if test -z "$am_cv_prog_cc_stdc"; then
8230   echo "$ac_t""none needed" 1>&6
8231 else
8232   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8233 fi
8234 case "x$am_cv_prog_cc_stdc" in
8235   x|xno) ;;
8236   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8237 esac
8238
8239 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8240         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8241 fi
8242
8243 # test for make depend flag
8244 OL_MKDEP=
8245 OL_MKDEP_FLAGS=
8246 if test -z "${MKDEP}"; then
8247         OL_MKDEP="${CC-cc}"
8248         if test -z "${MKDEP_FLAGS}"; then
8249                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8250 echo "configure:8251: checking for ${OL_MKDEP} depend flag" >&5
8251 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8252   echo $ac_n "(cached) $ac_c" 1>&6
8253 else
8254   
8255                         ol_cv_mkdep=no
8256                         for flag in "-M" "-xM"; do
8257                                 cat > conftest.c <<EOF
8258  noCode;
8259 EOF
8260                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8261                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8262                                 then
8263                                         if test ! -f conftest."${ac_object}" ; then
8264                                                 ol_cv_mkdep=$flag
8265                                                 OL_MKDEP_FLAGS="$flag"
8266                                                 break
8267                                         fi
8268                                 fi
8269                         done
8270                         rm -f conftest*
8271                 
8272 fi
8273
8274 echo "$ac_t""$ol_cv_mkdep" 1>&6
8275         else
8276                 cc_cv_mkdep=yes
8277                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8278         fi
8279 else
8280         cc_cv_mkdep=yes
8281         OL_MKDEP="${MKDEP}"
8282         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8283 fi
8284
8285
8286
8287 if test "${ol_cv_mkdep}" = no ; then
8288         # this will soon become an error
8289         echo "configure: warning: do not know how to generate dependencies" 1>&2
8290 fi
8291
8292 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8293 echo "configure:8294: checking for afopen in -ls" >&5
8294 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8295 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8296   echo $ac_n "(cached) $ac_c" 1>&6
8297 else
8298   ac_save_LIBS="$LIBS"
8299 LIBS="-ls  $LIBS"
8300 cat > conftest.$ac_ext <<EOF
8301 #line 8302 "configure"
8302 #include "confdefs.h"
8303 /* Override any gcc2 internal prototype to avoid an error.  */
8304 /* We use char because int might match the return type of a gcc2
8305     builtin and then its argument prototype would still apply.  */
8306 char afopen();
8307
8308 int main() {
8309 afopen()
8310 ; return 0; }
8311 EOF
8312 if { (eval echo configure:8313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8313   rm -rf conftest*
8314   eval "ac_cv_lib_$ac_lib_var=yes"
8315 else
8316   echo "configure: failed program was:" >&5
8317   cat conftest.$ac_ext >&5
8318   rm -rf conftest*
8319   eval "ac_cv_lib_$ac_lib_var=no"
8320 fi
8321 rm -f conftest*
8322 LIBS="$ac_save_LIBS"
8323
8324 fi
8325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8326   echo "$ac_t""yes" 1>&6
8327   
8328         AUTH_LIBS=-ls
8329         cat >> confdefs.h <<\EOF
8330 #define HAVE_AIX_SECURITY 1
8331 EOF
8332
8333
8334 else
8335   echo "$ac_t""no" 1>&6
8336 fi
8337
8338
8339
8340 ol_link_modules=no
8341 if test $ol_enable_modules != no ; then
8342         for ac_hdr in ltdl.h
8343 do
8344 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8345 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8346 echo "configure:8347: checking for $ac_hdr" >&5
8347 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8348   echo $ac_n "(cached) $ac_c" 1>&6
8349 else
8350   cat > conftest.$ac_ext <<EOF
8351 #line 8352 "configure"
8352 #include "confdefs.h"
8353 #include <$ac_hdr>
8354 EOF
8355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8356 { (eval echo configure:8357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8358 if test -z "$ac_err"; then
8359   rm -rf conftest*
8360   eval "ac_cv_header_$ac_safe=yes"
8361 else
8362   echo "$ac_err" >&5
8363   echo "configure: failed program was:" >&5
8364   cat conftest.$ac_ext >&5
8365   rm -rf conftest*
8366   eval "ac_cv_header_$ac_safe=no"
8367 fi
8368 rm -f conftest*
8369 fi
8370 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8371   echo "$ac_t""yes" 1>&6
8372     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8373   cat >> confdefs.h <<EOF
8374 #define $ac_tr_hdr 1
8375 EOF
8376  
8377 else
8378   echo "$ac_t""no" 1>&6
8379 fi
8380 done
8381
8382
8383         if test $ac_cv_header_ltdl_h = no ; then
8384                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8385         fi
8386
8387         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8388 echo "configure:8389: checking for lt_dlinit in -lltdl" >&5
8389 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8390 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8391   echo $ac_n "(cached) $ac_c" 1>&6
8392 else
8393   ac_save_LIBS="$LIBS"
8394 LIBS="-lltdl  $LIBS"
8395 cat > conftest.$ac_ext <<EOF
8396 #line 8397 "configure"
8397 #include "confdefs.h"
8398 /* Override any gcc2 internal prototype to avoid an error.  */
8399 /* We use char because int might match the return type of a gcc2
8400     builtin and then its argument prototype would still apply.  */
8401 char lt_dlinit();
8402
8403 int main() {
8404 lt_dlinit()
8405 ; return 0; }
8406 EOF
8407 if { (eval echo configure:8408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8408   rm -rf conftest*
8409   eval "ac_cv_lib_$ac_lib_var=yes"
8410 else
8411   echo "configure: failed program was:" >&5
8412   cat conftest.$ac_ext >&5
8413   rm -rf conftest*
8414   eval "ac_cv_lib_$ac_lib_var=no"
8415 fi
8416 rm -f conftest*
8417 LIBS="$ac_save_LIBS"
8418
8419 fi
8420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8421   echo "$ac_t""yes" 1>&6
8422   
8423                 MODULES_LIBS=-lltdl
8424                 cat >> confdefs.h <<\EOF
8425 #define HAVE_LIBLTDL 1
8426 EOF
8427
8428         
8429 else
8430   echo "$ac_t""no" 1>&6
8431 fi
8432
8433
8434         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8435                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8436         fi
8437         ol_link_modules=yes
8438 else
8439         ol_with_bdb_module=static
8440         ol_with_dnssrv_module=static
8441         ol_with_ldap_module=static
8442         ol_with_ldbm_module=static
8443         ol_with_meta_module=static
8444         ol_with_monitor_module=static
8445         ol_with_null_module=static
8446         ol_with_passwd_module=static
8447         ol_with_perl_module=static
8448         ol_with_shell_module=static
8449         ol_with_tcl_module=static
8450         ol_with_sql_module=static
8451 fi
8452
8453 # test for EBCDIC
8454 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8455 echo "configure:8456: checking for EBCDIC" >&5
8456 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8457   echo $ac_n "(cached) $ac_c" 1>&6
8458 else
8459   
8460         cat > conftest.$ac_ext <<EOF
8461 #line 8462 "configure"
8462 #include "confdefs.h"
8463
8464 #if !('M' == 0xd4)
8465 #include <__ASCII__/generate_error.h>
8466 #endif
8467
8468 EOF
8469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8470 { (eval echo configure:8471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8472 if test -z "$ac_err"; then
8473   rm -rf conftest*
8474   ol_cv_cpp_ebcdic=yes
8475 else
8476   echo "$ac_err" >&5
8477   echo "configure: failed program was:" >&5
8478   cat conftest.$ac_ext >&5
8479   rm -rf conftest*
8480   ol_cv_cpp_ebcdic=no
8481 fi
8482 rm -f conftest*
8483 fi
8484
8485 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8486 if test $ol_cv_cpp_ebcdic = yes ; then
8487         cat >> confdefs.h <<\EOF
8488 #define HAVE_EBCDIC 1
8489 EOF
8490
8491 fi
8492
8493 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8494 echo "configure:8495: checking for ANSI C header files" >&5
8495 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8496   echo $ac_n "(cached) $ac_c" 1>&6
8497 else
8498   cat > conftest.$ac_ext <<EOF
8499 #line 8500 "configure"
8500 #include "confdefs.h"
8501 #include <stdlib.h>
8502 #include <stdarg.h>
8503 #include <string.h>
8504 #include <float.h>
8505 EOF
8506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8507 { (eval echo configure:8508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8509 if test -z "$ac_err"; then
8510   rm -rf conftest*
8511   ol_cv_header_stdc=yes
8512 else
8513   echo "$ac_err" >&5
8514   echo "configure: failed program was:" >&5
8515   cat conftest.$ac_ext >&5
8516   rm -rf conftest*
8517   ol_cv_header_stdc=no
8518 fi
8519 rm -f conftest*
8520
8521 if test $ol_cv_header_stdc = yes; then
8522   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8523 cat > conftest.$ac_ext <<EOF
8524 #line 8525 "configure"
8525 #include "confdefs.h"
8526 #include <string.h>
8527 EOF
8528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8529   egrep "memchr" >/dev/null 2>&1; then
8530   :
8531 else
8532   rm -rf conftest*
8533   ol_cv_header_stdc=no
8534 fi
8535 rm -f conftest*
8536
8537 fi
8538
8539 if test $ol_cv_header_stdc = yes; then
8540   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8541 cat > conftest.$ac_ext <<EOF
8542 #line 8543 "configure"
8543 #include "confdefs.h"
8544 #include <stdlib.h>
8545 EOF
8546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8547   egrep "free" >/dev/null 2>&1; then
8548   :
8549 else
8550   rm -rf conftest*
8551   ol_cv_header_stdc=no
8552 fi
8553 rm -f conftest*
8554
8555 fi
8556
8557 if test $ol_cv_header_stdc = yes; then
8558   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8559 if test "$cross_compiling" = yes; then
8560   :
8561 else
8562   cat > conftest.$ac_ext <<EOF
8563 #line 8564 "configure"
8564 #include "confdefs.h"
8565 #include <ctype.h>
8566 #ifndef HAVE_EBCDIC
8567 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8568 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8569 #else
8570 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8571                 || ('j' <= (c) && (c) <= 'r') \
8572                 || ('s' <= (c) && (c) <= 'z'))
8573 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8574 #endif
8575 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8576 int main () { int i; for (i = 0; i < 256; i++)
8577 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8578 exit (0); }
8579
8580 EOF
8581 if { (eval echo configure:8582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8582 then
8583   :
8584 else
8585   echo "configure: failed program was:" >&5
8586   cat conftest.$ac_ext >&5
8587   rm -fr conftest*
8588   ol_cv_header_stdc=no
8589 fi
8590 rm -fr conftest*
8591 fi
8592
8593 fi
8594 fi
8595
8596 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8597 if test $ol_cv_header_stdc = yes; then
8598   cat >> confdefs.h <<\EOF
8599 #define STDC_HEADERS 1
8600 EOF
8601
8602 fi
8603 ac_cv_header_stdc=disable
8604
8605
8606 if test $ol_cv_header_stdc != yes; then
8607         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8608 fi
8609
8610 ac_header_dirent=no
8611 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8612 do
8613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8614 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8615 echo "configure:8616: checking for $ac_hdr that defines DIR" >&5
8616 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8617   echo $ac_n "(cached) $ac_c" 1>&6
8618 else
8619   cat > conftest.$ac_ext <<EOF
8620 #line 8621 "configure"
8621 #include "confdefs.h"
8622 #include <sys/types.h>
8623 #include <$ac_hdr>
8624 int main() {
8625 DIR *dirp = 0;
8626 ; return 0; }
8627 EOF
8628 if { (eval echo configure:8629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8629   rm -rf conftest*
8630   eval "ac_cv_header_dirent_$ac_safe=yes"
8631 else
8632   echo "configure: failed program was:" >&5
8633   cat conftest.$ac_ext >&5
8634   rm -rf conftest*
8635   eval "ac_cv_header_dirent_$ac_safe=no"
8636 fi
8637 rm -f conftest*
8638 fi
8639 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8640   echo "$ac_t""yes" 1>&6
8641     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8642   cat >> confdefs.h <<EOF
8643 #define $ac_tr_hdr 1
8644 EOF
8645  ac_header_dirent=$ac_hdr; break
8646 else
8647   echo "$ac_t""no" 1>&6
8648 fi
8649 done
8650 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8651 if test $ac_header_dirent = dirent.h; then
8652 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8653 echo "configure:8654: checking for opendir in -ldir" >&5
8654 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8655 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8656   echo $ac_n "(cached) $ac_c" 1>&6
8657 else
8658   ac_save_LIBS="$LIBS"
8659 LIBS="-ldir  $LIBS"
8660 cat > conftest.$ac_ext <<EOF
8661 #line 8662 "configure"
8662 #include "confdefs.h"
8663 /* Override any gcc2 internal prototype to avoid an error.  */
8664 /* We use char because int might match the return type of a gcc2
8665     builtin and then its argument prototype would still apply.  */
8666 char opendir();
8667
8668 int main() {
8669 opendir()
8670 ; return 0; }
8671 EOF
8672 if { (eval echo configure:8673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8673   rm -rf conftest*
8674   eval "ac_cv_lib_$ac_lib_var=yes"
8675 else
8676   echo "configure: failed program was:" >&5
8677   cat conftest.$ac_ext >&5
8678   rm -rf conftest*
8679   eval "ac_cv_lib_$ac_lib_var=no"
8680 fi
8681 rm -f conftest*
8682 LIBS="$ac_save_LIBS"
8683
8684 fi
8685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8686   echo "$ac_t""yes" 1>&6
8687   LIBS="$LIBS -ldir"
8688 else
8689   echo "$ac_t""no" 1>&6
8690 fi
8691
8692 else
8693 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8694 echo "configure:8695: checking for opendir in -lx" >&5
8695 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8696 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8697   echo $ac_n "(cached) $ac_c" 1>&6
8698 else
8699   ac_save_LIBS="$LIBS"
8700 LIBS="-lx  $LIBS"
8701 cat > conftest.$ac_ext <<EOF
8702 #line 8703 "configure"
8703 #include "confdefs.h"
8704 /* Override any gcc2 internal prototype to avoid an error.  */
8705 /* We use char because int might match the return type of a gcc2
8706     builtin and then its argument prototype would still apply.  */
8707 char opendir();
8708
8709 int main() {
8710 opendir()
8711 ; return 0; }
8712 EOF
8713 if { (eval echo configure:8714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8714   rm -rf conftest*
8715   eval "ac_cv_lib_$ac_lib_var=yes"
8716 else
8717   echo "configure: failed program was:" >&5
8718   cat conftest.$ac_ext >&5
8719   rm -rf conftest*
8720   eval "ac_cv_lib_$ac_lib_var=no"
8721 fi
8722 rm -f conftest*
8723 LIBS="$ac_save_LIBS"
8724
8725 fi
8726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8727   echo "$ac_t""yes" 1>&6
8728   LIBS="$LIBS -lx"
8729 else
8730   echo "$ac_t""no" 1>&6
8731 fi
8732
8733 fi
8734
8735 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8736 echo "configure:8737: checking for sys/wait.h that is POSIX.1 compatible" >&5
8737 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   cat > conftest.$ac_ext <<EOF
8741 #line 8742 "configure"
8742 #include "confdefs.h"
8743 #include <sys/types.h>
8744 #include <sys/wait.h>
8745 #ifndef WEXITSTATUS
8746 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8747 #endif
8748 #ifndef WIFEXITED
8749 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8750 #endif
8751 int main() {
8752 int s;
8753 wait (&s);
8754 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8755 ; return 0; }
8756 EOF
8757 if { (eval echo configure:8758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8758   rm -rf conftest*
8759   ac_cv_header_sys_wait_h=yes
8760 else
8761   echo "configure: failed program was:" >&5
8762   cat conftest.$ac_ext >&5
8763   rm -rf conftest*
8764   ac_cv_header_sys_wait_h=no
8765 fi
8766 rm -f conftest*
8767 fi
8768
8769 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8770 if test $ac_cv_header_sys_wait_h = yes; then
8771   cat >> confdefs.h <<\EOF
8772 #define HAVE_SYS_WAIT_H 1
8773 EOF
8774
8775 fi
8776
8777 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8778 echo "configure:8779: checking POSIX termios" >&5
8779 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8780   echo $ac_n "(cached) $ac_c" 1>&6
8781 else
8782   cat > conftest.$ac_ext <<EOF
8783 #line 8784 "configure"
8784 #include "confdefs.h"
8785 #include <sys/types.h>
8786 #include <unistd.h>
8787 #include <termios.h>
8788 int main() {
8789 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8790    tcgetattr(0, 0);
8791 ; return 0; }
8792 EOF
8793 if { (eval echo configure:8794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8794   rm -rf conftest*
8795   am_cv_sys_posix_termios=yes
8796 else
8797   echo "configure: failed program was:" >&5
8798   cat conftest.$ac_ext >&5
8799   rm -rf conftest*
8800   am_cv_sys_posix_termios=no
8801 fi
8802 rm -f conftest*
8803 fi
8804
8805 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8806
8807
8808  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8809 echo "configure:8810: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8810 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8811   echo $ac_n "(cached) $ac_c" 1>&6
8812 else
8813   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8814
8815   gwinsz_in_termios_h=no
8816   if test $am_cv_sys_posix_termios = yes; then
8817     cat > conftest.$ac_ext <<EOF
8818 #line 8819 "configure"
8819 #include "confdefs.h"
8820 #include <sys/types.h>
8821 #     include <termios.h>
8822 #     ifdef TIOCGWINSZ
8823         yes
8824 #     endif
8825     
8826 EOF
8827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8828   egrep "yes" >/dev/null 2>&1; then
8829   rm -rf conftest*
8830   gwinsz_in_termios_h=yes
8831 fi
8832 rm -f conftest*
8833
8834   fi
8835
8836   if test $gwinsz_in_termios_h = no; then
8837     cat > conftest.$ac_ext <<EOF
8838 #line 8839 "configure"
8839 #include "confdefs.h"
8840 #include <sys/types.h>
8841 #     include <sys/ioctl.h>
8842 #     ifdef TIOCGWINSZ
8843         yes
8844 #     endif
8845     
8846 EOF
8847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8848   egrep "yes" >/dev/null 2>&1; then
8849   rm -rf conftest*
8850   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8851 fi
8852 rm -f conftest*
8853
8854   fi
8855   
8856 fi
8857
8858 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8859   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8860     cat >> confdefs.h <<\EOF
8861 #define GWINSZ_IN_SYS_IOCTL 1
8862 EOF
8863
8864   fi
8865
8866 if test $am_cv_sys_posix_termios = yes ; then
8867         cat >> confdefs.h <<\EOF
8868 #define HAVE_POSIX_TERMIOS 1
8869 EOF
8870
8871 fi
8872
8873 for ac_hdr in \
8874         arpa/inet.h             \
8875         arpa/nameser.h  \
8876         assert.h                \
8877         conio.h                 \
8878         crypt.h                 \
8879         direct.h                \
8880         errno.h                 \
8881         fcntl.h                 \
8882         filio.h                 \
8883         getopt.h                \
8884         grp.h                   \
8885         io.h                    \
8886         libutil.h               \
8887         limits.h                \
8888         locale.h                \
8889         netinet/tcp.h   \
8890         malloc.h                \
8891         memory.h                \
8892         psap.h                  \
8893         pwd.h                   \
8894         process.h               \
8895         resolv.h                \
8896         sgtty.h                 \
8897         shadow.h                \
8898         stddef.h                \
8899         string.h                \
8900         strings.h               \
8901         sysexits.h              \
8902         sys/file.h              \
8903         sys/filio.h             \
8904         sys/errno.h             \
8905         sys/ioctl.h             \
8906         sys/param.h             \
8907         sys/resource.h  \
8908         sys/select.h    \
8909         sys/socket.h    \
8910         sys/syslog.h    \
8911         sys/time.h              \
8912         sys/types.h             \
8913         syslog.h                \
8914         termios.h               \
8915         unistd.h                \
8916         winsock.h               \
8917         winsock2.h              \
8918
8919 do
8920 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8921 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8922 echo "configure:8923: checking for $ac_hdr" >&5
8923 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8924   echo $ac_n "(cached) $ac_c" 1>&6
8925 else
8926   cat > conftest.$ac_ext <<EOF
8927 #line 8928 "configure"
8928 #include "confdefs.h"
8929 #include <$ac_hdr>
8930 EOF
8931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8932 { (eval echo configure:8933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8934 if test -z "$ac_err"; then
8935   rm -rf conftest*
8936   eval "ac_cv_header_$ac_safe=yes"
8937 else
8938   echo "$ac_err" >&5
8939   echo "configure: failed program was:" >&5
8940   cat conftest.$ac_ext >&5
8941   rm -rf conftest*
8942   eval "ac_cv_header_$ac_safe=no"
8943 fi
8944 rm -f conftest*
8945 fi
8946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8947   echo "$ac_t""yes" 1>&6
8948     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8949   cat >> confdefs.h <<EOF
8950 #define $ac_tr_hdr 1
8951 EOF
8952  
8953 else
8954   echo "$ac_t""no" 1>&6
8955 fi
8956 done
8957
8958
8959
8960
8961 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8962 echo "configure:8963: checking for dlopen" >&5
8963 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8964   echo $ac_n "(cached) $ac_c" 1>&6
8965 else
8966   cat > conftest.$ac_ext <<EOF
8967 #line 8968 "configure"
8968 #include "confdefs.h"
8969 /* System header to define __stub macros and hopefully few prototypes,
8970     which can conflict with char dlopen(); below.  */
8971 #include <assert.h>
8972 /* Override any gcc2 internal prototype to avoid an error.  */
8973 /* We use char because int might match the return type of a gcc2
8974     builtin and then its argument prototype would still apply.  */
8975 char dlopen();
8976 char (*f)();
8977
8978 int main() {
8979
8980 /* The GNU C library defines this for functions which it implements
8981     to always fail with ENOSYS.  Some functions are actually named
8982     something starting with __ and the normal name is an alias.  */
8983 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8984 choke me
8985 #else
8986 f = dlopen;
8987 #endif
8988
8989 ; return 0; }
8990 EOF
8991 if { (eval echo configure:8992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8992   rm -rf conftest*
8993   eval "ac_cv_func_dlopen=yes"
8994 else
8995   echo "configure: failed program was:" >&5
8996   cat conftest.$ac_ext >&5
8997   rm -rf conftest*
8998   eval "ac_cv_func_dlopen=no"
8999 fi
9000 rm -f conftest*
9001 fi
9002
9003 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9004   echo "$ac_t""yes" 1>&6
9005   :
9006 else
9007   echo "$ac_t""no" 1>&6
9008 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9009 echo "configure:9010: checking for dlopen in -ldl" >&5
9010 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9011 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9012   echo $ac_n "(cached) $ac_c" 1>&6
9013 else
9014   ac_save_LIBS="$LIBS"
9015 LIBS="-ldl  $LIBS"
9016 cat > conftest.$ac_ext <<EOF
9017 #line 9018 "configure"
9018 #include "confdefs.h"
9019 /* Override any gcc2 internal prototype to avoid an error.  */
9020 /* We use char because int might match the return type of a gcc2
9021     builtin and then its argument prototype would still apply.  */
9022 char dlopen();
9023
9024 int main() {
9025 dlopen()
9026 ; return 0; }
9027 EOF
9028 if { (eval echo configure:9029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9029   rm -rf conftest*
9030   eval "ac_cv_lib_$ac_lib_var=yes"
9031 else
9032   echo "configure: failed program was:" >&5
9033   cat conftest.$ac_ext >&5
9034   rm -rf conftest*
9035   eval "ac_cv_lib_$ac_lib_var=no"
9036 fi
9037 rm -f conftest*
9038 LIBS="$ac_save_LIBS"
9039
9040 fi
9041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9042   echo "$ac_t""yes" 1>&6
9043     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9044     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9045   cat >> confdefs.h <<EOF
9046 #define $ac_tr_lib 1
9047 EOF
9048
9049   LIBS="-ldl $LIBS"
9050
9051 else
9052   echo "$ac_t""no" 1>&6
9053 fi
9054
9055 fi
9056
9057
9058 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9059 echo "configure:9060: checking for sigset in -lV3" >&5
9060 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9061 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9062   echo $ac_n "(cached) $ac_c" 1>&6
9063 else
9064   ac_save_LIBS="$LIBS"
9065 LIBS="-lV3  $LIBS"
9066 cat > conftest.$ac_ext <<EOF
9067 #line 9068 "configure"
9068 #include "confdefs.h"
9069 /* Override any gcc2 internal prototype to avoid an error.  */
9070 /* We use char because int might match the return type of a gcc2
9071     builtin and then its argument prototype would still apply.  */
9072 char sigset();
9073
9074 int main() {
9075 sigset()
9076 ; return 0; }
9077 EOF
9078 if { (eval echo configure:9079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9079   rm -rf conftest*
9080   eval "ac_cv_lib_$ac_lib_var=yes"
9081 else
9082   echo "configure: failed program was:" >&5
9083   cat conftest.$ac_ext >&5
9084   rm -rf conftest*
9085   eval "ac_cv_lib_$ac_lib_var=no"
9086 fi
9087 rm -f conftest*
9088 LIBS="$ac_save_LIBS"
9089
9090 fi
9091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9092   echo "$ac_t""yes" 1>&6
9093     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9094     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9095   cat >> confdefs.h <<EOF
9096 #define $ac_tr_lib 1
9097 EOF
9098
9099   LIBS="-lV3 $LIBS"
9100
9101 else
9102   echo "$ac_t""no" 1>&6
9103 fi
9104
9105
9106 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9107 echo "configure:9108: checking for winsock" >&5
9108 save_LIBS="$LIBS"
9109 for curlib in ws2_32 wsock32; do
9110         LIBS="$LIBS -l$curlib"
9111         cat > conftest.$ac_ext <<EOF
9112 #line 9113 "configure"
9113 #include "confdefs.h"
9114
9115                         char socket@12();
9116                         char select@20();
9117                         char closesocket@4();
9118                         char gethostname@8();
9119                         
9120 int main() {
9121
9122                         socket@12();
9123                         select@20();
9124                         closesocket@4();
9125                         gethostname@8();
9126                         
9127 ; return 0; }
9128 EOF
9129 if { (eval echo configure:9130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9130   rm -rf conftest*
9131   have_winsock=yes
9132 else
9133   echo "configure: failed program was:" >&5
9134   cat conftest.$ac_ext >&5
9135   rm -rf conftest*
9136   have_winsock=no
9137 fi
9138 rm -f conftest*
9139
9140         if test $have_winsock = yes; then
9141                 cat >> confdefs.h <<\EOF
9142 #define HAVE_WINSOCK 1
9143 EOF
9144
9145                 ac_cv_func_socket=yes
9146                 ac_cv_func_select=yes
9147                 ac_cv_func_closesocket=yes
9148                 ac_cv_func_gethostname=yes
9149                 if test $curlib = ws2_32; then
9150                         have_winsock=winsock2
9151                         cat >> confdefs.h <<\EOF
9152 #define HAVE_WINSOCK2 1
9153 EOF
9154
9155                 fi
9156                 break
9157         fi
9158         LIBS="$save_LIBS"
9159 done
9160 echo "$ac_t""$have_winsock" 1>&6
9161
9162
9163 echo $ac_n "checking for socket""... $ac_c" 1>&6
9164 echo "configure:9165: checking for socket" >&5
9165 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9166   echo $ac_n "(cached) $ac_c" 1>&6
9167 else
9168   cat > conftest.$ac_ext <<EOF
9169 #line 9170 "configure"
9170 #include "confdefs.h"
9171 /* System header to define __stub macros and hopefully few prototypes,
9172     which can conflict with char socket(); below.  */
9173 #include <assert.h>
9174 /* Override any gcc2 internal prototype to avoid an error.  */
9175 /* We use char because int might match the return type of a gcc2
9176     builtin and then its argument prototype would still apply.  */
9177 char socket();
9178 char (*f)();
9179
9180 int main() {
9181
9182 /* The GNU C library defines this for functions which it implements
9183     to always fail with ENOSYS.  Some functions are actually named
9184     something starting with __ and the normal name is an alias.  */
9185 #if defined (__stub_socket) || defined (__stub___socket)
9186 choke me
9187 #else
9188 f = socket;
9189 #endif
9190
9191 ; return 0; }
9192 EOF
9193 if { (eval echo configure:9194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9194   rm -rf conftest*
9195   eval "ac_cv_func_socket=yes"
9196 else
9197   echo "configure: failed program was:" >&5
9198   cat conftest.$ac_ext >&5
9199   rm -rf conftest*
9200   eval "ac_cv_func_socket=no"
9201 fi
9202 rm -f conftest*
9203 fi
9204
9205 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9206   echo "$ac_t""yes" 1>&6
9207   :
9208 else
9209   echo "$ac_t""no" 1>&6
9210         
9211         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9212 echo "configure:9213: checking for main in -lsocket" >&5
9213 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9215   echo $ac_n "(cached) $ac_c" 1>&6
9216 else
9217   ac_save_LIBS="$LIBS"
9218 LIBS="-lsocket  $LIBS"
9219 cat > conftest.$ac_ext <<EOF
9220 #line 9221 "configure"
9221 #include "confdefs.h"
9222
9223 int main() {
9224 main()
9225 ; return 0; }
9226 EOF
9227 if { (eval echo configure:9228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9228   rm -rf conftest*
9229   eval "ac_cv_lib_$ac_lib_var=yes"
9230 else
9231   echo "configure: failed program was:" >&5
9232   cat conftest.$ac_ext >&5
9233   rm -rf conftest*
9234   eval "ac_cv_lib_$ac_lib_var=no"
9235 fi
9236 rm -f conftest*
9237 LIBS="$ac_save_LIBS"
9238
9239 fi
9240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9241   echo "$ac_t""yes" 1>&6
9242     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9243     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9244   cat >> confdefs.h <<EOF
9245 #define $ac_tr_lib 1
9246 EOF
9247
9248   LIBS="-lsocket $LIBS"
9249
9250 else
9251   echo "$ac_t""no" 1>&6
9252 fi
9253
9254         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9255 echo "configure:9256: checking for main in -lnet" >&5
9256 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9257 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9258   echo $ac_n "(cached) $ac_c" 1>&6
9259 else
9260   ac_save_LIBS="$LIBS"
9261 LIBS="-lnet  $LIBS"
9262 cat > conftest.$ac_ext <<EOF
9263 #line 9264 "configure"
9264 #include "confdefs.h"
9265
9266 int main() {
9267 main()
9268 ; return 0; }
9269 EOF
9270 if { (eval echo configure:9271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9271   rm -rf conftest*
9272   eval "ac_cv_lib_$ac_lib_var=yes"
9273 else
9274   echo "configure: failed program was:" >&5
9275   cat conftest.$ac_ext >&5
9276   rm -rf conftest*
9277   eval "ac_cv_lib_$ac_lib_var=no"
9278 fi
9279 rm -f conftest*
9280 LIBS="$ac_save_LIBS"
9281
9282 fi
9283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9284   echo "$ac_t""yes" 1>&6
9285     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9286     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9287   cat >> confdefs.h <<EOF
9288 #define $ac_tr_lib 1
9289 EOF
9290
9291   LIBS="-lnet $LIBS"
9292
9293 else
9294   echo "$ac_t""no" 1>&6
9295 fi
9296
9297         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9298 echo "configure:9299: checking for main in -lnsl_s" >&5
9299 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9300 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9301   echo $ac_n "(cached) $ac_c" 1>&6
9302 else
9303   ac_save_LIBS="$LIBS"
9304 LIBS="-lnsl_s  $LIBS"
9305 cat > conftest.$ac_ext <<EOF
9306 #line 9307 "configure"
9307 #include "confdefs.h"
9308
9309 int main() {
9310 main()
9311 ; return 0; }
9312 EOF
9313 if { (eval echo configure:9314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9314   rm -rf conftest*
9315   eval "ac_cv_lib_$ac_lib_var=yes"
9316 else
9317   echo "configure: failed program was:" >&5
9318   cat conftest.$ac_ext >&5
9319   rm -rf conftest*
9320   eval "ac_cv_lib_$ac_lib_var=no"
9321 fi
9322 rm -f conftest*
9323 LIBS="$ac_save_LIBS"
9324
9325 fi
9326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9327   echo "$ac_t""yes" 1>&6
9328     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9329     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9330   cat >> confdefs.h <<EOF
9331 #define $ac_tr_lib 1
9332 EOF
9333
9334   LIBS="-lnsl_s $LIBS"
9335
9336 else
9337   echo "$ac_t""no" 1>&6
9338 fi
9339
9340         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9341 echo "configure:9342: checking for main in -lnsl" >&5
9342 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9343 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9344   echo $ac_n "(cached) $ac_c" 1>&6
9345 else
9346   ac_save_LIBS="$LIBS"
9347 LIBS="-lnsl  $LIBS"
9348 cat > conftest.$ac_ext <<EOF
9349 #line 9350 "configure"
9350 #include "confdefs.h"
9351
9352 int main() {
9353 main()
9354 ; return 0; }
9355 EOF
9356 if { (eval echo configure:9357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9357   rm -rf conftest*
9358   eval "ac_cv_lib_$ac_lib_var=yes"
9359 else
9360   echo "configure: failed program was:" >&5
9361   cat conftest.$ac_ext >&5
9362   rm -rf conftest*
9363   eval "ac_cv_lib_$ac_lib_var=no"
9364 fi
9365 rm -f conftest*
9366 LIBS="$ac_save_LIBS"
9367
9368 fi
9369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9370   echo "$ac_t""yes" 1>&6
9371     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9372     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9373   cat >> confdefs.h <<EOF
9374 #define $ac_tr_lib 1
9375 EOF
9376
9377   LIBS="-lnsl $LIBS"
9378
9379 else
9380   echo "$ac_t""no" 1>&6
9381 fi
9382
9383         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9384 echo "configure:9385: checking for socket in -linet" >&5
9385 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9386 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9387   echo $ac_n "(cached) $ac_c" 1>&6
9388 else
9389   ac_save_LIBS="$LIBS"
9390 LIBS="-linet  $LIBS"
9391 cat > conftest.$ac_ext <<EOF
9392 #line 9393 "configure"
9393 #include "confdefs.h"
9394 /* Override any gcc2 internal prototype to avoid an error.  */
9395 /* We use char because int might match the return type of a gcc2
9396     builtin and then its argument prototype would still apply.  */
9397 char socket();
9398
9399 int main() {
9400 socket()
9401 ; return 0; }
9402 EOF
9403 if { (eval echo configure:9404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9404   rm -rf conftest*
9405   eval "ac_cv_lib_$ac_lib_var=yes"
9406 else
9407   echo "configure: failed program was:" >&5
9408   cat conftest.$ac_ext >&5
9409   rm -rf conftest*
9410   eval "ac_cv_lib_$ac_lib_var=no"
9411 fi
9412 rm -f conftest*
9413 LIBS="$ac_save_LIBS"
9414
9415 fi
9416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9417   echo "$ac_t""yes" 1>&6
9418     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9419     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9420   cat >> confdefs.h <<EOF
9421 #define $ac_tr_lib 1
9422 EOF
9423
9424   LIBS="-linet $LIBS"
9425
9426 else
9427   echo "$ac_t""no" 1>&6
9428 fi
9429
9430         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9431 echo "configure:9432: checking for main in -lgen" >&5
9432 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9433 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9434   echo $ac_n "(cached) $ac_c" 1>&6
9435 else
9436   ac_save_LIBS="$LIBS"
9437 LIBS="-lgen  $LIBS"
9438 cat > conftest.$ac_ext <<EOF
9439 #line 9440 "configure"
9440 #include "confdefs.h"
9441
9442 int main() {
9443 main()
9444 ; return 0; }
9445 EOF
9446 if { (eval echo configure:9447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9447   rm -rf conftest*
9448   eval "ac_cv_lib_$ac_lib_var=yes"
9449 else
9450   echo "configure: failed program was:" >&5
9451   cat conftest.$ac_ext >&5
9452   rm -rf conftest*
9453   eval "ac_cv_lib_$ac_lib_var=no"
9454 fi
9455 rm -f conftest*
9456 LIBS="$ac_save_LIBS"
9457
9458 fi
9459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9460   echo "$ac_t""yes" 1>&6
9461     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9462     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9463   cat >> confdefs.h <<EOF
9464 #define $ac_tr_lib 1
9465 EOF
9466
9467   LIBS="-lgen $LIBS"
9468
9469 else
9470   echo "$ac_t""no" 1>&6
9471 fi
9472
9473
9474 fi
9475
9476
9477 echo $ac_n "checking for select""... $ac_c" 1>&6
9478 echo "configure:9479: checking for select" >&5
9479 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9480   echo $ac_n "(cached) $ac_c" 1>&6
9481 else
9482   cat > conftest.$ac_ext <<EOF
9483 #line 9484 "configure"
9484 #include "confdefs.h"
9485 /* System header to define __stub macros and hopefully few prototypes,
9486     which can conflict with char select(); below.  */
9487 #include <assert.h>
9488 /* Override any gcc2 internal prototype to avoid an error.  */
9489 /* We use char because int might match the return type of a gcc2
9490     builtin and then its argument prototype would still apply.  */
9491 char select();
9492 char (*f)();
9493
9494 int main() {
9495
9496 /* The GNU C library defines this for functions which it implements
9497     to always fail with ENOSYS.  Some functions are actually named
9498     something starting with __ and the normal name is an alias.  */
9499 #if defined (__stub_select) || defined (__stub___select)
9500 choke me
9501 #else
9502 f = select;
9503 #endif
9504
9505 ; return 0; }
9506 EOF
9507 if { (eval echo configure:9508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9508   rm -rf conftest*
9509   eval "ac_cv_func_select=yes"
9510 else
9511   echo "configure: failed program was:" >&5
9512   cat conftest.$ac_ext >&5
9513   rm -rf conftest*
9514   eval "ac_cv_func_select=no"
9515 fi
9516 rm -f conftest*
9517 fi
9518
9519 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9520   echo "$ac_t""yes" 1>&6
9521   :
9522 else
9523   echo "$ac_t""no" 1>&6
9524 { echo "configure: error: select() required." 1>&2; exit 1; }
9525 fi
9526
9527
9528 if test "${ac_cv_header_winsock_h}" != yes; then
9529                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9530 echo "configure:9531: checking types of arguments for select()" >&5
9531  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9532   echo $ac_n "(cached) $ac_c" 1>&6
9533 else
9534    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9535   echo $ac_n "(cached) $ac_c" 1>&6
9536 else
9537     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9538   echo $ac_n "(cached) $ac_c" 1>&6
9539 else
9540      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9541      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9542       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9543        cat > conftest.$ac_ext <<EOF
9544 #line 9545 "configure"
9545 #include "confdefs.h"
9546 #ifdef HAVE_SYS_TYPES_H
9547 #include <sys/types.h>
9548 #endif
9549 #ifdef HAVE_SYS_TIME_H
9550 #include <sys/time.h>
9551 #endif
9552 #ifdef HAVE_SYS_SELECT_H
9553 #include <sys/select.h>
9554 #endif
9555 #ifdef HAVE_SYS_SOCKET_H
9556 #include <sys/socket.h>
9557 #endif
9558 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);
9559 int main() {
9560
9561 ; return 0; }
9562 EOF
9563 if { (eval echo configure:9564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9564   rm -rf conftest*
9565           ac_not_found=no ; break 3
9566 else
9567   echo "configure: failed program was:" >&5
9568   cat conftest.$ac_ext >&5
9569   rm -rf conftest*
9570   ac_not_found=yes
9571 fi
9572 rm -f conftest*
9573       done
9574      done
9575     done
9576    
9577 fi
9578   
9579 fi
9580  
9581 fi
9582  if test "$ac_not_found" = yes; then
9583   ac_cv_func_select_arg1=int 
9584   ac_cv_func_select_arg234='int *' 
9585   ac_cv_func_select_arg5='struct timeval *'
9586  fi
9587  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9588  cat >> confdefs.h <<EOF
9589 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9590 EOF
9591
9592  cat >> confdefs.h <<EOF
9593 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9594 EOF
9595
9596  cat >> confdefs.h <<EOF
9597 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9598 EOF
9599
9600
9601 fi
9602
9603
9604 for ac_hdr in regex.h 
9605 do
9606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9607 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9608 echo "configure:9609: checking for $ac_hdr" >&5
9609 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9610   echo $ac_n "(cached) $ac_c" 1>&6
9611 else
9612   cat > conftest.$ac_ext <<EOF
9613 #line 9614 "configure"
9614 #include "confdefs.h"
9615 #include <$ac_hdr>
9616 EOF
9617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9618 { (eval echo configure:9619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9620 if test -z "$ac_err"; then
9621   rm -rf conftest*
9622   eval "ac_cv_header_$ac_safe=yes"
9623 else
9624   echo "$ac_err" >&5
9625   echo "configure: failed program was:" >&5
9626   cat conftest.$ac_ext >&5
9627   rm -rf conftest*
9628   eval "ac_cv_header_$ac_safe=no"
9629 fi
9630 rm -f conftest*
9631 fi
9632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9633   echo "$ac_t""yes" 1>&6
9634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9635   cat >> confdefs.h <<EOF
9636 #define $ac_tr_hdr 1
9637 EOF
9638  
9639 else
9640   echo "$ac_t""no" 1>&6
9641 fi
9642 done
9643
9644 if test "$ac_cv_header_regex_h" != yes ; then
9645         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9646 fi
9647
9648 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9649 echo "configure:9650: checking for library containing regfree" >&5
9650 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9651   echo $ac_n "(cached) $ac_c" 1>&6
9652 else
9653   ac_func_search_save_LIBS="$LIBS"
9654 ac_cv_search_regfree="no"
9655 cat > conftest.$ac_ext <<EOF
9656 #line 9657 "configure"
9657 #include "confdefs.h"
9658 /* Override any gcc2 internal prototype to avoid an error.  */
9659 /* We use char because int might match the return type of a gcc2
9660     builtin and then its argument prototype would still apply.  */
9661 char regfree();
9662
9663 int main() {
9664 regfree()
9665 ; return 0; }
9666 EOF
9667 if { (eval echo configure:9668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9668   rm -rf conftest*
9669   ac_cv_search_regfree="none required"
9670 else
9671   echo "configure: failed program was:" >&5
9672   cat conftest.$ac_ext >&5
9673 fi
9674 rm -f conftest*
9675 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9676 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9677 cat > conftest.$ac_ext <<EOF
9678 #line 9679 "configure"
9679 #include "confdefs.h"
9680 /* Override any gcc2 internal prototype to avoid an error.  */
9681 /* We use char because int might match the return type of a gcc2
9682     builtin and then its argument prototype would still apply.  */
9683 char regfree();
9684
9685 int main() {
9686 regfree()
9687 ; return 0; }
9688 EOF
9689 if { (eval echo configure:9690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9690   rm -rf conftest*
9691   ac_cv_search_regfree="-l$ac_lib"
9692 break
9693 else
9694   echo "configure: failed program was:" >&5
9695   cat conftest.$ac_ext >&5
9696 fi
9697 rm -f conftest*
9698 done
9699 LIBS="$ac_func_search_save_LIBS"
9700 fi
9701
9702 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9703 if test "$ac_cv_search_regfree" != "no"; then
9704   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9705   :
9706 else :
9707   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9708 fi
9709
9710
9711 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9712 echo "configure:9713: checking for compatible POSIX regex" >&5
9713 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9714   echo $ac_n "(cached) $ac_c" 1>&6
9715 else
9716   
9717         if test "$cross_compiling" = yes; then
9718   ol_cv_c_posix_regex=cross
9719 else
9720   cat > conftest.$ac_ext <<EOF
9721 #line 9722 "configure"
9722 #include "confdefs.h"
9723
9724 #include <sys/types.h>
9725 #include <regex.h>
9726 static char *pattern, *string;
9727 main()
9728 {
9729         int rc;
9730         regex_t re;
9731
9732         pattern = "^A";
9733
9734         if(regcomp(&re, pattern, 0)) {
9735                 return -1;
9736         }
9737         
9738         string = "ALL MATCH";
9739         
9740         rc = regexec(&re, string, 0, (void*)0, 0);
9741
9742         regfree(&re);
9743
9744         return rc;
9745 }
9746 EOF
9747 if { (eval echo configure:9748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9748 then
9749   ol_cv_c_posix_regex=yes
9750 else
9751   echo "configure: failed program was:" >&5
9752   cat conftest.$ac_ext >&5
9753   rm -fr conftest*
9754   ol_cv_c_posix_regex=no
9755 fi
9756 rm -fr conftest*
9757 fi
9758
9759 fi
9760
9761 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9762
9763 if test "$ol_cv_c_posix_regex" = no ; then
9764         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9765 fi
9766
9767
9768 have_uuid=no
9769 for ac_hdr in sys/uuid.h
9770 do
9771 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9772 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9773 echo "configure:9774: checking for $ac_hdr" >&5
9774 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9775   echo $ac_n "(cached) $ac_c" 1>&6
9776 else
9777   cat > conftest.$ac_ext <<EOF
9778 #line 9779 "configure"
9779 #include "confdefs.h"
9780 #include <$ac_hdr>
9781 EOF
9782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9783 { (eval echo configure:9784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9784 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9785 if test -z "$ac_err"; then
9786   rm -rf conftest*
9787   eval "ac_cv_header_$ac_safe=yes"
9788 else
9789   echo "$ac_err" >&5
9790   echo "configure: failed program was:" >&5
9791   cat conftest.$ac_ext >&5
9792   rm -rf conftest*
9793   eval "ac_cv_header_$ac_safe=no"
9794 fi
9795 rm -f conftest*
9796 fi
9797 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9798   echo "$ac_t""yes" 1>&6
9799     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9800   cat >> confdefs.h <<EOF
9801 #define $ac_tr_hdr 1
9802 EOF
9803  
9804 else
9805   echo "$ac_t""no" 1>&6
9806 fi
9807 done
9808
9809 if test $ac_cv_header_sys_uuid_h = yes ; then
9810         save_LIBS="$LIBS"
9811         
9812 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9813 echo "configure:9814: checking for library containing uuid_to_str" >&5
9814 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9815   echo $ac_n "(cached) $ac_c" 1>&6
9816 else
9817   ac_func_search_save_LIBS="$LIBS"
9818 ac_cv_search_uuid_to_str="no"
9819 cat > conftest.$ac_ext <<EOF
9820 #line 9821 "configure"
9821 #include "confdefs.h"
9822 /* Override any gcc2 internal prototype to avoid an error.  */
9823 /* We use char because int might match the return type of a gcc2
9824     builtin and then its argument prototype would still apply.  */
9825 char uuid_to_str();
9826
9827 int main() {
9828 uuid_to_str()
9829 ; return 0; }
9830 EOF
9831 if { (eval echo configure:9832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9832   rm -rf conftest*
9833   ac_cv_search_uuid_to_str="none required"
9834 else
9835   echo "configure: failed program was:" >&5
9836   cat conftest.$ac_ext >&5
9837 fi
9838 rm -f conftest*
9839 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9840 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9841 cat > conftest.$ac_ext <<EOF
9842 #line 9843 "configure"
9843 #include "confdefs.h"
9844 /* Override any gcc2 internal prototype to avoid an error.  */
9845 /* We use char because int might match the return type of a gcc2
9846     builtin and then its argument prototype would still apply.  */
9847 char uuid_to_str();
9848
9849 int main() {
9850 uuid_to_str()
9851 ; return 0; }
9852 EOF
9853 if { (eval echo configure:9854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9854   rm -rf conftest*
9855   ac_cv_search_uuid_to_str="-l$ac_lib"
9856 break
9857 else
9858   echo "configure: failed program was:" >&5
9859   cat conftest.$ac_ext >&5
9860 fi
9861 rm -f conftest*
9862 done
9863 LIBS="$ac_func_search_save_LIBS"
9864 fi
9865
9866 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9867 if test "$ac_cv_search_uuid_to_str" != "no"; then
9868   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9869   have_uuid=yes
9870 else :
9871   :
9872 fi
9873         LIBS="$save_LIBS"
9874
9875         if test have_uuid = yes ; then
9876                 cat >> confdefs.h <<\EOF
9877 #define HAVE_UUID_TO_STR 1
9878 EOF
9879
9880
9881                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9882                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9883         fi
9884 fi
9885
9886 if test $have_uuid = no ; then
9887         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9888 echo "configure:9889: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9889         save_LIBS="$LIBS"
9890         LIBS="$LIBS -lrpcrt4"
9891         cat > conftest.$ac_ext <<EOF
9892 #line 9893 "configure"
9893 #include "confdefs.h"
9894
9895                 char UuidCreate@4();
9896                 char UuidToStringA@8();
9897                 
9898 int main() {
9899
9900                 UuidCreate@4();
9901                 UuidToStringA@8();
9902                 
9903 ; return 0; }
9904 EOF
9905 if { (eval echo configure:9906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9906   rm -rf conftest*
9907   need_rpcrt=yes
9908 else
9909   echo "configure: failed program was:" >&5
9910   cat conftest.$ac_ext >&5
9911   rm -rf conftest*
9912   need_rpcrt=no
9913 fi
9914 rm -f conftest*
9915         if test $need_rpcrt = yes; then
9916                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9917         fi
9918         LIBS="$save_LIBS"
9919         echo "$ac_t""$need_rpcrt" 1>&6
9920 fi
9921
9922 ol_link_dnssrv=no
9923 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9924 echo "configure:9925: checking for res_query" >&5
9925 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9926   echo $ac_n "(cached) $ac_c" 1>&6
9927 else
9928   cat > conftest.$ac_ext <<EOF
9929 #line 9930 "configure"
9930 #include "confdefs.h"
9931 /* System header to define __stub macros and hopefully few prototypes,
9932     which can conflict with char res_query(); below.  */
9933 #include <assert.h>
9934 /* Override any gcc2 internal prototype to avoid an error.  */
9935 /* We use char because int might match the return type of a gcc2
9936     builtin and then its argument prototype would still apply.  */
9937 char res_query();
9938 char (*f)();
9939
9940 int main() {
9941
9942 /* The GNU C library defines this for functions which it implements
9943     to always fail with ENOSYS.  Some functions are actually named
9944     something starting with __ and the normal name is an alias.  */
9945 #if defined (__stub_res_query) || defined (__stub___res_query)
9946 choke me
9947 #else
9948 f = res_query;
9949 #endif
9950
9951 ; return 0; }
9952 EOF
9953 if { (eval echo configure:9954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9954   rm -rf conftest*
9955   eval "ac_cv_func_res_query=yes"
9956 else
9957   echo "configure: failed program was:" >&5
9958   cat conftest.$ac_ext >&5
9959   rm -rf conftest*
9960   eval "ac_cv_func_res_query=no"
9961 fi
9962 rm -f conftest*
9963 fi
9964
9965 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9966   echo "$ac_t""yes" 1>&6
9967   :
9968 else
9969   echo "$ac_t""no" 1>&6
9970 fi
9971
9972 if test $ac_cv_func_res_query = no ; then 
9973         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9974 echo "configure:9975: checking for __res_query" >&5
9975 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9976   echo $ac_n "(cached) $ac_c" 1>&6
9977 else
9978   cat > conftest.$ac_ext <<EOF
9979 #line 9980 "configure"
9980 #include "confdefs.h"
9981 /* System header to define __stub macros and hopefully few prototypes,
9982     which can conflict with char __res_query(); below.  */
9983 #include <assert.h>
9984 /* Override any gcc2 internal prototype to avoid an error.  */
9985 /* We use char because int might match the return type of a gcc2
9986     builtin and then its argument prototype would still apply.  */
9987 char __res_query();
9988 char (*f)();
9989
9990 int main() {
9991
9992 /* The GNU C library defines this for functions which it implements
9993     to always fail with ENOSYS.  Some functions are actually named
9994     something starting with __ and the normal name is an alias.  */
9995 #if defined (__stub___res_query) || defined (__stub_____res_query)
9996 choke me
9997 #else
9998 f = __res_query;
9999 #endif
10000
10001 ; return 0; }
10002 EOF
10003 if { (eval echo configure:10004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10004   rm -rf conftest*
10005   eval "ac_cv_func___res_query=yes"
10006 else
10007   echo "configure: failed program was:" >&5
10008   cat conftest.$ac_ext >&5
10009   rm -rf conftest*
10010   eval "ac_cv_func___res_query=no"
10011 fi
10012 rm -f conftest*
10013 fi
10014
10015 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10016   echo "$ac_t""yes" 1>&6
10017   :
10018 else
10019   echo "$ac_t""no" 1>&6
10020 fi
10021
10022         ac_cv_func_res_query=$ac_cv_func___res_query
10023 fi
10024
10025 if test $ac_cv_func_res_query = no ; then 
10026         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10027 echo "configure:10028: checking for res_query in -lbind" >&5
10028 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10029 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10030   echo $ac_n "(cached) $ac_c" 1>&6
10031 else
10032   ac_save_LIBS="$LIBS"
10033 LIBS="-lbind  $LIBS"
10034 cat > conftest.$ac_ext <<EOF
10035 #line 10036 "configure"
10036 #include "confdefs.h"
10037 /* Override any gcc2 internal prototype to avoid an error.  */
10038 /* We use char because int might match the return type of a gcc2
10039     builtin and then its argument prototype would still apply.  */
10040 char res_query();
10041
10042 int main() {
10043 res_query()
10044 ; return 0; }
10045 EOF
10046 if { (eval echo configure:10047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10047   rm -rf conftest*
10048   eval "ac_cv_lib_$ac_lib_var=yes"
10049 else
10050   echo "configure: failed program was:" >&5
10051   cat conftest.$ac_ext >&5
10052   rm -rf conftest*
10053   eval "ac_cv_lib_$ac_lib_var=no"
10054 fi
10055 rm -f conftest*
10056 LIBS="$ac_save_LIBS"
10057
10058 fi
10059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10060   echo "$ac_t""yes" 1>&6
10061     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10062     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10063   cat >> confdefs.h <<EOF
10064 #define $ac_tr_lib 1
10065 EOF
10066
10067   LIBS="-lbind $LIBS"
10068
10069 else
10070   echo "$ac_t""no" 1>&6
10071 fi
10072
10073         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10074 fi
10075
10076 if test $ac_cv_func_res_query = no ; then 
10077         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10078 echo "configure:10079: checking for __res_query in -lbind" >&5
10079 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10080 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10081   echo $ac_n "(cached) $ac_c" 1>&6
10082 else
10083   ac_save_LIBS="$LIBS"
10084 LIBS="-lbind  $LIBS"
10085 cat > conftest.$ac_ext <<EOF
10086 #line 10087 "configure"
10087 #include "confdefs.h"
10088 /* Override any gcc2 internal prototype to avoid an error.  */
10089 /* We use char because int might match the return type of a gcc2
10090     builtin and then its argument prototype would still apply.  */
10091 char __res_query();
10092
10093 int main() {
10094 __res_query()
10095 ; return 0; }
10096 EOF
10097 if { (eval echo configure:10098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10098   rm -rf conftest*
10099   eval "ac_cv_lib_$ac_lib_var=yes"
10100 else
10101   echo "configure: failed program was:" >&5
10102   cat conftest.$ac_ext >&5
10103   rm -rf conftest*
10104   eval "ac_cv_lib_$ac_lib_var=no"
10105 fi
10106 rm -f conftest*
10107 LIBS="$ac_save_LIBS"
10108
10109 fi
10110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10111   echo "$ac_t""yes" 1>&6
10112     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10113     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10114   cat >> confdefs.h <<EOF
10115 #define $ac_tr_lib 1
10116 EOF
10117
10118   LIBS="-lbind $LIBS"
10119
10120 else
10121   echo "$ac_t""no" 1>&6
10122 fi
10123
10124         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10125 fi
10126
10127 if test $ac_cv_func_res_query = no ; then 
10128         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10129 echo "configure:10130: checking for res_query in -lresolv" >&5
10130 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10131 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10132   echo $ac_n "(cached) $ac_c" 1>&6
10133 else
10134   ac_save_LIBS="$LIBS"
10135 LIBS="-lresolv  $LIBS"
10136 cat > conftest.$ac_ext <<EOF
10137 #line 10138 "configure"
10138 #include "confdefs.h"
10139 /* Override any gcc2 internal prototype to avoid an error.  */
10140 /* We use char because int might match the return type of a gcc2
10141     builtin and then its argument prototype would still apply.  */
10142 char res_query();
10143
10144 int main() {
10145 res_query()
10146 ; return 0; }
10147 EOF
10148 if { (eval echo configure:10149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10149   rm -rf conftest*
10150   eval "ac_cv_lib_$ac_lib_var=yes"
10151 else
10152   echo "configure: failed program was:" >&5
10153   cat conftest.$ac_ext >&5
10154   rm -rf conftest*
10155   eval "ac_cv_lib_$ac_lib_var=no"
10156 fi
10157 rm -f conftest*
10158 LIBS="$ac_save_LIBS"
10159
10160 fi
10161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10162   echo "$ac_t""yes" 1>&6
10163     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10164     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10165   cat >> confdefs.h <<EOF
10166 #define $ac_tr_lib 1
10167 EOF
10168
10169   LIBS="-lresolv $LIBS"
10170
10171 else
10172   echo "$ac_t""no" 1>&6
10173 fi
10174
10175         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10176 fi
10177
10178 if test $ac_cv_func_res_query = no ; then 
10179         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10180 echo "configure:10181: checking for __res_query in -lresolv" >&5
10181 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10182 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10183   echo $ac_n "(cached) $ac_c" 1>&6
10184 else
10185   ac_save_LIBS="$LIBS"
10186 LIBS="-lresolv  $LIBS"
10187 cat > conftest.$ac_ext <<EOF
10188 #line 10189 "configure"
10189 #include "confdefs.h"
10190 /* Override any gcc2 internal prototype to avoid an error.  */
10191 /* We use char because int might match the return type of a gcc2
10192     builtin and then its argument prototype would still apply.  */
10193 char __res_query();
10194
10195 int main() {
10196 __res_query()
10197 ; return 0; }
10198 EOF
10199 if { (eval echo configure:10200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10200   rm -rf conftest*
10201   eval "ac_cv_lib_$ac_lib_var=yes"
10202 else
10203   echo "configure: failed program was:" >&5
10204   cat conftest.$ac_ext >&5
10205   rm -rf conftest*
10206   eval "ac_cv_lib_$ac_lib_var=no"
10207 fi
10208 rm -f conftest*
10209 LIBS="$ac_save_LIBS"
10210
10211 fi
10212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10213   echo "$ac_t""yes" 1>&6
10214     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10215     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10216   cat >> confdefs.h <<EOF
10217 #define $ac_tr_lib 1
10218 EOF
10219
10220   LIBS="-lresolv $LIBS"
10221
10222 else
10223   echo "$ac_t""no" 1>&6
10224 fi
10225
10226         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10227 fi
10228
10229 if test "$ac_cv_func_res_query" = yes ; then
10230         cat >> confdefs.h <<\EOF
10231 #define HAVE_RES_QUERY 1
10232 EOF
10233
10234
10235         if test $ol_enable_dnssrv != no ; then
10236                 ol_link_dnssrv=yes
10237         fi
10238 fi
10239
10240 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10241         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10242 fi
10243
10244 for ac_func in getaddrinfo gai_strerror inet_ntop 
10245 do
10246 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10247 echo "configure:10248: checking for $ac_func" >&5
10248 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10249   echo $ac_n "(cached) $ac_c" 1>&6
10250 else
10251   cat > conftest.$ac_ext <<EOF
10252 #line 10253 "configure"
10253 #include "confdefs.h"
10254 /* System header to define __stub macros and hopefully few prototypes,
10255     which can conflict with char $ac_func(); below.  */
10256 #include <assert.h>
10257 /* Override any gcc2 internal prototype to avoid an error.  */
10258 /* We use char because int might match the return type of a gcc2
10259     builtin and then its argument prototype would still apply.  */
10260 char $ac_func();
10261 char (*f)();
10262
10263 int main() {
10264
10265 /* The GNU C library defines this for functions which it implements
10266     to always fail with ENOSYS.  Some functions are actually named
10267     something starting with __ and the normal name is an alias.  */
10268 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10269 choke me
10270 #else
10271 f = $ac_func;
10272 #endif
10273
10274 ; return 0; }
10275 EOF
10276 if { (eval echo configure:10277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10277   rm -rf conftest*
10278   eval "ac_cv_func_$ac_func=yes"
10279 else
10280   echo "configure: failed program was:" >&5
10281   cat conftest.$ac_ext >&5
10282   rm -rf conftest*
10283   eval "ac_cv_func_$ac_func=no"
10284 fi
10285 rm -f conftest*
10286 fi
10287
10288 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10289   echo "$ac_t""yes" 1>&6
10290     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10291   cat >> confdefs.h <<EOF
10292 #define $ac_tr_func 1
10293 EOF
10294  
10295 else
10296   echo "$ac_t""no" 1>&6
10297 fi
10298 done
10299
10300
10301 ol_link_ipv6=no
10302 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10303         if test $ol_enable_ipv6 = yes ; then
10304                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10305         fi
10306 elif test $ol_enable_ipv6 != no ; then
10307         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10308 echo "configure:10309: checking INET6_ADDRSTRLEN" >&5
10309 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10310   echo $ac_n "(cached) $ac_c" 1>&6
10311 else
10312   
10313                 cat > conftest.$ac_ext <<EOF
10314 #line 10315 "configure"
10315 #include "confdefs.h"
10316
10317 #                       include <netinet/in.h>
10318 #                       ifdef INET6_ADDRSTRLEN
10319                                 __has_inet6_addrstrlen__;
10320 #                       endif
10321                 
10322 EOF
10323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10324   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10325   rm -rf conftest*
10326   ol_cv_inet6_addrstrlen=yes
10327 else
10328   rm -rf conftest*
10329   ol_cv_inet6_addrstrlen=no
10330 fi
10331 rm -f conftest*
10332
10333 fi
10334
10335 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10336
10337         if test $ol_cv_inet6_addrstrlen = yes ; then
10338                 ol_link_ipv6=yes
10339         elif test $ol_enable_ipv6 = yes ; then
10340                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10341         fi
10342 fi
10343
10344 if test $ol_enable_local != no ; then
10345         for ac_hdr in sys/un.h 
10346 do
10347 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10348 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10349 echo "configure:10350: checking for $ac_hdr" >&5
10350 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10351   echo $ac_n "(cached) $ac_c" 1>&6
10352 else
10353   cat > conftest.$ac_ext <<EOF
10354 #line 10355 "configure"
10355 #include "confdefs.h"
10356 #include <$ac_hdr>
10357 EOF
10358 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10359 { (eval echo configure:10360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10360 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10361 if test -z "$ac_err"; then
10362   rm -rf conftest*
10363   eval "ac_cv_header_$ac_safe=yes"
10364 else
10365   echo "$ac_err" >&5
10366   echo "configure: failed program was:" >&5
10367   cat conftest.$ac_ext >&5
10368   rm -rf conftest*
10369   eval "ac_cv_header_$ac_safe=no"
10370 fi
10371 rm -f conftest*
10372 fi
10373 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10374   echo "$ac_t""yes" 1>&6
10375     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10376   cat >> confdefs.h <<EOF
10377 #define $ac_tr_hdr 1
10378 EOF
10379  
10380 else
10381   echo "$ac_t""no" 1>&6
10382 fi
10383 done
10384
10385
10386         if test $ol_enable_local = auto ; then
10387                 ol_enable_local=$ac_cv_header_sys_un_h
10388         elif test $ac_cv_header_sys_un_h = no ; then
10389                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10390         fi
10391 fi
10392
10393 ol_link_kbind=no
10394 ol_link_kpasswd=no
10395 ol_link_krb5=no
10396 ol_link_krb4=no
10397
10398 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10399         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10400         -o $ol_with_kerberos = k425 ; then
10401
10402         for ac_hdr in krb5.h
10403 do
10404 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10405 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10406 echo "configure:10407: checking for $ac_hdr" >&5
10407 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10408   echo $ac_n "(cached) $ac_c" 1>&6
10409 else
10410   cat > conftest.$ac_ext <<EOF
10411 #line 10412 "configure"
10412 #include "confdefs.h"
10413 #include <$ac_hdr>
10414 EOF
10415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10416 { (eval echo configure:10417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10418 if test -z "$ac_err"; then
10419   rm -rf conftest*
10420   eval "ac_cv_header_$ac_safe=yes"
10421 else
10422   echo "$ac_err" >&5
10423   echo "configure: failed program was:" >&5
10424   cat conftest.$ac_ext >&5
10425   rm -rf conftest*
10426   eval "ac_cv_header_$ac_safe=no"
10427 fi
10428 rm -f conftest*
10429 fi
10430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10431   echo "$ac_t""yes" 1>&6
10432     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10433   cat >> confdefs.h <<EOF
10434 #define $ac_tr_hdr 1
10435 EOF
10436  
10437 else
10438   echo "$ac_t""no" 1>&6
10439 fi
10440 done
10441
10442
10443         if test $ac_cv_header_krb5_h = yes ; then
10444                                 for ac_hdr in heim_err.h
10445 do
10446 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10447 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10448 echo "configure:10449: checking for $ac_hdr" >&5
10449 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10450   echo $ac_n "(cached) $ac_c" 1>&6
10451 else
10452   cat > conftest.$ac_ext <<EOF
10453 #line 10454 "configure"
10454 #include "confdefs.h"
10455 #include <$ac_hdr>
10456 EOF
10457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10458 { (eval echo configure:10459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10460 if test -z "$ac_err"; then
10461   rm -rf conftest*
10462   eval "ac_cv_header_$ac_safe=yes"
10463 else
10464   echo "$ac_err" >&5
10465   echo "configure: failed program was:" >&5
10466   cat conftest.$ac_ext >&5
10467   rm -rf conftest*
10468   eval "ac_cv_header_$ac_safe=no"
10469 fi
10470 rm -f conftest*
10471 fi
10472 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10473   echo "$ac_t""yes" 1>&6
10474     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10475   cat >> confdefs.h <<EOF
10476 #define $ac_tr_hdr 1
10477 EOF
10478  
10479 else
10480   echo "$ac_t""no" 1>&6
10481 fi
10482 done
10483
10484                 if test $ac_cv_header_heim_err_h = yes ; then
10485                         krb5_impl=heimdal
10486                 else
10487                         krb5_impl=mit
10488                 fi
10489
10490                 if test $krb5_impl = mit; then
10491                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10492 echo "configure:10493: checking for main in -lk5crypto" >&5
10493 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10494 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10495   echo $ac_n "(cached) $ac_c" 1>&6
10496 else
10497   ac_save_LIBS="$LIBS"
10498 LIBS="-lk5crypto  $LIBS"
10499 cat > conftest.$ac_ext <<EOF
10500 #line 10501 "configure"
10501 #include "confdefs.h"
10502
10503 int main() {
10504 main()
10505 ; return 0; }
10506 EOF
10507 if { (eval echo configure:10508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10508   rm -rf conftest*
10509   eval "ac_cv_lib_$ac_lib_var=yes"
10510 else
10511   echo "configure: failed program was:" >&5
10512   cat conftest.$ac_ext >&5
10513   rm -rf conftest*
10514   eval "ac_cv_lib_$ac_lib_var=no"
10515 fi
10516 rm -f conftest*
10517 LIBS="$ac_save_LIBS"
10518
10519 fi
10520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10521   echo "$ac_t""yes" 1>&6
10522   krb5crypto=k5crypto
10523 else
10524   echo "$ac_t""no" 1>&6
10525 krb5crypto=crypto
10526 fi
10527
10528
10529                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10530 echo "configure:10531: checking for main in -lkrb5" >&5
10531 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10532 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10533   echo $ac_n "(cached) $ac_c" 1>&6
10534 else
10535   ac_save_LIBS="$LIBS"
10536 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10537 cat > conftest.$ac_ext <<EOF
10538 #line 10539 "configure"
10539 #include "confdefs.h"
10540
10541 int main() {
10542 main()
10543 ; return 0; }
10544 EOF
10545 if { (eval echo configure:10546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10546   rm -rf conftest*
10547   eval "ac_cv_lib_$ac_lib_var=yes"
10548 else
10549   echo "configure: failed program was:" >&5
10550   cat conftest.$ac_ext >&5
10551   rm -rf conftest*
10552   eval "ac_cv_lib_$ac_lib_var=no"
10553 fi
10554 rm -f conftest*
10555 LIBS="$ac_save_LIBS"
10556
10557 fi
10558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10559   echo "$ac_t""yes" 1>&6
10560   have_krb5=yes
10561                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10562 else
10563   echo "$ac_t""no" 1>&6
10564 have_krb5=no
10565 fi
10566
10567
10568                 elif test $krb5_impl = heimdal; then
10569                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10570 echo "configure:10571: checking for main in -ldes" >&5
10571 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10572 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10573   echo $ac_n "(cached) $ac_c" 1>&6
10574 else
10575   ac_save_LIBS="$LIBS"
10576 LIBS="-ldes  $LIBS"
10577 cat > conftest.$ac_ext <<EOF
10578 #line 10579 "configure"
10579 #include "confdefs.h"
10580
10581 int main() {
10582 main()
10583 ; return 0; }
10584 EOF
10585 if { (eval echo configure:10586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10586   rm -rf conftest*
10587   eval "ac_cv_lib_$ac_lib_var=yes"
10588 else
10589   echo "configure: failed program was:" >&5
10590   cat conftest.$ac_ext >&5
10591   rm -rf conftest*
10592   eval "ac_cv_lib_$ac_lib_var=no"
10593 fi
10594 rm -f conftest*
10595 LIBS="$ac_save_LIBS"
10596
10597 fi
10598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10599   echo "$ac_t""yes" 1>&6
10600   krb5crypto=des
10601 else
10602   echo "$ac_t""no" 1>&6
10603 krb5crypto=crypto
10604 fi
10605
10606
10607                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10608 echo "configure:10609: checking for main in -lkrb5" >&5
10609 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10610 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10611   echo $ac_n "(cached) $ac_c" 1>&6
10612 else
10613   ac_save_LIBS="$LIBS"
10614 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10615 cat > conftest.$ac_ext <<EOF
10616 #line 10617 "configure"
10617 #include "confdefs.h"
10618
10619 int main() {
10620 main()
10621 ; return 0; }
10622 EOF
10623 if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10624   rm -rf conftest*
10625   eval "ac_cv_lib_$ac_lib_var=yes"
10626 else
10627   echo "configure: failed program was:" >&5
10628   cat conftest.$ac_ext >&5
10629   rm -rf conftest*
10630   eval "ac_cv_lib_$ac_lib_var=no"
10631 fi
10632 rm -f conftest*
10633 LIBS="$ac_save_LIBS"
10634
10635 fi
10636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10637   echo "$ac_t""yes" 1>&6
10638   have_krb5=yes
10639                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10640 else
10641   echo "$ac_t""no" 1>&6
10642 have_krb5=no
10643 fi
10644
10645
10646                         cat >> confdefs.h <<\EOF
10647 #define HAVE_HEIMDAL_KERBEROS 1
10648 EOF
10649
10650
10651                 else
10652                         have_krb5=no
10653                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10654                 fi
10655
10656                 if test $have_krb5 = yes ; then
10657                         ol_link_krb5=yes
10658
10659                         cat >> confdefs.h <<\EOF
10660 #define HAVE_KRB5 1
10661 EOF
10662
10663
10664                         if test $ol_enable_kpasswd != no ; then
10665                                 ol_link_kpasswd=yes;
10666                         fi
10667
10668                         if test $ol_with_kerberos = k5only ; then
10669                                 ol_with_kerberos=found
10670                         fi
10671
10672                 elif test $ol_with_kerberos != auto ; then
10673                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10674                 fi
10675
10676         fi
10677 fi
10678
10679 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10680         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10681
10682         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10683 do
10684 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10685 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10686 echo "configure:10687: checking for $ac_hdr" >&5
10687 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10688   echo $ac_n "(cached) $ac_c" 1>&6
10689 else
10690   cat > conftest.$ac_ext <<EOF
10691 #line 10692 "configure"
10692 #include "confdefs.h"
10693 #include <$ac_hdr>
10694 EOF
10695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10696 { (eval echo configure:10697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10698 if test -z "$ac_err"; then
10699   rm -rf conftest*
10700   eval "ac_cv_header_$ac_safe=yes"
10701 else
10702   echo "$ac_err" >&5
10703   echo "configure: failed program was:" >&5
10704   cat conftest.$ac_ext >&5
10705   rm -rf conftest*
10706   eval "ac_cv_header_$ac_safe=no"
10707 fi
10708 rm -f conftest*
10709 fi
10710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10711   echo "$ac_t""yes" 1>&6
10712     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10713   cat >> confdefs.h <<EOF
10714 #define $ac_tr_hdr 1
10715 EOF
10716  
10717 else
10718   echo "$ac_t""no" 1>&6
10719 fi
10720 done
10721
10722
10723         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10724                 if test $krb5_impl = mit; then
10725                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10726 echo "configure:10727: checking for main in -lkrb4" >&5
10727 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10728 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10729   echo $ac_n "(cached) $ac_c" 1>&6
10730 else
10731   ac_save_LIBS="$LIBS"
10732 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10733 cat > conftest.$ac_ext <<EOF
10734 #line 10735 "configure"
10735 #include "confdefs.h"
10736
10737 int main() {
10738 main()
10739 ; return 0; }
10740 EOF
10741 if { (eval echo configure:10742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10742   rm -rf conftest*
10743   eval "ac_cv_lib_$ac_lib_var=yes"
10744 else
10745   echo "configure: failed program was:" >&5
10746   cat conftest.$ac_ext >&5
10747   rm -rf conftest*
10748   eval "ac_cv_lib_$ac_lib_var=no"
10749 fi
10750 rm -f conftest*
10751 LIBS="$ac_save_LIBS"
10752
10753 fi
10754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10755   echo "$ac_t""yes" 1>&6
10756   have_k425=yes
10757                                 KRB4_LIBS="-lkrb4 -ldes425"
10758 else
10759   echo "$ac_t""no" 1>&6
10760 have_k425=no
10761 fi
10762
10763
10764                 elif test $krb5_impl = heimdal; then
10765                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10766 echo "configure:10767: checking for main in -lkrb4" >&5
10767 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10768 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10769   echo $ac_n "(cached) $ac_c" 1>&6
10770 else
10771   ac_save_LIBS="$LIBS"
10772 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10773 cat > conftest.$ac_ext <<EOF
10774 #line 10775 "configure"
10775 #include "confdefs.h"
10776
10777 int main() {
10778 main()
10779 ; return 0; }
10780 EOF
10781 if { (eval echo configure:10782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10782   rm -rf conftest*
10783   eval "ac_cv_lib_$ac_lib_var=yes"
10784 else
10785   echo "configure: failed program was:" >&5
10786   cat conftest.$ac_ext >&5
10787   rm -rf conftest*
10788   eval "ac_cv_lib_$ac_lib_var=no"
10789 fi
10790 rm -f conftest*
10791 LIBS="$ac_save_LIBS"
10792
10793 fi
10794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10795   echo "$ac_t""yes" 1>&6
10796   have_k425=yes
10797                                 KRB4_LIBS="-lkrb4"
10798 else
10799   echo "$ac_t""no" 1>&6
10800 have_k425=no
10801 fi
10802
10803
10804                 else
10805                         have_425=no
10806                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10807                 fi
10808
10809                 if test $have_k425 = yes ; then
10810                         ol_with_kerberos=found
10811                         ol_link_krb4=yes
10812
10813                         cat >> confdefs.h <<\EOF
10814 #define HAVE_KRB425 1
10815 EOF
10816
10817                         cat >> confdefs.h <<\EOF
10818 #define HAVE_KRB4 1
10819 EOF
10820
10821
10822                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10823 echo "configure:10824: checking for des_debug in Kerberos libraries" >&5
10824 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10825   echo $ac_n "(cached) $ac_c" 1>&6
10826 else
10827   
10828                                                                 save_LIBS="$LIBS"
10829                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10830                                 cat > conftest.$ac_ext <<EOF
10831 #line 10832 "configure"
10832 #include "confdefs.h"
10833
10834 #include <kerberosIV/krb.h>
10835 #include <kerberosIV/des.h>
10836 extern int des_debug;
10837
10838 int main() {
10839
10840 des_debug = 1;
10841
10842 ; return 0; }
10843 EOF
10844 if { (eval echo configure:10845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10845   rm -rf conftest*
10846   ol_cv_var_des_debug=yes
10847 else
10848   echo "configure: failed program was:" >&5
10849   cat conftest.$ac_ext >&5
10850   rm -rf conftest*
10851   ol_cv_var_des_debug=no
10852 fi
10853 rm -f conftest*
10854                                                                 LIBS="$save_LIBS"
10855                         
10856 fi
10857
10858 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10859
10860                         if test $ol_cv_var_des_debug = yes ; then
10861                                 cat >> confdefs.h <<\EOF
10862 #define HAVE_DES_DEBUG 1
10863 EOF
10864
10865                         fi
10866
10867                         LIBS="$save_LIBS"
10868                 fi
10869         fi
10870 fi
10871
10872 if test $ol_link_krb5 = yes ; then
10873         ol_with_kerberos=found
10874 fi
10875
10876 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10877         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10878
10879         for ac_hdr in krb.h des.h krb-archaeology.h 
10880 do
10881 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10882 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10883 echo "configure:10884: checking for $ac_hdr" >&5
10884 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10885   echo $ac_n "(cached) $ac_c" 1>&6
10886 else
10887   cat > conftest.$ac_ext <<EOF
10888 #line 10889 "configure"
10889 #include "confdefs.h"
10890 #include <$ac_hdr>
10891 EOF
10892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10893 { (eval echo configure:10894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10895 if test -z "$ac_err"; then
10896   rm -rf conftest*
10897   eval "ac_cv_header_$ac_safe=yes"
10898 else
10899   echo "$ac_err" >&5
10900   echo "configure: failed program was:" >&5
10901   cat conftest.$ac_ext >&5
10902   rm -rf conftest*
10903   eval "ac_cv_header_$ac_safe=no"
10904 fi
10905 rm -f conftest*
10906 fi
10907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10908   echo "$ac_t""yes" 1>&6
10909     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10910   cat >> confdefs.h <<EOF
10911 #define $ac_tr_hdr 1
10912 EOF
10913  
10914 else
10915   echo "$ac_t""no" 1>&6
10916 fi
10917 done
10918
10919
10920         if test $ac_cv_header_krb_h = yes ; then
10921                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10922 echo "configure:10923: checking for main in -lkrb" >&5
10923 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10924 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10925   echo $ac_n "(cached) $ac_c" 1>&6
10926 else
10927   ac_save_LIBS="$LIBS"
10928 LIBS="-lkrb -ldes $LIBS"
10929 cat > conftest.$ac_ext <<EOF
10930 #line 10931 "configure"
10931 #include "confdefs.h"
10932
10933 int main() {
10934 main()
10935 ; return 0; }
10936 EOF
10937 if { (eval echo configure:10938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10938   rm -rf conftest*
10939   eval "ac_cv_lib_$ac_lib_var=yes"
10940 else
10941   echo "configure: failed program was:" >&5
10942   cat conftest.$ac_ext >&5
10943   rm -rf conftest*
10944   eval "ac_cv_lib_$ac_lib_var=no"
10945 fi
10946 rm -f conftest*
10947 LIBS="$ac_save_LIBS"
10948
10949 fi
10950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10951   echo "$ac_t""yes" 1>&6
10952   have_k4=yes
10953 else
10954   echo "$ac_t""no" 1>&6
10955 have_k4=no
10956 fi
10957
10958
10959                 if test $have_k4 = yes ; then
10960                         ol_with_kerberos=found
10961                         ol_link_krb4=yes
10962
10963                         cat >> confdefs.h <<\EOF
10964 #define HAVE_KRB4 1
10965 EOF
10966
10967
10968                         KRB4_LIBS="-lkrb -ldes"
10969
10970                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10971                                 cat >> confdefs.h <<\EOF
10972 #define HAVE_KTH_KERBEROS 1
10973 EOF
10974
10975                         fi
10976                 fi
10977         fi
10978 fi
10979
10980 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10981         ol_link_kpasswd=yes
10982 fi
10983
10984 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10985         ol_link_kbind=yes
10986
10987 elif test $ol_enable_kbind = yes ; then
10988         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10989 fi
10990
10991 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10992         cat >> confdefs.h <<\EOF
10993 #define HAVE_KERBEROS 1
10994 EOF
10995
10996
10997 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10998         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10999 fi
11000
11001 ol_link_tls=no
11002 if test $ol_with_tls != no ; then
11003         for ac_hdr in openssl/ssl.h ssl.h
11004 do
11005 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11006 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11007 echo "configure:11008: checking for $ac_hdr" >&5
11008 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11009   echo $ac_n "(cached) $ac_c" 1>&6
11010 else
11011   cat > conftest.$ac_ext <<EOF
11012 #line 11013 "configure"
11013 #include "confdefs.h"
11014 #include <$ac_hdr>
11015 EOF
11016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11017 { (eval echo configure:11018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11019 if test -z "$ac_err"; then
11020   rm -rf conftest*
11021   eval "ac_cv_header_$ac_safe=yes"
11022 else
11023   echo "$ac_err" >&5
11024   echo "configure: failed program was:" >&5
11025   cat conftest.$ac_ext >&5
11026   rm -rf conftest*
11027   eval "ac_cv_header_$ac_safe=no"
11028 fi
11029 rm -f conftest*
11030 fi
11031 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11032   echo "$ac_t""yes" 1>&6
11033     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11034   cat >> confdefs.h <<EOF
11035 #define $ac_tr_hdr 1
11036 EOF
11037  
11038 else
11039   echo "$ac_t""no" 1>&6
11040 fi
11041 done
11042
11043         
11044         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
11045                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11046 echo "configure:11047: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11047 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11048 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11049   echo $ac_n "(cached) $ac_c" 1>&6
11050 else
11051   ac_save_LIBS="$LIBS"
11052 LIBS="-lssl -lcrypto $LIBS"
11053 cat > conftest.$ac_ext <<EOF
11054 #line 11055 "configure"
11055 #include "confdefs.h"
11056 /* Override any gcc2 internal prototype to avoid an error.  */
11057 /* We use char because int might match the return type of a gcc2
11058     builtin and then its argument prototype would still apply.  */
11059 char SSLeay_add_ssl_algorithms();
11060
11061 int main() {
11062 SSLeay_add_ssl_algorithms()
11063 ; return 0; }
11064 EOF
11065 if { (eval echo configure:11066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11066   rm -rf conftest*
11067   eval "ac_cv_lib_$ac_lib_var=yes"
11068 else
11069   echo "configure: failed program was:" >&5
11070   cat conftest.$ac_ext >&5
11071   rm -rf conftest*
11072   eval "ac_cv_lib_$ac_lib_var=no"
11073 fi
11074 rm -f conftest*
11075 LIBS="$ac_save_LIBS"
11076
11077 fi
11078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11079   echo "$ac_t""yes" 1>&6
11080   have_ssleay=yes
11081                         need_rsaref=no
11082 else
11083   echo "$ac_t""no" 1>&6
11084 have_ssleay=no
11085 fi
11086
11087                         
11088                 if test $have_ssleay = no ; then
11089                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11090 echo "configure:11091: checking for SSL_library_init in -lssl" >&5
11091 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11092 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11093   echo $ac_n "(cached) $ac_c" 1>&6
11094 else
11095   ac_save_LIBS="$LIBS"
11096 LIBS="-lssl -lcrypto $LIBS"
11097 cat > conftest.$ac_ext <<EOF
11098 #line 11099 "configure"
11099 #include "confdefs.h"
11100 /* Override any gcc2 internal prototype to avoid an error.  */
11101 /* We use char because int might match the return type of a gcc2
11102     builtin and then its argument prototype would still apply.  */
11103 char SSL_library_init();
11104
11105 int main() {
11106 SSL_library_init()
11107 ; return 0; }
11108 EOF
11109 if { (eval echo configure:11110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11110   rm -rf conftest*
11111   eval "ac_cv_lib_$ac_lib_var=yes"
11112 else
11113   echo "configure: failed program was:" >&5
11114   cat conftest.$ac_ext >&5
11115   rm -rf conftest*
11116   eval "ac_cv_lib_$ac_lib_var=no"
11117 fi
11118 rm -f conftest*
11119 LIBS="$ac_save_LIBS"
11120
11121 fi
11122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11123   echo "$ac_t""yes" 1>&6
11124   have_ssleay=yes
11125                                 need_rsaref=no
11126 else
11127   echo "$ac_t""no" 1>&6
11128 have_ssleay=no
11129 fi
11130
11131                 fi
11132
11133                 if test $have_ssleay = no ; then
11134                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11135 echo "configure:11136: checking for ssl3_accept in -lssl" >&5
11136 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11137 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11138   echo $ac_n "(cached) $ac_c" 1>&6
11139 else
11140   ac_save_LIBS="$LIBS"
11141 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11142 cat > conftest.$ac_ext <<EOF
11143 #line 11144 "configure"
11144 #include "confdefs.h"
11145 /* Override any gcc2 internal prototype to avoid an error.  */
11146 /* We use char because int might match the return type of a gcc2
11147     builtin and then its argument prototype would still apply.  */
11148 char ssl3_accept();
11149
11150 int main() {
11151 ssl3_accept()
11152 ; return 0; }
11153 EOF
11154 if { (eval echo configure:11155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11155   rm -rf conftest*
11156   eval "ac_cv_lib_$ac_lib_var=yes"
11157 else
11158   echo "configure: failed program was:" >&5
11159   cat conftest.$ac_ext >&5
11160   rm -rf conftest*
11161   eval "ac_cv_lib_$ac_lib_var=no"
11162 fi
11163 rm -f conftest*
11164 LIBS="$ac_save_LIBS"
11165
11166 fi
11167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11168   echo "$ac_t""yes" 1>&6
11169   have_ssleay=yes
11170                                 need_rsaref=yes
11171 else
11172   echo "$ac_t""no" 1>&6
11173 have_ssleay=no
11174 fi
11175
11176                 fi
11177
11178                 if test $have_ssleay = yes ; then
11179                         ol_with_tls=found
11180                         ol_link_tls=yes
11181
11182                         cat >> confdefs.h <<\EOF
11183 #define HAVE_SSLEAY 1
11184 EOF
11185
11186
11187                         if test $need_rsaref = yes; then
11188                                 cat >> confdefs.h <<\EOF
11189 #define HAVE_RSAREF 1
11190 EOF
11191
11192
11193                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11194                         else
11195                                 TLS_LIBS="-lssl -lcrypto"
11196                         fi
11197                 fi
11198         fi
11199
11200 else
11201         echo "configure: warning: TLS data protection not supported!" 1>&2
11202 fi
11203
11204 if test $ol_link_tls = yes ; then
11205         cat >> confdefs.h <<\EOF
11206 #define HAVE_TLS 1
11207 EOF
11208
11209
11210 elif test $ol_with_tls = auto ; then
11211         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11212         echo "configure: warning: TLS data protection not supported!" 1>&2
11213
11214 elif test $ol_with_tls != no ; then
11215         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11216 fi
11217
11218 if test $ol_enable_lmpasswd != no; then
11219         if test $ol_link_tls != yes ; then
11220                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11221         fi
11222
11223         cat >> confdefs.h <<\EOF
11224 #define SLAPD_LMHASH 1
11225 EOF
11226
11227 fi
11228
11229 for ac_func in \
11230         ctime_r                 \
11231         gethostbyname_r gethostbyaddr_r \
11232
11233 do
11234 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11235 echo "configure:11236: checking for $ac_func" >&5
11236 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11237   echo $ac_n "(cached) $ac_c" 1>&6
11238 else
11239   cat > conftest.$ac_ext <<EOF
11240 #line 11241 "configure"
11241 #include "confdefs.h"
11242 /* System header to define __stub macros and hopefully few prototypes,
11243     which can conflict with char $ac_func(); below.  */
11244 #include <assert.h>
11245 /* Override any gcc2 internal prototype to avoid an error.  */
11246 /* We use char because int might match the return type of a gcc2
11247     builtin and then its argument prototype would still apply.  */
11248 char $ac_func();
11249 char (*f)();
11250
11251 int main() {
11252
11253 /* The GNU C library defines this for functions which it implements
11254     to always fail with ENOSYS.  Some functions are actually named
11255     something starting with __ and the normal name is an alias.  */
11256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11257 choke me
11258 #else
11259 f = $ac_func;
11260 #endif
11261
11262 ; return 0; }
11263 EOF
11264 if { (eval echo configure:11265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11265   rm -rf conftest*
11266   eval "ac_cv_func_$ac_func=yes"
11267 else
11268   echo "configure: failed program was:" >&5
11269   cat conftest.$ac_ext >&5
11270   rm -rf conftest*
11271   eval "ac_cv_func_$ac_func=no"
11272 fi
11273 rm -f conftest*
11274 fi
11275
11276 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11277   echo "$ac_t""yes" 1>&6
11278     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11279   cat >> confdefs.h <<EOF
11280 #define $ac_tr_func 1
11281 EOF
11282  
11283 else
11284   echo "$ac_t""no" 1>&6
11285 fi
11286 done
11287
11288
11289 if test "$ac_cv_func_ctime_r" = no ; then
11290         ol_cv_func_ctime_r_nargs=0
11291 else
11292         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11293 echo "configure:11294: checking number of arguments of ctime_r" >&5
11294 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11295   echo $ac_n "(cached) $ac_c" 1>&6
11296 else
11297   cat > conftest.$ac_ext <<EOF
11298 #line 11299 "configure"
11299 #include "confdefs.h"
11300 #include <time.h>
11301 int main() {
11302 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11303 ; return 0; }
11304 EOF
11305 if { (eval echo configure:11306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11306   rm -rf conftest*
11307   ol_cv_func_ctime_r_nargs3=yes
11308 else
11309   echo "configure: failed program was:" >&5
11310   cat conftest.$ac_ext >&5
11311   rm -rf conftest*
11312   ol_cv_func_ctime_r_nargs3=no
11313 fi
11314 rm -f conftest*
11315
11316         cat > conftest.$ac_ext <<EOF
11317 #line 11318 "configure"
11318 #include "confdefs.h"
11319 #include <time.h>
11320 int main() {
11321 time_t ti; char *buffer; ctime_r(&ti,buffer);
11322 ; return 0; }
11323 EOF
11324 if { (eval echo configure:11325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11325   rm -rf conftest*
11326   ol_cv_func_ctime_r_nargs2=yes
11327 else
11328   echo "configure: failed program was:" >&5
11329   cat conftest.$ac_ext >&5
11330   rm -rf conftest*
11331   ol_cv_func_ctime_r_nargs2=no
11332 fi
11333 rm -f conftest*
11334
11335         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11336                 $ol_cv_func_ctime_r_nargs2 = no ; then
11337
11338                 ol_cv_func_ctime_r_nargs=3
11339
11340         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11341                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11342
11343                 ol_cv_func_ctime_r_nargs=2
11344
11345         else
11346                 ol_cv_func_ctime_r_nargs=0
11347         fi
11348   
11349 fi
11350
11351 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11352
11353   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11354         cat >> confdefs.h <<EOF
11355 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11356 EOF
11357
11358   fi
11359
11360 fi
11361
11362 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11363         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11364 echo "configure:11365: checking number of arguments of gethostbyname_r" >&5
11365 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11366   echo $ac_n "(cached) $ac_c" 1>&6
11367 else
11368   cat > conftest.$ac_ext <<EOF
11369 #line 11370 "configure"
11370 #include "confdefs.h"
11371 #include <sys/types.h>
11372 #include <sys/socket.h>
11373 #include <netinet/in.h>
11374 #include <netdb.h>
11375 #define BUFSIZE (sizeof(struct hostent)+10)
11376 int main() {
11377 struct hostent hent; char buffer[BUFSIZE];
11378                 int bufsize=BUFSIZE;int h_errno;
11379                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11380                         buffer, bufsize, &h_errno);
11381 ; return 0; }
11382 EOF
11383 if { (eval echo configure:11384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11384   rm -rf conftest*
11385   ol_cv_func_gethostbyname_r_nargs5=yes
11386 else
11387   echo "configure: failed program was:" >&5
11388   cat conftest.$ac_ext >&5
11389   rm -rf conftest*
11390   ol_cv_func_gethostbyname_r_nargs5=no
11391 fi
11392 rm -f conftest*
11393
11394         cat > conftest.$ac_ext <<EOF
11395 #line 11396 "configure"
11396 #include "confdefs.h"
11397 #include <sys/types.h>
11398 #include <sys/socket.h>
11399 #include <netinet/in.h>
11400 #include <netdb.h>
11401 #define BUFSIZE (sizeof(struct hostent)+10)
11402 int main() {
11403 struct hostent hent;struct hostent *rhent;
11404                 char buffer[BUFSIZE];
11405                 int bufsize=BUFSIZE;int h_errno;
11406                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11407                         &rhent, &h_errno);
11408 ; return 0; }
11409 EOF
11410 if { (eval echo configure:11411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11411   rm -rf conftest*
11412   ol_cv_func_gethostbyname_r_nargs6=yes
11413 else
11414   echo "configure: failed program was:" >&5
11415   cat conftest.$ac_ext >&5
11416   rm -rf conftest*
11417   ol_cv_func_gethostbyname_r_nargs6=no
11418 fi
11419 rm -f conftest*
11420
11421         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11422                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11423
11424                 ol_cv_func_gethostbyname_r_nargs=5
11425
11426         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11427                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11428
11429                 ol_cv_func_gethostbyname_r_nargs=6
11430
11431         else
11432                 ol_cv_func_gethostbyname_r_nargs=0
11433         fi
11434   
11435 fi
11436
11437 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11438   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11439         cat >> confdefs.h <<EOF
11440 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11441 EOF
11442
11443   fi
11444
11445 else
11446         ol_cv_func_gethostbyname_r_nargs=0
11447 fi
11448  
11449 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11450         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11451 echo "configure:11452: checking number of arguments of gethostbyaddr_r" >&5
11452 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11453   echo $ac_n "(cached) $ac_c" 1>&6
11454 else
11455   cat > conftest.$ac_ext <<EOF
11456 #line 11457 "configure"
11457 #include "confdefs.h"
11458 #include <sys/types.h>
11459 #include <sys/socket.h>
11460 #include <netinet/in.h>
11461 #include <netdb.h>
11462 #define BUFSIZE (sizeof(struct hostent)+10)
11463 int main() {
11464 struct hostent hent; char buffer[BUFSIZE]; 
11465             struct in_addr add;
11466             size_t alen=sizeof(struct in_addr);
11467             int bufsize=BUFSIZE;int h_errno;
11468                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11469                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11470 ; return 0; }
11471 EOF
11472 if { (eval echo configure:11473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11473   rm -rf conftest*
11474   ol_cv_func_gethostbyaddr_r_nargs7=yes
11475 else
11476   echo "configure: failed program was:" >&5
11477   cat conftest.$ac_ext >&5
11478   rm -rf conftest*
11479   ol_cv_func_gethostbyaddr_r_nargs7=no
11480 fi
11481 rm -f conftest*
11482
11483         cat > conftest.$ac_ext <<EOF
11484 #line 11485 "configure"
11485 #include "confdefs.h"
11486 #include <sys/types.h>
11487 #include <sys/socket.h>
11488 #include <netinet/in.h>
11489 #include <netdb.h>
11490 #define BUFSIZE (sizeof(struct hostent)+10)
11491 int main() {
11492 struct hostent hent;
11493                 struct hostent *rhent; char buffer[BUFSIZE]; 
11494                 struct in_addr add;
11495                 size_t alen=sizeof(struct in_addr);
11496                 int bufsize=BUFSIZE;int h_errno;
11497                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11498                         alen, AF_INET, &hent, buffer, bufsize, 
11499                         &rhent, &h_errno);
11500 ; return 0; }
11501 EOF
11502 if { (eval echo configure:11503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11503   rm -rf conftest*
11504   ol_cv_func_gethostbyaddr_r_nargs8=yes
11505 else
11506   echo "configure: failed program was:" >&5
11507   cat conftest.$ac_ext >&5
11508   rm -rf conftest*
11509   ol_cv_func_gethostbyaddr_r_nargs8=no
11510 fi
11511 rm -f conftest*
11512
11513         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11514                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11515
11516                 ol_cv_func_gethostbyaddr_r_nargs=7
11517
11518         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11519                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11520
11521                 ol_cv_func_gethostbyaddr_r_nargs=8
11522
11523         else
11524                 ol_cv_func_gethostbyaddr_r_nargs=0
11525         fi
11526   
11527 fi
11528
11529 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11530   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11531     cat >> confdefs.h <<EOF
11532 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11533 EOF
11534
11535   fi
11536
11537 else
11538         ol_cv_func_gethostbyaddr_r_nargs=0
11539 fi
11540
11541 if test "$ac_cv_func_ctime_r" = yes \
11542         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11543         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11544         -a "$ac_cv_func_gethostbyname_r" = yes \
11545         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11546         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11547         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11548         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11549         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11550         ; then
11551  
11552         cat >> confdefs.h <<\EOF
11553 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11554 EOF
11555
11556 fi
11557
11558 ol_link_threads=no
11559
11560 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11561         -o $ol_with_threads = nt ; then
11562
11563         
11564         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11565 echo "configure:11566: checking for _beginthread" >&5
11566 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11567   echo $ac_n "(cached) $ac_c" 1>&6
11568 else
11569   cat > conftest.$ac_ext <<EOF
11570 #line 11571 "configure"
11571 #include "confdefs.h"
11572 /* System header to define __stub macros and hopefully few prototypes,
11573     which can conflict with char _beginthread(); below.  */
11574 #include <assert.h>
11575 /* Override any gcc2 internal prototype to avoid an error.  */
11576 /* We use char because int might match the return type of a gcc2
11577     builtin and then its argument prototype would still apply.  */
11578 char _beginthread();
11579 char (*f)();
11580
11581 int main() {
11582
11583 /* The GNU C library defines this for functions which it implements
11584     to always fail with ENOSYS.  Some functions are actually named
11585     something starting with __ and the normal name is an alias.  */
11586 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11587 choke me
11588 #else
11589 f = _beginthread;
11590 #endif
11591
11592 ; return 0; }
11593 EOF
11594 if { (eval echo configure:11595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11595   rm -rf conftest*
11596   eval "ac_cv_func__beginthread=yes"
11597 else
11598   echo "configure: failed program was:" >&5
11599   cat conftest.$ac_ext >&5
11600   rm -rf conftest*
11601   eval "ac_cv_func__beginthread=no"
11602 fi
11603 rm -f conftest*
11604 fi
11605
11606 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11607   echo "$ac_t""yes" 1>&6
11608   :
11609 else
11610   echo "$ac_t""no" 1>&6
11611 fi
11612
11613
11614         if test $ac_cv_func__beginthread = yes ; then
11615                 cat >> confdefs.h <<\EOF
11616 #define HAVE_NT_THREADS 1
11617 EOF
11618
11619                 ol_cv_nt_threads=yes
11620         fi
11621
11622
11623         if test "$ol_cv_nt_threads" = yes ; then
11624                 ol_link_threads=nt
11625                 ol_with_threads=found
11626                 ol_with_yielding_select=yes
11627
11628                 cat >> confdefs.h <<\EOF
11629 #define HAVE_NT_SERVICE_MANAGER 1
11630 EOF
11631
11632                 cat >> confdefs.h <<\EOF
11633 #define HAVE_NT_EVENT_LOG 1
11634 EOF
11635
11636         fi
11637
11638         if test $ol_with_threads = nt ; then
11639                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11640         fi
11641 fi
11642
11643 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11644         -o $ol_with_threads = posix ; then
11645
11646         for ac_hdr in pthread.h
11647 do
11648 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11649 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11650 echo "configure:11651: checking for $ac_hdr" >&5
11651 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11652   echo $ac_n "(cached) $ac_c" 1>&6
11653 else
11654   cat > conftest.$ac_ext <<EOF
11655 #line 11656 "configure"
11656 #include "confdefs.h"
11657 #include <$ac_hdr>
11658 EOF
11659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11660 { (eval echo configure:11661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11662 if test -z "$ac_err"; then
11663   rm -rf conftest*
11664   eval "ac_cv_header_$ac_safe=yes"
11665 else
11666   echo "$ac_err" >&5
11667   echo "configure: failed program was:" >&5
11668   cat conftest.$ac_ext >&5
11669   rm -rf conftest*
11670   eval "ac_cv_header_$ac_safe=no"
11671 fi
11672 rm -f conftest*
11673 fi
11674 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11675   echo "$ac_t""yes" 1>&6
11676     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11677   cat >> confdefs.h <<EOF
11678 #define $ac_tr_hdr 1
11679 EOF
11680  
11681 else
11682   echo "$ac_t""no" 1>&6
11683 fi
11684 done
11685
11686
11687         if test $ac_cv_header_pthread_h = yes ; then
11688                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11689 echo "configure:11690: checking POSIX thread version" >&5
11690 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11691   echo $ac_n "(cached) $ac_c" 1>&6
11692 else
11693   
11694         cat > conftest.$ac_ext <<EOF
11695 #line 11696 "configure"
11696 #include "confdefs.h"
11697
11698 #               include <pthread.h>
11699                 /* this check could be improved */
11700 #               ifdef PTHREAD_ONCE_INIT
11701                         pthread_version_final;
11702 #               endif
11703         
11704 EOF
11705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11706   egrep "pthread_version_final" >/dev/null 2>&1; then
11707   rm -rf conftest*
11708   ol_pthread_final=yes
11709 else
11710   rm -rf conftest*
11711   ol_pthread_final=no
11712 fi
11713 rm -f conftest*
11714
11715
11716         cat > conftest.$ac_ext <<EOF
11717 #line 11718 "configure"
11718 #include "confdefs.h"
11719
11720 #               include <pthread.h>
11721                 /* this check could be improved */
11722 #               ifdef pthread_once_init
11723                         pthread_version_draft4;
11724 #               endif
11725         
11726 EOF
11727 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11728   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11729   rm -rf conftest*
11730   ol_pthread_draft4=yes
11731 else
11732   rm -rf conftest*
11733   ol_pthread_draft4=no
11734 fi
11735 rm -f conftest*
11736
11737
11738         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11739                 ol_cv_pthread_version=final
11740         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11741                 ol_cv_pthread_version=draft4
11742         else
11743                 ol_cv_pthread_version=unknown
11744         fi
11745
11746 fi
11747
11748 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11749
11750
11751                 if test $ol_cv_pthread_version = final ; then
11752                         cat >> confdefs.h <<\EOF
11753 #define HAVE_PTHREADS_FINAL 1
11754 EOF
11755
11756                 elif test $ol_cv_pthread_version = draft4 ; then
11757                         cat >> confdefs.h <<\EOF
11758 #define HAVE_PTHREADS_D4 1
11759 EOF
11760
11761                 else
11762                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11763                 fi
11764
11765                 # consider threads found
11766                 ol_with_threads=found
11767
11768                 
11769         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11770 echo "configure:11771: checking for LinuxThreads pthread.h" >&5
11771 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11772   echo $ac_n "(cached) $ac_c" 1>&6
11773 else
11774   cat > conftest.$ac_ext <<EOF
11775 #line 11776 "configure"
11776 #include "confdefs.h"
11777 #include <pthread.h>
11778 EOF
11779 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11780   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11781   rm -rf conftest*
11782   ol_cv_header_linux_threads=yes
11783 else
11784   rm -rf conftest*
11785   ol_cv_header_linux_threads=no
11786 fi
11787 rm -f conftest*
11788
11789                 
11790 fi
11791
11792 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11793         if test $ol_cv_header_linux_threads = yes; then
11794                 cat >> confdefs.h <<\EOF
11795 #define HAVE_LINUX_THREADS 1
11796 EOF
11797
11798         fi
11799
11800                 
11801         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11802 echo "configure:11803: checking for GNU Pth pthread.h" >&5
11803 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11804   echo $ac_n "(cached) $ac_c" 1>&6
11805 else
11806   cat > conftest.$ac_ext <<EOF
11807 #line 11808 "configure"
11808 #include "confdefs.h"
11809 #include <pthread.h>
11810 #ifdef _POSIX_THREAD_IS_GNU_PTH
11811         __gnu_pth__;
11812 #endif
11813
11814 EOF
11815 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11816   egrep "__gnu_pth__" >/dev/null 2>&1; then
11817   rm -rf conftest*
11818   ol_cv_header_gnu_pth_pthread_h=yes
11819 else
11820   rm -rf conftest*
11821   ol_cv_header_gnu_pth_pthread_h=no
11822 fi
11823 rm -f conftest*
11824
11825                 
11826 fi
11827
11828 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11829
11830
11831                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11832                         for ac_hdr in sched.h
11833 do
11834 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11835 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11836 echo "configure:11837: checking for $ac_hdr" >&5
11837 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11838   echo $ac_n "(cached) $ac_c" 1>&6
11839 else
11840   cat > conftest.$ac_ext <<EOF
11841 #line 11842 "configure"
11842 #include "confdefs.h"
11843 #include <$ac_hdr>
11844 EOF
11845 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11846 { (eval echo configure:11847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11847 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11848 if test -z "$ac_err"; then
11849   rm -rf conftest*
11850   eval "ac_cv_header_$ac_safe=yes"
11851 else
11852   echo "$ac_err" >&5
11853   echo "configure: failed program was:" >&5
11854   cat conftest.$ac_ext >&5
11855   rm -rf conftest*
11856   eval "ac_cv_header_$ac_safe=no"
11857 fi
11858 rm -f conftest*
11859 fi
11860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11861   echo "$ac_t""yes" 1>&6
11862     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11863   cat >> confdefs.h <<EOF
11864 #define $ac_tr_hdr 1
11865 EOF
11866  
11867 else
11868   echo "$ac_t""no" 1>&6
11869 fi
11870 done
11871
11872                 fi
11873
11874                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11875                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11876 echo "configure:11877: checking for pthread_create in default libraries" >&5
11877 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11878   echo $ac_n "(cached) $ac_c" 1>&6
11879 else
11880   
11881                 if test "$cross_compiling" = yes; then
11882   cat > conftest.$ac_ext <<EOF
11883 #line 11884 "configure"
11884 #include "confdefs.h"
11885 /* pthread test headers */
11886 #include <pthread.h>
11887 #ifndef NULL
11888 #define NULL (void*)0
11889 #endif
11890
11891 static void *task(p)
11892         void *p;
11893 {
11894         return (void *) (p == NULL);
11895 }
11896
11897 int main() {
11898
11899         /* pthread test function */
11900         pthread_t t;
11901         int status;
11902         int detach = 1;
11903
11904 #ifdef HAVE_PTHREADS_FINAL
11905         /* Final pthreads */
11906         pthread_attr_t attr;
11907
11908         status = pthread_attr_init(&attr);
11909         if( status ) return status;
11910
11911 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11912         if( !detach ) {
11913 #if defined( PTHREAD_CREATE_JOINABLE )
11914                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11915 #else
11916                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11917 #endif
11918
11919 #ifdef PTHREAD_CREATE_DETACHED
11920         } else {
11921                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11922 #endif
11923         }
11924         if( status ) return status;
11925 #endif
11926
11927         status = pthread_create( &t, &attr, task, NULL );
11928         if( status ) return status;
11929
11930 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11931         if( detach ) {
11932                 /* give thread a chance to complete */
11933                 /* it should remain joinable and hence detachable */
11934                 sleep( 1 );
11935
11936                 status = pthread_detach( t );
11937                 if( status ) return status;
11938         }
11939 #endif
11940
11941 #else
11942         /* Draft 4 pthreads */
11943         status = pthread_create( &t, pthread_attr_default, task, NULL );
11944         if( status ) return status;
11945
11946         if( detach ) {
11947                 /* give thread a chance to complete */
11948                 /* it should remain joinable and hence detachable */
11949                 sleep( 1 );
11950
11951                 status = pthread_detach( &t );
11952                 if( status ) return status;
11953         }
11954 #endif
11955
11956 #ifdef HAVE_LINUX_THREADS
11957         pthread_kill_other_threads_np();
11958 #endif
11959
11960         return 0;
11961
11962 ; return 0; }
11963 EOF
11964 if { (eval echo configure:11965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11965   rm -rf conftest*
11966   ol_cv_pthread_create=yes
11967 else
11968   echo "configure: failed program was:" >&5
11969   cat conftest.$ac_ext >&5
11970   rm -rf conftest*
11971   ol_cv_pthread_create=no
11972 fi
11973 rm -f conftest*
11974 else
11975   cat > conftest.$ac_ext <<EOF
11976 #line 11977 "configure"
11977 #include "confdefs.h"
11978 /* pthread test headers */
11979 #include <pthread.h>
11980 #ifndef NULL
11981 #define NULL (void*)0
11982 #endif
11983
11984 static void *task(p)
11985         void *p;
11986 {
11987         return (void *) (p == NULL);
11988 }
11989
11990
11991 int main(argc, argv)
11992         int argc;
11993         char **argv;
11994 {
11995
11996         /* pthread test function */
11997         pthread_t t;
11998         int status;
11999         int detach = 1;
12000
12001 #ifdef HAVE_PTHREADS_FINAL
12002         /* Final pthreads */
12003         pthread_attr_t attr;
12004
12005         status = pthread_attr_init(&attr);
12006         if( status ) return status;
12007
12008 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12009         if( !detach ) {
12010 #if defined( PTHREAD_CREATE_JOINABLE )
12011                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12012 #else
12013                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12014 #endif
12015
12016 #ifdef PTHREAD_CREATE_DETACHED
12017         } else {
12018                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12019 #endif
12020         }
12021         if( status ) return status;
12022 #endif
12023
12024         status = pthread_create( &t, &attr, task, NULL );
12025         if( status ) return status;
12026
12027 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12028         if( detach ) {
12029                 /* give thread a chance to complete */
12030                 /* it should remain joinable and hence detachable */
12031                 sleep( 1 );
12032
12033                 status = pthread_detach( t );
12034                 if( status ) return status;
12035         }
12036 #endif
12037
12038 #else
12039         /* Draft 4 pthreads */
12040         status = pthread_create( &t, pthread_attr_default, task, NULL );
12041         if( status ) return status;
12042
12043         if( detach ) {
12044                 /* give thread a chance to complete */
12045                 /* it should remain joinable and hence detachable */
12046                 sleep( 1 );
12047
12048                 status = pthread_detach( &t );
12049                 if( status ) return status;
12050         }
12051 #endif
12052
12053 #ifdef HAVE_LINUX_THREADS
12054         pthread_kill_other_threads_np();
12055 #endif
12056
12057         return 0;
12058
12059 }
12060
12061 EOF
12062 if { (eval echo configure:12063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12063 then
12064   ol_cv_pthread_create=yes
12065 else
12066   echo "configure: failed program was:" >&5
12067   cat conftest.$ac_ext >&5
12068   rm -fr conftest*
12069   ol_cv_pthread_create=no
12070 fi
12071 rm -fr conftest*
12072 fi
12073
12074 fi
12075
12076 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12077
12078                 if test $ol_cv_pthread_create != no ; then
12079                         ol_link_threads=posix
12080                         ol_link_pthreads=""
12081                 fi
12082                 
12083                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12084 if test "$ol_link_threads" = no ; then
12085         # try -kthread
12086         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12087 echo "configure:12088: checking for pthread link with -kthread" >&5
12088 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12089   echo $ac_n "(cached) $ac_c" 1>&6
12090 else
12091   
12092                 # save the flags
12093                 ol_LIBS="$LIBS"
12094                 LIBS="-kthread $LIBS"
12095
12096                 if test "$cross_compiling" = yes; then
12097   cat > conftest.$ac_ext <<EOF
12098 #line 12099 "configure"
12099 #include "confdefs.h"
12100 /* pthread test headers */
12101 #include <pthread.h>
12102 #ifndef NULL
12103 #define NULL (void*)0
12104 #endif
12105
12106 static void *task(p)
12107         void *p;
12108 {
12109         return (void *) (p == NULL);
12110 }
12111
12112 int main() {
12113
12114         /* pthread test function */
12115         pthread_t t;
12116         int status;
12117         int detach = 1;
12118
12119 #ifdef HAVE_PTHREADS_FINAL
12120         /* Final pthreads */
12121         pthread_attr_t attr;
12122
12123         status = pthread_attr_init(&attr);
12124         if( status ) return status;
12125
12126 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12127         if( !detach ) {
12128 #if defined( PTHREAD_CREATE_JOINABLE )
12129                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12130 #else
12131                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12132 #endif
12133
12134 #ifdef PTHREAD_CREATE_DETACHED
12135         } else {
12136                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12137 #endif
12138         }
12139         if( status ) return status;
12140 #endif
12141
12142         status = pthread_create( &t, &attr, task, NULL );
12143         if( status ) return status;
12144
12145 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12146         if( detach ) {
12147                 /* give thread a chance to complete */
12148                 /* it should remain joinable and hence detachable */
12149                 sleep( 1 );
12150
12151                 status = pthread_detach( t );
12152                 if( status ) return status;
12153         }
12154 #endif
12155
12156 #else
12157         /* Draft 4 pthreads */
12158         status = pthread_create( &t, pthread_attr_default, task, NULL );
12159         if( status ) return status;
12160
12161         if( detach ) {
12162                 /* give thread a chance to complete */
12163                 /* it should remain joinable and hence detachable */
12164                 sleep( 1 );
12165
12166                 status = pthread_detach( &t );
12167                 if( status ) return status;
12168         }
12169 #endif
12170
12171 #ifdef HAVE_LINUX_THREADS
12172         pthread_kill_other_threads_np();
12173 #endif
12174
12175         return 0;
12176
12177 ; return 0; }
12178 EOF
12179 if { (eval echo configure:12180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12180   rm -rf conftest*
12181   ol_cv_pthread_kthread=yes
12182 else
12183   echo "configure: failed program was:" >&5
12184   cat conftest.$ac_ext >&5
12185   rm -rf conftest*
12186   ol_cv_pthread_kthread=no
12187 fi
12188 rm -f conftest*
12189 else
12190   cat > conftest.$ac_ext <<EOF
12191 #line 12192 "configure"
12192 #include "confdefs.h"
12193 /* pthread test headers */
12194 #include <pthread.h>
12195 #ifndef NULL
12196 #define NULL (void*)0
12197 #endif
12198
12199 static void *task(p)
12200         void *p;
12201 {
12202         return (void *) (p == NULL);
12203 }
12204
12205
12206 int main(argc, argv)
12207         int argc;
12208         char **argv;
12209 {
12210
12211         /* pthread test function */
12212         pthread_t t;
12213         int status;
12214         int detach = 1;
12215
12216 #ifdef HAVE_PTHREADS_FINAL
12217         /* Final pthreads */
12218         pthread_attr_t attr;
12219
12220         status = pthread_attr_init(&attr);
12221         if( status ) return status;
12222
12223 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12224         if( !detach ) {
12225 #if defined( PTHREAD_CREATE_JOINABLE )
12226                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12227 #else
12228                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12229 #endif
12230
12231 #ifdef PTHREAD_CREATE_DETACHED
12232         } else {
12233                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12234 #endif
12235         }
12236         if( status ) return status;
12237 #endif
12238
12239         status = pthread_create( &t, &attr, task, NULL );
12240         if( status ) return status;
12241
12242 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12243         if( detach ) {
12244                 /* give thread a chance to complete */
12245                 /* it should remain joinable and hence detachable */
12246                 sleep( 1 );
12247
12248                 status = pthread_detach( t );
12249                 if( status ) return status;
12250         }
12251 #endif
12252
12253 #else
12254         /* Draft 4 pthreads */
12255         status = pthread_create( &t, pthread_attr_default, task, NULL );
12256         if( status ) return status;
12257
12258         if( detach ) {
12259                 /* give thread a chance to complete */
12260                 /* it should remain joinable and hence detachable */
12261                 sleep( 1 );
12262
12263                 status = pthread_detach( &t );
12264                 if( status ) return status;
12265         }
12266 #endif
12267
12268 #ifdef HAVE_LINUX_THREADS
12269         pthread_kill_other_threads_np();
12270 #endif
12271
12272         return 0;
12273
12274 }
12275
12276 EOF
12277 if { (eval echo configure:12278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12278 then
12279   ol_cv_pthread_kthread=yes
12280 else
12281   echo "configure: failed program was:" >&5
12282   cat conftest.$ac_ext >&5
12283   rm -fr conftest*
12284   ol_cv_pthread_kthread=no
12285 fi
12286 rm -fr conftest*
12287 fi
12288
12289
12290                 # restore the LIBS
12291                 LIBS="$ol_LIBS"
12292         
12293 fi
12294
12295 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12296
12297         if test $ol_cv_pthread_kthread = yes ; then
12298                 ol_link_pthreads="-kthread"
12299                 ol_link_threads=posix
12300         fi
12301 fi
12302
12303                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12304 if test "$ol_link_threads" = no ; then
12305         # try -pthread
12306         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12307 echo "configure:12308: checking for pthread link with -pthread" >&5
12308 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12309   echo $ac_n "(cached) $ac_c" 1>&6
12310 else
12311   
12312                 # save the flags
12313                 ol_LIBS="$LIBS"
12314                 LIBS="-pthread $LIBS"
12315
12316                 if test "$cross_compiling" = yes; then
12317   cat > conftest.$ac_ext <<EOF
12318 #line 12319 "configure"
12319 #include "confdefs.h"
12320 /* pthread test headers */
12321 #include <pthread.h>
12322 #ifndef NULL
12323 #define NULL (void*)0
12324 #endif
12325
12326 static void *task(p)
12327         void *p;
12328 {
12329         return (void *) (p == NULL);
12330 }
12331
12332 int main() {
12333
12334         /* pthread test function */
12335         pthread_t t;
12336         int status;
12337         int detach = 1;
12338
12339 #ifdef HAVE_PTHREADS_FINAL
12340         /* Final pthreads */
12341         pthread_attr_t attr;
12342
12343         status = pthread_attr_init(&attr);
12344         if( status ) return status;
12345
12346 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12347         if( !detach ) {
12348 #if defined( PTHREAD_CREATE_JOINABLE )
12349                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12350 #else
12351                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12352 #endif
12353
12354 #ifdef PTHREAD_CREATE_DETACHED
12355         } else {
12356                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12357 #endif
12358         }
12359         if( status ) return status;
12360 #endif
12361
12362         status = pthread_create( &t, &attr, task, NULL );
12363         if( status ) return status;
12364
12365 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12366         if( detach ) {
12367                 /* give thread a chance to complete */
12368                 /* it should remain joinable and hence detachable */
12369                 sleep( 1 );
12370
12371                 status = pthread_detach( t );
12372                 if( status ) return status;
12373         }
12374 #endif
12375
12376 #else
12377         /* Draft 4 pthreads */
12378         status = pthread_create( &t, pthread_attr_default, task, NULL );
12379         if( status ) return status;
12380
12381         if( detach ) {
12382                 /* give thread a chance to complete */
12383                 /* it should remain joinable and hence detachable */
12384                 sleep( 1 );
12385
12386                 status = pthread_detach( &t );
12387                 if( status ) return status;
12388         }
12389 #endif
12390
12391 #ifdef HAVE_LINUX_THREADS
12392         pthread_kill_other_threads_np();
12393 #endif
12394
12395         return 0;
12396
12397 ; return 0; }
12398 EOF
12399 if { (eval echo configure:12400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12400   rm -rf conftest*
12401   ol_cv_pthread_pthread=yes
12402 else
12403   echo "configure: failed program was:" >&5
12404   cat conftest.$ac_ext >&5
12405   rm -rf conftest*
12406   ol_cv_pthread_pthread=no
12407 fi
12408 rm -f conftest*
12409 else
12410   cat > conftest.$ac_ext <<EOF
12411 #line 12412 "configure"
12412 #include "confdefs.h"
12413 /* pthread test headers */
12414 #include <pthread.h>
12415 #ifndef NULL
12416 #define NULL (void*)0
12417 #endif
12418
12419 static void *task(p)
12420         void *p;
12421 {
12422         return (void *) (p == NULL);
12423 }
12424
12425
12426 int main(argc, argv)
12427         int argc;
12428         char **argv;
12429 {
12430
12431         /* pthread test function */
12432         pthread_t t;
12433         int status;
12434         int detach = 1;
12435
12436 #ifdef HAVE_PTHREADS_FINAL
12437         /* Final pthreads */
12438         pthread_attr_t attr;
12439
12440         status = pthread_attr_init(&attr);
12441         if( status ) return status;
12442
12443 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12444         if( !detach ) {
12445 #if defined( PTHREAD_CREATE_JOINABLE )
12446                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12447 #else
12448                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12449 #endif
12450
12451 #ifdef PTHREAD_CREATE_DETACHED
12452         } else {
12453                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12454 #endif
12455         }
12456         if( status ) return status;
12457 #endif
12458
12459         status = pthread_create( &t, &attr, task, NULL );
12460         if( status ) return status;
12461
12462 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12463         if( detach ) {
12464                 /* give thread a chance to complete */
12465                 /* it should remain joinable and hence detachable */
12466                 sleep( 1 );
12467
12468                 status = pthread_detach( t );
12469                 if( status ) return status;
12470         }
12471 #endif
12472
12473 #else
12474         /* Draft 4 pthreads */
12475         status = pthread_create( &t, pthread_attr_default, task, NULL );
12476         if( status ) return status;
12477
12478         if( detach ) {
12479                 /* give thread a chance to complete */
12480                 /* it should remain joinable and hence detachable */
12481                 sleep( 1 );
12482
12483                 status = pthread_detach( &t );
12484                 if( status ) return status;
12485         }
12486 #endif
12487
12488 #ifdef HAVE_LINUX_THREADS
12489         pthread_kill_other_threads_np();
12490 #endif
12491
12492         return 0;
12493
12494 }
12495
12496 EOF
12497 if { (eval echo configure:12498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12498 then
12499   ol_cv_pthread_pthread=yes
12500 else
12501   echo "configure: failed program was:" >&5
12502   cat conftest.$ac_ext >&5
12503   rm -fr conftest*
12504   ol_cv_pthread_pthread=no
12505 fi
12506 rm -fr conftest*
12507 fi
12508
12509
12510                 # restore the LIBS
12511                 LIBS="$ol_LIBS"
12512         
12513 fi
12514
12515 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12516
12517         if test $ol_cv_pthread_pthread = yes ; then
12518                 ol_link_pthreads="-pthread"
12519                 ol_link_threads=posix
12520         fi
12521 fi
12522
12523                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12524 if test "$ol_link_threads" = no ; then
12525         # try -pthreads
12526         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12527 echo "configure:12528: checking for pthread link with -pthreads" >&5
12528 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12529   echo $ac_n "(cached) $ac_c" 1>&6
12530 else
12531   
12532                 # save the flags
12533                 ol_LIBS="$LIBS"
12534                 LIBS="-pthreads $LIBS"
12535
12536                 if test "$cross_compiling" = yes; then
12537   cat > conftest.$ac_ext <<EOF
12538 #line 12539 "configure"
12539 #include "confdefs.h"
12540 /* pthread test headers */
12541 #include <pthread.h>
12542 #ifndef NULL
12543 #define NULL (void*)0
12544 #endif
12545
12546 static void *task(p)
12547         void *p;
12548 {
12549         return (void *) (p == NULL);
12550 }
12551
12552 int main() {
12553
12554         /* pthread test function */
12555         pthread_t t;
12556         int status;
12557         int detach = 1;
12558
12559 #ifdef HAVE_PTHREADS_FINAL
12560         /* Final pthreads */
12561         pthread_attr_t attr;
12562
12563         status = pthread_attr_init(&attr);
12564         if( status ) return status;
12565
12566 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12567         if( !detach ) {
12568 #if defined( PTHREAD_CREATE_JOINABLE )
12569                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12570 #else
12571                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12572 #endif
12573
12574 #ifdef PTHREAD_CREATE_DETACHED
12575         } else {
12576                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12577 #endif
12578         }
12579         if( status ) return status;
12580 #endif
12581
12582         status = pthread_create( &t, &attr, task, NULL );
12583         if( status ) return status;
12584
12585 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12586         if( detach ) {
12587                 /* give thread a chance to complete */
12588                 /* it should remain joinable and hence detachable */
12589                 sleep( 1 );
12590
12591                 status = pthread_detach( t );
12592                 if( status ) return status;
12593         }
12594 #endif
12595
12596 #else
12597         /* Draft 4 pthreads */
12598         status = pthread_create( &t, pthread_attr_default, task, NULL );
12599         if( status ) return status;
12600
12601         if( detach ) {
12602                 /* give thread a chance to complete */
12603                 /* it should remain joinable and hence detachable */
12604                 sleep( 1 );
12605
12606                 status = pthread_detach( &t );
12607                 if( status ) return status;
12608         }
12609 #endif
12610
12611 #ifdef HAVE_LINUX_THREADS
12612         pthread_kill_other_threads_np();
12613 #endif
12614
12615         return 0;
12616
12617 ; return 0; }
12618 EOF
12619 if { (eval echo configure:12620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12620   rm -rf conftest*
12621   ol_cv_pthread_pthreads=yes
12622 else
12623   echo "configure: failed program was:" >&5
12624   cat conftest.$ac_ext >&5
12625   rm -rf conftest*
12626   ol_cv_pthread_pthreads=no
12627 fi
12628 rm -f conftest*
12629 else
12630   cat > conftest.$ac_ext <<EOF
12631 #line 12632 "configure"
12632 #include "confdefs.h"
12633 /* pthread test headers */
12634 #include <pthread.h>
12635 #ifndef NULL
12636 #define NULL (void*)0
12637 #endif
12638
12639 static void *task(p)
12640         void *p;
12641 {
12642         return (void *) (p == NULL);
12643 }
12644
12645
12646 int main(argc, argv)
12647         int argc;
12648         char **argv;
12649 {
12650
12651         /* pthread test function */
12652         pthread_t t;
12653         int status;
12654         int detach = 1;
12655
12656 #ifdef HAVE_PTHREADS_FINAL
12657         /* Final pthreads */
12658         pthread_attr_t attr;
12659
12660         status = pthread_attr_init(&attr);
12661         if( status ) return status;
12662
12663 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12664         if( !detach ) {
12665 #if defined( PTHREAD_CREATE_JOINABLE )
12666                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12667 #else
12668                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12669 #endif
12670
12671 #ifdef PTHREAD_CREATE_DETACHED
12672         } else {
12673                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12674 #endif
12675         }
12676         if( status ) return status;
12677 #endif
12678
12679         status = pthread_create( &t, &attr, task, NULL );
12680         if( status ) return status;
12681
12682 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12683         if( detach ) {
12684                 /* give thread a chance to complete */
12685                 /* it should remain joinable and hence detachable */
12686                 sleep( 1 );
12687
12688                 status = pthread_detach( t );
12689                 if( status ) return status;
12690         }
12691 #endif
12692
12693 #else
12694         /* Draft 4 pthreads */
12695         status = pthread_create( &t, pthread_attr_default, task, NULL );
12696         if( status ) return status;
12697
12698         if( detach ) {
12699                 /* give thread a chance to complete */
12700                 /* it should remain joinable and hence detachable */
12701                 sleep( 1 );
12702
12703                 status = pthread_detach( &t );
12704                 if( status ) return status;
12705         }
12706 #endif
12707
12708 #ifdef HAVE_LINUX_THREADS
12709         pthread_kill_other_threads_np();
12710 #endif
12711
12712         return 0;
12713
12714 }
12715
12716 EOF
12717 if { (eval echo configure:12718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12718 then
12719   ol_cv_pthread_pthreads=yes
12720 else
12721   echo "configure: failed program was:" >&5
12722   cat conftest.$ac_ext >&5
12723   rm -fr conftest*
12724   ol_cv_pthread_pthreads=no
12725 fi
12726 rm -fr conftest*
12727 fi
12728
12729
12730                 # restore the LIBS
12731                 LIBS="$ol_LIBS"
12732         
12733 fi
12734
12735 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12736
12737         if test $ol_cv_pthread_pthreads = yes ; then
12738                 ol_link_pthreads="-pthreads"
12739                 ol_link_threads=posix
12740         fi
12741 fi
12742
12743                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12744 if test "$ol_link_threads" = no ; then
12745         # try -mthreads
12746         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12747 echo "configure:12748: checking for pthread link with -mthreads" >&5
12748 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12749   echo $ac_n "(cached) $ac_c" 1>&6
12750 else
12751   
12752                 # save the flags
12753                 ol_LIBS="$LIBS"
12754                 LIBS="-mthreads $LIBS"
12755
12756                 if test "$cross_compiling" = yes; then
12757   cat > conftest.$ac_ext <<EOF
12758 #line 12759 "configure"
12759 #include "confdefs.h"
12760 /* pthread test headers */
12761 #include <pthread.h>
12762 #ifndef NULL
12763 #define NULL (void*)0
12764 #endif
12765
12766 static void *task(p)
12767         void *p;
12768 {
12769         return (void *) (p == NULL);
12770 }
12771
12772 int main() {
12773
12774         /* pthread test function */
12775         pthread_t t;
12776         int status;
12777         int detach = 1;
12778
12779 #ifdef HAVE_PTHREADS_FINAL
12780         /* Final pthreads */
12781         pthread_attr_t attr;
12782
12783         status = pthread_attr_init(&attr);
12784         if( status ) return status;
12785
12786 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12787         if( !detach ) {
12788 #if defined( PTHREAD_CREATE_JOINABLE )
12789                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12790 #else
12791                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12792 #endif
12793
12794 #ifdef PTHREAD_CREATE_DETACHED
12795         } else {
12796                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12797 #endif
12798         }
12799         if( status ) return status;
12800 #endif
12801
12802         status = pthread_create( &t, &attr, task, NULL );
12803         if( status ) return status;
12804
12805 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12806         if( detach ) {
12807                 /* give thread a chance to complete */
12808                 /* it should remain joinable and hence detachable */
12809                 sleep( 1 );
12810
12811                 status = pthread_detach( t );
12812                 if( status ) return status;
12813         }
12814 #endif
12815
12816 #else
12817         /* Draft 4 pthreads */
12818         status = pthread_create( &t, pthread_attr_default, task, NULL );
12819         if( status ) return status;
12820
12821         if( detach ) {
12822                 /* give thread a chance to complete */
12823                 /* it should remain joinable and hence detachable */
12824                 sleep( 1 );
12825
12826                 status = pthread_detach( &t );
12827                 if( status ) return status;
12828         }
12829 #endif
12830
12831 #ifdef HAVE_LINUX_THREADS
12832         pthread_kill_other_threads_np();
12833 #endif
12834
12835         return 0;
12836
12837 ; return 0; }
12838 EOF
12839 if { (eval echo configure:12840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12840   rm -rf conftest*
12841   ol_cv_pthread_mthreads=yes
12842 else
12843   echo "configure: failed program was:" >&5
12844   cat conftest.$ac_ext >&5
12845   rm -rf conftest*
12846   ol_cv_pthread_mthreads=no
12847 fi
12848 rm -f conftest*
12849 else
12850   cat > conftest.$ac_ext <<EOF
12851 #line 12852 "configure"
12852 #include "confdefs.h"
12853 /* pthread test headers */
12854 #include <pthread.h>
12855 #ifndef NULL
12856 #define NULL (void*)0
12857 #endif
12858
12859 static void *task(p)
12860         void *p;
12861 {
12862         return (void *) (p == NULL);
12863 }
12864
12865
12866 int main(argc, argv)
12867         int argc;
12868         char **argv;
12869 {
12870
12871         /* pthread test function */
12872         pthread_t t;
12873         int status;
12874         int detach = 1;
12875
12876 #ifdef HAVE_PTHREADS_FINAL
12877         /* Final pthreads */
12878         pthread_attr_t attr;
12879
12880         status = pthread_attr_init(&attr);
12881         if( status ) return status;
12882
12883 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12884         if( !detach ) {
12885 #if defined( PTHREAD_CREATE_JOINABLE )
12886                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12887 #else
12888                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12889 #endif
12890
12891 #ifdef PTHREAD_CREATE_DETACHED
12892         } else {
12893                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12894 #endif
12895         }
12896         if( status ) return status;
12897 #endif
12898
12899         status = pthread_create( &t, &attr, task, NULL );
12900         if( status ) return status;
12901
12902 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12903         if( detach ) {
12904                 /* give thread a chance to complete */
12905                 /* it should remain joinable and hence detachable */
12906                 sleep( 1 );
12907
12908                 status = pthread_detach( t );
12909                 if( status ) return status;
12910         }
12911 #endif
12912
12913 #else
12914         /* Draft 4 pthreads */
12915         status = pthread_create( &t, pthread_attr_default, task, NULL );
12916         if( status ) return status;
12917
12918         if( detach ) {
12919                 /* give thread a chance to complete */
12920                 /* it should remain joinable and hence detachable */
12921                 sleep( 1 );
12922
12923                 status = pthread_detach( &t );
12924                 if( status ) return status;
12925         }
12926 #endif
12927
12928 #ifdef HAVE_LINUX_THREADS
12929         pthread_kill_other_threads_np();
12930 #endif
12931
12932         return 0;
12933
12934 }
12935
12936 EOF
12937 if { (eval echo configure:12938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12938 then
12939   ol_cv_pthread_mthreads=yes
12940 else
12941   echo "configure: failed program was:" >&5
12942   cat conftest.$ac_ext >&5
12943   rm -fr conftest*
12944   ol_cv_pthread_mthreads=no
12945 fi
12946 rm -fr conftest*
12947 fi
12948
12949
12950                 # restore the LIBS
12951                 LIBS="$ol_LIBS"
12952         
12953 fi
12954
12955 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12956
12957         if test $ol_cv_pthread_mthreads = yes ; then
12958                 ol_link_pthreads="-mthreads"
12959                 ol_link_threads=posix
12960         fi
12961 fi
12962
12963                 # Pthread try link: -thread (ol_cv_pthread_thread)
12964 if test "$ol_link_threads" = no ; then
12965         # try -thread
12966         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12967 echo "configure:12968: checking for pthread link with -thread" >&5
12968 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12969   echo $ac_n "(cached) $ac_c" 1>&6
12970 else
12971   
12972                 # save the flags
12973                 ol_LIBS="$LIBS"
12974                 LIBS="-thread $LIBS"
12975
12976                 if test "$cross_compiling" = yes; then
12977   cat > conftest.$ac_ext <<EOF
12978 #line 12979 "configure"
12979 #include "confdefs.h"
12980 /* pthread test headers */
12981 #include <pthread.h>
12982 #ifndef NULL
12983 #define NULL (void*)0
12984 #endif
12985
12986 static void *task(p)
12987         void *p;
12988 {
12989         return (void *) (p == NULL);
12990 }
12991
12992 int main() {
12993
12994         /* pthread test function */
12995         pthread_t t;
12996         int status;
12997         int detach = 1;
12998
12999 #ifdef HAVE_PTHREADS_FINAL
13000         /* Final pthreads */
13001         pthread_attr_t attr;
13002
13003         status = pthread_attr_init(&attr);
13004         if( status ) return status;
13005
13006 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13007         if( !detach ) {
13008 #if defined( PTHREAD_CREATE_JOINABLE )
13009                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13010 #else
13011                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13012 #endif
13013
13014 #ifdef PTHREAD_CREATE_DETACHED
13015         } else {
13016                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13017 #endif
13018         }
13019         if( status ) return status;
13020 #endif
13021
13022         status = pthread_create( &t, &attr, task, NULL );
13023         if( status ) return status;
13024
13025 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13026         if( detach ) {
13027                 /* give thread a chance to complete */
13028                 /* it should remain joinable and hence detachable */
13029                 sleep( 1 );
13030
13031                 status = pthread_detach( t );
13032                 if( status ) return status;
13033         }
13034 #endif
13035
13036 #else
13037         /* Draft 4 pthreads */
13038         status = pthread_create( &t, pthread_attr_default, task, NULL );
13039         if( status ) return status;
13040
13041         if( detach ) {
13042                 /* give thread a chance to complete */
13043                 /* it should remain joinable and hence detachable */
13044                 sleep( 1 );
13045
13046                 status = pthread_detach( &t );
13047                 if( status ) return status;
13048         }
13049 #endif
13050
13051 #ifdef HAVE_LINUX_THREADS
13052         pthread_kill_other_threads_np();
13053 #endif
13054
13055         return 0;
13056
13057 ; return 0; }
13058 EOF
13059 if { (eval echo configure:13060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13060   rm -rf conftest*
13061   ol_cv_pthread_thread=yes
13062 else
13063   echo "configure: failed program was:" >&5
13064   cat conftest.$ac_ext >&5
13065   rm -rf conftest*
13066   ol_cv_pthread_thread=no
13067 fi
13068 rm -f conftest*
13069 else
13070   cat > conftest.$ac_ext <<EOF
13071 #line 13072 "configure"
13072 #include "confdefs.h"
13073 /* pthread test headers */
13074 #include <pthread.h>
13075 #ifndef NULL
13076 #define NULL (void*)0
13077 #endif
13078
13079 static void *task(p)
13080         void *p;
13081 {
13082         return (void *) (p == NULL);
13083 }
13084
13085
13086 int main(argc, argv)
13087         int argc;
13088         char **argv;
13089 {
13090
13091         /* pthread test function */
13092         pthread_t t;
13093         int status;
13094         int detach = 1;
13095
13096 #ifdef HAVE_PTHREADS_FINAL
13097         /* Final pthreads */
13098         pthread_attr_t attr;
13099
13100         status = pthread_attr_init(&attr);
13101         if( status ) return status;
13102
13103 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13104         if( !detach ) {
13105 #if defined( PTHREAD_CREATE_JOINABLE )
13106                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13107 #else
13108                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13109 #endif
13110
13111 #ifdef PTHREAD_CREATE_DETACHED
13112         } else {
13113                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13114 #endif
13115         }
13116         if( status ) return status;
13117 #endif
13118
13119         status = pthread_create( &t, &attr, task, NULL );
13120         if( status ) return status;
13121
13122 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13123         if( detach ) {
13124                 /* give thread a chance to complete */
13125                 /* it should remain joinable and hence detachable */
13126                 sleep( 1 );
13127
13128                 status = pthread_detach( t );
13129                 if( status ) return status;
13130         }
13131 #endif
13132
13133 #else
13134         /* Draft 4 pthreads */
13135         status = pthread_create( &t, pthread_attr_default, task, NULL );
13136         if( status ) return status;
13137
13138         if( detach ) {
13139                 /* give thread a chance to complete */
13140                 /* it should remain joinable and hence detachable */
13141                 sleep( 1 );
13142
13143                 status = pthread_detach( &t );
13144                 if( status ) return status;
13145         }
13146 #endif
13147
13148 #ifdef HAVE_LINUX_THREADS
13149         pthread_kill_other_threads_np();
13150 #endif
13151
13152         return 0;
13153
13154 }
13155
13156 EOF
13157 if { (eval echo configure:13158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13158 then
13159   ol_cv_pthread_thread=yes
13160 else
13161   echo "configure: failed program was:" >&5
13162   cat conftest.$ac_ext >&5
13163   rm -fr conftest*
13164   ol_cv_pthread_thread=no
13165 fi
13166 rm -fr conftest*
13167 fi
13168
13169
13170                 # restore the LIBS
13171                 LIBS="$ol_LIBS"
13172         
13173 fi
13174
13175 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13176
13177         if test $ol_cv_pthread_thread = yes ; then
13178                 ol_link_pthreads="-thread"
13179                 ol_link_threads=posix
13180         fi
13181 fi
13182
13183
13184                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13185 if test "$ol_link_threads" = no ; then
13186         # try -lpthread -lmach -lexc -lc_r
13187         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13188 echo "configure:13189: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13189 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13190   echo $ac_n "(cached) $ac_c" 1>&6
13191 else
13192   
13193                 # save the flags
13194                 ol_LIBS="$LIBS"
13195                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13196
13197                 if test "$cross_compiling" = yes; then
13198   cat > conftest.$ac_ext <<EOF
13199 #line 13200 "configure"
13200 #include "confdefs.h"
13201 /* pthread test headers */
13202 #include <pthread.h>
13203 #ifndef NULL
13204 #define NULL (void*)0
13205 #endif
13206
13207 static void *task(p)
13208         void *p;
13209 {
13210         return (void *) (p == NULL);
13211 }
13212
13213 int main() {
13214
13215         /* pthread test function */
13216         pthread_t t;
13217         int status;
13218         int detach = 1;
13219
13220 #ifdef HAVE_PTHREADS_FINAL
13221         /* Final pthreads */
13222         pthread_attr_t attr;
13223
13224         status = pthread_attr_init(&attr);
13225         if( status ) return status;
13226
13227 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13228         if( !detach ) {
13229 #if defined( PTHREAD_CREATE_JOINABLE )
13230                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13231 #else
13232                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13233 #endif
13234
13235 #ifdef PTHREAD_CREATE_DETACHED
13236         } else {
13237                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13238 #endif
13239         }
13240         if( status ) return status;
13241 #endif
13242
13243         status = pthread_create( &t, &attr, task, NULL );
13244         if( status ) return status;
13245
13246 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13247         if( detach ) {
13248                 /* give thread a chance to complete */
13249                 /* it should remain joinable and hence detachable */
13250                 sleep( 1 );
13251
13252                 status = pthread_detach( t );
13253                 if( status ) return status;
13254         }
13255 #endif
13256
13257 #else
13258         /* Draft 4 pthreads */
13259         status = pthread_create( &t, pthread_attr_default, task, NULL );
13260         if( status ) return status;
13261
13262         if( detach ) {
13263                 /* give thread a chance to complete */
13264                 /* it should remain joinable and hence detachable */
13265                 sleep( 1 );
13266
13267                 status = pthread_detach( &t );
13268                 if( status ) return status;
13269         }
13270 #endif
13271
13272 #ifdef HAVE_LINUX_THREADS
13273         pthread_kill_other_threads_np();
13274 #endif
13275
13276         return 0;
13277
13278 ; return 0; }
13279 EOF
13280 if { (eval echo configure:13281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13281   rm -rf conftest*
13282   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13283 else
13284   echo "configure: failed program was:" >&5
13285   cat conftest.$ac_ext >&5
13286   rm -rf conftest*
13287   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13288 fi
13289 rm -f conftest*
13290 else
13291   cat > conftest.$ac_ext <<EOF
13292 #line 13293 "configure"
13293 #include "confdefs.h"
13294 /* pthread test headers */
13295 #include <pthread.h>
13296 #ifndef NULL
13297 #define NULL (void*)0
13298 #endif
13299
13300 static void *task(p)
13301         void *p;
13302 {
13303         return (void *) (p == NULL);
13304 }
13305
13306
13307 int main(argc, argv)
13308         int argc;
13309         char **argv;
13310 {
13311
13312         /* pthread test function */
13313         pthread_t t;
13314         int status;
13315         int detach = 1;
13316
13317 #ifdef HAVE_PTHREADS_FINAL
13318         /* Final pthreads */
13319         pthread_attr_t attr;
13320
13321         status = pthread_attr_init(&attr);
13322         if( status ) return status;
13323
13324 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13325         if( !detach ) {
13326 #if defined( PTHREAD_CREATE_JOINABLE )
13327                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13328 #else
13329                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13330 #endif
13331
13332 #ifdef PTHREAD_CREATE_DETACHED
13333         } else {
13334                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13335 #endif
13336         }
13337         if( status ) return status;
13338 #endif
13339
13340         status = pthread_create( &t, &attr, task, NULL );
13341         if( status ) return status;
13342
13343 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13344         if( detach ) {
13345                 /* give thread a chance to complete */
13346                 /* it should remain joinable and hence detachable */
13347                 sleep( 1 );
13348
13349                 status = pthread_detach( t );
13350                 if( status ) return status;
13351         }
13352 #endif
13353
13354 #else
13355         /* Draft 4 pthreads */
13356         status = pthread_create( &t, pthread_attr_default, task, NULL );
13357         if( status ) return status;
13358
13359         if( detach ) {
13360                 /* give thread a chance to complete */
13361                 /* it should remain joinable and hence detachable */
13362                 sleep( 1 );
13363
13364                 status = pthread_detach( &t );
13365                 if( status ) return status;
13366         }
13367 #endif
13368
13369 #ifdef HAVE_LINUX_THREADS
13370         pthread_kill_other_threads_np();
13371 #endif
13372
13373         return 0;
13374
13375 }
13376
13377 EOF
13378 if { (eval echo configure:13379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13379 then
13380   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13381 else
13382   echo "configure: failed program was:" >&5
13383   cat conftest.$ac_ext >&5
13384   rm -fr conftest*
13385   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13386 fi
13387 rm -fr conftest*
13388 fi
13389
13390
13391                 # restore the LIBS
13392                 LIBS="$ol_LIBS"
13393         
13394 fi
13395
13396 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13397
13398         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13399                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13400                 ol_link_threads=posix
13401         fi
13402 fi
13403
13404                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13405 if test "$ol_link_threads" = no ; then
13406         # try -lpthread -lmach -lexc
13407         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13408 echo "configure:13409: checking for pthread link with -lpthread -lmach -lexc" >&5
13409 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13410   echo $ac_n "(cached) $ac_c" 1>&6
13411 else
13412   
13413                 # save the flags
13414                 ol_LIBS="$LIBS"
13415                 LIBS="-lpthread -lmach -lexc $LIBS"
13416
13417                 if test "$cross_compiling" = yes; then
13418   cat > conftest.$ac_ext <<EOF
13419 #line 13420 "configure"
13420 #include "confdefs.h"
13421 /* pthread test headers */
13422 #include <pthread.h>
13423 #ifndef NULL
13424 #define NULL (void*)0
13425 #endif
13426
13427 static void *task(p)
13428         void *p;
13429 {
13430         return (void *) (p == NULL);
13431 }
13432
13433 int main() {
13434
13435         /* pthread test function */
13436         pthread_t t;
13437         int status;
13438         int detach = 1;
13439
13440 #ifdef HAVE_PTHREADS_FINAL
13441         /* Final pthreads */
13442         pthread_attr_t attr;
13443
13444         status = pthread_attr_init(&attr);
13445         if( status ) return status;
13446
13447 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13448         if( !detach ) {
13449 #if defined( PTHREAD_CREATE_JOINABLE )
13450                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13451 #else
13452                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13453 #endif
13454
13455 #ifdef PTHREAD_CREATE_DETACHED
13456         } else {
13457                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13458 #endif
13459         }
13460         if( status ) return status;
13461 #endif
13462
13463         status = pthread_create( &t, &attr, task, NULL );
13464         if( status ) return status;
13465
13466 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13467         if( detach ) {
13468                 /* give thread a chance to complete */
13469                 /* it should remain joinable and hence detachable */
13470                 sleep( 1 );
13471
13472                 status = pthread_detach( t );
13473                 if( status ) return status;
13474         }
13475 #endif
13476
13477 #else
13478         /* Draft 4 pthreads */
13479         status = pthread_create( &t, pthread_attr_default, task, NULL );
13480         if( status ) return status;
13481
13482         if( detach ) {
13483                 /* give thread a chance to complete */
13484                 /* it should remain joinable and hence detachable */
13485                 sleep( 1 );
13486
13487                 status = pthread_detach( &t );
13488                 if( status ) return status;
13489         }
13490 #endif
13491
13492 #ifdef HAVE_LINUX_THREADS
13493         pthread_kill_other_threads_np();
13494 #endif
13495
13496         return 0;
13497
13498 ; return 0; }
13499 EOF
13500 if { (eval echo configure:13501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13501   rm -rf conftest*
13502   ol_cv_pthread_lpthread_lmach_lexc=yes
13503 else
13504   echo "configure: failed program was:" >&5
13505   cat conftest.$ac_ext >&5
13506   rm -rf conftest*
13507   ol_cv_pthread_lpthread_lmach_lexc=no
13508 fi
13509 rm -f conftest*
13510 else
13511   cat > conftest.$ac_ext <<EOF
13512 #line 13513 "configure"
13513 #include "confdefs.h"
13514 /* pthread test headers */
13515 #include <pthread.h>
13516 #ifndef NULL
13517 #define NULL (void*)0
13518 #endif
13519
13520 static void *task(p)
13521         void *p;
13522 {
13523         return (void *) (p == NULL);
13524 }
13525
13526
13527 int main(argc, argv)
13528         int argc;
13529         char **argv;
13530 {
13531
13532         /* pthread test function */
13533         pthread_t t;
13534         int status;
13535         int detach = 1;
13536
13537 #ifdef HAVE_PTHREADS_FINAL
13538         /* Final pthreads */
13539         pthread_attr_t attr;
13540
13541         status = pthread_attr_init(&attr);
13542         if( status ) return status;
13543
13544 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13545         if( !detach ) {
13546 #if defined( PTHREAD_CREATE_JOINABLE )
13547                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13548 #else
13549                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13550 #endif
13551
13552 #ifdef PTHREAD_CREATE_DETACHED
13553         } else {
13554                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13555 #endif
13556         }
13557         if( status ) return status;
13558 #endif
13559
13560         status = pthread_create( &t, &attr, task, NULL );
13561         if( status ) return status;
13562
13563 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13564         if( detach ) {
13565                 /* give thread a chance to complete */
13566                 /* it should remain joinable and hence detachable */
13567                 sleep( 1 );
13568
13569                 status = pthread_detach( t );
13570                 if( status ) return status;
13571         }
13572 #endif
13573
13574 #else
13575         /* Draft 4 pthreads */
13576         status = pthread_create( &t, pthread_attr_default, task, NULL );
13577         if( status ) return status;
13578
13579         if( detach ) {
13580                 /* give thread a chance to complete */
13581                 /* it should remain joinable and hence detachable */
13582                 sleep( 1 );
13583
13584                 status = pthread_detach( &t );
13585                 if( status ) return status;
13586         }
13587 #endif
13588
13589 #ifdef HAVE_LINUX_THREADS
13590         pthread_kill_other_threads_np();
13591 #endif
13592
13593         return 0;
13594
13595 }
13596
13597 EOF
13598 if { (eval echo configure:13599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13599 then
13600   ol_cv_pthread_lpthread_lmach_lexc=yes
13601 else
13602   echo "configure: failed program was:" >&5
13603   cat conftest.$ac_ext >&5
13604   rm -fr conftest*
13605   ol_cv_pthread_lpthread_lmach_lexc=no
13606 fi
13607 rm -fr conftest*
13608 fi
13609
13610
13611                 # restore the LIBS
13612                 LIBS="$ol_LIBS"
13613         
13614 fi
13615
13616 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13617
13618         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13619                 ol_link_pthreads="-lpthread -lmach -lexc"
13620                 ol_link_threads=posix
13621         fi
13622 fi
13623
13624
13625                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13626 if test "$ol_link_threads" = no ; then
13627         # try -lpthread -Wl,-woff,85
13628         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13629 echo "configure:13630: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13630 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13631   echo $ac_n "(cached) $ac_c" 1>&6
13632 else
13633   
13634                 # save the flags
13635                 ol_LIBS="$LIBS"
13636                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13637
13638                 if test "$cross_compiling" = yes; then
13639   cat > conftest.$ac_ext <<EOF
13640 #line 13641 "configure"
13641 #include "confdefs.h"
13642 /* pthread test headers */
13643 #include <pthread.h>
13644 #ifndef NULL
13645 #define NULL (void*)0
13646 #endif
13647
13648 static void *task(p)
13649         void *p;
13650 {
13651         return (void *) (p == NULL);
13652 }
13653
13654 int main() {
13655
13656         /* pthread test function */
13657         pthread_t t;
13658         int status;
13659         int detach = 1;
13660
13661 #ifdef HAVE_PTHREADS_FINAL
13662         /* Final pthreads */
13663         pthread_attr_t attr;
13664
13665         status = pthread_attr_init(&attr);
13666         if( status ) return status;
13667
13668 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13669         if( !detach ) {
13670 #if defined( PTHREAD_CREATE_JOINABLE )
13671                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13672 #else
13673                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13674 #endif
13675
13676 #ifdef PTHREAD_CREATE_DETACHED
13677         } else {
13678                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13679 #endif
13680         }
13681         if( status ) return status;
13682 #endif
13683
13684         status = pthread_create( &t, &attr, task, NULL );
13685         if( status ) return status;
13686
13687 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13688         if( detach ) {
13689                 /* give thread a chance to complete */
13690                 /* it should remain joinable and hence detachable */
13691                 sleep( 1 );
13692
13693                 status = pthread_detach( t );
13694                 if( status ) return status;
13695         }
13696 #endif
13697
13698 #else
13699         /* Draft 4 pthreads */
13700         status = pthread_create( &t, pthread_attr_default, task, NULL );
13701         if( status ) return status;
13702
13703         if( detach ) {
13704                 /* give thread a chance to complete */
13705                 /* it should remain joinable and hence detachable */
13706                 sleep( 1 );
13707
13708                 status = pthread_detach( &t );
13709                 if( status ) return status;
13710         }
13711 #endif
13712
13713 #ifdef HAVE_LINUX_THREADS
13714         pthread_kill_other_threads_np();
13715 #endif
13716
13717         return 0;
13718
13719 ; return 0; }
13720 EOF
13721 if { (eval echo configure:13722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13722   rm -rf conftest*
13723   ol_cv_pthread_lib_lpthread_woff=yes
13724 else
13725   echo "configure: failed program was:" >&5
13726   cat conftest.$ac_ext >&5
13727   rm -rf conftest*
13728   ol_cv_pthread_lib_lpthread_woff=no
13729 fi
13730 rm -f conftest*
13731 else
13732   cat > conftest.$ac_ext <<EOF
13733 #line 13734 "configure"
13734 #include "confdefs.h"
13735 /* pthread test headers */
13736 #include <pthread.h>
13737 #ifndef NULL
13738 #define NULL (void*)0
13739 #endif
13740
13741 static void *task(p)
13742         void *p;
13743 {
13744         return (void *) (p == NULL);
13745 }
13746
13747
13748 int main(argc, argv)
13749         int argc;
13750         char **argv;
13751 {
13752
13753         /* pthread test function */
13754         pthread_t t;
13755         int status;
13756         int detach = 1;
13757
13758 #ifdef HAVE_PTHREADS_FINAL
13759         /* Final pthreads */
13760         pthread_attr_t attr;
13761
13762         status = pthread_attr_init(&attr);
13763         if( status ) return status;
13764
13765 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13766         if( !detach ) {
13767 #if defined( PTHREAD_CREATE_JOINABLE )
13768                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13769 #else
13770                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13771 #endif
13772
13773 #ifdef PTHREAD_CREATE_DETACHED
13774         } else {
13775                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13776 #endif
13777         }
13778         if( status ) return status;
13779 #endif
13780
13781         status = pthread_create( &t, &attr, task, NULL );
13782         if( status ) return status;
13783
13784 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13785         if( detach ) {
13786                 /* give thread a chance to complete */
13787                 /* it should remain joinable and hence detachable */
13788                 sleep( 1 );
13789
13790                 status = pthread_detach( t );
13791                 if( status ) return status;
13792         }
13793 #endif
13794
13795 #else
13796         /* Draft 4 pthreads */
13797         status = pthread_create( &t, pthread_attr_default, task, NULL );
13798         if( status ) return status;
13799
13800         if( detach ) {
13801                 /* give thread a chance to complete */
13802                 /* it should remain joinable and hence detachable */
13803                 sleep( 1 );
13804
13805                 status = pthread_detach( &t );
13806                 if( status ) return status;
13807         }
13808 #endif
13809
13810 #ifdef HAVE_LINUX_THREADS
13811         pthread_kill_other_threads_np();
13812 #endif
13813
13814         return 0;
13815
13816 }
13817
13818 EOF
13819 if { (eval echo configure:13820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13820 then
13821   ol_cv_pthread_lib_lpthread_woff=yes
13822 else
13823   echo "configure: failed program was:" >&5
13824   cat conftest.$ac_ext >&5
13825   rm -fr conftest*
13826   ol_cv_pthread_lib_lpthread_woff=no
13827 fi
13828 rm -fr conftest*
13829 fi
13830
13831
13832                 # restore the LIBS
13833                 LIBS="$ol_LIBS"
13834         
13835 fi
13836
13837 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13838
13839         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13840                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13841                 ol_link_threads=posix
13842         fi
13843 fi
13844
13845
13846                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13847 if test "$ol_link_threads" = no ; then
13848         # try -lpthread
13849         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13850 echo "configure:13851: checking for pthread link with -lpthread" >&5
13851 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13852   echo $ac_n "(cached) $ac_c" 1>&6
13853 else
13854   
13855                 # save the flags
13856                 ol_LIBS="$LIBS"
13857                 LIBS="-lpthread $LIBS"
13858
13859                 if test "$cross_compiling" = yes; then
13860   cat > conftest.$ac_ext <<EOF
13861 #line 13862 "configure"
13862 #include "confdefs.h"
13863 /* pthread test headers */
13864 #include <pthread.h>
13865 #ifndef NULL
13866 #define NULL (void*)0
13867 #endif
13868
13869 static void *task(p)
13870         void *p;
13871 {
13872         return (void *) (p == NULL);
13873 }
13874
13875 int main() {
13876
13877         /* pthread test function */
13878         pthread_t t;
13879         int status;
13880         int detach = 1;
13881
13882 #ifdef HAVE_PTHREADS_FINAL
13883         /* Final pthreads */
13884         pthread_attr_t attr;
13885
13886         status = pthread_attr_init(&attr);
13887         if( status ) return status;
13888
13889 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13890         if( !detach ) {
13891 #if defined( PTHREAD_CREATE_JOINABLE )
13892                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13893 #else
13894                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13895 #endif
13896
13897 #ifdef PTHREAD_CREATE_DETACHED
13898         } else {
13899                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13900 #endif
13901         }
13902         if( status ) return status;
13903 #endif
13904
13905         status = pthread_create( &t, &attr, task, NULL );
13906         if( status ) return status;
13907
13908 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13909         if( detach ) {
13910                 /* give thread a chance to complete */
13911                 /* it should remain joinable and hence detachable */
13912                 sleep( 1 );
13913
13914                 status = pthread_detach( t );
13915                 if( status ) return status;
13916         }
13917 #endif
13918
13919 #else
13920         /* Draft 4 pthreads */
13921         status = pthread_create( &t, pthread_attr_default, task, NULL );
13922         if( status ) return status;
13923
13924         if( detach ) {
13925                 /* give thread a chance to complete */
13926                 /* it should remain joinable and hence detachable */
13927                 sleep( 1 );
13928
13929                 status = pthread_detach( &t );
13930                 if( status ) return status;
13931         }
13932 #endif
13933
13934 #ifdef HAVE_LINUX_THREADS
13935         pthread_kill_other_threads_np();
13936 #endif
13937
13938         return 0;
13939
13940 ; return 0; }
13941 EOF
13942 if { (eval echo configure:13943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13943   rm -rf conftest*
13944   ol_cv_pthread_lpthread=yes
13945 else
13946   echo "configure: failed program was:" >&5
13947   cat conftest.$ac_ext >&5
13948   rm -rf conftest*
13949   ol_cv_pthread_lpthread=no
13950 fi
13951 rm -f conftest*
13952 else
13953   cat > conftest.$ac_ext <<EOF
13954 #line 13955 "configure"
13955 #include "confdefs.h"
13956 /* pthread test headers */
13957 #include <pthread.h>
13958 #ifndef NULL
13959 #define NULL (void*)0
13960 #endif
13961
13962 static void *task(p)
13963         void *p;
13964 {
13965         return (void *) (p == NULL);
13966 }
13967
13968
13969 int main(argc, argv)
13970         int argc;
13971         char **argv;
13972 {
13973
13974         /* pthread test function */
13975         pthread_t t;
13976         int status;
13977         int detach = 1;
13978
13979 #ifdef HAVE_PTHREADS_FINAL
13980         /* Final pthreads */
13981         pthread_attr_t attr;
13982
13983         status = pthread_attr_init(&attr);
13984         if( status ) return status;
13985
13986 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13987         if( !detach ) {
13988 #if defined( PTHREAD_CREATE_JOINABLE )
13989                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13990 #else
13991                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13992 #endif
13993
13994 #ifdef PTHREAD_CREATE_DETACHED
13995         } else {
13996                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13997 #endif
13998         }
13999         if( status ) return status;
14000 #endif
14001
14002         status = pthread_create( &t, &attr, task, NULL );
14003         if( status ) return status;
14004
14005 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14006         if( detach ) {
14007                 /* give thread a chance to complete */
14008                 /* it should remain joinable and hence detachable */
14009                 sleep( 1 );
14010
14011                 status = pthread_detach( t );
14012                 if( status ) return status;
14013         }
14014 #endif
14015
14016 #else
14017         /* Draft 4 pthreads */
14018         status = pthread_create( &t, pthread_attr_default, task, NULL );
14019         if( status ) return status;
14020
14021         if( detach ) {
14022                 /* give thread a chance to complete */
14023                 /* it should remain joinable and hence detachable */
14024                 sleep( 1 );
14025
14026                 status = pthread_detach( &t );
14027                 if( status ) return status;
14028         }
14029 #endif
14030
14031 #ifdef HAVE_LINUX_THREADS
14032         pthread_kill_other_threads_np();
14033 #endif
14034
14035         return 0;
14036
14037 }
14038
14039 EOF
14040 if { (eval echo configure:14041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14041 then
14042   ol_cv_pthread_lpthread=yes
14043 else
14044   echo "configure: failed program was:" >&5
14045   cat conftest.$ac_ext >&5
14046   rm -fr conftest*
14047   ol_cv_pthread_lpthread=no
14048 fi
14049 rm -fr conftest*
14050 fi
14051
14052
14053                 # restore the LIBS
14054                 LIBS="$ol_LIBS"
14055         
14056 fi
14057
14058 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
14059
14060         if test $ol_cv_pthread_lpthread = yes ; then
14061                 ol_link_pthreads="-lpthread"
14062                 ol_link_threads=posix
14063         fi
14064 fi
14065
14066                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14067 if test "$ol_link_threads" = no ; then
14068         # try -lc_r
14069         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14070 echo "configure:14071: checking for pthread link with -lc_r" >&5
14071 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14072   echo $ac_n "(cached) $ac_c" 1>&6
14073 else
14074   
14075                 # save the flags
14076                 ol_LIBS="$LIBS"
14077                 LIBS="-lc_r $LIBS"
14078
14079                 if test "$cross_compiling" = yes; then
14080   cat > conftest.$ac_ext <<EOF
14081 #line 14082 "configure"
14082 #include "confdefs.h"
14083 /* pthread test headers */
14084 #include <pthread.h>
14085 #ifndef NULL
14086 #define NULL (void*)0
14087 #endif
14088
14089 static void *task(p)
14090         void *p;
14091 {
14092         return (void *) (p == NULL);
14093 }
14094
14095 int main() {
14096
14097         /* pthread test function */
14098         pthread_t t;
14099         int status;
14100         int detach = 1;
14101
14102 #ifdef HAVE_PTHREADS_FINAL
14103         /* Final pthreads */
14104         pthread_attr_t attr;
14105
14106         status = pthread_attr_init(&attr);
14107         if( status ) return status;
14108
14109 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14110         if( !detach ) {
14111 #if defined( PTHREAD_CREATE_JOINABLE )
14112                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14113 #else
14114                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14115 #endif
14116
14117 #ifdef PTHREAD_CREATE_DETACHED
14118         } else {
14119                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14120 #endif
14121         }
14122         if( status ) return status;
14123 #endif
14124
14125         status = pthread_create( &t, &attr, task, NULL );
14126         if( status ) return status;
14127
14128 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14129         if( detach ) {
14130                 /* give thread a chance to complete */
14131                 /* it should remain joinable and hence detachable */
14132                 sleep( 1 );
14133
14134                 status = pthread_detach( t );
14135                 if( status ) return status;
14136         }
14137 #endif
14138
14139 #else
14140         /* Draft 4 pthreads */
14141         status = pthread_create( &t, pthread_attr_default, task, NULL );
14142         if( status ) return status;
14143
14144         if( detach ) {
14145                 /* give thread a chance to complete */
14146                 /* it should remain joinable and hence detachable */
14147                 sleep( 1 );
14148
14149                 status = pthread_detach( &t );
14150                 if( status ) return status;
14151         }
14152 #endif
14153
14154 #ifdef HAVE_LINUX_THREADS
14155         pthread_kill_other_threads_np();
14156 #endif
14157
14158         return 0;
14159
14160 ; return 0; }
14161 EOF
14162 if { (eval echo configure:14163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14163   rm -rf conftest*
14164   ol_cv_pthread_lc_r=yes
14165 else
14166   echo "configure: failed program was:" >&5
14167   cat conftest.$ac_ext >&5
14168   rm -rf conftest*
14169   ol_cv_pthread_lc_r=no
14170 fi
14171 rm -f conftest*
14172 else
14173   cat > conftest.$ac_ext <<EOF
14174 #line 14175 "configure"
14175 #include "confdefs.h"
14176 /* pthread test headers */
14177 #include <pthread.h>
14178 #ifndef NULL
14179 #define NULL (void*)0
14180 #endif
14181
14182 static void *task(p)
14183         void *p;
14184 {
14185         return (void *) (p == NULL);
14186 }
14187
14188
14189 int main(argc, argv)
14190         int argc;
14191         char **argv;
14192 {
14193
14194         /* pthread test function */
14195         pthread_t t;
14196         int status;
14197         int detach = 1;
14198
14199 #ifdef HAVE_PTHREADS_FINAL
14200         /* Final pthreads */
14201         pthread_attr_t attr;
14202
14203         status = pthread_attr_init(&attr);
14204         if( status ) return status;
14205
14206 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14207         if( !detach ) {
14208 #if defined( PTHREAD_CREATE_JOINABLE )
14209                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14210 #else
14211                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14212 #endif
14213
14214 #ifdef PTHREAD_CREATE_DETACHED
14215         } else {
14216                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14217 #endif
14218         }
14219         if( status ) return status;
14220 #endif
14221
14222         status = pthread_create( &t, &attr, task, NULL );
14223         if( status ) return status;
14224
14225 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14226         if( detach ) {
14227                 /* give thread a chance to complete */
14228                 /* it should remain joinable and hence detachable */
14229                 sleep( 1 );
14230
14231                 status = pthread_detach( t );
14232                 if( status ) return status;
14233         }
14234 #endif
14235
14236 #else
14237         /* Draft 4 pthreads */
14238         status = pthread_create( &t, pthread_attr_default, task, NULL );
14239         if( status ) return status;
14240
14241         if( detach ) {
14242                 /* give thread a chance to complete */
14243                 /* it should remain joinable and hence detachable */
14244                 sleep( 1 );
14245
14246                 status = pthread_detach( &t );
14247                 if( status ) return status;
14248         }
14249 #endif
14250
14251 #ifdef HAVE_LINUX_THREADS
14252         pthread_kill_other_threads_np();
14253 #endif
14254
14255         return 0;
14256
14257 }
14258
14259 EOF
14260 if { (eval echo configure:14261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14261 then
14262   ol_cv_pthread_lc_r=yes
14263 else
14264   echo "configure: failed program was:" >&5
14265   cat conftest.$ac_ext >&5
14266   rm -fr conftest*
14267   ol_cv_pthread_lc_r=no
14268 fi
14269 rm -fr conftest*
14270 fi
14271
14272
14273                 # restore the LIBS
14274                 LIBS="$ol_LIBS"
14275         
14276 fi
14277
14278 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14279
14280         if test $ol_cv_pthread_lc_r = yes ; then
14281                 ol_link_pthreads="-lc_r"
14282                 ol_link_threads=posix
14283         fi
14284 fi
14285
14286
14287                 # Pthread try link: -threads (ol_cv_pthread_threads)
14288 if test "$ol_link_threads" = no ; then
14289         # try -threads
14290         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14291 echo "configure:14292: checking for pthread link with -threads" >&5
14292 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14293   echo $ac_n "(cached) $ac_c" 1>&6
14294 else
14295   
14296                 # save the flags
14297                 ol_LIBS="$LIBS"
14298                 LIBS="-threads $LIBS"
14299
14300                 if test "$cross_compiling" = yes; then
14301   cat > conftest.$ac_ext <<EOF
14302 #line 14303 "configure"
14303 #include "confdefs.h"
14304 /* pthread test headers */
14305 #include <pthread.h>
14306 #ifndef NULL
14307 #define NULL (void*)0
14308 #endif
14309
14310 static void *task(p)
14311         void *p;
14312 {
14313         return (void *) (p == NULL);
14314 }
14315
14316 int main() {
14317
14318         /* pthread test function */
14319         pthread_t t;
14320         int status;
14321         int detach = 1;
14322
14323 #ifdef HAVE_PTHREADS_FINAL
14324         /* Final pthreads */
14325         pthread_attr_t attr;
14326
14327         status = pthread_attr_init(&attr);
14328         if( status ) return status;
14329
14330 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14331         if( !detach ) {
14332 #if defined( PTHREAD_CREATE_JOINABLE )
14333                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14334 #else
14335                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14336 #endif
14337
14338 #ifdef PTHREAD_CREATE_DETACHED
14339         } else {
14340                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14341 #endif
14342         }
14343         if( status ) return status;
14344 #endif
14345
14346         status = pthread_create( &t, &attr, task, NULL );
14347         if( status ) return status;
14348
14349 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14350         if( detach ) {
14351                 /* give thread a chance to complete */
14352                 /* it should remain joinable and hence detachable */
14353                 sleep( 1 );
14354
14355                 status = pthread_detach( t );
14356                 if( status ) return status;
14357         }
14358 #endif
14359
14360 #else
14361         /* Draft 4 pthreads */
14362         status = pthread_create( &t, pthread_attr_default, task, NULL );
14363         if( status ) return status;
14364
14365         if( detach ) {
14366                 /* give thread a chance to complete */
14367                 /* it should remain joinable and hence detachable */
14368                 sleep( 1 );
14369
14370                 status = pthread_detach( &t );
14371                 if( status ) return status;
14372         }
14373 #endif
14374
14375 #ifdef HAVE_LINUX_THREADS
14376         pthread_kill_other_threads_np();
14377 #endif
14378
14379         return 0;
14380
14381 ; return 0; }
14382 EOF
14383 if { (eval echo configure:14384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14384   rm -rf conftest*
14385   ol_cv_pthread_threads=yes
14386 else
14387   echo "configure: failed program was:" >&5
14388   cat conftest.$ac_ext >&5
14389   rm -rf conftest*
14390   ol_cv_pthread_threads=no
14391 fi
14392 rm -f conftest*
14393 else
14394   cat > conftest.$ac_ext <<EOF
14395 #line 14396 "configure"
14396 #include "confdefs.h"
14397 /* pthread test headers */
14398 #include <pthread.h>
14399 #ifndef NULL
14400 #define NULL (void*)0
14401 #endif
14402
14403 static void *task(p)
14404         void *p;
14405 {
14406         return (void *) (p == NULL);
14407 }
14408
14409
14410 int main(argc, argv)
14411         int argc;
14412         char **argv;
14413 {
14414
14415         /* pthread test function */
14416         pthread_t t;
14417         int status;
14418         int detach = 1;
14419
14420 #ifdef HAVE_PTHREADS_FINAL
14421         /* Final pthreads */
14422         pthread_attr_t attr;
14423
14424         status = pthread_attr_init(&attr);
14425         if( status ) return status;
14426
14427 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14428         if( !detach ) {
14429 #if defined( PTHREAD_CREATE_JOINABLE )
14430                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14431 #else
14432                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14433 #endif
14434
14435 #ifdef PTHREAD_CREATE_DETACHED
14436         } else {
14437                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14438 #endif
14439         }
14440         if( status ) return status;
14441 #endif
14442
14443         status = pthread_create( &t, &attr, task, NULL );
14444         if( status ) return status;
14445
14446 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14447         if( detach ) {
14448                 /* give thread a chance to complete */
14449                 /* it should remain joinable and hence detachable */
14450                 sleep( 1 );
14451
14452                 status = pthread_detach( t );
14453                 if( status ) return status;
14454         }
14455 #endif
14456
14457 #else
14458         /* Draft 4 pthreads */
14459         status = pthread_create( &t, pthread_attr_default, task, NULL );
14460         if( status ) return status;
14461
14462         if( detach ) {
14463                 /* give thread a chance to complete */
14464                 /* it should remain joinable and hence detachable */
14465                 sleep( 1 );
14466
14467                 status = pthread_detach( &t );
14468                 if( status ) return status;
14469         }
14470 #endif
14471
14472 #ifdef HAVE_LINUX_THREADS
14473         pthread_kill_other_threads_np();
14474 #endif
14475
14476         return 0;
14477
14478 }
14479
14480 EOF
14481 if { (eval echo configure:14482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14482 then
14483   ol_cv_pthread_threads=yes
14484 else
14485   echo "configure: failed program was:" >&5
14486   cat conftest.$ac_ext >&5
14487   rm -fr conftest*
14488   ol_cv_pthread_threads=no
14489 fi
14490 rm -fr conftest*
14491 fi
14492
14493
14494                 # restore the LIBS
14495                 LIBS="$ol_LIBS"
14496         
14497 fi
14498
14499 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14500
14501         if test $ol_cv_pthread_threads = yes ; then
14502                 ol_link_pthreads="-threads"
14503                 ol_link_threads=posix
14504         fi
14505 fi
14506
14507
14508                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14509 if test "$ol_link_threads" = no ; then
14510         # try -lpthreads -lmach -lexc -lc_r
14511         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14512 echo "configure:14513: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14513 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14514   echo $ac_n "(cached) $ac_c" 1>&6
14515 else
14516   
14517                 # save the flags
14518                 ol_LIBS="$LIBS"
14519                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14520
14521                 if test "$cross_compiling" = yes; then
14522   cat > conftest.$ac_ext <<EOF
14523 #line 14524 "configure"
14524 #include "confdefs.h"
14525 /* pthread test headers */
14526 #include <pthread.h>
14527 #ifndef NULL
14528 #define NULL (void*)0
14529 #endif
14530
14531 static void *task(p)
14532         void *p;
14533 {
14534         return (void *) (p == NULL);
14535 }
14536
14537 int main() {
14538
14539         /* pthread test function */
14540         pthread_t t;
14541         int status;
14542         int detach = 1;
14543
14544 #ifdef HAVE_PTHREADS_FINAL
14545         /* Final pthreads */
14546         pthread_attr_t attr;
14547
14548         status = pthread_attr_init(&attr);
14549         if( status ) return status;
14550
14551 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14552         if( !detach ) {
14553 #if defined( PTHREAD_CREATE_JOINABLE )
14554                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14555 #else
14556                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14557 #endif
14558
14559 #ifdef PTHREAD_CREATE_DETACHED
14560         } else {
14561                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14562 #endif
14563         }
14564         if( status ) return status;
14565 #endif
14566
14567         status = pthread_create( &t, &attr, task, NULL );
14568         if( status ) return status;
14569
14570 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14571         if( detach ) {
14572                 /* give thread a chance to complete */
14573                 /* it should remain joinable and hence detachable */
14574                 sleep( 1 );
14575
14576                 status = pthread_detach( t );
14577                 if( status ) return status;
14578         }
14579 #endif
14580
14581 #else
14582         /* Draft 4 pthreads */
14583         status = pthread_create( &t, pthread_attr_default, task, NULL );
14584         if( status ) return status;
14585
14586         if( detach ) {
14587                 /* give thread a chance to complete */
14588                 /* it should remain joinable and hence detachable */
14589                 sleep( 1 );
14590
14591                 status = pthread_detach( &t );
14592                 if( status ) return status;
14593         }
14594 #endif
14595
14596 #ifdef HAVE_LINUX_THREADS
14597         pthread_kill_other_threads_np();
14598 #endif
14599
14600         return 0;
14601
14602 ; return 0; }
14603 EOF
14604 if { (eval echo configure:14605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14605   rm -rf conftest*
14606   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14607 else
14608   echo "configure: failed program was:" >&5
14609   cat conftest.$ac_ext >&5
14610   rm -rf conftest*
14611   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14612 fi
14613 rm -f conftest*
14614 else
14615   cat > conftest.$ac_ext <<EOF
14616 #line 14617 "configure"
14617 #include "confdefs.h"
14618 /* pthread test headers */
14619 #include <pthread.h>
14620 #ifndef NULL
14621 #define NULL (void*)0
14622 #endif
14623
14624 static void *task(p)
14625         void *p;
14626 {
14627         return (void *) (p == NULL);
14628 }
14629
14630
14631 int main(argc, argv)
14632         int argc;
14633         char **argv;
14634 {
14635
14636         /* pthread test function */
14637         pthread_t t;
14638         int status;
14639         int detach = 1;
14640
14641 #ifdef HAVE_PTHREADS_FINAL
14642         /* Final pthreads */
14643         pthread_attr_t attr;
14644
14645         status = pthread_attr_init(&attr);
14646         if( status ) return status;
14647
14648 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14649         if( !detach ) {
14650 #if defined( PTHREAD_CREATE_JOINABLE )
14651                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14652 #else
14653                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14654 #endif
14655
14656 #ifdef PTHREAD_CREATE_DETACHED
14657         } else {
14658                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14659 #endif
14660         }
14661         if( status ) return status;
14662 #endif
14663
14664         status = pthread_create( &t, &attr, task, NULL );
14665         if( status ) return status;
14666
14667 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14668         if( detach ) {
14669                 /* give thread a chance to complete */
14670                 /* it should remain joinable and hence detachable */
14671                 sleep( 1 );
14672
14673                 status = pthread_detach( t );
14674                 if( status ) return status;
14675         }
14676 #endif
14677
14678 #else
14679         /* Draft 4 pthreads */
14680         status = pthread_create( &t, pthread_attr_default, task, NULL );
14681         if( status ) return status;
14682
14683         if( detach ) {
14684                 /* give thread a chance to complete */
14685                 /* it should remain joinable and hence detachable */
14686                 sleep( 1 );
14687
14688                 status = pthread_detach( &t );
14689                 if( status ) return status;
14690         }
14691 #endif
14692
14693 #ifdef HAVE_LINUX_THREADS
14694         pthread_kill_other_threads_np();
14695 #endif
14696
14697         return 0;
14698
14699 }
14700
14701 EOF
14702 if { (eval echo configure:14703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14703 then
14704   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14705 else
14706   echo "configure: failed program was:" >&5
14707   cat conftest.$ac_ext >&5
14708   rm -fr conftest*
14709   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14710 fi
14711 rm -fr conftest*
14712 fi
14713
14714
14715                 # restore the LIBS
14716                 LIBS="$ol_LIBS"
14717         
14718 fi
14719
14720 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14721
14722         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14723                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14724                 ol_link_threads=posix
14725         fi
14726 fi
14727
14728                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14729 if test "$ol_link_threads" = no ; then
14730         # try -lpthreads -lmach -lexc
14731         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14732 echo "configure:14733: checking for pthread link with -lpthreads -lmach -lexc" >&5
14733 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14734   echo $ac_n "(cached) $ac_c" 1>&6
14735 else
14736   
14737                 # save the flags
14738                 ol_LIBS="$LIBS"
14739                 LIBS="-lpthreads -lmach -lexc $LIBS"
14740
14741                 if test "$cross_compiling" = yes; then
14742   cat > conftest.$ac_ext <<EOF
14743 #line 14744 "configure"
14744 #include "confdefs.h"
14745 /* pthread test headers */
14746 #include <pthread.h>
14747 #ifndef NULL
14748 #define NULL (void*)0
14749 #endif
14750
14751 static void *task(p)
14752         void *p;
14753 {
14754         return (void *) (p == NULL);
14755 }
14756
14757 int main() {
14758
14759         /* pthread test function */
14760         pthread_t t;
14761         int status;
14762         int detach = 1;
14763
14764 #ifdef HAVE_PTHREADS_FINAL
14765         /* Final pthreads */
14766         pthread_attr_t attr;
14767
14768         status = pthread_attr_init(&attr);
14769         if( status ) return status;
14770
14771 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14772         if( !detach ) {
14773 #if defined( PTHREAD_CREATE_JOINABLE )
14774                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14775 #else
14776                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14777 #endif
14778
14779 #ifdef PTHREAD_CREATE_DETACHED
14780         } else {
14781                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14782 #endif
14783         }
14784         if( status ) return status;
14785 #endif
14786
14787         status = pthread_create( &t, &attr, task, NULL );
14788         if( status ) return status;
14789
14790 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14791         if( detach ) {
14792                 /* give thread a chance to complete */
14793                 /* it should remain joinable and hence detachable */
14794                 sleep( 1 );
14795
14796                 status = pthread_detach( t );
14797                 if( status ) return status;
14798         }
14799 #endif
14800
14801 #else
14802         /* Draft 4 pthreads */
14803         status = pthread_create( &t, pthread_attr_default, task, NULL );
14804         if( status ) return status;
14805
14806         if( detach ) {
14807                 /* give thread a chance to complete */
14808                 /* it should remain joinable and hence detachable */
14809                 sleep( 1 );
14810
14811                 status = pthread_detach( &t );
14812                 if( status ) return status;
14813         }
14814 #endif
14815
14816 #ifdef HAVE_LINUX_THREADS
14817         pthread_kill_other_threads_np();
14818 #endif
14819
14820         return 0;
14821
14822 ; return 0; }
14823 EOF
14824 if { (eval echo configure:14825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14825   rm -rf conftest*
14826   ol_cv_pthread_lpthreads_lmach_lexc=yes
14827 else
14828   echo "configure: failed program was:" >&5
14829   cat conftest.$ac_ext >&5
14830   rm -rf conftest*
14831   ol_cv_pthread_lpthreads_lmach_lexc=no
14832 fi
14833 rm -f conftest*
14834 else
14835   cat > conftest.$ac_ext <<EOF
14836 #line 14837 "configure"
14837 #include "confdefs.h"
14838 /* pthread test headers */
14839 #include <pthread.h>
14840 #ifndef NULL
14841 #define NULL (void*)0
14842 #endif
14843
14844 static void *task(p)
14845         void *p;
14846 {
14847         return (void *) (p == NULL);
14848 }
14849
14850
14851 int main(argc, argv)
14852         int argc;
14853         char **argv;
14854 {
14855
14856         /* pthread test function */
14857         pthread_t t;
14858         int status;
14859         int detach = 1;
14860
14861 #ifdef HAVE_PTHREADS_FINAL
14862         /* Final pthreads */
14863         pthread_attr_t attr;
14864
14865         status = pthread_attr_init(&attr);
14866         if( status ) return status;
14867
14868 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14869         if( !detach ) {
14870 #if defined( PTHREAD_CREATE_JOINABLE )
14871                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14872 #else
14873                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14874 #endif
14875
14876 #ifdef PTHREAD_CREATE_DETACHED
14877         } else {
14878                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14879 #endif
14880         }
14881         if( status ) return status;
14882 #endif
14883
14884         status = pthread_create( &t, &attr, task, NULL );
14885         if( status ) return status;
14886
14887 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14888         if( detach ) {
14889                 /* give thread a chance to complete */
14890                 /* it should remain joinable and hence detachable */
14891                 sleep( 1 );
14892
14893                 status = pthread_detach( t );
14894                 if( status ) return status;
14895         }
14896 #endif
14897
14898 #else
14899         /* Draft 4 pthreads */
14900         status = pthread_create( &t, pthread_attr_default, task, NULL );
14901         if( status ) return status;
14902
14903         if( detach ) {
14904                 /* give thread a chance to complete */
14905                 /* it should remain joinable and hence detachable */
14906                 sleep( 1 );
14907
14908                 status = pthread_detach( &t );
14909                 if( status ) return status;
14910         }
14911 #endif
14912
14913 #ifdef HAVE_LINUX_THREADS
14914         pthread_kill_other_threads_np();
14915 #endif
14916
14917         return 0;
14918
14919 }
14920
14921 EOF
14922 if { (eval echo configure:14923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14923 then
14924   ol_cv_pthread_lpthreads_lmach_lexc=yes
14925 else
14926   echo "configure: failed program was:" >&5
14927   cat conftest.$ac_ext >&5
14928   rm -fr conftest*
14929   ol_cv_pthread_lpthreads_lmach_lexc=no
14930 fi
14931 rm -fr conftest*
14932 fi
14933
14934
14935                 # restore the LIBS
14936                 LIBS="$ol_LIBS"
14937         
14938 fi
14939
14940 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14941
14942         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14943                 ol_link_pthreads="-lpthreads -lmach -lexc"
14944                 ol_link_threads=posix
14945         fi
14946 fi
14947
14948                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14949 if test "$ol_link_threads" = no ; then
14950         # try -lpthreads -lexc
14951         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14952 echo "configure:14953: checking for pthread link with -lpthreads -lexc" >&5
14953 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14954   echo $ac_n "(cached) $ac_c" 1>&6
14955 else
14956   
14957                 # save the flags
14958                 ol_LIBS="$LIBS"
14959                 LIBS="-lpthreads -lexc $LIBS"
14960
14961                 if test "$cross_compiling" = yes; then
14962   cat > conftest.$ac_ext <<EOF
14963 #line 14964 "configure"
14964 #include "confdefs.h"
14965 /* pthread test headers */
14966 #include <pthread.h>
14967 #ifndef NULL
14968 #define NULL (void*)0
14969 #endif
14970
14971 static void *task(p)
14972         void *p;
14973 {
14974         return (void *) (p == NULL);
14975 }
14976
14977 int main() {
14978
14979         /* pthread test function */
14980         pthread_t t;
14981         int status;
14982         int detach = 1;
14983
14984 #ifdef HAVE_PTHREADS_FINAL
14985         /* Final pthreads */
14986         pthread_attr_t attr;
14987
14988         status = pthread_attr_init(&attr);
14989         if( status ) return status;
14990
14991 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14992         if( !detach ) {
14993 #if defined( PTHREAD_CREATE_JOINABLE )
14994                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14995 #else
14996                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14997 #endif
14998
14999 #ifdef PTHREAD_CREATE_DETACHED
15000         } else {
15001                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15002 #endif
15003         }
15004         if( status ) return status;
15005 #endif
15006
15007         status = pthread_create( &t, &attr, task, NULL );
15008         if( status ) return status;
15009
15010 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15011         if( detach ) {
15012                 /* give thread a chance to complete */
15013                 /* it should remain joinable and hence detachable */
15014                 sleep( 1 );
15015
15016                 status = pthread_detach( t );
15017                 if( status ) return status;
15018         }
15019 #endif
15020
15021 #else
15022         /* Draft 4 pthreads */
15023         status = pthread_create( &t, pthread_attr_default, task, NULL );
15024         if( status ) return status;
15025
15026         if( detach ) {
15027                 /* give thread a chance to complete */
15028                 /* it should remain joinable and hence detachable */
15029                 sleep( 1 );
15030
15031                 status = pthread_detach( &t );
15032                 if( status ) return status;
15033         }
15034 #endif
15035
15036 #ifdef HAVE_LINUX_THREADS
15037         pthread_kill_other_threads_np();
15038 #endif
15039
15040         return 0;
15041
15042 ; return 0; }
15043 EOF
15044 if { (eval echo configure:15045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15045   rm -rf conftest*
15046   ol_cv_pthread_lpthreads_lexc=yes
15047 else
15048   echo "configure: failed program was:" >&5
15049   cat conftest.$ac_ext >&5
15050   rm -rf conftest*
15051   ol_cv_pthread_lpthreads_lexc=no
15052 fi
15053 rm -f conftest*
15054 else
15055   cat > conftest.$ac_ext <<EOF
15056 #line 15057 "configure"
15057 #include "confdefs.h"
15058 /* pthread test headers */
15059 #include <pthread.h>
15060 #ifndef NULL
15061 #define NULL (void*)0
15062 #endif
15063
15064 static void *task(p)
15065         void *p;
15066 {
15067         return (void *) (p == NULL);
15068 }
15069
15070
15071 int main(argc, argv)
15072         int argc;
15073         char **argv;
15074 {
15075
15076         /* pthread test function */
15077         pthread_t t;
15078         int status;
15079         int detach = 1;
15080
15081 #ifdef HAVE_PTHREADS_FINAL
15082         /* Final pthreads */
15083         pthread_attr_t attr;
15084
15085         status = pthread_attr_init(&attr);
15086         if( status ) return status;
15087
15088 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15089         if( !detach ) {
15090 #if defined( PTHREAD_CREATE_JOINABLE )
15091                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15092 #else
15093                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15094 #endif
15095
15096 #ifdef PTHREAD_CREATE_DETACHED
15097         } else {
15098                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15099 #endif
15100         }
15101         if( status ) return status;
15102 #endif
15103
15104         status = pthread_create( &t, &attr, task, NULL );
15105         if( status ) return status;
15106
15107 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15108         if( detach ) {
15109                 /* give thread a chance to complete */
15110                 /* it should remain joinable and hence detachable */
15111                 sleep( 1 );
15112
15113                 status = pthread_detach( t );
15114                 if( status ) return status;
15115         }
15116 #endif
15117
15118 #else
15119         /* Draft 4 pthreads */
15120         status = pthread_create( &t, pthread_attr_default, task, NULL );
15121         if( status ) return status;
15122
15123         if( detach ) {
15124                 /* give thread a chance to complete */
15125                 /* it should remain joinable and hence detachable */
15126                 sleep( 1 );
15127
15128                 status = pthread_detach( &t );
15129                 if( status ) return status;
15130         }
15131 #endif
15132
15133 #ifdef HAVE_LINUX_THREADS
15134         pthread_kill_other_threads_np();
15135 #endif
15136
15137         return 0;
15138
15139 }
15140
15141 EOF
15142 if { (eval echo configure:15143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15143 then
15144   ol_cv_pthread_lpthreads_lexc=yes
15145 else
15146   echo "configure: failed program was:" >&5
15147   cat conftest.$ac_ext >&5
15148   rm -fr conftest*
15149   ol_cv_pthread_lpthreads_lexc=no
15150 fi
15151 rm -fr conftest*
15152 fi
15153
15154
15155                 # restore the LIBS
15156                 LIBS="$ol_LIBS"
15157         
15158 fi
15159
15160 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15161
15162         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15163                 ol_link_pthreads="-lpthreads -lexc"
15164                 ol_link_threads=posix
15165         fi
15166 fi
15167
15168
15169                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15170 if test "$ol_link_threads" = no ; then
15171         # try -lpthreads
15172         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15173 echo "configure:15174: checking for pthread link with -lpthreads" >&5
15174 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15175   echo $ac_n "(cached) $ac_c" 1>&6
15176 else
15177   
15178                 # save the flags
15179                 ol_LIBS="$LIBS"
15180                 LIBS="-lpthreads $LIBS"
15181
15182                 if test "$cross_compiling" = yes; then
15183   cat > conftest.$ac_ext <<EOF
15184 #line 15185 "configure"
15185 #include "confdefs.h"
15186 /* pthread test headers */
15187 #include <pthread.h>
15188 #ifndef NULL
15189 #define NULL (void*)0
15190 #endif
15191
15192 static void *task(p)
15193         void *p;
15194 {
15195         return (void *) (p == NULL);
15196 }
15197
15198 int main() {
15199
15200         /* pthread test function */
15201         pthread_t t;
15202         int status;
15203         int detach = 1;
15204
15205 #ifdef HAVE_PTHREADS_FINAL
15206         /* Final pthreads */
15207         pthread_attr_t attr;
15208
15209         status = pthread_attr_init(&attr);
15210         if( status ) return status;
15211
15212 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15213         if( !detach ) {
15214 #if defined( PTHREAD_CREATE_JOINABLE )
15215                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15216 #else
15217                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15218 #endif
15219
15220 #ifdef PTHREAD_CREATE_DETACHED
15221         } else {
15222                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15223 #endif
15224         }
15225         if( status ) return status;
15226 #endif
15227
15228         status = pthread_create( &t, &attr, task, NULL );
15229         if( status ) return status;
15230
15231 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15232         if( detach ) {
15233                 /* give thread a chance to complete */
15234                 /* it should remain joinable and hence detachable */
15235                 sleep( 1 );
15236
15237                 status = pthread_detach( t );
15238                 if( status ) return status;
15239         }
15240 #endif
15241
15242 #else
15243         /* Draft 4 pthreads */
15244         status = pthread_create( &t, pthread_attr_default, task, NULL );
15245         if( status ) return status;
15246
15247         if( detach ) {
15248                 /* give thread a chance to complete */
15249                 /* it should remain joinable and hence detachable */
15250                 sleep( 1 );
15251
15252                 status = pthread_detach( &t );
15253                 if( status ) return status;
15254         }
15255 #endif
15256
15257 #ifdef HAVE_LINUX_THREADS
15258         pthread_kill_other_threads_np();
15259 #endif
15260
15261         return 0;
15262
15263 ; return 0; }
15264 EOF
15265 if { (eval echo configure:15266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15266   rm -rf conftest*
15267   ol_cv_pthread_lib_lpthreads=yes
15268 else
15269   echo "configure: failed program was:" >&5
15270   cat conftest.$ac_ext >&5
15271   rm -rf conftest*
15272   ol_cv_pthread_lib_lpthreads=no
15273 fi
15274 rm -f conftest*
15275 else
15276   cat > conftest.$ac_ext <<EOF
15277 #line 15278 "configure"
15278 #include "confdefs.h"
15279 /* pthread test headers */
15280 #include <pthread.h>
15281 #ifndef NULL
15282 #define NULL (void*)0
15283 #endif
15284
15285 static void *task(p)
15286         void *p;
15287 {
15288         return (void *) (p == NULL);
15289 }
15290
15291
15292 int main(argc, argv)
15293         int argc;
15294         char **argv;
15295 {
15296
15297         /* pthread test function */
15298         pthread_t t;
15299         int status;
15300         int detach = 1;
15301
15302 #ifdef HAVE_PTHREADS_FINAL
15303         /* Final pthreads */
15304         pthread_attr_t attr;
15305
15306         status = pthread_attr_init(&attr);
15307         if( status ) return status;
15308
15309 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15310         if( !detach ) {
15311 #if defined( PTHREAD_CREATE_JOINABLE )
15312                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15313 #else
15314                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15315 #endif
15316
15317 #ifdef PTHREAD_CREATE_DETACHED
15318         } else {
15319                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15320 #endif
15321         }
15322         if( status ) return status;
15323 #endif
15324
15325         status = pthread_create( &t, &attr, task, NULL );
15326         if( status ) return status;
15327
15328 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15329         if( detach ) {
15330                 /* give thread a chance to complete */
15331                 /* it should remain joinable and hence detachable */
15332                 sleep( 1 );
15333
15334                 status = pthread_detach( t );
15335                 if( status ) return status;
15336         }
15337 #endif
15338
15339 #else
15340         /* Draft 4 pthreads */
15341         status = pthread_create( &t, pthread_attr_default, task, NULL );
15342         if( status ) return status;
15343
15344         if( detach ) {
15345                 /* give thread a chance to complete */
15346                 /* it should remain joinable and hence detachable */
15347                 sleep( 1 );
15348
15349                 status = pthread_detach( &t );
15350                 if( status ) return status;
15351         }
15352 #endif
15353
15354 #ifdef HAVE_LINUX_THREADS
15355         pthread_kill_other_threads_np();
15356 #endif
15357
15358         return 0;
15359
15360 }
15361
15362 EOF
15363 if { (eval echo configure:15364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15364 then
15365   ol_cv_pthread_lib_lpthreads=yes
15366 else
15367   echo "configure: failed program was:" >&5
15368   cat conftest.$ac_ext >&5
15369   rm -fr conftest*
15370   ol_cv_pthread_lib_lpthreads=no
15371 fi
15372 rm -fr conftest*
15373 fi
15374
15375
15376                 # restore the LIBS
15377                 LIBS="$ol_LIBS"
15378         
15379 fi
15380
15381 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15382
15383         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15384                 ol_link_pthreads="-lpthreads"
15385                 ol_link_threads=posix
15386         fi
15387 fi
15388
15389
15390                 if test $ol_link_threads != no ; then
15391                         cat >> confdefs.h <<\EOF
15392 #define HAVE_PTHREADS 1
15393 EOF
15394
15395
15396                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15397
15398                                                 save_CPPFLAGS="$CPPFLAGS"
15399                         save_LIBS="$LIBS"
15400                         LIBS="$LTHREAD_LIBS $LIBS"
15401
15402                                                                                                 for ac_func in sched_yield pthread_yield
15403 do
15404 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15405 echo "configure:15406: checking for $ac_func" >&5
15406 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15407   echo $ac_n "(cached) $ac_c" 1>&6
15408 else
15409   cat > conftest.$ac_ext <<EOF
15410 #line 15411 "configure"
15411 #include "confdefs.h"
15412 /* System header to define __stub macros and hopefully few prototypes,
15413     which can conflict with char $ac_func(); below.  */
15414 #include <assert.h>
15415 /* Override any gcc2 internal prototype to avoid an error.  */
15416 /* We use char because int might match the return type of a gcc2
15417     builtin and then its argument prototype would still apply.  */
15418 char $ac_func();
15419 char (*f)();
15420
15421 int main() {
15422
15423 /* The GNU C library defines this for functions which it implements
15424     to always fail with ENOSYS.  Some functions are actually named
15425     something starting with __ and the normal name is an alias.  */
15426 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15427 choke me
15428 #else
15429 f = $ac_func;
15430 #endif
15431
15432 ; return 0; }
15433 EOF
15434 if { (eval echo configure:15435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15435   rm -rf conftest*
15436   eval "ac_cv_func_$ac_func=yes"
15437 else
15438   echo "configure: failed program was:" >&5
15439   cat conftest.$ac_ext >&5
15440   rm -rf conftest*
15441   eval "ac_cv_func_$ac_func=no"
15442 fi
15443 rm -f conftest*
15444 fi
15445
15446 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15447   echo "$ac_t""yes" 1>&6
15448     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15449   cat >> confdefs.h <<EOF
15450 #define $ac_tr_func 1
15451 EOF
15452  
15453 else
15454   echo "$ac_t""no" 1>&6
15455 fi
15456 done
15457
15458
15459                         if test $ac_cv_func_sched_yield = no -a \
15460                                 $ac_cv_func_pthread_yield = no ; then
15461                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15462 echo "configure:15463: checking for sched_yield in -lrt" >&5
15463 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15464 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15465   echo $ac_n "(cached) $ac_c" 1>&6
15466 else
15467   ac_save_LIBS="$LIBS"
15468 LIBS="-lrt  $LIBS"
15469 cat > conftest.$ac_ext <<EOF
15470 #line 15471 "configure"
15471 #include "confdefs.h"
15472 /* Override any gcc2 internal prototype to avoid an error.  */
15473 /* We use char because int might match the return type of a gcc2
15474     builtin and then its argument prototype would still apply.  */
15475 char sched_yield();
15476
15477 int main() {
15478 sched_yield()
15479 ; return 0; }
15480 EOF
15481 if { (eval echo configure:15482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15482   rm -rf conftest*
15483   eval "ac_cv_lib_$ac_lib_var=yes"
15484 else
15485   echo "configure: failed program was:" >&5
15486   cat conftest.$ac_ext >&5
15487   rm -rf conftest*
15488   eval "ac_cv_lib_$ac_lib_var=no"
15489 fi
15490 rm -f conftest*
15491 LIBS="$ac_save_LIBS"
15492
15493 fi
15494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15495   echo "$ac_t""yes" 1>&6
15496   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15497                                         cat >> confdefs.h <<\EOF
15498 #define HAVE_SCHED_YIELD 1
15499 EOF
15500
15501                                         ac_cv_func_sched_yield=yes
15502 else
15503   echo "$ac_t""no" 1>&6
15504 ac_cv_func_sched_yield=no
15505 fi
15506
15507                         fi
15508                         if test $ac_cv_func_sched_yield = no -a \
15509                                 $ac_cv_func_pthread_yield = no ; then
15510                                                                                                 for ac_func in thr_yield
15511 do
15512 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15513 echo "configure:15514: checking for $ac_func" >&5
15514 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15515   echo $ac_n "(cached) $ac_c" 1>&6
15516 else
15517   cat > conftest.$ac_ext <<EOF
15518 #line 15519 "configure"
15519 #include "confdefs.h"
15520 /* System header to define __stub macros and hopefully few prototypes,
15521     which can conflict with char $ac_func(); below.  */
15522 #include <assert.h>
15523 /* Override any gcc2 internal prototype to avoid an error.  */
15524 /* We use char because int might match the return type of a gcc2
15525     builtin and then its argument prototype would still apply.  */
15526 char $ac_func();
15527 char (*f)();
15528
15529 int main() {
15530
15531 /* The GNU C library defines this for functions which it implements
15532     to always fail with ENOSYS.  Some functions are actually named
15533     something starting with __ and the normal name is an alias.  */
15534 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15535 choke me
15536 #else
15537 f = $ac_func;
15538 #endif
15539
15540 ; return 0; }
15541 EOF
15542 if { (eval echo configure:15543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15543   rm -rf conftest*
15544   eval "ac_cv_func_$ac_func=yes"
15545 else
15546   echo "configure: failed program was:" >&5
15547   cat conftest.$ac_ext >&5
15548   rm -rf conftest*
15549   eval "ac_cv_func_$ac_func=no"
15550 fi
15551 rm -f conftest*
15552 fi
15553
15554 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15555   echo "$ac_t""yes" 1>&6
15556     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15557   cat >> confdefs.h <<EOF
15558 #define $ac_tr_func 1
15559 EOF
15560  
15561 else
15562   echo "$ac_t""no" 1>&6
15563 fi
15564 done
15565
15566                         fi
15567                         if test $ac_cv_func_sched_yield = no -a \
15568                                 $ac_cv_func_pthread_yield = no -a \
15569                                 "$ac_cv_func_thr_yield" = no ; then
15570                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15571                         fi
15572
15573                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15574 do
15575 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15576 echo "configure:15577: checking for $ac_func" >&5
15577 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15578   echo $ac_n "(cached) $ac_c" 1>&6
15579 else
15580   cat > conftest.$ac_ext <<EOF
15581 #line 15582 "configure"
15582 #include "confdefs.h"
15583 /* System header to define __stub macros and hopefully few prototypes,
15584     which can conflict with char $ac_func(); below.  */
15585 #include <assert.h>
15586 /* Override any gcc2 internal prototype to avoid an error.  */
15587 /* We use char because int might match the return type of a gcc2
15588     builtin and then its argument prototype would still apply.  */
15589 char $ac_func();
15590 char (*f)();
15591
15592 int main() {
15593
15594 /* The GNU C library defines this for functions which it implements
15595     to always fail with ENOSYS.  Some functions are actually named
15596     something starting with __ and the normal name is an alias.  */
15597 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15598 choke me
15599 #else
15600 f = $ac_func;
15601 #endif
15602
15603 ; return 0; }
15604 EOF
15605 if { (eval echo configure:15606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15606   rm -rf conftest*
15607   eval "ac_cv_func_$ac_func=yes"
15608 else
15609   echo "configure: failed program was:" >&5
15610   cat conftest.$ac_ext >&5
15611   rm -rf conftest*
15612   eval "ac_cv_func_$ac_func=no"
15613 fi
15614 rm -f conftest*
15615 fi
15616
15617 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15618   echo "$ac_t""yes" 1>&6
15619     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15620   cat >> confdefs.h <<EOF
15621 #define $ac_tr_func 1
15622 EOF
15623  
15624 else
15625   echo "$ac_t""no" 1>&6
15626 fi
15627 done
15628
15629
15630                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15631 echo "configure:15632: checking for pthread_detach with <pthread.h>" >&5
15632 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15633   echo $ac_n "(cached) $ac_c" 1>&6
15634 else
15635   
15636                                                                 cat > conftest.$ac_ext <<EOF
15637 #line 15638 "configure"
15638 #include "confdefs.h"
15639
15640 #include <pthread.h>
15641 #ifndef NULL
15642 #define NULL (void*)0
15643 #endif
15644
15645 int main() {
15646 pthread_detach(NULL);
15647 ; return 0; }
15648 EOF
15649 if { (eval echo configure:15650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15650   rm -rf conftest*
15651   ol_cv_func_pthread_detach=yes
15652 else
15653   echo "configure: failed program was:" >&5
15654   cat conftest.$ac_ext >&5
15655   rm -rf conftest*
15656   ol_cv_func_pthread_detach=no
15657 fi
15658 rm -f conftest*
15659                         
15660 fi
15661
15662 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15663
15664                         if test $ol_cv_func_pthread_detach = no ; then
15665                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15666                         fi
15667
15668                         cat >> confdefs.h <<\EOF
15669 #define HAVE_PTHREAD_DETACH 1
15670 EOF
15671
15672
15673                                                 for ac_func in \
15674                                 pthread_setconcurrency \
15675                                 pthread_getconcurrency \
15676                                 thr_setconcurrency \
15677                                 thr_getconcurrency \
15678                         
15679 do
15680 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15681 echo "configure:15682: checking for $ac_func" >&5
15682 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15683   echo $ac_n "(cached) $ac_c" 1>&6
15684 else
15685   cat > conftest.$ac_ext <<EOF
15686 #line 15687 "configure"
15687 #include "confdefs.h"
15688 /* System header to define __stub macros and hopefully few prototypes,
15689     which can conflict with char $ac_func(); below.  */
15690 #include <assert.h>
15691 /* Override any gcc2 internal prototype to avoid an error.  */
15692 /* We use char because int might match the return type of a gcc2
15693     builtin and then its argument prototype would still apply.  */
15694 char $ac_func();
15695 char (*f)();
15696
15697 int main() {
15698
15699 /* The GNU C library defines this for functions which it implements
15700     to always fail with ENOSYS.  Some functions are actually named
15701     something starting with __ and the normal name is an alias.  */
15702 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15703 choke me
15704 #else
15705 f = $ac_func;
15706 #endif
15707
15708 ; return 0; }
15709 EOF
15710 if { (eval echo configure:15711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15711   rm -rf conftest*
15712   eval "ac_cv_func_$ac_func=yes"
15713 else
15714   echo "configure: failed program was:" >&5
15715   cat conftest.$ac_ext >&5
15716   rm -rf conftest*
15717   eval "ac_cv_func_$ac_func=no"
15718 fi
15719 rm -f conftest*
15720 fi
15721
15722 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15723   echo "$ac_t""yes" 1>&6
15724     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15725   cat >> confdefs.h <<EOF
15726 #define $ac_tr_func 1
15727 EOF
15728  
15729 else
15730   echo "$ac_t""no" 1>&6
15731 fi
15732 done
15733
15734
15735                         
15736         for ac_func in pthread_kill_other_threads_np
15737 do
15738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15739 echo "configure:15740: checking for $ac_func" >&5
15740 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15741   echo $ac_n "(cached) $ac_c" 1>&6
15742 else
15743   cat > conftest.$ac_ext <<EOF
15744 #line 15745 "configure"
15745 #include "confdefs.h"
15746 /* System header to define __stub macros and hopefully few prototypes,
15747     which can conflict with char $ac_func(); below.  */
15748 #include <assert.h>
15749 /* Override any gcc2 internal prototype to avoid an error.  */
15750 /* We use char because int might match the return type of a gcc2
15751     builtin and then its argument prototype would still apply.  */
15752 char $ac_func();
15753 char (*f)();
15754
15755 int main() {
15756
15757 /* The GNU C library defines this for functions which it implements
15758     to always fail with ENOSYS.  Some functions are actually named
15759     something starting with __ and the normal name is an alias.  */
15760 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15761 choke me
15762 #else
15763 f = $ac_func;
15764 #endif
15765
15766 ; return 0; }
15767 EOF
15768 if { (eval echo configure:15769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15769   rm -rf conftest*
15770   eval "ac_cv_func_$ac_func=yes"
15771 else
15772   echo "configure: failed program was:" >&5
15773   cat conftest.$ac_ext >&5
15774   rm -rf conftest*
15775   eval "ac_cv_func_$ac_func=no"
15776 fi
15777 rm -f conftest*
15778 fi
15779
15780 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15781   echo "$ac_t""yes" 1>&6
15782     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15783   cat >> confdefs.h <<EOF
15784 #define $ac_tr_func 1
15785 EOF
15786  
15787 else
15788   echo "$ac_t""no" 1>&6
15789 fi
15790 done
15791
15792         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15793 echo "configure:15794: checking for LinuxThreads implementation" >&5
15794 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15795   echo $ac_n "(cached) $ac_c" 1>&6
15796 else
15797   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15798 fi
15799
15800 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15801
15802                         
15803         
15804         
15805         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15806 echo "configure:15807: checking for LinuxThreads consistency" >&5
15807 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15808   echo $ac_n "(cached) $ac_c" 1>&6
15809 else
15810   
15811                 if test $ol_cv_header_linux_threads = yes -a \
15812                         $ol_cv_sys_linux_threads = yes; then
15813                         ol_cv_linux_threads=yes
15814                 elif test $ol_cv_header_linux_threads = no -a \
15815                         $ol_cv_sys_linux_threads = no; then
15816                         ol_cv_linux_threads=no
15817                 else
15818                         ol_cv_linux_threads=error
15819                 fi
15820         
15821 fi
15822
15823 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15824
15825
15826                         if test $ol_cv_linux_threads = error; then
15827                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15828                         fi
15829
15830                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15831 echo "configure:15832: checking if pthread_create() works" >&5
15832 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15833   echo $ac_n "(cached) $ac_c" 1>&6
15834 else
15835   
15836                         if test "$cross_compiling" = yes; then
15837                                 ol_cv_pthread_create_works=yes
15838 else
15839   cat > conftest.$ac_ext <<EOF
15840 #line 15841 "configure"
15841 #include "confdefs.h"
15842 /* pthread test headers */
15843 #include <pthread.h>
15844 #ifndef NULL
15845 #define NULL (void*)0
15846 #endif
15847
15848 static void *task(p)
15849         void *p;
15850 {
15851         return (void *) (p == NULL);
15852 }
15853
15854
15855 int main(argc, argv)
15856         int argc;
15857         char **argv;
15858 {
15859
15860         /* pthread test function */
15861         pthread_t t;
15862         int status;
15863         int detach = 1;
15864
15865 #ifdef HAVE_PTHREADS_FINAL
15866         /* Final pthreads */
15867         pthread_attr_t attr;
15868
15869         status = pthread_attr_init(&attr);
15870         if( status ) return status;
15871
15872 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15873         if( !detach ) {
15874 #if defined( PTHREAD_CREATE_JOINABLE )
15875                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15876 #else
15877                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15878 #endif
15879
15880 #ifdef PTHREAD_CREATE_DETACHED
15881         } else {
15882                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15883 #endif
15884         }
15885         if( status ) return status;
15886 #endif
15887
15888         status = pthread_create( &t, &attr, task, NULL );
15889         if( status ) return status;
15890
15891 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15892         if( detach ) {
15893                 /* give thread a chance to complete */
15894                 /* it should remain joinable and hence detachable */
15895                 sleep( 1 );
15896
15897                 status = pthread_detach( t );
15898                 if( status ) return status;
15899         }
15900 #endif
15901
15902 #else
15903         /* Draft 4 pthreads */
15904         status = pthread_create( &t, pthread_attr_default, task, NULL );
15905         if( status ) return status;
15906
15907         if( detach ) {
15908                 /* give thread a chance to complete */
15909                 /* it should remain joinable and hence detachable */
15910                 sleep( 1 );
15911
15912                 status = pthread_detach( &t );
15913                 if( status ) return status;
15914         }
15915 #endif
15916
15917 #ifdef HAVE_LINUX_THREADS
15918         pthread_kill_other_threads_np();
15919 #endif
15920
15921         return 0;
15922
15923 }
15924
15925 EOF
15926 if { (eval echo configure:15927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15927 then
15928   ol_cv_pthread_create_works=yes
15929 else
15930   echo "configure: failed program was:" >&5
15931   cat conftest.$ac_ext >&5
15932   rm -fr conftest*
15933   ol_cv_pthread_create_works=no
15934 fi
15935 rm -fr conftest*
15936 fi
15937
15938 fi
15939
15940 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15941
15942                         if test $ol_cv_pthread_create_works = no ; then
15943                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15944                         fi
15945
15946                                                 if test $ol_with_yielding_select = auto ; then
15947                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15948 echo "configure:15949: checking if select yields when using pthreads" >&5
15949 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15950   echo $ac_n "(cached) $ac_c" 1>&6
15951 else
15952   
15953                                 if test "$cross_compiling" = yes; then
15954   ol_cv_pthread_select_yields=cross
15955 else
15956   cat > conftest.$ac_ext <<EOF
15957 #line 15958 "configure"
15958 #include "confdefs.h"
15959
15960 #include <sys/types.h>
15961 #include <sys/time.h>
15962 #include <unistd.h>
15963 #include <pthread.h>
15964 #ifndef NULL
15965 #define NULL (void*) 0
15966 #endif
15967
15968 static int fildes[2];
15969
15970 static void *task(p)
15971         void *p;
15972 {
15973         int i;
15974         struct timeval tv;
15975
15976         fd_set rfds;
15977
15978         tv.tv_sec=10;
15979         tv.tv_usec=0;
15980
15981         FD_ZERO(&rfds);
15982         FD_SET(fildes[0], &rfds);
15983
15984         /* we're not interested in any fds */
15985         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15986
15987         if(i < 0) {
15988                 perror("select");
15989                 exit(10);
15990         }
15991
15992         exit(0); /* if we exit here, the select blocked the whole process */
15993 }
15994
15995 int main(argc, argv)
15996         int argc;
15997         char **argv;
15998 {
15999         pthread_t t;
16000
16001         /* create a pipe to select */
16002         if(pipe(&fildes[0])) {
16003                 perror("select");
16004                 exit(1);
16005         }
16006
16007 #ifdef HAVE_PTHREAD_SETCONCURRENCY
16008         (void) pthread_setconcurrency(2);
16009 #else
16010 #ifdef HAVE_THR_SETCONCURRENCY
16011         /* Set Solaris LWP concurrency to 2 */
16012         thr_setconcurrency(2);
16013 #endif
16014 #endif
16015
16016 #if HAVE_PTHREADS_D4
16017         pthread_create(&t, pthread_attr_default, task, NULL);
16018 #else
16019         pthread_create(&t, NULL, task, NULL);
16020 #endif
16021
16022 #if HAVE_SCHED_YIELD
16023         sched_yield();  /* make sure task runs first */
16024 #else
16025 #ifdef HAVE_PTHREAD_YIELD
16026         pthread_yield();        /* make sure task runs first */
16027 #endif
16028 #endif
16029
16030         exit(2);
16031 }
16032 EOF
16033 if { (eval echo configure:16034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16034 then
16035   ol_cv_pthread_select_yields=no
16036 else
16037   echo "configure: failed program was:" >&5
16038   cat conftest.$ac_ext >&5
16039   rm -fr conftest*
16040   ol_cv_pthread_select_yields=yes
16041 fi
16042 rm -fr conftest*
16043 fi
16044
16045 fi
16046
16047 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
16048
16049                                 if test $ol_cv_pthread_select_yields = cross ; then
16050                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
16051                                 fi
16052
16053                                 if test $ol_cv_pthread_select_yields = yes ; then
16054                                         ol_with_yielding_select=yes
16055                                 fi
16056                         fi
16057
16058                                                 CPPFLAGS="$save_CPPFLAGS"
16059                         LIBS="$save_LIBS"
16060                 else
16061                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
16062                 fi
16063         fi
16064
16065         if test $ol_with_threads = posix ; then
16066                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
16067         fi
16068 fi
16069
16070 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16071         -o $ol_with_threads = mach ; then
16072
16073                 for ac_hdr in mach/cthreads.h cthreads.h
16074 do
16075 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16076 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16077 echo "configure:16078: checking for $ac_hdr" >&5
16078 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16079   echo $ac_n "(cached) $ac_c" 1>&6
16080 else
16081   cat > conftest.$ac_ext <<EOF
16082 #line 16083 "configure"
16083 #include "confdefs.h"
16084 #include <$ac_hdr>
16085 EOF
16086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16087 { (eval echo configure:16088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16089 if test -z "$ac_err"; then
16090   rm -rf conftest*
16091   eval "ac_cv_header_$ac_safe=yes"
16092 else
16093   echo "$ac_err" >&5
16094   echo "configure: failed program was:" >&5
16095   cat conftest.$ac_ext >&5
16096   rm -rf conftest*
16097   eval "ac_cv_header_$ac_safe=no"
16098 fi
16099 rm -f conftest*
16100 fi
16101 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16102   echo "$ac_t""yes" 1>&6
16103     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16104   cat >> confdefs.h <<EOF
16105 #define $ac_tr_hdr 1
16106 EOF
16107  
16108 else
16109   echo "$ac_t""no" 1>&6
16110 fi
16111 done
16112
16113         if test $ac_cv_header_mach_cthreads_h = yes ; then
16114                 ol_with_threads=found
16115
16116                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16117 echo "configure:16118: checking for cthread_fork" >&5
16118 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16119   echo $ac_n "(cached) $ac_c" 1>&6
16120 else
16121   cat > conftest.$ac_ext <<EOF
16122 #line 16123 "configure"
16123 #include "confdefs.h"
16124 /* System header to define __stub macros and hopefully few prototypes,
16125     which can conflict with char cthread_fork(); below.  */
16126 #include <assert.h>
16127 /* Override any gcc2 internal prototype to avoid an error.  */
16128 /* We use char because int might match the return type of a gcc2
16129     builtin and then its argument prototype would still apply.  */
16130 char cthread_fork();
16131 char (*f)();
16132
16133 int main() {
16134
16135 /* The GNU C library defines this for functions which it implements
16136     to always fail with ENOSYS.  Some functions are actually named
16137     something starting with __ and the normal name is an alias.  */
16138 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16139 choke me
16140 #else
16141 f = cthread_fork;
16142 #endif
16143
16144 ; return 0; }
16145 EOF
16146 if { (eval echo configure:16147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16147   rm -rf conftest*
16148   eval "ac_cv_func_cthread_fork=yes"
16149 else
16150   echo "configure: failed program was:" >&5
16151   cat conftest.$ac_ext >&5
16152   rm -rf conftest*
16153   eval "ac_cv_func_cthread_fork=no"
16154 fi
16155 rm -f conftest*
16156 fi
16157
16158 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16159   echo "$ac_t""yes" 1>&6
16160   ol_link_threads=yes
16161 else
16162   echo "$ac_t""no" 1>&6
16163 fi
16164
16165
16166                 if test $ol_link_threads = no ; then
16167                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16168 echo "configure:16169: checking for cthread_fork with -all_load" >&5
16169 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16170   echo $ac_n "(cached) $ac_c" 1>&6
16171 else
16172   
16173                                                                 save_LIBS="$LIBS"
16174                                 LIBS="-all_load $LIBS"
16175                                 cat > conftest.$ac_ext <<EOF
16176 #line 16177 "configure"
16177 #include "confdefs.h"
16178 #include <mach/cthreads.h>
16179 int main() {
16180
16181                                         cthread_fork((void *)0, (void *)0);
16182                                         
16183 ; return 0; }
16184 EOF
16185 if { (eval echo configure:16186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16186   rm -rf conftest*
16187   ol_cv_cthread_all_load=yes
16188 else
16189   echo "configure: failed program was:" >&5
16190   cat conftest.$ac_ext >&5
16191   rm -rf conftest*
16192   ol_cv_cthread_all_load=no
16193 fi
16194 rm -f conftest*
16195                                                                 LIBS="$save_LIBS"
16196                         
16197 fi
16198
16199 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16200
16201                         if test $ol_cv_cthread_all_load = yes ; then
16202                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16203                                 ol_link_threads=mach
16204                                 ol_with_threads=found
16205                         fi
16206                 fi
16207
16208         elif test $ac_cv_header_cthreads_h = yes ; then
16209                                 
16210                 ol_with_threads=found
16211  
16212                                 save_LIBS="$LIBS"
16213                 LIBS="$LIBS -lthreads"
16214                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16215 echo "configure:16216: checking for cthread_fork" >&5
16216 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16217   echo $ac_n "(cached) $ac_c" 1>&6
16218 else
16219   cat > conftest.$ac_ext <<EOF
16220 #line 16221 "configure"
16221 #include "confdefs.h"
16222 /* System header to define __stub macros and hopefully few prototypes,
16223     which can conflict with char cthread_fork(); below.  */
16224 #include <assert.h>
16225 /* Override any gcc2 internal prototype to avoid an error.  */
16226 /* We use char because int might match the return type of a gcc2
16227     builtin and then its argument prototype would still apply.  */
16228 char cthread_fork();
16229 char (*f)();
16230
16231 int main() {
16232
16233 /* The GNU C library defines this for functions which it implements
16234     to always fail with ENOSYS.  Some functions are actually named
16235     something starting with __ and the normal name is an alias.  */
16236 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16237 choke me
16238 #else
16239 f = cthread_fork;
16240 #endif
16241
16242 ; return 0; }
16243 EOF
16244 if { (eval echo configure:16245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16245   rm -rf conftest*
16246   eval "ac_cv_func_cthread_fork=yes"
16247 else
16248   echo "configure: failed program was:" >&5
16249   cat conftest.$ac_ext >&5
16250   rm -rf conftest*
16251   eval "ac_cv_func_cthread_fork=no"
16252 fi
16253 rm -f conftest*
16254 fi
16255
16256 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16257   echo "$ac_t""yes" 1>&6
16258   ol_link_threads=yes
16259 else
16260   echo "$ac_t""no" 1>&6
16261 fi
16262
16263                 LIBS="$save_LIBS"
16264
16265                 if test $ol_link_threads = yes ; then
16266                         LTHREAD_LIBS="-lthreads"
16267                         ol_link_threads=mach
16268                         ol_with_threads=found
16269                 else
16270                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16271                 fi
16272
16273         elif test $ol_with_threads = mach ; then
16274                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16275         fi
16276
16277         if test $ol_link_threads = mach ; then
16278                 cat >> confdefs.h <<\EOF
16279 #define HAVE_MACH_CTHREADS 1
16280 EOF
16281
16282         elif test $ol_with_threads = found ; then
16283                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16284         fi
16285 fi
16286
16287 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16288         -o $ol_with_threads = pth ; then
16289
16290         for ac_hdr in pth.h
16291 do
16292 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16293 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16294 echo "configure:16295: checking for $ac_hdr" >&5
16295 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16296   echo $ac_n "(cached) $ac_c" 1>&6
16297 else
16298   cat > conftest.$ac_ext <<EOF
16299 #line 16300 "configure"
16300 #include "confdefs.h"
16301 #include <$ac_hdr>
16302 EOF
16303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16304 { (eval echo configure:16305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16306 if test -z "$ac_err"; then
16307   rm -rf conftest*
16308   eval "ac_cv_header_$ac_safe=yes"
16309 else
16310   echo "$ac_err" >&5
16311   echo "configure: failed program was:" >&5
16312   cat conftest.$ac_ext >&5
16313   rm -rf conftest*
16314   eval "ac_cv_header_$ac_safe=no"
16315 fi
16316 rm -f conftest*
16317 fi
16318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16319   echo "$ac_t""yes" 1>&6
16320     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16321   cat >> confdefs.h <<EOF
16322 #define $ac_tr_hdr 1
16323 EOF
16324  
16325 else
16326   echo "$ac_t""no" 1>&6
16327 fi
16328 done
16329
16330
16331         if test $ac_cv_header_pth_h = yes ; then
16332                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16333 echo "configure:16334: checking for pth_version in -lpth" >&5
16334 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16335 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16336   echo $ac_n "(cached) $ac_c" 1>&6
16337 else
16338   ac_save_LIBS="$LIBS"
16339 LIBS="-lpth  $LIBS"
16340 cat > conftest.$ac_ext <<EOF
16341 #line 16342 "configure"
16342 #include "confdefs.h"
16343 /* Override any gcc2 internal prototype to avoid an error.  */
16344 /* We use char because int might match the return type of a gcc2
16345     builtin and then its argument prototype would still apply.  */
16346 char pth_version();
16347
16348 int main() {
16349 pth_version()
16350 ; return 0; }
16351 EOF
16352 if { (eval echo configure:16353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16353   rm -rf conftest*
16354   eval "ac_cv_lib_$ac_lib_var=yes"
16355 else
16356   echo "configure: failed program was:" >&5
16357   cat conftest.$ac_ext >&5
16358   rm -rf conftest*
16359   eval "ac_cv_lib_$ac_lib_var=no"
16360 fi
16361 rm -f conftest*
16362 LIBS="$ac_save_LIBS"
16363
16364 fi
16365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16366   echo "$ac_t""yes" 1>&6
16367   have_pth=yes
16368 else
16369   echo "$ac_t""no" 1>&6
16370 have_pth=no
16371 fi
16372
16373
16374                 if test $have_pth = yes ; then
16375                         cat >> confdefs.h <<\EOF
16376 #define HAVE_GNU_PTH 1
16377 EOF
16378
16379                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16380                         ol_link_threads=pth
16381                         ol_with_threads=found
16382
16383                         if test $ol_with_yielding_select = auto ; then
16384                                 ol_with_yielding_select=yes
16385                         fi
16386                 fi
16387         fi
16388 fi
16389
16390 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16391         -o $ol_with_threads = lwp ; then
16392
16393                 for ac_hdr in thread.h synch.h
16394 do
16395 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16396 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16397 echo "configure:16398: checking for $ac_hdr" >&5
16398 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16399   echo $ac_n "(cached) $ac_c" 1>&6
16400 else
16401   cat > conftest.$ac_ext <<EOF
16402 #line 16403 "configure"
16403 #include "confdefs.h"
16404 #include <$ac_hdr>
16405 EOF
16406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16407 { (eval echo configure:16408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16409 if test -z "$ac_err"; then
16410   rm -rf conftest*
16411   eval "ac_cv_header_$ac_safe=yes"
16412 else
16413   echo "$ac_err" >&5
16414   echo "configure: failed program was:" >&5
16415   cat conftest.$ac_ext >&5
16416   rm -rf conftest*
16417   eval "ac_cv_header_$ac_safe=no"
16418 fi
16419 rm -f conftest*
16420 fi
16421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16422   echo "$ac_t""yes" 1>&6
16423     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16424   cat >> confdefs.h <<EOF
16425 #define $ac_tr_hdr 1
16426 EOF
16427  
16428 else
16429   echo "$ac_t""no" 1>&6
16430 fi
16431 done
16432
16433         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16434                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16435 echo "configure:16436: checking for thr_create in -lthread" >&5
16436 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16437 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16438   echo $ac_n "(cached) $ac_c" 1>&6
16439 else
16440   ac_save_LIBS="$LIBS"
16441 LIBS="-lthread  $LIBS"
16442 cat > conftest.$ac_ext <<EOF
16443 #line 16444 "configure"
16444 #include "confdefs.h"
16445 /* Override any gcc2 internal prototype to avoid an error.  */
16446 /* We use char because int might match the return type of a gcc2
16447     builtin and then its argument prototype would still apply.  */
16448 char thr_create();
16449
16450 int main() {
16451 thr_create()
16452 ; return 0; }
16453 EOF
16454 if { (eval echo configure:16455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16455   rm -rf conftest*
16456   eval "ac_cv_lib_$ac_lib_var=yes"
16457 else
16458   echo "configure: failed program was:" >&5
16459   cat conftest.$ac_ext >&5
16460   rm -rf conftest*
16461   eval "ac_cv_lib_$ac_lib_var=no"
16462 fi
16463 rm -f conftest*
16464 LIBS="$ac_save_LIBS"
16465
16466 fi
16467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16468   echo "$ac_t""yes" 1>&6
16469   have_thr=yes
16470 else
16471   echo "$ac_t""no" 1>&6
16472 have_thr=no
16473 fi
16474
16475
16476                 if test $have_thr = yes ; then
16477                         cat >> confdefs.h <<\EOF
16478 #define HAVE_THR 1
16479 EOF
16480
16481                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16482                         ol_link_threads=thr
16483
16484                         if test $ol_with_yielding_select = auto ; then
16485                                 ol_with_yielding_select=yes
16486                         fi
16487
16488                                                 for ac_func in \
16489                                 thr_setconcurrency \
16490                                 thr_getconcurrency \
16491                         
16492 do
16493 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16494 echo "configure:16495: checking for $ac_func" >&5
16495 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16496   echo $ac_n "(cached) $ac_c" 1>&6
16497 else
16498   cat > conftest.$ac_ext <<EOF
16499 #line 16500 "configure"
16500 #include "confdefs.h"
16501 /* System header to define __stub macros and hopefully few prototypes,
16502     which can conflict with char $ac_func(); below.  */
16503 #include <assert.h>
16504 /* Override any gcc2 internal prototype to avoid an error.  */
16505 /* We use char because int might match the return type of a gcc2
16506     builtin and then its argument prototype would still apply.  */
16507 char $ac_func();
16508 char (*f)();
16509
16510 int main() {
16511
16512 /* The GNU C library defines this for functions which it implements
16513     to always fail with ENOSYS.  Some functions are actually named
16514     something starting with __ and the normal name is an alias.  */
16515 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16516 choke me
16517 #else
16518 f = $ac_func;
16519 #endif
16520
16521 ; return 0; }
16522 EOF
16523 if { (eval echo configure:16524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16524   rm -rf conftest*
16525   eval "ac_cv_func_$ac_func=yes"
16526 else
16527   echo "configure: failed program was:" >&5
16528   cat conftest.$ac_ext >&5
16529   rm -rf conftest*
16530   eval "ac_cv_func_$ac_func=no"
16531 fi
16532 rm -f conftest*
16533 fi
16534
16535 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16536   echo "$ac_t""yes" 1>&6
16537     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16538   cat >> confdefs.h <<EOF
16539 #define $ac_tr_func 1
16540 EOF
16541  
16542 else
16543   echo "$ac_t""no" 1>&6
16544 fi
16545 done
16546
16547                 fi
16548         fi
16549
16550                 for ac_hdr in lwp/lwp.h
16551 do
16552 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16553 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16554 echo "configure:16555: checking for $ac_hdr" >&5
16555 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16556   echo $ac_n "(cached) $ac_c" 1>&6
16557 else
16558   cat > conftest.$ac_ext <<EOF
16559 #line 16560 "configure"
16560 #include "confdefs.h"
16561 #include <$ac_hdr>
16562 EOF
16563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16564 { (eval echo configure:16565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16566 if test -z "$ac_err"; then
16567   rm -rf conftest*
16568   eval "ac_cv_header_$ac_safe=yes"
16569 else
16570   echo "$ac_err" >&5
16571   echo "configure: failed program was:" >&5
16572   cat conftest.$ac_ext >&5
16573   rm -rf conftest*
16574   eval "ac_cv_header_$ac_safe=no"
16575 fi
16576 rm -f conftest*
16577 fi
16578 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16579   echo "$ac_t""yes" 1>&6
16580     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16581   cat >> confdefs.h <<EOF
16582 #define $ac_tr_hdr 1
16583 EOF
16584  
16585 else
16586   echo "$ac_t""no" 1>&6
16587 fi
16588 done
16589
16590         if test $ac_cv_header_lwp_lwp_h = yes ; then
16591                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16592 echo "configure:16593: checking for lwp_create in -llwp" >&5
16593 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16594 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16595   echo $ac_n "(cached) $ac_c" 1>&6
16596 else
16597   ac_save_LIBS="$LIBS"
16598 LIBS="-llwp  $LIBS"
16599 cat > conftest.$ac_ext <<EOF
16600 #line 16601 "configure"
16601 #include "confdefs.h"
16602 /* Override any gcc2 internal prototype to avoid an error.  */
16603 /* We use char because int might match the return type of a gcc2
16604     builtin and then its argument prototype would still apply.  */
16605 char lwp_create();
16606
16607 int main() {
16608 lwp_create()
16609 ; return 0; }
16610 EOF
16611 if { (eval echo configure:16612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16612   rm -rf conftest*
16613   eval "ac_cv_lib_$ac_lib_var=yes"
16614 else
16615   echo "configure: failed program was:" >&5
16616   cat conftest.$ac_ext >&5
16617   rm -rf conftest*
16618   eval "ac_cv_lib_$ac_lib_var=no"
16619 fi
16620 rm -f conftest*
16621 LIBS="$ac_save_LIBS"
16622
16623 fi
16624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16625   echo "$ac_t""yes" 1>&6
16626   have_lwp=yes
16627 else
16628   echo "$ac_t""no" 1>&6
16629 have_lwp=no
16630 fi
16631
16632
16633                 if test $have_lwp = yes ; then
16634                         cat >> confdefs.h <<\EOF
16635 #define HAVE_LWP 1
16636 EOF
16637
16638                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16639                         ol_link_threads=lwp
16640
16641                         if test $ol_with_yielding_select = auto ; then
16642                                 ol_with_yielding_select=no
16643                         fi
16644                 fi
16645         fi
16646 fi
16647
16648 if test $ol_with_yielding_select = yes ; then
16649         cat >> confdefs.h <<\EOF
16650 #define HAVE_YIELDING_SELECT 1
16651 EOF
16652
16653 fi
16654
16655 if test $ol_with_threads = manual ; then
16656                 ol_link_threads=yes
16657
16658         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16659
16660         for ac_hdr in pthread.h sched.h
16661 do
16662 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16663 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16664 echo "configure:16665: checking for $ac_hdr" >&5
16665 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16666   echo $ac_n "(cached) $ac_c" 1>&6
16667 else
16668   cat > conftest.$ac_ext <<EOF
16669 #line 16670 "configure"
16670 #include "confdefs.h"
16671 #include <$ac_hdr>
16672 EOF
16673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16674 { (eval echo configure:16675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16676 if test -z "$ac_err"; then
16677   rm -rf conftest*
16678   eval "ac_cv_header_$ac_safe=yes"
16679 else
16680   echo "$ac_err" >&5
16681   echo "configure: failed program was:" >&5
16682   cat conftest.$ac_ext >&5
16683   rm -rf conftest*
16684   eval "ac_cv_header_$ac_safe=no"
16685 fi
16686 rm -f conftest*
16687 fi
16688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16689   echo "$ac_t""yes" 1>&6
16690     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16691   cat >> confdefs.h <<EOF
16692 #define $ac_tr_hdr 1
16693 EOF
16694  
16695 else
16696   echo "$ac_t""no" 1>&6
16697 fi
16698 done
16699
16700         for ac_func in sched_yield pthread_yield
16701 do
16702 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16703 echo "configure:16704: checking for $ac_func" >&5
16704 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16705   echo $ac_n "(cached) $ac_c" 1>&6
16706 else
16707   cat > conftest.$ac_ext <<EOF
16708 #line 16709 "configure"
16709 #include "confdefs.h"
16710 /* System header to define __stub macros and hopefully few prototypes,
16711     which can conflict with char $ac_func(); below.  */
16712 #include <assert.h>
16713 /* Override any gcc2 internal prototype to avoid an error.  */
16714 /* We use char because int might match the return type of a gcc2
16715     builtin and then its argument prototype would still apply.  */
16716 char $ac_func();
16717 char (*f)();
16718
16719 int main() {
16720
16721 /* The GNU C library defines this for functions which it implements
16722     to always fail with ENOSYS.  Some functions are actually named
16723     something starting with __ and the normal name is an alias.  */
16724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16725 choke me
16726 #else
16727 f = $ac_func;
16728 #endif
16729
16730 ; return 0; }
16731 EOF
16732 if { (eval echo configure:16733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16733   rm -rf conftest*
16734   eval "ac_cv_func_$ac_func=yes"
16735 else
16736   echo "configure: failed program was:" >&5
16737   cat conftest.$ac_ext >&5
16738   rm -rf conftest*
16739   eval "ac_cv_func_$ac_func=no"
16740 fi
16741 rm -f conftest*
16742 fi
16743
16744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16745   echo "$ac_t""yes" 1>&6
16746     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16747   cat >> confdefs.h <<EOF
16748 #define $ac_tr_func 1
16749 EOF
16750  
16751 else
16752   echo "$ac_t""no" 1>&6
16753 fi
16754 done
16755
16756         
16757         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16758 echo "configure:16759: checking for LinuxThreads pthread.h" >&5
16759 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16760   echo $ac_n "(cached) $ac_c" 1>&6
16761 else
16762   cat > conftest.$ac_ext <<EOF
16763 #line 16764 "configure"
16764 #include "confdefs.h"
16765 #include <pthread.h>
16766 EOF
16767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16768   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16769   rm -rf conftest*
16770   ol_cv_header_linux_threads=yes
16771 else
16772   rm -rf conftest*
16773   ol_cv_header_linux_threads=no
16774 fi
16775 rm -f conftest*
16776
16777                 
16778 fi
16779
16780 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16781         if test $ol_cv_header_linux_threads = yes; then
16782                 cat >> confdefs.h <<\EOF
16783 #define HAVE_LINUX_THREADS 1
16784 EOF
16785
16786         fi
16787
16788
16789         for ac_hdr in mach/cthreads.h
16790 do
16791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16793 echo "configure:16794: checking for $ac_hdr" >&5
16794 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16795   echo $ac_n "(cached) $ac_c" 1>&6
16796 else
16797   cat > conftest.$ac_ext <<EOF
16798 #line 16799 "configure"
16799 #include "confdefs.h"
16800 #include <$ac_hdr>
16801 EOF
16802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16803 { (eval echo configure:16804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16805 if test -z "$ac_err"; then
16806   rm -rf conftest*
16807   eval "ac_cv_header_$ac_safe=yes"
16808 else
16809   echo "$ac_err" >&5
16810   echo "configure: failed program was:" >&5
16811   cat conftest.$ac_ext >&5
16812   rm -rf conftest*
16813   eval "ac_cv_header_$ac_safe=no"
16814 fi
16815 rm -f conftest*
16816 fi
16817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16818   echo "$ac_t""yes" 1>&6
16819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16820   cat >> confdefs.h <<EOF
16821 #define $ac_tr_hdr 1
16822 EOF
16823  
16824 else
16825   echo "$ac_t""no" 1>&6
16826 fi
16827 done
16828
16829         for ac_hdr in lwp/lwp.h
16830 do
16831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16833 echo "configure:16834: checking for $ac_hdr" >&5
16834 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16835   echo $ac_n "(cached) $ac_c" 1>&6
16836 else
16837   cat > conftest.$ac_ext <<EOF
16838 #line 16839 "configure"
16839 #include "confdefs.h"
16840 #include <$ac_hdr>
16841 EOF
16842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16843 { (eval echo configure:16844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16845 if test -z "$ac_err"; then
16846   rm -rf conftest*
16847   eval "ac_cv_header_$ac_safe=yes"
16848 else
16849   echo "$ac_err" >&5
16850   echo "configure: failed program was:" >&5
16851   cat conftest.$ac_ext >&5
16852   rm -rf conftest*
16853   eval "ac_cv_header_$ac_safe=no"
16854 fi
16855 rm -f conftest*
16856 fi
16857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16858   echo "$ac_t""yes" 1>&6
16859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16860   cat >> confdefs.h <<EOF
16861 #define $ac_tr_hdr 1
16862 EOF
16863  
16864 else
16865   echo "$ac_t""no" 1>&6
16866 fi
16867 done
16868
16869         for ac_hdr in thread.h synch.h
16870 do
16871 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16872 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16873 echo "configure:16874: checking for $ac_hdr" >&5
16874 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16875   echo $ac_n "(cached) $ac_c" 1>&6
16876 else
16877   cat > conftest.$ac_ext <<EOF
16878 #line 16879 "configure"
16879 #include "confdefs.h"
16880 #include <$ac_hdr>
16881 EOF
16882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16883 { (eval echo configure:16884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16885 if test -z "$ac_err"; then
16886   rm -rf conftest*
16887   eval "ac_cv_header_$ac_safe=yes"
16888 else
16889   echo "$ac_err" >&5
16890   echo "configure: failed program was:" >&5
16891   cat conftest.$ac_ext >&5
16892   rm -rf conftest*
16893   eval "ac_cv_header_$ac_safe=no"
16894 fi
16895 rm -f conftest*
16896 fi
16897 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16898   echo "$ac_t""yes" 1>&6
16899     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16900   cat >> confdefs.h <<EOF
16901 #define $ac_tr_hdr 1
16902 EOF
16903  
16904 else
16905   echo "$ac_t""no" 1>&6
16906 fi
16907 done
16908
16909 fi
16910
16911 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16912                         cat >> confdefs.h <<\EOF
16913 #define REENTRANT 1
16914 EOF
16915
16916         cat >> confdefs.h <<\EOF
16917 #define _REENTRANT 1
16918 EOF
16919
16920         cat >> confdefs.h <<\EOF
16921 #define THREAD_SAFE 1
16922 EOF
16923
16924         cat >> confdefs.h <<\EOF
16925 #define _THREAD_SAFE 1
16926 EOF
16927
16928         cat >> confdefs.h <<\EOF
16929 #define THREADSAFE 1
16930 EOF
16931
16932         cat >> confdefs.h <<\EOF
16933 #define _THREADSAFE 1
16934 EOF
16935
16936         cat >> confdefs.h <<\EOF
16937 #define _SGI_MP_SOURCE 1
16938 EOF
16939
16940
16941                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16942 echo "configure:16943: checking for thread specific errno" >&5
16943 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16944   echo $ac_n "(cached) $ac_c" 1>&6
16945 else
16946   
16947                 cat > conftest.$ac_ext <<EOF
16948 #line 16949 "configure"
16949 #include "confdefs.h"
16950 #include <errno.h>
16951 int main() {
16952 errno = 0;
16953 ; return 0; }
16954 EOF
16955 if { (eval echo configure:16956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16956   rm -rf conftest*
16957   ol_cv_errno_thread_specific=yes
16958 else
16959   echo "configure: failed program was:" >&5
16960   cat conftest.$ac_ext >&5
16961   rm -rf conftest*
16962   ol_cv_errno_thread_specific=no
16963 fi
16964 rm -f conftest*
16965         
16966 fi
16967
16968 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16969
16970                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16971 echo "configure:16972: checking for thread specific h_errno" >&5
16972 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16973   echo $ac_n "(cached) $ac_c" 1>&6
16974 else
16975   
16976                 cat > conftest.$ac_ext <<EOF
16977 #line 16978 "configure"
16978 #include "confdefs.h"
16979 #include <netdb.h>
16980 int main() {
16981 h_errno = 0;
16982 ; return 0; }
16983 EOF
16984 if { (eval echo configure:16985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16985   rm -rf conftest*
16986   ol_cv_h_errno_thread_specific=yes
16987 else
16988   echo "configure: failed program was:" >&5
16989   cat conftest.$ac_ext >&5
16990   rm -rf conftest*
16991   ol_cv_h_errno_thread_specific=no
16992 fi
16993 rm -f conftest*
16994         
16995 fi
16996
16997 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16998
16999         if test $ol_cv_errno_thread_specific != yes \
17000                 -o $ol_cv_h_errno_thread_specific != yes ; then
17001                 LIBS="$LTHREAD_LIBS $LIBS"
17002                 LTHREAD_LIBS=""
17003         fi
17004
17005 fi  
17006
17007 if test $ol_link_threads = no ; then
17008         if test $ol_with_threads = yes ; then
17009                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
17010         fi
17011
17012         if test $ol_with_threads = auto ; then
17013                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
17014                 ol_with_threads=no
17015         fi
17016
17017         cat >> confdefs.h <<\EOF
17018 #define NO_THREADS 1
17019 EOF
17020
17021         LTHREAD_LIBS=""
17022 fi
17023
17024 if test $ol_link_threads != no ; then
17025         cat >> confdefs.h <<\EOF
17026 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
17027 EOF
17028
17029 fi
17030
17031 ol_link_ldbm=no 
17032
17033 if test $ol_with_ldbm_api = auto \
17034         -o $ol_with_ldbm_api = berkeley \
17035         -o $ol_with_ldbm_api = bcompat ; then
17036
17037         if test $ol_with_ldbm_api = bcompat; then \
17038                 for ac_hdr in db_185.h db.h
17039 do
17040 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17041 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17042 echo "configure:17043: checking for $ac_hdr" >&5
17043 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17044   echo $ac_n "(cached) $ac_c" 1>&6
17045 else
17046   cat > conftest.$ac_ext <<EOF
17047 #line 17048 "configure"
17048 #include "confdefs.h"
17049 #include <$ac_hdr>
17050 EOF
17051 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17052 { (eval echo configure:17053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17053 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17054 if test -z "$ac_err"; then
17055   rm -rf conftest*
17056   eval "ac_cv_header_$ac_safe=yes"
17057 else
17058   echo "$ac_err" >&5
17059   echo "configure: failed program was:" >&5
17060   cat conftest.$ac_ext >&5
17061   rm -rf conftest*
17062   eval "ac_cv_header_$ac_safe=no"
17063 fi
17064 rm -f conftest*
17065 fi
17066 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17067   echo "$ac_t""yes" 1>&6
17068     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17069   cat >> confdefs.h <<EOF
17070 #define $ac_tr_hdr 1
17071 EOF
17072  
17073 else
17074   echo "$ac_t""no" 1>&6
17075 fi
17076 done
17077
17078 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17079         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17080 echo "configure:17081: checking if Berkeley DB header compatibility" >&5
17081 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17082   echo $ac_n "(cached) $ac_c" 1>&6
17083 else
17084   
17085                 cat > conftest.$ac_ext <<EOF
17086 #line 17087 "configure"
17087 #include "confdefs.h"
17088
17089 #if HAVE_DB_185_H
17090 #       include <db_185.h>
17091 #else
17092 #       include <db.h>
17093 #endif
17094
17095  /* this check could be improved */
17096 #ifndef DB_VERSION_MAJOR
17097 #       define DB_VERSION_MAJOR 1
17098 #endif
17099
17100 #if DB_VERSION_MAJOR == 1 
17101         __db_version_1
17102 #endif
17103
17104 EOF
17105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17106   egrep "__db_version_1" >/dev/null 2>&1; then
17107   rm -rf conftest*
17108   ol_cv_header_db1=yes
17109 else
17110   rm -rf conftest*
17111   ol_cv_header_db1=no
17112 fi
17113 rm -f conftest*
17114
17115 fi
17116
17117 echo "$ac_t""$ol_cv_header_db1" 1>&6
17118
17119         if test $ol_cv_header_db1 = yes ; then
17120                 ol_cv_lib_db=no
17121 if test $ol_cv_lib_db = no ; then
17122         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17123 echo "configure:17124: checking for Berkeley DB link (default)" >&5
17124 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17125   echo $ac_n "(cached) $ac_c" 1>&6
17126 else
17127   
17128         ol_DB_LIB=
17129         ol_LIBS=$LIBS
17130         LIBS="$ol_DB_LIB $LIBS"
17131
17132         cat > conftest.$ac_ext <<EOF
17133 #line 17134 "configure"
17134 #include "confdefs.h"
17135
17136 #ifdef HAVE_DB_185_H
17137 # include <db_185.h>
17138 #else
17139 # include <db.h>
17140 #endif
17141
17142 #ifndef DB_VERSION_MAJOR
17143 # define DB_VERSION_MAJOR 1
17144 #endif
17145
17146 #ifndef NULL
17147 #define NULL ((void*)0)
17148 #endif
17149
17150 int main() {
17151
17152 #if DB_VERSION_MAJOR > 1
17153         {
17154                 char *version;
17155                 int major, minor, patch;
17156
17157                 version = db_version( &major, &minor, &patch );
17158
17159                 if( major != DB_VERSION_MAJOR ||
17160                         minor < DB_VERSION_MINOR )
17161                 {
17162                         printf("Berkeley DB version mismatch\n"
17163                                 "\texpected: %s\n\tgot: %s\n",
17164                                 DB_VERSION_STRING, version);
17165                         return 1;
17166                 }
17167         }
17168 #endif
17169
17170 #if DB_VERSION_MAJOR > 2
17171         db_env_create( NULL, 0 );
17172 #elif DB_VERSION_MAJOR > 1
17173         db_appexit( NULL );
17174 #else
17175         (void) dbopen( NULL, 0, 0, 0, NULL);
17176 #endif
17177
17178 ; return 0; }
17179 EOF
17180 if { (eval echo configure:17181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17181   rm -rf conftest*
17182   ol_cv_db_none=yes
17183 else
17184   echo "configure: failed program was:" >&5
17185   cat conftest.$ac_ext >&5
17186   rm -rf conftest*
17187   ol_cv_db_none=no
17188 fi
17189 rm -f conftest*
17190
17191         LIBS="$ol_LIBS"
17192
17193 fi
17194
17195 echo "$ac_t""$ol_cv_db_none" 1>&6
17196
17197         if test $ol_cv_db_none = yes ; then
17198                 ol_cv_lib_db=yes
17199         fi
17200 fi
17201
17202 if test $ol_cv_lib_db = no ; then
17203         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17204 echo "configure:17205: checking for Berkeley DB link (-ldb4)" >&5
17205 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17206   echo $ac_n "(cached) $ac_c" 1>&6
17207 else
17208   
17209         ol_DB_LIB=-ldb4
17210         ol_LIBS=$LIBS
17211         LIBS="$ol_DB_LIB $LIBS"
17212
17213         cat > conftest.$ac_ext <<EOF
17214 #line 17215 "configure"
17215 #include "confdefs.h"
17216
17217 #ifdef HAVE_DB_185_H
17218 # include <db_185.h>
17219 #else
17220 # include <db.h>
17221 #endif
17222
17223 #ifndef DB_VERSION_MAJOR
17224 # define DB_VERSION_MAJOR 1
17225 #endif
17226
17227 #ifndef NULL
17228 #define NULL ((void*)0)
17229 #endif
17230
17231 int main() {
17232
17233 #if DB_VERSION_MAJOR > 1
17234         {
17235                 char *version;
17236                 int major, minor, patch;
17237
17238                 version = db_version( &major, &minor, &patch );
17239
17240                 if( major != DB_VERSION_MAJOR ||
17241                         minor < DB_VERSION_MINOR )
17242                 {
17243                         printf("Berkeley DB version mismatch\n"
17244                                 "\texpected: %s\n\tgot: %s\n",
17245                                 DB_VERSION_STRING, version);
17246                         return 1;
17247                 }
17248         }
17249 #endif
17250
17251 #if DB_VERSION_MAJOR > 2
17252         db_env_create( NULL, 0 );
17253 #elif DB_VERSION_MAJOR > 1
17254         db_appexit( NULL );
17255 #else
17256         (void) dbopen( NULL, 0, 0, 0, NULL);
17257 #endif
17258
17259 ; return 0; }
17260 EOF
17261 if { (eval echo configure:17262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17262   rm -rf conftest*
17263   ol_cv_db_db4=yes
17264 else
17265   echo "configure: failed program was:" >&5
17266   cat conftest.$ac_ext >&5
17267   rm -rf conftest*
17268   ol_cv_db_db4=no
17269 fi
17270 rm -f conftest*
17271
17272         LIBS="$ol_LIBS"
17273
17274 fi
17275
17276 echo "$ac_t""$ol_cv_db_db4" 1>&6
17277
17278         if test $ol_cv_db_db4 = yes ; then
17279                 ol_cv_lib_db=-ldb4
17280         fi
17281 fi
17282
17283 if test $ol_cv_lib_db = no ; then
17284         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17285 echo "configure:17286: checking for Berkeley DB link (-ldb)" >&5
17286 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17287   echo $ac_n "(cached) $ac_c" 1>&6
17288 else
17289   
17290         ol_DB_LIB=-ldb
17291         ol_LIBS=$LIBS
17292         LIBS="$ol_DB_LIB $LIBS"
17293
17294         cat > conftest.$ac_ext <<EOF
17295 #line 17296 "configure"
17296 #include "confdefs.h"
17297
17298 #ifdef HAVE_DB_185_H
17299 # include <db_185.h>
17300 #else
17301 # include <db.h>
17302 #endif
17303
17304 #ifndef DB_VERSION_MAJOR
17305 # define DB_VERSION_MAJOR 1
17306 #endif
17307
17308 #ifndef NULL
17309 #define NULL ((void*)0)
17310 #endif
17311
17312 int main() {
17313
17314 #if DB_VERSION_MAJOR > 1
17315         {
17316                 char *version;
17317                 int major, minor, patch;
17318
17319                 version = db_version( &major, &minor, &patch );
17320
17321                 if( major != DB_VERSION_MAJOR ||
17322                         minor < DB_VERSION_MINOR )
17323                 {
17324                         printf("Berkeley DB version mismatch\n"
17325                                 "\texpected: %s\n\tgot: %s\n",
17326                                 DB_VERSION_STRING, version);
17327                         return 1;
17328                 }
17329         }
17330 #endif
17331
17332 #if DB_VERSION_MAJOR > 2
17333         db_env_create( NULL, 0 );
17334 #elif DB_VERSION_MAJOR > 1
17335         db_appexit( NULL );
17336 #else
17337         (void) dbopen( NULL, 0, 0, 0, NULL);
17338 #endif
17339
17340 ; return 0; }
17341 EOF
17342 if { (eval echo configure:17343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17343   rm -rf conftest*
17344   ol_cv_db_db=yes
17345 else
17346   echo "configure: failed program was:" >&5
17347   cat conftest.$ac_ext >&5
17348   rm -rf conftest*
17349   ol_cv_db_db=no
17350 fi
17351 rm -f conftest*
17352
17353         LIBS="$ol_LIBS"
17354
17355 fi
17356
17357 echo "$ac_t""$ol_cv_db_db" 1>&6
17358
17359         if test $ol_cv_db_db = yes ; then
17360                 ol_cv_lib_db=-ldb
17361         fi
17362 fi
17363
17364 if test $ol_cv_lib_db = no ; then
17365         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17366 echo "configure:17367: checking for Berkeley DB link (-ldb3)" >&5
17367 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17368   echo $ac_n "(cached) $ac_c" 1>&6
17369 else
17370   
17371         ol_DB_LIB=-ldb3
17372         ol_LIBS=$LIBS
17373         LIBS="$ol_DB_LIB $LIBS"
17374
17375         cat > conftest.$ac_ext <<EOF
17376 #line 17377 "configure"
17377 #include "confdefs.h"
17378
17379 #ifdef HAVE_DB_185_H
17380 # include <db_185.h>
17381 #else
17382 # include <db.h>
17383 #endif
17384
17385 #ifndef DB_VERSION_MAJOR
17386 # define DB_VERSION_MAJOR 1
17387 #endif
17388
17389 #ifndef NULL
17390 #define NULL ((void*)0)
17391 #endif
17392
17393 int main() {
17394
17395 #if DB_VERSION_MAJOR > 1
17396         {
17397                 char *version;
17398                 int major, minor, patch;
17399
17400                 version = db_version( &major, &minor, &patch );
17401
17402                 if( major != DB_VERSION_MAJOR ||
17403                         minor < DB_VERSION_MINOR )
17404                 {
17405                         printf("Berkeley DB version mismatch\n"
17406                                 "\texpected: %s\n\tgot: %s\n",
17407                                 DB_VERSION_STRING, version);
17408                         return 1;
17409                 }
17410         }
17411 #endif
17412
17413 #if DB_VERSION_MAJOR > 2
17414         db_env_create( NULL, 0 );
17415 #elif DB_VERSION_MAJOR > 1
17416         db_appexit( NULL );
17417 #else
17418         (void) dbopen( NULL, 0, 0, 0, NULL);
17419 #endif
17420
17421 ; return 0; }
17422 EOF
17423 if { (eval echo configure:17424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17424   rm -rf conftest*
17425   ol_cv_db_db3=yes
17426 else
17427   echo "configure: failed program was:" >&5
17428   cat conftest.$ac_ext >&5
17429   rm -rf conftest*
17430   ol_cv_db_db3=no
17431 fi
17432 rm -f conftest*
17433
17434         LIBS="$ol_LIBS"
17435
17436 fi
17437
17438 echo "$ac_t""$ol_cv_db_db3" 1>&6
17439
17440         if test $ol_cv_db_db3 = yes ; then
17441                 ol_cv_lib_db=-ldb3
17442         fi
17443 fi
17444
17445 if test $ol_cv_lib_db = no ; then
17446         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17447 echo "configure:17448: checking for Berkeley DB link (-ldb2)" >&5
17448 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17449   echo $ac_n "(cached) $ac_c" 1>&6
17450 else
17451   
17452         ol_DB_LIB=-ldb2
17453         ol_LIBS=$LIBS
17454         LIBS="$ol_DB_LIB $LIBS"
17455
17456         cat > conftest.$ac_ext <<EOF
17457 #line 17458 "configure"
17458 #include "confdefs.h"
17459
17460 #ifdef HAVE_DB_185_H
17461 # include <db_185.h>
17462 #else
17463 # include <db.h>
17464 #endif
17465
17466 #ifndef DB_VERSION_MAJOR
17467 # define DB_VERSION_MAJOR 1
17468 #endif
17469
17470 #ifndef NULL
17471 #define NULL ((void*)0)
17472 #endif
17473
17474 int main() {
17475
17476 #if DB_VERSION_MAJOR > 1
17477         {
17478                 char *version;
17479                 int major, minor, patch;
17480
17481                 version = db_version( &major, &minor, &patch );
17482
17483                 if( major != DB_VERSION_MAJOR ||
17484                         minor < DB_VERSION_MINOR )
17485                 {
17486                         printf("Berkeley DB version mismatch\n"
17487                                 "\texpected: %s\n\tgot: %s\n",
17488                                 DB_VERSION_STRING, version);
17489                         return 1;
17490                 }
17491         }
17492 #endif
17493
17494 #if DB_VERSION_MAJOR > 2
17495         db_env_create( NULL, 0 );
17496 #elif DB_VERSION_MAJOR > 1
17497         db_appexit( NULL );
17498 #else
17499         (void) dbopen( NULL, 0, 0, 0, NULL);
17500 #endif
17501
17502 ; return 0; }
17503 EOF
17504 if { (eval echo configure:17505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17505   rm -rf conftest*
17506   ol_cv_db_db2=yes
17507 else
17508   echo "configure: failed program was:" >&5
17509   cat conftest.$ac_ext >&5
17510   rm -rf conftest*
17511   ol_cv_db_db2=no
17512 fi
17513 rm -f conftest*
17514
17515         LIBS="$ol_LIBS"
17516
17517 fi
17518
17519 echo "$ac_t""$ol_cv_db_db2" 1>&6
17520
17521         if test $ol_cv_db_db2 = yes ; then
17522                 ol_cv_lib_db=-ldb2
17523         fi
17524 fi
17525
17526 if test $ol_cv_lib_db = no ; then
17527         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17528 echo "configure:17529: checking for Berkeley DB link (-ldb1)" >&5
17529 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17530   echo $ac_n "(cached) $ac_c" 1>&6
17531 else
17532   
17533         ol_DB_LIB=-ldb1
17534         ol_LIBS=$LIBS
17535         LIBS="$ol_DB_LIB $LIBS"
17536
17537         cat > conftest.$ac_ext <<EOF
17538 #line 17539 "configure"
17539 #include "confdefs.h"
17540
17541 #ifdef HAVE_DB_185_H
17542 # include <db_185.h>
17543 #else
17544 # include <db.h>
17545 #endif
17546
17547 #ifndef DB_VERSION_MAJOR
17548 # define DB_VERSION_MAJOR 1
17549 #endif
17550
17551 #ifndef NULL
17552 #define NULL ((void*)0)
17553 #endif
17554
17555 int main() {
17556
17557 #if DB_VERSION_MAJOR > 1
17558         {
17559                 char *version;
17560                 int major, minor, patch;
17561
17562                 version = db_version( &major, &minor, &patch );
17563
17564                 if( major != DB_VERSION_MAJOR ||
17565                         minor < DB_VERSION_MINOR )
17566                 {
17567                         printf("Berkeley DB version mismatch\n"
17568                                 "\texpected: %s\n\tgot: %s\n",
17569                                 DB_VERSION_STRING, version);
17570                         return 1;
17571                 }
17572         }
17573 #endif
17574
17575 #if DB_VERSION_MAJOR > 2
17576         db_env_create( NULL, 0 );
17577 #elif DB_VERSION_MAJOR > 1
17578         db_appexit( NULL );
17579 #else
17580         (void) dbopen( NULL, 0, 0, 0, NULL);
17581 #endif
17582
17583 ; return 0; }
17584 EOF
17585 if { (eval echo configure:17586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17586   rm -rf conftest*
17587   ol_cv_db_db1=yes
17588 else
17589   echo "configure: failed program was:" >&5
17590   cat conftest.$ac_ext >&5
17591   rm -rf conftest*
17592   ol_cv_db_db1=no
17593 fi
17594 rm -f conftest*
17595
17596         LIBS="$ol_LIBS"
17597
17598 fi
17599
17600 echo "$ac_t""$ol_cv_db_db1" 1>&6
17601
17602         if test $ol_cv_db_db1 = yes ; then
17603                 ol_cv_lib_db=-ldb1
17604         fi
17605 fi
17606
17607
17608                 if test "$ol_cv_lib_db" != no ; then
17609                         ol_cv_berkeley_db=yes
17610                 fi
17611         fi
17612 fi
17613
17614         else
17615                 ol_cv_berkeley_db=no
17616 for ac_hdr in db.h
17617 do
17618 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17619 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17620 echo "configure:17621: checking for $ac_hdr" >&5
17621 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17622   echo $ac_n "(cached) $ac_c" 1>&6
17623 else
17624   cat > conftest.$ac_ext <<EOF
17625 #line 17626 "configure"
17626 #include "confdefs.h"
17627 #include <$ac_hdr>
17628 EOF
17629 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17630 { (eval echo configure:17631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17631 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17632 if test -z "$ac_err"; then
17633   rm -rf conftest*
17634   eval "ac_cv_header_$ac_safe=yes"
17635 else
17636   echo "$ac_err" >&5
17637   echo "configure: failed program was:" >&5
17638   cat conftest.$ac_ext >&5
17639   rm -rf conftest*
17640   eval "ac_cv_header_$ac_safe=no"
17641 fi
17642 rm -f conftest*
17643 fi
17644 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17645   echo "$ac_t""yes" 1>&6
17646     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17647   cat >> confdefs.h <<EOF
17648 #define $ac_tr_hdr 1
17649 EOF
17650  
17651 else
17652   echo "$ac_t""no" 1>&6
17653 fi
17654 done
17655
17656 if test $ac_cv_header_db_h = yes; then
17657         ol_cv_lib_db=no
17658 if test $ol_cv_lib_db = no ; then
17659         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17660 echo "configure:17661: checking for Berkeley DB link (default)" >&5
17661 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17662   echo $ac_n "(cached) $ac_c" 1>&6
17663 else
17664   
17665         ol_DB_LIB=
17666         ol_LIBS=$LIBS
17667         LIBS="$ol_DB_LIB $LIBS"
17668
17669         cat > conftest.$ac_ext <<EOF
17670 #line 17671 "configure"
17671 #include "confdefs.h"
17672
17673 #ifdef HAVE_DB_185_H
17674 # include <db_185.h>
17675 #else
17676 # include <db.h>
17677 #endif
17678
17679 #ifndef DB_VERSION_MAJOR
17680 # define DB_VERSION_MAJOR 1
17681 #endif
17682
17683 #ifndef NULL
17684 #define NULL ((void*)0)
17685 #endif
17686
17687 int main() {
17688
17689 #if DB_VERSION_MAJOR > 1
17690         {
17691                 char *version;
17692                 int major, minor, patch;
17693
17694                 version = db_version( &major, &minor, &patch );
17695
17696                 if( major != DB_VERSION_MAJOR ||
17697                         minor < DB_VERSION_MINOR )
17698                 {
17699                         printf("Berkeley DB version mismatch\n"
17700                                 "\texpected: %s\n\tgot: %s\n",
17701                                 DB_VERSION_STRING, version);
17702                         return 1;
17703                 }
17704         }
17705 #endif
17706
17707 #if DB_VERSION_MAJOR > 2
17708         db_env_create( NULL, 0 );
17709 #elif DB_VERSION_MAJOR > 1
17710         db_appexit( NULL );
17711 #else
17712         (void) dbopen( NULL, 0, 0, 0, NULL);
17713 #endif
17714
17715 ; return 0; }
17716 EOF
17717 if { (eval echo configure:17718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17718   rm -rf conftest*
17719   ol_cv_db_none=yes
17720 else
17721   echo "configure: failed program was:" >&5
17722   cat conftest.$ac_ext >&5
17723   rm -rf conftest*
17724   ol_cv_db_none=no
17725 fi
17726 rm -f conftest*
17727
17728         LIBS="$ol_LIBS"
17729
17730 fi
17731
17732 echo "$ac_t""$ol_cv_db_none" 1>&6
17733
17734         if test $ol_cv_db_none = yes ; then
17735                 ol_cv_lib_db=yes
17736         fi
17737 fi
17738
17739 if test $ol_cv_lib_db = no ; then
17740         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17741 echo "configure:17742: checking for Berkeley DB link (-ldb4)" >&5
17742 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17743   echo $ac_n "(cached) $ac_c" 1>&6
17744 else
17745   
17746         ol_DB_LIB=-ldb4
17747         ol_LIBS=$LIBS
17748         LIBS="$ol_DB_LIB $LIBS"
17749
17750         cat > conftest.$ac_ext <<EOF
17751 #line 17752 "configure"
17752 #include "confdefs.h"
17753
17754 #ifdef HAVE_DB_185_H
17755 # include <db_185.h>
17756 #else
17757 # include <db.h>
17758 #endif
17759
17760 #ifndef DB_VERSION_MAJOR
17761 # define DB_VERSION_MAJOR 1
17762 #endif
17763
17764 #ifndef NULL
17765 #define NULL ((void*)0)
17766 #endif
17767
17768 int main() {
17769
17770 #if DB_VERSION_MAJOR > 1
17771         {
17772                 char *version;
17773                 int major, minor, patch;
17774
17775                 version = db_version( &major, &minor, &patch );
17776
17777                 if( major != DB_VERSION_MAJOR ||
17778                         minor < DB_VERSION_MINOR )
17779                 {
17780                         printf("Berkeley DB version mismatch\n"
17781                                 "\texpected: %s\n\tgot: %s\n",
17782                                 DB_VERSION_STRING, version);
17783                         return 1;
17784                 }
17785         }
17786 #endif
17787
17788 #if DB_VERSION_MAJOR > 2
17789         db_env_create( NULL, 0 );
17790 #elif DB_VERSION_MAJOR > 1
17791         db_appexit( NULL );
17792 #else
17793         (void) dbopen( NULL, 0, 0, 0, NULL);
17794 #endif
17795
17796 ; return 0; }
17797 EOF
17798 if { (eval echo configure:17799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17799   rm -rf conftest*
17800   ol_cv_db_db4=yes
17801 else
17802   echo "configure: failed program was:" >&5
17803   cat conftest.$ac_ext >&5
17804   rm -rf conftest*
17805   ol_cv_db_db4=no
17806 fi
17807 rm -f conftest*
17808
17809         LIBS="$ol_LIBS"
17810
17811 fi
17812
17813 echo "$ac_t""$ol_cv_db_db4" 1>&6
17814
17815         if test $ol_cv_db_db4 = yes ; then
17816                 ol_cv_lib_db=-ldb4
17817         fi
17818 fi
17819
17820 if test $ol_cv_lib_db = no ; then
17821         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17822 echo "configure:17823: checking for Berkeley DB link (-ldb)" >&5
17823 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17824   echo $ac_n "(cached) $ac_c" 1>&6
17825 else
17826   
17827         ol_DB_LIB=-ldb
17828         ol_LIBS=$LIBS
17829         LIBS="$ol_DB_LIB $LIBS"
17830
17831         cat > conftest.$ac_ext <<EOF
17832 #line 17833 "configure"
17833 #include "confdefs.h"
17834
17835 #ifdef HAVE_DB_185_H
17836 # include <db_185.h>
17837 #else
17838 # include <db.h>
17839 #endif
17840
17841 #ifndef DB_VERSION_MAJOR
17842 # define DB_VERSION_MAJOR 1
17843 #endif
17844
17845 #ifndef NULL
17846 #define NULL ((void*)0)
17847 #endif
17848
17849 int main() {
17850
17851 #if DB_VERSION_MAJOR > 1
17852         {
17853                 char *version;
17854                 int major, minor, patch;
17855
17856                 version = db_version( &major, &minor, &patch );
17857
17858                 if( major != DB_VERSION_MAJOR ||
17859                         minor < DB_VERSION_MINOR )
17860                 {
17861                         printf("Berkeley DB version mismatch\n"
17862                                 "\texpected: %s\n\tgot: %s\n",
17863                                 DB_VERSION_STRING, version);
17864                         return 1;
17865                 }
17866         }
17867 #endif
17868
17869 #if DB_VERSION_MAJOR > 2
17870         db_env_create( NULL, 0 );
17871 #elif DB_VERSION_MAJOR > 1
17872         db_appexit( NULL );
17873 #else
17874         (void) dbopen( NULL, 0, 0, 0, NULL);
17875 #endif
17876
17877 ; return 0; }
17878 EOF
17879 if { (eval echo configure:17880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17880   rm -rf conftest*
17881   ol_cv_db_db=yes
17882 else
17883   echo "configure: failed program was:" >&5
17884   cat conftest.$ac_ext >&5
17885   rm -rf conftest*
17886   ol_cv_db_db=no
17887 fi
17888 rm -f conftest*
17889
17890         LIBS="$ol_LIBS"
17891
17892 fi
17893
17894 echo "$ac_t""$ol_cv_db_db" 1>&6
17895
17896         if test $ol_cv_db_db = yes ; then
17897                 ol_cv_lib_db=-ldb
17898         fi
17899 fi
17900
17901 if test $ol_cv_lib_db = no ; then
17902         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17903 echo "configure:17904: checking for Berkeley DB link (-ldb3)" >&5
17904 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17905   echo $ac_n "(cached) $ac_c" 1>&6
17906 else
17907   
17908         ol_DB_LIB=-ldb3
17909         ol_LIBS=$LIBS
17910         LIBS="$ol_DB_LIB $LIBS"
17911
17912         cat > conftest.$ac_ext <<EOF
17913 #line 17914 "configure"
17914 #include "confdefs.h"
17915
17916 #ifdef HAVE_DB_185_H
17917 # include <db_185.h>
17918 #else
17919 # include <db.h>
17920 #endif
17921
17922 #ifndef DB_VERSION_MAJOR
17923 # define DB_VERSION_MAJOR 1
17924 #endif
17925
17926 #ifndef NULL
17927 #define NULL ((void*)0)
17928 #endif
17929
17930 int main() {
17931
17932 #if DB_VERSION_MAJOR > 1
17933         {
17934                 char *version;
17935                 int major, minor, patch;
17936
17937                 version = db_version( &major, &minor, &patch );
17938
17939                 if( major != DB_VERSION_MAJOR ||
17940                         minor < DB_VERSION_MINOR )
17941                 {
17942                         printf("Berkeley DB version mismatch\n"
17943                                 "\texpected: %s\n\tgot: %s\n",
17944                                 DB_VERSION_STRING, version);
17945                         return 1;
17946                 }
17947         }
17948 #endif
17949
17950 #if DB_VERSION_MAJOR > 2
17951         db_env_create( NULL, 0 );
17952 #elif DB_VERSION_MAJOR > 1
17953         db_appexit( NULL );
17954 #else
17955         (void) dbopen( NULL, 0, 0, 0, NULL);
17956 #endif
17957
17958 ; return 0; }
17959 EOF
17960 if { (eval echo configure:17961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17961   rm -rf conftest*
17962   ol_cv_db_db3=yes
17963 else
17964   echo "configure: failed program was:" >&5
17965   cat conftest.$ac_ext >&5
17966   rm -rf conftest*
17967   ol_cv_db_db3=no
17968 fi
17969 rm -f conftest*
17970
17971         LIBS="$ol_LIBS"
17972
17973 fi
17974
17975 echo "$ac_t""$ol_cv_db_db3" 1>&6
17976
17977         if test $ol_cv_db_db3 = yes ; then
17978                 ol_cv_lib_db=-ldb3
17979         fi
17980 fi
17981
17982 if test $ol_cv_lib_db = no ; then
17983         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17984 echo "configure:17985: checking for Berkeley DB link (-ldb2)" >&5
17985 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17986   echo $ac_n "(cached) $ac_c" 1>&6
17987 else
17988   
17989         ol_DB_LIB=-ldb2
17990         ol_LIBS=$LIBS
17991         LIBS="$ol_DB_LIB $LIBS"
17992
17993         cat > conftest.$ac_ext <<EOF
17994 #line 17995 "configure"
17995 #include "confdefs.h"
17996
17997 #ifdef HAVE_DB_185_H
17998 # include <db_185.h>
17999 #else
18000 # include <db.h>
18001 #endif
18002
18003 #ifndef DB_VERSION_MAJOR
18004 # define DB_VERSION_MAJOR 1
18005 #endif
18006
18007 #ifndef NULL
18008 #define NULL ((void*)0)
18009 #endif
18010
18011 int main() {
18012
18013 #if DB_VERSION_MAJOR > 1
18014         {
18015                 char *version;
18016                 int major, minor, patch;
18017
18018                 version = db_version( &major, &minor, &patch );
18019
18020                 if( major != DB_VERSION_MAJOR ||
18021                         minor < DB_VERSION_MINOR )
18022                 {
18023                         printf("Berkeley DB version mismatch\n"
18024                                 "\texpected: %s\n\tgot: %s\n",
18025                                 DB_VERSION_STRING, version);
18026                         return 1;
18027                 }
18028         }
18029 #endif
18030
18031 #if DB_VERSION_MAJOR > 2
18032         db_env_create( NULL, 0 );
18033 #elif DB_VERSION_MAJOR > 1
18034         db_appexit( NULL );
18035 #else
18036         (void) dbopen( NULL, 0, 0, 0, NULL);
18037 #endif
18038
18039 ; return 0; }
18040 EOF
18041 if { (eval echo configure:18042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18042   rm -rf conftest*
18043   ol_cv_db_db2=yes
18044 else
18045   echo "configure: failed program was:" >&5
18046   cat conftest.$ac_ext >&5
18047   rm -rf conftest*
18048   ol_cv_db_db2=no
18049 fi
18050 rm -f conftest*
18051
18052         LIBS="$ol_LIBS"
18053
18054 fi
18055
18056 echo "$ac_t""$ol_cv_db_db2" 1>&6
18057
18058         if test $ol_cv_db_db2 = yes ; then
18059                 ol_cv_lib_db=-ldb2
18060         fi
18061 fi
18062
18063 if test $ol_cv_lib_db = no ; then
18064         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18065 echo "configure:18066: checking for Berkeley DB link (-ldb1)" >&5
18066 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18067   echo $ac_n "(cached) $ac_c" 1>&6
18068 else
18069   
18070         ol_DB_LIB=-ldb1
18071         ol_LIBS=$LIBS
18072         LIBS="$ol_DB_LIB $LIBS"
18073
18074         cat > conftest.$ac_ext <<EOF
18075 #line 18076 "configure"
18076 #include "confdefs.h"
18077
18078 #ifdef HAVE_DB_185_H
18079 # include <db_185.h>
18080 #else
18081 # include <db.h>
18082 #endif
18083
18084 #ifndef DB_VERSION_MAJOR
18085 # define DB_VERSION_MAJOR 1
18086 #endif
18087
18088 #ifndef NULL
18089 #define NULL ((void*)0)
18090 #endif
18091
18092 int main() {
18093
18094 #if DB_VERSION_MAJOR > 1
18095         {
18096                 char *version;
18097                 int major, minor, patch;
18098
18099                 version = db_version( &major, &minor, &patch );
18100
18101                 if( major != DB_VERSION_MAJOR ||
18102                         minor < DB_VERSION_MINOR )
18103                 {
18104                         printf("Berkeley DB version mismatch\n"
18105                                 "\texpected: %s\n\tgot: %s\n",
18106                                 DB_VERSION_STRING, version);
18107                         return 1;
18108                 }
18109         }
18110 #endif
18111
18112 #if DB_VERSION_MAJOR > 2
18113         db_env_create( NULL, 0 );
18114 #elif DB_VERSION_MAJOR > 1
18115         db_appexit( NULL );
18116 #else
18117         (void) dbopen( NULL, 0, 0, 0, NULL);
18118 #endif
18119
18120 ; return 0; }
18121 EOF
18122 if { (eval echo configure:18123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18123   rm -rf conftest*
18124   ol_cv_db_db1=yes
18125 else
18126   echo "configure: failed program was:" >&5
18127   cat conftest.$ac_ext >&5
18128   rm -rf conftest*
18129   ol_cv_db_db1=no
18130 fi
18131 rm -f conftest*
18132
18133         LIBS="$ol_LIBS"
18134
18135 fi
18136
18137 echo "$ac_t""$ol_cv_db_db1" 1>&6
18138
18139         if test $ol_cv_db_db1 = yes ; then
18140                 ol_cv_lib_db=-ldb1
18141         fi
18142 fi
18143
18144
18145         if test "$ol_cv_lib_db" != no ; then
18146                 ol_cv_berkeley_db=yes
18147                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18148 echo "configure:18149: checking for Berkeley DB thread support" >&5
18149 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18150   echo $ac_n "(cached) $ac_c" 1>&6
18151 else
18152   
18153         ol_LIBS="$LIBS"
18154         if test $ol_cv_lib_db != yes ; then
18155                 LIBS="$ol_cv_lib_db"
18156         fi
18157
18158         if test "$cross_compiling" = yes; then
18159   ol_cv_berkeley_db_thread=cross
18160 else
18161   cat > conftest.$ac_ext <<EOF
18162 #line 18163 "configure"
18163 #include "confdefs.h"
18164
18165 #ifdef HAVE_DB_185_H
18166         choke me;
18167 #else
18168 #include <db.h>
18169 #endif
18170 #ifndef NULL
18171 #define NULL ((void *)0)
18172 #endif
18173 main()
18174 {
18175         int rc;
18176         u_int32_t flags = DB_CREATE |
18177 #ifdef DB_PRIVATE
18178                 DB_PRIVATE |
18179 #endif
18180                 DB_THREAD;
18181
18182 #if DB_VERSION_MAJOR > 2
18183         DB_ENV *env = NULL;
18184
18185         rc = db_env_create( &env, 0 );
18186
18187         flags |= DB_INIT_MPOOL;
18188 #ifdef DB_MPOOL_PRIVATE
18189         flags |= DB_MPOOL_PRIVATE;
18190 #endif
18191
18192         if( rc ) {
18193                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18194                 return rc;
18195         }
18196
18197 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18198         rc = env->open( env, NULL, flags, 0 );
18199 #else
18200         rc = env->open( env, NULL, NULL, flags, 0 );
18201 #endif
18202
18203         if ( rc == 0 ) {
18204                 rc = env->close( env, 0 );
18205         }
18206
18207         if( rc ) {
18208                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18209                 return rc;
18210         }
18211
18212 #else
18213         DB_ENV env;
18214         memset( &env, '\0', sizeof(env) );
18215
18216         rc = db_appinit( NULL, NULL, &env, flags );
18217
18218         if( rc == 0 ) {
18219                 db_appexit( &env );
18220         }
18221
18222         unlink("__db_mpool.share");
18223         unlink("__db_lock.share");
18224 #endif
18225
18226         return rc;
18227 }
18228 EOF
18229 if { (eval echo configure:18230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18230 then
18231   ol_cv_berkeley_db_thread=yes
18232 else
18233   echo "configure: failed program was:" >&5
18234   cat conftest.$ac_ext >&5
18235   rm -fr conftest*
18236   ol_cv_berkeley_db_thread=no
18237 fi
18238 rm -fr conftest*
18239 fi
18240
18241
18242         LIBS="$ol_LIBS"
18243
18244         if test $ol_cv_berkeley_db_thread != no ; then
18245                 cat >> confdefs.h <<\EOF
18246 #define HAVE_BERKELEY_DB_THREAD 1
18247 EOF
18248
18249         fi
18250
18251 fi
18252
18253 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18254         fi
18255 fi
18256
18257         fi
18258
18259         if test $ol_cv_berkeley_db != no ; then
18260                 cat >> confdefs.h <<\EOF
18261 #define HAVE_BERKELEY_DB 1
18262 EOF
18263
18264
18265                 ol_link_ldbm=berkeley
18266                 ol_with_ldbm_api=berkeley
18267
18268                 if test $ol_with_ldbm_type = hash ; then
18269                         cat >> confdefs.h <<\EOF
18270 #define LDBM_USE_DBHASH 1
18271 EOF
18272
18273                 else
18274                         cat >> confdefs.h <<\EOF
18275 #define LDBM_USE_DBBTREE 1
18276 EOF
18277
18278                 fi
18279
18280                                                 if test $ol_cv_lib_db != yes ; then
18281                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18282                 fi
18283         fi
18284 fi
18285
18286 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18287         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18288 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18289         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18290 echo "configure:18291: checking Berkeley DB version for BDB backend" >&5
18291 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18292   echo $ac_n "(cached) $ac_c" 1>&6
18293 else
18294   
18295         cat > conftest.$ac_ext <<EOF
18296 #line 18297 "configure"
18297 #include "confdefs.h"
18298
18299 #include <db.h>
18300
18301  /* this check could be improved */
18302 #ifndef DB_VERSION_MAJOR
18303 #       define DB_VERSION_MAJOR 1
18304 #endif
18305
18306 /* require 4.0 or later */
18307 #if DB_VERSION_MAJOR >= 4 
18308         __db_version_compat
18309 #endif
18310         
18311 EOF
18312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18313   egrep "__db_version_compat" >/dev/null 2>&1; then
18314   rm -rf conftest*
18315   ol_cv_bdb_compat=yes
18316 else
18317   rm -rf conftest*
18318   ol_cv_bdb_compat=no
18319 fi
18320 rm -f conftest*
18321
18322 fi
18323
18324 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18325
18326
18327         if test $ol_cv_bdb_compat = yes ; then
18328                 ol_enable_bdb=yes
18329         elif test $ol_enable_bdb = yes ; then
18330                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18331         else
18332                 ol_enable_bdb=no
18333         fi
18334 fi
18335
18336 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18337         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18338         ol_with_ldbm_api=none
18339 fi
18340
18341 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18342         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18343 echo "configure:18344: checking for MDBM library" >&5
18344 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18345   echo $ac_n "(cached) $ac_c" 1>&6
18346 else
18347         ol_LIBS="$LIBS"
18348         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18349 echo "configure:18350: checking for mdbm_set_chain" >&5
18350 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18351   echo $ac_n "(cached) $ac_c" 1>&6
18352 else
18353   cat > conftest.$ac_ext <<EOF
18354 #line 18355 "configure"
18355 #include "confdefs.h"
18356 /* System header to define __stub macros and hopefully few prototypes,
18357     which can conflict with char mdbm_set_chain(); below.  */
18358 #include <assert.h>
18359 /* Override any gcc2 internal prototype to avoid an error.  */
18360 /* We use char because int might match the return type of a gcc2
18361     builtin and then its argument prototype would still apply.  */
18362 char mdbm_set_chain();
18363 char (*f)();
18364
18365 int main() {
18366
18367 /* The GNU C library defines this for functions which it implements
18368     to always fail with ENOSYS.  Some functions are actually named
18369     something starting with __ and the normal name is an alias.  */
18370 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18371 choke me
18372 #else
18373 f = mdbm_set_chain;
18374 #endif
18375
18376 ; return 0; }
18377 EOF
18378 if { (eval echo configure:18379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18379   rm -rf conftest*
18380   eval "ac_cv_func_mdbm_set_chain=yes"
18381 else
18382   echo "configure: failed program was:" >&5
18383   cat conftest.$ac_ext >&5
18384   rm -rf conftest*
18385   eval "ac_cv_func_mdbm_set_chain=no"
18386 fi
18387 rm -f conftest*
18388 fi
18389
18390 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18391   echo "$ac_t""yes" 1>&6
18392   ol_cv_lib_mdbm=yes
18393 else
18394   echo "$ac_t""no" 1>&6
18395
18396                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18397 echo "configure:18398: checking for mdbm_set_chain in -lmdbm" >&5
18398 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18399 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18400   echo $ac_n "(cached) $ac_c" 1>&6
18401 else
18402   ac_save_LIBS="$LIBS"
18403 LIBS="-lmdbm  $LIBS"
18404 cat > conftest.$ac_ext <<EOF
18405 #line 18406 "configure"
18406 #include "confdefs.h"
18407 /* Override any gcc2 internal prototype to avoid an error.  */
18408 /* We use char because int might match the return type of a gcc2
18409     builtin and then its argument prototype would still apply.  */
18410 char mdbm_set_chain();
18411
18412 int main() {
18413 mdbm_set_chain()
18414 ; return 0; }
18415 EOF
18416 if { (eval echo configure:18417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18417   rm -rf conftest*
18418   eval "ac_cv_lib_$ac_lib_var=yes"
18419 else
18420   echo "configure: failed program was:" >&5
18421   cat conftest.$ac_ext >&5
18422   rm -rf conftest*
18423   eval "ac_cv_lib_$ac_lib_var=no"
18424 fi
18425 rm -f conftest*
18426 LIBS="$ac_save_LIBS"
18427
18428 fi
18429 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18430   echo "$ac_t""yes" 1>&6
18431   ol_cv_lib_mdbm=-lmdbm
18432 else
18433   echo "$ac_t""no" 1>&6
18434 ol_cv_lib_mdbm=no
18435 fi
18436
18437         
18438 fi
18439
18440         LIBS="$ol_LIBS"
18441
18442 fi
18443
18444 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18445
18446
18447  for ac_hdr in mdbm.h
18448 do
18449 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18450 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18451 echo "configure:18452: checking for $ac_hdr" >&5
18452 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18453   echo $ac_n "(cached) $ac_c" 1>&6
18454 else
18455   cat > conftest.$ac_ext <<EOF
18456 #line 18457 "configure"
18457 #include "confdefs.h"
18458 #include <$ac_hdr>
18459 EOF
18460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18461 { (eval echo configure:18462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18463 if test -z "$ac_err"; then
18464   rm -rf conftest*
18465   eval "ac_cv_header_$ac_safe=yes"
18466 else
18467   echo "$ac_err" >&5
18468   echo "configure: failed program was:" >&5
18469   cat conftest.$ac_ext >&5
18470   rm -rf conftest*
18471   eval "ac_cv_header_$ac_safe=no"
18472 fi
18473 rm -f conftest*
18474 fi
18475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18476   echo "$ac_t""yes" 1>&6
18477     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18478   cat >> confdefs.h <<EOF
18479 #define $ac_tr_hdr 1
18480 EOF
18481  
18482 else
18483   echo "$ac_t""no" 1>&6
18484 fi
18485 done
18486
18487  echo $ac_n "checking for db""... $ac_c" 1>&6
18488 echo "configure:18489: checking for db" >&5
18489 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18490   echo $ac_n "(cached) $ac_c" 1>&6
18491 else
18492   
18493         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18494                 ol_cv_mdbm=no
18495         else
18496                 ol_cv_mdbm=yes
18497         fi
18498
18499 fi
18500
18501 echo "$ac_t""$ol_cv_mdbm" 1>&6
18502  if test $ol_cv_mdbm = yes ; then
18503         cat >> confdefs.h <<\EOF
18504 #define HAVE_MDBM 1
18505 EOF
18506
18507  fi
18508
18509
18510         if test $ol_cv_mdbm = yes ; then
18511                 ol_link_ldbm=mdbm
18512                 ol_with_ldbm_api=mdbm
18513                 if test $ol_cv_lib_mdbm != yes ; then
18514                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18515                 fi
18516         fi
18517 fi
18518
18519 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18520         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18521 echo "configure:18522: checking for GDBM library" >&5
18522 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18523   echo $ac_n "(cached) $ac_c" 1>&6
18524 else
18525         ol_LIBS="$LIBS"
18526         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18527 echo "configure:18528: checking for gdbm_open" >&5
18528 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18529   echo $ac_n "(cached) $ac_c" 1>&6
18530 else
18531   cat > conftest.$ac_ext <<EOF
18532 #line 18533 "configure"
18533 #include "confdefs.h"
18534 /* System header to define __stub macros and hopefully few prototypes,
18535     which can conflict with char gdbm_open(); below.  */
18536 #include <assert.h>
18537 /* Override any gcc2 internal prototype to avoid an error.  */
18538 /* We use char because int might match the return type of a gcc2
18539     builtin and then its argument prototype would still apply.  */
18540 char gdbm_open();
18541 char (*f)();
18542
18543 int main() {
18544
18545 /* The GNU C library defines this for functions which it implements
18546     to always fail with ENOSYS.  Some functions are actually named
18547     something starting with __ and the normal name is an alias.  */
18548 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18549 choke me
18550 #else
18551 f = gdbm_open;
18552 #endif
18553
18554 ; return 0; }
18555 EOF
18556 if { (eval echo configure:18557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18557   rm -rf conftest*
18558   eval "ac_cv_func_gdbm_open=yes"
18559 else
18560   echo "configure: failed program was:" >&5
18561   cat conftest.$ac_ext >&5
18562   rm -rf conftest*
18563   eval "ac_cv_func_gdbm_open=no"
18564 fi
18565 rm -f conftest*
18566 fi
18567
18568 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18569   echo "$ac_t""yes" 1>&6
18570   ol_cv_lib_gdbm=yes
18571 else
18572   echo "$ac_t""no" 1>&6
18573
18574                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18575 echo "configure:18576: checking for gdbm_open in -lgdbm" >&5
18576 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18577 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18578   echo $ac_n "(cached) $ac_c" 1>&6
18579 else
18580   ac_save_LIBS="$LIBS"
18581 LIBS="-lgdbm  $LIBS"
18582 cat > conftest.$ac_ext <<EOF
18583 #line 18584 "configure"
18584 #include "confdefs.h"
18585 /* Override any gcc2 internal prototype to avoid an error.  */
18586 /* We use char because int might match the return type of a gcc2
18587     builtin and then its argument prototype would still apply.  */
18588 char gdbm_open();
18589
18590 int main() {
18591 gdbm_open()
18592 ; return 0; }
18593 EOF
18594 if { (eval echo configure:18595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18595   rm -rf conftest*
18596   eval "ac_cv_lib_$ac_lib_var=yes"
18597 else
18598   echo "configure: failed program was:" >&5
18599   cat conftest.$ac_ext >&5
18600   rm -rf conftest*
18601   eval "ac_cv_lib_$ac_lib_var=no"
18602 fi
18603 rm -f conftest*
18604 LIBS="$ac_save_LIBS"
18605
18606 fi
18607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18608   echo "$ac_t""yes" 1>&6
18609   ol_cv_lib_gdbm=-lgdbm
18610 else
18611   echo "$ac_t""no" 1>&6
18612 ol_cv_lib_gdbm=no
18613 fi
18614
18615         
18616 fi
18617
18618         LIBS="$ol_LIBS"
18619
18620 fi
18621
18622 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18623
18624
18625  for ac_hdr in gdbm.h
18626 do
18627 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18628 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18629 echo "configure:18630: checking for $ac_hdr" >&5
18630 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18631   echo $ac_n "(cached) $ac_c" 1>&6
18632 else
18633   cat > conftest.$ac_ext <<EOF
18634 #line 18635 "configure"
18635 #include "confdefs.h"
18636 #include <$ac_hdr>
18637 EOF
18638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18639 { (eval echo configure:18640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18641 if test -z "$ac_err"; then
18642   rm -rf conftest*
18643   eval "ac_cv_header_$ac_safe=yes"
18644 else
18645   echo "$ac_err" >&5
18646   echo "configure: failed program was:" >&5
18647   cat conftest.$ac_ext >&5
18648   rm -rf conftest*
18649   eval "ac_cv_header_$ac_safe=no"
18650 fi
18651 rm -f conftest*
18652 fi
18653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18654   echo "$ac_t""yes" 1>&6
18655     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18656   cat >> confdefs.h <<EOF
18657 #define $ac_tr_hdr 1
18658 EOF
18659  
18660 else
18661   echo "$ac_t""no" 1>&6
18662 fi
18663 done
18664
18665  echo $ac_n "checking for db""... $ac_c" 1>&6
18666 echo "configure:18667: checking for db" >&5
18667 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18668   echo $ac_n "(cached) $ac_c" 1>&6
18669 else
18670   
18671         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18672                 ol_cv_gdbm=no
18673         else
18674                 ol_cv_gdbm=yes
18675         fi
18676
18677 fi
18678
18679 echo "$ac_t""$ol_cv_gdbm" 1>&6
18680  if test $ol_cv_gdbm = yes ; then
18681         cat >> confdefs.h <<\EOF
18682 #define HAVE_GDBM 1
18683 EOF
18684
18685  fi
18686
18687
18688         if test $ol_cv_gdbm = yes ; then
18689                 ol_link_ldbm=gdbm
18690                 ol_with_ldbm_api=gdbm
18691
18692                 if test $ol_cv_lib_gdbm != yes ; then
18693                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18694                 fi
18695         fi
18696 fi
18697
18698 if test $ol_with_ldbm_api = ndbm ; then
18699         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18700 echo "configure:18701: checking for NDBM library" >&5
18701 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18702   echo $ac_n "(cached) $ac_c" 1>&6
18703 else
18704         ol_LIBS="$LIBS"
18705         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18706 echo "configure:18707: checking for dbm_open" >&5
18707 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18708   echo $ac_n "(cached) $ac_c" 1>&6
18709 else
18710   cat > conftest.$ac_ext <<EOF
18711 #line 18712 "configure"
18712 #include "confdefs.h"
18713 /* System header to define __stub macros and hopefully few prototypes,
18714     which can conflict with char dbm_open(); below.  */
18715 #include <assert.h>
18716 /* Override any gcc2 internal prototype to avoid an error.  */
18717 /* We use char because int might match the return type of a gcc2
18718     builtin and then its argument prototype would still apply.  */
18719 char dbm_open();
18720 char (*f)();
18721
18722 int main() {
18723
18724 /* The GNU C library defines this for functions which it implements
18725     to always fail with ENOSYS.  Some functions are actually named
18726     something starting with __ and the normal name is an alias.  */
18727 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18728 choke me
18729 #else
18730 f = dbm_open;
18731 #endif
18732
18733 ; return 0; }
18734 EOF
18735 if { (eval echo configure:18736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18736   rm -rf conftest*
18737   eval "ac_cv_func_dbm_open=yes"
18738 else
18739   echo "configure: failed program was:" >&5
18740   cat conftest.$ac_ext >&5
18741   rm -rf conftest*
18742   eval "ac_cv_func_dbm_open=no"
18743 fi
18744 rm -f conftest*
18745 fi
18746
18747 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18748   echo "$ac_t""yes" 1>&6
18749   ol_cv_lib_ndbm=yes
18750 else
18751   echo "$ac_t""no" 1>&6
18752
18753                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18754 echo "configure:18755: checking for dbm_open in -lndbm" >&5
18755 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18756 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18757   echo $ac_n "(cached) $ac_c" 1>&6
18758 else
18759   ac_save_LIBS="$LIBS"
18760 LIBS="-lndbm  $LIBS"
18761 cat > conftest.$ac_ext <<EOF
18762 #line 18763 "configure"
18763 #include "confdefs.h"
18764 /* Override any gcc2 internal prototype to avoid an error.  */
18765 /* We use char because int might match the return type of a gcc2
18766     builtin and then its argument prototype would still apply.  */
18767 char dbm_open();
18768
18769 int main() {
18770 dbm_open()
18771 ; return 0; }
18772 EOF
18773 if { (eval echo configure:18774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18774   rm -rf conftest*
18775   eval "ac_cv_lib_$ac_lib_var=yes"
18776 else
18777   echo "configure: failed program was:" >&5
18778   cat conftest.$ac_ext >&5
18779   rm -rf conftest*
18780   eval "ac_cv_lib_$ac_lib_var=no"
18781 fi
18782 rm -f conftest*
18783 LIBS="$ac_save_LIBS"
18784
18785 fi
18786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18787   echo "$ac_t""yes" 1>&6
18788   ol_cv_lib_ndbm=-lndbm
18789 else
18790   echo "$ac_t""no" 1>&6
18791
18792                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18793 echo "configure:18794: checking for dbm_open in -ldbm" >&5
18794 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18796   echo $ac_n "(cached) $ac_c" 1>&6
18797 else
18798   ac_save_LIBS="$LIBS"
18799 LIBS="-ldbm  $LIBS"
18800 cat > conftest.$ac_ext <<EOF
18801 #line 18802 "configure"
18802 #include "confdefs.h"
18803 /* Override any gcc2 internal prototype to avoid an error.  */
18804 /* We use char because int might match the return type of a gcc2
18805     builtin and then its argument prototype would still apply.  */
18806 char dbm_open();
18807
18808 int main() {
18809 dbm_open()
18810 ; return 0; }
18811 EOF
18812 if { (eval echo configure:18813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18813   rm -rf conftest*
18814   eval "ac_cv_lib_$ac_lib_var=yes"
18815 else
18816   echo "configure: failed program was:" >&5
18817   cat conftest.$ac_ext >&5
18818   rm -rf conftest*
18819   eval "ac_cv_lib_$ac_lib_var=no"
18820 fi
18821 rm -f conftest*
18822 LIBS="$ac_save_LIBS"
18823
18824 fi
18825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18826   echo "$ac_t""yes" 1>&6
18827   ol_cv_lib_ndbm=-ldbm
18828 else
18829   echo "$ac_t""no" 1>&6
18830 ol_cv_lib_ndbm=no
18831 fi
18832                 
18833 fi
18834
18835         
18836 fi
18837
18838         LIBS="$ol_LIBS"
18839
18840 fi
18841
18842 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18843
18844
18845  for ac_hdr in ndbm.h
18846 do
18847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18849 echo "configure:18850: checking for $ac_hdr" >&5
18850 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18851   echo $ac_n "(cached) $ac_c" 1>&6
18852 else
18853   cat > conftest.$ac_ext <<EOF
18854 #line 18855 "configure"
18855 #include "confdefs.h"
18856 #include <$ac_hdr>
18857 EOF
18858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18859 { (eval echo configure:18860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18861 if test -z "$ac_err"; then
18862   rm -rf conftest*
18863   eval "ac_cv_header_$ac_safe=yes"
18864 else
18865   echo "$ac_err" >&5
18866   echo "configure: failed program was:" >&5
18867   cat conftest.$ac_ext >&5
18868   rm -rf conftest*
18869   eval "ac_cv_header_$ac_safe=no"
18870 fi
18871 rm -f conftest*
18872 fi
18873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18874   echo "$ac_t""yes" 1>&6
18875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18876   cat >> confdefs.h <<EOF
18877 #define $ac_tr_hdr 1
18878 EOF
18879  
18880 else
18881   echo "$ac_t""no" 1>&6
18882 fi
18883 done
18884
18885  echo $ac_n "checking for db""... $ac_c" 1>&6
18886 echo "configure:18887: checking for db" >&5
18887 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18888   echo $ac_n "(cached) $ac_c" 1>&6
18889 else
18890   
18891         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18892                 ol_cv_ndbm=no
18893         else
18894                 ol_cv_ndbm=yes
18895         fi
18896
18897 fi
18898
18899 echo "$ac_t""$ol_cv_ndbm" 1>&6
18900  if test $ol_cv_ndbm = yes ; then
18901         cat >> confdefs.h <<\EOF
18902 #define HAVE_NDBM 1
18903 EOF
18904
18905  fi
18906
18907
18908         if test $ol_cv_ndbm = yes ; then
18909                 ol_link_ldbm=ndbm
18910                 ol_with_ldbm_api=ndbm
18911
18912                 if test $ol_cv_lib_ndbm != yes ; then
18913                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
18914                 fi
18915         fi
18916 fi
18917
18918 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
18919         echo "configure: warning: could not find suitable LDBM backend" 1>&2
18920         if test $ol_enable_ldbm = yes ; then
18921                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
18922         fi
18923
18924         echo "configure: warning: disabling LDBM" 1>&2
18925         ol_enable_ldbm=no
18926 fi
18927
18928 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
18929         BUILD_LIBS_DYNAMIC=shared
18930         cat >> confdefs.h <<\EOF
18931 #define LDAP_LIBS_DYNAMIC 1
18932 EOF
18933
18934 else
18935         BUILD_LIBS_DYNAMIC=static
18936 fi
18937
18938 if test $ol_enable_wrappers != no ; then
18939         for ac_hdr in tcpd.h
18940 do
18941 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18942 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18943 echo "configure:18944: checking for $ac_hdr" >&5
18944 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18945   echo $ac_n "(cached) $ac_c" 1>&6
18946 else
18947   cat > conftest.$ac_ext <<EOF
18948 #line 18949 "configure"
18949 #include "confdefs.h"
18950 #include <$ac_hdr>
18951 EOF
18952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18953 { (eval echo configure:18954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18955 if test -z "$ac_err"; then
18956   rm -rf conftest*
18957   eval "ac_cv_header_$ac_safe=yes"
18958 else
18959   echo "$ac_err" >&5
18960   echo "configure: failed program was:" >&5
18961   cat conftest.$ac_ext >&5
18962   rm -rf conftest*
18963   eval "ac_cv_header_$ac_safe=no"
18964 fi
18965 rm -f conftest*
18966 fi
18967 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18968   echo "$ac_t""yes" 1>&6
18969     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18970   cat >> confdefs.h <<EOF
18971 #define $ac_tr_hdr 1
18972 EOF
18973  
18974                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
18975 echo "configure:18976: checking for TCP wrappers library" >&5
18976                 save_LIBS="$LIBS"
18977                 LIBS="$LIBS -lwrap"
18978                 cat > conftest.$ac_ext <<EOF
18979 #line 18980 "configure"
18980 #include "confdefs.h"
18981
18982 #include <tcpd.h>
18983 int allow_severity = 0;
18984 int deny_severity  = 0;
18985
18986 struct request_info *req;
18987                 
18988 int main() {
18989
18990 hosts_access(req)
18991                 
18992 ; return 0; }
18993 EOF
18994 if { (eval echo configure:18995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18995   rm -rf conftest*
18996   echo "$ac_t""-lwrap" 1>&6
18997                 have_wrappers=yes
18998                 LIBS="$save_LIBS"
18999 else
19000   echo "configure: failed program was:" >&5
19001   cat conftest.$ac_ext >&5
19002   rm -rf conftest*
19003   
19004                                 LIBS="$LIBS -lnsl"
19005                 cat > conftest.$ac_ext <<EOF
19006 #line 19007 "configure"
19007 #include "confdefs.h"
19008
19009 #include <tcpd.h>
19010 int allow_severity = 0;
19011 int deny_severity  = 0;
19012
19013 struct request_info *req;
19014                 
19015 int main() {
19016
19017 hosts_access(req)
19018                 
19019 ; return 0; }
19020 EOF
19021 if { (eval echo configure:19022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19022   rm -rf conftest*
19023   echo "$ac_t""-lwrap -lnsl" 1>&6
19024                 have_wrappers=yes
19025                 LIBS="$save_LIBS -lnsl"
19026 else
19027   echo "configure: failed program was:" >&5
19028   cat conftest.$ac_ext >&5
19029   rm -rf conftest*
19030   
19031                 echo "$ac_t""no" 1>&6
19032                 have_wrappers=no
19033                 LIBS=$save_LIBS
19034 fi
19035 rm -f conftest*
19036 fi
19037 rm -f conftest*
19038 else
19039   echo "$ac_t""no" 1>&6
19040 have_wrappers=no
19041 fi
19042 done
19043
19044
19045         if test $have_wrappers = yes ; then
19046                 cat >> confdefs.h <<\EOF
19047 #define HAVE_TCPD 1
19048 EOF
19049
19050                 WRAP_LIBS="-lwrap"
19051         elif test $ol_enable_wrappers = yes ; then
19052                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19053         else
19054                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19055                 WRAP_LIBS=""
19056         fi
19057 fi
19058
19059 if test $ol_enable_syslog != no ; then
19060         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19061 echo "configure:19062: checking for openlog" >&5
19062 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19063   echo $ac_n "(cached) $ac_c" 1>&6
19064 else
19065   cat > conftest.$ac_ext <<EOF
19066 #line 19067 "configure"
19067 #include "confdefs.h"
19068 /* System header to define __stub macros and hopefully few prototypes,
19069     which can conflict with char openlog(); below.  */
19070 #include <assert.h>
19071 /* Override any gcc2 internal prototype to avoid an error.  */
19072 /* We use char because int might match the return type of a gcc2
19073     builtin and then its argument prototype would still apply.  */
19074 char openlog();
19075 char (*f)();
19076
19077 int main() {
19078
19079 /* The GNU C library defines this for functions which it implements
19080     to always fail with ENOSYS.  Some functions are actually named
19081     something starting with __ and the normal name is an alias.  */
19082 #if defined (__stub_openlog) || defined (__stub___openlog)
19083 choke me
19084 #else
19085 f = openlog;
19086 #endif
19087
19088 ; return 0; }
19089 EOF
19090 if { (eval echo configure:19091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19091   rm -rf conftest*
19092   eval "ac_cv_func_openlog=yes"
19093 else
19094   echo "configure: failed program was:" >&5
19095   cat conftest.$ac_ext >&5
19096   rm -rf conftest*
19097   eval "ac_cv_func_openlog=no"
19098 fi
19099 rm -f conftest*
19100 fi
19101
19102 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19103   echo "$ac_t""yes" 1>&6
19104   :
19105 else
19106   echo "$ac_t""no" 1>&6
19107 fi
19108
19109         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19110                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19111         fi
19112         ol_enable_syslog=$ac_cv_func_openlog
19113 fi
19114
19115
19116 ol_link_sql=no
19117 if test $ol_enable_sql != no ; then
19118         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19119 echo "configure:19120: checking for SQLDriverConnect in -liodbc" >&5
19120 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19121 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19122   echo $ac_n "(cached) $ac_c" 1>&6
19123 else
19124   ac_save_LIBS="$LIBS"
19125 LIBS="-liodbc  $LIBS"
19126 cat > conftest.$ac_ext <<EOF
19127 #line 19128 "configure"
19128 #include "confdefs.h"
19129 /* Override any gcc2 internal prototype to avoid an error.  */
19130 /* We use char because int might match the return type of a gcc2
19131     builtin and then its argument prototype would still apply.  */
19132 char SQLDriverConnect();
19133
19134 int main() {
19135 SQLDriverConnect()
19136 ; return 0; }
19137 EOF
19138 if { (eval echo configure:19139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19139   rm -rf conftest*
19140   eval "ac_cv_lib_$ac_lib_var=yes"
19141 else
19142   echo "configure: failed program was:" >&5
19143   cat conftest.$ac_ext >&5
19144   rm -rf conftest*
19145   eval "ac_cv_lib_$ac_lib_var=no"
19146 fi
19147 rm -f conftest*
19148 LIBS="$ac_save_LIBS"
19149
19150 fi
19151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19152   echo "$ac_t""yes" 1>&6
19153   have_iodbc=yes
19154 else
19155   echo "$ac_t""no" 1>&6
19156 have_iodbc=no
19157 fi
19158
19159         if test $have_iodbc = yes ; then
19160                 ol_link_sql="-liodbc"
19161         else
19162                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19163 echo "configure:19164: checking for SQLDriverConnect in -lodbc" >&5
19164 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19165 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19166   echo $ac_n "(cached) $ac_c" 1>&6
19167 else
19168   ac_save_LIBS="$LIBS"
19169 LIBS="-lodbc  $LIBS"
19170 cat > conftest.$ac_ext <<EOF
19171 #line 19172 "configure"
19172 #include "confdefs.h"
19173 /* Override any gcc2 internal prototype to avoid an error.  */
19174 /* We use char because int might match the return type of a gcc2
19175     builtin and then its argument prototype would still apply.  */
19176 char SQLDriverConnect();
19177
19178 int main() {
19179 SQLDriverConnect()
19180 ; return 0; }
19181 EOF
19182 if { (eval echo configure:19183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19183   rm -rf conftest*
19184   eval "ac_cv_lib_$ac_lib_var=yes"
19185 else
19186   echo "configure: failed program was:" >&5
19187   cat conftest.$ac_ext >&5
19188   rm -rf conftest*
19189   eval "ac_cv_lib_$ac_lib_var=no"
19190 fi
19191 rm -f conftest*
19192 LIBS="$ac_save_LIBS"
19193
19194 fi
19195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19196   echo "$ac_t""yes" 1>&6
19197   have_odbc=yes
19198 else
19199   echo "$ac_t""no" 1>&6
19200 have_odbc=no
19201 fi
19202
19203                 if test $have_odbc = yes ; then
19204                         ol_link_sql="-lodbc"
19205                 fi
19206         fi
19207
19208         if test $ol_link_sql != no ; then
19209                 SLAPD_SQL_LIBS="$ol_link_sql"
19210
19211         elif test $ol_enable_sql != auto ; then
19212                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19213         fi
19214 fi
19215
19216 if test $ol_enable_tcl != no ; then
19217         for ac_hdr in tcl.h
19218 do
19219 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19220 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19221 echo "configure:19222: checking for $ac_hdr" >&5
19222 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19223   echo $ac_n "(cached) $ac_c" 1>&6
19224 else
19225   cat > conftest.$ac_ext <<EOF
19226 #line 19227 "configure"
19227 #include "confdefs.h"
19228 #include <$ac_hdr>
19229 EOF
19230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19231 { (eval echo configure:19232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19233 if test -z "$ac_err"; then
19234   rm -rf conftest*
19235   eval "ac_cv_header_$ac_safe=yes"
19236 else
19237   echo "$ac_err" >&5
19238   echo "configure: failed program was:" >&5
19239   cat conftest.$ac_ext >&5
19240   rm -rf conftest*
19241   eval "ac_cv_header_$ac_safe=no"
19242 fi
19243 rm -f conftest*
19244 fi
19245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19246   echo "$ac_t""yes" 1>&6
19247     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19248   cat >> confdefs.h <<EOF
19249 #define $ac_tr_hdr 1
19250 EOF
19251  
19252 else
19253   echo "$ac_t""no" 1>&6
19254 fi
19255 done
19256
19257
19258         if test $ac_cv_header_tcl_h != yes ; then
19259                 have_tcl=no
19260         else
19261                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19262                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19263 echo "configure:19264: checking for main in -l$lib" >&5
19264 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19265 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19266   echo $ac_n "(cached) $ac_c" 1>&6
19267 else
19268   ac_save_LIBS="$LIBS"
19269 LIBS="-l$lib  $LIBS"
19270 cat > conftest.$ac_ext <<EOF
19271 #line 19272 "configure"
19272 #include "confdefs.h"
19273
19274 int main() {
19275 main()
19276 ; return 0; }
19277 EOF
19278 if { (eval echo configure:19279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19279   rm -rf conftest*
19280   eval "ac_cv_lib_$ac_lib_var=yes"
19281 else
19282   echo "configure: failed program was:" >&5
19283   cat conftest.$ac_ext >&5
19284   rm -rf conftest*
19285   eval "ac_cv_lib_$ac_lib_var=no"
19286 fi
19287 rm -f conftest*
19288 LIBS="$ac_save_LIBS"
19289
19290 fi
19291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19292   echo "$ac_t""yes" 1>&6
19293   have_tcl=yes
19294                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19295                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19296                            else
19297                                         MOD_TCL_LIB="-l${lib}"
19298                            fi;break
19299 else
19300   echo "$ac_t""no" 1>&6
19301 have_tcl=no
19302 fi
19303
19304                 done
19305         fi
19306
19307         if test $have_tcl != yes ; then
19308                 echo "configure: warning: could not find -ltcl" 1>&2
19309                 if test $ol_enable_tcl = yes ; then
19310                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19311                 fi
19312
19313                 ol_enable_tcl=no
19314         fi
19315 fi
19316
19317 ol_link_termcap=no
19318 for ac_hdr in termcap.h ncurses.h
19319 do
19320 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19321 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19322 echo "configure:19323: checking for $ac_hdr" >&5
19323 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19324   echo $ac_n "(cached) $ac_c" 1>&6
19325 else
19326   cat > conftest.$ac_ext <<EOF
19327 #line 19328 "configure"
19328 #include "confdefs.h"
19329 #include <$ac_hdr>
19330 EOF
19331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19332 { (eval echo configure:19333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19334 if test -z "$ac_err"; then
19335   rm -rf conftest*
19336   eval "ac_cv_header_$ac_safe=yes"
19337 else
19338   echo "$ac_err" >&5
19339   echo "configure: failed program was:" >&5
19340   cat conftest.$ac_ext >&5
19341   rm -rf conftest*
19342   eval "ac_cv_header_$ac_safe=no"
19343 fi
19344 rm -f conftest*
19345 fi
19346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19347   echo "$ac_t""yes" 1>&6
19348     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19349   cat >> confdefs.h <<EOF
19350 #define $ac_tr_hdr 1
19351 EOF
19352  
19353 else
19354   echo "$ac_t""no" 1>&6
19355 fi
19356 done
19357
19358
19359 if test $ol_link_termcap = no ; then
19360         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19361 echo "configure:19362: checking for tputs in -ltermcap" >&5
19362 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19363 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19364   echo $ac_n "(cached) $ac_c" 1>&6
19365 else
19366   ac_save_LIBS="$LIBS"
19367 LIBS="-ltermcap  $LIBS"
19368 cat > conftest.$ac_ext <<EOF
19369 #line 19370 "configure"
19370 #include "confdefs.h"
19371 /* Override any gcc2 internal prototype to avoid an error.  */
19372 /* We use char because int might match the return type of a gcc2
19373     builtin and then its argument prototype would still apply.  */
19374 char tputs();
19375
19376 int main() {
19377 tputs()
19378 ; return 0; }
19379 EOF
19380 if { (eval echo configure:19381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19381   rm -rf conftest*
19382   eval "ac_cv_lib_$ac_lib_var=yes"
19383 else
19384   echo "configure: failed program was:" >&5
19385   cat conftest.$ac_ext >&5
19386   rm -rf conftest*
19387   eval "ac_cv_lib_$ac_lib_var=no"
19388 fi
19389 rm -f conftest*
19390 LIBS="$ac_save_LIBS"
19391
19392 fi
19393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19394   echo "$ac_t""yes" 1>&6
19395   have_termcap=yes
19396 else
19397   echo "$ac_t""no" 1>&6
19398 have_termcap=no
19399 fi
19400
19401         if test $have_termcap = yes ; then
19402                 cat >> confdefs.h <<\EOF
19403 #define HAVE_TERMCAP 1
19404 EOF
19405
19406                 ol_link_termcap=yes
19407                 TERMCAP_LIBS=-ltermcap
19408         fi
19409 fi
19410
19411 if test $ol_link_termcap = no ; then
19412         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19413 echo "configure:19414: checking for initscr in -lncurses" >&5
19414 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19415 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19416   echo $ac_n "(cached) $ac_c" 1>&6
19417 else
19418   ac_save_LIBS="$LIBS"
19419 LIBS="-lncurses  $LIBS"
19420 cat > conftest.$ac_ext <<EOF
19421 #line 19422 "configure"
19422 #include "confdefs.h"
19423 /* Override any gcc2 internal prototype to avoid an error.  */
19424 /* We use char because int might match the return type of a gcc2
19425     builtin and then its argument prototype would still apply.  */
19426 char initscr();
19427
19428 int main() {
19429 initscr()
19430 ; return 0; }
19431 EOF
19432 if { (eval echo configure:19433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19433   rm -rf conftest*
19434   eval "ac_cv_lib_$ac_lib_var=yes"
19435 else
19436   echo "configure: failed program was:" >&5
19437   cat conftest.$ac_ext >&5
19438   rm -rf conftest*
19439   eval "ac_cv_lib_$ac_lib_var=no"
19440 fi
19441 rm -f conftest*
19442 LIBS="$ac_save_LIBS"
19443
19444 fi
19445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19446   echo "$ac_t""yes" 1>&6
19447   have_ncurses=yes
19448 else
19449   echo "$ac_t""no" 1>&6
19450 have_ncurses=no
19451 fi
19452
19453         if test $have_ncurses = yes ; then
19454                 cat >> confdefs.h <<\EOF
19455 #define HAVE_NCURSES 1
19456 EOF
19457
19458                 ol_link_termcap=yes
19459                 TERMCAP_LIBS=-lncurses
19460         fi
19461 fi
19462
19463 if test $ol_link_termcap = no ; then
19464         cat >> confdefs.h <<\EOF
19465 #define NO_TERMCAP 1
19466 EOF
19467
19468         TERMCAP_LIBS=
19469 fi
19470
19471 ol_link_sasl=no
19472 ol_link_spasswd=no
19473 if test $ol_with_cyrus_sasl != no ; then
19474         for ac_hdr in sasl/sasl.h sasl.h
19475 do
19476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19478 echo "configure:19479: checking for $ac_hdr" >&5
19479 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19480   echo $ac_n "(cached) $ac_c" 1>&6
19481 else
19482   cat > conftest.$ac_ext <<EOF
19483 #line 19484 "configure"
19484 #include "confdefs.h"
19485 #include <$ac_hdr>
19486 EOF
19487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19488 { (eval echo configure:19489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19490 if test -z "$ac_err"; then
19491   rm -rf conftest*
19492   eval "ac_cv_header_$ac_safe=yes"
19493 else
19494   echo "$ac_err" >&5
19495   echo "configure: failed program was:" >&5
19496   cat conftest.$ac_ext >&5
19497   rm -rf conftest*
19498   eval "ac_cv_header_$ac_safe=no"
19499 fi
19500 rm -f conftest*
19501 fi
19502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19503   echo "$ac_t""yes" 1>&6
19504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19505   cat >> confdefs.h <<EOF
19506 #define $ac_tr_hdr 1
19507 EOF
19508  
19509 else
19510   echo "$ac_t""no" 1>&6
19511 fi
19512 done
19513
19514
19515         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19516                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19517 echo "configure:19518: checking for sasl_client_init in -lsasl2" >&5
19518 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19519 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19520   echo $ac_n "(cached) $ac_c" 1>&6
19521 else
19522   ac_save_LIBS="$LIBS"
19523 LIBS="-lsasl2  $LIBS"
19524 cat > conftest.$ac_ext <<EOF
19525 #line 19526 "configure"
19526 #include "confdefs.h"
19527 /* Override any gcc2 internal prototype to avoid an error.  */
19528 /* We use char because int might match the return type of a gcc2
19529     builtin and then its argument prototype would still apply.  */
19530 char sasl_client_init();
19531
19532 int main() {
19533 sasl_client_init()
19534 ; return 0; }
19535 EOF
19536 if { (eval echo configure:19537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19537   rm -rf conftest*
19538   eval "ac_cv_lib_$ac_lib_var=yes"
19539 else
19540   echo "configure: failed program was:" >&5
19541   cat conftest.$ac_ext >&5
19542   rm -rf conftest*
19543   eval "ac_cv_lib_$ac_lib_var=no"
19544 fi
19545 rm -f conftest*
19546 LIBS="$ac_save_LIBS"
19547
19548 fi
19549 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19550   echo "$ac_t""yes" 1>&6
19551   ol_link_sasl="-lsasl2"
19552 else
19553   echo "$ac_t""no" 1>&6
19554 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19555 echo "configure:19556: checking for sasl_client_init in -lsasl" >&5
19556 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19558   echo $ac_n "(cached) $ac_c" 1>&6
19559 else
19560   ac_save_LIBS="$LIBS"
19561 LIBS="-lsasl  $LIBS"
19562 cat > conftest.$ac_ext <<EOF
19563 #line 19564 "configure"
19564 #include "confdefs.h"
19565 /* Override any gcc2 internal prototype to avoid an error.  */
19566 /* We use char because int might match the return type of a gcc2
19567     builtin and then its argument prototype would still apply.  */
19568 char sasl_client_init();
19569
19570 int main() {
19571 sasl_client_init()
19572 ; return 0; }
19573 EOF
19574 if { (eval echo configure:19575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19575   rm -rf conftest*
19576   eval "ac_cv_lib_$ac_lib_var=yes"
19577 else
19578   echo "configure: failed program was:" >&5
19579   cat conftest.$ac_ext >&5
19580   rm -rf conftest*
19581   eval "ac_cv_lib_$ac_lib_var=no"
19582 fi
19583 rm -f conftest*
19584 LIBS="$ac_save_LIBS"
19585
19586 fi
19587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19588   echo "$ac_t""yes" 1>&6
19589   ol_link_sasl="-lsasl"
19590 else
19591   echo "$ac_t""no" 1>&6
19592 fi
19593
19594 fi
19595
19596         fi
19597
19598         if test $ol_link_sasl = no ; then
19599                 if test $ol_with_cyrus_sasl != auto ; then
19600                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19601                 else
19602                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19603                         echo "configure: warning: SASL authentication not supported!" 1>&2
19604                         if test $ol_link_tls = no ; then
19605                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19606                         fi
19607                 fi
19608         else
19609                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
19610 echo "configure:19611: checking Cyrus SASL library version" >&5
19611 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
19612   echo $ac_n "(cached) $ac_c" 1>&6
19613 else
19614   
19615         cat > conftest.$ac_ext <<EOF
19616 #line 19617 "configure"
19617 #include "confdefs.h"
19618
19619 #include <sasl/sasl.h>
19620
19621 /* require 2.1.3 or later */
19622 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
19623         char *__sasl_compat = "1.5.x okay";
19624 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
19625         __sasl_compat "2.2+ or better okay";
19626 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
19627         && SASL_VERSION_STEP >=3
19628         __sasl_compat = "2.1.3+ or better okay";
19629 #endif
19630         
19631 EOF
19632 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19633   egrep "__sasl_compat" >/dev/null 2>&1; then
19634   rm -rf conftest*
19635   ol_cv_sasl_compat=yes
19636 else
19637   rm -rf conftest*
19638   ol_cv_sasl_compat=no
19639 fi
19640 rm -f conftest*
19641
19642 fi
19643
19644 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
19645
19646                 if test $ol_cv_sasl_compat = no ; then
19647                         ol_link_sasl=no
19648                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
19649                 fi
19650
19651                 cat >> confdefs.h <<\EOF
19652 #define HAVE_CYRUS_SASL 1
19653 EOF
19654
19655                 SASL_LIBS="$ol_link_sasl"
19656                 if test $ol_enable_spasswd != no ; then
19657                         ol_link_spasswd=yes
19658                 fi
19659         fi
19660
19661 else
19662         echo "configure: warning: SASL authentication not supported!" 1>&2
19663         if test $ol_link_tls = no ; then
19664                 echo "configure: warning: Strong authentication not supported!" 1>&2
19665         fi
19666 fi
19667
19668 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19669         dev=no
19670         if test -r /dev/urandom ; then
19671                 dev="/dev/urandom";
19672         elif test -r /idev/urandom ; then
19673                 dev="/idev/urandom";
19674         elif test -r /dev/srandom ; then
19675                 dev="/dev/srandom";
19676         elif test -r /dev/random ; then
19677                 dev="/dev/random";
19678         elif test -r /idev/random ; then
19679                 dev="/idev/random";
19680         fi
19681
19682         if test $dev != no ; then
19683                 cat >> confdefs.h <<EOF
19684 #define URANDOM_DEVICE "$dev"
19685 EOF
19686
19687         fi
19688 fi
19689
19690 ol_link_fetch=no
19691 if test $ol_with_fetch != no ; then
19692         ol_LIBS=$LIBS
19693 LIBS="-lfetch -lcom_err $LIBS"
19694 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19695 echo "configure:19696: checking fetch(3) library" >&5
19696 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19697   echo $ac_n "(cached) $ac_c" 1>&6
19698 else
19699   
19700         cat > conftest.$ac_ext <<EOF
19701 #line 19702 "configure"
19702 #include "confdefs.h"
19703
19704 #include <sys/param.h>
19705 #include <stdio.h>
19706 #include <fetch.h>
19707 int main() {
19708 struct url *u = fetchParseURL("file:///"); 
19709 ; return 0; }
19710 EOF
19711 if { (eval echo configure:19712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19712   rm -rf conftest*
19713   ol_cv_lib_fetch=yes
19714 else
19715   echo "configure: failed program was:" >&5
19716   cat conftest.$ac_ext >&5
19717   rm -rf conftest*
19718   ol_cv_lib_fetch=no
19719 fi
19720 rm -f conftest*
19721 fi
19722
19723 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19724 LIBS=$ol_LIBS
19725 if test $ol_cv_lib_fetch != no ; then
19726         ol_link_fetch="-lfetch -lcom_err"
19727         cat >> confdefs.h <<\EOF
19728 #define HAVE_FETCH 1
19729 EOF
19730
19731 fi
19732
19733
19734         if test $ol_cv_lib_fetch != no ; then
19735                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19736                 ol_link_fetch=freebsd
19737
19738         elif test $ol_with_fetch != auto ; then
19739                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19740         fi 
19741 fi
19742
19743 ol_link_readline=no
19744 if test $ol_with_readline != no ; then
19745         for ac_hdr in readline/readline.h readline/history.h
19746 do
19747 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19748 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19749 echo "configure:19750: checking for $ac_hdr" >&5
19750 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19751   echo $ac_n "(cached) $ac_c" 1>&6
19752 else
19753   cat > conftest.$ac_ext <<EOF
19754 #line 19755 "configure"
19755 #include "confdefs.h"
19756 #include <$ac_hdr>
19757 EOF
19758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19759 { (eval echo configure:19760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19761 if test -z "$ac_err"; then
19762   rm -rf conftest*
19763   eval "ac_cv_header_$ac_safe=yes"
19764 else
19765   echo "$ac_err" >&5
19766   echo "configure: failed program was:" >&5
19767   cat conftest.$ac_ext >&5
19768   rm -rf conftest*
19769   eval "ac_cv_header_$ac_safe=no"
19770 fi
19771 rm -f conftest*
19772 fi
19773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19774   echo "$ac_t""yes" 1>&6
19775     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19776   cat >> confdefs.h <<EOF
19777 #define $ac_tr_hdr 1
19778 EOF
19779  
19780 else
19781   echo "$ac_t""no" 1>&6
19782 fi
19783 done
19784
19785
19786         if test $ac_cv_header_readline_readline_h = yes ; then
19787                 save_LIBS="$LIBS"
19788                 LIBS="$TERMCAP_LIBS $LIBS"
19789                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19790 echo "configure:19791: checking for readline in -lreadline" >&5
19791 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19792 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19793   echo $ac_n "(cached) $ac_c" 1>&6
19794 else
19795   ac_save_LIBS="$LIBS"
19796 LIBS="-lreadline  $LIBS"
19797 cat > conftest.$ac_ext <<EOF
19798 #line 19799 "configure"
19799 #include "confdefs.h"
19800 /* Override any gcc2 internal prototype to avoid an error.  */
19801 /* We use char because int might match the return type of a gcc2
19802     builtin and then its argument prototype would still apply.  */
19803 char readline();
19804
19805 int main() {
19806 readline()
19807 ; return 0; }
19808 EOF
19809 if { (eval echo configure:19810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19810   rm -rf conftest*
19811   eval "ac_cv_lib_$ac_lib_var=yes"
19812 else
19813   echo "configure: failed program was:" >&5
19814   cat conftest.$ac_ext >&5
19815   rm -rf conftest*
19816   eval "ac_cv_lib_$ac_lib_var=no"
19817 fi
19818 rm -f conftest*
19819 LIBS="$ac_save_LIBS"
19820
19821 fi
19822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19823   echo "$ac_t""yes" 1>&6
19824   have_readline=yes
19825 else
19826   echo "$ac_t""no" 1>&6
19827 have_readline=no
19828 fi
19829
19830                 LIBS="$save_LIBS"
19831                         
19832                 if test $have_readline = yes ; then
19833                         ol_with_readline=found
19834                         ol_link_readline=yes
19835
19836                         READLINE_LIBS="-lreadline"
19837                 fi
19838         fi
19839 fi
19840
19841 if test $ol_link_readline = yes ; then
19842         cat >> confdefs.h <<\EOF
19843 #define HAVE_READLINE 1
19844 EOF
19845
19846 fi
19847
19848
19849 if test $ol_enable_crypt != no ; then
19850         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19851 echo "configure:19852: checking for crypt" >&5
19852 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
19853   echo $ac_n "(cached) $ac_c" 1>&6
19854 else
19855   cat > conftest.$ac_ext <<EOF
19856 #line 19857 "configure"
19857 #include "confdefs.h"
19858 /* System header to define __stub macros and hopefully few prototypes,
19859     which can conflict with char crypt(); below.  */
19860 #include <assert.h>
19861 /* Override any gcc2 internal prototype to avoid an error.  */
19862 /* We use char because int might match the return type of a gcc2
19863     builtin and then its argument prototype would still apply.  */
19864 char crypt();
19865 char (*f)();
19866
19867 int main() {
19868
19869 /* The GNU C library defines this for functions which it implements
19870     to always fail with ENOSYS.  Some functions are actually named
19871     something starting with __ and the normal name is an alias.  */
19872 #if defined (__stub_crypt) || defined (__stub___crypt)
19873 choke me
19874 #else
19875 f = crypt;
19876 #endif
19877
19878 ; return 0; }
19879 EOF
19880 if { (eval echo configure:19881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19881   rm -rf conftest*
19882   eval "ac_cv_func_crypt=yes"
19883 else
19884   echo "configure: failed program was:" >&5
19885   cat conftest.$ac_ext >&5
19886   rm -rf conftest*
19887   eval "ac_cv_func_crypt=no"
19888 fi
19889 rm -f conftest*
19890 fi
19891
19892 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
19893   echo "$ac_t""yes" 1>&6
19894   have_crypt=yes
19895 else
19896   echo "$ac_t""no" 1>&6
19897
19898                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
19899 echo "configure:19900: checking for crypt in -lcrypt" >&5
19900 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
19901 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19902   echo $ac_n "(cached) $ac_c" 1>&6
19903 else
19904   ac_save_LIBS="$LIBS"
19905 LIBS="-lcrypt  $LIBS"
19906 cat > conftest.$ac_ext <<EOF
19907 #line 19908 "configure"
19908 #include "confdefs.h"
19909 /* Override any gcc2 internal prototype to avoid an error.  */
19910 /* We use char because int might match the return type of a gcc2
19911     builtin and then its argument prototype would still apply.  */
19912 char crypt();
19913
19914 int main() {
19915 crypt()
19916 ; return 0; }
19917 EOF
19918 if { (eval echo configure:19919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19919   rm -rf conftest*
19920   eval "ac_cv_lib_$ac_lib_var=yes"
19921 else
19922   echo "configure: failed program was:" >&5
19923   cat conftest.$ac_ext >&5
19924   rm -rf conftest*
19925   eval "ac_cv_lib_$ac_lib_var=no"
19926 fi
19927 rm -f conftest*
19928 LIBS="$ac_save_LIBS"
19929
19930 fi
19931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19932   echo "$ac_t""yes" 1>&6
19933   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
19934                         have_crypt=yes
19935 else
19936   echo "$ac_t""no" 1>&6
19937 have_crypt=no
19938 fi
19939
19940 fi
19941
19942
19943         if test $have_crypt = yes ; then
19944                 cat >> confdefs.h <<\EOF
19945 #define HAVE_CRYPT 1
19946 EOF
19947
19948         else
19949                 echo "configure: warning: could not find crypt" 1>&2
19950                 if test $ol_enable_crypt = yes ; then
19951                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
19952                 fi
19953
19954                 echo "configure: warning: disabling crypt support" 1>&2
19955                 ol_enable_crypt=no
19956         fi
19957 fi
19958
19959 if test $ol_enable_proctitle != no ; then
19960         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
19961 echo "configure:19962: checking for setproctitle" >&5
19962 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
19963   echo $ac_n "(cached) $ac_c" 1>&6
19964 else
19965   cat > conftest.$ac_ext <<EOF
19966 #line 19967 "configure"
19967 #include "confdefs.h"
19968 /* System header to define __stub macros and hopefully few prototypes,
19969     which can conflict with char setproctitle(); below.  */
19970 #include <assert.h>
19971 /* Override any gcc2 internal prototype to avoid an error.  */
19972 /* We use char because int might match the return type of a gcc2
19973     builtin and then its argument prototype would still apply.  */
19974 char setproctitle();
19975 char (*f)();
19976
19977 int main() {
19978
19979 /* The GNU C library defines this for functions which it implements
19980     to always fail with ENOSYS.  Some functions are actually named
19981     something starting with __ and the normal name is an alias.  */
19982 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
19983 choke me
19984 #else
19985 f = setproctitle;
19986 #endif
19987
19988 ; return 0; }
19989 EOF
19990 if { (eval echo configure:19991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19991   rm -rf conftest*
19992   eval "ac_cv_func_setproctitle=yes"
19993 else
19994   echo "configure: failed program was:" >&5
19995   cat conftest.$ac_ext >&5
19996   rm -rf conftest*
19997   eval "ac_cv_func_setproctitle=no"
19998 fi
19999 rm -f conftest*
20000 fi
20001
20002 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20003   echo "$ac_t""yes" 1>&6
20004   have_setproctitle=yes
20005 else
20006   echo "$ac_t""no" 1>&6
20007
20008                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20009 echo "configure:20010: checking for setproctitle in -lutil" >&5
20010 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20011 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20012   echo $ac_n "(cached) $ac_c" 1>&6
20013 else
20014   ac_save_LIBS="$LIBS"
20015 LIBS="-lutil  $LIBS"
20016 cat > conftest.$ac_ext <<EOF
20017 #line 20018 "configure"
20018 #include "confdefs.h"
20019 /* Override any gcc2 internal prototype to avoid an error.  */
20020 /* We use char because int might match the return type of a gcc2
20021     builtin and then its argument prototype would still apply.  */
20022 char setproctitle();
20023
20024 int main() {
20025 setproctitle()
20026 ; return 0; }
20027 EOF
20028 if { (eval echo configure:20029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20029   rm -rf conftest*
20030   eval "ac_cv_lib_$ac_lib_var=yes"
20031 else
20032   echo "configure: failed program was:" >&5
20033   cat conftest.$ac_ext >&5
20034   rm -rf conftest*
20035   eval "ac_cv_lib_$ac_lib_var=no"
20036 fi
20037 rm -f conftest*
20038 LIBS="$ac_save_LIBS"
20039
20040 fi
20041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20042   echo "$ac_t""yes" 1>&6
20043   have_setproctitle=yes
20044                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20045 else
20046   echo "$ac_t""no" 1>&6
20047 have_setproctitle=no
20048                         LIBOBJS="$LIBOBJS setproctitle.o"
20049                         LIBSRCS="$LIBSRCS setproctitle.c"
20050 fi
20051
20052 fi
20053
20054
20055         if test $have_setproctitle = yes ; then
20056                 cat >> confdefs.h <<\EOF
20057 #define HAVE_SETPROCTITLE 1
20058 EOF
20059
20060         fi
20061 fi
20062
20063 if test $ol_enable_slp != no ; then
20064         for ac_hdr in slp.h 
20065 do
20066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20068 echo "configure:20069: checking for $ac_hdr" >&5
20069 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20070   echo $ac_n "(cached) $ac_c" 1>&6
20071 else
20072   cat > conftest.$ac_ext <<EOF
20073 #line 20074 "configure"
20074 #include "confdefs.h"
20075 #include <$ac_hdr>
20076 EOF
20077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20078 { (eval echo configure:20079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20080 if test -z "$ac_err"; then
20081   rm -rf conftest*
20082   eval "ac_cv_header_$ac_safe=yes"
20083 else
20084   echo "$ac_err" >&5
20085   echo "configure: failed program was:" >&5
20086   cat conftest.$ac_ext >&5
20087   rm -rf conftest*
20088   eval "ac_cv_header_$ac_safe=no"
20089 fi
20090 rm -f conftest*
20091 fi
20092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20093   echo "$ac_t""yes" 1>&6
20094     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20095   cat >> confdefs.h <<EOF
20096 #define $ac_tr_hdr 1
20097 EOF
20098  
20099 else
20100   echo "$ac_t""no" 1>&6
20101 fi
20102 done
20103
20104
20105         if test $ac_cv_header_slp_h = yes ; then
20106                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20107 echo "configure:20108: checking for SLPOpen in -lslp" >&5
20108 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20110   echo $ac_n "(cached) $ac_c" 1>&6
20111 else
20112   ac_save_LIBS="$LIBS"
20113 LIBS="-lslp  $LIBS"
20114 cat > conftest.$ac_ext <<EOF
20115 #line 20116 "configure"
20116 #include "confdefs.h"
20117 /* Override any gcc2 internal prototype to avoid an error.  */
20118 /* We use char because int might match the return type of a gcc2
20119     builtin and then its argument prototype would still apply.  */
20120 char SLPOpen();
20121
20122 int main() {
20123 SLPOpen()
20124 ; return 0; }
20125 EOF
20126 if { (eval echo configure:20127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20127   rm -rf conftest*
20128   eval "ac_cv_lib_$ac_lib_var=yes"
20129 else
20130   echo "configure: failed program was:" >&5
20131   cat conftest.$ac_ext >&5
20132   rm -rf conftest*
20133   eval "ac_cv_lib_$ac_lib_var=no"
20134 fi
20135 rm -f conftest*
20136 LIBS="$ac_save_LIBS"
20137
20138 fi
20139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20140   echo "$ac_t""yes" 1>&6
20141   have_slp=yes
20142 else
20143   echo "$ac_t""no" 1>&6
20144 have_slp=no
20145 fi
20146
20147                 if test $have_slp = yes ; then
20148                         cat >> confdefs.h <<\EOF
20149 #define HAVE_SLP 1
20150 EOF
20151
20152                         SLAPD_SLP_LIBS=-lslp
20153                 fi
20154
20155         elif test $ol_enable_slp = yes ; then
20156                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20157         fi
20158 fi
20159
20160 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20161 echo "configure:20162: checking for ANSI C header files" >&5
20162 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20163   echo $ac_n "(cached) $ac_c" 1>&6
20164 else
20165   cat > conftest.$ac_ext <<EOF
20166 #line 20167 "configure"
20167 #include "confdefs.h"
20168 #include <stdlib.h>
20169 #include <stdarg.h>
20170 #include <string.h>
20171 #include <float.h>
20172 EOF
20173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20174 { (eval echo configure:20175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20176 if test -z "$ac_err"; then
20177   rm -rf conftest*
20178   ac_cv_header_stdc=yes
20179 else
20180   echo "$ac_err" >&5
20181   echo "configure: failed program was:" >&5
20182   cat conftest.$ac_ext >&5
20183   rm -rf conftest*
20184   ac_cv_header_stdc=no
20185 fi
20186 rm -f conftest*
20187
20188 if test $ac_cv_header_stdc = yes; then
20189   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20190 cat > conftest.$ac_ext <<EOF
20191 #line 20192 "configure"
20192 #include "confdefs.h"
20193 #include <string.h>
20194 EOF
20195 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20196   egrep "memchr" >/dev/null 2>&1; then
20197   :
20198 else
20199   rm -rf conftest*
20200   ac_cv_header_stdc=no
20201 fi
20202 rm -f conftest*
20203
20204 fi
20205
20206 if test $ac_cv_header_stdc = yes; then
20207   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20208 cat > conftest.$ac_ext <<EOF
20209 #line 20210 "configure"
20210 #include "confdefs.h"
20211 #include <stdlib.h>
20212 EOF
20213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20214   egrep "free" >/dev/null 2>&1; then
20215   :
20216 else
20217   rm -rf conftest*
20218   ac_cv_header_stdc=no
20219 fi
20220 rm -f conftest*
20221
20222 fi
20223
20224 if test $ac_cv_header_stdc = yes; then
20225   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20226 if test "$cross_compiling" = yes; then
20227   :
20228 else
20229   cat > conftest.$ac_ext <<EOF
20230 #line 20231 "configure"
20231 #include "confdefs.h"
20232 #include <ctype.h>
20233 #if ((' ' & 0x0FF) == 0x020)
20234 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20235 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20236 #else
20237 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20238  || ('j' <= (c) && (c) <= 'r') \
20239  || ('s' <= (c) && (c) <= 'z'))
20240 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20241 #endif
20242 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20243 int main () { int i; for (i = 0; i < 256; i++)
20244 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20245 exit (0); }
20246
20247 EOF
20248 if { (eval echo configure:20249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20249 then
20250   :
20251 else
20252   echo "configure: failed program was:" >&5
20253   cat conftest.$ac_ext >&5
20254   rm -fr conftest*
20255   ac_cv_header_stdc=no
20256 fi
20257 rm -fr conftest*
20258 fi
20259
20260 fi
20261 fi
20262
20263 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20264 if test $ac_cv_header_stdc = yes; then
20265   cat >> confdefs.h <<\EOF
20266 #define STDC_HEADERS 1
20267 EOF
20268
20269 fi
20270
20271 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20272 echo "configure:20273: checking for mode_t" >&5
20273 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20274   echo $ac_n "(cached) $ac_c" 1>&6
20275 else
20276   cat > conftest.$ac_ext <<EOF
20277 #line 20278 "configure"
20278 #include "confdefs.h"
20279 #include <sys/types.h>
20280 #if STDC_HEADERS
20281 #include <stdlib.h>
20282 #include <stddef.h>
20283 #endif
20284
20285 EOF
20286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20287   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20288   rm -rf conftest*
20289   eval "ac_cv_type_mode_t=yes"
20290 else
20291   rm -rf conftest*
20292   eval "ac_cv_type_mode_t=no"
20293 fi
20294 rm -f conftest*
20295
20296 fi
20297 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20298   echo "$ac_t""yes" 1>&6
20299 else
20300   echo "$ac_t""no" 1>&6
20301   cat >> confdefs.h <<EOF
20302 #define mode_t int
20303 EOF
20304
20305 fi
20306
20307 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20308 echo "configure:20309: checking for off_t" >&5
20309 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20310   echo $ac_n "(cached) $ac_c" 1>&6
20311 else
20312   cat > conftest.$ac_ext <<EOF
20313 #line 20314 "configure"
20314 #include "confdefs.h"
20315 #include <sys/types.h>
20316 #if STDC_HEADERS
20317 #include <stdlib.h>
20318 #include <stddef.h>
20319 #endif
20320
20321 EOF
20322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20323   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20324   rm -rf conftest*
20325   eval "ac_cv_type_off_t=yes"
20326 else
20327   rm -rf conftest*
20328   eval "ac_cv_type_off_t=no"
20329 fi
20330 rm -f conftest*
20331
20332 fi
20333 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20334   echo "$ac_t""yes" 1>&6
20335 else
20336   echo "$ac_t""no" 1>&6
20337   cat >> confdefs.h <<EOF
20338 #define off_t long
20339 EOF
20340
20341 fi
20342
20343 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20344 echo "configure:20345: checking for pid_t" >&5
20345 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20346   echo $ac_n "(cached) $ac_c" 1>&6
20347 else
20348   cat > conftest.$ac_ext <<EOF
20349 #line 20350 "configure"
20350 #include "confdefs.h"
20351 #include <sys/types.h>
20352 #if STDC_HEADERS
20353 #include <stdlib.h>
20354 #include <stddef.h>
20355 #endif
20356
20357 EOF
20358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20359   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20360   rm -rf conftest*
20361   eval "ac_cv_type_pid_t=yes"
20362 else
20363   rm -rf conftest*
20364   eval "ac_cv_type_pid_t=no"
20365 fi
20366 rm -f conftest*
20367
20368 fi
20369 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20370   echo "$ac_t""yes" 1>&6
20371 else
20372   echo "$ac_t""no" 1>&6
20373   cat >> confdefs.h <<EOF
20374 #define pid_t int
20375 EOF
20376
20377 fi
20378
20379 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20380 echo "configure:20381: checking for ptrdiff_t" >&5
20381 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20382   echo $ac_n "(cached) $ac_c" 1>&6
20383 else
20384   cat > conftest.$ac_ext <<EOF
20385 #line 20386 "configure"
20386 #include "confdefs.h"
20387 #include <stddef.h>
20388 int main() {
20389 ptrdiff_t p
20390 ; return 0; }
20391 EOF
20392 if { (eval echo configure:20393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20393   rm -rf conftest*
20394   am_cv_type_ptrdiff_t=yes
20395 else
20396   echo "configure: failed program was:" >&5
20397   cat conftest.$ac_ext >&5
20398   rm -rf conftest*
20399   am_cv_type_ptrdiff_t=no
20400 fi
20401 rm -f conftest*
20402 fi
20403
20404 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20405    if test $am_cv_type_ptrdiff_t = yes; then
20406      cat >> confdefs.h <<\EOF
20407 #define HAVE_PTRDIFF_T 1
20408 EOF
20409
20410    fi
20411
20412 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20413 echo "configure:20414: checking return type of signal handlers" >&5
20414 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20415   echo $ac_n "(cached) $ac_c" 1>&6
20416 else
20417   cat > conftest.$ac_ext <<EOF
20418 #line 20419 "configure"
20419 #include "confdefs.h"
20420 #include <sys/types.h>
20421 #include <signal.h>
20422 #ifdef signal
20423 #undef signal
20424 #endif
20425 #ifdef __cplusplus
20426 extern "C" void (*signal (int, void (*)(int)))(int);
20427 #else
20428 void (*signal ()) ();
20429 #endif
20430
20431 int main() {
20432 int i;
20433 ; return 0; }
20434 EOF
20435 if { (eval echo configure:20436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20436   rm -rf conftest*
20437   ac_cv_type_signal=void
20438 else
20439   echo "configure: failed program was:" >&5
20440   cat conftest.$ac_ext >&5
20441   rm -rf conftest*
20442   ac_cv_type_signal=int
20443 fi
20444 rm -f conftest*
20445 fi
20446
20447 echo "$ac_t""$ac_cv_type_signal" 1>&6
20448 cat >> confdefs.h <<EOF
20449 #define RETSIGTYPE $ac_cv_type_signal
20450 EOF
20451
20452
20453 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20454 echo "configure:20455: checking for size_t" >&5
20455 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20456   echo $ac_n "(cached) $ac_c" 1>&6
20457 else
20458   cat > conftest.$ac_ext <<EOF
20459 #line 20460 "configure"
20460 #include "confdefs.h"
20461 #include <sys/types.h>
20462 #if STDC_HEADERS
20463 #include <stdlib.h>
20464 #include <stddef.h>
20465 #endif
20466
20467 EOF
20468 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20469   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20470   rm -rf conftest*
20471   eval "ac_cv_type_size_t=yes"
20472 else
20473   rm -rf conftest*
20474   eval "ac_cv_type_size_t=no"
20475 fi
20476 rm -f conftest*
20477
20478 fi
20479 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20480   echo "$ac_t""yes" 1>&6
20481 else
20482   echo "$ac_t""no" 1>&6
20483   cat >> confdefs.h <<EOF
20484 #define size_t unsigned
20485 EOF
20486
20487 fi
20488
20489
20490 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20491 echo "configure:20492: checking for ssize_t" >&5
20492 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20493   echo $ac_n "(cached) $ac_c" 1>&6
20494 else
20495   cat > conftest.$ac_ext <<EOF
20496 #line 20497 "configure"
20497 #include "confdefs.h"
20498 #include <sys/types.h>
20499 #if STDC_HEADERS
20500 #include <stdlib.h>
20501 #include <stddef.h>
20502 #endif
20503
20504 EOF
20505 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20506   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20507   rm -rf conftest*
20508   eval "ac_cv_type_ssize_t=yes"
20509 else
20510   rm -rf conftest*
20511   eval "ac_cv_type_ssize_t=no"
20512 fi
20513 rm -f conftest*
20514
20515 fi
20516 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20517   echo "$ac_t""yes" 1>&6
20518 else
20519   echo "$ac_t""no" 1>&6
20520   cat >> confdefs.h <<EOF
20521 #define ssize_t signed int
20522 EOF
20523
20524 fi
20525
20526 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20527 echo "configure:20528: checking for caddr_t" >&5
20528 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20529   echo $ac_n "(cached) $ac_c" 1>&6
20530 else
20531   cat > conftest.$ac_ext <<EOF
20532 #line 20533 "configure"
20533 #include "confdefs.h"
20534 #include <sys/types.h>
20535 #if STDC_HEADERS
20536 #include <stdlib.h>
20537 #include <stddef.h>
20538 #endif
20539
20540 EOF
20541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20542   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20543   rm -rf conftest*
20544   eval "ac_cv_type_caddr_t=yes"
20545 else
20546   rm -rf conftest*
20547   eval "ac_cv_type_caddr_t=no"
20548 fi
20549 rm -f conftest*
20550
20551 fi
20552 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20553   echo "$ac_t""yes" 1>&6
20554 else
20555   echo "$ac_t""no" 1>&6
20556   cat >> confdefs.h <<EOF
20557 #define caddr_t char *
20558 EOF
20559
20560 fi
20561
20562
20563 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20564 echo "configure:20565: checking for socklen_t" >&5
20565 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20566   echo $ac_n "(cached) $ac_c" 1>&6
20567 else
20568   cat > conftest.$ac_ext <<EOF
20569 #line 20570 "configure"
20570 #include "confdefs.h"
20571
20572 #ifdef HAVE_SYS_TYPES_H
20573 #include <sys/types.h>
20574 #endif
20575 #ifdef HAVE_SYS_SOCKET_H
20576 #include <sys/socket.h>
20577 #endif
20578
20579 int main() {
20580 socklen_t len;
20581 ; return 0; }
20582 EOF
20583 if { (eval echo configure:20584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20584   rm -rf conftest*
20585   ol_cv_type_socklen_t=yes
20586 else
20587   echo "configure: failed program was:" >&5
20588   cat conftest.$ac_ext >&5
20589   rm -rf conftest*
20590   ol_cv_type_socklen_t=no
20591 fi
20592 rm -f conftest*
20593 fi
20594
20595 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20596   if test $ol_cv_type_socklen_t = no; then
20597     cat >> confdefs.h <<\EOF
20598 #define socklen_t int
20599 EOF
20600
20601   fi
20602  
20603 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20604 echo "configure:20605: checking for member st_blksize in aggregate type struct stat" >&5
20605 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20606   echo $ac_n "(cached) $ac_c" 1>&6
20607 else
20608   cat > conftest.$ac_ext <<EOF
20609 #line 20610 "configure"
20610 #include "confdefs.h"
20611 #include <sys/types.h>
20612 #include <sys/stat.h>
20613 int main() {
20614 struct stat foo; foo.st_blksize;
20615 ; return 0; }
20616 EOF
20617 if { (eval echo configure:20618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20618   rm -rf conftest*
20619   ac_cv_c_struct_member_st_blksize=yes
20620 else
20621   echo "configure: failed program was:" >&5
20622   cat conftest.$ac_ext >&5
20623   rm -rf conftest*
20624   ac_cv_c_struct_member_st_blksize=no
20625 fi
20626 rm -f conftest*
20627 fi
20628
20629 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20630 st_blksize="$ac_cv_c_struct_member_st_blksize"
20631 if test $ac_cv_c_struct_member_st_blksize = yes; then
20632   cat >> confdefs.h <<\EOF
20633 #define HAVE_ST_BLKSIZE 1
20634 EOF
20635
20636 fi
20637
20638 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20639 echo "configure:20640: checking whether time.h and sys/time.h may both be included" >&5
20640 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20641   echo $ac_n "(cached) $ac_c" 1>&6
20642 else
20643   cat > conftest.$ac_ext <<EOF
20644 #line 20645 "configure"
20645 #include "confdefs.h"
20646 #include <sys/types.h>
20647 #include <sys/time.h>
20648 #include <time.h>
20649 int main() {
20650 struct tm *tp;
20651 ; return 0; }
20652 EOF
20653 if { (eval echo configure:20654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20654   rm -rf conftest*
20655   ac_cv_header_time=yes
20656 else
20657   echo "configure: failed program was:" >&5
20658   cat conftest.$ac_ext >&5
20659   rm -rf conftest*
20660   ac_cv_header_time=no
20661 fi
20662 rm -f conftest*
20663 fi
20664
20665 echo "$ac_t""$ac_cv_header_time" 1>&6
20666 if test $ac_cv_header_time = yes; then
20667   cat >> confdefs.h <<\EOF
20668 #define TIME_WITH_SYS_TIME 1
20669 EOF
20670
20671 fi
20672
20673 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20674 echo "configure:20675: checking whether struct tm is in sys/time.h or time.h" >&5
20675 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20676   echo $ac_n "(cached) $ac_c" 1>&6
20677 else
20678   cat > conftest.$ac_ext <<EOF
20679 #line 20680 "configure"
20680 #include "confdefs.h"
20681 #include <sys/types.h>
20682 #include <time.h>
20683 int main() {
20684 struct tm *tp; tp->tm_sec;
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_struct_tm=time.h
20690 else
20691   echo "configure: failed program was:" >&5
20692   cat conftest.$ac_ext >&5
20693   rm -rf conftest*
20694   ac_cv_struct_tm=sys/time.h
20695 fi
20696 rm -f conftest*
20697 fi
20698
20699 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20700 if test $ac_cv_struct_tm = sys/time.h; then
20701   cat >> confdefs.h <<\EOF
20702 #define TM_IN_SYS_TIME 1
20703 EOF
20704
20705 fi
20706
20707 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20708 echo "configure:20709: checking for uid_t in sys/types.h" >&5
20709 if eval "test \"\${ac_cv_type_uid_t+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 #include <sys/types.h>
20716 EOF
20717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20718   egrep "uid_t" >/dev/null 2>&1; then
20719   rm -rf conftest*
20720   ac_cv_type_uid_t=yes
20721 else
20722   rm -rf conftest*
20723   ac_cv_type_uid_t=no
20724 fi
20725 rm -f conftest*
20726
20727 fi
20728
20729 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20730 if test $ac_cv_type_uid_t = no; then
20731   cat >> confdefs.h <<\EOF
20732 #define uid_t int
20733 EOF
20734
20735   cat >> confdefs.h <<\EOF
20736 #define gid_t int
20737 EOF
20738
20739 fi
20740
20741 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20742 echo "configure:20743: checking for sig_atomic_t" >&5
20743 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20744   echo $ac_n "(cached) $ac_c" 1>&6
20745 else
20746   cat > conftest.$ac_ext <<EOF
20747 #line 20748 "configure"
20748 #include "confdefs.h"
20749 #include <signal.h>
20750 int main() {
20751 sig_atomic_t atomic;
20752 ; return 0; }
20753 EOF
20754 if { (eval echo configure:20755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20755   rm -rf conftest*
20756   ol_cv_type_sig_atomic_t=yes
20757 else
20758   echo "configure: failed program was:" >&5
20759   cat conftest.$ac_ext >&5
20760   rm -rf conftest*
20761   ol_cv_type_sig_atomic_t=no
20762 fi
20763 rm -f conftest*
20764 fi
20765
20766 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20767   if test $ol_cv_type_sig_atomic_t = no; then
20768     cat >> confdefs.h <<\EOF
20769 #define sig_atomic_t int
20770 EOF
20771
20772   fi
20773  
20774
20775
20776 # test for pw_gecos in struct passwd
20777 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20778 echo "configure:20779: checking struct passwd for pw_gecos" >&5
20779 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20780   echo $ac_n "(cached) $ac_c" 1>&6
20781 else
20782   
20783         cat > conftest.$ac_ext <<EOF
20784 #line 20785 "configure"
20785 #include "confdefs.h"
20786 #include <pwd.h>
20787 int main() {
20788
20789         struct passwd pwd;
20790         pwd.pw_gecos = pwd.pw_name;
20791
20792 ; return 0; }
20793 EOF
20794 if { (eval echo configure:20795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20795   rm -rf conftest*
20796   ol_cv_struct_passwd_pw_gecos=yes
20797 else
20798   echo "configure: failed program was:" >&5
20799   cat conftest.$ac_ext >&5
20800   rm -rf conftest*
20801   ol_cv_struct_passwd_pw_gecos=no
20802 fi
20803 rm -f conftest*
20804 fi
20805
20806 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20807 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20808         cat >> confdefs.h <<\EOF
20809 #define HAVE_PW_GECOS 1
20810 EOF
20811
20812 fi
20813
20814 # test for pw_passwd in struct passwd
20815 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20816 echo "configure:20817: checking struct passwd for pw_passwd" >&5
20817 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20818   echo $ac_n "(cached) $ac_c" 1>&6
20819 else
20820   
20821         cat > conftest.$ac_ext <<EOF
20822 #line 20823 "configure"
20823 #include "confdefs.h"
20824 #include <pwd.h>
20825 int main() {
20826
20827         struct passwd pwd;
20828         pwd.pw_passwd = pwd.pw_name;
20829
20830 ; return 0; }
20831 EOF
20832 if { (eval echo configure:20833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20833   rm -rf conftest*
20834   ol_cv_struct_passwd_pw_passwd=yes
20835 else
20836   echo "configure: failed program was:" >&5
20837   cat conftest.$ac_ext >&5
20838   rm -rf conftest*
20839   ol_cv_struct_passwd_pw_passwd=no
20840 fi
20841 rm -f conftest*
20842 fi
20843
20844 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20845 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20846         cat >> confdefs.h <<\EOF
20847 #define HAVE_PW_PASSWD 1
20848 EOF
20849
20850 fi
20851
20852
20853 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
20854 echo "configure:20855: checking if toupper() requires islower()" >&5
20855 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
20856   echo $ac_n "(cached) $ac_c" 1>&6
20857 else
20858   
20859         if test "$cross_compiling" = yes; then
20860   ol_cv_c_upper_lower=safe
20861 else
20862   cat > conftest.$ac_ext <<EOF
20863 #line 20864 "configure"
20864 #include "confdefs.h"
20865
20866 #include <ctype.h>
20867 main()
20868 {
20869         if ('C' == toupper('C'))
20870                 exit(0);
20871         else
20872                 exit(1);
20873 }
20874 EOF
20875 if { (eval echo configure:20876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20876 then
20877   ol_cv_c_upper_lower=no
20878 else
20879   echo "configure: failed program was:" >&5
20880   cat conftest.$ac_ext >&5
20881   rm -fr conftest*
20882   ol_cv_c_upper_lower=yes
20883 fi
20884 rm -fr conftest*
20885 fi
20886
20887 fi
20888
20889 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
20890 if test $ol_cv_c_upper_lower != no ; then
20891         cat >> confdefs.h <<\EOF
20892 #define C_UPPER_LOWER 1
20893 EOF
20894
20895 fi
20896
20897 echo $ac_n "checking for working const""... $ac_c" 1>&6
20898 echo "configure:20899: checking for working const" >&5
20899 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
20900   echo $ac_n "(cached) $ac_c" 1>&6
20901 else
20902   cat > conftest.$ac_ext <<EOF
20903 #line 20904 "configure"
20904 #include "confdefs.h"
20905
20906 int main() {
20907
20908 /* Ultrix mips cc rejects this.  */
20909 typedef int charset[2]; const charset x;
20910 /* SunOS 4.1.1 cc rejects this.  */
20911 char const *const *ccp;
20912 char **p;
20913 /* NEC SVR4.0.2 mips cc rejects this.  */
20914 struct point {int x, y;};
20915 static struct point const zero = {0,0};
20916 /* AIX XL C 1.02.0.0 rejects this.
20917    It does not let you subtract one const X* pointer from another in an arm
20918    of an if-expression whose if-part is not a constant expression */
20919 const char *g = "string";
20920 ccp = &g + (g ? g-g : 0);
20921 /* HPUX 7.0 cc rejects these. */
20922 ++ccp;
20923 p = (char**) ccp;
20924 ccp = (char const *const *) p;
20925 { /* SCO 3.2v4 cc rejects this.  */
20926   char *t;
20927   char const *s = 0 ? (char *) 0 : (char const *) 0;
20928
20929   *t++ = 0;
20930 }
20931 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20932   int x[] = {25, 17};
20933   const int *foo = &x[0];
20934   ++foo;
20935 }
20936 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20937   typedef const int *iptr;
20938   iptr p = 0;
20939   ++p;
20940 }
20941 { /* AIX XL C 1.02.0.0 rejects this saying
20942      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20943   struct s { int j; const int *ap[3]; };
20944   struct s *b; b->j = 5;
20945 }
20946 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20947   const int foo = 10;
20948 }
20949
20950 ; return 0; }
20951 EOF
20952 if { (eval echo configure:20953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20953   rm -rf conftest*
20954   ac_cv_c_const=yes
20955 else
20956   echo "configure: failed program was:" >&5
20957   cat conftest.$ac_ext >&5
20958   rm -rf conftest*
20959   ac_cv_c_const=no
20960 fi
20961 rm -f conftest*
20962 fi
20963
20964 echo "$ac_t""$ac_cv_c_const" 1>&6
20965 if test $ac_cv_c_const = no; then
20966   cat >> confdefs.h <<\EOF
20967 #define const 
20968 EOF
20969
20970 fi
20971
20972 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
20973 echo "configure:20974: checking if compiler understands volatile" >&5
20974 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
20975   echo $ac_n "(cached) $ac_c" 1>&6
20976 else
20977   cat > conftest.$ac_ext <<EOF
20978 #line 20979 "configure"
20979 #include "confdefs.h"
20980 int x, y, z;
20981 int main() {
20982 volatile int a; int * volatile b = x ? &y : &z;
20983       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
20984       *b = 0;
20985 ; return 0; }
20986 EOF
20987 if { (eval echo configure:20988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20988   rm -rf conftest*
20989   ol_cv_c_volatile=yes
20990 else
20991   echo "configure: failed program was:" >&5
20992   cat conftest.$ac_ext >&5
20993   rm -rf conftest*
20994   ol_cv_c_volatile=no
20995 fi
20996 rm -f conftest*
20997 fi
20998
20999 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21000   if test $ol_cv_c_volatile = yes; then
21001     : 
21002   else
21003     cat >> confdefs.h <<\EOF
21004 #define volatile 
21005 EOF
21006
21007   fi
21008  
21009
21010 if test $cross_compiling = yes ; then
21011         cat >> confdefs.h <<\EOF
21012 #define CROSS_COMPILING 1
21013 EOF
21014
21015 else
21016         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21017 echo "configure:21018: checking whether byte ordering is bigendian" >&5
21018 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21019   echo $ac_n "(cached) $ac_c" 1>&6
21020 else
21021   ac_cv_c_bigendian=unknown
21022 # See if sys/param.h defines the BYTE_ORDER macro.
21023 cat > conftest.$ac_ext <<EOF
21024 #line 21025 "configure"
21025 #include "confdefs.h"
21026 #include <sys/types.h>
21027 #include <sys/param.h>
21028 int main() {
21029
21030 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21031  bogus endian macros
21032 #endif
21033 ; return 0; }
21034 EOF
21035 if { (eval echo configure:21036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21036   rm -rf conftest*
21037   # It does; now see whether it defined to BIG_ENDIAN or not.
21038 cat > conftest.$ac_ext <<EOF
21039 #line 21040 "configure"
21040 #include "confdefs.h"
21041 #include <sys/types.h>
21042 #include <sys/param.h>
21043 int main() {
21044
21045 #if BYTE_ORDER != BIG_ENDIAN
21046  not big endian
21047 #endif
21048 ; return 0; }
21049 EOF
21050 if { (eval echo configure:21051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21051   rm -rf conftest*
21052   ac_cv_c_bigendian=yes
21053 else
21054   echo "configure: failed program was:" >&5
21055   cat conftest.$ac_ext >&5
21056   rm -rf conftest*
21057   ac_cv_c_bigendian=no
21058 fi
21059 rm -f conftest*
21060 else
21061   echo "configure: failed program was:" >&5
21062   cat conftest.$ac_ext >&5
21063 fi
21064 rm -f conftest*
21065 if test $ac_cv_c_bigendian = unknown; then
21066 if test "$cross_compiling" = yes; then
21067     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21068 else
21069   cat > conftest.$ac_ext <<EOF
21070 #line 21071 "configure"
21071 #include "confdefs.h"
21072 main () {
21073   /* Are we little or big endian?  From Harbison&Steele.  */
21074   union
21075   {
21076     long l;
21077     char c[sizeof (long)];
21078   } u;
21079   u.l = 1;
21080   exit (u.c[sizeof (long) - 1] == 1);
21081 }
21082 EOF
21083 if { (eval echo configure:21084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21084 then
21085   ac_cv_c_bigendian=no
21086 else
21087   echo "configure: failed program was:" >&5
21088   cat conftest.$ac_ext >&5
21089   rm -fr conftest*
21090   ac_cv_c_bigendian=yes
21091 fi
21092 rm -fr conftest*
21093 fi
21094
21095 fi
21096 fi
21097
21098 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21099 if test $ac_cv_c_bigendian = yes; then
21100   cat >> confdefs.h <<\EOF
21101 #define WORDS_BIGENDIAN 1
21102 EOF
21103
21104 fi
21105
21106 fi
21107
21108 echo $ac_n "checking size of short""... $ac_c" 1>&6
21109 echo "configure:21110: checking size of short" >&5 
21110 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21111   echo $ac_n "(cached) $ac_c" 1>&6
21112 else
21113   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21114   cat > conftest.$ac_ext <<EOF
21115 #line 21116 "configure"
21116 #include "confdefs.h"
21117 #include "confdefs.h" 
21118 #include <sys/types.h> 
21119  
21120
21121 int main() {
21122 switch (0) case 0: case (sizeof (short) == $ac_size):;
21123 ; return 0; }
21124 EOF
21125 if { (eval echo configure:21126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21126   rm -rf conftest*
21127   ac_cv_sizeof_short=$ac_size
21128 else
21129   echo "configure: failed program was:" >&5
21130   cat conftest.$ac_ext >&5
21131 fi
21132 rm -f conftest* 
21133   if test x$ac_cv_sizeof_short != x ; then break; fi 
21134 done 
21135
21136 fi
21137  
21138 if test x$ac_cv_sizeof_short = x ; then 
21139   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21140 fi 
21141 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21142 cat >> confdefs.h <<EOF
21143 #define SIZEOF_SHORT $ac_cv_sizeof_short
21144 EOF
21145  
21146  
21147 echo $ac_n "checking size of int""... $ac_c" 1>&6
21148 echo "configure:21149: checking size of int" >&5 
21149 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21150   echo $ac_n "(cached) $ac_c" 1>&6
21151 else
21152   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21153   cat > conftest.$ac_ext <<EOF
21154 #line 21155 "configure"
21155 #include "confdefs.h"
21156 #include "confdefs.h" 
21157 #include <sys/types.h> 
21158  
21159
21160 int main() {
21161 switch (0) case 0: case (sizeof (int) == $ac_size):;
21162 ; return 0; }
21163 EOF
21164 if { (eval echo configure:21165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21165   rm -rf conftest*
21166   ac_cv_sizeof_int=$ac_size
21167 else
21168   echo "configure: failed program was:" >&5
21169   cat conftest.$ac_ext >&5
21170 fi
21171 rm -f conftest* 
21172   if test x$ac_cv_sizeof_int != x ; then break; fi 
21173 done 
21174
21175 fi
21176  
21177 if test x$ac_cv_sizeof_int = x ; then 
21178   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21179 fi 
21180 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21181 cat >> confdefs.h <<EOF
21182 #define SIZEOF_INT $ac_cv_sizeof_int
21183 EOF
21184  
21185  
21186 echo $ac_n "checking size of long""... $ac_c" 1>&6
21187 echo "configure:21188: checking size of long" >&5 
21188 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21189   echo $ac_n "(cached) $ac_c" 1>&6
21190 else
21191   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21192   cat > conftest.$ac_ext <<EOF
21193 #line 21194 "configure"
21194 #include "confdefs.h"
21195 #include "confdefs.h" 
21196 #include <sys/types.h> 
21197  
21198
21199 int main() {
21200 switch (0) case 0: case (sizeof (long) == $ac_size):;
21201 ; return 0; }
21202 EOF
21203 if { (eval echo configure:21204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21204   rm -rf conftest*
21205   ac_cv_sizeof_long=$ac_size
21206 else
21207   echo "configure: failed program was:" >&5
21208   cat conftest.$ac_ext >&5
21209 fi
21210 rm -f conftest* 
21211   if test x$ac_cv_sizeof_long != x ; then break; fi 
21212 done 
21213
21214 fi
21215  
21216 if test x$ac_cv_sizeof_long = x ; then 
21217   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21218 fi 
21219 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21220 cat >> confdefs.h <<EOF
21221 #define SIZEOF_LONG $ac_cv_sizeof_long
21222 EOF
21223  
21224
21225
21226 if test "$ac_cv_sizeof_int" -lt 4 ; then
21227         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21228
21229         cat >> confdefs.h <<\EOF
21230 #define LBER_INT_T long
21231 EOF
21232
21233 else
21234         cat >> confdefs.h <<\EOF
21235 #define LBER_INT_T int
21236 EOF
21237
21238 fi
21239
21240 cat >> confdefs.h <<\EOF
21241 #define LBER_LEN_T long
21242 EOF
21243
21244 cat >> confdefs.h <<\EOF
21245 #define LBER_SOCKET_T int
21246 EOF
21247
21248 cat >> confdefs.h <<\EOF
21249 #define LBER_TAG_T long
21250 EOF
21251
21252
21253 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21254 echo "configure:21255: checking for 8-bit clean memcmp" >&5
21255 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21256   echo $ac_n "(cached) $ac_c" 1>&6
21257 else
21258   if test "$cross_compiling" = yes; then
21259   ac_cv_func_memcmp_clean=no
21260 else
21261   cat > conftest.$ac_ext <<EOF
21262 #line 21263 "configure"
21263 #include "confdefs.h"
21264
21265 main()
21266 {
21267   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21268   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21269 }
21270
21271 EOF
21272 if { (eval echo configure:21273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21273 then
21274   ac_cv_func_memcmp_clean=yes
21275 else
21276   echo "configure: failed program was:" >&5
21277   cat conftest.$ac_ext >&5
21278   rm -fr conftest*
21279   ac_cv_func_memcmp_clean=no
21280 fi
21281 rm -fr conftest*
21282 fi
21283
21284 fi
21285
21286 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21287 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21288
21289 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21290 echo "configure:21291: checking for strftime" >&5
21291 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21292   echo $ac_n "(cached) $ac_c" 1>&6
21293 else
21294   cat > conftest.$ac_ext <<EOF
21295 #line 21296 "configure"
21296 #include "confdefs.h"
21297 /* System header to define __stub macros and hopefully few prototypes,
21298     which can conflict with char strftime(); below.  */
21299 #include <assert.h>
21300 /* Override any gcc2 internal prototype to avoid an error.  */
21301 /* We use char because int might match the return type of a gcc2
21302     builtin and then its argument prototype would still apply.  */
21303 char strftime();
21304 char (*f)();
21305
21306 int main() {
21307
21308 /* The GNU C library defines this for functions which it implements
21309     to always fail with ENOSYS.  Some functions are actually named
21310     something starting with __ and the normal name is an alias.  */
21311 #if defined (__stub_strftime) || defined (__stub___strftime)
21312 choke me
21313 #else
21314 f = strftime;
21315 #endif
21316
21317 ; return 0; }
21318 EOF
21319 if { (eval echo configure:21320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21320   rm -rf conftest*
21321   eval "ac_cv_func_strftime=yes"
21322 else
21323   echo "configure: failed program was:" >&5
21324   cat conftest.$ac_ext >&5
21325   rm -rf conftest*
21326   eval "ac_cv_func_strftime=no"
21327 fi
21328 rm -f conftest*
21329 fi
21330
21331 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21332   echo "$ac_t""yes" 1>&6
21333   cat >> confdefs.h <<\EOF
21334 #define HAVE_STRFTIME 1
21335 EOF
21336
21337 else
21338   echo "$ac_t""no" 1>&6
21339 # strftime is in -lintl on SCO UNIX.
21340 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21341 echo "configure:21342: checking for strftime in -lintl" >&5
21342 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21343 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21344   echo $ac_n "(cached) $ac_c" 1>&6
21345 else
21346   ac_save_LIBS="$LIBS"
21347 LIBS="-lintl  $LIBS"
21348 cat > conftest.$ac_ext <<EOF
21349 #line 21350 "configure"
21350 #include "confdefs.h"
21351 /* Override any gcc2 internal prototype to avoid an error.  */
21352 /* We use char because int might match the return type of a gcc2
21353     builtin and then its argument prototype would still apply.  */
21354 char strftime();
21355
21356 int main() {
21357 strftime()
21358 ; return 0; }
21359 EOF
21360 if { (eval echo configure:21361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21361   rm -rf conftest*
21362   eval "ac_cv_lib_$ac_lib_var=yes"
21363 else
21364   echo "configure: failed program was:" >&5
21365   cat conftest.$ac_ext >&5
21366   rm -rf conftest*
21367   eval "ac_cv_lib_$ac_lib_var=no"
21368 fi
21369 rm -f conftest*
21370 LIBS="$ac_save_LIBS"
21371
21372 fi
21373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21374   echo "$ac_t""yes" 1>&6
21375   cat >> confdefs.h <<\EOF
21376 #define HAVE_STRFTIME 1
21377 EOF
21378
21379 LIBS="-lintl $LIBS"
21380 else
21381   echo "$ac_t""no" 1>&6
21382 fi
21383
21384 fi
21385
21386
21387 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21388 echo "configure:21389: checking for inet_aton()" >&5
21389 if eval "test \"\${ol_cv_func_inet_aton+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
21396 #ifdef HAVE_SYS_TYPES_H
21397 #       include <sys/types.h>
21398 #endif
21399 #ifdef HAVE_SYS_SOCKET_H
21400 #       include <sys/socket.h>
21401 #       ifdef HAVE_SYS_SELECT_H
21402 #               include <sys/select.h>
21403 #       endif
21404 #       include <netinet/in.h>
21405 #       ifdef HAVE_ARPA_INET_H
21406 #               include <arpa/inet.h>
21407 #       endif
21408 #endif
21409
21410 int main() {
21411 struct in_addr in;
21412 int rc = inet_aton( "255.255.255.255", &in );
21413 ; return 0; }
21414 EOF
21415 if { (eval echo configure:21416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21416   rm -rf conftest*
21417   ol_cv_func_inet_aton=yes
21418 else
21419   echo "configure: failed program was:" >&5
21420   cat conftest.$ac_ext >&5
21421   rm -rf conftest*
21422   ol_cv_func_inet_aton=no
21423 fi
21424 rm -f conftest*
21425 fi
21426
21427 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21428   if test $ol_cv_func_inet_aton != no; then
21429     cat >> confdefs.h <<\EOF
21430 #define HAVE_INET_ATON 1
21431 EOF
21432
21433   fi
21434  
21435
21436 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21437 echo "configure:21438: checking for _spawnlp" >&5
21438 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21439   echo $ac_n "(cached) $ac_c" 1>&6
21440 else
21441   cat > conftest.$ac_ext <<EOF
21442 #line 21443 "configure"
21443 #include "confdefs.h"
21444 /* System header to define __stub macros and hopefully few prototypes,
21445     which can conflict with char _spawnlp(); below.  */
21446 #include <assert.h>
21447 /* Override any gcc2 internal prototype to avoid an error.  */
21448 /* We use char because int might match the return type of a gcc2
21449     builtin and then its argument prototype would still apply.  */
21450 char _spawnlp();
21451 char (*f)();
21452
21453 int main() {
21454
21455 /* The GNU C library defines this for functions which it implements
21456     to always fail with ENOSYS.  Some functions are actually named
21457     something starting with __ and the normal name is an alias.  */
21458 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21459 choke me
21460 #else
21461 f = _spawnlp;
21462 #endif
21463
21464 ; return 0; }
21465 EOF
21466 if { (eval echo configure:21467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21467   rm -rf conftest*
21468   eval "ac_cv_func__spawnlp=yes"
21469 else
21470   echo "configure: failed program was:" >&5
21471   cat conftest.$ac_ext >&5
21472   rm -rf conftest*
21473   eval "ac_cv_func__spawnlp=no"
21474 fi
21475 rm -f conftest*
21476 fi
21477
21478 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21479   echo "$ac_t""yes" 1>&6
21480   cat >> confdefs.h <<\EOF
21481 #define HAVE_SPAWNLP 1
21482 EOF
21483
21484 else
21485   echo "$ac_t""no" 1>&6
21486 fi
21487
21488
21489 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21490 echo "configure:21491: checking for _snprintf" >&5
21491 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21492   echo $ac_n "(cached) $ac_c" 1>&6
21493 else
21494   cat > conftest.$ac_ext <<EOF
21495 #line 21496 "configure"
21496 #include "confdefs.h"
21497 /* System header to define __stub macros and hopefully few prototypes,
21498     which can conflict with char _snprintf(); below.  */
21499 #include <assert.h>
21500 /* Override any gcc2 internal prototype to avoid an error.  */
21501 /* We use char because int might match the return type of a gcc2
21502     builtin and then its argument prototype would still apply.  */
21503 char _snprintf();
21504 char (*f)();
21505
21506 int main() {
21507
21508 /* The GNU C library defines this for functions which it implements
21509     to always fail with ENOSYS.  Some functions are actually named
21510     something starting with __ and the normal name is an alias.  */
21511 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21512 choke me
21513 #else
21514 f = _snprintf;
21515 #endif
21516
21517 ; return 0; }
21518 EOF
21519 if { (eval echo configure:21520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21520   rm -rf conftest*
21521   eval "ac_cv_func__snprintf=yes"
21522 else
21523   echo "configure: failed program was:" >&5
21524   cat conftest.$ac_ext >&5
21525   rm -rf conftest*
21526   eval "ac_cv_func__snprintf=no"
21527 fi
21528 rm -f conftest*
21529 fi
21530
21531 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21532   echo "$ac_t""yes" 1>&6
21533   ac_cv_func_snprintf=yes
21534         cat >> confdefs.h <<\EOF
21535 #define snprintf _snprintf
21536 EOF
21537
21538
21539 else
21540   echo "$ac_t""no" 1>&6
21541 fi
21542
21543
21544 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21545 echo "configure:21546: checking for _vsnprintf" >&5
21546 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21547   echo $ac_n "(cached) $ac_c" 1>&6
21548 else
21549   cat > conftest.$ac_ext <<EOF
21550 #line 21551 "configure"
21551 #include "confdefs.h"
21552 /* System header to define __stub macros and hopefully few prototypes,
21553     which can conflict with char _vsnprintf(); below.  */
21554 #include <assert.h>
21555 /* Override any gcc2 internal prototype to avoid an error.  */
21556 /* We use char because int might match the return type of a gcc2
21557     builtin and then its argument prototype would still apply.  */
21558 char _vsnprintf();
21559 char (*f)();
21560
21561 int main() {
21562
21563 /* The GNU C library defines this for functions which it implements
21564     to always fail with ENOSYS.  Some functions are actually named
21565     something starting with __ and the normal name is an alias.  */
21566 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21567 choke me
21568 #else
21569 f = _vsnprintf;
21570 #endif
21571
21572 ; return 0; }
21573 EOF
21574 if { (eval echo configure:21575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21575   rm -rf conftest*
21576   eval "ac_cv_func__vsnprintf=yes"
21577 else
21578   echo "configure: failed program was:" >&5
21579   cat conftest.$ac_ext >&5
21580   rm -rf conftest*
21581   eval "ac_cv_func__vsnprintf=no"
21582 fi
21583 rm -f conftest*
21584 fi
21585
21586 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21587   echo "$ac_t""yes" 1>&6
21588   ac_cv_func_vsnprintf=yes
21589         cat >> confdefs.h <<\EOF
21590 #define vsnprintf _vsnprintf
21591 EOF
21592
21593
21594 else
21595   echo "$ac_t""no" 1>&6
21596 fi
21597
21598
21599 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21600 echo "configure:21601: checking for vprintf" >&5
21601 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21602   echo $ac_n "(cached) $ac_c" 1>&6
21603 else
21604   cat > conftest.$ac_ext <<EOF
21605 #line 21606 "configure"
21606 #include "confdefs.h"
21607 /* System header to define __stub macros and hopefully few prototypes,
21608     which can conflict with char vprintf(); below.  */
21609 #include <assert.h>
21610 /* Override any gcc2 internal prototype to avoid an error.  */
21611 /* We use char because int might match the return type of a gcc2
21612     builtin and then its argument prototype would still apply.  */
21613 char vprintf();
21614 char (*f)();
21615
21616 int main() {
21617
21618 /* The GNU C library defines this for functions which it implements
21619     to always fail with ENOSYS.  Some functions are actually named
21620     something starting with __ and the normal name is an alias.  */
21621 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21622 choke me
21623 #else
21624 f = vprintf;
21625 #endif
21626
21627 ; return 0; }
21628 EOF
21629 if { (eval echo configure:21630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21630   rm -rf conftest*
21631   eval "ac_cv_func_vprintf=yes"
21632 else
21633   echo "configure: failed program was:" >&5
21634   cat conftest.$ac_ext >&5
21635   rm -rf conftest*
21636   eval "ac_cv_func_vprintf=no"
21637 fi
21638 rm -f conftest*
21639 fi
21640
21641 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21642   echo "$ac_t""yes" 1>&6
21643   cat >> confdefs.h <<\EOF
21644 #define HAVE_VPRINTF 1
21645 EOF
21646
21647 else
21648   echo "$ac_t""no" 1>&6
21649 fi
21650
21651 if test "$ac_cv_func_vprintf" != yes; then
21652 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21653 echo "configure:21654: checking for _doprnt" >&5
21654 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21655   echo $ac_n "(cached) $ac_c" 1>&6
21656 else
21657   cat > conftest.$ac_ext <<EOF
21658 #line 21659 "configure"
21659 #include "confdefs.h"
21660 /* System header to define __stub macros and hopefully few prototypes,
21661     which can conflict with char _doprnt(); below.  */
21662 #include <assert.h>
21663 /* Override any gcc2 internal prototype to avoid an error.  */
21664 /* We use char because int might match the return type of a gcc2
21665     builtin and then its argument prototype would still apply.  */
21666 char _doprnt();
21667 char (*f)();
21668
21669 int main() {
21670
21671 /* The GNU C library defines this for functions which it implements
21672     to always fail with ENOSYS.  Some functions are actually named
21673     something starting with __ and the normal name is an alias.  */
21674 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21675 choke me
21676 #else
21677 f = _doprnt;
21678 #endif
21679
21680 ; return 0; }
21681 EOF
21682 if { (eval echo configure:21683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21683   rm -rf conftest*
21684   eval "ac_cv_func__doprnt=yes"
21685 else
21686   echo "configure: failed program was:" >&5
21687   cat conftest.$ac_ext >&5
21688   rm -rf conftest*
21689   eval "ac_cv_func__doprnt=no"
21690 fi
21691 rm -f conftest*
21692 fi
21693
21694 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21695   echo "$ac_t""yes" 1>&6
21696   cat >> confdefs.h <<\EOF
21697 #define HAVE_DOPRNT 1
21698 EOF
21699
21700 else
21701   echo "$ac_t""no" 1>&6
21702 fi
21703
21704 fi
21705
21706
21707 if test $ac_cv_func_vprintf = yes ; then
21708                 for ac_func in vsnprintf vsprintf
21709 do
21710 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21711 echo "configure:21712: checking for $ac_func" >&5
21712 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21713   echo $ac_n "(cached) $ac_c" 1>&6
21714 else
21715   cat > conftest.$ac_ext <<EOF
21716 #line 21717 "configure"
21717 #include "confdefs.h"
21718 /* System header to define __stub macros and hopefully few prototypes,
21719     which can conflict with char $ac_func(); below.  */
21720 #include <assert.h>
21721 /* Override any gcc2 internal prototype to avoid an error.  */
21722 /* We use char because int might match the return type of a gcc2
21723     builtin and then its argument prototype would still apply.  */
21724 char $ac_func();
21725 char (*f)();
21726
21727 int main() {
21728
21729 /* The GNU C library defines this for functions which it implements
21730     to always fail with ENOSYS.  Some functions are actually named
21731     something starting with __ and the normal name is an alias.  */
21732 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21733 choke me
21734 #else
21735 f = $ac_func;
21736 #endif
21737
21738 ; return 0; }
21739 EOF
21740 if { (eval echo configure:21741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21741   rm -rf conftest*
21742   eval "ac_cv_func_$ac_func=yes"
21743 else
21744   echo "configure: failed program was:" >&5
21745   cat conftest.$ac_ext >&5
21746   rm -rf conftest*
21747   eval "ac_cv_func_$ac_func=no"
21748 fi
21749 rm -f conftest*
21750 fi
21751
21752 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21753   echo "$ac_t""yes" 1>&6
21754     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21755   cat >> confdefs.h <<EOF
21756 #define $ac_tr_func 1
21757 EOF
21758  
21759 else
21760   echo "$ac_t""no" 1>&6
21761 fi
21762 done
21763
21764 fi
21765
21766 for ac_func in \
21767         bcopy                   \
21768         closesocket             \
21769         chroot                  \
21770         endgrent                \
21771         endpwent                \
21772         fcntl                   \
21773         flock                   \
21774         getdtablesize   \
21775         getgrgid                \
21776         gethostname             \
21777         getpass                 \
21778         getpassphrase   \
21779         getpwuid                \
21780         getpwnam                \
21781         getspnam                \
21782         gettimeofday    \
21783         initgroups              \
21784         lockf                   \
21785         memcpy                  \
21786         memmove                 \
21787         mkstemp                 \
21788         mktemp                  \
21789         pipe                    \
21790         read                    \
21791         recv                    \
21792         recvfrom                \
21793         setpwfile               \
21794         setgid                  \
21795         setegid                 \
21796         setsid                  \
21797         setuid                  \
21798         seteuid                 \
21799         sigaction               \
21800         signal                  \
21801         sigset                  \
21802         strdup                  \
21803         strerror                \
21804         strpbrk                 \
21805         strrchr                 \
21806         strsep                  \
21807         strstr                  \
21808         strtol                  \
21809         strtoul                 \
21810         strspn                  \
21811         sysconf                 \
21812         usleep                  \
21813         waitpid                 \
21814         wait4                   \
21815         write                   \
21816         send                    \
21817         sendto                  \
21818
21819 do
21820 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21821 echo "configure:21822: checking for $ac_func" >&5
21822 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21823   echo $ac_n "(cached) $ac_c" 1>&6
21824 else
21825   cat > conftest.$ac_ext <<EOF
21826 #line 21827 "configure"
21827 #include "confdefs.h"
21828 /* System header to define __stub macros and hopefully few prototypes,
21829     which can conflict with char $ac_func(); below.  */
21830 #include <assert.h>
21831 /* Override any gcc2 internal prototype to avoid an error.  */
21832 /* We use char because int might match the return type of a gcc2
21833     builtin and then its argument prototype would still apply.  */
21834 char $ac_func();
21835 char (*f)();
21836
21837 int main() {
21838
21839 /* The GNU C library defines this for functions which it implements
21840     to always fail with ENOSYS.  Some functions are actually named
21841     something starting with __ and the normal name is an alias.  */
21842 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21843 choke me
21844 #else
21845 f = $ac_func;
21846 #endif
21847
21848 ; return 0; }
21849 EOF
21850 if { (eval echo configure:21851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21851   rm -rf conftest*
21852   eval "ac_cv_func_$ac_func=yes"
21853 else
21854   echo "configure: failed program was:" >&5
21855   cat conftest.$ac_ext >&5
21856   rm -rf conftest*
21857   eval "ac_cv_func_$ac_func=no"
21858 fi
21859 rm -f conftest*
21860 fi
21861
21862 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21863   echo "$ac_t""yes" 1>&6
21864     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21865   cat >> confdefs.h <<EOF
21866 #define $ac_tr_func 1
21867 EOF
21868  
21869 else
21870   echo "$ac_t""no" 1>&6
21871 fi
21872 done
21873
21874
21875 for ac_func in getopt
21876 do
21877 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21878 echo "configure:21879: checking for $ac_func" >&5
21879 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21880   echo $ac_n "(cached) $ac_c" 1>&6
21881 else
21882   cat > conftest.$ac_ext <<EOF
21883 #line 21884 "configure"
21884 #include "confdefs.h"
21885 /* System header to define __stub macros and hopefully few prototypes,
21886     which can conflict with char $ac_func(); below.  */
21887 #include <assert.h>
21888 /* Override any gcc2 internal prototype to avoid an error.  */
21889 /* We use char because int might match the return type of a gcc2
21890     builtin and then its argument prototype would still apply.  */
21891 char $ac_func();
21892 char (*f)();
21893
21894 int main() {
21895
21896 /* The GNU C library defines this for functions which it implements
21897     to always fail with ENOSYS.  Some functions are actually named
21898     something starting with __ and the normal name is an alias.  */
21899 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21900 choke me
21901 #else
21902 f = $ac_func;
21903 #endif
21904
21905 ; return 0; }
21906 EOF
21907 if { (eval echo configure:21908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21908   rm -rf conftest*
21909   eval "ac_cv_func_$ac_func=yes"
21910 else
21911   echo "configure: failed program was:" >&5
21912   cat conftest.$ac_ext >&5
21913   rm -rf conftest*
21914   eval "ac_cv_func_$ac_func=no"
21915 fi
21916 rm -f conftest*
21917 fi
21918
21919 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21920   echo "$ac_t""yes" 1>&6
21921     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21922   cat >> confdefs.h <<EOF
21923 #define $ac_tr_func 1
21924 EOF
21925  
21926 else
21927   echo "$ac_t""no" 1>&6
21928 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
21929 fi
21930 done
21931
21932
21933
21934 if test "$ac_cv_func_getopt" != yes; then
21935         LIBSRCS="$LIBSRCS getopt.c"
21936 fi
21937
21938 # Check Configuration
21939 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
21940 echo "configure:21941: checking declaration of sys_errlist" >&5
21941 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
21942   echo $ac_n "(cached) $ac_c" 1>&6
21943 else
21944   
21945         cat > conftest.$ac_ext <<EOF
21946 #line 21947 "configure"
21947 #include "confdefs.h"
21948
21949 #include <stdio.h>
21950 #include <sys/types.h>
21951 #include <errno.h>
21952 #ifdef WINNT
21953 #include <stdlib.h>
21954 #endif 
21955 int main() {
21956 char *c = (char *) *sys_errlist
21957 ; return 0; }
21958 EOF
21959 if { (eval echo configure:21960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21960   rm -rf conftest*
21961   ol_cv_dcl_sys_errlist=yes
21962         ol_cv_have_sys_errlist=yes
21963 else
21964   echo "configure: failed program was:" >&5
21965   cat conftest.$ac_ext >&5
21966   rm -rf conftest*
21967   ol_cv_dcl_sys_errlist=no
21968 fi
21969 rm -f conftest*
21970 fi
21971
21972 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
21973 #
21974 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
21975 if test $ol_cv_dcl_sys_errlist = no ; then
21976         cat >> confdefs.h <<\EOF
21977 #define DECL_SYS_ERRLIST 1
21978 EOF
21979
21980
21981         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
21982 echo "configure:21983: checking existence of sys_errlist" >&5
21983 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
21984   echo $ac_n "(cached) $ac_c" 1>&6
21985 else
21986   
21987                 cat > conftest.$ac_ext <<EOF
21988 #line 21989 "configure"
21989 #include "confdefs.h"
21990 #include <errno.h>
21991 int main() {
21992 char *c = (char *) *sys_errlist
21993 ; return 0; }
21994 EOF
21995 if { (eval echo configure:21996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21996   rm -rf conftest*
21997   ol_cv_have_sys_errlist=yes
21998 else
21999   echo "configure: failed program was:" >&5
22000   cat conftest.$ac_ext >&5
22001   rm -rf conftest*
22002   ol_cv_have_sys_errlist=no
22003 fi
22004 rm -f conftest*
22005 fi
22006
22007 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22008 fi
22009 if test $ol_cv_have_sys_errlist = yes ; then
22010         cat >> confdefs.h <<\EOF
22011 #define HAVE_SYS_ERRLIST 1
22012 EOF
22013
22014 fi
22015
22016
22017
22018 if test "$ol_enable_debug" != no ; then
22019         cat >> confdefs.h <<\EOF
22020 #define LDAP_DEBUG 1
22021 EOF
22022
22023 fi
22024 if test "$ol_enable_syslog" = yes ; then
22025         cat >> confdefs.h <<\EOF
22026 #define LDAP_SYSLOG 1
22027 EOF
22028
22029 fi
22030 if test "$ol_enable_cache" = no ; then
22031         cat >> confdefs.h <<\EOF
22032 #define LDAP_NOCACHE 1
22033 EOF
22034
22035 fi
22036 if test "$ol_link_kbind" != no ; then
22037         cat >> confdefs.h <<\EOF
22038 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22039 EOF
22040
22041 fi
22042 if test "$ol_enable_proctitle" != no ; then
22043         cat >> confdefs.h <<\EOF
22044 #define LDAP_PROCTITLE 1
22045 EOF
22046
22047 fi
22048 if test "$ol_enable_referrals" != no ; then
22049         cat >> confdefs.h <<\EOF
22050 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22051 EOF
22052
22053 fi
22054 if test "$ol_enable_local" != no; then
22055         cat >> confdefs.h <<\EOF
22056 #define LDAP_PF_LOCAL 1
22057 EOF
22058
22059 fi
22060 if test "$ol_link_ipv6" != no; then
22061         cat >> confdefs.h <<\EOF
22062 #define LDAP_PF_INET6 1
22063 EOF
22064
22065 fi
22066 if test "$ol_enable_cleartext" != no ; then
22067         cat >> confdefs.h <<\EOF
22068 #define SLAPD_CLEARTEXT 1
22069 EOF
22070
22071 fi
22072 if test "$ol_enable_crypt" != no ; then
22073         cat >> confdefs.h <<\EOF
22074 #define SLAPD_CRYPT 1
22075 EOF
22076
22077 fi
22078 if test "$ol_link_kpasswd" != no ; then
22079         cat >> confdefs.h <<\EOF
22080 #define SLAPD_KPASSWD 1
22081 EOF
22082
22083 fi
22084 if test "$ol_link_spasswd" != no ; then
22085         cat >> confdefs.h <<\EOF
22086 #define SLAPD_SPASSWD 1
22087 EOF
22088
22089 fi
22090 if test "$ol_enable_phonetic" != no ; then
22091         cat >> confdefs.h <<\EOF
22092 #define SLAPD_PHONETIC 1
22093 EOF
22094
22095 fi
22096 if test "$ol_enable_rlookups" != no ; then
22097         cat >> confdefs.h <<\EOF
22098 #define SLAPD_RLOOKUPS 1
22099 EOF
22100
22101 fi
22102 if test "$ol_enable_aci" != no ; then
22103         cat >> confdefs.h <<\EOF
22104 #define SLAPD_ACI_ENABLED 1
22105 EOF
22106
22107 fi
22108
22109 if test "$ol_link_modules" != no ; then
22110         cat >> confdefs.h <<\EOF
22111 #define SLAPD_MODULES 1
22112 EOF
22113
22114         BUILD_SLAPD=yes
22115         SLAPD_MODULES_LDFLAGS="-dlopen self"
22116 fi
22117
22118 if test "$ol_enable_bdb" != no ; then
22119         cat >> confdefs.h <<\EOF
22120 #define SLAPD_BDB 1
22121 EOF
22122
22123         BUILD_SLAPD=yes
22124         BUILD_BDB=yes
22125         if test "$ol_with_bdb_module" != static ; then
22126                 cat >> confdefs.h <<\EOF
22127 #define SLAPD_BDB_DYNAMIC 1
22128 EOF
22129
22130                 BUILD_BDB=mod
22131                 BUILD_BDB_DYNAMIC=shared
22132                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
22133                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22134         else
22135                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22136         fi
22137 fi
22138
22139 if test "$ol_link_dnssrv" != no ; then
22140         cat >> confdefs.h <<\EOF
22141 #define SLAPD_DNSSRV 1
22142 EOF
22143
22144         BUILD_SLAPD=yes
22145         BUILD_DNSSRV=yes
22146         if test "$ol_with_dnssrv_module" != static ; then
22147                 cat >> confdefs.h <<\EOF
22148 #define SLAPD_DNSSRV_DYNAMIC 1
22149 EOF
22150
22151                 BUILD_DNSSRV=mod
22152                 BUILD_DNSSRV_DYNAMIC=shared
22153                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
22154                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22155         else
22156                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22157         fi
22158 fi
22159
22160 if test "$ol_enable_ldap" != no ; then
22161         cat >> confdefs.h <<\EOF
22162 #define SLAPD_LDAP 1
22163 EOF
22164
22165         BUILD_SLAPD=yes
22166         BUILD_LDAP=yes
22167         if test "$ol_with_ldap_module" != static ; then
22168                 cat >> confdefs.h <<\EOF
22169 #define SLAPD_LDAP_DYNAMIC 1
22170 EOF
22171
22172                 BUILD_LDAP=mod
22173                 BUILD_LDAP_DYNAMIC=shared
22174                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
22175                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22176         else
22177                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22178         fi
22179 fi
22180
22181 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22182         cat >> confdefs.h <<\EOF
22183 #define SLAPD_LDBM 1
22184 EOF
22185
22186         BUILD_SLAPD=yes
22187         BUILD_LDBM=yes
22188         LDBM_LIB="-lldbm"
22189         if test "$ol_with_ldbm_module" != static ; then
22190                 cat >> confdefs.h <<\EOF
22191 #define SLAPD_LDBM_DYNAMIC 1
22192 EOF
22193
22194                 BUILD_LDBM=mod
22195                 BUILD_LDBM_DYNAMIC=shared
22196                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
22197                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22198         else
22199                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22200         fi
22201 fi
22202
22203 if test "$ol_enable_meta" != no ; then
22204         if test "$ol_enable_ldap" = no ; then
22205                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22206         fi
22207         if test "$ol_enable_rewrite" = no ; then
22208                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22209         fi
22210         cat >> confdefs.h <<\EOF
22211 #define SLAPD_META 1
22212 EOF
22213
22214         BUILD_SLAPD=yes
22215         BUILD_META=yes
22216         BUILD_LDAP=yes
22217         BUILD_REWRITE=yes
22218         if test "$ol_with_meta_module" != static ; then
22219                 cat >> confdefs.h <<\EOF
22220 #define SLAPD_META_DYNAMIC 1
22221 EOF
22222
22223                 BUILD_META=mod
22224                 BUILD_META_DYNAMIC=shared
22225                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
22226                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22227         else
22228                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22229         fi
22230 fi
22231
22232 if test "$ol_enable_monitor" != no ; then
22233         cat >> confdefs.h <<\EOF
22234 #define SLAPD_MONITOR 1
22235 EOF
22236
22237         BUILD_SLAPD=yes
22238         BUILD_MONITOR=yes
22239         if test "$ol_with_monitor_module" != static ; then
22240                 cat >> confdefs.h <<\EOF
22241 #define SLAPD_MONITOR_DYNAMIC 1
22242 EOF
22243
22244                 BUILD_MONITOR=mod
22245                 BUILD_MONITOR_DYNAMIC=shared
22246                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
22247                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22248         else
22249                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22250         fi
22251 fi
22252
22253 if test "$ol_enable_null" != no ; then
22254         cat >> confdefs.h <<\EOF
22255 #define SLAPD_NULL 1
22256 EOF
22257
22258         BUILD_SLAPD=yes
22259         BUILD_NULL=yes
22260         if test "$ol_with_null_module" != static ; then
22261                 cat >> confdefs.h <<\EOF
22262 #define SLAPD_NULL_DYNAMIC 1
22263 EOF
22264
22265                 BUILD_NULL=mod
22266                 BUILD_NULL_DYNAMIC=shared
22267                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-null/back_null.la"
22268                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22269         else
22270                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22271         fi
22272 fi
22273
22274 if test "$ol_enable_passwd" != no ; then
22275         cat >> confdefs.h <<\EOF
22276 #define SLAPD_PASSWD 1
22277 EOF
22278
22279         BUILD_SLAPD=yes
22280         BUILD_PASSWD=yes
22281         if test "$ol_with_passwd_module" != static ; then
22282                 cat >> confdefs.h <<\EOF
22283 #define SLAPD_PASSWD_DYNAMIC 1
22284 EOF
22285
22286                 BUILD_PASSWD=mod
22287                 BUILD_PASSWD_DYNAMIC=shared
22288                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
22289                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22290         else
22291                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22292         fi
22293 fi
22294
22295 if test "$ol_link_perl" != no ; then
22296         cat >> confdefs.h <<\EOF
22297 #define SLAPD_PERL 1
22298 EOF
22299
22300         BUILD_SLAPD=yes
22301         BUILD_PERL=yes
22302         if test "$ol_with_perl_module" != static ; then
22303                 cat >> confdefs.h <<\EOF
22304 #define SLAPD_PERL_DYNAMIC 1
22305 EOF
22306
22307                 BUILD_PERL=mod
22308                 BUILD_PERL_DYNAMIC=shared
22309                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
22310                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22311         else
22312                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22313         fi
22314 fi
22315
22316 if test "$ol_enable_shell" != no ; then
22317         cat >> confdefs.h <<\EOF
22318 #define SLAPD_SHELL 1
22319 EOF
22320
22321         BUILD_SLAPD=yes
22322         BUILD_SHELL=yes
22323         if test "$ol_with_shell_module" != static ; then
22324                 cat >> confdefs.h <<\EOF
22325 #define SLAPD_SHELL_DYNAMIC 1
22326 EOF
22327
22328                 BUILD_SHELL=mod
22329                 BUILD_SHELL_DYNAMIC=shared
22330                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
22331                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22332         else
22333                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22334         fi
22335 fi
22336
22337 if test "$ol_enable_tcl" != no ; then
22338         cat >> confdefs.h <<\EOF
22339 #define SLAPD_TCL 1
22340 EOF
22341
22342         BUILD_SLAPD=yes
22343         BUILD_TCL=yes
22344         if test "$ol_with_tcl_module" != static; then
22345                 cat >> confdefs.h <<\EOF
22346 #define SLAPD_TCL_DYNAMIC 1
22347 EOF
22348
22349                 BUILD_TCL=mod
22350                 BUILD_TCL_DYNAMIC=shared
22351                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
22352                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22353         else
22354                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22355         fi
22356 fi
22357
22358 if test "$ol_link_sql" != no ; then
22359         cat >> confdefs.h <<\EOF
22360 #define SLAPD_SQL 1
22361 EOF
22362
22363         BUILD_SLAPD=yes
22364         BUILD_SQL=yes
22365         if test "$ol_with_sql_module" != static; then
22366                 cat >> confdefs.h <<\EOF
22367 #define SLAPD_SQL_DYNAMIC 1
22368 EOF
22369
22370                 BUILD_SQL=mod
22371                 BUILD_SQL_DYNAMIC=shared
22372                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
22373                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22374         else
22375                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22376         fi
22377 fi
22378
22379 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22380         $BUILD_SLAPD = yes ; then
22381         BUILD_SLURPD=yes
22382 fi
22383
22384 if test "$ol_enable_rewrite" != no ; then
22385         cat >> confdefs.h <<\EOF
22386 #define ENABLE_REWRITE 1
22387 EOF
22388
22389         BUILD_REWRITE=yes
22390 fi
22391
22392
22393
22394 if test "$ac_cv_mingw32" = yes ; then
22395         PLAT=NT
22396         SLAPD_MODULES_LDFLAGS=
22397         SLAPD_MODULES_LIST=
22398 else
22399         PLAT=UNIX
22400 fi
22401
22402
22403
22404
22405
22406
22407   
22408   
22409   
22410   
22411   
22412   
22413   
22414   
22415   
22416   
22417   
22418   
22419   
22420   
22421   
22422   
22423   
22424   
22425   
22426   
22427   
22428   
22429   
22430   
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471 # Check whether --with-xxinstall or --without-xxinstall was given.
22472 if test "${with_xxinstall+set}" = set; then
22473   withval="$with_xxinstall"
22474   :
22475 fi
22476
22477
22478
22479 trap '' 1 2 15
22480
22481 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22482
22483 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22484 # Let make expand exec_prefix.
22485 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22486
22487 # Any assignment to VPATH causes Sun make to only execute
22488 # the first set of double-colon rules, so remove it if not needed.
22489 # If there is a colon in the path, we need to keep it.
22490 if test "x$srcdir" = x.; then
22491   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22492 fi
22493
22494 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22495
22496 DEFS=-DHAVE_CONFIG_H
22497
22498 # Without the "./", some shells look in PATH for config.status.
22499 : ${CONFIG_STATUS=./config.status}
22500
22501 echo creating $CONFIG_STATUS
22502 rm -f $CONFIG_STATUS
22503 cat > $CONFIG_STATUS <<EOF
22504 #! /bin/sh
22505 # Generated automatically by configure.
22506 # Run this file to recreate the current configuration.
22507 # This directory was configured as follows,
22508 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22509 #
22510 # $0 $ac_configure_args
22511 #
22512 # Compiler output produced by configure, useful for debugging
22513 # configure, is in ./config.log if it exists.
22514
22515 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22516 for ac_option
22517 do
22518   case "\$ac_option" in
22519   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22520     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22521     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22522   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22523     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22524     exit 0 ;;
22525   -help | --help | --hel | --he | --h)
22526     echo "\$ac_cs_usage"; exit 0 ;;
22527   *) echo "\$ac_cs_usage"; exit 1 ;;
22528   esac
22529 done
22530
22531 ac_given_srcdir=$srcdir
22532 ac_given_INSTALL="$INSTALL"
22533
22534 trap 'rm -fr `echo "\
22535 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22536 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22537 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22538 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22539 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22540 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22541 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22542 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22543 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22544 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22545 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22546 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22547 include/Makefile:build/top.mk:include/Makefile.in \
22548 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22549 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22550 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22551 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22552 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22553 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22554 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22555 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22556 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22557 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22558 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22559 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22560 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22561 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22562 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22563 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22564 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22565 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22566 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22567 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22568 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22569 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22570 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22571 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22572 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22573 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22574 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22575 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22576 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22577  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22578 EOF
22579 cat >> $CONFIG_STATUS <<EOF
22580
22581 # Protect against being on the right side of a sed subst in config.status.
22582 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22583  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22584 $ac_vpsub
22585 $extrasub
22586 s%@SHELL@%$SHELL%g
22587 s%@CFLAGS@%$CFLAGS%g
22588 s%@CPPFLAGS@%$CPPFLAGS%g
22589 s%@CXXFLAGS@%$CXXFLAGS%g
22590 s%@FFLAGS@%$FFLAGS%g
22591 s%@DEFS@%$DEFS%g
22592 s%@LDFLAGS@%$LDFLAGS%g
22593 s%@LIBS@%$LIBS%g
22594 s%@exec_prefix@%$exec_prefix%g
22595 s%@prefix@%$prefix%g
22596 s%@program_transform_name@%$program_transform_name%g
22597 s%@bindir@%$bindir%g
22598 s%@sbindir@%$sbindir%g
22599 s%@libexecdir@%$libexecdir%g
22600 s%@datadir@%$datadir%g
22601 s%@sysconfdir@%$sysconfdir%g
22602 s%@sharedstatedir@%$sharedstatedir%g
22603 s%@localstatedir@%$localstatedir%g
22604 s%@libdir@%$libdir%g
22605 s%@includedir@%$includedir%g
22606 s%@oldincludedir@%$oldincludedir%g
22607 s%@infodir@%$infodir%g
22608 s%@mandir@%$mandir%g
22609 s%@host@%$host%g
22610 s%@host_alias@%$host_alias%g
22611 s%@host_cpu@%$host_cpu%g
22612 s%@host_vendor@%$host_vendor%g
22613 s%@host_os@%$host_os%g
22614 s%@target@%$target%g
22615 s%@target_alias@%$target_alias%g
22616 s%@target_cpu@%$target_cpu%g
22617 s%@target_vendor@%$target_vendor%g
22618 s%@target_os@%$target_os%g
22619 s%@build@%$build%g
22620 s%@build_alias@%$build_alias%g
22621 s%@build_cpu@%$build_cpu%g
22622 s%@build_vendor@%$build_vendor%g
22623 s%@build_os@%$build_os%g
22624 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22625 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22626 s%@INSTALL_DATA@%$INSTALL_DATA%g
22627 s%@PACKAGE@%$PACKAGE%g
22628 s%@VERSION@%$VERSION%g
22629 s%@ACLOCAL@%$ACLOCAL%g
22630 s%@AUTOCONF@%$AUTOCONF%g
22631 s%@AUTOMAKE@%$AUTOMAKE%g
22632 s%@AUTOHEADER@%$AUTOHEADER%g
22633 s%@MAKEINFO@%$MAKEINFO%g
22634 s%@install_sh@%$install_sh%g
22635 s%@AMTAR@%$AMTAR%g
22636 s%@AWK@%$AWK%g
22637 s%@AMTARFLAGS@%$AMTARFLAGS%g
22638 s%@SET_MAKE@%$SET_MAKE%g
22639 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22640 s%@top_builddir@%$top_builddir%g
22641 s%@ldap_subdir@%$ldap_subdir%g
22642 s%@CC@%$CC%g
22643 s%@AR@%$AR%g
22644 s%@LN_S@%$LN_S%g
22645 s%@OBJEXT@%$OBJEXT%g
22646 s%@EXEEXT@%$EXEEXT%g
22647 s%@ECHO@%$ECHO%g
22648 s%@RANLIB@%$RANLIB%g
22649 s%@STRIP@%$STRIP%g
22650 s%@DLLTOOL@%$DLLTOOL%g
22651 s%@AS@%$AS%g
22652 s%@OBJDUMP@%$OBJDUMP%g
22653 s%@CPP@%$CPP%g
22654 s%@LIBTOOL@%$LIBTOOL%g
22655 s%@LN_H@%$LN_H%g
22656 s%@SENDMAIL@%$SENDMAIL%g
22657 s%@EDITOR@%$EDITOR%g
22658 s%@PERLBIN@%$PERLBIN%g
22659 s%@OL_MKDEP@%$OL_MKDEP%g
22660 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22661 s%@LIBOBJS@%$LIBOBJS%g
22662 s%@LIBSRCS@%$LIBSRCS%g
22663 s%@PLAT@%$PLAT%g
22664 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22665 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22666 s%@BUILD_BDB@%$BUILD_BDB%g
22667 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22668 s%@BUILD_LDAP@%$BUILD_LDAP%g
22669 s%@BUILD_LDBM@%$BUILD_LDBM%g
22670 s%@BUILD_META@%$BUILD_META%g
22671 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22672 s%@BUILD_NULL@%$BUILD_NULL%g
22673 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22674 s%@BUILD_PERL@%$BUILD_PERL%g
22675 s%@BUILD_SHELL@%$BUILD_SHELL%g
22676 s%@BUILD_SQL@%$BUILD_SQL%g
22677 s%@BUILD_TCL@%$BUILD_TCL%g
22678 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22679 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22680 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22681 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22682 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22683 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22684 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
22685 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22686 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22687 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22688 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22689 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22690 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22691 s%@LDBM_LIB@%$LDBM_LIB%g
22692 s%@LDAP_LIBS@%$LDAP_LIBS%g
22693 s%@LDIF_LIBS@%$LDIF_LIBS%g
22694 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22695 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22696 s%@LDBM_LIBS@%$LDBM_LIBS%g
22697 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22698 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22699 s%@WRAP_LIBS@%$WRAP_LIBS%g
22700 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22701 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22702 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22703 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
22704 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22705 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22706 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22707 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22708 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22709 s%@KRB4_LIBS@%$KRB4_LIBS%g
22710 s%@KRB5_LIBS@%$KRB5_LIBS%g
22711 s%@READLINE_LIBS@%$READLINE_LIBS%g
22712 s%@SASL_LIBS@%$SASL_LIBS%g
22713 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22714 s%@TLS_LIBS@%$TLS_LIBS%g
22715 s%@MODULES_LIBS@%$MODULES_LIBS%g
22716 s%@AUTH_LIBS@%$AUTH_LIBS%g
22717 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22718 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22719 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22720 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22721
22722 CEOF
22723 EOF
22724
22725 cat >> $CONFIG_STATUS <<\EOF
22726
22727 # Split the substitutions into bite-sized pieces for seds with
22728 # small command number limits, like on Digital OSF/1 and HP-UX.
22729 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22730 ac_file=1 # Number of current file.
22731 ac_beg=1 # First line for current file.
22732 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22733 ac_more_lines=:
22734 ac_sed_cmds=""
22735 while $ac_more_lines; do
22736   if test $ac_beg -gt 1; then
22737     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22738   else
22739     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22740   fi
22741   if test ! -s conftest.s$ac_file; then
22742     ac_more_lines=false
22743     rm -f conftest.s$ac_file
22744   else
22745     if test -z "$ac_sed_cmds"; then
22746       ac_sed_cmds="sed -f conftest.s$ac_file"
22747     else
22748       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22749     fi
22750     ac_file=`expr $ac_file + 1`
22751     ac_beg=$ac_end
22752     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22753   fi
22754 done
22755 if test -z "$ac_sed_cmds"; then
22756   ac_sed_cmds=cat
22757 fi
22758 EOF
22759
22760 cat >> $CONFIG_STATUS <<EOF
22761
22762 CONFIG_FILES=\${CONFIG_FILES-"\
22763 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22764 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22765 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22766 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22767 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22768 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22769 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22770 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22771 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22772 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22773 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22774 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22775 include/Makefile:build/top.mk:include/Makefile.in \
22776 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22777 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22778 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22779 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22780 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22781 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22782 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22783 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22784 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22785 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22786 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22787 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22788 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22789 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22790 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22791 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22792 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22793 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22794 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22795 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22796 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22797 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22798 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22799 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22800 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22801 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22802 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22803 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22804 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22805 "}
22806 EOF
22807 cat >> $CONFIG_STATUS <<\EOF
22808 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
22809   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22810   case "$ac_file" in
22811   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22812        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22813   *) ac_file_in="${ac_file}.in" ;;
22814   esac
22815
22816   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
22817
22818   # Remove last slash and all that follows it.  Not all systems have dirname.
22819   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22820   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22821     # The file is in a subdirectory.
22822     test ! -d "$ac_dir" && mkdir "$ac_dir"
22823     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
22824     # A "../" for each directory in $ac_dir_suffix.
22825     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
22826   else
22827     ac_dir_suffix= ac_dots=
22828   fi
22829
22830   case "$ac_given_srcdir" in
22831   .)  srcdir=.
22832       if test -z "$ac_dots"; then top_srcdir=.
22833       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
22834   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
22835   *) # Relative path.
22836     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
22837     top_srcdir="$ac_dots$ac_given_srcdir" ;;
22838   esac
22839
22840   case "$ac_given_INSTALL" in
22841   [/$]*) INSTALL="$ac_given_INSTALL" ;;
22842   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
22843   esac
22844
22845   echo creating "$ac_file"
22846   rm -f "$ac_file"
22847   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
22848   case "$ac_file" in
22849   *[Mm]akefile*) ac_comsub="1i\\
22850 # $configure_input" ;;
22851   *) ac_comsub= ;;
22852   esac
22853
22854   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22855   sed -e "$ac_comsub
22856 s%@configure_input@%$configure_input%g
22857 s%@srcdir@%$srcdir%g
22858 s%@top_srcdir@%$top_srcdir%g
22859 s%@INSTALL@%$INSTALL%g
22860 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
22861 fi; done
22862 rm -f conftest.s*
22863
22864 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22865 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22866 #
22867 # ac_d sets the value in "#define NAME VALUE" lines.
22868 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22869 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
22870 ac_dC='\3'
22871 ac_dD='%g'
22872 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22873 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22874 ac_uB='\([      ]\)%\1#\2define\3'
22875 ac_uC=' '
22876 ac_uD='\4%g'
22877 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22878 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22879 ac_eB='$%\1#\2define\3'
22880 ac_eC=' '
22881 ac_eD='%g'
22882
22883 if test "${CONFIG_HEADERS+set}" != set; then
22884 EOF
22885 cat >> $CONFIG_STATUS <<EOF
22886   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
22887 EOF
22888 cat >> $CONFIG_STATUS <<\EOF
22889 fi
22890 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
22891   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22892   case "$ac_file" in
22893   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22894        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22895   *) ac_file_in="${ac_file}.in" ;;
22896   esac
22897
22898   echo creating $ac_file
22899
22900   rm -f conftest.frag conftest.in conftest.out
22901   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22902   cat $ac_file_inputs > conftest.in
22903
22904 EOF
22905
22906 # Transform confdefs.h into a sed script conftest.vals that substitutes
22907 # the proper values into config.h.in to produce config.h.  And first:
22908 # Protect against being on the right side of a sed subst in config.status.
22909 # Protect against being in an unquoted here document in config.status.
22910 rm -f conftest.vals
22911 cat > conftest.hdr <<\EOF
22912 s/[\\&%]/\\&/g
22913 s%[\\$`]%\\&%g
22914 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
22915 s%ac_d%ac_u%gp
22916 s%ac_u%ac_e%gp
22917 EOF
22918 sed -n -f conftest.hdr confdefs.h > conftest.vals
22919 rm -f conftest.hdr
22920
22921 # This sed command replaces #undef with comments.  This is necessary, for
22922 # example, in the case of _POSIX_SOURCE, which is predefined and required
22923 # on some systems where configure will not decide to define it.
22924 cat >> conftest.vals <<\EOF
22925 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
22926 EOF
22927
22928 # Break up conftest.vals because some shells have a limit on
22929 # the size of here documents, and old seds have small limits too.
22930
22931 rm -f conftest.tail
22932 while :
22933 do
22934   ac_lines=`grep -c . conftest.vals`
22935   # grep -c gives empty output for an empty file on some AIX systems.
22936   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
22937   # Write a limited-size here document to conftest.frag.
22938   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
22939   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
22940   echo 'CEOF
22941   sed -f conftest.frag conftest.in > conftest.out
22942   rm -f conftest.in
22943   mv conftest.out conftest.in
22944 ' >> $CONFIG_STATUS
22945   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22946   rm -f conftest.vals
22947   mv conftest.tail conftest.vals
22948 done
22949 rm -f conftest.vals
22950
22951 cat >> $CONFIG_STATUS <<\EOF
22952   rm -f conftest.frag conftest.h
22953   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
22954   cat conftest.in >> conftest.h
22955   rm -f conftest.in
22956   if cmp -s $ac_file conftest.h 2>/dev/null; then
22957     echo "$ac_file is unchanged"
22958     rm -f conftest.h
22959   else
22960     # Remove last slash and all that follows it.  Not all systems have dirname.
22961       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22962       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22963       # The file is in a subdirectory.
22964       test ! -d "$ac_dir" && mkdir "$ac_dir"
22965     fi
22966     rm -f $ac_file
22967     mv conftest.h $ac_file
22968   fi
22969 fi; done
22970
22971 EOF
22972 cat >> $CONFIG_STATUS <<EOF
22973
22974 EOF
22975 cat >> $CONFIG_STATUS <<\EOF
22976
22977 date > stamp-h
22978 echo Please run \"make depend\" to build dependencies
22979
22980 exit 0
22981 EOF
22982 chmod +x $CONFIG_STATUS
22983 rm -fr confdefs* $ac_clean_files
22984 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
22985