]> git.sur5r.net Git - openldap/blob - configure
!--static fixes from head
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.29 2003/02/09 16:31:35 kurt Exp  
4
5 # Copyright 1998-2003 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-2003 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-dynamic      enable linking built binaries with dynamic libs [no]"
34 ac_help="$ac_help
35   --enable-syslog         enable syslog support [auto]"
36 ac_help="$ac_help
37   --enable-proctitle      enable proctitle support [yes]"
38 ac_help="$ac_help
39   --enable-ipv6           enable IPv6 support [auto]"
40 ac_help="$ac_help
41   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
42 ac_help="$ac_help
43   --enable-x-compile      enable cross compiling [no]"
44 ac_help="$ac_help
45   --with-cyrus-sasl       with Cyrus SASL support [auto]"
46 ac_help="$ac_help
47   --with-fetch            with fetch(3) URL support [auto]"
48 ac_help="$ac_help
49   --with-kerberos         with Kerberos support [auto]"
50 ac_help="$ac_help
51   --with-readline         with readline support [auto]"
52 ac_help="$ac_help
53   --with-threads          with threads [auto]"
54 ac_help="$ac_help
55   --with-tls              with TLS/SSL support [auto]"
56 ac_help="$ac_help
57   --with-yielding-select  with implicitly yielding select [auto]"
58 ac_help="$ac_help
59
60 SLAPD (Standalone LDAP Daemon) Options:"
61 ac_help="$ac_help
62   --enable-slapd          enable building slapd [yes]"
63 ac_help="$ac_help
64     --enable-aci          enable per-object ACIs (experimental) [no]"
65 ac_help="$ac_help
66     --enable-cleartext    enable cleartext passwords [yes]"
67 ac_help="$ac_help
68     --enable-crypt        enable crypt(3) passwords [no]"
69 ac_help="$ac_help
70     --enable-kpasswd      enable Kerberos password verification [no]"
71 ac_help="$ac_help
72     --enable-lmpasswd     enable LAN Manager passwords [no]"
73 ac_help="$ac_help
74     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
75 ac_help="$ac_help
76     --enable-modules      enable dynamic module support [no]"
77 ac_help="$ac_help
78     --enable-phonetic     enable phonetic/soundex [no]"
79 ac_help="$ac_help
80     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
81 ac_help="$ac_help
82     --enable-rlookups     enable reverse lookups of client hostnames [no]"
83 ac_help="$ac_help
84     --enable-slp          enable SLPv2 support [no]"
85 ac_help="$ac_help
86     --enable-wrappers     enable tcp wrapper support [no]"
87 ac_help="$ac_help
88     --enable-bdb          enable Berkeley DB backend [yes]"
89 ac_help="$ac_help
90     --with-bdb-module     module type static|dynamic [static]"
91 ac_help="$ac_help
92     --enable-dnssrv       enable dnssrv backend [no]"
93 ac_help="$ac_help
94     --with-dnssrv-module  module type static|dynamic [static]"
95 ac_help="$ac_help
96     --enable-ldap         enable ldap backend [no]"
97 ac_help="$ac_help
98     --with-ldap-module    module type static|dynamic [static]"
99 ac_help="$ac_help
100     --enable-ldbm         enable ldbm backend [no]"
101 ac_help="$ac_help
102     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
103 ac_help="$ac_help
104     --with-ldbm-module    module type static|dynamic [static]"
105 ac_help="$ac_help
106     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
107 ac_help="$ac_help
108     --enable-meta         enable metadirectory backend [no]"
109 ac_help="$ac_help
110     --with-meta-module    module type static|dynamic [static]"
111 ac_help="$ac_help
112     --enable-monitor      enable monitor backend [no]"
113 ac_help="$ac_help
114     --with-monitor-module module type static|dynamic [static]"
115 ac_help="$ac_help
116     --enable-null         enable null backend [no]"
117 ac_help="$ac_help
118     --with-null-module    module type static|dynamic [static]"
119 ac_help="$ac_help
120     --enable-passwd       enable passwd backend [no]"
121 ac_help="$ac_help
122     --with-passwd-module  module type static|dynamic [static]"
123 ac_help="$ac_help
124     --enable-perl         enable perl backend [no]"
125 ac_help="$ac_help
126     --with-perl-module    module type static|dynamic [static]"
127 ac_help="$ac_help
128     --enable-shell        enable shell backend [no]"
129 ac_help="$ac_help
130     --with-shell-module   module type static|dynamic [static]"
131 ac_help="$ac_help
132     --enable-sql          enable sql backend [no]"
133 ac_help="$ac_help
134     --with-sql-module     module type static|dynamic [static]"
135 ac_help="$ac_help
136
137 SLURPD (Replication Daemon) Options:"
138 ac_help="$ac_help
139   --enable-slurpd         enable building slurpd [auto]"
140 ac_help="$ac_help
141
142 Library Generation & Linking Options"
143 ac_help="$ac_help
144   --enable-static[=PKGS]  build static libraries [default=yes]"
145 ac_help="$ac_help
146   --enable-shared[=PKGS]  build shared libraries [default=yes]"
147 ac_help="$ac_help
148   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
149 ac_help="$ac_help
150   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
151
152 # Find the correct PATH separator.  Usually this is `:', but
153 # DJGPP uses `;' like DOS.
154 if test "X${PATH_SEPARATOR+set}" != Xset; then
155   UNAME=${UNAME-`uname 2>/dev/null`}
156   case X$UNAME in
157     *-DOS) lt_cv_sys_path_separator=';' ;;
158     *)     lt_cv_sys_path_separator=':' ;;
159   esac
160   PATH_SEPARATOR=$lt_cv_sys_path_separator
161 fi
162
163
164 # Check that we are running under the correct shell.
165 SHELL=${CONFIG_SHELL-/bin/sh}
166
167 case X$ECHO in
168 X*--fallback-echo)
169   # Remove one level of quotation (which was required for Make).
170   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
171   ;;
172 esac
173
174 echo=${ECHO-echo}
175 if test "X$1" = X--no-reexec; then
176   # Discard the --no-reexec flag, and continue.
177   shift
178 elif test "X$1" = X--fallback-echo; then
179   # Avoid inline document here, it may be left over
180   :
181 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
182   # Yippee, $echo works!
183   :
184 else
185   # Restart under the correct shell.
186   exec $SHELL "$0" --no-reexec ${1+"$@"}
187 fi
188
189 if test "X$1" = X--fallback-echo; then
190   # used as fallback echo
191   shift
192   cat <<EOF
193
194 EOF
195   exit 0
196 fi
197
198 # The HP-UX ksh and POSIX shell print the target directory to stdout
199 # if CDPATH is set.
200 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
201
202 if test -z "$ECHO"; then
203 if test "X${echo_test_string+set}" != Xset; then
204 # find a string as large as possible, as long as the shell can cope with it
205   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
206     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
207     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
208        echo_test_string="`eval $cmd`" &&
209        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
210     then
211       break
212     fi
213   done
214 fi
215
216 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
217    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
218    test "X$echo_testing_string" = "X$echo_test_string"; then
219   :
220 else
221   # The Solaris, AIX, and Digital Unix default echo programs unquote
222   # backslashes.  This makes it impossible to quote backslashes using
223   #   echo "$something" | sed 's/\\/\\\\/g'
224   #
225   # So, first we look for a working echo in the user's PATH.
226
227   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
228   for dir in $PATH /usr/ucb; do
229     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
230        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
231        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
232        test "X$echo_testing_string" = "X$echo_test_string"; then
233       echo="$dir/echo"
234       break
235     fi
236   done
237   IFS="$save_ifs"
238
239   if test "X$echo" = Xecho; then
240     # We didn't find a better echo, so look for alternatives.
241     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
242        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
243        test "X$echo_testing_string" = "X$echo_test_string"; then
244       # This shell has a builtin print -r that does the trick.
245       echo='print -r'
246     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
247          test "X$CONFIG_SHELL" != X/bin/ksh; then
248       # If we have ksh, try running configure again with it.
249       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
250       export ORIGINAL_CONFIG_SHELL
251       CONFIG_SHELL=/bin/ksh
252       export CONFIG_SHELL
253       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
254     else
255       # Try using printf.
256       echo='printf %s\n'
257       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
258          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
259          test "X$echo_testing_string" = "X$echo_test_string"; then
260         # Cool, printf works
261         :
262       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
263            test "X$echo_testing_string" = 'X\t' &&
264            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
265            test "X$echo_testing_string" = "X$echo_test_string"; then
266         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
267         export CONFIG_SHELL
268         SHELL="$CONFIG_SHELL"
269         export SHELL
270         echo="$CONFIG_SHELL $0 --fallback-echo"
271       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
272            test "X$echo_testing_string" = 'X\t' &&
273            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
274            test "X$echo_testing_string" = "X$echo_test_string"; then
275         echo="$CONFIG_SHELL $0 --fallback-echo"
276       else
277         # maybe with a smaller string...
278         prev=:
279
280         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
281           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
282           then
283             break
284           fi
285           prev="$cmd"
286         done
287
288         if test "$prev" != 'sed 50q "$0"'; then
289           echo_test_string=`eval $prev`
290           export echo_test_string
291           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
292         else
293           # Oops.  We lost completely, so just stick with echo.
294           echo=echo
295         fi
296       fi
297     fi
298   fi
299 fi
300 fi
301
302 # Copy echo and quote the copy suitably for passing to libtool from
303 # the Makefile, instead of quoting the original, which is used later.
304 ECHO=$echo
305 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
306    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
307 fi
308
309
310 ac_help="$ac_help
311   --disable-libtool-lock  avoid locking (might break parallel builds)"
312 ac_help="$ac_help
313   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
314 ac_help="$ac_help
315
316 See INSTALL file for further details."
317
318 # Initialize some variables set by options.
319 # The variables have the same names as the options, with
320 # dashes changed to underlines.
321 build=NONE
322 cache_file=./config.cache
323 exec_prefix=NONE
324 host=NONE
325 no_create=
326 nonopt=NONE
327 no_recursion=
328 prefix=NONE
329 program_prefix=NONE
330 program_suffix=NONE
331 program_transform_name=s,x,x,
332 silent=
333 site=
334 srcdir=
335 target=NONE
336 verbose=
337 x_includes=NONE
338 x_libraries=NONE
339 bindir='${exec_prefix}/bin'
340 sbindir='${exec_prefix}/sbin'
341 libexecdir='${exec_prefix}/libexec'
342 datadir='${prefix}/share'
343 sysconfdir='${prefix}/etc'
344 sharedstatedir='${prefix}/com'
345 localstatedir='${prefix}/var'
346 libdir='${exec_prefix}/lib'
347 includedir='${prefix}/include'
348 oldincludedir='/usr/include'
349 infodir='${prefix}/info'
350 mandir='${prefix}/man'
351
352 # Initialize some other variables.
353 subdirs=
354 MFLAGS= MAKEFLAGS=
355 SHELL=${CONFIG_SHELL-/bin/sh}
356 # Maximum number of lines to put in a shell here document.
357 ac_max_here_lines=12
358
359 ac_prev=
360 for ac_option
361 do
362
363   # If the previous option needs an argument, assign it.
364   if test -n "$ac_prev"; then
365     eval "$ac_prev=\$ac_option"
366     ac_prev=
367     continue
368   fi
369
370   case "$ac_option" in
371   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
372   *) ac_optarg= ;;
373   esac
374
375   # Accept the important Cygnus configure options, so we can diagnose typos.
376
377   case "$ac_option" in
378
379   -bindir | --bindir | --bindi | --bind | --bin | --bi)
380     ac_prev=bindir ;;
381   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
382     bindir="$ac_optarg" ;;
383
384   -build | --build | --buil | --bui | --bu)
385     ac_prev=build ;;
386   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
387     build="$ac_optarg" ;;
388
389   -cache-file | --cache-file | --cache-fil | --cache-fi \
390   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
391     ac_prev=cache_file ;;
392   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
393   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
394     cache_file="$ac_optarg" ;;
395
396   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
397     ac_prev=datadir ;;
398   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
399   | --da=*)
400     datadir="$ac_optarg" ;;
401
402   -disable-* | --disable-*)
403     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
404     # Reject names that are not valid shell variable names.
405     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
406       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
407     fi
408     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
409     eval "enable_${ac_feature}=no" ;;
410
411   -enable-* | --enable-*)
412     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
413     # Reject names that are not valid shell variable names.
414     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
415       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
416     fi
417     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
418     case "$ac_option" in
419       *=*) ;;
420       *) ac_optarg=yes ;;
421     esac
422     eval "enable_${ac_feature}='$ac_optarg'" ;;
423
424   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
425   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
426   | --exec | --exe | --ex)
427     ac_prev=exec_prefix ;;
428   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
429   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
430   | --exec=* | --exe=* | --ex=*)
431     exec_prefix="$ac_optarg" ;;
432
433   -gas | --gas | --ga | --g)
434     # Obsolete; use --with-gas.
435     with_gas=yes ;;
436
437   -help | --help | --hel | --he)
438     # Omit some internal or obsolete options to make the list less imposing.
439     # This message is too long to be a string in the A/UX 3.1 sh.
440     cat << EOF
441 Usage: configure [options] [host]
442 Options: [defaults in brackets after descriptions]
443 Configuration:
444   --cache-file=FILE       cache test results in FILE
445   --help                  print this message
446   --no-create             do not create output files
447   --quiet, --silent       do not print \`checking...' messages
448   --version               print the version of autoconf that created configure
449 Directory and file names:
450   --prefix=PREFIX         install architecture-independent files in PREFIX
451                           [$ac_default_prefix]
452   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
453                           [same as prefix]
454   --bindir=DIR            user executables in DIR [EPREFIX/bin]
455   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
456   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
457   --datadir=DIR           read-only architecture-independent data in DIR
458                           [PREFIX/share]
459   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
460   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
461                           [PREFIX/com]
462   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
463   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
464   --includedir=DIR        C header files in DIR [PREFIX/include]
465   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
466   --infodir=DIR           info documentation in DIR [PREFIX/info]
467   --mandir=DIR            man documentation in DIR [PREFIX/man]
468   --srcdir=DIR            find the sources in DIR [configure dir or ..]
469   --program-prefix=PREFIX prepend PREFIX to installed program names
470   --program-suffix=SUFFIX append SUFFIX to installed program names
471   --program-transform-name=PROGRAM
472                           run sed PROGRAM on installed program names
473 EOF
474     cat << EOF
475 Host type:
476   --build=BUILD           configure for building on BUILD [BUILD=HOST]
477   --host=HOST             configure for HOST [guessed]
478   --target=TARGET         configure for TARGET [TARGET=HOST]
479 Features and packages:
480   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
481   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
482   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
483   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
484   --x-includes=DIR        X include files are in DIR
485   --x-libraries=DIR       X library files are in DIR
486 EOF
487     if test -n "$ac_help"; then
488       echo "--enable and --with options recognized:$ac_help"
489     fi
490     exit 0 ;;
491
492   -host | --host | --hos | --ho)
493     ac_prev=host ;;
494   -host=* | --host=* | --hos=* | --ho=*)
495     host="$ac_optarg" ;;
496
497   -includedir | --includedir | --includedi | --included | --include \
498   | --includ | --inclu | --incl | --inc)
499     ac_prev=includedir ;;
500   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
501   | --includ=* | --inclu=* | --incl=* | --inc=*)
502     includedir="$ac_optarg" ;;
503
504   -infodir | --infodir | --infodi | --infod | --info | --inf)
505     ac_prev=infodir ;;
506   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
507     infodir="$ac_optarg" ;;
508
509   -libdir | --libdir | --libdi | --libd)
510     ac_prev=libdir ;;
511   -libdir=* | --libdir=* | --libdi=* | --libd=*)
512     libdir="$ac_optarg" ;;
513
514   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
515   | --libexe | --libex | --libe)
516     ac_prev=libexecdir ;;
517   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
518   | --libexe=* | --libex=* | --libe=*)
519     libexecdir="$ac_optarg" ;;
520
521   -localstatedir | --localstatedir | --localstatedi | --localstated \
522   | --localstate | --localstat | --localsta | --localst \
523   | --locals | --local | --loca | --loc | --lo)
524     ac_prev=localstatedir ;;
525   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
526   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
527   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
528     localstatedir="$ac_optarg" ;;
529
530   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
531     ac_prev=mandir ;;
532   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
533     mandir="$ac_optarg" ;;
534
535   -nfp | --nfp | --nf)
536     # Obsolete; use --without-fp.
537     with_fp=no ;;
538
539   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
540   | --no-cr | --no-c)
541     no_create=yes ;;
542
543   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
544   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
545     no_recursion=yes ;;
546
547   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
548   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
549   | --oldin | --oldi | --old | --ol | --o)
550     ac_prev=oldincludedir ;;
551   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
552   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
553   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
554     oldincludedir="$ac_optarg" ;;
555
556   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
557     ac_prev=prefix ;;
558   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
559     prefix="$ac_optarg" ;;
560
561   -program-prefix | --program-prefix | --program-prefi | --program-pref \
562   | --program-pre | --program-pr | --program-p)
563     ac_prev=program_prefix ;;
564   -program-prefix=* | --program-prefix=* | --program-prefi=* \
565   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
566     program_prefix="$ac_optarg" ;;
567
568   -program-suffix | --program-suffix | --program-suffi | --program-suff \
569   | --program-suf | --program-su | --program-s)
570     ac_prev=program_suffix ;;
571   -program-suffix=* | --program-suffix=* | --program-suffi=* \
572   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
573     program_suffix="$ac_optarg" ;;
574
575   -program-transform-name | --program-transform-name \
576   | --program-transform-nam | --program-transform-na \
577   | --program-transform-n | --program-transform- \
578   | --program-transform | --program-transfor \
579   | --program-transfo | --program-transf \
580   | --program-trans | --program-tran \
581   | --progr-tra | --program-tr | --program-t)
582     ac_prev=program_transform_name ;;
583   -program-transform-name=* | --program-transform-name=* \
584   | --program-transform-nam=* | --program-transform-na=* \
585   | --program-transform-n=* | --program-transform-=* \
586   | --program-transform=* | --program-transfor=* \
587   | --program-transfo=* | --program-transf=* \
588   | --program-trans=* | --program-tran=* \
589   | --progr-tra=* | --program-tr=* | --program-t=*)
590     program_transform_name="$ac_optarg" ;;
591
592   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
593   | -silent | --silent | --silen | --sile | --sil)
594     silent=yes ;;
595
596   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
597     ac_prev=sbindir ;;
598   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
599   | --sbi=* | --sb=*)
600     sbindir="$ac_optarg" ;;
601
602   -sharedstatedir | --sharedstatedir | --sharedstatedi \
603   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
604   | --sharedst | --shareds | --shared | --share | --shar \
605   | --sha | --sh)
606     ac_prev=sharedstatedir ;;
607   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
608   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
609   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
610   | --sha=* | --sh=*)
611     sharedstatedir="$ac_optarg" ;;
612
613   -site | --site | --sit)
614     ac_prev=site ;;
615   -site=* | --site=* | --sit=*)
616     site="$ac_optarg" ;;
617
618   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
619     ac_prev=srcdir ;;
620   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
621     srcdir="$ac_optarg" ;;
622
623   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
624   | --syscon | --sysco | --sysc | --sys | --sy)
625     ac_prev=sysconfdir ;;
626   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
627   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
628     sysconfdir="$ac_optarg" ;;
629
630   -target | --target | --targe | --targ | --tar | --ta | --t)
631     ac_prev=target ;;
632   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
633     target="$ac_optarg" ;;
634
635   -v | -verbose | --verbose | --verbos | --verbo | --verb)
636     verbose=yes ;;
637
638   -version | --version | --versio | --versi | --vers)
639     echo "configure generated by autoconf version 2.13.1"
640     exit 0 ;;
641
642   -with-* | --with-*)
643     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
644     # Reject names that are not valid shell variable names.
645     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
646       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
647     fi
648     ac_package=`echo $ac_package| sed 's/-/_/g'`
649     case "$ac_option" in
650       *=*) ;;
651       *) ac_optarg=yes ;;
652     esac
653     eval "with_${ac_package}='$ac_optarg'" ;;
654
655   -without-* | --without-*)
656     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
657     # Reject names that are not valid shell variable names.
658     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
659       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
660     fi
661     ac_package=`echo $ac_package| sed 's/-/_/g'`
662     eval "with_${ac_package}=no" ;;
663
664   --x)
665     # Obsolete; use --with-x.
666     with_x=yes ;;
667
668   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
669   | --x-incl | --x-inc | --x-in | --x-i)
670     ac_prev=x_includes ;;
671   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
672   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
673     x_includes="$ac_optarg" ;;
674
675   -x-libraries | --x-libraries | --x-librarie | --x-librari \
676   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
677     ac_prev=x_libraries ;;
678   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
679   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
680     x_libraries="$ac_optarg" ;;
681
682   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
683     ;;
684
685   *)
686     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
687       echo "configure: warning: $ac_option: invalid host type" 1>&2
688     fi
689     if test "x$nonopt" != xNONE; then
690       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
691     fi
692     nonopt="$ac_option"
693     ;;
694
695   esac
696 done
697
698 if test -n "$ac_prev"; then
699   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
700 fi
701
702 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
703
704 # File descriptor usage:
705 # 0 standard input
706 # 1 file creation
707 # 2 errors and warnings
708 # 3 some systems may open it to /dev/tty
709 # 4 used on the Kubota Titan
710 # 6 checking for... messages and results
711 # 5 compiler messages saved in config.log
712 if test "$silent" = yes; then
713   exec 6>/dev/null
714 else
715   exec 6>&1
716 fi
717 exec 5>./config.log
718
719 echo "\
720 This file contains any messages produced by compilers while
721 running configure, to aid debugging if configure makes a mistake.
722 " 1>&5
723
724 # Strip out --no-create and --no-recursion so they do not pile up.
725 # Also quote any args containing shell metacharacters.
726 ac_configure_args=
727 for ac_arg
728 do
729   case "$ac_arg" in
730   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
731   | --no-cr | --no-c) ;;
732   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
733   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
734   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
735   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
736   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
737   esac
738 done
739
740 # NLS nuisances.
741 # Only set these to C if already set.  These must not be set unconditionally
742 # because not all systems understand e.g. LANG=C (notably SCO).
743 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
744 # Non-C LC_CTYPE values break the ctype check.
745 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
746 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
747 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
748 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
749
750 # confdefs.h avoids OS command line length limits that DEFS can exceed.
751 rm -rf conftest* confdefs.h
752 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
753 echo > confdefs.h
754
755 # A filename unique to this package, relative to the directory that
756 # configure is in, which we can look for to find out if srcdir is correct.
757 ac_unique_file=build/version.sh
758
759 # Find the source files, if location was not specified.
760 if test -z "$srcdir"; then
761   ac_srcdir_defaulted=yes
762   # Try the directory containing this script, then its parent.
763   ac_prog=$0
764   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
765   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
766   srcdir=$ac_confdir
767   if test ! -r $srcdir/$ac_unique_file; then
768     srcdir=..
769   fi
770 else
771   ac_srcdir_defaulted=no
772 fi
773 if test ! -r $srcdir/$ac_unique_file; then
774   if test "$ac_srcdir_defaulted" = yes; then
775     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
776   else
777     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
778   fi
779 fi
780 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
781
782 # Prefer explicitly selected file to automatically selected ones.
783 if test -z "$CONFIG_SITE"; then
784   if test "x$prefix" != xNONE; then
785     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
786   else
787     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
788   fi
789 fi
790 for ac_site_file in $CONFIG_SITE; do
791   if test -r "$ac_site_file"; then
792     echo "loading site script $ac_site_file"
793     . "$ac_site_file"
794   fi
795 done
796
797
798 ac_ext=c
799 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
800 ac_cpp='$CPP $CPPFLAGS'
801 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
802 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
803 cross_compiling=$ac_cv_prog_cc_cross
804
805 ac_exeext=
806 ac_objext=o
807 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
808   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
809   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
810     ac_n= ac_c='
811 ' ac_t='        '
812   else
813     ac_n=-n ac_c= ac_t=
814   fi
815 else
816   ac_n= ac_c='\c' ac_t=
817 fi
818
819
820 # set unset (borrowed from autoconf 2.49c)
821 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
822   ol_unset=unset
823 else
824   ol_unset=false
825 fi
826 # unset CDPATH
827 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
828
829 ac_aux_dir=
830 for ac_dir in build $srcdir/build; do
831   if test -f $ac_dir/install-sh; then
832     ac_aux_dir=$ac_dir
833     ac_install_sh="$ac_aux_dir/install-sh -c"
834     break
835   elif test -f $ac_dir/install.sh; then
836     ac_aux_dir=$ac_dir
837     ac_install_sh="$ac_aux_dir/install.sh -c"
838     break
839   elif test -f $ac_dir/shtool; then
840     ac_aux_dir=$ac_dir
841     ac_install_sh="$ac_aux_dir/shtool install -c"
842     break
843   fi
844 done
845 if test -z "$ac_aux_dir"; then
846   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
847 fi
848 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
849 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
850 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
851
852 eval `$ac_aux_dir/version.sh`
853 if test -z "$OL_STRING"; then
854         { echo "configure: error: could not determine version" 1>&2; exit 1; }
855 fi
856
857 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
858         ac_cv_shtool="$ac_aux_dir/shtool"
859 else
860         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
861 fi
862
863 SHTOOL="$ac_cv_shtool"
864
865 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
866 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
867
868 OPENLDAP_CVS=""
869 if test -d $ac_aux_dir/CVS; then
870         OPENLDAP_CVS="(from CVS sources) "
871 fi
872
873 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
874
875
876 echo $ac_n "checking host system type""... $ac_c" 1>&6
877 echo "configure:878: checking host system type" >&5
878 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
879
880 # Make sure we can run config.sub.
881   if $ac_config_sub sun4 >/dev/null 2>&1; then :
882     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
883   fi
884
885   ac_cv_host_alias=$host
886   case "$ac_cv_host_alias" in
887   NONE)
888     case $nonopt in
889     NONE)
890       if ac_cv_host_alias=`$ac_config_guess`; then :
891       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
892       fi ;;
893     *) ac_cv_host_alias=$nonopt ;;
894     esac ;;
895   esac
896
897   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
898   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
899   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
900   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
901 else
902   echo $ac_n "(cached) $ac_c" 1>&6
903 fi
904
905 echo "$ac_t""$ac_cv_host" 1>&6
906
907 host=$ac_cv_host
908 host_alias=$ac_cv_host_alias
909 host_cpu=$ac_cv_host_cpu
910 host_vendor=$ac_cv_host_vendor
911 host_os=$ac_cv_host_os
912
913
914
915
916
917 echo $ac_n "checking target system type""... $ac_c" 1>&6
918 echo "configure:919: checking target system type" >&5
919 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
920
921 # Make sure we can run config.sub.
922   if $ac_config_sub sun4 >/dev/null 2>&1; then :
923     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
924   fi
925
926   ac_cv_target_alias=$target
927   case "$ac_cv_target_alias" in
928   NONE)
929     case $nonopt in
930     NONE)
931       ac_cv_target_alias=$host_alias ;;
932
933     *) ac_cv_target_alias=$nonopt ;;
934     esac ;;
935   esac
936
937   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
938   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
939   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
940   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
941 else
942   echo $ac_n "(cached) $ac_c" 1>&6
943 fi
944
945 echo "$ac_t""$ac_cv_target" 1>&6
946
947 target=$ac_cv_target
948 target_alias=$ac_cv_target_alias
949 target_cpu=$ac_cv_target_cpu
950 target_vendor=$ac_cv_target_vendor
951 target_os=$ac_cv_target_os
952
953
954
955
956
957 echo $ac_n "checking build system type""... $ac_c" 1>&6
958 echo "configure:959: checking build system type" >&5
959 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
960
961 # Make sure we can run config.sub.
962   if $ac_config_sub sun4 >/dev/null 2>&1; then :
963     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
964   fi
965
966   ac_cv_build_alias=$build
967   case "$ac_cv_build_alias" in
968   NONE)
969     case $nonopt in
970     NONE)
971       ac_cv_build_alias=$host_alias ;;
972
973     *) ac_cv_build_alias=$nonopt ;;
974     esac ;;
975   esac
976
977   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
978   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
979   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
980   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
981 else
982   echo $ac_n "(cached) $ac_c" 1>&6
983 fi
984
985 echo "$ac_t""$ac_cv_build" 1>&6
986
987 build=$ac_cv_build
988 build_alias=$ac_cv_build_alias
989 build_cpu=$ac_cv_build_cpu
990 build_vendor=$ac_cv_build_vendor
991 build_os=$ac_cv_build_os
992
993
994
995
996
997 # Do some error checking and defaulting for the host and target type.
998 # The inputs are:
999 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1000 #
1001 # The rules are:
1002 # 1. You are not allowed to specify --host, --target, and nonopt at the
1003 #    same time.
1004 # 2. Host defaults to nonopt.
1005 # 3. If nonopt is not specified, then host defaults to the current host,
1006 #    as determined by config.guess.
1007 # 4. Target and build default to nonopt.
1008 # 5. If nonopt is not specified, then target and build default to host.
1009
1010 # The aliases save the names the user supplied, while $host etc.
1011 # will get canonicalized.
1012 case $host---$target---$nonopt in
1013 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1014 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1015 esac
1016
1017 test "$host_alias" != "$target_alias" &&
1018   test "$program_prefix$program_suffix$program_transform_name" = \
1019     NONENONEs,x,x, &&
1020   program_prefix=${target_alias}-
1021
1022
1023 # Find a good install program.  We prefer a C program (faster),
1024 # so one script is as good as another.  But avoid the broken or
1025 # incompatible versions:
1026 # SysV /etc/install, /usr/sbin/install
1027 # SunOS /usr/etc/install
1028 # IRIX /sbin/install
1029 # AIX /bin/install
1030 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1031 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1032 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1033 # ./install, which can be erroneously created by make from ./install.sh.
1034 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1035 echo "configure:1036: checking for a BSD compatible install" >&5
1036 if test -z "$INSTALL"; then
1037 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1038   echo $ac_n "(cached) $ac_c" 1>&6
1039 else
1040     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1041   for ac_dir in $PATH; do
1042     # Account for people who put trailing slashes in PATH elements.
1043     case "$ac_dir/" in
1044     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1045     *)
1046       # OSF1 and SCO ODT 3.0 have their own names for install.
1047       # Don't use installbsd from OSF since it installs stuff as root
1048       # by default.
1049       for ac_prog in ginstall scoinst install; do
1050         if test -f $ac_dir/$ac_prog; then
1051           if test $ac_prog = install &&
1052             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1053             # AIX install.  It has an incompatible calling convention.
1054             :
1055           elif test $ac_prog = install &&
1056             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1057             # program-specific install script used by HP pwplus--don't use.
1058             :
1059           else
1060             ac_cv_path_install="$ac_dir/$ac_prog -c"
1061             break 2
1062           fi
1063         fi
1064       done
1065       ;;
1066     esac
1067   done
1068   IFS="$ac_save_IFS"
1069
1070 fi
1071   if test "${ac_cv_path_install+set}" = set; then
1072     INSTALL="$ac_cv_path_install"
1073   else
1074     # As a last resort, use the slow shell script.  We don't cache a
1075     # path for INSTALL within a source directory, because that will
1076     # break other packages using the cache if that directory is
1077     # removed, or if the path is relative.
1078     INSTALL="$ac_install_sh"
1079   fi
1080 fi
1081 echo "$ac_t""$INSTALL" 1>&6
1082
1083 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1084 # It thinks the first close brace ends the variable substitution.
1085 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1086
1087 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1088
1089 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1090
1091 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1092 echo "configure:1093: checking whether build environment is sane" >&5
1093 # Just in case
1094 sleep 1
1095 echo timestamp > conftestfile
1096 # Do `set' in a subshell so we don't clobber the current shell's
1097 # arguments.  Must try -L first in case configure is actually a
1098 # symlink; some systems play weird games with the mod time of symlinks
1099 # (eg FreeBSD returns the mod time of the symlink's containing
1100 # directory).
1101 if (
1102    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1103    if test "$*" = "X"; then
1104       # -L didn't work.
1105       set X `ls -t $srcdir/configure conftestfile`
1106    fi
1107    if test "$*" != "X $srcdir/configure conftestfile" \
1108       && test "$*" != "X conftestfile $srcdir/configure"; then
1109
1110       # If neither matched, then we have a broken ls.  This can happen
1111       # if, for instance, CONFIG_SHELL is bash and it inherits a
1112       # broken ls alias from the environment.  This has actually
1113       # happened.  Such a system could not be considered "sane".
1114       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1115 alias in your environment" 1>&2; exit 1; }
1116    fi
1117
1118    test "$2" = conftestfile
1119    )
1120 then
1121    # Ok.
1122    :
1123 else
1124    { echo "configure: error: newly created file is older than distributed files!
1125 Check your system clock" 1>&2; exit 1; }
1126 fi
1127 rm -f conftest*
1128 echo "$ac_t""yes" 1>&6
1129 if test "$program_transform_name" = s,x,x,; then
1130   program_transform_name=
1131 else
1132   # Double any \ or $.  echo might interpret backslashes.
1133   cat <<\EOF_SED > conftestsed
1134 s,\\,\\\\,g; s,\$,$$,g
1135 EOF_SED
1136   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1137   rm -f conftestsed
1138 fi
1139 test "$program_prefix" != NONE &&
1140   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1141 # Use a double $ so make ignores it.
1142 test "$program_suffix" != NONE &&
1143   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1144
1145 # sed with no file args requires a program.
1146 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1147
1148 for ac_prog in mawk gawk nawk awk
1149 do
1150 # Extract the first word of "$ac_prog", so it can be a program name with args.
1151 set dummy $ac_prog; ac_word=$2
1152 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1153 echo "configure:1154: checking for $ac_word" >&5
1154 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1155   echo $ac_n "(cached) $ac_c" 1>&6
1156 else
1157   if test -n "$AWK"; then
1158   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1159 else
1160   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1161   ac_dummy="$PATH"
1162   for ac_dir in $ac_dummy; do
1163     test -z "$ac_dir" && ac_dir=.
1164     if test -f $ac_dir/$ac_word; then
1165       ac_cv_prog_AWK="$ac_prog"
1166       break
1167     fi
1168   done
1169   IFS="$ac_save_ifs"
1170 fi
1171 fi
1172 AWK="$ac_cv_prog_AWK"
1173 if test -n "$AWK"; then
1174   echo "$ac_t""$AWK" 1>&6
1175 else
1176   echo "$ac_t""no" 1>&6
1177 fi
1178
1179 test -n "$AWK" && break
1180 done
1181
1182 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1183 echo "configure:1184: checking whether ${MAKE-make} sets \${MAKE}" >&5
1184 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1185 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1186   echo $ac_n "(cached) $ac_c" 1>&6
1187 else
1188   cat > conftestmake <<\EOF
1189 all:
1190         @echo 'ac_maketemp="${MAKE}"'
1191 EOF
1192 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1193 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1194 if test -n "$ac_maketemp"; then
1195   eval ac_cv_prog_make_${ac_make}_set=yes
1196 else
1197   eval ac_cv_prog_make_${ac_make}_set=no
1198 fi
1199 rm -f conftestmake
1200 fi
1201 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1202   echo "$ac_t""yes" 1>&6
1203   SET_MAKE=
1204 else
1205   echo "$ac_t""no" 1>&6
1206   SET_MAKE="MAKE=${MAKE-make}"
1207 fi
1208
1209
1210
1211 PACKAGE=$OL_PACKAGE
1212
1213 VERSION=$OL_VERSION
1214
1215 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1216   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1217 fi
1218
1219
1220
1221 missing_dir=`cd $ac_aux_dir && pwd`
1222 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1223 echo "configure:1224: checking for working aclocal" >&5
1224 # Run test in a subshell; some versions of sh will print an error if
1225 # an executable is not found, even if stderr is redirected.
1226 # Redirect stdin to placate older versions of autoconf.  Sigh.
1227 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1228    ACLOCAL=aclocal
1229    echo "$ac_t""found" 1>&6
1230 else
1231    ACLOCAL="$missing_dir/missing aclocal"
1232    echo "$ac_t""missing" 1>&6
1233 fi
1234
1235 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1236 echo "configure:1237: checking for working autoconf" >&5
1237 # Run test in a subshell; some versions of sh will print an error if
1238 # an executable is not found, even if stderr is redirected.
1239 # Redirect stdin to placate older versions of autoconf.  Sigh.
1240 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1241    AUTOCONF=autoconf
1242    echo "$ac_t""found" 1>&6
1243 else
1244    AUTOCONF="$missing_dir/missing autoconf"
1245    echo "$ac_t""missing" 1>&6
1246 fi
1247
1248 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1249 echo "configure:1250: checking for working automake" >&5
1250 # Run test in a subshell; some versions of sh will print an error if
1251 # an executable is not found, even if stderr is redirected.
1252 # Redirect stdin to placate older versions of autoconf.  Sigh.
1253 if (automake --version) < /dev/null > /dev/null 2>&1; then
1254    AUTOMAKE=automake
1255    echo "$ac_t""found" 1>&6
1256 else
1257    AUTOMAKE="$missing_dir/missing automake"
1258    echo "$ac_t""missing" 1>&6
1259 fi
1260
1261 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1262 echo "configure:1263: checking for working autoheader" >&5
1263 # Run test in a subshell; some versions of sh will print an error if
1264 # an executable is not found, even if stderr is redirected.
1265 # Redirect stdin to placate older versions of autoconf.  Sigh.
1266 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1267    AUTOHEADER=autoheader
1268    echo "$ac_t""found" 1>&6
1269 else
1270    AUTOHEADER="$missing_dir/missing autoheader"
1271    echo "$ac_t""missing" 1>&6
1272 fi
1273
1274 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1275 echo "configure:1276: checking for working makeinfo" >&5
1276 # Run test in a subshell; some versions of sh will print an error if
1277 # an executable is not found, even if stderr is redirected.
1278 # Redirect stdin to placate older versions of autoconf.  Sigh.
1279 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1280    MAKEINFO=makeinfo
1281    echo "$ac_t""found" 1>&6
1282 else
1283    MAKEINFO="$missing_dir/missing makeinfo"
1284    echo "$ac_t""missing" 1>&6
1285 fi
1286
1287 install_sh="$missing_dir/install-sh"
1288 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1289
1290 for ac_prog in gnutar gtar tar
1291 do
1292 # Extract the first word of "$ac_prog", so it can be a program name with args.
1293 set dummy $ac_prog; ac_word=$2
1294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1295 echo "configure:1296: checking for $ac_word" >&5
1296 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1297   echo $ac_n "(cached) $ac_c" 1>&6
1298 else
1299   if test -n "$AMTAR"; then
1300   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1301 else
1302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1303   ac_dummy="$PATH"
1304   for ac_dir in $ac_dummy; do
1305     test -z "$ac_dir" && ac_dir=.
1306     if test -f $ac_dir/$ac_word; then
1307       ac_cv_prog_AMTAR="$ac_prog"
1308       break
1309     fi
1310   done
1311   IFS="$ac_save_ifs"
1312 fi
1313 fi
1314 AMTAR="$ac_cv_prog_AMTAR"
1315 if test -n "$AMTAR"; then
1316   echo "$ac_t""$AMTAR" 1>&6
1317 else
1318   echo "$ac_t""no" 1>&6
1319 fi
1320
1321 test -n "$AMTAR" && break
1322 done
1323
1324
1325 AMTARFLAGS=
1326 if test -n "$AMTAR"; then
1327   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1328         AMTARFLAGS=o
1329   fi
1330 fi
1331
1332 cat >> confdefs.h <<EOF
1333 #define OPENLDAP_PACKAGE "$PACKAGE"
1334 EOF
1335
1336 cat >> confdefs.h <<EOF
1337 #define OPENLDAP_VERSION "$VERSION"
1338 EOF
1339
1340
1341 cat >> confdefs.h <<EOF
1342 #define LDAP_VENDOR_VERSION $OL_API_INC
1343 EOF
1344
1345 cat >> confdefs.h <<EOF
1346 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1347 EOF
1348
1349 cat >> confdefs.h <<EOF
1350 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1351 EOF
1352
1353 cat >> confdefs.h <<EOF
1354 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1355 EOF
1356
1357
1358 OPENLDAP_LIBVERSION=$OL_API_LIB
1359
1360 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1361
1362
1363
1364 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1365 echo "configure:1366: checking configure arguments" >&5
1366
1367
1368 top_builddir=`pwd`
1369
1370 ldap_subdir="/openldap"
1371
1372 # Check whether --with-subdir or --without-subdir was given.
1373 if test "${with_subdir+set}" = set; then
1374   withval="$with_subdir"
1375   case "$withval" in
1376         no) ldap_subdir=""
1377                 ;;
1378         yes)
1379                 ;;
1380         /*|\\*)
1381                 ldap_subdir="$withval"
1382                 ;;
1383         *)
1384                 ldap_subdir="/$withval"
1385                 ;;
1386 esac
1387
1388 fi
1389
1390
1391 # OpenLDAP --enable-debug
1392         # Check whether --enable-debug or --disable-debug was given.
1393 if test "${enable_debug+set}" = set; then
1394   enableval="$enable_debug"
1395   
1396         ol_arg=invalid
1397         for ol_val in auto yes no ; do
1398                 if test "$enableval" = "$ol_val" ; then
1399                         ol_arg="$ol_val"
1400                 fi
1401         done
1402         if test "$ol_arg" = "invalid" ; then
1403                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1404         fi
1405         ol_enable_debug="$ol_arg"
1406
1407 else
1408         ol_enable_debug="yes"
1409 fi
1410 # end --enable-debug
1411 # OpenLDAP --enable-dynamic
1412         # Check whether --enable-dynamic or --disable-dynamic was given.
1413 if test "${enable_dynamic+set}" = set; then
1414   enableval="$enable_dynamic"
1415   
1416         ol_arg=invalid
1417         for ol_val in auto yes no ; do
1418                 if test "$enableval" = "$ol_val" ; then
1419                         ol_arg="$ol_val"
1420                 fi
1421         done
1422         if test "$ol_arg" = "invalid" ; then
1423                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1424         fi
1425         ol_enable_dynamic="$ol_arg"
1426
1427 else
1428         ol_enable_dynamic="no"
1429 fi
1430 # end --enable-dynamic
1431 # OpenLDAP --enable-syslog
1432         # Check whether --enable-syslog or --disable-syslog was given.
1433 if test "${enable_syslog+set}" = set; then
1434   enableval="$enable_syslog"
1435   
1436         ol_arg=invalid
1437         for ol_val in auto yes no ; do
1438                 if test "$enableval" = "$ol_val" ; then
1439                         ol_arg="$ol_val"
1440                 fi
1441         done
1442         if test "$ol_arg" = "invalid" ; then
1443                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1444         fi
1445         ol_enable_syslog="$ol_arg"
1446
1447 else
1448         ol_enable_syslog="auto"
1449 fi
1450 # end --enable-syslog
1451 # OpenLDAP --enable-proctitle
1452         # Check whether --enable-proctitle or --disable-proctitle was given.
1453 if test "${enable_proctitle+set}" = set; then
1454   enableval="$enable_proctitle"
1455   
1456         ol_arg=invalid
1457         for ol_val in auto yes no ; do
1458                 if test "$enableval" = "$ol_val" ; then
1459                         ol_arg="$ol_val"
1460                 fi
1461         done
1462         if test "$ol_arg" = "invalid" ; then
1463                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1464         fi
1465         ol_enable_proctitle="$ol_arg"
1466
1467 else
1468         ol_enable_proctitle="yes"
1469 fi
1470 # end --enable-proctitle
1471 ol_enable_referrals=${ol_enable_referrals-no}
1472 ol_enable_kbind=${ol_enable_kbind-no}
1473 # OpenLDAP --enable-ipv6
1474         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1475 if test "${enable_ipv6+set}" = set; then
1476   enableval="$enable_ipv6"
1477   
1478         ol_arg=invalid
1479         for ol_val in auto yes no ; do
1480                 if test "$enableval" = "$ol_val" ; then
1481                         ol_arg="$ol_val"
1482                 fi
1483         done
1484         if test "$ol_arg" = "invalid" ; then
1485                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1486         fi
1487         ol_enable_ipv6="$ol_arg"
1488
1489 else
1490         ol_enable_ipv6="auto"
1491 fi
1492 # end --enable-ipv6
1493 # OpenLDAP --enable-local
1494         # Check whether --enable-local or --disable-local was given.
1495 if test "${enable_local+set}" = set; then
1496   enableval="$enable_local"
1497   
1498         ol_arg=invalid
1499         for ol_val in auto yes no ; do
1500                 if test "$enableval" = "$ol_val" ; then
1501                         ol_arg="$ol_val"
1502                 fi
1503         done
1504         if test "$ol_arg" = "invalid" ; then
1505                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1506         fi
1507         ol_enable_local="$ol_arg"
1508
1509 else
1510         ol_enable_local="auto"
1511 fi
1512 # end --enable-local
1513 # OpenLDAP --enable-x_compile
1514         # Check whether --enable-x_compile or --disable-x_compile was given.
1515 if test "${enable_x_compile+set}" = set; then
1516   enableval="$enable_x_compile"
1517   
1518         ol_arg=invalid
1519         for ol_val in yes no ; do
1520                 if test "$enableval" = "$ol_val" ; then
1521                         ol_arg="$ol_val"
1522                 fi
1523         done
1524         if test "$ol_arg" = "invalid" ; then
1525                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1526         fi
1527         ol_enable_x_compile="$ol_arg"
1528
1529 else
1530         ol_enable_x_compile="no"
1531 fi
1532 # end --enable-x_compile
1533
1534
1535 # OpenLDAP --with-cyrus_sasl
1536         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1537 if test "${with_cyrus_sasl+set}" = set; then
1538   withval="$with_cyrus_sasl"
1539   
1540         ol_arg=invalid
1541         for ol_val in auto yes no  ; do
1542                 if test "$withval" = "$ol_val" ; then
1543                         ol_arg="$ol_val"
1544                 fi
1545         done
1546         if test "$ol_arg" = "invalid" ; then
1547                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1548         fi
1549         ol_with_cyrus_sasl="$ol_arg"
1550
1551 else
1552         ol_with_cyrus_sasl="auto"
1553 fi
1554 # end --with-cyrus_sasl
1555
1556 # OpenLDAP --with-fetch
1557         # Check whether --with-fetch or --without-fetch was given.
1558 if test "${with_fetch+set}" = set; then
1559   withval="$with_fetch"
1560   
1561         ol_arg=invalid
1562         for ol_val in auto yes no  ; do
1563                 if test "$withval" = "$ol_val" ; then
1564                         ol_arg="$ol_val"
1565                 fi
1566         done
1567         if test "$ol_arg" = "invalid" ; then
1568                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1569         fi
1570         ol_with_fetch="$ol_arg"
1571
1572 else
1573         ol_with_fetch="auto"
1574 fi
1575 # end --with-fetch
1576
1577 # OpenLDAP --with-kerberos
1578         # Check whether --with-kerberos or --without-kerberos was given.
1579 if test "${with_kerberos+set}" = set; then
1580   withval="$with_kerberos"
1581   
1582         ol_arg=invalid
1583         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1584                 if test "$withval" = "$ol_val" ; then
1585                         ol_arg="$ol_val"
1586                 fi
1587         done
1588         if test "$ol_arg" = "invalid" ; then
1589                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1590         fi
1591         ol_with_kerberos="$ol_arg"
1592
1593 else
1594         ol_with_kerberos="auto"
1595 fi
1596 # end --with-kerberos
1597
1598 # OpenLDAP --with-readline
1599         # Check whether --with-readline or --without-readline was given.
1600 if test "${with_readline+set}" = set; then
1601   withval="$with_readline"
1602   
1603         ol_arg=invalid
1604         for ol_val in auto yes no  ; do
1605                 if test "$withval" = "$ol_val" ; then
1606                         ol_arg="$ol_val"
1607                 fi
1608         done
1609         if test "$ol_arg" = "invalid" ; then
1610                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1611         fi
1612         ol_with_readline="$ol_arg"
1613
1614 else
1615         ol_with_readline="auto"
1616 fi
1617 # end --with-readline
1618
1619 # OpenLDAP --with-threads
1620         # Check whether --with-threads or --without-threads was given.
1621 if test "${with_threads+set}" = set; then
1622   withval="$with_threads"
1623   
1624         ol_arg=invalid
1625         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1626                 if test "$withval" = "$ol_val" ; then
1627                         ol_arg="$ol_val"
1628                 fi
1629         done
1630         if test "$ol_arg" = "invalid" ; then
1631                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1632         fi
1633         ol_with_threads="$ol_arg"
1634
1635 else
1636         ol_with_threads="auto"
1637 fi
1638 # end --with-threads
1639
1640 # OpenLDAP --with-tls
1641         # Check whether --with-tls or --without-tls was given.
1642 if test "${with_tls+set}" = set; then
1643   withval="$with_tls"
1644   
1645         ol_arg=invalid
1646         for ol_val in auto ssleay openssl yes no  ; do
1647                 if test "$withval" = "$ol_val" ; then
1648                         ol_arg="$ol_val"
1649                 fi
1650         done
1651         if test "$ol_arg" = "invalid" ; then
1652                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1653         fi
1654         ol_with_tls="$ol_arg"
1655
1656 else
1657         ol_with_tls="auto"
1658 fi
1659 # end --with-tls
1660
1661 # OpenLDAP --with-yielding_select
1662         # Check whether --with-yielding_select or --without-yielding_select was given.
1663 if test "${with_yielding_select+set}" = set; then
1664   withval="$with_yielding_select"
1665   
1666         ol_arg=invalid
1667         for ol_val in auto yes no manual  ; do
1668                 if test "$withval" = "$ol_val" ; then
1669                         ol_arg="$ol_val"
1670                 fi
1671         done
1672         if test "$ol_arg" = "invalid" ; then
1673                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1674         fi
1675         ol_with_yielding_select="$ol_arg"
1676
1677 else
1678         ol_with_yielding_select="auto"
1679 fi
1680 # end --with-yielding_select
1681
1682
1683
1684 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1685 if test "${with_xxslapdoptions+set}" = set; then
1686   withval="$with_xxslapdoptions"
1687   :
1688 fi
1689
1690 # OpenLDAP --enable-slapd
1691         # Check whether --enable-slapd or --disable-slapd was given.
1692 if test "${enable_slapd+set}" = set; then
1693   enableval="$enable_slapd"
1694   
1695         ol_arg=invalid
1696         for ol_val in auto yes no ; do
1697                 if test "$enableval" = "$ol_val" ; then
1698                         ol_arg="$ol_val"
1699                 fi
1700         done
1701         if test "$ol_arg" = "invalid" ; then
1702                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1703         fi
1704         ol_enable_slapd="$ol_arg"
1705
1706 else
1707         ol_enable_slapd="yes"
1708 fi
1709 # end --enable-slapd
1710 # OpenLDAP --enable-aci
1711         # Check whether --enable-aci or --disable-aci was given.
1712 if test "${enable_aci+set}" = set; then
1713   enableval="$enable_aci"
1714   
1715         ol_arg=invalid
1716         for ol_val in auto yes no ; do
1717                 if test "$enableval" = "$ol_val" ; then
1718                         ol_arg="$ol_val"
1719                 fi
1720         done
1721         if test "$ol_arg" = "invalid" ; then
1722                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1723         fi
1724         ol_enable_aci="$ol_arg"
1725
1726 else
1727         ol_enable_aci="no"
1728 fi
1729 # end --enable-aci
1730 # OpenLDAP --enable-cleartext
1731         # Check whether --enable-cleartext or --disable-cleartext was given.
1732 if test "${enable_cleartext+set}" = set; then
1733   enableval="$enable_cleartext"
1734   
1735         ol_arg=invalid
1736         for ol_val in auto yes no ; do
1737                 if test "$enableval" = "$ol_val" ; then
1738                         ol_arg="$ol_val"
1739                 fi
1740         done
1741         if test "$ol_arg" = "invalid" ; then
1742                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1743         fi
1744         ol_enable_cleartext="$ol_arg"
1745
1746 else
1747         ol_enable_cleartext="yes"
1748 fi
1749 # end --enable-cleartext
1750 # OpenLDAP --enable-crypt
1751         # Check whether --enable-crypt or --disable-crypt was given.
1752 if test "${enable_crypt+set}" = set; then
1753   enableval="$enable_crypt"
1754   
1755         ol_arg=invalid
1756         for ol_val in auto yes no ; do
1757                 if test "$enableval" = "$ol_val" ; then
1758                         ol_arg="$ol_val"
1759                 fi
1760         done
1761         if test "$ol_arg" = "invalid" ; then
1762                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1763         fi
1764         ol_enable_crypt="$ol_arg"
1765
1766 else
1767         ol_enable_crypt="no"
1768 fi
1769 # end --enable-crypt
1770 # OpenLDAP --enable-kpasswd
1771         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1772 if test "${enable_kpasswd+set}" = set; then
1773   enableval="$enable_kpasswd"
1774   
1775         ol_arg=invalid
1776         for ol_val in auto yes no ; do
1777                 if test "$enableval" = "$ol_val" ; then
1778                         ol_arg="$ol_val"
1779                 fi
1780         done
1781         if test "$ol_arg" = "invalid" ; then
1782                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1783         fi
1784         ol_enable_kpasswd="$ol_arg"
1785
1786 else
1787         ol_enable_kpasswd="no"
1788 fi
1789 # end --enable-kpasswd
1790 # OpenLDAP --enable-lmpasswd
1791         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1792 if test "${enable_lmpasswd+set}" = set; then
1793   enableval="$enable_lmpasswd"
1794   
1795         ol_arg=invalid
1796         for ol_val in auto yes no ; do
1797                 if test "$enableval" = "$ol_val" ; then
1798                         ol_arg="$ol_val"
1799                 fi
1800         done
1801         if test "$ol_arg" = "invalid" ; then
1802                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1803         fi
1804         ol_enable_lmpasswd="$ol_arg"
1805
1806 else
1807         ol_enable_lmpasswd="no"
1808 fi
1809 # end --enable-lmpasswd
1810 # OpenLDAP --enable-spasswd
1811         # Check whether --enable-spasswd or --disable-spasswd was given.
1812 if test "${enable_spasswd+set}" = set; then
1813   enableval="$enable_spasswd"
1814   
1815         ol_arg=invalid
1816         for ol_val in auto yes no ; do
1817                 if test "$enableval" = "$ol_val" ; then
1818                         ol_arg="$ol_val"
1819                 fi
1820         done
1821         if test "$ol_arg" = "invalid" ; then
1822                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1823         fi
1824         ol_enable_spasswd="$ol_arg"
1825
1826 else
1827         ol_enable_spasswd="no"
1828 fi
1829 # end --enable-spasswd
1830 # OpenLDAP --enable-modules
1831         # Check whether --enable-modules or --disable-modules was given.
1832 if test "${enable_modules+set}" = set; then
1833   enableval="$enable_modules"
1834   
1835         ol_arg=invalid
1836         for ol_val in auto yes no ; do
1837                 if test "$enableval" = "$ol_val" ; then
1838                         ol_arg="$ol_val"
1839                 fi
1840         done
1841         if test "$ol_arg" = "invalid" ; then
1842                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1843         fi
1844         ol_enable_modules="$ol_arg"
1845
1846 else
1847         ol_enable_modules="no"
1848 fi
1849 # end --enable-modules
1850 ol_enable_multimaster=${ol_enable_multimaster-no}
1851 # OpenLDAP --enable-phonetic
1852         # Check whether --enable-phonetic or --disable-phonetic was given.
1853 if test "${enable_phonetic+set}" = set; then
1854   enableval="$enable_phonetic"
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-phonetic" 1>&2; exit 1; }
1864         fi
1865         ol_enable_phonetic="$ol_arg"
1866
1867 else
1868         ol_enable_phonetic="no"
1869 fi
1870 # end --enable-phonetic
1871 # OpenLDAP --enable-rewrite
1872         # Check whether --enable-rewrite or --disable-rewrite was given.
1873 if test "${enable_rewrite+set}" = set; then
1874   enableval="$enable_rewrite"
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-rewrite" 1>&2; exit 1; }
1884         fi
1885         ol_enable_rewrite="$ol_arg"
1886
1887 else
1888         ol_enable_rewrite="no"
1889 fi
1890 # end --enable-rewrite
1891 # OpenLDAP --enable-rlookups
1892         # Check whether --enable-rlookups or --disable-rlookups was given.
1893 if test "${enable_rlookups+set}" = set; then
1894   enableval="$enable_rlookups"
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-rlookups" 1>&2; exit 1; }
1904         fi
1905         ol_enable_rlookups="$ol_arg"
1906
1907 else
1908         ol_enable_rlookups="no"
1909 fi
1910 # end --enable-rlookups
1911 # OpenLDAP --enable-slp
1912         # Check whether --enable-slp or --disable-slp was given.
1913 if test "${enable_slp+set}" = set; then
1914   enableval="$enable_slp"
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-slp" 1>&2; exit 1; }
1924         fi
1925         ol_enable_slp="$ol_arg"
1926
1927 else
1928         ol_enable_slp="no"
1929 fi
1930 # end --enable-slp
1931 # OpenLDAP --enable-wrappers
1932         # Check whether --enable-wrappers or --disable-wrappers was given.
1933 if test "${enable_wrappers+set}" = set; then
1934   enableval="$enable_wrappers"
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-wrappers" 1>&2; exit 1; }
1944         fi
1945         ol_enable_wrappers="$ol_arg"
1946
1947 else
1948         ol_enable_wrappers="no"
1949 fi
1950 # end --enable-wrappers
1951
1952 # OpenLDAP --enable-bdb
1953         # Check whether --enable-bdb or --disable-bdb was given.
1954 if test "${enable_bdb+set}" = set; then
1955   enableval="$enable_bdb"
1956   
1957         ol_arg=invalid
1958         for ol_val in auto yes no ; do
1959                 if test "$enableval" = "$ol_val" ; then
1960                         ol_arg="$ol_val"
1961                 fi
1962         done
1963         if test "$ol_arg" = "invalid" ; then
1964                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1965         fi
1966         ol_enable_bdb="$ol_arg"
1967
1968 else
1969         ol_enable_bdb="yes"
1970 fi
1971 # end --enable-bdb
1972 # OpenLDAP --with-bdb_module
1973         # Check whether --with-bdb_module or --without-bdb_module was given.
1974 if test "${with_bdb_module+set}" = set; then
1975   withval="$with_bdb_module"
1976   
1977         ol_arg=invalid
1978         for ol_val in static dynamic ; do
1979                 if test "$withval" = "$ol_val" ; then
1980                         ol_arg="$ol_val"
1981                 fi
1982         done
1983         if test "$ol_arg" = "invalid" ; then
1984                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1985         fi
1986         ol_with_bdb_module="$ol_arg"
1987
1988 else
1989         ol_with_bdb_module="static"
1990 fi
1991 # end --with-bdb_module
1992
1993 # OpenLDAP --enable-dnssrv
1994         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1995 if test "${enable_dnssrv+set}" = set; then
1996   enableval="$enable_dnssrv"
1997   
1998         ol_arg=invalid
1999         for ol_val in auto yes no ; do
2000                 if test "$enableval" = "$ol_val" ; then
2001                         ol_arg="$ol_val"
2002                 fi
2003         done
2004         if test "$ol_arg" = "invalid" ; then
2005                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2006         fi
2007         ol_enable_dnssrv="$ol_arg"
2008
2009 else
2010         ol_enable_dnssrv="no"
2011 fi
2012 # end --enable-dnssrv
2013 # OpenLDAP --with-dnssrv_module
2014         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2015 if test "${with_dnssrv_module+set}" = set; then
2016   withval="$with_dnssrv_module"
2017   
2018         ol_arg=invalid
2019         for ol_val in static dynamic ; do
2020                 if test "$withval" = "$ol_val" ; then
2021                         ol_arg="$ol_val"
2022                 fi
2023         done
2024         if test "$ol_arg" = "invalid" ; then
2025                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2026         fi
2027         ol_with_dnssrv_module="$ol_arg"
2028
2029 else
2030         ol_with_dnssrv_module="static"
2031 fi
2032 # end --with-dnssrv_module
2033
2034 # OpenLDAP --enable-ldap
2035         # Check whether --enable-ldap or --disable-ldap was given.
2036 if test "${enable_ldap+set}" = set; then
2037   enableval="$enable_ldap"
2038   
2039         ol_arg=invalid
2040         for ol_val in auto yes no ; do
2041                 if test "$enableval" = "$ol_val" ; then
2042                         ol_arg="$ol_val"
2043                 fi
2044         done
2045         if test "$ol_arg" = "invalid" ; then
2046                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2047         fi
2048         ol_enable_ldap="$ol_arg"
2049
2050 else
2051         ol_enable_ldap="no"
2052 fi
2053 # end --enable-ldap
2054 # OpenLDAP --with-ldap_module
2055         # Check whether --with-ldap_module or --without-ldap_module was given.
2056 if test "${with_ldap_module+set}" = set; then
2057   withval="$with_ldap_module"
2058   
2059         ol_arg=invalid
2060         for ol_val in static dynamic ; do
2061                 if test "$withval" = "$ol_val" ; then
2062                         ol_arg="$ol_val"
2063                 fi
2064         done
2065         if test "$ol_arg" = "invalid" ; then
2066                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2067         fi
2068         ol_with_ldap_module="$ol_arg"
2069
2070 else
2071         ol_with_ldap_module="static"
2072 fi
2073 # end --with-ldap_module
2074
2075 # OpenLDAP --enable-ldbm
2076         # Check whether --enable-ldbm or --disable-ldbm was given.
2077 if test "${enable_ldbm+set}" = set; then
2078   enableval="$enable_ldbm"
2079   
2080         ol_arg=invalid
2081         for ol_val in auto yes no ; do
2082                 if test "$enableval" = "$ol_val" ; then
2083                         ol_arg="$ol_val"
2084                 fi
2085         done
2086         if test "$ol_arg" = "invalid" ; then
2087                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2088         fi
2089         ol_enable_ldbm="$ol_arg"
2090
2091 else
2092         ol_enable_ldbm="no"
2093 fi
2094 # end --enable-ldbm
2095 # OpenLDAP --with-ldbm_api
2096         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2097 if test "${with_ldbm_api+set}" = set; then
2098   withval="$with_ldbm_api"
2099   
2100         ol_arg=invalid
2101         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2102                 if test "$withval" = "$ol_val" ; then
2103                         ol_arg="$ol_val"
2104                 fi
2105         done
2106         if test "$ol_arg" = "invalid" ; then
2107                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2108         fi
2109         ol_with_ldbm_api="$ol_arg"
2110
2111 else
2112         ol_with_ldbm_api="auto"
2113 fi
2114 # end --with-ldbm_api
2115
2116 # OpenLDAP --with-ldbm_module
2117         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2118 if test "${with_ldbm_module+set}" = set; then
2119   withval="$with_ldbm_module"
2120   
2121         ol_arg=invalid
2122         for ol_val in static dynamic ; do
2123                 if test "$withval" = "$ol_val" ; then
2124                         ol_arg="$ol_val"
2125                 fi
2126         done
2127         if test "$ol_arg" = "invalid" ; then
2128                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2129         fi
2130         ol_with_ldbm_module="$ol_arg"
2131
2132 else
2133         ol_with_ldbm_module="static"
2134 fi
2135 # end --with-ldbm_module
2136
2137 # OpenLDAP --with-ldbm_type
2138         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2139 if test "${with_ldbm_type+set}" = set; then
2140   withval="$with_ldbm_type"
2141   
2142         ol_arg=invalid
2143         for ol_val in auto btree hash ; do
2144                 if test "$withval" = "$ol_val" ; then
2145                         ol_arg="$ol_val"
2146                 fi
2147         done
2148         if test "$ol_arg" = "invalid" ; then
2149                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2150         fi
2151         ol_with_ldbm_type="$ol_arg"
2152
2153 else
2154         ol_with_ldbm_type="auto"
2155 fi
2156 # end --with-ldbm_type
2157
2158 # OpenLDAP --enable-meta
2159         # Check whether --enable-meta or --disable-meta was given.
2160 if test "${enable_meta+set}" = set; then
2161   enableval="$enable_meta"
2162   
2163         ol_arg=invalid
2164         for ol_val in auto yes no ; do
2165                 if test "$enableval" = "$ol_val" ; then
2166                         ol_arg="$ol_val"
2167                 fi
2168         done
2169         if test "$ol_arg" = "invalid" ; then
2170                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2171         fi
2172         ol_enable_meta="$ol_arg"
2173
2174 else
2175         ol_enable_meta="no"
2176 fi
2177 # end --enable-meta
2178 # OpenLDAP --with-meta_module
2179         # Check whether --with-meta_module or --without-meta_module was given.
2180 if test "${with_meta_module+set}" = set; then
2181   withval="$with_meta_module"
2182   
2183         ol_arg=invalid
2184         for ol_val in static dynamic ; do
2185                 if test "$withval" = "$ol_val" ; then
2186                         ol_arg="$ol_val"
2187                 fi
2188         done
2189         if test "$ol_arg" = "invalid" ; then
2190                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2191         fi
2192         ol_with_meta_module="$ol_arg"
2193
2194 else
2195         ol_with_meta_module="static"
2196 fi
2197 # end --with-meta_module
2198
2199 # OpenLDAP --enable-monitor
2200         # Check whether --enable-monitor or --disable-monitor was given.
2201 if test "${enable_monitor+set}" = set; then
2202   enableval="$enable_monitor"
2203   
2204         ol_arg=invalid
2205         for ol_val in auto yes no ; do
2206                 if test "$enableval" = "$ol_val" ; then
2207                         ol_arg="$ol_val"
2208                 fi
2209         done
2210         if test "$ol_arg" = "invalid" ; then
2211                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2212         fi
2213         ol_enable_monitor="$ol_arg"
2214
2215 else
2216         ol_enable_monitor="no"
2217 fi
2218 # end --enable-monitor
2219 # OpenLDAP --with-monitor_module
2220         # Check whether --with-monitor_module or --without-monitor_module was given.
2221 if test "${with_monitor_module+set}" = set; then
2222   withval="$with_monitor_module"
2223   
2224         ol_arg=invalid
2225         for ol_val in static dynamic ; do
2226                 if test "$withval" = "$ol_val" ; then
2227                         ol_arg="$ol_val"
2228                 fi
2229         done
2230         if test "$ol_arg" = "invalid" ; then
2231                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2232         fi
2233         ol_with_monitor_module="$ol_arg"
2234
2235 else
2236         ol_with_monitor_module="static"
2237 fi
2238 # end --with-monitor_module
2239
2240 # OpenLDAP --enable-null
2241         # Check whether --enable-null or --disable-null was given.
2242 if test "${enable_null+set}" = set; then
2243   enableval="$enable_null"
2244   
2245         ol_arg=invalid
2246         for ol_val in auto yes no ; do
2247                 if test "$enableval" = "$ol_val" ; then
2248                         ol_arg="$ol_val"
2249                 fi
2250         done
2251         if test "$ol_arg" = "invalid" ; then
2252                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2253         fi
2254         ol_enable_null="$ol_arg"
2255
2256 else
2257         ol_enable_null="no"
2258 fi
2259 # end --enable-null
2260 # OpenLDAP --with-null_module
2261         # Check whether --with-null_module or --without-null_module was given.
2262 if test "${with_null_module+set}" = set; then
2263   withval="$with_null_module"
2264   
2265         ol_arg=invalid
2266         for ol_val in static dynamic ; do
2267                 if test "$withval" = "$ol_val" ; then
2268                         ol_arg="$ol_val"
2269                 fi
2270         done
2271         if test "$ol_arg" = "invalid" ; then
2272                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2273         fi
2274         ol_with_null_module="$ol_arg"
2275
2276 else
2277         ol_with_null_module="static"
2278 fi
2279 # end --with-null_module
2280
2281 # OpenLDAP --enable-passwd
2282         # Check whether --enable-passwd or --disable-passwd was given.
2283 if test "${enable_passwd+set}" = set; then
2284   enableval="$enable_passwd"
2285   
2286         ol_arg=invalid
2287         for ol_val in auto yes no ; do
2288                 if test "$enableval" = "$ol_val" ; then
2289                         ol_arg="$ol_val"
2290                 fi
2291         done
2292         if test "$ol_arg" = "invalid" ; then
2293                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2294         fi
2295         ol_enable_passwd="$ol_arg"
2296
2297 else
2298         ol_enable_passwd="no"
2299 fi
2300 # end --enable-passwd
2301 # OpenLDAP --with-passwd_module
2302         # Check whether --with-passwd_module or --without-passwd_module was given.
2303 if test "${with_passwd_module+set}" = set; then
2304   withval="$with_passwd_module"
2305   
2306         ol_arg=invalid
2307         for ol_val in static dynamic ; do
2308                 if test "$withval" = "$ol_val" ; then
2309                         ol_arg="$ol_val"
2310                 fi
2311         done
2312         if test "$ol_arg" = "invalid" ; then
2313                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2314         fi
2315         ol_with_passwd_module="$ol_arg"
2316
2317 else
2318         ol_with_passwd_module="static"
2319 fi
2320 # end --with-passwd_module
2321
2322 # OpenLDAP --enable-perl
2323         # Check whether --enable-perl or --disable-perl was given.
2324 if test "${enable_perl+set}" = set; then
2325   enableval="$enable_perl"
2326   
2327         ol_arg=invalid
2328         for ol_val in auto yes no ; do
2329                 if test "$enableval" = "$ol_val" ; then
2330                         ol_arg="$ol_val"
2331                 fi
2332         done
2333         if test "$ol_arg" = "invalid" ; then
2334                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2335         fi
2336         ol_enable_perl="$ol_arg"
2337
2338 else
2339         ol_enable_perl="no"
2340 fi
2341 # end --enable-perl
2342 # OpenLDAP --with-perl_module
2343         # Check whether --with-perl_module or --without-perl_module was given.
2344 if test "${with_perl_module+set}" = set; then
2345   withval="$with_perl_module"
2346   
2347         ol_arg=invalid
2348         for ol_val in static dynamic ; do
2349                 if test "$withval" = "$ol_val" ; then
2350                         ol_arg="$ol_val"
2351                 fi
2352         done
2353         if test "$ol_arg" = "invalid" ; then
2354                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2355         fi
2356         ol_with_perl_module="$ol_arg"
2357
2358 else
2359         ol_with_perl_module="static"
2360 fi
2361 # end --with-perl_module
2362
2363 # OpenLDAP --enable-shell
2364         # Check whether --enable-shell or --disable-shell was given.
2365 if test "${enable_shell+set}" = set; then
2366   enableval="$enable_shell"
2367   
2368         ol_arg=invalid
2369         for ol_val in auto yes no ; do
2370                 if test "$enableval" = "$ol_val" ; then
2371                         ol_arg="$ol_val"
2372                 fi
2373         done
2374         if test "$ol_arg" = "invalid" ; then
2375                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2376         fi
2377         ol_enable_shell="$ol_arg"
2378
2379 else
2380         ol_enable_shell="no"
2381 fi
2382 # end --enable-shell
2383 # OpenLDAP --with-shell_module
2384         # Check whether --with-shell_module or --without-shell_module was given.
2385 if test "${with_shell_module+set}" = set; then
2386   withval="$with_shell_module"
2387   
2388         ol_arg=invalid
2389         for ol_val in static dynamic ; do
2390                 if test "$withval" = "$ol_val" ; then
2391                         ol_arg="$ol_val"
2392                 fi
2393         done
2394         if test "$ol_arg" = "invalid" ; then
2395                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2396         fi
2397         ol_with_shell_module="$ol_arg"
2398
2399 else
2400         ol_with_shell_module="static"
2401 fi
2402 # end --with-shell_module
2403
2404 # OpenLDAP --enable-sql
2405         # Check whether --enable-sql or --disable-sql was given.
2406 if test "${enable_sql+set}" = set; then
2407   enableval="$enable_sql"
2408   
2409         ol_arg=invalid
2410         for ol_val in auto yes no ; do
2411                 if test "$enableval" = "$ol_val" ; then
2412                         ol_arg="$ol_val"
2413                 fi
2414         done
2415         if test "$ol_arg" = "invalid" ; then
2416                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2417         fi
2418         ol_enable_sql="$ol_arg"
2419
2420 else
2421         ol_enable_sql="no"
2422 fi
2423 # end --enable-sql
2424 # OpenLDAP --with-sql_module
2425         # Check whether --with-sql_module or --without-sql_module was given.
2426 if test "${with_sql_module+set}" = set; then
2427   withval="$with_sql_module"
2428   
2429         ol_arg=invalid
2430         for ol_val in static dynamic ; do
2431                 if test "$withval" = "$ol_val" ; then
2432                         ol_arg="$ol_val"
2433                 fi
2434         done
2435         if test "$ol_arg" = "invalid" ; then
2436                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2437         fi
2438         ol_with_sql_module="$ol_arg"
2439
2440 else
2441         ol_with_sql_module="static"
2442 fi
2443 # end --with-sql_module
2444
2445
2446 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2447 if test "${with_xxslurpdoptions+set}" = set; then
2448   withval="$with_xxslurpdoptions"
2449   :
2450 fi
2451
2452 # OpenLDAP --enable-slurpd
2453         # Check whether --enable-slurpd or --disable-slurpd was given.
2454 if test "${enable_slurpd+set}" = set; then
2455   enableval="$enable_slurpd"
2456   
2457         ol_arg=invalid
2458         for ol_val in auto yes no ; do
2459                 if test "$enableval" = "$ol_val" ; then
2460                         ol_arg="$ol_val"
2461                 fi
2462         done
2463         if test "$ol_arg" = "invalid" ; then
2464                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2465         fi
2466         ol_enable_slurpd="$ol_arg"
2467
2468 else
2469         ol_enable_slurpd="auto"
2470 fi
2471 # end --enable-slurpd
2472
2473 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2474 if test "${with_xxliboptions+set}" = set; then
2475   withval="$with_xxliboptions"
2476   :
2477 fi
2478
2479 # Check whether --enable-static or --disable-static was given.
2480 if test "${enable_static+set}" = set; then
2481   enableval="$enable_static"
2482   p=${PACKAGE-default}
2483 case $enableval in
2484 yes) enable_static=yes ;;
2485 no) enable_static=no ;;
2486 *)
2487   enable_static=no
2488   # Look at the argument we got.  We use all the common list separators.
2489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2490   for pkg in $enableval; do
2491     if test "X$pkg" = "X$p"; then
2492       enable_static=yes
2493     fi
2494   done
2495   IFS="$ac_save_ifs"
2496   ;;
2497 esac
2498 else
2499   enable_static=yes
2500 fi
2501
2502 # Check whether --enable-shared or --disable-shared was given.
2503 if test "${enable_shared+set}" = set; then
2504   enableval="$enable_shared"
2505   p=${PACKAGE-default}
2506 case $enableval in
2507 yes) enable_shared=yes ;;
2508 no) enable_shared=no ;;
2509 *)
2510   enable_shared=no
2511   # Look at the argument we got.  We use all the common list separators.
2512   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2513   for pkg in $enableval; do
2514     if test "X$pkg" = "X$p"; then
2515       enable_shared=yes
2516     fi
2517   done
2518   IFS="$ac_save_ifs"
2519   ;;
2520 esac
2521 else
2522   enable_shared=yes
2523 fi
2524
2525
2526
2527 # validate options
2528 if test $ol_enable_slapd = no ; then
2529                 if test $ol_enable_bdb = yes ; then
2530                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2531         fi
2532         if test $ol_enable_dnssrv = yes ; then
2533                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2534         fi
2535         if test $ol_enable_ldap = yes ; then
2536                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2537         fi
2538         if test $ol_enable_ldbm = yes ; then
2539                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2540         fi
2541         if test $ol_enable_meta = yes ; then
2542                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2543         fi
2544         if test $ol_enable_monitor = yes ; then
2545                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2546         fi
2547         if test $ol_enable_null = yes ; then
2548                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2549         fi
2550         if test $ol_enable_passwd = yes ; then
2551                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2552         fi
2553         if test $ol_enable_perl = yes ; then
2554                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2555         fi
2556         if test $ol_enable_shell = yes ; then
2557                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2558         fi
2559         if test $ol_enable_sql = yes ; then
2560                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2561         fi
2562         if test $ol_enable_modules = yes ; then
2563                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2564         fi
2565         if test $ol_enable_multimaster = yes ; then
2566                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2567         fi
2568         if test $ol_enable_wrappers = yes ; then
2569                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2570         fi
2571         if test $ol_enable_phonetic = yes ; then
2572                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2573         fi
2574         if test $ol_enable_rlookups = yes ; then
2575                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2576         fi
2577         if test $ol_enable_aci = yes ; then
2578                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2579         fi
2580         if test $ol_with_ldbm_api != auto ; then
2581                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2582         fi
2583         if test $ol_with_ldbm_type != auto ; then
2584                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2585         fi
2586         if test $ol_with_bdb_module != static ; then
2587                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2588         fi
2589         if test $ol_with_dnssrv_module != static ; then
2590                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2591         fi
2592         if test $ol_with_ldap_module != static ; then
2593                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2594         fi
2595         if test $ol_with_ldbm_module != static ; then
2596                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2597         fi
2598         if test $ol_with_meta_module != static ; then
2599                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2600         fi
2601         if test $ol_with_monitor_module != static ; then
2602                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2603         fi
2604         if test $ol_with_null_module != static ; then
2605                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2606         fi
2607         if test $ol_with_passwd_module != static ; then
2608                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2609         fi
2610         if test $ol_with_perl_module != static ; then
2611                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2612         fi
2613         if test $ol_with_shell_module != static ; then
2614                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2615         fi
2616         if test $ol_with_sql_module != static ; then
2617                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2618         fi
2619         if test $ol_enable_slurpd = yes ; then
2620                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2621         fi
2622         if test $ol_enable_rewrite = yes ; then
2623                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2624         fi
2625
2626         # force settings to no
2627         ol_enable_bdb=no
2628         ol_enable_dnssrv=no
2629         ol_enable_ldap=no
2630         ol_enable_ldbm=no
2631         ol_enable_meta=no
2632         ol_enable_monitor=no
2633         ol_enable_null=no
2634         ol_enable_passwd=no
2635         ol_enable_perl=no
2636         ol_enable_shell=no
2637         ol_enable_sql=no
2638
2639         ol_enable_modules=no
2640         ol_enable_multimaster=no
2641         ol_enable_phonetic=no
2642         ol_enable_rlookups=no
2643         ol_enable_aci=no
2644         ol_enable_wrappers=no
2645         ol_enable_dynamic=no
2646
2647         ol_with_ldbm_api=no
2648         ol_with_ldbm_type=no
2649
2650         ol_with_bdb_module=static
2651         ol_with_dnssrv_module=static
2652         ol_with_ldap_module=static
2653         ol_with_ldbm_module=static
2654         ol_with_meta_module=static
2655         ol_with_monitor_module=static
2656         ol_with_null_module=static
2657         ol_with_passwd_module=static
2658         ol_with_perl_module=static
2659         ol_with_shell_module=static
2660         ol_with_sql_module=static
2661
2662         ol_enable_slurpd=no
2663
2664         ol_enable_rewrite=no
2665
2666 elif test $ol_enable_ldbm = no ; then
2667         
2668         if test $ol_with_ldbm_api != auto ; then
2669                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2670         fi
2671
2672         if test $ol_with_ldbm_type != auto ; then
2673                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2674         fi
2675
2676         if test $ol_with_ldbm_module != static ; then
2677                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2678         fi
2679
2680         if test $ol_enable_modules != yes -a \
2681                 $ol_enable_bdb = no -a \
2682                 $ol_enable_dnssrv = no -a \
2683                 $ol_enable_ldap = no -a \
2684                 $ol_enable_meta = no -a \
2685                 $ol_enable_monitor = no -a \
2686                 $ol_enable_null = no -a \
2687                 $ol_enable_passwd = no -a \
2688                 $ol_enable_perl = no -a \
2689                 $ol_enable_shell = no -a \
2690                 $ol_enable_sql = no ; then
2691
2692                 if test $ol_enable_slapd = yes ; then
2693                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2694                 else
2695                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2696                         ol_enable_slapd=no
2697                 fi
2698         fi
2699
2700         ol_with_ldbm_api=no
2701         ol_with_ldbm_type=no
2702         ol_with_ldbm_module=static
2703
2704         if test $ol_enable_bdb != no ; then
2705                 ol_with_ldbm_api=berkeley
2706         fi
2707
2708 else
2709                 if test $ol_with_ldbm_api = gdbm -a \
2710                 $ol_with_ldbm_type = btree ; then
2711                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2712         fi
2713         if test $ol_with_ldbm_api = mdbm -a \
2714                 $ol_with_ldbm_type = btree ; then
2715                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2716         fi
2717         if test $ol_with_ldbm_api = ndbm -a \
2718                 $ol_with_ldbm_type = btree ; then
2719                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2720         fi
2721
2722         if test $ol_enable_bdb = yes ; then
2723                 if test $ol_with_ldbm_api = auto ; then
2724                         ol_with_ldbm_api=berkeley
2725                 elif test $ol_with_ldbm_api != berkeley ; then
2726                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2727                 fi
2728
2729         elif test $ol_enable_bdb = auto ; then
2730                 if test $ol_with_ldbm_api != berkeley \
2731                         -o $ol_with_ldbm_api != auto ; then
2732                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2733                         ol_enable_bdb=no
2734                 fi
2735         fi
2736 fi
2737
2738 if test $ol_enable_slurpd = yes ; then
2739                 if test $ol_with_threads = no ; then
2740                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2741         fi
2742 fi
2743
2744 if test $ol_enable_lmpasswd = yes ; then
2745         if test $ol_with_tls = no ; then
2746                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2747         fi
2748 fi
2749
2750 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2751         if test $ol_with_kerberos = no ; then
2752                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2753         elif test $ol_with_kerberos = auto ; then
2754                 ol_with_kerberos=yes
2755         fi
2756
2757 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2758         if test $ol_with_kerberos = auto ; then
2759                 ol_with_kerberos=no
2760         elif test $ol_with_kerberos != no ; then
2761                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2762                 ol_with_kerberos=no
2763         fi
2764 fi
2765
2766 if test $ol_enable_spasswd = yes ; then
2767         if test $ol_with_cyrus_sasl = no ; then
2768                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2769         fi
2770         ol_with_cyrus_sasl=yes
2771 fi
2772
2773 echo "$ac_t""done" 1>&6
2774
2775 LDAP_LIBS=
2776 LDIF_LIBS=
2777 LDBM_LIBS=
2778 LTHREAD_LIBS=
2779 LUTIL_LIBS=
2780
2781 SLAPD_LIBS=
2782 SLURPD_LIBS=
2783
2784 BUILD_SLAPD=no
2785 BUILD_SLURPD=no
2786
2787 BUILD_THREAD=no
2788
2789 BUILD_BDB=no
2790 BUILD_DNSSRV=no
2791 BUILD_LDAP=no
2792 BUILD_LDBM=no
2793 BUILD_META=no
2794 BUILD_MONITOR=no
2795 BUILD_NULL=no
2796 BUILD_PASSWD=no
2797 BUILD_PERL=no
2798 BUILD_SHELL=no
2799 BUILD_SQL=no
2800
2801 BUILD_BDB_DYNAMIC=static
2802 BUILD_DNSSRV_DYNAMIC=static
2803 BUILD_LDAP_DYNAMIC=static
2804 BUILD_LDBM_DYNAMIC=static
2805 BUILD_META_DYNAMIC=static
2806 BUILD_MONITOR_DYNAMIC=static
2807 BUILD_NULL_DYNAMIC=static
2808 BUILD_PASSWD_DYNAMIC=static
2809 BUILD_PERL_DYNAMIC=static
2810 BUILD_SHELL_DYNAMIC=static
2811 BUILD_SQL_DYNAMIC=static
2812
2813 SLAPD_MODULES_LDFLAGS=
2814 SLAPD_MODULES_CPPFLAGS=
2815
2816 SLAPD_STATIC_BACKENDS=
2817 SLAPD_DYNAMIC_BACKENDS=
2818
2819 SLAPD_PERL_LDFLAGS=
2820 MOD_PERL_LDFLAGS=
2821 PERL_CPPFLAGS=
2822
2823 SLAPD_SQL_LDFLAGS=
2824 SLAPD_SQL_LIBS=
2825 SLAPD_SQL_INCLUDES=
2826
2827 KRB4_LIBS=
2828 KRB5_LIBS=
2829 READLINE_LIBS=
2830 SASL_LIBS=
2831 TERMCAP_LIBS=
2832 TLS_LIBS=
2833 MODULES_LIBS=
2834 AUTH_LIBS=
2835
2836 SLAPD_SLP_LIBS=
2837
2838
2839 # Find a good install program.  We prefer a C program (faster),
2840 # so one script is as good as another.  But avoid the broken or
2841 # incompatible versions:
2842 # SysV /etc/install, /usr/sbin/install
2843 # SunOS /usr/etc/install
2844 # IRIX /sbin/install
2845 # AIX /bin/install
2846 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2847 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2848 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2849 # ./install, which can be erroneously created by make from ./install.sh.
2850 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2851 echo "configure:2852: checking for a BSD compatible install" >&5
2852 if test -z "$INSTALL"; then
2853 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2854   echo $ac_n "(cached) $ac_c" 1>&6
2855 else
2856     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2857   for ac_dir in $PATH; do
2858     # Account for people who put trailing slashes in PATH elements.
2859     case "$ac_dir/" in
2860     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2861     *)
2862       # OSF1 and SCO ODT 3.0 have their own names for install.
2863       # Don't use installbsd from OSF since it installs stuff as root
2864       # by default.
2865       for ac_prog in ginstall scoinst install; do
2866         if test -f $ac_dir/$ac_prog; then
2867           if test $ac_prog = install &&
2868             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2869             # AIX install.  It has an incompatible calling convention.
2870             :
2871           elif test $ac_prog = install &&
2872             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2873             # program-specific install script used by HP pwplus--don't use.
2874             :
2875           else
2876             ac_cv_path_install="$ac_dir/$ac_prog -c"
2877             break 2
2878           fi
2879         fi
2880       done
2881       ;;
2882     esac
2883   done
2884   IFS="$ac_save_IFS"
2885
2886 fi
2887   if test "${ac_cv_path_install+set}" = set; then
2888     INSTALL="$ac_cv_path_install"
2889   else
2890     # As a last resort, use the slow shell script.  We don't cache a
2891     # path for INSTALL within a source directory, because that will
2892     # break other packages using the cache if that directory is
2893     # removed, or if the path is relative.
2894     INSTALL="$ac_install_sh"
2895   fi
2896 fi
2897 echo "$ac_t""$INSTALL" 1>&6
2898
2899 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2900 # It thinks the first close brace ends the variable substitution.
2901 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2902
2903 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2904
2905 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2906
2907
2908 cat >> confdefs.h <<\EOF
2909 #define HAVE_MKVERSION 1
2910 EOF
2911
2912
2913
2914
2915 ol_aix_threads=no
2916 case "$target" in
2917 *-*-aix*)       if test -z "$CC" ; then
2918                 case "$ol_with_threads" in
2919                 auto | yes |  posix) ol_aix_threads=yes ;;
2920                 esac
2921         fi
2922 ;;
2923 esac
2924
2925 if test $ol_aix_threads = yes ; then
2926         if test -z "${CC}" ; then
2927                 for ac_prog in cc_r xlc_r cc
2928 do
2929 # Extract the first word of "$ac_prog", so it can be a program name with args.
2930 set dummy $ac_prog; ac_word=$2
2931 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2932 echo "configure:2933: checking for $ac_word" >&5
2933 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2934   echo $ac_n "(cached) $ac_c" 1>&6
2935 else
2936   if test -n "$CC"; then
2937   ac_cv_prog_CC="$CC" # Let the user override the test.
2938 else
2939   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2940   ac_dummy="$PATH"
2941   for ac_dir in $ac_dummy; do
2942     test -z "$ac_dir" && ac_dir=.
2943     if test -f $ac_dir/$ac_word; then
2944       ac_cv_prog_CC="$ac_prog"
2945       break
2946     fi
2947   done
2948   IFS="$ac_save_ifs"
2949 fi
2950 fi
2951 CC="$ac_cv_prog_CC"
2952 if test -n "$CC"; then
2953   echo "$ac_t""$CC" 1>&6
2954 else
2955   echo "$ac_t""no" 1>&6
2956 fi
2957
2958 test -n "$CC" && break
2959 done
2960
2961
2962                 if test "$CC" = cc ; then
2963                                                 if test $ol_with_threads != auto ; then
2964                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2965                         else
2966                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2967                         fi
2968                         ol_with_threads=no
2969                 fi
2970         fi
2971
2972         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2973                 ol_with_threads=posix
2974                 ol_cv_pthread_create=yes
2975         fi
2976 fi
2977
2978 if test -z "${CC}"; then
2979         for ac_prog in cc gcc
2980 do
2981 # Extract the first word of "$ac_prog", so it can be a program name with args.
2982 set dummy $ac_prog; ac_word=$2
2983 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2984 echo "configure:2985: checking for $ac_word" >&5
2985 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2986   echo $ac_n "(cached) $ac_c" 1>&6
2987 else
2988   if test -n "$CC"; then
2989   ac_cv_prog_CC="$CC" # Let the user override the test.
2990 else
2991   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2992   ac_dummy="$PATH"
2993   for ac_dir in $ac_dummy; do
2994     test -z "$ac_dir" && ac_dir=.
2995     if test -f $ac_dir/$ac_word; then
2996       ac_cv_prog_CC="$ac_prog"
2997       break
2998     fi
2999   done
3000   IFS="$ac_save_ifs"
3001 fi
3002 fi
3003 CC="$ac_cv_prog_CC"
3004 if test -n "$CC"; then
3005   echo "$ac_t""$CC" 1>&6
3006 else
3007   echo "$ac_t""no" 1>&6
3008 fi
3009
3010 test -n "$CC" && break
3011 done
3012 test -n "$CC" || CC="missing"
3013
3014
3015         if test "${CC}" = "missing" ; then
3016                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3017         fi
3018 fi
3019
3020 if test -z "${AR}"; then
3021         for ac_prog in ar gar
3022 do
3023 # Extract the first word of "$ac_prog", so it can be a program name with args.
3024 set dummy $ac_prog; ac_word=$2
3025 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3026 echo "configure:3027: checking for $ac_word" >&5
3027 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3028   echo $ac_n "(cached) $ac_c" 1>&6
3029 else
3030   if test -n "$AR"; then
3031   ac_cv_prog_AR="$AR" # Let the user override the test.
3032 else
3033   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3034   ac_dummy="$PATH"
3035   for ac_dir in $ac_dummy; do
3036     test -z "$ac_dir" && ac_dir=.
3037     if test -f $ac_dir/$ac_word; then
3038       ac_cv_prog_AR="$ac_prog"
3039       break
3040     fi
3041   done
3042   IFS="$ac_save_ifs"
3043 fi
3044 fi
3045 AR="$ac_cv_prog_AR"
3046 if test -n "$AR"; then
3047   echo "$ac_t""$AR" 1>&6
3048 else
3049   echo "$ac_t""no" 1>&6
3050 fi
3051
3052 test -n "$AR" && break
3053 done
3054 test -n "$AR" || AR="missing"
3055
3056
3057         if test "${AR}" = "missing" ; then
3058                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3059         fi
3060 fi
3061
3062
3063
3064 # Find the correct PATH separator.  Usually this is `:', but
3065 # DJGPP uses `;' like DOS.
3066 if test "X${PATH_SEPARATOR+set}" != Xset; then
3067   UNAME=${UNAME-`uname 2>/dev/null`}
3068   case X$UNAME in
3069     *-DOS) lt_cv_sys_path_separator=';' ;;
3070     *)     lt_cv_sys_path_separator=':' ;;
3071   esac
3072   PATH_SEPARATOR=$lt_cv_sys_path_separator
3073 fi
3074
3075 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3076 echo "configure:3077: checking for Cygwin environment" >&5
3077 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3078   echo $ac_n "(cached) $ac_c" 1>&6
3079 else
3080   cat > conftest.$ac_ext <<EOF
3081 #line 3082 "configure"
3082 #include "confdefs.h"
3083
3084 int main() {
3085
3086 #ifndef __CYGWIN__
3087 #define __CYGWIN__ __CYGWIN32__
3088 #endif
3089 return __CYGWIN__;
3090 ; return 0; }
3091 EOF
3092 if { (eval echo configure:3093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3093   rm -rf conftest*
3094   ac_cv_cygwin=yes
3095 else
3096   echo "configure: failed program was:" >&5
3097   cat conftest.$ac_ext >&5
3098   rm -rf conftest*
3099   ac_cv_cygwin=no
3100 fi
3101 rm -f conftest*
3102 fi
3103
3104 echo "$ac_t""$ac_cv_cygwin" 1>&6
3105 CYGWIN=
3106 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3107 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3108 echo "configure:3109: checking for mingw32 environment" >&5
3109 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3110   echo $ac_n "(cached) $ac_c" 1>&6
3111 else
3112   cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115
3116 int main() {
3117 return __MINGW32__;
3118 ; return 0; }
3119 EOF
3120 if { (eval echo configure:3121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3121   rm -rf conftest*
3122   ac_cv_mingw32=yes
3123 else
3124   echo "configure: failed program was:" >&5
3125   cat conftest.$ac_ext >&5
3126   rm -rf conftest*
3127   ac_cv_mingw32=no
3128 fi
3129 rm -f conftest*
3130 fi
3131
3132 echo "$ac_t""$ac_cv_mingw32" 1>&6
3133 MINGW32=
3134 test "$ac_cv_mingw32" = yes && MINGW32=yes
3135 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3136 echo "configure:3137: checking for EMX OS/2 environment" >&5
3137 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3138   echo $ac_n "(cached) $ac_c" 1>&6
3139 else
3140   cat > conftest.$ac_ext <<EOF
3141 #line 3142 "configure"
3142 #include "confdefs.h"
3143
3144 int main() {
3145 return __EMX__;
3146 ; return 0; }
3147 EOF
3148 if { (eval echo configure:3149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3149   rm -rf conftest*
3150   ac_cv_emxos2=yes
3151 else
3152   echo "configure: failed program was:" >&5
3153   cat conftest.$ac_ext >&5
3154   rm -rf conftest*
3155   ac_cv_emxos2=no
3156 fi
3157 rm -f conftest*
3158 fi
3159
3160 echo "$ac_t""$ac_cv_emxos2" 1>&6
3161 EMXOS2=
3162 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3163 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3164 echo "configure:3165: checking how to run the C preprocessor" >&5
3165 # On Suns, sometimes $CPP names a directory.
3166 if test -n "$CPP" && test -d "$CPP"; then
3167   CPP=
3168 fi
3169 if test -z "$CPP"; then
3170 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3171   echo $ac_n "(cached) $ac_c" 1>&6
3172 else
3173     # This must be in double quotes, not single quotes, because CPP may get
3174   # substituted into the Makefile and "${CC-cc}" will confuse make.
3175   CPP="${CC-cc} -E"
3176   # On the NeXT, cc -E runs the code through the compiler's parser,
3177   # not just through cpp.
3178   cat > conftest.$ac_ext <<EOF
3179 #line 3180 "configure"
3180 #include "confdefs.h"
3181 #include <assert.h>
3182 Syntax Error
3183 EOF
3184 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3185 { (eval echo configure:3186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3186 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3187 if test -z "$ac_err"; then
3188   :
3189 else
3190   echo "$ac_err" >&5
3191   echo "configure: failed program was:" >&5
3192   cat conftest.$ac_ext >&5
3193   rm -rf conftest*
3194   CPP="${CC-cc} -E -traditional-cpp"
3195   cat > conftest.$ac_ext <<EOF
3196 #line 3197 "configure"
3197 #include "confdefs.h"
3198 #include <assert.h>
3199 Syntax Error
3200 EOF
3201 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3202 { (eval echo configure:3203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3203 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3204 if test -z "$ac_err"; then
3205   :
3206 else
3207   echo "$ac_err" >&5
3208   echo "configure: failed program was:" >&5
3209   cat conftest.$ac_ext >&5
3210   rm -rf conftest*
3211   CPP="${CC-cc} -nologo -E"
3212   cat > conftest.$ac_ext <<EOF
3213 #line 3214 "configure"
3214 #include "confdefs.h"
3215 #include <assert.h>
3216 Syntax Error
3217 EOF
3218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3219 { (eval echo configure:3220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3221 if test -z "$ac_err"; then
3222   :
3223 else
3224   echo "$ac_err" >&5
3225   echo "configure: failed program was:" >&5
3226   cat conftest.$ac_ext >&5
3227   rm -rf conftest*
3228   CPP=/lib/cpp
3229 fi
3230 rm -f conftest*
3231 fi
3232 rm -f conftest*
3233 fi
3234 rm -f conftest*
3235   ac_cv_prog_CPP="$CPP"
3236 fi
3237   CPP="$ac_cv_prog_CPP"
3238 else
3239   ac_cv_prog_CPP="$CPP"
3240 fi
3241 echo "$ac_t""$CPP" 1>&6
3242
3243 # Check whether --enable-fast-install or --disable-fast-install was given.
3244 if test "${enable_fast_install+set}" = set; then
3245   enableval="$enable_fast_install"
3246   p=${PACKAGE-default}
3247 case $enableval in
3248 yes) enable_fast_install=yes ;;
3249 no) enable_fast_install=no ;;
3250 *)
3251   enable_fast_install=no
3252   # Look at the argument we got.  We use all the common list separators.
3253   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3254   for pkg in $enableval; do
3255     if test "X$pkg" = "X$p"; then
3256       enable_fast_install=yes
3257     fi
3258   done
3259   IFS="$ac_save_ifs"
3260   ;;
3261 esac
3262 else
3263   enable_fast_install=yes
3264 fi
3265
3266 # Extract the first word of "gcc", so it can be a program name with args.
3267 set dummy gcc; ac_word=$2
3268 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3269 echo "configure:3270: checking for $ac_word" >&5
3270 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3271   echo $ac_n "(cached) $ac_c" 1>&6
3272 else
3273   if test -n "$CC"; then
3274   ac_cv_prog_CC="$CC" # Let the user override the test.
3275 else
3276   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3277   ac_dummy="$PATH"
3278   for ac_dir in $ac_dummy; do
3279     test -z "$ac_dir" && ac_dir=.
3280     if test -f $ac_dir/$ac_word; then
3281       ac_cv_prog_CC="gcc"
3282       break
3283     fi
3284   done
3285   IFS="$ac_save_ifs"
3286 fi
3287 fi
3288 CC="$ac_cv_prog_CC"
3289 if test -n "$CC"; then
3290   echo "$ac_t""$CC" 1>&6
3291 else
3292   echo "$ac_t""no" 1>&6
3293 fi
3294
3295 if test -z "$CC"; then
3296   # Extract the first word of "cc", so it can be a program name with args.
3297 set dummy cc; ac_word=$2
3298 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3299 echo "configure:3300: checking for $ac_word" >&5
3300 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3301   echo $ac_n "(cached) $ac_c" 1>&6
3302 else
3303   if test -n "$CC"; then
3304   ac_cv_prog_CC="$CC" # Let the user override the test.
3305 else
3306   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3307   ac_prog_rejected=no
3308   ac_dummy="$PATH"
3309   for ac_dir in $ac_dummy; do
3310     test -z "$ac_dir" && ac_dir=.
3311     if test -f $ac_dir/$ac_word; then
3312       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3313         ac_prog_rejected=yes
3314         continue
3315       fi
3316       ac_cv_prog_CC="cc"
3317       break
3318     fi
3319   done
3320   IFS="$ac_save_ifs"
3321 if test $ac_prog_rejected = yes; then
3322   # We found a bogon in the path, so make sure we never use it.
3323   set dummy $ac_cv_prog_CC
3324   shift
3325   if test $# -gt 0; then
3326     # We chose a different compiler from the bogus one.
3327     # However, it has the same basename, so the bogon will be chosen
3328     # first if we set CC to just the basename; use the full file name.
3329     shift
3330     set dummy "$ac_dir/$ac_word" "$@"
3331     shift
3332     ac_cv_prog_CC="$@"
3333   fi
3334 fi
3335 fi
3336 fi
3337 CC="$ac_cv_prog_CC"
3338 if test -n "$CC"; then
3339   echo "$ac_t""$CC" 1>&6
3340 else
3341   echo "$ac_t""no" 1>&6
3342 fi
3343
3344   if test -z "$CC"; then
3345     case "`uname -s`" in
3346     *win32* | *WIN32* | *CYGWIN*)
3347       # Extract the first word of "cl", so it can be a program name with args.
3348 set dummy cl; ac_word=$2
3349 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3350 echo "configure:3351: checking for $ac_word" >&5
3351 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3352   echo $ac_n "(cached) $ac_c" 1>&6
3353 else
3354   if test -n "$CC"; then
3355   ac_cv_prog_CC="$CC" # Let the user override the test.
3356 else
3357   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3358   ac_dummy="$PATH"
3359   for ac_dir in $ac_dummy; do
3360     test -z "$ac_dir" && ac_dir=.
3361     if test -f $ac_dir/$ac_word; then
3362       ac_cv_prog_CC="cl"
3363       break
3364     fi
3365   done
3366   IFS="$ac_save_ifs"
3367 fi
3368 fi
3369 CC="$ac_cv_prog_CC"
3370 if test -n "$CC"; then
3371   echo "$ac_t""$CC" 1>&6
3372 else
3373   echo "$ac_t""no" 1>&6
3374 fi
3375  ;;
3376     esac
3377   fi
3378   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3379 fi
3380
3381 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3382 echo "configure:3383: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3383
3384 ac_ext=c
3385 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3386 ac_cpp='$CPP $CPPFLAGS'
3387 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3388 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3389 cross_compiling=$ac_cv_prog_cc_cross
3390
3391 cat > conftest.$ac_ext << EOF
3392
3393 #line 3394 "configure"
3394 #include "confdefs.h"
3395
3396 main(){return(0);}
3397 EOF
3398 if { (eval echo configure:3399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3399   ac_cv_prog_cc_works=yes
3400   # If we can't run a trivial program, we are probably using a cross compiler.
3401   if (./conftest; exit) 2>/dev/null; then
3402     ac_cv_prog_cc_cross=no
3403   else
3404     ac_cv_prog_cc_cross=yes
3405   fi
3406 else
3407   echo "configure: failed program was:" >&5
3408   cat conftest.$ac_ext >&5
3409   ac_cv_prog_cc_works=no
3410 fi
3411 rm -fr conftest*
3412 ac_ext=c
3413 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3414 ac_cpp='$CPP $CPPFLAGS'
3415 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3416 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3417 cross_compiling=$ac_cv_prog_cc_cross
3418
3419 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3420 if test $ac_cv_prog_cc_works = no; then
3421   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3422 fi
3423 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3424 echo "configure:3425: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3425 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3426 cross_compiling=$ac_cv_prog_cc_cross
3427
3428 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3429 echo "configure:3430: checking whether we are using GNU C" >&5
3430 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3431   echo $ac_n "(cached) $ac_c" 1>&6
3432 else
3433   cat > conftest.c <<EOF
3434 #ifdef __GNUC__
3435   yes;
3436 #endif
3437 EOF
3438 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3439   ac_cv_prog_gcc=yes
3440 else
3441   ac_cv_prog_gcc=no
3442 fi
3443 fi
3444
3445 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3446
3447 if test $ac_cv_prog_gcc = yes; then
3448   GCC=yes
3449 else
3450   GCC=
3451 fi
3452
3453 ac_test_CFLAGS="${CFLAGS+set}"
3454 ac_save_CFLAGS="$CFLAGS"
3455 CFLAGS=
3456 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3457 echo "configure:3458: checking whether ${CC-cc} accepts -g" >&5
3458 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3459   echo $ac_n "(cached) $ac_c" 1>&6
3460 else
3461   echo 'void f(){}' > conftest.c
3462 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3463   ac_cv_prog_cc_g=yes
3464 else
3465   ac_cv_prog_cc_g=no
3466 fi
3467 rm -f conftest*
3468
3469 fi
3470
3471 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3472 if test "$ac_test_CFLAGS" = set; then
3473   CFLAGS="$ac_save_CFLAGS"
3474 elif test $ac_cv_prog_cc_g = yes; then
3475   if test "$GCC" = yes; then
3476     CFLAGS="-g -O2"
3477   else
3478     CFLAGS="-g"
3479   fi
3480 else
3481   if test "$GCC" = yes; then
3482     CFLAGS="-O2"
3483   else
3484     CFLAGS=
3485   fi
3486 fi
3487
3488 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3489 if test "${with_gnu_ld+set}" = set; then
3490   withval="$with_gnu_ld"
3491   test "$withval" = no || with_gnu_ld=yes
3492 else
3493   with_gnu_ld=no
3494 fi
3495
3496 ac_prog=ld
3497 if test "$GCC" = yes; then
3498   # Check if gcc -print-prog-name=ld gives a path.
3499   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3500 echo "configure:3501: checking for ld used by GCC" >&5
3501   case $host in
3502   *-*-mingw*)
3503     # gcc leaves a trailing carriage return which upsets mingw
3504     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3505   *)
3506     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3507   esac
3508   case $ac_prog in
3509     # Accept absolute paths.
3510     [\\/]* | [A-Za-z]:[\\/]*)
3511       re_direlt='/[^/][^/]*/\.\./'
3512       # Canonicalize the path of ld
3513       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3514       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3515         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3516       done
3517       test -z "$LD" && LD="$ac_prog"
3518       ;;
3519   "")
3520     # If it fails, then pretend we aren't using GCC.
3521     ac_prog=ld
3522     ;;
3523   *)
3524     # If it is relative, then search for the first ld in PATH.
3525     with_gnu_ld=unknown
3526     ;;
3527   esac
3528 elif test "$with_gnu_ld" = yes; then
3529   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3530 echo "configure:3531: checking for GNU ld" >&5
3531 else
3532   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3533 echo "configure:3534: checking for non-GNU ld" >&5
3534 fi
3535 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3536   echo $ac_n "(cached) $ac_c" 1>&6
3537 else
3538   if test -z "$LD"; then
3539   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3540   for ac_dir in $PATH; do
3541     test -z "$ac_dir" && ac_dir=.
3542     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3543       lt_cv_path_LD="$ac_dir/$ac_prog"
3544       # Check to see if the program is GNU ld.  I'd rather use --version,
3545       # but apparently some GNU ld's only accept -v.
3546       # Break only if it was the GNU/non-GNU ld that we prefer.
3547       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3548         test "$with_gnu_ld" != no && break
3549       else
3550         test "$with_gnu_ld" != yes && break
3551       fi
3552     fi
3553   done
3554   IFS="$ac_save_ifs"
3555 else
3556   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3557 fi
3558 fi
3559
3560 LD="$lt_cv_path_LD"
3561 if test -n "$LD"; then
3562   echo "$ac_t""$LD" 1>&6
3563 else
3564   echo "$ac_t""no" 1>&6
3565 fi
3566 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3567 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3568 echo "configure:3569: checking if the linker ($LD) is GNU ld" >&5
3569 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3570   echo $ac_n "(cached) $ac_c" 1>&6
3571 else
3572   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3573 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3574   lt_cv_prog_gnu_ld=yes
3575 else
3576   lt_cv_prog_gnu_ld=no
3577 fi
3578 fi
3579
3580 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3581 with_gnu_ld=$lt_cv_prog_gnu_ld
3582
3583
3584 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3585 echo "configure:3586: checking for $LD option to reload object files" >&5
3586 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3587   echo $ac_n "(cached) $ac_c" 1>&6
3588 else
3589   lt_cv_ld_reload_flag='-r'
3590 fi
3591
3592 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3593 reload_flag=$lt_cv_ld_reload_flag
3594 test -n "$reload_flag" && reload_flag=" $reload_flag"
3595
3596 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3597 echo "configure:3598: checking for BSD-compatible nm" >&5
3598 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3599   echo $ac_n "(cached) $ac_c" 1>&6
3600 else
3601   if test -n "$NM"; then
3602   # Let the user override the test.
3603   lt_cv_path_NM="$NM"
3604 else
3605   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3606   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3607     test -z "$ac_dir" && ac_dir=.
3608     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3609     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3610       # Check to see if the nm accepts a BSD-compat flag.
3611       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3612       #   nm: unknown option "B" ignored
3613       # Tru64's nm complains that /dev/null is an invalid object file
3614       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3615         lt_cv_path_NM="$tmp_nm -B"
3616         break
3617       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3618         lt_cv_path_NM="$tmp_nm -p"
3619         break
3620       else
3621         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3622         continue # so that we can try to find one that supports BSD flags
3623       fi
3624     fi
3625   done
3626   IFS="$ac_save_ifs"
3627   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3628 fi
3629 fi
3630
3631 NM="$lt_cv_path_NM"
3632 echo "$ac_t""$NM" 1>&6
3633
3634 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3635 echo "configure:3636: checking for a sed that does not truncate output" >&5
3636 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3637   echo $ac_n "(cached) $ac_c" 1>&6
3638 else
3639   # Loop through the user's path and test for sed and gsed.
3640 # Then use that list of sed's as ones to test for truncation.
3641 as_executable_p="test -f"
3642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3643 for as_dir in $PATH
3644 do
3645   IFS=$as_save_IFS
3646   test -z "$as_dir" && as_dir=.
3647   for ac_prog in sed gsed; do
3648     for ac_exec_ext in '' $ac_executable_extensions; do
3649       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3650         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3651       fi
3652     done
3653   done
3654 done
3655
3656   # Create a temporary directory, and hook for its removal unless debugging.
3657 $debug ||
3658 {
3659   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3660   trap '{ (exit 1); exit 1; }' 1 2 13 15
3661 }
3662
3663 # Create a (secure) tmp directory for tmp files.
3664 : ${TMPDIR=/tmp}
3665 {
3666   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3667   test -n "$tmp" && test -d "$tmp"
3668 }  ||
3669 {
3670   tmp=$TMPDIR/sed$$-$RANDOM
3671   (umask 077 && mkdir $tmp)
3672 } ||
3673 {
3674    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3675    { (exit 1); exit 1; }
3676 }
3677   _max=0
3678   _count=0
3679   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3680   # along with /bin/sed that truncates output.
3681   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3682     test ! -f ${_sed} && break
3683     cat /dev/null > "$tmp/sed.in"
3684     _count=0
3685     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3686     # Check for GNU sed and select it if it is found.
3687     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3688       lt_cv_path_SED=${_sed}
3689       break
3690     fi
3691     while true; do
3692       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3693       mv "$tmp/sed.tmp" "$tmp/sed.in"
3694       cp "$tmp/sed.in" "$tmp/sed.nl"
3695       echo >>"$tmp/sed.nl"
3696       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3697       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3698       # 40000 chars as input seems more than enough
3699       test $_count -gt 10 && break
3700       _count=`expr $_count + 1`
3701       if test $_count -gt $_max; then
3702         _max=$_count
3703         lt_cv_path_SED=$_sed
3704       fi
3705     done
3706   done
3707   rm -rf "$tmp"
3708
3709 fi
3710
3711 if test "X$SED" != "X"; then
3712   lt_cv_path_SED=$SED
3713 else
3714   SED=$lt_cv_path_SED
3715 fi
3716 echo "$ac_t""$SED" 1>&6
3717
3718 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3719 echo "configure:3720: checking whether ln -s works" >&5
3720 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3721   echo $ac_n "(cached) $ac_c" 1>&6
3722 else
3723   rm -f conftestdata
3724 if ln -s X conftestdata 2>/dev/null
3725 then
3726   rm -f conftestdata
3727   ac_cv_prog_LN_S="ln -s"
3728 else
3729   ac_cv_prog_LN_S=ln
3730 fi
3731 fi
3732 LN_S="$ac_cv_prog_LN_S"
3733 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3734   echo "$ac_t""yes" 1>&6
3735 else
3736   echo "$ac_t""no" 1>&6
3737 fi
3738
3739 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3740 echo "configure:3741: checking how to recognise dependent libraries" >&5
3741 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3742   echo $ac_n "(cached) $ac_c" 1>&6
3743 else
3744   lt_cv_file_magic_cmd='$MAGIC_CMD'
3745 lt_cv_file_magic_test_file=
3746 lt_cv_deplibs_check_method='unknown'
3747 # Need to set the preceding variable on all platforms that support
3748 # interlibrary dependencies.
3749 # 'none' -- dependencies not supported.
3750 # `unknown' -- same as none, but documents that we really don't know.
3751 # 'pass_all' -- all dependencies passed with no checks.
3752 # 'test_compile' -- check by making test program.
3753 # 'file_magic [[regex]]' -- check by looking for files in library path
3754 # which responds to the $file_magic_cmd with a given egrep regex.
3755 # If you have `file' or equivalent on your system and you're not sure
3756 # whether `pass_all' will *always* work, you probably want this one.
3757
3758 case $host_os in
3759 aix4* | aix5*)
3760   lt_cv_deplibs_check_method=pass_all
3761   ;;
3762
3763 beos*)
3764   lt_cv_deplibs_check_method=pass_all
3765   ;;
3766
3767 bsdi4*)
3768   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3769   lt_cv_file_magic_cmd='/usr/bin/file -L'
3770   lt_cv_file_magic_test_file=/shlib/libc.so
3771   ;;
3772
3773 cygwin* | mingw* | pw32*)
3774   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3775   lt_cv_file_magic_cmd='$OBJDUMP -f'
3776   ;;
3777
3778 darwin* | rhapsody*)
3779   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3780   lt_cv_file_magic_cmd='/usr/bin/file -L'
3781   case "$host_os" in
3782   rhapsody* | darwin1.[012])
3783     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3784     ;;
3785   *) # Darwin 1.3 on
3786     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3787     ;;
3788   esac
3789   ;;
3790
3791 freebsd*)
3792   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3793     case $host_cpu in
3794     i*86 )
3795       # Not sure whether the presence of OpenBSD here was a mistake.
3796       # Let's accept both of them until this is cleared up.
3797       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3798       lt_cv_file_magic_cmd=/usr/bin/file
3799       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3800       ;;
3801     esac
3802   else
3803     lt_cv_deplibs_check_method=pass_all
3804   fi
3805   ;;
3806
3807 gnu*)
3808   lt_cv_deplibs_check_method=pass_all
3809   ;;
3810
3811 hpux10.20*|hpux11*)
3812   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3813   lt_cv_file_magic_cmd=/usr/bin/file
3814   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3815   ;;
3816
3817 irix5* | irix6* | nonstopux*)
3818   case $host_os in
3819   irix5* | nonstopux*)
3820     # this will be overridden with pass_all, but let us keep it just in case
3821     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3822     ;;
3823   *)
3824     case $LD in
3825     *-32|*"-32 ") libmagic=32-bit;;
3826     *-n32|*"-n32 ") libmagic=N32;;
3827     *-64|*"-64 ") libmagic=64-bit;;
3828     *) libmagic=never-match;;
3829     esac
3830     # this will be overridden with pass_all, but let us keep it just in case
3831     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3832     ;;
3833   esac
3834   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3835   lt_cv_deplibs_check_method=pass_all
3836   ;;
3837
3838 # This must be Linux ELF.
3839 linux-gnu*)
3840   case $host_cpu in
3841   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3842     lt_cv_deplibs_check_method=pass_all ;;
3843   *)
3844     # glibc up to 2.1.1 does not perform some relocations on ARM
3845     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3846   esac
3847   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3848   ;;
3849
3850 netbsd*)
3851   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3852     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3853   else
3854     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3855   fi
3856   ;;
3857
3858 newos6*)
3859   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3860   lt_cv_file_magic_cmd=/usr/bin/file
3861   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3862   ;;
3863
3864 openbsd*)
3865   lt_cv_file_magic_cmd=/usr/bin/file
3866   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3867   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3868     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3869   else
3870     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3871   fi
3872   ;;
3873
3874 osf3* | osf4* | osf5*)
3875   # this will be overridden with pass_all, but let us keep it just in case
3876   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3877   lt_cv_file_magic_test_file=/shlib/libc.so
3878   lt_cv_deplibs_check_method=pass_all
3879   ;;
3880
3881 sco3.2v5*)
3882   lt_cv_deplibs_check_method=pass_all
3883   ;;
3884
3885 solaris*)
3886   lt_cv_deplibs_check_method=pass_all
3887   lt_cv_file_magic_test_file=/lib/libc.so
3888   ;;
3889
3890 sysv5uw[78]* | sysv4*uw2*)
3891   lt_cv_deplibs_check_method=pass_all
3892   ;;
3893
3894 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3895   case $host_vendor in
3896   motorola)
3897     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]'
3898     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3899     ;;
3900   ncr)
3901     lt_cv_deplibs_check_method=pass_all
3902     ;;
3903   sequent)
3904     lt_cv_file_magic_cmd='/bin/file'
3905     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3906     ;;
3907   sni)
3908     lt_cv_file_magic_cmd='/bin/file'
3909     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3910     lt_cv_file_magic_test_file=/lib/libc.so
3911     ;;
3912   siemens)
3913     lt_cv_deplibs_check_method=pass_all
3914     ;;
3915   esac
3916   ;;
3917 esac
3918
3919 fi
3920
3921 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3922 file_magic_cmd=$lt_cv_file_magic_cmd
3923 deplibs_check_method=$lt_cv_deplibs_check_method
3924
3925 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3926 echo "configure:3927: checking for object suffix" >&5
3927 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3928   echo $ac_n "(cached) $ac_c" 1>&6
3929 else
3930   rm -f conftest*
3931 echo 'int i = 1;' > conftest.$ac_ext
3932 if { (eval echo configure:3933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3933   for ac_file in conftest.*; do
3934     case $ac_file in
3935     *.c) ;;
3936     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3937     esac
3938   done
3939 else
3940   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3941 fi
3942 rm -f conftest*
3943 fi
3944
3945 echo "$ac_t""$ac_cv_objext" 1>&6
3946 OBJEXT=$ac_cv_objext
3947 ac_objext=$ac_cv_objext
3948
3949
3950
3951
3952 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3953 echo "configure:3954: checking for executable suffix" >&5
3954 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3958   ac_cv_exeext=.exe
3959 else
3960   rm -f conftest*
3961   echo 'int main () { return 0; }' > conftest.$ac_ext
3962   ac_cv_exeext=
3963   if { (eval echo configure:3964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3964     for file in conftest.*; do
3965       case $file in
3966       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3967       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3968       esac
3969     done
3970   else
3971     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3972   fi
3973   rm -f conftest*
3974   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3975 fi
3976 fi
3977
3978 EXEEXT=""
3979 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3980 echo "$ac_t""${ac_cv_exeext}" 1>&6
3981 ac_exeext=$EXEEXT
3982
3983 if test $host != $build; then
3984   ac_tool_prefix=${host_alias}-
3985 else
3986   ac_tool_prefix=
3987 fi
3988
3989
3990
3991
3992 # Check for command to grab the raw symbol name followed by C symbol from nm.
3993 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3994 echo "configure:3995: checking command to parse $NM output" >&5
3995 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3996   echo $ac_n "(cached) $ac_c" 1>&6
3997 else
3998   
3999 # These are sane defaults that work on at least a few old systems.
4000 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4001
4002 # Character class describing NM global symbol codes.
4003 symcode='[BCDEGRST]'
4004
4005 # Regexp to match symbols that can be accessed directly from C.
4006 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4007
4008 # Transform the above into a raw symbol and a C symbol.
4009 symxfrm='\1 \2\3 \3'
4010
4011 # Transform an extracted symbol line into a proper C declaration
4012 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4013
4014 # Transform an extracted symbol line into symbol name and symbol address
4015 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'"
4016
4017 # Define system-specific variables.
4018 case $host_os in
4019 aix*)
4020   symcode='[BCDT]'
4021   ;;
4022 cygwin* | mingw* | pw32*)
4023   symcode='[ABCDGISTW]'
4024   ;;
4025 hpux*) # Its linker distinguishes data from code symbols
4026   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4027   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'"
4028   ;;
4029 irix* | nonstopux*)
4030   symcode='[BCDEGRST]'
4031   ;;
4032 osf*)
4033   symcode='[BCDEGQRST]'
4034   ;;
4035 solaris* | sysv5*)
4036   symcode='[BDT]'
4037   ;;
4038 sysv4)
4039   symcode='[DFNSTU]'
4040   ;;
4041 esac
4042
4043 # Handle CRLF in mingw tool chain
4044 opt_cr=
4045 case $host_os in
4046 mingw*)
4047   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4048   ;;
4049 esac
4050
4051 # If we're using GNU nm, then use its standard symbol codes.
4052 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4053   symcode='[ABCDGISTW]'
4054 fi
4055
4056 # Try without a prefix undercore, then with it.
4057 for ac_symprfx in "" "_"; do
4058
4059   # Write the raw and C identifiers.
4060 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4061
4062   # Check to see that the pipe works correctly.
4063   pipe_works=no
4064   rm -f conftest*
4065   cat > conftest.$ac_ext <<EOF
4066 #ifdef __cplusplus
4067 extern "C" {
4068 #endif
4069 char nm_test_var;
4070 void nm_test_func(){}
4071 #ifdef __cplusplus
4072 }
4073 #endif
4074 int main(){nm_test_var='a';nm_test_func();return(0);}
4075 EOF
4076
4077   if { (eval echo configure:4078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4078     # Now try to grab the symbols.
4079     nlist=conftest.nm
4080     if { (eval echo configure:4081: \"$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
4081       # Try sorting and uniquifying the output.
4082       if sort "$nlist" | uniq > "$nlist"T; then
4083         mv -f "$nlist"T "$nlist"
4084       else
4085         rm -f "$nlist"T
4086       fi
4087
4088       # Make sure that we snagged all the symbols we need.
4089       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4090         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4091           cat <<EOF > conftest.$ac_ext
4092 #ifdef __cplusplus
4093 extern "C" {
4094 #endif
4095
4096 EOF
4097           # Now generate the symbol file.
4098           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4099
4100           cat <<EOF >> conftest.$ac_ext
4101 #if defined (__STDC__) && __STDC__
4102 # define lt_ptr void *
4103 #else
4104 # define lt_ptr char *
4105 # define const
4106 #endif
4107
4108 /* The mapping between symbol names and symbols. */
4109 const struct {
4110   const char *name;
4111   lt_ptr address;
4112 }
4113 lt_preloaded_symbols[] =
4114 {
4115 EOF
4116           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4117           cat <<\EOF >> conftest.$ac_ext
4118   {0, (lt_ptr) 0}
4119 };
4120
4121 #ifdef __cplusplus
4122 }
4123 #endif
4124 EOF
4125           # Now try linking the two files.
4126           mv conftest.$ac_objext conftstm.$ac_objext
4127           save_LIBS="$LIBS"
4128           save_CFLAGS="$CFLAGS"
4129           LIBS="conftstm.$ac_objext"
4130           CFLAGS="$CFLAGS$no_builtin_flag"
4131           if { (eval echo configure:4132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4132             pipe_works=yes
4133           fi
4134           LIBS="$save_LIBS"
4135           CFLAGS="$save_CFLAGS"
4136         else
4137           echo "cannot find nm_test_func in $nlist" >&5
4138         fi
4139       else
4140         echo "cannot find nm_test_var in $nlist" >&5
4141       fi
4142     else
4143       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4144     fi
4145   else
4146     echo "$progname: failed program was:" >&5
4147     cat conftest.$ac_ext >&5
4148   fi
4149   rm -f conftest* conftst*
4150
4151   # Do not use the global_symbol_pipe unless it works.
4152   if test "$pipe_works" = yes; then
4153     break
4154   else
4155     lt_cv_sys_global_symbol_pipe=
4156   fi
4157 done
4158
4159 fi
4160
4161 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4162 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4163   global_symbol_to_cdecl=
4164   global_symbol_to_c_name_address=
4165 else
4166   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4167   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4168 fi
4169 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4170 then
4171   echo "$ac_t""failed" 1>&6
4172 else
4173   echo "$ac_t""ok" 1>&6
4174 fi
4175
4176 for ac_hdr in dlfcn.h
4177 do
4178 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4179 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4180 echo "configure:4181: checking for $ac_hdr" >&5
4181 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4182   echo $ac_n "(cached) $ac_c" 1>&6
4183 else
4184   cat > conftest.$ac_ext <<EOF
4185 #line 4186 "configure"
4186 #include "confdefs.h"
4187 #include <$ac_hdr>
4188 EOF
4189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4190 { (eval echo configure:4191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4192 if test -z "$ac_err"; then
4193   rm -rf conftest*
4194   eval "ac_cv_header_$ac_safe=yes"
4195 else
4196   echo "$ac_err" >&5
4197   echo "configure: failed program was:" >&5
4198   cat conftest.$ac_ext >&5
4199   rm -rf conftest*
4200   eval "ac_cv_header_$ac_safe=no"
4201 fi
4202 rm -f conftest*
4203 fi
4204 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4205   echo "$ac_t""yes" 1>&6
4206     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4207   cat >> confdefs.h <<EOF
4208 #define $ac_tr_hdr 1
4209 EOF
4210  
4211 else
4212   echo "$ac_t""no" 1>&6
4213 fi
4214 done
4215
4216
4217
4218
4219
4220
4221 # Only perform the check for file, if the check method requires it
4222 case $deplibs_check_method in
4223 file_magic*)
4224   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4225     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4226 echo "configure:4227: checking for ${ac_tool_prefix}file" >&5
4227 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4228   echo $ac_n "(cached) $ac_c" 1>&6
4229 else
4230   case $MAGIC_CMD in
4231   /*)
4232   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4233   ;;
4234   ?:/*)
4235   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4236   ;;
4237   *)
4238   ac_save_MAGIC_CMD="$MAGIC_CMD"
4239   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4240   ac_dummy="/usr/bin:$PATH"
4241   for ac_dir in $ac_dummy; do
4242     test -z "$ac_dir" && ac_dir=.
4243     if test -f $ac_dir/${ac_tool_prefix}file; then
4244       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4245       if test -n "$file_magic_test_file"; then
4246         case $deplibs_check_method in
4247         "file_magic "*)
4248           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4249           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4250           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4251             egrep "$file_magic_regex" > /dev/null; then
4252             :
4253           else
4254             cat <<EOF 1>&2
4255
4256 *** Warning: the command libtool uses to detect shared libraries,
4257 *** $file_magic_cmd, produces output that libtool cannot recognize.
4258 *** The result is that libtool may fail to recognize shared libraries
4259 *** as such.  This will affect the creation of libtool libraries that
4260 *** depend on shared libraries, but programs linked with such libtool
4261 *** libraries will work regardless of this problem.  Nevertheless, you
4262 *** may want to report the problem to your system manager and/or to
4263 *** bug-libtool@gnu.org
4264
4265 EOF
4266           fi ;;
4267         esac
4268       fi
4269       break
4270     fi
4271   done
4272   IFS="$ac_save_ifs"
4273   MAGIC_CMD="$ac_save_MAGIC_CMD"
4274   ;;
4275 esac
4276 fi
4277
4278 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4279 if test -n "$MAGIC_CMD"; then
4280   echo "$ac_t""$MAGIC_CMD" 1>&6
4281 else
4282   echo "$ac_t""no" 1>&6
4283 fi
4284
4285 if test -z "$lt_cv_path_MAGIC_CMD"; then
4286   if test -n "$ac_tool_prefix"; then
4287     echo $ac_n "checking for file""... $ac_c" 1>&6
4288 echo "configure:4289: checking for file" >&5
4289 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4290   echo $ac_n "(cached) $ac_c" 1>&6
4291 else
4292   case $MAGIC_CMD in
4293   /*)
4294   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4295   ;;
4296   ?:/*)
4297   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4298   ;;
4299   *)
4300   ac_save_MAGIC_CMD="$MAGIC_CMD"
4301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4302   ac_dummy="/usr/bin:$PATH"
4303   for ac_dir in $ac_dummy; do
4304     test -z "$ac_dir" && ac_dir=.
4305     if test -f $ac_dir/file; then
4306       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4307       if test -n "$file_magic_test_file"; then
4308         case $deplibs_check_method in
4309         "file_magic "*)
4310           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4311           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4312           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4313             egrep "$file_magic_regex" > /dev/null; then
4314             :
4315           else
4316             cat <<EOF 1>&2
4317
4318 *** Warning: the command libtool uses to detect shared libraries,
4319 *** $file_magic_cmd, produces output that libtool cannot recognize.
4320 *** The result is that libtool may fail to recognize shared libraries
4321 *** as such.  This will affect the creation of libtool libraries that
4322 *** depend on shared libraries, but programs linked with such libtool
4323 *** libraries will work regardless of this problem.  Nevertheless, you
4324 *** may want to report the problem to your system manager and/or to
4325 *** bug-libtool@gnu.org
4326
4327 EOF
4328           fi ;;
4329         esac
4330       fi
4331       break
4332     fi
4333   done
4334   IFS="$ac_save_ifs"
4335   MAGIC_CMD="$ac_save_MAGIC_CMD"
4336   ;;
4337 esac
4338 fi
4339
4340 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4341 if test -n "$MAGIC_CMD"; then
4342   echo "$ac_t""$MAGIC_CMD" 1>&6
4343 else
4344   echo "$ac_t""no" 1>&6
4345 fi
4346
4347   else
4348     MAGIC_CMD=:
4349   fi
4350 fi
4351
4352   fi
4353   ;;
4354 esac
4355
4356 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4357 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4359 echo "configure:4360: checking for $ac_word" >&5
4360 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4361   echo $ac_n "(cached) $ac_c" 1>&6
4362 else
4363   if test -n "$RANLIB"; then
4364   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4365 else
4366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4367   ac_dummy="$PATH"
4368   for ac_dir in $ac_dummy; do
4369     test -z "$ac_dir" && ac_dir=.
4370     if test -f $ac_dir/$ac_word; then
4371       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4372       break
4373     fi
4374   done
4375   IFS="$ac_save_ifs"
4376 fi
4377 fi
4378 RANLIB="$ac_cv_prog_RANLIB"
4379 if test -n "$RANLIB"; then
4380   echo "$ac_t""$RANLIB" 1>&6
4381 else
4382   echo "$ac_t""no" 1>&6
4383 fi
4384
4385
4386 if test -z "$ac_cv_prog_RANLIB"; then
4387 if test -n "$ac_tool_prefix"; then
4388   # Extract the first word of "ranlib", so it can be a program name with args.
4389 set dummy ranlib; ac_word=$2
4390 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4391 echo "configure:4392: checking for $ac_word" >&5
4392 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4393   echo $ac_n "(cached) $ac_c" 1>&6
4394 else
4395   if test -n "$RANLIB"; then
4396   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4397 else
4398   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4399   ac_dummy="$PATH"
4400   for ac_dir in $ac_dummy; do
4401     test -z "$ac_dir" && ac_dir=.
4402     if test -f $ac_dir/$ac_word; then
4403       ac_cv_prog_RANLIB="ranlib"
4404       break
4405     fi
4406   done
4407   IFS="$ac_save_ifs"
4408   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4409 fi
4410 fi
4411 RANLIB="$ac_cv_prog_RANLIB"
4412 if test -n "$RANLIB"; then
4413   echo "$ac_t""$RANLIB" 1>&6
4414 else
4415   echo "$ac_t""no" 1>&6
4416 fi
4417
4418 else
4419   RANLIB=":"
4420 fi
4421 fi
4422
4423 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4424 set dummy ${ac_tool_prefix}strip; ac_word=$2
4425 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4426 echo "configure:4427: checking for $ac_word" >&5
4427 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4428   echo $ac_n "(cached) $ac_c" 1>&6
4429 else
4430   if test -n "$STRIP"; then
4431   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4432 else
4433   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4434   ac_dummy="$PATH"
4435   for ac_dir in $ac_dummy; do
4436     test -z "$ac_dir" && ac_dir=.
4437     if test -f $ac_dir/$ac_word; then
4438       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4439       break
4440     fi
4441   done
4442   IFS="$ac_save_ifs"
4443 fi
4444 fi
4445 STRIP="$ac_cv_prog_STRIP"
4446 if test -n "$STRIP"; then
4447   echo "$ac_t""$STRIP" 1>&6
4448 else
4449   echo "$ac_t""no" 1>&6
4450 fi
4451
4452
4453 if test -z "$ac_cv_prog_STRIP"; then
4454 if test -n "$ac_tool_prefix"; then
4455   # Extract the first word of "strip", so it can be a program name with args.
4456 set dummy strip; ac_word=$2
4457 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4458 echo "configure:4459: checking for $ac_word" >&5
4459 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4460   echo $ac_n "(cached) $ac_c" 1>&6
4461 else
4462   if test -n "$STRIP"; then
4463   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4464 else
4465   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4466   ac_dummy="$PATH"
4467   for ac_dir in $ac_dummy; do
4468     test -z "$ac_dir" && ac_dir=.
4469     if test -f $ac_dir/$ac_word; then
4470       ac_cv_prog_STRIP="strip"
4471       break
4472     fi
4473   done
4474   IFS="$ac_save_ifs"
4475   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4476 fi
4477 fi
4478 STRIP="$ac_cv_prog_STRIP"
4479 if test -n "$STRIP"; then
4480   echo "$ac_t""$STRIP" 1>&6
4481 else
4482   echo "$ac_t""no" 1>&6
4483 fi
4484
4485 else
4486   STRIP=":"
4487 fi
4488 fi
4489
4490
4491 enable_dlopen=yes
4492 enable_win32_dll=yes
4493
4494 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4495 if test "${enable_libtool_lock+set}" = set; then
4496   enableval="$enable_libtool_lock"
4497   :
4498 fi
4499
4500 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4501
4502 # Some flags need to be propagated to the compiler or linker for good
4503 # libtool support.
4504 case $host in
4505 *-*-irix6*)
4506   # Find out which ABI we are using.
4507   echo '#line 4508 "configure"' > conftest.$ac_ext
4508   if { (eval echo configure:4509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4509     case `/usr/bin/file conftest.$ac_objext` in
4510     *32-bit*)
4511       LD="${LD-ld} -32"
4512       ;;
4513     *N32*)
4514       LD="${LD-ld} -n32"
4515       ;;
4516     *64-bit*)
4517       LD="${LD-ld} -64"
4518       ;;
4519     esac
4520   fi
4521   rm -rf conftest*
4522   ;;
4523
4524 *-*-sco3.2v5*)
4525   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4526   SAVE_CFLAGS="$CFLAGS"
4527   CFLAGS="$CFLAGS -belf"
4528   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4529 echo "configure:4530: checking whether the C compiler needs -belf" >&5
4530 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4531   echo $ac_n "(cached) $ac_c" 1>&6
4532 else
4533   
4534      ac_ext=c
4535 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4536 ac_cpp='$CPP $CPPFLAGS'
4537 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4538 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4539 cross_compiling=$ac_cv_prog_cc_cross
4540
4541      cat > conftest.$ac_ext <<EOF
4542 #line 4543 "configure"
4543 #include "confdefs.h"
4544
4545 int main() {
4546
4547 ; return 0; }
4548 EOF
4549 if { (eval echo configure:4550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4550   rm -rf conftest*
4551   lt_cv_cc_needs_belf=yes
4552 else
4553   echo "configure: failed program was:" >&5
4554   cat conftest.$ac_ext >&5
4555   rm -rf conftest*
4556   lt_cv_cc_needs_belf=no
4557 fi
4558 rm -f conftest*
4559      ac_ext=c
4560 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4561 ac_cpp='$CPP $CPPFLAGS'
4562 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4563 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4564 cross_compiling=$ac_cv_prog_cc_cross
4565
4566 fi
4567
4568 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4569   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4570     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4571     CFLAGS="$SAVE_CFLAGS"
4572   fi
4573   ;;
4574
4575 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4576   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4577 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4578 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4579 echo "configure:4580: checking for $ac_word" >&5
4580 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4581   echo $ac_n "(cached) $ac_c" 1>&6
4582 else
4583   if test -n "$DLLTOOL"; then
4584   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4585 else
4586   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4587   ac_dummy="$PATH"
4588   for ac_dir in $ac_dummy; do
4589     test -z "$ac_dir" && ac_dir=.
4590     if test -f $ac_dir/$ac_word; then
4591       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4592       break
4593     fi
4594   done
4595   IFS="$ac_save_ifs"
4596 fi
4597 fi
4598 DLLTOOL="$ac_cv_prog_DLLTOOL"
4599 if test -n "$DLLTOOL"; then
4600   echo "$ac_t""$DLLTOOL" 1>&6
4601 else
4602   echo "$ac_t""no" 1>&6
4603 fi
4604
4605
4606 if test -z "$ac_cv_prog_DLLTOOL"; then
4607 if test -n "$ac_tool_prefix"; then
4608   # Extract the first word of "dlltool", so it can be a program name with args.
4609 set dummy dlltool; ac_word=$2
4610 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4611 echo "configure:4612: checking for $ac_word" >&5
4612 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4613   echo $ac_n "(cached) $ac_c" 1>&6
4614 else
4615   if test -n "$DLLTOOL"; then
4616   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4617 else
4618   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4619   ac_dummy="$PATH"
4620   for ac_dir in $ac_dummy; do
4621     test -z "$ac_dir" && ac_dir=.
4622     if test -f $ac_dir/$ac_word; then
4623       ac_cv_prog_DLLTOOL="dlltool"
4624       break
4625     fi
4626   done
4627   IFS="$ac_save_ifs"
4628   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4629 fi
4630 fi
4631 DLLTOOL="$ac_cv_prog_DLLTOOL"
4632 if test -n "$DLLTOOL"; then
4633   echo "$ac_t""$DLLTOOL" 1>&6
4634 else
4635   echo "$ac_t""no" 1>&6
4636 fi
4637
4638 else
4639   DLLTOOL="false"
4640 fi
4641 fi
4642
4643   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4644 set dummy ${ac_tool_prefix}as; ac_word=$2
4645 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4646 echo "configure:4647: checking for $ac_word" >&5
4647 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4648   echo $ac_n "(cached) $ac_c" 1>&6
4649 else
4650   if test -n "$AS"; then
4651   ac_cv_prog_AS="$AS" # Let the user override the test.
4652 else
4653   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4654   ac_dummy="$PATH"
4655   for ac_dir in $ac_dummy; do
4656     test -z "$ac_dir" && ac_dir=.
4657     if test -f $ac_dir/$ac_word; then
4658       ac_cv_prog_AS="${ac_tool_prefix}as"
4659       break
4660     fi
4661   done
4662   IFS="$ac_save_ifs"
4663 fi
4664 fi
4665 AS="$ac_cv_prog_AS"
4666 if test -n "$AS"; then
4667   echo "$ac_t""$AS" 1>&6
4668 else
4669   echo "$ac_t""no" 1>&6
4670 fi
4671
4672
4673 if test -z "$ac_cv_prog_AS"; then
4674 if test -n "$ac_tool_prefix"; then
4675   # Extract the first word of "as", so it can be a program name with args.
4676 set dummy as; ac_word=$2
4677 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4678 echo "configure:4679: checking for $ac_word" >&5
4679 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4680   echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682   if test -n "$AS"; then
4683   ac_cv_prog_AS="$AS" # Let the user override the test.
4684 else
4685   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4686   ac_dummy="$PATH"
4687   for ac_dir in $ac_dummy; do
4688     test -z "$ac_dir" && ac_dir=.
4689     if test -f $ac_dir/$ac_word; then
4690       ac_cv_prog_AS="as"
4691       break
4692     fi
4693   done
4694   IFS="$ac_save_ifs"
4695   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4696 fi
4697 fi
4698 AS="$ac_cv_prog_AS"
4699 if test -n "$AS"; then
4700   echo "$ac_t""$AS" 1>&6
4701 else
4702   echo "$ac_t""no" 1>&6
4703 fi
4704
4705 else
4706   AS="false"
4707 fi
4708 fi
4709
4710   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4711 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4712 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4713 echo "configure:4714: checking for $ac_word" >&5
4714 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4715   echo $ac_n "(cached) $ac_c" 1>&6
4716 else
4717   if test -n "$OBJDUMP"; then
4718   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4719 else
4720   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4721   ac_dummy="$PATH"
4722   for ac_dir in $ac_dummy; do
4723     test -z "$ac_dir" && ac_dir=.
4724     if test -f $ac_dir/$ac_word; then
4725       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4726       break
4727     fi
4728   done
4729   IFS="$ac_save_ifs"
4730 fi
4731 fi
4732 OBJDUMP="$ac_cv_prog_OBJDUMP"
4733 if test -n "$OBJDUMP"; then
4734   echo "$ac_t""$OBJDUMP" 1>&6
4735 else
4736   echo "$ac_t""no" 1>&6
4737 fi
4738
4739
4740 if test -z "$ac_cv_prog_OBJDUMP"; then
4741 if test -n "$ac_tool_prefix"; then
4742   # Extract the first word of "objdump", so it can be a program name with args.
4743 set dummy objdump; ac_word=$2
4744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4745 echo "configure:4746: checking for $ac_word" >&5
4746 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4747   echo $ac_n "(cached) $ac_c" 1>&6
4748 else
4749   if test -n "$OBJDUMP"; then
4750   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4751 else
4752   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4753   ac_dummy="$PATH"
4754   for ac_dir in $ac_dummy; do
4755     test -z "$ac_dir" && ac_dir=.
4756     if test -f $ac_dir/$ac_word; then
4757       ac_cv_prog_OBJDUMP="objdump"
4758       break
4759     fi
4760   done
4761   IFS="$ac_save_ifs"
4762   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4763 fi
4764 fi
4765 OBJDUMP="$ac_cv_prog_OBJDUMP"
4766 if test -n "$OBJDUMP"; then
4767   echo "$ac_t""$OBJDUMP" 1>&6
4768 else
4769   echo "$ac_t""no" 1>&6
4770 fi
4771
4772 else
4773   OBJDUMP="false"
4774 fi
4775 fi
4776
4777
4778   # recent cygwin and mingw systems supply a stub DllMain which the user
4779   # can override, but on older systems we have to supply one
4780   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4781 echo "configure:4782: checking if libtool should supply DllMain function" >&5
4782 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4783   echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785   cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788
4789 int main() {
4790 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4791       DllMain (0, 0, 0);
4792 ; return 0; }
4793 EOF
4794 if { (eval echo configure:4795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4795   rm -rf conftest*
4796   lt_cv_need_dllmain=no
4797 else
4798   echo "configure: failed program was:" >&5
4799   cat conftest.$ac_ext >&5
4800   rm -rf conftest*
4801   lt_cv_need_dllmain=yes
4802 fi
4803 rm -f conftest*
4804 fi
4805
4806 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4807
4808   case $host/$CC in
4809   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4810     # old mingw systems require "-dll" to link a DLL, while more recent ones
4811     # require "-mdll"
4812     SAVE_CFLAGS="$CFLAGS"
4813     CFLAGS="$CFLAGS -mdll"
4814     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4815 echo "configure:4816: checking how to link DLLs" >&5
4816 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4817   echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819   cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822
4823 int main() {
4824
4825 ; return 0; }
4826 EOF
4827 if { (eval echo configure:4828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4828   rm -rf conftest*
4829   lt_cv_cc_dll_switch=-mdll
4830 else
4831   echo "configure: failed program was:" >&5
4832   cat conftest.$ac_ext >&5
4833   rm -rf conftest*
4834   lt_cv_cc_dll_switch=-dll
4835 fi
4836 rm -f conftest*
4837 fi
4838
4839 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4840     CFLAGS="$SAVE_CFLAGS" ;;
4841   *-*-cygwin* | *-*-pw32*)
4842     # cygwin systems need to pass --dll to the linker, and not link
4843     # crt.o which will require a WinMain@16 definition.
4844     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4845   esac
4846   ;;
4847   
4848 esac
4849
4850 # Sed substitution that helps us do robust quoting.  It backslashifies
4851 # metacharacters that are still active within double-quoted strings.
4852 Xsed='sed -e s/^X//'
4853 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4854
4855 # Same as above, but do not quote variable references.
4856 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4857
4858 # Sed substitution to delay expansion of an escaped shell variable in a
4859 # double_quote_subst'ed string.
4860 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4861
4862 # Constants:
4863 rm="rm -f"
4864
4865 # Global variables:
4866 default_ofile=libtool
4867 can_build_shared=yes
4868
4869 # All known linkers require a `.a' archive for static linking (except M$VC,
4870 # which needs '.lib').
4871 libext=a
4872 ltmain="$ac_aux_dir/ltmain.sh"
4873 ofile="$default_ofile"
4874 with_gnu_ld="$lt_cv_prog_gnu_ld"
4875 need_locks="$enable_libtool_lock"
4876
4877 old_CC="$CC"
4878 old_CFLAGS="$CFLAGS"
4879
4880 # Set sane defaults for various variables
4881 test -z "$AR" && AR=ar
4882 test -z "$AR_FLAGS" && AR_FLAGS=cru
4883 test -z "$AS" && AS=as
4884 test -z "$CC" && CC=cc
4885 test -z "$DLLTOOL" && DLLTOOL=dlltool
4886 test -z "$LD" && LD=ld
4887 test -z "$LN_S" && LN_S="ln -s"
4888 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4889 test -z "$NM" && NM=nm
4890 test -z "$OBJDUMP" && OBJDUMP=objdump
4891 test -z "$RANLIB" && RANLIB=:
4892 test -z "$STRIP" && STRIP=:
4893 test -z "$ac_objext" && ac_objext=o
4894
4895 if test x"$host" != x"$build"; then
4896   ac_tool_prefix=${host_alias}-
4897 else
4898   ac_tool_prefix=
4899 fi
4900
4901 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4902 case $host_os in
4903 linux-gnu*) ;;
4904 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4905 esac
4906
4907 case $host_os in
4908 aix3*)
4909   # AIX sometimes has problems with the GCC collect2 program.  For some
4910   # reason, if we set the COLLECT_NAMES environment variable, the problems
4911   # vanish in a puff of smoke.
4912   if test "X${COLLECT_NAMES+set}" != Xset; then
4913     COLLECT_NAMES=
4914     export COLLECT_NAMES
4915   fi
4916   ;;
4917 esac
4918
4919 # Determine commands to create old-style static archives.
4920 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4921 old_postinstall_cmds='chmod 644 $oldlib'
4922 old_postuninstall_cmds=
4923
4924 if test -n "$RANLIB"; then
4925   case $host_os in
4926   openbsd*)
4927     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4928     ;;
4929   *)
4930     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4931     ;;
4932   esac
4933   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4934 fi
4935
4936 # Allow CC to be a program name with arguments.
4937 set dummy $CC
4938 compiler="$2"
4939
4940 ## FIXME: this should be a separate macro
4941 ##
4942 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4943 echo "configure:4944: checking for objdir" >&5
4944 rm -f .libs 2>/dev/null
4945 mkdir .libs 2>/dev/null
4946 if test -d .libs; then
4947   objdir=.libs
4948 else
4949   # MS-DOS does not allow filenames that begin with a dot.
4950   objdir=_libs
4951 fi
4952 rmdir .libs 2>/dev/null
4953 echo "$ac_t""$objdir" 1>&6
4954 ##
4955 ## END FIXME
4956
4957
4958 ## FIXME: this should be a separate macro
4959 ##
4960 # Check whether --with-pic or --without-pic was given.
4961 if test "${with_pic+set}" = set; then
4962   withval="$with_pic"
4963   pic_mode="$withval"
4964 else
4965   pic_mode=default
4966 fi
4967
4968 test -z "$pic_mode" && pic_mode=default
4969
4970 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4971 # in isolation, and that seeing it set (from the cache) indicates that
4972 # the associated values are set (in the cache) correctly too.
4973 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4974 echo "configure:4975: checking for $compiler option to produce PIC" >&5
4975 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4976   echo $ac_n "(cached) $ac_c" 1>&6
4977 else
4978    lt_cv_prog_cc_pic=
4979   lt_cv_prog_cc_shlib=
4980   lt_cv_prog_cc_wl=
4981   lt_cv_prog_cc_static=
4982   lt_cv_prog_cc_no_builtin=
4983   lt_cv_prog_cc_can_build_shared=$can_build_shared
4984
4985   if test "$GCC" = yes; then
4986     lt_cv_prog_cc_wl='-Wl,'
4987     lt_cv_prog_cc_static='-static'
4988
4989     case $host_os in
4990     aix*)
4991       # Below there is a dirty hack to force normal static linking with -ldl
4992       # The problem is because libdl dynamically linked with both libc and
4993       # libC (AIX C++ library), which obviously doesn't included in libraries
4994       # list by gcc. This cause undefined symbols with -static flags.
4995       # This hack allows C programs to be linked with "-static -ldl", but
4996       # not sure about C++ programs.
4997       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4998       ;;
4999     amigaos*)
5000       # FIXME: we need at least 68020 code to build shared libraries, but
5001       # adding the `-m68020' flag to GCC prevents building anything better,
5002       # like `-m68040'.
5003       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5004       ;;
5005     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5006       # PIC is the default for these OSes.
5007       ;;
5008     darwin* | rhapsody*)
5009       # PIC is the default on this platform
5010       # Common symbols not allowed in MH_DYLIB files
5011       lt_cv_prog_cc_pic='-fno-common'
5012       ;;
5013     cygwin* | mingw* | pw32* | os2*)
5014       # This hack is so that the source file can tell whether it is being
5015       # built for inclusion in a dll (and should export symbols for example).
5016       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5017       ;;
5018     sysv4*MP*)
5019       if test -d /usr/nec; then
5020          lt_cv_prog_cc_pic=-Kconform_pic
5021       fi
5022       ;;
5023     *)
5024       lt_cv_prog_cc_pic='-fPIC'
5025       ;;
5026     esac
5027   else
5028     # PORTME Check for PIC flags for the system compiler.
5029     case $host_os in
5030     aix3* | aix4* | aix5*)
5031       lt_cv_prog_cc_wl='-Wl,'
5032       # All AIX code is PIC.
5033       if test "$host_cpu" = ia64; then
5034         # AIX 5 now supports IA64 processor
5035         lt_cv_prog_cc_static='-Bstatic'
5036       else
5037         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5038       fi
5039       ;;
5040
5041     hpux9* | hpux10* | hpux11*)
5042       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5043       lt_cv_prog_cc_wl='-Wl,'
5044       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5045       lt_cv_prog_cc_pic='+Z'
5046       ;;
5047
5048     irix5* | irix6* | nonstopux*)
5049       lt_cv_prog_cc_wl='-Wl,'
5050       lt_cv_prog_cc_static='-non_shared'
5051       # PIC (with -KPIC) is the default.
5052       ;;
5053
5054     cygwin* | mingw* | pw32* | os2*)
5055       # This hack is so that the source file can tell whether it is being
5056       # built for inclusion in a dll (and should export symbols for example).
5057       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5058       ;;
5059
5060     newsos6)
5061       lt_cv_prog_cc_pic='-KPIC'
5062       lt_cv_prog_cc_static='-Bstatic'
5063       ;;
5064
5065     osf3* | osf4* | osf5*)
5066       # All OSF/1 code is PIC.
5067       lt_cv_prog_cc_wl='-Wl,'
5068       lt_cv_prog_cc_static='-non_shared'
5069       ;;
5070
5071     sco3.2v5*)
5072       lt_cv_prog_cc_pic='-Kpic'
5073       lt_cv_prog_cc_static='-dn'
5074       lt_cv_prog_cc_shlib='-belf'
5075       ;;
5076
5077     solaris*)
5078       lt_cv_prog_cc_pic='-KPIC'
5079       lt_cv_prog_cc_static='-Bstatic'
5080       lt_cv_prog_cc_wl='-Wl,'
5081       ;;
5082
5083     sunos4*)
5084       lt_cv_prog_cc_pic='-PIC'
5085       lt_cv_prog_cc_static='-Bstatic'
5086       lt_cv_prog_cc_wl='-Qoption ld '
5087       ;;
5088
5089     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5090       lt_cv_prog_cc_pic='-KPIC'
5091       lt_cv_prog_cc_static='-Bstatic'
5092       lt_cv_prog_cc_wl='-Wl,'
5093       ;;
5094
5095     uts4*)
5096       lt_cv_prog_cc_pic='-pic'
5097       lt_cv_prog_cc_static='-Bstatic'
5098       ;;
5099
5100     sysv4*MP*)
5101       if test -d /usr/nec ;then
5102         lt_cv_prog_cc_pic='-Kconform_pic'
5103         lt_cv_prog_cc_static='-Bstatic'
5104       fi
5105       ;;
5106
5107     *)
5108       lt_cv_prog_cc_can_build_shared=no
5109       ;;
5110     esac
5111   fi
5112
5113 fi
5114
5115 if test -z "$lt_cv_prog_cc_pic"; then
5116   echo "$ac_t""none" 1>&6
5117 else
5118   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5119
5120   # Check to make sure the pic_flag actually works.
5121   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5122 echo "configure:5123: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5123   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5124   echo $ac_n "(cached) $ac_c" 1>&6
5125 else
5126       save_CFLAGS="$CFLAGS"
5127     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5128     cat > conftest.$ac_ext <<EOF
5129 #line 5130 "configure"
5130 #include "confdefs.h"
5131
5132 int main() {
5133
5134 ; return 0; }
5135 EOF
5136 if { (eval echo configure:5137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5137   rm -rf conftest*
5138         case $host_os in
5139       hpux9* | hpux10* | hpux11*)
5140         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5141         # they create non-PIC objects.  So, if there were any warnings, we
5142         # assume that PIC is not supported.
5143         if test -s conftest.err; then
5144           lt_cv_prog_cc_pic_works=no
5145         else
5146           lt_cv_prog_cc_pic_works=yes
5147         fi
5148         ;;
5149       *)
5150         lt_cv_prog_cc_pic_works=yes
5151         ;;
5152       esac
5153     
5154 else
5155   echo "configure: failed program was:" >&5
5156   cat conftest.$ac_ext >&5
5157   rm -rf conftest*
5158         lt_cv_prog_cc_pic_works=no
5159     
5160 fi
5161 rm -f conftest*
5162     CFLAGS="$save_CFLAGS"
5163   
5164 fi
5165
5166
5167   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5168     lt_cv_prog_cc_pic=
5169     lt_cv_prog_cc_can_build_shared=no
5170   else
5171     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5172   fi
5173
5174   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5175 fi
5176 ##
5177 ## END FIXME
5178
5179 # Check for any special shared library compilation flags.
5180 if test -n "$lt_cv_prog_cc_shlib"; then
5181   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5182   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5183   else
5184    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5185     lt_cv_prog_cc_can_build_shared=no
5186   fi
5187 fi
5188
5189 ## FIXME: this should be a separate macro
5190 ##
5191 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5192 echo "configure:5193: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5193 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5194   echo $ac_n "(cached) $ac_c" 1>&6
5195 else
5196     lt_cv_prog_cc_static_works=no
5197   save_LDFLAGS="$LDFLAGS"
5198   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5199   cat > conftest.$ac_ext <<EOF
5200 #line 5201 "configure"
5201 #include "confdefs.h"
5202
5203 int main() {
5204
5205 ; return 0; }
5206 EOF
5207 if { (eval echo configure:5208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5208   rm -rf conftest*
5209   lt_cv_prog_cc_static_works=yes
5210 else
5211   echo "configure: failed program was:" >&5
5212   cat conftest.$ac_ext >&5
5213 fi
5214 rm -f conftest*
5215   LDFLAGS="$save_LDFLAGS"
5216
5217 fi
5218
5219
5220 # Belt *and* braces to stop my trousers falling down:
5221 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5222 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5223
5224 pic_flag="$lt_cv_prog_cc_pic"
5225 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5226 wl="$lt_cv_prog_cc_wl"
5227 link_static_flag="$lt_cv_prog_cc_static"
5228 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5229 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5230 ##
5231 ## END FIXME
5232
5233
5234 ## FIXME: this should be a separate macro
5235 ##
5236 # Check to see if options -o and -c are simultaneously supported by compiler
5237 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5238 echo "configure:5239: checking if $compiler supports -c -o file.$ac_objext" >&5
5239 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5240   echo $ac_n "(cached) $ac_c" 1>&6
5241 else
5242   
5243 $rm -r conftest 2>/dev/null
5244 mkdir conftest
5245 cd conftest
5246 echo "int some_variable = 0;" > conftest.$ac_ext
5247 mkdir out
5248 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5249 # that will create temporary files in the current directory regardless of
5250 # the output directory.  Thus, making CWD read-only will cause this test
5251 # to fail, enabling locking or at least warning the user not to do parallel
5252 # builds.
5253 chmod -w .
5254 save_CFLAGS="$CFLAGS"
5255 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5256 compiler_c_o=no
5257 if { (eval echo configure:5258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5258   # The compiler can only warn and ignore the option if not recognized
5259   # So say no if there are warnings
5260   if test -s out/conftest.err; then
5261     lt_cv_compiler_c_o=no
5262   else
5263     lt_cv_compiler_c_o=yes
5264   fi
5265 else
5266   # Append any errors to the config.log.
5267   cat out/conftest.err 1>&5
5268   lt_cv_compiler_c_o=no
5269 fi
5270 CFLAGS="$save_CFLAGS"
5271 chmod u+w .
5272 $rm conftest* out/*
5273 rmdir out
5274 cd ..
5275 rmdir conftest
5276 $rm -r conftest 2>/dev/null
5277
5278 fi
5279
5280 compiler_c_o=$lt_cv_compiler_c_o
5281 echo "$ac_t""$compiler_c_o" 1>&6
5282
5283 if test x"$compiler_c_o" = x"yes"; then
5284   # Check to see if we can write to a .lo
5285   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5286 echo "configure:5287: checking if $compiler supports -c -o file.lo" >&5
5287   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290   
5291   lt_cv_compiler_o_lo=no
5292   save_CFLAGS="$CFLAGS"
5293   CFLAGS="$CFLAGS -c -o conftest.lo"
5294   save_objext="$ac_objext"
5295   ac_objext=lo
5296   cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 int main() {
5301 int some_variable = 0;
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5305   rm -rf conftest*
5306       # The compiler can only warn and ignore the option if not recognized
5307     # So say no if there are warnings
5308     if test -s conftest.err; then
5309       lt_cv_compiler_o_lo=no
5310     else
5311       lt_cv_compiler_o_lo=yes
5312     fi
5313   
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317 fi
5318 rm -f conftest*
5319   ac_objext="$save_objext"
5320   CFLAGS="$save_CFLAGS"
5321   
5322 fi
5323
5324   compiler_o_lo=$lt_cv_compiler_o_lo
5325   echo "$ac_t""$compiler_o_lo" 1>&6
5326 else
5327   compiler_o_lo=no
5328 fi
5329 ##
5330 ## END FIXME
5331
5332 ## FIXME: this should be a separate macro
5333 ##
5334 # Check to see if we can do hard links to lock some files if needed
5335 hard_links="nottested"
5336 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5337   # do not overwrite the value of need_locks provided by the user
5338   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5339 echo "configure:5340: checking if we can lock with hard links" >&5
5340   hard_links=yes
5341   $rm conftest*
5342   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5343   touch conftest.a
5344   ln conftest.a conftest.b 2>&5 || hard_links=no
5345   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5346   echo "$ac_t""$hard_links" 1>&6
5347   if test "$hard_links" = no; then
5348     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5349     need_locks=warn
5350   fi
5351 else
5352   need_locks=no
5353 fi
5354 ##
5355 ## END FIXME
5356
5357 ## FIXME: this should be a separate macro
5358 ##
5359 if test "$GCC" = yes; then
5360   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5361   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5362 echo "configure:5363: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5363   echo "int some_variable = 0;" > conftest.$ac_ext
5364   save_CFLAGS="$CFLAGS"
5365   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5366   compiler_rtti_exceptions=no
5367   cat > conftest.$ac_ext <<EOF
5368 #line 5369 "configure"
5369 #include "confdefs.h"
5370
5371 int main() {
5372 int some_variable = 0;
5373 ; return 0; }
5374 EOF
5375 if { (eval echo configure:5376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5376   rm -rf conftest*
5377       # The compiler can only warn and ignore the option if not recognized
5378     # So say no if there are warnings
5379     if test -s conftest.err; then
5380       compiler_rtti_exceptions=no
5381     else
5382       compiler_rtti_exceptions=yes
5383     fi
5384   
5385 else
5386   echo "configure: failed program was:" >&5
5387   cat conftest.$ac_ext >&5
5388 fi
5389 rm -f conftest*
5390   CFLAGS="$save_CFLAGS"
5391   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5392
5393   if test "$compiler_rtti_exceptions" = "yes"; then
5394     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5395   else
5396     no_builtin_flag=' -fno-builtin'
5397   fi
5398 fi
5399 ##
5400 ## END FIXME
5401
5402 ## FIXME: this should be a separate macro
5403 ##
5404 # See if the linker supports building shared libraries.
5405 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5406 echo "configure:5407: checking whether the linker ($LD) supports shared libraries" >&5
5407
5408 allow_undefined_flag=
5409 no_undefined_flag=
5410 need_lib_prefix=unknown
5411 need_version=unknown
5412 # when you set need_version to no, make sure it does not cause -set_version
5413 # flags to be left without arguments
5414 archive_cmds=
5415 archive_expsym_cmds=
5416 old_archive_from_new_cmds=
5417 old_archive_from_expsyms_cmds=
5418 export_dynamic_flag_spec=
5419 whole_archive_flag_spec=
5420 thread_safe_flag_spec=
5421 hardcode_into_libs=no
5422 hardcode_libdir_flag_spec=
5423 hardcode_libdir_separator=
5424 hardcode_direct=no
5425 hardcode_minus_L=no
5426 hardcode_shlibpath_var=unsupported
5427 runpath_var=
5428 link_all_deplibs=unknown
5429 always_export_symbols=no
5430 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5431 # include_expsyms should be a list of space-separated symbols to be *always*
5432 # included in the symbol list
5433 include_expsyms=
5434 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5435 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5436 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5437 # as well as any symbol that contains `d'.
5438 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5439 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5440 # platforms (ab)use it in PIC code, but their linkers get confused if
5441 # the symbol is explicitly referenced.  Since portable code cannot
5442 # rely on this symbol name, it's probably fine to never include it in
5443 # preloaded symbol tables.
5444 extract_expsyms_cmds=
5445
5446 case $host_os in
5447 cygwin* | mingw* | pw32*)
5448   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5449   # When not using gcc, we currently assume that we are using
5450   # Microsoft Visual C++.
5451   if test "$GCC" != yes; then
5452     with_gnu_ld=no
5453   fi
5454   ;;
5455 openbsd*)
5456   with_gnu_ld=no
5457   ;;
5458 esac
5459
5460 ld_shlibs=yes
5461 if test "$with_gnu_ld" = yes; then
5462   # If archive_cmds runs LD, not CC, wlarc should be empty
5463   wlarc='${wl}'
5464
5465   # See if GNU ld supports shared libraries.
5466   case $host_os in
5467   aix3* | aix4* | aix5*)
5468     # On AIX, the GNU linker is very broken
5469     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5470     ld_shlibs=no
5471     cat <<EOF 1>&2
5472
5473 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5474 *** to be unable to reliably create shared libraries on AIX.
5475 *** Therefore, libtool is disabling shared libraries support.  If you
5476 *** really care for shared libraries, you may want to modify your PATH
5477 *** so that a non-GNU linker is found, and then restart.
5478
5479 EOF
5480     ;;
5481
5482   amigaos*)
5483     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)'
5484     hardcode_libdir_flag_spec='-L$libdir'
5485     hardcode_minus_L=yes
5486
5487     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5488     # that the semantics of dynamic libraries on AmigaOS, at least up
5489     # to version 4, is to share data among multiple programs linked
5490     # with the same dynamic library.  Since this doesn't match the
5491     # behavior of shared libraries on other platforms, we can use
5492     # them.
5493     ld_shlibs=no
5494     ;;
5495
5496   beos*)
5497     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5498       allow_undefined_flag=unsupported
5499       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5500       # support --undefined.  This deserves some investigation.  FIXME
5501       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5502     else
5503       ld_shlibs=no
5504     fi
5505     ;;
5506
5507   cygwin* | mingw* | pw32*)
5508     # hardcode_libdir_flag_spec is actually meaningless, as there is
5509     # no search path for DLLs.
5510     hardcode_libdir_flag_spec='-L$libdir'
5511     allow_undefined_flag=unsupported
5512     always_export_symbols=yes
5513
5514     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5515       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5516       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5517       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5518       else $CC -o impgen impgen.c ; fi)~
5519       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5520
5521     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5522
5523     # cygwin and mingw dlls have different entry points and sets of symbols
5524     # to exclude.
5525     # FIXME: what about values for MSVC?
5526     dll_entry=__cygwin_dll_entry@12
5527     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5528     case $host_os in
5529     mingw*)
5530       # mingw values
5531       dll_entry=_DllMainCRTStartup@12
5532       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5533       ;;
5534     esac
5535
5536     # mingw and cygwin differ, and it's simplest to just exclude the union
5537     # of the two symbol sets.
5538     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5539
5540     # recent cygwin and mingw systems supply a stub DllMain which the user
5541     # can override, but on older systems we have to supply one (in ltdll.c)
5542     if test "x$lt_cv_need_dllmain" = "xyes"; then
5543       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5544       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~
5545         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5546     else
5547       ltdll_obj=
5548       ltdll_cmds=
5549     fi
5550
5551     # Extract the symbol export list from an `--export-all' def file,
5552     # then regenerate the def file from the symbol export list, so that
5553     # the compiled dll only exports the symbol export list.
5554     # Be careful not to strip the DATA tag left be newer dlltools.
5555     export_symbols_cmds="$ltdll_cmds"'
5556       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5557       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5558
5559     # If the export-symbols file already is a .def file (1st line
5560     # is EXPORTS), use it as is.
5561     # If DATA tags from a recent dlltool are present, honour them!
5562     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5563         cp $export_symbols $output_objdir/$soname-def;
5564       else
5565         echo EXPORTS > $output_objdir/$soname-def;
5566         _lt_hint=1;
5567         cat $export_symbols | while read symbol; do
5568          set dummy \$symbol;
5569          case \$# in
5570            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5571            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5572            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5573          esac;
5574          _lt_hint=`expr 1 + \$_lt_hint`;
5575         done;
5576       fi~
5577       '"$ltdll_cmds"'
5578       $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~
5579       $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~
5580       $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~
5581       $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~
5582       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5583     ;;
5584
5585   netbsd*)
5586     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5587       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5588       wlarc=
5589     else
5590       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5591       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5592     fi
5593     ;;
5594
5595   solaris* | sysv5*)
5596     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5597       ld_shlibs=no
5598       cat <<EOF 1>&2
5599
5600 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5601 *** create shared libraries on Solaris systems.  Therefore, libtool
5602 *** is disabling shared libraries support.  We urge you to upgrade GNU
5603 *** binutils to release 2.9.1 or newer.  Another option is to modify
5604 *** your PATH or compiler configuration so that the native linker is
5605 *** used, and then restart.
5606
5607 EOF
5608     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5609       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5610       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5611     else
5612       ld_shlibs=no
5613     fi
5614     ;;
5615
5616   sunos4*)
5617     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5618     wlarc=
5619     hardcode_direct=yes
5620     hardcode_shlibpath_var=no
5621     ;;
5622
5623   *)
5624     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5625       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5626       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5627     else
5628       ld_shlibs=no
5629     fi
5630     ;;
5631   esac
5632
5633   if test "$ld_shlibs" = yes; then
5634     runpath_var=LD_RUN_PATH
5635     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5636     export_dynamic_flag_spec='${wl}--export-dynamic'
5637     case $host_os in
5638     cygwin* | mingw* | pw32*)
5639       # dlltool doesn't understand --whole-archive et. al.
5640       whole_archive_flag_spec=
5641       ;;
5642     *)
5643       # ancient GNU ld didn't support --whole-archive et. al.
5644       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5645         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5646       else
5647         whole_archive_flag_spec=
5648       fi
5649       ;;
5650     esac
5651   fi
5652 else
5653   # PORTME fill in a description of your system's linker (not GNU ld)
5654   case $host_os in
5655   aix3*)
5656     allow_undefined_flag=unsupported
5657     always_export_symbols=yes
5658     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'
5659     # Note: this linker hardcodes the directories in LIBPATH if there
5660     # are no directories specified by -L.
5661     hardcode_minus_L=yes
5662     if test "$GCC" = yes && test -z "$link_static_flag"; then
5663       # Neither direct hardcoding nor static linking is supported with a
5664       # broken collect2.
5665       hardcode_direct=unsupported
5666     fi
5667     ;;
5668
5669   aix4* | aix5*)
5670     if test "$host_cpu" = ia64; then
5671       # On IA64, the linker does run time linking by default, so we don't
5672       # have to do anything special.
5673       aix_use_runtimelinking=no
5674       exp_sym_flag='-Bexport'
5675       no_entry_flag=""
5676     else
5677       aix_use_runtimelinking=no
5678
5679       # Test if we are trying to use run time linking or normal
5680       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5681       # need to do runtime linking.
5682       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5683         for ld_flag in $LDFLAGS; do
5684           case $ld_flag in
5685           *-brtl*)
5686             aix_use_runtimelinking=yes
5687             break
5688           ;;
5689           esac
5690         done
5691       esac
5692
5693       exp_sym_flag='-bexport'
5694       no_entry_flag='-bnoentry'
5695     fi
5696
5697     # When large executables or shared objects are built, AIX ld can
5698     # have problems creating the table of contents.  If linking a library
5699     # or program results in "error TOC overflow" add -mminimal-toc to
5700     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5701     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5702
5703     hardcode_direct=yes
5704     archive_cmds=''
5705     hardcode_libdir_separator=':'
5706     if test "$GCC" = yes; then
5707       case $host_os in aix4.[012]|aix4.[012].*)
5708         collect2name=`${CC} -print-prog-name=collect2`
5709         if test -f "$collect2name" && \
5710           strings "$collect2name" | grep resolve_lib_name >/dev/null
5711         then
5712           # We have reworked collect2
5713           hardcode_direct=yes
5714         else
5715           # We have old collect2
5716           hardcode_direct=unsupported
5717           # It fails to find uninstalled libraries when the uninstalled
5718           # path is not listed in the libpath.  Setting hardcode_minus_L
5719           # to unsupported forces relinking
5720           hardcode_minus_L=yes
5721           hardcode_libdir_flag_spec='-L$libdir'
5722           hardcode_libdir_separator=
5723         fi
5724       esac
5725
5726       shared_flag='-shared'
5727     else
5728       # not using gcc
5729       if test "$host_cpu" = ia64; then
5730         shared_flag='${wl}-G'
5731       else
5732         if test "$aix_use_runtimelinking" = yes; then
5733           shared_flag='${wl}-G'
5734         else
5735           shared_flag='${wl}-bM:SRE'
5736         fi
5737       fi
5738     fi
5739
5740     # It seems that -bexpall can do strange things, so it is better to
5741     # generate a list of symbols to export.
5742     always_export_symbols=yes
5743     if test "$aix_use_runtimelinking" = yes; then
5744       # Warning - without using the other runtime loading flags (-brtl),
5745       # -berok will link without error, but may produce a broken library.
5746       allow_undefined_flag='-berok'
5747       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5748       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"
5749     else
5750       if test "$host_cpu" = ia64; then
5751         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5752         allow_undefined_flag="-z nodefs"
5753         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"
5754       else
5755         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5756         # Warning - without using the other run time loading flags,
5757         # -berok will link without error, but may produce a broken library.
5758         allow_undefined_flag='${wl}-berok'
5759         # This is a bit strange, but is similar to how AIX traditionally builds
5760         # it's shared libraries.
5761         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'
5762       fi
5763     fi
5764     ;;
5765
5766   amigaos*)
5767     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)'
5768     hardcode_libdir_flag_spec='-L$libdir'
5769     hardcode_minus_L=yes
5770     # see comment about different semantics on the GNU ld section
5771     ld_shlibs=no
5772     ;;
5773
5774   cygwin* | mingw* | pw32*)
5775     # When not using gcc, we currently assume that we are using
5776     # Microsoft Visual C++.
5777     # hardcode_libdir_flag_spec is actually meaningless, as there is
5778     # no search path for DLLs.
5779     hardcode_libdir_flag_spec=' '
5780     allow_undefined_flag=unsupported
5781     # Tell ltmain to make .lib files, not .a files.
5782     libext=lib
5783     # FIXME: Setting linknames here is a bad hack.
5784     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5785     # The linker will automatically build a .lib file if we build a DLL.
5786     old_archive_from_new_cmds='true'
5787     # FIXME: Should let the user specify the lib program.
5788     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5789     fix_srcfile_path='`cygpath -w "$srcfile"`'
5790     ;;
5791
5792   darwin* | rhapsody*)
5793     case "$host_os" in
5794     rhapsody* | darwin1.[012])
5795       allow_undefined_flag='-undefined suppress'
5796       ;;
5797     *) # Darwin 1.3 on
5798       allow_undefined_flag='-flat_namespace -undefined suppress'
5799       ;;
5800     esac
5801     # FIXME: Relying on posixy $() will cause problems for
5802     #        cross-compilation, but unfortunately the echo tests do not
5803     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5804     #        `"' quotes if we put them in here... so don't!
5805     archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
5806     # We need to add '_' to the symbols in $export_symbols first
5807     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5808     hardcode_direct=yes
5809     hardcode_shlibpath_var=no
5810     whole_archive_flag_spec='-all_load $convenience'
5811     ;;
5812
5813   freebsd1*)
5814     ld_shlibs=no
5815     ;;
5816
5817   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5818   # support.  Future versions do this automatically, but an explicit c++rt0.o
5819   # does not break anything, and helps significantly (at the cost of a little
5820   # extra space).
5821   freebsd2.2*)
5822     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5823     hardcode_libdir_flag_spec='-R$libdir'
5824     hardcode_direct=yes
5825     hardcode_shlibpath_var=no
5826     ;;
5827
5828   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5829   freebsd2*)
5830     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5831     hardcode_direct=yes
5832     hardcode_minus_L=yes
5833     hardcode_shlibpath_var=no
5834     ;;
5835
5836   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5837   freebsd*)
5838     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5839     hardcode_libdir_flag_spec='-R$libdir'
5840     hardcode_direct=yes
5841     hardcode_shlibpath_var=no
5842     ;;
5843
5844   hpux9* | hpux10* | hpux11*)
5845     case $host_os in
5846     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' ;;
5847     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5848     esac
5849     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5850     hardcode_libdir_separator=:
5851     hardcode_direct=yes
5852     hardcode_minus_L=yes # Not in the search PATH, but as the default
5853                          # location of the library.
5854     export_dynamic_flag_spec='${wl}-E'
5855     ;;
5856
5857   irix5* | irix6* | nonstopux*)
5858     if test "$GCC" = yes; then
5859       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'
5860       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5861     else
5862       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'
5863       hardcode_libdir_flag_spec='-rpath $libdir'
5864     fi
5865     hardcode_libdir_separator=:
5866     link_all_deplibs=yes
5867     ;;
5868
5869   netbsd*)
5870     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5871       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5872     else
5873       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5874     fi
5875     hardcode_libdir_flag_spec='-R$libdir'
5876     hardcode_direct=yes
5877     hardcode_shlibpath_var=no
5878     ;;
5879
5880   newsos6)
5881     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5882     hardcode_direct=yes
5883     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5884     hardcode_libdir_separator=:
5885     hardcode_shlibpath_var=no
5886     ;;
5887
5888   openbsd*)
5889     hardcode_direct=yes
5890     hardcode_shlibpath_var=no
5891     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5892       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5893       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5894       export_dynamic_flag_spec='${wl}-E'
5895     else
5896       case "$host_os" in
5897       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5898         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5899         hardcode_libdir_flag_spec='-R$libdir'
5900         ;;
5901       *)
5902         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5903         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5904         ;;
5905       esac
5906     fi
5907     ;;
5908
5909   os2*)
5910     hardcode_libdir_flag_spec='-L$libdir'
5911     hardcode_minus_L=yes
5912     allow_undefined_flag=unsupported
5913     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'
5914     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5915     ;;
5916
5917   osf3*)
5918     if test "$GCC" = yes; then
5919       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5920       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'
5921     else
5922       allow_undefined_flag=' -expect_unresolved \*'
5923       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'
5924     fi
5925     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5926     hardcode_libdir_separator=:
5927     ;;
5928
5929   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5930     if test "$GCC" = yes; then
5931       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5932       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'
5933       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5934     else
5935       allow_undefined_flag=' -expect_unresolved \*'
5936       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'
5937       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5938       $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'
5939
5940       #Both c and cxx compiler support -rpath directly
5941       hardcode_libdir_flag_spec='-rpath $libdir'
5942     fi
5943     hardcode_libdir_separator=:
5944     ;;
5945
5946   sco3.2v5*)
5947     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5948     hardcode_shlibpath_var=no
5949     runpath_var=LD_RUN_PATH
5950     hardcode_runpath_var=yes
5951     export_dynamic_flag_spec='${wl}-Bexport'
5952     ;;
5953
5954   solaris*)
5955     # gcc --version < 3.0 without binutils cannot create self contained
5956     # shared libraries reliably, requiring libgcc.a to resolve some of
5957     # the object symbols generated in some cases.  Libraries that use
5958     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5959     # a copy of libgcc.a into every shared library to guarantee resolving
5960     # such symbols causes other problems:  According to Tim Van Holder
5961     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5962     # (to the application) exception stack for one thing.
5963     no_undefined_flag=' -z defs'
5964     if test "$GCC" = yes; then
5965       case `$CC --version 2>/dev/null` in
5966       [12].*)
5967         cat <<EOF 1>&2
5968
5969 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5970 *** create self contained shared libraries on Solaris systems, without
5971 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5972 *** -no-undefined support, which will at least allow you to build shared
5973 *** libraries.  However, you may find that when you link such libraries
5974 *** into an application without using GCC, you have to manually add
5975 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5976 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5977 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5978
5979 EOF
5980         no_undefined_flag=
5981         ;;
5982       esac
5983     fi
5984     # $CC -shared without GNU ld will not create a library from C++
5985     # object files and a static libstdc++, better avoid it by now
5986     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5987     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5988                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5989     hardcode_libdir_flag_spec='-R$libdir'
5990     hardcode_shlibpath_var=no
5991     case $host_os in
5992     solaris2.[0-5] | solaris2.[0-5].*) ;;
5993     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5994       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5995     esac
5996     link_all_deplibs=yes
5997     ;;
5998
5999   sunos4*)
6000     if test "x$host_vendor" = xsequent; then
6001       # Use $CC to link under sequent, because it throws in some extra .o
6002       # files that make .init and .fini sections work.
6003       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6004     else
6005       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6006     fi
6007     hardcode_libdir_flag_spec='-L$libdir'
6008     hardcode_direct=yes
6009     hardcode_minus_L=yes
6010     hardcode_shlibpath_var=no
6011     ;;
6012
6013   sysv4)
6014     case $host_vendor in
6015       sni)
6016         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6017         hardcode_direct=yes # is this really true???
6018         ;;
6019       siemens)
6020         ## LD is ld it makes a PLAMLIB
6021         ## CC just makes a GrossModule.
6022         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6023         reload_cmds='$CC -r -o $output$reload_objs'
6024         hardcode_direct=no
6025         ;;
6026       motorola)
6027         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6028         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6029         ;;
6030     esac
6031     runpath_var='LD_RUN_PATH'
6032     hardcode_shlibpath_var=no
6033     ;;
6034
6035   sysv4.3*)
6036     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6037     hardcode_shlibpath_var=no
6038     export_dynamic_flag_spec='-Bexport'
6039     ;;
6040
6041   sysv5*)
6042     no_undefined_flag=' -z text'
6043     # $CC -shared without GNU ld will not create a library from C++
6044     # object files and a static libstdc++, better avoid it by now
6045     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6046     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6047                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6048     hardcode_libdir_flag_spec=
6049     hardcode_shlibpath_var=no
6050     runpath_var='LD_RUN_PATH'
6051     ;;
6052
6053   uts4*)
6054     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6055     hardcode_libdir_flag_spec='-L$libdir'
6056     hardcode_shlibpath_var=no
6057     ;;
6058
6059   dgux*)
6060     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6061     hardcode_libdir_flag_spec='-L$libdir'
6062     hardcode_shlibpath_var=no
6063     ;;
6064
6065   sysv4*MP*)
6066     if test -d /usr/nec; then
6067       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6068       hardcode_shlibpath_var=no
6069       runpath_var=LD_RUN_PATH
6070       hardcode_runpath_var=yes
6071       ld_shlibs=yes
6072     fi
6073     ;;
6074
6075   sysv4.2uw2*)
6076     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6077     hardcode_direct=yes
6078     hardcode_minus_L=no
6079     hardcode_shlibpath_var=no
6080     hardcode_runpath_var=yes
6081     runpath_var=LD_RUN_PATH
6082     ;;
6083
6084   sysv5uw7* | unixware7*)
6085     no_undefined_flag='${wl}-z ${wl}text'
6086     if test "$GCC" = yes; then
6087       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6088     else
6089       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6090     fi
6091     runpath_var='LD_RUN_PATH'
6092     hardcode_shlibpath_var=no
6093     ;;
6094
6095   *)
6096     ld_shlibs=no
6097     ;;
6098   esac
6099 fi
6100 echo "$ac_t""$ld_shlibs" 1>&6
6101 test "$ld_shlibs" = no && can_build_shared=no
6102 ##
6103 ## END FIXME
6104
6105 ## FIXME: this should be a separate macro
6106 ##
6107 # Check hardcoding attributes.
6108 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6109 echo "configure:6110: checking how to hardcode library paths into programs" >&5
6110 hardcode_action=
6111 if test -n "$hardcode_libdir_flag_spec" || \
6112    test -n "$runpath_var"; then
6113
6114   # We can hardcode non-existant directories.
6115   if test "$hardcode_direct" != no &&
6116      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6117      # have to relink, otherwise we might link with an installed library
6118      # when we should be linking with a yet-to-be-installed one
6119      ## test "$hardcode_shlibpath_var" != no &&
6120      test "$hardcode_minus_L" != no; then
6121     # Linking always hardcodes the temporary library directory.
6122     hardcode_action=relink
6123   else
6124     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6125     hardcode_action=immediate
6126   fi
6127 else
6128   # We cannot hardcode anything, or else we can only hardcode existing
6129   # directories.
6130   hardcode_action=unsupported
6131 fi
6132 echo "$ac_t""$hardcode_action" 1>&6
6133 ##
6134 ## END FIXME
6135
6136 ## FIXME: this should be a separate macro
6137 ##
6138 striplib=
6139 old_striplib=
6140 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6141 echo "configure:6142: checking whether stripping libraries is possible" >&5
6142 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6143   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6144   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6145   echo "$ac_t""yes" 1>&6
6146 else
6147   echo "$ac_t""no" 1>&6
6148 fi
6149 ##
6150 ## END FIXME
6151
6152 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6153 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6154
6155 ## FIXME: this should be a separate macro
6156 ##
6157 # PORTME Fill in your ld.so characteristics
6158 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6159 echo "configure:6160: checking dynamic linker characteristics" >&5
6160 library_names_spec=
6161 libname_spec='lib$name'
6162 soname_spec=
6163 postinstall_cmds=
6164 postuninstall_cmds=
6165 finish_cmds=
6166 finish_eval=
6167 shlibpath_var=
6168 shlibpath_overrides_runpath=unknown
6169 version_type=none
6170 dynamic_linker="$host_os ld.so"
6171 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6172 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6173
6174 case $host_os in
6175 aix3*)
6176   version_type=linux
6177   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6178   shlibpath_var=LIBPATH
6179
6180   # AIX has no versioning support, so we append a major version to the name.
6181   soname_spec='${libname}${release}.so$major'
6182   ;;
6183
6184 aix4* | aix5*)
6185   version_type=linux
6186   need_lib_prefix=no
6187   need_version=no
6188   hardcode_into_libs=yes
6189   if test "$host_cpu" = ia64; then
6190     # AIX 5 supports IA64
6191     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6192     shlibpath_var=LD_LIBRARY_PATH
6193   else
6194     # With GCC up to 2.95.x, collect2 would create an import file
6195     # for dependence libraries.  The import file would start with
6196     # the line `#! .'.  This would cause the generated library to
6197     # depend on `.', always an invalid library.  This was fixed in
6198     # development snapshots of GCC prior to 3.0.
6199     case $host_os in
6200       aix4 | aix4.[01] | aix4.[01].*)
6201         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6202              echo ' yes '
6203              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6204           :
6205         else
6206           can_build_shared=no
6207         fi
6208         ;;
6209     esac
6210     # AIX (on Power*) has no versioning support, so currently we can
6211     # not hardcode correct soname into executable. Probably we can
6212     # add versioning support to collect2, so additional links can
6213     # be useful in future.
6214     if test "$aix_use_runtimelinking" = yes; then
6215       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6216       # instead of lib<name>.a to let people know that these are not
6217       # typical AIX shared libraries.
6218       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6219     else
6220       # We preserve .a as extension for shared libraries through AIX4.2
6221       # and later when we are not doing run time linking.
6222       library_names_spec='${libname}${release}.a $libname.a'
6223       soname_spec='${libname}${release}.so$major'
6224     fi
6225     shlibpath_var=LIBPATH
6226   fi
6227   hardcode_into_libs=yes
6228   ;;
6229
6230 amigaos*)
6231   library_names_spec='$libname.ixlibrary $libname.a'
6232   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6233   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'
6234   ;;
6235
6236 beos*)
6237   library_names_spec='${libname}.so'
6238   dynamic_linker="$host_os ld.so"
6239   shlibpath_var=LIBRARY_PATH
6240   ;;
6241
6242 bsdi4*)
6243   version_type=linux
6244   need_version=no
6245   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6246   soname_spec='${libname}${release}.so$major'
6247   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6248   shlibpath_var=LD_LIBRARY_PATH
6249   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6250   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6251   export_dynamic_flag_spec=-rdynamic
6252   # the default ld.so.conf also contains /usr/contrib/lib and
6253   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6254   # libtool to hard-code these into programs
6255   ;;
6256
6257 cygwin* | mingw* | pw32*)
6258   version_type=windows
6259   need_version=no
6260   need_lib_prefix=no
6261   case $GCC,$host_os in
6262   yes,cygwin*)
6263     library_names_spec='$libname.dll.a'
6264     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6265     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6266       dldir=$destdir/`dirname \$dlpath`~
6267       test -d \$dldir || mkdir -p \$dldir~
6268       $install_prog .libs/$dlname \$dldir/$dlname'
6269     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6270       dlpath=$dir/\$dldll~
6271        $rm \$dlpath'
6272     ;;
6273   yes,mingw*)
6274     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6275     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6276     ;;
6277   yes,pw32*)
6278     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6279     ;;
6280   *)
6281     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6282     ;;
6283   esac
6284   dynamic_linker='Win32 ld.exe'
6285   # FIXME: first we should search . and the directory the executable is in
6286   shlibpath_var=PATH
6287   ;;
6288
6289 darwin* | rhapsody*)
6290   dynamic_linker="$host_os dyld"
6291   version_type=darwin
6292   need_lib_prefix=no
6293   need_version=no
6294   # FIXME: Relying on posixy $() will cause problems for
6295   #        cross-compilation, but unfortunately the echo tests do not
6296   #        yet detect zsh echo's removal of \ escapes.
6297   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)'
6298   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6299   shlibpath_overrides_runpath=yes
6300   shlibpath_var=DYLD_LIBRARY_PATH
6301   ;;
6302
6303 freebsd1*)
6304   dynamic_linker=no
6305   ;;
6306
6307 freebsd*)
6308   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6309   version_type=freebsd-$objformat
6310   case $version_type in
6311     freebsd-elf*)
6312       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6313       need_version=no
6314       need_lib_prefix=no
6315       ;;
6316     freebsd-*)
6317       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6318       need_version=yes
6319       ;;
6320   esac
6321   shlibpath_var=LD_LIBRARY_PATH
6322   case $host_os in
6323   freebsd2*)
6324     shlibpath_overrides_runpath=yes
6325     ;;
6326   *)
6327     shlibpath_overrides_runpath=no
6328     hardcode_into_libs=yes
6329     ;;
6330   esac
6331   ;;
6332
6333 gnu*)
6334   version_type=linux
6335   need_lib_prefix=no
6336   need_version=no
6337   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6338   soname_spec='${libname}${release}.so$major'
6339   shlibpath_var=LD_LIBRARY_PATH
6340   hardcode_into_libs=yes
6341   ;;
6342
6343 hpux9* | hpux10* | hpux11*)
6344   # Give a soname corresponding to the major version so that dld.sl refuses to
6345   # link against other versions.
6346   dynamic_linker="$host_os dld.sl"
6347   version_type=sunos
6348   need_lib_prefix=no
6349   need_version=no
6350   shlibpath_var=SHLIB_PATH
6351   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6352   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6353   soname_spec='${libname}${release}.sl$major'
6354   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6355   postinstall_cmds='chmod 555 $lib'
6356   ;;
6357
6358 irix5* | irix6* | nonstopux*)
6359   case $host_os in
6360     nonstopux*) version_type=nonstopux ;;
6361     *)          version_type=irix ;;
6362   esac
6363   need_lib_prefix=no
6364   need_version=no
6365   soname_spec='${libname}${release}.so$major'
6366   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6367   case $host_os in
6368   irix5* | nonstopux*)
6369     libsuff= shlibsuff=
6370     ;;
6371   *)
6372     case $LD in # libtool.m4 will add one of these switches to LD
6373     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6374     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6375     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6376     *) libsuff= shlibsuff= libmagic=never-match;;
6377     esac
6378     ;;
6379   esac
6380   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6381   shlibpath_overrides_runpath=no
6382   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6383   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6384   ;;
6385
6386 # No shared lib support for Linux oldld, aout, or coff.
6387 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6388   dynamic_linker=no
6389   ;;
6390
6391 # This must be Linux ELF.
6392 linux-gnu*)
6393   version_type=linux
6394   need_lib_prefix=no
6395   need_version=no
6396   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6397   soname_spec='${libname}${release}.so$major'
6398   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6399   shlibpath_var=LD_LIBRARY_PATH
6400   shlibpath_overrides_runpath=no
6401   # This implies no fast_install, which is unacceptable.
6402   # Some rework will be needed to allow for fast_install
6403   # before this can be enabled.
6404   hardcode_into_libs=yes
6405
6406   # We used to test for /lib/ld.so.1 and disable shared libraries on
6407   # powerpc, because MkLinux only supported shared libraries with the
6408   # GNU dynamic linker.  Since this was broken with cross compilers,
6409   # most powerpc-linux boxes support dynamic linking these days and
6410   # people can always --disable-shared, the test was removed, and we
6411   # assume the GNU/Linux dynamic linker is in use.
6412   dynamic_linker='GNU/Linux ld.so'
6413   ;;
6414
6415 netbsd*)
6416   version_type=sunos
6417   need_lib_prefix=no
6418   need_version=no
6419   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6420     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6421     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6422     dynamic_linker='NetBSD (a.out) ld.so'
6423   else
6424     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6425     soname_spec='${libname}${release}.so$major'
6426     dynamic_linker='NetBSD ld.elf_so'
6427   fi
6428   shlibpath_var=LD_LIBRARY_PATH
6429   shlibpath_overrides_runpath=yes
6430   hardcode_into_libs=yes
6431   ;;
6432
6433 newsos6)
6434   version_type=linux
6435   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6436   shlibpath_var=LD_LIBRARY_PATH
6437   shlibpath_overrides_runpath=yes
6438   ;;
6439
6440 openbsd*)
6441   version_type=sunos
6442   need_lib_prefix=no
6443   need_version=no
6444   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6445     case "$host_os" in
6446     openbsd2.[89] | openbsd2.[89].*)
6447       shlibpath_overrides_runpath=no
6448       ;;
6449     *)
6450       shlibpath_overrides_runpath=yes
6451       ;;
6452     esac
6453   else
6454     shlibpath_overrides_runpath=yes
6455   fi
6456   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6457   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6458   shlibpath_var=LD_LIBRARY_PATH
6459   ;;
6460
6461 os2*)
6462   libname_spec='$name'
6463   need_lib_prefix=no
6464   library_names_spec='$libname.dll $libname.a'
6465   dynamic_linker='OS/2 ld.exe'
6466   shlibpath_var=LIBPATH
6467   ;;
6468
6469 osf3* | osf4* | osf5*)
6470   version_type=osf
6471   need_version=no
6472   soname_spec='${libname}${release}.so$major'
6473   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6474   shlibpath_var=LD_LIBRARY_PATH
6475   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6476   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6477   hardcode_into_libs=yes
6478   ;;
6479
6480 sco3.2v5*)
6481   version_type=osf
6482   soname_spec='${libname}${release}.so$major'
6483   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6484   shlibpath_var=LD_LIBRARY_PATH
6485   ;;
6486
6487 solaris*)
6488   version_type=linux
6489   need_lib_prefix=no
6490   need_version=no
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   shlibpath_overrides_runpath=yes
6495   hardcode_into_libs=yes
6496   # ldd complains unless libraries are executable
6497   postinstall_cmds='chmod +x $lib'
6498   ;;
6499
6500 sunos4*)
6501   version_type=sunos
6502   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6503   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6504   shlibpath_var=LD_LIBRARY_PATH
6505   shlibpath_overrides_runpath=yes
6506   if test "$with_gnu_ld" = yes; then
6507     need_lib_prefix=no
6508   fi
6509   need_version=yes
6510   ;;
6511
6512 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6513   version_type=linux
6514   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6515   soname_spec='${libname}${release}.so$major'
6516   shlibpath_var=LD_LIBRARY_PATH
6517   case $host_vendor in
6518     sni)
6519       shlibpath_overrides_runpath=no
6520       need_lib_prefix=no
6521       export_dynamic_flag_spec='${wl}-Blargedynsym'
6522       runpath_var=LD_RUN_PATH
6523       ;;
6524     siemens)
6525       need_lib_prefix=no
6526       ;;
6527     motorola)
6528       need_lib_prefix=no
6529       need_version=no
6530       shlibpath_overrides_runpath=no
6531       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6532       ;;
6533   esac
6534   ;;
6535
6536 uts4*)
6537   version_type=linux
6538   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6539   soname_spec='${libname}${release}.so$major'
6540   shlibpath_var=LD_LIBRARY_PATH
6541   ;;
6542
6543 dgux*)
6544   version_type=linux
6545   need_lib_prefix=no
6546   need_version=no
6547   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6548   soname_spec='${libname}${release}.so$major'
6549   shlibpath_var=LD_LIBRARY_PATH
6550   ;;
6551
6552 sysv4*MP*)
6553   if test -d /usr/nec ;then
6554     version_type=linux
6555     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6556     soname_spec='$libname.so.$major'
6557     shlibpath_var=LD_LIBRARY_PATH
6558   fi
6559   ;;
6560
6561 *)
6562   dynamic_linker=no
6563   ;;
6564 esac
6565 echo "$ac_t""$dynamic_linker" 1>&6
6566 test "$dynamic_linker" = no && can_build_shared=no
6567 ##
6568 ## END FIXME
6569
6570 ## FIXME: this should be a separate macro
6571 ##
6572 # Report the final consequences.
6573 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6574 echo "configure:6575: checking if libtool supports shared libraries" >&5
6575 echo "$ac_t""$can_build_shared" 1>&6
6576 ##
6577 ## END FIXME
6578
6579 ## FIXME: this should be a separate macro
6580 ##
6581 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6582 echo "configure:6583: checking whether to build shared libraries" >&5
6583 test "$can_build_shared" = "no" && enable_shared=no
6584
6585 # On AIX, shared libraries and static libraries use the same namespace, and
6586 # are all built from PIC.
6587 case "$host_os" in
6588 aix3*)
6589   test "$enable_shared" = yes && enable_static=no
6590   if test -n "$RANLIB"; then
6591     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6592     postinstall_cmds='$RANLIB $lib'
6593   fi
6594   ;;
6595
6596 aix4*)
6597   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6598     test "$enable_shared" = yes && enable_static=no
6599   fi
6600   ;;
6601 esac
6602 echo "$ac_t""$enable_shared" 1>&6
6603 ##
6604 ## END FIXME
6605
6606 ## FIXME: this should be a separate macro
6607 ##
6608 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6609 echo "configure:6610: checking whether to build static libraries" >&5
6610 # Make sure either enable_shared or enable_static is yes.
6611 test "$enable_shared" = yes || enable_static=yes
6612 echo "$ac_t""$enable_static" 1>&6
6613 ##
6614 ## END FIXME
6615
6616 if test "$hardcode_action" = relink; then
6617   # Fast installation is not supported
6618   enable_fast_install=no
6619 elif test "$shlibpath_overrides_runpath" = yes ||
6620      test "$enable_shared" = no; then
6621   # Fast installation is not necessary
6622   enable_fast_install=needless
6623 fi
6624
6625 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6626 if test "$GCC" = yes; then
6627   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6628 fi
6629
6630 if test "x$enable_dlopen" != xyes; then
6631   enable_dlopen=unknown
6632   enable_dlopen_self=unknown
6633   enable_dlopen_self_static=unknown
6634 else
6635   lt_cv_dlopen=no
6636   lt_cv_dlopen_libs=
6637
6638   case $host_os in
6639   beos*)
6640     lt_cv_dlopen="load_add_on"
6641     lt_cv_dlopen_libs=
6642     lt_cv_dlopen_self=yes
6643     ;;
6644
6645   cygwin* | mingw* | pw32*)
6646     lt_cv_dlopen="LoadLibrary"
6647     lt_cv_dlopen_libs=
6648    ;;
6649
6650   *)
6651     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6652 echo "configure:6653: checking for shl_load" >&5
6653 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6654   echo $ac_n "(cached) $ac_c" 1>&6
6655 else
6656   cat > conftest.$ac_ext <<EOF
6657 #line 6658 "configure"
6658 #include "confdefs.h"
6659 /* System header to define __stub macros and hopefully few prototypes,
6660     which can conflict with char shl_load(); below.  */
6661 #include <assert.h>
6662 /* Override any gcc2 internal prototype to avoid an error.  */
6663 /* We use char because int might match the return type of a gcc2
6664     builtin and then its argument prototype would still apply.  */
6665 char shl_load();
6666 char (*f)();
6667
6668 int main() {
6669
6670 /* The GNU C library defines this for functions which it implements
6671     to always fail with ENOSYS.  Some functions are actually named
6672     something starting with __ and the normal name is an alias.  */
6673 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6674 choke me
6675 #else
6676 f = shl_load;
6677 #endif
6678
6679 ; return 0; }
6680 EOF
6681 if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6682   rm -rf conftest*
6683   eval "ac_cv_func_shl_load=yes"
6684 else
6685   echo "configure: failed program was:" >&5
6686   cat conftest.$ac_ext >&5
6687   rm -rf conftest*
6688   eval "ac_cv_func_shl_load=no"
6689 fi
6690 rm -f conftest*
6691 fi
6692
6693 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6694   echo "$ac_t""yes" 1>&6
6695   lt_cv_dlopen="shl_load"
6696 else
6697   echo "$ac_t""no" 1>&6
6698 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6699 echo "configure:6700: checking for shl_load in -ldld" >&5
6700 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6701 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   ac_save_LIBS="$LIBS"
6705 LIBS="-ldld  $LIBS"
6706 cat > conftest.$ac_ext <<EOF
6707 #line 6708 "configure"
6708 #include "confdefs.h"
6709 /* Override any gcc2 internal prototype to avoid an error.  */
6710 /* We use char because int might match the return type of a gcc2
6711     builtin and then its argument prototype would still apply.  */
6712 char shl_load();
6713
6714 int main() {
6715 shl_load()
6716 ; return 0; }
6717 EOF
6718 if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6719   rm -rf conftest*
6720   eval "ac_cv_lib_$ac_lib_var=yes"
6721 else
6722   echo "configure: failed program was:" >&5
6723   cat conftest.$ac_ext >&5
6724   rm -rf conftest*
6725   eval "ac_cv_lib_$ac_lib_var=no"
6726 fi
6727 rm -f conftest*
6728 LIBS="$ac_save_LIBS"
6729
6730 fi
6731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6732   echo "$ac_t""yes" 1>&6
6733   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6734 else
6735   echo "$ac_t""no" 1>&6
6736 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6737 echo "configure:6738: checking for dlopen" >&5
6738 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6739   echo $ac_n "(cached) $ac_c" 1>&6
6740 else
6741   cat > conftest.$ac_ext <<EOF
6742 #line 6743 "configure"
6743 #include "confdefs.h"
6744 /* System header to define __stub macros and hopefully few prototypes,
6745     which can conflict with char dlopen(); below.  */
6746 #include <assert.h>
6747 /* Override any gcc2 internal prototype to avoid an error.  */
6748 /* We use char because int might match the return type of a gcc2
6749     builtin and then its argument prototype would still apply.  */
6750 char dlopen();
6751 char (*f)();
6752
6753 int main() {
6754
6755 /* The GNU C library defines this for functions which it implements
6756     to always fail with ENOSYS.  Some functions are actually named
6757     something starting with __ and the normal name is an alias.  */
6758 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6759 choke me
6760 #else
6761 f = dlopen;
6762 #endif
6763
6764 ; return 0; }
6765 EOF
6766 if { (eval echo configure:6767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6767   rm -rf conftest*
6768   eval "ac_cv_func_dlopen=yes"
6769 else
6770   echo "configure: failed program was:" >&5
6771   cat conftest.$ac_ext >&5
6772   rm -rf conftest*
6773   eval "ac_cv_func_dlopen=no"
6774 fi
6775 rm -f conftest*
6776 fi
6777
6778 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6779   echo "$ac_t""yes" 1>&6
6780   lt_cv_dlopen="dlopen"
6781 else
6782   echo "$ac_t""no" 1>&6
6783 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6784 echo "configure:6785: checking for dlopen in -ldl" >&5
6785 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6786 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6787   echo $ac_n "(cached) $ac_c" 1>&6
6788 else
6789   ac_save_LIBS="$LIBS"
6790 LIBS="-ldl  $LIBS"
6791 cat > conftest.$ac_ext <<EOF
6792 #line 6793 "configure"
6793 #include "confdefs.h"
6794 /* Override any gcc2 internal prototype to avoid an error.  */
6795 /* We use char because int might match the return type of a gcc2
6796     builtin and then its argument prototype would still apply.  */
6797 char dlopen();
6798
6799 int main() {
6800 dlopen()
6801 ; return 0; }
6802 EOF
6803 if { (eval echo configure:6804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6804   rm -rf conftest*
6805   eval "ac_cv_lib_$ac_lib_var=yes"
6806 else
6807   echo "configure: failed program was:" >&5
6808   cat conftest.$ac_ext >&5
6809   rm -rf conftest*
6810   eval "ac_cv_lib_$ac_lib_var=no"
6811 fi
6812 rm -f conftest*
6813 LIBS="$ac_save_LIBS"
6814
6815 fi
6816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6817   echo "$ac_t""yes" 1>&6
6818   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6819 else
6820   echo "$ac_t""no" 1>&6
6821 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6822 echo "configure:6823: checking for dlopen in -lsvld" >&5
6823 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6824 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6825   echo $ac_n "(cached) $ac_c" 1>&6
6826 else
6827   ac_save_LIBS="$LIBS"
6828 LIBS="-lsvld  $LIBS"
6829 cat > conftest.$ac_ext <<EOF
6830 #line 6831 "configure"
6831 #include "confdefs.h"
6832 /* Override any gcc2 internal prototype to avoid an error.  */
6833 /* We use char because int might match the return type of a gcc2
6834     builtin and then its argument prototype would still apply.  */
6835 char dlopen();
6836
6837 int main() {
6838 dlopen()
6839 ; return 0; }
6840 EOF
6841 if { (eval echo configure:6842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6842   rm -rf conftest*
6843   eval "ac_cv_lib_$ac_lib_var=yes"
6844 else
6845   echo "configure: failed program was:" >&5
6846   cat conftest.$ac_ext >&5
6847   rm -rf conftest*
6848   eval "ac_cv_lib_$ac_lib_var=no"
6849 fi
6850 rm -f conftest*
6851 LIBS="$ac_save_LIBS"
6852
6853 fi
6854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6855   echo "$ac_t""yes" 1>&6
6856   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6857 else
6858   echo "$ac_t""no" 1>&6
6859 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6860 echo "configure:6861: checking for dld_link in -ldld" >&5
6861 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6862 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6863   echo $ac_n "(cached) $ac_c" 1>&6
6864 else
6865   ac_save_LIBS="$LIBS"
6866 LIBS="-ldld  $LIBS"
6867 cat > conftest.$ac_ext <<EOF
6868 #line 6869 "configure"
6869 #include "confdefs.h"
6870 /* Override any gcc2 internal prototype to avoid an error.  */
6871 /* We use char because int might match the return type of a gcc2
6872     builtin and then its argument prototype would still apply.  */
6873 char dld_link();
6874
6875 int main() {
6876 dld_link()
6877 ; return 0; }
6878 EOF
6879 if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6880   rm -rf conftest*
6881   eval "ac_cv_lib_$ac_lib_var=yes"
6882 else
6883   echo "configure: failed program was:" >&5
6884   cat conftest.$ac_ext >&5
6885   rm -rf conftest*
6886   eval "ac_cv_lib_$ac_lib_var=no"
6887 fi
6888 rm -f conftest*
6889 LIBS="$ac_save_LIBS"
6890
6891 fi
6892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6893   echo "$ac_t""yes" 1>&6
6894   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6895 else
6896   echo "$ac_t""no" 1>&6
6897 fi
6898
6899               
6900 fi
6901
6902             
6903 fi
6904
6905           
6906 fi
6907
6908         
6909 fi
6910
6911       
6912 fi
6913
6914     ;;
6915   esac
6916
6917   if test "x$lt_cv_dlopen" != xno; then
6918     enable_dlopen=yes
6919   else
6920     enable_dlopen=no
6921   fi
6922
6923   case $lt_cv_dlopen in
6924   dlopen)
6925     save_CPPFLAGS="$CPPFLAGS"
6926         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6927
6928     save_LDFLAGS="$LDFLAGS"
6929     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6930
6931     save_LIBS="$LIBS"
6932     LIBS="$lt_cv_dlopen_libs $LIBS"
6933
6934     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6935 echo "configure:6936: checking whether a program can dlopen itself" >&5
6936 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6937   echo $ac_n "(cached) $ac_c" 1>&6
6938 else
6939           if test "$cross_compiling" = yes; then :
6940   lt_cv_dlopen_self=cross
6941 else
6942     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6943   lt_status=$lt_dlunknown
6944   cat > conftest.$ac_ext <<EOF
6945 #line 6946 "configure"
6946 #include "confdefs.h"
6947
6948 #if HAVE_DLFCN_H
6949 #include <dlfcn.h>
6950 #endif
6951
6952 #include <stdio.h>
6953
6954 #ifdef RTLD_GLOBAL
6955 #  define LT_DLGLOBAL           RTLD_GLOBAL
6956 #else
6957 #  ifdef DL_GLOBAL
6958 #    define LT_DLGLOBAL         DL_GLOBAL
6959 #  else
6960 #    define LT_DLGLOBAL         0
6961 #  endif
6962 #endif
6963
6964 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6965    find out it does not work in some platform. */
6966 #ifndef LT_DLLAZY_OR_NOW
6967 #  ifdef RTLD_LAZY
6968 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6969 #  else
6970 #    ifdef DL_LAZY
6971 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6972 #    else
6973 #      ifdef RTLD_NOW
6974 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6975 #      else
6976 #        ifdef DL_NOW
6977 #          define LT_DLLAZY_OR_NOW      DL_NOW
6978 #        else
6979 #          define LT_DLLAZY_OR_NOW      0
6980 #        endif
6981 #      endif
6982 #    endif
6983 #  endif
6984 #endif
6985
6986 #ifdef __cplusplus
6987 extern "C" void exit (int);
6988 #endif
6989
6990 void fnord() { int i=42;}
6991 int main ()
6992 {
6993   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6994   int status = $lt_dlunknown;
6995
6996   if (self)
6997     {
6998       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6999       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7000       /* dlclose (self); */
7001     }
7002
7003     exit (status);
7004 }
7005 EOF
7006   if { (eval echo configure:7007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7007     (./conftest; exit; ) 2>/dev/null
7008     lt_status=$?
7009     case x$lt_status in
7010       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7011       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7012       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7013     esac
7014   else :
7015     # compilation failed
7016     lt_cv_dlopen_self=no
7017   fi
7018 fi
7019 rm -fr conftest*
7020
7021     
7022 fi
7023
7024 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7025
7026     if test "x$lt_cv_dlopen_self" = xyes; then
7027       LDFLAGS="$LDFLAGS $link_static_flag"
7028       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7029 echo "configure:7030: checking whether a statically linked program can dlopen itself" >&5
7030 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7031   echo $ac_n "(cached) $ac_c" 1>&6
7032 else
7033           if test "$cross_compiling" = yes; then :
7034   lt_cv_dlopen_self_static=cross
7035 else
7036     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7037   lt_status=$lt_dlunknown
7038   cat > conftest.$ac_ext <<EOF
7039 #line 7040 "configure"
7040 #include "confdefs.h"
7041
7042 #if HAVE_DLFCN_H
7043 #include <dlfcn.h>
7044 #endif
7045
7046 #include <stdio.h>
7047
7048 #ifdef RTLD_GLOBAL
7049 #  define LT_DLGLOBAL           RTLD_GLOBAL
7050 #else
7051 #  ifdef DL_GLOBAL
7052 #    define LT_DLGLOBAL         DL_GLOBAL
7053 #  else
7054 #    define LT_DLGLOBAL         0
7055 #  endif
7056 #endif
7057
7058 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7059    find out it does not work in some platform. */
7060 #ifndef LT_DLLAZY_OR_NOW
7061 #  ifdef RTLD_LAZY
7062 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7063 #  else
7064 #    ifdef DL_LAZY
7065 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7066 #    else
7067 #      ifdef RTLD_NOW
7068 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7069 #      else
7070 #        ifdef DL_NOW
7071 #          define LT_DLLAZY_OR_NOW      DL_NOW
7072 #        else
7073 #          define LT_DLLAZY_OR_NOW      0
7074 #        endif
7075 #      endif
7076 #    endif
7077 #  endif
7078 #endif
7079
7080 #ifdef __cplusplus
7081 extern "C" void exit (int);
7082 #endif
7083
7084 void fnord() { int i=42;}
7085 int main ()
7086 {
7087   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7088   int status = $lt_dlunknown;
7089
7090   if (self)
7091     {
7092       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7093       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7094       /* dlclose (self); */
7095     }
7096
7097     exit (status);
7098 }
7099 EOF
7100   if { (eval echo configure:7101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7101     (./conftest; exit; ) 2>/dev/null
7102     lt_status=$?
7103     case x$lt_status in
7104       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7105       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7106       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7107     esac
7108   else :
7109     # compilation failed
7110     lt_cv_dlopen_self_static=no
7111   fi
7112 fi
7113 rm -fr conftest*
7114
7115       
7116 fi
7117
7118 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7119     fi
7120
7121     CPPFLAGS="$save_CPPFLAGS"
7122     LDFLAGS="$save_LDFLAGS"
7123     LIBS="$save_LIBS"
7124     ;;
7125   esac
7126
7127   case $lt_cv_dlopen_self in
7128   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7129   *) enable_dlopen_self=unknown ;;
7130   esac
7131
7132   case $lt_cv_dlopen_self_static in
7133   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7134   *) enable_dlopen_self_static=unknown ;;
7135   esac
7136 fi
7137
7138
7139 ## FIXME: this should be a separate macro
7140 ##
7141 if test "$enable_shared" = yes && test "$GCC" = yes; then
7142   case $archive_cmds in
7143   *'~'*)
7144     # FIXME: we may have to deal with multi-command sequences.
7145     ;;
7146   '$CC '*)
7147     # Test whether the compiler implicitly links with -lc since on some
7148     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7149     # to ld, don't add -lc before -lgcc.
7150     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7151 echo "configure:7152: checking whether -lc should be explicitly linked in" >&5
7152     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7153   echo $ac_n "(cached) $ac_c" 1>&6
7154 else
7155   $rm conftest*
7156     echo 'static int dummy;' > conftest.$ac_ext
7157
7158     if { (eval echo configure:7159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7159       soname=conftest
7160       lib=conftest
7161       libobjs=conftest.$ac_objext
7162       deplibs=
7163       wl=$lt_cv_prog_cc_wl
7164       compiler_flags=-v
7165       linker_flags=-v
7166       verstring=
7167       output_objdir=.
7168       libname=conftest
7169       save_allow_undefined_flag=$allow_undefined_flag
7170       allow_undefined_flag=
7171       if { (eval echo configure:7172: \"$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; }
7172       then
7173         lt_cv_archive_cmds_need_lc=no
7174       else
7175         lt_cv_archive_cmds_need_lc=yes
7176       fi
7177       allow_undefined_flag=$save_allow_undefined_flag
7178     else
7179       cat conftest.err 1>&5
7180     fi
7181 fi
7182
7183     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7184     ;;
7185   esac
7186 fi
7187 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7188 ##
7189 ## END FIXME
7190
7191 ## FIXME: this should be a separate macro
7192 ##
7193 # The second clause should only fire when bootstrapping the
7194 # libtool distribution, otherwise you forgot to ship ltmain.sh
7195 # with your package, and you will get complaints that there are
7196 # no rules to generate ltmain.sh.
7197 if test -f "$ltmain"; then
7198   :
7199 else
7200   # If there is no Makefile yet, we rely on a make rule to execute
7201   # `config.status --recheck' to rerun these tests and create the
7202   # libtool script then.
7203   test -f Makefile && make "$ltmain"
7204 fi
7205
7206 if test -f "$ltmain"; then
7207   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7208   $rm -f "${ofile}T"
7209
7210   echo creating $ofile
7211
7212   # Now quote all the things that may contain metacharacters while being
7213   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7214   # variables and quote the copies for generation of the libtool script.
7215   for var in echo old_CC old_CFLAGS SED \
7216     AR AR_FLAGS CC LD LN_S NM SHELL \
7217     reload_flag reload_cmds wl \
7218     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7219     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7220     library_names_spec soname_spec \
7221     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7222     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7223     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7224     old_striplib striplib file_magic_cmd export_symbols_cmds \
7225     deplibs_check_method allow_undefined_flag no_undefined_flag \
7226     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7227     global_symbol_to_c_name_address \
7228     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7229     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7230     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7231
7232     case $var in
7233     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7234     old_postinstall_cmds | old_postuninstall_cmds | \
7235     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7236     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7237     postinstall_cmds | postuninstall_cmds | \
7238     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7239       # Double-quote double-evaled strings.
7240       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7241       ;;
7242     *)
7243       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7244       ;;
7245     esac
7246   done
7247
7248   cat <<__EOF__ > "${ofile}T"
7249 #! $SHELL
7250
7251 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7252 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7253 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7254 #
7255 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7256 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7257 #
7258 # This program is free software; you can redistribute it and/or modify
7259 # it under the terms of the GNU General Public License as published by
7260 # the Free Software Foundation; either version 2 of the License, or
7261 # (at your option) any later version.
7262 #
7263 # This program is distributed in the hope that it will be useful, but
7264 # WITHOUT ANY WARRANTY; without even the implied warranty of
7265 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7266 # General Public License for more details.
7267 #
7268 # You should have received a copy of the GNU General Public License
7269 # along with this program; if not, write to the Free Software
7270 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7271 #
7272 # As a special exception to the GNU General Public License, if you
7273 # distribute this file as part of a program that contains a
7274 # configuration script generated by Autoconf, you may include it under
7275 # the same distribution terms that you use for the rest of that program.
7276
7277 # A sed that does not truncate output.
7278 SED=$lt_SED
7279
7280 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7281 Xsed="${SED} -e s/^X//"
7282
7283 # The HP-UX ksh and POSIX shell print the target directory to stdout
7284 # if CDPATH is set.
7285 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7286
7287 # ### BEGIN LIBTOOL CONFIG
7288
7289 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7290
7291 # Shell to use when invoking shell scripts.
7292 SHELL=$lt_SHELL
7293
7294 # Whether or not to build shared libraries.
7295 build_libtool_libs=$enable_shared
7296
7297 # Whether or not to build static libraries.
7298 build_old_libs=$enable_static
7299
7300 # Whether or not to add -lc for building shared libraries.
7301 build_libtool_need_lc=$need_lc
7302
7303 # Whether or not to optimize for fast installation.
7304 fast_install=$enable_fast_install
7305
7306 # The host system.
7307 host_alias=$host_alias
7308 host=$host
7309
7310 # An echo program that does not interpret backslashes.
7311 echo=$lt_echo
7312
7313 # The archiver.
7314 AR=$lt_AR
7315 AR_FLAGS=$lt_AR_FLAGS
7316
7317 # The default C compiler.
7318 CC=$lt_CC
7319
7320 # Is the compiler the GNU C compiler?
7321 with_gcc=$GCC
7322
7323 # The linker used to build libraries.
7324 LD=$lt_LD
7325
7326 # Whether we need hard or soft links.
7327 LN_S=$lt_LN_S
7328
7329 # A BSD-compatible nm program.
7330 NM=$lt_NM
7331
7332 # A symbol stripping program
7333 STRIP=$STRIP
7334
7335 # Used to examine libraries when file_magic_cmd begins "file"
7336 MAGIC_CMD=$MAGIC_CMD
7337
7338 # Used on cygwin: DLL creation program.
7339 DLLTOOL="$DLLTOOL"
7340
7341 # Used on cygwin: object dumper.
7342 OBJDUMP="$OBJDUMP"
7343
7344 # Used on cygwin: assembler.
7345 AS="$AS"
7346
7347 # The name of the directory that contains temporary libtool files.
7348 objdir=$objdir
7349
7350 # How to create reloadable object files.
7351 reload_flag=$lt_reload_flag
7352 reload_cmds=$lt_reload_cmds
7353
7354 # How to pass a linker flag through the compiler.
7355 wl=$lt_wl
7356
7357 # Object file suffix (normally "o").
7358 objext="$ac_objext"
7359
7360 # Old archive suffix (normally "a").
7361 libext="$libext"
7362
7363 # Executable file suffix (normally "").
7364 exeext="$exeext"
7365
7366 # Additional compiler flags for building library objects.
7367 pic_flag=$lt_pic_flag
7368 pic_mode=$pic_mode
7369
7370 # Does compiler simultaneously support -c and -o options?
7371 compiler_c_o=$lt_compiler_c_o
7372
7373 # Can we write directly to a .lo ?
7374 compiler_o_lo=$lt_compiler_o_lo
7375
7376 # Must we lock files when doing compilation ?
7377 need_locks=$lt_need_locks
7378
7379 # Do we need the lib prefix for modules?
7380 need_lib_prefix=$need_lib_prefix
7381
7382 # Do we need a version for libraries?
7383 need_version=$need_version
7384
7385 # Whether dlopen is supported.
7386 dlopen_support=$enable_dlopen
7387
7388 # Whether dlopen of programs is supported.
7389 dlopen_self=$enable_dlopen_self
7390
7391 # Whether dlopen of statically linked programs is supported.
7392 dlopen_self_static=$enable_dlopen_self_static
7393
7394 # Compiler flag to prevent dynamic linking.
7395 link_static_flag=$lt_link_static_flag
7396
7397 # Compiler flag to turn off builtin functions.
7398 no_builtin_flag=$lt_no_builtin_flag
7399
7400 # Compiler flag to allow reflexive dlopens.
7401 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7402
7403 # Compiler flag to generate shared objects directly from archives.
7404 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7405
7406 # Compiler flag to generate thread-safe objects.
7407 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7408
7409 # Library versioning type.
7410 version_type=$version_type
7411
7412 # Format of library name prefix.
7413 libname_spec=$lt_libname_spec
7414
7415 # List of archive names.  First name is the real one, the rest are links.
7416 # The last name is the one that the linker finds with -lNAME.
7417 library_names_spec=$lt_library_names_spec
7418
7419 # The coded name of the library, if different from the real name.
7420 soname_spec=$lt_soname_spec
7421
7422 # Commands used to build and install an old-style archive.
7423 RANLIB=$lt_RANLIB
7424 old_archive_cmds=$lt_old_archive_cmds
7425 old_postinstall_cmds=$lt_old_postinstall_cmds
7426 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7427
7428 # Create an old-style archive from a shared archive.
7429 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7430
7431 # Create a temporary old-style archive to link instead of a shared archive.
7432 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7433
7434 # Commands used to build and install a shared archive.
7435 archive_cmds=$lt_archive_cmds
7436 archive_expsym_cmds=$lt_archive_expsym_cmds
7437 postinstall_cmds=$lt_postinstall_cmds
7438 postuninstall_cmds=$lt_postuninstall_cmds
7439
7440 # Commands to strip libraries.
7441 old_striplib=$lt_old_striplib
7442 striplib=$lt_striplib
7443
7444 # Method to check whether dependent libraries are shared objects.
7445 deplibs_check_method=$lt_deplibs_check_method
7446
7447 # Command to use when deplibs_check_method == file_magic.
7448 file_magic_cmd=$lt_file_magic_cmd
7449
7450 # Flag that allows shared libraries with undefined symbols to be built.
7451 allow_undefined_flag=$lt_allow_undefined_flag
7452
7453 # Flag that forces no undefined symbols.
7454 no_undefined_flag=$lt_no_undefined_flag
7455
7456 # Commands used to finish a libtool library installation in a directory.
7457 finish_cmds=$lt_finish_cmds
7458
7459 # Same as above, but a single script fragment to be evaled but not shown.
7460 finish_eval=$lt_finish_eval
7461
7462 # Take the output of nm and produce a listing of raw symbols and C names.
7463 global_symbol_pipe=$lt_global_symbol_pipe
7464
7465 # Transform the output of nm in a proper C declaration
7466 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7467
7468 # Transform the output of nm in a C name address pair
7469 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7470
7471 # This is the shared library runtime path variable.
7472 runpath_var=$runpath_var
7473
7474 # This is the shared library path variable.
7475 shlibpath_var=$shlibpath_var
7476
7477 # Is shlibpath searched before the hard-coded library search path?
7478 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7479
7480 # How to hardcode a shared library path into an executable.
7481 hardcode_action=$hardcode_action
7482
7483 # Whether we should hardcode library paths into libraries.
7484 hardcode_into_libs=$hardcode_into_libs
7485
7486 # Flag to hardcode \$libdir into a binary during linking.
7487 # This must work even if \$libdir does not exist.
7488 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7489
7490 # Whether we need a single -rpath flag with a separated argument.
7491 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7492
7493 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7494 # resulting binary.
7495 hardcode_direct=$hardcode_direct
7496
7497 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7498 # resulting binary.
7499 hardcode_minus_L=$hardcode_minus_L
7500
7501 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7502 # the resulting binary.
7503 hardcode_shlibpath_var=$hardcode_shlibpath_var
7504
7505 # Variables whose values should be saved in libtool wrapper scripts and
7506 # restored at relink time.
7507 variables_saved_for_relink="$variables_saved_for_relink"
7508
7509 # Whether libtool must link a program against all its dependency libraries.
7510 link_all_deplibs=$link_all_deplibs
7511
7512 # Compile-time system search path for libraries
7513 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7514
7515 # Run-time system search path for libraries
7516 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7517
7518 # Fix the shell variable \$srcfile for the compiler.
7519 fix_srcfile_path="$fix_srcfile_path"
7520
7521 # Set to yes if exported symbols are required.
7522 always_export_symbols=$always_export_symbols
7523
7524 # The commands to list exported symbols.
7525 export_symbols_cmds=$lt_export_symbols_cmds
7526
7527 # The commands to extract the exported symbol list from a shared archive.
7528 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7529
7530 # Symbols that should not be listed in the preloaded symbols.
7531 exclude_expsyms=$lt_exclude_expsyms
7532
7533 # Symbols that must always be exported.
7534 include_expsyms=$lt_include_expsyms
7535
7536 # ### END LIBTOOL CONFIG
7537
7538 __EOF__
7539
7540   case $host_os in
7541   aix3*)
7542     cat <<\EOF >> "${ofile}T"
7543
7544 # AIX sometimes has problems with the GCC collect2 program.  For some
7545 # reason, if we set the COLLECT_NAMES environment variable, the problems
7546 # vanish in a puff of smoke.
7547 if test "X${COLLECT_NAMES+set}" != Xset; then
7548   COLLECT_NAMES=
7549   export COLLECT_NAMES
7550 fi
7551 EOF
7552     ;;
7553   esac
7554
7555   case $host_os in
7556   cygwin* | mingw* | pw32* | os2*)
7557     cat <<'EOF' >> "${ofile}T"
7558       # This is a source program that is used to create dlls on Windows
7559       # Don't remove nor modify the starting and closing comments
7560 # /* ltdll.c starts here */
7561 # #define WIN32_LEAN_AND_MEAN
7562 # #include <windows.h>
7563 # #undef WIN32_LEAN_AND_MEAN
7564 # #include <stdio.h>
7565 #
7566 # #ifndef __CYGWIN__
7567 # #  ifdef __CYGWIN32__
7568 # #    define __CYGWIN__ __CYGWIN32__
7569 # #  endif
7570 # #endif
7571 #
7572 # #ifdef __cplusplus
7573 # extern "C" {
7574 # #endif
7575 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7576 # #ifdef __cplusplus
7577 # }
7578 # #endif
7579 #
7580 # #ifdef __CYGWIN__
7581 # #include <cygwin/cygwin_dll.h>
7582 # DECLARE_CYGWIN_DLL( DllMain );
7583 # #endif
7584 # HINSTANCE __hDllInstance_base;
7585 #
7586 # BOOL APIENTRY
7587 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7588 # {
7589 #   __hDllInstance_base = hInst;
7590 #   return TRUE;
7591 # }
7592 # /* ltdll.c ends here */
7593         # This is a source program that is used to create import libraries
7594         # on Windows for dlls which lack them. Don't remove nor modify the
7595         # starting and closing comments
7596 # /* impgen.c starts here */
7597 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7598 #
7599 #  This file is part of GNU libtool.
7600 #
7601 #  This program is free software; you can redistribute it and/or modify
7602 #  it under the terms of the GNU General Public License as published by
7603 #  the Free Software Foundation; either version 2 of the License, or
7604 #  (at your option) any later version.
7605 #
7606 #  This program is distributed in the hope that it will be useful,
7607 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7608 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7609 #  GNU General Public License for more details.
7610 #
7611 #  You should have received a copy of the GNU General Public License
7612 #  along with this program; if not, write to the Free Software
7613 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7614 #  */
7615 #
7616 # #include <stdio.h>            /* for printf() */
7617 # #include <unistd.h>           /* for open(), lseek(), read() */
7618 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7619 # #include <string.h>           /* for strdup() */
7620 #
7621 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7622 # #ifndef O_BINARY
7623 # #define O_BINARY 0
7624 # #endif
7625 #
7626 # static unsigned int
7627 # pe_get16 (fd, offset)
7628 #      int fd;
7629 #      int offset;
7630 # {
7631 #   unsigned char b[2];
7632 #   lseek (fd, offset, SEEK_SET);
7633 #   read (fd, b, 2);
7634 #   return b[0] + (b[1]<<8);
7635 # }
7636 #
7637 # static unsigned int
7638 # pe_get32 (fd, offset)
7639 #     int fd;
7640 #     int offset;
7641 # {
7642 #   unsigned char b[4];
7643 #   lseek (fd, offset, SEEK_SET);
7644 #   read (fd, b, 4);
7645 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7646 # }
7647 #
7648 # static unsigned int
7649 # pe_as32 (ptr)
7650 #      void *ptr;
7651 # {
7652 #   unsigned char *b = ptr;
7653 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7654 # }
7655 #
7656 # int
7657 # main (argc, argv)
7658 #     int argc;
7659 #     char *argv[];
7660 # {
7661 #     int dll;
7662 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7663 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7664 #     unsigned long name_rvas, nexp;
7665 #     unsigned char *expdata, *erva;
7666 #     char *filename, *dll_name;
7667 #
7668 #     filename = argv[1];
7669 #
7670 #     dll = open(filename, O_RDONLY|O_BINARY);
7671 #     if (dll < 1)
7672 #       return 1;
7673 #
7674 #     dll_name = filename;
7675 #
7676 #     for (i=0; filename[i]; i++)
7677 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7678 #           dll_name = filename + i +1;
7679 #
7680 #     pe_header_offset = pe_get32 (dll, 0x3c);
7681 #     opthdr_ofs = pe_header_offset + 4 + 20;
7682 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7683 #
7684 #     if (num_entries < 1) /* no exports */
7685 #       return 1;
7686 #
7687 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7688 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7689 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7690 #     secptr = (pe_header_offset + 4 + 20 +
7691 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7692 #
7693 #     expptr = 0;
7694 #     for (i = 0; i < nsections; i++)
7695 #     {
7696 #       char sname[8];
7697 #       unsigned long secptr1 = secptr + 40 * i;
7698 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7699 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7700 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7701 #       lseek(dll, secptr1, SEEK_SET);
7702 #       read(dll, sname, 8);
7703 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7704 #       {
7705 #           expptr = fptr + (export_rva - vaddr);
7706 #           if (export_rva + export_size > vaddr + vsize)
7707 #               export_size = vsize - (export_rva - vaddr);
7708 #           break;
7709 #       }
7710 #     }
7711 #
7712 #     expdata = (unsigned char*)malloc(export_size);
7713 #     lseek (dll, expptr, SEEK_SET);
7714 #     read (dll, expdata, export_size);
7715 #     erva = expdata - export_rva;
7716 #
7717 #     nexp = pe_as32 (expdata+24);
7718 #     name_rvas = pe_as32 (expdata+32);
7719 #
7720 #     printf ("EXPORTS\n");
7721 #     for (i = 0; i<nexp; i++)
7722 #     {
7723 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7724 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7725 #     }
7726 #
7727 #     return 0;
7728 # }
7729 # /* impgen.c ends here */
7730
7731 EOF
7732     ;;
7733   esac
7734
7735   # We use sed instead of cat because bash on DJGPP gets confused if
7736   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7737   # text mode, it properly converts lines to CR/LF.  This bash problem
7738   # is reportedly fixed, but why not run on old versions too?
7739   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7740
7741   mv -f "${ofile}T" "$ofile" || \
7742     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7743   chmod +x "$ofile"
7744 fi
7745 ##
7746 ## END FIXME
7747
7748
7749
7750
7751
7752 # This can be used to rebuild libtool when needed
7753 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7754
7755 # Always use our own libtool.
7756 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7757
7758 # Prevent multiple expansion
7759
7760
7761
7762 # test for ln hardlink support
7763 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7764 echo "configure:7765: checking whether ln works" >&5
7765 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7766   echo $ac_n "(cached) $ac_c" 1>&6
7767 else
7768   rm -f conftest.src conftest.dst
7769 echo "conftest" > conftest.src
7770 if ln conftest.src conftest.dst 2>/dev/null
7771 then
7772   ol_cv_prog_LN_H="ln"
7773 else
7774   ol_cv_prog_LN_H="cp"
7775 fi
7776 rm -f conftest.src conftest.dst
7777
7778 fi
7779 LN_H="$ol_cv_prog_LN_H"
7780 if test "$ol_cv_prog_LN_H" = "ln"; then
7781         echo "$ac_t""yes" 1>&6
7782 else
7783         echo "$ac_t""no" 1>&6
7784 fi
7785
7786 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7787 echo "configure:7788: checking whether ln -s works" >&5
7788 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7789   echo $ac_n "(cached) $ac_c" 1>&6
7790 else
7791   rm -f conftestdata
7792 if ln -s X conftestdata 2>/dev/null
7793 then
7794   rm -f conftestdata
7795   ac_cv_prog_LN_S="ln -s"
7796 else
7797   ac_cv_prog_LN_S=ln
7798 fi
7799 fi
7800 LN_S="$ac_cv_prog_LN_S"
7801 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7802   echo "$ac_t""yes" 1>&6
7803 else
7804   echo "$ac_t""no" 1>&6
7805 fi
7806
7807
7808 ol_link_perl=no
7809 if test $ol_enable_perl != no ; then
7810         # Extract the first word of "perl", so it can be a program name with args.
7811 set dummy perl; ac_word=$2
7812 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7813 echo "configure:7814: checking for $ac_word" >&5
7814 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7815   echo $ac_n "(cached) $ac_c" 1>&6
7816 else
7817   case "$PERLBIN" in
7818   /*)
7819   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7820   ;;
7821   ?:/*)
7822   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7823   ;;
7824   *)
7825   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7826   ac_dummy="$PATH"
7827   for ac_dir in $ac_dummy; do 
7828     test -z "$ac_dir" && ac_dir=.
7829     if test -f $ac_dir/$ac_word; then
7830       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7831       break
7832     fi
7833   done
7834   IFS="$ac_save_ifs"
7835   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7836   ;;
7837 esac
7838 fi
7839 PERLBIN="$ac_cv_path_PERLBIN"
7840 if test -n "$PERLBIN"; then
7841   echo "$ac_t""$PERLBIN" 1>&6
7842 else
7843   echo "$ac_t""no" 1>&6
7844 fi
7845
7846
7847         if test "no$PERLBIN" = "no" ; then
7848                 if test $ol_enable_perl = yes ; then
7849                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7850                 fi
7851
7852         else
7853                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7854                 if test x"$ol_with_perl_module" = "xstatic" ; then
7855                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7856                 else
7857                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7858                 fi
7859                                 ol_link_perl=yes
7860         fi
7861 fi
7862
7863 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7864 echo "configure:7865: checking how to run the C preprocessor" >&5
7865 # On Suns, sometimes $CPP names a directory.
7866 if test -n "$CPP" && test -d "$CPP"; then
7867   CPP=
7868 fi
7869 if test -z "$CPP"; then
7870 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7871   echo $ac_n "(cached) $ac_c" 1>&6
7872 else
7873     # This must be in double quotes, not single quotes, because CPP may get
7874   # substituted into the Makefile and "${CC-cc}" will confuse make.
7875   CPP="${CC-cc} -E"
7876   # On the NeXT, cc -E runs the code through the compiler's parser,
7877   # not just through cpp.
7878   cat > conftest.$ac_ext <<EOF
7879 #line 7880 "configure"
7880 #include "confdefs.h"
7881 #include <assert.h>
7882 Syntax Error
7883 EOF
7884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7885 { (eval echo configure:7886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7887 if test -z "$ac_err"; then
7888   :
7889 else
7890   echo "$ac_err" >&5
7891   echo "configure: failed program was:" >&5
7892   cat conftest.$ac_ext >&5
7893   rm -rf conftest*
7894   CPP="${CC-cc} -E -traditional-cpp"
7895   cat > conftest.$ac_ext <<EOF
7896 #line 7897 "configure"
7897 #include "confdefs.h"
7898 #include <assert.h>
7899 Syntax Error
7900 EOF
7901 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7902 { (eval echo configure:7903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7903 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7904 if test -z "$ac_err"; then
7905   :
7906 else
7907   echo "$ac_err" >&5
7908   echo "configure: failed program was:" >&5
7909   cat conftest.$ac_ext >&5
7910   rm -rf conftest*
7911   CPP="${CC-cc} -nologo -E"
7912   cat > conftest.$ac_ext <<EOF
7913 #line 7914 "configure"
7914 #include "confdefs.h"
7915 #include <assert.h>
7916 Syntax Error
7917 EOF
7918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7919 { (eval echo configure:7920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7921 if test -z "$ac_err"; then
7922   :
7923 else
7924   echo "$ac_err" >&5
7925   echo "configure: failed program was:" >&5
7926   cat conftest.$ac_ext >&5
7927   rm -rf conftest*
7928   CPP=/lib/cpp
7929 fi
7930 rm -f conftest*
7931 fi
7932 rm -f conftest*
7933 fi
7934 rm -f conftest*
7935   ac_cv_prog_CPP="$CPP"
7936 fi
7937   CPP="$ac_cv_prog_CPP"
7938 else
7939   ac_cv_prog_CPP="$CPP"
7940 fi
7941 echo "$ac_t""$CPP" 1>&6
7942
7943
7944 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7945         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7946
7947 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7948         echo "configure: warning: programs compiled here do run here..." 1>&2
7949         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7950
7951 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7952         echo "configure: warning: programs compiled here do not run here..." 1>&2
7953         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7954 fi
7955
7956
7957 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7958 echo "configure:7959: checking for Cygwin environment" >&5
7959 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7960   echo $ac_n "(cached) $ac_c" 1>&6
7961 else
7962   cat > conftest.$ac_ext <<EOF
7963 #line 7964 "configure"
7964 #include "confdefs.h"
7965
7966 int main() {
7967
7968 #ifndef __CYGWIN__
7969 #define __CYGWIN__ __CYGWIN32__
7970 #endif
7971 return __CYGWIN__;
7972 ; return 0; }
7973 EOF
7974 if { (eval echo configure:7975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7975   rm -rf conftest*
7976   ac_cv_cygwin=yes
7977 else
7978   echo "configure: failed program was:" >&5
7979   cat conftest.$ac_ext >&5
7980   rm -rf conftest*
7981   ac_cv_cygwin=no
7982 fi
7983 rm -f conftest*
7984 fi
7985
7986 echo "$ac_t""$ac_cv_cygwin" 1>&6
7987 CYGWIN=
7988 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7989 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7990 echo "configure:7991: checking for mingw32 environment" >&5
7991 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7992   echo $ac_n "(cached) $ac_c" 1>&6
7993 else
7994   cat > conftest.$ac_ext <<EOF
7995 #line 7996 "configure"
7996 #include "confdefs.h"
7997
7998 int main() {
7999 return __MINGW32__;
8000 ; return 0; }
8001 EOF
8002 if { (eval echo configure:8003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8003   rm -rf conftest*
8004   ac_cv_mingw32=yes
8005 else
8006   echo "configure: failed program was:" >&5
8007   cat conftest.$ac_ext >&5
8008   rm -rf conftest*
8009   ac_cv_mingw32=no
8010 fi
8011 rm -f conftest*
8012 fi
8013
8014 echo "$ac_t""$ac_cv_mingw32" 1>&6
8015 MINGW32=
8016 test "$ac_cv_mingw32" = yes && MINGW32=yes
8017
8018
8019
8020 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8021 echo "configure:8022: checking for executable suffix" >&5
8022 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8023   echo $ac_n "(cached) $ac_c" 1>&6
8024 else
8025   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8026   ac_cv_exeext=.exe
8027 else
8028   rm -f conftest*
8029   echo 'int main () { return 0; }' > conftest.$ac_ext
8030   ac_cv_exeext=
8031   if { (eval echo configure:8032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8032     for file in conftest.*; do
8033       case $file in
8034       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8035       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8036       esac
8037     done
8038   else
8039     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8040   fi
8041   rm -f conftest*
8042   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8043 fi
8044 fi
8045
8046 EXEEXT=""
8047 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8048 echo "$ac_t""${ac_cv_exeext}" 1>&6
8049 ac_exeext=$EXEEXT
8050
8051 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8052 echo "configure:8053: checking for object suffix" >&5
8053 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8054   echo $ac_n "(cached) $ac_c" 1>&6
8055 else
8056   rm -f conftest*
8057 echo 'int i = 1;' > conftest.$ac_ext
8058 if { (eval echo configure:8059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8059   for ac_file in conftest.*; do
8060     case $ac_file in
8061     *.c) ;;
8062     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8063     esac
8064   done
8065 else
8066   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8067 fi
8068 rm -f conftest*
8069 fi
8070
8071 echo "$ac_t""$ac_cv_objext" 1>&6
8072 OBJEXT=$ac_cv_objext
8073 ac_objext=$ac_cv_objext
8074
8075
8076 cat >> confdefs.h <<EOF
8077 #define EXEEXT "${EXEEXT}"
8078 EOF
8079
8080
8081 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8082 echo "configure:8083: checking for be_app in -lbe" >&5
8083 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8084 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8085   echo $ac_n "(cached) $ac_c" 1>&6
8086 else
8087   ac_save_LIBS="$LIBS"
8088 LIBS="-lbe -lroot -lnet $LIBS"
8089 cat > conftest.$ac_ext <<EOF
8090 #line 8091 "configure"
8091 #include "confdefs.h"
8092 /* Override any gcc2 internal prototype to avoid an error.  */
8093 /* We use char because int might match the return type of a gcc2
8094     builtin and then its argument prototype would still apply.  */
8095 char be_app();
8096
8097 int main() {
8098 be_app()
8099 ; return 0; }
8100 EOF
8101 if { (eval echo configure:8102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8102   rm -rf conftest*
8103   eval "ac_cv_lib_$ac_lib_var=yes"
8104 else
8105   echo "configure: failed program was:" >&5
8106   cat conftest.$ac_ext >&5
8107   rm -rf conftest*
8108   eval "ac_cv_lib_$ac_lib_var=no"
8109 fi
8110 rm -f conftest*
8111 LIBS="$ac_save_LIBS"
8112
8113 fi
8114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8115   echo "$ac_t""yes" 1>&6
8116   LIBS="$LIBS -lbe -lroot -lnet"
8117 else
8118   echo "$ac_t""no" 1>&6
8119 :
8120 fi
8121
8122
8123
8124
8125
8126 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8127 echo "configure:8128: checking for ${CC-cc} option to accept ANSI C" >&5
8128 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8129   echo $ac_n "(cached) $ac_c" 1>&6
8130 else
8131   am_cv_prog_cc_stdc=no
8132 ac_save_CC="$CC"
8133 # Don't try gcc -ansi; that turns off useful extensions and
8134 # breaks some systems' header files.
8135 # AIX                   -qlanglvl=ansi
8136 # Ultrix and OSF/1      -std1
8137 # HP-UX 10.20 and later -Ae
8138 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8139 # SVR4                  -Xc -D__EXTENSIONS__
8140 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8141 do
8142   CC="$ac_save_CC $ac_arg"
8143   cat > conftest.$ac_ext <<EOF
8144 #line 8145 "configure"
8145 #include "confdefs.h"
8146 #include <stdarg.h>
8147 #include <stdio.h>
8148 #include <sys/types.h>
8149 #include <sys/stat.h>
8150 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8151 struct buf { int x; };
8152 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8153 static char *e (p, i)
8154      char **p;
8155      int i;
8156 {
8157   return p[i];
8158 }
8159 static char *f (char * (*g) (char **, int), char **p, ...)
8160 {
8161   char *s;
8162   va_list v;
8163   va_start (v,p);
8164   s = g (p, va_arg (v,int));
8165   va_end (v);
8166   return s;
8167 }
8168 int test (int i, double x);
8169 struct s1 {int (*f) (int a);};
8170 struct s2 {int (*f) (double a);};
8171 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8172 int argc;
8173 char **argv;
8174
8175 int main() {
8176
8177 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8178
8179 ; return 0; }
8180 EOF
8181 if { (eval echo configure:8182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8182   rm -rf conftest*
8183   am_cv_prog_cc_stdc="$ac_arg"; break
8184 else
8185   echo "configure: failed program was:" >&5
8186   cat conftest.$ac_ext >&5
8187 fi
8188 rm -f conftest*
8189 done
8190 CC="$ac_save_CC"
8191
8192 fi
8193
8194 if test -z "$am_cv_prog_cc_stdc"; then
8195   echo "$ac_t""none needed" 1>&6
8196 else
8197   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8198 fi
8199 case "x$am_cv_prog_cc_stdc" in
8200   x|xno) ;;
8201   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8202 esac
8203
8204 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8205         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8206 fi
8207
8208 # test for make depend flag
8209 OL_MKDEP=
8210 OL_MKDEP_FLAGS=
8211 if test -z "${MKDEP}"; then
8212         OL_MKDEP="${CC-cc}"
8213         if test -z "${MKDEP_FLAGS}"; then
8214                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8215 echo "configure:8216: checking for ${OL_MKDEP} depend flag" >&5
8216 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8217   echo $ac_n "(cached) $ac_c" 1>&6
8218 else
8219   
8220                         ol_cv_mkdep=no
8221                         for flag in "-M" "-xM"; do
8222                                 cat > conftest.c <<EOF
8223  noCode;
8224 EOF
8225                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8226                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8227                                 then
8228                                         if test ! -f conftest."${ac_object}" ; then
8229                                                 ol_cv_mkdep=$flag
8230                                                 OL_MKDEP_FLAGS="$flag"
8231                                                 break
8232                                         fi
8233                                 fi
8234                         done
8235                         rm -f conftest*
8236                 
8237 fi
8238
8239 echo "$ac_t""$ol_cv_mkdep" 1>&6
8240         else
8241                 cc_cv_mkdep=yes
8242                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8243         fi
8244 else
8245         cc_cv_mkdep=yes
8246         OL_MKDEP="${MKDEP}"
8247         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8248 fi
8249
8250
8251
8252 if test "${ol_cv_mkdep}" = no ; then
8253         # this will soon become an error
8254         echo "configure: warning: do not know how to generate dependencies" 1>&2
8255 fi
8256
8257 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8258 echo "configure:8259: checking for afopen in -ls" >&5
8259 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8260 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8261   echo $ac_n "(cached) $ac_c" 1>&6
8262 else
8263   ac_save_LIBS="$LIBS"
8264 LIBS="-ls  $LIBS"
8265 cat > conftest.$ac_ext <<EOF
8266 #line 8267 "configure"
8267 #include "confdefs.h"
8268 /* Override any gcc2 internal prototype to avoid an error.  */
8269 /* We use char because int might match the return type of a gcc2
8270     builtin and then its argument prototype would still apply.  */
8271 char afopen();
8272
8273 int main() {
8274 afopen()
8275 ; return 0; }
8276 EOF
8277 if { (eval echo configure:8278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8278   rm -rf conftest*
8279   eval "ac_cv_lib_$ac_lib_var=yes"
8280 else
8281   echo "configure: failed program was:" >&5
8282   cat conftest.$ac_ext >&5
8283   rm -rf conftest*
8284   eval "ac_cv_lib_$ac_lib_var=no"
8285 fi
8286 rm -f conftest*
8287 LIBS="$ac_save_LIBS"
8288
8289 fi
8290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8291   echo "$ac_t""yes" 1>&6
8292   
8293         AUTH_LIBS=-ls
8294         cat >> confdefs.h <<\EOF
8295 #define HAVE_AIX_SECURITY 1
8296 EOF
8297
8298
8299 else
8300   echo "$ac_t""no" 1>&6
8301 fi
8302
8303
8304 case "$target" in
8305 *-ibm-openedition)
8306         ac_cv_func_getopt=no
8307         cat >> confdefs.h <<\EOF
8308 #define BOTH_STRINGS_H 1
8309 EOF
8310
8311         ;;
8312 esac
8313
8314 ol_link_modules=no
8315 if test $ol_enable_modules != no ; then
8316         for ac_hdr in ltdl.h
8317 do
8318 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8319 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8320 echo "configure:8321: checking for $ac_hdr" >&5
8321 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8322   echo $ac_n "(cached) $ac_c" 1>&6
8323 else
8324   cat > conftest.$ac_ext <<EOF
8325 #line 8326 "configure"
8326 #include "confdefs.h"
8327 #include <$ac_hdr>
8328 EOF
8329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8330 { (eval echo configure:8331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8332 if test -z "$ac_err"; then
8333   rm -rf conftest*
8334   eval "ac_cv_header_$ac_safe=yes"
8335 else
8336   echo "$ac_err" >&5
8337   echo "configure: failed program was:" >&5
8338   cat conftest.$ac_ext >&5
8339   rm -rf conftest*
8340   eval "ac_cv_header_$ac_safe=no"
8341 fi
8342 rm -f conftest*
8343 fi
8344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8345   echo "$ac_t""yes" 1>&6
8346     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8347   cat >> confdefs.h <<EOF
8348 #define $ac_tr_hdr 1
8349 EOF
8350  
8351 else
8352   echo "$ac_t""no" 1>&6
8353 fi
8354 done
8355
8356
8357         if test $ac_cv_header_ltdl_h = no ; then
8358                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8359         fi
8360
8361         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8362 echo "configure:8363: checking for lt_dlinit in -lltdl" >&5
8363 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8365   echo $ac_n "(cached) $ac_c" 1>&6
8366 else
8367   ac_save_LIBS="$LIBS"
8368 LIBS="-lltdl  $LIBS"
8369 cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 /* Override any gcc2 internal prototype to avoid an error.  */
8373 /* We use char because int might match the return type of a gcc2
8374     builtin and then its argument prototype would still apply.  */
8375 char lt_dlinit();
8376
8377 int main() {
8378 lt_dlinit()
8379 ; return 0; }
8380 EOF
8381 if { (eval echo configure:8382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8382   rm -rf conftest*
8383   eval "ac_cv_lib_$ac_lib_var=yes"
8384 else
8385   echo "configure: failed program was:" >&5
8386   cat conftest.$ac_ext >&5
8387   rm -rf conftest*
8388   eval "ac_cv_lib_$ac_lib_var=no"
8389 fi
8390 rm -f conftest*
8391 LIBS="$ac_save_LIBS"
8392
8393 fi
8394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8395   echo "$ac_t""yes" 1>&6
8396   
8397                 MODULES_LIBS=-lltdl
8398                 cat >> confdefs.h <<\EOF
8399 #define HAVE_LIBLTDL 1
8400 EOF
8401
8402         
8403 else
8404   echo "$ac_t""no" 1>&6
8405 fi
8406
8407
8408         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8409                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8410         fi
8411         ol_link_modules=yes
8412 else
8413         ol_with_bdb_module=static
8414         ol_with_dnssrv_module=static
8415         ol_with_ldap_module=static
8416         ol_with_ldbm_module=static
8417         ol_with_meta_module=static
8418         ol_with_monitor_module=static
8419         ol_with_null_module=static
8420         ol_with_passwd_module=static
8421         ol_with_perl_module=static
8422         ol_with_shell_module=static
8423         ol_with_sql_module=static
8424 fi
8425
8426 # test for EBCDIC
8427 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8428 echo "configure:8429: checking for EBCDIC" >&5
8429 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8430   echo $ac_n "(cached) $ac_c" 1>&6
8431 else
8432   
8433         cat > conftest.$ac_ext <<EOF
8434 #line 8435 "configure"
8435 #include "confdefs.h"
8436
8437 #if !('M' == 0xd4)
8438 #include <__ASCII__/generate_error.h>
8439 #endif
8440
8441 EOF
8442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8443 { (eval echo configure:8444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8445 if test -z "$ac_err"; then
8446   rm -rf conftest*
8447   ol_cv_cpp_ebcdic=yes
8448 else
8449   echo "$ac_err" >&5
8450   echo "configure: failed program was:" >&5
8451   cat conftest.$ac_ext >&5
8452   rm -rf conftest*
8453   ol_cv_cpp_ebcdic=no
8454 fi
8455 rm -f conftest*
8456 fi
8457
8458 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8459 if test $ol_cv_cpp_ebcdic = yes ; then
8460         cat >> confdefs.h <<\EOF
8461 #define HAVE_EBCDIC 1
8462 EOF
8463
8464 fi
8465
8466 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8467 echo "configure:8468: checking for ANSI C header files" >&5
8468 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8469   echo $ac_n "(cached) $ac_c" 1>&6
8470 else
8471   cat > conftest.$ac_ext <<EOF
8472 #line 8473 "configure"
8473 #include "confdefs.h"
8474 #include <stdlib.h>
8475 #include <stdarg.h>
8476 #include <string.h>
8477 #include <float.h>
8478 EOF
8479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8480 { (eval echo configure:8481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8482 if test -z "$ac_err"; then
8483   rm -rf conftest*
8484   ol_cv_header_stdc=yes
8485 else
8486   echo "$ac_err" >&5
8487   echo "configure: failed program was:" >&5
8488   cat conftest.$ac_ext >&5
8489   rm -rf conftest*
8490   ol_cv_header_stdc=no
8491 fi
8492 rm -f conftest*
8493
8494 if test $ol_cv_header_stdc = yes; then
8495   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8496 cat > conftest.$ac_ext <<EOF
8497 #line 8498 "configure"
8498 #include "confdefs.h"
8499 #include <string.h>
8500 EOF
8501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8502   egrep "memchr" >/dev/null 2>&1; then
8503   :
8504 else
8505   rm -rf conftest*
8506   ol_cv_header_stdc=no
8507 fi
8508 rm -f conftest*
8509
8510 fi
8511
8512 if test $ol_cv_header_stdc = yes; then
8513   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8514 cat > conftest.$ac_ext <<EOF
8515 #line 8516 "configure"
8516 #include "confdefs.h"
8517 #include <stdlib.h>
8518 EOF
8519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8520   egrep "free" >/dev/null 2>&1; then
8521   :
8522 else
8523   rm -rf conftest*
8524   ol_cv_header_stdc=no
8525 fi
8526 rm -f conftest*
8527
8528 fi
8529
8530 if test $ol_cv_header_stdc = yes; then
8531   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8532 if test "$cross_compiling" = yes; then
8533   :
8534 else
8535   cat > conftest.$ac_ext <<EOF
8536 #line 8537 "configure"
8537 #include "confdefs.h"
8538 #include <ctype.h>
8539 #ifndef HAVE_EBCDIC
8540 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8541 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8542 #else
8543 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8544                 || ('j' <= (c) && (c) <= 'r') \
8545                 || ('s' <= (c) && (c) <= 'z'))
8546 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8547 #endif
8548 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8549 int main () { int i; for (i = 0; i < 256; i++)
8550 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8551 exit (0); }
8552
8553 EOF
8554 if { (eval echo configure:8555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8555 then
8556   :
8557 else
8558   echo "configure: failed program was:" >&5
8559   cat conftest.$ac_ext >&5
8560   rm -fr conftest*
8561   ol_cv_header_stdc=no
8562 fi
8563 rm -fr conftest*
8564 fi
8565
8566 fi
8567 fi
8568
8569 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8570 if test $ol_cv_header_stdc = yes; then
8571   cat >> confdefs.h <<\EOF
8572 #define STDC_HEADERS 1
8573 EOF
8574
8575 fi
8576 ac_cv_header_stdc=disable
8577
8578
8579 if test $ol_cv_header_stdc != yes; then
8580         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8581 fi
8582
8583 ac_header_dirent=no
8584 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8585 do
8586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8587 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8588 echo "configure:8589: checking for $ac_hdr that defines DIR" >&5
8589 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8590   echo $ac_n "(cached) $ac_c" 1>&6
8591 else
8592   cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 #include <sys/types.h>
8596 #include <$ac_hdr>
8597 int main() {
8598 DIR *dirp = 0;
8599 ; return 0; }
8600 EOF
8601 if { (eval echo configure:8602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8602   rm -rf conftest*
8603   eval "ac_cv_header_dirent_$ac_safe=yes"
8604 else
8605   echo "configure: failed program was:" >&5
8606   cat conftest.$ac_ext >&5
8607   rm -rf conftest*
8608   eval "ac_cv_header_dirent_$ac_safe=no"
8609 fi
8610 rm -f conftest*
8611 fi
8612 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8613   echo "$ac_t""yes" 1>&6
8614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8615   cat >> confdefs.h <<EOF
8616 #define $ac_tr_hdr 1
8617 EOF
8618  ac_header_dirent=$ac_hdr; break
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622 done
8623 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8624 if test $ac_header_dirent = dirent.h; then
8625 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8626 echo "configure:8627: checking for opendir in -ldir" >&5
8627 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8629   echo $ac_n "(cached) $ac_c" 1>&6
8630 else
8631   ac_save_LIBS="$LIBS"
8632 LIBS="-ldir  $LIBS"
8633 cat > conftest.$ac_ext <<EOF
8634 #line 8635 "configure"
8635 #include "confdefs.h"
8636 /* Override any gcc2 internal prototype to avoid an error.  */
8637 /* We use char because int might match the return type of a gcc2
8638     builtin and then its argument prototype would still apply.  */
8639 char opendir();
8640
8641 int main() {
8642 opendir()
8643 ; return 0; }
8644 EOF
8645 if { (eval echo configure:8646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8646   rm -rf conftest*
8647   eval "ac_cv_lib_$ac_lib_var=yes"
8648 else
8649   echo "configure: failed program was:" >&5
8650   cat conftest.$ac_ext >&5
8651   rm -rf conftest*
8652   eval "ac_cv_lib_$ac_lib_var=no"
8653 fi
8654 rm -f conftest*
8655 LIBS="$ac_save_LIBS"
8656
8657 fi
8658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8659   echo "$ac_t""yes" 1>&6
8660   LIBS="$LIBS -ldir"
8661 else
8662   echo "$ac_t""no" 1>&6
8663 fi
8664
8665 else
8666 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8667 echo "configure:8668: checking for opendir in -lx" >&5
8668 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8669 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8670   echo $ac_n "(cached) $ac_c" 1>&6
8671 else
8672   ac_save_LIBS="$LIBS"
8673 LIBS="-lx  $LIBS"
8674 cat > conftest.$ac_ext <<EOF
8675 #line 8676 "configure"
8676 #include "confdefs.h"
8677 /* Override any gcc2 internal prototype to avoid an error.  */
8678 /* We use char because int might match the return type of a gcc2
8679     builtin and then its argument prototype would still apply.  */
8680 char opendir();
8681
8682 int main() {
8683 opendir()
8684 ; return 0; }
8685 EOF
8686 if { (eval echo configure:8687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8687   rm -rf conftest*
8688   eval "ac_cv_lib_$ac_lib_var=yes"
8689 else
8690   echo "configure: failed program was:" >&5
8691   cat conftest.$ac_ext >&5
8692   rm -rf conftest*
8693   eval "ac_cv_lib_$ac_lib_var=no"
8694 fi
8695 rm -f conftest*
8696 LIBS="$ac_save_LIBS"
8697
8698 fi
8699 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8700   echo "$ac_t""yes" 1>&6
8701   LIBS="$LIBS -lx"
8702 else
8703   echo "$ac_t""no" 1>&6
8704 fi
8705
8706 fi
8707
8708 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8709 echo "configure:8710: checking for sys/wait.h that is POSIX.1 compatible" >&5
8710 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716 #include <sys/types.h>
8717 #include <sys/wait.h>
8718 #ifndef WEXITSTATUS
8719 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8720 #endif
8721 #ifndef WIFEXITED
8722 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8723 #endif
8724 int main() {
8725 int s;
8726 wait (&s);
8727 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8728 ; return 0; }
8729 EOF
8730 if { (eval echo configure:8731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8731   rm -rf conftest*
8732   ac_cv_header_sys_wait_h=yes
8733 else
8734   echo "configure: failed program was:" >&5
8735   cat conftest.$ac_ext >&5
8736   rm -rf conftest*
8737   ac_cv_header_sys_wait_h=no
8738 fi
8739 rm -f conftest*
8740 fi
8741
8742 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8743 if test $ac_cv_header_sys_wait_h = yes; then
8744   cat >> confdefs.h <<\EOF
8745 #define HAVE_SYS_WAIT_H 1
8746 EOF
8747
8748 fi
8749
8750 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8751 echo "configure:8752: checking POSIX termios" >&5
8752 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8753   echo $ac_n "(cached) $ac_c" 1>&6
8754 else
8755   cat > conftest.$ac_ext <<EOF
8756 #line 8757 "configure"
8757 #include "confdefs.h"
8758 #include <sys/types.h>
8759 #include <unistd.h>
8760 #include <termios.h>
8761 int main() {
8762 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8763    tcgetattr(0, 0);
8764 ; return 0; }
8765 EOF
8766 if { (eval echo configure:8767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8767   rm -rf conftest*
8768   am_cv_sys_posix_termios=yes
8769 else
8770   echo "configure: failed program was:" >&5
8771   cat conftest.$ac_ext >&5
8772   rm -rf conftest*
8773   am_cv_sys_posix_termios=no
8774 fi
8775 rm -f conftest*
8776 fi
8777
8778 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8779
8780
8781  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8782 echo "configure:8783: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8783 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8784   echo $ac_n "(cached) $ac_c" 1>&6
8785 else
8786   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8787
8788   gwinsz_in_termios_h=no
8789   if test $am_cv_sys_posix_termios = yes; then
8790     cat > conftest.$ac_ext <<EOF
8791 #line 8792 "configure"
8792 #include "confdefs.h"
8793 #include <sys/types.h>
8794 #     include <termios.h>
8795 #     ifdef TIOCGWINSZ
8796         yes
8797 #     endif
8798     
8799 EOF
8800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8801   egrep "yes" >/dev/null 2>&1; then
8802   rm -rf conftest*
8803   gwinsz_in_termios_h=yes
8804 fi
8805 rm -f conftest*
8806
8807   fi
8808
8809   if test $gwinsz_in_termios_h = no; then
8810     cat > conftest.$ac_ext <<EOF
8811 #line 8812 "configure"
8812 #include "confdefs.h"
8813 #include <sys/types.h>
8814 #     include <sys/ioctl.h>
8815 #     ifdef TIOCGWINSZ
8816         yes
8817 #     endif
8818     
8819 EOF
8820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8821   egrep "yes" >/dev/null 2>&1; then
8822   rm -rf conftest*
8823   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8824 fi
8825 rm -f conftest*
8826
8827   fi
8828   
8829 fi
8830
8831 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8832   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8833     cat >> confdefs.h <<\EOF
8834 #define GWINSZ_IN_SYS_IOCTL 1
8835 EOF
8836
8837   fi
8838
8839 if test $am_cv_sys_posix_termios = yes ; then
8840         cat >> confdefs.h <<\EOF
8841 #define HAVE_POSIX_TERMIOS 1
8842 EOF
8843
8844 fi
8845
8846 for ac_hdr in \
8847         arpa/inet.h             \
8848         arpa/nameser.h  \
8849         assert.h                \
8850         conio.h                 \
8851         crypt.h                 \
8852         direct.h                \
8853         errno.h                 \
8854         fcntl.h                 \
8855         filio.h                 \
8856         getopt.h                \
8857         grp.h                   \
8858         io.h                    \
8859         libutil.h               \
8860         limits.h                \
8861         locale.h                \
8862         netinet/tcp.h   \
8863         malloc.h                \
8864         memory.h                \
8865         psap.h                  \
8866         pwd.h                   \
8867         process.h               \
8868         resolv.h                \
8869         sgtty.h                 \
8870         shadow.h                \
8871         stddef.h                \
8872         string.h                \
8873         strings.h               \
8874         sysexits.h              \
8875         sys/file.h              \
8876         sys/filio.h             \
8877         sys/errno.h             \
8878         sys/ioctl.h             \
8879         sys/param.h             \
8880         sys/resource.h  \
8881         sys/select.h    \
8882         sys/socket.h    \
8883         sys/syslog.h    \
8884         sys/time.h              \
8885         sys/types.h             \
8886         sys/ucred.h             \
8887         syslog.h                \
8888         termios.h               \
8889         unistd.h                \
8890         winsock.h               \
8891         winsock2.h              \
8892
8893 do
8894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8896 echo "configure:8897: checking for $ac_hdr" >&5
8897 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8898   echo $ac_n "(cached) $ac_c" 1>&6
8899 else
8900   cat > conftest.$ac_ext <<EOF
8901 #line 8902 "configure"
8902 #include "confdefs.h"
8903 #include <$ac_hdr>
8904 EOF
8905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8906 { (eval echo configure:8907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8908 if test -z "$ac_err"; then
8909   rm -rf conftest*
8910   eval "ac_cv_header_$ac_safe=yes"
8911 else
8912   echo "$ac_err" >&5
8913   echo "configure: failed program was:" >&5
8914   cat conftest.$ac_ext >&5
8915   rm -rf conftest*
8916   eval "ac_cv_header_$ac_safe=no"
8917 fi
8918 rm -f conftest*
8919 fi
8920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8921   echo "$ac_t""yes" 1>&6
8922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8923   cat >> confdefs.h <<EOF
8924 #define $ac_tr_hdr 1
8925 EOF
8926  
8927 else
8928   echo "$ac_t""no" 1>&6
8929 fi
8930 done
8931
8932
8933
8934
8935 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8936 echo "configure:8937: checking for dlopen" >&5
8937 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8938   echo $ac_n "(cached) $ac_c" 1>&6
8939 else
8940   cat > conftest.$ac_ext <<EOF
8941 #line 8942 "configure"
8942 #include "confdefs.h"
8943 /* System header to define __stub macros and hopefully few prototypes,
8944     which can conflict with char dlopen(); below.  */
8945 #include <assert.h>
8946 /* Override any gcc2 internal prototype to avoid an error.  */
8947 /* We use char because int might match the return type of a gcc2
8948     builtin and then its argument prototype would still apply.  */
8949 char dlopen();
8950 char (*f)();
8951
8952 int main() {
8953
8954 /* The GNU C library defines this for functions which it implements
8955     to always fail with ENOSYS.  Some functions are actually named
8956     something starting with __ and the normal name is an alias.  */
8957 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8958 choke me
8959 #else
8960 f = dlopen;
8961 #endif
8962
8963 ; return 0; }
8964 EOF
8965 if { (eval echo configure:8966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8966   rm -rf conftest*
8967   eval "ac_cv_func_dlopen=yes"
8968 else
8969   echo "configure: failed program was:" >&5
8970   cat conftest.$ac_ext >&5
8971   rm -rf conftest*
8972   eval "ac_cv_func_dlopen=no"
8973 fi
8974 rm -f conftest*
8975 fi
8976
8977 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8978   echo "$ac_t""yes" 1>&6
8979   :
8980 else
8981   echo "$ac_t""no" 1>&6
8982 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8983 echo "configure:8984: checking for dlopen in -ldl" >&5
8984 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8985 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8986   echo $ac_n "(cached) $ac_c" 1>&6
8987 else
8988   ac_save_LIBS="$LIBS"
8989 LIBS="-ldl  $LIBS"
8990 cat > conftest.$ac_ext <<EOF
8991 #line 8992 "configure"
8992 #include "confdefs.h"
8993 /* Override any gcc2 internal prototype to avoid an error.  */
8994 /* We use char because int might match the return type of a gcc2
8995     builtin and then its argument prototype would still apply.  */
8996 char dlopen();
8997
8998 int main() {
8999 dlopen()
9000 ; return 0; }
9001 EOF
9002 if { (eval echo configure:9003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9003   rm -rf conftest*
9004   eval "ac_cv_lib_$ac_lib_var=yes"
9005 else
9006   echo "configure: failed program was:" >&5
9007   cat conftest.$ac_ext >&5
9008   rm -rf conftest*
9009   eval "ac_cv_lib_$ac_lib_var=no"
9010 fi
9011 rm -f conftest*
9012 LIBS="$ac_save_LIBS"
9013
9014 fi
9015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9016   echo "$ac_t""yes" 1>&6
9017     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9018     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9019   cat >> confdefs.h <<EOF
9020 #define $ac_tr_lib 1
9021 EOF
9022
9023   LIBS="-ldl $LIBS"
9024
9025 else
9026   echo "$ac_t""no" 1>&6
9027 fi
9028
9029 fi
9030
9031
9032 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9033 echo "configure:9034: checking for sigset in -lV3" >&5
9034 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9035 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9036   echo $ac_n "(cached) $ac_c" 1>&6
9037 else
9038   ac_save_LIBS="$LIBS"
9039 LIBS="-lV3  $LIBS"
9040 cat > conftest.$ac_ext <<EOF
9041 #line 9042 "configure"
9042 #include "confdefs.h"
9043 /* Override any gcc2 internal prototype to avoid an error.  */
9044 /* We use char because int might match the return type of a gcc2
9045     builtin and then its argument prototype would still apply.  */
9046 char sigset();
9047
9048 int main() {
9049 sigset()
9050 ; return 0; }
9051 EOF
9052 if { (eval echo configure:9053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9053   rm -rf conftest*
9054   eval "ac_cv_lib_$ac_lib_var=yes"
9055 else
9056   echo "configure: failed program was:" >&5
9057   cat conftest.$ac_ext >&5
9058   rm -rf conftest*
9059   eval "ac_cv_lib_$ac_lib_var=no"
9060 fi
9061 rm -f conftest*
9062 LIBS="$ac_save_LIBS"
9063
9064 fi
9065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9066   echo "$ac_t""yes" 1>&6
9067     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9068     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9069   cat >> confdefs.h <<EOF
9070 #define $ac_tr_lib 1
9071 EOF
9072
9073   LIBS="-lV3 $LIBS"
9074
9075 else
9076   echo "$ac_t""no" 1>&6
9077 fi
9078
9079
9080 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9081 echo "configure:9082: checking for winsock" >&5
9082 save_LIBS="$LIBS"
9083 for curlib in ws2_32 wsock32; do
9084         LIBS="$LIBS -l$curlib"
9085         cat > conftest.$ac_ext <<EOF
9086 #line 9087 "configure"
9087 #include "confdefs.h"
9088
9089                         char socket@12();
9090                         char select@20();
9091                         char closesocket@4();
9092                         char gethostname@8();
9093                         
9094 int main() {
9095
9096                         socket@12();
9097                         select@20();
9098                         closesocket@4();
9099                         gethostname@8();
9100                         
9101 ; return 0; }
9102 EOF
9103 if { (eval echo configure:9104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9104   rm -rf conftest*
9105   have_winsock=yes
9106 else
9107   echo "configure: failed program was:" >&5
9108   cat conftest.$ac_ext >&5
9109   rm -rf conftest*
9110   have_winsock=no
9111 fi
9112 rm -f conftest*
9113
9114         if test $have_winsock = yes; then
9115                 cat >> confdefs.h <<\EOF
9116 #define HAVE_WINSOCK 1
9117 EOF
9118
9119                 ac_cv_func_socket=yes
9120                 ac_cv_func_select=yes
9121                 ac_cv_func_closesocket=yes
9122                 ac_cv_func_gethostname=yes
9123                 if test $curlib = ws2_32; then
9124                         have_winsock=winsock2
9125                         cat >> confdefs.h <<\EOF
9126 #define HAVE_WINSOCK2 1
9127 EOF
9128
9129                 fi
9130                 break
9131         fi
9132         LIBS="$save_LIBS"
9133 done
9134 echo "$ac_t""$have_winsock" 1>&6
9135
9136
9137 echo $ac_n "checking for socket""... $ac_c" 1>&6
9138 echo "configure:9139: checking for socket" >&5
9139 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9140   echo $ac_n "(cached) $ac_c" 1>&6
9141 else
9142   cat > conftest.$ac_ext <<EOF
9143 #line 9144 "configure"
9144 #include "confdefs.h"
9145 /* System header to define __stub macros and hopefully few prototypes,
9146     which can conflict with char socket(); below.  */
9147 #include <assert.h>
9148 /* Override any gcc2 internal prototype to avoid an error.  */
9149 /* We use char because int might match the return type of a gcc2
9150     builtin and then its argument prototype would still apply.  */
9151 char socket();
9152 char (*f)();
9153
9154 int main() {
9155
9156 /* The GNU C library defines this for functions which it implements
9157     to always fail with ENOSYS.  Some functions are actually named
9158     something starting with __ and the normal name is an alias.  */
9159 #if defined (__stub_socket) || defined (__stub___socket)
9160 choke me
9161 #else
9162 f = socket;
9163 #endif
9164
9165 ; return 0; }
9166 EOF
9167 if { (eval echo configure:9168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9168   rm -rf conftest*
9169   eval "ac_cv_func_socket=yes"
9170 else
9171   echo "configure: failed program was:" >&5
9172   cat conftest.$ac_ext >&5
9173   rm -rf conftest*
9174   eval "ac_cv_func_socket=no"
9175 fi
9176 rm -f conftest*
9177 fi
9178
9179 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9180   echo "$ac_t""yes" 1>&6
9181   :
9182 else
9183   echo "$ac_t""no" 1>&6
9184         
9185         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9186 echo "configure:9187: checking for main in -lsocket" >&5
9187 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9188 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9189   echo $ac_n "(cached) $ac_c" 1>&6
9190 else
9191   ac_save_LIBS="$LIBS"
9192 LIBS="-lsocket  $LIBS"
9193 cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196
9197 int main() {
9198 main()
9199 ; return 0; }
9200 EOF
9201 if { (eval echo configure:9202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9202   rm -rf conftest*
9203   eval "ac_cv_lib_$ac_lib_var=yes"
9204 else
9205   echo "configure: failed program was:" >&5
9206   cat conftest.$ac_ext >&5
9207   rm -rf conftest*
9208   eval "ac_cv_lib_$ac_lib_var=no"
9209 fi
9210 rm -f conftest*
9211 LIBS="$ac_save_LIBS"
9212
9213 fi
9214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9215   echo "$ac_t""yes" 1>&6
9216     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9217     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9218   cat >> confdefs.h <<EOF
9219 #define $ac_tr_lib 1
9220 EOF
9221
9222   LIBS="-lsocket $LIBS"
9223
9224 else
9225   echo "$ac_t""no" 1>&6
9226 fi
9227
9228         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9229 echo "configure:9230: checking for main in -lnet" >&5
9230 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9231 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9232   echo $ac_n "(cached) $ac_c" 1>&6
9233 else
9234   ac_save_LIBS="$LIBS"
9235 LIBS="-lnet  $LIBS"
9236 cat > conftest.$ac_ext <<EOF
9237 #line 9238 "configure"
9238 #include "confdefs.h"
9239
9240 int main() {
9241 main()
9242 ; return 0; }
9243 EOF
9244 if { (eval echo configure:9245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9245   rm -rf conftest*
9246   eval "ac_cv_lib_$ac_lib_var=yes"
9247 else
9248   echo "configure: failed program was:" >&5
9249   cat conftest.$ac_ext >&5
9250   rm -rf conftest*
9251   eval "ac_cv_lib_$ac_lib_var=no"
9252 fi
9253 rm -f conftest*
9254 LIBS="$ac_save_LIBS"
9255
9256 fi
9257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9258   echo "$ac_t""yes" 1>&6
9259     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9260     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9261   cat >> confdefs.h <<EOF
9262 #define $ac_tr_lib 1
9263 EOF
9264
9265   LIBS="-lnet $LIBS"
9266
9267 else
9268   echo "$ac_t""no" 1>&6
9269 fi
9270
9271         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9272 echo "configure:9273: checking for main in -lnsl_s" >&5
9273 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9274 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9275   echo $ac_n "(cached) $ac_c" 1>&6
9276 else
9277   ac_save_LIBS="$LIBS"
9278 LIBS="-lnsl_s  $LIBS"
9279 cat > conftest.$ac_ext <<EOF
9280 #line 9281 "configure"
9281 #include "confdefs.h"
9282
9283 int main() {
9284 main()
9285 ; return 0; }
9286 EOF
9287 if { (eval echo configure:9288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9288   rm -rf conftest*
9289   eval "ac_cv_lib_$ac_lib_var=yes"
9290 else
9291   echo "configure: failed program was:" >&5
9292   cat conftest.$ac_ext >&5
9293   rm -rf conftest*
9294   eval "ac_cv_lib_$ac_lib_var=no"
9295 fi
9296 rm -f conftest*
9297 LIBS="$ac_save_LIBS"
9298
9299 fi
9300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9301   echo "$ac_t""yes" 1>&6
9302     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9303     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9304   cat >> confdefs.h <<EOF
9305 #define $ac_tr_lib 1
9306 EOF
9307
9308   LIBS="-lnsl_s $LIBS"
9309
9310 else
9311   echo "$ac_t""no" 1>&6
9312 fi
9313
9314         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9315 echo "configure:9316: checking for main in -lnsl" >&5
9316 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9317 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9318   echo $ac_n "(cached) $ac_c" 1>&6
9319 else
9320   ac_save_LIBS="$LIBS"
9321 LIBS="-lnsl  $LIBS"
9322 cat > conftest.$ac_ext <<EOF
9323 #line 9324 "configure"
9324 #include "confdefs.h"
9325
9326 int main() {
9327 main()
9328 ; return 0; }
9329 EOF
9330 if { (eval echo configure:9331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9331   rm -rf conftest*
9332   eval "ac_cv_lib_$ac_lib_var=yes"
9333 else
9334   echo "configure: failed program was:" >&5
9335   cat conftest.$ac_ext >&5
9336   rm -rf conftest*
9337   eval "ac_cv_lib_$ac_lib_var=no"
9338 fi
9339 rm -f conftest*
9340 LIBS="$ac_save_LIBS"
9341
9342 fi
9343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9344   echo "$ac_t""yes" 1>&6
9345     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9346     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9347   cat >> confdefs.h <<EOF
9348 #define $ac_tr_lib 1
9349 EOF
9350
9351   LIBS="-lnsl $LIBS"
9352
9353 else
9354   echo "$ac_t""no" 1>&6
9355 fi
9356
9357         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9358 echo "configure:9359: checking for socket in -linet" >&5
9359 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9360 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9361   echo $ac_n "(cached) $ac_c" 1>&6
9362 else
9363   ac_save_LIBS="$LIBS"
9364 LIBS="-linet  $LIBS"
9365 cat > conftest.$ac_ext <<EOF
9366 #line 9367 "configure"
9367 #include "confdefs.h"
9368 /* Override any gcc2 internal prototype to avoid an error.  */
9369 /* We use char because int might match the return type of a gcc2
9370     builtin and then its argument prototype would still apply.  */
9371 char socket();
9372
9373 int main() {
9374 socket()
9375 ; return 0; }
9376 EOF
9377 if { (eval echo configure:9378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9378   rm -rf conftest*
9379   eval "ac_cv_lib_$ac_lib_var=yes"
9380 else
9381   echo "configure: failed program was:" >&5
9382   cat conftest.$ac_ext >&5
9383   rm -rf conftest*
9384   eval "ac_cv_lib_$ac_lib_var=no"
9385 fi
9386 rm -f conftest*
9387 LIBS="$ac_save_LIBS"
9388
9389 fi
9390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9391   echo "$ac_t""yes" 1>&6
9392     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9393     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9394   cat >> confdefs.h <<EOF
9395 #define $ac_tr_lib 1
9396 EOF
9397
9398   LIBS="-linet $LIBS"
9399
9400 else
9401   echo "$ac_t""no" 1>&6
9402 fi
9403
9404         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9405 echo "configure:9406: checking for main in -lgen" >&5
9406 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9407 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9408   echo $ac_n "(cached) $ac_c" 1>&6
9409 else
9410   ac_save_LIBS="$LIBS"
9411 LIBS="-lgen  $LIBS"
9412 cat > conftest.$ac_ext <<EOF
9413 #line 9414 "configure"
9414 #include "confdefs.h"
9415
9416 int main() {
9417 main()
9418 ; return 0; }
9419 EOF
9420 if { (eval echo configure:9421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9421   rm -rf conftest*
9422   eval "ac_cv_lib_$ac_lib_var=yes"
9423 else
9424   echo "configure: failed program was:" >&5
9425   cat conftest.$ac_ext >&5
9426   rm -rf conftest*
9427   eval "ac_cv_lib_$ac_lib_var=no"
9428 fi
9429 rm -f conftest*
9430 LIBS="$ac_save_LIBS"
9431
9432 fi
9433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9434   echo "$ac_t""yes" 1>&6
9435     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9436     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9437   cat >> confdefs.h <<EOF
9438 #define $ac_tr_lib 1
9439 EOF
9440
9441   LIBS="-lgen $LIBS"
9442
9443 else
9444   echo "$ac_t""no" 1>&6
9445 fi
9446
9447
9448 fi
9449
9450
9451 echo $ac_n "checking for select""... $ac_c" 1>&6
9452 echo "configure:9453: checking for select" >&5
9453 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9454   echo $ac_n "(cached) $ac_c" 1>&6
9455 else
9456   cat > conftest.$ac_ext <<EOF
9457 #line 9458 "configure"
9458 #include "confdefs.h"
9459 /* System header to define __stub macros and hopefully few prototypes,
9460     which can conflict with char select(); below.  */
9461 #include <assert.h>
9462 /* Override any gcc2 internal prototype to avoid an error.  */
9463 /* We use char because int might match the return type of a gcc2
9464     builtin and then its argument prototype would still apply.  */
9465 char select();
9466 char (*f)();
9467
9468 int main() {
9469
9470 /* The GNU C library defines this for functions which it implements
9471     to always fail with ENOSYS.  Some functions are actually named
9472     something starting with __ and the normal name is an alias.  */
9473 #if defined (__stub_select) || defined (__stub___select)
9474 choke me
9475 #else
9476 f = select;
9477 #endif
9478
9479 ; return 0; }
9480 EOF
9481 if { (eval echo configure:9482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9482   rm -rf conftest*
9483   eval "ac_cv_func_select=yes"
9484 else
9485   echo "configure: failed program was:" >&5
9486   cat conftest.$ac_ext >&5
9487   rm -rf conftest*
9488   eval "ac_cv_func_select=no"
9489 fi
9490 rm -f conftest*
9491 fi
9492
9493 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9494   echo "$ac_t""yes" 1>&6
9495   :
9496 else
9497   echo "$ac_t""no" 1>&6
9498 { echo "configure: error: select() required." 1>&2; exit 1; }
9499 fi
9500
9501
9502 if test "${ac_cv_header_winsock_h}" != yes; then
9503                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9504 echo "configure:9505: checking types of arguments for select()" >&5
9505  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9506   echo $ac_n "(cached) $ac_c" 1>&6
9507 else
9508    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9509   echo $ac_n "(cached) $ac_c" 1>&6
9510 else
9511     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9512   echo $ac_n "(cached) $ac_c" 1>&6
9513 else
9514      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9515      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9516       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9517        cat > conftest.$ac_ext <<EOF
9518 #line 9519 "configure"
9519 #include "confdefs.h"
9520 #ifdef HAVE_SYS_TYPES_H
9521 #include <sys/types.h>
9522 #endif
9523 #ifdef HAVE_SYS_TIME_H
9524 #include <sys/time.h>
9525 #endif
9526 #ifdef HAVE_SYS_SELECT_H
9527 #include <sys/select.h>
9528 #endif
9529 #ifdef HAVE_SYS_SOCKET_H
9530 #include <sys/socket.h>
9531 #endif
9532 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);
9533 int main() {
9534
9535 ; return 0; }
9536 EOF
9537 if { (eval echo configure:9538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9538   rm -rf conftest*
9539           ac_not_found=no ; break 3
9540 else
9541   echo "configure: failed program was:" >&5
9542   cat conftest.$ac_ext >&5
9543   rm -rf conftest*
9544   ac_not_found=yes
9545 fi
9546 rm -f conftest*
9547       done
9548      done
9549     done
9550    
9551 fi
9552   
9553 fi
9554  
9555 fi
9556  if test "$ac_not_found" = yes; then
9557   ac_cv_func_select_arg1=int 
9558   ac_cv_func_select_arg234='int *' 
9559   ac_cv_func_select_arg5='struct timeval *'
9560  fi
9561  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9562  cat >> confdefs.h <<EOF
9563 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9564 EOF
9565
9566  cat >> confdefs.h <<EOF
9567 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9568 EOF
9569
9570  cat >> confdefs.h <<EOF
9571 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9572 EOF
9573
9574
9575 fi
9576
9577
9578 for ac_hdr in regex.h 
9579 do
9580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9582 echo "configure:9583: checking for $ac_hdr" >&5
9583 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9584   echo $ac_n "(cached) $ac_c" 1>&6
9585 else
9586   cat > conftest.$ac_ext <<EOF
9587 #line 9588 "configure"
9588 #include "confdefs.h"
9589 #include <$ac_hdr>
9590 EOF
9591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9592 { (eval echo configure:9593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9594 if test -z "$ac_err"; then
9595   rm -rf conftest*
9596   eval "ac_cv_header_$ac_safe=yes"
9597 else
9598   echo "$ac_err" >&5
9599   echo "configure: failed program was:" >&5
9600   cat conftest.$ac_ext >&5
9601   rm -rf conftest*
9602   eval "ac_cv_header_$ac_safe=no"
9603 fi
9604 rm -f conftest*
9605 fi
9606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9607   echo "$ac_t""yes" 1>&6
9608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9609   cat >> confdefs.h <<EOF
9610 #define $ac_tr_hdr 1
9611 EOF
9612  
9613 else
9614   echo "$ac_t""no" 1>&6
9615 fi
9616 done
9617
9618 if test "$ac_cv_header_regex_h" != yes ; then
9619         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9620 fi
9621
9622 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9623 echo "configure:9624: checking for library containing regfree" >&5
9624 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9625   echo $ac_n "(cached) $ac_c" 1>&6
9626 else
9627   ac_func_search_save_LIBS="$LIBS"
9628 ac_cv_search_regfree="no"
9629 cat > conftest.$ac_ext <<EOF
9630 #line 9631 "configure"
9631 #include "confdefs.h"
9632 /* Override any gcc2 internal prototype to avoid an error.  */
9633 /* We use char because int might match the return type of a gcc2
9634     builtin and then its argument prototype would still apply.  */
9635 char regfree();
9636
9637 int main() {
9638 regfree()
9639 ; return 0; }
9640 EOF
9641 if { (eval echo configure:9642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9642   rm -rf conftest*
9643   ac_cv_search_regfree="none required"
9644 else
9645   echo "configure: failed program was:" >&5
9646   cat conftest.$ac_ext >&5
9647 fi
9648 rm -f conftest*
9649 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9650 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9651 cat > conftest.$ac_ext <<EOF
9652 #line 9653 "configure"
9653 #include "confdefs.h"
9654 /* Override any gcc2 internal prototype to avoid an error.  */
9655 /* We use char because int might match the return type of a gcc2
9656     builtin and then its argument prototype would still apply.  */
9657 char regfree();
9658
9659 int main() {
9660 regfree()
9661 ; return 0; }
9662 EOF
9663 if { (eval echo configure:9664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9664   rm -rf conftest*
9665   ac_cv_search_regfree="-l$ac_lib"
9666 break
9667 else
9668   echo "configure: failed program was:" >&5
9669   cat conftest.$ac_ext >&5
9670 fi
9671 rm -f conftest*
9672 done
9673 LIBS="$ac_func_search_save_LIBS"
9674 fi
9675
9676 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9677 if test "$ac_cv_search_regfree" != "no"; then
9678   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9679   :
9680 else :
9681   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9682 fi
9683
9684
9685 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9686 echo "configure:9687: checking for compatible POSIX regex" >&5
9687 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9688   echo $ac_n "(cached) $ac_c" 1>&6
9689 else
9690   
9691         if test "$cross_compiling" = yes; then
9692   ol_cv_c_posix_regex=cross
9693 else
9694   cat > conftest.$ac_ext <<EOF
9695 #line 9696 "configure"
9696 #include "confdefs.h"
9697
9698 #include <sys/types.h>
9699 #include <regex.h>
9700 static char *pattern, *string;
9701 main()
9702 {
9703         int rc;
9704         regex_t re;
9705
9706         pattern = "^A";
9707
9708         if(regcomp(&re, pattern, 0)) {
9709                 return -1;
9710         }
9711         
9712         string = "ALL MATCH";
9713         
9714         rc = regexec(&re, string, 0, (void*)0, 0);
9715
9716         regfree(&re);
9717
9718         return rc;
9719 }
9720 EOF
9721 if { (eval echo configure:9722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9722 then
9723   ol_cv_c_posix_regex=yes
9724 else
9725   echo "configure: failed program was:" >&5
9726   cat conftest.$ac_ext >&5
9727   rm -fr conftest*
9728   ol_cv_c_posix_regex=no
9729 fi
9730 rm -fr conftest*
9731 fi
9732
9733 fi
9734
9735 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9736
9737 if test "$ol_cv_c_posix_regex" = no ; then
9738         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9739 fi
9740
9741
9742 have_uuid=no
9743 for ac_hdr in sys/uuid.h
9744 do
9745 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9746 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9747 echo "configure:9748: checking for $ac_hdr" >&5
9748 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9749   echo $ac_n "(cached) $ac_c" 1>&6
9750 else
9751   cat > conftest.$ac_ext <<EOF
9752 #line 9753 "configure"
9753 #include "confdefs.h"
9754 #include <$ac_hdr>
9755 EOF
9756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9757 { (eval echo configure:9758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9759 if test -z "$ac_err"; then
9760   rm -rf conftest*
9761   eval "ac_cv_header_$ac_safe=yes"
9762 else
9763   echo "$ac_err" >&5
9764   echo "configure: failed program was:" >&5
9765   cat conftest.$ac_ext >&5
9766   rm -rf conftest*
9767   eval "ac_cv_header_$ac_safe=no"
9768 fi
9769 rm -f conftest*
9770 fi
9771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9772   echo "$ac_t""yes" 1>&6
9773     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9774   cat >> confdefs.h <<EOF
9775 #define $ac_tr_hdr 1
9776 EOF
9777  
9778 else
9779   echo "$ac_t""no" 1>&6
9780 fi
9781 done
9782
9783 if test $ac_cv_header_sys_uuid_h = yes ; then
9784         save_LIBS="$LIBS"
9785         
9786 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9787 echo "configure:9788: checking for library containing uuid_to_str" >&5
9788 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9789   echo $ac_n "(cached) $ac_c" 1>&6
9790 else
9791   ac_func_search_save_LIBS="$LIBS"
9792 ac_cv_search_uuid_to_str="no"
9793 cat > conftest.$ac_ext <<EOF
9794 #line 9795 "configure"
9795 #include "confdefs.h"
9796 /* Override any gcc2 internal prototype to avoid an error.  */
9797 /* We use char because int might match the return type of a gcc2
9798     builtin and then its argument prototype would still apply.  */
9799 char uuid_to_str();
9800
9801 int main() {
9802 uuid_to_str()
9803 ; return 0; }
9804 EOF
9805 if { (eval echo configure:9806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9806   rm -rf conftest*
9807   ac_cv_search_uuid_to_str="none required"
9808 else
9809   echo "configure: failed program was:" >&5
9810   cat conftest.$ac_ext >&5
9811 fi
9812 rm -f conftest*
9813 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9814 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9815 cat > conftest.$ac_ext <<EOF
9816 #line 9817 "configure"
9817 #include "confdefs.h"
9818 /* Override any gcc2 internal prototype to avoid an error.  */
9819 /* We use char because int might match the return type of a gcc2
9820     builtin and then its argument prototype would still apply.  */
9821 char uuid_to_str();
9822
9823 int main() {
9824 uuid_to_str()
9825 ; return 0; }
9826 EOF
9827 if { (eval echo configure:9828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9828   rm -rf conftest*
9829   ac_cv_search_uuid_to_str="-l$ac_lib"
9830 break
9831 else
9832   echo "configure: failed program was:" >&5
9833   cat conftest.$ac_ext >&5
9834 fi
9835 rm -f conftest*
9836 done
9837 LIBS="$ac_func_search_save_LIBS"
9838 fi
9839
9840 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9841 if test "$ac_cv_search_uuid_to_str" != "no"; then
9842   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9843   have_uuid=yes
9844 else :
9845   :
9846 fi
9847         LIBS="$save_LIBS"
9848
9849         if test have_uuid = yes ; then
9850                 cat >> confdefs.h <<\EOF
9851 #define HAVE_UUID_TO_STR 1
9852 EOF
9853
9854
9855                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9856                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9857         fi
9858 fi
9859
9860 if test $have_uuid = no ; then
9861         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9862 echo "configure:9863: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9863         save_LIBS="$LIBS"
9864         LIBS="$LIBS -lrpcrt4"
9865         cat > conftest.$ac_ext <<EOF
9866 #line 9867 "configure"
9867 #include "confdefs.h"
9868
9869                 char UuidCreate@4();
9870                 char UuidToStringA@8();
9871                 
9872 int main() {
9873
9874                 UuidCreate@4();
9875                 UuidToStringA@8();
9876                 
9877 ; return 0; }
9878 EOF
9879 if { (eval echo configure:9880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9880   rm -rf conftest*
9881   need_rpcrt=yes
9882 else
9883   echo "configure: failed program was:" >&5
9884   cat conftest.$ac_ext >&5
9885   rm -rf conftest*
9886   need_rpcrt=no
9887 fi
9888 rm -f conftest*
9889         if test $need_rpcrt = yes; then
9890                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9891         fi
9892         LIBS="$save_LIBS"
9893         echo "$ac_t""$need_rpcrt" 1>&6
9894 fi
9895
9896 ol_link_dnssrv=no
9897 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9898 echo "configure:9899: checking for res_query" >&5
9899 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9900   echo $ac_n "(cached) $ac_c" 1>&6
9901 else
9902   cat > conftest.$ac_ext <<EOF
9903 #line 9904 "configure"
9904 #include "confdefs.h"
9905 /* System header to define __stub macros and hopefully few prototypes,
9906     which can conflict with char res_query(); below.  */
9907 #include <assert.h>
9908 /* Override any gcc2 internal prototype to avoid an error.  */
9909 /* We use char because int might match the return type of a gcc2
9910     builtin and then its argument prototype would still apply.  */
9911 char res_query();
9912 char (*f)();
9913
9914 int main() {
9915
9916 /* The GNU C library defines this for functions which it implements
9917     to always fail with ENOSYS.  Some functions are actually named
9918     something starting with __ and the normal name is an alias.  */
9919 #if defined (__stub_res_query) || defined (__stub___res_query)
9920 choke me
9921 #else
9922 f = res_query;
9923 #endif
9924
9925 ; return 0; }
9926 EOF
9927 if { (eval echo configure:9928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9928   rm -rf conftest*
9929   eval "ac_cv_func_res_query=yes"
9930 else
9931   echo "configure: failed program was:" >&5
9932   cat conftest.$ac_ext >&5
9933   rm -rf conftest*
9934   eval "ac_cv_func_res_query=no"
9935 fi
9936 rm -f conftest*
9937 fi
9938
9939 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9940   echo "$ac_t""yes" 1>&6
9941   :
9942 else
9943   echo "$ac_t""no" 1>&6
9944 fi
9945
9946 if test $ac_cv_func_res_query = no ; then 
9947         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9948 echo "configure:9949: checking for __res_query" >&5
9949 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9950   echo $ac_n "(cached) $ac_c" 1>&6
9951 else
9952   cat > conftest.$ac_ext <<EOF
9953 #line 9954 "configure"
9954 #include "confdefs.h"
9955 /* System header to define __stub macros and hopefully few prototypes,
9956     which can conflict with char __res_query(); below.  */
9957 #include <assert.h>
9958 /* Override any gcc2 internal prototype to avoid an error.  */
9959 /* We use char because int might match the return type of a gcc2
9960     builtin and then its argument prototype would still apply.  */
9961 char __res_query();
9962 char (*f)();
9963
9964 int main() {
9965
9966 /* The GNU C library defines this for functions which it implements
9967     to always fail with ENOSYS.  Some functions are actually named
9968     something starting with __ and the normal name is an alias.  */
9969 #if defined (__stub___res_query) || defined (__stub_____res_query)
9970 choke me
9971 #else
9972 f = __res_query;
9973 #endif
9974
9975 ; return 0; }
9976 EOF
9977 if { (eval echo configure:9978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9978   rm -rf conftest*
9979   eval "ac_cv_func___res_query=yes"
9980 else
9981   echo "configure: failed program was:" >&5
9982   cat conftest.$ac_ext >&5
9983   rm -rf conftest*
9984   eval "ac_cv_func___res_query=no"
9985 fi
9986 rm -f conftest*
9987 fi
9988
9989 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9990   echo "$ac_t""yes" 1>&6
9991   :
9992 else
9993   echo "$ac_t""no" 1>&6
9994 fi
9995
9996         ac_cv_func_res_query=$ac_cv_func___res_query
9997 fi
9998
9999 if test $ac_cv_func_res_query = no ; then 
10000         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10001 echo "configure:10002: checking for res_query in -lbind" >&5
10002 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10003 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10004   echo $ac_n "(cached) $ac_c" 1>&6
10005 else
10006   ac_save_LIBS="$LIBS"
10007 LIBS="-lbind  $LIBS"
10008 cat > conftest.$ac_ext <<EOF
10009 #line 10010 "configure"
10010 #include "confdefs.h"
10011 /* Override any gcc2 internal prototype to avoid an error.  */
10012 /* We use char because int might match the return type of a gcc2
10013     builtin and then its argument prototype would still apply.  */
10014 char res_query();
10015
10016 int main() {
10017 res_query()
10018 ; return 0; }
10019 EOF
10020 if { (eval echo configure:10021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10021   rm -rf conftest*
10022   eval "ac_cv_lib_$ac_lib_var=yes"
10023 else
10024   echo "configure: failed program was:" >&5
10025   cat conftest.$ac_ext >&5
10026   rm -rf conftest*
10027   eval "ac_cv_lib_$ac_lib_var=no"
10028 fi
10029 rm -f conftest*
10030 LIBS="$ac_save_LIBS"
10031
10032 fi
10033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10034   echo "$ac_t""yes" 1>&6
10035     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10036     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10037   cat >> confdefs.h <<EOF
10038 #define $ac_tr_lib 1
10039 EOF
10040
10041   LIBS="-lbind $LIBS"
10042
10043 else
10044   echo "$ac_t""no" 1>&6
10045 fi
10046
10047         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10048 fi
10049
10050 if test $ac_cv_func_res_query = no ; then 
10051         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10052 echo "configure:10053: checking for __res_query in -lbind" >&5
10053 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10054 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10055   echo $ac_n "(cached) $ac_c" 1>&6
10056 else
10057   ac_save_LIBS="$LIBS"
10058 LIBS="-lbind  $LIBS"
10059 cat > conftest.$ac_ext <<EOF
10060 #line 10061 "configure"
10061 #include "confdefs.h"
10062 /* Override any gcc2 internal prototype to avoid an error.  */
10063 /* We use char because int might match the return type of a gcc2
10064     builtin and then its argument prototype would still apply.  */
10065 char __res_query();
10066
10067 int main() {
10068 __res_query()
10069 ; return 0; }
10070 EOF
10071 if { (eval echo configure:10072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10072   rm -rf conftest*
10073   eval "ac_cv_lib_$ac_lib_var=yes"
10074 else
10075   echo "configure: failed program was:" >&5
10076   cat conftest.$ac_ext >&5
10077   rm -rf conftest*
10078   eval "ac_cv_lib_$ac_lib_var=no"
10079 fi
10080 rm -f conftest*
10081 LIBS="$ac_save_LIBS"
10082
10083 fi
10084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10085   echo "$ac_t""yes" 1>&6
10086     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10087     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10088   cat >> confdefs.h <<EOF
10089 #define $ac_tr_lib 1
10090 EOF
10091
10092   LIBS="-lbind $LIBS"
10093
10094 else
10095   echo "$ac_t""no" 1>&6
10096 fi
10097
10098         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10099 fi
10100
10101 if test $ac_cv_func_res_query = no ; then 
10102         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10103 echo "configure:10104: checking for res_query in -lresolv" >&5
10104 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10105 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10106   echo $ac_n "(cached) $ac_c" 1>&6
10107 else
10108   ac_save_LIBS="$LIBS"
10109 LIBS="-lresolv  $LIBS"
10110 cat > conftest.$ac_ext <<EOF
10111 #line 10112 "configure"
10112 #include "confdefs.h"
10113 /* Override any gcc2 internal prototype to avoid an error.  */
10114 /* We use char because int might match the return type of a gcc2
10115     builtin and then its argument prototype would still apply.  */
10116 char res_query();
10117
10118 int main() {
10119 res_query()
10120 ; return 0; }
10121 EOF
10122 if { (eval echo configure:10123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10123   rm -rf conftest*
10124   eval "ac_cv_lib_$ac_lib_var=yes"
10125 else
10126   echo "configure: failed program was:" >&5
10127   cat conftest.$ac_ext >&5
10128   rm -rf conftest*
10129   eval "ac_cv_lib_$ac_lib_var=no"
10130 fi
10131 rm -f conftest*
10132 LIBS="$ac_save_LIBS"
10133
10134 fi
10135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10136   echo "$ac_t""yes" 1>&6
10137     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10138     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10139   cat >> confdefs.h <<EOF
10140 #define $ac_tr_lib 1
10141 EOF
10142
10143   LIBS="-lresolv $LIBS"
10144
10145 else
10146   echo "$ac_t""no" 1>&6
10147 fi
10148
10149         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10150 fi
10151
10152 if test $ac_cv_func_res_query = no ; then 
10153         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10154 echo "configure:10155: checking for __res_query in -lresolv" >&5
10155 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10156 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10157   echo $ac_n "(cached) $ac_c" 1>&6
10158 else
10159   ac_save_LIBS="$LIBS"
10160 LIBS="-lresolv  $LIBS"
10161 cat > conftest.$ac_ext <<EOF
10162 #line 10163 "configure"
10163 #include "confdefs.h"
10164 /* Override any gcc2 internal prototype to avoid an error.  */
10165 /* We use char because int might match the return type of a gcc2
10166     builtin and then its argument prototype would still apply.  */
10167 char __res_query();
10168
10169 int main() {
10170 __res_query()
10171 ; return 0; }
10172 EOF
10173 if { (eval echo configure:10174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10174   rm -rf conftest*
10175   eval "ac_cv_lib_$ac_lib_var=yes"
10176 else
10177   echo "configure: failed program was:" >&5
10178   cat conftest.$ac_ext >&5
10179   rm -rf conftest*
10180   eval "ac_cv_lib_$ac_lib_var=no"
10181 fi
10182 rm -f conftest*
10183 LIBS="$ac_save_LIBS"
10184
10185 fi
10186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10187   echo "$ac_t""yes" 1>&6
10188     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10189     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10190   cat >> confdefs.h <<EOF
10191 #define $ac_tr_lib 1
10192 EOF
10193
10194   LIBS="-lresolv $LIBS"
10195
10196 else
10197   echo "$ac_t""no" 1>&6
10198 fi
10199
10200         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10201 fi
10202
10203 if test "$ac_cv_func_res_query" = yes ; then
10204         cat >> confdefs.h <<\EOF
10205 #define HAVE_RES_QUERY 1
10206 EOF
10207
10208
10209         if test $ol_enable_dnssrv != no ; then
10210                 ol_link_dnssrv=yes
10211         fi
10212 fi
10213
10214 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10215         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10216 fi
10217
10218 for ac_func in getaddrinfo gai_strerror inet_ntop 
10219 do
10220 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10221 echo "configure:10222: checking for $ac_func" >&5
10222 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10223   echo $ac_n "(cached) $ac_c" 1>&6
10224 else
10225   cat > conftest.$ac_ext <<EOF
10226 #line 10227 "configure"
10227 #include "confdefs.h"
10228 /* System header to define __stub macros and hopefully few prototypes,
10229     which can conflict with char $ac_func(); below.  */
10230 #include <assert.h>
10231 /* Override any gcc2 internal prototype to avoid an error.  */
10232 /* We use char because int might match the return type of a gcc2
10233     builtin and then its argument prototype would still apply.  */
10234 char $ac_func();
10235 char (*f)();
10236
10237 int main() {
10238
10239 /* The GNU C library defines this for functions which it implements
10240     to always fail with ENOSYS.  Some functions are actually named
10241     something starting with __ and the normal name is an alias.  */
10242 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10243 choke me
10244 #else
10245 f = $ac_func;
10246 #endif
10247
10248 ; return 0; }
10249 EOF
10250 if { (eval echo configure:10251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10251   rm -rf conftest*
10252   eval "ac_cv_func_$ac_func=yes"
10253 else
10254   echo "configure: failed program was:" >&5
10255   cat conftest.$ac_ext >&5
10256   rm -rf conftest*
10257   eval "ac_cv_func_$ac_func=no"
10258 fi
10259 rm -f conftest*
10260 fi
10261
10262 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10263   echo "$ac_t""yes" 1>&6
10264     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10265   cat >> confdefs.h <<EOF
10266 #define $ac_tr_func 1
10267 EOF
10268  
10269 else
10270   echo "$ac_t""no" 1>&6
10271 fi
10272 done
10273
10274
10275 ol_link_ipv6=no
10276 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10277         if test $ol_enable_ipv6 = yes ; then
10278                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10279         fi
10280 elif test $ol_enable_ipv6 != no ; then
10281         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10282 echo "configure:10283: checking INET6_ADDRSTRLEN" >&5
10283 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10284   echo $ac_n "(cached) $ac_c" 1>&6
10285 else
10286   
10287                 cat > conftest.$ac_ext <<EOF
10288 #line 10289 "configure"
10289 #include "confdefs.h"
10290
10291 #                       include <netinet/in.h>
10292 #                       ifdef INET6_ADDRSTRLEN
10293                                 __has_inet6_addrstrlen__;
10294 #                       endif
10295                 
10296 EOF
10297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10298   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10299   rm -rf conftest*
10300   ol_cv_inet6_addrstrlen=yes
10301 else
10302   rm -rf conftest*
10303   ol_cv_inet6_addrstrlen=no
10304 fi
10305 rm -f conftest*
10306
10307 fi
10308
10309 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10310
10311
10312         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10313 echo "configure:10314: checking struct sockaddr_storage" >&5
10314 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10315   echo $ac_n "(cached) $ac_c" 1>&6
10316 else
10317   
10318                 cat > conftest.$ac_ext <<EOF
10319 #line 10320 "configure"
10320 #include "confdefs.h"
10321
10322 #include <sys/types.h>
10323 #include <sys/socket.h>
10324
10325 int main() {
10326
10327                         struct sockaddr_storage ss;
10328
10329 ; return 0; }
10330 EOF
10331 if { (eval echo configure:10332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10332   rm -rf conftest*
10333   ol_cv_struct_sockaddr_storage=yes
10334 else
10335   echo "configure: failed program was:" >&5
10336   cat conftest.$ac_ext >&5
10337   rm -rf conftest*
10338   ol_cv_struct_sockaddr_storage=no
10339 fi
10340 rm -f conftest*
10341 fi
10342
10343 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10344
10345         if test $ol_cv_inet6_addrstrlen = yes \
10346                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10347                 ol_link_ipv6=yes
10348         elif test $ol_enable_ipv6 = yes \
10349                         -a $ol_cv_inet6_addrstrlen = no ; then
10350                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10351         elif test $ol_enable_ipv6 = yes \
10352                         -a $ol_cv_struct_sockaddr_storage = no ; then
10353                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10354         fi
10355 fi
10356
10357 if test $ol_enable_local != no ; then
10358         for ac_hdr in sys/un.h 
10359 do
10360 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10361 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10362 echo "configure:10363: checking for $ac_hdr" >&5
10363 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10364   echo $ac_n "(cached) $ac_c" 1>&6
10365 else
10366   cat > conftest.$ac_ext <<EOF
10367 #line 10368 "configure"
10368 #include "confdefs.h"
10369 #include <$ac_hdr>
10370 EOF
10371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10372 { (eval echo configure:10373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10374 if test -z "$ac_err"; then
10375   rm -rf conftest*
10376   eval "ac_cv_header_$ac_safe=yes"
10377 else
10378   echo "$ac_err" >&5
10379   echo "configure: failed program was:" >&5
10380   cat conftest.$ac_ext >&5
10381   rm -rf conftest*
10382   eval "ac_cv_header_$ac_safe=no"
10383 fi
10384 rm -f conftest*
10385 fi
10386 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10387   echo "$ac_t""yes" 1>&6
10388     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10389   cat >> confdefs.h <<EOF
10390 #define $ac_tr_hdr 1
10391 EOF
10392  
10393 else
10394   echo "$ac_t""no" 1>&6
10395 fi
10396 done
10397
10398
10399         if test $ol_enable_local = auto ; then
10400                 ol_enable_local=$ac_cv_header_sys_un_h
10401         elif test $ac_cv_header_sys_un_h = no ; then
10402                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10403         fi
10404 fi
10405
10406 ol_link_kbind=no
10407 ol_link_kpasswd=no
10408 ol_link_krb5=no
10409 ol_link_krb4=no
10410
10411 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10412         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10413         -o $ol_with_kerberos = k425 ; then
10414
10415         for ac_hdr in krb5.h
10416 do
10417 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10418 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10419 echo "configure:10420: checking for $ac_hdr" >&5
10420 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10421   echo $ac_n "(cached) $ac_c" 1>&6
10422 else
10423   cat > conftest.$ac_ext <<EOF
10424 #line 10425 "configure"
10425 #include "confdefs.h"
10426 #include <$ac_hdr>
10427 EOF
10428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10429 { (eval echo configure:10430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10431 if test -z "$ac_err"; then
10432   rm -rf conftest*
10433   eval "ac_cv_header_$ac_safe=yes"
10434 else
10435   echo "$ac_err" >&5
10436   echo "configure: failed program was:" >&5
10437   cat conftest.$ac_ext >&5
10438   rm -rf conftest*
10439   eval "ac_cv_header_$ac_safe=no"
10440 fi
10441 rm -f conftest*
10442 fi
10443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10444   echo "$ac_t""yes" 1>&6
10445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10446   cat >> confdefs.h <<EOF
10447 #define $ac_tr_hdr 1
10448 EOF
10449  
10450 else
10451   echo "$ac_t""no" 1>&6
10452 fi
10453 done
10454
10455
10456         if test $ac_cv_header_krb5_h = yes ; then
10457                                 for ac_hdr in heim_err.h
10458 do
10459 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10460 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10461 echo "configure:10462: checking for $ac_hdr" >&5
10462 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10463   echo $ac_n "(cached) $ac_c" 1>&6
10464 else
10465   cat > conftest.$ac_ext <<EOF
10466 #line 10467 "configure"
10467 #include "confdefs.h"
10468 #include <$ac_hdr>
10469 EOF
10470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10471 { (eval echo configure:10472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10473 if test -z "$ac_err"; then
10474   rm -rf conftest*
10475   eval "ac_cv_header_$ac_safe=yes"
10476 else
10477   echo "$ac_err" >&5
10478   echo "configure: failed program was:" >&5
10479   cat conftest.$ac_ext >&5
10480   rm -rf conftest*
10481   eval "ac_cv_header_$ac_safe=no"
10482 fi
10483 rm -f conftest*
10484 fi
10485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10486   echo "$ac_t""yes" 1>&6
10487     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10488   cat >> confdefs.h <<EOF
10489 #define $ac_tr_hdr 1
10490 EOF
10491  
10492 else
10493   echo "$ac_t""no" 1>&6
10494 fi
10495 done
10496
10497                 if test $ac_cv_header_heim_err_h = yes ; then
10498                         krb5_impl=heimdal
10499                 else
10500                         krb5_impl=mit
10501                 fi
10502
10503                 if test $krb5_impl = mit; then
10504                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10505 echo "configure:10506: checking for main in -lk5crypto" >&5
10506 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10507 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10508   echo $ac_n "(cached) $ac_c" 1>&6
10509 else
10510   ac_save_LIBS="$LIBS"
10511 LIBS="-lk5crypto  $LIBS"
10512 cat > conftest.$ac_ext <<EOF
10513 #line 10514 "configure"
10514 #include "confdefs.h"
10515
10516 int main() {
10517 main()
10518 ; return 0; }
10519 EOF
10520 if { (eval echo configure:10521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10521   rm -rf conftest*
10522   eval "ac_cv_lib_$ac_lib_var=yes"
10523 else
10524   echo "configure: failed program was:" >&5
10525   cat conftest.$ac_ext >&5
10526   rm -rf conftest*
10527   eval "ac_cv_lib_$ac_lib_var=no"
10528 fi
10529 rm -f conftest*
10530 LIBS="$ac_save_LIBS"
10531
10532 fi
10533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10534   echo "$ac_t""yes" 1>&6
10535   krb5crypto=k5crypto
10536 else
10537   echo "$ac_t""no" 1>&6
10538 krb5crypto=crypto
10539 fi
10540
10541
10542                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10543 echo "configure:10544: checking for main in -lkrb5" >&5
10544 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10545 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10546   echo $ac_n "(cached) $ac_c" 1>&6
10547 else
10548   ac_save_LIBS="$LIBS"
10549 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10550 cat > conftest.$ac_ext <<EOF
10551 #line 10552 "configure"
10552 #include "confdefs.h"
10553
10554 int main() {
10555 main()
10556 ; return 0; }
10557 EOF
10558 if { (eval echo configure:10559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10559   rm -rf conftest*
10560   eval "ac_cv_lib_$ac_lib_var=yes"
10561 else
10562   echo "configure: failed program was:" >&5
10563   cat conftest.$ac_ext >&5
10564   rm -rf conftest*
10565   eval "ac_cv_lib_$ac_lib_var=no"
10566 fi
10567 rm -f conftest*
10568 LIBS="$ac_save_LIBS"
10569
10570 fi
10571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10572   echo "$ac_t""yes" 1>&6
10573   have_krb5=yes
10574                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10575 else
10576   echo "$ac_t""no" 1>&6
10577 have_krb5=no
10578 fi
10579
10580
10581                 elif test $krb5_impl = heimdal; then
10582                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10583 echo "configure:10584: checking for main in -ldes" >&5
10584 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10585 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10586   echo $ac_n "(cached) $ac_c" 1>&6
10587 else
10588   ac_save_LIBS="$LIBS"
10589 LIBS="-ldes  $LIBS"
10590 cat > conftest.$ac_ext <<EOF
10591 #line 10592 "configure"
10592 #include "confdefs.h"
10593
10594 int main() {
10595 main()
10596 ; return 0; }
10597 EOF
10598 if { (eval echo configure:10599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10599   rm -rf conftest*
10600   eval "ac_cv_lib_$ac_lib_var=yes"
10601 else
10602   echo "configure: failed program was:" >&5
10603   cat conftest.$ac_ext >&5
10604   rm -rf conftest*
10605   eval "ac_cv_lib_$ac_lib_var=no"
10606 fi
10607 rm -f conftest*
10608 LIBS="$ac_save_LIBS"
10609
10610 fi
10611 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10612   echo "$ac_t""yes" 1>&6
10613   krb5crypto=des
10614 else
10615   echo "$ac_t""no" 1>&6
10616 krb5crypto=crypto
10617 fi
10618
10619
10620                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10621 echo "configure:10622: checking for main in -lkrb5" >&5
10622 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10623 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10624   echo $ac_n "(cached) $ac_c" 1>&6
10625 else
10626   ac_save_LIBS="$LIBS"
10627 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10628 cat > conftest.$ac_ext <<EOF
10629 #line 10630 "configure"
10630 #include "confdefs.h"
10631
10632 int main() {
10633 main()
10634 ; return 0; }
10635 EOF
10636 if { (eval echo configure:10637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10637   rm -rf conftest*
10638   eval "ac_cv_lib_$ac_lib_var=yes"
10639 else
10640   echo "configure: failed program was:" >&5
10641   cat conftest.$ac_ext >&5
10642   rm -rf conftest*
10643   eval "ac_cv_lib_$ac_lib_var=no"
10644 fi
10645 rm -f conftest*
10646 LIBS="$ac_save_LIBS"
10647
10648 fi
10649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10650   echo "$ac_t""yes" 1>&6
10651   have_krb5=yes
10652                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10653 else
10654   echo "$ac_t""no" 1>&6
10655 have_krb5=no
10656 fi
10657
10658
10659                         cat >> confdefs.h <<\EOF
10660 #define HAVE_HEIMDAL_KERBEROS 1
10661 EOF
10662
10663
10664                 else
10665                         have_krb5=no
10666                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10667                 fi
10668
10669                 if test $have_krb5 = yes ; then
10670                         ol_link_krb5=yes
10671
10672                         cat >> confdefs.h <<\EOF
10673 #define HAVE_KRB5 1
10674 EOF
10675
10676
10677                         if test $ol_enable_kpasswd != no ; then
10678                                 ol_link_kpasswd=yes;
10679                         fi
10680
10681                         if test $ol_with_kerberos = k5only ; then
10682                                 ol_with_kerberos=found
10683                         fi
10684
10685                 elif test $ol_with_kerberos != auto ; then
10686                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10687                 fi
10688
10689         fi
10690 fi
10691
10692 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10693         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10694
10695         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10696 do
10697 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10698 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10699 echo "configure:10700: checking for $ac_hdr" >&5
10700 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10701   echo $ac_n "(cached) $ac_c" 1>&6
10702 else
10703   cat > conftest.$ac_ext <<EOF
10704 #line 10705 "configure"
10705 #include "confdefs.h"
10706 #include <$ac_hdr>
10707 EOF
10708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10709 { (eval echo configure:10710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10711 if test -z "$ac_err"; then
10712   rm -rf conftest*
10713   eval "ac_cv_header_$ac_safe=yes"
10714 else
10715   echo "$ac_err" >&5
10716   echo "configure: failed program was:" >&5
10717   cat conftest.$ac_ext >&5
10718   rm -rf conftest*
10719   eval "ac_cv_header_$ac_safe=no"
10720 fi
10721 rm -f conftest*
10722 fi
10723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10724   echo "$ac_t""yes" 1>&6
10725     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10726   cat >> confdefs.h <<EOF
10727 #define $ac_tr_hdr 1
10728 EOF
10729  
10730 else
10731   echo "$ac_t""no" 1>&6
10732 fi
10733 done
10734
10735
10736         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10737                 if test $krb5_impl = mit; then
10738                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10739 echo "configure:10740: checking for main in -lkrb4" >&5
10740 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10741 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10742   echo $ac_n "(cached) $ac_c" 1>&6
10743 else
10744   ac_save_LIBS="$LIBS"
10745 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10746 cat > conftest.$ac_ext <<EOF
10747 #line 10748 "configure"
10748 #include "confdefs.h"
10749
10750 int main() {
10751 main()
10752 ; return 0; }
10753 EOF
10754 if { (eval echo configure:10755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10755   rm -rf conftest*
10756   eval "ac_cv_lib_$ac_lib_var=yes"
10757 else
10758   echo "configure: failed program was:" >&5
10759   cat conftest.$ac_ext >&5
10760   rm -rf conftest*
10761   eval "ac_cv_lib_$ac_lib_var=no"
10762 fi
10763 rm -f conftest*
10764 LIBS="$ac_save_LIBS"
10765
10766 fi
10767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10768   echo "$ac_t""yes" 1>&6
10769   have_k425=yes
10770                                 KRB4_LIBS="-lkrb4 -ldes425"
10771 else
10772   echo "$ac_t""no" 1>&6
10773 have_k425=no
10774 fi
10775
10776
10777                 elif test $krb5_impl = heimdal; then
10778                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10779 echo "configure:10780: checking for main in -lkrb4" >&5
10780 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10781 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10782   echo $ac_n "(cached) $ac_c" 1>&6
10783 else
10784   ac_save_LIBS="$LIBS"
10785 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10786 cat > conftest.$ac_ext <<EOF
10787 #line 10788 "configure"
10788 #include "confdefs.h"
10789
10790 int main() {
10791 main()
10792 ; return 0; }
10793 EOF
10794 if { (eval echo configure:10795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10795   rm -rf conftest*
10796   eval "ac_cv_lib_$ac_lib_var=yes"
10797 else
10798   echo "configure: failed program was:" >&5
10799   cat conftest.$ac_ext >&5
10800   rm -rf conftest*
10801   eval "ac_cv_lib_$ac_lib_var=no"
10802 fi
10803 rm -f conftest*
10804 LIBS="$ac_save_LIBS"
10805
10806 fi
10807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10808   echo "$ac_t""yes" 1>&6
10809   have_k425=yes
10810                                 KRB4_LIBS="-lkrb4"
10811 else
10812   echo "$ac_t""no" 1>&6
10813 have_k425=no
10814 fi
10815
10816
10817                 else
10818                         have_425=no
10819                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10820                 fi
10821
10822                 if test $have_k425 = yes ; then
10823                         ol_with_kerberos=found
10824                         ol_link_krb4=yes
10825
10826                         cat >> confdefs.h <<\EOF
10827 #define HAVE_KRB425 1
10828 EOF
10829
10830                         cat >> confdefs.h <<\EOF
10831 #define HAVE_KRB4 1
10832 EOF
10833
10834
10835                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10836 echo "configure:10837: checking for des_debug in Kerberos libraries" >&5
10837 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10838   echo $ac_n "(cached) $ac_c" 1>&6
10839 else
10840   
10841                                                                 save_LIBS="$LIBS"
10842                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10843                                 cat > conftest.$ac_ext <<EOF
10844 #line 10845 "configure"
10845 #include "confdefs.h"
10846
10847 #include <kerberosIV/krb.h>
10848 #include <kerberosIV/des.h>
10849 extern int des_debug;
10850
10851 int main() {
10852
10853 des_debug = 1;
10854
10855 ; return 0; }
10856 EOF
10857 if { (eval echo configure:10858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10858   rm -rf conftest*
10859   ol_cv_var_des_debug=yes
10860 else
10861   echo "configure: failed program was:" >&5
10862   cat conftest.$ac_ext >&5
10863   rm -rf conftest*
10864   ol_cv_var_des_debug=no
10865 fi
10866 rm -f conftest*
10867                                                                 LIBS="$save_LIBS"
10868                         
10869 fi
10870
10871 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10872
10873                         if test $ol_cv_var_des_debug = yes ; then
10874                                 cat >> confdefs.h <<\EOF
10875 #define HAVE_DES_DEBUG 1
10876 EOF
10877
10878                         fi
10879
10880                         LIBS="$save_LIBS"
10881                 fi
10882         fi
10883 fi
10884
10885 if test $ol_link_krb5 = yes ; then
10886         ol_with_kerberos=found
10887 fi
10888
10889 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10890         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10891
10892         for ac_hdr in krb.h des.h krb-archaeology.h 
10893 do
10894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10896 echo "configure:10897: checking for $ac_hdr" >&5
10897 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10898   echo $ac_n "(cached) $ac_c" 1>&6
10899 else
10900   cat > conftest.$ac_ext <<EOF
10901 #line 10902 "configure"
10902 #include "confdefs.h"
10903 #include <$ac_hdr>
10904 EOF
10905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10906 { (eval echo configure:10907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10908 if test -z "$ac_err"; then
10909   rm -rf conftest*
10910   eval "ac_cv_header_$ac_safe=yes"
10911 else
10912   echo "$ac_err" >&5
10913   echo "configure: failed program was:" >&5
10914   cat conftest.$ac_ext >&5
10915   rm -rf conftest*
10916   eval "ac_cv_header_$ac_safe=no"
10917 fi
10918 rm -f conftest*
10919 fi
10920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10921   echo "$ac_t""yes" 1>&6
10922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10923   cat >> confdefs.h <<EOF
10924 #define $ac_tr_hdr 1
10925 EOF
10926  
10927 else
10928   echo "$ac_t""no" 1>&6
10929 fi
10930 done
10931
10932
10933         if test $ac_cv_header_krb_h = yes ; then
10934                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10935 echo "configure:10936: checking for main in -lkrb" >&5
10936 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10937 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10938   echo $ac_n "(cached) $ac_c" 1>&6
10939 else
10940   ac_save_LIBS="$LIBS"
10941 LIBS="-lkrb -ldes $LIBS"
10942 cat > conftest.$ac_ext <<EOF
10943 #line 10944 "configure"
10944 #include "confdefs.h"
10945
10946 int main() {
10947 main()
10948 ; return 0; }
10949 EOF
10950 if { (eval echo configure:10951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10951   rm -rf conftest*
10952   eval "ac_cv_lib_$ac_lib_var=yes"
10953 else
10954   echo "configure: failed program was:" >&5
10955   cat conftest.$ac_ext >&5
10956   rm -rf conftest*
10957   eval "ac_cv_lib_$ac_lib_var=no"
10958 fi
10959 rm -f conftest*
10960 LIBS="$ac_save_LIBS"
10961
10962 fi
10963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10964   echo "$ac_t""yes" 1>&6
10965   have_k4=yes
10966 else
10967   echo "$ac_t""no" 1>&6
10968 have_k4=no
10969 fi
10970
10971
10972                 if test $have_k4 = yes ; then
10973                         ol_with_kerberos=found
10974                         ol_link_krb4=yes
10975
10976                         cat >> confdefs.h <<\EOF
10977 #define HAVE_KRB4 1
10978 EOF
10979
10980
10981                         KRB4_LIBS="-lkrb -ldes"
10982
10983                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10984                                 cat >> confdefs.h <<\EOF
10985 #define HAVE_KTH_KERBEROS 1
10986 EOF
10987
10988                         fi
10989                 fi
10990         fi
10991 fi
10992
10993 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10994         ol_link_kpasswd=yes
10995 fi
10996
10997 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10998         ol_link_kbind=yes
10999
11000 elif test $ol_enable_kbind = yes ; then
11001         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11002 fi
11003
11004 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11005         cat >> confdefs.h <<\EOF
11006 #define HAVE_KERBEROS 1
11007 EOF
11008
11009
11010 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11011         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11012 fi
11013
11014 ol_link_tls=no
11015 if test $ol_with_tls != no ; then
11016         for ac_hdr in openssl/ssl.h ssl.h
11017 do
11018 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11019 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11020 echo "configure:11021: checking for $ac_hdr" >&5
11021 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11022   echo $ac_n "(cached) $ac_c" 1>&6
11023 else
11024   cat > conftest.$ac_ext <<EOF
11025 #line 11026 "configure"
11026 #include "confdefs.h"
11027 #include <$ac_hdr>
11028 EOF
11029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11030 { (eval echo configure:11031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11032 if test -z "$ac_err"; then
11033   rm -rf conftest*
11034   eval "ac_cv_header_$ac_safe=yes"
11035 else
11036   echo "$ac_err" >&5
11037   echo "configure: failed program was:" >&5
11038   cat conftest.$ac_ext >&5
11039   rm -rf conftest*
11040   eval "ac_cv_header_$ac_safe=no"
11041 fi
11042 rm -f conftest*
11043 fi
11044 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11045   echo "$ac_t""yes" 1>&6
11046     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11047   cat >> confdefs.h <<EOF
11048 #define $ac_tr_hdr 1
11049 EOF
11050  
11051 else
11052   echo "$ac_t""no" 1>&6
11053 fi
11054 done
11055
11056         
11057         if test $ac_cv_header_openssl_ssl_h = yes \
11058                 -o $ac_cv_header_ssl_h = yes ; then
11059                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11060 echo "configure:11061: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11061 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11062 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11063   echo $ac_n "(cached) $ac_c" 1>&6
11064 else
11065   ac_save_LIBS="$LIBS"
11066 LIBS="-lssl -lcrypto $LIBS"
11067 cat > conftest.$ac_ext <<EOF
11068 #line 11069 "configure"
11069 #include "confdefs.h"
11070 /* Override any gcc2 internal prototype to avoid an error.  */
11071 /* We use char because int might match the return type of a gcc2
11072     builtin and then its argument prototype would still apply.  */
11073 char SSLeay_add_ssl_algorithms();
11074
11075 int main() {
11076 SSLeay_add_ssl_algorithms()
11077 ; return 0; }
11078 EOF
11079 if { (eval echo configure:11080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11080   rm -rf conftest*
11081   eval "ac_cv_lib_$ac_lib_var=yes"
11082 else
11083   echo "configure: failed program was:" >&5
11084   cat conftest.$ac_ext >&5
11085   rm -rf conftest*
11086   eval "ac_cv_lib_$ac_lib_var=no"
11087 fi
11088 rm -f conftest*
11089 LIBS="$ac_save_LIBS"
11090
11091 fi
11092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11093   echo "$ac_t""yes" 1>&6
11094   have_ssleay=yes
11095                         need_rsaref=no
11096 else
11097   echo "$ac_t""no" 1>&6
11098 have_ssleay=no
11099 fi
11100
11101                         
11102                 if test $have_ssleay = no ; then
11103                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11104 echo "configure:11105: checking for SSL_library_init in -lssl" >&5
11105 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11106 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11107   echo $ac_n "(cached) $ac_c" 1>&6
11108 else
11109   ac_save_LIBS="$LIBS"
11110 LIBS="-lssl -lcrypto $LIBS"
11111 cat > conftest.$ac_ext <<EOF
11112 #line 11113 "configure"
11113 #include "confdefs.h"
11114 /* Override any gcc2 internal prototype to avoid an error.  */
11115 /* We use char because int might match the return type of a gcc2
11116     builtin and then its argument prototype would still apply.  */
11117 char SSL_library_init();
11118
11119 int main() {
11120 SSL_library_init()
11121 ; return 0; }
11122 EOF
11123 if { (eval echo configure:11124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11124   rm -rf conftest*
11125   eval "ac_cv_lib_$ac_lib_var=yes"
11126 else
11127   echo "configure: failed program was:" >&5
11128   cat conftest.$ac_ext >&5
11129   rm -rf conftest*
11130   eval "ac_cv_lib_$ac_lib_var=no"
11131 fi
11132 rm -f conftest*
11133 LIBS="$ac_save_LIBS"
11134
11135 fi
11136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11137   echo "$ac_t""yes" 1>&6
11138   have_ssleay=yes
11139                                 need_rsaref=no
11140 else
11141   echo "$ac_t""no" 1>&6
11142 have_ssleay=no
11143 fi
11144
11145                 fi
11146
11147                 if test $have_ssleay = no ; then
11148                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11149 echo "configure:11150: checking for ssl3_accept in -lssl" >&5
11150 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11151 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11152   echo $ac_n "(cached) $ac_c" 1>&6
11153 else
11154   ac_save_LIBS="$LIBS"
11155 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11156 cat > conftest.$ac_ext <<EOF
11157 #line 11158 "configure"
11158 #include "confdefs.h"
11159 /* Override any gcc2 internal prototype to avoid an error.  */
11160 /* We use char because int might match the return type of a gcc2
11161     builtin and then its argument prototype would still apply.  */
11162 char ssl3_accept();
11163
11164 int main() {
11165 ssl3_accept()
11166 ; return 0; }
11167 EOF
11168 if { (eval echo configure:11169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11169   rm -rf conftest*
11170   eval "ac_cv_lib_$ac_lib_var=yes"
11171 else
11172   echo "configure: failed program was:" >&5
11173   cat conftest.$ac_ext >&5
11174   rm -rf conftest*
11175   eval "ac_cv_lib_$ac_lib_var=no"
11176 fi
11177 rm -f conftest*
11178 LIBS="$ac_save_LIBS"
11179
11180 fi
11181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11182   echo "$ac_t""yes" 1>&6
11183   have_ssleay=yes
11184                                 need_rsaref=yes
11185 else
11186   echo "$ac_t""no" 1>&6
11187 have_ssleay=no
11188 fi
11189
11190                 fi
11191
11192                 if test $have_ssleay = yes ; then
11193                         ol_with_tls=found
11194                         ol_link_tls=yes
11195
11196                         cat >> confdefs.h <<\EOF
11197 #define HAVE_SSLEAY 1
11198 EOF
11199
11200
11201                         if test $need_rsaref = yes; then
11202                                 cat >> confdefs.h <<\EOF
11203 #define HAVE_RSAREF 1
11204 EOF
11205
11206
11207                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11208                         else
11209                                 TLS_LIBS="-lssl -lcrypto"
11210                         fi
11211                 fi
11212         fi
11213
11214 else
11215         echo "configure: warning: TLS data protection not supported!" 1>&2
11216 fi
11217
11218 if test $ol_link_tls = yes ; then
11219         cat >> confdefs.h <<\EOF
11220 #define HAVE_TLS 1
11221 EOF
11222
11223
11224 elif test $ol_with_tls = auto ; then
11225         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11226         echo "configure: warning: TLS data protection not supported!" 1>&2
11227
11228 elif test $ol_with_tls != no ; then
11229         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11230 fi
11231
11232 if test $ol_enable_lmpasswd != no; then
11233         if test $ol_link_tls != yes ; then
11234                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11235         fi
11236
11237         cat >> confdefs.h <<\EOF
11238 #define SLAPD_LMHASH 1
11239 EOF
11240
11241 fi
11242
11243 ol_link_threads=no
11244
11245 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11246         -o $ol_with_threads = nt ; then
11247
11248         
11249         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11250 echo "configure:11251: checking for _beginthread" >&5
11251 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11252   echo $ac_n "(cached) $ac_c" 1>&6
11253 else
11254   cat > conftest.$ac_ext <<EOF
11255 #line 11256 "configure"
11256 #include "confdefs.h"
11257 /* System header to define __stub macros and hopefully few prototypes,
11258     which can conflict with char _beginthread(); below.  */
11259 #include <assert.h>
11260 /* Override any gcc2 internal prototype to avoid an error.  */
11261 /* We use char because int might match the return type of a gcc2
11262     builtin and then its argument prototype would still apply.  */
11263 char _beginthread();
11264 char (*f)();
11265
11266 int main() {
11267
11268 /* The GNU C library defines this for functions which it implements
11269     to always fail with ENOSYS.  Some functions are actually named
11270     something starting with __ and the normal name is an alias.  */
11271 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11272 choke me
11273 #else
11274 f = _beginthread;
11275 #endif
11276
11277 ; return 0; }
11278 EOF
11279 if { (eval echo configure:11280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11280   rm -rf conftest*
11281   eval "ac_cv_func__beginthread=yes"
11282 else
11283   echo "configure: failed program was:" >&5
11284   cat conftest.$ac_ext >&5
11285   rm -rf conftest*
11286   eval "ac_cv_func__beginthread=no"
11287 fi
11288 rm -f conftest*
11289 fi
11290
11291 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11292   echo "$ac_t""yes" 1>&6
11293   :
11294 else
11295   echo "$ac_t""no" 1>&6
11296 fi
11297
11298
11299         if test $ac_cv_func__beginthread = yes ; then
11300                 cat >> confdefs.h <<\EOF
11301 #define HAVE_NT_THREADS 1
11302 EOF
11303
11304                 ol_cv_nt_threads=yes
11305         fi
11306
11307
11308         if test "$ol_cv_nt_threads" = yes ; then
11309                 ol_link_threads=nt
11310                 ol_with_threads=found
11311                 ol_with_yielding_select=yes
11312
11313                 cat >> confdefs.h <<\EOF
11314 #define HAVE_NT_SERVICE_MANAGER 1
11315 EOF
11316
11317                 cat >> confdefs.h <<\EOF
11318 #define HAVE_NT_EVENT_LOG 1
11319 EOF
11320
11321         fi
11322
11323         if test $ol_with_threads = nt ; then
11324                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11325         fi
11326 fi
11327
11328 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11329         -o $ol_with_threads = posix ; then
11330
11331         for ac_hdr in pthread.h
11332 do
11333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11335 echo "configure:11336: checking for $ac_hdr" >&5
11336 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11337   echo $ac_n "(cached) $ac_c" 1>&6
11338 else
11339   cat > conftest.$ac_ext <<EOF
11340 #line 11341 "configure"
11341 #include "confdefs.h"
11342 #include <$ac_hdr>
11343 EOF
11344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11345 { (eval echo configure:11346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11347 if test -z "$ac_err"; then
11348   rm -rf conftest*
11349   eval "ac_cv_header_$ac_safe=yes"
11350 else
11351   echo "$ac_err" >&5
11352   echo "configure: failed program was:" >&5
11353   cat conftest.$ac_ext >&5
11354   rm -rf conftest*
11355   eval "ac_cv_header_$ac_safe=no"
11356 fi
11357 rm -f conftest*
11358 fi
11359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11360   echo "$ac_t""yes" 1>&6
11361     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11362   cat >> confdefs.h <<EOF
11363 #define $ac_tr_hdr 1
11364 EOF
11365  
11366 else
11367   echo "$ac_t""no" 1>&6
11368 fi
11369 done
11370
11371
11372         if test $ac_cv_header_pthread_h = yes ; then
11373                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11374 echo "configure:11375: checking POSIX thread version" >&5
11375 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11376   echo $ac_n "(cached) $ac_c" 1>&6
11377 else
11378   
11379         cat > conftest.$ac_ext <<EOF
11380 #line 11381 "configure"
11381 #include "confdefs.h"
11382
11383 #               include <pthread.h>
11384         
11385 int main() {
11386
11387                 int i = PTHREAD_CREATE_JOINABLE;
11388         
11389 ; return 0; }
11390 EOF
11391 if { (eval echo configure:11392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11392   rm -rf conftest*
11393   
11394         cat > conftest.$ac_ext <<EOF
11395 #line 11396 "configure"
11396 #include "confdefs.h"
11397 #include <pthread.h>
11398 EOF
11399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11400   egrep "pthread_detach" >/dev/null 2>&1; then
11401   rm -rf conftest*
11402   ol_cv_pthread_version=10
11403 else
11404   rm -rf conftest*
11405   ol_cv_pthread_version=8
11406 fi
11407 rm -f conftest*
11408
11409 else
11410   echo "configure: failed program was:" >&5
11411   cat conftest.$ac_ext >&5
11412   rm -rf conftest*
11413   
11414         cat > conftest.$ac_ext <<EOF
11415 #line 11416 "configure"
11416 #include "confdefs.h"
11417
11418 #               include <pthread.h>
11419 #               ifdef PTHREAD_CREATE_UNDETACHED
11420                 draft7
11421 #               endif
11422         
11423 EOF
11424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11425   egrep "draft7" >/dev/null 2>&1; then
11426   rm -rf conftest*
11427   ol_cv_pthread_version=7
11428 else
11429   rm -rf conftest*
11430   
11431         cat > conftest.$ac_ext <<EOF
11432 #line 11433 "configure"
11433 #include "confdefs.h"
11434 #include <pthread.h>
11435 EOF
11436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11437   egrep "pthread_attr_init" >/dev/null 2>&1; then
11438   rm -rf conftest*
11439   ol_cv_pthread_version=6
11440 else
11441   rm -rf conftest*
11442   
11443         cat > conftest.$ac_ext <<EOF
11444 #line 11445 "configure"
11445 #include "confdefs.h"
11446
11447 #               include <pthread.h>
11448 #ifdef          PTHREAD_MUTEX_INITIALIZER
11449                 draft5
11450 #endif
11451         
11452 EOF
11453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11454   egrep "draft5" >/dev/null 2>&1; then
11455   rm -rf conftest*
11456   ol_cv_pthread_version=5
11457 else
11458   rm -rf conftest*
11459   ol_cv_pthread_version=4
11460 fi
11461 rm -f conftest*
11462  
11463 fi
11464 rm -f conftest*
11465  
11466 fi
11467 rm -f conftest*
11468  
11469 fi
11470 rm -f conftest*
11471
11472 fi
11473
11474 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11475
11476
11477                 if test $ol_cv_pthread_version != 0 ; then
11478                         cat >> confdefs.h <<EOF
11479 #define HAVE_PTHREADS $ol_cv_pthread_version
11480 EOF
11481
11482                 else
11483                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11484                 fi
11485
11486                 # consider threads found
11487                 ol_with_threads=found
11488
11489                 
11490         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11491 echo "configure:11492: checking for LinuxThreads pthread.h" >&5
11492 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11493   echo $ac_n "(cached) $ac_c" 1>&6
11494 else
11495   cat > conftest.$ac_ext <<EOF
11496 #line 11497 "configure"
11497 #include "confdefs.h"
11498 #include <pthread.h>
11499 EOF
11500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11501   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11502   rm -rf conftest*
11503   ol_cv_header_linux_threads=yes
11504 else
11505   rm -rf conftest*
11506   ol_cv_header_linux_threads=no
11507 fi
11508 rm -f conftest*
11509
11510                 
11511 fi
11512
11513 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11514         if test $ol_cv_header_linux_threads = yes; then
11515                 cat >> confdefs.h <<\EOF
11516 #define HAVE_LINUX_THREADS 1
11517 EOF
11518
11519         fi
11520
11521                 
11522         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11523 echo "configure:11524: checking for GNU Pth pthread.h" >&5
11524 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11525   echo $ac_n "(cached) $ac_c" 1>&6
11526 else
11527   cat > conftest.$ac_ext <<EOF
11528 #line 11529 "configure"
11529 #include "confdefs.h"
11530 #include <pthread.h>
11531 #ifdef _POSIX_THREAD_IS_GNU_PTH
11532         __gnu_pth__;
11533 #endif
11534
11535 EOF
11536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11537   egrep "__gnu_pth__" >/dev/null 2>&1; then
11538   rm -rf conftest*
11539   ol_cv_header_gnu_pth_pthread_h=yes
11540 else
11541   rm -rf conftest*
11542   ol_cv_header_gnu_pth_pthread_h=no
11543 fi
11544 rm -f conftest*
11545
11546                 
11547 fi
11548
11549 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11550
11551
11552                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11553                         for ac_hdr in sched.h
11554 do
11555 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11556 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11557 echo "configure:11558: checking for $ac_hdr" >&5
11558 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11559   echo $ac_n "(cached) $ac_c" 1>&6
11560 else
11561   cat > conftest.$ac_ext <<EOF
11562 #line 11563 "configure"
11563 #include "confdefs.h"
11564 #include <$ac_hdr>
11565 EOF
11566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11567 { (eval echo configure:11568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11569 if test -z "$ac_err"; then
11570   rm -rf conftest*
11571   eval "ac_cv_header_$ac_safe=yes"
11572 else
11573   echo "$ac_err" >&5
11574   echo "configure: failed program was:" >&5
11575   cat conftest.$ac_ext >&5
11576   rm -rf conftest*
11577   eval "ac_cv_header_$ac_safe=no"
11578 fi
11579 rm -f conftest*
11580 fi
11581 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11582   echo "$ac_t""yes" 1>&6
11583     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11584   cat >> confdefs.h <<EOF
11585 #define $ac_tr_hdr 1
11586 EOF
11587  
11588 else
11589   echo "$ac_t""no" 1>&6
11590 fi
11591 done
11592
11593                 fi
11594
11595                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11596                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11597 echo "configure:11598: checking for pthread_create in default libraries" >&5
11598 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11599   echo $ac_n "(cached) $ac_c" 1>&6
11600 else
11601   
11602                 if test "$cross_compiling" = yes; then
11603   cat > conftest.$ac_ext <<EOF
11604 #line 11605 "configure"
11605 #include "confdefs.h"
11606 /* pthread test headers */
11607 #include <pthread.h>
11608 #if HAVE_PTHREADS < 7
11609 #include <errno.h>
11610 #endif
11611 #ifndef NULL
11612 #define NULL (void*)0
11613 #endif
11614
11615 static void *task(p)
11616         void *p;
11617 {
11618         return (void *) (p == NULL);
11619 }
11620
11621 int main() {
11622
11623         /* pthread test function */
11624 #ifndef PTHREAD_CREATE_DETACHED
11625 #define PTHREAD_CREATE_DETACHED 1
11626 #endif
11627         pthread_t t;
11628         int status;
11629         int detach = PTHREAD_CREATE_DETACHED;
11630
11631 #if HAVE_PTHREADS > 4
11632         /* Final pthreads */
11633         pthread_attr_t attr;
11634
11635         status = pthread_attr_init(&attr);
11636         if( status ) return status;
11637
11638 #if HAVE_PTHREADS < 7
11639         status = pthread_attr_setdetachstate(&attr, &detach);
11640         if( status < 0 ) status = errno;
11641 #else
11642         status = pthread_attr_setdetachstate(&attr, detach);
11643 #endif
11644         if( status ) return status;
11645         status = pthread_create( &t, &attr, task, NULL );
11646 #if HAVE_PTHREADS < 7
11647         if( status < 0 ) status = errno;
11648 #endif
11649         if( status ) return status;
11650 #else
11651         /* Draft 4 pthreads */
11652         status = pthread_create( &t, pthread_attr_default, task, NULL );
11653         if( status ) return errno;
11654
11655         /* give thread a chance to complete */
11656         /* it should remain joinable and hence detachable */
11657         sleep( 1 );
11658
11659         status = pthread_detach( &t );
11660         if( status ) return errno;
11661 #endif
11662
11663 #ifdef HAVE_LINUX_THREADS
11664         pthread_kill_other_threads_np();
11665 #endif
11666
11667         return 0;
11668
11669 ; return 0; }
11670 EOF
11671 if { (eval echo configure:11672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11672   rm -rf conftest*
11673   ol_cv_pthread_create=yes
11674 else
11675   echo "configure: failed program was:" >&5
11676   cat conftest.$ac_ext >&5
11677   rm -rf conftest*
11678   ol_cv_pthread_create=no
11679 fi
11680 rm -f conftest*
11681 else
11682   cat > conftest.$ac_ext <<EOF
11683 #line 11684 "configure"
11684 #include "confdefs.h"
11685 /* pthread test headers */
11686 #include <pthread.h>
11687 #if HAVE_PTHREADS < 7
11688 #include <errno.h>
11689 #endif
11690 #ifndef NULL
11691 #define NULL (void*)0
11692 #endif
11693
11694 static void *task(p)
11695         void *p;
11696 {
11697         return (void *) (p == NULL);
11698 }
11699
11700
11701 int main(argc, argv)
11702         int argc;
11703         char **argv;
11704 {
11705
11706         /* pthread test function */
11707 #ifndef PTHREAD_CREATE_DETACHED
11708 #define PTHREAD_CREATE_DETACHED 1
11709 #endif
11710         pthread_t t;
11711         int status;
11712         int detach = PTHREAD_CREATE_DETACHED;
11713
11714 #if HAVE_PTHREADS > 4
11715         /* Final pthreads */
11716         pthread_attr_t attr;
11717
11718         status = pthread_attr_init(&attr);
11719         if( status ) return status;
11720
11721 #if HAVE_PTHREADS < 7
11722         status = pthread_attr_setdetachstate(&attr, &detach);
11723         if( status < 0 ) status = errno;
11724 #else
11725         status = pthread_attr_setdetachstate(&attr, detach);
11726 #endif
11727         if( status ) return status;
11728         status = pthread_create( &t, &attr, task, NULL );
11729 #if HAVE_PTHREADS < 7
11730         if( status < 0 ) status = errno;
11731 #endif
11732         if( status ) return status;
11733 #else
11734         /* Draft 4 pthreads */
11735         status = pthread_create( &t, pthread_attr_default, task, NULL );
11736         if( status ) return errno;
11737
11738         /* give thread a chance to complete */
11739         /* it should remain joinable and hence detachable */
11740         sleep( 1 );
11741
11742         status = pthread_detach( &t );
11743         if( status ) return errno;
11744 #endif
11745
11746 #ifdef HAVE_LINUX_THREADS
11747         pthread_kill_other_threads_np();
11748 #endif
11749
11750         return 0;
11751
11752 }
11753
11754 EOF
11755 if { (eval echo configure:11756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11756 then
11757   ol_cv_pthread_create=yes
11758 else
11759   echo "configure: failed program was:" >&5
11760   cat conftest.$ac_ext >&5
11761   rm -fr conftest*
11762   ol_cv_pthread_create=no
11763 fi
11764 rm -fr conftest*
11765 fi
11766
11767 fi
11768
11769 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11770
11771                 if test $ol_cv_pthread_create != no ; then
11772                         ol_link_threads=posix
11773                         ol_link_pthreads=""
11774                 fi
11775                 
11776                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11777 if test "$ol_link_threads" = no ; then
11778         # try -kthread
11779         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11780 echo "configure:11781: checking for pthread link with -kthread" >&5
11781 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11782   echo $ac_n "(cached) $ac_c" 1>&6
11783 else
11784   
11785                 # save the flags
11786                 ol_LIBS="$LIBS"
11787                 LIBS="-kthread $LIBS"
11788
11789                 if test "$cross_compiling" = yes; then
11790   cat > conftest.$ac_ext <<EOF
11791 #line 11792 "configure"
11792 #include "confdefs.h"
11793 /* pthread test headers */
11794 #include <pthread.h>
11795 #if HAVE_PTHREADS < 7
11796 #include <errno.h>
11797 #endif
11798 #ifndef NULL
11799 #define NULL (void*)0
11800 #endif
11801
11802 static void *task(p)
11803         void *p;
11804 {
11805         return (void *) (p == NULL);
11806 }
11807
11808 int main() {
11809
11810         /* pthread test function */
11811 #ifndef PTHREAD_CREATE_DETACHED
11812 #define PTHREAD_CREATE_DETACHED 1
11813 #endif
11814         pthread_t t;
11815         int status;
11816         int detach = PTHREAD_CREATE_DETACHED;
11817
11818 #if HAVE_PTHREADS > 4
11819         /* Final pthreads */
11820         pthread_attr_t attr;
11821
11822         status = pthread_attr_init(&attr);
11823         if( status ) return status;
11824
11825 #if HAVE_PTHREADS < 7
11826         status = pthread_attr_setdetachstate(&attr, &detach);
11827         if( status < 0 ) status = errno;
11828 #else
11829         status = pthread_attr_setdetachstate(&attr, detach);
11830 #endif
11831         if( status ) return status;
11832         status = pthread_create( &t, &attr, task, NULL );
11833 #if HAVE_PTHREADS < 7
11834         if( status < 0 ) status = errno;
11835 #endif
11836         if( status ) return status;
11837 #else
11838         /* Draft 4 pthreads */
11839         status = pthread_create( &t, pthread_attr_default, task, NULL );
11840         if( status ) return errno;
11841
11842         /* give thread a chance to complete */
11843         /* it should remain joinable and hence detachable */
11844         sleep( 1 );
11845
11846         status = pthread_detach( &t );
11847         if( status ) return errno;
11848 #endif
11849
11850 #ifdef HAVE_LINUX_THREADS
11851         pthread_kill_other_threads_np();
11852 #endif
11853
11854         return 0;
11855
11856 ; return 0; }
11857 EOF
11858 if { (eval echo configure:11859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11859   rm -rf conftest*
11860   ol_cv_pthread_kthread=yes
11861 else
11862   echo "configure: failed program was:" >&5
11863   cat conftest.$ac_ext >&5
11864   rm -rf conftest*
11865   ol_cv_pthread_kthread=no
11866 fi
11867 rm -f conftest*
11868 else
11869   cat > conftest.$ac_ext <<EOF
11870 #line 11871 "configure"
11871 #include "confdefs.h"
11872 /* pthread test headers */
11873 #include <pthread.h>
11874 #if HAVE_PTHREADS < 7
11875 #include <errno.h>
11876 #endif
11877 #ifndef NULL
11878 #define NULL (void*)0
11879 #endif
11880
11881 static void *task(p)
11882         void *p;
11883 {
11884         return (void *) (p == NULL);
11885 }
11886
11887
11888 int main(argc, argv)
11889         int argc;
11890         char **argv;
11891 {
11892
11893         /* pthread test function */
11894 #ifndef PTHREAD_CREATE_DETACHED
11895 #define PTHREAD_CREATE_DETACHED 1
11896 #endif
11897         pthread_t t;
11898         int status;
11899         int detach = PTHREAD_CREATE_DETACHED;
11900
11901 #if HAVE_PTHREADS > 4
11902         /* Final pthreads */
11903         pthread_attr_t attr;
11904
11905         status = pthread_attr_init(&attr);
11906         if( status ) return status;
11907
11908 #if HAVE_PTHREADS < 7
11909         status = pthread_attr_setdetachstate(&attr, &detach);
11910         if( status < 0 ) status = errno;
11911 #else
11912         status = pthread_attr_setdetachstate(&attr, detach);
11913 #endif
11914         if( status ) return status;
11915         status = pthread_create( &t, &attr, task, NULL );
11916 #if HAVE_PTHREADS < 7
11917         if( status < 0 ) status = errno;
11918 #endif
11919         if( status ) return status;
11920 #else
11921         /* Draft 4 pthreads */
11922         status = pthread_create( &t, pthread_attr_default, task, NULL );
11923         if( status ) return errno;
11924
11925         /* give thread a chance to complete */
11926         /* it should remain joinable and hence detachable */
11927         sleep( 1 );
11928
11929         status = pthread_detach( &t );
11930         if( status ) return errno;
11931 #endif
11932
11933 #ifdef HAVE_LINUX_THREADS
11934         pthread_kill_other_threads_np();
11935 #endif
11936
11937         return 0;
11938
11939 }
11940
11941 EOF
11942 if { (eval echo configure:11943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11943 then
11944   ol_cv_pthread_kthread=yes
11945 else
11946   echo "configure: failed program was:" >&5
11947   cat conftest.$ac_ext >&5
11948   rm -fr conftest*
11949   ol_cv_pthread_kthread=no
11950 fi
11951 rm -fr conftest*
11952 fi
11953
11954
11955                 # restore the LIBS
11956                 LIBS="$ol_LIBS"
11957         
11958 fi
11959
11960 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11961
11962         if test $ol_cv_pthread_kthread = yes ; then
11963                 ol_link_pthreads="-kthread"
11964                 ol_link_threads=posix
11965         fi
11966 fi
11967
11968                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11969 if test "$ol_link_threads" = no ; then
11970         # try -pthread
11971         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11972 echo "configure:11973: checking for pthread link with -pthread" >&5
11973 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11974   echo $ac_n "(cached) $ac_c" 1>&6
11975 else
11976   
11977                 # save the flags
11978                 ol_LIBS="$LIBS"
11979                 LIBS="-pthread $LIBS"
11980
11981                 if test "$cross_compiling" = yes; then
11982   cat > conftest.$ac_ext <<EOF
11983 #line 11984 "configure"
11984 #include "confdefs.h"
11985 /* pthread test headers */
11986 #include <pthread.h>
11987 #if HAVE_PTHREADS < 7
11988 #include <errno.h>
11989 #endif
11990 #ifndef NULL
11991 #define NULL (void*)0
11992 #endif
11993
11994 static void *task(p)
11995         void *p;
11996 {
11997         return (void *) (p == NULL);
11998 }
11999
12000 int main() {
12001
12002         /* pthread test function */
12003 #ifndef PTHREAD_CREATE_DETACHED
12004 #define PTHREAD_CREATE_DETACHED 1
12005 #endif
12006         pthread_t t;
12007         int status;
12008         int detach = PTHREAD_CREATE_DETACHED;
12009
12010 #if HAVE_PTHREADS > 4
12011         /* Final pthreads */
12012         pthread_attr_t attr;
12013
12014         status = pthread_attr_init(&attr);
12015         if( status ) return status;
12016
12017 #if HAVE_PTHREADS < 7
12018         status = pthread_attr_setdetachstate(&attr, &detach);
12019         if( status < 0 ) status = errno;
12020 #else
12021         status = pthread_attr_setdetachstate(&attr, detach);
12022 #endif
12023         if( status ) return status;
12024         status = pthread_create( &t, &attr, task, NULL );
12025 #if HAVE_PTHREADS < 7
12026         if( status < 0 ) status = errno;
12027 #endif
12028         if( status ) return status;
12029 #else
12030         /* Draft 4 pthreads */
12031         status = pthread_create( &t, pthread_attr_default, task, NULL );
12032         if( status ) return errno;
12033
12034         /* give thread a chance to complete */
12035         /* it should remain joinable and hence detachable */
12036         sleep( 1 );
12037
12038         status = pthread_detach( &t );
12039         if( status ) return errno;
12040 #endif
12041
12042 #ifdef HAVE_LINUX_THREADS
12043         pthread_kill_other_threads_np();
12044 #endif
12045
12046         return 0;
12047
12048 ; return 0; }
12049 EOF
12050 if { (eval echo configure:12051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12051   rm -rf conftest*
12052   ol_cv_pthread_pthread=yes
12053 else
12054   echo "configure: failed program was:" >&5
12055   cat conftest.$ac_ext >&5
12056   rm -rf conftest*
12057   ol_cv_pthread_pthread=no
12058 fi
12059 rm -f conftest*
12060 else
12061   cat > conftest.$ac_ext <<EOF
12062 #line 12063 "configure"
12063 #include "confdefs.h"
12064 /* pthread test headers */
12065 #include <pthread.h>
12066 #if HAVE_PTHREADS < 7
12067 #include <errno.h>
12068 #endif
12069 #ifndef NULL
12070 #define NULL (void*)0
12071 #endif
12072
12073 static void *task(p)
12074         void *p;
12075 {
12076         return (void *) (p == NULL);
12077 }
12078
12079
12080 int main(argc, argv)
12081         int argc;
12082         char **argv;
12083 {
12084
12085         /* pthread test function */
12086 #ifndef PTHREAD_CREATE_DETACHED
12087 #define PTHREAD_CREATE_DETACHED 1
12088 #endif
12089         pthread_t t;
12090         int status;
12091         int detach = PTHREAD_CREATE_DETACHED;
12092
12093 #if HAVE_PTHREADS > 4
12094         /* Final pthreads */
12095         pthread_attr_t attr;
12096
12097         status = pthread_attr_init(&attr);
12098         if( status ) return status;
12099
12100 #if HAVE_PTHREADS < 7
12101         status = pthread_attr_setdetachstate(&attr, &detach);
12102         if( status < 0 ) status = errno;
12103 #else
12104         status = pthread_attr_setdetachstate(&attr, detach);
12105 #endif
12106         if( status ) return status;
12107         status = pthread_create( &t, &attr, task, NULL );
12108 #if HAVE_PTHREADS < 7
12109         if( status < 0 ) status = errno;
12110 #endif
12111         if( status ) return status;
12112 #else
12113         /* Draft 4 pthreads */
12114         status = pthread_create( &t, pthread_attr_default, task, NULL );
12115         if( status ) return errno;
12116
12117         /* give thread a chance to complete */
12118         /* it should remain joinable and hence detachable */
12119         sleep( 1 );
12120
12121         status = pthread_detach( &t );
12122         if( status ) return errno;
12123 #endif
12124
12125 #ifdef HAVE_LINUX_THREADS
12126         pthread_kill_other_threads_np();
12127 #endif
12128
12129         return 0;
12130
12131 }
12132
12133 EOF
12134 if { (eval echo configure:12135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12135 then
12136   ol_cv_pthread_pthread=yes
12137 else
12138   echo "configure: failed program was:" >&5
12139   cat conftest.$ac_ext >&5
12140   rm -fr conftest*
12141   ol_cv_pthread_pthread=no
12142 fi
12143 rm -fr conftest*
12144 fi
12145
12146
12147                 # restore the LIBS
12148                 LIBS="$ol_LIBS"
12149         
12150 fi
12151
12152 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12153
12154         if test $ol_cv_pthread_pthread = yes ; then
12155                 ol_link_pthreads="-pthread"
12156                 ol_link_threads=posix
12157         fi
12158 fi
12159
12160                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12161 if test "$ol_link_threads" = no ; then
12162         # try -pthreads
12163         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12164 echo "configure:12165: checking for pthread link with -pthreads" >&5
12165 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12166   echo $ac_n "(cached) $ac_c" 1>&6
12167 else
12168   
12169                 # save the flags
12170                 ol_LIBS="$LIBS"
12171                 LIBS="-pthreads $LIBS"
12172
12173                 if test "$cross_compiling" = yes; then
12174   cat > conftest.$ac_ext <<EOF
12175 #line 12176 "configure"
12176 #include "confdefs.h"
12177 /* pthread test headers */
12178 #include <pthread.h>
12179 #if HAVE_PTHREADS < 7
12180 #include <errno.h>
12181 #endif
12182 #ifndef NULL
12183 #define NULL (void*)0
12184 #endif
12185
12186 static void *task(p)
12187         void *p;
12188 {
12189         return (void *) (p == NULL);
12190 }
12191
12192 int main() {
12193
12194         /* pthread test function */
12195 #ifndef PTHREAD_CREATE_DETACHED
12196 #define PTHREAD_CREATE_DETACHED 1
12197 #endif
12198         pthread_t t;
12199         int status;
12200         int detach = PTHREAD_CREATE_DETACHED;
12201
12202 #if HAVE_PTHREADS > 4
12203         /* Final pthreads */
12204         pthread_attr_t attr;
12205
12206         status = pthread_attr_init(&attr);
12207         if( status ) return status;
12208
12209 #if HAVE_PTHREADS < 7
12210         status = pthread_attr_setdetachstate(&attr, &detach);
12211         if( status < 0 ) status = errno;
12212 #else
12213         status = pthread_attr_setdetachstate(&attr, detach);
12214 #endif
12215         if( status ) return status;
12216         status = pthread_create( &t, &attr, task, NULL );
12217 #if HAVE_PTHREADS < 7
12218         if( status < 0 ) status = errno;
12219 #endif
12220         if( status ) return status;
12221 #else
12222         /* Draft 4 pthreads */
12223         status = pthread_create( &t, pthread_attr_default, task, NULL );
12224         if( status ) return errno;
12225
12226         /* give thread a chance to complete */
12227         /* it should remain joinable and hence detachable */
12228         sleep( 1 );
12229
12230         status = pthread_detach( &t );
12231         if( status ) return errno;
12232 #endif
12233
12234 #ifdef HAVE_LINUX_THREADS
12235         pthread_kill_other_threads_np();
12236 #endif
12237
12238         return 0;
12239
12240 ; return 0; }
12241 EOF
12242 if { (eval echo configure:12243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12243   rm -rf conftest*
12244   ol_cv_pthread_pthreads=yes
12245 else
12246   echo "configure: failed program was:" >&5
12247   cat conftest.$ac_ext >&5
12248   rm -rf conftest*
12249   ol_cv_pthread_pthreads=no
12250 fi
12251 rm -f conftest*
12252 else
12253   cat > conftest.$ac_ext <<EOF
12254 #line 12255 "configure"
12255 #include "confdefs.h"
12256 /* pthread test headers */
12257 #include <pthread.h>
12258 #if HAVE_PTHREADS < 7
12259 #include <errno.h>
12260 #endif
12261 #ifndef NULL
12262 #define NULL (void*)0
12263 #endif
12264
12265 static void *task(p)
12266         void *p;
12267 {
12268         return (void *) (p == NULL);
12269 }
12270
12271
12272 int main(argc, argv)
12273         int argc;
12274         char **argv;
12275 {
12276
12277         /* pthread test function */
12278 #ifndef PTHREAD_CREATE_DETACHED
12279 #define PTHREAD_CREATE_DETACHED 1
12280 #endif
12281         pthread_t t;
12282         int status;
12283         int detach = PTHREAD_CREATE_DETACHED;
12284
12285 #if HAVE_PTHREADS > 4
12286         /* Final pthreads */
12287         pthread_attr_t attr;
12288
12289         status = pthread_attr_init(&attr);
12290         if( status ) return status;
12291
12292 #if HAVE_PTHREADS < 7
12293         status = pthread_attr_setdetachstate(&attr, &detach);
12294         if( status < 0 ) status = errno;
12295 #else
12296         status = pthread_attr_setdetachstate(&attr, detach);
12297 #endif
12298         if( status ) return status;
12299         status = pthread_create( &t, &attr, task, NULL );
12300 #if HAVE_PTHREADS < 7
12301         if( status < 0 ) status = errno;
12302 #endif
12303         if( status ) return status;
12304 #else
12305         /* Draft 4 pthreads */
12306         status = pthread_create( &t, pthread_attr_default, task, NULL );
12307         if( status ) return errno;
12308
12309         /* give thread a chance to complete */
12310         /* it should remain joinable and hence detachable */
12311         sleep( 1 );
12312
12313         status = pthread_detach( &t );
12314         if( status ) return errno;
12315 #endif
12316
12317 #ifdef HAVE_LINUX_THREADS
12318         pthread_kill_other_threads_np();
12319 #endif
12320
12321         return 0;
12322
12323 }
12324
12325 EOF
12326 if { (eval echo configure:12327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12327 then
12328   ol_cv_pthread_pthreads=yes
12329 else
12330   echo "configure: failed program was:" >&5
12331   cat conftest.$ac_ext >&5
12332   rm -fr conftest*
12333   ol_cv_pthread_pthreads=no
12334 fi
12335 rm -fr conftest*
12336 fi
12337
12338
12339                 # restore the LIBS
12340                 LIBS="$ol_LIBS"
12341         
12342 fi
12343
12344 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12345
12346         if test $ol_cv_pthread_pthreads = yes ; then
12347                 ol_link_pthreads="-pthreads"
12348                 ol_link_threads=posix
12349         fi
12350 fi
12351
12352                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12353 if test "$ol_link_threads" = no ; then
12354         # try -mthreads
12355         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12356 echo "configure:12357: checking for pthread link with -mthreads" >&5
12357 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12358   echo $ac_n "(cached) $ac_c" 1>&6
12359 else
12360   
12361                 # save the flags
12362                 ol_LIBS="$LIBS"
12363                 LIBS="-mthreads $LIBS"
12364
12365                 if test "$cross_compiling" = yes; then
12366   cat > conftest.$ac_ext <<EOF
12367 #line 12368 "configure"
12368 #include "confdefs.h"
12369 /* pthread test headers */
12370 #include <pthread.h>
12371 #if HAVE_PTHREADS < 7
12372 #include <errno.h>
12373 #endif
12374 #ifndef NULL
12375 #define NULL (void*)0
12376 #endif
12377
12378 static void *task(p)
12379         void *p;
12380 {
12381         return (void *) (p == NULL);
12382 }
12383
12384 int main() {
12385
12386         /* pthread test function */
12387 #ifndef PTHREAD_CREATE_DETACHED
12388 #define PTHREAD_CREATE_DETACHED 1
12389 #endif
12390         pthread_t t;
12391         int status;
12392         int detach = PTHREAD_CREATE_DETACHED;
12393
12394 #if HAVE_PTHREADS > 4
12395         /* Final pthreads */
12396         pthread_attr_t attr;
12397
12398         status = pthread_attr_init(&attr);
12399         if( status ) return status;
12400
12401 #if HAVE_PTHREADS < 7
12402         status = pthread_attr_setdetachstate(&attr, &detach);
12403         if( status < 0 ) status = errno;
12404 #else
12405         status = pthread_attr_setdetachstate(&attr, detach);
12406 #endif
12407         if( status ) return status;
12408         status = pthread_create( &t, &attr, task, NULL );
12409 #if HAVE_PTHREADS < 7
12410         if( status < 0 ) status = errno;
12411 #endif
12412         if( status ) return status;
12413 #else
12414         /* Draft 4 pthreads */
12415         status = pthread_create( &t, pthread_attr_default, task, NULL );
12416         if( status ) return errno;
12417
12418         /* give thread a chance to complete */
12419         /* it should remain joinable and hence detachable */
12420         sleep( 1 );
12421
12422         status = pthread_detach( &t );
12423         if( status ) return errno;
12424 #endif
12425
12426 #ifdef HAVE_LINUX_THREADS
12427         pthread_kill_other_threads_np();
12428 #endif
12429
12430         return 0;
12431
12432 ; return 0; }
12433 EOF
12434 if { (eval echo configure:12435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12435   rm -rf conftest*
12436   ol_cv_pthread_mthreads=yes
12437 else
12438   echo "configure: failed program was:" >&5
12439   cat conftest.$ac_ext >&5
12440   rm -rf conftest*
12441   ol_cv_pthread_mthreads=no
12442 fi
12443 rm -f conftest*
12444 else
12445   cat > conftest.$ac_ext <<EOF
12446 #line 12447 "configure"
12447 #include "confdefs.h"
12448 /* pthread test headers */
12449 #include <pthread.h>
12450 #if HAVE_PTHREADS < 7
12451 #include <errno.h>
12452 #endif
12453 #ifndef NULL
12454 #define NULL (void*)0
12455 #endif
12456
12457 static void *task(p)
12458         void *p;
12459 {
12460         return (void *) (p == NULL);
12461 }
12462
12463
12464 int main(argc, argv)
12465         int argc;
12466         char **argv;
12467 {
12468
12469         /* pthread test function */
12470 #ifndef PTHREAD_CREATE_DETACHED
12471 #define PTHREAD_CREATE_DETACHED 1
12472 #endif
12473         pthread_t t;
12474         int status;
12475         int detach = PTHREAD_CREATE_DETACHED;
12476
12477 #if HAVE_PTHREADS > 4
12478         /* Final pthreads */
12479         pthread_attr_t attr;
12480
12481         status = pthread_attr_init(&attr);
12482         if( status ) return status;
12483
12484 #if HAVE_PTHREADS < 7
12485         status = pthread_attr_setdetachstate(&attr, &detach);
12486         if( status < 0 ) status = errno;
12487 #else
12488         status = pthread_attr_setdetachstate(&attr, detach);
12489 #endif
12490         if( status ) return status;
12491         status = pthread_create( &t, &attr, task, NULL );
12492 #if HAVE_PTHREADS < 7
12493         if( status < 0 ) status = errno;
12494 #endif
12495         if( status ) return status;
12496 #else
12497         /* Draft 4 pthreads */
12498         status = pthread_create( &t, pthread_attr_default, task, NULL );
12499         if( status ) return errno;
12500
12501         /* give thread a chance to complete */
12502         /* it should remain joinable and hence detachable */
12503         sleep( 1 );
12504
12505         status = pthread_detach( &t );
12506         if( status ) return errno;
12507 #endif
12508
12509 #ifdef HAVE_LINUX_THREADS
12510         pthread_kill_other_threads_np();
12511 #endif
12512
12513         return 0;
12514
12515 }
12516
12517 EOF
12518 if { (eval echo configure:12519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12519 then
12520   ol_cv_pthread_mthreads=yes
12521 else
12522   echo "configure: failed program was:" >&5
12523   cat conftest.$ac_ext >&5
12524   rm -fr conftest*
12525   ol_cv_pthread_mthreads=no
12526 fi
12527 rm -fr conftest*
12528 fi
12529
12530
12531                 # restore the LIBS
12532                 LIBS="$ol_LIBS"
12533         
12534 fi
12535
12536 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12537
12538         if test $ol_cv_pthread_mthreads = yes ; then
12539                 ol_link_pthreads="-mthreads"
12540                 ol_link_threads=posix
12541         fi
12542 fi
12543
12544                 # Pthread try link: -thread (ol_cv_pthread_thread)
12545 if test "$ol_link_threads" = no ; then
12546         # try -thread
12547         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12548 echo "configure:12549: checking for pthread link with -thread" >&5
12549 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12550   echo $ac_n "(cached) $ac_c" 1>&6
12551 else
12552   
12553                 # save the flags
12554                 ol_LIBS="$LIBS"
12555                 LIBS="-thread $LIBS"
12556
12557                 if test "$cross_compiling" = yes; then
12558   cat > conftest.$ac_ext <<EOF
12559 #line 12560 "configure"
12560 #include "confdefs.h"
12561 /* pthread test headers */
12562 #include <pthread.h>
12563 #if HAVE_PTHREADS < 7
12564 #include <errno.h>
12565 #endif
12566 #ifndef NULL
12567 #define NULL (void*)0
12568 #endif
12569
12570 static void *task(p)
12571         void *p;
12572 {
12573         return (void *) (p == NULL);
12574 }
12575
12576 int main() {
12577
12578         /* pthread test function */
12579 #ifndef PTHREAD_CREATE_DETACHED
12580 #define PTHREAD_CREATE_DETACHED 1
12581 #endif
12582         pthread_t t;
12583         int status;
12584         int detach = PTHREAD_CREATE_DETACHED;
12585
12586 #if HAVE_PTHREADS > 4
12587         /* Final pthreads */
12588         pthread_attr_t attr;
12589
12590         status = pthread_attr_init(&attr);
12591         if( status ) return status;
12592
12593 #if HAVE_PTHREADS < 7
12594         status = pthread_attr_setdetachstate(&attr, &detach);
12595         if( status < 0 ) status = errno;
12596 #else
12597         status = pthread_attr_setdetachstate(&attr, detach);
12598 #endif
12599         if( status ) return status;
12600         status = pthread_create( &t, &attr, task, NULL );
12601 #if HAVE_PTHREADS < 7
12602         if( status < 0 ) status = errno;
12603 #endif
12604         if( status ) return status;
12605 #else
12606         /* Draft 4 pthreads */
12607         status = pthread_create( &t, pthread_attr_default, task, NULL );
12608         if( status ) return errno;
12609
12610         /* give thread a chance to complete */
12611         /* it should remain joinable and hence detachable */
12612         sleep( 1 );
12613
12614         status = pthread_detach( &t );
12615         if( status ) return errno;
12616 #endif
12617
12618 #ifdef HAVE_LINUX_THREADS
12619         pthread_kill_other_threads_np();
12620 #endif
12621
12622         return 0;
12623
12624 ; return 0; }
12625 EOF
12626 if { (eval echo configure:12627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12627   rm -rf conftest*
12628   ol_cv_pthread_thread=yes
12629 else
12630   echo "configure: failed program was:" >&5
12631   cat conftest.$ac_ext >&5
12632   rm -rf conftest*
12633   ol_cv_pthread_thread=no
12634 fi
12635 rm -f conftest*
12636 else
12637   cat > conftest.$ac_ext <<EOF
12638 #line 12639 "configure"
12639 #include "confdefs.h"
12640 /* pthread test headers */
12641 #include <pthread.h>
12642 #if HAVE_PTHREADS < 7
12643 #include <errno.h>
12644 #endif
12645 #ifndef NULL
12646 #define NULL (void*)0
12647 #endif
12648
12649 static void *task(p)
12650         void *p;
12651 {
12652         return (void *) (p == NULL);
12653 }
12654
12655
12656 int main(argc, argv)
12657         int argc;
12658         char **argv;
12659 {
12660
12661         /* pthread test function */
12662 #ifndef PTHREAD_CREATE_DETACHED
12663 #define PTHREAD_CREATE_DETACHED 1
12664 #endif
12665         pthread_t t;
12666         int status;
12667         int detach = PTHREAD_CREATE_DETACHED;
12668
12669 #if HAVE_PTHREADS > 4
12670         /* Final pthreads */
12671         pthread_attr_t attr;
12672
12673         status = pthread_attr_init(&attr);
12674         if( status ) return status;
12675
12676 #if HAVE_PTHREADS < 7
12677         status = pthread_attr_setdetachstate(&attr, &detach);
12678         if( status < 0 ) status = errno;
12679 #else
12680         status = pthread_attr_setdetachstate(&attr, detach);
12681 #endif
12682         if( status ) return status;
12683         status = pthread_create( &t, &attr, task, NULL );
12684 #if HAVE_PTHREADS < 7
12685         if( status < 0 ) status = errno;
12686 #endif
12687         if( status ) return status;
12688 #else
12689         /* Draft 4 pthreads */
12690         status = pthread_create( &t, pthread_attr_default, task, NULL );
12691         if( status ) return errno;
12692
12693         /* give thread a chance to complete */
12694         /* it should remain joinable and hence detachable */
12695         sleep( 1 );
12696
12697         status = pthread_detach( &t );
12698         if( status ) return errno;
12699 #endif
12700
12701 #ifdef HAVE_LINUX_THREADS
12702         pthread_kill_other_threads_np();
12703 #endif
12704
12705         return 0;
12706
12707 }
12708
12709 EOF
12710 if { (eval echo configure:12711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12711 then
12712   ol_cv_pthread_thread=yes
12713 else
12714   echo "configure: failed program was:" >&5
12715   cat conftest.$ac_ext >&5
12716   rm -fr conftest*
12717   ol_cv_pthread_thread=no
12718 fi
12719 rm -fr conftest*
12720 fi
12721
12722
12723                 # restore the LIBS
12724                 LIBS="$ol_LIBS"
12725         
12726 fi
12727
12728 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12729
12730         if test $ol_cv_pthread_thread = yes ; then
12731                 ol_link_pthreads="-thread"
12732                 ol_link_threads=posix
12733         fi
12734 fi
12735
12736
12737                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12738 if test "$ol_link_threads" = no ; then
12739         # try -lpthread -lmach -lexc -lc_r
12740         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12741 echo "configure:12742: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12742 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12743   echo $ac_n "(cached) $ac_c" 1>&6
12744 else
12745   
12746                 # save the flags
12747                 ol_LIBS="$LIBS"
12748                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12749
12750                 if test "$cross_compiling" = yes; then
12751   cat > conftest.$ac_ext <<EOF
12752 #line 12753 "configure"
12753 #include "confdefs.h"
12754 /* pthread test headers */
12755 #include <pthread.h>
12756 #if HAVE_PTHREADS < 7
12757 #include <errno.h>
12758 #endif
12759 #ifndef NULL
12760 #define NULL (void*)0
12761 #endif
12762
12763 static void *task(p)
12764         void *p;
12765 {
12766         return (void *) (p == NULL);
12767 }
12768
12769 int main() {
12770
12771         /* pthread test function */
12772 #ifndef PTHREAD_CREATE_DETACHED
12773 #define PTHREAD_CREATE_DETACHED 1
12774 #endif
12775         pthread_t t;
12776         int status;
12777         int detach = PTHREAD_CREATE_DETACHED;
12778
12779 #if HAVE_PTHREADS > 4
12780         /* Final pthreads */
12781         pthread_attr_t attr;
12782
12783         status = pthread_attr_init(&attr);
12784         if( status ) return status;
12785
12786 #if HAVE_PTHREADS < 7
12787         status = pthread_attr_setdetachstate(&attr, &detach);
12788         if( status < 0 ) status = errno;
12789 #else
12790         status = pthread_attr_setdetachstate(&attr, detach);
12791 #endif
12792         if( status ) return status;
12793         status = pthread_create( &t, &attr, task, NULL );
12794 #if HAVE_PTHREADS < 7
12795         if( status < 0 ) status = errno;
12796 #endif
12797         if( status ) return status;
12798 #else
12799         /* Draft 4 pthreads */
12800         status = pthread_create( &t, pthread_attr_default, task, NULL );
12801         if( status ) return errno;
12802
12803         /* give thread a chance to complete */
12804         /* it should remain joinable and hence detachable */
12805         sleep( 1 );
12806
12807         status = pthread_detach( &t );
12808         if( status ) return errno;
12809 #endif
12810
12811 #ifdef HAVE_LINUX_THREADS
12812         pthread_kill_other_threads_np();
12813 #endif
12814
12815         return 0;
12816
12817 ; return 0; }
12818 EOF
12819 if { (eval echo configure:12820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12820   rm -rf conftest*
12821   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12822 else
12823   echo "configure: failed program was:" >&5
12824   cat conftest.$ac_ext >&5
12825   rm -rf conftest*
12826   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12827 fi
12828 rm -f conftest*
12829 else
12830   cat > conftest.$ac_ext <<EOF
12831 #line 12832 "configure"
12832 #include "confdefs.h"
12833 /* pthread test headers */
12834 #include <pthread.h>
12835 #if HAVE_PTHREADS < 7
12836 #include <errno.h>
12837 #endif
12838 #ifndef NULL
12839 #define NULL (void*)0
12840 #endif
12841
12842 static void *task(p)
12843         void *p;
12844 {
12845         return (void *) (p == NULL);
12846 }
12847
12848
12849 int main(argc, argv)
12850         int argc;
12851         char **argv;
12852 {
12853
12854         /* pthread test function */
12855 #ifndef PTHREAD_CREATE_DETACHED
12856 #define PTHREAD_CREATE_DETACHED 1
12857 #endif
12858         pthread_t t;
12859         int status;
12860         int detach = PTHREAD_CREATE_DETACHED;
12861
12862 #if HAVE_PTHREADS > 4
12863         /* Final pthreads */
12864         pthread_attr_t attr;
12865
12866         status = pthread_attr_init(&attr);
12867         if( status ) return status;
12868
12869 #if HAVE_PTHREADS < 7
12870         status = pthread_attr_setdetachstate(&attr, &detach);
12871         if( status < 0 ) status = errno;
12872 #else
12873         status = pthread_attr_setdetachstate(&attr, detach);
12874 #endif
12875         if( status ) return status;
12876         status = pthread_create( &t, &attr, task, NULL );
12877 #if HAVE_PTHREADS < 7
12878         if( status < 0 ) status = errno;
12879 #endif
12880         if( status ) return status;
12881 #else
12882         /* Draft 4 pthreads */
12883         status = pthread_create( &t, pthread_attr_default, task, NULL );
12884         if( status ) return errno;
12885
12886         /* give thread a chance to complete */
12887         /* it should remain joinable and hence detachable */
12888         sleep( 1 );
12889
12890         status = pthread_detach( &t );
12891         if( status ) return errno;
12892 #endif
12893
12894 #ifdef HAVE_LINUX_THREADS
12895         pthread_kill_other_threads_np();
12896 #endif
12897
12898         return 0;
12899
12900 }
12901
12902 EOF
12903 if { (eval echo configure:12904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12904 then
12905   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12906 else
12907   echo "configure: failed program was:" >&5
12908   cat conftest.$ac_ext >&5
12909   rm -fr conftest*
12910   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12911 fi
12912 rm -fr conftest*
12913 fi
12914
12915
12916                 # restore the LIBS
12917                 LIBS="$ol_LIBS"
12918         
12919 fi
12920
12921 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12922
12923         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12924                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12925                 ol_link_threads=posix
12926         fi
12927 fi
12928
12929                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12930 if test "$ol_link_threads" = no ; then
12931         # try -lpthread -lmach -lexc
12932         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12933 echo "configure:12934: checking for pthread link with -lpthread -lmach -lexc" >&5
12934 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12935   echo $ac_n "(cached) $ac_c" 1>&6
12936 else
12937   
12938                 # save the flags
12939                 ol_LIBS="$LIBS"
12940                 LIBS="-lpthread -lmach -lexc $LIBS"
12941
12942                 if test "$cross_compiling" = yes; then
12943   cat > conftest.$ac_ext <<EOF
12944 #line 12945 "configure"
12945 #include "confdefs.h"
12946 /* pthread test headers */
12947 #include <pthread.h>
12948 #if HAVE_PTHREADS < 7
12949 #include <errno.h>
12950 #endif
12951 #ifndef NULL
12952 #define NULL (void*)0
12953 #endif
12954
12955 static void *task(p)
12956         void *p;
12957 {
12958         return (void *) (p == NULL);
12959 }
12960
12961 int main() {
12962
12963         /* pthread test function */
12964 #ifndef PTHREAD_CREATE_DETACHED
12965 #define PTHREAD_CREATE_DETACHED 1
12966 #endif
12967         pthread_t t;
12968         int status;
12969         int detach = PTHREAD_CREATE_DETACHED;
12970
12971 #if HAVE_PTHREADS > 4
12972         /* Final pthreads */
12973         pthread_attr_t attr;
12974
12975         status = pthread_attr_init(&attr);
12976         if( status ) return status;
12977
12978 #if HAVE_PTHREADS < 7
12979         status = pthread_attr_setdetachstate(&attr, &detach);
12980         if( status < 0 ) status = errno;
12981 #else
12982         status = pthread_attr_setdetachstate(&attr, detach);
12983 #endif
12984         if( status ) return status;
12985         status = pthread_create( &t, &attr, task, NULL );
12986 #if HAVE_PTHREADS < 7
12987         if( status < 0 ) status = errno;
12988 #endif
12989         if( status ) return status;
12990 #else
12991         /* Draft 4 pthreads */
12992         status = pthread_create( &t, pthread_attr_default, task, NULL );
12993         if( status ) return errno;
12994
12995         /* give thread a chance to complete */
12996         /* it should remain joinable and hence detachable */
12997         sleep( 1 );
12998
12999         status = pthread_detach( &t );
13000         if( status ) return errno;
13001 #endif
13002
13003 #ifdef HAVE_LINUX_THREADS
13004         pthread_kill_other_threads_np();
13005 #endif
13006
13007         return 0;
13008
13009 ; return 0; }
13010 EOF
13011 if { (eval echo configure:13012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13012   rm -rf conftest*
13013   ol_cv_pthread_lpthread_lmach_lexc=yes
13014 else
13015   echo "configure: failed program was:" >&5
13016   cat conftest.$ac_ext >&5
13017   rm -rf conftest*
13018   ol_cv_pthread_lpthread_lmach_lexc=no
13019 fi
13020 rm -f conftest*
13021 else
13022   cat > conftest.$ac_ext <<EOF
13023 #line 13024 "configure"
13024 #include "confdefs.h"
13025 /* pthread test headers */
13026 #include <pthread.h>
13027 #if HAVE_PTHREADS < 7
13028 #include <errno.h>
13029 #endif
13030 #ifndef NULL
13031 #define NULL (void*)0
13032 #endif
13033
13034 static void *task(p)
13035         void *p;
13036 {
13037         return (void *) (p == NULL);
13038 }
13039
13040
13041 int main(argc, argv)
13042         int argc;
13043         char **argv;
13044 {
13045
13046         /* pthread test function */
13047 #ifndef PTHREAD_CREATE_DETACHED
13048 #define PTHREAD_CREATE_DETACHED 1
13049 #endif
13050         pthread_t t;
13051         int status;
13052         int detach = PTHREAD_CREATE_DETACHED;
13053
13054 #if HAVE_PTHREADS > 4
13055         /* Final pthreads */
13056         pthread_attr_t attr;
13057
13058         status = pthread_attr_init(&attr);
13059         if( status ) return status;
13060
13061 #if HAVE_PTHREADS < 7
13062         status = pthread_attr_setdetachstate(&attr, &detach);
13063         if( status < 0 ) status = errno;
13064 #else
13065         status = pthread_attr_setdetachstate(&attr, detach);
13066 #endif
13067         if( status ) return status;
13068         status = pthread_create( &t, &attr, task, NULL );
13069 #if HAVE_PTHREADS < 7
13070         if( status < 0 ) status = errno;
13071 #endif
13072         if( status ) return status;
13073 #else
13074         /* Draft 4 pthreads */
13075         status = pthread_create( &t, pthread_attr_default, task, NULL );
13076         if( status ) return errno;
13077
13078         /* give thread a chance to complete */
13079         /* it should remain joinable and hence detachable */
13080         sleep( 1 );
13081
13082         status = pthread_detach( &t );
13083         if( status ) return errno;
13084 #endif
13085
13086 #ifdef HAVE_LINUX_THREADS
13087         pthread_kill_other_threads_np();
13088 #endif
13089
13090         return 0;
13091
13092 }
13093
13094 EOF
13095 if { (eval echo configure:13096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13096 then
13097   ol_cv_pthread_lpthread_lmach_lexc=yes
13098 else
13099   echo "configure: failed program was:" >&5
13100   cat conftest.$ac_ext >&5
13101   rm -fr conftest*
13102   ol_cv_pthread_lpthread_lmach_lexc=no
13103 fi
13104 rm -fr conftest*
13105 fi
13106
13107
13108                 # restore the LIBS
13109                 LIBS="$ol_LIBS"
13110         
13111 fi
13112
13113 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13114
13115         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13116                 ol_link_pthreads="-lpthread -lmach -lexc"
13117                 ol_link_threads=posix
13118         fi
13119 fi
13120
13121
13122                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13123 if test "$ol_link_threads" = no ; then
13124         # try -lpthread -Wl,-woff,85
13125         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13126 echo "configure:13127: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13127 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13128   echo $ac_n "(cached) $ac_c" 1>&6
13129 else
13130   
13131                 # save the flags
13132                 ol_LIBS="$LIBS"
13133                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13134
13135                 if test "$cross_compiling" = yes; then
13136   cat > conftest.$ac_ext <<EOF
13137 #line 13138 "configure"
13138 #include "confdefs.h"
13139 /* pthread test headers */
13140 #include <pthread.h>
13141 #if HAVE_PTHREADS < 7
13142 #include <errno.h>
13143 #endif
13144 #ifndef NULL
13145 #define NULL (void*)0
13146 #endif
13147
13148 static void *task(p)
13149         void *p;
13150 {
13151         return (void *) (p == NULL);
13152 }
13153
13154 int main() {
13155
13156         /* pthread test function */
13157 #ifndef PTHREAD_CREATE_DETACHED
13158 #define PTHREAD_CREATE_DETACHED 1
13159 #endif
13160         pthread_t t;
13161         int status;
13162         int detach = PTHREAD_CREATE_DETACHED;
13163
13164 #if HAVE_PTHREADS > 4
13165         /* Final pthreads */
13166         pthread_attr_t attr;
13167
13168         status = pthread_attr_init(&attr);
13169         if( status ) return status;
13170
13171 #if HAVE_PTHREADS < 7
13172         status = pthread_attr_setdetachstate(&attr, &detach);
13173         if( status < 0 ) status = errno;
13174 #else
13175         status = pthread_attr_setdetachstate(&attr, detach);
13176 #endif
13177         if( status ) return status;
13178         status = pthread_create( &t, &attr, task, NULL );
13179 #if HAVE_PTHREADS < 7
13180         if( status < 0 ) status = errno;
13181 #endif
13182         if( status ) return status;
13183 #else
13184         /* Draft 4 pthreads */
13185         status = pthread_create( &t, pthread_attr_default, task, NULL );
13186         if( status ) return errno;
13187
13188         /* give thread a chance to complete */
13189         /* it should remain joinable and hence detachable */
13190         sleep( 1 );
13191
13192         status = pthread_detach( &t );
13193         if( status ) return errno;
13194 #endif
13195
13196 #ifdef HAVE_LINUX_THREADS
13197         pthread_kill_other_threads_np();
13198 #endif
13199
13200         return 0;
13201
13202 ; return 0; }
13203 EOF
13204 if { (eval echo configure:13205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13205   rm -rf conftest*
13206   ol_cv_pthread_lib_lpthread_woff=yes
13207 else
13208   echo "configure: failed program was:" >&5
13209   cat conftest.$ac_ext >&5
13210   rm -rf conftest*
13211   ol_cv_pthread_lib_lpthread_woff=no
13212 fi
13213 rm -f conftest*
13214 else
13215   cat > conftest.$ac_ext <<EOF
13216 #line 13217 "configure"
13217 #include "confdefs.h"
13218 /* pthread test headers */
13219 #include <pthread.h>
13220 #if HAVE_PTHREADS < 7
13221 #include <errno.h>
13222 #endif
13223 #ifndef NULL
13224 #define NULL (void*)0
13225 #endif
13226
13227 static void *task(p)
13228         void *p;
13229 {
13230         return (void *) (p == NULL);
13231 }
13232
13233
13234 int main(argc, argv)
13235         int argc;
13236         char **argv;
13237 {
13238
13239         /* pthread test function */
13240 #ifndef PTHREAD_CREATE_DETACHED
13241 #define PTHREAD_CREATE_DETACHED 1
13242 #endif
13243         pthread_t t;
13244         int status;
13245         int detach = PTHREAD_CREATE_DETACHED;
13246
13247 #if HAVE_PTHREADS > 4
13248         /* Final pthreads */
13249         pthread_attr_t attr;
13250
13251         status = pthread_attr_init(&attr);
13252         if( status ) return status;
13253
13254 #if HAVE_PTHREADS < 7
13255         status = pthread_attr_setdetachstate(&attr, &detach);
13256         if( status < 0 ) status = errno;
13257 #else
13258         status = pthread_attr_setdetachstate(&attr, detach);
13259 #endif
13260         if( status ) return status;
13261         status = pthread_create( &t, &attr, task, NULL );
13262 #if HAVE_PTHREADS < 7
13263         if( status < 0 ) status = errno;
13264 #endif
13265         if( status ) return status;
13266 #else
13267         /* Draft 4 pthreads */
13268         status = pthread_create( &t, pthread_attr_default, task, NULL );
13269         if( status ) return errno;
13270
13271         /* give thread a chance to complete */
13272         /* it should remain joinable and hence detachable */
13273         sleep( 1 );
13274
13275         status = pthread_detach( &t );
13276         if( status ) return errno;
13277 #endif
13278
13279 #ifdef HAVE_LINUX_THREADS
13280         pthread_kill_other_threads_np();
13281 #endif
13282
13283         return 0;
13284
13285 }
13286
13287 EOF
13288 if { (eval echo configure:13289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13289 then
13290   ol_cv_pthread_lib_lpthread_woff=yes
13291 else
13292   echo "configure: failed program was:" >&5
13293   cat conftest.$ac_ext >&5
13294   rm -fr conftest*
13295   ol_cv_pthread_lib_lpthread_woff=no
13296 fi
13297 rm -fr conftest*
13298 fi
13299
13300
13301                 # restore the LIBS
13302                 LIBS="$ol_LIBS"
13303         
13304 fi
13305
13306 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13307
13308         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13309                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13310                 ol_link_threads=posix
13311         fi
13312 fi
13313
13314
13315                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13316 if test "$ol_link_threads" = no ; then
13317         # try -lpthread
13318         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13319 echo "configure:13320: checking for pthread link with -lpthread" >&5
13320 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13321   echo $ac_n "(cached) $ac_c" 1>&6
13322 else
13323   
13324                 # save the flags
13325                 ol_LIBS="$LIBS"
13326                 LIBS="-lpthread $LIBS"
13327
13328                 if test "$cross_compiling" = yes; then
13329   cat > conftest.$ac_ext <<EOF
13330 #line 13331 "configure"
13331 #include "confdefs.h"
13332 /* pthread test headers */
13333 #include <pthread.h>
13334 #if HAVE_PTHREADS < 7
13335 #include <errno.h>
13336 #endif
13337 #ifndef NULL
13338 #define NULL (void*)0
13339 #endif
13340
13341 static void *task(p)
13342         void *p;
13343 {
13344         return (void *) (p == NULL);
13345 }
13346
13347 int main() {
13348
13349         /* pthread test function */
13350 #ifndef PTHREAD_CREATE_DETACHED
13351 #define PTHREAD_CREATE_DETACHED 1
13352 #endif
13353         pthread_t t;
13354         int status;
13355         int detach = PTHREAD_CREATE_DETACHED;
13356
13357 #if HAVE_PTHREADS > 4
13358         /* Final pthreads */
13359         pthread_attr_t attr;
13360
13361         status = pthread_attr_init(&attr);
13362         if( status ) return status;
13363
13364 #if HAVE_PTHREADS < 7
13365         status = pthread_attr_setdetachstate(&attr, &detach);
13366         if( status < 0 ) status = errno;
13367 #else
13368         status = pthread_attr_setdetachstate(&attr, detach);
13369 #endif
13370         if( status ) return status;
13371         status = pthread_create( &t, &attr, task, NULL );
13372 #if HAVE_PTHREADS < 7
13373         if( status < 0 ) status = errno;
13374 #endif
13375         if( status ) return status;
13376 #else
13377         /* Draft 4 pthreads */
13378         status = pthread_create( &t, pthread_attr_default, task, NULL );
13379         if( status ) return errno;
13380
13381         /* give thread a chance to complete */
13382         /* it should remain joinable and hence detachable */
13383         sleep( 1 );
13384
13385         status = pthread_detach( &t );
13386         if( status ) return errno;
13387 #endif
13388
13389 #ifdef HAVE_LINUX_THREADS
13390         pthread_kill_other_threads_np();
13391 #endif
13392
13393         return 0;
13394
13395 ; return 0; }
13396 EOF
13397 if { (eval echo configure:13398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13398   rm -rf conftest*
13399   ol_cv_pthread_lpthread=yes
13400 else
13401   echo "configure: failed program was:" >&5
13402   cat conftest.$ac_ext >&5
13403   rm -rf conftest*
13404   ol_cv_pthread_lpthread=no
13405 fi
13406 rm -f conftest*
13407 else
13408   cat > conftest.$ac_ext <<EOF
13409 #line 13410 "configure"
13410 #include "confdefs.h"
13411 /* pthread test headers */
13412 #include <pthread.h>
13413 #if HAVE_PTHREADS < 7
13414 #include <errno.h>
13415 #endif
13416 #ifndef NULL
13417 #define NULL (void*)0
13418 #endif
13419
13420 static void *task(p)
13421         void *p;
13422 {
13423         return (void *) (p == NULL);
13424 }
13425
13426
13427 int main(argc, argv)
13428         int argc;
13429         char **argv;
13430 {
13431
13432         /* pthread test function */
13433 #ifndef PTHREAD_CREATE_DETACHED
13434 #define PTHREAD_CREATE_DETACHED 1
13435 #endif
13436         pthread_t t;
13437         int status;
13438         int detach = PTHREAD_CREATE_DETACHED;
13439
13440 #if HAVE_PTHREADS > 4
13441         /* Final pthreads */
13442         pthread_attr_t attr;
13443
13444         status = pthread_attr_init(&attr);
13445         if( status ) return status;
13446
13447 #if HAVE_PTHREADS < 7
13448         status = pthread_attr_setdetachstate(&attr, &detach);
13449         if( status < 0 ) status = errno;
13450 #else
13451         status = pthread_attr_setdetachstate(&attr, detach);
13452 #endif
13453         if( status ) return status;
13454         status = pthread_create( &t, &attr, task, NULL );
13455 #if HAVE_PTHREADS < 7
13456         if( status < 0 ) status = errno;
13457 #endif
13458         if( status ) return status;
13459 #else
13460         /* Draft 4 pthreads */
13461         status = pthread_create( &t, pthread_attr_default, task, NULL );
13462         if( status ) return errno;
13463
13464         /* give thread a chance to complete */
13465         /* it should remain joinable and hence detachable */
13466         sleep( 1 );
13467
13468         status = pthread_detach( &t );
13469         if( status ) return errno;
13470 #endif
13471
13472 #ifdef HAVE_LINUX_THREADS
13473         pthread_kill_other_threads_np();
13474 #endif
13475
13476         return 0;
13477
13478 }
13479
13480 EOF
13481 if { (eval echo configure:13482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13482 then
13483   ol_cv_pthread_lpthread=yes
13484 else
13485   echo "configure: failed program was:" >&5
13486   cat conftest.$ac_ext >&5
13487   rm -fr conftest*
13488   ol_cv_pthread_lpthread=no
13489 fi
13490 rm -fr conftest*
13491 fi
13492
13493
13494                 # restore the LIBS
13495                 LIBS="$ol_LIBS"
13496         
13497 fi
13498
13499 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13500
13501         if test $ol_cv_pthread_lpthread = yes ; then
13502                 ol_link_pthreads="-lpthread"
13503                 ol_link_threads=posix
13504         fi
13505 fi
13506
13507                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13508 if test "$ol_link_threads" = no ; then
13509         # try -lc_r
13510         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13511 echo "configure:13512: checking for pthread link with -lc_r" >&5
13512 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13513   echo $ac_n "(cached) $ac_c" 1>&6
13514 else
13515   
13516                 # save the flags
13517                 ol_LIBS="$LIBS"
13518                 LIBS="-lc_r $LIBS"
13519
13520                 if test "$cross_compiling" = yes; then
13521   cat > conftest.$ac_ext <<EOF
13522 #line 13523 "configure"
13523 #include "confdefs.h"
13524 /* pthread test headers */
13525 #include <pthread.h>
13526 #if HAVE_PTHREADS < 7
13527 #include <errno.h>
13528 #endif
13529 #ifndef NULL
13530 #define NULL (void*)0
13531 #endif
13532
13533 static void *task(p)
13534         void *p;
13535 {
13536         return (void *) (p == NULL);
13537 }
13538
13539 int main() {
13540
13541         /* pthread test function */
13542 #ifndef PTHREAD_CREATE_DETACHED
13543 #define PTHREAD_CREATE_DETACHED 1
13544 #endif
13545         pthread_t t;
13546         int status;
13547         int detach = PTHREAD_CREATE_DETACHED;
13548
13549 #if HAVE_PTHREADS > 4
13550         /* Final pthreads */
13551         pthread_attr_t attr;
13552
13553         status = pthread_attr_init(&attr);
13554         if( status ) return status;
13555
13556 #if HAVE_PTHREADS < 7
13557         status = pthread_attr_setdetachstate(&attr, &detach);
13558         if( status < 0 ) status = errno;
13559 #else
13560         status = pthread_attr_setdetachstate(&attr, detach);
13561 #endif
13562         if( status ) return status;
13563         status = pthread_create( &t, &attr, task, NULL );
13564 #if HAVE_PTHREADS < 7
13565         if( status < 0 ) status = errno;
13566 #endif
13567         if( status ) return status;
13568 #else
13569         /* Draft 4 pthreads */
13570         status = pthread_create( &t, pthread_attr_default, task, NULL );
13571         if( status ) return errno;
13572
13573         /* give thread a chance to complete */
13574         /* it should remain joinable and hence detachable */
13575         sleep( 1 );
13576
13577         status = pthread_detach( &t );
13578         if( status ) return errno;
13579 #endif
13580
13581 #ifdef HAVE_LINUX_THREADS
13582         pthread_kill_other_threads_np();
13583 #endif
13584
13585         return 0;
13586
13587 ; return 0; }
13588 EOF
13589 if { (eval echo configure:13590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13590   rm -rf conftest*
13591   ol_cv_pthread_lc_r=yes
13592 else
13593   echo "configure: failed program was:" >&5
13594   cat conftest.$ac_ext >&5
13595   rm -rf conftest*
13596   ol_cv_pthread_lc_r=no
13597 fi
13598 rm -f conftest*
13599 else
13600   cat > conftest.$ac_ext <<EOF
13601 #line 13602 "configure"
13602 #include "confdefs.h"
13603 /* pthread test headers */
13604 #include <pthread.h>
13605 #if HAVE_PTHREADS < 7
13606 #include <errno.h>
13607 #endif
13608 #ifndef NULL
13609 #define NULL (void*)0
13610 #endif
13611
13612 static void *task(p)
13613         void *p;
13614 {
13615         return (void *) (p == NULL);
13616 }
13617
13618
13619 int main(argc, argv)
13620         int argc;
13621         char **argv;
13622 {
13623
13624         /* pthread test function */
13625 #ifndef PTHREAD_CREATE_DETACHED
13626 #define PTHREAD_CREATE_DETACHED 1
13627 #endif
13628         pthread_t t;
13629         int status;
13630         int detach = PTHREAD_CREATE_DETACHED;
13631
13632 #if HAVE_PTHREADS > 4
13633         /* Final pthreads */
13634         pthread_attr_t attr;
13635
13636         status = pthread_attr_init(&attr);
13637         if( status ) return status;
13638
13639 #if HAVE_PTHREADS < 7
13640         status = pthread_attr_setdetachstate(&attr, &detach);
13641         if( status < 0 ) status = errno;
13642 #else
13643         status = pthread_attr_setdetachstate(&attr, detach);
13644 #endif
13645         if( status ) return status;
13646         status = pthread_create( &t, &attr, task, NULL );
13647 #if HAVE_PTHREADS < 7
13648         if( status < 0 ) status = errno;
13649 #endif
13650         if( status ) return status;
13651 #else
13652         /* Draft 4 pthreads */
13653         status = pthread_create( &t, pthread_attr_default, task, NULL );
13654         if( status ) return errno;
13655
13656         /* give thread a chance to complete */
13657         /* it should remain joinable and hence detachable */
13658         sleep( 1 );
13659
13660         status = pthread_detach( &t );
13661         if( status ) return errno;
13662 #endif
13663
13664 #ifdef HAVE_LINUX_THREADS
13665         pthread_kill_other_threads_np();
13666 #endif
13667
13668         return 0;
13669
13670 }
13671
13672 EOF
13673 if { (eval echo configure:13674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13674 then
13675   ol_cv_pthread_lc_r=yes
13676 else
13677   echo "configure: failed program was:" >&5
13678   cat conftest.$ac_ext >&5
13679   rm -fr conftest*
13680   ol_cv_pthread_lc_r=no
13681 fi
13682 rm -fr conftest*
13683 fi
13684
13685
13686                 # restore the LIBS
13687                 LIBS="$ol_LIBS"
13688         
13689 fi
13690
13691 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13692
13693         if test $ol_cv_pthread_lc_r = yes ; then
13694                 ol_link_pthreads="-lc_r"
13695                 ol_link_threads=posix
13696         fi
13697 fi
13698
13699
13700                 # Pthread try link: -threads (ol_cv_pthread_threads)
13701 if test "$ol_link_threads" = no ; then
13702         # try -threads
13703         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13704 echo "configure:13705: checking for pthread link with -threads" >&5
13705 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13706   echo $ac_n "(cached) $ac_c" 1>&6
13707 else
13708   
13709                 # save the flags
13710                 ol_LIBS="$LIBS"
13711                 LIBS="-threads $LIBS"
13712
13713                 if test "$cross_compiling" = yes; then
13714   cat > conftest.$ac_ext <<EOF
13715 #line 13716 "configure"
13716 #include "confdefs.h"
13717 /* pthread test headers */
13718 #include <pthread.h>
13719 #if HAVE_PTHREADS < 7
13720 #include <errno.h>
13721 #endif
13722 #ifndef NULL
13723 #define NULL (void*)0
13724 #endif
13725
13726 static void *task(p)
13727         void *p;
13728 {
13729         return (void *) (p == NULL);
13730 }
13731
13732 int main() {
13733
13734         /* pthread test function */
13735 #ifndef PTHREAD_CREATE_DETACHED
13736 #define PTHREAD_CREATE_DETACHED 1
13737 #endif
13738         pthread_t t;
13739         int status;
13740         int detach = PTHREAD_CREATE_DETACHED;
13741
13742 #if HAVE_PTHREADS > 4
13743         /* Final pthreads */
13744         pthread_attr_t attr;
13745
13746         status = pthread_attr_init(&attr);
13747         if( status ) return status;
13748
13749 #if HAVE_PTHREADS < 7
13750         status = pthread_attr_setdetachstate(&attr, &detach);
13751         if( status < 0 ) status = errno;
13752 #else
13753         status = pthread_attr_setdetachstate(&attr, detach);
13754 #endif
13755         if( status ) return status;
13756         status = pthread_create( &t, &attr, task, NULL );
13757 #if HAVE_PTHREADS < 7
13758         if( status < 0 ) status = errno;
13759 #endif
13760         if( status ) return status;
13761 #else
13762         /* Draft 4 pthreads */
13763         status = pthread_create( &t, pthread_attr_default, task, NULL );
13764         if( status ) return errno;
13765
13766         /* give thread a chance to complete */
13767         /* it should remain joinable and hence detachable */
13768         sleep( 1 );
13769
13770         status = pthread_detach( &t );
13771         if( status ) return errno;
13772 #endif
13773
13774 #ifdef HAVE_LINUX_THREADS
13775         pthread_kill_other_threads_np();
13776 #endif
13777
13778         return 0;
13779
13780 ; return 0; }
13781 EOF
13782 if { (eval echo configure:13783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13783   rm -rf conftest*
13784   ol_cv_pthread_threads=yes
13785 else
13786   echo "configure: failed program was:" >&5
13787   cat conftest.$ac_ext >&5
13788   rm -rf conftest*
13789   ol_cv_pthread_threads=no
13790 fi
13791 rm -f conftest*
13792 else
13793   cat > conftest.$ac_ext <<EOF
13794 #line 13795 "configure"
13795 #include "confdefs.h"
13796 /* pthread test headers */
13797 #include <pthread.h>
13798 #if HAVE_PTHREADS < 7
13799 #include <errno.h>
13800 #endif
13801 #ifndef NULL
13802 #define NULL (void*)0
13803 #endif
13804
13805 static void *task(p)
13806         void *p;
13807 {
13808         return (void *) (p == NULL);
13809 }
13810
13811
13812 int main(argc, argv)
13813         int argc;
13814         char **argv;
13815 {
13816
13817         /* pthread test function */
13818 #ifndef PTHREAD_CREATE_DETACHED
13819 #define PTHREAD_CREATE_DETACHED 1
13820 #endif
13821         pthread_t t;
13822         int status;
13823         int detach = PTHREAD_CREATE_DETACHED;
13824
13825 #if HAVE_PTHREADS > 4
13826         /* Final pthreads */
13827         pthread_attr_t attr;
13828
13829         status = pthread_attr_init(&attr);
13830         if( status ) return status;
13831
13832 #if HAVE_PTHREADS < 7
13833         status = pthread_attr_setdetachstate(&attr, &detach);
13834         if( status < 0 ) status = errno;
13835 #else
13836         status = pthread_attr_setdetachstate(&attr, detach);
13837 #endif
13838         if( status ) return status;
13839         status = pthread_create( &t, &attr, task, NULL );
13840 #if HAVE_PTHREADS < 7
13841         if( status < 0 ) status = errno;
13842 #endif
13843         if( status ) return status;
13844 #else
13845         /* Draft 4 pthreads */
13846         status = pthread_create( &t, pthread_attr_default, task, NULL );
13847         if( status ) return errno;
13848
13849         /* give thread a chance to complete */
13850         /* it should remain joinable and hence detachable */
13851         sleep( 1 );
13852
13853         status = pthread_detach( &t );
13854         if( status ) return errno;
13855 #endif
13856
13857 #ifdef HAVE_LINUX_THREADS
13858         pthread_kill_other_threads_np();
13859 #endif
13860
13861         return 0;
13862
13863 }
13864
13865 EOF
13866 if { (eval echo configure:13867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13867 then
13868   ol_cv_pthread_threads=yes
13869 else
13870   echo "configure: failed program was:" >&5
13871   cat conftest.$ac_ext >&5
13872   rm -fr conftest*
13873   ol_cv_pthread_threads=no
13874 fi
13875 rm -fr conftest*
13876 fi
13877
13878
13879                 # restore the LIBS
13880                 LIBS="$ol_LIBS"
13881         
13882 fi
13883
13884 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13885
13886         if test $ol_cv_pthread_threads = yes ; then
13887                 ol_link_pthreads="-threads"
13888                 ol_link_threads=posix
13889         fi
13890 fi
13891
13892
13893                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13894 if test "$ol_link_threads" = no ; then
13895         # try -lpthreads -lmach -lexc -lc_r
13896         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13897 echo "configure:13898: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13898 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13899   echo $ac_n "(cached) $ac_c" 1>&6
13900 else
13901   
13902                 # save the flags
13903                 ol_LIBS="$LIBS"
13904                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13905
13906                 if test "$cross_compiling" = yes; then
13907   cat > conftest.$ac_ext <<EOF
13908 #line 13909 "configure"
13909 #include "confdefs.h"
13910 /* pthread test headers */
13911 #include <pthread.h>
13912 #if HAVE_PTHREADS < 7
13913 #include <errno.h>
13914 #endif
13915 #ifndef NULL
13916 #define NULL (void*)0
13917 #endif
13918
13919 static void *task(p)
13920         void *p;
13921 {
13922         return (void *) (p == NULL);
13923 }
13924
13925 int main() {
13926
13927         /* pthread test function */
13928 #ifndef PTHREAD_CREATE_DETACHED
13929 #define PTHREAD_CREATE_DETACHED 1
13930 #endif
13931         pthread_t t;
13932         int status;
13933         int detach = PTHREAD_CREATE_DETACHED;
13934
13935 #if HAVE_PTHREADS > 4
13936         /* Final pthreads */
13937         pthread_attr_t attr;
13938
13939         status = pthread_attr_init(&attr);
13940         if( status ) return status;
13941
13942 #if HAVE_PTHREADS < 7
13943         status = pthread_attr_setdetachstate(&attr, &detach);
13944         if( status < 0 ) status = errno;
13945 #else
13946         status = pthread_attr_setdetachstate(&attr, detach);
13947 #endif
13948         if( status ) return status;
13949         status = pthread_create( &t, &attr, task, NULL );
13950 #if HAVE_PTHREADS < 7
13951         if( status < 0 ) status = errno;
13952 #endif
13953         if( status ) return status;
13954 #else
13955         /* Draft 4 pthreads */
13956         status = pthread_create( &t, pthread_attr_default, task, NULL );
13957         if( status ) return errno;
13958
13959         /* give thread a chance to complete */
13960         /* it should remain joinable and hence detachable */
13961         sleep( 1 );
13962
13963         status = pthread_detach( &t );
13964         if( status ) return errno;
13965 #endif
13966
13967 #ifdef HAVE_LINUX_THREADS
13968         pthread_kill_other_threads_np();
13969 #endif
13970
13971         return 0;
13972
13973 ; return 0; }
13974 EOF
13975 if { (eval echo configure:13976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13976   rm -rf conftest*
13977   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13978 else
13979   echo "configure: failed program was:" >&5
13980   cat conftest.$ac_ext >&5
13981   rm -rf conftest*
13982   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13983 fi
13984 rm -f conftest*
13985 else
13986   cat > conftest.$ac_ext <<EOF
13987 #line 13988 "configure"
13988 #include "confdefs.h"
13989 /* pthread test headers */
13990 #include <pthread.h>
13991 #if HAVE_PTHREADS < 7
13992 #include <errno.h>
13993 #endif
13994 #ifndef NULL
13995 #define NULL (void*)0
13996 #endif
13997
13998 static void *task(p)
13999         void *p;
14000 {
14001         return (void *) (p == NULL);
14002 }
14003
14004
14005 int main(argc, argv)
14006         int argc;
14007         char **argv;
14008 {
14009
14010         /* pthread test function */
14011 #ifndef PTHREAD_CREATE_DETACHED
14012 #define PTHREAD_CREATE_DETACHED 1
14013 #endif
14014         pthread_t t;
14015         int status;
14016         int detach = PTHREAD_CREATE_DETACHED;
14017
14018 #if HAVE_PTHREADS > 4
14019         /* Final pthreads */
14020         pthread_attr_t attr;
14021
14022         status = pthread_attr_init(&attr);
14023         if( status ) return status;
14024
14025 #if HAVE_PTHREADS < 7
14026         status = pthread_attr_setdetachstate(&attr, &detach);
14027         if( status < 0 ) status = errno;
14028 #else
14029         status = pthread_attr_setdetachstate(&attr, detach);
14030 #endif
14031         if( status ) return status;
14032         status = pthread_create( &t, &attr, task, NULL );
14033 #if HAVE_PTHREADS < 7
14034         if( status < 0 ) status = errno;
14035 #endif
14036         if( status ) return status;
14037 #else
14038         /* Draft 4 pthreads */
14039         status = pthread_create( &t, pthread_attr_default, task, NULL );
14040         if( status ) return errno;
14041
14042         /* give thread a chance to complete */
14043         /* it should remain joinable and hence detachable */
14044         sleep( 1 );
14045
14046         status = pthread_detach( &t );
14047         if( status ) return errno;
14048 #endif
14049
14050 #ifdef HAVE_LINUX_THREADS
14051         pthread_kill_other_threads_np();
14052 #endif
14053
14054         return 0;
14055
14056 }
14057
14058 EOF
14059 if { (eval echo configure:14060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14060 then
14061   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14062 else
14063   echo "configure: failed program was:" >&5
14064   cat conftest.$ac_ext >&5
14065   rm -fr conftest*
14066   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14067 fi
14068 rm -fr conftest*
14069 fi
14070
14071
14072                 # restore the LIBS
14073                 LIBS="$ol_LIBS"
14074         
14075 fi
14076
14077 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14078
14079         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14080                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14081                 ol_link_threads=posix
14082         fi
14083 fi
14084
14085                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14086 if test "$ol_link_threads" = no ; then
14087         # try -lpthreads -lmach -lexc
14088         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14089 echo "configure:14090: checking for pthread link with -lpthreads -lmach -lexc" >&5
14090 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14091   echo $ac_n "(cached) $ac_c" 1>&6
14092 else
14093   
14094                 # save the flags
14095                 ol_LIBS="$LIBS"
14096                 LIBS="-lpthreads -lmach -lexc $LIBS"
14097
14098                 if test "$cross_compiling" = yes; then
14099   cat > conftest.$ac_ext <<EOF
14100 #line 14101 "configure"
14101 #include "confdefs.h"
14102 /* pthread test headers */
14103 #include <pthread.h>
14104 #if HAVE_PTHREADS < 7
14105 #include <errno.h>
14106 #endif
14107 #ifndef NULL
14108 #define NULL (void*)0
14109 #endif
14110
14111 static void *task(p)
14112         void *p;
14113 {
14114         return (void *) (p == NULL);
14115 }
14116
14117 int main() {
14118
14119         /* pthread test function */
14120 #ifndef PTHREAD_CREATE_DETACHED
14121 #define PTHREAD_CREATE_DETACHED 1
14122 #endif
14123         pthread_t t;
14124         int status;
14125         int detach = PTHREAD_CREATE_DETACHED;
14126
14127 #if HAVE_PTHREADS > 4
14128         /* Final pthreads */
14129         pthread_attr_t attr;
14130
14131         status = pthread_attr_init(&attr);
14132         if( status ) return status;
14133
14134 #if HAVE_PTHREADS < 7
14135         status = pthread_attr_setdetachstate(&attr, &detach);
14136         if( status < 0 ) status = errno;
14137 #else
14138         status = pthread_attr_setdetachstate(&attr, detach);
14139 #endif
14140         if( status ) return status;
14141         status = pthread_create( &t, &attr, task, NULL );
14142 #if HAVE_PTHREADS < 7
14143         if( status < 0 ) status = errno;
14144 #endif
14145         if( status ) return status;
14146 #else
14147         /* Draft 4 pthreads */
14148         status = pthread_create( &t, pthread_attr_default, task, NULL );
14149         if( status ) return errno;
14150
14151         /* give thread a chance to complete */
14152         /* it should remain joinable and hence detachable */
14153         sleep( 1 );
14154
14155         status = pthread_detach( &t );
14156         if( status ) return errno;
14157 #endif
14158
14159 #ifdef HAVE_LINUX_THREADS
14160         pthread_kill_other_threads_np();
14161 #endif
14162
14163         return 0;
14164
14165 ; return 0; }
14166 EOF
14167 if { (eval echo configure:14168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14168   rm -rf conftest*
14169   ol_cv_pthread_lpthreads_lmach_lexc=yes
14170 else
14171   echo "configure: failed program was:" >&5
14172   cat conftest.$ac_ext >&5
14173   rm -rf conftest*
14174   ol_cv_pthread_lpthreads_lmach_lexc=no
14175 fi
14176 rm -f conftest*
14177 else
14178   cat > conftest.$ac_ext <<EOF
14179 #line 14180 "configure"
14180 #include "confdefs.h"
14181 /* pthread test headers */
14182 #include <pthread.h>
14183 #if HAVE_PTHREADS < 7
14184 #include <errno.h>
14185 #endif
14186 #ifndef NULL
14187 #define NULL (void*)0
14188 #endif
14189
14190 static void *task(p)
14191         void *p;
14192 {
14193         return (void *) (p == NULL);
14194 }
14195
14196
14197 int main(argc, argv)
14198         int argc;
14199         char **argv;
14200 {
14201
14202         /* pthread test function */
14203 #ifndef PTHREAD_CREATE_DETACHED
14204 #define PTHREAD_CREATE_DETACHED 1
14205 #endif
14206         pthread_t t;
14207         int status;
14208         int detach = PTHREAD_CREATE_DETACHED;
14209
14210 #if HAVE_PTHREADS > 4
14211         /* Final pthreads */
14212         pthread_attr_t attr;
14213
14214         status = pthread_attr_init(&attr);
14215         if( status ) return status;
14216
14217 #if HAVE_PTHREADS < 7
14218         status = pthread_attr_setdetachstate(&attr, &detach);
14219         if( status < 0 ) status = errno;
14220 #else
14221         status = pthread_attr_setdetachstate(&attr, detach);
14222 #endif
14223         if( status ) return status;
14224         status = pthread_create( &t, &attr, task, NULL );
14225 #if HAVE_PTHREADS < 7
14226         if( status < 0 ) status = errno;
14227 #endif
14228         if( status ) return status;
14229 #else
14230         /* Draft 4 pthreads */
14231         status = pthread_create( &t, pthread_attr_default, task, NULL );
14232         if( status ) return errno;
14233
14234         /* give thread a chance to complete */
14235         /* it should remain joinable and hence detachable */
14236         sleep( 1 );
14237
14238         status = pthread_detach( &t );
14239         if( status ) return errno;
14240 #endif
14241
14242 #ifdef HAVE_LINUX_THREADS
14243         pthread_kill_other_threads_np();
14244 #endif
14245
14246         return 0;
14247
14248 }
14249
14250 EOF
14251 if { (eval echo configure:14252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14252 then
14253   ol_cv_pthread_lpthreads_lmach_lexc=yes
14254 else
14255   echo "configure: failed program was:" >&5
14256   cat conftest.$ac_ext >&5
14257   rm -fr conftest*
14258   ol_cv_pthread_lpthreads_lmach_lexc=no
14259 fi
14260 rm -fr conftest*
14261 fi
14262
14263
14264                 # restore the LIBS
14265                 LIBS="$ol_LIBS"
14266         
14267 fi
14268
14269 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14270
14271         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14272                 ol_link_pthreads="-lpthreads -lmach -lexc"
14273                 ol_link_threads=posix
14274         fi
14275 fi
14276
14277                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14278 if test "$ol_link_threads" = no ; then
14279         # try -lpthreads -lexc
14280         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14281 echo "configure:14282: checking for pthread link with -lpthreads -lexc" >&5
14282 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14283   echo $ac_n "(cached) $ac_c" 1>&6
14284 else
14285   
14286                 # save the flags
14287                 ol_LIBS="$LIBS"
14288                 LIBS="-lpthreads -lexc $LIBS"
14289
14290                 if test "$cross_compiling" = yes; then
14291   cat > conftest.$ac_ext <<EOF
14292 #line 14293 "configure"
14293 #include "confdefs.h"
14294 /* pthread test headers */
14295 #include <pthread.h>
14296 #if HAVE_PTHREADS < 7
14297 #include <errno.h>
14298 #endif
14299 #ifndef NULL
14300 #define NULL (void*)0
14301 #endif
14302
14303 static void *task(p)
14304         void *p;
14305 {
14306         return (void *) (p == NULL);
14307 }
14308
14309 int main() {
14310
14311         /* pthread test function */
14312 #ifndef PTHREAD_CREATE_DETACHED
14313 #define PTHREAD_CREATE_DETACHED 1
14314 #endif
14315         pthread_t t;
14316         int status;
14317         int detach = PTHREAD_CREATE_DETACHED;
14318
14319 #if HAVE_PTHREADS > 4
14320         /* Final pthreads */
14321         pthread_attr_t attr;
14322
14323         status = pthread_attr_init(&attr);
14324         if( status ) return status;
14325
14326 #if HAVE_PTHREADS < 7
14327         status = pthread_attr_setdetachstate(&attr, &detach);
14328         if( status < 0 ) status = errno;
14329 #else
14330         status = pthread_attr_setdetachstate(&attr, detach);
14331 #endif
14332         if( status ) return status;
14333         status = pthread_create( &t, &attr, task, NULL );
14334 #if HAVE_PTHREADS < 7
14335         if( status < 0 ) status = errno;
14336 #endif
14337         if( status ) return status;
14338 #else
14339         /* Draft 4 pthreads */
14340         status = pthread_create( &t, pthread_attr_default, task, NULL );
14341         if( status ) return errno;
14342
14343         /* give thread a chance to complete */
14344         /* it should remain joinable and hence detachable */
14345         sleep( 1 );
14346
14347         status = pthread_detach( &t );
14348         if( status ) return errno;
14349 #endif
14350
14351 #ifdef HAVE_LINUX_THREADS
14352         pthread_kill_other_threads_np();
14353 #endif
14354
14355         return 0;
14356
14357 ; return 0; }
14358 EOF
14359 if { (eval echo configure:14360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14360   rm -rf conftest*
14361   ol_cv_pthread_lpthreads_lexc=yes
14362 else
14363   echo "configure: failed program was:" >&5
14364   cat conftest.$ac_ext >&5
14365   rm -rf conftest*
14366   ol_cv_pthread_lpthreads_lexc=no
14367 fi
14368 rm -f conftest*
14369 else
14370   cat > conftest.$ac_ext <<EOF
14371 #line 14372 "configure"
14372 #include "confdefs.h"
14373 /* pthread test headers */
14374 #include <pthread.h>
14375 #if HAVE_PTHREADS < 7
14376 #include <errno.h>
14377 #endif
14378 #ifndef NULL
14379 #define NULL (void*)0
14380 #endif
14381
14382 static void *task(p)
14383         void *p;
14384 {
14385         return (void *) (p == NULL);
14386 }
14387
14388
14389 int main(argc, argv)
14390         int argc;
14391         char **argv;
14392 {
14393
14394         /* pthread test function */
14395 #ifndef PTHREAD_CREATE_DETACHED
14396 #define PTHREAD_CREATE_DETACHED 1
14397 #endif
14398         pthread_t t;
14399         int status;
14400         int detach = PTHREAD_CREATE_DETACHED;
14401
14402 #if HAVE_PTHREADS > 4
14403         /* Final pthreads */
14404         pthread_attr_t attr;
14405
14406         status = pthread_attr_init(&attr);
14407         if( status ) return status;
14408
14409 #if HAVE_PTHREADS < 7
14410         status = pthread_attr_setdetachstate(&attr, &detach);
14411         if( status < 0 ) status = errno;
14412 #else
14413         status = pthread_attr_setdetachstate(&attr, detach);
14414 #endif
14415         if( status ) return status;
14416         status = pthread_create( &t, &attr, task, NULL );
14417 #if HAVE_PTHREADS < 7
14418         if( status < 0 ) status = errno;
14419 #endif
14420         if( status ) return status;
14421 #else
14422         /* Draft 4 pthreads */
14423         status = pthread_create( &t, pthread_attr_default, task, NULL );
14424         if( status ) return errno;
14425
14426         /* give thread a chance to complete */
14427         /* it should remain joinable and hence detachable */
14428         sleep( 1 );
14429
14430         status = pthread_detach( &t );
14431         if( status ) return errno;
14432 #endif
14433
14434 #ifdef HAVE_LINUX_THREADS
14435         pthread_kill_other_threads_np();
14436 #endif
14437
14438         return 0;
14439
14440 }
14441
14442 EOF
14443 if { (eval echo configure:14444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14444 then
14445   ol_cv_pthread_lpthreads_lexc=yes
14446 else
14447   echo "configure: failed program was:" >&5
14448   cat conftest.$ac_ext >&5
14449   rm -fr conftest*
14450   ol_cv_pthread_lpthreads_lexc=no
14451 fi
14452 rm -fr conftest*
14453 fi
14454
14455
14456                 # restore the LIBS
14457                 LIBS="$ol_LIBS"
14458         
14459 fi
14460
14461 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14462
14463         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14464                 ol_link_pthreads="-lpthreads -lexc"
14465                 ol_link_threads=posix
14466         fi
14467 fi
14468
14469
14470                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14471 if test "$ol_link_threads" = no ; then
14472         # try -lpthreads
14473         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14474 echo "configure:14475: checking for pthread link with -lpthreads" >&5
14475 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14476   echo $ac_n "(cached) $ac_c" 1>&6
14477 else
14478   
14479                 # save the flags
14480                 ol_LIBS="$LIBS"
14481                 LIBS="-lpthreads $LIBS"
14482
14483                 if test "$cross_compiling" = yes; then
14484   cat > conftest.$ac_ext <<EOF
14485 #line 14486 "configure"
14486 #include "confdefs.h"
14487 /* pthread test headers */
14488 #include <pthread.h>
14489 #if HAVE_PTHREADS < 7
14490 #include <errno.h>
14491 #endif
14492 #ifndef NULL
14493 #define NULL (void*)0
14494 #endif
14495
14496 static void *task(p)
14497         void *p;
14498 {
14499         return (void *) (p == NULL);
14500 }
14501
14502 int main() {
14503
14504         /* pthread test function */
14505 #ifndef PTHREAD_CREATE_DETACHED
14506 #define PTHREAD_CREATE_DETACHED 1
14507 #endif
14508         pthread_t t;
14509         int status;
14510         int detach = PTHREAD_CREATE_DETACHED;
14511
14512 #if HAVE_PTHREADS > 4
14513         /* Final pthreads */
14514         pthread_attr_t attr;
14515
14516         status = pthread_attr_init(&attr);
14517         if( status ) return status;
14518
14519 #if HAVE_PTHREADS < 7
14520         status = pthread_attr_setdetachstate(&attr, &detach);
14521         if( status < 0 ) status = errno;
14522 #else
14523         status = pthread_attr_setdetachstate(&attr, detach);
14524 #endif
14525         if( status ) return status;
14526         status = pthread_create( &t, &attr, task, NULL );
14527 #if HAVE_PTHREADS < 7
14528         if( status < 0 ) status = errno;
14529 #endif
14530         if( status ) return status;
14531 #else
14532         /* Draft 4 pthreads */
14533         status = pthread_create( &t, pthread_attr_default, task, NULL );
14534         if( status ) return errno;
14535
14536         /* give thread a chance to complete */
14537         /* it should remain joinable and hence detachable */
14538         sleep( 1 );
14539
14540         status = pthread_detach( &t );
14541         if( status ) return errno;
14542 #endif
14543
14544 #ifdef HAVE_LINUX_THREADS
14545         pthread_kill_other_threads_np();
14546 #endif
14547
14548         return 0;
14549
14550 ; return 0; }
14551 EOF
14552 if { (eval echo configure:14553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14553   rm -rf conftest*
14554   ol_cv_pthread_lib_lpthreads=yes
14555 else
14556   echo "configure: failed program was:" >&5
14557   cat conftest.$ac_ext >&5
14558   rm -rf conftest*
14559   ol_cv_pthread_lib_lpthreads=no
14560 fi
14561 rm -f conftest*
14562 else
14563   cat > conftest.$ac_ext <<EOF
14564 #line 14565 "configure"
14565 #include "confdefs.h"
14566 /* pthread test headers */
14567 #include <pthread.h>
14568 #if HAVE_PTHREADS < 7
14569 #include <errno.h>
14570 #endif
14571 #ifndef NULL
14572 #define NULL (void*)0
14573 #endif
14574
14575 static void *task(p)
14576         void *p;
14577 {
14578         return (void *) (p == NULL);
14579 }
14580
14581
14582 int main(argc, argv)
14583         int argc;
14584         char **argv;
14585 {
14586
14587         /* pthread test function */
14588 #ifndef PTHREAD_CREATE_DETACHED
14589 #define PTHREAD_CREATE_DETACHED 1
14590 #endif
14591         pthread_t t;
14592         int status;
14593         int detach = PTHREAD_CREATE_DETACHED;
14594
14595 #if HAVE_PTHREADS > 4
14596         /* Final pthreads */
14597         pthread_attr_t attr;
14598
14599         status = pthread_attr_init(&attr);
14600         if( status ) return status;
14601
14602 #if HAVE_PTHREADS < 7
14603         status = pthread_attr_setdetachstate(&attr, &detach);
14604         if( status < 0 ) status = errno;
14605 #else
14606         status = pthread_attr_setdetachstate(&attr, detach);
14607 #endif
14608         if( status ) return status;
14609         status = pthread_create( &t, &attr, task, NULL );
14610 #if HAVE_PTHREADS < 7
14611         if( status < 0 ) status = errno;
14612 #endif
14613         if( status ) return status;
14614 #else
14615         /* Draft 4 pthreads */
14616         status = pthread_create( &t, pthread_attr_default, task, NULL );
14617         if( status ) return errno;
14618
14619         /* give thread a chance to complete */
14620         /* it should remain joinable and hence detachable */
14621         sleep( 1 );
14622
14623         status = pthread_detach( &t );
14624         if( status ) return errno;
14625 #endif
14626
14627 #ifdef HAVE_LINUX_THREADS
14628         pthread_kill_other_threads_np();
14629 #endif
14630
14631         return 0;
14632
14633 }
14634
14635 EOF
14636 if { (eval echo configure:14637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14637 then
14638   ol_cv_pthread_lib_lpthreads=yes
14639 else
14640   echo "configure: failed program was:" >&5
14641   cat conftest.$ac_ext >&5
14642   rm -fr conftest*
14643   ol_cv_pthread_lib_lpthreads=no
14644 fi
14645 rm -fr conftest*
14646 fi
14647
14648
14649                 # restore the LIBS
14650                 LIBS="$ol_LIBS"
14651         
14652 fi
14653
14654 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14655
14656         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14657                 ol_link_pthreads="-lpthreads"
14658                 ol_link_threads=posix
14659         fi
14660 fi
14661
14662
14663                 if test $ol_link_threads != no ; then
14664                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14665
14666                                                 save_CPPFLAGS="$CPPFLAGS"
14667                         save_LIBS="$LIBS"
14668                         LIBS="$LTHREAD_LIBS $LIBS"
14669
14670                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14671 do
14672 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14673 echo "configure:14674: checking for $ac_func" >&5
14674 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14675   echo $ac_n "(cached) $ac_c" 1>&6
14676 else
14677   cat > conftest.$ac_ext <<EOF
14678 #line 14679 "configure"
14679 #include "confdefs.h"
14680 /* System header to define __stub macros and hopefully few prototypes,
14681     which can conflict with char $ac_func(); below.  */
14682 #include <assert.h>
14683 /* Override any gcc2 internal prototype to avoid an error.  */
14684 /* We use char because int might match the return type of a gcc2
14685     builtin and then its argument prototype would still apply.  */
14686 char $ac_func();
14687 char (*f)();
14688
14689 int main() {
14690
14691 /* The GNU C library defines this for functions which it implements
14692     to always fail with ENOSYS.  Some functions are actually named
14693     something starting with __ and the normal name is an alias.  */
14694 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14695 choke me
14696 #else
14697 f = $ac_func;
14698 #endif
14699
14700 ; return 0; }
14701 EOF
14702 if { (eval echo configure:14703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14703   rm -rf conftest*
14704   eval "ac_cv_func_$ac_func=yes"
14705 else
14706   echo "configure: failed program was:" >&5
14707   cat conftest.$ac_ext >&5
14708   rm -rf conftest*
14709   eval "ac_cv_func_$ac_func=no"
14710 fi
14711 rm -f conftest*
14712 fi
14713
14714 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14715   echo "$ac_t""yes" 1>&6
14716     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14717   cat >> confdefs.h <<EOF
14718 #define $ac_tr_func 1
14719 EOF
14720  
14721 else
14722   echo "$ac_t""no" 1>&6
14723 fi
14724 done
14725
14726
14727                         if test $ac_cv_func_sched_yield = no -a \
14728                                 $ac_cv_func_pthread_yield = no -a \
14729                                 $ac_cv_func_thr_yield = no ; then
14730                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14731 echo "configure:14732: checking for sched_yield in -lrt" >&5
14732 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14733 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14734   echo $ac_n "(cached) $ac_c" 1>&6
14735 else
14736   ac_save_LIBS="$LIBS"
14737 LIBS="-lrt  $LIBS"
14738 cat > conftest.$ac_ext <<EOF
14739 #line 14740 "configure"
14740 #include "confdefs.h"
14741 /* Override any gcc2 internal prototype to avoid an error.  */
14742 /* We use char because int might match the return type of a gcc2
14743     builtin and then its argument prototype would still apply.  */
14744 char sched_yield();
14745
14746 int main() {
14747 sched_yield()
14748 ; return 0; }
14749 EOF
14750 if { (eval echo configure:14751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14751   rm -rf conftest*
14752   eval "ac_cv_lib_$ac_lib_var=yes"
14753 else
14754   echo "configure: failed program was:" >&5
14755   cat conftest.$ac_ext >&5
14756   rm -rf conftest*
14757   eval "ac_cv_lib_$ac_lib_var=no"
14758 fi
14759 rm -f conftest*
14760 LIBS="$ac_save_LIBS"
14761
14762 fi
14763 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14764   echo "$ac_t""yes" 1>&6
14765   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14766                                         cat >> confdefs.h <<\EOF
14767 #define HAVE_SCHED_YIELD 1
14768 EOF
14769
14770                                         ac_cv_func_sched_yield=yes
14771 else
14772   echo "$ac_t""no" 1>&6
14773 ac_cv_func_sched_yield=no
14774 fi
14775
14776                         fi
14777                         if test $ac_cv_func_sched_yield = no -a \
14778                                 $ac_cv_func_pthread_yield = no -a \
14779                                 "$ac_cv_func_thr_yield" = no ; then
14780                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14781                         fi
14782
14783                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14784 do
14785 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14786 echo "configure:14787: checking for $ac_func" >&5
14787 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14788   echo $ac_n "(cached) $ac_c" 1>&6
14789 else
14790   cat > conftest.$ac_ext <<EOF
14791 #line 14792 "configure"
14792 #include "confdefs.h"
14793 /* System header to define __stub macros and hopefully few prototypes,
14794     which can conflict with char $ac_func(); below.  */
14795 #include <assert.h>
14796 /* Override any gcc2 internal prototype to avoid an error.  */
14797 /* We use char because int might match the return type of a gcc2
14798     builtin and then its argument prototype would still apply.  */
14799 char $ac_func();
14800 char (*f)();
14801
14802 int main() {
14803
14804 /* The GNU C library defines this for functions which it implements
14805     to always fail with ENOSYS.  Some functions are actually named
14806     something starting with __ and the normal name is an alias.  */
14807 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14808 choke me
14809 #else
14810 f = $ac_func;
14811 #endif
14812
14813 ; return 0; }
14814 EOF
14815 if { (eval echo configure:14816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14816   rm -rf conftest*
14817   eval "ac_cv_func_$ac_func=yes"
14818 else
14819   echo "configure: failed program was:" >&5
14820   cat conftest.$ac_ext >&5
14821   rm -rf conftest*
14822   eval "ac_cv_func_$ac_func=no"
14823 fi
14824 rm -f conftest*
14825 fi
14826
14827 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14828   echo "$ac_t""yes" 1>&6
14829     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14830   cat >> confdefs.h <<EOF
14831 #define $ac_tr_func 1
14832 EOF
14833  
14834 else
14835   echo "$ac_t""no" 1>&6
14836 fi
14837 done
14838
14839
14840                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14841 echo "configure:14842: checking for pthread_detach with <pthread.h>" >&5
14842 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14843   echo $ac_n "(cached) $ac_c" 1>&6
14844 else
14845   
14846                                                                 cat > conftest.$ac_ext <<EOF
14847 #line 14848 "configure"
14848 #include "confdefs.h"
14849
14850 #include <pthread.h>
14851 #ifndef NULL
14852 #define NULL (void*)0
14853 #endif
14854
14855 int main() {
14856 pthread_detach(NULL);
14857 ; return 0; }
14858 EOF
14859 if { (eval echo configure:14860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14860   rm -rf conftest*
14861   ol_cv_func_pthread_detach=yes
14862 else
14863   echo "configure: failed program was:" >&5
14864   cat conftest.$ac_ext >&5
14865   rm -rf conftest*
14866   ol_cv_func_pthread_detach=no
14867 fi
14868 rm -f conftest*
14869                         
14870 fi
14871
14872 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14873
14874                         if test $ol_cv_func_pthread_detach = no ; then
14875                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14876                         fi
14877
14878                         cat >> confdefs.h <<\EOF
14879 #define HAVE_PTHREAD_DETACH 1
14880 EOF
14881
14882
14883                                                 for ac_func in \
14884                                 pthread_setconcurrency \
14885                                 pthread_getconcurrency \
14886                                 thr_setconcurrency \
14887                                 thr_getconcurrency \
14888                         
14889 do
14890 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14891 echo "configure:14892: checking for $ac_func" >&5
14892 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14893   echo $ac_n "(cached) $ac_c" 1>&6
14894 else
14895   cat > conftest.$ac_ext <<EOF
14896 #line 14897 "configure"
14897 #include "confdefs.h"
14898 /* System header to define __stub macros and hopefully few prototypes,
14899     which can conflict with char $ac_func(); below.  */
14900 #include <assert.h>
14901 /* Override any gcc2 internal prototype to avoid an error.  */
14902 /* We use char because int might match the return type of a gcc2
14903     builtin and then its argument prototype would still apply.  */
14904 char $ac_func();
14905 char (*f)();
14906
14907 int main() {
14908
14909 /* The GNU C library defines this for functions which it implements
14910     to always fail with ENOSYS.  Some functions are actually named
14911     something starting with __ and the normal name is an alias.  */
14912 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14913 choke me
14914 #else
14915 f = $ac_func;
14916 #endif
14917
14918 ; return 0; }
14919 EOF
14920 if { (eval echo configure:14921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14921   rm -rf conftest*
14922   eval "ac_cv_func_$ac_func=yes"
14923 else
14924   echo "configure: failed program was:" >&5
14925   cat conftest.$ac_ext >&5
14926   rm -rf conftest*
14927   eval "ac_cv_func_$ac_func=no"
14928 fi
14929 rm -f conftest*
14930 fi
14931
14932 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14933   echo "$ac_t""yes" 1>&6
14934     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14935   cat >> confdefs.h <<EOF
14936 #define $ac_tr_func 1
14937 EOF
14938  
14939 else
14940   echo "$ac_t""no" 1>&6
14941 fi
14942 done
14943
14944
14945                         
14946         for ac_func in pthread_kill_other_threads_np
14947 do
14948 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14949 echo "configure:14950: checking for $ac_func" >&5
14950 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14951   echo $ac_n "(cached) $ac_c" 1>&6
14952 else
14953   cat > conftest.$ac_ext <<EOF
14954 #line 14955 "configure"
14955 #include "confdefs.h"
14956 /* System header to define __stub macros and hopefully few prototypes,
14957     which can conflict with char $ac_func(); below.  */
14958 #include <assert.h>
14959 /* Override any gcc2 internal prototype to avoid an error.  */
14960 /* We use char because int might match the return type of a gcc2
14961     builtin and then its argument prototype would still apply.  */
14962 char $ac_func();
14963 char (*f)();
14964
14965 int main() {
14966
14967 /* The GNU C library defines this for functions which it implements
14968     to always fail with ENOSYS.  Some functions are actually named
14969     something starting with __ and the normal name is an alias.  */
14970 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14971 choke me
14972 #else
14973 f = $ac_func;
14974 #endif
14975
14976 ; return 0; }
14977 EOF
14978 if { (eval echo configure:14979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14979   rm -rf conftest*
14980   eval "ac_cv_func_$ac_func=yes"
14981 else
14982   echo "configure: failed program was:" >&5
14983   cat conftest.$ac_ext >&5
14984   rm -rf conftest*
14985   eval "ac_cv_func_$ac_func=no"
14986 fi
14987 rm -f conftest*
14988 fi
14989
14990 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14991   echo "$ac_t""yes" 1>&6
14992     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14993   cat >> confdefs.h <<EOF
14994 #define $ac_tr_func 1
14995 EOF
14996  
14997 else
14998   echo "$ac_t""no" 1>&6
14999 fi
15000 done
15001
15002         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15003 echo "configure:15004: checking for LinuxThreads implementation" >&5
15004 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15005   echo $ac_n "(cached) $ac_c" 1>&6
15006 else
15007   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15008 fi
15009
15010 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15011
15012                         
15013         
15014         
15015         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15016 echo "configure:15017: checking for LinuxThreads consistency" >&5
15017 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15018   echo $ac_n "(cached) $ac_c" 1>&6
15019 else
15020   
15021                 if test $ol_cv_header_linux_threads = yes -a \
15022                         $ol_cv_sys_linux_threads = yes; then
15023                         ol_cv_linux_threads=yes
15024                 elif test $ol_cv_header_linux_threads = no -a \
15025                         $ol_cv_sys_linux_threads = no; then
15026                         ol_cv_linux_threads=no
15027                 else
15028                         ol_cv_linux_threads=error
15029                 fi
15030         
15031 fi
15032
15033 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15034
15035
15036                         if test $ol_cv_linux_threads = error; then
15037                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15038                         fi
15039
15040                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15041 echo "configure:15042: checking if pthread_create() works" >&5
15042 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15043   echo $ac_n "(cached) $ac_c" 1>&6
15044 else
15045   
15046                         if test "$cross_compiling" = yes; then
15047                                 ol_cv_pthread_create_works=yes
15048 else
15049   cat > conftest.$ac_ext <<EOF
15050 #line 15051 "configure"
15051 #include "confdefs.h"
15052 /* pthread test headers */
15053 #include <pthread.h>
15054 #if HAVE_PTHREADS < 7
15055 #include <errno.h>
15056 #endif
15057 #ifndef NULL
15058 #define NULL (void*)0
15059 #endif
15060
15061 static void *task(p)
15062         void *p;
15063 {
15064         return (void *) (p == NULL);
15065 }
15066
15067
15068 int main(argc, argv)
15069         int argc;
15070         char **argv;
15071 {
15072
15073         /* pthread test function */
15074 #ifndef PTHREAD_CREATE_DETACHED
15075 #define PTHREAD_CREATE_DETACHED 1
15076 #endif
15077         pthread_t t;
15078         int status;
15079         int detach = PTHREAD_CREATE_DETACHED;
15080
15081 #if HAVE_PTHREADS > 4
15082         /* Final pthreads */
15083         pthread_attr_t attr;
15084
15085         status = pthread_attr_init(&attr);
15086         if( status ) return status;
15087
15088 #if HAVE_PTHREADS < 7
15089         status = pthread_attr_setdetachstate(&attr, &detach);
15090         if( status < 0 ) status = errno;
15091 #else
15092         status = pthread_attr_setdetachstate(&attr, detach);
15093 #endif
15094         if( status ) return status;
15095         status = pthread_create( &t, &attr, task, NULL );
15096 #if HAVE_PTHREADS < 7
15097         if( status < 0 ) status = errno;
15098 #endif
15099         if( status ) return status;
15100 #else
15101         /* Draft 4 pthreads */
15102         status = pthread_create( &t, pthread_attr_default, task, NULL );
15103         if( status ) return errno;
15104
15105         /* give thread a chance to complete */
15106         /* it should remain joinable and hence detachable */
15107         sleep( 1 );
15108
15109         status = pthread_detach( &t );
15110         if( status ) return errno;
15111 #endif
15112
15113 #ifdef HAVE_LINUX_THREADS
15114         pthread_kill_other_threads_np();
15115 #endif
15116
15117         return 0;
15118
15119 }
15120
15121 EOF
15122 if { (eval echo configure:15123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15123 then
15124   ol_cv_pthread_create_works=yes
15125 else
15126   echo "configure: failed program was:" >&5
15127   cat conftest.$ac_ext >&5
15128   rm -fr conftest*
15129   ol_cv_pthread_create_works=no
15130 fi
15131 rm -fr conftest*
15132 fi
15133
15134 fi
15135
15136 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15137
15138                         if test $ol_cv_pthread_create_works = no ; then
15139                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15140                         fi
15141
15142                                                 if test $ol_with_yielding_select = auto ; then
15143                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15144 echo "configure:15145: checking if select yields when using pthreads" >&5
15145 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15146   echo $ac_n "(cached) $ac_c" 1>&6
15147 else
15148   
15149                                 if test "$cross_compiling" = yes; then
15150   ol_cv_pthread_select_yields=cross
15151 else
15152   cat > conftest.$ac_ext <<EOF
15153 #line 15154 "configure"
15154 #include "confdefs.h"
15155
15156 #include <sys/types.h>
15157 #include <sys/time.h>
15158 #include <unistd.h>
15159 #include <pthread.h>
15160 #ifndef NULL
15161 #define NULL (void*) 0
15162 #endif
15163
15164 static int fildes[2];
15165
15166 static void *task(p)
15167         void *p;
15168 {
15169         int i;
15170         struct timeval tv;
15171
15172         fd_set rfds;
15173
15174         tv.tv_sec=10;
15175         tv.tv_usec=0;
15176
15177         FD_ZERO(&rfds);
15178         FD_SET(fildes[0], &rfds);
15179
15180         /* we're not interested in any fds */
15181         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15182
15183         if(i < 0) {
15184                 perror("select");
15185                 exit(10);
15186         }
15187
15188         exit(0); /* if we exit here, the select blocked the whole process */
15189 }
15190
15191 int main(argc, argv)
15192         int argc;
15193         char **argv;
15194 {
15195         pthread_t t;
15196
15197         /* create a pipe to select */
15198         if(pipe(&fildes[0])) {
15199                 perror("select");
15200                 exit(1);
15201         }
15202
15203 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15204         (void) pthread_setconcurrency(2);
15205 #else
15206 #ifdef HAVE_THR_SETCONCURRENCY
15207         /* Set Solaris LWP concurrency to 2 */
15208         thr_setconcurrency(2);
15209 #endif
15210 #endif
15211
15212 #if HAVE_PTHREADS < 6
15213         pthread_create(&t, pthread_attr_default, task, NULL);
15214 #else
15215         pthread_create(&t, NULL, task, NULL);
15216 #endif
15217
15218         /* make sure task runs first */
15219 #if HAVE_THR_YIELD
15220         thr_yield();
15221 #elif defined( HAVE_SCHED_YIELD )
15222         sched_yield();
15223 #elif defined( HAVE_PTHREAD_YIELD )
15224         pthread_yield();
15225 #endif
15226
15227         exit(2);
15228 }
15229 EOF
15230 if { (eval echo configure:15231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15231 then
15232   ol_cv_pthread_select_yields=no
15233 else
15234   echo "configure: failed program was:" >&5
15235   cat conftest.$ac_ext >&5
15236   rm -fr conftest*
15237   ol_cv_pthread_select_yields=yes
15238 fi
15239 rm -fr conftest*
15240 fi
15241
15242 fi
15243
15244 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15245
15246                                 if test $ol_cv_pthread_select_yields = cross ; then
15247                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15248                                 fi
15249
15250                                 if test $ol_cv_pthread_select_yields = yes ; then
15251                                         ol_with_yielding_select=yes
15252                                 fi
15253                         fi
15254
15255                                                 CPPFLAGS="$save_CPPFLAGS"
15256                         LIBS="$save_LIBS"
15257                 else
15258                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15259                 fi
15260         fi
15261
15262         if test $ol_with_threads = posix ; then
15263                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15264         fi
15265 fi
15266
15267 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15268         -o $ol_with_threads = mach ; then
15269
15270                 for ac_hdr in mach/cthreads.h cthreads.h
15271 do
15272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15274 echo "configure:15275: checking for $ac_hdr" >&5
15275 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15276   echo $ac_n "(cached) $ac_c" 1>&6
15277 else
15278   cat > conftest.$ac_ext <<EOF
15279 #line 15280 "configure"
15280 #include "confdefs.h"
15281 #include <$ac_hdr>
15282 EOF
15283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15284 { (eval echo configure:15285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15286 if test -z "$ac_err"; then
15287   rm -rf conftest*
15288   eval "ac_cv_header_$ac_safe=yes"
15289 else
15290   echo "$ac_err" >&5
15291   echo "configure: failed program was:" >&5
15292   cat conftest.$ac_ext >&5
15293   rm -rf conftest*
15294   eval "ac_cv_header_$ac_safe=no"
15295 fi
15296 rm -f conftest*
15297 fi
15298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15299   echo "$ac_t""yes" 1>&6
15300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15301   cat >> confdefs.h <<EOF
15302 #define $ac_tr_hdr 1
15303 EOF
15304  
15305 else
15306   echo "$ac_t""no" 1>&6
15307 fi
15308 done
15309
15310         if test $ac_cv_header_mach_cthreads_h = yes ; then
15311                 ol_with_threads=found
15312
15313                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15314 echo "configure:15315: checking for cthread_fork" >&5
15315 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15316   echo $ac_n "(cached) $ac_c" 1>&6
15317 else
15318   cat > conftest.$ac_ext <<EOF
15319 #line 15320 "configure"
15320 #include "confdefs.h"
15321 /* System header to define __stub macros and hopefully few prototypes,
15322     which can conflict with char cthread_fork(); below.  */
15323 #include <assert.h>
15324 /* Override any gcc2 internal prototype to avoid an error.  */
15325 /* We use char because int might match the return type of a gcc2
15326     builtin and then its argument prototype would still apply.  */
15327 char cthread_fork();
15328 char (*f)();
15329
15330 int main() {
15331
15332 /* The GNU C library defines this for functions which it implements
15333     to always fail with ENOSYS.  Some functions are actually named
15334     something starting with __ and the normal name is an alias.  */
15335 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15336 choke me
15337 #else
15338 f = cthread_fork;
15339 #endif
15340
15341 ; return 0; }
15342 EOF
15343 if { (eval echo configure:15344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15344   rm -rf conftest*
15345   eval "ac_cv_func_cthread_fork=yes"
15346 else
15347   echo "configure: failed program was:" >&5
15348   cat conftest.$ac_ext >&5
15349   rm -rf conftest*
15350   eval "ac_cv_func_cthread_fork=no"
15351 fi
15352 rm -f conftest*
15353 fi
15354
15355 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15356   echo "$ac_t""yes" 1>&6
15357   ol_link_threads=yes
15358 else
15359   echo "$ac_t""no" 1>&6
15360 fi
15361
15362
15363                 if test $ol_link_threads = no ; then
15364                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15365 echo "configure:15366: checking for cthread_fork with -all_load" >&5
15366 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15367   echo $ac_n "(cached) $ac_c" 1>&6
15368 else
15369   
15370                                                                 save_LIBS="$LIBS"
15371                                 LIBS="-all_load $LIBS"
15372                                 cat > conftest.$ac_ext <<EOF
15373 #line 15374 "configure"
15374 #include "confdefs.h"
15375 #include <mach/cthreads.h>
15376 int main() {
15377
15378                                         cthread_fork((void *)0, (void *)0);
15379                                         
15380 ; return 0; }
15381 EOF
15382 if { (eval echo configure:15383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15383   rm -rf conftest*
15384   ol_cv_cthread_all_load=yes
15385 else
15386   echo "configure: failed program was:" >&5
15387   cat conftest.$ac_ext >&5
15388   rm -rf conftest*
15389   ol_cv_cthread_all_load=no
15390 fi
15391 rm -f conftest*
15392                                                                 LIBS="$save_LIBS"
15393                         
15394 fi
15395
15396 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15397
15398                         if test $ol_cv_cthread_all_load = yes ; then
15399                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15400                                 ol_link_threads=mach
15401                                 ol_with_threads=found
15402                         fi
15403                 fi
15404
15405         elif test $ac_cv_header_cthreads_h = yes ; then
15406                                 
15407                 ol_with_threads=found
15408  
15409                                 save_LIBS="$LIBS"
15410                 LIBS="$LIBS -lthreads"
15411                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15412 echo "configure:15413: checking for cthread_fork" >&5
15413 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15414   echo $ac_n "(cached) $ac_c" 1>&6
15415 else
15416   cat > conftest.$ac_ext <<EOF
15417 #line 15418 "configure"
15418 #include "confdefs.h"
15419 /* System header to define __stub macros and hopefully few prototypes,
15420     which can conflict with char cthread_fork(); below.  */
15421 #include <assert.h>
15422 /* Override any gcc2 internal prototype to avoid an error.  */
15423 /* We use char because int might match the return type of a gcc2
15424     builtin and then its argument prototype would still apply.  */
15425 char cthread_fork();
15426 char (*f)();
15427
15428 int main() {
15429
15430 /* The GNU C library defines this for functions which it implements
15431     to always fail with ENOSYS.  Some functions are actually named
15432     something starting with __ and the normal name is an alias.  */
15433 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15434 choke me
15435 #else
15436 f = cthread_fork;
15437 #endif
15438
15439 ; return 0; }
15440 EOF
15441 if { (eval echo configure:15442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15442   rm -rf conftest*
15443   eval "ac_cv_func_cthread_fork=yes"
15444 else
15445   echo "configure: failed program was:" >&5
15446   cat conftest.$ac_ext >&5
15447   rm -rf conftest*
15448   eval "ac_cv_func_cthread_fork=no"
15449 fi
15450 rm -f conftest*
15451 fi
15452
15453 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15454   echo "$ac_t""yes" 1>&6
15455   ol_link_threads=yes
15456 else
15457   echo "$ac_t""no" 1>&6
15458 fi
15459
15460                 LIBS="$save_LIBS"
15461
15462                 if test $ol_link_threads = yes ; then
15463                         LTHREAD_LIBS="-lthreads"
15464                         ol_link_threads=mach
15465                         ol_with_threads=found
15466                 else
15467                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15468                 fi
15469
15470         elif test $ol_with_threads = mach ; then
15471                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15472         fi
15473
15474         if test $ol_link_threads = mach ; then
15475                 cat >> confdefs.h <<\EOF
15476 #define HAVE_MACH_CTHREADS 1
15477 EOF
15478
15479         elif test $ol_with_threads = found ; then
15480                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15481         fi
15482 fi
15483
15484 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15485         -o $ol_with_threads = pth ; then
15486
15487         for ac_hdr in pth.h
15488 do
15489 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15490 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15491 echo "configure:15492: checking for $ac_hdr" >&5
15492 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15493   echo $ac_n "(cached) $ac_c" 1>&6
15494 else
15495   cat > conftest.$ac_ext <<EOF
15496 #line 15497 "configure"
15497 #include "confdefs.h"
15498 #include <$ac_hdr>
15499 EOF
15500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15501 { (eval echo configure:15502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15503 if test -z "$ac_err"; then
15504   rm -rf conftest*
15505   eval "ac_cv_header_$ac_safe=yes"
15506 else
15507   echo "$ac_err" >&5
15508   echo "configure: failed program was:" >&5
15509   cat conftest.$ac_ext >&5
15510   rm -rf conftest*
15511   eval "ac_cv_header_$ac_safe=no"
15512 fi
15513 rm -f conftest*
15514 fi
15515 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15516   echo "$ac_t""yes" 1>&6
15517     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15518   cat >> confdefs.h <<EOF
15519 #define $ac_tr_hdr 1
15520 EOF
15521  
15522 else
15523   echo "$ac_t""no" 1>&6
15524 fi
15525 done
15526
15527
15528         if test $ac_cv_header_pth_h = yes ; then
15529                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15530 echo "configure:15531: checking for pth_version in -lpth" >&5
15531 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15532 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15533   echo $ac_n "(cached) $ac_c" 1>&6
15534 else
15535   ac_save_LIBS="$LIBS"
15536 LIBS="-lpth  $LIBS"
15537 cat > conftest.$ac_ext <<EOF
15538 #line 15539 "configure"
15539 #include "confdefs.h"
15540 /* Override any gcc2 internal prototype to avoid an error.  */
15541 /* We use char because int might match the return type of a gcc2
15542     builtin and then its argument prototype would still apply.  */
15543 char pth_version();
15544
15545 int main() {
15546 pth_version()
15547 ; return 0; }
15548 EOF
15549 if { (eval echo configure:15550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15550   rm -rf conftest*
15551   eval "ac_cv_lib_$ac_lib_var=yes"
15552 else
15553   echo "configure: failed program was:" >&5
15554   cat conftest.$ac_ext >&5
15555   rm -rf conftest*
15556   eval "ac_cv_lib_$ac_lib_var=no"
15557 fi
15558 rm -f conftest*
15559 LIBS="$ac_save_LIBS"
15560
15561 fi
15562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15563   echo "$ac_t""yes" 1>&6
15564   have_pth=yes
15565 else
15566   echo "$ac_t""no" 1>&6
15567 have_pth=no
15568 fi
15569
15570
15571                 if test $have_pth = yes ; then
15572                         cat >> confdefs.h <<\EOF
15573 #define HAVE_GNU_PTH 1
15574 EOF
15575
15576                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15577                         ol_link_threads=pth
15578                         ol_with_threads=found
15579
15580                         if test $ol_with_yielding_select = auto ; then
15581                                 ol_with_yielding_select=yes
15582                         fi
15583                 fi
15584         fi
15585 fi
15586
15587 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15588         -o $ol_with_threads = lwp ; then
15589
15590                 for ac_hdr in thread.h synch.h
15591 do
15592 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15593 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15594 echo "configure:15595: checking for $ac_hdr" >&5
15595 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15596   echo $ac_n "(cached) $ac_c" 1>&6
15597 else
15598   cat > conftest.$ac_ext <<EOF
15599 #line 15600 "configure"
15600 #include "confdefs.h"
15601 #include <$ac_hdr>
15602 EOF
15603 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15604 { (eval echo configure:15605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15605 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15606 if test -z "$ac_err"; then
15607   rm -rf conftest*
15608   eval "ac_cv_header_$ac_safe=yes"
15609 else
15610   echo "$ac_err" >&5
15611   echo "configure: failed program was:" >&5
15612   cat conftest.$ac_ext >&5
15613   rm -rf conftest*
15614   eval "ac_cv_header_$ac_safe=no"
15615 fi
15616 rm -f conftest*
15617 fi
15618 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15619   echo "$ac_t""yes" 1>&6
15620     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15621   cat >> confdefs.h <<EOF
15622 #define $ac_tr_hdr 1
15623 EOF
15624  
15625 else
15626   echo "$ac_t""no" 1>&6
15627 fi
15628 done
15629
15630         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15631                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15632 echo "configure:15633: checking for thr_create in -lthread" >&5
15633 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15634 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15635   echo $ac_n "(cached) $ac_c" 1>&6
15636 else
15637   ac_save_LIBS="$LIBS"
15638 LIBS="-lthread  $LIBS"
15639 cat > conftest.$ac_ext <<EOF
15640 #line 15641 "configure"
15641 #include "confdefs.h"
15642 /* Override any gcc2 internal prototype to avoid an error.  */
15643 /* We use char because int might match the return type of a gcc2
15644     builtin and then its argument prototype would still apply.  */
15645 char thr_create();
15646
15647 int main() {
15648 thr_create()
15649 ; return 0; }
15650 EOF
15651 if { (eval echo configure:15652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15652   rm -rf conftest*
15653   eval "ac_cv_lib_$ac_lib_var=yes"
15654 else
15655   echo "configure: failed program was:" >&5
15656   cat conftest.$ac_ext >&5
15657   rm -rf conftest*
15658   eval "ac_cv_lib_$ac_lib_var=no"
15659 fi
15660 rm -f conftest*
15661 LIBS="$ac_save_LIBS"
15662
15663 fi
15664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15665   echo "$ac_t""yes" 1>&6
15666   have_thr=yes
15667 else
15668   echo "$ac_t""no" 1>&6
15669 have_thr=no
15670 fi
15671
15672
15673                 if test $have_thr = yes ; then
15674                         cat >> confdefs.h <<\EOF
15675 #define HAVE_THR 1
15676 EOF
15677
15678                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15679                         ol_link_threads=thr
15680
15681                         if test $ol_with_yielding_select = auto ; then
15682                                 ol_with_yielding_select=yes
15683                         fi
15684
15685                                                 for ac_func in \
15686                                 thr_setconcurrency \
15687                                 thr_getconcurrency \
15688                         
15689 do
15690 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15691 echo "configure:15692: checking for $ac_func" >&5
15692 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15693   echo $ac_n "(cached) $ac_c" 1>&6
15694 else
15695   cat > conftest.$ac_ext <<EOF
15696 #line 15697 "configure"
15697 #include "confdefs.h"
15698 /* System header to define __stub macros and hopefully few prototypes,
15699     which can conflict with char $ac_func(); below.  */
15700 #include <assert.h>
15701 /* Override any gcc2 internal prototype to avoid an error.  */
15702 /* We use char because int might match the return type of a gcc2
15703     builtin and then its argument prototype would still apply.  */
15704 char $ac_func();
15705 char (*f)();
15706
15707 int main() {
15708
15709 /* The GNU C library defines this for functions which it implements
15710     to always fail with ENOSYS.  Some functions are actually named
15711     something starting with __ and the normal name is an alias.  */
15712 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15713 choke me
15714 #else
15715 f = $ac_func;
15716 #endif
15717
15718 ; return 0; }
15719 EOF
15720 if { (eval echo configure:15721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15721   rm -rf conftest*
15722   eval "ac_cv_func_$ac_func=yes"
15723 else
15724   echo "configure: failed program was:" >&5
15725   cat conftest.$ac_ext >&5
15726   rm -rf conftest*
15727   eval "ac_cv_func_$ac_func=no"
15728 fi
15729 rm -f conftest*
15730 fi
15731
15732 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15733   echo "$ac_t""yes" 1>&6
15734     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15735   cat >> confdefs.h <<EOF
15736 #define $ac_tr_func 1
15737 EOF
15738  
15739 else
15740   echo "$ac_t""no" 1>&6
15741 fi
15742 done
15743
15744                 fi
15745         fi
15746
15747                 for ac_hdr in lwp/lwp.h
15748 do
15749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15751 echo "configure:15752: checking for $ac_hdr" >&5
15752 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15753   echo $ac_n "(cached) $ac_c" 1>&6
15754 else
15755   cat > conftest.$ac_ext <<EOF
15756 #line 15757 "configure"
15757 #include "confdefs.h"
15758 #include <$ac_hdr>
15759 EOF
15760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15761 { (eval echo configure:15762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15763 if test -z "$ac_err"; then
15764   rm -rf conftest*
15765   eval "ac_cv_header_$ac_safe=yes"
15766 else
15767   echo "$ac_err" >&5
15768   echo "configure: failed program was:" >&5
15769   cat conftest.$ac_ext >&5
15770   rm -rf conftest*
15771   eval "ac_cv_header_$ac_safe=no"
15772 fi
15773 rm -f conftest*
15774 fi
15775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15776   echo "$ac_t""yes" 1>&6
15777     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15778   cat >> confdefs.h <<EOF
15779 #define $ac_tr_hdr 1
15780 EOF
15781  
15782 else
15783   echo "$ac_t""no" 1>&6
15784 fi
15785 done
15786
15787         if test $ac_cv_header_lwp_lwp_h = yes ; then
15788                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15789 echo "configure:15790: checking for lwp_create in -llwp" >&5
15790 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15791 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15792   echo $ac_n "(cached) $ac_c" 1>&6
15793 else
15794   ac_save_LIBS="$LIBS"
15795 LIBS="-llwp  $LIBS"
15796 cat > conftest.$ac_ext <<EOF
15797 #line 15798 "configure"
15798 #include "confdefs.h"
15799 /* Override any gcc2 internal prototype to avoid an error.  */
15800 /* We use char because int might match the return type of a gcc2
15801     builtin and then its argument prototype would still apply.  */
15802 char lwp_create();
15803
15804 int main() {
15805 lwp_create()
15806 ; return 0; }
15807 EOF
15808 if { (eval echo configure:15809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15809   rm -rf conftest*
15810   eval "ac_cv_lib_$ac_lib_var=yes"
15811 else
15812   echo "configure: failed program was:" >&5
15813   cat conftest.$ac_ext >&5
15814   rm -rf conftest*
15815   eval "ac_cv_lib_$ac_lib_var=no"
15816 fi
15817 rm -f conftest*
15818 LIBS="$ac_save_LIBS"
15819
15820 fi
15821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15822   echo "$ac_t""yes" 1>&6
15823   have_lwp=yes
15824 else
15825   echo "$ac_t""no" 1>&6
15826 have_lwp=no
15827 fi
15828
15829
15830                 if test $have_lwp = yes ; then
15831                         cat >> confdefs.h <<\EOF
15832 #define HAVE_LWP 1
15833 EOF
15834
15835                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15836                         ol_link_threads=lwp
15837
15838                         if test $ol_with_yielding_select = auto ; then
15839                                 ol_with_yielding_select=no
15840                         fi
15841                 fi
15842         fi
15843 fi
15844
15845 if test $ol_with_yielding_select = yes ; then
15846         cat >> confdefs.h <<\EOF
15847 #define HAVE_YIELDING_SELECT 1
15848 EOF
15849
15850 fi
15851
15852 if test $ol_with_threads = manual ; then
15853                 ol_link_threads=yes
15854
15855         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15856
15857         for ac_hdr in pthread.h sched.h
15858 do
15859 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15860 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15861 echo "configure:15862: checking for $ac_hdr" >&5
15862 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15863   echo $ac_n "(cached) $ac_c" 1>&6
15864 else
15865   cat > conftest.$ac_ext <<EOF
15866 #line 15867 "configure"
15867 #include "confdefs.h"
15868 #include <$ac_hdr>
15869 EOF
15870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15871 { (eval echo configure:15872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15873 if test -z "$ac_err"; then
15874   rm -rf conftest*
15875   eval "ac_cv_header_$ac_safe=yes"
15876 else
15877   echo "$ac_err" >&5
15878   echo "configure: failed program was:" >&5
15879   cat conftest.$ac_ext >&5
15880   rm -rf conftest*
15881   eval "ac_cv_header_$ac_safe=no"
15882 fi
15883 rm -f conftest*
15884 fi
15885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15886   echo "$ac_t""yes" 1>&6
15887     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15888   cat >> confdefs.h <<EOF
15889 #define $ac_tr_hdr 1
15890 EOF
15891  
15892 else
15893   echo "$ac_t""no" 1>&6
15894 fi
15895 done
15896
15897         for ac_func in sched_yield pthread_yield
15898 do
15899 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15900 echo "configure:15901: checking for $ac_func" >&5
15901 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15902   echo $ac_n "(cached) $ac_c" 1>&6
15903 else
15904   cat > conftest.$ac_ext <<EOF
15905 #line 15906 "configure"
15906 #include "confdefs.h"
15907 /* System header to define __stub macros and hopefully few prototypes,
15908     which can conflict with char $ac_func(); below.  */
15909 #include <assert.h>
15910 /* Override any gcc2 internal prototype to avoid an error.  */
15911 /* We use char because int might match the return type of a gcc2
15912     builtin and then its argument prototype would still apply.  */
15913 char $ac_func();
15914 char (*f)();
15915
15916 int main() {
15917
15918 /* The GNU C library defines this for functions which it implements
15919     to always fail with ENOSYS.  Some functions are actually named
15920     something starting with __ and the normal name is an alias.  */
15921 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15922 choke me
15923 #else
15924 f = $ac_func;
15925 #endif
15926
15927 ; return 0; }
15928 EOF
15929 if { (eval echo configure:15930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15930   rm -rf conftest*
15931   eval "ac_cv_func_$ac_func=yes"
15932 else
15933   echo "configure: failed program was:" >&5
15934   cat conftest.$ac_ext >&5
15935   rm -rf conftest*
15936   eval "ac_cv_func_$ac_func=no"
15937 fi
15938 rm -f conftest*
15939 fi
15940
15941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15942   echo "$ac_t""yes" 1>&6
15943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15944   cat >> confdefs.h <<EOF
15945 #define $ac_tr_func 1
15946 EOF
15947  
15948 else
15949   echo "$ac_t""no" 1>&6
15950 fi
15951 done
15952
15953         
15954         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15955 echo "configure:15956: checking for LinuxThreads pthread.h" >&5
15956 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15957   echo $ac_n "(cached) $ac_c" 1>&6
15958 else
15959   cat > conftest.$ac_ext <<EOF
15960 #line 15961 "configure"
15961 #include "confdefs.h"
15962 #include <pthread.h>
15963 EOF
15964 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15965   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15966   rm -rf conftest*
15967   ol_cv_header_linux_threads=yes
15968 else
15969   rm -rf conftest*
15970   ol_cv_header_linux_threads=no
15971 fi
15972 rm -f conftest*
15973
15974                 
15975 fi
15976
15977 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15978         if test $ol_cv_header_linux_threads = yes; then
15979                 cat >> confdefs.h <<\EOF
15980 #define HAVE_LINUX_THREADS 1
15981 EOF
15982
15983         fi
15984
15985
15986         for ac_hdr in mach/cthreads.h
15987 do
15988 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15989 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15990 echo "configure:15991: checking for $ac_hdr" >&5
15991 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15992   echo $ac_n "(cached) $ac_c" 1>&6
15993 else
15994   cat > conftest.$ac_ext <<EOF
15995 #line 15996 "configure"
15996 #include "confdefs.h"
15997 #include <$ac_hdr>
15998 EOF
15999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16000 { (eval echo configure:16001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16002 if test -z "$ac_err"; then
16003   rm -rf conftest*
16004   eval "ac_cv_header_$ac_safe=yes"
16005 else
16006   echo "$ac_err" >&5
16007   echo "configure: failed program was:" >&5
16008   cat conftest.$ac_ext >&5
16009   rm -rf conftest*
16010   eval "ac_cv_header_$ac_safe=no"
16011 fi
16012 rm -f conftest*
16013 fi
16014 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16015   echo "$ac_t""yes" 1>&6
16016     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16017   cat >> confdefs.h <<EOF
16018 #define $ac_tr_hdr 1
16019 EOF
16020  
16021 else
16022   echo "$ac_t""no" 1>&6
16023 fi
16024 done
16025
16026         for ac_hdr in lwp/lwp.h
16027 do
16028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16030 echo "configure:16031: checking for $ac_hdr" >&5
16031 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16032   echo $ac_n "(cached) $ac_c" 1>&6
16033 else
16034   cat > conftest.$ac_ext <<EOF
16035 #line 16036 "configure"
16036 #include "confdefs.h"
16037 #include <$ac_hdr>
16038 EOF
16039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16040 { (eval echo configure:16041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16042 if test -z "$ac_err"; then
16043   rm -rf conftest*
16044   eval "ac_cv_header_$ac_safe=yes"
16045 else
16046   echo "$ac_err" >&5
16047   echo "configure: failed program was:" >&5
16048   cat conftest.$ac_ext >&5
16049   rm -rf conftest*
16050   eval "ac_cv_header_$ac_safe=no"
16051 fi
16052 rm -f conftest*
16053 fi
16054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16055   echo "$ac_t""yes" 1>&6
16056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16057   cat >> confdefs.h <<EOF
16058 #define $ac_tr_hdr 1
16059 EOF
16060  
16061 else
16062   echo "$ac_t""no" 1>&6
16063 fi
16064 done
16065
16066         for ac_hdr in thread.h synch.h
16067 do
16068 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16069 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16070 echo "configure:16071: checking for $ac_hdr" >&5
16071 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16072   echo $ac_n "(cached) $ac_c" 1>&6
16073 else
16074   cat > conftest.$ac_ext <<EOF
16075 #line 16076 "configure"
16076 #include "confdefs.h"
16077 #include <$ac_hdr>
16078 EOF
16079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16080 { (eval echo configure:16081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16082 if test -z "$ac_err"; then
16083   rm -rf conftest*
16084   eval "ac_cv_header_$ac_safe=yes"
16085 else
16086   echo "$ac_err" >&5
16087   echo "configure: failed program was:" >&5
16088   cat conftest.$ac_ext >&5
16089   rm -rf conftest*
16090   eval "ac_cv_header_$ac_safe=no"
16091 fi
16092 rm -f conftest*
16093 fi
16094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16095   echo "$ac_t""yes" 1>&6
16096     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16097   cat >> confdefs.h <<EOF
16098 #define $ac_tr_hdr 1
16099 EOF
16100  
16101 else
16102   echo "$ac_t""no" 1>&6
16103 fi
16104 done
16105
16106 fi
16107
16108 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16109                         cat >> confdefs.h <<\EOF
16110 #define REENTRANT 1
16111 EOF
16112
16113         cat >> confdefs.h <<\EOF
16114 #define _REENTRANT 1
16115 EOF
16116
16117         cat >> confdefs.h <<\EOF
16118 #define THREAD_SAFE 1
16119 EOF
16120
16121         cat >> confdefs.h <<\EOF
16122 #define _THREAD_SAFE 1
16123 EOF
16124
16125         cat >> confdefs.h <<\EOF
16126 #define THREADSAFE 1
16127 EOF
16128
16129         cat >> confdefs.h <<\EOF
16130 #define _THREADSAFE 1
16131 EOF
16132
16133         cat >> confdefs.h <<\EOF
16134 #define _SGI_MP_SOURCE 1
16135 EOF
16136
16137
16138                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16139 echo "configure:16140: checking for thread specific errno" >&5
16140 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16141   echo $ac_n "(cached) $ac_c" 1>&6
16142 else
16143   
16144                 cat > conftest.$ac_ext <<EOF
16145 #line 16146 "configure"
16146 #include "confdefs.h"
16147 #include <errno.h>
16148 int main() {
16149 errno = 0;
16150 ; return 0; }
16151 EOF
16152 if { (eval echo configure:16153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16153   rm -rf conftest*
16154   ol_cv_errno_thread_specific=yes
16155 else
16156   echo "configure: failed program was:" >&5
16157   cat conftest.$ac_ext >&5
16158   rm -rf conftest*
16159   ol_cv_errno_thread_specific=no
16160 fi
16161 rm -f conftest*
16162         
16163 fi
16164
16165 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16166
16167                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16168 echo "configure:16169: checking for thread specific h_errno" >&5
16169 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16170   echo $ac_n "(cached) $ac_c" 1>&6
16171 else
16172   
16173                 cat > conftest.$ac_ext <<EOF
16174 #line 16175 "configure"
16175 #include "confdefs.h"
16176 #include <netdb.h>
16177 int main() {
16178 h_errno = 0;
16179 ; return 0; }
16180 EOF
16181 if { (eval echo configure:16182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16182   rm -rf conftest*
16183   ol_cv_h_errno_thread_specific=yes
16184 else
16185   echo "configure: failed program was:" >&5
16186   cat conftest.$ac_ext >&5
16187   rm -rf conftest*
16188   ol_cv_h_errno_thread_specific=no
16189 fi
16190 rm -f conftest*
16191         
16192 fi
16193
16194 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16195
16196         if test $ol_cv_errno_thread_specific != yes \
16197                 -o $ol_cv_h_errno_thread_specific != yes ; then
16198                 LIBS="$LTHREAD_LIBS $LIBS"
16199                 LTHREAD_LIBS=""
16200         fi
16201
16202 fi  
16203
16204 if test $ol_link_threads = no ; then
16205         if test $ol_with_threads = yes ; then
16206                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16207         fi
16208
16209         if test $ol_with_threads = auto ; then
16210                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16211                 ol_with_threads=no
16212         fi
16213
16214         cat >> confdefs.h <<\EOF
16215 #define NO_THREADS 1
16216 EOF
16217
16218         LTHREAD_LIBS=""
16219 fi
16220
16221 if test $ol_link_threads != no ; then
16222         cat >> confdefs.h <<\EOF
16223 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16224 EOF
16225
16226 fi
16227
16228 for ac_func in \
16229         ctime_r                 \
16230         gethostbyname_r gethostbyaddr_r \
16231
16232 do
16233 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16234 echo "configure:16235: checking for $ac_func" >&5
16235 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16236   echo $ac_n "(cached) $ac_c" 1>&6
16237 else
16238   cat > conftest.$ac_ext <<EOF
16239 #line 16240 "configure"
16240 #include "confdefs.h"
16241 /* System header to define __stub macros and hopefully few prototypes,
16242     which can conflict with char $ac_func(); below.  */
16243 #include <assert.h>
16244 /* Override any gcc2 internal prototype to avoid an error.  */
16245 /* We use char because int might match the return type of a gcc2
16246     builtin and then its argument prototype would still apply.  */
16247 char $ac_func();
16248 char (*f)();
16249
16250 int main() {
16251
16252 /* The GNU C library defines this for functions which it implements
16253     to always fail with ENOSYS.  Some functions are actually named
16254     something starting with __ and the normal name is an alias.  */
16255 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16256 choke me
16257 #else
16258 f = $ac_func;
16259 #endif
16260
16261 ; return 0; }
16262 EOF
16263 if { (eval echo configure:16264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16264   rm -rf conftest*
16265   eval "ac_cv_func_$ac_func=yes"
16266 else
16267   echo "configure: failed program was:" >&5
16268   cat conftest.$ac_ext >&5
16269   rm -rf conftest*
16270   eval "ac_cv_func_$ac_func=no"
16271 fi
16272 rm -f conftest*
16273 fi
16274
16275 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16276   echo "$ac_t""yes" 1>&6
16277     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16278   cat >> confdefs.h <<EOF
16279 #define $ac_tr_func 1
16280 EOF
16281  
16282 else
16283   echo "$ac_t""no" 1>&6
16284 fi
16285 done
16286
16287
16288 if test "$ac_cv_func_ctime_r" = no ; then
16289         ol_cv_func_ctime_r_nargs=0
16290 else
16291         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16292 echo "configure:16293: checking number of arguments of ctime_r" >&5
16293 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16294   echo $ac_n "(cached) $ac_c" 1>&6
16295 else
16296   cat > conftest.$ac_ext <<EOF
16297 #line 16298 "configure"
16298 #include "confdefs.h"
16299 #include <time.h>
16300 int main() {
16301 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16302 ; return 0; }
16303 EOF
16304 if { (eval echo configure:16305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16305   rm -rf conftest*
16306   ol_cv_func_ctime_r_nargs3=yes
16307 else
16308   echo "configure: failed program was:" >&5
16309   cat conftest.$ac_ext >&5
16310   rm -rf conftest*
16311   ol_cv_func_ctime_r_nargs3=no
16312 fi
16313 rm -f conftest*
16314
16315         cat > conftest.$ac_ext <<EOF
16316 #line 16317 "configure"
16317 #include "confdefs.h"
16318 #include <time.h>
16319 int main() {
16320 time_t ti; char *buffer; ctime_r(&ti,buffer);
16321 ; return 0; }
16322 EOF
16323 if { (eval echo configure:16324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16324   rm -rf conftest*
16325   ol_cv_func_ctime_r_nargs2=yes
16326 else
16327   echo "configure: failed program was:" >&5
16328   cat conftest.$ac_ext >&5
16329   rm -rf conftest*
16330   ol_cv_func_ctime_r_nargs2=no
16331 fi
16332 rm -f conftest*
16333
16334         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16335                 $ol_cv_func_ctime_r_nargs2 = no ; then
16336
16337                 ol_cv_func_ctime_r_nargs=3
16338
16339         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16340                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16341
16342                 ol_cv_func_ctime_r_nargs=2
16343
16344         else
16345                 ol_cv_func_ctime_r_nargs=0
16346         fi
16347   
16348 fi
16349
16350 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16351
16352   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16353         cat >> confdefs.h <<EOF
16354 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16355 EOF
16356
16357   fi
16358
16359 fi
16360
16361 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16362         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16363 echo "configure:16364: checking number of arguments of gethostbyname_r" >&5
16364 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16365   echo $ac_n "(cached) $ac_c" 1>&6
16366 else
16367   cat > conftest.$ac_ext <<EOF
16368 #line 16369 "configure"
16369 #include "confdefs.h"
16370 #include <sys/types.h>
16371 #include <sys/socket.h>
16372 #include <netinet/in.h>
16373 #include <netdb.h>
16374 #define BUFSIZE (sizeof(struct hostent)+10)
16375 int main() {
16376 struct hostent hent; char buffer[BUFSIZE];
16377                 int bufsize=BUFSIZE;int h_errno;
16378                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16379                         buffer, bufsize, &h_errno);
16380 ; return 0; }
16381 EOF
16382 if { (eval echo configure:16383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16383   rm -rf conftest*
16384   ol_cv_func_gethostbyname_r_nargs5=yes
16385 else
16386   echo "configure: failed program was:" >&5
16387   cat conftest.$ac_ext >&5
16388   rm -rf conftest*
16389   ol_cv_func_gethostbyname_r_nargs5=no
16390 fi
16391 rm -f conftest*
16392
16393         cat > conftest.$ac_ext <<EOF
16394 #line 16395 "configure"
16395 #include "confdefs.h"
16396 #include <sys/types.h>
16397 #include <sys/socket.h>
16398 #include <netinet/in.h>
16399 #include <netdb.h>
16400 #define BUFSIZE (sizeof(struct hostent)+10)
16401 int main() {
16402 struct hostent hent;struct hostent *rhent;
16403                 char buffer[BUFSIZE];
16404                 int bufsize=BUFSIZE;int h_errno;
16405                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16406                         &rhent, &h_errno);
16407 ; return 0; }
16408 EOF
16409 if { (eval echo configure:16410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16410   rm -rf conftest*
16411   ol_cv_func_gethostbyname_r_nargs6=yes
16412 else
16413   echo "configure: failed program was:" >&5
16414   cat conftest.$ac_ext >&5
16415   rm -rf conftest*
16416   ol_cv_func_gethostbyname_r_nargs6=no
16417 fi
16418 rm -f conftest*
16419
16420         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16421                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16422
16423                 ol_cv_func_gethostbyname_r_nargs=5
16424
16425         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16426                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16427
16428                 ol_cv_func_gethostbyname_r_nargs=6
16429
16430         else
16431                 ol_cv_func_gethostbyname_r_nargs=0
16432         fi
16433   
16434 fi
16435
16436 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16437   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16438         cat >> confdefs.h <<EOF
16439 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16440 EOF
16441
16442   fi
16443
16444 else
16445         ol_cv_func_gethostbyname_r_nargs=0
16446 fi
16447  
16448 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16449         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16450 echo "configure:16451: checking number of arguments of gethostbyaddr_r" >&5
16451 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16452   echo $ac_n "(cached) $ac_c" 1>&6
16453 else
16454   cat > conftest.$ac_ext <<EOF
16455 #line 16456 "configure"
16456 #include "confdefs.h"
16457 #include <sys/types.h>
16458 #include <sys/socket.h>
16459 #include <netinet/in.h>
16460 #include <netdb.h>
16461 #define BUFSIZE (sizeof(struct hostent)+10)
16462 int main() {
16463 struct hostent hent; char buffer[BUFSIZE]; 
16464             struct in_addr add;
16465             size_t alen=sizeof(struct in_addr);
16466             int bufsize=BUFSIZE;int h_errno;
16467                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16468                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16469 ; return 0; }
16470 EOF
16471 if { (eval echo configure:16472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16472   rm -rf conftest*
16473   ol_cv_func_gethostbyaddr_r_nargs7=yes
16474 else
16475   echo "configure: failed program was:" >&5
16476   cat conftest.$ac_ext >&5
16477   rm -rf conftest*
16478   ol_cv_func_gethostbyaddr_r_nargs7=no
16479 fi
16480 rm -f conftest*
16481
16482         cat > conftest.$ac_ext <<EOF
16483 #line 16484 "configure"
16484 #include "confdefs.h"
16485 #include <sys/types.h>
16486 #include <sys/socket.h>
16487 #include <netinet/in.h>
16488 #include <netdb.h>
16489 #define BUFSIZE (sizeof(struct hostent)+10)
16490 int main() {
16491 struct hostent hent;
16492                 struct hostent *rhent; char buffer[BUFSIZE]; 
16493                 struct in_addr add;
16494                 size_t alen=sizeof(struct in_addr);
16495                 int bufsize=BUFSIZE;int h_errno;
16496                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16497                         alen, AF_INET, &hent, buffer, bufsize, 
16498                         &rhent, &h_errno);
16499 ; return 0; }
16500 EOF
16501 if { (eval echo configure:16502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16502   rm -rf conftest*
16503   ol_cv_func_gethostbyaddr_r_nargs8=yes
16504 else
16505   echo "configure: failed program was:" >&5
16506   cat conftest.$ac_ext >&5
16507   rm -rf conftest*
16508   ol_cv_func_gethostbyaddr_r_nargs8=no
16509 fi
16510 rm -f conftest*
16511
16512         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16513                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16514
16515                 ol_cv_func_gethostbyaddr_r_nargs=7
16516
16517         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16518                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16519
16520                 ol_cv_func_gethostbyaddr_r_nargs=8
16521
16522         else
16523                 ol_cv_func_gethostbyaddr_r_nargs=0
16524         fi
16525   
16526 fi
16527
16528 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16529   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16530     cat >> confdefs.h <<EOF
16531 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16532 EOF
16533
16534   fi
16535
16536 else
16537         ol_cv_func_gethostbyaddr_r_nargs=0
16538 fi
16539
16540 ol_link_ldbm=no 
16541
16542 if test $ol_with_ldbm_api = auto \
16543         -o $ol_with_ldbm_api = berkeley \
16544         -o $ol_with_ldbm_api = bcompat ; then
16545
16546         if test $ol_with_ldbm_api = bcompat; then \
16547                 for ac_hdr in db_185.h db.h
16548 do
16549 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16550 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16551 echo "configure:16552: checking for $ac_hdr" >&5
16552 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16553   echo $ac_n "(cached) $ac_c" 1>&6
16554 else
16555   cat > conftest.$ac_ext <<EOF
16556 #line 16557 "configure"
16557 #include "confdefs.h"
16558 #include <$ac_hdr>
16559 EOF
16560 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16561 { (eval echo configure:16562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16562 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16563 if test -z "$ac_err"; then
16564   rm -rf conftest*
16565   eval "ac_cv_header_$ac_safe=yes"
16566 else
16567   echo "$ac_err" >&5
16568   echo "configure: failed program was:" >&5
16569   cat conftest.$ac_ext >&5
16570   rm -rf conftest*
16571   eval "ac_cv_header_$ac_safe=no"
16572 fi
16573 rm -f conftest*
16574 fi
16575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16576   echo "$ac_t""yes" 1>&6
16577     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16578   cat >> confdefs.h <<EOF
16579 #define $ac_tr_hdr 1
16580 EOF
16581  
16582 else
16583   echo "$ac_t""no" 1>&6
16584 fi
16585 done
16586
16587 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16588         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16589 echo "configure:16590: checking if Berkeley DB header compatibility" >&5
16590 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16591   echo $ac_n "(cached) $ac_c" 1>&6
16592 else
16593   
16594                 cat > conftest.$ac_ext <<EOF
16595 #line 16596 "configure"
16596 #include "confdefs.h"
16597
16598 #if HAVE_DB_185_H
16599 #       include <db_185.h>
16600 #else
16601 #       include <db.h>
16602 #endif
16603
16604  /* this check could be improved */
16605 #ifndef DB_VERSION_MAJOR
16606 #       define DB_VERSION_MAJOR 1
16607 #endif
16608
16609 #if DB_VERSION_MAJOR == 1 
16610         __db_version_1
16611 #endif
16612
16613 EOF
16614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16615   egrep "__db_version_1" >/dev/null 2>&1; then
16616   rm -rf conftest*
16617   ol_cv_header_db1=yes
16618 else
16619   rm -rf conftest*
16620   ol_cv_header_db1=no
16621 fi
16622 rm -f conftest*
16623
16624 fi
16625
16626 echo "$ac_t""$ol_cv_header_db1" 1>&6
16627
16628         if test $ol_cv_header_db1 = yes ; then
16629                 ol_cv_lib_db=no
16630 if test $ol_cv_lib_db = no ; then
16631         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16632 echo "configure:16633: checking for Berkeley DB link (default)" >&5
16633 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16634   echo $ac_n "(cached) $ac_c" 1>&6
16635 else
16636   
16637         ol_DB_LIB=
16638         ol_LIBS=$LIBS
16639         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16640
16641         cat > conftest.$ac_ext <<EOF
16642 #line 16643 "configure"
16643 #include "confdefs.h"
16644
16645 #ifdef HAVE_DB_185_H
16646 # include <db_185.h>
16647 #else
16648 # include <db.h>
16649 #endif
16650
16651 #ifndef DB_VERSION_MAJOR
16652 # define DB_VERSION_MAJOR 1
16653 #endif
16654
16655 #ifndef NULL
16656 #define NULL ((void*)0)
16657 #endif
16658
16659 int main() {
16660
16661 #if DB_VERSION_MAJOR > 1
16662         {
16663                 char *version;
16664                 int major, minor, patch;
16665
16666                 version = db_version( &major, &minor, &patch );
16667
16668                 if( major != DB_VERSION_MAJOR ||
16669                         minor < DB_VERSION_MINOR )
16670                 {
16671                         printf("Berkeley DB version mismatch\n"
16672                                 "\texpected: %s\n\tgot: %s\n",
16673                                 DB_VERSION_STRING, version);
16674                         return 1;
16675                 }
16676         }
16677 #endif
16678
16679 #if DB_VERSION_MAJOR > 2
16680         db_env_create( NULL, 0 );
16681 #elif DB_VERSION_MAJOR > 1
16682         db_appexit( NULL );
16683 #else
16684         (void) dbopen( NULL, 0, 0, 0, NULL);
16685 #endif
16686
16687 ; return 0; }
16688 EOF
16689 if { (eval echo configure:16690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16690   rm -rf conftest*
16691   ol_cv_db_none=yes
16692 else
16693   echo "configure: failed program was:" >&5
16694   cat conftest.$ac_ext >&5
16695   rm -rf conftest*
16696   ol_cv_db_none=no
16697 fi
16698 rm -f conftest*
16699
16700         LIBS="$ol_LIBS"
16701
16702 fi
16703
16704 echo "$ac_t""$ol_cv_db_none" 1>&6
16705
16706         if test $ol_cv_db_none = yes ; then
16707                 ol_cv_lib_db=yes
16708         fi
16709 fi
16710
16711 if test $ol_cv_lib_db = no ; then
16712         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16713 echo "configure:16714: checking for Berkeley DB link (-ldb41)" >&5
16714 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16715   echo $ac_n "(cached) $ac_c" 1>&6
16716 else
16717   
16718         ol_DB_LIB=-ldb41
16719         ol_LIBS=$LIBS
16720         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16721
16722         cat > conftest.$ac_ext <<EOF
16723 #line 16724 "configure"
16724 #include "confdefs.h"
16725
16726 #ifdef HAVE_DB_185_H
16727 # include <db_185.h>
16728 #else
16729 # include <db.h>
16730 #endif
16731
16732 #ifndef DB_VERSION_MAJOR
16733 # define DB_VERSION_MAJOR 1
16734 #endif
16735
16736 #ifndef NULL
16737 #define NULL ((void*)0)
16738 #endif
16739
16740 int main() {
16741
16742 #if DB_VERSION_MAJOR > 1
16743         {
16744                 char *version;
16745                 int major, minor, patch;
16746
16747                 version = db_version( &major, &minor, &patch );
16748
16749                 if( major != DB_VERSION_MAJOR ||
16750                         minor < DB_VERSION_MINOR )
16751                 {
16752                         printf("Berkeley DB version mismatch\n"
16753                                 "\texpected: %s\n\tgot: %s\n",
16754                                 DB_VERSION_STRING, version);
16755                         return 1;
16756                 }
16757         }
16758 #endif
16759
16760 #if DB_VERSION_MAJOR > 2
16761         db_env_create( NULL, 0 );
16762 #elif DB_VERSION_MAJOR > 1
16763         db_appexit( NULL );
16764 #else
16765         (void) dbopen( NULL, 0, 0, 0, NULL);
16766 #endif
16767
16768 ; return 0; }
16769 EOF
16770 if { (eval echo configure:16771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16771   rm -rf conftest*
16772   ol_cv_db_db41=yes
16773 else
16774   echo "configure: failed program was:" >&5
16775   cat conftest.$ac_ext >&5
16776   rm -rf conftest*
16777   ol_cv_db_db41=no
16778 fi
16779 rm -f conftest*
16780
16781         LIBS="$ol_LIBS"
16782
16783 fi
16784
16785 echo "$ac_t""$ol_cv_db_db41" 1>&6
16786
16787         if test $ol_cv_db_db41 = yes ; then
16788                 ol_cv_lib_db=-ldb41
16789         fi
16790 fi
16791
16792 if test $ol_cv_lib_db = no ; then
16793         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16794 echo "configure:16795: checking for Berkeley DB link (-ldb-41)" >&5
16795 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16796   echo $ac_n "(cached) $ac_c" 1>&6
16797 else
16798   
16799         ol_DB_LIB=-ldb-41
16800         ol_LIBS=$LIBS
16801         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16802
16803         cat > conftest.$ac_ext <<EOF
16804 #line 16805 "configure"
16805 #include "confdefs.h"
16806
16807 #ifdef HAVE_DB_185_H
16808 # include <db_185.h>
16809 #else
16810 # include <db.h>
16811 #endif
16812
16813 #ifndef DB_VERSION_MAJOR
16814 # define DB_VERSION_MAJOR 1
16815 #endif
16816
16817 #ifndef NULL
16818 #define NULL ((void*)0)
16819 #endif
16820
16821 int main() {
16822
16823 #if DB_VERSION_MAJOR > 1
16824         {
16825                 char *version;
16826                 int major, minor, patch;
16827
16828                 version = db_version( &major, &minor, &patch );
16829
16830                 if( major != DB_VERSION_MAJOR ||
16831                         minor < DB_VERSION_MINOR )
16832                 {
16833                         printf("Berkeley DB version mismatch\n"
16834                                 "\texpected: %s\n\tgot: %s\n",
16835                                 DB_VERSION_STRING, version);
16836                         return 1;
16837                 }
16838         }
16839 #endif
16840
16841 #if DB_VERSION_MAJOR > 2
16842         db_env_create( NULL, 0 );
16843 #elif DB_VERSION_MAJOR > 1
16844         db_appexit( NULL );
16845 #else
16846         (void) dbopen( NULL, 0, 0, 0, NULL);
16847 #endif
16848
16849 ; return 0; }
16850 EOF
16851 if { (eval echo configure:16852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16852   rm -rf conftest*
16853   ol_cv_db_db_41=yes
16854 else
16855   echo "configure: failed program was:" >&5
16856   cat conftest.$ac_ext >&5
16857   rm -rf conftest*
16858   ol_cv_db_db_41=no
16859 fi
16860 rm -f conftest*
16861
16862         LIBS="$ol_LIBS"
16863
16864 fi
16865
16866 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16867
16868         if test $ol_cv_db_db_41 = yes ; then
16869                 ol_cv_lib_db=-ldb-41
16870         fi
16871 fi
16872
16873 if test $ol_cv_lib_db = no ; then
16874         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16875 echo "configure:16876: checking for Berkeley DB link (-ldb4)" >&5
16876 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16877   echo $ac_n "(cached) $ac_c" 1>&6
16878 else
16879   
16880         ol_DB_LIB=-ldb4
16881         ol_LIBS=$LIBS
16882         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16883
16884         cat > conftest.$ac_ext <<EOF
16885 #line 16886 "configure"
16886 #include "confdefs.h"
16887
16888 #ifdef HAVE_DB_185_H
16889 # include <db_185.h>
16890 #else
16891 # include <db.h>
16892 #endif
16893
16894 #ifndef DB_VERSION_MAJOR
16895 # define DB_VERSION_MAJOR 1
16896 #endif
16897
16898 #ifndef NULL
16899 #define NULL ((void*)0)
16900 #endif
16901
16902 int main() {
16903
16904 #if DB_VERSION_MAJOR > 1
16905         {
16906                 char *version;
16907                 int major, minor, patch;
16908
16909                 version = db_version( &major, &minor, &patch );
16910
16911                 if( major != DB_VERSION_MAJOR ||
16912                         minor < DB_VERSION_MINOR )
16913                 {
16914                         printf("Berkeley DB version mismatch\n"
16915                                 "\texpected: %s\n\tgot: %s\n",
16916                                 DB_VERSION_STRING, version);
16917                         return 1;
16918                 }
16919         }
16920 #endif
16921
16922 #if DB_VERSION_MAJOR > 2
16923         db_env_create( NULL, 0 );
16924 #elif DB_VERSION_MAJOR > 1
16925         db_appexit( NULL );
16926 #else
16927         (void) dbopen( NULL, 0, 0, 0, NULL);
16928 #endif
16929
16930 ; return 0; }
16931 EOF
16932 if { (eval echo configure:16933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16933   rm -rf conftest*
16934   ol_cv_db_db4=yes
16935 else
16936   echo "configure: failed program was:" >&5
16937   cat conftest.$ac_ext >&5
16938   rm -rf conftest*
16939   ol_cv_db_db4=no
16940 fi
16941 rm -f conftest*
16942
16943         LIBS="$ol_LIBS"
16944
16945 fi
16946
16947 echo "$ac_t""$ol_cv_db_db4" 1>&6
16948
16949         if test $ol_cv_db_db4 = yes ; then
16950                 ol_cv_lib_db=-ldb4
16951         fi
16952 fi
16953
16954 if test $ol_cv_lib_db = no ; then
16955         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16956 echo "configure:16957: checking for Berkeley DB link (-ldb-4)" >&5
16957 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16958   echo $ac_n "(cached) $ac_c" 1>&6
16959 else
16960   
16961         ol_DB_LIB=-ldb-4
16962         ol_LIBS=$LIBS
16963         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16964
16965         cat > conftest.$ac_ext <<EOF
16966 #line 16967 "configure"
16967 #include "confdefs.h"
16968
16969 #ifdef HAVE_DB_185_H
16970 # include <db_185.h>
16971 #else
16972 # include <db.h>
16973 #endif
16974
16975 #ifndef DB_VERSION_MAJOR
16976 # define DB_VERSION_MAJOR 1
16977 #endif
16978
16979 #ifndef NULL
16980 #define NULL ((void*)0)
16981 #endif
16982
16983 int main() {
16984
16985 #if DB_VERSION_MAJOR > 1
16986         {
16987                 char *version;
16988                 int major, minor, patch;
16989
16990                 version = db_version( &major, &minor, &patch );
16991
16992                 if( major != DB_VERSION_MAJOR ||
16993                         minor < DB_VERSION_MINOR )
16994                 {
16995                         printf("Berkeley DB version mismatch\n"
16996                                 "\texpected: %s\n\tgot: %s\n",
16997                                 DB_VERSION_STRING, version);
16998                         return 1;
16999                 }
17000         }
17001 #endif
17002
17003 #if DB_VERSION_MAJOR > 2
17004         db_env_create( NULL, 0 );
17005 #elif DB_VERSION_MAJOR > 1
17006         db_appexit( NULL );
17007 #else
17008         (void) dbopen( NULL, 0, 0, 0, NULL);
17009 #endif
17010
17011 ; return 0; }
17012 EOF
17013 if { (eval echo configure:17014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17014   rm -rf conftest*
17015   ol_cv_db_db_4=yes
17016 else
17017   echo "configure: failed program was:" >&5
17018   cat conftest.$ac_ext >&5
17019   rm -rf conftest*
17020   ol_cv_db_db_4=no
17021 fi
17022 rm -f conftest*
17023
17024         LIBS="$ol_LIBS"
17025
17026 fi
17027
17028 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17029
17030         if test $ol_cv_db_db_4 = yes ; then
17031                 ol_cv_lib_db=-ldb-4
17032         fi
17033 fi
17034
17035 if test $ol_cv_lib_db = no ; then
17036         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17037 echo "configure:17038: checking for Berkeley DB link (-ldb)" >&5
17038 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17039   echo $ac_n "(cached) $ac_c" 1>&6
17040 else
17041   
17042         ol_DB_LIB=-ldb
17043         ol_LIBS=$LIBS
17044         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17045
17046         cat > conftest.$ac_ext <<EOF
17047 #line 17048 "configure"
17048 #include "confdefs.h"
17049
17050 #ifdef HAVE_DB_185_H
17051 # include <db_185.h>
17052 #else
17053 # include <db.h>
17054 #endif
17055
17056 #ifndef DB_VERSION_MAJOR
17057 # define DB_VERSION_MAJOR 1
17058 #endif
17059
17060 #ifndef NULL
17061 #define NULL ((void*)0)
17062 #endif
17063
17064 int main() {
17065
17066 #if DB_VERSION_MAJOR > 1
17067         {
17068                 char *version;
17069                 int major, minor, patch;
17070
17071                 version = db_version( &major, &minor, &patch );
17072
17073                 if( major != DB_VERSION_MAJOR ||
17074                         minor < DB_VERSION_MINOR )
17075                 {
17076                         printf("Berkeley DB version mismatch\n"
17077                                 "\texpected: %s\n\tgot: %s\n",
17078                                 DB_VERSION_STRING, version);
17079                         return 1;
17080                 }
17081         }
17082 #endif
17083
17084 #if DB_VERSION_MAJOR > 2
17085         db_env_create( NULL, 0 );
17086 #elif DB_VERSION_MAJOR > 1
17087         db_appexit( NULL );
17088 #else
17089         (void) dbopen( NULL, 0, 0, 0, NULL);
17090 #endif
17091
17092 ; return 0; }
17093 EOF
17094 if { (eval echo configure:17095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17095   rm -rf conftest*
17096   ol_cv_db_db=yes
17097 else
17098   echo "configure: failed program was:" >&5
17099   cat conftest.$ac_ext >&5
17100   rm -rf conftest*
17101   ol_cv_db_db=no
17102 fi
17103 rm -f conftest*
17104
17105         LIBS="$ol_LIBS"
17106
17107 fi
17108
17109 echo "$ac_t""$ol_cv_db_db" 1>&6
17110
17111         if test $ol_cv_db_db = yes ; then
17112                 ol_cv_lib_db=-ldb
17113         fi
17114 fi
17115
17116 if test $ol_cv_lib_db = no ; then
17117         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17118 echo "configure:17119: checking for Berkeley DB link (-ldb3)" >&5
17119 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17120   echo $ac_n "(cached) $ac_c" 1>&6
17121 else
17122   
17123         ol_DB_LIB=-ldb3
17124         ol_LIBS=$LIBS
17125         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17126
17127         cat > conftest.$ac_ext <<EOF
17128 #line 17129 "configure"
17129 #include "confdefs.h"
17130
17131 #ifdef HAVE_DB_185_H
17132 # include <db_185.h>
17133 #else
17134 # include <db.h>
17135 #endif
17136
17137 #ifndef DB_VERSION_MAJOR
17138 # define DB_VERSION_MAJOR 1
17139 #endif
17140
17141 #ifndef NULL
17142 #define NULL ((void*)0)
17143 #endif
17144
17145 int main() {
17146
17147 #if DB_VERSION_MAJOR > 1
17148         {
17149                 char *version;
17150                 int major, minor, patch;
17151
17152                 version = db_version( &major, &minor, &patch );
17153
17154                 if( major != DB_VERSION_MAJOR ||
17155                         minor < DB_VERSION_MINOR )
17156                 {
17157                         printf("Berkeley DB version mismatch\n"
17158                                 "\texpected: %s\n\tgot: %s\n",
17159                                 DB_VERSION_STRING, version);
17160                         return 1;
17161                 }
17162         }
17163 #endif
17164
17165 #if DB_VERSION_MAJOR > 2
17166         db_env_create( NULL, 0 );
17167 #elif DB_VERSION_MAJOR > 1
17168         db_appexit( NULL );
17169 #else
17170         (void) dbopen( NULL, 0, 0, 0, NULL);
17171 #endif
17172
17173 ; return 0; }
17174 EOF
17175 if { (eval echo configure:17176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17176   rm -rf conftest*
17177   ol_cv_db_db3=yes
17178 else
17179   echo "configure: failed program was:" >&5
17180   cat conftest.$ac_ext >&5
17181   rm -rf conftest*
17182   ol_cv_db_db3=no
17183 fi
17184 rm -f conftest*
17185
17186         LIBS="$ol_LIBS"
17187
17188 fi
17189
17190 echo "$ac_t""$ol_cv_db_db3" 1>&6
17191
17192         if test $ol_cv_db_db3 = yes ; then
17193                 ol_cv_lib_db=-ldb3
17194         fi
17195 fi
17196
17197 if test $ol_cv_lib_db = no ; then
17198         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17199 echo "configure:17200: checking for Berkeley DB link (-ldb-3)" >&5
17200 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17201   echo $ac_n "(cached) $ac_c" 1>&6
17202 else
17203   
17204         ol_DB_LIB=-ldb-3
17205         ol_LIBS=$LIBS
17206         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17207
17208         cat > conftest.$ac_ext <<EOF
17209 #line 17210 "configure"
17210 #include "confdefs.h"
17211
17212 #ifdef HAVE_DB_185_H
17213 # include <db_185.h>
17214 #else
17215 # include <db.h>
17216 #endif
17217
17218 #ifndef DB_VERSION_MAJOR
17219 # define DB_VERSION_MAJOR 1
17220 #endif
17221
17222 #ifndef NULL
17223 #define NULL ((void*)0)
17224 #endif
17225
17226 int main() {
17227
17228 #if DB_VERSION_MAJOR > 1
17229         {
17230                 char *version;
17231                 int major, minor, patch;
17232
17233                 version = db_version( &major, &minor, &patch );
17234
17235                 if( major != DB_VERSION_MAJOR ||
17236                         minor < DB_VERSION_MINOR )
17237                 {
17238                         printf("Berkeley DB version mismatch\n"
17239                                 "\texpected: %s\n\tgot: %s\n",
17240                                 DB_VERSION_STRING, version);
17241                         return 1;
17242                 }
17243         }
17244 #endif
17245
17246 #if DB_VERSION_MAJOR > 2
17247         db_env_create( NULL, 0 );
17248 #elif DB_VERSION_MAJOR > 1
17249         db_appexit( NULL );
17250 #else
17251         (void) dbopen( NULL, 0, 0, 0, NULL);
17252 #endif
17253
17254 ; return 0; }
17255 EOF
17256 if { (eval echo configure:17257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17257   rm -rf conftest*
17258   ol_cv_db_db_3=yes
17259 else
17260   echo "configure: failed program was:" >&5
17261   cat conftest.$ac_ext >&5
17262   rm -rf conftest*
17263   ol_cv_db_db_3=no
17264 fi
17265 rm -f conftest*
17266
17267         LIBS="$ol_LIBS"
17268
17269 fi
17270
17271 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17272
17273         if test $ol_cv_db_db_3 = yes ; then
17274                 ol_cv_lib_db=-ldb-3
17275         fi
17276 fi
17277
17278 if test $ol_cv_lib_db = no ; then
17279         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17280 echo "configure:17281: checking for Berkeley DB link (-ldb2)" >&5
17281 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17282   echo $ac_n "(cached) $ac_c" 1>&6
17283 else
17284   
17285         ol_DB_LIB=-ldb2
17286         ol_LIBS=$LIBS
17287         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17288
17289         cat > conftest.$ac_ext <<EOF
17290 #line 17291 "configure"
17291 #include "confdefs.h"
17292
17293 #ifdef HAVE_DB_185_H
17294 # include <db_185.h>
17295 #else
17296 # include <db.h>
17297 #endif
17298
17299 #ifndef DB_VERSION_MAJOR
17300 # define DB_VERSION_MAJOR 1
17301 #endif
17302
17303 #ifndef NULL
17304 #define NULL ((void*)0)
17305 #endif
17306
17307 int main() {
17308
17309 #if DB_VERSION_MAJOR > 1
17310         {
17311                 char *version;
17312                 int major, minor, patch;
17313
17314                 version = db_version( &major, &minor, &patch );
17315
17316                 if( major != DB_VERSION_MAJOR ||
17317                         minor < DB_VERSION_MINOR )
17318                 {
17319                         printf("Berkeley DB version mismatch\n"
17320                                 "\texpected: %s\n\tgot: %s\n",
17321                                 DB_VERSION_STRING, version);
17322                         return 1;
17323                 }
17324         }
17325 #endif
17326
17327 #if DB_VERSION_MAJOR > 2
17328         db_env_create( NULL, 0 );
17329 #elif DB_VERSION_MAJOR > 1
17330         db_appexit( NULL );
17331 #else
17332         (void) dbopen( NULL, 0, 0, 0, NULL);
17333 #endif
17334
17335 ; return 0; }
17336 EOF
17337 if { (eval echo configure:17338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17338   rm -rf conftest*
17339   ol_cv_db_db2=yes
17340 else
17341   echo "configure: failed program was:" >&5
17342   cat conftest.$ac_ext >&5
17343   rm -rf conftest*
17344   ol_cv_db_db2=no
17345 fi
17346 rm -f conftest*
17347
17348         LIBS="$ol_LIBS"
17349
17350 fi
17351
17352 echo "$ac_t""$ol_cv_db_db2" 1>&6
17353
17354         if test $ol_cv_db_db2 = yes ; then
17355                 ol_cv_lib_db=-ldb2
17356         fi
17357 fi
17358
17359 if test $ol_cv_lib_db = no ; then
17360         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17361 echo "configure:17362: checking for Berkeley DB link (-ldb-2)" >&5
17362 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17363   echo $ac_n "(cached) $ac_c" 1>&6
17364 else
17365   
17366         ol_DB_LIB=-ldb-2
17367         ol_LIBS=$LIBS
17368         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17369
17370         cat > conftest.$ac_ext <<EOF
17371 #line 17372 "configure"
17372 #include "confdefs.h"
17373
17374 #ifdef HAVE_DB_185_H
17375 # include <db_185.h>
17376 #else
17377 # include <db.h>
17378 #endif
17379
17380 #ifndef DB_VERSION_MAJOR
17381 # define DB_VERSION_MAJOR 1
17382 #endif
17383
17384 #ifndef NULL
17385 #define NULL ((void*)0)
17386 #endif
17387
17388 int main() {
17389
17390 #if DB_VERSION_MAJOR > 1
17391         {
17392                 char *version;
17393                 int major, minor, patch;
17394
17395                 version = db_version( &major, &minor, &patch );
17396
17397                 if( major != DB_VERSION_MAJOR ||
17398                         minor < DB_VERSION_MINOR )
17399                 {
17400                         printf("Berkeley DB version mismatch\n"
17401                                 "\texpected: %s\n\tgot: %s\n",
17402                                 DB_VERSION_STRING, version);
17403                         return 1;
17404                 }
17405         }
17406 #endif
17407
17408 #if DB_VERSION_MAJOR > 2
17409         db_env_create( NULL, 0 );
17410 #elif DB_VERSION_MAJOR > 1
17411         db_appexit( NULL );
17412 #else
17413         (void) dbopen( NULL, 0, 0, 0, NULL);
17414 #endif
17415
17416 ; return 0; }
17417 EOF
17418 if { (eval echo configure:17419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17419   rm -rf conftest*
17420   ol_cv_db_db_2=yes
17421 else
17422   echo "configure: failed program was:" >&5
17423   cat conftest.$ac_ext >&5
17424   rm -rf conftest*
17425   ol_cv_db_db_2=no
17426 fi
17427 rm -f conftest*
17428
17429         LIBS="$ol_LIBS"
17430
17431 fi
17432
17433 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17434
17435         if test $ol_cv_db_db_2 = yes ; then
17436                 ol_cv_lib_db=-ldb-2
17437         fi
17438 fi
17439
17440 if test $ol_cv_lib_db = no ; then
17441         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17442 echo "configure:17443: checking for Berkeley DB link (-ldb1)" >&5
17443 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17444   echo $ac_n "(cached) $ac_c" 1>&6
17445 else
17446   
17447         ol_DB_LIB=-ldb1
17448         ol_LIBS=$LIBS
17449         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17450
17451         cat > conftest.$ac_ext <<EOF
17452 #line 17453 "configure"
17453 #include "confdefs.h"
17454
17455 #ifdef HAVE_DB_185_H
17456 # include <db_185.h>
17457 #else
17458 # include <db.h>
17459 #endif
17460
17461 #ifndef DB_VERSION_MAJOR
17462 # define DB_VERSION_MAJOR 1
17463 #endif
17464
17465 #ifndef NULL
17466 #define NULL ((void*)0)
17467 #endif
17468
17469 int main() {
17470
17471 #if DB_VERSION_MAJOR > 1
17472         {
17473                 char *version;
17474                 int major, minor, patch;
17475
17476                 version = db_version( &major, &minor, &patch );
17477
17478                 if( major != DB_VERSION_MAJOR ||
17479                         minor < DB_VERSION_MINOR )
17480                 {
17481                         printf("Berkeley DB version mismatch\n"
17482                                 "\texpected: %s\n\tgot: %s\n",
17483                                 DB_VERSION_STRING, version);
17484                         return 1;
17485                 }
17486         }
17487 #endif
17488
17489 #if DB_VERSION_MAJOR > 2
17490         db_env_create( NULL, 0 );
17491 #elif DB_VERSION_MAJOR > 1
17492         db_appexit( NULL );
17493 #else
17494         (void) dbopen( NULL, 0, 0, 0, NULL);
17495 #endif
17496
17497 ; return 0; }
17498 EOF
17499 if { (eval echo configure:17500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17500   rm -rf conftest*
17501   ol_cv_db_db1=yes
17502 else
17503   echo "configure: failed program was:" >&5
17504   cat conftest.$ac_ext >&5
17505   rm -rf conftest*
17506   ol_cv_db_db1=no
17507 fi
17508 rm -f conftest*
17509
17510         LIBS="$ol_LIBS"
17511
17512 fi
17513
17514 echo "$ac_t""$ol_cv_db_db1" 1>&6
17515
17516         if test $ol_cv_db_db1 = yes ; then
17517                 ol_cv_lib_db=-ldb1
17518         fi
17519 fi
17520
17521 if test $ol_cv_lib_db = no ; then
17522         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17523 echo "configure:17524: checking for Berkeley DB link (-ldb-1)" >&5
17524 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17525   echo $ac_n "(cached) $ac_c" 1>&6
17526 else
17527   
17528         ol_DB_LIB=-ldb-1
17529         ol_LIBS=$LIBS
17530         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17531
17532         cat > conftest.$ac_ext <<EOF
17533 #line 17534 "configure"
17534 #include "confdefs.h"
17535
17536 #ifdef HAVE_DB_185_H
17537 # include <db_185.h>
17538 #else
17539 # include <db.h>
17540 #endif
17541
17542 #ifndef DB_VERSION_MAJOR
17543 # define DB_VERSION_MAJOR 1
17544 #endif
17545
17546 #ifndef NULL
17547 #define NULL ((void*)0)
17548 #endif
17549
17550 int main() {
17551
17552 #if DB_VERSION_MAJOR > 1
17553         {
17554                 char *version;
17555                 int major, minor, patch;
17556
17557                 version = db_version( &major, &minor, &patch );
17558
17559                 if( major != DB_VERSION_MAJOR ||
17560                         minor < DB_VERSION_MINOR )
17561                 {
17562                         printf("Berkeley DB version mismatch\n"
17563                                 "\texpected: %s\n\tgot: %s\n",
17564                                 DB_VERSION_STRING, version);
17565                         return 1;
17566                 }
17567         }
17568 #endif
17569
17570 #if DB_VERSION_MAJOR > 2
17571         db_env_create( NULL, 0 );
17572 #elif DB_VERSION_MAJOR > 1
17573         db_appexit( NULL );
17574 #else
17575         (void) dbopen( NULL, 0, 0, 0, NULL);
17576 #endif
17577
17578 ; return 0; }
17579 EOF
17580 if { (eval echo configure:17581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17581   rm -rf conftest*
17582   ol_cv_db_db_1=yes
17583 else
17584   echo "configure: failed program was:" >&5
17585   cat conftest.$ac_ext >&5
17586   rm -rf conftest*
17587   ol_cv_db_db_1=no
17588 fi
17589 rm -f conftest*
17590
17591         LIBS="$ol_LIBS"
17592
17593 fi
17594
17595 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17596
17597         if test $ol_cv_db_db_1 = yes ; then
17598                 ol_cv_lib_db=-ldb-1
17599         fi
17600 fi
17601
17602
17603                 if test "$ol_cv_lib_db" != no ; then
17604                         ol_cv_berkeley_db=yes
17605                 fi
17606         fi
17607 fi
17608
17609         else
17610                 ol_cv_berkeley_db=no
17611 for ac_hdr in db.h
17612 do
17613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17614 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17615 echo "configure:17616: checking for $ac_hdr" >&5
17616 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17617   echo $ac_n "(cached) $ac_c" 1>&6
17618 else
17619   cat > conftest.$ac_ext <<EOF
17620 #line 17621 "configure"
17621 #include "confdefs.h"
17622 #include <$ac_hdr>
17623 EOF
17624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17625 { (eval echo configure:17626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17627 if test -z "$ac_err"; then
17628   rm -rf conftest*
17629   eval "ac_cv_header_$ac_safe=yes"
17630 else
17631   echo "$ac_err" >&5
17632   echo "configure: failed program was:" >&5
17633   cat conftest.$ac_ext >&5
17634   rm -rf conftest*
17635   eval "ac_cv_header_$ac_safe=no"
17636 fi
17637 rm -f conftest*
17638 fi
17639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17640   echo "$ac_t""yes" 1>&6
17641     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17642   cat >> confdefs.h <<EOF
17643 #define $ac_tr_hdr 1
17644 EOF
17645  
17646 else
17647   echo "$ac_t""no" 1>&6
17648 fi
17649 done
17650
17651 if test $ac_cv_header_db_h = yes; then
17652         ol_cv_lib_db=no
17653 if test $ol_cv_lib_db = no ; then
17654         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17655 echo "configure:17656: checking for Berkeley DB link (default)" >&5
17656 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17657   echo $ac_n "(cached) $ac_c" 1>&6
17658 else
17659   
17660         ol_DB_LIB=
17661         ol_LIBS=$LIBS
17662         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17663
17664         cat > conftest.$ac_ext <<EOF
17665 #line 17666 "configure"
17666 #include "confdefs.h"
17667
17668 #ifdef HAVE_DB_185_H
17669 # include <db_185.h>
17670 #else
17671 # include <db.h>
17672 #endif
17673
17674 #ifndef DB_VERSION_MAJOR
17675 # define DB_VERSION_MAJOR 1
17676 #endif
17677
17678 #ifndef NULL
17679 #define NULL ((void*)0)
17680 #endif
17681
17682 int main() {
17683
17684 #if DB_VERSION_MAJOR > 1
17685         {
17686                 char *version;
17687                 int major, minor, patch;
17688
17689                 version = db_version( &major, &minor, &patch );
17690
17691                 if( major != DB_VERSION_MAJOR ||
17692                         minor < DB_VERSION_MINOR )
17693                 {
17694                         printf("Berkeley DB version mismatch\n"
17695                                 "\texpected: %s\n\tgot: %s\n",
17696                                 DB_VERSION_STRING, version);
17697                         return 1;
17698                 }
17699         }
17700 #endif
17701
17702 #if DB_VERSION_MAJOR > 2
17703         db_env_create( NULL, 0 );
17704 #elif DB_VERSION_MAJOR > 1
17705         db_appexit( NULL );
17706 #else
17707         (void) dbopen( NULL, 0, 0, 0, NULL);
17708 #endif
17709
17710 ; return 0; }
17711 EOF
17712 if { (eval echo configure:17713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17713   rm -rf conftest*
17714   ol_cv_db_none=yes
17715 else
17716   echo "configure: failed program was:" >&5
17717   cat conftest.$ac_ext >&5
17718   rm -rf conftest*
17719   ol_cv_db_none=no
17720 fi
17721 rm -f conftest*
17722
17723         LIBS="$ol_LIBS"
17724
17725 fi
17726
17727 echo "$ac_t""$ol_cv_db_none" 1>&6
17728
17729         if test $ol_cv_db_none = yes ; then
17730                 ol_cv_lib_db=yes
17731         fi
17732 fi
17733
17734 if test $ol_cv_lib_db = no ; then
17735         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17736 echo "configure:17737: checking for Berkeley DB link (-ldb41)" >&5
17737 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17738   echo $ac_n "(cached) $ac_c" 1>&6
17739 else
17740   
17741         ol_DB_LIB=-ldb41
17742         ol_LIBS=$LIBS
17743         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17744
17745         cat > conftest.$ac_ext <<EOF
17746 #line 17747 "configure"
17747 #include "confdefs.h"
17748
17749 #ifdef HAVE_DB_185_H
17750 # include <db_185.h>
17751 #else
17752 # include <db.h>
17753 #endif
17754
17755 #ifndef DB_VERSION_MAJOR
17756 # define DB_VERSION_MAJOR 1
17757 #endif
17758
17759 #ifndef NULL
17760 #define NULL ((void*)0)
17761 #endif
17762
17763 int main() {
17764
17765 #if DB_VERSION_MAJOR > 1
17766         {
17767                 char *version;
17768                 int major, minor, patch;
17769
17770                 version = db_version( &major, &minor, &patch );
17771
17772                 if( major != DB_VERSION_MAJOR ||
17773                         minor < DB_VERSION_MINOR )
17774                 {
17775                         printf("Berkeley DB version mismatch\n"
17776                                 "\texpected: %s\n\tgot: %s\n",
17777                                 DB_VERSION_STRING, version);
17778                         return 1;
17779                 }
17780         }
17781 #endif
17782
17783 #if DB_VERSION_MAJOR > 2
17784         db_env_create( NULL, 0 );
17785 #elif DB_VERSION_MAJOR > 1
17786         db_appexit( NULL );
17787 #else
17788         (void) dbopen( NULL, 0, 0, 0, NULL);
17789 #endif
17790
17791 ; return 0; }
17792 EOF
17793 if { (eval echo configure:17794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17794   rm -rf conftest*
17795   ol_cv_db_db41=yes
17796 else
17797   echo "configure: failed program was:" >&5
17798   cat conftest.$ac_ext >&5
17799   rm -rf conftest*
17800   ol_cv_db_db41=no
17801 fi
17802 rm -f conftest*
17803
17804         LIBS="$ol_LIBS"
17805
17806 fi
17807
17808 echo "$ac_t""$ol_cv_db_db41" 1>&6
17809
17810         if test $ol_cv_db_db41 = yes ; then
17811                 ol_cv_lib_db=-ldb41
17812         fi
17813 fi
17814
17815 if test $ol_cv_lib_db = no ; then
17816         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17817 echo "configure:17818: checking for Berkeley DB link (-ldb-41)" >&5
17818 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17819   echo $ac_n "(cached) $ac_c" 1>&6
17820 else
17821   
17822         ol_DB_LIB=-ldb-41
17823         ol_LIBS=$LIBS
17824         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17825
17826         cat > conftest.$ac_ext <<EOF
17827 #line 17828 "configure"
17828 #include "confdefs.h"
17829
17830 #ifdef HAVE_DB_185_H
17831 # include <db_185.h>
17832 #else
17833 # include <db.h>
17834 #endif
17835
17836 #ifndef DB_VERSION_MAJOR
17837 # define DB_VERSION_MAJOR 1
17838 #endif
17839
17840 #ifndef NULL
17841 #define NULL ((void*)0)
17842 #endif
17843
17844 int main() {
17845
17846 #if DB_VERSION_MAJOR > 1
17847         {
17848                 char *version;
17849                 int major, minor, patch;
17850
17851                 version = db_version( &major, &minor, &patch );
17852
17853                 if( major != DB_VERSION_MAJOR ||
17854                         minor < DB_VERSION_MINOR )
17855                 {
17856                         printf("Berkeley DB version mismatch\n"
17857                                 "\texpected: %s\n\tgot: %s\n",
17858                                 DB_VERSION_STRING, version);
17859                         return 1;
17860                 }
17861         }
17862 #endif
17863
17864 #if DB_VERSION_MAJOR > 2
17865         db_env_create( NULL, 0 );
17866 #elif DB_VERSION_MAJOR > 1
17867         db_appexit( NULL );
17868 #else
17869         (void) dbopen( NULL, 0, 0, 0, NULL);
17870 #endif
17871
17872 ; return 0; }
17873 EOF
17874 if { (eval echo configure:17875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17875   rm -rf conftest*
17876   ol_cv_db_db_41=yes
17877 else
17878   echo "configure: failed program was:" >&5
17879   cat conftest.$ac_ext >&5
17880   rm -rf conftest*
17881   ol_cv_db_db_41=no
17882 fi
17883 rm -f conftest*
17884
17885         LIBS="$ol_LIBS"
17886
17887 fi
17888
17889 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17890
17891         if test $ol_cv_db_db_41 = yes ; then
17892                 ol_cv_lib_db=-ldb-41
17893         fi
17894 fi
17895
17896 if test $ol_cv_lib_db = no ; then
17897         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17898 echo "configure:17899: checking for Berkeley DB link (-ldb4)" >&5
17899 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17900   echo $ac_n "(cached) $ac_c" 1>&6
17901 else
17902   
17903         ol_DB_LIB=-ldb4
17904         ol_LIBS=$LIBS
17905         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17906
17907         cat > conftest.$ac_ext <<EOF
17908 #line 17909 "configure"
17909 #include "confdefs.h"
17910
17911 #ifdef HAVE_DB_185_H
17912 # include <db_185.h>
17913 #else
17914 # include <db.h>
17915 #endif
17916
17917 #ifndef DB_VERSION_MAJOR
17918 # define DB_VERSION_MAJOR 1
17919 #endif
17920
17921 #ifndef NULL
17922 #define NULL ((void*)0)
17923 #endif
17924
17925 int main() {
17926
17927 #if DB_VERSION_MAJOR > 1
17928         {
17929                 char *version;
17930                 int major, minor, patch;
17931
17932                 version = db_version( &major, &minor, &patch );
17933
17934                 if( major != DB_VERSION_MAJOR ||
17935                         minor < DB_VERSION_MINOR )
17936                 {
17937                         printf("Berkeley DB version mismatch\n"
17938                                 "\texpected: %s\n\tgot: %s\n",
17939                                 DB_VERSION_STRING, version);
17940                         return 1;
17941                 }
17942         }
17943 #endif
17944
17945 #if DB_VERSION_MAJOR > 2
17946         db_env_create( NULL, 0 );
17947 #elif DB_VERSION_MAJOR > 1
17948         db_appexit( NULL );
17949 #else
17950         (void) dbopen( NULL, 0, 0, 0, NULL);
17951 #endif
17952
17953 ; return 0; }
17954 EOF
17955 if { (eval echo configure:17956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17956   rm -rf conftest*
17957   ol_cv_db_db4=yes
17958 else
17959   echo "configure: failed program was:" >&5
17960   cat conftest.$ac_ext >&5
17961   rm -rf conftest*
17962   ol_cv_db_db4=no
17963 fi
17964 rm -f conftest*
17965
17966         LIBS="$ol_LIBS"
17967
17968 fi
17969
17970 echo "$ac_t""$ol_cv_db_db4" 1>&6
17971
17972         if test $ol_cv_db_db4 = yes ; then
17973                 ol_cv_lib_db=-ldb4
17974         fi
17975 fi
17976
17977 if test $ol_cv_lib_db = no ; then
17978         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17979 echo "configure:17980: checking for Berkeley DB link (-ldb-4)" >&5
17980 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17981   echo $ac_n "(cached) $ac_c" 1>&6
17982 else
17983   
17984         ol_DB_LIB=-ldb-4
17985         ol_LIBS=$LIBS
17986         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17987
17988         cat > conftest.$ac_ext <<EOF
17989 #line 17990 "configure"
17990 #include "confdefs.h"
17991
17992 #ifdef HAVE_DB_185_H
17993 # include <db_185.h>
17994 #else
17995 # include <db.h>
17996 #endif
17997
17998 #ifndef DB_VERSION_MAJOR
17999 # define DB_VERSION_MAJOR 1
18000 #endif
18001
18002 #ifndef NULL
18003 #define NULL ((void*)0)
18004 #endif
18005
18006 int main() {
18007
18008 #if DB_VERSION_MAJOR > 1
18009         {
18010                 char *version;
18011                 int major, minor, patch;
18012
18013                 version = db_version( &major, &minor, &patch );
18014
18015                 if( major != DB_VERSION_MAJOR ||
18016                         minor < DB_VERSION_MINOR )
18017                 {
18018                         printf("Berkeley DB version mismatch\n"
18019                                 "\texpected: %s\n\tgot: %s\n",
18020                                 DB_VERSION_STRING, version);
18021                         return 1;
18022                 }
18023         }
18024 #endif
18025
18026 #if DB_VERSION_MAJOR > 2
18027         db_env_create( NULL, 0 );
18028 #elif DB_VERSION_MAJOR > 1
18029         db_appexit( NULL );
18030 #else
18031         (void) dbopen( NULL, 0, 0, 0, NULL);
18032 #endif
18033
18034 ; return 0; }
18035 EOF
18036 if { (eval echo configure:18037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18037   rm -rf conftest*
18038   ol_cv_db_db_4=yes
18039 else
18040   echo "configure: failed program was:" >&5
18041   cat conftest.$ac_ext >&5
18042   rm -rf conftest*
18043   ol_cv_db_db_4=no
18044 fi
18045 rm -f conftest*
18046
18047         LIBS="$ol_LIBS"
18048
18049 fi
18050
18051 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18052
18053         if test $ol_cv_db_db_4 = yes ; then
18054                 ol_cv_lib_db=-ldb-4
18055         fi
18056 fi
18057
18058 if test $ol_cv_lib_db = no ; then
18059         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18060 echo "configure:18061: checking for Berkeley DB link (-ldb)" >&5
18061 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18062   echo $ac_n "(cached) $ac_c" 1>&6
18063 else
18064   
18065         ol_DB_LIB=-ldb
18066         ol_LIBS=$LIBS
18067         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18068
18069         cat > conftest.$ac_ext <<EOF
18070 #line 18071 "configure"
18071 #include "confdefs.h"
18072
18073 #ifdef HAVE_DB_185_H
18074 # include <db_185.h>
18075 #else
18076 # include <db.h>
18077 #endif
18078
18079 #ifndef DB_VERSION_MAJOR
18080 # define DB_VERSION_MAJOR 1
18081 #endif
18082
18083 #ifndef NULL
18084 #define NULL ((void*)0)
18085 #endif
18086
18087 int main() {
18088
18089 #if DB_VERSION_MAJOR > 1
18090         {
18091                 char *version;
18092                 int major, minor, patch;
18093
18094                 version = db_version( &major, &minor, &patch );
18095
18096                 if( major != DB_VERSION_MAJOR ||
18097                         minor < DB_VERSION_MINOR )
18098                 {
18099                         printf("Berkeley DB version mismatch\n"
18100                                 "\texpected: %s\n\tgot: %s\n",
18101                                 DB_VERSION_STRING, version);
18102                         return 1;
18103                 }
18104         }
18105 #endif
18106
18107 #if DB_VERSION_MAJOR > 2
18108         db_env_create( NULL, 0 );
18109 #elif DB_VERSION_MAJOR > 1
18110         db_appexit( NULL );
18111 #else
18112         (void) dbopen( NULL, 0, 0, 0, NULL);
18113 #endif
18114
18115 ; return 0; }
18116 EOF
18117 if { (eval echo configure:18118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18118   rm -rf conftest*
18119   ol_cv_db_db=yes
18120 else
18121   echo "configure: failed program was:" >&5
18122   cat conftest.$ac_ext >&5
18123   rm -rf conftest*
18124   ol_cv_db_db=no
18125 fi
18126 rm -f conftest*
18127
18128         LIBS="$ol_LIBS"
18129
18130 fi
18131
18132 echo "$ac_t""$ol_cv_db_db" 1>&6
18133
18134         if test $ol_cv_db_db = yes ; then
18135                 ol_cv_lib_db=-ldb
18136         fi
18137 fi
18138
18139 if test $ol_cv_lib_db = no ; then
18140         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18141 echo "configure:18142: checking for Berkeley DB link (-ldb3)" >&5
18142 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18143   echo $ac_n "(cached) $ac_c" 1>&6
18144 else
18145   
18146         ol_DB_LIB=-ldb3
18147         ol_LIBS=$LIBS
18148         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18149
18150         cat > conftest.$ac_ext <<EOF
18151 #line 18152 "configure"
18152 #include "confdefs.h"
18153
18154 #ifdef HAVE_DB_185_H
18155 # include <db_185.h>
18156 #else
18157 # include <db.h>
18158 #endif
18159
18160 #ifndef DB_VERSION_MAJOR
18161 # define DB_VERSION_MAJOR 1
18162 #endif
18163
18164 #ifndef NULL
18165 #define NULL ((void*)0)
18166 #endif
18167
18168 int main() {
18169
18170 #if DB_VERSION_MAJOR > 1
18171         {
18172                 char *version;
18173                 int major, minor, patch;
18174
18175                 version = db_version( &major, &minor, &patch );
18176
18177                 if( major != DB_VERSION_MAJOR ||
18178                         minor < DB_VERSION_MINOR )
18179                 {
18180                         printf("Berkeley DB version mismatch\n"
18181                                 "\texpected: %s\n\tgot: %s\n",
18182                                 DB_VERSION_STRING, version);
18183                         return 1;
18184                 }
18185         }
18186 #endif
18187
18188 #if DB_VERSION_MAJOR > 2
18189         db_env_create( NULL, 0 );
18190 #elif DB_VERSION_MAJOR > 1
18191         db_appexit( NULL );
18192 #else
18193         (void) dbopen( NULL, 0, 0, 0, NULL);
18194 #endif
18195
18196 ; return 0; }
18197 EOF
18198 if { (eval echo configure:18199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18199   rm -rf conftest*
18200   ol_cv_db_db3=yes
18201 else
18202   echo "configure: failed program was:" >&5
18203   cat conftest.$ac_ext >&5
18204   rm -rf conftest*
18205   ol_cv_db_db3=no
18206 fi
18207 rm -f conftest*
18208
18209         LIBS="$ol_LIBS"
18210
18211 fi
18212
18213 echo "$ac_t""$ol_cv_db_db3" 1>&6
18214
18215         if test $ol_cv_db_db3 = yes ; then
18216                 ol_cv_lib_db=-ldb3
18217         fi
18218 fi
18219
18220 if test $ol_cv_lib_db = no ; then
18221         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18222 echo "configure:18223: checking for Berkeley DB link (-ldb-3)" >&5
18223 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18224   echo $ac_n "(cached) $ac_c" 1>&6
18225 else
18226   
18227         ol_DB_LIB=-ldb-3
18228         ol_LIBS=$LIBS
18229         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18230
18231         cat > conftest.$ac_ext <<EOF
18232 #line 18233 "configure"
18233 #include "confdefs.h"
18234
18235 #ifdef HAVE_DB_185_H
18236 # include <db_185.h>
18237 #else
18238 # include <db.h>
18239 #endif
18240
18241 #ifndef DB_VERSION_MAJOR
18242 # define DB_VERSION_MAJOR 1
18243 #endif
18244
18245 #ifndef NULL
18246 #define NULL ((void*)0)
18247 #endif
18248
18249 int main() {
18250
18251 #if DB_VERSION_MAJOR > 1
18252         {
18253                 char *version;
18254                 int major, minor, patch;
18255
18256                 version = db_version( &major, &minor, &patch );
18257
18258                 if( major != DB_VERSION_MAJOR ||
18259                         minor < DB_VERSION_MINOR )
18260                 {
18261                         printf("Berkeley DB version mismatch\n"
18262                                 "\texpected: %s\n\tgot: %s\n",
18263                                 DB_VERSION_STRING, version);
18264                         return 1;
18265                 }
18266         }
18267 #endif
18268
18269 #if DB_VERSION_MAJOR > 2
18270         db_env_create( NULL, 0 );
18271 #elif DB_VERSION_MAJOR > 1
18272         db_appexit( NULL );
18273 #else
18274         (void) dbopen( NULL, 0, 0, 0, NULL);
18275 #endif
18276
18277 ; return 0; }
18278 EOF
18279 if { (eval echo configure:18280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18280   rm -rf conftest*
18281   ol_cv_db_db_3=yes
18282 else
18283   echo "configure: failed program was:" >&5
18284   cat conftest.$ac_ext >&5
18285   rm -rf conftest*
18286   ol_cv_db_db_3=no
18287 fi
18288 rm -f conftest*
18289
18290         LIBS="$ol_LIBS"
18291
18292 fi
18293
18294 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18295
18296         if test $ol_cv_db_db_3 = yes ; then
18297                 ol_cv_lib_db=-ldb-3
18298         fi
18299 fi
18300
18301 if test $ol_cv_lib_db = no ; then
18302         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18303 echo "configure:18304: checking for Berkeley DB link (-ldb2)" >&5
18304 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18305   echo $ac_n "(cached) $ac_c" 1>&6
18306 else
18307   
18308         ol_DB_LIB=-ldb2
18309         ol_LIBS=$LIBS
18310         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18311
18312         cat > conftest.$ac_ext <<EOF
18313 #line 18314 "configure"
18314 #include "confdefs.h"
18315
18316 #ifdef HAVE_DB_185_H
18317 # include <db_185.h>
18318 #else
18319 # include <db.h>
18320 #endif
18321
18322 #ifndef DB_VERSION_MAJOR
18323 # define DB_VERSION_MAJOR 1
18324 #endif
18325
18326 #ifndef NULL
18327 #define NULL ((void*)0)
18328 #endif
18329
18330 int main() {
18331
18332 #if DB_VERSION_MAJOR > 1
18333         {
18334                 char *version;
18335                 int major, minor, patch;
18336
18337                 version = db_version( &major, &minor, &patch );
18338
18339                 if( major != DB_VERSION_MAJOR ||
18340                         minor < DB_VERSION_MINOR )
18341                 {
18342                         printf("Berkeley DB version mismatch\n"
18343                                 "\texpected: %s\n\tgot: %s\n",
18344                                 DB_VERSION_STRING, version);
18345                         return 1;
18346                 }
18347         }
18348 #endif
18349
18350 #if DB_VERSION_MAJOR > 2
18351         db_env_create( NULL, 0 );
18352 #elif DB_VERSION_MAJOR > 1
18353         db_appexit( NULL );
18354 #else
18355         (void) dbopen( NULL, 0, 0, 0, NULL);
18356 #endif
18357
18358 ; return 0; }
18359 EOF
18360 if { (eval echo configure:18361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18361   rm -rf conftest*
18362   ol_cv_db_db2=yes
18363 else
18364   echo "configure: failed program was:" >&5
18365   cat conftest.$ac_ext >&5
18366   rm -rf conftest*
18367   ol_cv_db_db2=no
18368 fi
18369 rm -f conftest*
18370
18371         LIBS="$ol_LIBS"
18372
18373 fi
18374
18375 echo "$ac_t""$ol_cv_db_db2" 1>&6
18376
18377         if test $ol_cv_db_db2 = yes ; then
18378                 ol_cv_lib_db=-ldb2
18379         fi
18380 fi
18381
18382 if test $ol_cv_lib_db = no ; then
18383         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18384 echo "configure:18385: checking for Berkeley DB link (-ldb-2)" >&5
18385 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18386   echo $ac_n "(cached) $ac_c" 1>&6
18387 else
18388   
18389         ol_DB_LIB=-ldb-2
18390         ol_LIBS=$LIBS
18391         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18392
18393         cat > conftest.$ac_ext <<EOF
18394 #line 18395 "configure"
18395 #include "confdefs.h"
18396
18397 #ifdef HAVE_DB_185_H
18398 # include <db_185.h>
18399 #else
18400 # include <db.h>
18401 #endif
18402
18403 #ifndef DB_VERSION_MAJOR
18404 # define DB_VERSION_MAJOR 1
18405 #endif
18406
18407 #ifndef NULL
18408 #define NULL ((void*)0)
18409 #endif
18410
18411 int main() {
18412
18413 #if DB_VERSION_MAJOR > 1
18414         {
18415                 char *version;
18416                 int major, minor, patch;
18417
18418                 version = db_version( &major, &minor, &patch );
18419
18420                 if( major != DB_VERSION_MAJOR ||
18421                         minor < DB_VERSION_MINOR )
18422                 {
18423                         printf("Berkeley DB version mismatch\n"
18424                                 "\texpected: %s\n\tgot: %s\n",
18425                                 DB_VERSION_STRING, version);
18426                         return 1;
18427                 }
18428         }
18429 #endif
18430
18431 #if DB_VERSION_MAJOR > 2
18432         db_env_create( NULL, 0 );
18433 #elif DB_VERSION_MAJOR > 1
18434         db_appexit( NULL );
18435 #else
18436         (void) dbopen( NULL, 0, 0, 0, NULL);
18437 #endif
18438
18439 ; return 0; }
18440 EOF
18441 if { (eval echo configure:18442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18442   rm -rf conftest*
18443   ol_cv_db_db_2=yes
18444 else
18445   echo "configure: failed program was:" >&5
18446   cat conftest.$ac_ext >&5
18447   rm -rf conftest*
18448   ol_cv_db_db_2=no
18449 fi
18450 rm -f conftest*
18451
18452         LIBS="$ol_LIBS"
18453
18454 fi
18455
18456 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18457
18458         if test $ol_cv_db_db_2 = yes ; then
18459                 ol_cv_lib_db=-ldb-2
18460         fi
18461 fi
18462
18463 if test $ol_cv_lib_db = no ; then
18464         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18465 echo "configure:18466: checking for Berkeley DB link (-ldb1)" >&5
18466 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18467   echo $ac_n "(cached) $ac_c" 1>&6
18468 else
18469   
18470         ol_DB_LIB=-ldb1
18471         ol_LIBS=$LIBS
18472         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18473
18474         cat > conftest.$ac_ext <<EOF
18475 #line 18476 "configure"
18476 #include "confdefs.h"
18477
18478 #ifdef HAVE_DB_185_H
18479 # include <db_185.h>
18480 #else
18481 # include <db.h>
18482 #endif
18483
18484 #ifndef DB_VERSION_MAJOR
18485 # define DB_VERSION_MAJOR 1
18486 #endif
18487
18488 #ifndef NULL
18489 #define NULL ((void*)0)
18490 #endif
18491
18492 int main() {
18493
18494 #if DB_VERSION_MAJOR > 1
18495         {
18496                 char *version;
18497                 int major, minor, patch;
18498
18499                 version = db_version( &major, &minor, &patch );
18500
18501                 if( major != DB_VERSION_MAJOR ||
18502                         minor < DB_VERSION_MINOR )
18503                 {
18504                         printf("Berkeley DB version mismatch\n"
18505                                 "\texpected: %s\n\tgot: %s\n",
18506                                 DB_VERSION_STRING, version);
18507                         return 1;
18508                 }
18509         }
18510 #endif
18511
18512 #if DB_VERSION_MAJOR > 2
18513         db_env_create( NULL, 0 );
18514 #elif DB_VERSION_MAJOR > 1
18515         db_appexit( NULL );
18516 #else
18517         (void) dbopen( NULL, 0, 0, 0, NULL);
18518 #endif
18519
18520 ; return 0; }
18521 EOF
18522 if { (eval echo configure:18523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18523   rm -rf conftest*
18524   ol_cv_db_db1=yes
18525 else
18526   echo "configure: failed program was:" >&5
18527   cat conftest.$ac_ext >&5
18528   rm -rf conftest*
18529   ol_cv_db_db1=no
18530 fi
18531 rm -f conftest*
18532
18533         LIBS="$ol_LIBS"
18534
18535 fi
18536
18537 echo "$ac_t""$ol_cv_db_db1" 1>&6
18538
18539         if test $ol_cv_db_db1 = yes ; then
18540                 ol_cv_lib_db=-ldb1
18541         fi
18542 fi
18543
18544 if test $ol_cv_lib_db = no ; then
18545         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18546 echo "configure:18547: checking for Berkeley DB link (-ldb-1)" >&5
18547 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18548   echo $ac_n "(cached) $ac_c" 1>&6
18549 else
18550   
18551         ol_DB_LIB=-ldb-1
18552         ol_LIBS=$LIBS
18553         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18554
18555         cat > conftest.$ac_ext <<EOF
18556 #line 18557 "configure"
18557 #include "confdefs.h"
18558
18559 #ifdef HAVE_DB_185_H
18560 # include <db_185.h>
18561 #else
18562 # include <db.h>
18563 #endif
18564
18565 #ifndef DB_VERSION_MAJOR
18566 # define DB_VERSION_MAJOR 1
18567 #endif
18568
18569 #ifndef NULL
18570 #define NULL ((void*)0)
18571 #endif
18572
18573 int main() {
18574
18575 #if DB_VERSION_MAJOR > 1
18576         {
18577                 char *version;
18578                 int major, minor, patch;
18579
18580                 version = db_version( &major, &minor, &patch );
18581
18582                 if( major != DB_VERSION_MAJOR ||
18583                         minor < DB_VERSION_MINOR )
18584                 {
18585                         printf("Berkeley DB version mismatch\n"
18586                                 "\texpected: %s\n\tgot: %s\n",
18587                                 DB_VERSION_STRING, version);
18588                         return 1;
18589                 }
18590         }
18591 #endif
18592
18593 #if DB_VERSION_MAJOR > 2
18594         db_env_create( NULL, 0 );
18595 #elif DB_VERSION_MAJOR > 1
18596         db_appexit( NULL );
18597 #else
18598         (void) dbopen( NULL, 0, 0, 0, NULL);
18599 #endif
18600
18601 ; return 0; }
18602 EOF
18603 if { (eval echo configure:18604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18604   rm -rf conftest*
18605   ol_cv_db_db_1=yes
18606 else
18607   echo "configure: failed program was:" >&5
18608   cat conftest.$ac_ext >&5
18609   rm -rf conftest*
18610   ol_cv_db_db_1=no
18611 fi
18612 rm -f conftest*
18613
18614         LIBS="$ol_LIBS"
18615
18616 fi
18617
18618 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18619
18620         if test $ol_cv_db_db_1 = yes ; then
18621                 ol_cv_lib_db=-ldb-1
18622         fi
18623 fi
18624
18625
18626         if test "$ol_cv_lib_db" != no ; then
18627                 ol_cv_berkeley_db=yes
18628                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18629 echo "configure:18630: checking for Berkeley DB thread support" >&5
18630 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18631   echo $ac_n "(cached) $ac_c" 1>&6
18632 else
18633   
18634         ol_LIBS="$LIBS"
18635         LIBS="$LTHREAD_LIBS $LIBS"
18636         if test $ol_cv_lib_db != yes ; then
18637                 LIBS="$ol_cv_lib_db $LIBS"
18638         fi
18639
18640         if test "$cross_compiling" = yes; then
18641   ol_cv_berkeley_db_thread=cross
18642 else
18643   cat > conftest.$ac_ext <<EOF
18644 #line 18645 "configure"
18645 #include "confdefs.h"
18646
18647 #ifdef HAVE_DB_185_H
18648         choke me;
18649 #else
18650 #include <db.h>
18651 #endif
18652 #ifndef NULL
18653 #define NULL ((void *)0)
18654 #endif
18655 main()
18656 {
18657         int rc;
18658         u_int32_t flags = DB_CREATE |
18659 #ifdef DB_PRIVATE
18660                 DB_PRIVATE |
18661 #endif
18662                 DB_THREAD;
18663
18664 #if DB_VERSION_MAJOR > 2
18665         DB_ENV *env = NULL;
18666
18667         rc = db_env_create( &env, 0 );
18668
18669         flags |= DB_INIT_MPOOL;
18670 #ifdef DB_MPOOL_PRIVATE
18671         flags |= DB_MPOOL_PRIVATE;
18672 #endif
18673
18674         if( rc ) {
18675                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18676                 return rc;
18677         }
18678
18679 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18680         rc = env->open( env, NULL, flags, 0 );
18681 #else
18682         rc = env->open( env, NULL, NULL, flags, 0 );
18683 #endif
18684
18685         if ( rc == 0 ) {
18686                 rc = env->close( env, 0 );
18687         }
18688
18689         if( rc ) {
18690                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18691                 return rc;
18692         }
18693
18694 #else
18695         DB_ENV env;
18696         memset( &env, '\0', sizeof(env) );
18697
18698         rc = db_appinit( NULL, NULL, &env, flags );
18699
18700         if( rc == 0 ) {
18701                 db_appexit( &env );
18702         }
18703
18704         unlink("__db_mpool.share");
18705         unlink("__db_lock.share");
18706 #endif
18707
18708         return rc;
18709 }
18710 EOF
18711 if { (eval echo configure:18712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18712 then
18713   ol_cv_berkeley_db_thread=yes
18714 else
18715   echo "configure: failed program was:" >&5
18716   cat conftest.$ac_ext >&5
18717   rm -fr conftest*
18718   ol_cv_berkeley_db_thread=no
18719 fi
18720 rm -fr conftest*
18721 fi
18722
18723
18724         LIBS="$ol_LIBS"
18725
18726 fi
18727
18728 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18729
18730         if test $ol_cv_berkeley_db_thread != no ; then
18731                 cat >> confdefs.h <<\EOF
18732 #define HAVE_BERKELEY_DB_THREAD 1
18733 EOF
18734
18735         fi
18736
18737         fi
18738 fi
18739
18740         fi
18741
18742         if test $ol_cv_berkeley_db != no ; then
18743                 cat >> confdefs.h <<\EOF
18744 #define HAVE_BERKELEY_DB 1
18745 EOF
18746
18747
18748                 ol_link_ldbm=berkeley
18749                 ol_with_ldbm_api=berkeley
18750
18751                 if test $ol_with_ldbm_type = hash ; then
18752                         cat >> confdefs.h <<\EOF
18753 #define LDBM_USE_DBHASH 1
18754 EOF
18755
18756                 else
18757                         cat >> confdefs.h <<\EOF
18758 #define LDBM_USE_DBBTREE 1
18759 EOF
18760
18761                 fi
18762
18763                                                 if test $ol_cv_lib_db != yes ; then
18764                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18765                 fi
18766         fi
18767 fi
18768
18769 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18770         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18771 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18772         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18773 echo "configure:18774: checking Berkeley DB version for BDB backend" >&5
18774 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18775   echo $ac_n "(cached) $ac_c" 1>&6
18776 else
18777   
18778         cat > conftest.$ac_ext <<EOF
18779 #line 18780 "configure"
18780 #include "confdefs.h"
18781
18782 #include <db.h>
18783
18784  /* this check could be improved */
18785 #ifndef DB_VERSION_MAJOR
18786 #       define DB_VERSION_MAJOR 1
18787 #endif
18788 #ifndef DB_VERSION_MINOR
18789 #       define DB_VERSION_MINOR 0
18790 #endif
18791
18792 /* require 4.0 or later */
18793 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
18794         __db_version_compat
18795 #endif
18796         
18797 EOF
18798 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18799   egrep "__db_version_compat" >/dev/null 2>&1; then
18800   rm -rf conftest*
18801   ol_cv_bdb_compat=yes
18802 else
18803   rm -rf conftest*
18804   ol_cv_bdb_compat=no
18805 fi
18806 rm -f conftest*
18807
18808 fi
18809
18810 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18811
18812
18813         if test $ol_cv_bdb_compat = yes ; then
18814                 ol_enable_bdb=yes
18815         elif test $ol_enable_bdb = yes ; then
18816                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18817         else
18818                 ol_enable_bdb=no
18819         fi
18820 fi
18821
18822 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18823         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18824         ol_with_ldbm_api=none
18825 fi
18826
18827 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18828         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18829 echo "configure:18830: checking for MDBM library" >&5
18830 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18831   echo $ac_n "(cached) $ac_c" 1>&6
18832 else
18833         ol_LIBS="$LIBS"
18834         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18835 echo "configure:18836: checking for mdbm_set_chain" >&5
18836 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18837   echo $ac_n "(cached) $ac_c" 1>&6
18838 else
18839   cat > conftest.$ac_ext <<EOF
18840 #line 18841 "configure"
18841 #include "confdefs.h"
18842 /* System header to define __stub macros and hopefully few prototypes,
18843     which can conflict with char mdbm_set_chain(); below.  */
18844 #include <assert.h>
18845 /* Override any gcc2 internal prototype to avoid an error.  */
18846 /* We use char because int might match the return type of a gcc2
18847     builtin and then its argument prototype would still apply.  */
18848 char mdbm_set_chain();
18849 char (*f)();
18850
18851 int main() {
18852
18853 /* The GNU C library defines this for functions which it implements
18854     to always fail with ENOSYS.  Some functions are actually named
18855     something starting with __ and the normal name is an alias.  */
18856 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18857 choke me
18858 #else
18859 f = mdbm_set_chain;
18860 #endif
18861
18862 ; return 0; }
18863 EOF
18864 if { (eval echo configure:18865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18865   rm -rf conftest*
18866   eval "ac_cv_func_mdbm_set_chain=yes"
18867 else
18868   echo "configure: failed program was:" >&5
18869   cat conftest.$ac_ext >&5
18870   rm -rf conftest*
18871   eval "ac_cv_func_mdbm_set_chain=no"
18872 fi
18873 rm -f conftest*
18874 fi
18875
18876 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18877   echo "$ac_t""yes" 1>&6
18878   ol_cv_lib_mdbm=yes
18879 else
18880   echo "$ac_t""no" 1>&6
18881
18882                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18883 echo "configure:18884: checking for mdbm_set_chain in -lmdbm" >&5
18884 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18885 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18886   echo $ac_n "(cached) $ac_c" 1>&6
18887 else
18888   ac_save_LIBS="$LIBS"
18889 LIBS="-lmdbm  $LIBS"
18890 cat > conftest.$ac_ext <<EOF
18891 #line 18892 "configure"
18892 #include "confdefs.h"
18893 /* Override any gcc2 internal prototype to avoid an error.  */
18894 /* We use char because int might match the return type of a gcc2
18895     builtin and then its argument prototype would still apply.  */
18896 char mdbm_set_chain();
18897
18898 int main() {
18899 mdbm_set_chain()
18900 ; return 0; }
18901 EOF
18902 if { (eval echo configure:18903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18903   rm -rf conftest*
18904   eval "ac_cv_lib_$ac_lib_var=yes"
18905 else
18906   echo "configure: failed program was:" >&5
18907   cat conftest.$ac_ext >&5
18908   rm -rf conftest*
18909   eval "ac_cv_lib_$ac_lib_var=no"
18910 fi
18911 rm -f conftest*
18912 LIBS="$ac_save_LIBS"
18913
18914 fi
18915 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18916   echo "$ac_t""yes" 1>&6
18917   ol_cv_lib_mdbm=-lmdbm
18918 else
18919   echo "$ac_t""no" 1>&6
18920 ol_cv_lib_mdbm=no
18921 fi
18922
18923         
18924 fi
18925
18926         LIBS="$ol_LIBS"
18927
18928 fi
18929
18930 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18931
18932
18933  for ac_hdr in mdbm.h
18934 do
18935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18937 echo "configure:18938: checking for $ac_hdr" >&5
18938 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18939   echo $ac_n "(cached) $ac_c" 1>&6
18940 else
18941   cat > conftest.$ac_ext <<EOF
18942 #line 18943 "configure"
18943 #include "confdefs.h"
18944 #include <$ac_hdr>
18945 EOF
18946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18947 { (eval echo configure:18948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18949 if test -z "$ac_err"; then
18950   rm -rf conftest*
18951   eval "ac_cv_header_$ac_safe=yes"
18952 else
18953   echo "$ac_err" >&5
18954   echo "configure: failed program was:" >&5
18955   cat conftest.$ac_ext >&5
18956   rm -rf conftest*
18957   eval "ac_cv_header_$ac_safe=no"
18958 fi
18959 rm -f conftest*
18960 fi
18961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18962   echo "$ac_t""yes" 1>&6
18963     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18964   cat >> confdefs.h <<EOF
18965 #define $ac_tr_hdr 1
18966 EOF
18967  
18968 else
18969   echo "$ac_t""no" 1>&6
18970 fi
18971 done
18972
18973  echo $ac_n "checking for db""... $ac_c" 1>&6
18974 echo "configure:18975: checking for db" >&5
18975 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18976   echo $ac_n "(cached) $ac_c" 1>&6
18977 else
18978   
18979         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18980                 ol_cv_mdbm=no
18981         else
18982                 ol_cv_mdbm=yes
18983         fi
18984
18985 fi
18986
18987 echo "$ac_t""$ol_cv_mdbm" 1>&6
18988  if test $ol_cv_mdbm = yes ; then
18989         cat >> confdefs.h <<\EOF
18990 #define HAVE_MDBM 1
18991 EOF
18992
18993  fi
18994
18995
18996         if test $ol_cv_mdbm = yes ; then
18997                 ol_link_ldbm=mdbm
18998                 ol_with_ldbm_api=mdbm
18999                 if test $ol_cv_lib_mdbm != yes ; then
19000                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19001                 fi
19002         fi
19003 fi
19004
19005 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19006         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19007 echo "configure:19008: checking for GDBM library" >&5
19008 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19009   echo $ac_n "(cached) $ac_c" 1>&6
19010 else
19011         ol_LIBS="$LIBS"
19012         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19013 echo "configure:19014: checking for gdbm_open" >&5
19014 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19015   echo $ac_n "(cached) $ac_c" 1>&6
19016 else
19017   cat > conftest.$ac_ext <<EOF
19018 #line 19019 "configure"
19019 #include "confdefs.h"
19020 /* System header to define __stub macros and hopefully few prototypes,
19021     which can conflict with char gdbm_open(); below.  */
19022 #include <assert.h>
19023 /* Override any gcc2 internal prototype to avoid an error.  */
19024 /* We use char because int might match the return type of a gcc2
19025     builtin and then its argument prototype would still apply.  */
19026 char gdbm_open();
19027 char (*f)();
19028
19029 int main() {
19030
19031 /* The GNU C library defines this for functions which it implements
19032     to always fail with ENOSYS.  Some functions are actually named
19033     something starting with __ and the normal name is an alias.  */
19034 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19035 choke me
19036 #else
19037 f = gdbm_open;
19038 #endif
19039
19040 ; return 0; }
19041 EOF
19042 if { (eval echo configure:19043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19043   rm -rf conftest*
19044   eval "ac_cv_func_gdbm_open=yes"
19045 else
19046   echo "configure: failed program was:" >&5
19047   cat conftest.$ac_ext >&5
19048   rm -rf conftest*
19049   eval "ac_cv_func_gdbm_open=no"
19050 fi
19051 rm -f conftest*
19052 fi
19053
19054 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19055   echo "$ac_t""yes" 1>&6
19056   ol_cv_lib_gdbm=yes
19057 else
19058   echo "$ac_t""no" 1>&6
19059
19060                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19061 echo "configure:19062: checking for gdbm_open in -lgdbm" >&5
19062 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19063 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19064   echo $ac_n "(cached) $ac_c" 1>&6
19065 else
19066   ac_save_LIBS="$LIBS"
19067 LIBS="-lgdbm  $LIBS"
19068 cat > conftest.$ac_ext <<EOF
19069 #line 19070 "configure"
19070 #include "confdefs.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 gdbm_open();
19075
19076 int main() {
19077 gdbm_open()
19078 ; return 0; }
19079 EOF
19080 if { (eval echo configure:19081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19081   rm -rf conftest*
19082   eval "ac_cv_lib_$ac_lib_var=yes"
19083 else
19084   echo "configure: failed program was:" >&5
19085   cat conftest.$ac_ext >&5
19086   rm -rf conftest*
19087   eval "ac_cv_lib_$ac_lib_var=no"
19088 fi
19089 rm -f conftest*
19090 LIBS="$ac_save_LIBS"
19091
19092 fi
19093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19094   echo "$ac_t""yes" 1>&6
19095   ol_cv_lib_gdbm=-lgdbm
19096 else
19097   echo "$ac_t""no" 1>&6
19098 ol_cv_lib_gdbm=no
19099 fi
19100
19101         
19102 fi
19103
19104         LIBS="$ol_LIBS"
19105
19106 fi
19107
19108 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19109
19110
19111  for ac_hdr in gdbm.h
19112 do
19113 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19114 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19115 echo "configure:19116: checking for $ac_hdr" >&5
19116 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19117   echo $ac_n "(cached) $ac_c" 1>&6
19118 else
19119   cat > conftest.$ac_ext <<EOF
19120 #line 19121 "configure"
19121 #include "confdefs.h"
19122 #include <$ac_hdr>
19123 EOF
19124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19125 { (eval echo configure:19126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19127 if test -z "$ac_err"; then
19128   rm -rf conftest*
19129   eval "ac_cv_header_$ac_safe=yes"
19130 else
19131   echo "$ac_err" >&5
19132   echo "configure: failed program was:" >&5
19133   cat conftest.$ac_ext >&5
19134   rm -rf conftest*
19135   eval "ac_cv_header_$ac_safe=no"
19136 fi
19137 rm -f conftest*
19138 fi
19139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19140   echo "$ac_t""yes" 1>&6
19141     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19142   cat >> confdefs.h <<EOF
19143 #define $ac_tr_hdr 1
19144 EOF
19145  
19146 else
19147   echo "$ac_t""no" 1>&6
19148 fi
19149 done
19150
19151  echo $ac_n "checking for db""... $ac_c" 1>&6
19152 echo "configure:19153: checking for db" >&5
19153 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19154   echo $ac_n "(cached) $ac_c" 1>&6
19155 else
19156   
19157         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19158                 ol_cv_gdbm=no
19159         else
19160                 ol_cv_gdbm=yes
19161         fi
19162
19163 fi
19164
19165 echo "$ac_t""$ol_cv_gdbm" 1>&6
19166  if test $ol_cv_gdbm = yes ; then
19167         cat >> confdefs.h <<\EOF
19168 #define HAVE_GDBM 1
19169 EOF
19170
19171  fi
19172
19173
19174         if test $ol_cv_gdbm = yes ; then
19175                 ol_link_ldbm=gdbm
19176                 ol_with_ldbm_api=gdbm
19177
19178                 if test $ol_cv_lib_gdbm != yes ; then
19179                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19180                 fi
19181         fi
19182 fi
19183
19184 if test $ol_with_ldbm_api = ndbm ; then
19185         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19186 echo "configure:19187: checking for NDBM library" >&5
19187 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19188   echo $ac_n "(cached) $ac_c" 1>&6
19189 else
19190         ol_LIBS="$LIBS"
19191         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19192 echo "configure:19193: checking for dbm_open" >&5
19193 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19194   echo $ac_n "(cached) $ac_c" 1>&6
19195 else
19196   cat > conftest.$ac_ext <<EOF
19197 #line 19198 "configure"
19198 #include "confdefs.h"
19199 /* System header to define __stub macros and hopefully few prototypes,
19200     which can conflict with char dbm_open(); below.  */
19201 #include <assert.h>
19202 /* Override any gcc2 internal prototype to avoid an error.  */
19203 /* We use char because int might match the return type of a gcc2
19204     builtin and then its argument prototype would still apply.  */
19205 char dbm_open();
19206 char (*f)();
19207
19208 int main() {
19209
19210 /* The GNU C library defines this for functions which it implements
19211     to always fail with ENOSYS.  Some functions are actually named
19212     something starting with __ and the normal name is an alias.  */
19213 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19214 choke me
19215 #else
19216 f = dbm_open;
19217 #endif
19218
19219 ; return 0; }
19220 EOF
19221 if { (eval echo configure:19222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19222   rm -rf conftest*
19223   eval "ac_cv_func_dbm_open=yes"
19224 else
19225   echo "configure: failed program was:" >&5
19226   cat conftest.$ac_ext >&5
19227   rm -rf conftest*
19228   eval "ac_cv_func_dbm_open=no"
19229 fi
19230 rm -f conftest*
19231 fi
19232
19233 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19234   echo "$ac_t""yes" 1>&6
19235   ol_cv_lib_ndbm=yes
19236 else
19237   echo "$ac_t""no" 1>&6
19238
19239                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19240 echo "configure:19241: checking for dbm_open in -lndbm" >&5
19241 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19242 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19243   echo $ac_n "(cached) $ac_c" 1>&6
19244 else
19245   ac_save_LIBS="$LIBS"
19246 LIBS="-lndbm  $LIBS"
19247 cat > conftest.$ac_ext <<EOF
19248 #line 19249 "configure"
19249 #include "confdefs.h"
19250 /* Override any gcc2 internal prototype to avoid an error.  */
19251 /* We use char because int might match the return type of a gcc2
19252     builtin and then its argument prototype would still apply.  */
19253 char dbm_open();
19254
19255 int main() {
19256 dbm_open()
19257 ; return 0; }
19258 EOF
19259 if { (eval echo configure:19260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19260   rm -rf conftest*
19261   eval "ac_cv_lib_$ac_lib_var=yes"
19262 else
19263   echo "configure: failed program was:" >&5
19264   cat conftest.$ac_ext >&5
19265   rm -rf conftest*
19266   eval "ac_cv_lib_$ac_lib_var=no"
19267 fi
19268 rm -f conftest*
19269 LIBS="$ac_save_LIBS"
19270
19271 fi
19272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19273   echo "$ac_t""yes" 1>&6
19274   ol_cv_lib_ndbm=-lndbm
19275 else
19276   echo "$ac_t""no" 1>&6
19277
19278                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19279 echo "configure:19280: checking for dbm_open in -ldbm" >&5
19280 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19281 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19282   echo $ac_n "(cached) $ac_c" 1>&6
19283 else
19284   ac_save_LIBS="$LIBS"
19285 LIBS="-ldbm  $LIBS"
19286 cat > conftest.$ac_ext <<EOF
19287 #line 19288 "configure"
19288 #include "confdefs.h"
19289 /* Override any gcc2 internal prototype to avoid an error.  */
19290 /* We use char because int might match the return type of a gcc2
19291     builtin and then its argument prototype would still apply.  */
19292 char dbm_open();
19293
19294 int main() {
19295 dbm_open()
19296 ; return 0; }
19297 EOF
19298 if { (eval echo configure:19299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19299   rm -rf conftest*
19300   eval "ac_cv_lib_$ac_lib_var=yes"
19301 else
19302   echo "configure: failed program was:" >&5
19303   cat conftest.$ac_ext >&5
19304   rm -rf conftest*
19305   eval "ac_cv_lib_$ac_lib_var=no"
19306 fi
19307 rm -f conftest*
19308 LIBS="$ac_save_LIBS"
19309
19310 fi
19311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19312   echo "$ac_t""yes" 1>&6
19313   ol_cv_lib_ndbm=-ldbm
19314 else
19315   echo "$ac_t""no" 1>&6
19316 ol_cv_lib_ndbm=no
19317 fi
19318                 
19319 fi
19320
19321         
19322 fi
19323
19324         LIBS="$ol_LIBS"
19325
19326 fi
19327
19328 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19329
19330
19331  for ac_hdr in ndbm.h
19332 do
19333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19335 echo "configure:19336: checking for $ac_hdr" >&5
19336 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19337   echo $ac_n "(cached) $ac_c" 1>&6
19338 else
19339   cat > conftest.$ac_ext <<EOF
19340 #line 19341 "configure"
19341 #include "confdefs.h"
19342 #include <$ac_hdr>
19343 EOF
19344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19345 { (eval echo configure:19346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19347 if test -z "$ac_err"; then
19348   rm -rf conftest*
19349   eval "ac_cv_header_$ac_safe=yes"
19350 else
19351   echo "$ac_err" >&5
19352   echo "configure: failed program was:" >&5
19353   cat conftest.$ac_ext >&5
19354   rm -rf conftest*
19355   eval "ac_cv_header_$ac_safe=no"
19356 fi
19357 rm -f conftest*
19358 fi
19359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19360   echo "$ac_t""yes" 1>&6
19361     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19362   cat >> confdefs.h <<EOF
19363 #define $ac_tr_hdr 1
19364 EOF
19365  
19366 else
19367   echo "$ac_t""no" 1>&6
19368 fi
19369 done
19370
19371  echo $ac_n "checking for db""... $ac_c" 1>&6
19372 echo "configure:19373: checking for db" >&5
19373 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19374   echo $ac_n "(cached) $ac_c" 1>&6
19375 else
19376   
19377         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19378                 ol_cv_ndbm=no
19379         else
19380                 ol_cv_ndbm=yes
19381         fi
19382
19383 fi
19384
19385 echo "$ac_t""$ol_cv_ndbm" 1>&6
19386  if test $ol_cv_ndbm = yes ; then
19387         cat >> confdefs.h <<\EOF
19388 #define HAVE_NDBM 1
19389 EOF
19390
19391  fi
19392
19393
19394         if test $ol_cv_ndbm = yes ; then
19395                 ol_link_ldbm=ndbm
19396                 ol_with_ldbm_api=ndbm
19397
19398                 if test $ol_cv_lib_ndbm != yes ; then
19399                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19400                 fi
19401         fi
19402 fi
19403
19404 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19405         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19406         if test $ol_enable_ldbm = yes ; then
19407                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19408         fi
19409
19410         echo "configure: warning: disabling LDBM" 1>&2
19411         ol_enable_ldbm=no
19412 fi
19413
19414
19415 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19416         BUILD_LIBS_DYNAMIC=shared
19417         cat >> confdefs.h <<\EOF
19418 #define LDAP_LIBS_DYNAMIC 1
19419 EOF
19420
19421         LTSTATIC=""
19422 else
19423         BUILD_LIBS_DYNAMIC=static
19424         LTSTATIC="-static"
19425 fi
19426
19427 if test $ol_enable_wrappers != no ; then
19428         for ac_hdr in tcpd.h
19429 do
19430 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19431 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19432 echo "configure:19433: checking for $ac_hdr" >&5
19433 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19434   echo $ac_n "(cached) $ac_c" 1>&6
19435 else
19436   cat > conftest.$ac_ext <<EOF
19437 #line 19438 "configure"
19438 #include "confdefs.h"
19439 #include <$ac_hdr>
19440 EOF
19441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19442 { (eval echo configure:19443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19444 if test -z "$ac_err"; then
19445   rm -rf conftest*
19446   eval "ac_cv_header_$ac_safe=yes"
19447 else
19448   echo "$ac_err" >&5
19449   echo "configure: failed program was:" >&5
19450   cat conftest.$ac_ext >&5
19451   rm -rf conftest*
19452   eval "ac_cv_header_$ac_safe=no"
19453 fi
19454 rm -f conftest*
19455 fi
19456 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19457   echo "$ac_t""yes" 1>&6
19458     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19459   cat >> confdefs.h <<EOF
19460 #define $ac_tr_hdr 1
19461 EOF
19462  
19463                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19464 echo "configure:19465: checking for TCP wrappers library" >&5
19465                 save_LIBS="$LIBS"
19466                 LIBS="$LIBS -lwrap"
19467                 cat > conftest.$ac_ext <<EOF
19468 #line 19469 "configure"
19469 #include "confdefs.h"
19470
19471 #include <tcpd.h>
19472 int allow_severity = 0;
19473 int deny_severity  = 0;
19474
19475 struct request_info *req;
19476                 
19477 int main() {
19478
19479 hosts_access(req)
19480                 
19481 ; return 0; }
19482 EOF
19483 if { (eval echo configure:19484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19484   rm -rf conftest*
19485   echo "$ac_t""-lwrap" 1>&6
19486                 have_wrappers=yes
19487                 LIBS="$save_LIBS"
19488 else
19489   echo "configure: failed program was:" >&5
19490   cat conftest.$ac_ext >&5
19491   rm -rf conftest*
19492   
19493                                 LIBS="$LIBS -lnsl"
19494                 cat > conftest.$ac_ext <<EOF
19495 #line 19496 "configure"
19496 #include "confdefs.h"
19497
19498 #include <tcpd.h>
19499 int allow_severity = 0;
19500 int deny_severity  = 0;
19501
19502 struct request_info *req;
19503                 
19504 int main() {
19505
19506 hosts_access(req)
19507                 
19508 ; return 0; }
19509 EOF
19510 if { (eval echo configure:19511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19511   rm -rf conftest*
19512   echo "$ac_t""-lwrap -lnsl" 1>&6
19513                 have_wrappers=yes
19514                 LIBS="$save_LIBS -lnsl"
19515 else
19516   echo "configure: failed program was:" >&5
19517   cat conftest.$ac_ext >&5
19518   rm -rf conftest*
19519   
19520                 echo "$ac_t""no" 1>&6
19521                 have_wrappers=no
19522                 LIBS=$save_LIBS
19523 fi
19524 rm -f conftest*
19525 fi
19526 rm -f conftest*
19527 else
19528   echo "$ac_t""no" 1>&6
19529 have_wrappers=no
19530 fi
19531 done
19532
19533
19534         if test $have_wrappers = yes ; then
19535                 cat >> confdefs.h <<\EOF
19536 #define HAVE_TCPD 1
19537 EOF
19538
19539                 WRAP_LIBS="-lwrap"
19540         elif test $ol_enable_wrappers = yes ; then
19541                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19542         else
19543                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19544                 WRAP_LIBS=""
19545         fi
19546 fi
19547
19548 if test $ol_enable_syslog != no ; then
19549         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19550 echo "configure:19551: checking for openlog" >&5
19551 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19552   echo $ac_n "(cached) $ac_c" 1>&6
19553 else
19554   cat > conftest.$ac_ext <<EOF
19555 #line 19556 "configure"
19556 #include "confdefs.h"
19557 /* System header to define __stub macros and hopefully few prototypes,
19558     which can conflict with char openlog(); below.  */
19559 #include <assert.h>
19560 /* Override any gcc2 internal prototype to avoid an error.  */
19561 /* We use char because int might match the return type of a gcc2
19562     builtin and then its argument prototype would still apply.  */
19563 char openlog();
19564 char (*f)();
19565
19566 int main() {
19567
19568 /* The GNU C library defines this for functions which it implements
19569     to always fail with ENOSYS.  Some functions are actually named
19570     something starting with __ and the normal name is an alias.  */
19571 #if defined (__stub_openlog) || defined (__stub___openlog)
19572 choke me
19573 #else
19574 f = openlog;
19575 #endif
19576
19577 ; return 0; }
19578 EOF
19579 if { (eval echo configure:19580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19580   rm -rf conftest*
19581   eval "ac_cv_func_openlog=yes"
19582 else
19583   echo "configure: failed program was:" >&5
19584   cat conftest.$ac_ext >&5
19585   rm -rf conftest*
19586   eval "ac_cv_func_openlog=no"
19587 fi
19588 rm -f conftest*
19589 fi
19590
19591 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19592   echo "$ac_t""yes" 1>&6
19593   :
19594 else
19595   echo "$ac_t""no" 1>&6
19596 fi
19597
19598         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19599                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19600         fi
19601         ol_enable_syslog=$ac_cv_func_openlog
19602 fi
19603
19604
19605 ol_link_sql=no
19606 if test $ol_enable_sql != no ; then
19607         for ac_hdr in sql.h sqlext.h
19608 do
19609 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19610 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19611 echo "configure:19612: checking for $ac_hdr" >&5
19612 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19613   echo $ac_n "(cached) $ac_c" 1>&6
19614 else
19615   cat > conftest.$ac_ext <<EOF
19616 #line 19617 "configure"
19617 #include "confdefs.h"
19618 #include <$ac_hdr>
19619 EOF
19620 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19621 { (eval echo configure:19622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19622 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19623 if test -z "$ac_err"; then
19624   rm -rf conftest*
19625   eval "ac_cv_header_$ac_safe=yes"
19626 else
19627   echo "$ac_err" >&5
19628   echo "configure: failed program was:" >&5
19629   cat conftest.$ac_ext >&5
19630   rm -rf conftest*
19631   eval "ac_cv_header_$ac_safe=no"
19632 fi
19633 rm -f conftest*
19634 fi
19635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19636   echo "$ac_t""yes" 1>&6
19637     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19638   cat >> confdefs.h <<EOF
19639 #define $ac_tr_hdr 1
19640 EOF
19641  
19642 else
19643   echo "$ac_t""no" 1>&6
19644 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19645         
19646 fi
19647 done
19648
19649
19650         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19651 echo "configure:19652: checking for SQLDriverConnect in -liodbc" >&5
19652 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19654   echo $ac_n "(cached) $ac_c" 1>&6
19655 else
19656   ac_save_LIBS="$LIBS"
19657 LIBS="-liodbc  $LIBS"
19658 cat > conftest.$ac_ext <<EOF
19659 #line 19660 "configure"
19660 #include "confdefs.h"
19661 /* Override any gcc2 internal prototype to avoid an error.  */
19662 /* We use char because int might match the return type of a gcc2
19663     builtin and then its argument prototype would still apply.  */
19664 char SQLDriverConnect();
19665
19666 int main() {
19667 SQLDriverConnect()
19668 ; return 0; }
19669 EOF
19670 if { (eval echo configure:19671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19671   rm -rf conftest*
19672   eval "ac_cv_lib_$ac_lib_var=yes"
19673 else
19674   echo "configure: failed program was:" >&5
19675   cat conftest.$ac_ext >&5
19676   rm -rf conftest*
19677   eval "ac_cv_lib_$ac_lib_var=no"
19678 fi
19679 rm -f conftest*
19680 LIBS="$ac_save_LIBS"
19681
19682 fi
19683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19684   echo "$ac_t""yes" 1>&6
19685   have_iodbc=yes
19686 else
19687   echo "$ac_t""no" 1>&6
19688 have_iodbc=no
19689 fi
19690
19691         if test $have_iodbc = yes ; then
19692                 ol_link_sql="-liodbc"
19693         else
19694                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19695 echo "configure:19696: checking for SQLDriverConnect in -lodbc" >&5
19696 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19697 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19698   echo $ac_n "(cached) $ac_c" 1>&6
19699 else
19700   ac_save_LIBS="$LIBS"
19701 LIBS="-lodbc  $LIBS"
19702 cat > conftest.$ac_ext <<EOF
19703 #line 19704 "configure"
19704 #include "confdefs.h"
19705 /* Override any gcc2 internal prototype to avoid an error.  */
19706 /* We use char because int might match the return type of a gcc2
19707     builtin and then its argument prototype would still apply.  */
19708 char SQLDriverConnect();
19709
19710 int main() {
19711 SQLDriverConnect()
19712 ; return 0; }
19713 EOF
19714 if { (eval echo configure:19715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19715   rm -rf conftest*
19716   eval "ac_cv_lib_$ac_lib_var=yes"
19717 else
19718   echo "configure: failed program was:" >&5
19719   cat conftest.$ac_ext >&5
19720   rm -rf conftest*
19721   eval "ac_cv_lib_$ac_lib_var=no"
19722 fi
19723 rm -f conftest*
19724 LIBS="$ac_save_LIBS"
19725
19726 fi
19727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19728   echo "$ac_t""yes" 1>&6
19729   have_odbc=yes
19730 else
19731   echo "$ac_t""no" 1>&6
19732 have_odbc=no
19733 fi
19734
19735                 if test $have_odbc = yes ; then
19736                         ol_link_sql="-lodbc"
19737                 fi
19738         fi
19739
19740         if test $ol_link_sql != no ; then
19741                 SLAPD_SQL_LIBS="$ol_link_sql"
19742
19743         elif test $ol_enable_sql != auto ; then
19744                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19745         fi
19746 fi
19747
19748 ol_link_termcap=no
19749 for ac_hdr in termcap.h ncurses.h
19750 do
19751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19753 echo "configure:19754: checking for $ac_hdr" >&5
19754 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19755   echo $ac_n "(cached) $ac_c" 1>&6
19756 else
19757   cat > conftest.$ac_ext <<EOF
19758 #line 19759 "configure"
19759 #include "confdefs.h"
19760 #include <$ac_hdr>
19761 EOF
19762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19763 { (eval echo configure:19764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19765 if test -z "$ac_err"; then
19766   rm -rf conftest*
19767   eval "ac_cv_header_$ac_safe=yes"
19768 else
19769   echo "$ac_err" >&5
19770   echo "configure: failed program was:" >&5
19771   cat conftest.$ac_ext >&5
19772   rm -rf conftest*
19773   eval "ac_cv_header_$ac_safe=no"
19774 fi
19775 rm -f conftest*
19776 fi
19777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19778   echo "$ac_t""yes" 1>&6
19779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19780   cat >> confdefs.h <<EOF
19781 #define $ac_tr_hdr 1
19782 EOF
19783  
19784 else
19785   echo "$ac_t""no" 1>&6
19786 fi
19787 done
19788
19789
19790 if test $ol_link_termcap = no ; then
19791         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19792 echo "configure:19793: checking for tputs in -ltermcap" >&5
19793 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19795   echo $ac_n "(cached) $ac_c" 1>&6
19796 else
19797   ac_save_LIBS="$LIBS"
19798 LIBS="-ltermcap  $LIBS"
19799 cat > conftest.$ac_ext <<EOF
19800 #line 19801 "configure"
19801 #include "confdefs.h"
19802 /* Override any gcc2 internal prototype to avoid an error.  */
19803 /* We use char because int might match the return type of a gcc2
19804     builtin and then its argument prototype would still apply.  */
19805 char tputs();
19806
19807 int main() {
19808 tputs()
19809 ; return 0; }
19810 EOF
19811 if { (eval echo configure:19812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19812   rm -rf conftest*
19813   eval "ac_cv_lib_$ac_lib_var=yes"
19814 else
19815   echo "configure: failed program was:" >&5
19816   cat conftest.$ac_ext >&5
19817   rm -rf conftest*
19818   eval "ac_cv_lib_$ac_lib_var=no"
19819 fi
19820 rm -f conftest*
19821 LIBS="$ac_save_LIBS"
19822
19823 fi
19824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19825   echo "$ac_t""yes" 1>&6
19826   have_termcap=yes
19827 else
19828   echo "$ac_t""no" 1>&6
19829 have_termcap=no
19830 fi
19831
19832         if test $have_termcap = yes ; then
19833                 cat >> confdefs.h <<\EOF
19834 #define HAVE_TERMCAP 1
19835 EOF
19836
19837                 ol_link_termcap=yes
19838                 TERMCAP_LIBS=-ltermcap
19839         fi
19840 fi
19841
19842 if test $ol_link_termcap = no ; then
19843         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19844 echo "configure:19845: checking for initscr in -lncurses" >&5
19845 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19846 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19847   echo $ac_n "(cached) $ac_c" 1>&6
19848 else
19849   ac_save_LIBS="$LIBS"
19850 LIBS="-lncurses  $LIBS"
19851 cat > conftest.$ac_ext <<EOF
19852 #line 19853 "configure"
19853 #include "confdefs.h"
19854 /* Override any gcc2 internal prototype to avoid an error.  */
19855 /* We use char because int might match the return type of a gcc2
19856     builtin and then its argument prototype would still apply.  */
19857 char initscr();
19858
19859 int main() {
19860 initscr()
19861 ; return 0; }
19862 EOF
19863 if { (eval echo configure:19864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19864   rm -rf conftest*
19865   eval "ac_cv_lib_$ac_lib_var=yes"
19866 else
19867   echo "configure: failed program was:" >&5
19868   cat conftest.$ac_ext >&5
19869   rm -rf conftest*
19870   eval "ac_cv_lib_$ac_lib_var=no"
19871 fi
19872 rm -f conftest*
19873 LIBS="$ac_save_LIBS"
19874
19875 fi
19876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19877   echo "$ac_t""yes" 1>&6
19878   have_ncurses=yes
19879 else
19880   echo "$ac_t""no" 1>&6
19881 have_ncurses=no
19882 fi
19883
19884         if test $have_ncurses = yes ; then
19885                 cat >> confdefs.h <<\EOF
19886 #define HAVE_NCURSES 1
19887 EOF
19888
19889                 ol_link_termcap=yes
19890                 TERMCAP_LIBS=-lncurses
19891         fi
19892 fi
19893
19894 if test $ol_link_termcap = no ; then
19895         cat >> confdefs.h <<\EOF
19896 #define NO_TERMCAP 1
19897 EOF
19898
19899         TERMCAP_LIBS=
19900 fi
19901
19902 ol_link_sasl=no
19903 ol_link_spasswd=no
19904 if test $ol_with_cyrus_sasl != no ; then
19905         for ac_hdr in sasl/sasl.h sasl.h
19906 do
19907 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19908 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19909 echo "configure:19910: checking for $ac_hdr" >&5
19910 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19911   echo $ac_n "(cached) $ac_c" 1>&6
19912 else
19913   cat > conftest.$ac_ext <<EOF
19914 #line 19915 "configure"
19915 #include "confdefs.h"
19916 #include <$ac_hdr>
19917 EOF
19918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19919 { (eval echo configure:19920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19921 if test -z "$ac_err"; then
19922   rm -rf conftest*
19923   eval "ac_cv_header_$ac_safe=yes"
19924 else
19925   echo "$ac_err" >&5
19926   echo "configure: failed program was:" >&5
19927   cat conftest.$ac_ext >&5
19928   rm -rf conftest*
19929   eval "ac_cv_header_$ac_safe=no"
19930 fi
19931 rm -f conftest*
19932 fi
19933 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19934   echo "$ac_t""yes" 1>&6
19935     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19936   cat >> confdefs.h <<EOF
19937 #define $ac_tr_hdr 1
19938 EOF
19939  
19940 else
19941   echo "$ac_t""no" 1>&6
19942 fi
19943 done
19944
19945
19946         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19947                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19948 echo "configure:19949: checking for sasl_client_init in -lsasl2" >&5
19949 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19950 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19951   echo $ac_n "(cached) $ac_c" 1>&6
19952 else
19953   ac_save_LIBS="$LIBS"
19954 LIBS="-lsasl2  $LIBS"
19955 cat > conftest.$ac_ext <<EOF
19956 #line 19957 "configure"
19957 #include "confdefs.h"
19958 /* Override any gcc2 internal prototype to avoid an error.  */
19959 /* We use char because int might match the return type of a gcc2
19960     builtin and then its argument prototype would still apply.  */
19961 char sasl_client_init();
19962
19963 int main() {
19964 sasl_client_init()
19965 ; return 0; }
19966 EOF
19967 if { (eval echo configure:19968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19968   rm -rf conftest*
19969   eval "ac_cv_lib_$ac_lib_var=yes"
19970 else
19971   echo "configure: failed program was:" >&5
19972   cat conftest.$ac_ext >&5
19973   rm -rf conftest*
19974   eval "ac_cv_lib_$ac_lib_var=no"
19975 fi
19976 rm -f conftest*
19977 LIBS="$ac_save_LIBS"
19978
19979 fi
19980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19981   echo "$ac_t""yes" 1>&6
19982   ol_link_sasl="-lsasl2"
19983 else
19984   echo "$ac_t""no" 1>&6
19985 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19986 echo "configure:19987: checking for sasl_client_init in -lsasl" >&5
19987 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19988 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19989   echo $ac_n "(cached) $ac_c" 1>&6
19990 else
19991   ac_save_LIBS="$LIBS"
19992 LIBS="-lsasl  $LIBS"
19993 cat > conftest.$ac_ext <<EOF
19994 #line 19995 "configure"
19995 #include "confdefs.h"
19996 /* Override any gcc2 internal prototype to avoid an error.  */
19997 /* We use char because int might match the return type of a gcc2
19998     builtin and then its argument prototype would still apply.  */
19999 char sasl_client_init();
20000
20001 int main() {
20002 sasl_client_init()
20003 ; return 0; }
20004 EOF
20005 if { (eval echo configure:20006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20006   rm -rf conftest*
20007   eval "ac_cv_lib_$ac_lib_var=yes"
20008 else
20009   echo "configure: failed program was:" >&5
20010   cat conftest.$ac_ext >&5
20011   rm -rf conftest*
20012   eval "ac_cv_lib_$ac_lib_var=no"
20013 fi
20014 rm -f conftest*
20015 LIBS="$ac_save_LIBS"
20016
20017 fi
20018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20019   echo "$ac_t""yes" 1>&6
20020   ol_link_sasl="-lsasl"
20021 else
20022   echo "$ac_t""no" 1>&6
20023 fi
20024
20025 fi
20026
20027         fi
20028
20029         if test $ol_link_sasl = no ; then
20030                 if test $ol_with_cyrus_sasl != auto ; then
20031                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20032                 else
20033                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20034                         echo "configure: warning: SASL authentication not supported!" 1>&2
20035                         if test $ol_link_tls = no ; then
20036                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20037                         fi
20038                 fi
20039         else
20040                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20041 echo "configure:20042: checking Cyrus SASL library version" >&5
20042 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20043   echo $ac_n "(cached) $ac_c" 1>&6
20044 else
20045   
20046         cat > conftest.$ac_ext <<EOF
20047 #line 20048 "configure"
20048 #include "confdefs.h"
20049
20050 #ifdef HAVE_SASL_SASL_H
20051 #include <sasl/sasl.h>
20052 #else
20053 #include <sasl.h>
20054 #endif
20055
20056 /* require 2.1.3 or later */
20057 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20058         char *__sasl_compat = "1.5.x okay";
20059 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20060         __sasl_compat "2.2+ or better okay (we guess)";
20061 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20062         && SASL_VERSION_STEP >=3
20063         __sasl_compat = "2.1.3+ or better okay";
20064 #endif
20065         
20066 EOF
20067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20068   egrep "__sasl_compat" >/dev/null 2>&1; then
20069   rm -rf conftest*
20070   ol_cv_sasl_compat=yes
20071 else
20072   rm -rf conftest*
20073   ol_cv_sasl_compat=no
20074 fi
20075 rm -f conftest*
20076
20077 fi
20078
20079 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20080
20081                 if test $ol_cv_sasl_compat = no ; then
20082                         ol_link_sasl=no
20083                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20084                 fi
20085
20086                 cat >> confdefs.h <<\EOF
20087 #define HAVE_CYRUS_SASL 1
20088 EOF
20089
20090                 SASL_LIBS="$ol_link_sasl"
20091                 if test $ol_enable_spasswd != no ; then
20092                         ol_link_spasswd=yes
20093                 fi
20094
20095                 ac_save_LIBS="$LIBS"
20096                 LIBS="$LIBS $ol_link_sasl"
20097                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20098 echo "configure:20099: checking for sasl_version" >&5
20099 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20100   echo $ac_n "(cached) $ac_c" 1>&6
20101 else
20102   cat > conftest.$ac_ext <<EOF
20103 #line 20104 "configure"
20104 #include "confdefs.h"
20105 /* System header to define __stub macros and hopefully few prototypes,
20106     which can conflict with char sasl_version(); below.  */
20107 #include <assert.h>
20108 /* Override any gcc2 internal prototype to avoid an error.  */
20109 /* We use char because int might match the return type of a gcc2
20110     builtin and then its argument prototype would still apply.  */
20111 char sasl_version();
20112 char (*f)();
20113
20114 int main() {
20115
20116 /* The GNU C library defines this for functions which it implements
20117     to always fail with ENOSYS.  Some functions are actually named
20118     something starting with __ and the normal name is an alias.  */
20119 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20120 choke me
20121 #else
20122 f = sasl_version;
20123 #endif
20124
20125 ; return 0; }
20126 EOF
20127 if { (eval echo configure:20128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20128   rm -rf conftest*
20129   eval "ac_cv_func_sasl_version=yes"
20130 else
20131   echo "configure: failed program was:" >&5
20132   cat conftest.$ac_ext >&5
20133   rm -rf conftest*
20134   eval "ac_cv_func_sasl_version=no"
20135 fi
20136 rm -f conftest*
20137 fi
20138
20139 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20140   echo "$ac_t""yes" 1>&6
20141   cat >> confdefs.h <<\EOF
20142 #define HAVE_SASL_VERSION 1
20143 EOF
20144
20145 else
20146   echo "$ac_t""no" 1>&6
20147 fi
20148
20149                 LIBS="$ac_save_LIBS"
20150         fi
20151
20152 else
20153         echo "configure: warning: SASL authentication not supported!" 1>&2
20154         if test $ol_link_tls = no ; then
20155                 echo "configure: warning: Strong authentication not supported!" 1>&2
20156         fi
20157 fi
20158
20159 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20160         dev=no
20161         if test -r /dev/urandom ; then
20162                 dev="/dev/urandom";
20163         elif test -r /idev/urandom ; then
20164                 dev="/idev/urandom";
20165         elif test -r /dev/srandom ; then
20166                 dev="/dev/srandom";
20167         elif test -r /dev/random ; then
20168                 dev="/dev/random";
20169         elif test -r /idev/random ; then
20170                 dev="/idev/random";
20171         fi
20172
20173         if test $dev != no ; then
20174                 cat >> confdefs.h <<EOF
20175 #define URANDOM_DEVICE "$dev"
20176 EOF
20177
20178         fi
20179 fi
20180
20181 ol_link_fetch=no
20182 if test $ol_with_fetch != no ; then
20183         ol_LIBS=$LIBS
20184 LIBS="-lfetch -lcom_err $LIBS"
20185 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20186 echo "configure:20187: checking fetch(3) library" >&5
20187 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20188   echo $ac_n "(cached) $ac_c" 1>&6
20189 else
20190   
20191         cat > conftest.$ac_ext <<EOF
20192 #line 20193 "configure"
20193 #include "confdefs.h"
20194
20195 #include <sys/param.h>
20196 #include <stdio.h>
20197 #include <fetch.h>
20198 int main() {
20199 struct url *u = fetchParseURL("file:///"); 
20200 ; return 0; }
20201 EOF
20202 if { (eval echo configure:20203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20203   rm -rf conftest*
20204   ol_cv_lib_fetch=yes
20205 else
20206   echo "configure: failed program was:" >&5
20207   cat conftest.$ac_ext >&5
20208   rm -rf conftest*
20209   ol_cv_lib_fetch=no
20210 fi
20211 rm -f conftest*
20212 fi
20213
20214 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20215 LIBS=$ol_LIBS
20216 if test $ol_cv_lib_fetch != no ; then
20217         ol_link_fetch="-lfetch -lcom_err"
20218         cat >> confdefs.h <<\EOF
20219 #define HAVE_FETCH 1
20220 EOF
20221
20222 fi
20223
20224
20225         if test $ol_cv_lib_fetch != no ; then
20226                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20227                 ol_link_fetch=freebsd
20228
20229         elif test $ol_with_fetch != auto ; then
20230                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20231         fi 
20232 fi
20233
20234 ol_link_readline=no
20235 if test $ol_with_readline != no ; then
20236         for ac_hdr in readline/readline.h readline/history.h
20237 do
20238 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20239 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20240 echo "configure:20241: checking for $ac_hdr" >&5
20241 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20242   echo $ac_n "(cached) $ac_c" 1>&6
20243 else
20244   cat > conftest.$ac_ext <<EOF
20245 #line 20246 "configure"
20246 #include "confdefs.h"
20247 #include <$ac_hdr>
20248 EOF
20249 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20250 { (eval echo configure:20251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20251 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20252 if test -z "$ac_err"; then
20253   rm -rf conftest*
20254   eval "ac_cv_header_$ac_safe=yes"
20255 else
20256   echo "$ac_err" >&5
20257   echo "configure: failed program was:" >&5
20258   cat conftest.$ac_ext >&5
20259   rm -rf conftest*
20260   eval "ac_cv_header_$ac_safe=no"
20261 fi
20262 rm -f conftest*
20263 fi
20264 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20265   echo "$ac_t""yes" 1>&6
20266     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20267   cat >> confdefs.h <<EOF
20268 #define $ac_tr_hdr 1
20269 EOF
20270  
20271 else
20272   echo "$ac_t""no" 1>&6
20273 fi
20274 done
20275
20276
20277         if test $ac_cv_header_readline_readline_h = yes ; then
20278                 save_LIBS="$LIBS"
20279                 LIBS="$TERMCAP_LIBS $LIBS"
20280                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20281 echo "configure:20282: checking for readline in -lreadline" >&5
20282 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20283 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20284   echo $ac_n "(cached) $ac_c" 1>&6
20285 else
20286   ac_save_LIBS="$LIBS"
20287 LIBS="-lreadline  $LIBS"
20288 cat > conftest.$ac_ext <<EOF
20289 #line 20290 "configure"
20290 #include "confdefs.h"
20291 /* Override any gcc2 internal prototype to avoid an error.  */
20292 /* We use char because int might match the return type of a gcc2
20293     builtin and then its argument prototype would still apply.  */
20294 char readline();
20295
20296 int main() {
20297 readline()
20298 ; return 0; }
20299 EOF
20300 if { (eval echo configure:20301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20301   rm -rf conftest*
20302   eval "ac_cv_lib_$ac_lib_var=yes"
20303 else
20304   echo "configure: failed program was:" >&5
20305   cat conftest.$ac_ext >&5
20306   rm -rf conftest*
20307   eval "ac_cv_lib_$ac_lib_var=no"
20308 fi
20309 rm -f conftest*
20310 LIBS="$ac_save_LIBS"
20311
20312 fi
20313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20314   echo "$ac_t""yes" 1>&6
20315   have_readline=yes
20316 else
20317   echo "$ac_t""no" 1>&6
20318 have_readline=no
20319 fi
20320
20321                 LIBS="$save_LIBS"
20322                         
20323                 if test $have_readline = yes ; then
20324                         ol_with_readline=found
20325                         ol_link_readline=yes
20326
20327                         READLINE_LIBS="-lreadline"
20328                 fi
20329         fi
20330 fi
20331
20332 if test $ol_link_readline = yes ; then
20333         cat >> confdefs.h <<\EOF
20334 #define HAVE_READLINE 1
20335 EOF
20336
20337 fi
20338
20339
20340 if test $ol_enable_crypt != no ; then
20341         save_LIBS="$LIBS"
20342         LIBS="$TLS_LIBS $LIBS"
20343
20344         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20345 echo "configure:20346: checking for crypt" >&5
20346 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20347   echo $ac_n "(cached) $ac_c" 1>&6
20348 else
20349   cat > conftest.$ac_ext <<EOF
20350 #line 20351 "configure"
20351 #include "confdefs.h"
20352 /* System header to define __stub macros and hopefully few prototypes,
20353     which can conflict with char crypt(); below.  */
20354 #include <assert.h>
20355 /* Override any gcc2 internal prototype to avoid an error.  */
20356 /* We use char because int might match the return type of a gcc2
20357     builtin and then its argument prototype would still apply.  */
20358 char crypt();
20359 char (*f)();
20360
20361 int main() {
20362
20363 /* The GNU C library defines this for functions which it implements
20364     to always fail with ENOSYS.  Some functions are actually named
20365     something starting with __ and the normal name is an alias.  */
20366 #if defined (__stub_crypt) || defined (__stub___crypt)
20367 choke me
20368 #else
20369 f = crypt;
20370 #endif
20371
20372 ; return 0; }
20373 EOF
20374 if { (eval echo configure:20375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20375   rm -rf conftest*
20376   eval "ac_cv_func_crypt=yes"
20377 else
20378   echo "configure: failed program was:" >&5
20379   cat conftest.$ac_ext >&5
20380   rm -rf conftest*
20381   eval "ac_cv_func_crypt=no"
20382 fi
20383 rm -f conftest*
20384 fi
20385
20386 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20387   echo "$ac_t""yes" 1>&6
20388   have_crypt=yes
20389 else
20390   echo "$ac_t""no" 1>&6
20391
20392                 LIBS="$save_LIBS"
20393                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20394 echo "configure:20395: checking for crypt in -lcrypt" >&5
20395 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20396 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20397   echo $ac_n "(cached) $ac_c" 1>&6
20398 else
20399   ac_save_LIBS="$LIBS"
20400 LIBS="-lcrypt  $LIBS"
20401 cat > conftest.$ac_ext <<EOF
20402 #line 20403 "configure"
20403 #include "confdefs.h"
20404 /* Override any gcc2 internal prototype to avoid an error.  */
20405 /* We use char because int might match the return type of a gcc2
20406     builtin and then its argument prototype would still apply.  */
20407 char crypt();
20408
20409 int main() {
20410 crypt()
20411 ; return 0; }
20412 EOF
20413 if { (eval echo configure:20414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20414   rm -rf conftest*
20415   eval "ac_cv_lib_$ac_lib_var=yes"
20416 else
20417   echo "configure: failed program was:" >&5
20418   cat conftest.$ac_ext >&5
20419   rm -rf conftest*
20420   eval "ac_cv_lib_$ac_lib_var=no"
20421 fi
20422 rm -f conftest*
20423 LIBS="$ac_save_LIBS"
20424
20425 fi
20426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20427   echo "$ac_t""yes" 1>&6
20428   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20429                         have_crypt=yes
20430 else
20431   echo "$ac_t""no" 1>&6
20432 have_crypt=no
20433 fi
20434
20435 fi
20436
20437
20438         LIBS="$save_LIBS"
20439
20440         if test $have_crypt = yes ; then
20441                 cat >> confdefs.h <<\EOF
20442 #define HAVE_CRYPT 1
20443 EOF
20444
20445         else
20446                 echo "configure: warning: could not find crypt" 1>&2
20447                 if test $ol_enable_crypt = yes ; then
20448                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20449                 fi
20450
20451                 echo "configure: warning: disabling crypt support" 1>&2
20452                 ol_enable_crypt=no
20453         fi
20454 fi
20455
20456 if test $ol_enable_proctitle != no ; then
20457         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20458 echo "configure:20459: checking for setproctitle" >&5
20459 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20460   echo $ac_n "(cached) $ac_c" 1>&6
20461 else
20462   cat > conftest.$ac_ext <<EOF
20463 #line 20464 "configure"
20464 #include "confdefs.h"
20465 /* System header to define __stub macros and hopefully few prototypes,
20466     which can conflict with char setproctitle(); below.  */
20467 #include <assert.h>
20468 /* Override any gcc2 internal prototype to avoid an error.  */
20469 /* We use char because int might match the return type of a gcc2
20470     builtin and then its argument prototype would still apply.  */
20471 char setproctitle();
20472 char (*f)();
20473
20474 int main() {
20475
20476 /* The GNU C library defines this for functions which it implements
20477     to always fail with ENOSYS.  Some functions are actually named
20478     something starting with __ and the normal name is an alias.  */
20479 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20480 choke me
20481 #else
20482 f = setproctitle;
20483 #endif
20484
20485 ; return 0; }
20486 EOF
20487 if { (eval echo configure:20488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20488   rm -rf conftest*
20489   eval "ac_cv_func_setproctitle=yes"
20490 else
20491   echo "configure: failed program was:" >&5
20492   cat conftest.$ac_ext >&5
20493   rm -rf conftest*
20494   eval "ac_cv_func_setproctitle=no"
20495 fi
20496 rm -f conftest*
20497 fi
20498
20499 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20500   echo "$ac_t""yes" 1>&6
20501   have_setproctitle=yes
20502 else
20503   echo "$ac_t""no" 1>&6
20504
20505                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20506 echo "configure:20507: checking for setproctitle in -lutil" >&5
20507 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20508 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20509   echo $ac_n "(cached) $ac_c" 1>&6
20510 else
20511   ac_save_LIBS="$LIBS"
20512 LIBS="-lutil  $LIBS"
20513 cat > conftest.$ac_ext <<EOF
20514 #line 20515 "configure"
20515 #include "confdefs.h"
20516 /* Override any gcc2 internal prototype to avoid an error.  */
20517 /* We use char because int might match the return type of a gcc2
20518     builtin and then its argument prototype would still apply.  */
20519 char setproctitle();
20520
20521 int main() {
20522 setproctitle()
20523 ; return 0; }
20524 EOF
20525 if { (eval echo configure:20526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20526   rm -rf conftest*
20527   eval "ac_cv_lib_$ac_lib_var=yes"
20528 else
20529   echo "configure: failed program was:" >&5
20530   cat conftest.$ac_ext >&5
20531   rm -rf conftest*
20532   eval "ac_cv_lib_$ac_lib_var=no"
20533 fi
20534 rm -f conftest*
20535 LIBS="$ac_save_LIBS"
20536
20537 fi
20538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20539   echo "$ac_t""yes" 1>&6
20540   have_setproctitle=yes
20541                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20542 else
20543   echo "$ac_t""no" 1>&6
20544 have_setproctitle=no
20545                         LIBOBJS="$LIBOBJS setproctitle.o"
20546                         LIBSRCS="$LIBSRCS setproctitle.c"
20547 fi
20548
20549 fi
20550
20551
20552         if test $have_setproctitle = yes ; then
20553                 cat >> confdefs.h <<\EOF
20554 #define HAVE_SETPROCTITLE 1
20555 EOF
20556
20557         fi
20558 fi
20559
20560 if test $ol_enable_slp != no ; then
20561         for ac_hdr in slp.h 
20562 do
20563 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20564 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20565 echo "configure:20566: checking for $ac_hdr" >&5
20566 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20567   echo $ac_n "(cached) $ac_c" 1>&6
20568 else
20569   cat > conftest.$ac_ext <<EOF
20570 #line 20571 "configure"
20571 #include "confdefs.h"
20572 #include <$ac_hdr>
20573 EOF
20574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20575 { (eval echo configure:20576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20577 if test -z "$ac_err"; then
20578   rm -rf conftest*
20579   eval "ac_cv_header_$ac_safe=yes"
20580 else
20581   echo "$ac_err" >&5
20582   echo "configure: failed program was:" >&5
20583   cat conftest.$ac_ext >&5
20584   rm -rf conftest*
20585   eval "ac_cv_header_$ac_safe=no"
20586 fi
20587 rm -f conftest*
20588 fi
20589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20590   echo "$ac_t""yes" 1>&6
20591     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20592   cat >> confdefs.h <<EOF
20593 #define $ac_tr_hdr 1
20594 EOF
20595  
20596 else
20597   echo "$ac_t""no" 1>&6
20598 fi
20599 done
20600
20601
20602         if test $ac_cv_header_slp_h = yes ; then
20603                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20604 echo "configure:20605: checking for SLPOpen in -lslp" >&5
20605 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20606 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20607   echo $ac_n "(cached) $ac_c" 1>&6
20608 else
20609   ac_save_LIBS="$LIBS"
20610 LIBS="-lslp  $LIBS"
20611 cat > conftest.$ac_ext <<EOF
20612 #line 20613 "configure"
20613 #include "confdefs.h"
20614 /* Override any gcc2 internal prototype to avoid an error.  */
20615 /* We use char because int might match the return type of a gcc2
20616     builtin and then its argument prototype would still apply.  */
20617 char SLPOpen();
20618
20619 int main() {
20620 SLPOpen()
20621 ; return 0; }
20622 EOF
20623 if { (eval echo configure:20624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20624   rm -rf conftest*
20625   eval "ac_cv_lib_$ac_lib_var=yes"
20626 else
20627   echo "configure: failed program was:" >&5
20628   cat conftest.$ac_ext >&5
20629   rm -rf conftest*
20630   eval "ac_cv_lib_$ac_lib_var=no"
20631 fi
20632 rm -f conftest*
20633 LIBS="$ac_save_LIBS"
20634
20635 fi
20636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20637   echo "$ac_t""yes" 1>&6
20638   have_slp=yes
20639 else
20640   echo "$ac_t""no" 1>&6
20641 have_slp=no
20642 fi
20643
20644                 if test $have_slp = yes ; then
20645                         cat >> confdefs.h <<\EOF
20646 #define HAVE_SLP 1
20647 EOF
20648
20649                         SLAPD_SLP_LIBS=-lslp
20650                 fi
20651
20652         elif test $ol_enable_slp = yes ; then
20653                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20654         fi
20655 fi
20656
20657 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20658 echo "configure:20659: checking for ANSI C header files" >&5
20659 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20660   echo $ac_n "(cached) $ac_c" 1>&6
20661 else
20662   cat > conftest.$ac_ext <<EOF
20663 #line 20664 "configure"
20664 #include "confdefs.h"
20665 #include <stdlib.h>
20666 #include <stdarg.h>
20667 #include <string.h>
20668 #include <float.h>
20669 EOF
20670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20671 { (eval echo configure:20672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20673 if test -z "$ac_err"; then
20674   rm -rf conftest*
20675   ac_cv_header_stdc=yes
20676 else
20677   echo "$ac_err" >&5
20678   echo "configure: failed program was:" >&5
20679   cat conftest.$ac_ext >&5
20680   rm -rf conftest*
20681   ac_cv_header_stdc=no
20682 fi
20683 rm -f conftest*
20684
20685 if test $ac_cv_header_stdc = yes; then
20686   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20687 cat > conftest.$ac_ext <<EOF
20688 #line 20689 "configure"
20689 #include "confdefs.h"
20690 #include <string.h>
20691 EOF
20692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20693   egrep "memchr" >/dev/null 2>&1; then
20694   :
20695 else
20696   rm -rf conftest*
20697   ac_cv_header_stdc=no
20698 fi
20699 rm -f conftest*
20700
20701 fi
20702
20703 if test $ac_cv_header_stdc = yes; then
20704   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20705 cat > conftest.$ac_ext <<EOF
20706 #line 20707 "configure"
20707 #include "confdefs.h"
20708 #include <stdlib.h>
20709 EOF
20710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20711   egrep "free" >/dev/null 2>&1; then
20712   :
20713 else
20714   rm -rf conftest*
20715   ac_cv_header_stdc=no
20716 fi
20717 rm -f conftest*
20718
20719 fi
20720
20721 if test $ac_cv_header_stdc = yes; then
20722   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20723 if test "$cross_compiling" = yes; then
20724   :
20725 else
20726   cat > conftest.$ac_ext <<EOF
20727 #line 20728 "configure"
20728 #include "confdefs.h"
20729 #include <ctype.h>
20730 #if ((' ' & 0x0FF) == 0x020)
20731 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20732 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20733 #else
20734 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20735  || ('j' <= (c) && (c) <= 'r') \
20736  || ('s' <= (c) && (c) <= 'z'))
20737 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20738 #endif
20739 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20740 int main () { int i; for (i = 0; i < 256; i++)
20741 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20742 exit (0); }
20743
20744 EOF
20745 if { (eval echo configure:20746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20746 then
20747   :
20748 else
20749   echo "configure: failed program was:" >&5
20750   cat conftest.$ac_ext >&5
20751   rm -fr conftest*
20752   ac_cv_header_stdc=no
20753 fi
20754 rm -fr conftest*
20755 fi
20756
20757 fi
20758 fi
20759
20760 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20761 if test $ac_cv_header_stdc = yes; then
20762   cat >> confdefs.h <<\EOF
20763 #define STDC_HEADERS 1
20764 EOF
20765
20766 fi
20767
20768 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20769 echo "configure:20770: checking for mode_t" >&5
20770 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20771   echo $ac_n "(cached) $ac_c" 1>&6
20772 else
20773   cat > conftest.$ac_ext <<EOF
20774 #line 20775 "configure"
20775 #include "confdefs.h"
20776 #include <sys/types.h>
20777 #if STDC_HEADERS
20778 #include <stdlib.h>
20779 #include <stddef.h>
20780 #endif
20781
20782 EOF
20783 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20784   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20785   rm -rf conftest*
20786   eval "ac_cv_type_mode_t=yes"
20787 else
20788   rm -rf conftest*
20789   eval "ac_cv_type_mode_t=no"
20790 fi
20791 rm -f conftest*
20792
20793 fi
20794 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20795   echo "$ac_t""yes" 1>&6
20796 else
20797   echo "$ac_t""no" 1>&6
20798   cat >> confdefs.h <<EOF
20799 #define mode_t int
20800 EOF
20801
20802 fi
20803
20804 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20805 echo "configure:20806: checking for off_t" >&5
20806 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20807   echo $ac_n "(cached) $ac_c" 1>&6
20808 else
20809   cat > conftest.$ac_ext <<EOF
20810 #line 20811 "configure"
20811 #include "confdefs.h"
20812 #include <sys/types.h>
20813 #if STDC_HEADERS
20814 #include <stdlib.h>
20815 #include <stddef.h>
20816 #endif
20817
20818 EOF
20819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20820   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20821   rm -rf conftest*
20822   eval "ac_cv_type_off_t=yes"
20823 else
20824   rm -rf conftest*
20825   eval "ac_cv_type_off_t=no"
20826 fi
20827 rm -f conftest*
20828
20829 fi
20830 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20831   echo "$ac_t""yes" 1>&6
20832 else
20833   echo "$ac_t""no" 1>&6
20834   cat >> confdefs.h <<EOF
20835 #define off_t long
20836 EOF
20837
20838 fi
20839
20840 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20841 echo "configure:20842: checking for pid_t" >&5
20842 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20843   echo $ac_n "(cached) $ac_c" 1>&6
20844 else
20845   cat > conftest.$ac_ext <<EOF
20846 #line 20847 "configure"
20847 #include "confdefs.h"
20848 #include <sys/types.h>
20849 #if STDC_HEADERS
20850 #include <stdlib.h>
20851 #include <stddef.h>
20852 #endif
20853
20854 EOF
20855 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20856   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20857   rm -rf conftest*
20858   eval "ac_cv_type_pid_t=yes"
20859 else
20860   rm -rf conftest*
20861   eval "ac_cv_type_pid_t=no"
20862 fi
20863 rm -f conftest*
20864
20865 fi
20866 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20867   echo "$ac_t""yes" 1>&6
20868 else
20869   echo "$ac_t""no" 1>&6
20870   cat >> confdefs.h <<EOF
20871 #define pid_t int
20872 EOF
20873
20874 fi
20875
20876 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20877 echo "configure:20878: checking for ptrdiff_t" >&5
20878 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20879   echo $ac_n "(cached) $ac_c" 1>&6
20880 else
20881   cat > conftest.$ac_ext <<EOF
20882 #line 20883 "configure"
20883 #include "confdefs.h"
20884 #include <stddef.h>
20885 int main() {
20886 ptrdiff_t p
20887 ; return 0; }
20888 EOF
20889 if { (eval echo configure:20890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20890   rm -rf conftest*
20891   am_cv_type_ptrdiff_t=yes
20892 else
20893   echo "configure: failed program was:" >&5
20894   cat conftest.$ac_ext >&5
20895   rm -rf conftest*
20896   am_cv_type_ptrdiff_t=no
20897 fi
20898 rm -f conftest*
20899 fi
20900
20901 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20902    if test $am_cv_type_ptrdiff_t = yes; then
20903      cat >> confdefs.h <<\EOF
20904 #define HAVE_PTRDIFF_T 1
20905 EOF
20906
20907    fi
20908
20909 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20910 echo "configure:20911: checking return type of signal handlers" >&5
20911 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20912   echo $ac_n "(cached) $ac_c" 1>&6
20913 else
20914   cat > conftest.$ac_ext <<EOF
20915 #line 20916 "configure"
20916 #include "confdefs.h"
20917 #include <sys/types.h>
20918 #include <signal.h>
20919 #ifdef signal
20920 #undef signal
20921 #endif
20922 #ifdef __cplusplus
20923 extern "C" void (*signal (int, void (*)(int)))(int);
20924 #else
20925 void (*signal ()) ();
20926 #endif
20927
20928 int main() {
20929 int i;
20930 ; return 0; }
20931 EOF
20932 if { (eval echo configure:20933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20933   rm -rf conftest*
20934   ac_cv_type_signal=void
20935 else
20936   echo "configure: failed program was:" >&5
20937   cat conftest.$ac_ext >&5
20938   rm -rf conftest*
20939   ac_cv_type_signal=int
20940 fi
20941 rm -f conftest*
20942 fi
20943
20944 echo "$ac_t""$ac_cv_type_signal" 1>&6
20945 cat >> confdefs.h <<EOF
20946 #define RETSIGTYPE $ac_cv_type_signal
20947 EOF
20948
20949
20950 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20951 echo "configure:20952: checking for size_t" >&5
20952 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20953   echo $ac_n "(cached) $ac_c" 1>&6
20954 else
20955   cat > conftest.$ac_ext <<EOF
20956 #line 20957 "configure"
20957 #include "confdefs.h"
20958 #include <sys/types.h>
20959 #if STDC_HEADERS
20960 #include <stdlib.h>
20961 #include <stddef.h>
20962 #endif
20963
20964 EOF
20965 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20966   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20967   rm -rf conftest*
20968   eval "ac_cv_type_size_t=yes"
20969 else
20970   rm -rf conftest*
20971   eval "ac_cv_type_size_t=no"
20972 fi
20973 rm -f conftest*
20974
20975 fi
20976 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20977   echo "$ac_t""yes" 1>&6
20978 else
20979   echo "$ac_t""no" 1>&6
20980   cat >> confdefs.h <<EOF
20981 #define size_t unsigned
20982 EOF
20983
20984 fi
20985
20986
20987 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20988 echo "configure:20989: checking for ssize_t" >&5
20989 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20990   echo $ac_n "(cached) $ac_c" 1>&6
20991 else
20992   cat > conftest.$ac_ext <<EOF
20993 #line 20994 "configure"
20994 #include "confdefs.h"
20995 #include <sys/types.h>
20996 #if STDC_HEADERS
20997 #include <stdlib.h>
20998 #include <stddef.h>
20999 #endif
21000
21001 EOF
21002 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21003   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21004   rm -rf conftest*
21005   eval "ac_cv_type_ssize_t=yes"
21006 else
21007   rm -rf conftest*
21008   eval "ac_cv_type_ssize_t=no"
21009 fi
21010 rm -f conftest*
21011
21012 fi
21013 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21014   echo "$ac_t""yes" 1>&6
21015 else
21016   echo "$ac_t""no" 1>&6
21017   cat >> confdefs.h <<EOF
21018 #define ssize_t signed int
21019 EOF
21020
21021 fi
21022
21023 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21024 echo "configure:21025: checking for caddr_t" >&5
21025 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21026   echo $ac_n "(cached) $ac_c" 1>&6
21027 else
21028   cat > conftest.$ac_ext <<EOF
21029 #line 21030 "configure"
21030 #include "confdefs.h"
21031 #include <sys/types.h>
21032 #if STDC_HEADERS
21033 #include <stdlib.h>
21034 #include <stddef.h>
21035 #endif
21036
21037 EOF
21038 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21039   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21040   rm -rf conftest*
21041   eval "ac_cv_type_caddr_t=yes"
21042 else
21043   rm -rf conftest*
21044   eval "ac_cv_type_caddr_t=no"
21045 fi
21046 rm -f conftest*
21047
21048 fi
21049 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21050   echo "$ac_t""yes" 1>&6
21051 else
21052   echo "$ac_t""no" 1>&6
21053   cat >> confdefs.h <<EOF
21054 #define caddr_t char *
21055 EOF
21056
21057 fi
21058
21059
21060 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21061 echo "configure:21062: checking for socklen_t" >&5
21062 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21063   echo $ac_n "(cached) $ac_c" 1>&6
21064 else
21065   cat > conftest.$ac_ext <<EOF
21066 #line 21067 "configure"
21067 #include "confdefs.h"
21068
21069 #ifdef HAVE_SYS_TYPES_H
21070 #include <sys/types.h>
21071 #endif
21072 #ifdef HAVE_SYS_SOCKET_H
21073 #include <sys/socket.h>
21074 #endif
21075
21076 int main() {
21077 socklen_t len;
21078 ; return 0; }
21079 EOF
21080 if { (eval echo configure:21081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21081   rm -rf conftest*
21082   ol_cv_type_socklen_t=yes
21083 else
21084   echo "configure: failed program was:" >&5
21085   cat conftest.$ac_ext >&5
21086   rm -rf conftest*
21087   ol_cv_type_socklen_t=no
21088 fi
21089 rm -f conftest*
21090 fi
21091
21092 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21093   if test $ol_cv_type_socklen_t = no; then
21094     cat >> confdefs.h <<\EOF
21095 #define socklen_t int
21096 EOF
21097
21098   fi
21099  
21100 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21101 echo "configure:21102: checking for member st_blksize in aggregate type struct stat" >&5
21102 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21103   echo $ac_n "(cached) $ac_c" 1>&6
21104 else
21105   cat > conftest.$ac_ext <<EOF
21106 #line 21107 "configure"
21107 #include "confdefs.h"
21108 #include <sys/types.h>
21109 #include <sys/stat.h>
21110 int main() {
21111 struct stat foo; foo.st_blksize;
21112 ; return 0; }
21113 EOF
21114 if { (eval echo configure:21115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21115   rm -rf conftest*
21116   ac_cv_c_struct_member_st_blksize=yes
21117 else
21118   echo "configure: failed program was:" >&5
21119   cat conftest.$ac_ext >&5
21120   rm -rf conftest*
21121   ac_cv_c_struct_member_st_blksize=no
21122 fi
21123 rm -f conftest*
21124 fi
21125
21126 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21127 st_blksize="$ac_cv_c_struct_member_st_blksize"
21128 if test $ac_cv_c_struct_member_st_blksize = yes; then
21129   cat >> confdefs.h <<\EOF
21130 #define HAVE_ST_BLKSIZE 1
21131 EOF
21132
21133 fi
21134
21135 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21136 echo "configure:21137: checking whether time.h and sys/time.h may both be included" >&5
21137 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21138   echo $ac_n "(cached) $ac_c" 1>&6
21139 else
21140   cat > conftest.$ac_ext <<EOF
21141 #line 21142 "configure"
21142 #include "confdefs.h"
21143 #include <sys/types.h>
21144 #include <sys/time.h>
21145 #include <time.h>
21146 int main() {
21147 struct tm *tp;
21148 ; return 0; }
21149 EOF
21150 if { (eval echo configure:21151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21151   rm -rf conftest*
21152   ac_cv_header_time=yes
21153 else
21154   echo "configure: failed program was:" >&5
21155   cat conftest.$ac_ext >&5
21156   rm -rf conftest*
21157   ac_cv_header_time=no
21158 fi
21159 rm -f conftest*
21160 fi
21161
21162 echo "$ac_t""$ac_cv_header_time" 1>&6
21163 if test $ac_cv_header_time = yes; then
21164   cat >> confdefs.h <<\EOF
21165 #define TIME_WITH_SYS_TIME 1
21166 EOF
21167
21168 fi
21169
21170 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21171 echo "configure:21172: checking whether struct tm is in sys/time.h or time.h" >&5
21172 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21173   echo $ac_n "(cached) $ac_c" 1>&6
21174 else
21175   cat > conftest.$ac_ext <<EOF
21176 #line 21177 "configure"
21177 #include "confdefs.h"
21178 #include <sys/types.h>
21179 #include <time.h>
21180 int main() {
21181 struct tm *tp; tp->tm_sec;
21182 ; return 0; }
21183 EOF
21184 if { (eval echo configure:21185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21185   rm -rf conftest*
21186   ac_cv_struct_tm=time.h
21187 else
21188   echo "configure: failed program was:" >&5
21189   cat conftest.$ac_ext >&5
21190   rm -rf conftest*
21191   ac_cv_struct_tm=sys/time.h
21192 fi
21193 rm -f conftest*
21194 fi
21195
21196 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21197 if test $ac_cv_struct_tm = sys/time.h; then
21198   cat >> confdefs.h <<\EOF
21199 #define TM_IN_SYS_TIME 1
21200 EOF
21201
21202 fi
21203
21204 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21205 echo "configure:21206: checking for uid_t in sys/types.h" >&5
21206 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21207   echo $ac_n "(cached) $ac_c" 1>&6
21208 else
21209   cat > conftest.$ac_ext <<EOF
21210 #line 21211 "configure"
21211 #include "confdefs.h"
21212 #include <sys/types.h>
21213 EOF
21214 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21215   egrep "uid_t" >/dev/null 2>&1; then
21216   rm -rf conftest*
21217   ac_cv_type_uid_t=yes
21218 else
21219   rm -rf conftest*
21220   ac_cv_type_uid_t=no
21221 fi
21222 rm -f conftest*
21223
21224 fi
21225
21226 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21227 if test $ac_cv_type_uid_t = no; then
21228   cat >> confdefs.h <<\EOF
21229 #define uid_t int
21230 EOF
21231
21232   cat >> confdefs.h <<\EOF
21233 #define gid_t int
21234 EOF
21235
21236 fi
21237
21238 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21239 echo "configure:21240: checking for sig_atomic_t" >&5
21240 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21241   echo $ac_n "(cached) $ac_c" 1>&6
21242 else
21243   cat > conftest.$ac_ext <<EOF
21244 #line 21245 "configure"
21245 #include "confdefs.h"
21246 #include <signal.h>
21247 int main() {
21248 sig_atomic_t atomic;
21249 ; return 0; }
21250 EOF
21251 if { (eval echo configure:21252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21252   rm -rf conftest*
21253   ol_cv_type_sig_atomic_t=yes
21254 else
21255   echo "configure: failed program was:" >&5
21256   cat conftest.$ac_ext >&5
21257   rm -rf conftest*
21258   ol_cv_type_sig_atomic_t=no
21259 fi
21260 rm -f conftest*
21261 fi
21262
21263 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21264   if test $ol_cv_type_sig_atomic_t = no; then
21265     cat >> confdefs.h <<\EOF
21266 #define sig_atomic_t int
21267 EOF
21268
21269   fi
21270  
21271
21272
21273 # test for pw_gecos in struct passwd
21274 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21275 echo "configure:21276: checking struct passwd for pw_gecos" >&5
21276 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21277   echo $ac_n "(cached) $ac_c" 1>&6
21278 else
21279   
21280         cat > conftest.$ac_ext <<EOF
21281 #line 21282 "configure"
21282 #include "confdefs.h"
21283 #include <pwd.h>
21284 int main() {
21285
21286         struct passwd pwd;
21287         pwd.pw_gecos = pwd.pw_name;
21288
21289 ; return 0; }
21290 EOF
21291 if { (eval echo configure:21292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21292   rm -rf conftest*
21293   ol_cv_struct_passwd_pw_gecos=yes
21294 else
21295   echo "configure: failed program was:" >&5
21296   cat conftest.$ac_ext >&5
21297   rm -rf conftest*
21298   ol_cv_struct_passwd_pw_gecos=no
21299 fi
21300 rm -f conftest*
21301 fi
21302
21303 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21304 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21305         cat >> confdefs.h <<\EOF
21306 #define HAVE_PW_GECOS 1
21307 EOF
21308
21309 fi
21310
21311 # test for pw_passwd in struct passwd
21312 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21313 echo "configure:21314: checking struct passwd for pw_passwd" >&5
21314 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21315   echo $ac_n "(cached) $ac_c" 1>&6
21316 else
21317   
21318         cat > conftest.$ac_ext <<EOF
21319 #line 21320 "configure"
21320 #include "confdefs.h"
21321 #include <pwd.h>
21322 int main() {
21323
21324         struct passwd pwd;
21325         pwd.pw_passwd = pwd.pw_name;
21326
21327 ; return 0; }
21328 EOF
21329 if { (eval echo configure:21330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21330   rm -rf conftest*
21331   ol_cv_struct_passwd_pw_passwd=yes
21332 else
21333   echo "configure: failed program was:" >&5
21334   cat conftest.$ac_ext >&5
21335   rm -rf conftest*
21336   ol_cv_struct_passwd_pw_passwd=no
21337 fi
21338 rm -f conftest*
21339 fi
21340
21341 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21342 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21343         cat >> confdefs.h <<\EOF
21344 #define HAVE_PW_PASSWD 1
21345 EOF
21346
21347 fi
21348
21349
21350 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21351 echo "configure:21352: checking if toupper() requires islower()" >&5
21352 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21353   echo $ac_n "(cached) $ac_c" 1>&6
21354 else
21355   
21356         if test "$cross_compiling" = yes; then
21357   ol_cv_c_upper_lower=safe
21358 else
21359   cat > conftest.$ac_ext <<EOF
21360 #line 21361 "configure"
21361 #include "confdefs.h"
21362
21363 #include <ctype.h>
21364 main()
21365 {
21366         if ('C' == toupper('C'))
21367                 exit(0);
21368         else
21369                 exit(1);
21370 }
21371 EOF
21372 if { (eval echo configure:21373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21373 then
21374   ol_cv_c_upper_lower=no
21375 else
21376   echo "configure: failed program was:" >&5
21377   cat conftest.$ac_ext >&5
21378   rm -fr conftest*
21379   ol_cv_c_upper_lower=yes
21380 fi
21381 rm -fr conftest*
21382 fi
21383
21384 fi
21385
21386 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21387 if test $ol_cv_c_upper_lower != no ; then
21388         cat >> confdefs.h <<\EOF
21389 #define C_UPPER_LOWER 1
21390 EOF
21391
21392 fi
21393
21394 echo $ac_n "checking for working const""... $ac_c" 1>&6
21395 echo "configure:21396: checking for working const" >&5
21396 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21397   echo $ac_n "(cached) $ac_c" 1>&6
21398 else
21399   cat > conftest.$ac_ext <<EOF
21400 #line 21401 "configure"
21401 #include "confdefs.h"
21402
21403 int main() {
21404
21405 /* Ultrix mips cc rejects this.  */
21406 typedef int charset[2]; const charset x;
21407 /* SunOS 4.1.1 cc rejects this.  */
21408 char const *const *ccp;
21409 char **p;
21410 /* NEC SVR4.0.2 mips cc rejects this.  */
21411 struct point {int x, y;};
21412 static struct point const zero = {0,0};
21413 /* AIX XL C 1.02.0.0 rejects this.
21414    It does not let you subtract one const X* pointer from another in an arm
21415    of an if-expression whose if-part is not a constant expression */
21416 const char *g = "string";
21417 ccp = &g + (g ? g-g : 0);
21418 /* HPUX 7.0 cc rejects these. */
21419 ++ccp;
21420 p = (char**) ccp;
21421 ccp = (char const *const *) p;
21422 { /* SCO 3.2v4 cc rejects this.  */
21423   char *t;
21424   char const *s = 0 ? (char *) 0 : (char const *) 0;
21425
21426   *t++ = 0;
21427 }
21428 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21429   int x[] = {25, 17};
21430   const int *foo = &x[0];
21431   ++foo;
21432 }
21433 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21434   typedef const int *iptr;
21435   iptr p = 0;
21436   ++p;
21437 }
21438 { /* AIX XL C 1.02.0.0 rejects this saying
21439      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21440   struct s { int j; const int *ap[3]; };
21441   struct s *b; b->j = 5;
21442 }
21443 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21444   const int foo = 10;
21445 }
21446
21447 ; return 0; }
21448 EOF
21449 if { (eval echo configure:21450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21450   rm -rf conftest*
21451   ac_cv_c_const=yes
21452 else
21453   echo "configure: failed program was:" >&5
21454   cat conftest.$ac_ext >&5
21455   rm -rf conftest*
21456   ac_cv_c_const=no
21457 fi
21458 rm -f conftest*
21459 fi
21460
21461 echo "$ac_t""$ac_cv_c_const" 1>&6
21462 if test $ac_cv_c_const = no; then
21463   cat >> confdefs.h <<\EOF
21464 #define const 
21465 EOF
21466
21467 fi
21468
21469 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21470 echo "configure:21471: checking if compiler understands volatile" >&5
21471 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21472   echo $ac_n "(cached) $ac_c" 1>&6
21473 else
21474   cat > conftest.$ac_ext <<EOF
21475 #line 21476 "configure"
21476 #include "confdefs.h"
21477 int x, y, z;
21478 int main() {
21479 volatile int a; int * volatile b = x ? &y : &z;
21480       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21481       *b = 0;
21482 ; return 0; }
21483 EOF
21484 if { (eval echo configure:21485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21485   rm -rf conftest*
21486   ol_cv_c_volatile=yes
21487 else
21488   echo "configure: failed program was:" >&5
21489   cat conftest.$ac_ext >&5
21490   rm -rf conftest*
21491   ol_cv_c_volatile=no
21492 fi
21493 rm -f conftest*
21494 fi
21495
21496 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21497   if test $ol_cv_c_volatile = yes; then
21498     : 
21499   else
21500     cat >> confdefs.h <<\EOF
21501 #define volatile 
21502 EOF
21503
21504   fi
21505  
21506
21507 if test $cross_compiling = yes ; then
21508         cat >> confdefs.h <<\EOF
21509 #define CROSS_COMPILING 1
21510 EOF
21511
21512 else
21513         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21514 echo "configure:21515: checking whether byte ordering is bigendian" >&5
21515 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21516   echo $ac_n "(cached) $ac_c" 1>&6
21517 else
21518   ac_cv_c_bigendian=unknown
21519 # See if sys/param.h defines the BYTE_ORDER macro.
21520 cat > conftest.$ac_ext <<EOF
21521 #line 21522 "configure"
21522 #include "confdefs.h"
21523 #include <sys/types.h>
21524 #include <sys/param.h>
21525 int main() {
21526
21527 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21528  bogus endian macros
21529 #endif
21530 ; return 0; }
21531 EOF
21532 if { (eval echo configure:21533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21533   rm -rf conftest*
21534   # It does; now see whether it defined to BIG_ENDIAN or not.
21535 cat > conftest.$ac_ext <<EOF
21536 #line 21537 "configure"
21537 #include "confdefs.h"
21538 #include <sys/types.h>
21539 #include <sys/param.h>
21540 int main() {
21541
21542 #if BYTE_ORDER != BIG_ENDIAN
21543  not big endian
21544 #endif
21545 ; return 0; }
21546 EOF
21547 if { (eval echo configure:21548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21548   rm -rf conftest*
21549   ac_cv_c_bigendian=yes
21550 else
21551   echo "configure: failed program was:" >&5
21552   cat conftest.$ac_ext >&5
21553   rm -rf conftest*
21554   ac_cv_c_bigendian=no
21555 fi
21556 rm -f conftest*
21557 else
21558   echo "configure: failed program was:" >&5
21559   cat conftest.$ac_ext >&5
21560 fi
21561 rm -f conftest*
21562 if test $ac_cv_c_bigendian = unknown; then
21563 if test "$cross_compiling" = yes; then
21564     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21565 else
21566   cat > conftest.$ac_ext <<EOF
21567 #line 21568 "configure"
21568 #include "confdefs.h"
21569 main () {
21570   /* Are we little or big endian?  From Harbison&Steele.  */
21571   union
21572   {
21573     long l;
21574     char c[sizeof (long)];
21575   } u;
21576   u.l = 1;
21577   exit (u.c[sizeof (long) - 1] == 1);
21578 }
21579 EOF
21580 if { (eval echo configure:21581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21581 then
21582   ac_cv_c_bigendian=no
21583 else
21584   echo "configure: failed program was:" >&5
21585   cat conftest.$ac_ext >&5
21586   rm -fr conftest*
21587   ac_cv_c_bigendian=yes
21588 fi
21589 rm -fr conftest*
21590 fi
21591
21592 fi
21593 fi
21594
21595 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21596 if test $ac_cv_c_bigendian = yes; then
21597   cat >> confdefs.h <<\EOF
21598 #define WORDS_BIGENDIAN 1
21599 EOF
21600
21601 fi
21602
21603 fi
21604
21605 echo $ac_n "checking size of short""... $ac_c" 1>&6
21606 echo "configure:21607: checking size of short" >&5 
21607 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21608   echo $ac_n "(cached) $ac_c" 1>&6
21609 else
21610   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21611   cat > conftest.$ac_ext <<EOF
21612 #line 21613 "configure"
21613 #include "confdefs.h"
21614 #include "confdefs.h" 
21615 #include <sys/types.h> 
21616  
21617
21618 int main() {
21619 switch (0) case 0: case (sizeof (short) == $ac_size):;
21620 ; return 0; }
21621 EOF
21622 if { (eval echo configure:21623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21623   rm -rf conftest*
21624   ac_cv_sizeof_short=$ac_size
21625 else
21626   echo "configure: failed program was:" >&5
21627   cat conftest.$ac_ext >&5
21628 fi
21629 rm -f conftest* 
21630   if test x$ac_cv_sizeof_short != x ; then break; fi 
21631 done 
21632
21633 fi
21634  
21635 if test x$ac_cv_sizeof_short = x ; then 
21636   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21637 fi 
21638 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21639 cat >> confdefs.h <<EOF
21640 #define SIZEOF_SHORT $ac_cv_sizeof_short
21641 EOF
21642  
21643  
21644 echo $ac_n "checking size of int""... $ac_c" 1>&6
21645 echo "configure:21646: checking size of int" >&5 
21646 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21647   echo $ac_n "(cached) $ac_c" 1>&6
21648 else
21649   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21650   cat > conftest.$ac_ext <<EOF
21651 #line 21652 "configure"
21652 #include "confdefs.h"
21653 #include "confdefs.h" 
21654 #include <sys/types.h> 
21655  
21656
21657 int main() {
21658 switch (0) case 0: case (sizeof (int) == $ac_size):;
21659 ; return 0; }
21660 EOF
21661 if { (eval echo configure:21662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21662   rm -rf conftest*
21663   ac_cv_sizeof_int=$ac_size
21664 else
21665   echo "configure: failed program was:" >&5
21666   cat conftest.$ac_ext >&5
21667 fi
21668 rm -f conftest* 
21669   if test x$ac_cv_sizeof_int != x ; then break; fi 
21670 done 
21671
21672 fi
21673  
21674 if test x$ac_cv_sizeof_int = x ; then 
21675   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21676 fi 
21677 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21678 cat >> confdefs.h <<EOF
21679 #define SIZEOF_INT $ac_cv_sizeof_int
21680 EOF
21681  
21682  
21683 echo $ac_n "checking size of long""... $ac_c" 1>&6
21684 echo "configure:21685: checking size of long" >&5 
21685 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21686   echo $ac_n "(cached) $ac_c" 1>&6
21687 else
21688   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21689   cat > conftest.$ac_ext <<EOF
21690 #line 21691 "configure"
21691 #include "confdefs.h"
21692 #include "confdefs.h" 
21693 #include <sys/types.h> 
21694  
21695
21696 int main() {
21697 switch (0) case 0: case (sizeof (long) == $ac_size):;
21698 ; return 0; }
21699 EOF
21700 if { (eval echo configure:21701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21701   rm -rf conftest*
21702   ac_cv_sizeof_long=$ac_size
21703 else
21704   echo "configure: failed program was:" >&5
21705   cat conftest.$ac_ext >&5
21706 fi
21707 rm -f conftest* 
21708   if test x$ac_cv_sizeof_long != x ; then break; fi 
21709 done 
21710
21711 fi
21712  
21713 if test x$ac_cv_sizeof_long = x ; then 
21714   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21715 fi 
21716 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21717 cat >> confdefs.h <<EOF
21718 #define SIZEOF_LONG $ac_cv_sizeof_long
21719 EOF
21720  
21721
21722
21723 if test "$ac_cv_sizeof_int" -lt 4 ; then
21724         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21725
21726         cat >> confdefs.h <<\EOF
21727 #define LBER_INT_T long
21728 EOF
21729
21730 else
21731         cat >> confdefs.h <<\EOF
21732 #define LBER_INT_T int
21733 EOF
21734
21735 fi
21736
21737 cat >> confdefs.h <<\EOF
21738 #define LBER_LEN_T long
21739 EOF
21740
21741 cat >> confdefs.h <<\EOF
21742 #define LBER_SOCKET_T int
21743 EOF
21744
21745 cat >> confdefs.h <<\EOF
21746 #define LBER_TAG_T long
21747 EOF
21748
21749
21750 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21751 echo "configure:21752: checking for 8-bit clean memcmp" >&5
21752 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21753   echo $ac_n "(cached) $ac_c" 1>&6
21754 else
21755   if test "$cross_compiling" = yes; then
21756   ac_cv_func_memcmp_clean=no
21757 else
21758   cat > conftest.$ac_ext <<EOF
21759 #line 21760 "configure"
21760 #include "confdefs.h"
21761
21762 main()
21763 {
21764   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21765   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21766 }
21767
21768 EOF
21769 if { (eval echo configure:21770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21770 then
21771   ac_cv_func_memcmp_clean=yes
21772 else
21773   echo "configure: failed program was:" >&5
21774   cat conftest.$ac_ext >&5
21775   rm -fr conftest*
21776   ac_cv_func_memcmp_clean=no
21777 fi
21778 rm -fr conftest*
21779 fi
21780
21781 fi
21782
21783 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21784 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21785
21786 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21787 echo "configure:21788: checking for strftime" >&5
21788 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21789   echo $ac_n "(cached) $ac_c" 1>&6
21790 else
21791   cat > conftest.$ac_ext <<EOF
21792 #line 21793 "configure"
21793 #include "confdefs.h"
21794 /* System header to define __stub macros and hopefully few prototypes,
21795     which can conflict with char strftime(); below.  */
21796 #include <assert.h>
21797 /* Override any gcc2 internal prototype to avoid an error.  */
21798 /* We use char because int might match the return type of a gcc2
21799     builtin and then its argument prototype would still apply.  */
21800 char strftime();
21801 char (*f)();
21802
21803 int main() {
21804
21805 /* The GNU C library defines this for functions which it implements
21806     to always fail with ENOSYS.  Some functions are actually named
21807     something starting with __ and the normal name is an alias.  */
21808 #if defined (__stub_strftime) || defined (__stub___strftime)
21809 choke me
21810 #else
21811 f = strftime;
21812 #endif
21813
21814 ; return 0; }
21815 EOF
21816 if { (eval echo configure:21817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21817   rm -rf conftest*
21818   eval "ac_cv_func_strftime=yes"
21819 else
21820   echo "configure: failed program was:" >&5
21821   cat conftest.$ac_ext >&5
21822   rm -rf conftest*
21823   eval "ac_cv_func_strftime=no"
21824 fi
21825 rm -f conftest*
21826 fi
21827
21828 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21829   echo "$ac_t""yes" 1>&6
21830   cat >> confdefs.h <<\EOF
21831 #define HAVE_STRFTIME 1
21832 EOF
21833
21834 else
21835   echo "$ac_t""no" 1>&6
21836 # strftime is in -lintl on SCO UNIX.
21837 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21838 echo "configure:21839: checking for strftime in -lintl" >&5
21839 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21840 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21841   echo $ac_n "(cached) $ac_c" 1>&6
21842 else
21843   ac_save_LIBS="$LIBS"
21844 LIBS="-lintl  $LIBS"
21845 cat > conftest.$ac_ext <<EOF
21846 #line 21847 "configure"
21847 #include "confdefs.h"
21848 /* Override any gcc2 internal prototype to avoid an error.  */
21849 /* We use char because int might match the return type of a gcc2
21850     builtin and then its argument prototype would still apply.  */
21851 char strftime();
21852
21853 int main() {
21854 strftime()
21855 ; return 0; }
21856 EOF
21857 if { (eval echo configure:21858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21858   rm -rf conftest*
21859   eval "ac_cv_lib_$ac_lib_var=yes"
21860 else
21861   echo "configure: failed program was:" >&5
21862   cat conftest.$ac_ext >&5
21863   rm -rf conftest*
21864   eval "ac_cv_lib_$ac_lib_var=no"
21865 fi
21866 rm -f conftest*
21867 LIBS="$ac_save_LIBS"
21868
21869 fi
21870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21871   echo "$ac_t""yes" 1>&6
21872   cat >> confdefs.h <<\EOF
21873 #define HAVE_STRFTIME 1
21874 EOF
21875
21876 LIBS="-lintl $LIBS"
21877 else
21878   echo "$ac_t""no" 1>&6
21879 fi
21880
21881 fi
21882
21883
21884 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21885 echo "configure:21886: checking for inet_aton()" >&5
21886 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21887   echo $ac_n "(cached) $ac_c" 1>&6
21888 else
21889   cat > conftest.$ac_ext <<EOF
21890 #line 21891 "configure"
21891 #include "confdefs.h"
21892
21893 #ifdef HAVE_SYS_TYPES_H
21894 #       include <sys/types.h>
21895 #endif
21896 #ifdef HAVE_SYS_SOCKET_H
21897 #       include <sys/socket.h>
21898 #       ifdef HAVE_SYS_SELECT_H
21899 #               include <sys/select.h>
21900 #       endif
21901 #       include <netinet/in.h>
21902 #       ifdef HAVE_ARPA_INET_H
21903 #               include <arpa/inet.h>
21904 #       endif
21905 #endif
21906
21907 int main() {
21908 struct in_addr in;
21909 int rc = inet_aton( "255.255.255.255", &in );
21910 ; return 0; }
21911 EOF
21912 if { (eval echo configure:21913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21913   rm -rf conftest*
21914   ol_cv_func_inet_aton=yes
21915 else
21916   echo "configure: failed program was:" >&5
21917   cat conftest.$ac_ext >&5
21918   rm -rf conftest*
21919   ol_cv_func_inet_aton=no
21920 fi
21921 rm -f conftest*
21922 fi
21923
21924 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21925   if test $ol_cv_func_inet_aton != no; then
21926     cat >> confdefs.h <<\EOF
21927 #define HAVE_INET_ATON 1
21928 EOF
21929
21930   fi
21931  
21932
21933 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21934 echo "configure:21935: checking for _spawnlp" >&5
21935 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21936   echo $ac_n "(cached) $ac_c" 1>&6
21937 else
21938   cat > conftest.$ac_ext <<EOF
21939 #line 21940 "configure"
21940 #include "confdefs.h"
21941 /* System header to define __stub macros and hopefully few prototypes,
21942     which can conflict with char _spawnlp(); below.  */
21943 #include <assert.h>
21944 /* Override any gcc2 internal prototype to avoid an error.  */
21945 /* We use char because int might match the return type of a gcc2
21946     builtin and then its argument prototype would still apply.  */
21947 char _spawnlp();
21948 char (*f)();
21949
21950 int main() {
21951
21952 /* The GNU C library defines this for functions which it implements
21953     to always fail with ENOSYS.  Some functions are actually named
21954     something starting with __ and the normal name is an alias.  */
21955 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21956 choke me
21957 #else
21958 f = _spawnlp;
21959 #endif
21960
21961 ; return 0; }
21962 EOF
21963 if { (eval echo configure:21964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21964   rm -rf conftest*
21965   eval "ac_cv_func__spawnlp=yes"
21966 else
21967   echo "configure: failed program was:" >&5
21968   cat conftest.$ac_ext >&5
21969   rm -rf conftest*
21970   eval "ac_cv_func__spawnlp=no"
21971 fi
21972 rm -f conftest*
21973 fi
21974
21975 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21976   echo "$ac_t""yes" 1>&6
21977   cat >> confdefs.h <<\EOF
21978 #define HAVE_SPAWNLP 1
21979 EOF
21980
21981 else
21982   echo "$ac_t""no" 1>&6
21983 fi
21984
21985
21986 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21987 echo "configure:21988: checking for _snprintf" >&5
21988 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21989   echo $ac_n "(cached) $ac_c" 1>&6
21990 else
21991   cat > conftest.$ac_ext <<EOF
21992 #line 21993 "configure"
21993 #include "confdefs.h"
21994 /* System header to define __stub macros and hopefully few prototypes,
21995     which can conflict with char _snprintf(); below.  */
21996 #include <assert.h>
21997 /* Override any gcc2 internal prototype to avoid an error.  */
21998 /* We use char because int might match the return type of a gcc2
21999     builtin and then its argument prototype would still apply.  */
22000 char _snprintf();
22001 char (*f)();
22002
22003 int main() {
22004
22005 /* The GNU C library defines this for functions which it implements
22006     to always fail with ENOSYS.  Some functions are actually named
22007     something starting with __ and the normal name is an alias.  */
22008 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22009 choke me
22010 #else
22011 f = _snprintf;
22012 #endif
22013
22014 ; return 0; }
22015 EOF
22016 if { (eval echo configure:22017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22017   rm -rf conftest*
22018   eval "ac_cv_func__snprintf=yes"
22019 else
22020   echo "configure: failed program was:" >&5
22021   cat conftest.$ac_ext >&5
22022   rm -rf conftest*
22023   eval "ac_cv_func__snprintf=no"
22024 fi
22025 rm -f conftest*
22026 fi
22027
22028 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22029   echo "$ac_t""yes" 1>&6
22030   ac_cv_func_snprintf=yes
22031         cat >> confdefs.h <<\EOF
22032 #define snprintf _snprintf
22033 EOF
22034
22035
22036 else
22037   echo "$ac_t""no" 1>&6
22038 fi
22039
22040
22041 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22042 echo "configure:22043: checking for _vsnprintf" >&5
22043 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22044   echo $ac_n "(cached) $ac_c" 1>&6
22045 else
22046   cat > conftest.$ac_ext <<EOF
22047 #line 22048 "configure"
22048 #include "confdefs.h"
22049 /* System header to define __stub macros and hopefully few prototypes,
22050     which can conflict with char _vsnprintf(); below.  */
22051 #include <assert.h>
22052 /* Override any gcc2 internal prototype to avoid an error.  */
22053 /* We use char because int might match the return type of a gcc2
22054     builtin and then its argument prototype would still apply.  */
22055 char _vsnprintf();
22056 char (*f)();
22057
22058 int main() {
22059
22060 /* The GNU C library defines this for functions which it implements
22061     to always fail with ENOSYS.  Some functions are actually named
22062     something starting with __ and the normal name is an alias.  */
22063 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22064 choke me
22065 #else
22066 f = _vsnprintf;
22067 #endif
22068
22069 ; return 0; }
22070 EOF
22071 if { (eval echo configure:22072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22072   rm -rf conftest*
22073   eval "ac_cv_func__vsnprintf=yes"
22074 else
22075   echo "configure: failed program was:" >&5
22076   cat conftest.$ac_ext >&5
22077   rm -rf conftest*
22078   eval "ac_cv_func__vsnprintf=no"
22079 fi
22080 rm -f conftest*
22081 fi
22082
22083 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22084   echo "$ac_t""yes" 1>&6
22085   ac_cv_func_vsnprintf=yes
22086         cat >> confdefs.h <<\EOF
22087 #define vsnprintf _vsnprintf
22088 EOF
22089
22090
22091 else
22092   echo "$ac_t""no" 1>&6
22093 fi
22094
22095
22096 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22097 echo "configure:22098: checking for vprintf" >&5
22098 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22099   echo $ac_n "(cached) $ac_c" 1>&6
22100 else
22101   cat > conftest.$ac_ext <<EOF
22102 #line 22103 "configure"
22103 #include "confdefs.h"
22104 /* System header to define __stub macros and hopefully few prototypes,
22105     which can conflict with char vprintf(); below.  */
22106 #include <assert.h>
22107 /* Override any gcc2 internal prototype to avoid an error.  */
22108 /* We use char because int might match the return type of a gcc2
22109     builtin and then its argument prototype would still apply.  */
22110 char vprintf();
22111 char (*f)();
22112
22113 int main() {
22114
22115 /* The GNU C library defines this for functions which it implements
22116     to always fail with ENOSYS.  Some functions are actually named
22117     something starting with __ and the normal name is an alias.  */
22118 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22119 choke me
22120 #else
22121 f = vprintf;
22122 #endif
22123
22124 ; return 0; }
22125 EOF
22126 if { (eval echo configure:22127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22127   rm -rf conftest*
22128   eval "ac_cv_func_vprintf=yes"
22129 else
22130   echo "configure: failed program was:" >&5
22131   cat conftest.$ac_ext >&5
22132   rm -rf conftest*
22133   eval "ac_cv_func_vprintf=no"
22134 fi
22135 rm -f conftest*
22136 fi
22137
22138 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22139   echo "$ac_t""yes" 1>&6
22140   cat >> confdefs.h <<\EOF
22141 #define HAVE_VPRINTF 1
22142 EOF
22143
22144 else
22145   echo "$ac_t""no" 1>&6
22146 fi
22147
22148 if test "$ac_cv_func_vprintf" != yes; then
22149 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22150 echo "configure:22151: checking for _doprnt" >&5
22151 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22152   echo $ac_n "(cached) $ac_c" 1>&6
22153 else
22154   cat > conftest.$ac_ext <<EOF
22155 #line 22156 "configure"
22156 #include "confdefs.h"
22157 /* System header to define __stub macros and hopefully few prototypes,
22158     which can conflict with char _doprnt(); below.  */
22159 #include <assert.h>
22160 /* Override any gcc2 internal prototype to avoid an error.  */
22161 /* We use char because int might match the return type of a gcc2
22162     builtin and then its argument prototype would still apply.  */
22163 char _doprnt();
22164 char (*f)();
22165
22166 int main() {
22167
22168 /* The GNU C library defines this for functions which it implements
22169     to always fail with ENOSYS.  Some functions are actually named
22170     something starting with __ and the normal name is an alias.  */
22171 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22172 choke me
22173 #else
22174 f = _doprnt;
22175 #endif
22176
22177 ; return 0; }
22178 EOF
22179 if { (eval echo configure:22180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22180   rm -rf conftest*
22181   eval "ac_cv_func__doprnt=yes"
22182 else
22183   echo "configure: failed program was:" >&5
22184   cat conftest.$ac_ext >&5
22185   rm -rf conftest*
22186   eval "ac_cv_func__doprnt=no"
22187 fi
22188 rm -f conftest*
22189 fi
22190
22191 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22192   echo "$ac_t""yes" 1>&6
22193   cat >> confdefs.h <<\EOF
22194 #define HAVE_DOPRNT 1
22195 EOF
22196
22197 else
22198   echo "$ac_t""no" 1>&6
22199 fi
22200
22201 fi
22202
22203
22204 if test $ac_cv_func_vprintf = yes ; then
22205                 for ac_func in snprintf vsnprintf
22206 do
22207 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22208 echo "configure:22209: checking for $ac_func" >&5
22209 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22210   echo $ac_n "(cached) $ac_c" 1>&6
22211 else
22212   cat > conftest.$ac_ext <<EOF
22213 #line 22214 "configure"
22214 #include "confdefs.h"
22215 /* System header to define __stub macros and hopefully few prototypes,
22216     which can conflict with char $ac_func(); below.  */
22217 #include <assert.h>
22218 /* Override any gcc2 internal prototype to avoid an error.  */
22219 /* We use char because int might match the return type of a gcc2
22220     builtin and then its argument prototype would still apply.  */
22221 char $ac_func();
22222 char (*f)();
22223
22224 int main() {
22225
22226 /* The GNU C library defines this for functions which it implements
22227     to always fail with ENOSYS.  Some functions are actually named
22228     something starting with __ and the normal name is an alias.  */
22229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22230 choke me
22231 #else
22232 f = $ac_func;
22233 #endif
22234
22235 ; return 0; }
22236 EOF
22237 if { (eval echo configure:22238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22238   rm -rf conftest*
22239   eval "ac_cv_func_$ac_func=yes"
22240 else
22241   echo "configure: failed program was:" >&5
22242   cat conftest.$ac_ext >&5
22243   rm -rf conftest*
22244   eval "ac_cv_func_$ac_func=no"
22245 fi
22246 rm -f conftest*
22247 fi
22248
22249 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22250   echo "$ac_t""yes" 1>&6
22251     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22252   cat >> confdefs.h <<EOF
22253 #define $ac_tr_func 1
22254 EOF
22255  
22256 else
22257   echo "$ac_t""no" 1>&6
22258 fi
22259 done
22260
22261 fi
22262
22263 for ac_func in \
22264         bcopy                   \
22265         closesocket             \
22266         chroot                  \
22267         endgrent                \
22268         endpwent                \
22269         fcntl                   \
22270         flock                   \
22271         fstat                   \
22272         getdtablesize   \
22273         getgrgid                \
22274         gethostname             \
22275         getpass                 \
22276         getpassphrase   \
22277         getpwuid                \
22278         getpwnam                \
22279         getspnam                \
22280         gettimeofday    \
22281         initgroups              \
22282         lockf                   \
22283         memcpy                  \
22284         memmove                 \
22285         mkstemp                 \
22286         mktemp                  \
22287         pipe                    \
22288         read                    \
22289         recv                    \
22290         recvfrom                \
22291         setpwfile               \
22292         setgid                  \
22293         setegid                 \
22294         setsid                  \
22295         setuid                  \
22296         seteuid                 \
22297         sigaction               \
22298         signal                  \
22299         sigset                  \
22300         strdup                  \
22301         strerror                \
22302         strpbrk                 \
22303         strrchr                 \
22304         strsep                  \
22305         strstr                  \
22306         strtol                  \
22307         strtoul                 \
22308         strspn                  \
22309         sysconf                 \
22310         usleep                  \
22311         waitpid                 \
22312         wait4                   \
22313         write                   \
22314         send                    \
22315         sendmsg                 \
22316         sendto                  \
22317
22318 do
22319 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22320 echo "configure:22321: checking for $ac_func" >&5
22321 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22322   echo $ac_n "(cached) $ac_c" 1>&6
22323 else
22324   cat > conftest.$ac_ext <<EOF
22325 #line 22326 "configure"
22326 #include "confdefs.h"
22327 /* System header to define __stub macros and hopefully few prototypes,
22328     which can conflict with char $ac_func(); below.  */
22329 #include <assert.h>
22330 /* Override any gcc2 internal prototype to avoid an error.  */
22331 /* We use char because int might match the return type of a gcc2
22332     builtin and then its argument prototype would still apply.  */
22333 char $ac_func();
22334 char (*f)();
22335
22336 int main() {
22337
22338 /* The GNU C library defines this for functions which it implements
22339     to always fail with ENOSYS.  Some functions are actually named
22340     something starting with __ and the normal name is an alias.  */
22341 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22342 choke me
22343 #else
22344 f = $ac_func;
22345 #endif
22346
22347 ; return 0; }
22348 EOF
22349 if { (eval echo configure:22350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22350   rm -rf conftest*
22351   eval "ac_cv_func_$ac_func=yes"
22352 else
22353   echo "configure: failed program was:" >&5
22354   cat conftest.$ac_ext >&5
22355   rm -rf conftest*
22356   eval "ac_cv_func_$ac_func=no"
22357 fi
22358 rm -f conftest*
22359 fi
22360
22361 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22362   echo "$ac_t""yes" 1>&6
22363     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22364   cat >> confdefs.h <<EOF
22365 #define $ac_tr_func 1
22366 EOF
22367  
22368 else
22369   echo "$ac_t""no" 1>&6
22370 fi
22371 done
22372
22373
22374 for ac_func in getopt getpeereid
22375 do
22376 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22377 echo "configure:22378: checking for $ac_func" >&5
22378 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22379   echo $ac_n "(cached) $ac_c" 1>&6
22380 else
22381   cat > conftest.$ac_ext <<EOF
22382 #line 22383 "configure"
22383 #include "confdefs.h"
22384 /* System header to define __stub macros and hopefully few prototypes,
22385     which can conflict with char $ac_func(); below.  */
22386 #include <assert.h>
22387 /* Override any gcc2 internal prototype to avoid an error.  */
22388 /* We use char because int might match the return type of a gcc2
22389     builtin and then its argument prototype would still apply.  */
22390 char $ac_func();
22391 char (*f)();
22392
22393 int main() {
22394
22395 /* The GNU C library defines this for functions which it implements
22396     to always fail with ENOSYS.  Some functions are actually named
22397     something starting with __ and the normal name is an alias.  */
22398 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22399 choke me
22400 #else
22401 f = $ac_func;
22402 #endif
22403
22404 ; return 0; }
22405 EOF
22406 if { (eval echo configure:22407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22407   rm -rf conftest*
22408   eval "ac_cv_func_$ac_func=yes"
22409 else
22410   echo "configure: failed program was:" >&5
22411   cat conftest.$ac_ext >&5
22412   rm -rf conftest*
22413   eval "ac_cv_func_$ac_func=no"
22414 fi
22415 rm -f conftest*
22416 fi
22417
22418 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22419   echo "$ac_t""yes" 1>&6
22420     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22421   cat >> confdefs.h <<EOF
22422 #define $ac_tr_func 1
22423 EOF
22424  
22425 else
22426   echo "$ac_t""no" 1>&6
22427 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22428 fi
22429 done
22430
22431
22432
22433 if test "$ac_cv_func_getopt" != yes; then
22434         LIBSRCS="$LIBSRCS getopt.c"
22435 fi
22436 if test "$ac_cv_func_getpeereid" != yes; then
22437         LIBSRCS="$LIBSRCS getpeereid.c"
22438 fi
22439 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22440         if test "$ac_cv_func_snprintf" != yes; then
22441                 cat >> confdefs.h <<\EOF
22442 #define snprintf ber_pvt_snprintf
22443 EOF
22444
22445         fi
22446         if test "$ac_cv_func_vsnprintf" != yes; then
22447                 cat >> confdefs.h <<\EOF
22448 #define vsnprintf ber_pvt_vsnprintf
22449 EOF
22450
22451         fi
22452 fi
22453
22454 # Check Configuration
22455 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22456 echo "configure:22457: checking declaration of sys_errlist" >&5
22457 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22458   echo $ac_n "(cached) $ac_c" 1>&6
22459 else
22460   
22461         cat > conftest.$ac_ext <<EOF
22462 #line 22463 "configure"
22463 #include "confdefs.h"
22464
22465 #include <stdio.h>
22466 #include <sys/types.h>
22467 #include <errno.h>
22468 #ifdef WINNT
22469 #include <stdlib.h>
22470 #endif 
22471 int main() {
22472 char *c = (char *) *sys_errlist
22473 ; return 0; }
22474 EOF
22475 if { (eval echo configure:22476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22476   rm -rf conftest*
22477   ol_cv_dcl_sys_errlist=yes
22478         ol_cv_have_sys_errlist=yes
22479 else
22480   echo "configure: failed program was:" >&5
22481   cat conftest.$ac_ext >&5
22482   rm -rf conftest*
22483   ol_cv_dcl_sys_errlist=no
22484 fi
22485 rm -f conftest*
22486 fi
22487
22488 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22489 #
22490 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22491 if test $ol_cv_dcl_sys_errlist = no ; then
22492         cat >> confdefs.h <<\EOF
22493 #define DECL_SYS_ERRLIST 1
22494 EOF
22495
22496
22497         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22498 echo "configure:22499: checking existence of sys_errlist" >&5
22499 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22500   echo $ac_n "(cached) $ac_c" 1>&6
22501 else
22502   
22503                 cat > conftest.$ac_ext <<EOF
22504 #line 22505 "configure"
22505 #include "confdefs.h"
22506 #include <errno.h>
22507 int main() {
22508 char *c = (char *) *sys_errlist
22509 ; return 0; }
22510 EOF
22511 if { (eval echo configure:22512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22512   rm -rf conftest*
22513   ol_cv_have_sys_errlist=yes
22514 else
22515   echo "configure: failed program was:" >&5
22516   cat conftest.$ac_ext >&5
22517   rm -rf conftest*
22518   ol_cv_have_sys_errlist=no
22519 fi
22520 rm -f conftest*
22521 fi
22522
22523 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22524 fi
22525 if test $ol_cv_have_sys_errlist = yes ; then
22526         cat >> confdefs.h <<\EOF
22527 #define HAVE_SYS_ERRLIST 1
22528 EOF
22529
22530 fi
22531
22532
22533
22534 if test "$ol_enable_debug" != no ; then
22535         cat >> confdefs.h <<\EOF
22536 #define LDAP_DEBUG 1
22537 EOF
22538
22539 fi
22540 if test "$ol_enable_syslog" = yes ; then
22541         cat >> confdefs.h <<\EOF
22542 #define LDAP_SYSLOG 1
22543 EOF
22544
22545 fi
22546 if test "$ol_link_kbind" != no ; then
22547         cat >> confdefs.h <<\EOF
22548 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22549 EOF
22550
22551 fi
22552 if test "$ol_enable_proctitle" != no ; then
22553         cat >> confdefs.h <<\EOF
22554 #define LDAP_PROCTITLE 1
22555 EOF
22556
22557 fi
22558 if test "$ol_enable_referrals" != no ; then
22559         cat >> confdefs.h <<\EOF
22560 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22561 EOF
22562
22563 fi
22564 if test "$ol_enable_local" != no; then
22565         cat >> confdefs.h <<\EOF
22566 #define LDAP_PF_LOCAL 1
22567 EOF
22568
22569 fi
22570 if test "$ol_link_ipv6" != no; then
22571         cat >> confdefs.h <<\EOF
22572 #define LDAP_PF_INET6 1
22573 EOF
22574
22575 fi
22576 if test "$ol_enable_cleartext" != no ; then
22577         cat >> confdefs.h <<\EOF
22578 #define SLAPD_CLEARTEXT 1
22579 EOF
22580
22581 fi
22582 if test "$ol_enable_crypt" != no ; then
22583         cat >> confdefs.h <<\EOF
22584 #define SLAPD_CRYPT 1
22585 EOF
22586
22587 fi
22588 if test "$ol_link_kpasswd" != no ; then
22589         cat >> confdefs.h <<\EOF
22590 #define SLAPD_KPASSWD 1
22591 EOF
22592
22593 fi
22594 if test "$ol_link_spasswd" != no ; then
22595         cat >> confdefs.h <<\EOF
22596 #define SLAPD_SPASSWD 1
22597 EOF
22598
22599 fi
22600 if test "$ol_enable_multimaster" != no ; then
22601         cat >> confdefs.h <<\EOF
22602 #define SLAPD_MULTIMASTER 1
22603 EOF
22604
22605 fi
22606 if test "$ol_enable_phonetic" != no ; then
22607         cat >> confdefs.h <<\EOF
22608 #define SLAPD_PHONETIC 1
22609 EOF
22610
22611 fi
22612 if test "$ol_enable_rlookups" != no ; then
22613         cat >> confdefs.h <<\EOF
22614 #define SLAPD_RLOOKUPS 1
22615 EOF
22616
22617 fi
22618 if test "$ol_enable_aci" != no ; then
22619         cat >> confdefs.h <<\EOF
22620 #define SLAPD_ACI_ENABLED 1
22621 EOF
22622
22623 fi
22624
22625 if test "$ol_link_modules" != no ; then
22626         cat >> confdefs.h <<\EOF
22627 #define SLAPD_MODULES 1
22628 EOF
22629
22630         BUILD_SLAPD=yes
22631         SLAPD_MODULES_LDFLAGS="-dlopen self"
22632 fi
22633
22634 if test "$ol_enable_bdb" != no ; then
22635         cat >> confdefs.h <<\EOF
22636 #define SLAPD_BDB 1
22637 EOF
22638
22639         BUILD_SLAPD=yes
22640         BUILD_BDB=yes
22641         if test "$ol_with_bdb_module" != static ; then
22642                 cat >> confdefs.h <<\EOF
22643 #define SLAPD_BDB_DYNAMIC 1
22644 EOF
22645
22646                 BUILD_BDB=mod
22647                 BUILD_BDB_DYNAMIC=shared
22648                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22649         else
22650                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22651         fi
22652 fi
22653
22654 if test "$ol_link_dnssrv" != no ; then
22655         cat >> confdefs.h <<\EOF
22656 #define SLAPD_DNSSRV 1
22657 EOF
22658
22659         BUILD_SLAPD=yes
22660         BUILD_DNSSRV=yes
22661         if test "$ol_with_dnssrv_module" != static ; then
22662                 cat >> confdefs.h <<\EOF
22663 #define SLAPD_DNSSRV_DYNAMIC 1
22664 EOF
22665
22666                 BUILD_DNSSRV=mod
22667                 BUILD_DNSSRV_DYNAMIC=shared
22668                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22669         else
22670                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22671         fi
22672 fi
22673
22674 if test "$ol_enable_ldap" != no ; then
22675         cat >> confdefs.h <<\EOF
22676 #define SLAPD_LDAP 1
22677 EOF
22678
22679         BUILD_SLAPD=yes
22680         BUILD_LDAP=yes
22681         if test "$ol_with_ldap_module" != static ; then
22682                 cat >> confdefs.h <<\EOF
22683 #define SLAPD_LDAP_DYNAMIC 1
22684 EOF
22685
22686                 BUILD_LDAP=mod
22687                 BUILD_LDAP_DYNAMIC=shared
22688                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22689         else
22690                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22691         fi
22692 fi
22693
22694 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22695         cat >> confdefs.h <<\EOF
22696 #define SLAPD_LDBM 1
22697 EOF
22698
22699         BUILD_SLAPD=yes
22700         BUILD_LDBM=yes
22701         if test "$ol_with_ldbm_module" != static ; then
22702                 cat >> confdefs.h <<\EOF
22703 #define SLAPD_LDBM_DYNAMIC 1
22704 EOF
22705
22706                 BUILD_LDBM=mod
22707                 BUILD_LDBM_DYNAMIC=shared
22708                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22709         else
22710                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22711         fi
22712 fi
22713
22714 if test "$ol_enable_meta" != no ; then
22715         if test "$ol_enable_ldap" = no ; then
22716                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22717         fi
22718         if test "$ol_enable_rewrite" = no ; then
22719                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22720         fi
22721         cat >> confdefs.h <<\EOF
22722 #define SLAPD_META 1
22723 EOF
22724
22725         BUILD_SLAPD=yes
22726         BUILD_META=yes
22727         BUILD_LDAP=yes
22728         BUILD_REWRITE=yes
22729         if test "$ol_with_meta_module" != static ; then
22730                 cat >> confdefs.h <<\EOF
22731 #define SLAPD_META_DYNAMIC 1
22732 EOF
22733
22734                 BUILD_META=mod
22735                 BUILD_META_DYNAMIC=shared
22736                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22737         else
22738                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22739         fi
22740 fi
22741
22742 if test "$ol_enable_monitor" != no ; then
22743         cat >> confdefs.h <<\EOF
22744 #define SLAPD_MONITOR 1
22745 EOF
22746
22747         BUILD_SLAPD=yes
22748         BUILD_MONITOR=yes
22749         if test "$ol_with_monitor_module" != static ; then
22750                 cat >> confdefs.h <<\EOF
22751 #define SLAPD_MONITOR_DYNAMIC 1
22752 EOF
22753
22754                 BUILD_MONITOR=mod
22755                 BUILD_MONITOR_DYNAMIC=shared
22756                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22757         else
22758                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22759         fi
22760 fi
22761
22762 if test "$ol_enable_null" != no ; then
22763         cat >> confdefs.h <<\EOF
22764 #define SLAPD_NULL 1
22765 EOF
22766
22767         BUILD_SLAPD=yes
22768         BUILD_NULL=yes
22769         if test "$ol_with_null_module" != static ; then
22770                 cat >> confdefs.h <<\EOF
22771 #define SLAPD_NULL_DYNAMIC 1
22772 EOF
22773
22774                 BUILD_NULL=mod
22775                 BUILD_NULL_DYNAMIC=shared
22776                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22777         else
22778                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22779         fi
22780 fi
22781
22782 if test "$ol_enable_passwd" != no ; then
22783         cat >> confdefs.h <<\EOF
22784 #define SLAPD_PASSWD 1
22785 EOF
22786
22787         BUILD_SLAPD=yes
22788         BUILD_PASSWD=yes
22789         if test "$ol_with_passwd_module" != static ; then
22790                 cat >> confdefs.h <<\EOF
22791 #define SLAPD_PASSWD_DYNAMIC 1
22792 EOF
22793
22794                 BUILD_PASSWD=mod
22795                 BUILD_PASSWD_DYNAMIC=shared
22796                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22797         else
22798                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22799         fi
22800 fi
22801
22802 if test "$ol_link_perl" != no ; then
22803         cat >> confdefs.h <<\EOF
22804 #define SLAPD_PERL 1
22805 EOF
22806
22807         BUILD_SLAPD=yes
22808         BUILD_PERL=yes
22809         if test "$ol_with_perl_module" != static ; then
22810                 cat >> confdefs.h <<\EOF
22811 #define SLAPD_PERL_DYNAMIC 1
22812 EOF
22813
22814                 BUILD_PERL=mod
22815                 BUILD_PERL_DYNAMIC=shared
22816                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22817         else
22818                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22819         fi
22820 fi
22821
22822 if test "$ol_enable_shell" != no ; then
22823         if test "$ol_link_thread" != no ; then
22824                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
22825         fi
22826         cat >> confdefs.h <<\EOF
22827 #define SLAPD_SHELL 1
22828 EOF
22829
22830         BUILD_SLAPD=yes
22831         BUILD_SHELL=yes
22832         if test "$ol_with_shell_module" != static ; then
22833                 cat >> confdefs.h <<\EOF
22834 #define SLAPD_SHELL_DYNAMIC 1
22835 EOF
22836
22837                 BUILD_SHELL=mod
22838                 BUILD_SHELL_DYNAMIC=shared
22839                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22840         else
22841                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22842         fi
22843 fi
22844
22845 if test "$ol_link_sql" != no ; then
22846         cat >> confdefs.h <<\EOF
22847 #define SLAPD_SQL 1
22848 EOF
22849
22850         BUILD_SLAPD=yes
22851         BUILD_SQL=yes
22852         if test "$ol_with_sql_module" != static; then
22853                 cat >> confdefs.h <<\EOF
22854 #define SLAPD_SQL_DYNAMIC 1
22855 EOF
22856
22857                 BUILD_SQL=mod
22858                 BUILD_SQL_DYNAMIC=shared
22859                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22860         else
22861                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22862         fi
22863 fi
22864
22865 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22866         $BUILD_SLAPD = yes ; then
22867         BUILD_SLURPD=yes
22868 fi
22869
22870 if test "$ol_enable_rewrite" != no ; then
22871         cat >> confdefs.h <<\EOF
22872 #define ENABLE_REWRITE 1
22873 EOF
22874
22875         BUILD_REWRITE=yes
22876 fi
22877
22878
22879
22880 if test "$ac_cv_mingw32" = yes ; then
22881         PLAT=NT
22882         SLAPD_MODULES_LDFLAGS=
22883 else
22884         PLAT=UNIX
22885 fi
22886
22887 if test -z "$SLAPD_STATIC_BACKENDS"; then
22888         SLAPD_NO_STATIC='#'
22889 else
22890         SLAPD_NO_STATIC=
22891 fi
22892
22893
22894
22895
22896
22897
22898   
22899   
22900   
22901   
22902   
22903   
22904   
22905   
22906   
22907   
22908   
22909   
22910   
22911   
22912   
22913   
22914   
22915   
22916   
22917   
22918   
22919   
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957 # Check whether --with-xxinstall or --without-xxinstall was given.
22958 if test "${with_xxinstall+set}" = set; then
22959   withval="$with_xxinstall"
22960   :
22961 fi
22962
22963
22964
22965 trap '' 1 2 15
22966
22967 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22968
22969 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22970 # Let make expand exec_prefix.
22971 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22972
22973 # Any assignment to VPATH causes Sun make to only execute
22974 # the first set of double-colon rules, so remove it if not needed.
22975 # If there is a colon in the path, we need to keep it.
22976 if test "x$srcdir" = x.; then
22977   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22978 fi
22979
22980 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22981
22982 DEFS=-DHAVE_CONFIG_H
22983
22984 # Without the "./", some shells look in PATH for config.status.
22985 : ${CONFIG_STATUS=./config.status}
22986
22987 echo creating $CONFIG_STATUS
22988 rm -f $CONFIG_STATUS
22989 cat > $CONFIG_STATUS <<EOF
22990 #! /bin/sh
22991 # Generated automatically by configure.
22992 # Run this file to recreate the current configuration.
22993 # This directory was configured as follows,
22994 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22995 #
22996 # $0 $ac_configure_args
22997 #
22998 # Compiler output produced by configure, useful for debugging
22999 # configure, is in ./config.log if it exists.
23000
23001 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23002 for ac_option
23003 do
23004   case "\$ac_option" in
23005   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23006     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23007     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23008   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23009     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23010     exit 0 ;;
23011   -help | --help | --hel | --he | --h)
23012     echo "\$ac_cs_usage"; exit 0 ;;
23013   *) echo "\$ac_cs_usage"; exit 1 ;;
23014   esac
23015 done
23016
23017 ac_given_srcdir=$srcdir
23018 ac_given_INSTALL="$INSTALL"
23019
23020 trap 'rm -fr `echo "\
23021 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23022 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23023 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23024 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23025 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23026 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23027 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23028 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23029 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23030 include/Makefile:build/top.mk:include/Makefile.in \
23031 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23032 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23033 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23034 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23035 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23036 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23037 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23038 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23039 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23040 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23041 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23042 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23043 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23044 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23045 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23046 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23047 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23048 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23049 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23050 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23051 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23052 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23053 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23054 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23055 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23056 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23057 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23058 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23059  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23060 EOF
23061 cat >> $CONFIG_STATUS <<EOF
23062
23063 # Protect against being on the right side of a sed subst in config.status.
23064 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23065  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23066 $ac_vpsub
23067 $extrasub
23068 s%@SHELL@%$SHELL%g
23069 s%@CFLAGS@%$CFLAGS%g
23070 s%@CPPFLAGS@%$CPPFLAGS%g
23071 s%@CXXFLAGS@%$CXXFLAGS%g
23072 s%@FFLAGS@%$FFLAGS%g
23073 s%@DEFS@%$DEFS%g
23074 s%@LDFLAGS@%$LDFLAGS%g
23075 s%@LIBS@%$LIBS%g
23076 s%@exec_prefix@%$exec_prefix%g
23077 s%@prefix@%$prefix%g
23078 s%@program_transform_name@%$program_transform_name%g
23079 s%@bindir@%$bindir%g
23080 s%@sbindir@%$sbindir%g
23081 s%@libexecdir@%$libexecdir%g
23082 s%@datadir@%$datadir%g
23083 s%@sysconfdir@%$sysconfdir%g
23084 s%@sharedstatedir@%$sharedstatedir%g
23085 s%@localstatedir@%$localstatedir%g
23086 s%@libdir@%$libdir%g
23087 s%@includedir@%$includedir%g
23088 s%@oldincludedir@%$oldincludedir%g
23089 s%@infodir@%$infodir%g
23090 s%@mandir@%$mandir%g
23091 s%@host@%$host%g
23092 s%@host_alias@%$host_alias%g
23093 s%@host_cpu@%$host_cpu%g
23094 s%@host_vendor@%$host_vendor%g
23095 s%@host_os@%$host_os%g
23096 s%@target@%$target%g
23097 s%@target_alias@%$target_alias%g
23098 s%@target_cpu@%$target_cpu%g
23099 s%@target_vendor@%$target_vendor%g
23100 s%@target_os@%$target_os%g
23101 s%@build@%$build%g
23102 s%@build_alias@%$build_alias%g
23103 s%@build_cpu@%$build_cpu%g
23104 s%@build_vendor@%$build_vendor%g
23105 s%@build_os@%$build_os%g
23106 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23107 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23108 s%@INSTALL_DATA@%$INSTALL_DATA%g
23109 s%@PACKAGE@%$PACKAGE%g
23110 s%@VERSION@%$VERSION%g
23111 s%@ACLOCAL@%$ACLOCAL%g
23112 s%@AUTOCONF@%$AUTOCONF%g
23113 s%@AUTOMAKE@%$AUTOMAKE%g
23114 s%@AUTOHEADER@%$AUTOHEADER%g
23115 s%@MAKEINFO@%$MAKEINFO%g
23116 s%@install_sh@%$install_sh%g
23117 s%@AMTAR@%$AMTAR%g
23118 s%@AWK@%$AWK%g
23119 s%@AMTARFLAGS@%$AMTARFLAGS%g
23120 s%@SET_MAKE@%$SET_MAKE%g
23121 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23122 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23123 s%@top_builddir@%$top_builddir%g
23124 s%@ldap_subdir@%$ldap_subdir%g
23125 s%@CC@%$CC%g
23126 s%@AR@%$AR%g
23127 s%@LN_S@%$LN_S%g
23128 s%@OBJEXT@%$OBJEXT%g
23129 s%@EXEEXT@%$EXEEXT%g
23130 s%@ECHO@%$ECHO%g
23131 s%@RANLIB@%$RANLIB%g
23132 s%@STRIP@%$STRIP%g
23133 s%@DLLTOOL@%$DLLTOOL%g
23134 s%@AS@%$AS%g
23135 s%@OBJDUMP@%$OBJDUMP%g
23136 s%@CPP@%$CPP%g
23137 s%@LIBTOOL@%$LIBTOOL%g
23138 s%@LN_H@%$LN_H%g
23139 s%@PERLBIN@%$PERLBIN%g
23140 s%@OL_MKDEP@%$OL_MKDEP%g
23141 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23142 s%@LTSTATIC@%$LTSTATIC%g
23143 s%@LIBOBJS@%$LIBOBJS%g
23144 s%@LIBSRCS@%$LIBSRCS%g
23145 s%@PLAT@%$PLAT%g
23146 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23147 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23148 s%@BUILD_BDB@%$BUILD_BDB%g
23149 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23150 s%@BUILD_LDAP@%$BUILD_LDAP%g
23151 s%@BUILD_LDBM@%$BUILD_LDBM%g
23152 s%@BUILD_META@%$BUILD_META%g
23153 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23154 s%@BUILD_NULL@%$BUILD_NULL%g
23155 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23156 s%@BUILD_PERL@%$BUILD_PERL%g
23157 s%@BUILD_SHELL@%$BUILD_SHELL%g
23158 s%@BUILD_SQL@%$BUILD_SQL%g
23159 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23160 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23161 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23162 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23163 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23164 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23165 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23166 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23167 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23168 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23169 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23170 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23171 s%@LDAP_LIBS@%$LDAP_LIBS%g
23172 s%@LDIF_LIBS@%$LDIF_LIBS%g
23173 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23174 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23175 s%@LDBM_LIBS@%$LDBM_LIBS%g
23176 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23177 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23178 s%@WRAP_LIBS@%$WRAP_LIBS%g
23179 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23180 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23181 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23182 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23183 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23184 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23185 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23186 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23187 s%@KRB4_LIBS@%$KRB4_LIBS%g
23188 s%@KRB5_LIBS@%$KRB5_LIBS%g
23189 s%@READLINE_LIBS@%$READLINE_LIBS%g
23190 s%@SASL_LIBS@%$SASL_LIBS%g
23191 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23192 s%@TLS_LIBS@%$TLS_LIBS%g
23193 s%@MODULES_LIBS@%$MODULES_LIBS%g
23194 s%@AUTH_LIBS@%$AUTH_LIBS%g
23195 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23196 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23197 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23198 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23199
23200 CEOF
23201 EOF
23202
23203 cat >> $CONFIG_STATUS <<\EOF
23204
23205 # Split the substitutions into bite-sized pieces for seds with
23206 # small command number limits, like on Digital OSF/1 and HP-UX.
23207 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23208 ac_file=1 # Number of current file.
23209 ac_beg=1 # First line for current file.
23210 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23211 ac_more_lines=:
23212 ac_sed_cmds=""
23213 while $ac_more_lines; do
23214   if test $ac_beg -gt 1; then
23215     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23216   else
23217     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23218   fi
23219   if test ! -s conftest.s$ac_file; then
23220     ac_more_lines=false
23221     rm -f conftest.s$ac_file
23222   else
23223     if test -z "$ac_sed_cmds"; then
23224       ac_sed_cmds="sed -f conftest.s$ac_file"
23225     else
23226       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23227     fi
23228     ac_file=`expr $ac_file + 1`
23229     ac_beg=$ac_end
23230     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23231   fi
23232 done
23233 if test -z "$ac_sed_cmds"; then
23234   ac_sed_cmds=cat
23235 fi
23236 EOF
23237
23238 cat >> $CONFIG_STATUS <<EOF
23239
23240 CONFIG_FILES=\${CONFIG_FILES-"\
23241 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23242 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23243 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23244 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23245 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23246 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23247 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23248 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23249 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23250 include/Makefile:build/top.mk:include/Makefile.in \
23251 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23252 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23253 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23254 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23255 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23256 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23257 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23258 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23259 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23260 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23261 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23262 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23263 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23264 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23265 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23266 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23267 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23268 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23269 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23270 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23271 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23272 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23273 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23274 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23275 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23276 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23277 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23278 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23279 "}
23280 EOF
23281 cat >> $CONFIG_STATUS <<\EOF
23282 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23283   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23284   case "$ac_file" in
23285   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23286        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23287   *) ac_file_in="${ac_file}.in" ;;
23288   esac
23289
23290   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23291
23292   # Remove last slash and all that follows it.  Not all systems have dirname.
23293   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23294   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23295     # The file is in a subdirectory.
23296     test ! -d "$ac_dir" && mkdir "$ac_dir"
23297     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23298     # A "../" for each directory in $ac_dir_suffix.
23299     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23300   else
23301     ac_dir_suffix= ac_dots=
23302   fi
23303
23304   case "$ac_given_srcdir" in
23305   .)  srcdir=.
23306       if test -z "$ac_dots"; then top_srcdir=.
23307       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23308   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23309   *) # Relative path.
23310     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23311     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23312   esac
23313
23314   case "$ac_given_INSTALL" in
23315   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23316   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23317   esac
23318
23319   echo creating "$ac_file"
23320   rm -f "$ac_file"
23321   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23322   case "$ac_file" in
23323   *[Mm]akefile*) ac_comsub="1i\\
23324 # $configure_input" ;;
23325   *) ac_comsub= ;;
23326   esac
23327
23328   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23329   sed -e "$ac_comsub
23330 s%@configure_input@%$configure_input%g
23331 s%@srcdir@%$srcdir%g
23332 s%@top_srcdir@%$top_srcdir%g
23333 s%@INSTALL@%$INSTALL%g
23334 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23335 fi; done
23336 rm -f conftest.s*
23337
23338 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23339 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23340 #
23341 # ac_d sets the value in "#define NAME VALUE" lines.
23342 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23343 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23344 ac_dC='\3'
23345 ac_dD='%g'
23346 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23347 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23348 ac_uB='\([      ]\)%\1#\2define\3'
23349 ac_uC=' '
23350 ac_uD='\4%g'
23351 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23352 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23353 ac_eB='$%\1#\2define\3'
23354 ac_eC=' '
23355 ac_eD='%g'
23356
23357 if test "${CONFIG_HEADERS+set}" != set; then
23358 EOF
23359 cat >> $CONFIG_STATUS <<EOF
23360   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23361 EOF
23362 cat >> $CONFIG_STATUS <<\EOF
23363 fi
23364 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23365   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23366   case "$ac_file" in
23367   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23368        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23369   *) ac_file_in="${ac_file}.in" ;;
23370   esac
23371
23372   echo creating $ac_file
23373
23374   rm -f conftest.frag conftest.in conftest.out
23375   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23376   cat $ac_file_inputs > conftest.in
23377
23378 EOF
23379
23380 # Transform confdefs.h into a sed script conftest.vals that substitutes
23381 # the proper values into config.h.in to produce config.h.  And first:
23382 # Protect against being on the right side of a sed subst in config.status.
23383 # Protect against being in an unquoted here document in config.status.
23384 rm -f conftest.vals
23385 cat > conftest.hdr <<\EOF
23386 s/[\\&%]/\\&/g
23387 s%[\\$`]%\\&%g
23388 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23389 s%ac_d%ac_u%gp
23390 s%ac_u%ac_e%gp
23391 EOF
23392 sed -n -f conftest.hdr confdefs.h > conftest.vals
23393 rm -f conftest.hdr
23394
23395 # This sed command replaces #undef with comments.  This is necessary, for
23396 # example, in the case of _POSIX_SOURCE, which is predefined and required
23397 # on some systems where configure will not decide to define it.
23398 cat >> conftest.vals <<\EOF
23399 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23400 EOF
23401
23402 # Break up conftest.vals because some shells have a limit on
23403 # the size of here documents, and old seds have small limits too.
23404
23405 rm -f conftest.tail
23406 while :
23407 do
23408   ac_lines=`grep -c . conftest.vals`
23409   # grep -c gives empty output for an empty file on some AIX systems.
23410   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23411   # Write a limited-size here document to conftest.frag.
23412   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23413   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23414   echo 'CEOF
23415   sed -f conftest.frag conftest.in > conftest.out
23416   rm -f conftest.in
23417   mv conftest.out conftest.in
23418 ' >> $CONFIG_STATUS
23419   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23420   rm -f conftest.vals
23421   mv conftest.tail conftest.vals
23422 done
23423 rm -f conftest.vals
23424
23425 cat >> $CONFIG_STATUS <<\EOF
23426   rm -f conftest.frag conftest.h
23427   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23428   cat conftest.in >> conftest.h
23429   rm -f conftest.in
23430   if cmp -s $ac_file conftest.h 2>/dev/null; then
23431     echo "$ac_file is unchanged"
23432     rm -f conftest.h
23433   else
23434     # Remove last slash and all that follows it.  Not all systems have dirname.
23435       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23436       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23437       # The file is in a subdirectory.
23438       test ! -d "$ac_dir" && mkdir "$ac_dir"
23439     fi
23440     rm -f $ac_file
23441     mv conftest.h $ac_file
23442   fi
23443 fi; done
23444
23445 EOF
23446 cat >> $CONFIG_STATUS <<EOF
23447
23448 EOF
23449 cat >> $CONFIG_STATUS <<\EOF
23450
23451 date > stamp-h
23452 echo Please run \"make depend\" to build dependencies
23453
23454 exit 0
23455 EOF
23456 chmod +x $CONFIG_STATUS
23457 rm -fr confdefs* $ac_clean_files
23458 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23459