]> git.sur5r.net Git - openldap/blob - configure
Add ITS# to CHANGES
[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-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-ipv6           enable IPv6 support [auto]"
38 ac_help="$ac_help
39   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
40 ac_help="$ac_help
41   --enable-x-compile      enable cross compiling [no]"
42 ac_help="$ac_help
43   --with-cyrus-sasl       with Cyrus SASL support [auto]"
44 ac_help="$ac_help
45   --with-fetch            with fetch(3) URL support [auto]"
46 ac_help="$ac_help
47   --with-kerberos         with Kerberos support [auto]"
48 ac_help="$ac_help
49   --with-readline         with readline support [auto]"
50 ac_help="$ac_help
51   --with-threads          with threads [auto]"
52 ac_help="$ac_help
53   --with-tls              with TLS/SSL support [auto]"
54 ac_help="$ac_help
55   --with-yielding-select  with implicitly yielding select [auto]"
56 ac_help="$ac_help
57
58 SLAPD (Standalone LDAP Daemon) Options:"
59 ac_help="$ac_help
60   --enable-slapd          enable building slapd [yes]"
61 ac_help="$ac_help
62     --enable-aci          enable per-object ACIs (experimental) [no]"
63 ac_help="$ac_help
64     --enable-cleartext    enable cleartext passwords [yes]"
65 ac_help="$ac_help
66     --enable-crypt        enable crypt(3) passwords [no]"
67 ac_help="$ac_help
68     --enable-dynamic      enable linking built binaries with dynamic libs [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-syslog
1412         # Check whether --enable-syslog or --disable-syslog was given.
1413 if test "${enable_syslog+set}" = set; then
1414   enableval="$enable_syslog"
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-syslog" 1>&2; exit 1; }
1424         fi
1425         ol_enable_syslog="$ol_arg"
1426
1427 else
1428         ol_enable_syslog="auto"
1429 fi
1430 # end --enable-syslog
1431 # OpenLDAP --enable-proctitle
1432         # Check whether --enable-proctitle or --disable-proctitle was given.
1433 if test "${enable_proctitle+set}" = set; then
1434   enableval="$enable_proctitle"
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-proctitle" 1>&2; exit 1; }
1444         fi
1445         ol_enable_proctitle="$ol_arg"
1446
1447 else
1448         ol_enable_proctitle="yes"
1449 fi
1450 # end --enable-proctitle
1451 ol_enable_referrals=${ol_enable_referrals-no}
1452 ol_enable_kbind=${ol_enable_kbind-no}
1453 # OpenLDAP --enable-ipv6
1454         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1455 if test "${enable_ipv6+set}" = set; then
1456   enableval="$enable_ipv6"
1457   
1458         ol_arg=invalid
1459         for ol_val in auto yes no ; do
1460                 if test "$enableval" = "$ol_val" ; then
1461                         ol_arg="$ol_val"
1462                 fi
1463         done
1464         if test "$ol_arg" = "invalid" ; then
1465                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1466         fi
1467         ol_enable_ipv6="$ol_arg"
1468
1469 else
1470         ol_enable_ipv6="auto"
1471 fi
1472 # end --enable-ipv6
1473 # OpenLDAP --enable-local
1474         # Check whether --enable-local or --disable-local was given.
1475 if test "${enable_local+set}" = set; then
1476   enableval="$enable_local"
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-local" 1>&2; exit 1; }
1486         fi
1487         ol_enable_local="$ol_arg"
1488
1489 else
1490         ol_enable_local="auto"
1491 fi
1492 # end --enable-local
1493 # OpenLDAP --enable-x_compile
1494         # Check whether --enable-x_compile or --disable-x_compile was given.
1495 if test "${enable_x_compile+set}" = set; then
1496   enableval="$enable_x_compile"
1497   
1498         ol_arg=invalid
1499         for ol_val in 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-x_compile" 1>&2; exit 1; }
1506         fi
1507         ol_enable_x_compile="$ol_arg"
1508
1509 else
1510         ol_enable_x_compile="no"
1511 fi
1512 # end --enable-x_compile
1513
1514
1515 # OpenLDAP --with-cyrus_sasl
1516         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1517 if test "${with_cyrus_sasl+set}" = set; then
1518   withval="$with_cyrus_sasl"
1519   
1520         ol_arg=invalid
1521         for ol_val in auto yes no  ; do
1522                 if test "$withval" = "$ol_val" ; then
1523                         ol_arg="$ol_val"
1524                 fi
1525         done
1526         if test "$ol_arg" = "invalid" ; then
1527                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1528         fi
1529         ol_with_cyrus_sasl="$ol_arg"
1530
1531 else
1532         ol_with_cyrus_sasl="auto"
1533 fi
1534 # end --with-cyrus_sasl
1535
1536 # OpenLDAP --with-fetch
1537         # Check whether --with-fetch or --without-fetch was given.
1538 if test "${with_fetch+set}" = set; then
1539   withval="$with_fetch"
1540   
1541         ol_arg=invalid
1542         for ol_val in auto yes no  ; do
1543                 if test "$withval" = "$ol_val" ; then
1544                         ol_arg="$ol_val"
1545                 fi
1546         done
1547         if test "$ol_arg" = "invalid" ; then
1548                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1549         fi
1550         ol_with_fetch="$ol_arg"
1551
1552 else
1553         ol_with_fetch="auto"
1554 fi
1555 # end --with-fetch
1556
1557 # OpenLDAP --with-kerberos
1558         # Check whether --with-kerberos or --without-kerberos was given.
1559 if test "${with_kerberos+set}" = set; then
1560   withval="$with_kerberos"
1561   
1562         ol_arg=invalid
1563         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1564                 if test "$withval" = "$ol_val" ; then
1565                         ol_arg="$ol_val"
1566                 fi
1567         done
1568         if test "$ol_arg" = "invalid" ; then
1569                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1570         fi
1571         ol_with_kerberos="$ol_arg"
1572
1573 else
1574         ol_with_kerberos="auto"
1575 fi
1576 # end --with-kerberos
1577
1578 # OpenLDAP --with-readline
1579         # Check whether --with-readline or --without-readline was given.
1580 if test "${with_readline+set}" = set; then
1581   withval="$with_readline"
1582   
1583         ol_arg=invalid
1584         for ol_val in auto yes no  ; do
1585                 if test "$withval" = "$ol_val" ; then
1586                         ol_arg="$ol_val"
1587                 fi
1588         done
1589         if test "$ol_arg" = "invalid" ; then
1590                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1591         fi
1592         ol_with_readline="$ol_arg"
1593
1594 else
1595         ol_with_readline="auto"
1596 fi
1597 # end --with-readline
1598
1599 # OpenLDAP --with-threads
1600         # Check whether --with-threads or --without-threads was given.
1601 if test "${with_threads+set}" = set; then
1602   withval="$with_threads"
1603   
1604         ol_arg=invalid
1605         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1606                 if test "$withval" = "$ol_val" ; then
1607                         ol_arg="$ol_val"
1608                 fi
1609         done
1610         if test "$ol_arg" = "invalid" ; then
1611                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1612         fi
1613         ol_with_threads="$ol_arg"
1614
1615 else
1616         ol_with_threads="auto"
1617 fi
1618 # end --with-threads
1619
1620 # OpenLDAP --with-tls
1621         # Check whether --with-tls or --without-tls was given.
1622 if test "${with_tls+set}" = set; then
1623   withval="$with_tls"
1624   
1625         ol_arg=invalid
1626         for ol_val in auto ssleay openssl yes no  ; do
1627                 if test "$withval" = "$ol_val" ; then
1628                         ol_arg="$ol_val"
1629                 fi
1630         done
1631         if test "$ol_arg" = "invalid" ; then
1632                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1633         fi
1634         ol_with_tls="$ol_arg"
1635
1636 else
1637         ol_with_tls="auto"
1638 fi
1639 # end --with-tls
1640
1641 # OpenLDAP --with-yielding_select
1642         # Check whether --with-yielding_select or --without-yielding_select was given.
1643 if test "${with_yielding_select+set}" = set; then
1644   withval="$with_yielding_select"
1645   
1646         ol_arg=invalid
1647         for ol_val in auto yes no manual  ; do
1648                 if test "$withval" = "$ol_val" ; then
1649                         ol_arg="$ol_val"
1650                 fi
1651         done
1652         if test "$ol_arg" = "invalid" ; then
1653                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1654         fi
1655         ol_with_yielding_select="$ol_arg"
1656
1657 else
1658         ol_with_yielding_select="auto"
1659 fi
1660 # end --with-yielding_select
1661
1662
1663
1664 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1665 if test "${with_xxslapdoptions+set}" = set; then
1666   withval="$with_xxslapdoptions"
1667   :
1668 fi
1669
1670 # OpenLDAP --enable-slapd
1671         # Check whether --enable-slapd or --disable-slapd was given.
1672 if test "${enable_slapd+set}" = set; then
1673   enableval="$enable_slapd"
1674   
1675         ol_arg=invalid
1676         for ol_val in auto yes no ; do
1677                 if test "$enableval" = "$ol_val" ; then
1678                         ol_arg="$ol_val"
1679                 fi
1680         done
1681         if test "$ol_arg" = "invalid" ; then
1682                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1683         fi
1684         ol_enable_slapd="$ol_arg"
1685
1686 else
1687         ol_enable_slapd="yes"
1688 fi
1689 # end --enable-slapd
1690 # OpenLDAP --enable-aci
1691         # Check whether --enable-aci or --disable-aci was given.
1692 if test "${enable_aci+set}" = set; then
1693   enableval="$enable_aci"
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-aci" 1>&2; exit 1; }
1703         fi
1704         ol_enable_aci="$ol_arg"
1705
1706 else
1707         ol_enable_aci="no"
1708 fi
1709 # end --enable-aci
1710 # OpenLDAP --enable-cleartext
1711         # Check whether --enable-cleartext or --disable-cleartext was given.
1712 if test "${enable_cleartext+set}" = set; then
1713   enableval="$enable_cleartext"
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-cleartext" 1>&2; exit 1; }
1723         fi
1724         ol_enable_cleartext="$ol_arg"
1725
1726 else
1727         ol_enable_cleartext="yes"
1728 fi
1729 # end --enable-cleartext
1730 # OpenLDAP --enable-crypt
1731         # Check whether --enable-crypt or --disable-crypt was given.
1732 if test "${enable_crypt+set}" = set; then
1733   enableval="$enable_crypt"
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-crypt" 1>&2; exit 1; }
1743         fi
1744         ol_enable_crypt="$ol_arg"
1745
1746 else
1747         ol_enable_crypt="no"
1748 fi
1749 # end --enable-crypt
1750 # OpenLDAP --enable-dynamic
1751         # Check whether --enable-dynamic or --disable-dynamic was given.
1752 if test "${enable_dynamic+set}" = set; then
1753   enableval="$enable_dynamic"
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-dynamic" 1>&2; exit 1; }
1763         fi
1764         ol_enable_dynamic="$ol_arg"
1765
1766 else
1767         ol_enable_dynamic="no"
1768 fi
1769 # end --enable-dynamic
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 LTSTATIC=""
7763 if test -z "$LTDYNAMIC"; then
7764         LTSTATIC="-static"
7765 fi
7766
7767 # test for ln hardlink support
7768 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7769 echo "configure:7770: checking whether ln works" >&5
7770 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7771   echo $ac_n "(cached) $ac_c" 1>&6
7772 else
7773   rm -f conftest.src conftest.dst
7774 echo "conftest" > conftest.src
7775 if ln conftest.src conftest.dst 2>/dev/null
7776 then
7777   ol_cv_prog_LN_H="ln"
7778 else
7779   ol_cv_prog_LN_H="cp"
7780 fi
7781 rm -f conftest.src conftest.dst
7782
7783 fi
7784 LN_H="$ol_cv_prog_LN_H"
7785 if test "$ol_cv_prog_LN_H" = "ln"; then
7786         echo "$ac_t""yes" 1>&6
7787 else
7788         echo "$ac_t""no" 1>&6
7789 fi
7790
7791 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7792 echo "configure:7793: checking whether ln -s works" >&5
7793 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7794   echo $ac_n "(cached) $ac_c" 1>&6
7795 else
7796   rm -f conftestdata
7797 if ln -s X conftestdata 2>/dev/null
7798 then
7799   rm -f conftestdata
7800   ac_cv_prog_LN_S="ln -s"
7801 else
7802   ac_cv_prog_LN_S=ln
7803 fi
7804 fi
7805 LN_S="$ac_cv_prog_LN_S"
7806 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7807   echo "$ac_t""yes" 1>&6
7808 else
7809   echo "$ac_t""no" 1>&6
7810 fi
7811
7812
7813 ol_link_perl=no
7814 if test $ol_enable_perl != no ; then
7815         # Extract the first word of "perl", so it can be a program name with args.
7816 set dummy perl; ac_word=$2
7817 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7818 echo "configure:7819: checking for $ac_word" >&5
7819 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7820   echo $ac_n "(cached) $ac_c" 1>&6
7821 else
7822   case "$PERLBIN" in
7823   /*)
7824   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7825   ;;
7826   ?:/*)
7827   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7828   ;;
7829   *)
7830   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7831   ac_dummy="$PATH"
7832   for ac_dir in $ac_dummy; do 
7833     test -z "$ac_dir" && ac_dir=.
7834     if test -f $ac_dir/$ac_word; then
7835       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7836       break
7837     fi
7838   done
7839   IFS="$ac_save_ifs"
7840   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7841   ;;
7842 esac
7843 fi
7844 PERLBIN="$ac_cv_path_PERLBIN"
7845 if test -n "$PERLBIN"; then
7846   echo "$ac_t""$PERLBIN" 1>&6
7847 else
7848   echo "$ac_t""no" 1>&6
7849 fi
7850
7851
7852         if test "no$PERLBIN" = "no" ; then
7853                 if test $ol_enable_perl = yes ; then
7854                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7855                 fi
7856
7857         else
7858                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7859                 if test x"$ol_with_perl_module" = "xstatic" ; then
7860                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7861                 else
7862                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7863                 fi
7864                                 ol_link_perl=yes
7865         fi
7866 fi
7867
7868 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7869 echo "configure:7870: checking how to run the C preprocessor" >&5
7870 # On Suns, sometimes $CPP names a directory.
7871 if test -n "$CPP" && test -d "$CPP"; then
7872   CPP=
7873 fi
7874 if test -z "$CPP"; then
7875 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7876   echo $ac_n "(cached) $ac_c" 1>&6
7877 else
7878     # This must be in double quotes, not single quotes, because CPP may get
7879   # substituted into the Makefile and "${CC-cc}" will confuse make.
7880   CPP="${CC-cc} -E"
7881   # On the NeXT, cc -E runs the code through the compiler's parser,
7882   # not just through cpp.
7883   cat > conftest.$ac_ext <<EOF
7884 #line 7885 "configure"
7885 #include "confdefs.h"
7886 #include <assert.h>
7887 Syntax Error
7888 EOF
7889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7890 { (eval echo configure:7891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7892 if test -z "$ac_err"; then
7893   :
7894 else
7895   echo "$ac_err" >&5
7896   echo "configure: failed program was:" >&5
7897   cat conftest.$ac_ext >&5
7898   rm -rf conftest*
7899   CPP="${CC-cc} -E -traditional-cpp"
7900   cat > conftest.$ac_ext <<EOF
7901 #line 7902 "configure"
7902 #include "confdefs.h"
7903 #include <assert.h>
7904 Syntax Error
7905 EOF
7906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7907 { (eval echo configure:7908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7909 if test -z "$ac_err"; then
7910   :
7911 else
7912   echo "$ac_err" >&5
7913   echo "configure: failed program was:" >&5
7914   cat conftest.$ac_ext >&5
7915   rm -rf conftest*
7916   CPP="${CC-cc} -nologo -E"
7917   cat > conftest.$ac_ext <<EOF
7918 #line 7919 "configure"
7919 #include "confdefs.h"
7920 #include <assert.h>
7921 Syntax Error
7922 EOF
7923 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7924 { (eval echo configure:7925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7925 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7926 if test -z "$ac_err"; then
7927   :
7928 else
7929   echo "$ac_err" >&5
7930   echo "configure: failed program was:" >&5
7931   cat conftest.$ac_ext >&5
7932   rm -rf conftest*
7933   CPP=/lib/cpp
7934 fi
7935 rm -f conftest*
7936 fi
7937 rm -f conftest*
7938 fi
7939 rm -f conftest*
7940   ac_cv_prog_CPP="$CPP"
7941 fi
7942   CPP="$ac_cv_prog_CPP"
7943 else
7944   ac_cv_prog_CPP="$CPP"
7945 fi
7946 echo "$ac_t""$CPP" 1>&6
7947
7948
7949 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7950         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7951
7952 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7953         echo "configure: warning: programs compiled here do run here..." 1>&2
7954         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7955
7956 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7957         echo "configure: warning: programs compiled here do not run here..." 1>&2
7958         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7959 fi
7960
7961
7962 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7963 echo "configure:7964: checking for Cygwin environment" >&5
7964 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7965   echo $ac_n "(cached) $ac_c" 1>&6
7966 else
7967   cat > conftest.$ac_ext <<EOF
7968 #line 7969 "configure"
7969 #include "confdefs.h"
7970
7971 int main() {
7972
7973 #ifndef __CYGWIN__
7974 #define __CYGWIN__ __CYGWIN32__
7975 #endif
7976 return __CYGWIN__;
7977 ; return 0; }
7978 EOF
7979 if { (eval echo configure:7980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7980   rm -rf conftest*
7981   ac_cv_cygwin=yes
7982 else
7983   echo "configure: failed program was:" >&5
7984   cat conftest.$ac_ext >&5
7985   rm -rf conftest*
7986   ac_cv_cygwin=no
7987 fi
7988 rm -f conftest*
7989 fi
7990
7991 echo "$ac_t""$ac_cv_cygwin" 1>&6
7992 CYGWIN=
7993 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7994 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7995 echo "configure:7996: checking for mingw32 environment" >&5
7996 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7997   echo $ac_n "(cached) $ac_c" 1>&6
7998 else
7999   cat > conftest.$ac_ext <<EOF
8000 #line 8001 "configure"
8001 #include "confdefs.h"
8002
8003 int main() {
8004 return __MINGW32__;
8005 ; return 0; }
8006 EOF
8007 if { (eval echo configure:8008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8008   rm -rf conftest*
8009   ac_cv_mingw32=yes
8010 else
8011   echo "configure: failed program was:" >&5
8012   cat conftest.$ac_ext >&5
8013   rm -rf conftest*
8014   ac_cv_mingw32=no
8015 fi
8016 rm -f conftest*
8017 fi
8018
8019 echo "$ac_t""$ac_cv_mingw32" 1>&6
8020 MINGW32=
8021 test "$ac_cv_mingw32" = yes && MINGW32=yes
8022
8023
8024
8025 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8026 echo "configure:8027: checking for executable suffix" >&5
8027 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8028   echo $ac_n "(cached) $ac_c" 1>&6
8029 else
8030   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8031   ac_cv_exeext=.exe
8032 else
8033   rm -f conftest*
8034   echo 'int main () { return 0; }' > conftest.$ac_ext
8035   ac_cv_exeext=
8036   if { (eval echo configure:8037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8037     for file in conftest.*; do
8038       case $file in
8039       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8040       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8041       esac
8042     done
8043   else
8044     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8045   fi
8046   rm -f conftest*
8047   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8048 fi
8049 fi
8050
8051 EXEEXT=""
8052 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8053 echo "$ac_t""${ac_cv_exeext}" 1>&6
8054 ac_exeext=$EXEEXT
8055
8056 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8057 echo "configure:8058: checking for object suffix" >&5
8058 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8059   echo $ac_n "(cached) $ac_c" 1>&6
8060 else
8061   rm -f conftest*
8062 echo 'int i = 1;' > conftest.$ac_ext
8063 if { (eval echo configure:8064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8064   for ac_file in conftest.*; do
8065     case $ac_file in
8066     *.c) ;;
8067     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8068     esac
8069   done
8070 else
8071   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8072 fi
8073 rm -f conftest*
8074 fi
8075
8076 echo "$ac_t""$ac_cv_objext" 1>&6
8077 OBJEXT=$ac_cv_objext
8078 ac_objext=$ac_cv_objext
8079
8080
8081 cat >> confdefs.h <<EOF
8082 #define EXEEXT "${EXEEXT}"
8083 EOF
8084
8085
8086 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8087 echo "configure:8088: checking for be_app in -lbe" >&5
8088 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8089 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8090   echo $ac_n "(cached) $ac_c" 1>&6
8091 else
8092   ac_save_LIBS="$LIBS"
8093 LIBS="-lbe -lroot -lnet $LIBS"
8094 cat > conftest.$ac_ext <<EOF
8095 #line 8096 "configure"
8096 #include "confdefs.h"
8097 /* Override any gcc2 internal prototype to avoid an error.  */
8098 /* We use char because int might match the return type of a gcc2
8099     builtin and then its argument prototype would still apply.  */
8100 char be_app();
8101
8102 int main() {
8103 be_app()
8104 ; return 0; }
8105 EOF
8106 if { (eval echo configure:8107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8107   rm -rf conftest*
8108   eval "ac_cv_lib_$ac_lib_var=yes"
8109 else
8110   echo "configure: failed program was:" >&5
8111   cat conftest.$ac_ext >&5
8112   rm -rf conftest*
8113   eval "ac_cv_lib_$ac_lib_var=no"
8114 fi
8115 rm -f conftest*
8116 LIBS="$ac_save_LIBS"
8117
8118 fi
8119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8120   echo "$ac_t""yes" 1>&6
8121   LIBS="$LIBS -lbe -lroot -lnet"
8122 else
8123   echo "$ac_t""no" 1>&6
8124 :
8125 fi
8126
8127
8128
8129
8130
8131 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8132 echo "configure:8133: checking for ${CC-cc} option to accept ANSI C" >&5
8133 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8134   echo $ac_n "(cached) $ac_c" 1>&6
8135 else
8136   am_cv_prog_cc_stdc=no
8137 ac_save_CC="$CC"
8138 # Don't try gcc -ansi; that turns off useful extensions and
8139 # breaks some systems' header files.
8140 # AIX                   -qlanglvl=ansi
8141 # Ultrix and OSF/1      -std1
8142 # HP-UX 10.20 and later -Ae
8143 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8144 # SVR4                  -Xc -D__EXTENSIONS__
8145 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8146 do
8147   CC="$ac_save_CC $ac_arg"
8148   cat > conftest.$ac_ext <<EOF
8149 #line 8150 "configure"
8150 #include "confdefs.h"
8151 #include <stdarg.h>
8152 #include <stdio.h>
8153 #include <sys/types.h>
8154 #include <sys/stat.h>
8155 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8156 struct buf { int x; };
8157 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8158 static char *e (p, i)
8159      char **p;
8160      int i;
8161 {
8162   return p[i];
8163 }
8164 static char *f (char * (*g) (char **, int), char **p, ...)
8165 {
8166   char *s;
8167   va_list v;
8168   va_start (v,p);
8169   s = g (p, va_arg (v,int));
8170   va_end (v);
8171   return s;
8172 }
8173 int test (int i, double x);
8174 struct s1 {int (*f) (int a);};
8175 struct s2 {int (*f) (double a);};
8176 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8177 int argc;
8178 char **argv;
8179
8180 int main() {
8181
8182 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8183
8184 ; return 0; }
8185 EOF
8186 if { (eval echo configure:8187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8187   rm -rf conftest*
8188   am_cv_prog_cc_stdc="$ac_arg"; break
8189 else
8190   echo "configure: failed program was:" >&5
8191   cat conftest.$ac_ext >&5
8192 fi
8193 rm -f conftest*
8194 done
8195 CC="$ac_save_CC"
8196
8197 fi
8198
8199 if test -z "$am_cv_prog_cc_stdc"; then
8200   echo "$ac_t""none needed" 1>&6
8201 else
8202   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8203 fi
8204 case "x$am_cv_prog_cc_stdc" in
8205   x|xno) ;;
8206   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8207 esac
8208
8209 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8210         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8211 fi
8212
8213 # test for make depend flag
8214 OL_MKDEP=
8215 OL_MKDEP_FLAGS=
8216 if test -z "${MKDEP}"; then
8217         OL_MKDEP="${CC-cc}"
8218         if test -z "${MKDEP_FLAGS}"; then
8219                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8220 echo "configure:8221: checking for ${OL_MKDEP} depend flag" >&5
8221 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8222   echo $ac_n "(cached) $ac_c" 1>&6
8223 else
8224   
8225                         ol_cv_mkdep=no
8226                         for flag in "-M" "-xM"; do
8227                                 cat > conftest.c <<EOF
8228  noCode;
8229 EOF
8230                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8231                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8232                                 then
8233                                         if test ! -f conftest."${ac_object}" ; then
8234                                                 ol_cv_mkdep=$flag
8235                                                 OL_MKDEP_FLAGS="$flag"
8236                                                 break
8237                                         fi
8238                                 fi
8239                         done
8240                         rm -f conftest*
8241                 
8242 fi
8243
8244 echo "$ac_t""$ol_cv_mkdep" 1>&6
8245         else
8246                 cc_cv_mkdep=yes
8247                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8248         fi
8249 else
8250         cc_cv_mkdep=yes
8251         OL_MKDEP="${MKDEP}"
8252         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8253 fi
8254
8255
8256
8257 if test "${ol_cv_mkdep}" = no ; then
8258         # this will soon become an error
8259         echo "configure: warning: do not know how to generate dependencies" 1>&2
8260 fi
8261
8262 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8263 echo "configure:8264: checking for afopen in -ls" >&5
8264 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8265 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8266   echo $ac_n "(cached) $ac_c" 1>&6
8267 else
8268   ac_save_LIBS="$LIBS"
8269 LIBS="-ls  $LIBS"
8270 cat > conftest.$ac_ext <<EOF
8271 #line 8272 "configure"
8272 #include "confdefs.h"
8273 /* Override any gcc2 internal prototype to avoid an error.  */
8274 /* We use char because int might match the return type of a gcc2
8275     builtin and then its argument prototype would still apply.  */
8276 char afopen();
8277
8278 int main() {
8279 afopen()
8280 ; return 0; }
8281 EOF
8282 if { (eval echo configure:8283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8283   rm -rf conftest*
8284   eval "ac_cv_lib_$ac_lib_var=yes"
8285 else
8286   echo "configure: failed program was:" >&5
8287   cat conftest.$ac_ext >&5
8288   rm -rf conftest*
8289   eval "ac_cv_lib_$ac_lib_var=no"
8290 fi
8291 rm -f conftest*
8292 LIBS="$ac_save_LIBS"
8293
8294 fi
8295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8296   echo "$ac_t""yes" 1>&6
8297   
8298         AUTH_LIBS=-ls
8299         cat >> confdefs.h <<\EOF
8300 #define HAVE_AIX_SECURITY 1
8301 EOF
8302
8303
8304 else
8305   echo "$ac_t""no" 1>&6
8306 fi
8307
8308
8309 case "$target" in
8310 *-ibm-openedition)
8311         ac_cv_func_getopt=no
8312         cat >> confdefs.h <<\EOF
8313 #define BOTH_STRINGS_H 1
8314 EOF
8315
8316         ;;
8317 esac
8318
8319 ol_link_modules=no
8320 if test $ol_enable_modules != no ; then
8321         for ac_hdr in ltdl.h
8322 do
8323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8325 echo "configure:8326: checking for $ac_hdr" >&5
8326 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8327   echo $ac_n "(cached) $ac_c" 1>&6
8328 else
8329   cat > conftest.$ac_ext <<EOF
8330 #line 8331 "configure"
8331 #include "confdefs.h"
8332 #include <$ac_hdr>
8333 EOF
8334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8335 { (eval echo configure:8336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8337 if test -z "$ac_err"; then
8338   rm -rf conftest*
8339   eval "ac_cv_header_$ac_safe=yes"
8340 else
8341   echo "$ac_err" >&5
8342   echo "configure: failed program was:" >&5
8343   cat conftest.$ac_ext >&5
8344   rm -rf conftest*
8345   eval "ac_cv_header_$ac_safe=no"
8346 fi
8347 rm -f conftest*
8348 fi
8349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8350   echo "$ac_t""yes" 1>&6
8351     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8352   cat >> confdefs.h <<EOF
8353 #define $ac_tr_hdr 1
8354 EOF
8355  
8356 else
8357   echo "$ac_t""no" 1>&6
8358 fi
8359 done
8360
8361
8362         if test $ac_cv_header_ltdl_h = no ; then
8363                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8364         fi
8365
8366         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8367 echo "configure:8368: checking for lt_dlinit in -lltdl" >&5
8368 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8369 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8370   echo $ac_n "(cached) $ac_c" 1>&6
8371 else
8372   ac_save_LIBS="$LIBS"
8373 LIBS="-lltdl  $LIBS"
8374 cat > conftest.$ac_ext <<EOF
8375 #line 8376 "configure"
8376 #include "confdefs.h"
8377 /* Override any gcc2 internal prototype to avoid an error.  */
8378 /* We use char because int might match the return type of a gcc2
8379     builtin and then its argument prototype would still apply.  */
8380 char lt_dlinit();
8381
8382 int main() {
8383 lt_dlinit()
8384 ; return 0; }
8385 EOF
8386 if { (eval echo configure:8387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8387   rm -rf conftest*
8388   eval "ac_cv_lib_$ac_lib_var=yes"
8389 else
8390   echo "configure: failed program was:" >&5
8391   cat conftest.$ac_ext >&5
8392   rm -rf conftest*
8393   eval "ac_cv_lib_$ac_lib_var=no"
8394 fi
8395 rm -f conftest*
8396 LIBS="$ac_save_LIBS"
8397
8398 fi
8399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8400   echo "$ac_t""yes" 1>&6
8401   
8402                 MODULES_LIBS=-lltdl
8403                 cat >> confdefs.h <<\EOF
8404 #define HAVE_LIBLTDL 1
8405 EOF
8406
8407         
8408 else
8409   echo "$ac_t""no" 1>&6
8410 fi
8411
8412
8413         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8414                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8415         fi
8416         ol_link_modules=yes
8417 else
8418         ol_with_bdb_module=static
8419         ol_with_dnssrv_module=static
8420         ol_with_ldap_module=static
8421         ol_with_ldbm_module=static
8422         ol_with_meta_module=static
8423         ol_with_monitor_module=static
8424         ol_with_null_module=static
8425         ol_with_passwd_module=static
8426         ol_with_perl_module=static
8427         ol_with_shell_module=static
8428         ol_with_sql_module=static
8429 fi
8430
8431 # test for EBCDIC
8432 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8433 echo "configure:8434: checking for EBCDIC" >&5
8434 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8435   echo $ac_n "(cached) $ac_c" 1>&6
8436 else
8437   
8438         cat > conftest.$ac_ext <<EOF
8439 #line 8440 "configure"
8440 #include "confdefs.h"
8441
8442 #if !('M' == 0xd4)
8443 #include <__ASCII__/generate_error.h>
8444 #endif
8445
8446 EOF
8447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8448 { (eval echo configure:8449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8450 if test -z "$ac_err"; then
8451   rm -rf conftest*
8452   ol_cv_cpp_ebcdic=yes
8453 else
8454   echo "$ac_err" >&5
8455   echo "configure: failed program was:" >&5
8456   cat conftest.$ac_ext >&5
8457   rm -rf conftest*
8458   ol_cv_cpp_ebcdic=no
8459 fi
8460 rm -f conftest*
8461 fi
8462
8463 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8464 if test $ol_cv_cpp_ebcdic = yes ; then
8465         cat >> confdefs.h <<\EOF
8466 #define HAVE_EBCDIC 1
8467 EOF
8468
8469 fi
8470
8471 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8472 echo "configure:8473: checking for ANSI C header files" >&5
8473 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8474   echo $ac_n "(cached) $ac_c" 1>&6
8475 else
8476   cat > conftest.$ac_ext <<EOF
8477 #line 8478 "configure"
8478 #include "confdefs.h"
8479 #include <stdlib.h>
8480 #include <stdarg.h>
8481 #include <string.h>
8482 #include <float.h>
8483 EOF
8484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8485 { (eval echo configure:8486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8487 if test -z "$ac_err"; then
8488   rm -rf conftest*
8489   ol_cv_header_stdc=yes
8490 else
8491   echo "$ac_err" >&5
8492   echo "configure: failed program was:" >&5
8493   cat conftest.$ac_ext >&5
8494   rm -rf conftest*
8495   ol_cv_header_stdc=no
8496 fi
8497 rm -f conftest*
8498
8499 if test $ol_cv_header_stdc = yes; then
8500   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8501 cat > conftest.$ac_ext <<EOF
8502 #line 8503 "configure"
8503 #include "confdefs.h"
8504 #include <string.h>
8505 EOF
8506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8507   egrep "memchr" >/dev/null 2>&1; then
8508   :
8509 else
8510   rm -rf conftest*
8511   ol_cv_header_stdc=no
8512 fi
8513 rm -f conftest*
8514
8515 fi
8516
8517 if test $ol_cv_header_stdc = yes; then
8518   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8519 cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522 #include <stdlib.h>
8523 EOF
8524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8525   egrep "free" >/dev/null 2>&1; then
8526   :
8527 else
8528   rm -rf conftest*
8529   ol_cv_header_stdc=no
8530 fi
8531 rm -f conftest*
8532
8533 fi
8534
8535 if test $ol_cv_header_stdc = yes; then
8536   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8537 if test "$cross_compiling" = yes; then
8538   :
8539 else
8540   cat > conftest.$ac_ext <<EOF
8541 #line 8542 "configure"
8542 #include "confdefs.h"
8543 #include <ctype.h>
8544 #ifndef HAVE_EBCDIC
8545 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8546 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8547 #else
8548 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8549                 || ('j' <= (c) && (c) <= 'r') \
8550                 || ('s' <= (c) && (c) <= 'z'))
8551 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8552 #endif
8553 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8554 int main () { int i; for (i = 0; i < 256; i++)
8555 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8556 exit (0); }
8557
8558 EOF
8559 if { (eval echo configure:8560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8560 then
8561   :
8562 else
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -fr conftest*
8566   ol_cv_header_stdc=no
8567 fi
8568 rm -fr conftest*
8569 fi
8570
8571 fi
8572 fi
8573
8574 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8575 if test $ol_cv_header_stdc = yes; then
8576   cat >> confdefs.h <<\EOF
8577 #define STDC_HEADERS 1
8578 EOF
8579
8580 fi
8581 ac_cv_header_stdc=disable
8582
8583
8584 if test $ol_cv_header_stdc != yes; then
8585         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8586 fi
8587
8588 ac_header_dirent=no
8589 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8590 do
8591 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8592 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8593 echo "configure:8594: checking for $ac_hdr that defines DIR" >&5
8594 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8595   echo $ac_n "(cached) $ac_c" 1>&6
8596 else
8597   cat > conftest.$ac_ext <<EOF
8598 #line 8599 "configure"
8599 #include "confdefs.h"
8600 #include <sys/types.h>
8601 #include <$ac_hdr>
8602 int main() {
8603 DIR *dirp = 0;
8604 ; return 0; }
8605 EOF
8606 if { (eval echo configure:8607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8607   rm -rf conftest*
8608   eval "ac_cv_header_dirent_$ac_safe=yes"
8609 else
8610   echo "configure: failed program was:" >&5
8611   cat conftest.$ac_ext >&5
8612   rm -rf conftest*
8613   eval "ac_cv_header_dirent_$ac_safe=no"
8614 fi
8615 rm -f conftest*
8616 fi
8617 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8618   echo "$ac_t""yes" 1>&6
8619     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8620   cat >> confdefs.h <<EOF
8621 #define $ac_tr_hdr 1
8622 EOF
8623  ac_header_dirent=$ac_hdr; break
8624 else
8625   echo "$ac_t""no" 1>&6
8626 fi
8627 done
8628 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8629 if test $ac_header_dirent = dirent.h; then
8630 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8631 echo "configure:8632: checking for opendir in -ldir" >&5
8632 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8633 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8634   echo $ac_n "(cached) $ac_c" 1>&6
8635 else
8636   ac_save_LIBS="$LIBS"
8637 LIBS="-ldir  $LIBS"
8638 cat > conftest.$ac_ext <<EOF
8639 #line 8640 "configure"
8640 #include "confdefs.h"
8641 /* Override any gcc2 internal prototype to avoid an error.  */
8642 /* We use char because int might match the return type of a gcc2
8643     builtin and then its argument prototype would still apply.  */
8644 char opendir();
8645
8646 int main() {
8647 opendir()
8648 ; return 0; }
8649 EOF
8650 if { (eval echo configure:8651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8651   rm -rf conftest*
8652   eval "ac_cv_lib_$ac_lib_var=yes"
8653 else
8654   echo "configure: failed program was:" >&5
8655   cat conftest.$ac_ext >&5
8656   rm -rf conftest*
8657   eval "ac_cv_lib_$ac_lib_var=no"
8658 fi
8659 rm -f conftest*
8660 LIBS="$ac_save_LIBS"
8661
8662 fi
8663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8664   echo "$ac_t""yes" 1>&6
8665   LIBS="$LIBS -ldir"
8666 else
8667   echo "$ac_t""no" 1>&6
8668 fi
8669
8670 else
8671 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8672 echo "configure:8673: checking for opendir in -lx" >&5
8673 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8674 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8675   echo $ac_n "(cached) $ac_c" 1>&6
8676 else
8677   ac_save_LIBS="$LIBS"
8678 LIBS="-lx  $LIBS"
8679 cat > conftest.$ac_ext <<EOF
8680 #line 8681 "configure"
8681 #include "confdefs.h"
8682 /* Override any gcc2 internal prototype to avoid an error.  */
8683 /* We use char because int might match the return type of a gcc2
8684     builtin and then its argument prototype would still apply.  */
8685 char opendir();
8686
8687 int main() {
8688 opendir()
8689 ; return 0; }
8690 EOF
8691 if { (eval echo configure:8692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8692   rm -rf conftest*
8693   eval "ac_cv_lib_$ac_lib_var=yes"
8694 else
8695   echo "configure: failed program was:" >&5
8696   cat conftest.$ac_ext >&5
8697   rm -rf conftest*
8698   eval "ac_cv_lib_$ac_lib_var=no"
8699 fi
8700 rm -f conftest*
8701 LIBS="$ac_save_LIBS"
8702
8703 fi
8704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8705   echo "$ac_t""yes" 1>&6
8706   LIBS="$LIBS -lx"
8707 else
8708   echo "$ac_t""no" 1>&6
8709 fi
8710
8711 fi
8712
8713 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8714 echo "configure:8715: checking for sys/wait.h that is POSIX.1 compatible" >&5
8715 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8716   echo $ac_n "(cached) $ac_c" 1>&6
8717 else
8718   cat > conftest.$ac_ext <<EOF
8719 #line 8720 "configure"
8720 #include "confdefs.h"
8721 #include <sys/types.h>
8722 #include <sys/wait.h>
8723 #ifndef WEXITSTATUS
8724 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8725 #endif
8726 #ifndef WIFEXITED
8727 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8728 #endif
8729 int main() {
8730 int s;
8731 wait (&s);
8732 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8733 ; return 0; }
8734 EOF
8735 if { (eval echo configure:8736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8736   rm -rf conftest*
8737   ac_cv_header_sys_wait_h=yes
8738 else
8739   echo "configure: failed program was:" >&5
8740   cat conftest.$ac_ext >&5
8741   rm -rf conftest*
8742   ac_cv_header_sys_wait_h=no
8743 fi
8744 rm -f conftest*
8745 fi
8746
8747 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8748 if test $ac_cv_header_sys_wait_h = yes; then
8749   cat >> confdefs.h <<\EOF
8750 #define HAVE_SYS_WAIT_H 1
8751 EOF
8752
8753 fi
8754
8755 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8756 echo "configure:8757: checking POSIX termios" >&5
8757 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8758   echo $ac_n "(cached) $ac_c" 1>&6
8759 else
8760   cat > conftest.$ac_ext <<EOF
8761 #line 8762 "configure"
8762 #include "confdefs.h"
8763 #include <sys/types.h>
8764 #include <unistd.h>
8765 #include <termios.h>
8766 int main() {
8767 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8768    tcgetattr(0, 0);
8769 ; return 0; }
8770 EOF
8771 if { (eval echo configure:8772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8772   rm -rf conftest*
8773   am_cv_sys_posix_termios=yes
8774 else
8775   echo "configure: failed program was:" >&5
8776   cat conftest.$ac_ext >&5
8777   rm -rf conftest*
8778   am_cv_sys_posix_termios=no
8779 fi
8780 rm -f conftest*
8781 fi
8782
8783 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8784
8785
8786  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8787 echo "configure:8788: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8788 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8789   echo $ac_n "(cached) $ac_c" 1>&6
8790 else
8791   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8792
8793   gwinsz_in_termios_h=no
8794   if test $am_cv_sys_posix_termios = yes; then
8795     cat > conftest.$ac_ext <<EOF
8796 #line 8797 "configure"
8797 #include "confdefs.h"
8798 #include <sys/types.h>
8799 #     include <termios.h>
8800 #     ifdef TIOCGWINSZ
8801         yes
8802 #     endif
8803     
8804 EOF
8805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8806   egrep "yes" >/dev/null 2>&1; then
8807   rm -rf conftest*
8808   gwinsz_in_termios_h=yes
8809 fi
8810 rm -f conftest*
8811
8812   fi
8813
8814   if test $gwinsz_in_termios_h = no; then
8815     cat > conftest.$ac_ext <<EOF
8816 #line 8817 "configure"
8817 #include "confdefs.h"
8818 #include <sys/types.h>
8819 #     include <sys/ioctl.h>
8820 #     ifdef TIOCGWINSZ
8821         yes
8822 #     endif
8823     
8824 EOF
8825 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8826   egrep "yes" >/dev/null 2>&1; then
8827   rm -rf conftest*
8828   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8829 fi
8830 rm -f conftest*
8831
8832   fi
8833   
8834 fi
8835
8836 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8837   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8838     cat >> confdefs.h <<\EOF
8839 #define GWINSZ_IN_SYS_IOCTL 1
8840 EOF
8841
8842   fi
8843
8844 if test $am_cv_sys_posix_termios = yes ; then
8845         cat >> confdefs.h <<\EOF
8846 #define HAVE_POSIX_TERMIOS 1
8847 EOF
8848
8849 fi
8850
8851 for ac_hdr in \
8852         arpa/inet.h             \
8853         arpa/nameser.h  \
8854         assert.h                \
8855         conio.h                 \
8856         crypt.h                 \
8857         direct.h                \
8858         errno.h                 \
8859         fcntl.h                 \
8860         filio.h                 \
8861         getopt.h                \
8862         grp.h                   \
8863         io.h                    \
8864         libutil.h               \
8865         limits.h                \
8866         locale.h                \
8867         netinet/tcp.h   \
8868         malloc.h                \
8869         memory.h                \
8870         psap.h                  \
8871         pwd.h                   \
8872         process.h               \
8873         resolv.h                \
8874         sgtty.h                 \
8875         shadow.h                \
8876         stddef.h                \
8877         string.h                \
8878         strings.h               \
8879         sysexits.h              \
8880         sys/file.h              \
8881         sys/filio.h             \
8882         sys/errno.h             \
8883         sys/ioctl.h             \
8884         sys/param.h             \
8885         sys/resource.h  \
8886         sys/select.h    \
8887         sys/socket.h    \
8888         sys/syslog.h    \
8889         sys/time.h              \
8890         sys/types.h             \
8891         sys/ucred.h             \
8892         syslog.h                \
8893         termios.h               \
8894         unistd.h                \
8895         winsock.h               \
8896         winsock2.h              \
8897
8898 do
8899 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8900 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8901 echo "configure:8902: checking for $ac_hdr" >&5
8902 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8903   echo $ac_n "(cached) $ac_c" 1>&6
8904 else
8905   cat > conftest.$ac_ext <<EOF
8906 #line 8907 "configure"
8907 #include "confdefs.h"
8908 #include <$ac_hdr>
8909 EOF
8910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8911 { (eval echo configure:8912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8913 if test -z "$ac_err"; then
8914   rm -rf conftest*
8915   eval "ac_cv_header_$ac_safe=yes"
8916 else
8917   echo "$ac_err" >&5
8918   echo "configure: failed program was:" >&5
8919   cat conftest.$ac_ext >&5
8920   rm -rf conftest*
8921   eval "ac_cv_header_$ac_safe=no"
8922 fi
8923 rm -f conftest*
8924 fi
8925 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8926   echo "$ac_t""yes" 1>&6
8927     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8928   cat >> confdefs.h <<EOF
8929 #define $ac_tr_hdr 1
8930 EOF
8931  
8932 else
8933   echo "$ac_t""no" 1>&6
8934 fi
8935 done
8936
8937
8938
8939
8940 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8941 echo "configure:8942: checking for dlopen" >&5
8942 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8943   echo $ac_n "(cached) $ac_c" 1>&6
8944 else
8945   cat > conftest.$ac_ext <<EOF
8946 #line 8947 "configure"
8947 #include "confdefs.h"
8948 /* System header to define __stub macros and hopefully few prototypes,
8949     which can conflict with char dlopen(); below.  */
8950 #include <assert.h>
8951 /* Override any gcc2 internal prototype to avoid an error.  */
8952 /* We use char because int might match the return type of a gcc2
8953     builtin and then its argument prototype would still apply.  */
8954 char dlopen();
8955 char (*f)();
8956
8957 int main() {
8958
8959 /* The GNU C library defines this for functions which it implements
8960     to always fail with ENOSYS.  Some functions are actually named
8961     something starting with __ and the normal name is an alias.  */
8962 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8963 choke me
8964 #else
8965 f = dlopen;
8966 #endif
8967
8968 ; return 0; }
8969 EOF
8970 if { (eval echo configure:8971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8971   rm -rf conftest*
8972   eval "ac_cv_func_dlopen=yes"
8973 else
8974   echo "configure: failed program was:" >&5
8975   cat conftest.$ac_ext >&5
8976   rm -rf conftest*
8977   eval "ac_cv_func_dlopen=no"
8978 fi
8979 rm -f conftest*
8980 fi
8981
8982 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8983   echo "$ac_t""yes" 1>&6
8984   :
8985 else
8986   echo "$ac_t""no" 1>&6
8987 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8988 echo "configure:8989: checking for dlopen in -ldl" >&5
8989 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8990 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8991   echo $ac_n "(cached) $ac_c" 1>&6
8992 else
8993   ac_save_LIBS="$LIBS"
8994 LIBS="-ldl  $LIBS"
8995 cat > conftest.$ac_ext <<EOF
8996 #line 8997 "configure"
8997 #include "confdefs.h"
8998 /* Override any gcc2 internal prototype to avoid an error.  */
8999 /* We use char because int might match the return type of a gcc2
9000     builtin and then its argument prototype would still apply.  */
9001 char dlopen();
9002
9003 int main() {
9004 dlopen()
9005 ; return 0; }
9006 EOF
9007 if { (eval echo configure:9008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9008   rm -rf conftest*
9009   eval "ac_cv_lib_$ac_lib_var=yes"
9010 else
9011   echo "configure: failed program was:" >&5
9012   cat conftest.$ac_ext >&5
9013   rm -rf conftest*
9014   eval "ac_cv_lib_$ac_lib_var=no"
9015 fi
9016 rm -f conftest*
9017 LIBS="$ac_save_LIBS"
9018
9019 fi
9020 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9021   echo "$ac_t""yes" 1>&6
9022     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9023     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9024   cat >> confdefs.h <<EOF
9025 #define $ac_tr_lib 1
9026 EOF
9027
9028   LIBS="-ldl $LIBS"
9029
9030 else
9031   echo "$ac_t""no" 1>&6
9032 fi
9033
9034 fi
9035
9036
9037 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9038 echo "configure:9039: checking for sigset in -lV3" >&5
9039 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9040 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9041   echo $ac_n "(cached) $ac_c" 1>&6
9042 else
9043   ac_save_LIBS="$LIBS"
9044 LIBS="-lV3  $LIBS"
9045 cat > conftest.$ac_ext <<EOF
9046 #line 9047 "configure"
9047 #include "confdefs.h"
9048 /* Override any gcc2 internal prototype to avoid an error.  */
9049 /* We use char because int might match the return type of a gcc2
9050     builtin and then its argument prototype would still apply.  */
9051 char sigset();
9052
9053 int main() {
9054 sigset()
9055 ; return 0; }
9056 EOF
9057 if { (eval echo configure:9058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9058   rm -rf conftest*
9059   eval "ac_cv_lib_$ac_lib_var=yes"
9060 else
9061   echo "configure: failed program was:" >&5
9062   cat conftest.$ac_ext >&5
9063   rm -rf conftest*
9064   eval "ac_cv_lib_$ac_lib_var=no"
9065 fi
9066 rm -f conftest*
9067 LIBS="$ac_save_LIBS"
9068
9069 fi
9070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9071   echo "$ac_t""yes" 1>&6
9072     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9073     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9074   cat >> confdefs.h <<EOF
9075 #define $ac_tr_lib 1
9076 EOF
9077
9078   LIBS="-lV3 $LIBS"
9079
9080 else
9081   echo "$ac_t""no" 1>&6
9082 fi
9083
9084
9085 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9086 echo "configure:9087: checking for winsock" >&5
9087 save_LIBS="$LIBS"
9088 for curlib in ws2_32 wsock32; do
9089         LIBS="$LIBS -l$curlib"
9090         cat > conftest.$ac_ext <<EOF
9091 #line 9092 "configure"
9092 #include "confdefs.h"
9093
9094                         char socket@12();
9095                         char select@20();
9096                         char closesocket@4();
9097                         char gethostname@8();
9098                         
9099 int main() {
9100
9101                         socket@12();
9102                         select@20();
9103                         closesocket@4();
9104                         gethostname@8();
9105                         
9106 ; return 0; }
9107 EOF
9108 if { (eval echo configure:9109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9109   rm -rf conftest*
9110   have_winsock=yes
9111 else
9112   echo "configure: failed program was:" >&5
9113   cat conftest.$ac_ext >&5
9114   rm -rf conftest*
9115   have_winsock=no
9116 fi
9117 rm -f conftest*
9118
9119         if test $have_winsock = yes; then
9120                 cat >> confdefs.h <<\EOF
9121 #define HAVE_WINSOCK 1
9122 EOF
9123
9124                 ac_cv_func_socket=yes
9125                 ac_cv_func_select=yes
9126                 ac_cv_func_closesocket=yes
9127                 ac_cv_func_gethostname=yes
9128                 if test $curlib = ws2_32; then
9129                         have_winsock=winsock2
9130                         cat >> confdefs.h <<\EOF
9131 #define HAVE_WINSOCK2 1
9132 EOF
9133
9134                 fi
9135                 break
9136         fi
9137         LIBS="$save_LIBS"
9138 done
9139 echo "$ac_t""$have_winsock" 1>&6
9140
9141
9142 echo $ac_n "checking for socket""... $ac_c" 1>&6
9143 echo "configure:9144: checking for socket" >&5
9144 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9145   echo $ac_n "(cached) $ac_c" 1>&6
9146 else
9147   cat > conftest.$ac_ext <<EOF
9148 #line 9149 "configure"
9149 #include "confdefs.h"
9150 /* System header to define __stub macros and hopefully few prototypes,
9151     which can conflict with char socket(); below.  */
9152 #include <assert.h>
9153 /* Override any gcc2 internal prototype to avoid an error.  */
9154 /* We use char because int might match the return type of a gcc2
9155     builtin and then its argument prototype would still apply.  */
9156 char socket();
9157 char (*f)();
9158
9159 int main() {
9160
9161 /* The GNU C library defines this for functions which it implements
9162     to always fail with ENOSYS.  Some functions are actually named
9163     something starting with __ and the normal name is an alias.  */
9164 #if defined (__stub_socket) || defined (__stub___socket)
9165 choke me
9166 #else
9167 f = socket;
9168 #endif
9169
9170 ; return 0; }
9171 EOF
9172 if { (eval echo configure:9173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9173   rm -rf conftest*
9174   eval "ac_cv_func_socket=yes"
9175 else
9176   echo "configure: failed program was:" >&5
9177   cat conftest.$ac_ext >&5
9178   rm -rf conftest*
9179   eval "ac_cv_func_socket=no"
9180 fi
9181 rm -f conftest*
9182 fi
9183
9184 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9185   echo "$ac_t""yes" 1>&6
9186   :
9187 else
9188   echo "$ac_t""no" 1>&6
9189         
9190         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9191 echo "configure:9192: checking for main in -lsocket" >&5
9192 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9193 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9194   echo $ac_n "(cached) $ac_c" 1>&6
9195 else
9196   ac_save_LIBS="$LIBS"
9197 LIBS="-lsocket  $LIBS"
9198 cat > conftest.$ac_ext <<EOF
9199 #line 9200 "configure"
9200 #include "confdefs.h"
9201
9202 int main() {
9203 main()
9204 ; return 0; }
9205 EOF
9206 if { (eval echo configure:9207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9207   rm -rf conftest*
9208   eval "ac_cv_lib_$ac_lib_var=yes"
9209 else
9210   echo "configure: failed program was:" >&5
9211   cat conftest.$ac_ext >&5
9212   rm -rf conftest*
9213   eval "ac_cv_lib_$ac_lib_var=no"
9214 fi
9215 rm -f conftest*
9216 LIBS="$ac_save_LIBS"
9217
9218 fi
9219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9220   echo "$ac_t""yes" 1>&6
9221     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9222     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9223   cat >> confdefs.h <<EOF
9224 #define $ac_tr_lib 1
9225 EOF
9226
9227   LIBS="-lsocket $LIBS"
9228
9229 else
9230   echo "$ac_t""no" 1>&6
9231 fi
9232
9233         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9234 echo "configure:9235: checking for main in -lnet" >&5
9235 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9236 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9237   echo $ac_n "(cached) $ac_c" 1>&6
9238 else
9239   ac_save_LIBS="$LIBS"
9240 LIBS="-lnet  $LIBS"
9241 cat > conftest.$ac_ext <<EOF
9242 #line 9243 "configure"
9243 #include "confdefs.h"
9244
9245 int main() {
9246 main()
9247 ; return 0; }
9248 EOF
9249 if { (eval echo configure:9250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9250   rm -rf conftest*
9251   eval "ac_cv_lib_$ac_lib_var=yes"
9252 else
9253   echo "configure: failed program was:" >&5
9254   cat conftest.$ac_ext >&5
9255   rm -rf conftest*
9256   eval "ac_cv_lib_$ac_lib_var=no"
9257 fi
9258 rm -f conftest*
9259 LIBS="$ac_save_LIBS"
9260
9261 fi
9262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9263   echo "$ac_t""yes" 1>&6
9264     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9265     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9266   cat >> confdefs.h <<EOF
9267 #define $ac_tr_lib 1
9268 EOF
9269
9270   LIBS="-lnet $LIBS"
9271
9272 else
9273   echo "$ac_t""no" 1>&6
9274 fi
9275
9276         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9277 echo "configure:9278: checking for main in -lnsl_s" >&5
9278 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9279 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9280   echo $ac_n "(cached) $ac_c" 1>&6
9281 else
9282   ac_save_LIBS="$LIBS"
9283 LIBS="-lnsl_s  $LIBS"
9284 cat > conftest.$ac_ext <<EOF
9285 #line 9286 "configure"
9286 #include "confdefs.h"
9287
9288 int main() {
9289 main()
9290 ; return 0; }
9291 EOF
9292 if { (eval echo configure:9293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9293   rm -rf conftest*
9294   eval "ac_cv_lib_$ac_lib_var=yes"
9295 else
9296   echo "configure: failed program was:" >&5
9297   cat conftest.$ac_ext >&5
9298   rm -rf conftest*
9299   eval "ac_cv_lib_$ac_lib_var=no"
9300 fi
9301 rm -f conftest*
9302 LIBS="$ac_save_LIBS"
9303
9304 fi
9305 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9306   echo "$ac_t""yes" 1>&6
9307     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9308     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9309   cat >> confdefs.h <<EOF
9310 #define $ac_tr_lib 1
9311 EOF
9312
9313   LIBS="-lnsl_s $LIBS"
9314
9315 else
9316   echo "$ac_t""no" 1>&6
9317 fi
9318
9319         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9320 echo "configure:9321: checking for main in -lnsl" >&5
9321 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9322 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9323   echo $ac_n "(cached) $ac_c" 1>&6
9324 else
9325   ac_save_LIBS="$LIBS"
9326 LIBS="-lnsl  $LIBS"
9327 cat > conftest.$ac_ext <<EOF
9328 #line 9329 "configure"
9329 #include "confdefs.h"
9330
9331 int main() {
9332 main()
9333 ; return 0; }
9334 EOF
9335 if { (eval echo configure:9336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9336   rm -rf conftest*
9337   eval "ac_cv_lib_$ac_lib_var=yes"
9338 else
9339   echo "configure: failed program was:" >&5
9340   cat conftest.$ac_ext >&5
9341   rm -rf conftest*
9342   eval "ac_cv_lib_$ac_lib_var=no"
9343 fi
9344 rm -f conftest*
9345 LIBS="$ac_save_LIBS"
9346
9347 fi
9348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9349   echo "$ac_t""yes" 1>&6
9350     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9351     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9352   cat >> confdefs.h <<EOF
9353 #define $ac_tr_lib 1
9354 EOF
9355
9356   LIBS="-lnsl $LIBS"
9357
9358 else
9359   echo "$ac_t""no" 1>&6
9360 fi
9361
9362         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9363 echo "configure:9364: checking for socket in -linet" >&5
9364 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9365 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9366   echo $ac_n "(cached) $ac_c" 1>&6
9367 else
9368   ac_save_LIBS="$LIBS"
9369 LIBS="-linet  $LIBS"
9370 cat > conftest.$ac_ext <<EOF
9371 #line 9372 "configure"
9372 #include "confdefs.h"
9373 /* Override any gcc2 internal prototype to avoid an error.  */
9374 /* We use char because int might match the return type of a gcc2
9375     builtin and then its argument prototype would still apply.  */
9376 char socket();
9377
9378 int main() {
9379 socket()
9380 ; return 0; }
9381 EOF
9382 if { (eval echo configure:9383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9383   rm -rf conftest*
9384   eval "ac_cv_lib_$ac_lib_var=yes"
9385 else
9386   echo "configure: failed program was:" >&5
9387   cat conftest.$ac_ext >&5
9388   rm -rf conftest*
9389   eval "ac_cv_lib_$ac_lib_var=no"
9390 fi
9391 rm -f conftest*
9392 LIBS="$ac_save_LIBS"
9393
9394 fi
9395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9396   echo "$ac_t""yes" 1>&6
9397     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9398     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9399   cat >> confdefs.h <<EOF
9400 #define $ac_tr_lib 1
9401 EOF
9402
9403   LIBS="-linet $LIBS"
9404
9405 else
9406   echo "$ac_t""no" 1>&6
9407 fi
9408
9409         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9410 echo "configure:9411: checking for main in -lgen" >&5
9411 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9412 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9413   echo $ac_n "(cached) $ac_c" 1>&6
9414 else
9415   ac_save_LIBS="$LIBS"
9416 LIBS="-lgen  $LIBS"
9417 cat > conftest.$ac_ext <<EOF
9418 #line 9419 "configure"
9419 #include "confdefs.h"
9420
9421 int main() {
9422 main()
9423 ; return 0; }
9424 EOF
9425 if { (eval echo configure:9426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9426   rm -rf conftest*
9427   eval "ac_cv_lib_$ac_lib_var=yes"
9428 else
9429   echo "configure: failed program was:" >&5
9430   cat conftest.$ac_ext >&5
9431   rm -rf conftest*
9432   eval "ac_cv_lib_$ac_lib_var=no"
9433 fi
9434 rm -f conftest*
9435 LIBS="$ac_save_LIBS"
9436
9437 fi
9438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9439   echo "$ac_t""yes" 1>&6
9440     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9441     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9442   cat >> confdefs.h <<EOF
9443 #define $ac_tr_lib 1
9444 EOF
9445
9446   LIBS="-lgen $LIBS"
9447
9448 else
9449   echo "$ac_t""no" 1>&6
9450 fi
9451
9452
9453 fi
9454
9455
9456 echo $ac_n "checking for select""... $ac_c" 1>&6
9457 echo "configure:9458: checking for select" >&5
9458 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9459   echo $ac_n "(cached) $ac_c" 1>&6
9460 else
9461   cat > conftest.$ac_ext <<EOF
9462 #line 9463 "configure"
9463 #include "confdefs.h"
9464 /* System header to define __stub macros and hopefully few prototypes,
9465     which can conflict with char select(); below.  */
9466 #include <assert.h>
9467 /* Override any gcc2 internal prototype to avoid an error.  */
9468 /* We use char because int might match the return type of a gcc2
9469     builtin and then its argument prototype would still apply.  */
9470 char select();
9471 char (*f)();
9472
9473 int main() {
9474
9475 /* The GNU C library defines this for functions which it implements
9476     to always fail with ENOSYS.  Some functions are actually named
9477     something starting with __ and the normal name is an alias.  */
9478 #if defined (__stub_select) || defined (__stub___select)
9479 choke me
9480 #else
9481 f = select;
9482 #endif
9483
9484 ; return 0; }
9485 EOF
9486 if { (eval echo configure:9487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9487   rm -rf conftest*
9488   eval "ac_cv_func_select=yes"
9489 else
9490   echo "configure: failed program was:" >&5
9491   cat conftest.$ac_ext >&5
9492   rm -rf conftest*
9493   eval "ac_cv_func_select=no"
9494 fi
9495 rm -f conftest*
9496 fi
9497
9498 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9499   echo "$ac_t""yes" 1>&6
9500   :
9501 else
9502   echo "$ac_t""no" 1>&6
9503 { echo "configure: error: select() required." 1>&2; exit 1; }
9504 fi
9505
9506
9507 if test "${ac_cv_header_winsock_h}" != yes; then
9508                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9509 echo "configure:9510: checking types of arguments for select()" >&5
9510  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9514   echo $ac_n "(cached) $ac_c" 1>&6
9515 else
9516     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9517   echo $ac_n "(cached) $ac_c" 1>&6
9518 else
9519      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9520      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9521       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9522        cat > conftest.$ac_ext <<EOF
9523 #line 9524 "configure"
9524 #include "confdefs.h"
9525 #ifdef HAVE_SYS_TYPES_H
9526 #include <sys/types.h>
9527 #endif
9528 #ifdef HAVE_SYS_TIME_H
9529 #include <sys/time.h>
9530 #endif
9531 #ifdef HAVE_SYS_SELECT_H
9532 #include <sys/select.h>
9533 #endif
9534 #ifdef HAVE_SYS_SOCKET_H
9535 #include <sys/socket.h>
9536 #endif
9537 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);
9538 int main() {
9539
9540 ; return 0; }
9541 EOF
9542 if { (eval echo configure:9543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9543   rm -rf conftest*
9544           ac_not_found=no ; break 3
9545 else
9546   echo "configure: failed program was:" >&5
9547   cat conftest.$ac_ext >&5
9548   rm -rf conftest*
9549   ac_not_found=yes
9550 fi
9551 rm -f conftest*
9552       done
9553      done
9554     done
9555    
9556 fi
9557   
9558 fi
9559  
9560 fi
9561  if test "$ac_not_found" = yes; then
9562   ac_cv_func_select_arg1=int 
9563   ac_cv_func_select_arg234='int *' 
9564   ac_cv_func_select_arg5='struct timeval *'
9565  fi
9566  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9567  cat >> confdefs.h <<EOF
9568 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9569 EOF
9570
9571  cat >> confdefs.h <<EOF
9572 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9573 EOF
9574
9575  cat >> confdefs.h <<EOF
9576 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9577 EOF
9578
9579
9580 fi
9581
9582
9583 for ac_hdr in regex.h 
9584 do
9585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9587 echo "configure:9588: checking for $ac_hdr" >&5
9588 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9589   echo $ac_n "(cached) $ac_c" 1>&6
9590 else
9591   cat > conftest.$ac_ext <<EOF
9592 #line 9593 "configure"
9593 #include "confdefs.h"
9594 #include <$ac_hdr>
9595 EOF
9596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9597 { (eval echo configure:9598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9599 if test -z "$ac_err"; then
9600   rm -rf conftest*
9601   eval "ac_cv_header_$ac_safe=yes"
9602 else
9603   echo "$ac_err" >&5
9604   echo "configure: failed program was:" >&5
9605   cat conftest.$ac_ext >&5
9606   rm -rf conftest*
9607   eval "ac_cv_header_$ac_safe=no"
9608 fi
9609 rm -f conftest*
9610 fi
9611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9612   echo "$ac_t""yes" 1>&6
9613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9614   cat >> confdefs.h <<EOF
9615 #define $ac_tr_hdr 1
9616 EOF
9617  
9618 else
9619   echo "$ac_t""no" 1>&6
9620 fi
9621 done
9622
9623 if test "$ac_cv_header_regex_h" != yes ; then
9624         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9625 fi
9626
9627 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9628 echo "configure:9629: checking for library containing regfree" >&5
9629 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9630   echo $ac_n "(cached) $ac_c" 1>&6
9631 else
9632   ac_func_search_save_LIBS="$LIBS"
9633 ac_cv_search_regfree="no"
9634 cat > conftest.$ac_ext <<EOF
9635 #line 9636 "configure"
9636 #include "confdefs.h"
9637 /* Override any gcc2 internal prototype to avoid an error.  */
9638 /* We use char because int might match the return type of a gcc2
9639     builtin and then its argument prototype would still apply.  */
9640 char regfree();
9641
9642 int main() {
9643 regfree()
9644 ; return 0; }
9645 EOF
9646 if { (eval echo configure:9647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9647   rm -rf conftest*
9648   ac_cv_search_regfree="none required"
9649 else
9650   echo "configure: failed program was:" >&5
9651   cat conftest.$ac_ext >&5
9652 fi
9653 rm -f conftest*
9654 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9655 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9656 cat > conftest.$ac_ext <<EOF
9657 #line 9658 "configure"
9658 #include "confdefs.h"
9659 /* Override any gcc2 internal prototype to avoid an error.  */
9660 /* We use char because int might match the return type of a gcc2
9661     builtin and then its argument prototype would still apply.  */
9662 char regfree();
9663
9664 int main() {
9665 regfree()
9666 ; return 0; }
9667 EOF
9668 if { (eval echo configure:9669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9669   rm -rf conftest*
9670   ac_cv_search_regfree="-l$ac_lib"
9671 break
9672 else
9673   echo "configure: failed program was:" >&5
9674   cat conftest.$ac_ext >&5
9675 fi
9676 rm -f conftest*
9677 done
9678 LIBS="$ac_func_search_save_LIBS"
9679 fi
9680
9681 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9682 if test "$ac_cv_search_regfree" != "no"; then
9683   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9684   :
9685 else :
9686   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9687 fi
9688
9689
9690 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9691 echo "configure:9692: checking for compatible POSIX regex" >&5
9692 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9693   echo $ac_n "(cached) $ac_c" 1>&6
9694 else
9695   
9696         if test "$cross_compiling" = yes; then
9697   ol_cv_c_posix_regex=cross
9698 else
9699   cat > conftest.$ac_ext <<EOF
9700 #line 9701 "configure"
9701 #include "confdefs.h"
9702
9703 #include <sys/types.h>
9704 #include <regex.h>
9705 static char *pattern, *string;
9706 main()
9707 {
9708         int rc;
9709         regex_t re;
9710
9711         pattern = "^A";
9712
9713         if(regcomp(&re, pattern, 0)) {
9714                 return -1;
9715         }
9716         
9717         string = "ALL MATCH";
9718         
9719         rc = regexec(&re, string, 0, (void*)0, 0);
9720
9721         regfree(&re);
9722
9723         return rc;
9724 }
9725 EOF
9726 if { (eval echo configure:9727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9727 then
9728   ol_cv_c_posix_regex=yes
9729 else
9730   echo "configure: failed program was:" >&5
9731   cat conftest.$ac_ext >&5
9732   rm -fr conftest*
9733   ol_cv_c_posix_regex=no
9734 fi
9735 rm -fr conftest*
9736 fi
9737
9738 fi
9739
9740 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9741
9742 if test "$ol_cv_c_posix_regex" = no ; then
9743         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9744 fi
9745
9746
9747 have_uuid=no
9748 for ac_hdr in sys/uuid.h
9749 do
9750 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9751 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9752 echo "configure:9753: checking for $ac_hdr" >&5
9753 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9754   echo $ac_n "(cached) $ac_c" 1>&6
9755 else
9756   cat > conftest.$ac_ext <<EOF
9757 #line 9758 "configure"
9758 #include "confdefs.h"
9759 #include <$ac_hdr>
9760 EOF
9761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9762 { (eval echo configure:9763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9764 if test -z "$ac_err"; then
9765   rm -rf conftest*
9766   eval "ac_cv_header_$ac_safe=yes"
9767 else
9768   echo "$ac_err" >&5
9769   echo "configure: failed program was:" >&5
9770   cat conftest.$ac_ext >&5
9771   rm -rf conftest*
9772   eval "ac_cv_header_$ac_safe=no"
9773 fi
9774 rm -f conftest*
9775 fi
9776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9777   echo "$ac_t""yes" 1>&6
9778     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9779   cat >> confdefs.h <<EOF
9780 #define $ac_tr_hdr 1
9781 EOF
9782  
9783 else
9784   echo "$ac_t""no" 1>&6
9785 fi
9786 done
9787
9788 if test $ac_cv_header_sys_uuid_h = yes ; then
9789         save_LIBS="$LIBS"
9790         
9791 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9792 echo "configure:9793: checking for library containing uuid_to_str" >&5
9793 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9794   echo $ac_n "(cached) $ac_c" 1>&6
9795 else
9796   ac_func_search_save_LIBS="$LIBS"
9797 ac_cv_search_uuid_to_str="no"
9798 cat > conftest.$ac_ext <<EOF
9799 #line 9800 "configure"
9800 #include "confdefs.h"
9801 /* Override any gcc2 internal prototype to avoid an error.  */
9802 /* We use char because int might match the return type of a gcc2
9803     builtin and then its argument prototype would still apply.  */
9804 char uuid_to_str();
9805
9806 int main() {
9807 uuid_to_str()
9808 ; return 0; }
9809 EOF
9810 if { (eval echo configure:9811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9811   rm -rf conftest*
9812   ac_cv_search_uuid_to_str="none required"
9813 else
9814   echo "configure: failed program was:" >&5
9815   cat conftest.$ac_ext >&5
9816 fi
9817 rm -f conftest*
9818 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9819 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9820 cat > conftest.$ac_ext <<EOF
9821 #line 9822 "configure"
9822 #include "confdefs.h"
9823 /* Override any gcc2 internal prototype to avoid an error.  */
9824 /* We use char because int might match the return type of a gcc2
9825     builtin and then its argument prototype would still apply.  */
9826 char uuid_to_str();
9827
9828 int main() {
9829 uuid_to_str()
9830 ; return 0; }
9831 EOF
9832 if { (eval echo configure:9833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9833   rm -rf conftest*
9834   ac_cv_search_uuid_to_str="-l$ac_lib"
9835 break
9836 else
9837   echo "configure: failed program was:" >&5
9838   cat conftest.$ac_ext >&5
9839 fi
9840 rm -f conftest*
9841 done
9842 LIBS="$ac_func_search_save_LIBS"
9843 fi
9844
9845 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9846 if test "$ac_cv_search_uuid_to_str" != "no"; then
9847   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9848   have_uuid=yes
9849 else :
9850   :
9851 fi
9852         LIBS="$save_LIBS"
9853
9854         if test have_uuid = yes ; then
9855                 cat >> confdefs.h <<\EOF
9856 #define HAVE_UUID_TO_STR 1
9857 EOF
9858
9859
9860                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9861                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9862         fi
9863 fi
9864
9865 if test $have_uuid = no ; then
9866         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9867 echo "configure:9868: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9868         save_LIBS="$LIBS"
9869         LIBS="$LIBS -lrpcrt4"
9870         cat > conftest.$ac_ext <<EOF
9871 #line 9872 "configure"
9872 #include "confdefs.h"
9873
9874                 char UuidCreate@4();
9875                 char UuidToStringA@8();
9876                 
9877 int main() {
9878
9879                 UuidCreate@4();
9880                 UuidToStringA@8();
9881                 
9882 ; return 0; }
9883 EOF
9884 if { (eval echo configure:9885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9885   rm -rf conftest*
9886   need_rpcrt=yes
9887 else
9888   echo "configure: failed program was:" >&5
9889   cat conftest.$ac_ext >&5
9890   rm -rf conftest*
9891   need_rpcrt=no
9892 fi
9893 rm -f conftest*
9894         if test $need_rpcrt = yes; then
9895                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9896         fi
9897         LIBS="$save_LIBS"
9898         echo "$ac_t""$need_rpcrt" 1>&6
9899 fi
9900
9901 ol_link_dnssrv=no
9902 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9903 echo "configure:9904: checking for res_query" >&5
9904 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9905   echo $ac_n "(cached) $ac_c" 1>&6
9906 else
9907   cat > conftest.$ac_ext <<EOF
9908 #line 9909 "configure"
9909 #include "confdefs.h"
9910 /* System header to define __stub macros and hopefully few prototypes,
9911     which can conflict with char res_query(); below.  */
9912 #include <assert.h>
9913 /* Override any gcc2 internal prototype to avoid an error.  */
9914 /* We use char because int might match the return type of a gcc2
9915     builtin and then its argument prototype would still apply.  */
9916 char res_query();
9917 char (*f)();
9918
9919 int main() {
9920
9921 /* The GNU C library defines this for functions which it implements
9922     to always fail with ENOSYS.  Some functions are actually named
9923     something starting with __ and the normal name is an alias.  */
9924 #if defined (__stub_res_query) || defined (__stub___res_query)
9925 choke me
9926 #else
9927 f = res_query;
9928 #endif
9929
9930 ; return 0; }
9931 EOF
9932 if { (eval echo configure:9933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9933   rm -rf conftest*
9934   eval "ac_cv_func_res_query=yes"
9935 else
9936   echo "configure: failed program was:" >&5
9937   cat conftest.$ac_ext >&5
9938   rm -rf conftest*
9939   eval "ac_cv_func_res_query=no"
9940 fi
9941 rm -f conftest*
9942 fi
9943
9944 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9945   echo "$ac_t""yes" 1>&6
9946   :
9947 else
9948   echo "$ac_t""no" 1>&6
9949 fi
9950
9951 if test $ac_cv_func_res_query = no ; then 
9952         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9953 echo "configure:9954: checking for __res_query" >&5
9954 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9955   echo $ac_n "(cached) $ac_c" 1>&6
9956 else
9957   cat > conftest.$ac_ext <<EOF
9958 #line 9959 "configure"
9959 #include "confdefs.h"
9960 /* System header to define __stub macros and hopefully few prototypes,
9961     which can conflict with char __res_query(); below.  */
9962 #include <assert.h>
9963 /* Override any gcc2 internal prototype to avoid an error.  */
9964 /* We use char because int might match the return type of a gcc2
9965     builtin and then its argument prototype would still apply.  */
9966 char __res_query();
9967 char (*f)();
9968
9969 int main() {
9970
9971 /* The GNU C library defines this for functions which it implements
9972     to always fail with ENOSYS.  Some functions are actually named
9973     something starting with __ and the normal name is an alias.  */
9974 #if defined (__stub___res_query) || defined (__stub_____res_query)
9975 choke me
9976 #else
9977 f = __res_query;
9978 #endif
9979
9980 ; return 0; }
9981 EOF
9982 if { (eval echo configure:9983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9983   rm -rf conftest*
9984   eval "ac_cv_func___res_query=yes"
9985 else
9986   echo "configure: failed program was:" >&5
9987   cat conftest.$ac_ext >&5
9988   rm -rf conftest*
9989   eval "ac_cv_func___res_query=no"
9990 fi
9991 rm -f conftest*
9992 fi
9993
9994 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9995   echo "$ac_t""yes" 1>&6
9996   :
9997 else
9998   echo "$ac_t""no" 1>&6
9999 fi
10000
10001         ac_cv_func_res_query=$ac_cv_func___res_query
10002 fi
10003
10004 if test $ac_cv_func_res_query = no ; then 
10005         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10006 echo "configure:10007: checking for res_query in -lbind" >&5
10007 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10008 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10009   echo $ac_n "(cached) $ac_c" 1>&6
10010 else
10011   ac_save_LIBS="$LIBS"
10012 LIBS="-lbind  $LIBS"
10013 cat > conftest.$ac_ext <<EOF
10014 #line 10015 "configure"
10015 #include "confdefs.h"
10016 /* Override any gcc2 internal prototype to avoid an error.  */
10017 /* We use char because int might match the return type of a gcc2
10018     builtin and then its argument prototype would still apply.  */
10019 char res_query();
10020
10021 int main() {
10022 res_query()
10023 ; return 0; }
10024 EOF
10025 if { (eval echo configure:10026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10026   rm -rf conftest*
10027   eval "ac_cv_lib_$ac_lib_var=yes"
10028 else
10029   echo "configure: failed program was:" >&5
10030   cat conftest.$ac_ext >&5
10031   rm -rf conftest*
10032   eval "ac_cv_lib_$ac_lib_var=no"
10033 fi
10034 rm -f conftest*
10035 LIBS="$ac_save_LIBS"
10036
10037 fi
10038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10039   echo "$ac_t""yes" 1>&6
10040     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10041     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10042   cat >> confdefs.h <<EOF
10043 #define $ac_tr_lib 1
10044 EOF
10045
10046   LIBS="-lbind $LIBS"
10047
10048 else
10049   echo "$ac_t""no" 1>&6
10050 fi
10051
10052         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10053 fi
10054
10055 if test $ac_cv_func_res_query = no ; then 
10056         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10057 echo "configure:10058: checking for __res_query in -lbind" >&5
10058 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10059 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10060   echo $ac_n "(cached) $ac_c" 1>&6
10061 else
10062   ac_save_LIBS="$LIBS"
10063 LIBS="-lbind  $LIBS"
10064 cat > conftest.$ac_ext <<EOF
10065 #line 10066 "configure"
10066 #include "confdefs.h"
10067 /* Override any gcc2 internal prototype to avoid an error.  */
10068 /* We use char because int might match the return type of a gcc2
10069     builtin and then its argument prototype would still apply.  */
10070 char __res_query();
10071
10072 int main() {
10073 __res_query()
10074 ; return 0; }
10075 EOF
10076 if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10077   rm -rf conftest*
10078   eval "ac_cv_lib_$ac_lib_var=yes"
10079 else
10080   echo "configure: failed program was:" >&5
10081   cat conftest.$ac_ext >&5
10082   rm -rf conftest*
10083   eval "ac_cv_lib_$ac_lib_var=no"
10084 fi
10085 rm -f conftest*
10086 LIBS="$ac_save_LIBS"
10087
10088 fi
10089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10090   echo "$ac_t""yes" 1>&6
10091     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10092     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10093   cat >> confdefs.h <<EOF
10094 #define $ac_tr_lib 1
10095 EOF
10096
10097   LIBS="-lbind $LIBS"
10098
10099 else
10100   echo "$ac_t""no" 1>&6
10101 fi
10102
10103         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10104 fi
10105
10106 if test $ac_cv_func_res_query = no ; then 
10107         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10108 echo "configure:10109: checking for res_query in -lresolv" >&5
10109 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10110 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10111   echo $ac_n "(cached) $ac_c" 1>&6
10112 else
10113   ac_save_LIBS="$LIBS"
10114 LIBS="-lresolv  $LIBS"
10115 cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118 /* Override any gcc2 internal prototype to avoid an error.  */
10119 /* We use char because int might match the return type of a gcc2
10120     builtin and then its argument prototype would still apply.  */
10121 char res_query();
10122
10123 int main() {
10124 res_query()
10125 ; return 0; }
10126 EOF
10127 if { (eval echo configure:10128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10128   rm -rf conftest*
10129   eval "ac_cv_lib_$ac_lib_var=yes"
10130 else
10131   echo "configure: failed program was:" >&5
10132   cat conftest.$ac_ext >&5
10133   rm -rf conftest*
10134   eval "ac_cv_lib_$ac_lib_var=no"
10135 fi
10136 rm -f conftest*
10137 LIBS="$ac_save_LIBS"
10138
10139 fi
10140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10141   echo "$ac_t""yes" 1>&6
10142     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10143     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10144   cat >> confdefs.h <<EOF
10145 #define $ac_tr_lib 1
10146 EOF
10147
10148   LIBS="-lresolv $LIBS"
10149
10150 else
10151   echo "$ac_t""no" 1>&6
10152 fi
10153
10154         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10155 fi
10156
10157 if test $ac_cv_func_res_query = no ; then 
10158         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10159 echo "configure:10160: checking for __res_query in -lresolv" >&5
10160 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10161 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10162   echo $ac_n "(cached) $ac_c" 1>&6
10163 else
10164   ac_save_LIBS="$LIBS"
10165 LIBS="-lresolv  $LIBS"
10166 cat > conftest.$ac_ext <<EOF
10167 #line 10168 "configure"
10168 #include "confdefs.h"
10169 /* Override any gcc2 internal prototype to avoid an error.  */
10170 /* We use char because int might match the return type of a gcc2
10171     builtin and then its argument prototype would still apply.  */
10172 char __res_query();
10173
10174 int main() {
10175 __res_query()
10176 ; return 0; }
10177 EOF
10178 if { (eval echo configure:10179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10179   rm -rf conftest*
10180   eval "ac_cv_lib_$ac_lib_var=yes"
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -rf conftest*
10185   eval "ac_cv_lib_$ac_lib_var=no"
10186 fi
10187 rm -f conftest*
10188 LIBS="$ac_save_LIBS"
10189
10190 fi
10191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10192   echo "$ac_t""yes" 1>&6
10193     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10194     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10195   cat >> confdefs.h <<EOF
10196 #define $ac_tr_lib 1
10197 EOF
10198
10199   LIBS="-lresolv $LIBS"
10200
10201 else
10202   echo "$ac_t""no" 1>&6
10203 fi
10204
10205         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10206 fi
10207
10208 if test "$ac_cv_func_res_query" = yes ; then
10209         cat >> confdefs.h <<\EOF
10210 #define HAVE_RES_QUERY 1
10211 EOF
10212
10213
10214         if test $ol_enable_dnssrv != no ; then
10215                 ol_link_dnssrv=yes
10216         fi
10217 fi
10218
10219 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10220         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10221 fi
10222
10223 for ac_func in getaddrinfo gai_strerror inet_ntop 
10224 do
10225 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10226 echo "configure:10227: checking for $ac_func" >&5
10227 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10228   echo $ac_n "(cached) $ac_c" 1>&6
10229 else
10230   cat > conftest.$ac_ext <<EOF
10231 #line 10232 "configure"
10232 #include "confdefs.h"
10233 /* System header to define __stub macros and hopefully few prototypes,
10234     which can conflict with char $ac_func(); below.  */
10235 #include <assert.h>
10236 /* Override any gcc2 internal prototype to avoid an error.  */
10237 /* We use char because int might match the return type of a gcc2
10238     builtin and then its argument prototype would still apply.  */
10239 char $ac_func();
10240 char (*f)();
10241
10242 int main() {
10243
10244 /* The GNU C library defines this for functions which it implements
10245     to always fail with ENOSYS.  Some functions are actually named
10246     something starting with __ and the normal name is an alias.  */
10247 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10248 choke me
10249 #else
10250 f = $ac_func;
10251 #endif
10252
10253 ; return 0; }
10254 EOF
10255 if { (eval echo configure:10256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10256   rm -rf conftest*
10257   eval "ac_cv_func_$ac_func=yes"
10258 else
10259   echo "configure: failed program was:" >&5
10260   cat conftest.$ac_ext >&5
10261   rm -rf conftest*
10262   eval "ac_cv_func_$ac_func=no"
10263 fi
10264 rm -f conftest*
10265 fi
10266
10267 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10268   echo "$ac_t""yes" 1>&6
10269     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10270   cat >> confdefs.h <<EOF
10271 #define $ac_tr_func 1
10272 EOF
10273  
10274 else
10275   echo "$ac_t""no" 1>&6
10276 fi
10277 done
10278
10279
10280 ol_link_ipv6=no
10281 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10282         if test $ol_enable_ipv6 = yes ; then
10283                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10284         fi
10285 elif test $ol_enable_ipv6 != no ; then
10286         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10287 echo "configure:10288: checking INET6_ADDRSTRLEN" >&5
10288 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10289   echo $ac_n "(cached) $ac_c" 1>&6
10290 else
10291   
10292                 cat > conftest.$ac_ext <<EOF
10293 #line 10294 "configure"
10294 #include "confdefs.h"
10295
10296 #                       include <netinet/in.h>
10297 #                       ifdef INET6_ADDRSTRLEN
10298                                 __has_inet6_addrstrlen__;
10299 #                       endif
10300                 
10301 EOF
10302 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10303   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10304   rm -rf conftest*
10305   ol_cv_inet6_addrstrlen=yes
10306 else
10307   rm -rf conftest*
10308   ol_cv_inet6_addrstrlen=no
10309 fi
10310 rm -f conftest*
10311
10312 fi
10313
10314 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10315
10316
10317         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10318 echo "configure:10319: checking struct sockaddr_storage" >&5
10319 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10320   echo $ac_n "(cached) $ac_c" 1>&6
10321 else
10322   
10323                 cat > conftest.$ac_ext <<EOF
10324 #line 10325 "configure"
10325 #include "confdefs.h"
10326
10327 #include <sys/types.h>
10328 #include <sys/socket.h>
10329
10330 int main() {
10331
10332                         struct sockaddr_storage ss;
10333
10334 ; return 0; }
10335 EOF
10336 if { (eval echo configure:10337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10337   rm -rf conftest*
10338   ol_cv_struct_sockaddr_storage=yes
10339 else
10340   echo "configure: failed program was:" >&5
10341   cat conftest.$ac_ext >&5
10342   rm -rf conftest*
10343   ol_cv_struct_sockaddr_storage=no
10344 fi
10345 rm -f conftest*
10346 fi
10347
10348 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10349
10350         if test $ol_cv_inet6_addrstrlen = yes \
10351                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10352                 ol_link_ipv6=yes
10353         elif test $ol_enable_ipv6 = yes \
10354                         -a $ol_cv_inet6_addrstrlen = no ; then
10355                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10356         elif test $ol_enable_ipv6 = yes \
10357                         -a $ol_cv_struct_sockaddr_storage = no ; then
10358                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10359         fi
10360 fi
10361
10362 if test $ol_enable_local != no ; then
10363         for ac_hdr in sys/un.h 
10364 do
10365 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10366 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10367 echo "configure:10368: checking for $ac_hdr" >&5
10368 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10369   echo $ac_n "(cached) $ac_c" 1>&6
10370 else
10371   cat > conftest.$ac_ext <<EOF
10372 #line 10373 "configure"
10373 #include "confdefs.h"
10374 #include <$ac_hdr>
10375 EOF
10376 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10377 { (eval echo configure:10378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10378 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10379 if test -z "$ac_err"; then
10380   rm -rf conftest*
10381   eval "ac_cv_header_$ac_safe=yes"
10382 else
10383   echo "$ac_err" >&5
10384   echo "configure: failed program was:" >&5
10385   cat conftest.$ac_ext >&5
10386   rm -rf conftest*
10387   eval "ac_cv_header_$ac_safe=no"
10388 fi
10389 rm -f conftest*
10390 fi
10391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10392   echo "$ac_t""yes" 1>&6
10393     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10394   cat >> confdefs.h <<EOF
10395 #define $ac_tr_hdr 1
10396 EOF
10397  
10398 else
10399   echo "$ac_t""no" 1>&6
10400 fi
10401 done
10402
10403
10404         if test $ol_enable_local = auto ; then
10405                 ol_enable_local=$ac_cv_header_sys_un_h
10406         elif test $ac_cv_header_sys_un_h = no ; then
10407                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10408         fi
10409 fi
10410
10411 ol_link_kbind=no
10412 ol_link_kpasswd=no
10413 ol_link_krb5=no
10414 ol_link_krb4=no
10415
10416 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10417         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10418         -o $ol_with_kerberos = k425 ; then
10419
10420         for ac_hdr in krb5.h
10421 do
10422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10424 echo "configure:10425: checking for $ac_hdr" >&5
10425 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10426   echo $ac_n "(cached) $ac_c" 1>&6
10427 else
10428   cat > conftest.$ac_ext <<EOF
10429 #line 10430 "configure"
10430 #include "confdefs.h"
10431 #include <$ac_hdr>
10432 EOF
10433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10434 { (eval echo configure:10435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10436 if test -z "$ac_err"; then
10437   rm -rf conftest*
10438   eval "ac_cv_header_$ac_safe=yes"
10439 else
10440   echo "$ac_err" >&5
10441   echo "configure: failed program was:" >&5
10442   cat conftest.$ac_ext >&5
10443   rm -rf conftest*
10444   eval "ac_cv_header_$ac_safe=no"
10445 fi
10446 rm -f conftest*
10447 fi
10448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10449   echo "$ac_t""yes" 1>&6
10450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10451   cat >> confdefs.h <<EOF
10452 #define $ac_tr_hdr 1
10453 EOF
10454  
10455 else
10456   echo "$ac_t""no" 1>&6
10457 fi
10458 done
10459
10460
10461         if test $ac_cv_header_krb5_h = yes ; then
10462                                 for ac_hdr in heim_err.h
10463 do
10464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10466 echo "configure:10467: checking for $ac_hdr" >&5
10467 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10468   echo $ac_n "(cached) $ac_c" 1>&6
10469 else
10470   cat > conftest.$ac_ext <<EOF
10471 #line 10472 "configure"
10472 #include "confdefs.h"
10473 #include <$ac_hdr>
10474 EOF
10475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10476 { (eval echo configure:10477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10478 if test -z "$ac_err"; then
10479   rm -rf conftest*
10480   eval "ac_cv_header_$ac_safe=yes"
10481 else
10482   echo "$ac_err" >&5
10483   echo "configure: failed program was:" >&5
10484   cat conftest.$ac_ext >&5
10485   rm -rf conftest*
10486   eval "ac_cv_header_$ac_safe=no"
10487 fi
10488 rm -f conftest*
10489 fi
10490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10491   echo "$ac_t""yes" 1>&6
10492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10493   cat >> confdefs.h <<EOF
10494 #define $ac_tr_hdr 1
10495 EOF
10496  
10497 else
10498   echo "$ac_t""no" 1>&6
10499 fi
10500 done
10501
10502                 if test $ac_cv_header_heim_err_h = yes ; then
10503                         krb5_impl=heimdal
10504                 else
10505                         krb5_impl=mit
10506                 fi
10507
10508                 if test $krb5_impl = mit; then
10509                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10510 echo "configure:10511: checking for main in -lk5crypto" >&5
10511 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10512 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10513   echo $ac_n "(cached) $ac_c" 1>&6
10514 else
10515   ac_save_LIBS="$LIBS"
10516 LIBS="-lk5crypto  $LIBS"
10517 cat > conftest.$ac_ext <<EOF
10518 #line 10519 "configure"
10519 #include "confdefs.h"
10520
10521 int main() {
10522 main()
10523 ; return 0; }
10524 EOF
10525 if { (eval echo configure:10526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10526   rm -rf conftest*
10527   eval "ac_cv_lib_$ac_lib_var=yes"
10528 else
10529   echo "configure: failed program was:" >&5
10530   cat conftest.$ac_ext >&5
10531   rm -rf conftest*
10532   eval "ac_cv_lib_$ac_lib_var=no"
10533 fi
10534 rm -f conftest*
10535 LIBS="$ac_save_LIBS"
10536
10537 fi
10538 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10539   echo "$ac_t""yes" 1>&6
10540   krb5crypto=k5crypto
10541 else
10542   echo "$ac_t""no" 1>&6
10543 krb5crypto=crypto
10544 fi
10545
10546
10547                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10548 echo "configure:10549: checking for main in -lkrb5" >&5
10549 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10551   echo $ac_n "(cached) $ac_c" 1>&6
10552 else
10553   ac_save_LIBS="$LIBS"
10554 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10555 cat > conftest.$ac_ext <<EOF
10556 #line 10557 "configure"
10557 #include "confdefs.h"
10558
10559 int main() {
10560 main()
10561 ; return 0; }
10562 EOF
10563 if { (eval echo configure:10564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10564   rm -rf conftest*
10565   eval "ac_cv_lib_$ac_lib_var=yes"
10566 else
10567   echo "configure: failed program was:" >&5
10568   cat conftest.$ac_ext >&5
10569   rm -rf conftest*
10570   eval "ac_cv_lib_$ac_lib_var=no"
10571 fi
10572 rm -f conftest*
10573 LIBS="$ac_save_LIBS"
10574
10575 fi
10576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10577   echo "$ac_t""yes" 1>&6
10578   have_krb5=yes
10579                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10580 else
10581   echo "$ac_t""no" 1>&6
10582 have_krb5=no
10583 fi
10584
10585
10586                 elif test $krb5_impl = heimdal; then
10587                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10588 echo "configure:10589: checking for main in -ldes" >&5
10589 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10590 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10591   echo $ac_n "(cached) $ac_c" 1>&6
10592 else
10593   ac_save_LIBS="$LIBS"
10594 LIBS="-ldes  $LIBS"
10595 cat > conftest.$ac_ext <<EOF
10596 #line 10597 "configure"
10597 #include "confdefs.h"
10598
10599 int main() {
10600 main()
10601 ; return 0; }
10602 EOF
10603 if { (eval echo configure:10604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10604   rm -rf conftest*
10605   eval "ac_cv_lib_$ac_lib_var=yes"
10606 else
10607   echo "configure: failed program was:" >&5
10608   cat conftest.$ac_ext >&5
10609   rm -rf conftest*
10610   eval "ac_cv_lib_$ac_lib_var=no"
10611 fi
10612 rm -f conftest*
10613 LIBS="$ac_save_LIBS"
10614
10615 fi
10616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10617   echo "$ac_t""yes" 1>&6
10618   krb5crypto=des
10619 else
10620   echo "$ac_t""no" 1>&6
10621 krb5crypto=crypto
10622 fi
10623
10624
10625                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10626 echo "configure:10627: checking for main in -lkrb5" >&5
10627 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10629   echo $ac_n "(cached) $ac_c" 1>&6
10630 else
10631   ac_save_LIBS="$LIBS"
10632 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10633 cat > conftest.$ac_ext <<EOF
10634 #line 10635 "configure"
10635 #include "confdefs.h"
10636
10637 int main() {
10638 main()
10639 ; return 0; }
10640 EOF
10641 if { (eval echo configure:10642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10642   rm -rf conftest*
10643   eval "ac_cv_lib_$ac_lib_var=yes"
10644 else
10645   echo "configure: failed program was:" >&5
10646   cat conftest.$ac_ext >&5
10647   rm -rf conftest*
10648   eval "ac_cv_lib_$ac_lib_var=no"
10649 fi
10650 rm -f conftest*
10651 LIBS="$ac_save_LIBS"
10652
10653 fi
10654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10655   echo "$ac_t""yes" 1>&6
10656   have_krb5=yes
10657                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10658 else
10659   echo "$ac_t""no" 1>&6
10660 have_krb5=no
10661 fi
10662
10663
10664                         cat >> confdefs.h <<\EOF
10665 #define HAVE_HEIMDAL_KERBEROS 1
10666 EOF
10667
10668
10669                 else
10670                         have_krb5=no
10671                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10672                 fi
10673
10674                 if test $have_krb5 = yes ; then
10675                         ol_link_krb5=yes
10676
10677                         cat >> confdefs.h <<\EOF
10678 #define HAVE_KRB5 1
10679 EOF
10680
10681
10682                         if test $ol_enable_kpasswd != no ; then
10683                                 ol_link_kpasswd=yes;
10684                         fi
10685
10686                         if test $ol_with_kerberos = k5only ; then
10687                                 ol_with_kerberos=found
10688                         fi
10689
10690                 elif test $ol_with_kerberos != auto ; then
10691                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10692                 fi
10693
10694         fi
10695 fi
10696
10697 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10698         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10699
10700         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10701 do
10702 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10703 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10704 echo "configure:10705: checking for $ac_hdr" >&5
10705 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10706   echo $ac_n "(cached) $ac_c" 1>&6
10707 else
10708   cat > conftest.$ac_ext <<EOF
10709 #line 10710 "configure"
10710 #include "confdefs.h"
10711 #include <$ac_hdr>
10712 EOF
10713 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10714 { (eval echo configure:10715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10715 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10716 if test -z "$ac_err"; then
10717   rm -rf conftest*
10718   eval "ac_cv_header_$ac_safe=yes"
10719 else
10720   echo "$ac_err" >&5
10721   echo "configure: failed program was:" >&5
10722   cat conftest.$ac_ext >&5
10723   rm -rf conftest*
10724   eval "ac_cv_header_$ac_safe=no"
10725 fi
10726 rm -f conftest*
10727 fi
10728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10729   echo "$ac_t""yes" 1>&6
10730     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10731   cat >> confdefs.h <<EOF
10732 #define $ac_tr_hdr 1
10733 EOF
10734  
10735 else
10736   echo "$ac_t""no" 1>&6
10737 fi
10738 done
10739
10740
10741         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10742                 if test $krb5_impl = mit; then
10743                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10744 echo "configure:10745: checking for main in -lkrb4" >&5
10745 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10747   echo $ac_n "(cached) $ac_c" 1>&6
10748 else
10749   ac_save_LIBS="$LIBS"
10750 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10751 cat > conftest.$ac_ext <<EOF
10752 #line 10753 "configure"
10753 #include "confdefs.h"
10754
10755 int main() {
10756 main()
10757 ; return 0; }
10758 EOF
10759 if { (eval echo configure:10760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10760   rm -rf conftest*
10761   eval "ac_cv_lib_$ac_lib_var=yes"
10762 else
10763   echo "configure: failed program was:" >&5
10764   cat conftest.$ac_ext >&5
10765   rm -rf conftest*
10766   eval "ac_cv_lib_$ac_lib_var=no"
10767 fi
10768 rm -f conftest*
10769 LIBS="$ac_save_LIBS"
10770
10771 fi
10772 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10773   echo "$ac_t""yes" 1>&6
10774   have_k425=yes
10775                                 KRB4_LIBS="-lkrb4 -ldes425"
10776 else
10777   echo "$ac_t""no" 1>&6
10778 have_k425=no
10779 fi
10780
10781
10782                 elif test $krb5_impl = heimdal; then
10783                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10784 echo "configure:10785: checking for main in -lkrb4" >&5
10785 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10786 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10787   echo $ac_n "(cached) $ac_c" 1>&6
10788 else
10789   ac_save_LIBS="$LIBS"
10790 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10791 cat > conftest.$ac_ext <<EOF
10792 #line 10793 "configure"
10793 #include "confdefs.h"
10794
10795 int main() {
10796 main()
10797 ; return 0; }
10798 EOF
10799 if { (eval echo configure:10800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10800   rm -rf conftest*
10801   eval "ac_cv_lib_$ac_lib_var=yes"
10802 else
10803   echo "configure: failed program was:" >&5
10804   cat conftest.$ac_ext >&5
10805   rm -rf conftest*
10806   eval "ac_cv_lib_$ac_lib_var=no"
10807 fi
10808 rm -f conftest*
10809 LIBS="$ac_save_LIBS"
10810
10811 fi
10812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10813   echo "$ac_t""yes" 1>&6
10814   have_k425=yes
10815                                 KRB4_LIBS="-lkrb4"
10816 else
10817   echo "$ac_t""no" 1>&6
10818 have_k425=no
10819 fi
10820
10821
10822                 else
10823                         have_425=no
10824                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10825                 fi
10826
10827                 if test $have_k425 = yes ; then
10828                         ol_with_kerberos=found
10829                         ol_link_krb4=yes
10830
10831                         cat >> confdefs.h <<\EOF
10832 #define HAVE_KRB425 1
10833 EOF
10834
10835                         cat >> confdefs.h <<\EOF
10836 #define HAVE_KRB4 1
10837 EOF
10838
10839
10840                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10841 echo "configure:10842: checking for des_debug in Kerberos libraries" >&5
10842 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10843   echo $ac_n "(cached) $ac_c" 1>&6
10844 else
10845   
10846                                                                 save_LIBS="$LIBS"
10847                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10848                                 cat > conftest.$ac_ext <<EOF
10849 #line 10850 "configure"
10850 #include "confdefs.h"
10851
10852 #include <kerberosIV/krb.h>
10853 #include <kerberosIV/des.h>
10854 extern int des_debug;
10855
10856 int main() {
10857
10858 des_debug = 1;
10859
10860 ; return 0; }
10861 EOF
10862 if { (eval echo configure:10863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10863   rm -rf conftest*
10864   ol_cv_var_des_debug=yes
10865 else
10866   echo "configure: failed program was:" >&5
10867   cat conftest.$ac_ext >&5
10868   rm -rf conftest*
10869   ol_cv_var_des_debug=no
10870 fi
10871 rm -f conftest*
10872                                                                 LIBS="$save_LIBS"
10873                         
10874 fi
10875
10876 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10877
10878                         if test $ol_cv_var_des_debug = yes ; then
10879                                 cat >> confdefs.h <<\EOF
10880 #define HAVE_DES_DEBUG 1
10881 EOF
10882
10883                         fi
10884
10885                         LIBS="$save_LIBS"
10886                 fi
10887         fi
10888 fi
10889
10890 if test $ol_link_krb5 = yes ; then
10891         ol_with_kerberos=found
10892 fi
10893
10894 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10895         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10896
10897         for ac_hdr in krb.h des.h krb-archaeology.h 
10898 do
10899 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10900 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10901 echo "configure:10902: checking for $ac_hdr" >&5
10902 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10903   echo $ac_n "(cached) $ac_c" 1>&6
10904 else
10905   cat > conftest.$ac_ext <<EOF
10906 #line 10907 "configure"
10907 #include "confdefs.h"
10908 #include <$ac_hdr>
10909 EOF
10910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10911 { (eval echo configure:10912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10913 if test -z "$ac_err"; then
10914   rm -rf conftest*
10915   eval "ac_cv_header_$ac_safe=yes"
10916 else
10917   echo "$ac_err" >&5
10918   echo "configure: failed program was:" >&5
10919   cat conftest.$ac_ext >&5
10920   rm -rf conftest*
10921   eval "ac_cv_header_$ac_safe=no"
10922 fi
10923 rm -f conftest*
10924 fi
10925 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10926   echo "$ac_t""yes" 1>&6
10927     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10928   cat >> confdefs.h <<EOF
10929 #define $ac_tr_hdr 1
10930 EOF
10931  
10932 else
10933   echo "$ac_t""no" 1>&6
10934 fi
10935 done
10936
10937
10938         if test $ac_cv_header_krb_h = yes ; then
10939                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10940 echo "configure:10941: checking for main in -lkrb" >&5
10941 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10942 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10943   echo $ac_n "(cached) $ac_c" 1>&6
10944 else
10945   ac_save_LIBS="$LIBS"
10946 LIBS="-lkrb -ldes $LIBS"
10947 cat > conftest.$ac_ext <<EOF
10948 #line 10949 "configure"
10949 #include "confdefs.h"
10950
10951 int main() {
10952 main()
10953 ; return 0; }
10954 EOF
10955 if { (eval echo configure:10956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10956   rm -rf conftest*
10957   eval "ac_cv_lib_$ac_lib_var=yes"
10958 else
10959   echo "configure: failed program was:" >&5
10960   cat conftest.$ac_ext >&5
10961   rm -rf conftest*
10962   eval "ac_cv_lib_$ac_lib_var=no"
10963 fi
10964 rm -f conftest*
10965 LIBS="$ac_save_LIBS"
10966
10967 fi
10968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10969   echo "$ac_t""yes" 1>&6
10970   have_k4=yes
10971 else
10972   echo "$ac_t""no" 1>&6
10973 have_k4=no
10974 fi
10975
10976
10977                 if test $have_k4 = yes ; then
10978                         ol_with_kerberos=found
10979                         ol_link_krb4=yes
10980
10981                         cat >> confdefs.h <<\EOF
10982 #define HAVE_KRB4 1
10983 EOF
10984
10985
10986                         KRB4_LIBS="-lkrb -ldes"
10987
10988                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10989                                 cat >> confdefs.h <<\EOF
10990 #define HAVE_KTH_KERBEROS 1
10991 EOF
10992
10993                         fi
10994                 fi
10995         fi
10996 fi
10997
10998 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10999         ol_link_kpasswd=yes
11000 fi
11001
11002 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11003         ol_link_kbind=yes
11004
11005 elif test $ol_enable_kbind = yes ; then
11006         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11007 fi
11008
11009 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11010         cat >> confdefs.h <<\EOF
11011 #define HAVE_KERBEROS 1
11012 EOF
11013
11014
11015 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11016         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11017 fi
11018
11019 ol_link_tls=no
11020 if test $ol_with_tls != no ; then
11021         for ac_hdr in openssl/ssl.h ssl.h
11022 do
11023 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11024 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11025 echo "configure:11026: checking for $ac_hdr" >&5
11026 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11027   echo $ac_n "(cached) $ac_c" 1>&6
11028 else
11029   cat > conftest.$ac_ext <<EOF
11030 #line 11031 "configure"
11031 #include "confdefs.h"
11032 #include <$ac_hdr>
11033 EOF
11034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11035 { (eval echo configure:11036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11037 if test -z "$ac_err"; then
11038   rm -rf conftest*
11039   eval "ac_cv_header_$ac_safe=yes"
11040 else
11041   echo "$ac_err" >&5
11042   echo "configure: failed program was:" >&5
11043   cat conftest.$ac_ext >&5
11044   rm -rf conftest*
11045   eval "ac_cv_header_$ac_safe=no"
11046 fi
11047 rm -f conftest*
11048 fi
11049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11050   echo "$ac_t""yes" 1>&6
11051     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11052   cat >> confdefs.h <<EOF
11053 #define $ac_tr_hdr 1
11054 EOF
11055  
11056 else
11057   echo "$ac_t""no" 1>&6
11058 fi
11059 done
11060
11061         
11062         if test $ac_cv_header_openssl_ssl_h = yes \
11063                 -o $ac_cv_header_ssl_h = yes ; then
11064                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11065 echo "configure:11066: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11066 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11068   echo $ac_n "(cached) $ac_c" 1>&6
11069 else
11070   ac_save_LIBS="$LIBS"
11071 LIBS="-lssl -lcrypto $LIBS"
11072 cat > conftest.$ac_ext <<EOF
11073 #line 11074 "configure"
11074 #include "confdefs.h"
11075 /* Override any gcc2 internal prototype to avoid an error.  */
11076 /* We use char because int might match the return type of a gcc2
11077     builtin and then its argument prototype would still apply.  */
11078 char SSLeay_add_ssl_algorithms();
11079
11080 int main() {
11081 SSLeay_add_ssl_algorithms()
11082 ; return 0; }
11083 EOF
11084 if { (eval echo configure:11085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11085   rm -rf conftest*
11086   eval "ac_cv_lib_$ac_lib_var=yes"
11087 else
11088   echo "configure: failed program was:" >&5
11089   cat conftest.$ac_ext >&5
11090   rm -rf conftest*
11091   eval "ac_cv_lib_$ac_lib_var=no"
11092 fi
11093 rm -f conftest*
11094 LIBS="$ac_save_LIBS"
11095
11096 fi
11097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11098   echo "$ac_t""yes" 1>&6
11099   have_ssleay=yes
11100                         need_rsaref=no
11101 else
11102   echo "$ac_t""no" 1>&6
11103 have_ssleay=no
11104 fi
11105
11106                         
11107                 if test $have_ssleay = no ; then
11108                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11109 echo "configure:11110: checking for SSL_library_init in -lssl" >&5
11110 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11111 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11112   echo $ac_n "(cached) $ac_c" 1>&6
11113 else
11114   ac_save_LIBS="$LIBS"
11115 LIBS="-lssl -lcrypto $LIBS"
11116 cat > conftest.$ac_ext <<EOF
11117 #line 11118 "configure"
11118 #include "confdefs.h"
11119 /* Override any gcc2 internal prototype to avoid an error.  */
11120 /* We use char because int might match the return type of a gcc2
11121     builtin and then its argument prototype would still apply.  */
11122 char SSL_library_init();
11123
11124 int main() {
11125 SSL_library_init()
11126 ; return 0; }
11127 EOF
11128 if { (eval echo configure:11129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11129   rm -rf conftest*
11130   eval "ac_cv_lib_$ac_lib_var=yes"
11131 else
11132   echo "configure: failed program was:" >&5
11133   cat conftest.$ac_ext >&5
11134   rm -rf conftest*
11135   eval "ac_cv_lib_$ac_lib_var=no"
11136 fi
11137 rm -f conftest*
11138 LIBS="$ac_save_LIBS"
11139
11140 fi
11141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11142   echo "$ac_t""yes" 1>&6
11143   have_ssleay=yes
11144                                 need_rsaref=no
11145 else
11146   echo "$ac_t""no" 1>&6
11147 have_ssleay=no
11148 fi
11149
11150                 fi
11151
11152                 if test $have_ssleay = no ; then
11153                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11154 echo "configure:11155: checking for ssl3_accept in -lssl" >&5
11155 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11156 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11157   echo $ac_n "(cached) $ac_c" 1>&6
11158 else
11159   ac_save_LIBS="$LIBS"
11160 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11161 cat > conftest.$ac_ext <<EOF
11162 #line 11163 "configure"
11163 #include "confdefs.h"
11164 /* Override any gcc2 internal prototype to avoid an error.  */
11165 /* We use char because int might match the return type of a gcc2
11166     builtin and then its argument prototype would still apply.  */
11167 char ssl3_accept();
11168
11169 int main() {
11170 ssl3_accept()
11171 ; return 0; }
11172 EOF
11173 if { (eval echo configure:11174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11174   rm -rf conftest*
11175   eval "ac_cv_lib_$ac_lib_var=yes"
11176 else
11177   echo "configure: failed program was:" >&5
11178   cat conftest.$ac_ext >&5
11179   rm -rf conftest*
11180   eval "ac_cv_lib_$ac_lib_var=no"
11181 fi
11182 rm -f conftest*
11183 LIBS="$ac_save_LIBS"
11184
11185 fi
11186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11187   echo "$ac_t""yes" 1>&6
11188   have_ssleay=yes
11189                                 need_rsaref=yes
11190 else
11191   echo "$ac_t""no" 1>&6
11192 have_ssleay=no
11193 fi
11194
11195                 fi
11196
11197                 if test $have_ssleay = yes ; then
11198                         ol_with_tls=found
11199                         ol_link_tls=yes
11200
11201                         cat >> confdefs.h <<\EOF
11202 #define HAVE_SSLEAY 1
11203 EOF
11204
11205
11206                         if test $need_rsaref = yes; then
11207                                 cat >> confdefs.h <<\EOF
11208 #define HAVE_RSAREF 1
11209 EOF
11210
11211
11212                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11213                         else
11214                                 TLS_LIBS="-lssl -lcrypto"
11215                         fi
11216                 fi
11217         fi
11218
11219 else
11220         echo "configure: warning: TLS data protection not supported!" 1>&2
11221 fi
11222
11223 if test $ol_link_tls = yes ; then
11224         cat >> confdefs.h <<\EOF
11225 #define HAVE_TLS 1
11226 EOF
11227
11228
11229 elif test $ol_with_tls = auto ; then
11230         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11231         echo "configure: warning: TLS data protection not supported!" 1>&2
11232
11233 elif test $ol_with_tls != no ; then
11234         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11235 fi
11236
11237 if test $ol_enable_lmpasswd != no; then
11238         if test $ol_link_tls != yes ; then
11239                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11240         fi
11241
11242         cat >> confdefs.h <<\EOF
11243 #define SLAPD_LMHASH 1
11244 EOF
11245
11246 fi
11247
11248 ol_link_threads=no
11249
11250 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11251         -o $ol_with_threads = nt ; then
11252
11253         
11254         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11255 echo "configure:11256: checking for _beginthread" >&5
11256 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11257   echo $ac_n "(cached) $ac_c" 1>&6
11258 else
11259   cat > conftest.$ac_ext <<EOF
11260 #line 11261 "configure"
11261 #include "confdefs.h"
11262 /* System header to define __stub macros and hopefully few prototypes,
11263     which can conflict with char _beginthread(); below.  */
11264 #include <assert.h>
11265 /* Override any gcc2 internal prototype to avoid an error.  */
11266 /* We use char because int might match the return type of a gcc2
11267     builtin and then its argument prototype would still apply.  */
11268 char _beginthread();
11269 char (*f)();
11270
11271 int main() {
11272
11273 /* The GNU C library defines this for functions which it implements
11274     to always fail with ENOSYS.  Some functions are actually named
11275     something starting with __ and the normal name is an alias.  */
11276 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11277 choke me
11278 #else
11279 f = _beginthread;
11280 #endif
11281
11282 ; return 0; }
11283 EOF
11284 if { (eval echo configure:11285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11285   rm -rf conftest*
11286   eval "ac_cv_func__beginthread=yes"
11287 else
11288   echo "configure: failed program was:" >&5
11289   cat conftest.$ac_ext >&5
11290   rm -rf conftest*
11291   eval "ac_cv_func__beginthread=no"
11292 fi
11293 rm -f conftest*
11294 fi
11295
11296 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11297   echo "$ac_t""yes" 1>&6
11298   :
11299 else
11300   echo "$ac_t""no" 1>&6
11301 fi
11302
11303
11304         if test $ac_cv_func__beginthread = yes ; then
11305                 cat >> confdefs.h <<\EOF
11306 #define HAVE_NT_THREADS 1
11307 EOF
11308
11309                 ol_cv_nt_threads=yes
11310         fi
11311
11312
11313         if test "$ol_cv_nt_threads" = yes ; then
11314                 ol_link_threads=nt
11315                 ol_with_threads=found
11316                 ol_with_yielding_select=yes
11317
11318                 cat >> confdefs.h <<\EOF
11319 #define HAVE_NT_SERVICE_MANAGER 1
11320 EOF
11321
11322                 cat >> confdefs.h <<\EOF
11323 #define HAVE_NT_EVENT_LOG 1
11324 EOF
11325
11326         fi
11327
11328         if test $ol_with_threads = nt ; then
11329                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11330         fi
11331 fi
11332
11333 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11334         -o $ol_with_threads = posix ; then
11335
11336         for ac_hdr in pthread.h
11337 do
11338 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11339 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11340 echo "configure:11341: checking for $ac_hdr" >&5
11341 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11342   echo $ac_n "(cached) $ac_c" 1>&6
11343 else
11344   cat > conftest.$ac_ext <<EOF
11345 #line 11346 "configure"
11346 #include "confdefs.h"
11347 #include <$ac_hdr>
11348 EOF
11349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11350 { (eval echo configure:11351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11352 if test -z "$ac_err"; then
11353   rm -rf conftest*
11354   eval "ac_cv_header_$ac_safe=yes"
11355 else
11356   echo "$ac_err" >&5
11357   echo "configure: failed program was:" >&5
11358   cat conftest.$ac_ext >&5
11359   rm -rf conftest*
11360   eval "ac_cv_header_$ac_safe=no"
11361 fi
11362 rm -f conftest*
11363 fi
11364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11365   echo "$ac_t""yes" 1>&6
11366     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11367   cat >> confdefs.h <<EOF
11368 #define $ac_tr_hdr 1
11369 EOF
11370  
11371 else
11372   echo "$ac_t""no" 1>&6
11373 fi
11374 done
11375
11376
11377         if test $ac_cv_header_pthread_h = yes ; then
11378                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11379 echo "configure:11380: checking POSIX thread version" >&5
11380 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11381   echo $ac_n "(cached) $ac_c" 1>&6
11382 else
11383   
11384         cat > conftest.$ac_ext <<EOF
11385 #line 11386 "configure"
11386 #include "confdefs.h"
11387
11388 #               include <pthread.h>
11389         
11390 int main() {
11391
11392                 int i = PTHREAD_CREATE_JOINABLE;
11393         
11394 ; return 0; }
11395 EOF
11396 if { (eval echo configure:11397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11397   rm -rf conftest*
11398   
11399         cat > conftest.$ac_ext <<EOF
11400 #line 11401 "configure"
11401 #include "confdefs.h"
11402 #include <pthread.h>
11403 EOF
11404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11405   egrep "pthread_detach" >/dev/null 2>&1; then
11406   rm -rf conftest*
11407   ol_cv_pthread_version=10
11408 else
11409   rm -rf conftest*
11410   ol_cv_pthread_version=8
11411 fi
11412 rm -f conftest*
11413
11414 else
11415   echo "configure: failed program was:" >&5
11416   cat conftest.$ac_ext >&5
11417   rm -rf conftest*
11418   
11419         cat > conftest.$ac_ext <<EOF
11420 #line 11421 "configure"
11421 #include "confdefs.h"
11422
11423 #               include <pthread.h>
11424 #               ifdef PTHREAD_CREATE_UNDETACHED
11425                 draft7
11426 #               endif
11427         
11428 EOF
11429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11430   egrep "draft7" >/dev/null 2>&1; then
11431   rm -rf conftest*
11432   ol_cv_pthread_version=7
11433 else
11434   rm -rf conftest*
11435   
11436         cat > conftest.$ac_ext <<EOF
11437 #line 11438 "configure"
11438 #include "confdefs.h"
11439 #include <pthread.h>
11440 EOF
11441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11442   egrep "pthread_attr_init" >/dev/null 2>&1; then
11443   rm -rf conftest*
11444   ol_cv_pthread_version=6
11445 else
11446   rm -rf conftest*
11447   
11448         cat > conftest.$ac_ext <<EOF
11449 #line 11450 "configure"
11450 #include "confdefs.h"
11451
11452 #               include <pthread.h>
11453 #ifdef          PTHREAD_MUTEX_INITIALIZER
11454                 draft5
11455 #endif
11456         
11457 EOF
11458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11459   egrep "draft5" >/dev/null 2>&1; then
11460   rm -rf conftest*
11461   ol_cv_pthread_version=5
11462 else
11463   rm -rf conftest*
11464   ol_cv_pthread_version=4
11465 fi
11466 rm -f conftest*
11467  
11468 fi
11469 rm -f conftest*
11470  
11471 fi
11472 rm -f conftest*
11473  
11474 fi
11475 rm -f conftest*
11476
11477 fi
11478
11479 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11480
11481
11482                 if test $ol_cv_pthread_version != 0 ; then
11483                         cat >> confdefs.h <<EOF
11484 #define HAVE_PTHREADS $ol_cv_pthread_version
11485 EOF
11486
11487                 else
11488                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11489                 fi
11490
11491                 # consider threads found
11492                 ol_with_threads=found
11493
11494                 
11495         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11496 echo "configure:11497: checking for LinuxThreads pthread.h" >&5
11497 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11498   echo $ac_n "(cached) $ac_c" 1>&6
11499 else
11500   cat > conftest.$ac_ext <<EOF
11501 #line 11502 "configure"
11502 #include "confdefs.h"
11503 #include <pthread.h>
11504 EOF
11505 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11506   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11507   rm -rf conftest*
11508   ol_cv_header_linux_threads=yes
11509 else
11510   rm -rf conftest*
11511   ol_cv_header_linux_threads=no
11512 fi
11513 rm -f conftest*
11514
11515                 
11516 fi
11517
11518 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11519         if test $ol_cv_header_linux_threads = yes; then
11520                 cat >> confdefs.h <<\EOF
11521 #define HAVE_LINUX_THREADS 1
11522 EOF
11523
11524         fi
11525
11526                 
11527         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11528 echo "configure:11529: checking for GNU Pth pthread.h" >&5
11529 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11530   echo $ac_n "(cached) $ac_c" 1>&6
11531 else
11532   cat > conftest.$ac_ext <<EOF
11533 #line 11534 "configure"
11534 #include "confdefs.h"
11535 #include <pthread.h>
11536 #ifdef _POSIX_THREAD_IS_GNU_PTH
11537         __gnu_pth__;
11538 #endif
11539
11540 EOF
11541 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11542   egrep "__gnu_pth__" >/dev/null 2>&1; then
11543   rm -rf conftest*
11544   ol_cv_header_gnu_pth_pthread_h=yes
11545 else
11546   rm -rf conftest*
11547   ol_cv_header_gnu_pth_pthread_h=no
11548 fi
11549 rm -f conftest*
11550
11551                 
11552 fi
11553
11554 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11555
11556
11557                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11558                         for ac_hdr in sched.h
11559 do
11560 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11561 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11562 echo "configure:11563: checking for $ac_hdr" >&5
11563 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11564   echo $ac_n "(cached) $ac_c" 1>&6
11565 else
11566   cat > conftest.$ac_ext <<EOF
11567 #line 11568 "configure"
11568 #include "confdefs.h"
11569 #include <$ac_hdr>
11570 EOF
11571 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11572 { (eval echo configure:11573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11573 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11574 if test -z "$ac_err"; then
11575   rm -rf conftest*
11576   eval "ac_cv_header_$ac_safe=yes"
11577 else
11578   echo "$ac_err" >&5
11579   echo "configure: failed program was:" >&5
11580   cat conftest.$ac_ext >&5
11581   rm -rf conftest*
11582   eval "ac_cv_header_$ac_safe=no"
11583 fi
11584 rm -f conftest*
11585 fi
11586 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11587   echo "$ac_t""yes" 1>&6
11588     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11589   cat >> confdefs.h <<EOF
11590 #define $ac_tr_hdr 1
11591 EOF
11592  
11593 else
11594   echo "$ac_t""no" 1>&6
11595 fi
11596 done
11597
11598                 fi
11599
11600                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11601                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11602 echo "configure:11603: checking for pthread_create in default libraries" >&5
11603 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11604   echo $ac_n "(cached) $ac_c" 1>&6
11605 else
11606   
11607                 if test "$cross_compiling" = yes; then
11608   cat > conftest.$ac_ext <<EOF
11609 #line 11610 "configure"
11610 #include "confdefs.h"
11611 /* pthread test headers */
11612 #include <pthread.h>
11613 #if HAVE_PTHREADS < 7
11614 #include <errno.h>
11615 #endif
11616 #ifndef NULL
11617 #define NULL (void*)0
11618 #endif
11619
11620 static void *task(p)
11621         void *p;
11622 {
11623         return (void *) (p == NULL);
11624 }
11625
11626 int main() {
11627
11628         /* pthread test function */
11629 #ifndef PTHREAD_CREATE_DETACHED
11630 #define PTHREAD_CREATE_DETACHED 1
11631 #endif
11632         pthread_t t;
11633         int status;
11634         int detach = PTHREAD_CREATE_DETACHED;
11635
11636 #if HAVE_PTHREADS > 4
11637         /* Final pthreads */
11638         pthread_attr_t attr;
11639
11640         status = pthread_attr_init(&attr);
11641         if( status ) return status;
11642
11643 #if HAVE_PTHREADS < 7
11644         status = pthread_attr_setdetachstate(&attr, &detach);
11645         if( status < 0 ) status = errno;
11646 #else
11647         status = pthread_attr_setdetachstate(&attr, detach);
11648 #endif
11649         if( status ) return status;
11650         status = pthread_create( &t, &attr, task, NULL );
11651 #if HAVE_PTHREADS < 7
11652         if( status < 0 ) status = errno;
11653 #endif
11654         if( status ) return status;
11655 #else
11656         /* Draft 4 pthreads */
11657         status = pthread_create( &t, pthread_attr_default, task, NULL );
11658         if( status ) return errno;
11659
11660         /* give thread a chance to complete */
11661         /* it should remain joinable and hence detachable */
11662         sleep( 1 );
11663
11664         status = pthread_detach( &t );
11665         if( status ) return errno;
11666 #endif
11667
11668 #ifdef HAVE_LINUX_THREADS
11669         pthread_kill_other_threads_np();
11670 #endif
11671
11672         return 0;
11673
11674 ; return 0; }
11675 EOF
11676 if { (eval echo configure:11677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11677   rm -rf conftest*
11678   ol_cv_pthread_create=yes
11679 else
11680   echo "configure: failed program was:" >&5
11681   cat conftest.$ac_ext >&5
11682   rm -rf conftest*
11683   ol_cv_pthread_create=no
11684 fi
11685 rm -f conftest*
11686 else
11687   cat > conftest.$ac_ext <<EOF
11688 #line 11689 "configure"
11689 #include "confdefs.h"
11690 /* pthread test headers */
11691 #include <pthread.h>
11692 #if HAVE_PTHREADS < 7
11693 #include <errno.h>
11694 #endif
11695 #ifndef NULL
11696 #define NULL (void*)0
11697 #endif
11698
11699 static void *task(p)
11700         void *p;
11701 {
11702         return (void *) (p == NULL);
11703 }
11704
11705
11706 int main(argc, argv)
11707         int argc;
11708         char **argv;
11709 {
11710
11711         /* pthread test function */
11712 #ifndef PTHREAD_CREATE_DETACHED
11713 #define PTHREAD_CREATE_DETACHED 1
11714 #endif
11715         pthread_t t;
11716         int status;
11717         int detach = PTHREAD_CREATE_DETACHED;
11718
11719 #if HAVE_PTHREADS > 4
11720         /* Final pthreads */
11721         pthread_attr_t attr;
11722
11723         status = pthread_attr_init(&attr);
11724         if( status ) return status;
11725
11726 #if HAVE_PTHREADS < 7
11727         status = pthread_attr_setdetachstate(&attr, &detach);
11728         if( status < 0 ) status = errno;
11729 #else
11730         status = pthread_attr_setdetachstate(&attr, detach);
11731 #endif
11732         if( status ) return status;
11733         status = pthread_create( &t, &attr, task, NULL );
11734 #if HAVE_PTHREADS < 7
11735         if( status < 0 ) status = errno;
11736 #endif
11737         if( status ) return status;
11738 #else
11739         /* Draft 4 pthreads */
11740         status = pthread_create( &t, pthread_attr_default, task, NULL );
11741         if( status ) return errno;
11742
11743         /* give thread a chance to complete */
11744         /* it should remain joinable and hence detachable */
11745         sleep( 1 );
11746
11747         status = pthread_detach( &t );
11748         if( status ) return errno;
11749 #endif
11750
11751 #ifdef HAVE_LINUX_THREADS
11752         pthread_kill_other_threads_np();
11753 #endif
11754
11755         return 0;
11756
11757 }
11758
11759 EOF
11760 if { (eval echo configure:11761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11761 then
11762   ol_cv_pthread_create=yes
11763 else
11764   echo "configure: failed program was:" >&5
11765   cat conftest.$ac_ext >&5
11766   rm -fr conftest*
11767   ol_cv_pthread_create=no
11768 fi
11769 rm -fr conftest*
11770 fi
11771
11772 fi
11773
11774 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11775
11776                 if test $ol_cv_pthread_create != no ; then
11777                         ol_link_threads=posix
11778                         ol_link_pthreads=""
11779                 fi
11780                 
11781                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11782 if test "$ol_link_threads" = no ; then
11783         # try -kthread
11784         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11785 echo "configure:11786: checking for pthread link with -kthread" >&5
11786 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11787   echo $ac_n "(cached) $ac_c" 1>&6
11788 else
11789   
11790                 # save the flags
11791                 ol_LIBS="$LIBS"
11792                 LIBS="-kthread $LIBS"
11793
11794                 if test "$cross_compiling" = yes; then
11795   cat > conftest.$ac_ext <<EOF
11796 #line 11797 "configure"
11797 #include "confdefs.h"
11798 /* pthread test headers */
11799 #include <pthread.h>
11800 #if HAVE_PTHREADS < 7
11801 #include <errno.h>
11802 #endif
11803 #ifndef NULL
11804 #define NULL (void*)0
11805 #endif
11806
11807 static void *task(p)
11808         void *p;
11809 {
11810         return (void *) (p == NULL);
11811 }
11812
11813 int main() {
11814
11815         /* pthread test function */
11816 #ifndef PTHREAD_CREATE_DETACHED
11817 #define PTHREAD_CREATE_DETACHED 1
11818 #endif
11819         pthread_t t;
11820         int status;
11821         int detach = PTHREAD_CREATE_DETACHED;
11822
11823 #if HAVE_PTHREADS > 4
11824         /* Final pthreads */
11825         pthread_attr_t attr;
11826
11827         status = pthread_attr_init(&attr);
11828         if( status ) return status;
11829
11830 #if HAVE_PTHREADS < 7
11831         status = pthread_attr_setdetachstate(&attr, &detach);
11832         if( status < 0 ) status = errno;
11833 #else
11834         status = pthread_attr_setdetachstate(&attr, detach);
11835 #endif
11836         if( status ) return status;
11837         status = pthread_create( &t, &attr, task, NULL );
11838 #if HAVE_PTHREADS < 7
11839         if( status < 0 ) status = errno;
11840 #endif
11841         if( status ) return status;
11842 #else
11843         /* Draft 4 pthreads */
11844         status = pthread_create( &t, pthread_attr_default, task, NULL );
11845         if( status ) return errno;
11846
11847         /* give thread a chance to complete */
11848         /* it should remain joinable and hence detachable */
11849         sleep( 1 );
11850
11851         status = pthread_detach( &t );
11852         if( status ) return errno;
11853 #endif
11854
11855 #ifdef HAVE_LINUX_THREADS
11856         pthread_kill_other_threads_np();
11857 #endif
11858
11859         return 0;
11860
11861 ; return 0; }
11862 EOF
11863 if { (eval echo configure:11864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11864   rm -rf conftest*
11865   ol_cv_pthread_kthread=yes
11866 else
11867   echo "configure: failed program was:" >&5
11868   cat conftest.$ac_ext >&5
11869   rm -rf conftest*
11870   ol_cv_pthread_kthread=no
11871 fi
11872 rm -f conftest*
11873 else
11874   cat > conftest.$ac_ext <<EOF
11875 #line 11876 "configure"
11876 #include "confdefs.h"
11877 /* pthread test headers */
11878 #include <pthread.h>
11879 #if HAVE_PTHREADS < 7
11880 #include <errno.h>
11881 #endif
11882 #ifndef NULL
11883 #define NULL (void*)0
11884 #endif
11885
11886 static void *task(p)
11887         void *p;
11888 {
11889         return (void *) (p == NULL);
11890 }
11891
11892
11893 int main(argc, argv)
11894         int argc;
11895         char **argv;
11896 {
11897
11898         /* pthread test function */
11899 #ifndef PTHREAD_CREATE_DETACHED
11900 #define PTHREAD_CREATE_DETACHED 1
11901 #endif
11902         pthread_t t;
11903         int status;
11904         int detach = PTHREAD_CREATE_DETACHED;
11905
11906 #if HAVE_PTHREADS > 4
11907         /* Final pthreads */
11908         pthread_attr_t attr;
11909
11910         status = pthread_attr_init(&attr);
11911         if( status ) return status;
11912
11913 #if HAVE_PTHREADS < 7
11914         status = pthread_attr_setdetachstate(&attr, &detach);
11915         if( status < 0 ) status = errno;
11916 #else
11917         status = pthread_attr_setdetachstate(&attr, detach);
11918 #endif
11919         if( status ) return status;
11920         status = pthread_create( &t, &attr, task, NULL );
11921 #if HAVE_PTHREADS < 7
11922         if( status < 0 ) status = errno;
11923 #endif
11924         if( status ) return status;
11925 #else
11926         /* Draft 4 pthreads */
11927         status = pthread_create( &t, pthread_attr_default, task, NULL );
11928         if( status ) return errno;
11929
11930         /* give thread a chance to complete */
11931         /* it should remain joinable and hence detachable */
11932         sleep( 1 );
11933
11934         status = pthread_detach( &t );
11935         if( status ) return errno;
11936 #endif
11937
11938 #ifdef HAVE_LINUX_THREADS
11939         pthread_kill_other_threads_np();
11940 #endif
11941
11942         return 0;
11943
11944 }
11945
11946 EOF
11947 if { (eval echo configure:11948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11948 then
11949   ol_cv_pthread_kthread=yes
11950 else
11951   echo "configure: failed program was:" >&5
11952   cat conftest.$ac_ext >&5
11953   rm -fr conftest*
11954   ol_cv_pthread_kthread=no
11955 fi
11956 rm -fr conftest*
11957 fi
11958
11959
11960                 # restore the LIBS
11961                 LIBS="$ol_LIBS"
11962         
11963 fi
11964
11965 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11966
11967         if test $ol_cv_pthread_kthread = yes ; then
11968                 ol_link_pthreads="-kthread"
11969                 ol_link_threads=posix
11970         fi
11971 fi
11972
11973                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11974 if test "$ol_link_threads" = no ; then
11975         # try -pthread
11976         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11977 echo "configure:11978: checking for pthread link with -pthread" >&5
11978 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11979   echo $ac_n "(cached) $ac_c" 1>&6
11980 else
11981   
11982                 # save the flags
11983                 ol_LIBS="$LIBS"
11984                 LIBS="-pthread $LIBS"
11985
11986                 if test "$cross_compiling" = yes; then
11987   cat > conftest.$ac_ext <<EOF
11988 #line 11989 "configure"
11989 #include "confdefs.h"
11990 /* pthread test headers */
11991 #include <pthread.h>
11992 #if HAVE_PTHREADS < 7
11993 #include <errno.h>
11994 #endif
11995 #ifndef NULL
11996 #define NULL (void*)0
11997 #endif
11998
11999 static void *task(p)
12000         void *p;
12001 {
12002         return (void *) (p == NULL);
12003 }
12004
12005 int main() {
12006
12007         /* pthread test function */
12008 #ifndef PTHREAD_CREATE_DETACHED
12009 #define PTHREAD_CREATE_DETACHED 1
12010 #endif
12011         pthread_t t;
12012         int status;
12013         int detach = PTHREAD_CREATE_DETACHED;
12014
12015 #if HAVE_PTHREADS > 4
12016         /* Final pthreads */
12017         pthread_attr_t attr;
12018
12019         status = pthread_attr_init(&attr);
12020         if( status ) return status;
12021
12022 #if HAVE_PTHREADS < 7
12023         status = pthread_attr_setdetachstate(&attr, &detach);
12024         if( status < 0 ) status = errno;
12025 #else
12026         status = pthread_attr_setdetachstate(&attr, detach);
12027 #endif
12028         if( status ) return status;
12029         status = pthread_create( &t, &attr, task, NULL );
12030 #if HAVE_PTHREADS < 7
12031         if( status < 0 ) status = errno;
12032 #endif
12033         if( status ) return status;
12034 #else
12035         /* Draft 4 pthreads */
12036         status = pthread_create( &t, pthread_attr_default, task, NULL );
12037         if( status ) return errno;
12038
12039         /* give thread a chance to complete */
12040         /* it should remain joinable and hence detachable */
12041         sleep( 1 );
12042
12043         status = pthread_detach( &t );
12044         if( status ) return errno;
12045 #endif
12046
12047 #ifdef HAVE_LINUX_THREADS
12048         pthread_kill_other_threads_np();
12049 #endif
12050
12051         return 0;
12052
12053 ; return 0; }
12054 EOF
12055 if { (eval echo configure:12056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12056   rm -rf conftest*
12057   ol_cv_pthread_pthread=yes
12058 else
12059   echo "configure: failed program was:" >&5
12060   cat conftest.$ac_ext >&5
12061   rm -rf conftest*
12062   ol_cv_pthread_pthread=no
12063 fi
12064 rm -f conftest*
12065 else
12066   cat > conftest.$ac_ext <<EOF
12067 #line 12068 "configure"
12068 #include "confdefs.h"
12069 /* pthread test headers */
12070 #include <pthread.h>
12071 #if HAVE_PTHREADS < 7
12072 #include <errno.h>
12073 #endif
12074 #ifndef NULL
12075 #define NULL (void*)0
12076 #endif
12077
12078 static void *task(p)
12079         void *p;
12080 {
12081         return (void *) (p == NULL);
12082 }
12083
12084
12085 int main(argc, argv)
12086         int argc;
12087         char **argv;
12088 {
12089
12090         /* pthread test function */
12091 #ifndef PTHREAD_CREATE_DETACHED
12092 #define PTHREAD_CREATE_DETACHED 1
12093 #endif
12094         pthread_t t;
12095         int status;
12096         int detach = PTHREAD_CREATE_DETACHED;
12097
12098 #if HAVE_PTHREADS > 4
12099         /* Final pthreads */
12100         pthread_attr_t attr;
12101
12102         status = pthread_attr_init(&attr);
12103         if( status ) return status;
12104
12105 #if HAVE_PTHREADS < 7
12106         status = pthread_attr_setdetachstate(&attr, &detach);
12107         if( status < 0 ) status = errno;
12108 #else
12109         status = pthread_attr_setdetachstate(&attr, detach);
12110 #endif
12111         if( status ) return status;
12112         status = pthread_create( &t, &attr, task, NULL );
12113 #if HAVE_PTHREADS < 7
12114         if( status < 0 ) status = errno;
12115 #endif
12116         if( status ) return status;
12117 #else
12118         /* Draft 4 pthreads */
12119         status = pthread_create( &t, pthread_attr_default, task, NULL );
12120         if( status ) return errno;
12121
12122         /* give thread a chance to complete */
12123         /* it should remain joinable and hence detachable */
12124         sleep( 1 );
12125
12126         status = pthread_detach( &t );
12127         if( status ) return errno;
12128 #endif
12129
12130 #ifdef HAVE_LINUX_THREADS
12131         pthread_kill_other_threads_np();
12132 #endif
12133
12134         return 0;
12135
12136 }
12137
12138 EOF
12139 if { (eval echo configure:12140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12140 then
12141   ol_cv_pthread_pthread=yes
12142 else
12143   echo "configure: failed program was:" >&5
12144   cat conftest.$ac_ext >&5
12145   rm -fr conftest*
12146   ol_cv_pthread_pthread=no
12147 fi
12148 rm -fr conftest*
12149 fi
12150
12151
12152                 # restore the LIBS
12153                 LIBS="$ol_LIBS"
12154         
12155 fi
12156
12157 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12158
12159         if test $ol_cv_pthread_pthread = yes ; then
12160                 ol_link_pthreads="-pthread"
12161                 ol_link_threads=posix
12162         fi
12163 fi
12164
12165                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12166 if test "$ol_link_threads" = no ; then
12167         # try -pthreads
12168         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12169 echo "configure:12170: checking for pthread link with -pthreads" >&5
12170 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12171   echo $ac_n "(cached) $ac_c" 1>&6
12172 else
12173   
12174                 # save the flags
12175                 ol_LIBS="$LIBS"
12176                 LIBS="-pthreads $LIBS"
12177
12178                 if test "$cross_compiling" = yes; then
12179   cat > conftest.$ac_ext <<EOF
12180 #line 12181 "configure"
12181 #include "confdefs.h"
12182 /* pthread test headers */
12183 #include <pthread.h>
12184 #if HAVE_PTHREADS < 7
12185 #include <errno.h>
12186 #endif
12187 #ifndef NULL
12188 #define NULL (void*)0
12189 #endif
12190
12191 static void *task(p)
12192         void *p;
12193 {
12194         return (void *) (p == NULL);
12195 }
12196
12197 int main() {
12198
12199         /* pthread test function */
12200 #ifndef PTHREAD_CREATE_DETACHED
12201 #define PTHREAD_CREATE_DETACHED 1
12202 #endif
12203         pthread_t t;
12204         int status;
12205         int detach = PTHREAD_CREATE_DETACHED;
12206
12207 #if HAVE_PTHREADS > 4
12208         /* Final pthreads */
12209         pthread_attr_t attr;
12210
12211         status = pthread_attr_init(&attr);
12212         if( status ) return status;
12213
12214 #if HAVE_PTHREADS < 7
12215         status = pthread_attr_setdetachstate(&attr, &detach);
12216         if( status < 0 ) status = errno;
12217 #else
12218         status = pthread_attr_setdetachstate(&attr, detach);
12219 #endif
12220         if( status ) return status;
12221         status = pthread_create( &t, &attr, task, NULL );
12222 #if HAVE_PTHREADS < 7
12223         if( status < 0 ) status = errno;
12224 #endif
12225         if( status ) return status;
12226 #else
12227         /* Draft 4 pthreads */
12228         status = pthread_create( &t, pthread_attr_default, task, NULL );
12229         if( status ) return errno;
12230
12231         /* give thread a chance to complete */
12232         /* it should remain joinable and hence detachable */
12233         sleep( 1 );
12234
12235         status = pthread_detach( &t );
12236         if( status ) return errno;
12237 #endif
12238
12239 #ifdef HAVE_LINUX_THREADS
12240         pthread_kill_other_threads_np();
12241 #endif
12242
12243         return 0;
12244
12245 ; return 0; }
12246 EOF
12247 if { (eval echo configure:12248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12248   rm -rf conftest*
12249   ol_cv_pthread_pthreads=yes
12250 else
12251   echo "configure: failed program was:" >&5
12252   cat conftest.$ac_ext >&5
12253   rm -rf conftest*
12254   ol_cv_pthread_pthreads=no
12255 fi
12256 rm -f conftest*
12257 else
12258   cat > conftest.$ac_ext <<EOF
12259 #line 12260 "configure"
12260 #include "confdefs.h"
12261 /* pthread test headers */
12262 #include <pthread.h>
12263 #if HAVE_PTHREADS < 7
12264 #include <errno.h>
12265 #endif
12266 #ifndef NULL
12267 #define NULL (void*)0
12268 #endif
12269
12270 static void *task(p)
12271         void *p;
12272 {
12273         return (void *) (p == NULL);
12274 }
12275
12276
12277 int main(argc, argv)
12278         int argc;
12279         char **argv;
12280 {
12281
12282         /* pthread test function */
12283 #ifndef PTHREAD_CREATE_DETACHED
12284 #define PTHREAD_CREATE_DETACHED 1
12285 #endif
12286         pthread_t t;
12287         int status;
12288         int detach = PTHREAD_CREATE_DETACHED;
12289
12290 #if HAVE_PTHREADS > 4
12291         /* Final pthreads */
12292         pthread_attr_t attr;
12293
12294         status = pthread_attr_init(&attr);
12295         if( status ) return status;
12296
12297 #if HAVE_PTHREADS < 7
12298         status = pthread_attr_setdetachstate(&attr, &detach);
12299         if( status < 0 ) status = errno;
12300 #else
12301         status = pthread_attr_setdetachstate(&attr, detach);
12302 #endif
12303         if( status ) return status;
12304         status = pthread_create( &t, &attr, task, NULL );
12305 #if HAVE_PTHREADS < 7
12306         if( status < 0 ) status = errno;
12307 #endif
12308         if( status ) return status;
12309 #else
12310         /* Draft 4 pthreads */
12311         status = pthread_create( &t, pthread_attr_default, task, NULL );
12312         if( status ) return errno;
12313
12314         /* give thread a chance to complete */
12315         /* it should remain joinable and hence detachable */
12316         sleep( 1 );
12317
12318         status = pthread_detach( &t );
12319         if( status ) return errno;
12320 #endif
12321
12322 #ifdef HAVE_LINUX_THREADS
12323         pthread_kill_other_threads_np();
12324 #endif
12325
12326         return 0;
12327
12328 }
12329
12330 EOF
12331 if { (eval echo configure:12332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12332 then
12333   ol_cv_pthread_pthreads=yes
12334 else
12335   echo "configure: failed program was:" >&5
12336   cat conftest.$ac_ext >&5
12337   rm -fr conftest*
12338   ol_cv_pthread_pthreads=no
12339 fi
12340 rm -fr conftest*
12341 fi
12342
12343
12344                 # restore the LIBS
12345                 LIBS="$ol_LIBS"
12346         
12347 fi
12348
12349 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12350
12351         if test $ol_cv_pthread_pthreads = yes ; then
12352                 ol_link_pthreads="-pthreads"
12353                 ol_link_threads=posix
12354         fi
12355 fi
12356
12357                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12358 if test "$ol_link_threads" = no ; then
12359         # try -mthreads
12360         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12361 echo "configure:12362: checking for pthread link with -mthreads" >&5
12362 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12363   echo $ac_n "(cached) $ac_c" 1>&6
12364 else
12365   
12366                 # save the flags
12367                 ol_LIBS="$LIBS"
12368                 LIBS="-mthreads $LIBS"
12369
12370                 if test "$cross_compiling" = yes; then
12371   cat > conftest.$ac_ext <<EOF
12372 #line 12373 "configure"
12373 #include "confdefs.h"
12374 /* pthread test headers */
12375 #include <pthread.h>
12376 #if HAVE_PTHREADS < 7
12377 #include <errno.h>
12378 #endif
12379 #ifndef NULL
12380 #define NULL (void*)0
12381 #endif
12382
12383 static void *task(p)
12384         void *p;
12385 {
12386         return (void *) (p == NULL);
12387 }
12388
12389 int main() {
12390
12391         /* pthread test function */
12392 #ifndef PTHREAD_CREATE_DETACHED
12393 #define PTHREAD_CREATE_DETACHED 1
12394 #endif
12395         pthread_t t;
12396         int status;
12397         int detach = PTHREAD_CREATE_DETACHED;
12398
12399 #if HAVE_PTHREADS > 4
12400         /* Final pthreads */
12401         pthread_attr_t attr;
12402
12403         status = pthread_attr_init(&attr);
12404         if( status ) return status;
12405
12406 #if HAVE_PTHREADS < 7
12407         status = pthread_attr_setdetachstate(&attr, &detach);
12408         if( status < 0 ) status = errno;
12409 #else
12410         status = pthread_attr_setdetachstate(&attr, detach);
12411 #endif
12412         if( status ) return status;
12413         status = pthread_create( &t, &attr, task, NULL );
12414 #if HAVE_PTHREADS < 7
12415         if( status < 0 ) status = errno;
12416 #endif
12417         if( status ) return status;
12418 #else
12419         /* Draft 4 pthreads */
12420         status = pthread_create( &t, pthread_attr_default, task, NULL );
12421         if( status ) return errno;
12422
12423         /* give thread a chance to complete */
12424         /* it should remain joinable and hence detachable */
12425         sleep( 1 );
12426
12427         status = pthread_detach( &t );
12428         if( status ) return errno;
12429 #endif
12430
12431 #ifdef HAVE_LINUX_THREADS
12432         pthread_kill_other_threads_np();
12433 #endif
12434
12435         return 0;
12436
12437 ; return 0; }
12438 EOF
12439 if { (eval echo configure:12440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12440   rm -rf conftest*
12441   ol_cv_pthread_mthreads=yes
12442 else
12443   echo "configure: failed program was:" >&5
12444   cat conftest.$ac_ext >&5
12445   rm -rf conftest*
12446   ol_cv_pthread_mthreads=no
12447 fi
12448 rm -f conftest*
12449 else
12450   cat > conftest.$ac_ext <<EOF
12451 #line 12452 "configure"
12452 #include "confdefs.h"
12453 /* pthread test headers */
12454 #include <pthread.h>
12455 #if HAVE_PTHREADS < 7
12456 #include <errno.h>
12457 #endif
12458 #ifndef NULL
12459 #define NULL (void*)0
12460 #endif
12461
12462 static void *task(p)
12463         void *p;
12464 {
12465         return (void *) (p == NULL);
12466 }
12467
12468
12469 int main(argc, argv)
12470         int argc;
12471         char **argv;
12472 {
12473
12474         /* pthread test function */
12475 #ifndef PTHREAD_CREATE_DETACHED
12476 #define PTHREAD_CREATE_DETACHED 1
12477 #endif
12478         pthread_t t;
12479         int status;
12480         int detach = PTHREAD_CREATE_DETACHED;
12481
12482 #if HAVE_PTHREADS > 4
12483         /* Final pthreads */
12484         pthread_attr_t attr;
12485
12486         status = pthread_attr_init(&attr);
12487         if( status ) return status;
12488
12489 #if HAVE_PTHREADS < 7
12490         status = pthread_attr_setdetachstate(&attr, &detach);
12491         if( status < 0 ) status = errno;
12492 #else
12493         status = pthread_attr_setdetachstate(&attr, detach);
12494 #endif
12495         if( status ) return status;
12496         status = pthread_create( &t, &attr, task, NULL );
12497 #if HAVE_PTHREADS < 7
12498         if( status < 0 ) status = errno;
12499 #endif
12500         if( status ) return status;
12501 #else
12502         /* Draft 4 pthreads */
12503         status = pthread_create( &t, pthread_attr_default, task, NULL );
12504         if( status ) return errno;
12505
12506         /* give thread a chance to complete */
12507         /* it should remain joinable and hence detachable */
12508         sleep( 1 );
12509
12510         status = pthread_detach( &t );
12511         if( status ) return errno;
12512 #endif
12513
12514 #ifdef HAVE_LINUX_THREADS
12515         pthread_kill_other_threads_np();
12516 #endif
12517
12518         return 0;
12519
12520 }
12521
12522 EOF
12523 if { (eval echo configure:12524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12524 then
12525   ol_cv_pthread_mthreads=yes
12526 else
12527   echo "configure: failed program was:" >&5
12528   cat conftest.$ac_ext >&5
12529   rm -fr conftest*
12530   ol_cv_pthread_mthreads=no
12531 fi
12532 rm -fr conftest*
12533 fi
12534
12535
12536                 # restore the LIBS
12537                 LIBS="$ol_LIBS"
12538         
12539 fi
12540
12541 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12542
12543         if test $ol_cv_pthread_mthreads = yes ; then
12544                 ol_link_pthreads="-mthreads"
12545                 ol_link_threads=posix
12546         fi
12547 fi
12548
12549                 # Pthread try link: -thread (ol_cv_pthread_thread)
12550 if test "$ol_link_threads" = no ; then
12551         # try -thread
12552         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12553 echo "configure:12554: checking for pthread link with -thread" >&5
12554 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12555   echo $ac_n "(cached) $ac_c" 1>&6
12556 else
12557   
12558                 # save the flags
12559                 ol_LIBS="$LIBS"
12560                 LIBS="-thread $LIBS"
12561
12562                 if test "$cross_compiling" = yes; then
12563   cat > conftest.$ac_ext <<EOF
12564 #line 12565 "configure"
12565 #include "confdefs.h"
12566 /* pthread test headers */
12567 #include <pthread.h>
12568 #if HAVE_PTHREADS < 7
12569 #include <errno.h>
12570 #endif
12571 #ifndef NULL
12572 #define NULL (void*)0
12573 #endif
12574
12575 static void *task(p)
12576         void *p;
12577 {
12578         return (void *) (p == NULL);
12579 }
12580
12581 int main() {
12582
12583         /* pthread test function */
12584 #ifndef PTHREAD_CREATE_DETACHED
12585 #define PTHREAD_CREATE_DETACHED 1
12586 #endif
12587         pthread_t t;
12588         int status;
12589         int detach = PTHREAD_CREATE_DETACHED;
12590
12591 #if HAVE_PTHREADS > 4
12592         /* Final pthreads */
12593         pthread_attr_t attr;
12594
12595         status = pthread_attr_init(&attr);
12596         if( status ) return status;
12597
12598 #if HAVE_PTHREADS < 7
12599         status = pthread_attr_setdetachstate(&attr, &detach);
12600         if( status < 0 ) status = errno;
12601 #else
12602         status = pthread_attr_setdetachstate(&attr, detach);
12603 #endif
12604         if( status ) return status;
12605         status = pthread_create( &t, &attr, task, NULL );
12606 #if HAVE_PTHREADS < 7
12607         if( status < 0 ) status = errno;
12608 #endif
12609         if( status ) return status;
12610 #else
12611         /* Draft 4 pthreads */
12612         status = pthread_create( &t, pthread_attr_default, task, NULL );
12613         if( status ) return errno;
12614
12615         /* give thread a chance to complete */
12616         /* it should remain joinable and hence detachable */
12617         sleep( 1 );
12618
12619         status = pthread_detach( &t );
12620         if( status ) return errno;
12621 #endif
12622
12623 #ifdef HAVE_LINUX_THREADS
12624         pthread_kill_other_threads_np();
12625 #endif
12626
12627         return 0;
12628
12629 ; return 0; }
12630 EOF
12631 if { (eval echo configure:12632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12632   rm -rf conftest*
12633   ol_cv_pthread_thread=yes
12634 else
12635   echo "configure: failed program was:" >&5
12636   cat conftest.$ac_ext >&5
12637   rm -rf conftest*
12638   ol_cv_pthread_thread=no
12639 fi
12640 rm -f conftest*
12641 else
12642   cat > conftest.$ac_ext <<EOF
12643 #line 12644 "configure"
12644 #include "confdefs.h"
12645 /* pthread test headers */
12646 #include <pthread.h>
12647 #if HAVE_PTHREADS < 7
12648 #include <errno.h>
12649 #endif
12650 #ifndef NULL
12651 #define NULL (void*)0
12652 #endif
12653
12654 static void *task(p)
12655         void *p;
12656 {
12657         return (void *) (p == NULL);
12658 }
12659
12660
12661 int main(argc, argv)
12662         int argc;
12663         char **argv;
12664 {
12665
12666         /* pthread test function */
12667 #ifndef PTHREAD_CREATE_DETACHED
12668 #define PTHREAD_CREATE_DETACHED 1
12669 #endif
12670         pthread_t t;
12671         int status;
12672         int detach = PTHREAD_CREATE_DETACHED;
12673
12674 #if HAVE_PTHREADS > 4
12675         /* Final pthreads */
12676         pthread_attr_t attr;
12677
12678         status = pthread_attr_init(&attr);
12679         if( status ) return status;
12680
12681 #if HAVE_PTHREADS < 7
12682         status = pthread_attr_setdetachstate(&attr, &detach);
12683         if( status < 0 ) status = errno;
12684 #else
12685         status = pthread_attr_setdetachstate(&attr, detach);
12686 #endif
12687         if( status ) return status;
12688         status = pthread_create( &t, &attr, task, NULL );
12689 #if HAVE_PTHREADS < 7
12690         if( status < 0 ) status = errno;
12691 #endif
12692         if( status ) return status;
12693 #else
12694         /* Draft 4 pthreads */
12695         status = pthread_create( &t, pthread_attr_default, task, NULL );
12696         if( status ) return errno;
12697
12698         /* give thread a chance to complete */
12699         /* it should remain joinable and hence detachable */
12700         sleep( 1 );
12701
12702         status = pthread_detach( &t );
12703         if( status ) return errno;
12704 #endif
12705
12706 #ifdef HAVE_LINUX_THREADS
12707         pthread_kill_other_threads_np();
12708 #endif
12709
12710         return 0;
12711
12712 }
12713
12714 EOF
12715 if { (eval echo configure:12716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12716 then
12717   ol_cv_pthread_thread=yes
12718 else
12719   echo "configure: failed program was:" >&5
12720   cat conftest.$ac_ext >&5
12721   rm -fr conftest*
12722   ol_cv_pthread_thread=no
12723 fi
12724 rm -fr conftest*
12725 fi
12726
12727
12728                 # restore the LIBS
12729                 LIBS="$ol_LIBS"
12730         
12731 fi
12732
12733 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12734
12735         if test $ol_cv_pthread_thread = yes ; then
12736                 ol_link_pthreads="-thread"
12737                 ol_link_threads=posix
12738         fi
12739 fi
12740
12741
12742                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12743 if test "$ol_link_threads" = no ; then
12744         # try -lpthread -lmach -lexc -lc_r
12745         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12746 echo "configure:12747: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12747 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12748   echo $ac_n "(cached) $ac_c" 1>&6
12749 else
12750   
12751                 # save the flags
12752                 ol_LIBS="$LIBS"
12753                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12754
12755                 if test "$cross_compiling" = yes; then
12756   cat > conftest.$ac_ext <<EOF
12757 #line 12758 "configure"
12758 #include "confdefs.h"
12759 /* pthread test headers */
12760 #include <pthread.h>
12761 #if HAVE_PTHREADS < 7
12762 #include <errno.h>
12763 #endif
12764 #ifndef NULL
12765 #define NULL (void*)0
12766 #endif
12767
12768 static void *task(p)
12769         void *p;
12770 {
12771         return (void *) (p == NULL);
12772 }
12773
12774 int main() {
12775
12776         /* pthread test function */
12777 #ifndef PTHREAD_CREATE_DETACHED
12778 #define PTHREAD_CREATE_DETACHED 1
12779 #endif
12780         pthread_t t;
12781         int status;
12782         int detach = PTHREAD_CREATE_DETACHED;
12783
12784 #if HAVE_PTHREADS > 4
12785         /* Final pthreads */
12786         pthread_attr_t attr;
12787
12788         status = pthread_attr_init(&attr);
12789         if( status ) return status;
12790
12791 #if HAVE_PTHREADS < 7
12792         status = pthread_attr_setdetachstate(&attr, &detach);
12793         if( status < 0 ) status = errno;
12794 #else
12795         status = pthread_attr_setdetachstate(&attr, detach);
12796 #endif
12797         if( status ) return status;
12798         status = pthread_create( &t, &attr, task, NULL );
12799 #if HAVE_PTHREADS < 7
12800         if( status < 0 ) status = errno;
12801 #endif
12802         if( status ) return status;
12803 #else
12804         /* Draft 4 pthreads */
12805         status = pthread_create( &t, pthread_attr_default, task, NULL );
12806         if( status ) return errno;
12807
12808         /* give thread a chance to complete */
12809         /* it should remain joinable and hence detachable */
12810         sleep( 1 );
12811
12812         status = pthread_detach( &t );
12813         if( status ) return errno;
12814 #endif
12815
12816 #ifdef HAVE_LINUX_THREADS
12817         pthread_kill_other_threads_np();
12818 #endif
12819
12820         return 0;
12821
12822 ; return 0; }
12823 EOF
12824 if { (eval echo configure:12825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12825   rm -rf conftest*
12826   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12827 else
12828   echo "configure: failed program was:" >&5
12829   cat conftest.$ac_ext >&5
12830   rm -rf conftest*
12831   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12832 fi
12833 rm -f conftest*
12834 else
12835   cat > conftest.$ac_ext <<EOF
12836 #line 12837 "configure"
12837 #include "confdefs.h"
12838 /* pthread test headers */
12839 #include <pthread.h>
12840 #if HAVE_PTHREADS < 7
12841 #include <errno.h>
12842 #endif
12843 #ifndef NULL
12844 #define NULL (void*)0
12845 #endif
12846
12847 static void *task(p)
12848         void *p;
12849 {
12850         return (void *) (p == NULL);
12851 }
12852
12853
12854 int main(argc, argv)
12855         int argc;
12856         char **argv;
12857 {
12858
12859         /* pthread test function */
12860 #ifndef PTHREAD_CREATE_DETACHED
12861 #define PTHREAD_CREATE_DETACHED 1
12862 #endif
12863         pthread_t t;
12864         int status;
12865         int detach = PTHREAD_CREATE_DETACHED;
12866
12867 #if HAVE_PTHREADS > 4
12868         /* Final pthreads */
12869         pthread_attr_t attr;
12870
12871         status = pthread_attr_init(&attr);
12872         if( status ) return status;
12873
12874 #if HAVE_PTHREADS < 7
12875         status = pthread_attr_setdetachstate(&attr, &detach);
12876         if( status < 0 ) status = errno;
12877 #else
12878         status = pthread_attr_setdetachstate(&attr, detach);
12879 #endif
12880         if( status ) return status;
12881         status = pthread_create( &t, &attr, task, NULL );
12882 #if HAVE_PTHREADS < 7
12883         if( status < 0 ) status = errno;
12884 #endif
12885         if( status ) return status;
12886 #else
12887         /* Draft 4 pthreads */
12888         status = pthread_create( &t, pthread_attr_default, task, NULL );
12889         if( status ) return errno;
12890
12891         /* give thread a chance to complete */
12892         /* it should remain joinable and hence detachable */
12893         sleep( 1 );
12894
12895         status = pthread_detach( &t );
12896         if( status ) return errno;
12897 #endif
12898
12899 #ifdef HAVE_LINUX_THREADS
12900         pthread_kill_other_threads_np();
12901 #endif
12902
12903         return 0;
12904
12905 }
12906
12907 EOF
12908 if { (eval echo configure:12909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12909 then
12910   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12911 else
12912   echo "configure: failed program was:" >&5
12913   cat conftest.$ac_ext >&5
12914   rm -fr conftest*
12915   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12916 fi
12917 rm -fr conftest*
12918 fi
12919
12920
12921                 # restore the LIBS
12922                 LIBS="$ol_LIBS"
12923         
12924 fi
12925
12926 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12927
12928         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12929                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12930                 ol_link_threads=posix
12931         fi
12932 fi
12933
12934                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12935 if test "$ol_link_threads" = no ; then
12936         # try -lpthread -lmach -lexc
12937         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12938 echo "configure:12939: checking for pthread link with -lpthread -lmach -lexc" >&5
12939 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12940   echo $ac_n "(cached) $ac_c" 1>&6
12941 else
12942   
12943                 # save the flags
12944                 ol_LIBS="$LIBS"
12945                 LIBS="-lpthread -lmach -lexc $LIBS"
12946
12947                 if test "$cross_compiling" = yes; then
12948   cat > conftest.$ac_ext <<EOF
12949 #line 12950 "configure"
12950 #include "confdefs.h"
12951 /* pthread test headers */
12952 #include <pthread.h>
12953 #if HAVE_PTHREADS < 7
12954 #include <errno.h>
12955 #endif
12956 #ifndef NULL
12957 #define NULL (void*)0
12958 #endif
12959
12960 static void *task(p)
12961         void *p;
12962 {
12963         return (void *) (p == NULL);
12964 }
12965
12966 int main() {
12967
12968         /* pthread test function */
12969 #ifndef PTHREAD_CREATE_DETACHED
12970 #define PTHREAD_CREATE_DETACHED 1
12971 #endif
12972         pthread_t t;
12973         int status;
12974         int detach = PTHREAD_CREATE_DETACHED;
12975
12976 #if HAVE_PTHREADS > 4
12977         /* Final pthreads */
12978         pthread_attr_t attr;
12979
12980         status = pthread_attr_init(&attr);
12981         if( status ) return status;
12982
12983 #if HAVE_PTHREADS < 7
12984         status = pthread_attr_setdetachstate(&attr, &detach);
12985         if( status < 0 ) status = errno;
12986 #else
12987         status = pthread_attr_setdetachstate(&attr, detach);
12988 #endif
12989         if( status ) return status;
12990         status = pthread_create( &t, &attr, task, NULL );
12991 #if HAVE_PTHREADS < 7
12992         if( status < 0 ) status = errno;
12993 #endif
12994         if( status ) return status;
12995 #else
12996         /* Draft 4 pthreads */
12997         status = pthread_create( &t, pthread_attr_default, task, NULL );
12998         if( status ) return errno;
12999
13000         /* give thread a chance to complete */
13001         /* it should remain joinable and hence detachable */
13002         sleep( 1 );
13003
13004         status = pthread_detach( &t );
13005         if( status ) return errno;
13006 #endif
13007
13008 #ifdef HAVE_LINUX_THREADS
13009         pthread_kill_other_threads_np();
13010 #endif
13011
13012         return 0;
13013
13014 ; return 0; }
13015 EOF
13016 if { (eval echo configure:13017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13017   rm -rf conftest*
13018   ol_cv_pthread_lpthread_lmach_lexc=yes
13019 else
13020   echo "configure: failed program was:" >&5
13021   cat conftest.$ac_ext >&5
13022   rm -rf conftest*
13023   ol_cv_pthread_lpthread_lmach_lexc=no
13024 fi
13025 rm -f conftest*
13026 else
13027   cat > conftest.$ac_ext <<EOF
13028 #line 13029 "configure"
13029 #include "confdefs.h"
13030 /* pthread test headers */
13031 #include <pthread.h>
13032 #if HAVE_PTHREADS < 7
13033 #include <errno.h>
13034 #endif
13035 #ifndef NULL
13036 #define NULL (void*)0
13037 #endif
13038
13039 static void *task(p)
13040         void *p;
13041 {
13042         return (void *) (p == NULL);
13043 }
13044
13045
13046 int main(argc, argv)
13047         int argc;
13048         char **argv;
13049 {
13050
13051         /* pthread test function */
13052 #ifndef PTHREAD_CREATE_DETACHED
13053 #define PTHREAD_CREATE_DETACHED 1
13054 #endif
13055         pthread_t t;
13056         int status;
13057         int detach = PTHREAD_CREATE_DETACHED;
13058
13059 #if HAVE_PTHREADS > 4
13060         /* Final pthreads */
13061         pthread_attr_t attr;
13062
13063         status = pthread_attr_init(&attr);
13064         if( status ) return status;
13065
13066 #if HAVE_PTHREADS < 7
13067         status = pthread_attr_setdetachstate(&attr, &detach);
13068         if( status < 0 ) status = errno;
13069 #else
13070         status = pthread_attr_setdetachstate(&attr, detach);
13071 #endif
13072         if( status ) return status;
13073         status = pthread_create( &t, &attr, task, NULL );
13074 #if HAVE_PTHREADS < 7
13075         if( status < 0 ) status = errno;
13076 #endif
13077         if( status ) return status;
13078 #else
13079         /* Draft 4 pthreads */
13080         status = pthread_create( &t, pthread_attr_default, task, NULL );
13081         if( status ) return errno;
13082
13083         /* give thread a chance to complete */
13084         /* it should remain joinable and hence detachable */
13085         sleep( 1 );
13086
13087         status = pthread_detach( &t );
13088         if( status ) return errno;
13089 #endif
13090
13091 #ifdef HAVE_LINUX_THREADS
13092         pthread_kill_other_threads_np();
13093 #endif
13094
13095         return 0;
13096
13097 }
13098
13099 EOF
13100 if { (eval echo configure:13101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13101 then
13102   ol_cv_pthread_lpthread_lmach_lexc=yes
13103 else
13104   echo "configure: failed program was:" >&5
13105   cat conftest.$ac_ext >&5
13106   rm -fr conftest*
13107   ol_cv_pthread_lpthread_lmach_lexc=no
13108 fi
13109 rm -fr conftest*
13110 fi
13111
13112
13113                 # restore the LIBS
13114                 LIBS="$ol_LIBS"
13115         
13116 fi
13117
13118 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13119
13120         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13121                 ol_link_pthreads="-lpthread -lmach -lexc"
13122                 ol_link_threads=posix
13123         fi
13124 fi
13125
13126
13127                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13128 if test "$ol_link_threads" = no ; then
13129         # try -lpthread -Wl,-woff,85
13130         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13131 echo "configure:13132: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13132 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13133   echo $ac_n "(cached) $ac_c" 1>&6
13134 else
13135   
13136                 # save the flags
13137                 ol_LIBS="$LIBS"
13138                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13139
13140                 if test "$cross_compiling" = yes; then
13141   cat > conftest.$ac_ext <<EOF
13142 #line 13143 "configure"
13143 #include "confdefs.h"
13144 /* pthread test headers */
13145 #include <pthread.h>
13146 #if HAVE_PTHREADS < 7
13147 #include <errno.h>
13148 #endif
13149 #ifndef NULL
13150 #define NULL (void*)0
13151 #endif
13152
13153 static void *task(p)
13154         void *p;
13155 {
13156         return (void *) (p == NULL);
13157 }
13158
13159 int main() {
13160
13161         /* pthread test function */
13162 #ifndef PTHREAD_CREATE_DETACHED
13163 #define PTHREAD_CREATE_DETACHED 1
13164 #endif
13165         pthread_t t;
13166         int status;
13167         int detach = PTHREAD_CREATE_DETACHED;
13168
13169 #if HAVE_PTHREADS > 4
13170         /* Final pthreads */
13171         pthread_attr_t attr;
13172
13173         status = pthread_attr_init(&attr);
13174         if( status ) return status;
13175
13176 #if HAVE_PTHREADS < 7
13177         status = pthread_attr_setdetachstate(&attr, &detach);
13178         if( status < 0 ) status = errno;
13179 #else
13180         status = pthread_attr_setdetachstate(&attr, detach);
13181 #endif
13182         if( status ) return status;
13183         status = pthread_create( &t, &attr, task, NULL );
13184 #if HAVE_PTHREADS < 7
13185         if( status < 0 ) status = errno;
13186 #endif
13187         if( status ) return status;
13188 #else
13189         /* Draft 4 pthreads */
13190         status = pthread_create( &t, pthread_attr_default, task, NULL );
13191         if( status ) return errno;
13192
13193         /* give thread a chance to complete */
13194         /* it should remain joinable and hence detachable */
13195         sleep( 1 );
13196
13197         status = pthread_detach( &t );
13198         if( status ) return errno;
13199 #endif
13200
13201 #ifdef HAVE_LINUX_THREADS
13202         pthread_kill_other_threads_np();
13203 #endif
13204
13205         return 0;
13206
13207 ; return 0; }
13208 EOF
13209 if { (eval echo configure:13210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13210   rm -rf conftest*
13211   ol_cv_pthread_lib_lpthread_woff=yes
13212 else
13213   echo "configure: failed program was:" >&5
13214   cat conftest.$ac_ext >&5
13215   rm -rf conftest*
13216   ol_cv_pthread_lib_lpthread_woff=no
13217 fi
13218 rm -f conftest*
13219 else
13220   cat > conftest.$ac_ext <<EOF
13221 #line 13222 "configure"
13222 #include "confdefs.h"
13223 /* pthread test headers */
13224 #include <pthread.h>
13225 #if HAVE_PTHREADS < 7
13226 #include <errno.h>
13227 #endif
13228 #ifndef NULL
13229 #define NULL (void*)0
13230 #endif
13231
13232 static void *task(p)
13233         void *p;
13234 {
13235         return (void *) (p == NULL);
13236 }
13237
13238
13239 int main(argc, argv)
13240         int argc;
13241         char **argv;
13242 {
13243
13244         /* pthread test function */
13245 #ifndef PTHREAD_CREATE_DETACHED
13246 #define PTHREAD_CREATE_DETACHED 1
13247 #endif
13248         pthread_t t;
13249         int status;
13250         int detach = PTHREAD_CREATE_DETACHED;
13251
13252 #if HAVE_PTHREADS > 4
13253         /* Final pthreads */
13254         pthread_attr_t attr;
13255
13256         status = pthread_attr_init(&attr);
13257         if( status ) return status;
13258
13259 #if HAVE_PTHREADS < 7
13260         status = pthread_attr_setdetachstate(&attr, &detach);
13261         if( status < 0 ) status = errno;
13262 #else
13263         status = pthread_attr_setdetachstate(&attr, detach);
13264 #endif
13265         if( status ) return status;
13266         status = pthread_create( &t, &attr, task, NULL );
13267 #if HAVE_PTHREADS < 7
13268         if( status < 0 ) status = errno;
13269 #endif
13270         if( status ) return status;
13271 #else
13272         /* Draft 4 pthreads */
13273         status = pthread_create( &t, pthread_attr_default, task, NULL );
13274         if( status ) return errno;
13275
13276         /* give thread a chance to complete */
13277         /* it should remain joinable and hence detachable */
13278         sleep( 1 );
13279
13280         status = pthread_detach( &t );
13281         if( status ) return errno;
13282 #endif
13283
13284 #ifdef HAVE_LINUX_THREADS
13285         pthread_kill_other_threads_np();
13286 #endif
13287
13288         return 0;
13289
13290 }
13291
13292 EOF
13293 if { (eval echo configure:13294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13294 then
13295   ol_cv_pthread_lib_lpthread_woff=yes
13296 else
13297   echo "configure: failed program was:" >&5
13298   cat conftest.$ac_ext >&5
13299   rm -fr conftest*
13300   ol_cv_pthread_lib_lpthread_woff=no
13301 fi
13302 rm -fr conftest*
13303 fi
13304
13305
13306                 # restore the LIBS
13307                 LIBS="$ol_LIBS"
13308         
13309 fi
13310
13311 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13312
13313         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13314                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13315                 ol_link_threads=posix
13316         fi
13317 fi
13318
13319
13320                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13321 if test "$ol_link_threads" = no ; then
13322         # try -lpthread
13323         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13324 echo "configure:13325: checking for pthread link with -lpthread" >&5
13325 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13326   echo $ac_n "(cached) $ac_c" 1>&6
13327 else
13328   
13329                 # save the flags
13330                 ol_LIBS="$LIBS"
13331                 LIBS="-lpthread $LIBS"
13332
13333                 if test "$cross_compiling" = yes; then
13334   cat > conftest.$ac_ext <<EOF
13335 #line 13336 "configure"
13336 #include "confdefs.h"
13337 /* pthread test headers */
13338 #include <pthread.h>
13339 #if HAVE_PTHREADS < 7
13340 #include <errno.h>
13341 #endif
13342 #ifndef NULL
13343 #define NULL (void*)0
13344 #endif
13345
13346 static void *task(p)
13347         void *p;
13348 {
13349         return (void *) (p == NULL);
13350 }
13351
13352 int main() {
13353
13354         /* pthread test function */
13355 #ifndef PTHREAD_CREATE_DETACHED
13356 #define PTHREAD_CREATE_DETACHED 1
13357 #endif
13358         pthread_t t;
13359         int status;
13360         int detach = PTHREAD_CREATE_DETACHED;
13361
13362 #if HAVE_PTHREADS > 4
13363         /* Final pthreads */
13364         pthread_attr_t attr;
13365
13366         status = pthread_attr_init(&attr);
13367         if( status ) return status;
13368
13369 #if HAVE_PTHREADS < 7
13370         status = pthread_attr_setdetachstate(&attr, &detach);
13371         if( status < 0 ) status = errno;
13372 #else
13373         status = pthread_attr_setdetachstate(&attr, detach);
13374 #endif
13375         if( status ) return status;
13376         status = pthread_create( &t, &attr, task, NULL );
13377 #if HAVE_PTHREADS < 7
13378         if( status < 0 ) status = errno;
13379 #endif
13380         if( status ) return status;
13381 #else
13382         /* Draft 4 pthreads */
13383         status = pthread_create( &t, pthread_attr_default, task, NULL );
13384         if( status ) return errno;
13385
13386         /* give thread a chance to complete */
13387         /* it should remain joinable and hence detachable */
13388         sleep( 1 );
13389
13390         status = pthread_detach( &t );
13391         if( status ) return errno;
13392 #endif
13393
13394 #ifdef HAVE_LINUX_THREADS
13395         pthread_kill_other_threads_np();
13396 #endif
13397
13398         return 0;
13399
13400 ; return 0; }
13401 EOF
13402 if { (eval echo configure:13403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13403   rm -rf conftest*
13404   ol_cv_pthread_lpthread=yes
13405 else
13406   echo "configure: failed program was:" >&5
13407   cat conftest.$ac_ext >&5
13408   rm -rf conftest*
13409   ol_cv_pthread_lpthread=no
13410 fi
13411 rm -f conftest*
13412 else
13413   cat > conftest.$ac_ext <<EOF
13414 #line 13415 "configure"
13415 #include "confdefs.h"
13416 /* pthread test headers */
13417 #include <pthread.h>
13418 #if HAVE_PTHREADS < 7
13419 #include <errno.h>
13420 #endif
13421 #ifndef NULL
13422 #define NULL (void*)0
13423 #endif
13424
13425 static void *task(p)
13426         void *p;
13427 {
13428         return (void *) (p == NULL);
13429 }
13430
13431
13432 int main(argc, argv)
13433         int argc;
13434         char **argv;
13435 {
13436
13437         /* pthread test function */
13438 #ifndef PTHREAD_CREATE_DETACHED
13439 #define PTHREAD_CREATE_DETACHED 1
13440 #endif
13441         pthread_t t;
13442         int status;
13443         int detach = PTHREAD_CREATE_DETACHED;
13444
13445 #if HAVE_PTHREADS > 4
13446         /* Final pthreads */
13447         pthread_attr_t attr;
13448
13449         status = pthread_attr_init(&attr);
13450         if( status ) return status;
13451
13452 #if HAVE_PTHREADS < 7
13453         status = pthread_attr_setdetachstate(&attr, &detach);
13454         if( status < 0 ) status = errno;
13455 #else
13456         status = pthread_attr_setdetachstate(&attr, detach);
13457 #endif
13458         if( status ) return status;
13459         status = pthread_create( &t, &attr, task, NULL );
13460 #if HAVE_PTHREADS < 7
13461         if( status < 0 ) status = errno;
13462 #endif
13463         if( status ) return status;
13464 #else
13465         /* Draft 4 pthreads */
13466         status = pthread_create( &t, pthread_attr_default, task, NULL );
13467         if( status ) return errno;
13468
13469         /* give thread a chance to complete */
13470         /* it should remain joinable and hence detachable */
13471         sleep( 1 );
13472
13473         status = pthread_detach( &t );
13474         if( status ) return errno;
13475 #endif
13476
13477 #ifdef HAVE_LINUX_THREADS
13478         pthread_kill_other_threads_np();
13479 #endif
13480
13481         return 0;
13482
13483 }
13484
13485 EOF
13486 if { (eval echo configure:13487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13487 then
13488   ol_cv_pthread_lpthread=yes
13489 else
13490   echo "configure: failed program was:" >&5
13491   cat conftest.$ac_ext >&5
13492   rm -fr conftest*
13493   ol_cv_pthread_lpthread=no
13494 fi
13495 rm -fr conftest*
13496 fi
13497
13498
13499                 # restore the LIBS
13500                 LIBS="$ol_LIBS"
13501         
13502 fi
13503
13504 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13505
13506         if test $ol_cv_pthread_lpthread = yes ; then
13507                 ol_link_pthreads="-lpthread"
13508                 ol_link_threads=posix
13509         fi
13510 fi
13511
13512                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13513 if test "$ol_link_threads" = no ; then
13514         # try -lc_r
13515         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13516 echo "configure:13517: checking for pthread link with -lc_r" >&5
13517 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13518   echo $ac_n "(cached) $ac_c" 1>&6
13519 else
13520   
13521                 # save the flags
13522                 ol_LIBS="$LIBS"
13523                 LIBS="-lc_r $LIBS"
13524
13525                 if test "$cross_compiling" = yes; then
13526   cat > conftest.$ac_ext <<EOF
13527 #line 13528 "configure"
13528 #include "confdefs.h"
13529 /* pthread test headers */
13530 #include <pthread.h>
13531 #if HAVE_PTHREADS < 7
13532 #include <errno.h>
13533 #endif
13534 #ifndef NULL
13535 #define NULL (void*)0
13536 #endif
13537
13538 static void *task(p)
13539         void *p;
13540 {
13541         return (void *) (p == NULL);
13542 }
13543
13544 int main() {
13545
13546         /* pthread test function */
13547 #ifndef PTHREAD_CREATE_DETACHED
13548 #define PTHREAD_CREATE_DETACHED 1
13549 #endif
13550         pthread_t t;
13551         int status;
13552         int detach = PTHREAD_CREATE_DETACHED;
13553
13554 #if HAVE_PTHREADS > 4
13555         /* Final pthreads */
13556         pthread_attr_t attr;
13557
13558         status = pthread_attr_init(&attr);
13559         if( status ) return status;
13560
13561 #if HAVE_PTHREADS < 7
13562         status = pthread_attr_setdetachstate(&attr, &detach);
13563         if( status < 0 ) status = errno;
13564 #else
13565         status = pthread_attr_setdetachstate(&attr, detach);
13566 #endif
13567         if( status ) return status;
13568         status = pthread_create( &t, &attr, task, NULL );
13569 #if HAVE_PTHREADS < 7
13570         if( status < 0 ) status = errno;
13571 #endif
13572         if( status ) return status;
13573 #else
13574         /* Draft 4 pthreads */
13575         status = pthread_create( &t, pthread_attr_default, task, NULL );
13576         if( status ) return errno;
13577
13578         /* give thread a chance to complete */
13579         /* it should remain joinable and hence detachable */
13580         sleep( 1 );
13581
13582         status = pthread_detach( &t );
13583         if( status ) return errno;
13584 #endif
13585
13586 #ifdef HAVE_LINUX_THREADS
13587         pthread_kill_other_threads_np();
13588 #endif
13589
13590         return 0;
13591
13592 ; return 0; }
13593 EOF
13594 if { (eval echo configure:13595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13595   rm -rf conftest*
13596   ol_cv_pthread_lc_r=yes
13597 else
13598   echo "configure: failed program was:" >&5
13599   cat conftest.$ac_ext >&5
13600   rm -rf conftest*
13601   ol_cv_pthread_lc_r=no
13602 fi
13603 rm -f conftest*
13604 else
13605   cat > conftest.$ac_ext <<EOF
13606 #line 13607 "configure"
13607 #include "confdefs.h"
13608 /* pthread test headers */
13609 #include <pthread.h>
13610 #if HAVE_PTHREADS < 7
13611 #include <errno.h>
13612 #endif
13613 #ifndef NULL
13614 #define NULL (void*)0
13615 #endif
13616
13617 static void *task(p)
13618         void *p;
13619 {
13620         return (void *) (p == NULL);
13621 }
13622
13623
13624 int main(argc, argv)
13625         int argc;
13626         char **argv;
13627 {
13628
13629         /* pthread test function */
13630 #ifndef PTHREAD_CREATE_DETACHED
13631 #define PTHREAD_CREATE_DETACHED 1
13632 #endif
13633         pthread_t t;
13634         int status;
13635         int detach = PTHREAD_CREATE_DETACHED;
13636
13637 #if HAVE_PTHREADS > 4
13638         /* Final pthreads */
13639         pthread_attr_t attr;
13640
13641         status = pthread_attr_init(&attr);
13642         if( status ) return status;
13643
13644 #if HAVE_PTHREADS < 7
13645         status = pthread_attr_setdetachstate(&attr, &detach);
13646         if( status < 0 ) status = errno;
13647 #else
13648         status = pthread_attr_setdetachstate(&attr, detach);
13649 #endif
13650         if( status ) return status;
13651         status = pthread_create( &t, &attr, task, NULL );
13652 #if HAVE_PTHREADS < 7
13653         if( status < 0 ) status = errno;
13654 #endif
13655         if( status ) return status;
13656 #else
13657         /* Draft 4 pthreads */
13658         status = pthread_create( &t, pthread_attr_default, task, NULL );
13659         if( status ) return errno;
13660
13661         /* give thread a chance to complete */
13662         /* it should remain joinable and hence detachable */
13663         sleep( 1 );
13664
13665         status = pthread_detach( &t );
13666         if( status ) return errno;
13667 #endif
13668
13669 #ifdef HAVE_LINUX_THREADS
13670         pthread_kill_other_threads_np();
13671 #endif
13672
13673         return 0;
13674
13675 }
13676
13677 EOF
13678 if { (eval echo configure:13679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13679 then
13680   ol_cv_pthread_lc_r=yes
13681 else
13682   echo "configure: failed program was:" >&5
13683   cat conftest.$ac_ext >&5
13684   rm -fr conftest*
13685   ol_cv_pthread_lc_r=no
13686 fi
13687 rm -fr conftest*
13688 fi
13689
13690
13691                 # restore the LIBS
13692                 LIBS="$ol_LIBS"
13693         
13694 fi
13695
13696 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13697
13698         if test $ol_cv_pthread_lc_r = yes ; then
13699                 ol_link_pthreads="-lc_r"
13700                 ol_link_threads=posix
13701         fi
13702 fi
13703
13704
13705                 # Pthread try link: -threads (ol_cv_pthread_threads)
13706 if test "$ol_link_threads" = no ; then
13707         # try -threads
13708         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13709 echo "configure:13710: checking for pthread link with -threads" >&5
13710 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13711   echo $ac_n "(cached) $ac_c" 1>&6
13712 else
13713   
13714                 # save the flags
13715                 ol_LIBS="$LIBS"
13716                 LIBS="-threads $LIBS"
13717
13718                 if test "$cross_compiling" = yes; then
13719   cat > conftest.$ac_ext <<EOF
13720 #line 13721 "configure"
13721 #include "confdefs.h"
13722 /* pthread test headers */
13723 #include <pthread.h>
13724 #if HAVE_PTHREADS < 7
13725 #include <errno.h>
13726 #endif
13727 #ifndef NULL
13728 #define NULL (void*)0
13729 #endif
13730
13731 static void *task(p)
13732         void *p;
13733 {
13734         return (void *) (p == NULL);
13735 }
13736
13737 int main() {
13738
13739         /* pthread test function */
13740 #ifndef PTHREAD_CREATE_DETACHED
13741 #define PTHREAD_CREATE_DETACHED 1
13742 #endif
13743         pthread_t t;
13744         int status;
13745         int detach = PTHREAD_CREATE_DETACHED;
13746
13747 #if HAVE_PTHREADS > 4
13748         /* Final pthreads */
13749         pthread_attr_t attr;
13750
13751         status = pthread_attr_init(&attr);
13752         if( status ) return status;
13753
13754 #if HAVE_PTHREADS < 7
13755         status = pthread_attr_setdetachstate(&attr, &detach);
13756         if( status < 0 ) status = errno;
13757 #else
13758         status = pthread_attr_setdetachstate(&attr, detach);
13759 #endif
13760         if( status ) return status;
13761         status = pthread_create( &t, &attr, task, NULL );
13762 #if HAVE_PTHREADS < 7
13763         if( status < 0 ) status = errno;
13764 #endif
13765         if( status ) return status;
13766 #else
13767         /* Draft 4 pthreads */
13768         status = pthread_create( &t, pthread_attr_default, task, NULL );
13769         if( status ) return errno;
13770
13771         /* give thread a chance to complete */
13772         /* it should remain joinable and hence detachable */
13773         sleep( 1 );
13774
13775         status = pthread_detach( &t );
13776         if( status ) return errno;
13777 #endif
13778
13779 #ifdef HAVE_LINUX_THREADS
13780         pthread_kill_other_threads_np();
13781 #endif
13782
13783         return 0;
13784
13785 ; return 0; }
13786 EOF
13787 if { (eval echo configure:13788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13788   rm -rf conftest*
13789   ol_cv_pthread_threads=yes
13790 else
13791   echo "configure: failed program was:" >&5
13792   cat conftest.$ac_ext >&5
13793   rm -rf conftest*
13794   ol_cv_pthread_threads=no
13795 fi
13796 rm -f conftest*
13797 else
13798   cat > conftest.$ac_ext <<EOF
13799 #line 13800 "configure"
13800 #include "confdefs.h"
13801 /* pthread test headers */
13802 #include <pthread.h>
13803 #if HAVE_PTHREADS < 7
13804 #include <errno.h>
13805 #endif
13806 #ifndef NULL
13807 #define NULL (void*)0
13808 #endif
13809
13810 static void *task(p)
13811         void *p;
13812 {
13813         return (void *) (p == NULL);
13814 }
13815
13816
13817 int main(argc, argv)
13818         int argc;
13819         char **argv;
13820 {
13821
13822         /* pthread test function */
13823 #ifndef PTHREAD_CREATE_DETACHED
13824 #define PTHREAD_CREATE_DETACHED 1
13825 #endif
13826         pthread_t t;
13827         int status;
13828         int detach = PTHREAD_CREATE_DETACHED;
13829
13830 #if HAVE_PTHREADS > 4
13831         /* Final pthreads */
13832         pthread_attr_t attr;
13833
13834         status = pthread_attr_init(&attr);
13835         if( status ) return status;
13836
13837 #if HAVE_PTHREADS < 7
13838         status = pthread_attr_setdetachstate(&attr, &detach);
13839         if( status < 0 ) status = errno;
13840 #else
13841         status = pthread_attr_setdetachstate(&attr, detach);
13842 #endif
13843         if( status ) return status;
13844         status = pthread_create( &t, &attr, task, NULL );
13845 #if HAVE_PTHREADS < 7
13846         if( status < 0 ) status = errno;
13847 #endif
13848         if( status ) return status;
13849 #else
13850         /* Draft 4 pthreads */
13851         status = pthread_create( &t, pthread_attr_default, task, NULL );
13852         if( status ) return errno;
13853
13854         /* give thread a chance to complete */
13855         /* it should remain joinable and hence detachable */
13856         sleep( 1 );
13857
13858         status = pthread_detach( &t );
13859         if( status ) return errno;
13860 #endif
13861
13862 #ifdef HAVE_LINUX_THREADS
13863         pthread_kill_other_threads_np();
13864 #endif
13865
13866         return 0;
13867
13868 }
13869
13870 EOF
13871 if { (eval echo configure:13872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13872 then
13873   ol_cv_pthread_threads=yes
13874 else
13875   echo "configure: failed program was:" >&5
13876   cat conftest.$ac_ext >&5
13877   rm -fr conftest*
13878   ol_cv_pthread_threads=no
13879 fi
13880 rm -fr conftest*
13881 fi
13882
13883
13884                 # restore the LIBS
13885                 LIBS="$ol_LIBS"
13886         
13887 fi
13888
13889 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13890
13891         if test $ol_cv_pthread_threads = yes ; then
13892                 ol_link_pthreads="-threads"
13893                 ol_link_threads=posix
13894         fi
13895 fi
13896
13897
13898                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13899 if test "$ol_link_threads" = no ; then
13900         # try -lpthreads -lmach -lexc -lc_r
13901         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13902 echo "configure:13903: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13903 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13904   echo $ac_n "(cached) $ac_c" 1>&6
13905 else
13906   
13907                 # save the flags
13908                 ol_LIBS="$LIBS"
13909                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13910
13911                 if test "$cross_compiling" = yes; then
13912   cat > conftest.$ac_ext <<EOF
13913 #line 13914 "configure"
13914 #include "confdefs.h"
13915 /* pthread test headers */
13916 #include <pthread.h>
13917 #if HAVE_PTHREADS < 7
13918 #include <errno.h>
13919 #endif
13920 #ifndef NULL
13921 #define NULL (void*)0
13922 #endif
13923
13924 static void *task(p)
13925         void *p;
13926 {
13927         return (void *) (p == NULL);
13928 }
13929
13930 int main() {
13931
13932         /* pthread test function */
13933 #ifndef PTHREAD_CREATE_DETACHED
13934 #define PTHREAD_CREATE_DETACHED 1
13935 #endif
13936         pthread_t t;
13937         int status;
13938         int detach = PTHREAD_CREATE_DETACHED;
13939
13940 #if HAVE_PTHREADS > 4
13941         /* Final pthreads */
13942         pthread_attr_t attr;
13943
13944         status = pthread_attr_init(&attr);
13945         if( status ) return status;
13946
13947 #if HAVE_PTHREADS < 7
13948         status = pthread_attr_setdetachstate(&attr, &detach);
13949         if( status < 0 ) status = errno;
13950 #else
13951         status = pthread_attr_setdetachstate(&attr, detach);
13952 #endif
13953         if( status ) return status;
13954         status = pthread_create( &t, &attr, task, NULL );
13955 #if HAVE_PTHREADS < 7
13956         if( status < 0 ) status = errno;
13957 #endif
13958         if( status ) return status;
13959 #else
13960         /* Draft 4 pthreads */
13961         status = pthread_create( &t, pthread_attr_default, task, NULL );
13962         if( status ) return errno;
13963
13964         /* give thread a chance to complete */
13965         /* it should remain joinable and hence detachable */
13966         sleep( 1 );
13967
13968         status = pthread_detach( &t );
13969         if( status ) return errno;
13970 #endif
13971
13972 #ifdef HAVE_LINUX_THREADS
13973         pthread_kill_other_threads_np();
13974 #endif
13975
13976         return 0;
13977
13978 ; return 0; }
13979 EOF
13980 if { (eval echo configure:13981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13981   rm -rf conftest*
13982   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13983 else
13984   echo "configure: failed program was:" >&5
13985   cat conftest.$ac_ext >&5
13986   rm -rf conftest*
13987   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13988 fi
13989 rm -f conftest*
13990 else
13991   cat > conftest.$ac_ext <<EOF
13992 #line 13993 "configure"
13993 #include "confdefs.h"
13994 /* pthread test headers */
13995 #include <pthread.h>
13996 #if HAVE_PTHREADS < 7
13997 #include <errno.h>
13998 #endif
13999 #ifndef NULL
14000 #define NULL (void*)0
14001 #endif
14002
14003 static void *task(p)
14004         void *p;
14005 {
14006         return (void *) (p == NULL);
14007 }
14008
14009
14010 int main(argc, argv)
14011         int argc;
14012         char **argv;
14013 {
14014
14015         /* pthread test function */
14016 #ifndef PTHREAD_CREATE_DETACHED
14017 #define PTHREAD_CREATE_DETACHED 1
14018 #endif
14019         pthread_t t;
14020         int status;
14021         int detach = PTHREAD_CREATE_DETACHED;
14022
14023 #if HAVE_PTHREADS > 4
14024         /* Final pthreads */
14025         pthread_attr_t attr;
14026
14027         status = pthread_attr_init(&attr);
14028         if( status ) return status;
14029
14030 #if HAVE_PTHREADS < 7
14031         status = pthread_attr_setdetachstate(&attr, &detach);
14032         if( status < 0 ) status = errno;
14033 #else
14034         status = pthread_attr_setdetachstate(&attr, detach);
14035 #endif
14036         if( status ) return status;
14037         status = pthread_create( &t, &attr, task, NULL );
14038 #if HAVE_PTHREADS < 7
14039         if( status < 0 ) status = errno;
14040 #endif
14041         if( status ) return status;
14042 #else
14043         /* Draft 4 pthreads */
14044         status = pthread_create( &t, pthread_attr_default, task, NULL );
14045         if( status ) return errno;
14046
14047         /* give thread a chance to complete */
14048         /* it should remain joinable and hence detachable */
14049         sleep( 1 );
14050
14051         status = pthread_detach( &t );
14052         if( status ) return errno;
14053 #endif
14054
14055 #ifdef HAVE_LINUX_THREADS
14056         pthread_kill_other_threads_np();
14057 #endif
14058
14059         return 0;
14060
14061 }
14062
14063 EOF
14064 if { (eval echo configure:14065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14065 then
14066   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14067 else
14068   echo "configure: failed program was:" >&5
14069   cat conftest.$ac_ext >&5
14070   rm -fr conftest*
14071   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14072 fi
14073 rm -fr conftest*
14074 fi
14075
14076
14077                 # restore the LIBS
14078                 LIBS="$ol_LIBS"
14079         
14080 fi
14081
14082 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14083
14084         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14085                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14086                 ol_link_threads=posix
14087         fi
14088 fi
14089
14090                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14091 if test "$ol_link_threads" = no ; then
14092         # try -lpthreads -lmach -lexc
14093         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14094 echo "configure:14095: checking for pthread link with -lpthreads -lmach -lexc" >&5
14095 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14096   echo $ac_n "(cached) $ac_c" 1>&6
14097 else
14098   
14099                 # save the flags
14100                 ol_LIBS="$LIBS"
14101                 LIBS="-lpthreads -lmach -lexc $LIBS"
14102
14103                 if test "$cross_compiling" = yes; then
14104   cat > conftest.$ac_ext <<EOF
14105 #line 14106 "configure"
14106 #include "confdefs.h"
14107 /* pthread test headers */
14108 #include <pthread.h>
14109 #if HAVE_PTHREADS < 7
14110 #include <errno.h>
14111 #endif
14112 #ifndef NULL
14113 #define NULL (void*)0
14114 #endif
14115
14116 static void *task(p)
14117         void *p;
14118 {
14119         return (void *) (p == NULL);
14120 }
14121
14122 int main() {
14123
14124         /* pthread test function */
14125 #ifndef PTHREAD_CREATE_DETACHED
14126 #define PTHREAD_CREATE_DETACHED 1
14127 #endif
14128         pthread_t t;
14129         int status;
14130         int detach = PTHREAD_CREATE_DETACHED;
14131
14132 #if HAVE_PTHREADS > 4
14133         /* Final pthreads */
14134         pthread_attr_t attr;
14135
14136         status = pthread_attr_init(&attr);
14137         if( status ) return status;
14138
14139 #if HAVE_PTHREADS < 7
14140         status = pthread_attr_setdetachstate(&attr, &detach);
14141         if( status < 0 ) status = errno;
14142 #else
14143         status = pthread_attr_setdetachstate(&attr, detach);
14144 #endif
14145         if( status ) return status;
14146         status = pthread_create( &t, &attr, task, NULL );
14147 #if HAVE_PTHREADS < 7
14148         if( status < 0 ) status = errno;
14149 #endif
14150         if( status ) return status;
14151 #else
14152         /* Draft 4 pthreads */
14153         status = pthread_create( &t, pthread_attr_default, task, NULL );
14154         if( status ) return errno;
14155
14156         /* give thread a chance to complete */
14157         /* it should remain joinable and hence detachable */
14158         sleep( 1 );
14159
14160         status = pthread_detach( &t );
14161         if( status ) return errno;
14162 #endif
14163
14164 #ifdef HAVE_LINUX_THREADS
14165         pthread_kill_other_threads_np();
14166 #endif
14167
14168         return 0;
14169
14170 ; return 0; }
14171 EOF
14172 if { (eval echo configure:14173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14173   rm -rf conftest*
14174   ol_cv_pthread_lpthreads_lmach_lexc=yes
14175 else
14176   echo "configure: failed program was:" >&5
14177   cat conftest.$ac_ext >&5
14178   rm -rf conftest*
14179   ol_cv_pthread_lpthreads_lmach_lexc=no
14180 fi
14181 rm -f conftest*
14182 else
14183   cat > conftest.$ac_ext <<EOF
14184 #line 14185 "configure"
14185 #include "confdefs.h"
14186 /* pthread test headers */
14187 #include <pthread.h>
14188 #if HAVE_PTHREADS < 7
14189 #include <errno.h>
14190 #endif
14191 #ifndef NULL
14192 #define NULL (void*)0
14193 #endif
14194
14195 static void *task(p)
14196         void *p;
14197 {
14198         return (void *) (p == NULL);
14199 }
14200
14201
14202 int main(argc, argv)
14203         int argc;
14204         char **argv;
14205 {
14206
14207         /* pthread test function */
14208 #ifndef PTHREAD_CREATE_DETACHED
14209 #define PTHREAD_CREATE_DETACHED 1
14210 #endif
14211         pthread_t t;
14212         int status;
14213         int detach = PTHREAD_CREATE_DETACHED;
14214
14215 #if HAVE_PTHREADS > 4
14216         /* Final pthreads */
14217         pthread_attr_t attr;
14218
14219         status = pthread_attr_init(&attr);
14220         if( status ) return status;
14221
14222 #if HAVE_PTHREADS < 7
14223         status = pthread_attr_setdetachstate(&attr, &detach);
14224         if( status < 0 ) status = errno;
14225 #else
14226         status = pthread_attr_setdetachstate(&attr, detach);
14227 #endif
14228         if( status ) return status;
14229         status = pthread_create( &t, &attr, task, NULL );
14230 #if HAVE_PTHREADS < 7
14231         if( status < 0 ) status = errno;
14232 #endif
14233         if( status ) return status;
14234 #else
14235         /* Draft 4 pthreads */
14236         status = pthread_create( &t, pthread_attr_default, task, NULL );
14237         if( status ) return errno;
14238
14239         /* give thread a chance to complete */
14240         /* it should remain joinable and hence detachable */
14241         sleep( 1 );
14242
14243         status = pthread_detach( &t );
14244         if( status ) return errno;
14245 #endif
14246
14247 #ifdef HAVE_LINUX_THREADS
14248         pthread_kill_other_threads_np();
14249 #endif
14250
14251         return 0;
14252
14253 }
14254
14255 EOF
14256 if { (eval echo configure:14257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14257 then
14258   ol_cv_pthread_lpthreads_lmach_lexc=yes
14259 else
14260   echo "configure: failed program was:" >&5
14261   cat conftest.$ac_ext >&5
14262   rm -fr conftest*
14263   ol_cv_pthread_lpthreads_lmach_lexc=no
14264 fi
14265 rm -fr conftest*
14266 fi
14267
14268
14269                 # restore the LIBS
14270                 LIBS="$ol_LIBS"
14271         
14272 fi
14273
14274 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14275
14276         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14277                 ol_link_pthreads="-lpthreads -lmach -lexc"
14278                 ol_link_threads=posix
14279         fi
14280 fi
14281
14282                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14283 if test "$ol_link_threads" = no ; then
14284         # try -lpthreads -lexc
14285         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14286 echo "configure:14287: checking for pthread link with -lpthreads -lexc" >&5
14287 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14288   echo $ac_n "(cached) $ac_c" 1>&6
14289 else
14290   
14291                 # save the flags
14292                 ol_LIBS="$LIBS"
14293                 LIBS="-lpthreads -lexc $LIBS"
14294
14295                 if test "$cross_compiling" = yes; then
14296   cat > conftest.$ac_ext <<EOF
14297 #line 14298 "configure"
14298 #include "confdefs.h"
14299 /* pthread test headers */
14300 #include <pthread.h>
14301 #if HAVE_PTHREADS < 7
14302 #include <errno.h>
14303 #endif
14304 #ifndef NULL
14305 #define NULL (void*)0
14306 #endif
14307
14308 static void *task(p)
14309         void *p;
14310 {
14311         return (void *) (p == NULL);
14312 }
14313
14314 int main() {
14315
14316         /* pthread test function */
14317 #ifndef PTHREAD_CREATE_DETACHED
14318 #define PTHREAD_CREATE_DETACHED 1
14319 #endif
14320         pthread_t t;
14321         int status;
14322         int detach = PTHREAD_CREATE_DETACHED;
14323
14324 #if HAVE_PTHREADS > 4
14325         /* Final pthreads */
14326         pthread_attr_t attr;
14327
14328         status = pthread_attr_init(&attr);
14329         if( status ) return status;
14330
14331 #if HAVE_PTHREADS < 7
14332         status = pthread_attr_setdetachstate(&attr, &detach);
14333         if( status < 0 ) status = errno;
14334 #else
14335         status = pthread_attr_setdetachstate(&attr, detach);
14336 #endif
14337         if( status ) return status;
14338         status = pthread_create( &t, &attr, task, NULL );
14339 #if HAVE_PTHREADS < 7
14340         if( status < 0 ) status = errno;
14341 #endif
14342         if( status ) return status;
14343 #else
14344         /* Draft 4 pthreads */
14345         status = pthread_create( &t, pthread_attr_default, task, NULL );
14346         if( status ) return errno;
14347
14348         /* give thread a chance to complete */
14349         /* it should remain joinable and hence detachable */
14350         sleep( 1 );
14351
14352         status = pthread_detach( &t );
14353         if( status ) return errno;
14354 #endif
14355
14356 #ifdef HAVE_LINUX_THREADS
14357         pthread_kill_other_threads_np();
14358 #endif
14359
14360         return 0;
14361
14362 ; return 0; }
14363 EOF
14364 if { (eval echo configure:14365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14365   rm -rf conftest*
14366   ol_cv_pthread_lpthreads_lexc=yes
14367 else
14368   echo "configure: failed program was:" >&5
14369   cat conftest.$ac_ext >&5
14370   rm -rf conftest*
14371   ol_cv_pthread_lpthreads_lexc=no
14372 fi
14373 rm -f conftest*
14374 else
14375   cat > conftest.$ac_ext <<EOF
14376 #line 14377 "configure"
14377 #include "confdefs.h"
14378 /* pthread test headers */
14379 #include <pthread.h>
14380 #if HAVE_PTHREADS < 7
14381 #include <errno.h>
14382 #endif
14383 #ifndef NULL
14384 #define NULL (void*)0
14385 #endif
14386
14387 static void *task(p)
14388         void *p;
14389 {
14390         return (void *) (p == NULL);
14391 }
14392
14393
14394 int main(argc, argv)
14395         int argc;
14396         char **argv;
14397 {
14398
14399         /* pthread test function */
14400 #ifndef PTHREAD_CREATE_DETACHED
14401 #define PTHREAD_CREATE_DETACHED 1
14402 #endif
14403         pthread_t t;
14404         int status;
14405         int detach = PTHREAD_CREATE_DETACHED;
14406
14407 #if HAVE_PTHREADS > 4
14408         /* Final pthreads */
14409         pthread_attr_t attr;
14410
14411         status = pthread_attr_init(&attr);
14412         if( status ) return status;
14413
14414 #if HAVE_PTHREADS < 7
14415         status = pthread_attr_setdetachstate(&attr, &detach);
14416         if( status < 0 ) status = errno;
14417 #else
14418         status = pthread_attr_setdetachstate(&attr, detach);
14419 #endif
14420         if( status ) return status;
14421         status = pthread_create( &t, &attr, task, NULL );
14422 #if HAVE_PTHREADS < 7
14423         if( status < 0 ) status = errno;
14424 #endif
14425         if( status ) return status;
14426 #else
14427         /* Draft 4 pthreads */
14428         status = pthread_create( &t, pthread_attr_default, task, NULL );
14429         if( status ) return errno;
14430
14431         /* give thread a chance to complete */
14432         /* it should remain joinable and hence detachable */
14433         sleep( 1 );
14434
14435         status = pthread_detach( &t );
14436         if( status ) return errno;
14437 #endif
14438
14439 #ifdef HAVE_LINUX_THREADS
14440         pthread_kill_other_threads_np();
14441 #endif
14442
14443         return 0;
14444
14445 }
14446
14447 EOF
14448 if { (eval echo configure:14449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14449 then
14450   ol_cv_pthread_lpthreads_lexc=yes
14451 else
14452   echo "configure: failed program was:" >&5
14453   cat conftest.$ac_ext >&5
14454   rm -fr conftest*
14455   ol_cv_pthread_lpthreads_lexc=no
14456 fi
14457 rm -fr conftest*
14458 fi
14459
14460
14461                 # restore the LIBS
14462                 LIBS="$ol_LIBS"
14463         
14464 fi
14465
14466 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14467
14468         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14469                 ol_link_pthreads="-lpthreads -lexc"
14470                 ol_link_threads=posix
14471         fi
14472 fi
14473
14474
14475                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14476 if test "$ol_link_threads" = no ; then
14477         # try -lpthreads
14478         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14479 echo "configure:14480: checking for pthread link with -lpthreads" >&5
14480 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14481   echo $ac_n "(cached) $ac_c" 1>&6
14482 else
14483   
14484                 # save the flags
14485                 ol_LIBS="$LIBS"
14486                 LIBS="-lpthreads $LIBS"
14487
14488                 if test "$cross_compiling" = yes; then
14489   cat > conftest.$ac_ext <<EOF
14490 #line 14491 "configure"
14491 #include "confdefs.h"
14492 /* pthread test headers */
14493 #include <pthread.h>
14494 #if HAVE_PTHREADS < 7
14495 #include <errno.h>
14496 #endif
14497 #ifndef NULL
14498 #define NULL (void*)0
14499 #endif
14500
14501 static void *task(p)
14502         void *p;
14503 {
14504         return (void *) (p == NULL);
14505 }
14506
14507 int main() {
14508
14509         /* pthread test function */
14510 #ifndef PTHREAD_CREATE_DETACHED
14511 #define PTHREAD_CREATE_DETACHED 1
14512 #endif
14513         pthread_t t;
14514         int status;
14515         int detach = PTHREAD_CREATE_DETACHED;
14516
14517 #if HAVE_PTHREADS > 4
14518         /* Final pthreads */
14519         pthread_attr_t attr;
14520
14521         status = pthread_attr_init(&attr);
14522         if( status ) return status;
14523
14524 #if HAVE_PTHREADS < 7
14525         status = pthread_attr_setdetachstate(&attr, &detach);
14526         if( status < 0 ) status = errno;
14527 #else
14528         status = pthread_attr_setdetachstate(&attr, detach);
14529 #endif
14530         if( status ) return status;
14531         status = pthread_create( &t, &attr, task, NULL );
14532 #if HAVE_PTHREADS < 7
14533         if( status < 0 ) status = errno;
14534 #endif
14535         if( status ) return status;
14536 #else
14537         /* Draft 4 pthreads */
14538         status = pthread_create( &t, pthread_attr_default, task, NULL );
14539         if( status ) return errno;
14540
14541         /* give thread a chance to complete */
14542         /* it should remain joinable and hence detachable */
14543         sleep( 1 );
14544
14545         status = pthread_detach( &t );
14546         if( status ) return errno;
14547 #endif
14548
14549 #ifdef HAVE_LINUX_THREADS
14550         pthread_kill_other_threads_np();
14551 #endif
14552
14553         return 0;
14554
14555 ; return 0; }
14556 EOF
14557 if { (eval echo configure:14558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14558   rm -rf conftest*
14559   ol_cv_pthread_lib_lpthreads=yes
14560 else
14561   echo "configure: failed program was:" >&5
14562   cat conftest.$ac_ext >&5
14563   rm -rf conftest*
14564   ol_cv_pthread_lib_lpthreads=no
14565 fi
14566 rm -f conftest*
14567 else
14568   cat > conftest.$ac_ext <<EOF
14569 #line 14570 "configure"
14570 #include "confdefs.h"
14571 /* pthread test headers */
14572 #include <pthread.h>
14573 #if HAVE_PTHREADS < 7
14574 #include <errno.h>
14575 #endif
14576 #ifndef NULL
14577 #define NULL (void*)0
14578 #endif
14579
14580 static void *task(p)
14581         void *p;
14582 {
14583         return (void *) (p == NULL);
14584 }
14585
14586
14587 int main(argc, argv)
14588         int argc;
14589         char **argv;
14590 {
14591
14592         /* pthread test function */
14593 #ifndef PTHREAD_CREATE_DETACHED
14594 #define PTHREAD_CREATE_DETACHED 1
14595 #endif
14596         pthread_t t;
14597         int status;
14598         int detach = PTHREAD_CREATE_DETACHED;
14599
14600 #if HAVE_PTHREADS > 4
14601         /* Final pthreads */
14602         pthread_attr_t attr;
14603
14604         status = pthread_attr_init(&attr);
14605         if( status ) return status;
14606
14607 #if HAVE_PTHREADS < 7
14608         status = pthread_attr_setdetachstate(&attr, &detach);
14609         if( status < 0 ) status = errno;
14610 #else
14611         status = pthread_attr_setdetachstate(&attr, detach);
14612 #endif
14613         if( status ) return status;
14614         status = pthread_create( &t, &attr, task, NULL );
14615 #if HAVE_PTHREADS < 7
14616         if( status < 0 ) status = errno;
14617 #endif
14618         if( status ) return status;
14619 #else
14620         /* Draft 4 pthreads */
14621         status = pthread_create( &t, pthread_attr_default, task, NULL );
14622         if( status ) return errno;
14623
14624         /* give thread a chance to complete */
14625         /* it should remain joinable and hence detachable */
14626         sleep( 1 );
14627
14628         status = pthread_detach( &t );
14629         if( status ) return errno;
14630 #endif
14631
14632 #ifdef HAVE_LINUX_THREADS
14633         pthread_kill_other_threads_np();
14634 #endif
14635
14636         return 0;
14637
14638 }
14639
14640 EOF
14641 if { (eval echo configure:14642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14642 then
14643   ol_cv_pthread_lib_lpthreads=yes
14644 else
14645   echo "configure: failed program was:" >&5
14646   cat conftest.$ac_ext >&5
14647   rm -fr conftest*
14648   ol_cv_pthread_lib_lpthreads=no
14649 fi
14650 rm -fr conftest*
14651 fi
14652
14653
14654                 # restore the LIBS
14655                 LIBS="$ol_LIBS"
14656         
14657 fi
14658
14659 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14660
14661         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14662                 ol_link_pthreads="-lpthreads"
14663                 ol_link_threads=posix
14664         fi
14665 fi
14666
14667
14668                 if test $ol_link_threads != no ; then
14669                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14670
14671                                                 save_CPPFLAGS="$CPPFLAGS"
14672                         save_LIBS="$LIBS"
14673                         LIBS="$LTHREAD_LIBS $LIBS"
14674
14675                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14676 do
14677 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14678 echo "configure:14679: checking for $ac_func" >&5
14679 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14680   echo $ac_n "(cached) $ac_c" 1>&6
14681 else
14682   cat > conftest.$ac_ext <<EOF
14683 #line 14684 "configure"
14684 #include "confdefs.h"
14685 /* System header to define __stub macros and hopefully few prototypes,
14686     which can conflict with char $ac_func(); below.  */
14687 #include <assert.h>
14688 /* Override any gcc2 internal prototype to avoid an error.  */
14689 /* We use char because int might match the return type of a gcc2
14690     builtin and then its argument prototype would still apply.  */
14691 char $ac_func();
14692 char (*f)();
14693
14694 int main() {
14695
14696 /* The GNU C library defines this for functions which it implements
14697     to always fail with ENOSYS.  Some functions are actually named
14698     something starting with __ and the normal name is an alias.  */
14699 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14700 choke me
14701 #else
14702 f = $ac_func;
14703 #endif
14704
14705 ; return 0; }
14706 EOF
14707 if { (eval echo configure:14708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14708   rm -rf conftest*
14709   eval "ac_cv_func_$ac_func=yes"
14710 else
14711   echo "configure: failed program was:" >&5
14712   cat conftest.$ac_ext >&5
14713   rm -rf conftest*
14714   eval "ac_cv_func_$ac_func=no"
14715 fi
14716 rm -f conftest*
14717 fi
14718
14719 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14720   echo "$ac_t""yes" 1>&6
14721     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14722   cat >> confdefs.h <<EOF
14723 #define $ac_tr_func 1
14724 EOF
14725  
14726 else
14727   echo "$ac_t""no" 1>&6
14728 fi
14729 done
14730
14731
14732                         if test $ac_cv_func_sched_yield = no -a \
14733                                 $ac_cv_func_pthread_yield = no -a \
14734                                 $ac_cv_func_thr_yield = no ; then
14735                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14736 echo "configure:14737: checking for sched_yield in -lrt" >&5
14737 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14738 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14739   echo $ac_n "(cached) $ac_c" 1>&6
14740 else
14741   ac_save_LIBS="$LIBS"
14742 LIBS="-lrt  $LIBS"
14743 cat > conftest.$ac_ext <<EOF
14744 #line 14745 "configure"
14745 #include "confdefs.h"
14746 /* Override any gcc2 internal prototype to avoid an error.  */
14747 /* We use char because int might match the return type of a gcc2
14748     builtin and then its argument prototype would still apply.  */
14749 char sched_yield();
14750
14751 int main() {
14752 sched_yield()
14753 ; return 0; }
14754 EOF
14755 if { (eval echo configure:14756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14756   rm -rf conftest*
14757   eval "ac_cv_lib_$ac_lib_var=yes"
14758 else
14759   echo "configure: failed program was:" >&5
14760   cat conftest.$ac_ext >&5
14761   rm -rf conftest*
14762   eval "ac_cv_lib_$ac_lib_var=no"
14763 fi
14764 rm -f conftest*
14765 LIBS="$ac_save_LIBS"
14766
14767 fi
14768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14769   echo "$ac_t""yes" 1>&6
14770   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14771                                         cat >> confdefs.h <<\EOF
14772 #define HAVE_SCHED_YIELD 1
14773 EOF
14774
14775                                         ac_cv_func_sched_yield=yes
14776 else
14777   echo "$ac_t""no" 1>&6
14778 ac_cv_func_sched_yield=no
14779 fi
14780
14781                         fi
14782                         if test $ac_cv_func_sched_yield = no -a \
14783                                 $ac_cv_func_pthread_yield = no -a \
14784                                 "$ac_cv_func_thr_yield" = no ; then
14785                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14786                         fi
14787
14788                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14789 do
14790 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14791 echo "configure:14792: checking for $ac_func" >&5
14792 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14793   echo $ac_n "(cached) $ac_c" 1>&6
14794 else
14795   cat > conftest.$ac_ext <<EOF
14796 #line 14797 "configure"
14797 #include "confdefs.h"
14798 /* System header to define __stub macros and hopefully few prototypes,
14799     which can conflict with char $ac_func(); below.  */
14800 #include <assert.h>
14801 /* Override any gcc2 internal prototype to avoid an error.  */
14802 /* We use char because int might match the return type of a gcc2
14803     builtin and then its argument prototype would still apply.  */
14804 char $ac_func();
14805 char (*f)();
14806
14807 int main() {
14808
14809 /* The GNU C library defines this for functions which it implements
14810     to always fail with ENOSYS.  Some functions are actually named
14811     something starting with __ and the normal name is an alias.  */
14812 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14813 choke me
14814 #else
14815 f = $ac_func;
14816 #endif
14817
14818 ; return 0; }
14819 EOF
14820 if { (eval echo configure:14821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14821   rm -rf conftest*
14822   eval "ac_cv_func_$ac_func=yes"
14823 else
14824   echo "configure: failed program was:" >&5
14825   cat conftest.$ac_ext >&5
14826   rm -rf conftest*
14827   eval "ac_cv_func_$ac_func=no"
14828 fi
14829 rm -f conftest*
14830 fi
14831
14832 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14833   echo "$ac_t""yes" 1>&6
14834     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14835   cat >> confdefs.h <<EOF
14836 #define $ac_tr_func 1
14837 EOF
14838  
14839 else
14840   echo "$ac_t""no" 1>&6
14841 fi
14842 done
14843
14844
14845                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14846 echo "configure:14847: checking for pthread_detach with <pthread.h>" >&5
14847 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14848   echo $ac_n "(cached) $ac_c" 1>&6
14849 else
14850   
14851                                                                 cat > conftest.$ac_ext <<EOF
14852 #line 14853 "configure"
14853 #include "confdefs.h"
14854
14855 #include <pthread.h>
14856 #ifndef NULL
14857 #define NULL (void*)0
14858 #endif
14859
14860 int main() {
14861 pthread_detach(NULL);
14862 ; return 0; }
14863 EOF
14864 if { (eval echo configure:14865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14865   rm -rf conftest*
14866   ol_cv_func_pthread_detach=yes
14867 else
14868   echo "configure: failed program was:" >&5
14869   cat conftest.$ac_ext >&5
14870   rm -rf conftest*
14871   ol_cv_func_pthread_detach=no
14872 fi
14873 rm -f conftest*
14874                         
14875 fi
14876
14877 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14878
14879                         if test $ol_cv_func_pthread_detach = no ; then
14880                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14881                         fi
14882
14883                         cat >> confdefs.h <<\EOF
14884 #define HAVE_PTHREAD_DETACH 1
14885 EOF
14886
14887
14888                                                 for ac_func in \
14889                                 pthread_setconcurrency \
14890                                 pthread_getconcurrency \
14891                                 thr_setconcurrency \
14892                                 thr_getconcurrency \
14893                         
14894 do
14895 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14896 echo "configure:14897: checking for $ac_func" >&5
14897 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14898   echo $ac_n "(cached) $ac_c" 1>&6
14899 else
14900   cat > conftest.$ac_ext <<EOF
14901 #line 14902 "configure"
14902 #include "confdefs.h"
14903 /* System header to define __stub macros and hopefully few prototypes,
14904     which can conflict with char $ac_func(); below.  */
14905 #include <assert.h>
14906 /* Override any gcc2 internal prototype to avoid an error.  */
14907 /* We use char because int might match the return type of a gcc2
14908     builtin and then its argument prototype would still apply.  */
14909 char $ac_func();
14910 char (*f)();
14911
14912 int main() {
14913
14914 /* The GNU C library defines this for functions which it implements
14915     to always fail with ENOSYS.  Some functions are actually named
14916     something starting with __ and the normal name is an alias.  */
14917 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14918 choke me
14919 #else
14920 f = $ac_func;
14921 #endif
14922
14923 ; return 0; }
14924 EOF
14925 if { (eval echo configure:14926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14926   rm -rf conftest*
14927   eval "ac_cv_func_$ac_func=yes"
14928 else
14929   echo "configure: failed program was:" >&5
14930   cat conftest.$ac_ext >&5
14931   rm -rf conftest*
14932   eval "ac_cv_func_$ac_func=no"
14933 fi
14934 rm -f conftest*
14935 fi
14936
14937 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14938   echo "$ac_t""yes" 1>&6
14939     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14940   cat >> confdefs.h <<EOF
14941 #define $ac_tr_func 1
14942 EOF
14943  
14944 else
14945   echo "$ac_t""no" 1>&6
14946 fi
14947 done
14948
14949
14950                         
14951         for ac_func in pthread_kill_other_threads_np
14952 do
14953 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14954 echo "configure:14955: checking for $ac_func" >&5
14955 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14956   echo $ac_n "(cached) $ac_c" 1>&6
14957 else
14958   cat > conftest.$ac_ext <<EOF
14959 #line 14960 "configure"
14960 #include "confdefs.h"
14961 /* System header to define __stub macros and hopefully few prototypes,
14962     which can conflict with char $ac_func(); below.  */
14963 #include <assert.h>
14964 /* Override any gcc2 internal prototype to avoid an error.  */
14965 /* We use char because int might match the return type of a gcc2
14966     builtin and then its argument prototype would still apply.  */
14967 char $ac_func();
14968 char (*f)();
14969
14970 int main() {
14971
14972 /* The GNU C library defines this for functions which it implements
14973     to always fail with ENOSYS.  Some functions are actually named
14974     something starting with __ and the normal name is an alias.  */
14975 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14976 choke me
14977 #else
14978 f = $ac_func;
14979 #endif
14980
14981 ; return 0; }
14982 EOF
14983 if { (eval echo configure:14984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14984   rm -rf conftest*
14985   eval "ac_cv_func_$ac_func=yes"
14986 else
14987   echo "configure: failed program was:" >&5
14988   cat conftest.$ac_ext >&5
14989   rm -rf conftest*
14990   eval "ac_cv_func_$ac_func=no"
14991 fi
14992 rm -f conftest*
14993 fi
14994
14995 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14996   echo "$ac_t""yes" 1>&6
14997     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14998   cat >> confdefs.h <<EOF
14999 #define $ac_tr_func 1
15000 EOF
15001  
15002 else
15003   echo "$ac_t""no" 1>&6
15004 fi
15005 done
15006
15007         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15008 echo "configure:15009: checking for LinuxThreads implementation" >&5
15009 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15010   echo $ac_n "(cached) $ac_c" 1>&6
15011 else
15012   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15013 fi
15014
15015 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15016
15017                         
15018         
15019         
15020         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15021 echo "configure:15022: checking for LinuxThreads consistency" >&5
15022 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15023   echo $ac_n "(cached) $ac_c" 1>&6
15024 else
15025   
15026                 if test $ol_cv_header_linux_threads = yes -a \
15027                         $ol_cv_sys_linux_threads = yes; then
15028                         ol_cv_linux_threads=yes
15029                 elif test $ol_cv_header_linux_threads = no -a \
15030                         $ol_cv_sys_linux_threads = no; then
15031                         ol_cv_linux_threads=no
15032                 else
15033                         ol_cv_linux_threads=error
15034                 fi
15035         
15036 fi
15037
15038 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15039
15040
15041                         if test $ol_cv_linux_threads = error; then
15042                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15043                         fi
15044
15045                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15046 echo "configure:15047: checking if pthread_create() works" >&5
15047 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15048   echo $ac_n "(cached) $ac_c" 1>&6
15049 else
15050   
15051                         if test "$cross_compiling" = yes; then
15052                                 ol_cv_pthread_create_works=yes
15053 else
15054   cat > conftest.$ac_ext <<EOF
15055 #line 15056 "configure"
15056 #include "confdefs.h"
15057 /* pthread test headers */
15058 #include <pthread.h>
15059 #if HAVE_PTHREADS < 7
15060 #include <errno.h>
15061 #endif
15062 #ifndef NULL
15063 #define NULL (void*)0
15064 #endif
15065
15066 static void *task(p)
15067         void *p;
15068 {
15069         return (void *) (p == NULL);
15070 }
15071
15072
15073 int main(argc, argv)
15074         int argc;
15075         char **argv;
15076 {
15077
15078         /* pthread test function */
15079 #ifndef PTHREAD_CREATE_DETACHED
15080 #define PTHREAD_CREATE_DETACHED 1
15081 #endif
15082         pthread_t t;
15083         int status;
15084         int detach = PTHREAD_CREATE_DETACHED;
15085
15086 #if HAVE_PTHREADS > 4
15087         /* Final pthreads */
15088         pthread_attr_t attr;
15089
15090         status = pthread_attr_init(&attr);
15091         if( status ) return status;
15092
15093 #if HAVE_PTHREADS < 7
15094         status = pthread_attr_setdetachstate(&attr, &detach);
15095         if( status < 0 ) status = errno;
15096 #else
15097         status = pthread_attr_setdetachstate(&attr, detach);
15098 #endif
15099         if( status ) return status;
15100         status = pthread_create( &t, &attr, task, NULL );
15101 #if HAVE_PTHREADS < 7
15102         if( status < 0 ) status = errno;
15103 #endif
15104         if( status ) return status;
15105 #else
15106         /* Draft 4 pthreads */
15107         status = pthread_create( &t, pthread_attr_default, task, NULL );
15108         if( status ) return errno;
15109
15110         /* give thread a chance to complete */
15111         /* it should remain joinable and hence detachable */
15112         sleep( 1 );
15113
15114         status = pthread_detach( &t );
15115         if( status ) return errno;
15116 #endif
15117
15118 #ifdef HAVE_LINUX_THREADS
15119         pthread_kill_other_threads_np();
15120 #endif
15121
15122         return 0;
15123
15124 }
15125
15126 EOF
15127 if { (eval echo configure:15128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15128 then
15129   ol_cv_pthread_create_works=yes
15130 else
15131   echo "configure: failed program was:" >&5
15132   cat conftest.$ac_ext >&5
15133   rm -fr conftest*
15134   ol_cv_pthread_create_works=no
15135 fi
15136 rm -fr conftest*
15137 fi
15138
15139 fi
15140
15141 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15142
15143                         if test $ol_cv_pthread_create_works = no ; then
15144                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15145                         fi
15146
15147                                                 if test $ol_with_yielding_select = auto ; then
15148                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15149 echo "configure:15150: checking if select yields when using pthreads" >&5
15150 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15151   echo $ac_n "(cached) $ac_c" 1>&6
15152 else
15153   
15154                                 if test "$cross_compiling" = yes; then
15155   ol_cv_pthread_select_yields=cross
15156 else
15157   cat > conftest.$ac_ext <<EOF
15158 #line 15159 "configure"
15159 #include "confdefs.h"
15160
15161 #include <sys/types.h>
15162 #include <sys/time.h>
15163 #include <unistd.h>
15164 #include <pthread.h>
15165 #ifndef NULL
15166 #define NULL (void*) 0
15167 #endif
15168
15169 static int fildes[2];
15170
15171 static void *task(p)
15172         void *p;
15173 {
15174         int i;
15175         struct timeval tv;
15176
15177         fd_set rfds;
15178
15179         tv.tv_sec=10;
15180         tv.tv_usec=0;
15181
15182         FD_ZERO(&rfds);
15183         FD_SET(fildes[0], &rfds);
15184
15185         /* we're not interested in any fds */
15186         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15187
15188         if(i < 0) {
15189                 perror("select");
15190                 exit(10);
15191         }
15192
15193         exit(0); /* if we exit here, the select blocked the whole process */
15194 }
15195
15196 int main(argc, argv)
15197         int argc;
15198         char **argv;
15199 {
15200         pthread_t t;
15201
15202         /* create a pipe to select */
15203         if(pipe(&fildes[0])) {
15204                 perror("select");
15205                 exit(1);
15206         }
15207
15208 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15209         (void) pthread_setconcurrency(2);
15210 #else
15211 #ifdef HAVE_THR_SETCONCURRENCY
15212         /* Set Solaris LWP concurrency to 2 */
15213         thr_setconcurrency(2);
15214 #endif
15215 #endif
15216
15217 #if HAVE_PTHREADS < 6
15218         pthread_create(&t, pthread_attr_default, task, NULL);
15219 #else
15220         pthread_create(&t, NULL, task, NULL);
15221 #endif
15222
15223         /* make sure task runs first */
15224 #if HAVE_THR_YIELD
15225         thr_yield();
15226 #elif defined( HAVE_SCHED_YIELD )
15227         sched_yield();
15228 #elif defined( HAVE_PTHREAD_YIELD )
15229         pthread_yield();
15230 #endif
15231
15232         exit(2);
15233 }
15234 EOF
15235 if { (eval echo configure:15236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15236 then
15237   ol_cv_pthread_select_yields=no
15238 else
15239   echo "configure: failed program was:" >&5
15240   cat conftest.$ac_ext >&5
15241   rm -fr conftest*
15242   ol_cv_pthread_select_yields=yes
15243 fi
15244 rm -fr conftest*
15245 fi
15246
15247 fi
15248
15249 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15250
15251                                 if test $ol_cv_pthread_select_yields = cross ; then
15252                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15253                                 fi
15254
15255                                 if test $ol_cv_pthread_select_yields = yes ; then
15256                                         ol_with_yielding_select=yes
15257                                 fi
15258                         fi
15259
15260                                                 CPPFLAGS="$save_CPPFLAGS"
15261                         LIBS="$save_LIBS"
15262                 else
15263                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15264                 fi
15265         fi
15266
15267         if test $ol_with_threads = posix ; then
15268                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15269         fi
15270 fi
15271
15272 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15273         -o $ol_with_threads = mach ; then
15274
15275                 for ac_hdr in mach/cthreads.h cthreads.h
15276 do
15277 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15278 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15279 echo "configure:15280: checking for $ac_hdr" >&5
15280 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15281   echo $ac_n "(cached) $ac_c" 1>&6
15282 else
15283   cat > conftest.$ac_ext <<EOF
15284 #line 15285 "configure"
15285 #include "confdefs.h"
15286 #include <$ac_hdr>
15287 EOF
15288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15289 { (eval echo configure:15290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15291 if test -z "$ac_err"; then
15292   rm -rf conftest*
15293   eval "ac_cv_header_$ac_safe=yes"
15294 else
15295   echo "$ac_err" >&5
15296   echo "configure: failed program was:" >&5
15297   cat conftest.$ac_ext >&5
15298   rm -rf conftest*
15299   eval "ac_cv_header_$ac_safe=no"
15300 fi
15301 rm -f conftest*
15302 fi
15303 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15304   echo "$ac_t""yes" 1>&6
15305     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15306   cat >> confdefs.h <<EOF
15307 #define $ac_tr_hdr 1
15308 EOF
15309  
15310 else
15311   echo "$ac_t""no" 1>&6
15312 fi
15313 done
15314
15315         if test $ac_cv_header_mach_cthreads_h = yes ; then
15316                 ol_with_threads=found
15317
15318                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15319 echo "configure:15320: checking for cthread_fork" >&5
15320 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15321   echo $ac_n "(cached) $ac_c" 1>&6
15322 else
15323   cat > conftest.$ac_ext <<EOF
15324 #line 15325 "configure"
15325 #include "confdefs.h"
15326 /* System header to define __stub macros and hopefully few prototypes,
15327     which can conflict with char cthread_fork(); below.  */
15328 #include <assert.h>
15329 /* Override any gcc2 internal prototype to avoid an error.  */
15330 /* We use char because int might match the return type of a gcc2
15331     builtin and then its argument prototype would still apply.  */
15332 char cthread_fork();
15333 char (*f)();
15334
15335 int main() {
15336
15337 /* The GNU C library defines this for functions which it implements
15338     to always fail with ENOSYS.  Some functions are actually named
15339     something starting with __ and the normal name is an alias.  */
15340 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15341 choke me
15342 #else
15343 f = cthread_fork;
15344 #endif
15345
15346 ; return 0; }
15347 EOF
15348 if { (eval echo configure:15349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15349   rm -rf conftest*
15350   eval "ac_cv_func_cthread_fork=yes"
15351 else
15352   echo "configure: failed program was:" >&5
15353   cat conftest.$ac_ext >&5
15354   rm -rf conftest*
15355   eval "ac_cv_func_cthread_fork=no"
15356 fi
15357 rm -f conftest*
15358 fi
15359
15360 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15361   echo "$ac_t""yes" 1>&6
15362   ol_link_threads=yes
15363 else
15364   echo "$ac_t""no" 1>&6
15365 fi
15366
15367
15368                 if test $ol_link_threads = no ; then
15369                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15370 echo "configure:15371: checking for cthread_fork with -all_load" >&5
15371 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15372   echo $ac_n "(cached) $ac_c" 1>&6
15373 else
15374   
15375                                                                 save_LIBS="$LIBS"
15376                                 LIBS="-all_load $LIBS"
15377                                 cat > conftest.$ac_ext <<EOF
15378 #line 15379 "configure"
15379 #include "confdefs.h"
15380 #include <mach/cthreads.h>
15381 int main() {
15382
15383                                         cthread_fork((void *)0, (void *)0);
15384                                         
15385 ; return 0; }
15386 EOF
15387 if { (eval echo configure:15388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15388   rm -rf conftest*
15389   ol_cv_cthread_all_load=yes
15390 else
15391   echo "configure: failed program was:" >&5
15392   cat conftest.$ac_ext >&5
15393   rm -rf conftest*
15394   ol_cv_cthread_all_load=no
15395 fi
15396 rm -f conftest*
15397                                                                 LIBS="$save_LIBS"
15398                         
15399 fi
15400
15401 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15402
15403                         if test $ol_cv_cthread_all_load = yes ; then
15404                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15405                                 ol_link_threads=mach
15406                                 ol_with_threads=found
15407                         fi
15408                 fi
15409
15410         elif test $ac_cv_header_cthreads_h = yes ; then
15411                                 
15412                 ol_with_threads=found
15413  
15414                                 save_LIBS="$LIBS"
15415                 LIBS="$LIBS -lthreads"
15416                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15417 echo "configure:15418: checking for cthread_fork" >&5
15418 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15419   echo $ac_n "(cached) $ac_c" 1>&6
15420 else
15421   cat > conftest.$ac_ext <<EOF
15422 #line 15423 "configure"
15423 #include "confdefs.h"
15424 /* System header to define __stub macros and hopefully few prototypes,
15425     which can conflict with char cthread_fork(); below.  */
15426 #include <assert.h>
15427 /* Override any gcc2 internal prototype to avoid an error.  */
15428 /* We use char because int might match the return type of a gcc2
15429     builtin and then its argument prototype would still apply.  */
15430 char cthread_fork();
15431 char (*f)();
15432
15433 int main() {
15434
15435 /* The GNU C library defines this for functions which it implements
15436     to always fail with ENOSYS.  Some functions are actually named
15437     something starting with __ and the normal name is an alias.  */
15438 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15439 choke me
15440 #else
15441 f = cthread_fork;
15442 #endif
15443
15444 ; return 0; }
15445 EOF
15446 if { (eval echo configure:15447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15447   rm -rf conftest*
15448   eval "ac_cv_func_cthread_fork=yes"
15449 else
15450   echo "configure: failed program was:" >&5
15451   cat conftest.$ac_ext >&5
15452   rm -rf conftest*
15453   eval "ac_cv_func_cthread_fork=no"
15454 fi
15455 rm -f conftest*
15456 fi
15457
15458 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15459   echo "$ac_t""yes" 1>&6
15460   ol_link_threads=yes
15461 else
15462   echo "$ac_t""no" 1>&6
15463 fi
15464
15465                 LIBS="$save_LIBS"
15466
15467                 if test $ol_link_threads = yes ; then
15468                         LTHREAD_LIBS="-lthreads"
15469                         ol_link_threads=mach
15470                         ol_with_threads=found
15471                 else
15472                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15473                 fi
15474
15475         elif test $ol_with_threads = mach ; then
15476                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15477         fi
15478
15479         if test $ol_link_threads = mach ; then
15480                 cat >> confdefs.h <<\EOF
15481 #define HAVE_MACH_CTHREADS 1
15482 EOF
15483
15484         elif test $ol_with_threads = found ; then
15485                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15486         fi
15487 fi
15488
15489 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15490         -o $ol_with_threads = pth ; then
15491
15492         for ac_hdr in pth.h
15493 do
15494 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15495 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15496 echo "configure:15497: checking for $ac_hdr" >&5
15497 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15498   echo $ac_n "(cached) $ac_c" 1>&6
15499 else
15500   cat > conftest.$ac_ext <<EOF
15501 #line 15502 "configure"
15502 #include "confdefs.h"
15503 #include <$ac_hdr>
15504 EOF
15505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15506 { (eval echo configure:15507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15508 if test -z "$ac_err"; then
15509   rm -rf conftest*
15510   eval "ac_cv_header_$ac_safe=yes"
15511 else
15512   echo "$ac_err" >&5
15513   echo "configure: failed program was:" >&5
15514   cat conftest.$ac_ext >&5
15515   rm -rf conftest*
15516   eval "ac_cv_header_$ac_safe=no"
15517 fi
15518 rm -f conftest*
15519 fi
15520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15521   echo "$ac_t""yes" 1>&6
15522     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15523   cat >> confdefs.h <<EOF
15524 #define $ac_tr_hdr 1
15525 EOF
15526  
15527 else
15528   echo "$ac_t""no" 1>&6
15529 fi
15530 done
15531
15532
15533         if test $ac_cv_header_pth_h = yes ; then
15534                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15535 echo "configure:15536: checking for pth_version in -lpth" >&5
15536 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15537 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15538   echo $ac_n "(cached) $ac_c" 1>&6
15539 else
15540   ac_save_LIBS="$LIBS"
15541 LIBS="-lpth  $LIBS"
15542 cat > conftest.$ac_ext <<EOF
15543 #line 15544 "configure"
15544 #include "confdefs.h"
15545 /* Override any gcc2 internal prototype to avoid an error.  */
15546 /* We use char because int might match the return type of a gcc2
15547     builtin and then its argument prototype would still apply.  */
15548 char pth_version();
15549
15550 int main() {
15551 pth_version()
15552 ; return 0; }
15553 EOF
15554 if { (eval echo configure:15555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15555   rm -rf conftest*
15556   eval "ac_cv_lib_$ac_lib_var=yes"
15557 else
15558   echo "configure: failed program was:" >&5
15559   cat conftest.$ac_ext >&5
15560   rm -rf conftest*
15561   eval "ac_cv_lib_$ac_lib_var=no"
15562 fi
15563 rm -f conftest*
15564 LIBS="$ac_save_LIBS"
15565
15566 fi
15567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15568   echo "$ac_t""yes" 1>&6
15569   have_pth=yes
15570 else
15571   echo "$ac_t""no" 1>&6
15572 have_pth=no
15573 fi
15574
15575
15576                 if test $have_pth = yes ; then
15577                         cat >> confdefs.h <<\EOF
15578 #define HAVE_GNU_PTH 1
15579 EOF
15580
15581                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15582                         ol_link_threads=pth
15583                         ol_with_threads=found
15584
15585                         if test $ol_with_yielding_select = auto ; then
15586                                 ol_with_yielding_select=yes
15587                         fi
15588                 fi
15589         fi
15590 fi
15591
15592 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15593         -o $ol_with_threads = lwp ; then
15594
15595                 for ac_hdr in thread.h synch.h
15596 do
15597 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15598 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15599 echo "configure:15600: checking for $ac_hdr" >&5
15600 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15601   echo $ac_n "(cached) $ac_c" 1>&6
15602 else
15603   cat > conftest.$ac_ext <<EOF
15604 #line 15605 "configure"
15605 #include "confdefs.h"
15606 #include <$ac_hdr>
15607 EOF
15608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15609 { (eval echo configure:15610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15611 if test -z "$ac_err"; then
15612   rm -rf conftest*
15613   eval "ac_cv_header_$ac_safe=yes"
15614 else
15615   echo "$ac_err" >&5
15616   echo "configure: failed program was:" >&5
15617   cat conftest.$ac_ext >&5
15618   rm -rf conftest*
15619   eval "ac_cv_header_$ac_safe=no"
15620 fi
15621 rm -f conftest*
15622 fi
15623 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15624   echo "$ac_t""yes" 1>&6
15625     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15626   cat >> confdefs.h <<EOF
15627 #define $ac_tr_hdr 1
15628 EOF
15629  
15630 else
15631   echo "$ac_t""no" 1>&6
15632 fi
15633 done
15634
15635         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15636                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15637 echo "configure:15638: checking for thr_create in -lthread" >&5
15638 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15639 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15640   echo $ac_n "(cached) $ac_c" 1>&6
15641 else
15642   ac_save_LIBS="$LIBS"
15643 LIBS="-lthread  $LIBS"
15644 cat > conftest.$ac_ext <<EOF
15645 #line 15646 "configure"
15646 #include "confdefs.h"
15647 /* Override any gcc2 internal prototype to avoid an error.  */
15648 /* We use char because int might match the return type of a gcc2
15649     builtin and then its argument prototype would still apply.  */
15650 char thr_create();
15651
15652 int main() {
15653 thr_create()
15654 ; return 0; }
15655 EOF
15656 if { (eval echo configure:15657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15657   rm -rf conftest*
15658   eval "ac_cv_lib_$ac_lib_var=yes"
15659 else
15660   echo "configure: failed program was:" >&5
15661   cat conftest.$ac_ext >&5
15662   rm -rf conftest*
15663   eval "ac_cv_lib_$ac_lib_var=no"
15664 fi
15665 rm -f conftest*
15666 LIBS="$ac_save_LIBS"
15667
15668 fi
15669 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15670   echo "$ac_t""yes" 1>&6
15671   have_thr=yes
15672 else
15673   echo "$ac_t""no" 1>&6
15674 have_thr=no
15675 fi
15676
15677
15678                 if test $have_thr = yes ; then
15679                         cat >> confdefs.h <<\EOF
15680 #define HAVE_THR 1
15681 EOF
15682
15683                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15684                         ol_link_threads=thr
15685
15686                         if test $ol_with_yielding_select = auto ; then
15687                                 ol_with_yielding_select=yes
15688                         fi
15689
15690                                                 for ac_func in \
15691                                 thr_setconcurrency \
15692                                 thr_getconcurrency \
15693                         
15694 do
15695 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15696 echo "configure:15697: checking for $ac_func" >&5
15697 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15698   echo $ac_n "(cached) $ac_c" 1>&6
15699 else
15700   cat > conftest.$ac_ext <<EOF
15701 #line 15702 "configure"
15702 #include "confdefs.h"
15703 /* System header to define __stub macros and hopefully few prototypes,
15704     which can conflict with char $ac_func(); below.  */
15705 #include <assert.h>
15706 /* Override any gcc2 internal prototype to avoid an error.  */
15707 /* We use char because int might match the return type of a gcc2
15708     builtin and then its argument prototype would still apply.  */
15709 char $ac_func();
15710 char (*f)();
15711
15712 int main() {
15713
15714 /* The GNU C library defines this for functions which it implements
15715     to always fail with ENOSYS.  Some functions are actually named
15716     something starting with __ and the normal name is an alias.  */
15717 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15718 choke me
15719 #else
15720 f = $ac_func;
15721 #endif
15722
15723 ; return 0; }
15724 EOF
15725 if { (eval echo configure:15726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15726   rm -rf conftest*
15727   eval "ac_cv_func_$ac_func=yes"
15728 else
15729   echo "configure: failed program was:" >&5
15730   cat conftest.$ac_ext >&5
15731   rm -rf conftest*
15732   eval "ac_cv_func_$ac_func=no"
15733 fi
15734 rm -f conftest*
15735 fi
15736
15737 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15738   echo "$ac_t""yes" 1>&6
15739     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15740   cat >> confdefs.h <<EOF
15741 #define $ac_tr_func 1
15742 EOF
15743  
15744 else
15745   echo "$ac_t""no" 1>&6
15746 fi
15747 done
15748
15749                 fi
15750         fi
15751
15752                 for ac_hdr in lwp/lwp.h
15753 do
15754 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15755 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15756 echo "configure:15757: checking for $ac_hdr" >&5
15757 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15758   echo $ac_n "(cached) $ac_c" 1>&6
15759 else
15760   cat > conftest.$ac_ext <<EOF
15761 #line 15762 "configure"
15762 #include "confdefs.h"
15763 #include <$ac_hdr>
15764 EOF
15765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15766 { (eval echo configure:15767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15768 if test -z "$ac_err"; then
15769   rm -rf conftest*
15770   eval "ac_cv_header_$ac_safe=yes"
15771 else
15772   echo "$ac_err" >&5
15773   echo "configure: failed program was:" >&5
15774   cat conftest.$ac_ext >&5
15775   rm -rf conftest*
15776   eval "ac_cv_header_$ac_safe=no"
15777 fi
15778 rm -f conftest*
15779 fi
15780 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15781   echo "$ac_t""yes" 1>&6
15782     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15783   cat >> confdefs.h <<EOF
15784 #define $ac_tr_hdr 1
15785 EOF
15786  
15787 else
15788   echo "$ac_t""no" 1>&6
15789 fi
15790 done
15791
15792         if test $ac_cv_header_lwp_lwp_h = yes ; then
15793                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15794 echo "configure:15795: checking for lwp_create in -llwp" >&5
15795 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15796 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15797   echo $ac_n "(cached) $ac_c" 1>&6
15798 else
15799   ac_save_LIBS="$LIBS"
15800 LIBS="-llwp  $LIBS"
15801 cat > conftest.$ac_ext <<EOF
15802 #line 15803 "configure"
15803 #include "confdefs.h"
15804 /* Override any gcc2 internal prototype to avoid an error.  */
15805 /* We use char because int might match the return type of a gcc2
15806     builtin and then its argument prototype would still apply.  */
15807 char lwp_create();
15808
15809 int main() {
15810 lwp_create()
15811 ; return 0; }
15812 EOF
15813 if { (eval echo configure:15814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15814   rm -rf conftest*
15815   eval "ac_cv_lib_$ac_lib_var=yes"
15816 else
15817   echo "configure: failed program was:" >&5
15818   cat conftest.$ac_ext >&5
15819   rm -rf conftest*
15820   eval "ac_cv_lib_$ac_lib_var=no"
15821 fi
15822 rm -f conftest*
15823 LIBS="$ac_save_LIBS"
15824
15825 fi
15826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15827   echo "$ac_t""yes" 1>&6
15828   have_lwp=yes
15829 else
15830   echo "$ac_t""no" 1>&6
15831 have_lwp=no
15832 fi
15833
15834
15835                 if test $have_lwp = yes ; then
15836                         cat >> confdefs.h <<\EOF
15837 #define HAVE_LWP 1
15838 EOF
15839
15840                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15841                         ol_link_threads=lwp
15842
15843                         if test $ol_with_yielding_select = auto ; then
15844                                 ol_with_yielding_select=no
15845                         fi
15846                 fi
15847         fi
15848 fi
15849
15850 if test $ol_with_yielding_select = yes ; then
15851         cat >> confdefs.h <<\EOF
15852 #define HAVE_YIELDING_SELECT 1
15853 EOF
15854
15855 fi
15856
15857 if test $ol_with_threads = manual ; then
15858                 ol_link_threads=yes
15859
15860         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15861
15862         for ac_hdr in pthread.h sched.h
15863 do
15864 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15865 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15866 echo "configure:15867: checking for $ac_hdr" >&5
15867 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15868   echo $ac_n "(cached) $ac_c" 1>&6
15869 else
15870   cat > conftest.$ac_ext <<EOF
15871 #line 15872 "configure"
15872 #include "confdefs.h"
15873 #include <$ac_hdr>
15874 EOF
15875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15876 { (eval echo configure:15877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15878 if test -z "$ac_err"; then
15879   rm -rf conftest*
15880   eval "ac_cv_header_$ac_safe=yes"
15881 else
15882   echo "$ac_err" >&5
15883   echo "configure: failed program was:" >&5
15884   cat conftest.$ac_ext >&5
15885   rm -rf conftest*
15886   eval "ac_cv_header_$ac_safe=no"
15887 fi
15888 rm -f conftest*
15889 fi
15890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15891   echo "$ac_t""yes" 1>&6
15892     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15893   cat >> confdefs.h <<EOF
15894 #define $ac_tr_hdr 1
15895 EOF
15896  
15897 else
15898   echo "$ac_t""no" 1>&6
15899 fi
15900 done
15901
15902         for ac_func in sched_yield pthread_yield
15903 do
15904 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15905 echo "configure:15906: checking for $ac_func" >&5
15906 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15907   echo $ac_n "(cached) $ac_c" 1>&6
15908 else
15909   cat > conftest.$ac_ext <<EOF
15910 #line 15911 "configure"
15911 #include "confdefs.h"
15912 /* System header to define __stub macros and hopefully few prototypes,
15913     which can conflict with char $ac_func(); below.  */
15914 #include <assert.h>
15915 /* Override any gcc2 internal prototype to avoid an error.  */
15916 /* We use char because int might match the return type of a gcc2
15917     builtin and then its argument prototype would still apply.  */
15918 char $ac_func();
15919 char (*f)();
15920
15921 int main() {
15922
15923 /* The GNU C library defines this for functions which it implements
15924     to always fail with ENOSYS.  Some functions are actually named
15925     something starting with __ and the normal name is an alias.  */
15926 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15927 choke me
15928 #else
15929 f = $ac_func;
15930 #endif
15931
15932 ; return 0; }
15933 EOF
15934 if { (eval echo configure:15935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15935   rm -rf conftest*
15936   eval "ac_cv_func_$ac_func=yes"
15937 else
15938   echo "configure: failed program was:" >&5
15939   cat conftest.$ac_ext >&5
15940   rm -rf conftest*
15941   eval "ac_cv_func_$ac_func=no"
15942 fi
15943 rm -f conftest*
15944 fi
15945
15946 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15947   echo "$ac_t""yes" 1>&6
15948     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15949   cat >> confdefs.h <<EOF
15950 #define $ac_tr_func 1
15951 EOF
15952  
15953 else
15954   echo "$ac_t""no" 1>&6
15955 fi
15956 done
15957
15958         
15959         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15960 echo "configure:15961: checking for LinuxThreads pthread.h" >&5
15961 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15962   echo $ac_n "(cached) $ac_c" 1>&6
15963 else
15964   cat > conftest.$ac_ext <<EOF
15965 #line 15966 "configure"
15966 #include "confdefs.h"
15967 #include <pthread.h>
15968 EOF
15969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15970   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15971   rm -rf conftest*
15972   ol_cv_header_linux_threads=yes
15973 else
15974   rm -rf conftest*
15975   ol_cv_header_linux_threads=no
15976 fi
15977 rm -f conftest*
15978
15979                 
15980 fi
15981
15982 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15983         if test $ol_cv_header_linux_threads = yes; then
15984                 cat >> confdefs.h <<\EOF
15985 #define HAVE_LINUX_THREADS 1
15986 EOF
15987
15988         fi
15989
15990
15991         for ac_hdr in mach/cthreads.h
15992 do
15993 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15994 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15995 echo "configure:15996: checking for $ac_hdr" >&5
15996 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15997   echo $ac_n "(cached) $ac_c" 1>&6
15998 else
15999   cat > conftest.$ac_ext <<EOF
16000 #line 16001 "configure"
16001 #include "confdefs.h"
16002 #include <$ac_hdr>
16003 EOF
16004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16005 { (eval echo configure:16006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16007 if test -z "$ac_err"; then
16008   rm -rf conftest*
16009   eval "ac_cv_header_$ac_safe=yes"
16010 else
16011   echo "$ac_err" >&5
16012   echo "configure: failed program was:" >&5
16013   cat conftest.$ac_ext >&5
16014   rm -rf conftest*
16015   eval "ac_cv_header_$ac_safe=no"
16016 fi
16017 rm -f conftest*
16018 fi
16019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16020   echo "$ac_t""yes" 1>&6
16021     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16022   cat >> confdefs.h <<EOF
16023 #define $ac_tr_hdr 1
16024 EOF
16025  
16026 else
16027   echo "$ac_t""no" 1>&6
16028 fi
16029 done
16030
16031         for ac_hdr in lwp/lwp.h
16032 do
16033 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16034 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16035 echo "configure:16036: checking for $ac_hdr" >&5
16036 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16037   echo $ac_n "(cached) $ac_c" 1>&6
16038 else
16039   cat > conftest.$ac_ext <<EOF
16040 #line 16041 "configure"
16041 #include "confdefs.h"
16042 #include <$ac_hdr>
16043 EOF
16044 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16045 { (eval echo configure:16046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16046 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16047 if test -z "$ac_err"; then
16048   rm -rf conftest*
16049   eval "ac_cv_header_$ac_safe=yes"
16050 else
16051   echo "$ac_err" >&5
16052   echo "configure: failed program was:" >&5
16053   cat conftest.$ac_ext >&5
16054   rm -rf conftest*
16055   eval "ac_cv_header_$ac_safe=no"
16056 fi
16057 rm -f conftest*
16058 fi
16059 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16060   echo "$ac_t""yes" 1>&6
16061     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16062   cat >> confdefs.h <<EOF
16063 #define $ac_tr_hdr 1
16064 EOF
16065  
16066 else
16067   echo "$ac_t""no" 1>&6
16068 fi
16069 done
16070
16071         for ac_hdr in thread.h synch.h
16072 do
16073 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16074 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16075 echo "configure:16076: checking for $ac_hdr" >&5
16076 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16077   echo $ac_n "(cached) $ac_c" 1>&6
16078 else
16079   cat > conftest.$ac_ext <<EOF
16080 #line 16081 "configure"
16081 #include "confdefs.h"
16082 #include <$ac_hdr>
16083 EOF
16084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16085 { (eval echo configure:16086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16087 if test -z "$ac_err"; then
16088   rm -rf conftest*
16089   eval "ac_cv_header_$ac_safe=yes"
16090 else
16091   echo "$ac_err" >&5
16092   echo "configure: failed program was:" >&5
16093   cat conftest.$ac_ext >&5
16094   rm -rf conftest*
16095   eval "ac_cv_header_$ac_safe=no"
16096 fi
16097 rm -f conftest*
16098 fi
16099 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16100   echo "$ac_t""yes" 1>&6
16101     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16102   cat >> confdefs.h <<EOF
16103 #define $ac_tr_hdr 1
16104 EOF
16105  
16106 else
16107   echo "$ac_t""no" 1>&6
16108 fi
16109 done
16110
16111 fi
16112
16113 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16114                         cat >> confdefs.h <<\EOF
16115 #define REENTRANT 1
16116 EOF
16117
16118         cat >> confdefs.h <<\EOF
16119 #define _REENTRANT 1
16120 EOF
16121
16122         cat >> confdefs.h <<\EOF
16123 #define THREAD_SAFE 1
16124 EOF
16125
16126         cat >> confdefs.h <<\EOF
16127 #define _THREAD_SAFE 1
16128 EOF
16129
16130         cat >> confdefs.h <<\EOF
16131 #define THREADSAFE 1
16132 EOF
16133
16134         cat >> confdefs.h <<\EOF
16135 #define _THREADSAFE 1
16136 EOF
16137
16138         cat >> confdefs.h <<\EOF
16139 #define _SGI_MP_SOURCE 1
16140 EOF
16141
16142
16143                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16144 echo "configure:16145: checking for thread specific errno" >&5
16145 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16146   echo $ac_n "(cached) $ac_c" 1>&6
16147 else
16148   
16149                 cat > conftest.$ac_ext <<EOF
16150 #line 16151 "configure"
16151 #include "confdefs.h"
16152 #include <errno.h>
16153 int main() {
16154 errno = 0;
16155 ; return 0; }
16156 EOF
16157 if { (eval echo configure:16158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16158   rm -rf conftest*
16159   ol_cv_errno_thread_specific=yes
16160 else
16161   echo "configure: failed program was:" >&5
16162   cat conftest.$ac_ext >&5
16163   rm -rf conftest*
16164   ol_cv_errno_thread_specific=no
16165 fi
16166 rm -f conftest*
16167         
16168 fi
16169
16170 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16171
16172                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16173 echo "configure:16174: checking for thread specific h_errno" >&5
16174 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16175   echo $ac_n "(cached) $ac_c" 1>&6
16176 else
16177   
16178                 cat > conftest.$ac_ext <<EOF
16179 #line 16180 "configure"
16180 #include "confdefs.h"
16181 #include <netdb.h>
16182 int main() {
16183 h_errno = 0;
16184 ; return 0; }
16185 EOF
16186 if { (eval echo configure:16187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16187   rm -rf conftest*
16188   ol_cv_h_errno_thread_specific=yes
16189 else
16190   echo "configure: failed program was:" >&5
16191   cat conftest.$ac_ext >&5
16192   rm -rf conftest*
16193   ol_cv_h_errno_thread_specific=no
16194 fi
16195 rm -f conftest*
16196         
16197 fi
16198
16199 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16200
16201         if test $ol_cv_errno_thread_specific != yes \
16202                 -o $ol_cv_h_errno_thread_specific != yes ; then
16203                 LIBS="$LTHREAD_LIBS $LIBS"
16204                 LTHREAD_LIBS=""
16205         fi
16206
16207 fi  
16208
16209 if test $ol_link_threads = no ; then
16210         if test $ol_with_threads = yes ; then
16211                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16212         fi
16213
16214         if test $ol_with_threads = auto ; then
16215                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16216                 ol_with_threads=no
16217         fi
16218
16219         cat >> confdefs.h <<\EOF
16220 #define NO_THREADS 1
16221 EOF
16222
16223         LTHREAD_LIBS=""
16224 fi
16225
16226 if test $ol_link_threads != no ; then
16227         cat >> confdefs.h <<\EOF
16228 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16229 EOF
16230
16231 fi
16232
16233 for ac_func in \
16234         ctime_r                 \
16235         gethostbyname_r gethostbyaddr_r \
16236
16237 do
16238 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16239 echo "configure:16240: checking for $ac_func" >&5
16240 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16241   echo $ac_n "(cached) $ac_c" 1>&6
16242 else
16243   cat > conftest.$ac_ext <<EOF
16244 #line 16245 "configure"
16245 #include "confdefs.h"
16246 /* System header to define __stub macros and hopefully few prototypes,
16247     which can conflict with char $ac_func(); below.  */
16248 #include <assert.h>
16249 /* Override any gcc2 internal prototype to avoid an error.  */
16250 /* We use char because int might match the return type of a gcc2
16251     builtin and then its argument prototype would still apply.  */
16252 char $ac_func();
16253 char (*f)();
16254
16255 int main() {
16256
16257 /* The GNU C library defines this for functions which it implements
16258     to always fail with ENOSYS.  Some functions are actually named
16259     something starting with __ and the normal name is an alias.  */
16260 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16261 choke me
16262 #else
16263 f = $ac_func;
16264 #endif
16265
16266 ; return 0; }
16267 EOF
16268 if { (eval echo configure:16269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16269   rm -rf conftest*
16270   eval "ac_cv_func_$ac_func=yes"
16271 else
16272   echo "configure: failed program was:" >&5
16273   cat conftest.$ac_ext >&5
16274   rm -rf conftest*
16275   eval "ac_cv_func_$ac_func=no"
16276 fi
16277 rm -f conftest*
16278 fi
16279
16280 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16281   echo "$ac_t""yes" 1>&6
16282     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16283   cat >> confdefs.h <<EOF
16284 #define $ac_tr_func 1
16285 EOF
16286  
16287 else
16288   echo "$ac_t""no" 1>&6
16289 fi
16290 done
16291
16292
16293 if test "$ac_cv_func_ctime_r" = no ; then
16294         ol_cv_func_ctime_r_nargs=0
16295 else
16296         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16297 echo "configure:16298: checking number of arguments of ctime_r" >&5
16298 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16299   echo $ac_n "(cached) $ac_c" 1>&6
16300 else
16301   cat > conftest.$ac_ext <<EOF
16302 #line 16303 "configure"
16303 #include "confdefs.h"
16304 #include <time.h>
16305 int main() {
16306 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16307 ; return 0; }
16308 EOF
16309 if { (eval echo configure:16310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16310   rm -rf conftest*
16311   ol_cv_func_ctime_r_nargs3=yes
16312 else
16313   echo "configure: failed program was:" >&5
16314   cat conftest.$ac_ext >&5
16315   rm -rf conftest*
16316   ol_cv_func_ctime_r_nargs3=no
16317 fi
16318 rm -f conftest*
16319
16320         cat > conftest.$ac_ext <<EOF
16321 #line 16322 "configure"
16322 #include "confdefs.h"
16323 #include <time.h>
16324 int main() {
16325 time_t ti; char *buffer; ctime_r(&ti,buffer);
16326 ; return 0; }
16327 EOF
16328 if { (eval echo configure:16329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16329   rm -rf conftest*
16330   ol_cv_func_ctime_r_nargs2=yes
16331 else
16332   echo "configure: failed program was:" >&5
16333   cat conftest.$ac_ext >&5
16334   rm -rf conftest*
16335   ol_cv_func_ctime_r_nargs2=no
16336 fi
16337 rm -f conftest*
16338
16339         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16340                 $ol_cv_func_ctime_r_nargs2 = no ; then
16341
16342                 ol_cv_func_ctime_r_nargs=3
16343
16344         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16345                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16346
16347                 ol_cv_func_ctime_r_nargs=2
16348
16349         else
16350                 ol_cv_func_ctime_r_nargs=0
16351         fi
16352   
16353 fi
16354
16355 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16356
16357   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16358         cat >> confdefs.h <<EOF
16359 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16360 EOF
16361
16362   fi
16363
16364 fi
16365
16366 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16367         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16368 echo "configure:16369: checking number of arguments of gethostbyname_r" >&5
16369 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16370   echo $ac_n "(cached) $ac_c" 1>&6
16371 else
16372   cat > conftest.$ac_ext <<EOF
16373 #line 16374 "configure"
16374 #include "confdefs.h"
16375 #include <sys/types.h>
16376 #include <sys/socket.h>
16377 #include <netinet/in.h>
16378 #include <netdb.h>
16379 #define BUFSIZE (sizeof(struct hostent)+10)
16380 int main() {
16381 struct hostent hent; char buffer[BUFSIZE];
16382                 int bufsize=BUFSIZE;int h_errno;
16383                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16384                         buffer, bufsize, &h_errno);
16385 ; return 0; }
16386 EOF
16387 if { (eval echo configure:16388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16388   rm -rf conftest*
16389   ol_cv_func_gethostbyname_r_nargs5=yes
16390 else
16391   echo "configure: failed program was:" >&5
16392   cat conftest.$ac_ext >&5
16393   rm -rf conftest*
16394   ol_cv_func_gethostbyname_r_nargs5=no
16395 fi
16396 rm -f conftest*
16397
16398         cat > conftest.$ac_ext <<EOF
16399 #line 16400 "configure"
16400 #include "confdefs.h"
16401 #include <sys/types.h>
16402 #include <sys/socket.h>
16403 #include <netinet/in.h>
16404 #include <netdb.h>
16405 #define BUFSIZE (sizeof(struct hostent)+10)
16406 int main() {
16407 struct hostent hent;struct hostent *rhent;
16408                 char buffer[BUFSIZE];
16409                 int bufsize=BUFSIZE;int h_errno;
16410                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16411                         &rhent, &h_errno);
16412 ; return 0; }
16413 EOF
16414 if { (eval echo configure:16415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16415   rm -rf conftest*
16416   ol_cv_func_gethostbyname_r_nargs6=yes
16417 else
16418   echo "configure: failed program was:" >&5
16419   cat conftest.$ac_ext >&5
16420   rm -rf conftest*
16421   ol_cv_func_gethostbyname_r_nargs6=no
16422 fi
16423 rm -f conftest*
16424
16425         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16426                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16427
16428                 ol_cv_func_gethostbyname_r_nargs=5
16429
16430         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16431                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16432
16433                 ol_cv_func_gethostbyname_r_nargs=6
16434
16435         else
16436                 ol_cv_func_gethostbyname_r_nargs=0
16437         fi
16438   
16439 fi
16440
16441 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16442   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16443         cat >> confdefs.h <<EOF
16444 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16445 EOF
16446
16447   fi
16448
16449 else
16450         ol_cv_func_gethostbyname_r_nargs=0
16451 fi
16452  
16453 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16454         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16455 echo "configure:16456: checking number of arguments of gethostbyaddr_r" >&5
16456 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16457   echo $ac_n "(cached) $ac_c" 1>&6
16458 else
16459   cat > conftest.$ac_ext <<EOF
16460 #line 16461 "configure"
16461 #include "confdefs.h"
16462 #include <sys/types.h>
16463 #include <sys/socket.h>
16464 #include <netinet/in.h>
16465 #include <netdb.h>
16466 #define BUFSIZE (sizeof(struct hostent)+10)
16467 int main() {
16468 struct hostent hent; char buffer[BUFSIZE]; 
16469             struct in_addr add;
16470             size_t alen=sizeof(struct in_addr);
16471             int bufsize=BUFSIZE;int h_errno;
16472                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16473                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16474 ; return 0; }
16475 EOF
16476 if { (eval echo configure:16477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16477   rm -rf conftest*
16478   ol_cv_func_gethostbyaddr_r_nargs7=yes
16479 else
16480   echo "configure: failed program was:" >&5
16481   cat conftest.$ac_ext >&5
16482   rm -rf conftest*
16483   ol_cv_func_gethostbyaddr_r_nargs7=no
16484 fi
16485 rm -f conftest*
16486
16487         cat > conftest.$ac_ext <<EOF
16488 #line 16489 "configure"
16489 #include "confdefs.h"
16490 #include <sys/types.h>
16491 #include <sys/socket.h>
16492 #include <netinet/in.h>
16493 #include <netdb.h>
16494 #define BUFSIZE (sizeof(struct hostent)+10)
16495 int main() {
16496 struct hostent hent;
16497                 struct hostent *rhent; char buffer[BUFSIZE]; 
16498                 struct in_addr add;
16499                 size_t alen=sizeof(struct in_addr);
16500                 int bufsize=BUFSIZE;int h_errno;
16501                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16502                         alen, AF_INET, &hent, buffer, bufsize, 
16503                         &rhent, &h_errno);
16504 ; return 0; }
16505 EOF
16506 if { (eval echo configure:16507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16507   rm -rf conftest*
16508   ol_cv_func_gethostbyaddr_r_nargs8=yes
16509 else
16510   echo "configure: failed program was:" >&5
16511   cat conftest.$ac_ext >&5
16512   rm -rf conftest*
16513   ol_cv_func_gethostbyaddr_r_nargs8=no
16514 fi
16515 rm -f conftest*
16516
16517         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16518                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16519
16520                 ol_cv_func_gethostbyaddr_r_nargs=7
16521
16522         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16523                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16524
16525                 ol_cv_func_gethostbyaddr_r_nargs=8
16526
16527         else
16528                 ol_cv_func_gethostbyaddr_r_nargs=0
16529         fi
16530   
16531 fi
16532
16533 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16534   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16535     cat >> confdefs.h <<EOF
16536 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16537 EOF
16538
16539   fi
16540
16541 else
16542         ol_cv_func_gethostbyaddr_r_nargs=0
16543 fi
16544
16545 ol_link_ldbm=no 
16546
16547 if test $ol_with_ldbm_api = auto \
16548         -o $ol_with_ldbm_api = berkeley \
16549         -o $ol_with_ldbm_api = bcompat ; then
16550
16551         if test $ol_with_ldbm_api = bcompat; then \
16552                 for ac_hdr in db_185.h db.h
16553 do
16554 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16555 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16556 echo "configure:16557: checking for $ac_hdr" >&5
16557 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16558   echo $ac_n "(cached) $ac_c" 1>&6
16559 else
16560   cat > conftest.$ac_ext <<EOF
16561 #line 16562 "configure"
16562 #include "confdefs.h"
16563 #include <$ac_hdr>
16564 EOF
16565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16566 { (eval echo configure:16567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16568 if test -z "$ac_err"; then
16569   rm -rf conftest*
16570   eval "ac_cv_header_$ac_safe=yes"
16571 else
16572   echo "$ac_err" >&5
16573   echo "configure: failed program was:" >&5
16574   cat conftest.$ac_ext >&5
16575   rm -rf conftest*
16576   eval "ac_cv_header_$ac_safe=no"
16577 fi
16578 rm -f conftest*
16579 fi
16580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16581   echo "$ac_t""yes" 1>&6
16582     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16583   cat >> confdefs.h <<EOF
16584 #define $ac_tr_hdr 1
16585 EOF
16586  
16587 else
16588   echo "$ac_t""no" 1>&6
16589 fi
16590 done
16591
16592 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16593         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16594 echo "configure:16595: checking if Berkeley DB header compatibility" >&5
16595 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16596   echo $ac_n "(cached) $ac_c" 1>&6
16597 else
16598   
16599                 cat > conftest.$ac_ext <<EOF
16600 #line 16601 "configure"
16601 #include "confdefs.h"
16602
16603 #if HAVE_DB_185_H
16604 #       include <db_185.h>
16605 #else
16606 #       include <db.h>
16607 #endif
16608
16609  /* this check could be improved */
16610 #ifndef DB_VERSION_MAJOR
16611 #       define DB_VERSION_MAJOR 1
16612 #endif
16613
16614 #if DB_VERSION_MAJOR == 1 
16615         __db_version_1
16616 #endif
16617
16618 EOF
16619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16620   egrep "__db_version_1" >/dev/null 2>&1; then
16621   rm -rf conftest*
16622   ol_cv_header_db1=yes
16623 else
16624   rm -rf conftest*
16625   ol_cv_header_db1=no
16626 fi
16627 rm -f conftest*
16628
16629 fi
16630
16631 echo "$ac_t""$ol_cv_header_db1" 1>&6
16632
16633         if test $ol_cv_header_db1 = yes ; then
16634                 ol_cv_lib_db=no
16635 if test $ol_cv_lib_db = no ; then
16636         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16637 echo "configure:16638: checking for Berkeley DB link (default)" >&5
16638 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16639   echo $ac_n "(cached) $ac_c" 1>&6
16640 else
16641   
16642         ol_DB_LIB=
16643         ol_LIBS=$LIBS
16644         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16645
16646         cat > conftest.$ac_ext <<EOF
16647 #line 16648 "configure"
16648 #include "confdefs.h"
16649
16650 #ifdef HAVE_DB_185_H
16651 # include <db_185.h>
16652 #else
16653 # include <db.h>
16654 #endif
16655
16656 #ifndef DB_VERSION_MAJOR
16657 # define DB_VERSION_MAJOR 1
16658 #endif
16659
16660 #ifndef NULL
16661 #define NULL ((void*)0)
16662 #endif
16663
16664 int main() {
16665
16666 #if DB_VERSION_MAJOR > 1
16667         {
16668                 char *version;
16669                 int major, minor, patch;
16670
16671                 version = db_version( &major, &minor, &patch );
16672
16673                 if( major != DB_VERSION_MAJOR ||
16674                         minor < DB_VERSION_MINOR )
16675                 {
16676                         printf("Berkeley DB version mismatch\n"
16677                                 "\texpected: %s\n\tgot: %s\n",
16678                                 DB_VERSION_STRING, version);
16679                         return 1;
16680                 }
16681         }
16682 #endif
16683
16684 #if DB_VERSION_MAJOR > 2
16685         db_env_create( NULL, 0 );
16686 #elif DB_VERSION_MAJOR > 1
16687         db_appexit( NULL );
16688 #else
16689         (void) dbopen( NULL, 0, 0, 0, NULL);
16690 #endif
16691
16692 ; return 0; }
16693 EOF
16694 if { (eval echo configure:16695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16695   rm -rf conftest*
16696   ol_cv_db_none=yes
16697 else
16698   echo "configure: failed program was:" >&5
16699   cat conftest.$ac_ext >&5
16700   rm -rf conftest*
16701   ol_cv_db_none=no
16702 fi
16703 rm -f conftest*
16704
16705         LIBS="$ol_LIBS"
16706
16707 fi
16708
16709 echo "$ac_t""$ol_cv_db_none" 1>&6
16710
16711         if test $ol_cv_db_none = yes ; then
16712                 ol_cv_lib_db=yes
16713         fi
16714 fi
16715
16716 if test $ol_cv_lib_db = no ; then
16717         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16718 echo "configure:16719: checking for Berkeley DB link (-ldb41)" >&5
16719 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16720   echo $ac_n "(cached) $ac_c" 1>&6
16721 else
16722   
16723         ol_DB_LIB=-ldb41
16724         ol_LIBS=$LIBS
16725         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16726
16727         cat > conftest.$ac_ext <<EOF
16728 #line 16729 "configure"
16729 #include "confdefs.h"
16730
16731 #ifdef HAVE_DB_185_H
16732 # include <db_185.h>
16733 #else
16734 # include <db.h>
16735 #endif
16736
16737 #ifndef DB_VERSION_MAJOR
16738 # define DB_VERSION_MAJOR 1
16739 #endif
16740
16741 #ifndef NULL
16742 #define NULL ((void*)0)
16743 #endif
16744
16745 int main() {
16746
16747 #if DB_VERSION_MAJOR > 1
16748         {
16749                 char *version;
16750                 int major, minor, patch;
16751
16752                 version = db_version( &major, &minor, &patch );
16753
16754                 if( major != DB_VERSION_MAJOR ||
16755                         minor < DB_VERSION_MINOR )
16756                 {
16757                         printf("Berkeley DB version mismatch\n"
16758                                 "\texpected: %s\n\tgot: %s\n",
16759                                 DB_VERSION_STRING, version);
16760                         return 1;
16761                 }
16762         }
16763 #endif
16764
16765 #if DB_VERSION_MAJOR > 2
16766         db_env_create( NULL, 0 );
16767 #elif DB_VERSION_MAJOR > 1
16768         db_appexit( NULL );
16769 #else
16770         (void) dbopen( NULL, 0, 0, 0, NULL);
16771 #endif
16772
16773 ; return 0; }
16774 EOF
16775 if { (eval echo configure:16776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16776   rm -rf conftest*
16777   ol_cv_db_db41=yes
16778 else
16779   echo "configure: failed program was:" >&5
16780   cat conftest.$ac_ext >&5
16781   rm -rf conftest*
16782   ol_cv_db_db41=no
16783 fi
16784 rm -f conftest*
16785
16786         LIBS="$ol_LIBS"
16787
16788 fi
16789
16790 echo "$ac_t""$ol_cv_db_db41" 1>&6
16791
16792         if test $ol_cv_db_db41 = yes ; then
16793                 ol_cv_lib_db=-ldb41
16794         fi
16795 fi
16796
16797 if test $ol_cv_lib_db = no ; then
16798         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16799 echo "configure:16800: checking for Berkeley DB link (-ldb-41)" >&5
16800 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16801   echo $ac_n "(cached) $ac_c" 1>&6
16802 else
16803   
16804         ol_DB_LIB=-ldb-41
16805         ol_LIBS=$LIBS
16806         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16807
16808         cat > conftest.$ac_ext <<EOF
16809 #line 16810 "configure"
16810 #include "confdefs.h"
16811
16812 #ifdef HAVE_DB_185_H
16813 # include <db_185.h>
16814 #else
16815 # include <db.h>
16816 #endif
16817
16818 #ifndef DB_VERSION_MAJOR
16819 # define DB_VERSION_MAJOR 1
16820 #endif
16821
16822 #ifndef NULL
16823 #define NULL ((void*)0)
16824 #endif
16825
16826 int main() {
16827
16828 #if DB_VERSION_MAJOR > 1
16829         {
16830                 char *version;
16831                 int major, minor, patch;
16832
16833                 version = db_version( &major, &minor, &patch );
16834
16835                 if( major != DB_VERSION_MAJOR ||
16836                         minor < DB_VERSION_MINOR )
16837                 {
16838                         printf("Berkeley DB version mismatch\n"
16839                                 "\texpected: %s\n\tgot: %s\n",
16840                                 DB_VERSION_STRING, version);
16841                         return 1;
16842                 }
16843         }
16844 #endif
16845
16846 #if DB_VERSION_MAJOR > 2
16847         db_env_create( NULL, 0 );
16848 #elif DB_VERSION_MAJOR > 1
16849         db_appexit( NULL );
16850 #else
16851         (void) dbopen( NULL, 0, 0, 0, NULL);
16852 #endif
16853
16854 ; return 0; }
16855 EOF
16856 if { (eval echo configure:16857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16857   rm -rf conftest*
16858   ol_cv_db_db_41=yes
16859 else
16860   echo "configure: failed program was:" >&5
16861   cat conftest.$ac_ext >&5
16862   rm -rf conftest*
16863   ol_cv_db_db_41=no
16864 fi
16865 rm -f conftest*
16866
16867         LIBS="$ol_LIBS"
16868
16869 fi
16870
16871 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16872
16873         if test $ol_cv_db_db_41 = yes ; then
16874                 ol_cv_lib_db=-ldb-41
16875         fi
16876 fi
16877
16878 if test $ol_cv_lib_db = no ; then
16879         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16880 echo "configure:16881: checking for Berkeley DB link (-ldb4)" >&5
16881 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16882   echo $ac_n "(cached) $ac_c" 1>&6
16883 else
16884   
16885         ol_DB_LIB=-ldb4
16886         ol_LIBS=$LIBS
16887         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16888
16889         cat > conftest.$ac_ext <<EOF
16890 #line 16891 "configure"
16891 #include "confdefs.h"
16892
16893 #ifdef HAVE_DB_185_H
16894 # include <db_185.h>
16895 #else
16896 # include <db.h>
16897 #endif
16898
16899 #ifndef DB_VERSION_MAJOR
16900 # define DB_VERSION_MAJOR 1
16901 #endif
16902
16903 #ifndef NULL
16904 #define NULL ((void*)0)
16905 #endif
16906
16907 int main() {
16908
16909 #if DB_VERSION_MAJOR > 1
16910         {
16911                 char *version;
16912                 int major, minor, patch;
16913
16914                 version = db_version( &major, &minor, &patch );
16915
16916                 if( major != DB_VERSION_MAJOR ||
16917                         minor < DB_VERSION_MINOR )
16918                 {
16919                         printf("Berkeley DB version mismatch\n"
16920                                 "\texpected: %s\n\tgot: %s\n",
16921                                 DB_VERSION_STRING, version);
16922                         return 1;
16923                 }
16924         }
16925 #endif
16926
16927 #if DB_VERSION_MAJOR > 2
16928         db_env_create( NULL, 0 );
16929 #elif DB_VERSION_MAJOR > 1
16930         db_appexit( NULL );
16931 #else
16932         (void) dbopen( NULL, 0, 0, 0, NULL);
16933 #endif
16934
16935 ; return 0; }
16936 EOF
16937 if { (eval echo configure:16938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16938   rm -rf conftest*
16939   ol_cv_db_db4=yes
16940 else
16941   echo "configure: failed program was:" >&5
16942   cat conftest.$ac_ext >&5
16943   rm -rf conftest*
16944   ol_cv_db_db4=no
16945 fi
16946 rm -f conftest*
16947
16948         LIBS="$ol_LIBS"
16949
16950 fi
16951
16952 echo "$ac_t""$ol_cv_db_db4" 1>&6
16953
16954         if test $ol_cv_db_db4 = yes ; then
16955                 ol_cv_lib_db=-ldb4
16956         fi
16957 fi
16958
16959 if test $ol_cv_lib_db = no ; then
16960         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16961 echo "configure:16962: checking for Berkeley DB link (-ldb-4)" >&5
16962 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16963   echo $ac_n "(cached) $ac_c" 1>&6
16964 else
16965   
16966         ol_DB_LIB=-ldb-4
16967         ol_LIBS=$LIBS
16968         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16969
16970         cat > conftest.$ac_ext <<EOF
16971 #line 16972 "configure"
16972 #include "confdefs.h"
16973
16974 #ifdef HAVE_DB_185_H
16975 # include <db_185.h>
16976 #else
16977 # include <db.h>
16978 #endif
16979
16980 #ifndef DB_VERSION_MAJOR
16981 # define DB_VERSION_MAJOR 1
16982 #endif
16983
16984 #ifndef NULL
16985 #define NULL ((void*)0)
16986 #endif
16987
16988 int main() {
16989
16990 #if DB_VERSION_MAJOR > 1
16991         {
16992                 char *version;
16993                 int major, minor, patch;
16994
16995                 version = db_version( &major, &minor, &patch );
16996
16997                 if( major != DB_VERSION_MAJOR ||
16998                         minor < DB_VERSION_MINOR )
16999                 {
17000                         printf("Berkeley DB version mismatch\n"
17001                                 "\texpected: %s\n\tgot: %s\n",
17002                                 DB_VERSION_STRING, version);
17003                         return 1;
17004                 }
17005         }
17006 #endif
17007
17008 #if DB_VERSION_MAJOR > 2
17009         db_env_create( NULL, 0 );
17010 #elif DB_VERSION_MAJOR > 1
17011         db_appexit( NULL );
17012 #else
17013         (void) dbopen( NULL, 0, 0, 0, NULL);
17014 #endif
17015
17016 ; return 0; }
17017 EOF
17018 if { (eval echo configure:17019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17019   rm -rf conftest*
17020   ol_cv_db_db_4=yes
17021 else
17022   echo "configure: failed program was:" >&5
17023   cat conftest.$ac_ext >&5
17024   rm -rf conftest*
17025   ol_cv_db_db_4=no
17026 fi
17027 rm -f conftest*
17028
17029         LIBS="$ol_LIBS"
17030
17031 fi
17032
17033 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17034
17035         if test $ol_cv_db_db_4 = yes ; then
17036                 ol_cv_lib_db=-ldb-4
17037         fi
17038 fi
17039
17040 if test $ol_cv_lib_db = no ; then
17041         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17042 echo "configure:17043: checking for Berkeley DB link (-ldb)" >&5
17043 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17044   echo $ac_n "(cached) $ac_c" 1>&6
17045 else
17046   
17047         ol_DB_LIB=-ldb
17048         ol_LIBS=$LIBS
17049         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17050
17051         cat > conftest.$ac_ext <<EOF
17052 #line 17053 "configure"
17053 #include "confdefs.h"
17054
17055 #ifdef HAVE_DB_185_H
17056 # include <db_185.h>
17057 #else
17058 # include <db.h>
17059 #endif
17060
17061 #ifndef DB_VERSION_MAJOR
17062 # define DB_VERSION_MAJOR 1
17063 #endif
17064
17065 #ifndef NULL
17066 #define NULL ((void*)0)
17067 #endif
17068
17069 int main() {
17070
17071 #if DB_VERSION_MAJOR > 1
17072         {
17073                 char *version;
17074                 int major, minor, patch;
17075
17076                 version = db_version( &major, &minor, &patch );
17077
17078                 if( major != DB_VERSION_MAJOR ||
17079                         minor < DB_VERSION_MINOR )
17080                 {
17081                         printf("Berkeley DB version mismatch\n"
17082                                 "\texpected: %s\n\tgot: %s\n",
17083                                 DB_VERSION_STRING, version);
17084                         return 1;
17085                 }
17086         }
17087 #endif
17088
17089 #if DB_VERSION_MAJOR > 2
17090         db_env_create( NULL, 0 );
17091 #elif DB_VERSION_MAJOR > 1
17092         db_appexit( NULL );
17093 #else
17094         (void) dbopen( NULL, 0, 0, 0, NULL);
17095 #endif
17096
17097 ; return 0; }
17098 EOF
17099 if { (eval echo configure:17100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17100   rm -rf conftest*
17101   ol_cv_db_db=yes
17102 else
17103   echo "configure: failed program was:" >&5
17104   cat conftest.$ac_ext >&5
17105   rm -rf conftest*
17106   ol_cv_db_db=no
17107 fi
17108 rm -f conftest*
17109
17110         LIBS="$ol_LIBS"
17111
17112 fi
17113
17114 echo "$ac_t""$ol_cv_db_db" 1>&6
17115
17116         if test $ol_cv_db_db = yes ; then
17117                 ol_cv_lib_db=-ldb
17118         fi
17119 fi
17120
17121 if test $ol_cv_lib_db = no ; then
17122         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17123 echo "configure:17124: checking for Berkeley DB link (-ldb3)" >&5
17124 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17125   echo $ac_n "(cached) $ac_c" 1>&6
17126 else
17127   
17128         ol_DB_LIB=-ldb3
17129         ol_LIBS=$LIBS
17130         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17131
17132         cat > conftest.$ac_ext <<EOF
17133 #line 17134 "configure"
17134 #include "confdefs.h"
17135
17136 #ifdef HAVE_DB_185_H
17137 # include <db_185.h>
17138 #else
17139 # include <db.h>
17140 #endif
17141
17142 #ifndef DB_VERSION_MAJOR
17143 # define DB_VERSION_MAJOR 1
17144 #endif
17145
17146 #ifndef NULL
17147 #define NULL ((void*)0)
17148 #endif
17149
17150 int main() {
17151
17152 #if DB_VERSION_MAJOR > 1
17153         {
17154                 char *version;
17155                 int major, minor, patch;
17156
17157                 version = db_version( &major, &minor, &patch );
17158
17159                 if( major != DB_VERSION_MAJOR ||
17160                         minor < DB_VERSION_MINOR )
17161                 {
17162                         printf("Berkeley DB version mismatch\n"
17163                                 "\texpected: %s\n\tgot: %s\n",
17164                                 DB_VERSION_STRING, version);
17165                         return 1;
17166                 }
17167         }
17168 #endif
17169
17170 #if DB_VERSION_MAJOR > 2
17171         db_env_create( NULL, 0 );
17172 #elif DB_VERSION_MAJOR > 1
17173         db_appexit( NULL );
17174 #else
17175         (void) dbopen( NULL, 0, 0, 0, NULL);
17176 #endif
17177
17178 ; return 0; }
17179 EOF
17180 if { (eval echo configure:17181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17181   rm -rf conftest*
17182   ol_cv_db_db3=yes
17183 else
17184   echo "configure: failed program was:" >&5
17185   cat conftest.$ac_ext >&5
17186   rm -rf conftest*
17187   ol_cv_db_db3=no
17188 fi
17189 rm -f conftest*
17190
17191         LIBS="$ol_LIBS"
17192
17193 fi
17194
17195 echo "$ac_t""$ol_cv_db_db3" 1>&6
17196
17197         if test $ol_cv_db_db3 = yes ; then
17198                 ol_cv_lib_db=-ldb3
17199         fi
17200 fi
17201
17202 if test $ol_cv_lib_db = no ; then
17203         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17204 echo "configure:17205: checking for Berkeley DB link (-ldb-3)" >&5
17205 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17206   echo $ac_n "(cached) $ac_c" 1>&6
17207 else
17208   
17209         ol_DB_LIB=-ldb-3
17210         ol_LIBS=$LIBS
17211         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17212
17213         cat > conftest.$ac_ext <<EOF
17214 #line 17215 "configure"
17215 #include "confdefs.h"
17216
17217 #ifdef HAVE_DB_185_H
17218 # include <db_185.h>
17219 #else
17220 # include <db.h>
17221 #endif
17222
17223 #ifndef DB_VERSION_MAJOR
17224 # define DB_VERSION_MAJOR 1
17225 #endif
17226
17227 #ifndef NULL
17228 #define NULL ((void*)0)
17229 #endif
17230
17231 int main() {
17232
17233 #if DB_VERSION_MAJOR > 1
17234         {
17235                 char *version;
17236                 int major, minor, patch;
17237
17238                 version = db_version( &major, &minor, &patch );
17239
17240                 if( major != DB_VERSION_MAJOR ||
17241                         minor < DB_VERSION_MINOR )
17242                 {
17243                         printf("Berkeley DB version mismatch\n"
17244                                 "\texpected: %s\n\tgot: %s\n",
17245                                 DB_VERSION_STRING, version);
17246                         return 1;
17247                 }
17248         }
17249 #endif
17250
17251 #if DB_VERSION_MAJOR > 2
17252         db_env_create( NULL, 0 );
17253 #elif DB_VERSION_MAJOR > 1
17254         db_appexit( NULL );
17255 #else
17256         (void) dbopen( NULL, 0, 0, 0, NULL);
17257 #endif
17258
17259 ; return 0; }
17260 EOF
17261 if { (eval echo configure:17262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17262   rm -rf conftest*
17263   ol_cv_db_db_3=yes
17264 else
17265   echo "configure: failed program was:" >&5
17266   cat conftest.$ac_ext >&5
17267   rm -rf conftest*
17268   ol_cv_db_db_3=no
17269 fi
17270 rm -f conftest*
17271
17272         LIBS="$ol_LIBS"
17273
17274 fi
17275
17276 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17277
17278         if test $ol_cv_db_db_3 = yes ; then
17279                 ol_cv_lib_db=-ldb-3
17280         fi
17281 fi
17282
17283 if test $ol_cv_lib_db = no ; then
17284         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17285 echo "configure:17286: checking for Berkeley DB link (-ldb2)" >&5
17286 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17287   echo $ac_n "(cached) $ac_c" 1>&6
17288 else
17289   
17290         ol_DB_LIB=-ldb2
17291         ol_LIBS=$LIBS
17292         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17293
17294         cat > conftest.$ac_ext <<EOF
17295 #line 17296 "configure"
17296 #include "confdefs.h"
17297
17298 #ifdef HAVE_DB_185_H
17299 # include <db_185.h>
17300 #else
17301 # include <db.h>
17302 #endif
17303
17304 #ifndef DB_VERSION_MAJOR
17305 # define DB_VERSION_MAJOR 1
17306 #endif
17307
17308 #ifndef NULL
17309 #define NULL ((void*)0)
17310 #endif
17311
17312 int main() {
17313
17314 #if DB_VERSION_MAJOR > 1
17315         {
17316                 char *version;
17317                 int major, minor, patch;
17318
17319                 version = db_version( &major, &minor, &patch );
17320
17321                 if( major != DB_VERSION_MAJOR ||
17322                         minor < DB_VERSION_MINOR )
17323                 {
17324                         printf("Berkeley DB version mismatch\n"
17325                                 "\texpected: %s\n\tgot: %s\n",
17326                                 DB_VERSION_STRING, version);
17327                         return 1;
17328                 }
17329         }
17330 #endif
17331
17332 #if DB_VERSION_MAJOR > 2
17333         db_env_create( NULL, 0 );
17334 #elif DB_VERSION_MAJOR > 1
17335         db_appexit( NULL );
17336 #else
17337         (void) dbopen( NULL, 0, 0, 0, NULL);
17338 #endif
17339
17340 ; return 0; }
17341 EOF
17342 if { (eval echo configure:17343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17343   rm -rf conftest*
17344   ol_cv_db_db2=yes
17345 else
17346   echo "configure: failed program was:" >&5
17347   cat conftest.$ac_ext >&5
17348   rm -rf conftest*
17349   ol_cv_db_db2=no
17350 fi
17351 rm -f conftest*
17352
17353         LIBS="$ol_LIBS"
17354
17355 fi
17356
17357 echo "$ac_t""$ol_cv_db_db2" 1>&6
17358
17359         if test $ol_cv_db_db2 = yes ; then
17360                 ol_cv_lib_db=-ldb2
17361         fi
17362 fi
17363
17364 if test $ol_cv_lib_db = no ; then
17365         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17366 echo "configure:17367: checking for Berkeley DB link (-ldb-2)" >&5
17367 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17368   echo $ac_n "(cached) $ac_c" 1>&6
17369 else
17370   
17371         ol_DB_LIB=-ldb-2
17372         ol_LIBS=$LIBS
17373         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17374
17375         cat > conftest.$ac_ext <<EOF
17376 #line 17377 "configure"
17377 #include "confdefs.h"
17378
17379 #ifdef HAVE_DB_185_H
17380 # include <db_185.h>
17381 #else
17382 # include <db.h>
17383 #endif
17384
17385 #ifndef DB_VERSION_MAJOR
17386 # define DB_VERSION_MAJOR 1
17387 #endif
17388
17389 #ifndef NULL
17390 #define NULL ((void*)0)
17391 #endif
17392
17393 int main() {
17394
17395 #if DB_VERSION_MAJOR > 1
17396         {
17397                 char *version;
17398                 int major, minor, patch;
17399
17400                 version = db_version( &major, &minor, &patch );
17401
17402                 if( major != DB_VERSION_MAJOR ||
17403                         minor < DB_VERSION_MINOR )
17404                 {
17405                         printf("Berkeley DB version mismatch\n"
17406                                 "\texpected: %s\n\tgot: %s\n",
17407                                 DB_VERSION_STRING, version);
17408                         return 1;
17409                 }
17410         }
17411 #endif
17412
17413 #if DB_VERSION_MAJOR > 2
17414         db_env_create( NULL, 0 );
17415 #elif DB_VERSION_MAJOR > 1
17416         db_appexit( NULL );
17417 #else
17418         (void) dbopen( NULL, 0, 0, 0, NULL);
17419 #endif
17420
17421 ; return 0; }
17422 EOF
17423 if { (eval echo configure:17424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17424   rm -rf conftest*
17425   ol_cv_db_db_2=yes
17426 else
17427   echo "configure: failed program was:" >&5
17428   cat conftest.$ac_ext >&5
17429   rm -rf conftest*
17430   ol_cv_db_db_2=no
17431 fi
17432 rm -f conftest*
17433
17434         LIBS="$ol_LIBS"
17435
17436 fi
17437
17438 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17439
17440         if test $ol_cv_db_db_2 = yes ; then
17441                 ol_cv_lib_db=-ldb-2
17442         fi
17443 fi
17444
17445 if test $ol_cv_lib_db = no ; then
17446         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17447 echo "configure:17448: checking for Berkeley DB link (-ldb1)" >&5
17448 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17449   echo $ac_n "(cached) $ac_c" 1>&6
17450 else
17451   
17452         ol_DB_LIB=-ldb1
17453         ol_LIBS=$LIBS
17454         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17455
17456         cat > conftest.$ac_ext <<EOF
17457 #line 17458 "configure"
17458 #include "confdefs.h"
17459
17460 #ifdef HAVE_DB_185_H
17461 # include <db_185.h>
17462 #else
17463 # include <db.h>
17464 #endif
17465
17466 #ifndef DB_VERSION_MAJOR
17467 # define DB_VERSION_MAJOR 1
17468 #endif
17469
17470 #ifndef NULL
17471 #define NULL ((void*)0)
17472 #endif
17473
17474 int main() {
17475
17476 #if DB_VERSION_MAJOR > 1
17477         {
17478                 char *version;
17479                 int major, minor, patch;
17480
17481                 version = db_version( &major, &minor, &patch );
17482
17483                 if( major != DB_VERSION_MAJOR ||
17484                         minor < DB_VERSION_MINOR )
17485                 {
17486                         printf("Berkeley DB version mismatch\n"
17487                                 "\texpected: %s\n\tgot: %s\n",
17488                                 DB_VERSION_STRING, version);
17489                         return 1;
17490                 }
17491         }
17492 #endif
17493
17494 #if DB_VERSION_MAJOR > 2
17495         db_env_create( NULL, 0 );
17496 #elif DB_VERSION_MAJOR > 1
17497         db_appexit( NULL );
17498 #else
17499         (void) dbopen( NULL, 0, 0, 0, NULL);
17500 #endif
17501
17502 ; return 0; }
17503 EOF
17504 if { (eval echo configure:17505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17505   rm -rf conftest*
17506   ol_cv_db_db1=yes
17507 else
17508   echo "configure: failed program was:" >&5
17509   cat conftest.$ac_ext >&5
17510   rm -rf conftest*
17511   ol_cv_db_db1=no
17512 fi
17513 rm -f conftest*
17514
17515         LIBS="$ol_LIBS"
17516
17517 fi
17518
17519 echo "$ac_t""$ol_cv_db_db1" 1>&6
17520
17521         if test $ol_cv_db_db1 = yes ; then
17522                 ol_cv_lib_db=-ldb1
17523         fi
17524 fi
17525
17526 if test $ol_cv_lib_db = no ; then
17527         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17528 echo "configure:17529: checking for Berkeley DB link (-ldb-1)" >&5
17529 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17530   echo $ac_n "(cached) $ac_c" 1>&6
17531 else
17532   
17533         ol_DB_LIB=-ldb-1
17534         ol_LIBS=$LIBS
17535         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17536
17537         cat > conftest.$ac_ext <<EOF
17538 #line 17539 "configure"
17539 #include "confdefs.h"
17540
17541 #ifdef HAVE_DB_185_H
17542 # include <db_185.h>
17543 #else
17544 # include <db.h>
17545 #endif
17546
17547 #ifndef DB_VERSION_MAJOR
17548 # define DB_VERSION_MAJOR 1
17549 #endif
17550
17551 #ifndef NULL
17552 #define NULL ((void*)0)
17553 #endif
17554
17555 int main() {
17556
17557 #if DB_VERSION_MAJOR > 1
17558         {
17559                 char *version;
17560                 int major, minor, patch;
17561
17562                 version = db_version( &major, &minor, &patch );
17563
17564                 if( major != DB_VERSION_MAJOR ||
17565                         minor < DB_VERSION_MINOR )
17566                 {
17567                         printf("Berkeley DB version mismatch\n"
17568                                 "\texpected: %s\n\tgot: %s\n",
17569                                 DB_VERSION_STRING, version);
17570                         return 1;
17571                 }
17572         }
17573 #endif
17574
17575 #if DB_VERSION_MAJOR > 2
17576         db_env_create( NULL, 0 );
17577 #elif DB_VERSION_MAJOR > 1
17578         db_appexit( NULL );
17579 #else
17580         (void) dbopen( NULL, 0, 0, 0, NULL);
17581 #endif
17582
17583 ; return 0; }
17584 EOF
17585 if { (eval echo configure:17586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17586   rm -rf conftest*
17587   ol_cv_db_db_1=yes
17588 else
17589   echo "configure: failed program was:" >&5
17590   cat conftest.$ac_ext >&5
17591   rm -rf conftest*
17592   ol_cv_db_db_1=no
17593 fi
17594 rm -f conftest*
17595
17596         LIBS="$ol_LIBS"
17597
17598 fi
17599
17600 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17601
17602         if test $ol_cv_db_db_1 = yes ; then
17603                 ol_cv_lib_db=-ldb-1
17604         fi
17605 fi
17606
17607
17608                 if test "$ol_cv_lib_db" != no ; then
17609                         ol_cv_berkeley_db=yes
17610                 fi
17611         fi
17612 fi
17613
17614         else
17615                 ol_cv_berkeley_db=no
17616 for ac_hdr in db.h
17617 do
17618 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17619 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17620 echo "configure:17621: checking for $ac_hdr" >&5
17621 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17622   echo $ac_n "(cached) $ac_c" 1>&6
17623 else
17624   cat > conftest.$ac_ext <<EOF
17625 #line 17626 "configure"
17626 #include "confdefs.h"
17627 #include <$ac_hdr>
17628 EOF
17629 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17630 { (eval echo configure:17631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17631 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17632 if test -z "$ac_err"; then
17633   rm -rf conftest*
17634   eval "ac_cv_header_$ac_safe=yes"
17635 else
17636   echo "$ac_err" >&5
17637   echo "configure: failed program was:" >&5
17638   cat conftest.$ac_ext >&5
17639   rm -rf conftest*
17640   eval "ac_cv_header_$ac_safe=no"
17641 fi
17642 rm -f conftest*
17643 fi
17644 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17645   echo "$ac_t""yes" 1>&6
17646     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17647   cat >> confdefs.h <<EOF
17648 #define $ac_tr_hdr 1
17649 EOF
17650  
17651 else
17652   echo "$ac_t""no" 1>&6
17653 fi
17654 done
17655
17656 if test $ac_cv_header_db_h = yes; then
17657         ol_cv_lib_db=no
17658 if test $ol_cv_lib_db = no ; then
17659         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17660 echo "configure:17661: checking for Berkeley DB link (default)" >&5
17661 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17662   echo $ac_n "(cached) $ac_c" 1>&6
17663 else
17664   
17665         ol_DB_LIB=
17666         ol_LIBS=$LIBS
17667         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17668
17669         cat > conftest.$ac_ext <<EOF
17670 #line 17671 "configure"
17671 #include "confdefs.h"
17672
17673 #ifdef HAVE_DB_185_H
17674 # include <db_185.h>
17675 #else
17676 # include <db.h>
17677 #endif
17678
17679 #ifndef DB_VERSION_MAJOR
17680 # define DB_VERSION_MAJOR 1
17681 #endif
17682
17683 #ifndef NULL
17684 #define NULL ((void*)0)
17685 #endif
17686
17687 int main() {
17688
17689 #if DB_VERSION_MAJOR > 1
17690         {
17691                 char *version;
17692                 int major, minor, patch;
17693
17694                 version = db_version( &major, &minor, &patch );
17695
17696                 if( major != DB_VERSION_MAJOR ||
17697                         minor < DB_VERSION_MINOR )
17698                 {
17699                         printf("Berkeley DB version mismatch\n"
17700                                 "\texpected: %s\n\tgot: %s\n",
17701                                 DB_VERSION_STRING, version);
17702                         return 1;
17703                 }
17704         }
17705 #endif
17706
17707 #if DB_VERSION_MAJOR > 2
17708         db_env_create( NULL, 0 );
17709 #elif DB_VERSION_MAJOR > 1
17710         db_appexit( NULL );
17711 #else
17712         (void) dbopen( NULL, 0, 0, 0, NULL);
17713 #endif
17714
17715 ; return 0; }
17716 EOF
17717 if { (eval echo configure:17718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17718   rm -rf conftest*
17719   ol_cv_db_none=yes
17720 else
17721   echo "configure: failed program was:" >&5
17722   cat conftest.$ac_ext >&5
17723   rm -rf conftest*
17724   ol_cv_db_none=no
17725 fi
17726 rm -f conftest*
17727
17728         LIBS="$ol_LIBS"
17729
17730 fi
17731
17732 echo "$ac_t""$ol_cv_db_none" 1>&6
17733
17734         if test $ol_cv_db_none = yes ; then
17735                 ol_cv_lib_db=yes
17736         fi
17737 fi
17738
17739 if test $ol_cv_lib_db = no ; then
17740         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17741 echo "configure:17742: checking for Berkeley DB link (-ldb41)" >&5
17742 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17743   echo $ac_n "(cached) $ac_c" 1>&6
17744 else
17745   
17746         ol_DB_LIB=-ldb41
17747         ol_LIBS=$LIBS
17748         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17749
17750         cat > conftest.$ac_ext <<EOF
17751 #line 17752 "configure"
17752 #include "confdefs.h"
17753
17754 #ifdef HAVE_DB_185_H
17755 # include <db_185.h>
17756 #else
17757 # include <db.h>
17758 #endif
17759
17760 #ifndef DB_VERSION_MAJOR
17761 # define DB_VERSION_MAJOR 1
17762 #endif
17763
17764 #ifndef NULL
17765 #define NULL ((void*)0)
17766 #endif
17767
17768 int main() {
17769
17770 #if DB_VERSION_MAJOR > 1
17771         {
17772                 char *version;
17773                 int major, minor, patch;
17774
17775                 version = db_version( &major, &minor, &patch );
17776
17777                 if( major != DB_VERSION_MAJOR ||
17778                         minor < DB_VERSION_MINOR )
17779                 {
17780                         printf("Berkeley DB version mismatch\n"
17781                                 "\texpected: %s\n\tgot: %s\n",
17782                                 DB_VERSION_STRING, version);
17783                         return 1;
17784                 }
17785         }
17786 #endif
17787
17788 #if DB_VERSION_MAJOR > 2
17789         db_env_create( NULL, 0 );
17790 #elif DB_VERSION_MAJOR > 1
17791         db_appexit( NULL );
17792 #else
17793         (void) dbopen( NULL, 0, 0, 0, NULL);
17794 #endif
17795
17796 ; return 0; }
17797 EOF
17798 if { (eval echo configure:17799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17799   rm -rf conftest*
17800   ol_cv_db_db41=yes
17801 else
17802   echo "configure: failed program was:" >&5
17803   cat conftest.$ac_ext >&5
17804   rm -rf conftest*
17805   ol_cv_db_db41=no
17806 fi
17807 rm -f conftest*
17808
17809         LIBS="$ol_LIBS"
17810
17811 fi
17812
17813 echo "$ac_t""$ol_cv_db_db41" 1>&6
17814
17815         if test $ol_cv_db_db41 = yes ; then
17816                 ol_cv_lib_db=-ldb41
17817         fi
17818 fi
17819
17820 if test $ol_cv_lib_db = no ; then
17821         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17822 echo "configure:17823: checking for Berkeley DB link (-ldb-41)" >&5
17823 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17824   echo $ac_n "(cached) $ac_c" 1>&6
17825 else
17826   
17827         ol_DB_LIB=-ldb-41
17828         ol_LIBS=$LIBS
17829         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17830
17831         cat > conftest.$ac_ext <<EOF
17832 #line 17833 "configure"
17833 #include "confdefs.h"
17834
17835 #ifdef HAVE_DB_185_H
17836 # include <db_185.h>
17837 #else
17838 # include <db.h>
17839 #endif
17840
17841 #ifndef DB_VERSION_MAJOR
17842 # define DB_VERSION_MAJOR 1
17843 #endif
17844
17845 #ifndef NULL
17846 #define NULL ((void*)0)
17847 #endif
17848
17849 int main() {
17850
17851 #if DB_VERSION_MAJOR > 1
17852         {
17853                 char *version;
17854                 int major, minor, patch;
17855
17856                 version = db_version( &major, &minor, &patch );
17857
17858                 if( major != DB_VERSION_MAJOR ||
17859                         minor < DB_VERSION_MINOR )
17860                 {
17861                         printf("Berkeley DB version mismatch\n"
17862                                 "\texpected: %s\n\tgot: %s\n",
17863                                 DB_VERSION_STRING, version);
17864                         return 1;
17865                 }
17866         }
17867 #endif
17868
17869 #if DB_VERSION_MAJOR > 2
17870         db_env_create( NULL, 0 );
17871 #elif DB_VERSION_MAJOR > 1
17872         db_appexit( NULL );
17873 #else
17874         (void) dbopen( NULL, 0, 0, 0, NULL);
17875 #endif
17876
17877 ; return 0; }
17878 EOF
17879 if { (eval echo configure:17880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17880   rm -rf conftest*
17881   ol_cv_db_db_41=yes
17882 else
17883   echo "configure: failed program was:" >&5
17884   cat conftest.$ac_ext >&5
17885   rm -rf conftest*
17886   ol_cv_db_db_41=no
17887 fi
17888 rm -f conftest*
17889
17890         LIBS="$ol_LIBS"
17891
17892 fi
17893
17894 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17895
17896         if test $ol_cv_db_db_41 = yes ; then
17897                 ol_cv_lib_db=-ldb-41
17898         fi
17899 fi
17900
17901 if test $ol_cv_lib_db = no ; then
17902         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17903 echo "configure:17904: checking for Berkeley DB link (-ldb4)" >&5
17904 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17905   echo $ac_n "(cached) $ac_c" 1>&6
17906 else
17907   
17908         ol_DB_LIB=-ldb4
17909         ol_LIBS=$LIBS
17910         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17911
17912         cat > conftest.$ac_ext <<EOF
17913 #line 17914 "configure"
17914 #include "confdefs.h"
17915
17916 #ifdef HAVE_DB_185_H
17917 # include <db_185.h>
17918 #else
17919 # include <db.h>
17920 #endif
17921
17922 #ifndef DB_VERSION_MAJOR
17923 # define DB_VERSION_MAJOR 1
17924 #endif
17925
17926 #ifndef NULL
17927 #define NULL ((void*)0)
17928 #endif
17929
17930 int main() {
17931
17932 #if DB_VERSION_MAJOR > 1
17933         {
17934                 char *version;
17935                 int major, minor, patch;
17936
17937                 version = db_version( &major, &minor, &patch );
17938
17939                 if( major != DB_VERSION_MAJOR ||
17940                         minor < DB_VERSION_MINOR )
17941                 {
17942                         printf("Berkeley DB version mismatch\n"
17943                                 "\texpected: %s\n\tgot: %s\n",
17944                                 DB_VERSION_STRING, version);
17945                         return 1;
17946                 }
17947         }
17948 #endif
17949
17950 #if DB_VERSION_MAJOR > 2
17951         db_env_create( NULL, 0 );
17952 #elif DB_VERSION_MAJOR > 1
17953         db_appexit( NULL );
17954 #else
17955         (void) dbopen( NULL, 0, 0, 0, NULL);
17956 #endif
17957
17958 ; return 0; }
17959 EOF
17960 if { (eval echo configure:17961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17961   rm -rf conftest*
17962   ol_cv_db_db4=yes
17963 else
17964   echo "configure: failed program was:" >&5
17965   cat conftest.$ac_ext >&5
17966   rm -rf conftest*
17967   ol_cv_db_db4=no
17968 fi
17969 rm -f conftest*
17970
17971         LIBS="$ol_LIBS"
17972
17973 fi
17974
17975 echo "$ac_t""$ol_cv_db_db4" 1>&6
17976
17977         if test $ol_cv_db_db4 = yes ; then
17978                 ol_cv_lib_db=-ldb4
17979         fi
17980 fi
17981
17982 if test $ol_cv_lib_db = no ; then
17983         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17984 echo "configure:17985: checking for Berkeley DB link (-ldb-4)" >&5
17985 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17986   echo $ac_n "(cached) $ac_c" 1>&6
17987 else
17988   
17989         ol_DB_LIB=-ldb-4
17990         ol_LIBS=$LIBS
17991         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17992
17993         cat > conftest.$ac_ext <<EOF
17994 #line 17995 "configure"
17995 #include "confdefs.h"
17996
17997 #ifdef HAVE_DB_185_H
17998 # include <db_185.h>
17999 #else
18000 # include <db.h>
18001 #endif
18002
18003 #ifndef DB_VERSION_MAJOR
18004 # define DB_VERSION_MAJOR 1
18005 #endif
18006
18007 #ifndef NULL
18008 #define NULL ((void*)0)
18009 #endif
18010
18011 int main() {
18012
18013 #if DB_VERSION_MAJOR > 1
18014         {
18015                 char *version;
18016                 int major, minor, patch;
18017
18018                 version = db_version( &major, &minor, &patch );
18019
18020                 if( major != DB_VERSION_MAJOR ||
18021                         minor < DB_VERSION_MINOR )
18022                 {
18023                         printf("Berkeley DB version mismatch\n"
18024                                 "\texpected: %s\n\tgot: %s\n",
18025                                 DB_VERSION_STRING, version);
18026                         return 1;
18027                 }
18028         }
18029 #endif
18030
18031 #if DB_VERSION_MAJOR > 2
18032         db_env_create( NULL, 0 );
18033 #elif DB_VERSION_MAJOR > 1
18034         db_appexit( NULL );
18035 #else
18036         (void) dbopen( NULL, 0, 0, 0, NULL);
18037 #endif
18038
18039 ; return 0; }
18040 EOF
18041 if { (eval echo configure:18042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18042   rm -rf conftest*
18043   ol_cv_db_db_4=yes
18044 else
18045   echo "configure: failed program was:" >&5
18046   cat conftest.$ac_ext >&5
18047   rm -rf conftest*
18048   ol_cv_db_db_4=no
18049 fi
18050 rm -f conftest*
18051
18052         LIBS="$ol_LIBS"
18053
18054 fi
18055
18056 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18057
18058         if test $ol_cv_db_db_4 = yes ; then
18059                 ol_cv_lib_db=-ldb-4
18060         fi
18061 fi
18062
18063 if test $ol_cv_lib_db = no ; then
18064         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18065 echo "configure:18066: checking for Berkeley DB link (-ldb)" >&5
18066 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18067   echo $ac_n "(cached) $ac_c" 1>&6
18068 else
18069   
18070         ol_DB_LIB=-ldb
18071         ol_LIBS=$LIBS
18072         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18073
18074         cat > conftest.$ac_ext <<EOF
18075 #line 18076 "configure"
18076 #include "confdefs.h"
18077
18078 #ifdef HAVE_DB_185_H
18079 # include <db_185.h>
18080 #else
18081 # include <db.h>
18082 #endif
18083
18084 #ifndef DB_VERSION_MAJOR
18085 # define DB_VERSION_MAJOR 1
18086 #endif
18087
18088 #ifndef NULL
18089 #define NULL ((void*)0)
18090 #endif
18091
18092 int main() {
18093
18094 #if DB_VERSION_MAJOR > 1
18095         {
18096                 char *version;
18097                 int major, minor, patch;
18098
18099                 version = db_version( &major, &minor, &patch );
18100
18101                 if( major != DB_VERSION_MAJOR ||
18102                         minor < DB_VERSION_MINOR )
18103                 {
18104                         printf("Berkeley DB version mismatch\n"
18105                                 "\texpected: %s\n\tgot: %s\n",
18106                                 DB_VERSION_STRING, version);
18107                         return 1;
18108                 }
18109         }
18110 #endif
18111
18112 #if DB_VERSION_MAJOR > 2
18113         db_env_create( NULL, 0 );
18114 #elif DB_VERSION_MAJOR > 1
18115         db_appexit( NULL );
18116 #else
18117         (void) dbopen( NULL, 0, 0, 0, NULL);
18118 #endif
18119
18120 ; return 0; }
18121 EOF
18122 if { (eval echo configure:18123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18123   rm -rf conftest*
18124   ol_cv_db_db=yes
18125 else
18126   echo "configure: failed program was:" >&5
18127   cat conftest.$ac_ext >&5
18128   rm -rf conftest*
18129   ol_cv_db_db=no
18130 fi
18131 rm -f conftest*
18132
18133         LIBS="$ol_LIBS"
18134
18135 fi
18136
18137 echo "$ac_t""$ol_cv_db_db" 1>&6
18138
18139         if test $ol_cv_db_db = yes ; then
18140                 ol_cv_lib_db=-ldb
18141         fi
18142 fi
18143
18144 if test $ol_cv_lib_db = no ; then
18145         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18146 echo "configure:18147: checking for Berkeley DB link (-ldb3)" >&5
18147 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18148   echo $ac_n "(cached) $ac_c" 1>&6
18149 else
18150   
18151         ol_DB_LIB=-ldb3
18152         ol_LIBS=$LIBS
18153         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18154
18155         cat > conftest.$ac_ext <<EOF
18156 #line 18157 "configure"
18157 #include "confdefs.h"
18158
18159 #ifdef HAVE_DB_185_H
18160 # include <db_185.h>
18161 #else
18162 # include <db.h>
18163 #endif
18164
18165 #ifndef DB_VERSION_MAJOR
18166 # define DB_VERSION_MAJOR 1
18167 #endif
18168
18169 #ifndef NULL
18170 #define NULL ((void*)0)
18171 #endif
18172
18173 int main() {
18174
18175 #if DB_VERSION_MAJOR > 1
18176         {
18177                 char *version;
18178                 int major, minor, patch;
18179
18180                 version = db_version( &major, &minor, &patch );
18181
18182                 if( major != DB_VERSION_MAJOR ||
18183                         minor < DB_VERSION_MINOR )
18184                 {
18185                         printf("Berkeley DB version mismatch\n"
18186                                 "\texpected: %s\n\tgot: %s\n",
18187                                 DB_VERSION_STRING, version);
18188                         return 1;
18189                 }
18190         }
18191 #endif
18192
18193 #if DB_VERSION_MAJOR > 2
18194         db_env_create( NULL, 0 );
18195 #elif DB_VERSION_MAJOR > 1
18196         db_appexit( NULL );
18197 #else
18198         (void) dbopen( NULL, 0, 0, 0, NULL);
18199 #endif
18200
18201 ; return 0; }
18202 EOF
18203 if { (eval echo configure:18204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18204   rm -rf conftest*
18205   ol_cv_db_db3=yes
18206 else
18207   echo "configure: failed program was:" >&5
18208   cat conftest.$ac_ext >&5
18209   rm -rf conftest*
18210   ol_cv_db_db3=no
18211 fi
18212 rm -f conftest*
18213
18214         LIBS="$ol_LIBS"
18215
18216 fi
18217
18218 echo "$ac_t""$ol_cv_db_db3" 1>&6
18219
18220         if test $ol_cv_db_db3 = yes ; then
18221                 ol_cv_lib_db=-ldb3
18222         fi
18223 fi
18224
18225 if test $ol_cv_lib_db = no ; then
18226         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18227 echo "configure:18228: checking for Berkeley DB link (-ldb-3)" >&5
18228 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18229   echo $ac_n "(cached) $ac_c" 1>&6
18230 else
18231   
18232         ol_DB_LIB=-ldb-3
18233         ol_LIBS=$LIBS
18234         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18235
18236         cat > conftest.$ac_ext <<EOF
18237 #line 18238 "configure"
18238 #include "confdefs.h"
18239
18240 #ifdef HAVE_DB_185_H
18241 # include <db_185.h>
18242 #else
18243 # include <db.h>
18244 #endif
18245
18246 #ifndef DB_VERSION_MAJOR
18247 # define DB_VERSION_MAJOR 1
18248 #endif
18249
18250 #ifndef NULL
18251 #define NULL ((void*)0)
18252 #endif
18253
18254 int main() {
18255
18256 #if DB_VERSION_MAJOR > 1
18257         {
18258                 char *version;
18259                 int major, minor, patch;
18260
18261                 version = db_version( &major, &minor, &patch );
18262
18263                 if( major != DB_VERSION_MAJOR ||
18264                         minor < DB_VERSION_MINOR )
18265                 {
18266                         printf("Berkeley DB version mismatch\n"
18267                                 "\texpected: %s\n\tgot: %s\n",
18268                                 DB_VERSION_STRING, version);
18269                         return 1;
18270                 }
18271         }
18272 #endif
18273
18274 #if DB_VERSION_MAJOR > 2
18275         db_env_create( NULL, 0 );
18276 #elif DB_VERSION_MAJOR > 1
18277         db_appexit( NULL );
18278 #else
18279         (void) dbopen( NULL, 0, 0, 0, NULL);
18280 #endif
18281
18282 ; return 0; }
18283 EOF
18284 if { (eval echo configure:18285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18285   rm -rf conftest*
18286   ol_cv_db_db_3=yes
18287 else
18288   echo "configure: failed program was:" >&5
18289   cat conftest.$ac_ext >&5
18290   rm -rf conftest*
18291   ol_cv_db_db_3=no
18292 fi
18293 rm -f conftest*
18294
18295         LIBS="$ol_LIBS"
18296
18297 fi
18298
18299 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18300
18301         if test $ol_cv_db_db_3 = yes ; then
18302                 ol_cv_lib_db=-ldb-3
18303         fi
18304 fi
18305
18306 if test $ol_cv_lib_db = no ; then
18307         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18308 echo "configure:18309: checking for Berkeley DB link (-ldb2)" >&5
18309 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18310   echo $ac_n "(cached) $ac_c" 1>&6
18311 else
18312   
18313         ol_DB_LIB=-ldb2
18314         ol_LIBS=$LIBS
18315         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18316
18317         cat > conftest.$ac_ext <<EOF
18318 #line 18319 "configure"
18319 #include "confdefs.h"
18320
18321 #ifdef HAVE_DB_185_H
18322 # include <db_185.h>
18323 #else
18324 # include <db.h>
18325 #endif
18326
18327 #ifndef DB_VERSION_MAJOR
18328 # define DB_VERSION_MAJOR 1
18329 #endif
18330
18331 #ifndef NULL
18332 #define NULL ((void*)0)
18333 #endif
18334
18335 int main() {
18336
18337 #if DB_VERSION_MAJOR > 1
18338         {
18339                 char *version;
18340                 int major, minor, patch;
18341
18342                 version = db_version( &major, &minor, &patch );
18343
18344                 if( major != DB_VERSION_MAJOR ||
18345                         minor < DB_VERSION_MINOR )
18346                 {
18347                         printf("Berkeley DB version mismatch\n"
18348                                 "\texpected: %s\n\tgot: %s\n",
18349                                 DB_VERSION_STRING, version);
18350                         return 1;
18351                 }
18352         }
18353 #endif
18354
18355 #if DB_VERSION_MAJOR > 2
18356         db_env_create( NULL, 0 );
18357 #elif DB_VERSION_MAJOR > 1
18358         db_appexit( NULL );
18359 #else
18360         (void) dbopen( NULL, 0, 0, 0, NULL);
18361 #endif
18362
18363 ; return 0; }
18364 EOF
18365 if { (eval echo configure:18366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18366   rm -rf conftest*
18367   ol_cv_db_db2=yes
18368 else
18369   echo "configure: failed program was:" >&5
18370   cat conftest.$ac_ext >&5
18371   rm -rf conftest*
18372   ol_cv_db_db2=no
18373 fi
18374 rm -f conftest*
18375
18376         LIBS="$ol_LIBS"
18377
18378 fi
18379
18380 echo "$ac_t""$ol_cv_db_db2" 1>&6
18381
18382         if test $ol_cv_db_db2 = yes ; then
18383                 ol_cv_lib_db=-ldb2
18384         fi
18385 fi
18386
18387 if test $ol_cv_lib_db = no ; then
18388         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18389 echo "configure:18390: checking for Berkeley DB link (-ldb-2)" >&5
18390 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18391   echo $ac_n "(cached) $ac_c" 1>&6
18392 else
18393   
18394         ol_DB_LIB=-ldb-2
18395         ol_LIBS=$LIBS
18396         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18397
18398         cat > conftest.$ac_ext <<EOF
18399 #line 18400 "configure"
18400 #include "confdefs.h"
18401
18402 #ifdef HAVE_DB_185_H
18403 # include <db_185.h>
18404 #else
18405 # include <db.h>
18406 #endif
18407
18408 #ifndef DB_VERSION_MAJOR
18409 # define DB_VERSION_MAJOR 1
18410 #endif
18411
18412 #ifndef NULL
18413 #define NULL ((void*)0)
18414 #endif
18415
18416 int main() {
18417
18418 #if DB_VERSION_MAJOR > 1
18419         {
18420                 char *version;
18421                 int major, minor, patch;
18422
18423                 version = db_version( &major, &minor, &patch );
18424
18425                 if( major != DB_VERSION_MAJOR ||
18426                         minor < DB_VERSION_MINOR )
18427                 {
18428                         printf("Berkeley DB version mismatch\n"
18429                                 "\texpected: %s\n\tgot: %s\n",
18430                                 DB_VERSION_STRING, version);
18431                         return 1;
18432                 }
18433         }
18434 #endif
18435
18436 #if DB_VERSION_MAJOR > 2
18437         db_env_create( NULL, 0 );
18438 #elif DB_VERSION_MAJOR > 1
18439         db_appexit( NULL );
18440 #else
18441         (void) dbopen( NULL, 0, 0, 0, NULL);
18442 #endif
18443
18444 ; return 0; }
18445 EOF
18446 if { (eval echo configure:18447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18447   rm -rf conftest*
18448   ol_cv_db_db_2=yes
18449 else
18450   echo "configure: failed program was:" >&5
18451   cat conftest.$ac_ext >&5
18452   rm -rf conftest*
18453   ol_cv_db_db_2=no
18454 fi
18455 rm -f conftest*
18456
18457         LIBS="$ol_LIBS"
18458
18459 fi
18460
18461 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18462
18463         if test $ol_cv_db_db_2 = yes ; then
18464                 ol_cv_lib_db=-ldb-2
18465         fi
18466 fi
18467
18468 if test $ol_cv_lib_db = no ; then
18469         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18470 echo "configure:18471: checking for Berkeley DB link (-ldb1)" >&5
18471 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18472   echo $ac_n "(cached) $ac_c" 1>&6
18473 else
18474   
18475         ol_DB_LIB=-ldb1
18476         ol_LIBS=$LIBS
18477         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18478
18479         cat > conftest.$ac_ext <<EOF
18480 #line 18481 "configure"
18481 #include "confdefs.h"
18482
18483 #ifdef HAVE_DB_185_H
18484 # include <db_185.h>
18485 #else
18486 # include <db.h>
18487 #endif
18488
18489 #ifndef DB_VERSION_MAJOR
18490 # define DB_VERSION_MAJOR 1
18491 #endif
18492
18493 #ifndef NULL
18494 #define NULL ((void*)0)
18495 #endif
18496
18497 int main() {
18498
18499 #if DB_VERSION_MAJOR > 1
18500         {
18501                 char *version;
18502                 int major, minor, patch;
18503
18504                 version = db_version( &major, &minor, &patch );
18505
18506                 if( major != DB_VERSION_MAJOR ||
18507                         minor < DB_VERSION_MINOR )
18508                 {
18509                         printf("Berkeley DB version mismatch\n"
18510                                 "\texpected: %s\n\tgot: %s\n",
18511                                 DB_VERSION_STRING, version);
18512                         return 1;
18513                 }
18514         }
18515 #endif
18516
18517 #if DB_VERSION_MAJOR > 2
18518         db_env_create( NULL, 0 );
18519 #elif DB_VERSION_MAJOR > 1
18520         db_appexit( NULL );
18521 #else
18522         (void) dbopen( NULL, 0, 0, 0, NULL);
18523 #endif
18524
18525 ; return 0; }
18526 EOF
18527 if { (eval echo configure:18528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18528   rm -rf conftest*
18529   ol_cv_db_db1=yes
18530 else
18531   echo "configure: failed program was:" >&5
18532   cat conftest.$ac_ext >&5
18533   rm -rf conftest*
18534   ol_cv_db_db1=no
18535 fi
18536 rm -f conftest*
18537
18538         LIBS="$ol_LIBS"
18539
18540 fi
18541
18542 echo "$ac_t""$ol_cv_db_db1" 1>&6
18543
18544         if test $ol_cv_db_db1 = yes ; then
18545                 ol_cv_lib_db=-ldb1
18546         fi
18547 fi
18548
18549 if test $ol_cv_lib_db = no ; then
18550         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18551 echo "configure:18552: checking for Berkeley DB link (-ldb-1)" >&5
18552 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18553   echo $ac_n "(cached) $ac_c" 1>&6
18554 else
18555   
18556         ol_DB_LIB=-ldb-1
18557         ol_LIBS=$LIBS
18558         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18559
18560         cat > conftest.$ac_ext <<EOF
18561 #line 18562 "configure"
18562 #include "confdefs.h"
18563
18564 #ifdef HAVE_DB_185_H
18565 # include <db_185.h>
18566 #else
18567 # include <db.h>
18568 #endif
18569
18570 #ifndef DB_VERSION_MAJOR
18571 # define DB_VERSION_MAJOR 1
18572 #endif
18573
18574 #ifndef NULL
18575 #define NULL ((void*)0)
18576 #endif
18577
18578 int main() {
18579
18580 #if DB_VERSION_MAJOR > 1
18581         {
18582                 char *version;
18583                 int major, minor, patch;
18584
18585                 version = db_version( &major, &minor, &patch );
18586
18587                 if( major != DB_VERSION_MAJOR ||
18588                         minor < DB_VERSION_MINOR )
18589                 {
18590                         printf("Berkeley DB version mismatch\n"
18591                                 "\texpected: %s\n\tgot: %s\n",
18592                                 DB_VERSION_STRING, version);
18593                         return 1;
18594                 }
18595         }
18596 #endif
18597
18598 #if DB_VERSION_MAJOR > 2
18599         db_env_create( NULL, 0 );
18600 #elif DB_VERSION_MAJOR > 1
18601         db_appexit( NULL );
18602 #else
18603         (void) dbopen( NULL, 0, 0, 0, NULL);
18604 #endif
18605
18606 ; return 0; }
18607 EOF
18608 if { (eval echo configure:18609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18609   rm -rf conftest*
18610   ol_cv_db_db_1=yes
18611 else
18612   echo "configure: failed program was:" >&5
18613   cat conftest.$ac_ext >&5
18614   rm -rf conftest*
18615   ol_cv_db_db_1=no
18616 fi
18617 rm -f conftest*
18618
18619         LIBS="$ol_LIBS"
18620
18621 fi
18622
18623 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18624
18625         if test $ol_cv_db_db_1 = yes ; then
18626                 ol_cv_lib_db=-ldb-1
18627         fi
18628 fi
18629
18630
18631         if test "$ol_cv_lib_db" != no ; then
18632                 ol_cv_berkeley_db=yes
18633                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18634 echo "configure:18635: checking for Berkeley DB thread support" >&5
18635 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18636   echo $ac_n "(cached) $ac_c" 1>&6
18637 else
18638   
18639         ol_LIBS="$LIBS"
18640         LIBS="$LTHREAD_LIBS $LIBS"
18641         if test $ol_cv_lib_db != yes ; then
18642                 LIBS="$ol_cv_lib_db $LIBS"
18643         fi
18644
18645         if test "$cross_compiling" = yes; then
18646   ol_cv_berkeley_db_thread=cross
18647 else
18648   cat > conftest.$ac_ext <<EOF
18649 #line 18650 "configure"
18650 #include "confdefs.h"
18651
18652 #ifdef HAVE_DB_185_H
18653         choke me;
18654 #else
18655 #include <db.h>
18656 #endif
18657 #ifndef NULL
18658 #define NULL ((void *)0)
18659 #endif
18660 main()
18661 {
18662         int rc;
18663         u_int32_t flags = DB_CREATE |
18664 #ifdef DB_PRIVATE
18665                 DB_PRIVATE |
18666 #endif
18667                 DB_THREAD;
18668
18669 #if DB_VERSION_MAJOR > 2
18670         DB_ENV *env = NULL;
18671
18672         rc = db_env_create( &env, 0 );
18673
18674         flags |= DB_INIT_MPOOL;
18675 #ifdef DB_MPOOL_PRIVATE
18676         flags |= DB_MPOOL_PRIVATE;
18677 #endif
18678
18679         if( rc ) {
18680                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18681                 return rc;
18682         }
18683
18684 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18685         rc = env->open( env, NULL, flags, 0 );
18686 #else
18687         rc = env->open( env, NULL, NULL, flags, 0 );
18688 #endif
18689
18690         if ( rc == 0 ) {
18691                 rc = env->close( env, 0 );
18692         }
18693
18694         if( rc ) {
18695                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18696                 return rc;
18697         }
18698
18699 #else
18700         DB_ENV env;
18701         memset( &env, '\0', sizeof(env) );
18702
18703         rc = db_appinit( NULL, NULL, &env, flags );
18704
18705         if( rc == 0 ) {
18706                 db_appexit( &env );
18707         }
18708
18709         unlink("__db_mpool.share");
18710         unlink("__db_lock.share");
18711 #endif
18712
18713         return rc;
18714 }
18715 EOF
18716 if { (eval echo configure:18717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18717 then
18718   ol_cv_berkeley_db_thread=yes
18719 else
18720   echo "configure: failed program was:" >&5
18721   cat conftest.$ac_ext >&5
18722   rm -fr conftest*
18723   ol_cv_berkeley_db_thread=no
18724 fi
18725 rm -fr conftest*
18726 fi
18727
18728
18729         LIBS="$ol_LIBS"
18730
18731 fi
18732
18733 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18734
18735         if test $ol_cv_berkeley_db_thread != no ; then
18736                 cat >> confdefs.h <<\EOF
18737 #define HAVE_BERKELEY_DB_THREAD 1
18738 EOF
18739
18740         fi
18741
18742         fi
18743 fi
18744
18745         fi
18746
18747         if test $ol_cv_berkeley_db != no ; then
18748                 cat >> confdefs.h <<\EOF
18749 #define HAVE_BERKELEY_DB 1
18750 EOF
18751
18752
18753                 ol_link_ldbm=berkeley
18754                 ol_with_ldbm_api=berkeley
18755
18756                 if test $ol_with_ldbm_type = hash ; then
18757                         cat >> confdefs.h <<\EOF
18758 #define LDBM_USE_DBHASH 1
18759 EOF
18760
18761                 else
18762                         cat >> confdefs.h <<\EOF
18763 #define LDBM_USE_DBBTREE 1
18764 EOF
18765
18766                 fi
18767
18768                                                 if test $ol_cv_lib_db != yes ; then
18769                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18770                 fi
18771         fi
18772 fi
18773
18774 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18775         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18776 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18777         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18778 echo "configure:18779: checking Berkeley DB version for BDB backend" >&5
18779 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18780   echo $ac_n "(cached) $ac_c" 1>&6
18781 else
18782   
18783         cat > conftest.$ac_ext <<EOF
18784 #line 18785 "configure"
18785 #include "confdefs.h"
18786
18787 #include <db.h>
18788
18789  /* this check could be improved */
18790 #ifndef DB_VERSION_MAJOR
18791 #       define DB_VERSION_MAJOR 1
18792 #endif
18793 #ifndef DB_VERSION_MINOR
18794 #       define DB_VERSION_MINOR 0
18795 #endif
18796
18797 /* require 4.0 or later */
18798 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
18799         __db_version_compat
18800 #endif
18801         
18802 EOF
18803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18804   egrep "__db_version_compat" >/dev/null 2>&1; then
18805   rm -rf conftest*
18806   ol_cv_bdb_compat=yes
18807 else
18808   rm -rf conftest*
18809   ol_cv_bdb_compat=no
18810 fi
18811 rm -f conftest*
18812
18813 fi
18814
18815 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18816
18817
18818         if test $ol_cv_bdb_compat = yes ; then
18819                 ol_enable_bdb=yes
18820         elif test $ol_enable_bdb = yes ; then
18821                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18822         else
18823                 ol_enable_bdb=no
18824         fi
18825 fi
18826
18827 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18828         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18829         ol_with_ldbm_api=none
18830 fi
18831
18832 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18833         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18834 echo "configure:18835: checking for MDBM library" >&5
18835 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18836   echo $ac_n "(cached) $ac_c" 1>&6
18837 else
18838         ol_LIBS="$LIBS"
18839         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18840 echo "configure:18841: checking for mdbm_set_chain" >&5
18841 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18842   echo $ac_n "(cached) $ac_c" 1>&6
18843 else
18844   cat > conftest.$ac_ext <<EOF
18845 #line 18846 "configure"
18846 #include "confdefs.h"
18847 /* System header to define __stub macros and hopefully few prototypes,
18848     which can conflict with char mdbm_set_chain(); below.  */
18849 #include <assert.h>
18850 /* Override any gcc2 internal prototype to avoid an error.  */
18851 /* We use char because int might match the return type of a gcc2
18852     builtin and then its argument prototype would still apply.  */
18853 char mdbm_set_chain();
18854 char (*f)();
18855
18856 int main() {
18857
18858 /* The GNU C library defines this for functions which it implements
18859     to always fail with ENOSYS.  Some functions are actually named
18860     something starting with __ and the normal name is an alias.  */
18861 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18862 choke me
18863 #else
18864 f = mdbm_set_chain;
18865 #endif
18866
18867 ; return 0; }
18868 EOF
18869 if { (eval echo configure:18870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18870   rm -rf conftest*
18871   eval "ac_cv_func_mdbm_set_chain=yes"
18872 else
18873   echo "configure: failed program was:" >&5
18874   cat conftest.$ac_ext >&5
18875   rm -rf conftest*
18876   eval "ac_cv_func_mdbm_set_chain=no"
18877 fi
18878 rm -f conftest*
18879 fi
18880
18881 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18882   echo "$ac_t""yes" 1>&6
18883   ol_cv_lib_mdbm=yes
18884 else
18885   echo "$ac_t""no" 1>&6
18886
18887                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18888 echo "configure:18889: checking for mdbm_set_chain in -lmdbm" >&5
18889 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18890 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18891   echo $ac_n "(cached) $ac_c" 1>&6
18892 else
18893   ac_save_LIBS="$LIBS"
18894 LIBS="-lmdbm  $LIBS"
18895 cat > conftest.$ac_ext <<EOF
18896 #line 18897 "configure"
18897 #include "confdefs.h"
18898 /* Override any gcc2 internal prototype to avoid an error.  */
18899 /* We use char because int might match the return type of a gcc2
18900     builtin and then its argument prototype would still apply.  */
18901 char mdbm_set_chain();
18902
18903 int main() {
18904 mdbm_set_chain()
18905 ; return 0; }
18906 EOF
18907 if { (eval echo configure:18908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18908   rm -rf conftest*
18909   eval "ac_cv_lib_$ac_lib_var=yes"
18910 else
18911   echo "configure: failed program was:" >&5
18912   cat conftest.$ac_ext >&5
18913   rm -rf conftest*
18914   eval "ac_cv_lib_$ac_lib_var=no"
18915 fi
18916 rm -f conftest*
18917 LIBS="$ac_save_LIBS"
18918
18919 fi
18920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18921   echo "$ac_t""yes" 1>&6
18922   ol_cv_lib_mdbm=-lmdbm
18923 else
18924   echo "$ac_t""no" 1>&6
18925 ol_cv_lib_mdbm=no
18926 fi
18927
18928         
18929 fi
18930
18931         LIBS="$ol_LIBS"
18932
18933 fi
18934
18935 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18936
18937
18938  for ac_hdr in mdbm.h
18939 do
18940 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18941 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18942 echo "configure:18943: checking for $ac_hdr" >&5
18943 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18944   echo $ac_n "(cached) $ac_c" 1>&6
18945 else
18946   cat > conftest.$ac_ext <<EOF
18947 #line 18948 "configure"
18948 #include "confdefs.h"
18949 #include <$ac_hdr>
18950 EOF
18951 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18952 { (eval echo configure:18953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18953 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18954 if test -z "$ac_err"; then
18955   rm -rf conftest*
18956   eval "ac_cv_header_$ac_safe=yes"
18957 else
18958   echo "$ac_err" >&5
18959   echo "configure: failed program was:" >&5
18960   cat conftest.$ac_ext >&5
18961   rm -rf conftest*
18962   eval "ac_cv_header_$ac_safe=no"
18963 fi
18964 rm -f conftest*
18965 fi
18966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18967   echo "$ac_t""yes" 1>&6
18968     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18969   cat >> confdefs.h <<EOF
18970 #define $ac_tr_hdr 1
18971 EOF
18972  
18973 else
18974   echo "$ac_t""no" 1>&6
18975 fi
18976 done
18977
18978  echo $ac_n "checking for db""... $ac_c" 1>&6
18979 echo "configure:18980: checking for db" >&5
18980 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18981   echo $ac_n "(cached) $ac_c" 1>&6
18982 else
18983   
18984         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18985                 ol_cv_mdbm=no
18986         else
18987                 ol_cv_mdbm=yes
18988         fi
18989
18990 fi
18991
18992 echo "$ac_t""$ol_cv_mdbm" 1>&6
18993  if test $ol_cv_mdbm = yes ; then
18994         cat >> confdefs.h <<\EOF
18995 #define HAVE_MDBM 1
18996 EOF
18997
18998  fi
18999
19000
19001         if test $ol_cv_mdbm = yes ; then
19002                 ol_link_ldbm=mdbm
19003                 ol_with_ldbm_api=mdbm
19004                 if test $ol_cv_lib_mdbm != yes ; then
19005                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19006                 fi
19007         fi
19008 fi
19009
19010 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19011         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19012 echo "configure:19013: checking for GDBM library" >&5
19013 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19014   echo $ac_n "(cached) $ac_c" 1>&6
19015 else
19016         ol_LIBS="$LIBS"
19017         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19018 echo "configure:19019: checking for gdbm_open" >&5
19019 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19020   echo $ac_n "(cached) $ac_c" 1>&6
19021 else
19022   cat > conftest.$ac_ext <<EOF
19023 #line 19024 "configure"
19024 #include "confdefs.h"
19025 /* System header to define __stub macros and hopefully few prototypes,
19026     which can conflict with char gdbm_open(); below.  */
19027 #include <assert.h>
19028 /* Override any gcc2 internal prototype to avoid an error.  */
19029 /* We use char because int might match the return type of a gcc2
19030     builtin and then its argument prototype would still apply.  */
19031 char gdbm_open();
19032 char (*f)();
19033
19034 int main() {
19035
19036 /* The GNU C library defines this for functions which it implements
19037     to always fail with ENOSYS.  Some functions are actually named
19038     something starting with __ and the normal name is an alias.  */
19039 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19040 choke me
19041 #else
19042 f = gdbm_open;
19043 #endif
19044
19045 ; return 0; }
19046 EOF
19047 if { (eval echo configure:19048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19048   rm -rf conftest*
19049   eval "ac_cv_func_gdbm_open=yes"
19050 else
19051   echo "configure: failed program was:" >&5
19052   cat conftest.$ac_ext >&5
19053   rm -rf conftest*
19054   eval "ac_cv_func_gdbm_open=no"
19055 fi
19056 rm -f conftest*
19057 fi
19058
19059 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19060   echo "$ac_t""yes" 1>&6
19061   ol_cv_lib_gdbm=yes
19062 else
19063   echo "$ac_t""no" 1>&6
19064
19065                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19066 echo "configure:19067: checking for gdbm_open in -lgdbm" >&5
19067 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19068 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19069   echo $ac_n "(cached) $ac_c" 1>&6
19070 else
19071   ac_save_LIBS="$LIBS"
19072 LIBS="-lgdbm  $LIBS"
19073 cat > conftest.$ac_ext <<EOF
19074 #line 19075 "configure"
19075 #include "confdefs.h"
19076 /* Override any gcc2 internal prototype to avoid an error.  */
19077 /* We use char because int might match the return type of a gcc2
19078     builtin and then its argument prototype would still apply.  */
19079 char gdbm_open();
19080
19081 int main() {
19082 gdbm_open()
19083 ; return 0; }
19084 EOF
19085 if { (eval echo configure:19086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19086   rm -rf conftest*
19087   eval "ac_cv_lib_$ac_lib_var=yes"
19088 else
19089   echo "configure: failed program was:" >&5
19090   cat conftest.$ac_ext >&5
19091   rm -rf conftest*
19092   eval "ac_cv_lib_$ac_lib_var=no"
19093 fi
19094 rm -f conftest*
19095 LIBS="$ac_save_LIBS"
19096
19097 fi
19098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19099   echo "$ac_t""yes" 1>&6
19100   ol_cv_lib_gdbm=-lgdbm
19101 else
19102   echo "$ac_t""no" 1>&6
19103 ol_cv_lib_gdbm=no
19104 fi
19105
19106         
19107 fi
19108
19109         LIBS="$ol_LIBS"
19110
19111 fi
19112
19113 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19114
19115
19116  for ac_hdr in gdbm.h
19117 do
19118 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19119 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19120 echo "configure:19121: checking for $ac_hdr" >&5
19121 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19122   echo $ac_n "(cached) $ac_c" 1>&6
19123 else
19124   cat > conftest.$ac_ext <<EOF
19125 #line 19126 "configure"
19126 #include "confdefs.h"
19127 #include <$ac_hdr>
19128 EOF
19129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19130 { (eval echo configure:19131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19132 if test -z "$ac_err"; then
19133   rm -rf conftest*
19134   eval "ac_cv_header_$ac_safe=yes"
19135 else
19136   echo "$ac_err" >&5
19137   echo "configure: failed program was:" >&5
19138   cat conftest.$ac_ext >&5
19139   rm -rf conftest*
19140   eval "ac_cv_header_$ac_safe=no"
19141 fi
19142 rm -f conftest*
19143 fi
19144 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19145   echo "$ac_t""yes" 1>&6
19146     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19147   cat >> confdefs.h <<EOF
19148 #define $ac_tr_hdr 1
19149 EOF
19150  
19151 else
19152   echo "$ac_t""no" 1>&6
19153 fi
19154 done
19155
19156  echo $ac_n "checking for db""... $ac_c" 1>&6
19157 echo "configure:19158: checking for db" >&5
19158 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19159   echo $ac_n "(cached) $ac_c" 1>&6
19160 else
19161   
19162         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19163                 ol_cv_gdbm=no
19164         else
19165                 ol_cv_gdbm=yes
19166         fi
19167
19168 fi
19169
19170 echo "$ac_t""$ol_cv_gdbm" 1>&6
19171  if test $ol_cv_gdbm = yes ; then
19172         cat >> confdefs.h <<\EOF
19173 #define HAVE_GDBM 1
19174 EOF
19175
19176  fi
19177
19178
19179         if test $ol_cv_gdbm = yes ; then
19180                 ol_link_ldbm=gdbm
19181                 ol_with_ldbm_api=gdbm
19182
19183                 if test $ol_cv_lib_gdbm != yes ; then
19184                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19185                 fi
19186         fi
19187 fi
19188
19189 if test $ol_with_ldbm_api = ndbm ; then
19190         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19191 echo "configure:19192: checking for NDBM library" >&5
19192 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19193   echo $ac_n "(cached) $ac_c" 1>&6
19194 else
19195         ol_LIBS="$LIBS"
19196         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19197 echo "configure:19198: checking for dbm_open" >&5
19198 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19199   echo $ac_n "(cached) $ac_c" 1>&6
19200 else
19201   cat > conftest.$ac_ext <<EOF
19202 #line 19203 "configure"
19203 #include "confdefs.h"
19204 /* System header to define __stub macros and hopefully few prototypes,
19205     which can conflict with char dbm_open(); below.  */
19206 #include <assert.h>
19207 /* Override any gcc2 internal prototype to avoid an error.  */
19208 /* We use char because int might match the return type of a gcc2
19209     builtin and then its argument prototype would still apply.  */
19210 char dbm_open();
19211 char (*f)();
19212
19213 int main() {
19214
19215 /* The GNU C library defines this for functions which it implements
19216     to always fail with ENOSYS.  Some functions are actually named
19217     something starting with __ and the normal name is an alias.  */
19218 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19219 choke me
19220 #else
19221 f = dbm_open;
19222 #endif
19223
19224 ; return 0; }
19225 EOF
19226 if { (eval echo configure:19227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19227   rm -rf conftest*
19228   eval "ac_cv_func_dbm_open=yes"
19229 else
19230   echo "configure: failed program was:" >&5
19231   cat conftest.$ac_ext >&5
19232   rm -rf conftest*
19233   eval "ac_cv_func_dbm_open=no"
19234 fi
19235 rm -f conftest*
19236 fi
19237
19238 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19239   echo "$ac_t""yes" 1>&6
19240   ol_cv_lib_ndbm=yes
19241 else
19242   echo "$ac_t""no" 1>&6
19243
19244                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19245 echo "configure:19246: checking for dbm_open in -lndbm" >&5
19246 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19247 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19248   echo $ac_n "(cached) $ac_c" 1>&6
19249 else
19250   ac_save_LIBS="$LIBS"
19251 LIBS="-lndbm  $LIBS"
19252 cat > conftest.$ac_ext <<EOF
19253 #line 19254 "configure"
19254 #include "confdefs.h"
19255 /* Override any gcc2 internal prototype to avoid an error.  */
19256 /* We use char because int might match the return type of a gcc2
19257     builtin and then its argument prototype would still apply.  */
19258 char dbm_open();
19259
19260 int main() {
19261 dbm_open()
19262 ; return 0; }
19263 EOF
19264 if { (eval echo configure:19265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19265   rm -rf conftest*
19266   eval "ac_cv_lib_$ac_lib_var=yes"
19267 else
19268   echo "configure: failed program was:" >&5
19269   cat conftest.$ac_ext >&5
19270   rm -rf conftest*
19271   eval "ac_cv_lib_$ac_lib_var=no"
19272 fi
19273 rm -f conftest*
19274 LIBS="$ac_save_LIBS"
19275
19276 fi
19277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19278   echo "$ac_t""yes" 1>&6
19279   ol_cv_lib_ndbm=-lndbm
19280 else
19281   echo "$ac_t""no" 1>&6
19282
19283                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19284 echo "configure:19285: checking for dbm_open in -ldbm" >&5
19285 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19286 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19287   echo $ac_n "(cached) $ac_c" 1>&6
19288 else
19289   ac_save_LIBS="$LIBS"
19290 LIBS="-ldbm  $LIBS"
19291 cat > conftest.$ac_ext <<EOF
19292 #line 19293 "configure"
19293 #include "confdefs.h"
19294 /* Override any gcc2 internal prototype to avoid an error.  */
19295 /* We use char because int might match the return type of a gcc2
19296     builtin and then its argument prototype would still apply.  */
19297 char dbm_open();
19298
19299 int main() {
19300 dbm_open()
19301 ; return 0; }
19302 EOF
19303 if { (eval echo configure:19304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19304   rm -rf conftest*
19305   eval "ac_cv_lib_$ac_lib_var=yes"
19306 else
19307   echo "configure: failed program was:" >&5
19308   cat conftest.$ac_ext >&5
19309   rm -rf conftest*
19310   eval "ac_cv_lib_$ac_lib_var=no"
19311 fi
19312 rm -f conftest*
19313 LIBS="$ac_save_LIBS"
19314
19315 fi
19316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19317   echo "$ac_t""yes" 1>&6
19318   ol_cv_lib_ndbm=-ldbm
19319 else
19320   echo "$ac_t""no" 1>&6
19321 ol_cv_lib_ndbm=no
19322 fi
19323                 
19324 fi
19325
19326         
19327 fi
19328
19329         LIBS="$ol_LIBS"
19330
19331 fi
19332
19333 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19334
19335
19336  for ac_hdr in ndbm.h
19337 do
19338 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19339 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19340 echo "configure:19341: checking for $ac_hdr" >&5
19341 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19342   echo $ac_n "(cached) $ac_c" 1>&6
19343 else
19344   cat > conftest.$ac_ext <<EOF
19345 #line 19346 "configure"
19346 #include "confdefs.h"
19347 #include <$ac_hdr>
19348 EOF
19349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19350 { (eval echo configure:19351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19352 if test -z "$ac_err"; then
19353   rm -rf conftest*
19354   eval "ac_cv_header_$ac_safe=yes"
19355 else
19356   echo "$ac_err" >&5
19357   echo "configure: failed program was:" >&5
19358   cat conftest.$ac_ext >&5
19359   rm -rf conftest*
19360   eval "ac_cv_header_$ac_safe=no"
19361 fi
19362 rm -f conftest*
19363 fi
19364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19365   echo "$ac_t""yes" 1>&6
19366     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19367   cat >> confdefs.h <<EOF
19368 #define $ac_tr_hdr 1
19369 EOF
19370  
19371 else
19372   echo "$ac_t""no" 1>&6
19373 fi
19374 done
19375
19376  echo $ac_n "checking for db""... $ac_c" 1>&6
19377 echo "configure:19378: checking for db" >&5
19378 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19379   echo $ac_n "(cached) $ac_c" 1>&6
19380 else
19381   
19382         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19383                 ol_cv_ndbm=no
19384         else
19385                 ol_cv_ndbm=yes
19386         fi
19387
19388 fi
19389
19390 echo "$ac_t""$ol_cv_ndbm" 1>&6
19391  if test $ol_cv_ndbm = yes ; then
19392         cat >> confdefs.h <<\EOF
19393 #define HAVE_NDBM 1
19394 EOF
19395
19396  fi
19397
19398
19399         if test $ol_cv_ndbm = yes ; then
19400                 ol_link_ldbm=ndbm
19401                 ol_with_ldbm_api=ndbm
19402
19403                 if test $ol_cv_lib_ndbm != yes ; then
19404                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19405                 fi
19406         fi
19407 fi
19408
19409 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19410         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19411         if test $ol_enable_ldbm = yes ; then
19412                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19413         fi
19414
19415         echo "configure: warning: disabling LDBM" 1>&2
19416         ol_enable_ldbm=no
19417 fi
19418
19419 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19420         BUILD_LIBS_DYNAMIC=shared
19421         cat >> confdefs.h <<\EOF
19422 #define LDAP_LIBS_DYNAMIC 1
19423 EOF
19424
19425 else
19426         BUILD_LIBS_DYNAMIC=static
19427 fi
19428
19429 if test $ol_enable_wrappers != no ; then
19430         for ac_hdr in tcpd.h
19431 do
19432 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19433 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19434 echo "configure:19435: checking for $ac_hdr" >&5
19435 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19436   echo $ac_n "(cached) $ac_c" 1>&6
19437 else
19438   cat > conftest.$ac_ext <<EOF
19439 #line 19440 "configure"
19440 #include "confdefs.h"
19441 #include <$ac_hdr>
19442 EOF
19443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19444 { (eval echo configure:19445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19446 if test -z "$ac_err"; then
19447   rm -rf conftest*
19448   eval "ac_cv_header_$ac_safe=yes"
19449 else
19450   echo "$ac_err" >&5
19451   echo "configure: failed program was:" >&5
19452   cat conftest.$ac_ext >&5
19453   rm -rf conftest*
19454   eval "ac_cv_header_$ac_safe=no"
19455 fi
19456 rm -f conftest*
19457 fi
19458 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19459   echo "$ac_t""yes" 1>&6
19460     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19461   cat >> confdefs.h <<EOF
19462 #define $ac_tr_hdr 1
19463 EOF
19464  
19465                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19466 echo "configure:19467: checking for TCP wrappers library" >&5
19467                 save_LIBS="$LIBS"
19468                 LIBS="$LIBS -lwrap"
19469                 cat > conftest.$ac_ext <<EOF
19470 #line 19471 "configure"
19471 #include "confdefs.h"
19472
19473 #include <tcpd.h>
19474 int allow_severity = 0;
19475 int deny_severity  = 0;
19476
19477 struct request_info *req;
19478                 
19479 int main() {
19480
19481 hosts_access(req)
19482                 
19483 ; return 0; }
19484 EOF
19485 if { (eval echo configure:19486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19486   rm -rf conftest*
19487   echo "$ac_t""-lwrap" 1>&6
19488                 have_wrappers=yes
19489                 LIBS="$save_LIBS"
19490 else
19491   echo "configure: failed program was:" >&5
19492   cat conftest.$ac_ext >&5
19493   rm -rf conftest*
19494   
19495                                 LIBS="$LIBS -lnsl"
19496                 cat > conftest.$ac_ext <<EOF
19497 #line 19498 "configure"
19498 #include "confdefs.h"
19499
19500 #include <tcpd.h>
19501 int allow_severity = 0;
19502 int deny_severity  = 0;
19503
19504 struct request_info *req;
19505                 
19506 int main() {
19507
19508 hosts_access(req)
19509                 
19510 ; return 0; }
19511 EOF
19512 if { (eval echo configure:19513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19513   rm -rf conftest*
19514   echo "$ac_t""-lwrap -lnsl" 1>&6
19515                 have_wrappers=yes
19516                 LIBS="$save_LIBS -lnsl"
19517 else
19518   echo "configure: failed program was:" >&5
19519   cat conftest.$ac_ext >&5
19520   rm -rf conftest*
19521   
19522                 echo "$ac_t""no" 1>&6
19523                 have_wrappers=no
19524                 LIBS=$save_LIBS
19525 fi
19526 rm -f conftest*
19527 fi
19528 rm -f conftest*
19529 else
19530   echo "$ac_t""no" 1>&6
19531 have_wrappers=no
19532 fi
19533 done
19534
19535
19536         if test $have_wrappers = yes ; then
19537                 cat >> confdefs.h <<\EOF
19538 #define HAVE_TCPD 1
19539 EOF
19540
19541                 WRAP_LIBS="-lwrap"
19542         elif test $ol_enable_wrappers = yes ; then
19543                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19544         else
19545                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19546                 WRAP_LIBS=""
19547         fi
19548 fi
19549
19550 if test $ol_enable_syslog != no ; then
19551         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19552 echo "configure:19553: checking for openlog" >&5
19553 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19554   echo $ac_n "(cached) $ac_c" 1>&6
19555 else
19556   cat > conftest.$ac_ext <<EOF
19557 #line 19558 "configure"
19558 #include "confdefs.h"
19559 /* System header to define __stub macros and hopefully few prototypes,
19560     which can conflict with char openlog(); below.  */
19561 #include <assert.h>
19562 /* Override any gcc2 internal prototype to avoid an error.  */
19563 /* We use char because int might match the return type of a gcc2
19564     builtin and then its argument prototype would still apply.  */
19565 char openlog();
19566 char (*f)();
19567
19568 int main() {
19569
19570 /* The GNU C library defines this for functions which it implements
19571     to always fail with ENOSYS.  Some functions are actually named
19572     something starting with __ and the normal name is an alias.  */
19573 #if defined (__stub_openlog) || defined (__stub___openlog)
19574 choke me
19575 #else
19576 f = openlog;
19577 #endif
19578
19579 ; return 0; }
19580 EOF
19581 if { (eval echo configure:19582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19582   rm -rf conftest*
19583   eval "ac_cv_func_openlog=yes"
19584 else
19585   echo "configure: failed program was:" >&5
19586   cat conftest.$ac_ext >&5
19587   rm -rf conftest*
19588   eval "ac_cv_func_openlog=no"
19589 fi
19590 rm -f conftest*
19591 fi
19592
19593 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19594   echo "$ac_t""yes" 1>&6
19595   :
19596 else
19597   echo "$ac_t""no" 1>&6
19598 fi
19599
19600         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19601                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19602         fi
19603         ol_enable_syslog=$ac_cv_func_openlog
19604 fi
19605
19606
19607 ol_link_sql=no
19608 if test $ol_enable_sql != no ; then
19609         for ac_hdr in sql.h sqlext.h
19610 do
19611 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19612 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19613 echo "configure:19614: checking for $ac_hdr" >&5
19614 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19615   echo $ac_n "(cached) $ac_c" 1>&6
19616 else
19617   cat > conftest.$ac_ext <<EOF
19618 #line 19619 "configure"
19619 #include "confdefs.h"
19620 #include <$ac_hdr>
19621 EOF
19622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19623 { (eval echo configure:19624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19625 if test -z "$ac_err"; then
19626   rm -rf conftest*
19627   eval "ac_cv_header_$ac_safe=yes"
19628 else
19629   echo "$ac_err" >&5
19630   echo "configure: failed program was:" >&5
19631   cat conftest.$ac_ext >&5
19632   rm -rf conftest*
19633   eval "ac_cv_header_$ac_safe=no"
19634 fi
19635 rm -f conftest*
19636 fi
19637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19638   echo "$ac_t""yes" 1>&6
19639     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19640   cat >> confdefs.h <<EOF
19641 #define $ac_tr_hdr 1
19642 EOF
19643  
19644 else
19645   echo "$ac_t""no" 1>&6
19646 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19647         
19648 fi
19649 done
19650
19651
19652         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19653 echo "configure:19654: checking for SQLDriverConnect in -liodbc" >&5
19654 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19655 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19656   echo $ac_n "(cached) $ac_c" 1>&6
19657 else
19658   ac_save_LIBS="$LIBS"
19659 LIBS="-liodbc  $LIBS"
19660 cat > conftest.$ac_ext <<EOF
19661 #line 19662 "configure"
19662 #include "confdefs.h"
19663 /* Override any gcc2 internal prototype to avoid an error.  */
19664 /* We use char because int might match the return type of a gcc2
19665     builtin and then its argument prototype would still apply.  */
19666 char SQLDriverConnect();
19667
19668 int main() {
19669 SQLDriverConnect()
19670 ; return 0; }
19671 EOF
19672 if { (eval echo configure:19673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19673   rm -rf conftest*
19674   eval "ac_cv_lib_$ac_lib_var=yes"
19675 else
19676   echo "configure: failed program was:" >&5
19677   cat conftest.$ac_ext >&5
19678   rm -rf conftest*
19679   eval "ac_cv_lib_$ac_lib_var=no"
19680 fi
19681 rm -f conftest*
19682 LIBS="$ac_save_LIBS"
19683
19684 fi
19685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19686   echo "$ac_t""yes" 1>&6
19687   have_iodbc=yes
19688 else
19689   echo "$ac_t""no" 1>&6
19690 have_iodbc=no
19691 fi
19692
19693         if test $have_iodbc = yes ; then
19694                 ol_link_sql="-liodbc"
19695         else
19696                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19697 echo "configure:19698: checking for SQLDriverConnect in -lodbc" >&5
19698 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19700   echo $ac_n "(cached) $ac_c" 1>&6
19701 else
19702   ac_save_LIBS="$LIBS"
19703 LIBS="-lodbc  $LIBS"
19704 cat > conftest.$ac_ext <<EOF
19705 #line 19706 "configure"
19706 #include "confdefs.h"
19707 /* Override any gcc2 internal prototype to avoid an error.  */
19708 /* We use char because int might match the return type of a gcc2
19709     builtin and then its argument prototype would still apply.  */
19710 char SQLDriverConnect();
19711
19712 int main() {
19713 SQLDriverConnect()
19714 ; return 0; }
19715 EOF
19716 if { (eval echo configure:19717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19717   rm -rf conftest*
19718   eval "ac_cv_lib_$ac_lib_var=yes"
19719 else
19720   echo "configure: failed program was:" >&5
19721   cat conftest.$ac_ext >&5
19722   rm -rf conftest*
19723   eval "ac_cv_lib_$ac_lib_var=no"
19724 fi
19725 rm -f conftest*
19726 LIBS="$ac_save_LIBS"
19727
19728 fi
19729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19730   echo "$ac_t""yes" 1>&6
19731   have_odbc=yes
19732 else
19733   echo "$ac_t""no" 1>&6
19734 have_odbc=no
19735 fi
19736
19737                 if test $have_odbc = yes ; then
19738                         ol_link_sql="-lodbc"
19739                 fi
19740         fi
19741
19742         if test $ol_link_sql != no ; then
19743                 SLAPD_SQL_LIBS="$ol_link_sql"
19744
19745         elif test $ol_enable_sql != auto ; then
19746                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19747         fi
19748 fi
19749
19750 ol_link_termcap=no
19751 for ac_hdr in termcap.h ncurses.h
19752 do
19753 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19754 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19755 echo "configure:19756: checking for $ac_hdr" >&5
19756 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19757   echo $ac_n "(cached) $ac_c" 1>&6
19758 else
19759   cat > conftest.$ac_ext <<EOF
19760 #line 19761 "configure"
19761 #include "confdefs.h"
19762 #include <$ac_hdr>
19763 EOF
19764 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19765 { (eval echo configure:19766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19766 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19767 if test -z "$ac_err"; then
19768   rm -rf conftest*
19769   eval "ac_cv_header_$ac_safe=yes"
19770 else
19771   echo "$ac_err" >&5
19772   echo "configure: failed program was:" >&5
19773   cat conftest.$ac_ext >&5
19774   rm -rf conftest*
19775   eval "ac_cv_header_$ac_safe=no"
19776 fi
19777 rm -f conftest*
19778 fi
19779 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19780   echo "$ac_t""yes" 1>&6
19781     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19782   cat >> confdefs.h <<EOF
19783 #define $ac_tr_hdr 1
19784 EOF
19785  
19786 else
19787   echo "$ac_t""no" 1>&6
19788 fi
19789 done
19790
19791
19792 if test $ol_link_termcap = no ; then
19793         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19794 echo "configure:19795: checking for tputs in -ltermcap" >&5
19795 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19796 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19797   echo $ac_n "(cached) $ac_c" 1>&6
19798 else
19799   ac_save_LIBS="$LIBS"
19800 LIBS="-ltermcap  $LIBS"
19801 cat > conftest.$ac_ext <<EOF
19802 #line 19803 "configure"
19803 #include "confdefs.h"
19804 /* Override any gcc2 internal prototype to avoid an error.  */
19805 /* We use char because int might match the return type of a gcc2
19806     builtin and then its argument prototype would still apply.  */
19807 char tputs();
19808
19809 int main() {
19810 tputs()
19811 ; return 0; }
19812 EOF
19813 if { (eval echo configure:19814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19814   rm -rf conftest*
19815   eval "ac_cv_lib_$ac_lib_var=yes"
19816 else
19817   echo "configure: failed program was:" >&5
19818   cat conftest.$ac_ext >&5
19819   rm -rf conftest*
19820   eval "ac_cv_lib_$ac_lib_var=no"
19821 fi
19822 rm -f conftest*
19823 LIBS="$ac_save_LIBS"
19824
19825 fi
19826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19827   echo "$ac_t""yes" 1>&6
19828   have_termcap=yes
19829 else
19830   echo "$ac_t""no" 1>&6
19831 have_termcap=no
19832 fi
19833
19834         if test $have_termcap = yes ; then
19835                 cat >> confdefs.h <<\EOF
19836 #define HAVE_TERMCAP 1
19837 EOF
19838
19839                 ol_link_termcap=yes
19840                 TERMCAP_LIBS=-ltermcap
19841         fi
19842 fi
19843
19844 if test $ol_link_termcap = no ; then
19845         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19846 echo "configure:19847: checking for initscr in -lncurses" >&5
19847 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19848 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19849   echo $ac_n "(cached) $ac_c" 1>&6
19850 else
19851   ac_save_LIBS="$LIBS"
19852 LIBS="-lncurses  $LIBS"
19853 cat > conftest.$ac_ext <<EOF
19854 #line 19855 "configure"
19855 #include "confdefs.h"
19856 /* Override any gcc2 internal prototype to avoid an error.  */
19857 /* We use char because int might match the return type of a gcc2
19858     builtin and then its argument prototype would still apply.  */
19859 char initscr();
19860
19861 int main() {
19862 initscr()
19863 ; return 0; }
19864 EOF
19865 if { (eval echo configure:19866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19866   rm -rf conftest*
19867   eval "ac_cv_lib_$ac_lib_var=yes"
19868 else
19869   echo "configure: failed program was:" >&5
19870   cat conftest.$ac_ext >&5
19871   rm -rf conftest*
19872   eval "ac_cv_lib_$ac_lib_var=no"
19873 fi
19874 rm -f conftest*
19875 LIBS="$ac_save_LIBS"
19876
19877 fi
19878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19879   echo "$ac_t""yes" 1>&6
19880   have_ncurses=yes
19881 else
19882   echo "$ac_t""no" 1>&6
19883 have_ncurses=no
19884 fi
19885
19886         if test $have_ncurses = yes ; then
19887                 cat >> confdefs.h <<\EOF
19888 #define HAVE_NCURSES 1
19889 EOF
19890
19891                 ol_link_termcap=yes
19892                 TERMCAP_LIBS=-lncurses
19893         fi
19894 fi
19895
19896 if test $ol_link_termcap = no ; then
19897         cat >> confdefs.h <<\EOF
19898 #define NO_TERMCAP 1
19899 EOF
19900
19901         TERMCAP_LIBS=
19902 fi
19903
19904 ol_link_sasl=no
19905 ol_link_spasswd=no
19906 if test $ol_with_cyrus_sasl != no ; then
19907         for ac_hdr in sasl/sasl.h sasl.h
19908 do
19909 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19910 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19911 echo "configure:19912: checking for $ac_hdr" >&5
19912 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19913   echo $ac_n "(cached) $ac_c" 1>&6
19914 else
19915   cat > conftest.$ac_ext <<EOF
19916 #line 19917 "configure"
19917 #include "confdefs.h"
19918 #include <$ac_hdr>
19919 EOF
19920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19921 { (eval echo configure:19922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19923 if test -z "$ac_err"; then
19924   rm -rf conftest*
19925   eval "ac_cv_header_$ac_safe=yes"
19926 else
19927   echo "$ac_err" >&5
19928   echo "configure: failed program was:" >&5
19929   cat conftest.$ac_ext >&5
19930   rm -rf conftest*
19931   eval "ac_cv_header_$ac_safe=no"
19932 fi
19933 rm -f conftest*
19934 fi
19935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19936   echo "$ac_t""yes" 1>&6
19937     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19938   cat >> confdefs.h <<EOF
19939 #define $ac_tr_hdr 1
19940 EOF
19941  
19942 else
19943   echo "$ac_t""no" 1>&6
19944 fi
19945 done
19946
19947
19948         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19949                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19950 echo "configure:19951: checking for sasl_client_init in -lsasl2" >&5
19951 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19952 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19953   echo $ac_n "(cached) $ac_c" 1>&6
19954 else
19955   ac_save_LIBS="$LIBS"
19956 LIBS="-lsasl2  $LIBS"
19957 cat > conftest.$ac_ext <<EOF
19958 #line 19959 "configure"
19959 #include "confdefs.h"
19960 /* Override any gcc2 internal prototype to avoid an error.  */
19961 /* We use char because int might match the return type of a gcc2
19962     builtin and then its argument prototype would still apply.  */
19963 char sasl_client_init();
19964
19965 int main() {
19966 sasl_client_init()
19967 ; return 0; }
19968 EOF
19969 if { (eval echo configure:19970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19970   rm -rf conftest*
19971   eval "ac_cv_lib_$ac_lib_var=yes"
19972 else
19973   echo "configure: failed program was:" >&5
19974   cat conftest.$ac_ext >&5
19975   rm -rf conftest*
19976   eval "ac_cv_lib_$ac_lib_var=no"
19977 fi
19978 rm -f conftest*
19979 LIBS="$ac_save_LIBS"
19980
19981 fi
19982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19983   echo "$ac_t""yes" 1>&6
19984   ol_link_sasl="-lsasl2"
19985 else
19986   echo "$ac_t""no" 1>&6
19987 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19988 echo "configure:19989: checking for sasl_client_init in -lsasl" >&5
19989 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19990 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19991   echo $ac_n "(cached) $ac_c" 1>&6
19992 else
19993   ac_save_LIBS="$LIBS"
19994 LIBS="-lsasl  $LIBS"
19995 cat > conftest.$ac_ext <<EOF
19996 #line 19997 "configure"
19997 #include "confdefs.h"
19998 /* Override any gcc2 internal prototype to avoid an error.  */
19999 /* We use char because int might match the return type of a gcc2
20000     builtin and then its argument prototype would still apply.  */
20001 char sasl_client_init();
20002
20003 int main() {
20004 sasl_client_init()
20005 ; return 0; }
20006 EOF
20007 if { (eval echo configure:20008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20008   rm -rf conftest*
20009   eval "ac_cv_lib_$ac_lib_var=yes"
20010 else
20011   echo "configure: failed program was:" >&5
20012   cat conftest.$ac_ext >&5
20013   rm -rf conftest*
20014   eval "ac_cv_lib_$ac_lib_var=no"
20015 fi
20016 rm -f conftest*
20017 LIBS="$ac_save_LIBS"
20018
20019 fi
20020 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20021   echo "$ac_t""yes" 1>&6
20022   ol_link_sasl="-lsasl"
20023 else
20024   echo "$ac_t""no" 1>&6
20025 fi
20026
20027 fi
20028
20029         fi
20030
20031         if test $ol_link_sasl = no ; then
20032                 if test $ol_with_cyrus_sasl != auto ; then
20033                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20034                 else
20035                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20036                         echo "configure: warning: SASL authentication not supported!" 1>&2
20037                         if test $ol_link_tls = no ; then
20038                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20039                         fi
20040                 fi
20041         else
20042                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20043 echo "configure:20044: checking Cyrus SASL library version" >&5
20044 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20045   echo $ac_n "(cached) $ac_c" 1>&6
20046 else
20047   
20048         cat > conftest.$ac_ext <<EOF
20049 #line 20050 "configure"
20050 #include "confdefs.h"
20051
20052 #ifdef HAVE_SASL_SASL_H
20053 #include <sasl/sasl.h>
20054 #else
20055 #include <sasl.h>
20056 #endif
20057
20058 /* require 2.1.3 or later */
20059 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20060         char *__sasl_compat = "1.5.x okay";
20061 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20062         __sasl_compat "2.2+ or better okay (we guess)";
20063 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20064         && SASL_VERSION_STEP >=3
20065         __sasl_compat = "2.1.3+ or better okay";
20066 #endif
20067         
20068 EOF
20069 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20070   egrep "__sasl_compat" >/dev/null 2>&1; then
20071   rm -rf conftest*
20072   ol_cv_sasl_compat=yes
20073 else
20074   rm -rf conftest*
20075   ol_cv_sasl_compat=no
20076 fi
20077 rm -f conftest*
20078
20079 fi
20080
20081 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20082
20083                 if test $ol_cv_sasl_compat = no ; then
20084                         ol_link_sasl=no
20085                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20086                 fi
20087
20088                 cat >> confdefs.h <<\EOF
20089 #define HAVE_CYRUS_SASL 1
20090 EOF
20091
20092                 SASL_LIBS="$ol_link_sasl"
20093                 if test $ol_enable_spasswd != no ; then
20094                         ol_link_spasswd=yes
20095                 fi
20096
20097                 ac_save_LIBS="$LIBS"
20098                 LIBS="$LIBS $ol_link_sasl"
20099                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20100 echo "configure:20101: checking for sasl_version" >&5
20101 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20102   echo $ac_n "(cached) $ac_c" 1>&6
20103 else
20104   cat > conftest.$ac_ext <<EOF
20105 #line 20106 "configure"
20106 #include "confdefs.h"
20107 /* System header to define __stub macros and hopefully few prototypes,
20108     which can conflict with char sasl_version(); below.  */
20109 #include <assert.h>
20110 /* Override any gcc2 internal prototype to avoid an error.  */
20111 /* We use char because int might match the return type of a gcc2
20112     builtin and then its argument prototype would still apply.  */
20113 char sasl_version();
20114 char (*f)();
20115
20116 int main() {
20117
20118 /* The GNU C library defines this for functions which it implements
20119     to always fail with ENOSYS.  Some functions are actually named
20120     something starting with __ and the normal name is an alias.  */
20121 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20122 choke me
20123 #else
20124 f = sasl_version;
20125 #endif
20126
20127 ; return 0; }
20128 EOF
20129 if { (eval echo configure:20130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20130   rm -rf conftest*
20131   eval "ac_cv_func_sasl_version=yes"
20132 else
20133   echo "configure: failed program was:" >&5
20134   cat conftest.$ac_ext >&5
20135   rm -rf conftest*
20136   eval "ac_cv_func_sasl_version=no"
20137 fi
20138 rm -f conftest*
20139 fi
20140
20141 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20142   echo "$ac_t""yes" 1>&6
20143   cat >> confdefs.h <<\EOF
20144 #define HAVE_SASL_VERSION 1
20145 EOF
20146
20147 else
20148   echo "$ac_t""no" 1>&6
20149 fi
20150
20151                 LIBS="$ac_save_LIBS"
20152         fi
20153
20154 else
20155         echo "configure: warning: SASL authentication not supported!" 1>&2
20156         if test $ol_link_tls = no ; then
20157                 echo "configure: warning: Strong authentication not supported!" 1>&2
20158         fi
20159 fi
20160
20161 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20162         dev=no
20163         if test -r /dev/urandom ; then
20164                 dev="/dev/urandom";
20165         elif test -r /idev/urandom ; then
20166                 dev="/idev/urandom";
20167         elif test -r /dev/srandom ; then
20168                 dev="/dev/srandom";
20169         elif test -r /dev/random ; then
20170                 dev="/dev/random";
20171         elif test -r /idev/random ; then
20172                 dev="/idev/random";
20173         fi
20174
20175         if test $dev != no ; then
20176                 cat >> confdefs.h <<EOF
20177 #define URANDOM_DEVICE "$dev"
20178 EOF
20179
20180         fi
20181 fi
20182
20183 ol_link_fetch=no
20184 if test $ol_with_fetch != no ; then
20185         ol_LIBS=$LIBS
20186 LIBS="-lfetch -lcom_err $LIBS"
20187 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20188 echo "configure:20189: checking fetch(3) library" >&5
20189 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20190   echo $ac_n "(cached) $ac_c" 1>&6
20191 else
20192   
20193         cat > conftest.$ac_ext <<EOF
20194 #line 20195 "configure"
20195 #include "confdefs.h"
20196
20197 #include <sys/param.h>
20198 #include <stdio.h>
20199 #include <fetch.h>
20200 int main() {
20201 struct url *u = fetchParseURL("file:///"); 
20202 ; return 0; }
20203 EOF
20204 if { (eval echo configure:20205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20205   rm -rf conftest*
20206   ol_cv_lib_fetch=yes
20207 else
20208   echo "configure: failed program was:" >&5
20209   cat conftest.$ac_ext >&5
20210   rm -rf conftest*
20211   ol_cv_lib_fetch=no
20212 fi
20213 rm -f conftest*
20214 fi
20215
20216 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20217 LIBS=$ol_LIBS
20218 if test $ol_cv_lib_fetch != no ; then
20219         ol_link_fetch="-lfetch -lcom_err"
20220         cat >> confdefs.h <<\EOF
20221 #define HAVE_FETCH 1
20222 EOF
20223
20224 fi
20225
20226
20227         if test $ol_cv_lib_fetch != no ; then
20228                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20229                 ol_link_fetch=freebsd
20230
20231         elif test $ol_with_fetch != auto ; then
20232                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20233         fi 
20234 fi
20235
20236 ol_link_readline=no
20237 if test $ol_with_readline != no ; then
20238         for ac_hdr in readline/readline.h readline/history.h
20239 do
20240 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20241 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20242 echo "configure:20243: checking for $ac_hdr" >&5
20243 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20244   echo $ac_n "(cached) $ac_c" 1>&6
20245 else
20246   cat > conftest.$ac_ext <<EOF
20247 #line 20248 "configure"
20248 #include "confdefs.h"
20249 #include <$ac_hdr>
20250 EOF
20251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20252 { (eval echo configure:20253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20254 if test -z "$ac_err"; then
20255   rm -rf conftest*
20256   eval "ac_cv_header_$ac_safe=yes"
20257 else
20258   echo "$ac_err" >&5
20259   echo "configure: failed program was:" >&5
20260   cat conftest.$ac_ext >&5
20261   rm -rf conftest*
20262   eval "ac_cv_header_$ac_safe=no"
20263 fi
20264 rm -f conftest*
20265 fi
20266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20267   echo "$ac_t""yes" 1>&6
20268     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20269   cat >> confdefs.h <<EOF
20270 #define $ac_tr_hdr 1
20271 EOF
20272  
20273 else
20274   echo "$ac_t""no" 1>&6
20275 fi
20276 done
20277
20278
20279         if test $ac_cv_header_readline_readline_h = yes ; then
20280                 save_LIBS="$LIBS"
20281                 LIBS="$TERMCAP_LIBS $LIBS"
20282                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20283 echo "configure:20284: checking for readline in -lreadline" >&5
20284 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20285 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20286   echo $ac_n "(cached) $ac_c" 1>&6
20287 else
20288   ac_save_LIBS="$LIBS"
20289 LIBS="-lreadline  $LIBS"
20290 cat > conftest.$ac_ext <<EOF
20291 #line 20292 "configure"
20292 #include "confdefs.h"
20293 /* Override any gcc2 internal prototype to avoid an error.  */
20294 /* We use char because int might match the return type of a gcc2
20295     builtin and then its argument prototype would still apply.  */
20296 char readline();
20297
20298 int main() {
20299 readline()
20300 ; return 0; }
20301 EOF
20302 if { (eval echo configure:20303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20303   rm -rf conftest*
20304   eval "ac_cv_lib_$ac_lib_var=yes"
20305 else
20306   echo "configure: failed program was:" >&5
20307   cat conftest.$ac_ext >&5
20308   rm -rf conftest*
20309   eval "ac_cv_lib_$ac_lib_var=no"
20310 fi
20311 rm -f conftest*
20312 LIBS="$ac_save_LIBS"
20313
20314 fi
20315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20316   echo "$ac_t""yes" 1>&6
20317   have_readline=yes
20318 else
20319   echo "$ac_t""no" 1>&6
20320 have_readline=no
20321 fi
20322
20323                 LIBS="$save_LIBS"
20324                         
20325                 if test $have_readline = yes ; then
20326                         ol_with_readline=found
20327                         ol_link_readline=yes
20328
20329                         READLINE_LIBS="-lreadline"
20330                 fi
20331         fi
20332 fi
20333
20334 if test $ol_link_readline = yes ; then
20335         cat >> confdefs.h <<\EOF
20336 #define HAVE_READLINE 1
20337 EOF
20338
20339 fi
20340
20341
20342 if test $ol_enable_crypt != no ; then
20343         save_LIBS="$LIBS"
20344         LIBS="$TLS_LIBS $LIBS"
20345
20346         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20347 echo "configure:20348: checking for crypt" >&5
20348 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20349   echo $ac_n "(cached) $ac_c" 1>&6
20350 else
20351   cat > conftest.$ac_ext <<EOF
20352 #line 20353 "configure"
20353 #include "confdefs.h"
20354 /* System header to define __stub macros and hopefully few prototypes,
20355     which can conflict with char crypt(); below.  */
20356 #include <assert.h>
20357 /* Override any gcc2 internal prototype to avoid an error.  */
20358 /* We use char because int might match the return type of a gcc2
20359     builtin and then its argument prototype would still apply.  */
20360 char crypt();
20361 char (*f)();
20362
20363 int main() {
20364
20365 /* The GNU C library defines this for functions which it implements
20366     to always fail with ENOSYS.  Some functions are actually named
20367     something starting with __ and the normal name is an alias.  */
20368 #if defined (__stub_crypt) || defined (__stub___crypt)
20369 choke me
20370 #else
20371 f = crypt;
20372 #endif
20373
20374 ; return 0; }
20375 EOF
20376 if { (eval echo configure:20377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20377   rm -rf conftest*
20378   eval "ac_cv_func_crypt=yes"
20379 else
20380   echo "configure: failed program was:" >&5
20381   cat conftest.$ac_ext >&5
20382   rm -rf conftest*
20383   eval "ac_cv_func_crypt=no"
20384 fi
20385 rm -f conftest*
20386 fi
20387
20388 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20389   echo "$ac_t""yes" 1>&6
20390   have_crypt=yes
20391 else
20392   echo "$ac_t""no" 1>&6
20393
20394                 LIBS="$save_LIBS"
20395                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20396 echo "configure:20397: checking for crypt in -lcrypt" >&5
20397 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20398 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20399   echo $ac_n "(cached) $ac_c" 1>&6
20400 else
20401   ac_save_LIBS="$LIBS"
20402 LIBS="-lcrypt  $LIBS"
20403 cat > conftest.$ac_ext <<EOF
20404 #line 20405 "configure"
20405 #include "confdefs.h"
20406 /* Override any gcc2 internal prototype to avoid an error.  */
20407 /* We use char because int might match the return type of a gcc2
20408     builtin and then its argument prototype would still apply.  */
20409 char crypt();
20410
20411 int main() {
20412 crypt()
20413 ; return 0; }
20414 EOF
20415 if { (eval echo configure:20416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20416   rm -rf conftest*
20417   eval "ac_cv_lib_$ac_lib_var=yes"
20418 else
20419   echo "configure: failed program was:" >&5
20420   cat conftest.$ac_ext >&5
20421   rm -rf conftest*
20422   eval "ac_cv_lib_$ac_lib_var=no"
20423 fi
20424 rm -f conftest*
20425 LIBS="$ac_save_LIBS"
20426
20427 fi
20428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20429   echo "$ac_t""yes" 1>&6
20430   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20431                         have_crypt=yes
20432 else
20433   echo "$ac_t""no" 1>&6
20434 have_crypt=no
20435 fi
20436
20437 fi
20438
20439
20440         LIBS="$save_LIBS"
20441
20442         if test $have_crypt = yes ; then
20443                 cat >> confdefs.h <<\EOF
20444 #define HAVE_CRYPT 1
20445 EOF
20446
20447         else
20448                 echo "configure: warning: could not find crypt" 1>&2
20449                 if test $ol_enable_crypt = yes ; then
20450                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20451                 fi
20452
20453                 echo "configure: warning: disabling crypt support" 1>&2
20454                 ol_enable_crypt=no
20455         fi
20456 fi
20457
20458 if test $ol_enable_proctitle != no ; then
20459         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20460 echo "configure:20461: checking for setproctitle" >&5
20461 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20462   echo $ac_n "(cached) $ac_c" 1>&6
20463 else
20464   cat > conftest.$ac_ext <<EOF
20465 #line 20466 "configure"
20466 #include "confdefs.h"
20467 /* System header to define __stub macros and hopefully few prototypes,
20468     which can conflict with char setproctitle(); below.  */
20469 #include <assert.h>
20470 /* Override any gcc2 internal prototype to avoid an error.  */
20471 /* We use char because int might match the return type of a gcc2
20472     builtin and then its argument prototype would still apply.  */
20473 char setproctitle();
20474 char (*f)();
20475
20476 int main() {
20477
20478 /* The GNU C library defines this for functions which it implements
20479     to always fail with ENOSYS.  Some functions are actually named
20480     something starting with __ and the normal name is an alias.  */
20481 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20482 choke me
20483 #else
20484 f = setproctitle;
20485 #endif
20486
20487 ; return 0; }
20488 EOF
20489 if { (eval echo configure:20490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20490   rm -rf conftest*
20491   eval "ac_cv_func_setproctitle=yes"
20492 else
20493   echo "configure: failed program was:" >&5
20494   cat conftest.$ac_ext >&5
20495   rm -rf conftest*
20496   eval "ac_cv_func_setproctitle=no"
20497 fi
20498 rm -f conftest*
20499 fi
20500
20501 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20502   echo "$ac_t""yes" 1>&6
20503   have_setproctitle=yes
20504 else
20505   echo "$ac_t""no" 1>&6
20506
20507                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20508 echo "configure:20509: checking for setproctitle in -lutil" >&5
20509 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20510 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20511   echo $ac_n "(cached) $ac_c" 1>&6
20512 else
20513   ac_save_LIBS="$LIBS"
20514 LIBS="-lutil  $LIBS"
20515 cat > conftest.$ac_ext <<EOF
20516 #line 20517 "configure"
20517 #include "confdefs.h"
20518 /* Override any gcc2 internal prototype to avoid an error.  */
20519 /* We use char because int might match the return type of a gcc2
20520     builtin and then its argument prototype would still apply.  */
20521 char setproctitle();
20522
20523 int main() {
20524 setproctitle()
20525 ; return 0; }
20526 EOF
20527 if { (eval echo configure:20528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20528   rm -rf conftest*
20529   eval "ac_cv_lib_$ac_lib_var=yes"
20530 else
20531   echo "configure: failed program was:" >&5
20532   cat conftest.$ac_ext >&5
20533   rm -rf conftest*
20534   eval "ac_cv_lib_$ac_lib_var=no"
20535 fi
20536 rm -f conftest*
20537 LIBS="$ac_save_LIBS"
20538
20539 fi
20540 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20541   echo "$ac_t""yes" 1>&6
20542   have_setproctitle=yes
20543                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20544 else
20545   echo "$ac_t""no" 1>&6
20546 have_setproctitle=no
20547                         LIBOBJS="$LIBOBJS setproctitle.o"
20548                         LIBSRCS="$LIBSRCS setproctitle.c"
20549 fi
20550
20551 fi
20552
20553
20554         if test $have_setproctitle = yes ; then
20555                 cat >> confdefs.h <<\EOF
20556 #define HAVE_SETPROCTITLE 1
20557 EOF
20558
20559         fi
20560 fi
20561
20562 if test $ol_enable_slp != no ; then
20563         for ac_hdr in slp.h 
20564 do
20565 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20566 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20567 echo "configure:20568: checking for $ac_hdr" >&5
20568 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20569   echo $ac_n "(cached) $ac_c" 1>&6
20570 else
20571   cat > conftest.$ac_ext <<EOF
20572 #line 20573 "configure"
20573 #include "confdefs.h"
20574 #include <$ac_hdr>
20575 EOF
20576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20577 { (eval echo configure:20578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20579 if test -z "$ac_err"; then
20580   rm -rf conftest*
20581   eval "ac_cv_header_$ac_safe=yes"
20582 else
20583   echo "$ac_err" >&5
20584   echo "configure: failed program was:" >&5
20585   cat conftest.$ac_ext >&5
20586   rm -rf conftest*
20587   eval "ac_cv_header_$ac_safe=no"
20588 fi
20589 rm -f conftest*
20590 fi
20591 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20592   echo "$ac_t""yes" 1>&6
20593     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20594   cat >> confdefs.h <<EOF
20595 #define $ac_tr_hdr 1
20596 EOF
20597  
20598 else
20599   echo "$ac_t""no" 1>&6
20600 fi
20601 done
20602
20603
20604         if test $ac_cv_header_slp_h = yes ; then
20605                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20606 echo "configure:20607: checking for SLPOpen in -lslp" >&5
20607 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20608 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20609   echo $ac_n "(cached) $ac_c" 1>&6
20610 else
20611   ac_save_LIBS="$LIBS"
20612 LIBS="-lslp  $LIBS"
20613 cat > conftest.$ac_ext <<EOF
20614 #line 20615 "configure"
20615 #include "confdefs.h"
20616 /* Override any gcc2 internal prototype to avoid an error.  */
20617 /* We use char because int might match the return type of a gcc2
20618     builtin and then its argument prototype would still apply.  */
20619 char SLPOpen();
20620
20621 int main() {
20622 SLPOpen()
20623 ; return 0; }
20624 EOF
20625 if { (eval echo configure:20626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20626   rm -rf conftest*
20627   eval "ac_cv_lib_$ac_lib_var=yes"
20628 else
20629   echo "configure: failed program was:" >&5
20630   cat conftest.$ac_ext >&5
20631   rm -rf conftest*
20632   eval "ac_cv_lib_$ac_lib_var=no"
20633 fi
20634 rm -f conftest*
20635 LIBS="$ac_save_LIBS"
20636
20637 fi
20638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20639   echo "$ac_t""yes" 1>&6
20640   have_slp=yes
20641 else
20642   echo "$ac_t""no" 1>&6
20643 have_slp=no
20644 fi
20645
20646                 if test $have_slp = yes ; then
20647                         cat >> confdefs.h <<\EOF
20648 #define HAVE_SLP 1
20649 EOF
20650
20651                         SLAPD_SLP_LIBS=-lslp
20652                 fi
20653
20654         elif test $ol_enable_slp = yes ; then
20655                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20656         fi
20657 fi
20658
20659 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20660 echo "configure:20661: checking for ANSI C header files" >&5
20661 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20662   echo $ac_n "(cached) $ac_c" 1>&6
20663 else
20664   cat > conftest.$ac_ext <<EOF
20665 #line 20666 "configure"
20666 #include "confdefs.h"
20667 #include <stdlib.h>
20668 #include <stdarg.h>
20669 #include <string.h>
20670 #include <float.h>
20671 EOF
20672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20673 { (eval echo configure:20674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20675 if test -z "$ac_err"; then
20676   rm -rf conftest*
20677   ac_cv_header_stdc=yes
20678 else
20679   echo "$ac_err" >&5
20680   echo "configure: failed program was:" >&5
20681   cat conftest.$ac_ext >&5
20682   rm -rf conftest*
20683   ac_cv_header_stdc=no
20684 fi
20685 rm -f conftest*
20686
20687 if test $ac_cv_header_stdc = yes; then
20688   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20689 cat > conftest.$ac_ext <<EOF
20690 #line 20691 "configure"
20691 #include "confdefs.h"
20692 #include <string.h>
20693 EOF
20694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20695   egrep "memchr" >/dev/null 2>&1; then
20696   :
20697 else
20698   rm -rf conftest*
20699   ac_cv_header_stdc=no
20700 fi
20701 rm -f conftest*
20702
20703 fi
20704
20705 if test $ac_cv_header_stdc = yes; then
20706   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20707 cat > conftest.$ac_ext <<EOF
20708 #line 20709 "configure"
20709 #include "confdefs.h"
20710 #include <stdlib.h>
20711 EOF
20712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20713   egrep "free" >/dev/null 2>&1; then
20714   :
20715 else
20716   rm -rf conftest*
20717   ac_cv_header_stdc=no
20718 fi
20719 rm -f conftest*
20720
20721 fi
20722
20723 if test $ac_cv_header_stdc = yes; then
20724   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20725 if test "$cross_compiling" = yes; then
20726   :
20727 else
20728   cat > conftest.$ac_ext <<EOF
20729 #line 20730 "configure"
20730 #include "confdefs.h"
20731 #include <ctype.h>
20732 #if ((' ' & 0x0FF) == 0x020)
20733 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20734 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20735 #else
20736 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20737  || ('j' <= (c) && (c) <= 'r') \
20738  || ('s' <= (c) && (c) <= 'z'))
20739 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20740 #endif
20741 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20742 int main () { int i; for (i = 0; i < 256; i++)
20743 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20744 exit (0); }
20745
20746 EOF
20747 if { (eval echo configure:20748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20748 then
20749   :
20750 else
20751   echo "configure: failed program was:" >&5
20752   cat conftest.$ac_ext >&5
20753   rm -fr conftest*
20754   ac_cv_header_stdc=no
20755 fi
20756 rm -fr conftest*
20757 fi
20758
20759 fi
20760 fi
20761
20762 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20763 if test $ac_cv_header_stdc = yes; then
20764   cat >> confdefs.h <<\EOF
20765 #define STDC_HEADERS 1
20766 EOF
20767
20768 fi
20769
20770 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20771 echo "configure:20772: checking for mode_t" >&5
20772 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20773   echo $ac_n "(cached) $ac_c" 1>&6
20774 else
20775   cat > conftest.$ac_ext <<EOF
20776 #line 20777 "configure"
20777 #include "confdefs.h"
20778 #include <sys/types.h>
20779 #if STDC_HEADERS
20780 #include <stdlib.h>
20781 #include <stddef.h>
20782 #endif
20783
20784 EOF
20785 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20786   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20787   rm -rf conftest*
20788   eval "ac_cv_type_mode_t=yes"
20789 else
20790   rm -rf conftest*
20791   eval "ac_cv_type_mode_t=no"
20792 fi
20793 rm -f conftest*
20794
20795 fi
20796 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20797   echo "$ac_t""yes" 1>&6
20798 else
20799   echo "$ac_t""no" 1>&6
20800   cat >> confdefs.h <<EOF
20801 #define mode_t int
20802 EOF
20803
20804 fi
20805
20806 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20807 echo "configure:20808: checking for off_t" >&5
20808 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20809   echo $ac_n "(cached) $ac_c" 1>&6
20810 else
20811   cat > conftest.$ac_ext <<EOF
20812 #line 20813 "configure"
20813 #include "confdefs.h"
20814 #include <sys/types.h>
20815 #if STDC_HEADERS
20816 #include <stdlib.h>
20817 #include <stddef.h>
20818 #endif
20819
20820 EOF
20821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20822   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20823   rm -rf conftest*
20824   eval "ac_cv_type_off_t=yes"
20825 else
20826   rm -rf conftest*
20827   eval "ac_cv_type_off_t=no"
20828 fi
20829 rm -f conftest*
20830
20831 fi
20832 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20833   echo "$ac_t""yes" 1>&6
20834 else
20835   echo "$ac_t""no" 1>&6
20836   cat >> confdefs.h <<EOF
20837 #define off_t long
20838 EOF
20839
20840 fi
20841
20842 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20843 echo "configure:20844: checking for pid_t" >&5
20844 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20845   echo $ac_n "(cached) $ac_c" 1>&6
20846 else
20847   cat > conftest.$ac_ext <<EOF
20848 #line 20849 "configure"
20849 #include "confdefs.h"
20850 #include <sys/types.h>
20851 #if STDC_HEADERS
20852 #include <stdlib.h>
20853 #include <stddef.h>
20854 #endif
20855
20856 EOF
20857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20858   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20859   rm -rf conftest*
20860   eval "ac_cv_type_pid_t=yes"
20861 else
20862   rm -rf conftest*
20863   eval "ac_cv_type_pid_t=no"
20864 fi
20865 rm -f conftest*
20866
20867 fi
20868 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20869   echo "$ac_t""yes" 1>&6
20870 else
20871   echo "$ac_t""no" 1>&6
20872   cat >> confdefs.h <<EOF
20873 #define pid_t int
20874 EOF
20875
20876 fi
20877
20878 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20879 echo "configure:20880: checking for ptrdiff_t" >&5
20880 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20881   echo $ac_n "(cached) $ac_c" 1>&6
20882 else
20883   cat > conftest.$ac_ext <<EOF
20884 #line 20885 "configure"
20885 #include "confdefs.h"
20886 #include <stddef.h>
20887 int main() {
20888 ptrdiff_t p
20889 ; return 0; }
20890 EOF
20891 if { (eval echo configure:20892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20892   rm -rf conftest*
20893   am_cv_type_ptrdiff_t=yes
20894 else
20895   echo "configure: failed program was:" >&5
20896   cat conftest.$ac_ext >&5
20897   rm -rf conftest*
20898   am_cv_type_ptrdiff_t=no
20899 fi
20900 rm -f conftest*
20901 fi
20902
20903 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20904    if test $am_cv_type_ptrdiff_t = yes; then
20905      cat >> confdefs.h <<\EOF
20906 #define HAVE_PTRDIFF_T 1
20907 EOF
20908
20909    fi
20910
20911 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20912 echo "configure:20913: checking return type of signal handlers" >&5
20913 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20914   echo $ac_n "(cached) $ac_c" 1>&6
20915 else
20916   cat > conftest.$ac_ext <<EOF
20917 #line 20918 "configure"
20918 #include "confdefs.h"
20919 #include <sys/types.h>
20920 #include <signal.h>
20921 #ifdef signal
20922 #undef signal
20923 #endif
20924 #ifdef __cplusplus
20925 extern "C" void (*signal (int, void (*)(int)))(int);
20926 #else
20927 void (*signal ()) ();
20928 #endif
20929
20930 int main() {
20931 int i;
20932 ; return 0; }
20933 EOF
20934 if { (eval echo configure:20935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20935   rm -rf conftest*
20936   ac_cv_type_signal=void
20937 else
20938   echo "configure: failed program was:" >&5
20939   cat conftest.$ac_ext >&5
20940   rm -rf conftest*
20941   ac_cv_type_signal=int
20942 fi
20943 rm -f conftest*
20944 fi
20945
20946 echo "$ac_t""$ac_cv_type_signal" 1>&6
20947 cat >> confdefs.h <<EOF
20948 #define RETSIGTYPE $ac_cv_type_signal
20949 EOF
20950
20951
20952 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20953 echo "configure:20954: checking for size_t" >&5
20954 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20955   echo $ac_n "(cached) $ac_c" 1>&6
20956 else
20957   cat > conftest.$ac_ext <<EOF
20958 #line 20959 "configure"
20959 #include "confdefs.h"
20960 #include <sys/types.h>
20961 #if STDC_HEADERS
20962 #include <stdlib.h>
20963 #include <stddef.h>
20964 #endif
20965
20966 EOF
20967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20968   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20969   rm -rf conftest*
20970   eval "ac_cv_type_size_t=yes"
20971 else
20972   rm -rf conftest*
20973   eval "ac_cv_type_size_t=no"
20974 fi
20975 rm -f conftest*
20976
20977 fi
20978 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20979   echo "$ac_t""yes" 1>&6
20980 else
20981   echo "$ac_t""no" 1>&6
20982   cat >> confdefs.h <<EOF
20983 #define size_t unsigned
20984 EOF
20985
20986 fi
20987
20988
20989 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20990 echo "configure:20991: checking for ssize_t" >&5
20991 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20992   echo $ac_n "(cached) $ac_c" 1>&6
20993 else
20994   cat > conftest.$ac_ext <<EOF
20995 #line 20996 "configure"
20996 #include "confdefs.h"
20997 #include <sys/types.h>
20998 #if STDC_HEADERS
20999 #include <stdlib.h>
21000 #include <stddef.h>
21001 #endif
21002
21003 EOF
21004 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21005   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21006   rm -rf conftest*
21007   eval "ac_cv_type_ssize_t=yes"
21008 else
21009   rm -rf conftest*
21010   eval "ac_cv_type_ssize_t=no"
21011 fi
21012 rm -f conftest*
21013
21014 fi
21015 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21016   echo "$ac_t""yes" 1>&6
21017 else
21018   echo "$ac_t""no" 1>&6
21019   cat >> confdefs.h <<EOF
21020 #define ssize_t signed int
21021 EOF
21022
21023 fi
21024
21025 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21026 echo "configure:21027: checking for caddr_t" >&5
21027 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21028   echo $ac_n "(cached) $ac_c" 1>&6
21029 else
21030   cat > conftest.$ac_ext <<EOF
21031 #line 21032 "configure"
21032 #include "confdefs.h"
21033 #include <sys/types.h>
21034 #if STDC_HEADERS
21035 #include <stdlib.h>
21036 #include <stddef.h>
21037 #endif
21038
21039 EOF
21040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21041   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21042   rm -rf conftest*
21043   eval "ac_cv_type_caddr_t=yes"
21044 else
21045   rm -rf conftest*
21046   eval "ac_cv_type_caddr_t=no"
21047 fi
21048 rm -f conftest*
21049
21050 fi
21051 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21052   echo "$ac_t""yes" 1>&6
21053 else
21054   echo "$ac_t""no" 1>&6
21055   cat >> confdefs.h <<EOF
21056 #define caddr_t char *
21057 EOF
21058
21059 fi
21060
21061
21062 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21063 echo "configure:21064: checking for socklen_t" >&5
21064 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21065   echo $ac_n "(cached) $ac_c" 1>&6
21066 else
21067   cat > conftest.$ac_ext <<EOF
21068 #line 21069 "configure"
21069 #include "confdefs.h"
21070
21071 #ifdef HAVE_SYS_TYPES_H
21072 #include <sys/types.h>
21073 #endif
21074 #ifdef HAVE_SYS_SOCKET_H
21075 #include <sys/socket.h>
21076 #endif
21077
21078 int main() {
21079 socklen_t len;
21080 ; return 0; }
21081 EOF
21082 if { (eval echo configure:21083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21083   rm -rf conftest*
21084   ol_cv_type_socklen_t=yes
21085 else
21086   echo "configure: failed program was:" >&5
21087   cat conftest.$ac_ext >&5
21088   rm -rf conftest*
21089   ol_cv_type_socklen_t=no
21090 fi
21091 rm -f conftest*
21092 fi
21093
21094 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21095   if test $ol_cv_type_socklen_t = no; then
21096     cat >> confdefs.h <<\EOF
21097 #define socklen_t int
21098 EOF
21099
21100   fi
21101  
21102 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21103 echo "configure:21104: checking for member st_blksize in aggregate type struct stat" >&5
21104 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21105   echo $ac_n "(cached) $ac_c" 1>&6
21106 else
21107   cat > conftest.$ac_ext <<EOF
21108 #line 21109 "configure"
21109 #include "confdefs.h"
21110 #include <sys/types.h>
21111 #include <sys/stat.h>
21112 int main() {
21113 struct stat foo; foo.st_blksize;
21114 ; return 0; }
21115 EOF
21116 if { (eval echo configure:21117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21117   rm -rf conftest*
21118   ac_cv_c_struct_member_st_blksize=yes
21119 else
21120   echo "configure: failed program was:" >&5
21121   cat conftest.$ac_ext >&5
21122   rm -rf conftest*
21123   ac_cv_c_struct_member_st_blksize=no
21124 fi
21125 rm -f conftest*
21126 fi
21127
21128 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21129 st_blksize="$ac_cv_c_struct_member_st_blksize"
21130 if test $ac_cv_c_struct_member_st_blksize = yes; then
21131   cat >> confdefs.h <<\EOF
21132 #define HAVE_ST_BLKSIZE 1
21133 EOF
21134
21135 fi
21136
21137 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21138 echo "configure:21139: checking whether time.h and sys/time.h may both be included" >&5
21139 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21140   echo $ac_n "(cached) $ac_c" 1>&6
21141 else
21142   cat > conftest.$ac_ext <<EOF
21143 #line 21144 "configure"
21144 #include "confdefs.h"
21145 #include <sys/types.h>
21146 #include <sys/time.h>
21147 #include <time.h>
21148 int main() {
21149 struct tm *tp;
21150 ; return 0; }
21151 EOF
21152 if { (eval echo configure:21153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21153   rm -rf conftest*
21154   ac_cv_header_time=yes
21155 else
21156   echo "configure: failed program was:" >&5
21157   cat conftest.$ac_ext >&5
21158   rm -rf conftest*
21159   ac_cv_header_time=no
21160 fi
21161 rm -f conftest*
21162 fi
21163
21164 echo "$ac_t""$ac_cv_header_time" 1>&6
21165 if test $ac_cv_header_time = yes; then
21166   cat >> confdefs.h <<\EOF
21167 #define TIME_WITH_SYS_TIME 1
21168 EOF
21169
21170 fi
21171
21172 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21173 echo "configure:21174: checking whether struct tm is in sys/time.h or time.h" >&5
21174 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21175   echo $ac_n "(cached) $ac_c" 1>&6
21176 else
21177   cat > conftest.$ac_ext <<EOF
21178 #line 21179 "configure"
21179 #include "confdefs.h"
21180 #include <sys/types.h>
21181 #include <time.h>
21182 int main() {
21183 struct tm *tp; tp->tm_sec;
21184 ; return 0; }
21185 EOF
21186 if { (eval echo configure:21187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21187   rm -rf conftest*
21188   ac_cv_struct_tm=time.h
21189 else
21190   echo "configure: failed program was:" >&5
21191   cat conftest.$ac_ext >&5
21192   rm -rf conftest*
21193   ac_cv_struct_tm=sys/time.h
21194 fi
21195 rm -f conftest*
21196 fi
21197
21198 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21199 if test $ac_cv_struct_tm = sys/time.h; then
21200   cat >> confdefs.h <<\EOF
21201 #define TM_IN_SYS_TIME 1
21202 EOF
21203
21204 fi
21205
21206 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21207 echo "configure:21208: checking for uid_t in sys/types.h" >&5
21208 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21209   echo $ac_n "(cached) $ac_c" 1>&6
21210 else
21211   cat > conftest.$ac_ext <<EOF
21212 #line 21213 "configure"
21213 #include "confdefs.h"
21214 #include <sys/types.h>
21215 EOF
21216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21217   egrep "uid_t" >/dev/null 2>&1; then
21218   rm -rf conftest*
21219   ac_cv_type_uid_t=yes
21220 else
21221   rm -rf conftest*
21222   ac_cv_type_uid_t=no
21223 fi
21224 rm -f conftest*
21225
21226 fi
21227
21228 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21229 if test $ac_cv_type_uid_t = no; then
21230   cat >> confdefs.h <<\EOF
21231 #define uid_t int
21232 EOF
21233
21234   cat >> confdefs.h <<\EOF
21235 #define gid_t int
21236 EOF
21237
21238 fi
21239
21240 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21241 echo "configure:21242: checking for sig_atomic_t" >&5
21242 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21243   echo $ac_n "(cached) $ac_c" 1>&6
21244 else
21245   cat > conftest.$ac_ext <<EOF
21246 #line 21247 "configure"
21247 #include "confdefs.h"
21248 #include <signal.h>
21249 int main() {
21250 sig_atomic_t atomic;
21251 ; return 0; }
21252 EOF
21253 if { (eval echo configure:21254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21254   rm -rf conftest*
21255   ol_cv_type_sig_atomic_t=yes
21256 else
21257   echo "configure: failed program was:" >&5
21258   cat conftest.$ac_ext >&5
21259   rm -rf conftest*
21260   ol_cv_type_sig_atomic_t=no
21261 fi
21262 rm -f conftest*
21263 fi
21264
21265 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21266   if test $ol_cv_type_sig_atomic_t = no; then
21267     cat >> confdefs.h <<\EOF
21268 #define sig_atomic_t int
21269 EOF
21270
21271   fi
21272  
21273
21274
21275 # test for pw_gecos in struct passwd
21276 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21277 echo "configure:21278: checking struct passwd for pw_gecos" >&5
21278 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21279   echo $ac_n "(cached) $ac_c" 1>&6
21280 else
21281   
21282         cat > conftest.$ac_ext <<EOF
21283 #line 21284 "configure"
21284 #include "confdefs.h"
21285 #include <pwd.h>
21286 int main() {
21287
21288         struct passwd pwd;
21289         pwd.pw_gecos = pwd.pw_name;
21290
21291 ; return 0; }
21292 EOF
21293 if { (eval echo configure:21294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21294   rm -rf conftest*
21295   ol_cv_struct_passwd_pw_gecos=yes
21296 else
21297   echo "configure: failed program was:" >&5
21298   cat conftest.$ac_ext >&5
21299   rm -rf conftest*
21300   ol_cv_struct_passwd_pw_gecos=no
21301 fi
21302 rm -f conftest*
21303 fi
21304
21305 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21306 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21307         cat >> confdefs.h <<\EOF
21308 #define HAVE_PW_GECOS 1
21309 EOF
21310
21311 fi
21312
21313 # test for pw_passwd in struct passwd
21314 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21315 echo "configure:21316: checking struct passwd for pw_passwd" >&5
21316 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21317   echo $ac_n "(cached) $ac_c" 1>&6
21318 else
21319   
21320         cat > conftest.$ac_ext <<EOF
21321 #line 21322 "configure"
21322 #include "confdefs.h"
21323 #include <pwd.h>
21324 int main() {
21325
21326         struct passwd pwd;
21327         pwd.pw_passwd = pwd.pw_name;
21328
21329 ; return 0; }
21330 EOF
21331 if { (eval echo configure:21332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21332   rm -rf conftest*
21333   ol_cv_struct_passwd_pw_passwd=yes
21334 else
21335   echo "configure: failed program was:" >&5
21336   cat conftest.$ac_ext >&5
21337   rm -rf conftest*
21338   ol_cv_struct_passwd_pw_passwd=no
21339 fi
21340 rm -f conftest*
21341 fi
21342
21343 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21344 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21345         cat >> confdefs.h <<\EOF
21346 #define HAVE_PW_PASSWD 1
21347 EOF
21348
21349 fi
21350
21351
21352 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21353 echo "configure:21354: checking if toupper() requires islower()" >&5
21354 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21355   echo $ac_n "(cached) $ac_c" 1>&6
21356 else
21357   
21358         if test "$cross_compiling" = yes; then
21359   ol_cv_c_upper_lower=safe
21360 else
21361   cat > conftest.$ac_ext <<EOF
21362 #line 21363 "configure"
21363 #include "confdefs.h"
21364
21365 #include <ctype.h>
21366 main()
21367 {
21368         if ('C' == toupper('C'))
21369                 exit(0);
21370         else
21371                 exit(1);
21372 }
21373 EOF
21374 if { (eval echo configure:21375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21375 then
21376   ol_cv_c_upper_lower=no
21377 else
21378   echo "configure: failed program was:" >&5
21379   cat conftest.$ac_ext >&5
21380   rm -fr conftest*
21381   ol_cv_c_upper_lower=yes
21382 fi
21383 rm -fr conftest*
21384 fi
21385
21386 fi
21387
21388 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21389 if test $ol_cv_c_upper_lower != no ; then
21390         cat >> confdefs.h <<\EOF
21391 #define C_UPPER_LOWER 1
21392 EOF
21393
21394 fi
21395
21396 echo $ac_n "checking for working const""... $ac_c" 1>&6
21397 echo "configure:21398: checking for working const" >&5
21398 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21399   echo $ac_n "(cached) $ac_c" 1>&6
21400 else
21401   cat > conftest.$ac_ext <<EOF
21402 #line 21403 "configure"
21403 #include "confdefs.h"
21404
21405 int main() {
21406
21407 /* Ultrix mips cc rejects this.  */
21408 typedef int charset[2]; const charset x;
21409 /* SunOS 4.1.1 cc rejects this.  */
21410 char const *const *ccp;
21411 char **p;
21412 /* NEC SVR4.0.2 mips cc rejects this.  */
21413 struct point {int x, y;};
21414 static struct point const zero = {0,0};
21415 /* AIX XL C 1.02.0.0 rejects this.
21416    It does not let you subtract one const X* pointer from another in an arm
21417    of an if-expression whose if-part is not a constant expression */
21418 const char *g = "string";
21419 ccp = &g + (g ? g-g : 0);
21420 /* HPUX 7.0 cc rejects these. */
21421 ++ccp;
21422 p = (char**) ccp;
21423 ccp = (char const *const *) p;
21424 { /* SCO 3.2v4 cc rejects this.  */
21425   char *t;
21426   char const *s = 0 ? (char *) 0 : (char const *) 0;
21427
21428   *t++ = 0;
21429 }
21430 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21431   int x[] = {25, 17};
21432   const int *foo = &x[0];
21433   ++foo;
21434 }
21435 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21436   typedef const int *iptr;
21437   iptr p = 0;
21438   ++p;
21439 }
21440 { /* AIX XL C 1.02.0.0 rejects this saying
21441      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21442   struct s { int j; const int *ap[3]; };
21443   struct s *b; b->j = 5;
21444 }
21445 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21446   const int foo = 10;
21447 }
21448
21449 ; return 0; }
21450 EOF
21451 if { (eval echo configure:21452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21452   rm -rf conftest*
21453   ac_cv_c_const=yes
21454 else
21455   echo "configure: failed program was:" >&5
21456   cat conftest.$ac_ext >&5
21457   rm -rf conftest*
21458   ac_cv_c_const=no
21459 fi
21460 rm -f conftest*
21461 fi
21462
21463 echo "$ac_t""$ac_cv_c_const" 1>&6
21464 if test $ac_cv_c_const = no; then
21465   cat >> confdefs.h <<\EOF
21466 #define const 
21467 EOF
21468
21469 fi
21470
21471 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21472 echo "configure:21473: checking if compiler understands volatile" >&5
21473 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21474   echo $ac_n "(cached) $ac_c" 1>&6
21475 else
21476   cat > conftest.$ac_ext <<EOF
21477 #line 21478 "configure"
21478 #include "confdefs.h"
21479 int x, y, z;
21480 int main() {
21481 volatile int a; int * volatile b = x ? &y : &z;
21482       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21483       *b = 0;
21484 ; return 0; }
21485 EOF
21486 if { (eval echo configure:21487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21487   rm -rf conftest*
21488   ol_cv_c_volatile=yes
21489 else
21490   echo "configure: failed program was:" >&5
21491   cat conftest.$ac_ext >&5
21492   rm -rf conftest*
21493   ol_cv_c_volatile=no
21494 fi
21495 rm -f conftest*
21496 fi
21497
21498 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21499   if test $ol_cv_c_volatile = yes; then
21500     : 
21501   else
21502     cat >> confdefs.h <<\EOF
21503 #define volatile 
21504 EOF
21505
21506   fi
21507  
21508
21509 if test $cross_compiling = yes ; then
21510         cat >> confdefs.h <<\EOF
21511 #define CROSS_COMPILING 1
21512 EOF
21513
21514 else
21515         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21516 echo "configure:21517: checking whether byte ordering is bigendian" >&5
21517 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21518   echo $ac_n "(cached) $ac_c" 1>&6
21519 else
21520   ac_cv_c_bigendian=unknown
21521 # See if sys/param.h defines the BYTE_ORDER macro.
21522 cat > conftest.$ac_ext <<EOF
21523 #line 21524 "configure"
21524 #include "confdefs.h"
21525 #include <sys/types.h>
21526 #include <sys/param.h>
21527 int main() {
21528
21529 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21530  bogus endian macros
21531 #endif
21532 ; return 0; }
21533 EOF
21534 if { (eval echo configure:21535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21535   rm -rf conftest*
21536   # It does; now see whether it defined to BIG_ENDIAN or not.
21537 cat > conftest.$ac_ext <<EOF
21538 #line 21539 "configure"
21539 #include "confdefs.h"
21540 #include <sys/types.h>
21541 #include <sys/param.h>
21542 int main() {
21543
21544 #if BYTE_ORDER != BIG_ENDIAN
21545  not big endian
21546 #endif
21547 ; return 0; }
21548 EOF
21549 if { (eval echo configure:21550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21550   rm -rf conftest*
21551   ac_cv_c_bigendian=yes
21552 else
21553   echo "configure: failed program was:" >&5
21554   cat conftest.$ac_ext >&5
21555   rm -rf conftest*
21556   ac_cv_c_bigendian=no
21557 fi
21558 rm -f conftest*
21559 else
21560   echo "configure: failed program was:" >&5
21561   cat conftest.$ac_ext >&5
21562 fi
21563 rm -f conftest*
21564 if test $ac_cv_c_bigendian = unknown; then
21565 if test "$cross_compiling" = yes; then
21566     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21567 else
21568   cat > conftest.$ac_ext <<EOF
21569 #line 21570 "configure"
21570 #include "confdefs.h"
21571 main () {
21572   /* Are we little or big endian?  From Harbison&Steele.  */
21573   union
21574   {
21575     long l;
21576     char c[sizeof (long)];
21577   } u;
21578   u.l = 1;
21579   exit (u.c[sizeof (long) - 1] == 1);
21580 }
21581 EOF
21582 if { (eval echo configure:21583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21583 then
21584   ac_cv_c_bigendian=no
21585 else
21586   echo "configure: failed program was:" >&5
21587   cat conftest.$ac_ext >&5
21588   rm -fr conftest*
21589   ac_cv_c_bigendian=yes
21590 fi
21591 rm -fr conftest*
21592 fi
21593
21594 fi
21595 fi
21596
21597 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21598 if test $ac_cv_c_bigendian = yes; then
21599   cat >> confdefs.h <<\EOF
21600 #define WORDS_BIGENDIAN 1
21601 EOF
21602
21603 fi
21604
21605 fi
21606
21607 echo $ac_n "checking size of short""... $ac_c" 1>&6
21608 echo "configure:21609: checking size of short" >&5 
21609 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21610   echo $ac_n "(cached) $ac_c" 1>&6
21611 else
21612   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21613   cat > conftest.$ac_ext <<EOF
21614 #line 21615 "configure"
21615 #include "confdefs.h"
21616 #include "confdefs.h" 
21617 #include <sys/types.h> 
21618  
21619
21620 int main() {
21621 switch (0) case 0: case (sizeof (short) == $ac_size):;
21622 ; return 0; }
21623 EOF
21624 if { (eval echo configure:21625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21625   rm -rf conftest*
21626   ac_cv_sizeof_short=$ac_size
21627 else
21628   echo "configure: failed program was:" >&5
21629   cat conftest.$ac_ext >&5
21630 fi
21631 rm -f conftest* 
21632   if test x$ac_cv_sizeof_short != x ; then break; fi 
21633 done 
21634
21635 fi
21636  
21637 if test x$ac_cv_sizeof_short = x ; then 
21638   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21639 fi 
21640 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21641 cat >> confdefs.h <<EOF
21642 #define SIZEOF_SHORT $ac_cv_sizeof_short
21643 EOF
21644  
21645  
21646 echo $ac_n "checking size of int""... $ac_c" 1>&6
21647 echo "configure:21648: checking size of int" >&5 
21648 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21649   echo $ac_n "(cached) $ac_c" 1>&6
21650 else
21651   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21652   cat > conftest.$ac_ext <<EOF
21653 #line 21654 "configure"
21654 #include "confdefs.h"
21655 #include "confdefs.h" 
21656 #include <sys/types.h> 
21657  
21658
21659 int main() {
21660 switch (0) case 0: case (sizeof (int) == $ac_size):;
21661 ; return 0; }
21662 EOF
21663 if { (eval echo configure:21664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21664   rm -rf conftest*
21665   ac_cv_sizeof_int=$ac_size
21666 else
21667   echo "configure: failed program was:" >&5
21668   cat conftest.$ac_ext >&5
21669 fi
21670 rm -f conftest* 
21671   if test x$ac_cv_sizeof_int != x ; then break; fi 
21672 done 
21673
21674 fi
21675  
21676 if test x$ac_cv_sizeof_int = x ; then 
21677   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21678 fi 
21679 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21680 cat >> confdefs.h <<EOF
21681 #define SIZEOF_INT $ac_cv_sizeof_int
21682 EOF
21683  
21684  
21685 echo $ac_n "checking size of long""... $ac_c" 1>&6
21686 echo "configure:21687: checking size of long" >&5 
21687 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21688   echo $ac_n "(cached) $ac_c" 1>&6
21689 else
21690   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21691   cat > conftest.$ac_ext <<EOF
21692 #line 21693 "configure"
21693 #include "confdefs.h"
21694 #include "confdefs.h" 
21695 #include <sys/types.h> 
21696  
21697
21698 int main() {
21699 switch (0) case 0: case (sizeof (long) == $ac_size):;
21700 ; return 0; }
21701 EOF
21702 if { (eval echo configure:21703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21703   rm -rf conftest*
21704   ac_cv_sizeof_long=$ac_size
21705 else
21706   echo "configure: failed program was:" >&5
21707   cat conftest.$ac_ext >&5
21708 fi
21709 rm -f conftest* 
21710   if test x$ac_cv_sizeof_long != x ; then break; fi 
21711 done 
21712
21713 fi
21714  
21715 if test x$ac_cv_sizeof_long = x ; then 
21716   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21717 fi 
21718 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21719 cat >> confdefs.h <<EOF
21720 #define SIZEOF_LONG $ac_cv_sizeof_long
21721 EOF
21722  
21723
21724
21725 if test "$ac_cv_sizeof_int" -lt 4 ; then
21726         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21727
21728         cat >> confdefs.h <<\EOF
21729 #define LBER_INT_T long
21730 EOF
21731
21732 else
21733         cat >> confdefs.h <<\EOF
21734 #define LBER_INT_T int
21735 EOF
21736
21737 fi
21738
21739 cat >> confdefs.h <<\EOF
21740 #define LBER_LEN_T long
21741 EOF
21742
21743 cat >> confdefs.h <<\EOF
21744 #define LBER_SOCKET_T int
21745 EOF
21746
21747 cat >> confdefs.h <<\EOF
21748 #define LBER_TAG_T long
21749 EOF
21750
21751
21752 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21753 echo "configure:21754: checking for 8-bit clean memcmp" >&5
21754 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21755   echo $ac_n "(cached) $ac_c" 1>&6
21756 else
21757   if test "$cross_compiling" = yes; then
21758   ac_cv_func_memcmp_clean=no
21759 else
21760   cat > conftest.$ac_ext <<EOF
21761 #line 21762 "configure"
21762 #include "confdefs.h"
21763
21764 main()
21765 {
21766   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21767   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21768 }
21769
21770 EOF
21771 if { (eval echo configure:21772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21772 then
21773   ac_cv_func_memcmp_clean=yes
21774 else
21775   echo "configure: failed program was:" >&5
21776   cat conftest.$ac_ext >&5
21777   rm -fr conftest*
21778   ac_cv_func_memcmp_clean=no
21779 fi
21780 rm -fr conftest*
21781 fi
21782
21783 fi
21784
21785 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21786 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21787
21788 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21789 echo "configure:21790: checking for strftime" >&5
21790 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21791   echo $ac_n "(cached) $ac_c" 1>&6
21792 else
21793   cat > conftest.$ac_ext <<EOF
21794 #line 21795 "configure"
21795 #include "confdefs.h"
21796 /* System header to define __stub macros and hopefully few prototypes,
21797     which can conflict with char strftime(); below.  */
21798 #include <assert.h>
21799 /* Override any gcc2 internal prototype to avoid an error.  */
21800 /* We use char because int might match the return type of a gcc2
21801     builtin and then its argument prototype would still apply.  */
21802 char strftime();
21803 char (*f)();
21804
21805 int main() {
21806
21807 /* The GNU C library defines this for functions which it implements
21808     to always fail with ENOSYS.  Some functions are actually named
21809     something starting with __ and the normal name is an alias.  */
21810 #if defined (__stub_strftime) || defined (__stub___strftime)
21811 choke me
21812 #else
21813 f = strftime;
21814 #endif
21815
21816 ; return 0; }
21817 EOF
21818 if { (eval echo configure:21819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21819   rm -rf conftest*
21820   eval "ac_cv_func_strftime=yes"
21821 else
21822   echo "configure: failed program was:" >&5
21823   cat conftest.$ac_ext >&5
21824   rm -rf conftest*
21825   eval "ac_cv_func_strftime=no"
21826 fi
21827 rm -f conftest*
21828 fi
21829
21830 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21831   echo "$ac_t""yes" 1>&6
21832   cat >> confdefs.h <<\EOF
21833 #define HAVE_STRFTIME 1
21834 EOF
21835
21836 else
21837   echo "$ac_t""no" 1>&6
21838 # strftime is in -lintl on SCO UNIX.
21839 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21840 echo "configure:21841: checking for strftime in -lintl" >&5
21841 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21842 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21843   echo $ac_n "(cached) $ac_c" 1>&6
21844 else
21845   ac_save_LIBS="$LIBS"
21846 LIBS="-lintl  $LIBS"
21847 cat > conftest.$ac_ext <<EOF
21848 #line 21849 "configure"
21849 #include "confdefs.h"
21850 /* Override any gcc2 internal prototype to avoid an error.  */
21851 /* We use char because int might match the return type of a gcc2
21852     builtin and then its argument prototype would still apply.  */
21853 char strftime();
21854
21855 int main() {
21856 strftime()
21857 ; return 0; }
21858 EOF
21859 if { (eval echo configure:21860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21860   rm -rf conftest*
21861   eval "ac_cv_lib_$ac_lib_var=yes"
21862 else
21863   echo "configure: failed program was:" >&5
21864   cat conftest.$ac_ext >&5
21865   rm -rf conftest*
21866   eval "ac_cv_lib_$ac_lib_var=no"
21867 fi
21868 rm -f conftest*
21869 LIBS="$ac_save_LIBS"
21870
21871 fi
21872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21873   echo "$ac_t""yes" 1>&6
21874   cat >> confdefs.h <<\EOF
21875 #define HAVE_STRFTIME 1
21876 EOF
21877
21878 LIBS="-lintl $LIBS"
21879 else
21880   echo "$ac_t""no" 1>&6
21881 fi
21882
21883 fi
21884
21885
21886 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21887 echo "configure:21888: checking for inet_aton()" >&5
21888 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21889   echo $ac_n "(cached) $ac_c" 1>&6
21890 else
21891   cat > conftest.$ac_ext <<EOF
21892 #line 21893 "configure"
21893 #include "confdefs.h"
21894
21895 #ifdef HAVE_SYS_TYPES_H
21896 #       include <sys/types.h>
21897 #endif
21898 #ifdef HAVE_SYS_SOCKET_H
21899 #       include <sys/socket.h>
21900 #       ifdef HAVE_SYS_SELECT_H
21901 #               include <sys/select.h>
21902 #       endif
21903 #       include <netinet/in.h>
21904 #       ifdef HAVE_ARPA_INET_H
21905 #               include <arpa/inet.h>
21906 #       endif
21907 #endif
21908
21909 int main() {
21910 struct in_addr in;
21911 int rc = inet_aton( "255.255.255.255", &in );
21912 ; return 0; }
21913 EOF
21914 if { (eval echo configure:21915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21915   rm -rf conftest*
21916   ol_cv_func_inet_aton=yes
21917 else
21918   echo "configure: failed program was:" >&5
21919   cat conftest.$ac_ext >&5
21920   rm -rf conftest*
21921   ol_cv_func_inet_aton=no
21922 fi
21923 rm -f conftest*
21924 fi
21925
21926 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21927   if test $ol_cv_func_inet_aton != no; then
21928     cat >> confdefs.h <<\EOF
21929 #define HAVE_INET_ATON 1
21930 EOF
21931
21932   fi
21933  
21934
21935 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21936 echo "configure:21937: checking for _spawnlp" >&5
21937 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21938   echo $ac_n "(cached) $ac_c" 1>&6
21939 else
21940   cat > conftest.$ac_ext <<EOF
21941 #line 21942 "configure"
21942 #include "confdefs.h"
21943 /* System header to define __stub macros and hopefully few prototypes,
21944     which can conflict with char _spawnlp(); below.  */
21945 #include <assert.h>
21946 /* Override any gcc2 internal prototype to avoid an error.  */
21947 /* We use char because int might match the return type of a gcc2
21948     builtin and then its argument prototype would still apply.  */
21949 char _spawnlp();
21950 char (*f)();
21951
21952 int main() {
21953
21954 /* The GNU C library defines this for functions which it implements
21955     to always fail with ENOSYS.  Some functions are actually named
21956     something starting with __ and the normal name is an alias.  */
21957 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21958 choke me
21959 #else
21960 f = _spawnlp;
21961 #endif
21962
21963 ; return 0; }
21964 EOF
21965 if { (eval echo configure:21966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21966   rm -rf conftest*
21967   eval "ac_cv_func__spawnlp=yes"
21968 else
21969   echo "configure: failed program was:" >&5
21970   cat conftest.$ac_ext >&5
21971   rm -rf conftest*
21972   eval "ac_cv_func__spawnlp=no"
21973 fi
21974 rm -f conftest*
21975 fi
21976
21977 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21978   echo "$ac_t""yes" 1>&6
21979   cat >> confdefs.h <<\EOF
21980 #define HAVE_SPAWNLP 1
21981 EOF
21982
21983 else
21984   echo "$ac_t""no" 1>&6
21985 fi
21986
21987
21988 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21989 echo "configure:21990: checking for _snprintf" >&5
21990 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21991   echo $ac_n "(cached) $ac_c" 1>&6
21992 else
21993   cat > conftest.$ac_ext <<EOF
21994 #line 21995 "configure"
21995 #include "confdefs.h"
21996 /* System header to define __stub macros and hopefully few prototypes,
21997     which can conflict with char _snprintf(); below.  */
21998 #include <assert.h>
21999 /* Override any gcc2 internal prototype to avoid an error.  */
22000 /* We use char because int might match the return type of a gcc2
22001     builtin and then its argument prototype would still apply.  */
22002 char _snprintf();
22003 char (*f)();
22004
22005 int main() {
22006
22007 /* The GNU C library defines this for functions which it implements
22008     to always fail with ENOSYS.  Some functions are actually named
22009     something starting with __ and the normal name is an alias.  */
22010 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22011 choke me
22012 #else
22013 f = _snprintf;
22014 #endif
22015
22016 ; return 0; }
22017 EOF
22018 if { (eval echo configure:22019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22019   rm -rf conftest*
22020   eval "ac_cv_func__snprintf=yes"
22021 else
22022   echo "configure: failed program was:" >&5
22023   cat conftest.$ac_ext >&5
22024   rm -rf conftest*
22025   eval "ac_cv_func__snprintf=no"
22026 fi
22027 rm -f conftest*
22028 fi
22029
22030 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22031   echo "$ac_t""yes" 1>&6
22032   ac_cv_func_snprintf=yes
22033         cat >> confdefs.h <<\EOF
22034 #define snprintf _snprintf
22035 EOF
22036
22037
22038 else
22039   echo "$ac_t""no" 1>&6
22040 fi
22041
22042
22043 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22044 echo "configure:22045: checking for _vsnprintf" >&5
22045 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22046   echo $ac_n "(cached) $ac_c" 1>&6
22047 else
22048   cat > conftest.$ac_ext <<EOF
22049 #line 22050 "configure"
22050 #include "confdefs.h"
22051 /* System header to define __stub macros and hopefully few prototypes,
22052     which can conflict with char _vsnprintf(); below.  */
22053 #include <assert.h>
22054 /* Override any gcc2 internal prototype to avoid an error.  */
22055 /* We use char because int might match the return type of a gcc2
22056     builtin and then its argument prototype would still apply.  */
22057 char _vsnprintf();
22058 char (*f)();
22059
22060 int main() {
22061
22062 /* The GNU C library defines this for functions which it implements
22063     to always fail with ENOSYS.  Some functions are actually named
22064     something starting with __ and the normal name is an alias.  */
22065 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22066 choke me
22067 #else
22068 f = _vsnprintf;
22069 #endif
22070
22071 ; return 0; }
22072 EOF
22073 if { (eval echo configure:22074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22074   rm -rf conftest*
22075   eval "ac_cv_func__vsnprintf=yes"
22076 else
22077   echo "configure: failed program was:" >&5
22078   cat conftest.$ac_ext >&5
22079   rm -rf conftest*
22080   eval "ac_cv_func__vsnprintf=no"
22081 fi
22082 rm -f conftest*
22083 fi
22084
22085 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22086   echo "$ac_t""yes" 1>&6
22087   ac_cv_func_vsnprintf=yes
22088         cat >> confdefs.h <<\EOF
22089 #define vsnprintf _vsnprintf
22090 EOF
22091
22092
22093 else
22094   echo "$ac_t""no" 1>&6
22095 fi
22096
22097
22098 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22099 echo "configure:22100: checking for vprintf" >&5
22100 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22101   echo $ac_n "(cached) $ac_c" 1>&6
22102 else
22103   cat > conftest.$ac_ext <<EOF
22104 #line 22105 "configure"
22105 #include "confdefs.h"
22106 /* System header to define __stub macros and hopefully few prototypes,
22107     which can conflict with char vprintf(); below.  */
22108 #include <assert.h>
22109 /* Override any gcc2 internal prototype to avoid an error.  */
22110 /* We use char because int might match the return type of a gcc2
22111     builtin and then its argument prototype would still apply.  */
22112 char vprintf();
22113 char (*f)();
22114
22115 int main() {
22116
22117 /* The GNU C library defines this for functions which it implements
22118     to always fail with ENOSYS.  Some functions are actually named
22119     something starting with __ and the normal name is an alias.  */
22120 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22121 choke me
22122 #else
22123 f = vprintf;
22124 #endif
22125
22126 ; return 0; }
22127 EOF
22128 if { (eval echo configure:22129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22129   rm -rf conftest*
22130   eval "ac_cv_func_vprintf=yes"
22131 else
22132   echo "configure: failed program was:" >&5
22133   cat conftest.$ac_ext >&5
22134   rm -rf conftest*
22135   eval "ac_cv_func_vprintf=no"
22136 fi
22137 rm -f conftest*
22138 fi
22139
22140 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22141   echo "$ac_t""yes" 1>&6
22142   cat >> confdefs.h <<\EOF
22143 #define HAVE_VPRINTF 1
22144 EOF
22145
22146 else
22147   echo "$ac_t""no" 1>&6
22148 fi
22149
22150 if test "$ac_cv_func_vprintf" != yes; then
22151 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22152 echo "configure:22153: checking for _doprnt" >&5
22153 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22154   echo $ac_n "(cached) $ac_c" 1>&6
22155 else
22156   cat > conftest.$ac_ext <<EOF
22157 #line 22158 "configure"
22158 #include "confdefs.h"
22159 /* System header to define __stub macros and hopefully few prototypes,
22160     which can conflict with char _doprnt(); below.  */
22161 #include <assert.h>
22162 /* Override any gcc2 internal prototype to avoid an error.  */
22163 /* We use char because int might match the return type of a gcc2
22164     builtin and then its argument prototype would still apply.  */
22165 char _doprnt();
22166 char (*f)();
22167
22168 int main() {
22169
22170 /* The GNU C library defines this for functions which it implements
22171     to always fail with ENOSYS.  Some functions are actually named
22172     something starting with __ and the normal name is an alias.  */
22173 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22174 choke me
22175 #else
22176 f = _doprnt;
22177 #endif
22178
22179 ; return 0; }
22180 EOF
22181 if { (eval echo configure:22182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22182   rm -rf conftest*
22183   eval "ac_cv_func__doprnt=yes"
22184 else
22185   echo "configure: failed program was:" >&5
22186   cat conftest.$ac_ext >&5
22187   rm -rf conftest*
22188   eval "ac_cv_func__doprnt=no"
22189 fi
22190 rm -f conftest*
22191 fi
22192
22193 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22194   echo "$ac_t""yes" 1>&6
22195   cat >> confdefs.h <<\EOF
22196 #define HAVE_DOPRNT 1
22197 EOF
22198
22199 else
22200   echo "$ac_t""no" 1>&6
22201 fi
22202
22203 fi
22204
22205
22206 if test $ac_cv_func_vprintf = yes ; then
22207                 for ac_func in snprintf vsnprintf
22208 do
22209 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22210 echo "configure:22211: checking for $ac_func" >&5
22211 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22212   echo $ac_n "(cached) $ac_c" 1>&6
22213 else
22214   cat > conftest.$ac_ext <<EOF
22215 #line 22216 "configure"
22216 #include "confdefs.h"
22217 /* System header to define __stub macros and hopefully few prototypes,
22218     which can conflict with char $ac_func(); below.  */
22219 #include <assert.h>
22220 /* Override any gcc2 internal prototype to avoid an error.  */
22221 /* We use char because int might match the return type of a gcc2
22222     builtin and then its argument prototype would still apply.  */
22223 char $ac_func();
22224 char (*f)();
22225
22226 int main() {
22227
22228 /* The GNU C library defines this for functions which it implements
22229     to always fail with ENOSYS.  Some functions are actually named
22230     something starting with __ and the normal name is an alias.  */
22231 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22232 choke me
22233 #else
22234 f = $ac_func;
22235 #endif
22236
22237 ; return 0; }
22238 EOF
22239 if { (eval echo configure:22240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22240   rm -rf conftest*
22241   eval "ac_cv_func_$ac_func=yes"
22242 else
22243   echo "configure: failed program was:" >&5
22244   cat conftest.$ac_ext >&5
22245   rm -rf conftest*
22246   eval "ac_cv_func_$ac_func=no"
22247 fi
22248 rm -f conftest*
22249 fi
22250
22251 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22252   echo "$ac_t""yes" 1>&6
22253     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22254   cat >> confdefs.h <<EOF
22255 #define $ac_tr_func 1
22256 EOF
22257  
22258 else
22259   echo "$ac_t""no" 1>&6
22260 fi
22261 done
22262
22263 fi
22264
22265 for ac_func in \
22266         bcopy                   \
22267         closesocket             \
22268         chroot                  \
22269         endgrent                \
22270         endpwent                \
22271         fcntl                   \
22272         flock                   \
22273         fstat                   \
22274         getdtablesize   \
22275         getgrgid                \
22276         gethostname             \
22277         getpass                 \
22278         getpassphrase   \
22279         getpwuid                \
22280         getpwnam                \
22281         getspnam                \
22282         gettimeofday    \
22283         initgroups              \
22284         lockf                   \
22285         memcpy                  \
22286         memmove                 \
22287         mkstemp                 \
22288         mktemp                  \
22289         pipe                    \
22290         read                    \
22291         recv                    \
22292         recvfrom                \
22293         setpwfile               \
22294         setgid                  \
22295         setegid                 \
22296         setsid                  \
22297         setuid                  \
22298         seteuid                 \
22299         sigaction               \
22300         signal                  \
22301         sigset                  \
22302         strdup                  \
22303         strerror                \
22304         strpbrk                 \
22305         strrchr                 \
22306         strsep                  \
22307         strstr                  \
22308         strtol                  \
22309         strtoul                 \
22310         strspn                  \
22311         sysconf                 \
22312         usleep                  \
22313         waitpid                 \
22314         wait4                   \
22315         write                   \
22316         send                    \
22317         sendmsg                 \
22318         sendto                  \
22319
22320 do
22321 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22322 echo "configure:22323: checking for $ac_func" >&5
22323 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22324   echo $ac_n "(cached) $ac_c" 1>&6
22325 else
22326   cat > conftest.$ac_ext <<EOF
22327 #line 22328 "configure"
22328 #include "confdefs.h"
22329 /* System header to define __stub macros and hopefully few prototypes,
22330     which can conflict with char $ac_func(); below.  */
22331 #include <assert.h>
22332 /* Override any gcc2 internal prototype to avoid an error.  */
22333 /* We use char because int might match the return type of a gcc2
22334     builtin and then its argument prototype would still apply.  */
22335 char $ac_func();
22336 char (*f)();
22337
22338 int main() {
22339
22340 /* The GNU C library defines this for functions which it implements
22341     to always fail with ENOSYS.  Some functions are actually named
22342     something starting with __ and the normal name is an alias.  */
22343 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22344 choke me
22345 #else
22346 f = $ac_func;
22347 #endif
22348
22349 ; return 0; }
22350 EOF
22351 if { (eval echo configure:22352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22352   rm -rf conftest*
22353   eval "ac_cv_func_$ac_func=yes"
22354 else
22355   echo "configure: failed program was:" >&5
22356   cat conftest.$ac_ext >&5
22357   rm -rf conftest*
22358   eval "ac_cv_func_$ac_func=no"
22359 fi
22360 rm -f conftest*
22361 fi
22362
22363 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22364   echo "$ac_t""yes" 1>&6
22365     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22366   cat >> confdefs.h <<EOF
22367 #define $ac_tr_func 1
22368 EOF
22369  
22370 else
22371   echo "$ac_t""no" 1>&6
22372 fi
22373 done
22374
22375
22376 for ac_func in getopt getpeereid
22377 do
22378 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22379 echo "configure:22380: checking for $ac_func" >&5
22380 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22381   echo $ac_n "(cached) $ac_c" 1>&6
22382 else
22383   cat > conftest.$ac_ext <<EOF
22384 #line 22385 "configure"
22385 #include "confdefs.h"
22386 /* System header to define __stub macros and hopefully few prototypes,
22387     which can conflict with char $ac_func(); below.  */
22388 #include <assert.h>
22389 /* Override any gcc2 internal prototype to avoid an error.  */
22390 /* We use char because int might match the return type of a gcc2
22391     builtin and then its argument prototype would still apply.  */
22392 char $ac_func();
22393 char (*f)();
22394
22395 int main() {
22396
22397 /* The GNU C library defines this for functions which it implements
22398     to always fail with ENOSYS.  Some functions are actually named
22399     something starting with __ and the normal name is an alias.  */
22400 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22401 choke me
22402 #else
22403 f = $ac_func;
22404 #endif
22405
22406 ; return 0; }
22407 EOF
22408 if { (eval echo configure:22409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22409   rm -rf conftest*
22410   eval "ac_cv_func_$ac_func=yes"
22411 else
22412   echo "configure: failed program was:" >&5
22413   cat conftest.$ac_ext >&5
22414   rm -rf conftest*
22415   eval "ac_cv_func_$ac_func=no"
22416 fi
22417 rm -f conftest*
22418 fi
22419
22420 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22421   echo "$ac_t""yes" 1>&6
22422     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22423   cat >> confdefs.h <<EOF
22424 #define $ac_tr_func 1
22425 EOF
22426  
22427 else
22428   echo "$ac_t""no" 1>&6
22429 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22430 fi
22431 done
22432
22433
22434
22435 if test "$ac_cv_func_getopt" != yes; then
22436         LIBSRCS="$LIBSRCS getopt.c"
22437 fi
22438 if test "$ac_cv_func_getpeereid" != yes; then
22439         LIBSRCS="$LIBSRCS getpeereid.c"
22440 fi
22441 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22442         if test "$ac_cv_func_snprintf" != yes; then
22443                 cat >> confdefs.h <<\EOF
22444 #define snprintf ber_pvt_snprintf
22445 EOF
22446
22447         fi
22448         if test "$ac_cv_func_vsnprintf" != yes; then
22449                 cat >> confdefs.h <<\EOF
22450 #define vsnprintf ber_pvt_vsnprintf
22451 EOF
22452
22453         fi
22454 fi
22455
22456 # Check Configuration
22457 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22458 echo "configure:22459: checking declaration of sys_errlist" >&5
22459 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22460   echo $ac_n "(cached) $ac_c" 1>&6
22461 else
22462   
22463         cat > conftest.$ac_ext <<EOF
22464 #line 22465 "configure"
22465 #include "confdefs.h"
22466
22467 #include <stdio.h>
22468 #include <sys/types.h>
22469 #include <errno.h>
22470 #ifdef WINNT
22471 #include <stdlib.h>
22472 #endif 
22473 int main() {
22474 char *c = (char *) *sys_errlist
22475 ; return 0; }
22476 EOF
22477 if { (eval echo configure:22478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22478   rm -rf conftest*
22479   ol_cv_dcl_sys_errlist=yes
22480         ol_cv_have_sys_errlist=yes
22481 else
22482   echo "configure: failed program was:" >&5
22483   cat conftest.$ac_ext >&5
22484   rm -rf conftest*
22485   ol_cv_dcl_sys_errlist=no
22486 fi
22487 rm -f conftest*
22488 fi
22489
22490 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22491 #
22492 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22493 if test $ol_cv_dcl_sys_errlist = no ; then
22494         cat >> confdefs.h <<\EOF
22495 #define DECL_SYS_ERRLIST 1
22496 EOF
22497
22498
22499         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22500 echo "configure:22501: checking existence of sys_errlist" >&5
22501 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22502   echo $ac_n "(cached) $ac_c" 1>&6
22503 else
22504   
22505                 cat > conftest.$ac_ext <<EOF
22506 #line 22507 "configure"
22507 #include "confdefs.h"
22508 #include <errno.h>
22509 int main() {
22510 char *c = (char *) *sys_errlist
22511 ; return 0; }
22512 EOF
22513 if { (eval echo configure:22514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22514   rm -rf conftest*
22515   ol_cv_have_sys_errlist=yes
22516 else
22517   echo "configure: failed program was:" >&5
22518   cat conftest.$ac_ext >&5
22519   rm -rf conftest*
22520   ol_cv_have_sys_errlist=no
22521 fi
22522 rm -f conftest*
22523 fi
22524
22525 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22526 fi
22527 if test $ol_cv_have_sys_errlist = yes ; then
22528         cat >> confdefs.h <<\EOF
22529 #define HAVE_SYS_ERRLIST 1
22530 EOF
22531
22532 fi
22533
22534
22535
22536 if test "$ol_enable_debug" != no ; then
22537         cat >> confdefs.h <<\EOF
22538 #define LDAP_DEBUG 1
22539 EOF
22540
22541 fi
22542 if test "$ol_enable_syslog" = yes ; then
22543         cat >> confdefs.h <<\EOF
22544 #define LDAP_SYSLOG 1
22545 EOF
22546
22547 fi
22548 if test "$ol_link_kbind" != no ; then
22549         cat >> confdefs.h <<\EOF
22550 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22551 EOF
22552
22553 fi
22554 if test "$ol_enable_proctitle" != no ; then
22555         cat >> confdefs.h <<\EOF
22556 #define LDAP_PROCTITLE 1
22557 EOF
22558
22559 fi
22560 if test "$ol_enable_referrals" != no ; then
22561         cat >> confdefs.h <<\EOF
22562 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22563 EOF
22564
22565 fi
22566 if test "$ol_enable_local" != no; then
22567         cat >> confdefs.h <<\EOF
22568 #define LDAP_PF_LOCAL 1
22569 EOF
22570
22571 fi
22572 if test "$ol_link_ipv6" != no; then
22573         cat >> confdefs.h <<\EOF
22574 #define LDAP_PF_INET6 1
22575 EOF
22576
22577 fi
22578 if test "$ol_enable_cleartext" != no ; then
22579         cat >> confdefs.h <<\EOF
22580 #define SLAPD_CLEARTEXT 1
22581 EOF
22582
22583 fi
22584 if test "$ol_enable_crypt" != no ; then
22585         cat >> confdefs.h <<\EOF
22586 #define SLAPD_CRYPT 1
22587 EOF
22588
22589 fi
22590 if test "$ol_link_kpasswd" != no ; then
22591         cat >> confdefs.h <<\EOF
22592 #define SLAPD_KPASSWD 1
22593 EOF
22594
22595 fi
22596 if test "$ol_link_spasswd" != no ; then
22597         cat >> confdefs.h <<\EOF
22598 #define SLAPD_SPASSWD 1
22599 EOF
22600
22601 fi
22602 if test "$ol_enable_multimaster" != no ; then
22603         cat >> confdefs.h <<\EOF
22604 #define SLAPD_MULTIMASTER 1
22605 EOF
22606
22607 fi
22608 if test "$ol_enable_phonetic" != no ; then
22609         cat >> confdefs.h <<\EOF
22610 #define SLAPD_PHONETIC 1
22611 EOF
22612
22613 fi
22614 if test "$ol_enable_rlookups" != no ; then
22615         cat >> confdefs.h <<\EOF
22616 #define SLAPD_RLOOKUPS 1
22617 EOF
22618
22619 fi
22620 if test "$ol_enable_aci" != no ; then
22621         cat >> confdefs.h <<\EOF
22622 #define SLAPD_ACI_ENABLED 1
22623 EOF
22624
22625 fi
22626
22627 if test "$ol_link_modules" != no ; then
22628         cat >> confdefs.h <<\EOF
22629 #define SLAPD_MODULES 1
22630 EOF
22631
22632         BUILD_SLAPD=yes
22633         SLAPD_MODULES_LDFLAGS="-dlopen self"
22634 fi
22635
22636 if test "$ol_enable_bdb" != no ; then
22637         cat >> confdefs.h <<\EOF
22638 #define SLAPD_BDB 1
22639 EOF
22640
22641         BUILD_SLAPD=yes
22642         BUILD_BDB=yes
22643         if test "$ol_with_bdb_module" != static ; then
22644                 cat >> confdefs.h <<\EOF
22645 #define SLAPD_BDB_DYNAMIC 1
22646 EOF
22647
22648                 BUILD_BDB=mod
22649                 BUILD_BDB_DYNAMIC=shared
22650                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22651         else
22652                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22653         fi
22654 fi
22655
22656 if test "$ol_link_dnssrv" != no ; then
22657         cat >> confdefs.h <<\EOF
22658 #define SLAPD_DNSSRV 1
22659 EOF
22660
22661         BUILD_SLAPD=yes
22662         BUILD_DNSSRV=yes
22663         if test "$ol_with_dnssrv_module" != static ; then
22664                 cat >> confdefs.h <<\EOF
22665 #define SLAPD_DNSSRV_DYNAMIC 1
22666 EOF
22667
22668                 BUILD_DNSSRV=mod
22669                 BUILD_DNSSRV_DYNAMIC=shared
22670                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22671         else
22672                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22673         fi
22674 fi
22675
22676 if test "$ol_enable_ldap" != no ; then
22677         cat >> confdefs.h <<\EOF
22678 #define SLAPD_LDAP 1
22679 EOF
22680
22681         BUILD_SLAPD=yes
22682         BUILD_LDAP=yes
22683         if test "$ol_with_ldap_module" != static ; then
22684                 cat >> confdefs.h <<\EOF
22685 #define SLAPD_LDAP_DYNAMIC 1
22686 EOF
22687
22688                 BUILD_LDAP=mod
22689                 BUILD_LDAP_DYNAMIC=shared
22690                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22691         else
22692                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22693         fi
22694 fi
22695
22696 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22697         cat >> confdefs.h <<\EOF
22698 #define SLAPD_LDBM 1
22699 EOF
22700
22701         BUILD_SLAPD=yes
22702         BUILD_LDBM=yes
22703         if test "$ol_with_ldbm_module" != static ; then
22704                 cat >> confdefs.h <<\EOF
22705 #define SLAPD_LDBM_DYNAMIC 1
22706 EOF
22707
22708                 BUILD_LDBM=mod
22709                 BUILD_LDBM_DYNAMIC=shared
22710                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22711         else
22712                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22713         fi
22714 fi
22715
22716 if test "$ol_enable_meta" != no ; then
22717         if test "$ol_enable_ldap" = no ; then
22718                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22719         fi
22720         if test "$ol_enable_rewrite" = no ; then
22721                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22722         fi
22723         cat >> confdefs.h <<\EOF
22724 #define SLAPD_META 1
22725 EOF
22726
22727         BUILD_SLAPD=yes
22728         BUILD_META=yes
22729         BUILD_LDAP=yes
22730         BUILD_REWRITE=yes
22731         if test "$ol_with_meta_module" != static ; then
22732                 cat >> confdefs.h <<\EOF
22733 #define SLAPD_META_DYNAMIC 1
22734 EOF
22735
22736                 BUILD_META=mod
22737                 BUILD_META_DYNAMIC=shared
22738                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22739         else
22740                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22741         fi
22742 fi
22743
22744 if test "$ol_enable_monitor" != no ; then
22745         cat >> confdefs.h <<\EOF
22746 #define SLAPD_MONITOR 1
22747 EOF
22748
22749         BUILD_SLAPD=yes
22750         BUILD_MONITOR=yes
22751         if test "$ol_with_monitor_module" != static ; then
22752                 cat >> confdefs.h <<\EOF
22753 #define SLAPD_MONITOR_DYNAMIC 1
22754 EOF
22755
22756                 BUILD_MONITOR=mod
22757                 BUILD_MONITOR_DYNAMIC=shared
22758                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22759         else
22760                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22761         fi
22762 fi
22763
22764 if test "$ol_enable_null" != no ; then
22765         cat >> confdefs.h <<\EOF
22766 #define SLAPD_NULL 1
22767 EOF
22768
22769         BUILD_SLAPD=yes
22770         BUILD_NULL=yes
22771         if test "$ol_with_null_module" != static ; then
22772                 cat >> confdefs.h <<\EOF
22773 #define SLAPD_NULL_DYNAMIC 1
22774 EOF
22775
22776                 BUILD_NULL=mod
22777                 BUILD_NULL_DYNAMIC=shared
22778                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22779         else
22780                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22781         fi
22782 fi
22783
22784 if test "$ol_enable_passwd" != no ; then
22785         cat >> confdefs.h <<\EOF
22786 #define SLAPD_PASSWD 1
22787 EOF
22788
22789         BUILD_SLAPD=yes
22790         BUILD_PASSWD=yes
22791         if test "$ol_with_passwd_module" != static ; then
22792                 cat >> confdefs.h <<\EOF
22793 #define SLAPD_PASSWD_DYNAMIC 1
22794 EOF
22795
22796                 BUILD_PASSWD=mod
22797                 BUILD_PASSWD_DYNAMIC=shared
22798                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22799         else
22800                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22801         fi
22802 fi
22803
22804 if test "$ol_link_perl" != no ; then
22805         cat >> confdefs.h <<\EOF
22806 #define SLAPD_PERL 1
22807 EOF
22808
22809         BUILD_SLAPD=yes
22810         BUILD_PERL=yes
22811         if test "$ol_with_perl_module" != static ; then
22812                 cat >> confdefs.h <<\EOF
22813 #define SLAPD_PERL_DYNAMIC 1
22814 EOF
22815
22816                 BUILD_PERL=mod
22817                 BUILD_PERL_DYNAMIC=shared
22818                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22819         else
22820                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22821         fi
22822 fi
22823
22824 if test "$ol_enable_shell" != no ; then
22825         if test "$ol_link_thread" != no ; then
22826                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
22827         fi
22828         cat >> confdefs.h <<\EOF
22829 #define SLAPD_SHELL 1
22830 EOF
22831
22832         BUILD_SLAPD=yes
22833         BUILD_SHELL=yes
22834         if test "$ol_with_shell_module" != static ; then
22835                 cat >> confdefs.h <<\EOF
22836 #define SLAPD_SHELL_DYNAMIC 1
22837 EOF
22838
22839                 BUILD_SHELL=mod
22840                 BUILD_SHELL_DYNAMIC=shared
22841                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22842         else
22843                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22844         fi
22845 fi
22846
22847 if test "$ol_link_sql" != no ; then
22848         cat >> confdefs.h <<\EOF
22849 #define SLAPD_SQL 1
22850 EOF
22851
22852         BUILD_SLAPD=yes
22853         BUILD_SQL=yes
22854         if test "$ol_with_sql_module" != static; then
22855                 cat >> confdefs.h <<\EOF
22856 #define SLAPD_SQL_DYNAMIC 1
22857 EOF
22858
22859                 BUILD_SQL=mod
22860                 BUILD_SQL_DYNAMIC=shared
22861                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22862         else
22863                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22864         fi
22865 fi
22866
22867 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22868         $BUILD_SLAPD = yes ; then
22869         BUILD_SLURPD=yes
22870 fi
22871
22872 if test "$ol_enable_rewrite" != no ; then
22873         cat >> confdefs.h <<\EOF
22874 #define ENABLE_REWRITE 1
22875 EOF
22876
22877         BUILD_REWRITE=yes
22878 fi
22879
22880
22881
22882 if test "$ac_cv_mingw32" = yes ; then
22883         PLAT=NT
22884         SLAPD_MODULES_LDFLAGS=
22885 else
22886         PLAT=UNIX
22887 fi
22888
22889 if test -z "$SLAPD_STATIC_BACKENDS"; then
22890         SLAPD_NO_STATIC='#'
22891 else
22892         SLAPD_NO_STATIC=
22893 fi
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
22958
22959 # Check whether --with-xxinstall or --without-xxinstall was given.
22960 if test "${with_xxinstall+set}" = set; then
22961   withval="$with_xxinstall"
22962   :
22963 fi
22964
22965
22966
22967 trap '' 1 2 15
22968
22969 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22970
22971 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22972 # Let make expand exec_prefix.
22973 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22974
22975 # Any assignment to VPATH causes Sun make to only execute
22976 # the first set of double-colon rules, so remove it if not needed.
22977 # If there is a colon in the path, we need to keep it.
22978 if test "x$srcdir" = x.; then
22979   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22980 fi
22981
22982 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22983
22984 DEFS=-DHAVE_CONFIG_H
22985
22986 # Without the "./", some shells look in PATH for config.status.
22987 : ${CONFIG_STATUS=./config.status}
22988
22989 echo creating $CONFIG_STATUS
22990 rm -f $CONFIG_STATUS
22991 cat > $CONFIG_STATUS <<EOF
22992 #! /bin/sh
22993 # Generated automatically by configure.
22994 # Run this file to recreate the current configuration.
22995 # This directory was configured as follows,
22996 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22997 #
22998 # $0 $ac_configure_args
22999 #
23000 # Compiler output produced by configure, useful for debugging
23001 # configure, is in ./config.log if it exists.
23002
23003 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23004 for ac_option
23005 do
23006   case "\$ac_option" in
23007   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23008     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23009     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23010   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23011     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23012     exit 0 ;;
23013   -help | --help | --hel | --he | --h)
23014     echo "\$ac_cs_usage"; exit 0 ;;
23015   *) echo "\$ac_cs_usage"; exit 1 ;;
23016   esac
23017 done
23018
23019 ac_given_srcdir=$srcdir
23020 ac_given_INSTALL="$INSTALL"
23021
23022 trap 'rm -fr `echo "\
23023 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23024 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23025 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23026 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23027 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23028 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23029 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23030 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23031 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23032 include/Makefile:build/top.mk:include/Makefile.in \
23033 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23034 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23035 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23036 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23037 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23038 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23039 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23040 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23041 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23042 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23043 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23044 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23045 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23046 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23047 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23048 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23049 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23050 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23051 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23052 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23053 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23054 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23055 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23056 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23057 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23058 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23059 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23060 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23061  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23062 EOF
23063 cat >> $CONFIG_STATUS <<EOF
23064
23065 # Protect against being on the right side of a sed subst in config.status.
23066 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23067  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23068 $ac_vpsub
23069 $extrasub
23070 s%@SHELL@%$SHELL%g
23071 s%@CFLAGS@%$CFLAGS%g
23072 s%@CPPFLAGS@%$CPPFLAGS%g
23073 s%@CXXFLAGS@%$CXXFLAGS%g
23074 s%@FFLAGS@%$FFLAGS%g
23075 s%@DEFS@%$DEFS%g
23076 s%@LDFLAGS@%$LDFLAGS%g
23077 s%@LIBS@%$LIBS%g
23078 s%@exec_prefix@%$exec_prefix%g
23079 s%@prefix@%$prefix%g
23080 s%@program_transform_name@%$program_transform_name%g
23081 s%@bindir@%$bindir%g
23082 s%@sbindir@%$sbindir%g
23083 s%@libexecdir@%$libexecdir%g
23084 s%@datadir@%$datadir%g
23085 s%@sysconfdir@%$sysconfdir%g
23086 s%@sharedstatedir@%$sharedstatedir%g
23087 s%@localstatedir@%$localstatedir%g
23088 s%@libdir@%$libdir%g
23089 s%@includedir@%$includedir%g
23090 s%@oldincludedir@%$oldincludedir%g
23091 s%@infodir@%$infodir%g
23092 s%@mandir@%$mandir%g
23093 s%@host@%$host%g
23094 s%@host_alias@%$host_alias%g
23095 s%@host_cpu@%$host_cpu%g
23096 s%@host_vendor@%$host_vendor%g
23097 s%@host_os@%$host_os%g
23098 s%@target@%$target%g
23099 s%@target_alias@%$target_alias%g
23100 s%@target_cpu@%$target_cpu%g
23101 s%@target_vendor@%$target_vendor%g
23102 s%@target_os@%$target_os%g
23103 s%@build@%$build%g
23104 s%@build_alias@%$build_alias%g
23105 s%@build_cpu@%$build_cpu%g
23106 s%@build_vendor@%$build_vendor%g
23107 s%@build_os@%$build_os%g
23108 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23109 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23110 s%@INSTALL_DATA@%$INSTALL_DATA%g
23111 s%@PACKAGE@%$PACKAGE%g
23112 s%@VERSION@%$VERSION%g
23113 s%@ACLOCAL@%$ACLOCAL%g
23114 s%@AUTOCONF@%$AUTOCONF%g
23115 s%@AUTOMAKE@%$AUTOMAKE%g
23116 s%@AUTOHEADER@%$AUTOHEADER%g
23117 s%@MAKEINFO@%$MAKEINFO%g
23118 s%@install_sh@%$install_sh%g
23119 s%@AMTAR@%$AMTAR%g
23120 s%@AWK@%$AWK%g
23121 s%@AMTARFLAGS@%$AMTARFLAGS%g
23122 s%@SET_MAKE@%$SET_MAKE%g
23123 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23124 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23125 s%@top_builddir@%$top_builddir%g
23126 s%@ldap_subdir@%$ldap_subdir%g
23127 s%@CC@%$CC%g
23128 s%@AR@%$AR%g
23129 s%@LN_S@%$LN_S%g
23130 s%@OBJEXT@%$OBJEXT%g
23131 s%@EXEEXT@%$EXEEXT%g
23132 s%@ECHO@%$ECHO%g
23133 s%@RANLIB@%$RANLIB%g
23134 s%@STRIP@%$STRIP%g
23135 s%@DLLTOOL@%$DLLTOOL%g
23136 s%@AS@%$AS%g
23137 s%@OBJDUMP@%$OBJDUMP%g
23138 s%@CPP@%$CPP%g
23139 s%@LIBTOOL@%$LIBTOOL%g
23140 s%@LTSTATIC@%$LTSTATIC%g
23141 s%@LN_H@%$LN_H%g
23142 s%@PERLBIN@%$PERLBIN%g
23143 s%@OL_MKDEP@%$OL_MKDEP%g
23144 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23145 s%@LIBOBJS@%$LIBOBJS%g
23146 s%@LIBSRCS@%$LIBSRCS%g
23147 s%@PLAT@%$PLAT%g
23148 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23149 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23150 s%@BUILD_BDB@%$BUILD_BDB%g
23151 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23152 s%@BUILD_LDAP@%$BUILD_LDAP%g
23153 s%@BUILD_LDBM@%$BUILD_LDBM%g
23154 s%@BUILD_META@%$BUILD_META%g
23155 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23156 s%@BUILD_NULL@%$BUILD_NULL%g
23157 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23158 s%@BUILD_PERL@%$BUILD_PERL%g
23159 s%@BUILD_SHELL@%$BUILD_SHELL%g
23160 s%@BUILD_SQL@%$BUILD_SQL%g
23161 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23162 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23163 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23164 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23165 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23166 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23167 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23168 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23169 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23170 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23171 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23172 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23173 s%@LDAP_LIBS@%$LDAP_LIBS%g
23174 s%@LDIF_LIBS@%$LDIF_LIBS%g
23175 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23176 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23177 s%@LDBM_LIBS@%$LDBM_LIBS%g
23178 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23179 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23180 s%@WRAP_LIBS@%$WRAP_LIBS%g
23181 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23182 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23183 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23184 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23185 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23186 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23187 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23188 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23189 s%@KRB4_LIBS@%$KRB4_LIBS%g
23190 s%@KRB5_LIBS@%$KRB5_LIBS%g
23191 s%@READLINE_LIBS@%$READLINE_LIBS%g
23192 s%@SASL_LIBS@%$SASL_LIBS%g
23193 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23194 s%@TLS_LIBS@%$TLS_LIBS%g
23195 s%@MODULES_LIBS@%$MODULES_LIBS%g
23196 s%@AUTH_LIBS@%$AUTH_LIBS%g
23197 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23198 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23199 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23200 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23201
23202 CEOF
23203 EOF
23204
23205 cat >> $CONFIG_STATUS <<\EOF
23206
23207 # Split the substitutions into bite-sized pieces for seds with
23208 # small command number limits, like on Digital OSF/1 and HP-UX.
23209 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23210 ac_file=1 # Number of current file.
23211 ac_beg=1 # First line for current file.
23212 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23213 ac_more_lines=:
23214 ac_sed_cmds=""
23215 while $ac_more_lines; do
23216   if test $ac_beg -gt 1; then
23217     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23218   else
23219     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23220   fi
23221   if test ! -s conftest.s$ac_file; then
23222     ac_more_lines=false
23223     rm -f conftest.s$ac_file
23224   else
23225     if test -z "$ac_sed_cmds"; then
23226       ac_sed_cmds="sed -f conftest.s$ac_file"
23227     else
23228       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23229     fi
23230     ac_file=`expr $ac_file + 1`
23231     ac_beg=$ac_end
23232     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23233   fi
23234 done
23235 if test -z "$ac_sed_cmds"; then
23236   ac_sed_cmds=cat
23237 fi
23238 EOF
23239
23240 cat >> $CONFIG_STATUS <<EOF
23241
23242 CONFIG_FILES=\${CONFIG_FILES-"\
23243 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23244 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23245 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23246 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23247 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23248 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23249 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23250 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23251 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23252 include/Makefile:build/top.mk:include/Makefile.in \
23253 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23254 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23255 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23256 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23257 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23258 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23259 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23260 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23261 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23262 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23263 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23264 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23265 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23266 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23267 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23268 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23269 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23270 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23271 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23272 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23273 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23274 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23275 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23276 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23277 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23278 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23279 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23280 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23281 "}
23282 EOF
23283 cat >> $CONFIG_STATUS <<\EOF
23284 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23285   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23286   case "$ac_file" in
23287   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23288        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23289   *) ac_file_in="${ac_file}.in" ;;
23290   esac
23291
23292   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23293
23294   # Remove last slash and all that follows it.  Not all systems have dirname.
23295   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23296   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23297     # The file is in a subdirectory.
23298     test ! -d "$ac_dir" && mkdir "$ac_dir"
23299     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23300     # A "../" for each directory in $ac_dir_suffix.
23301     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23302   else
23303     ac_dir_suffix= ac_dots=
23304   fi
23305
23306   case "$ac_given_srcdir" in
23307   .)  srcdir=.
23308       if test -z "$ac_dots"; then top_srcdir=.
23309       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23310   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23311   *) # Relative path.
23312     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23313     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23314   esac
23315
23316   case "$ac_given_INSTALL" in
23317   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23318   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23319   esac
23320
23321   echo creating "$ac_file"
23322   rm -f "$ac_file"
23323   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23324   case "$ac_file" in
23325   *[Mm]akefile*) ac_comsub="1i\\
23326 # $configure_input" ;;
23327   *) ac_comsub= ;;
23328   esac
23329
23330   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23331   sed -e "$ac_comsub
23332 s%@configure_input@%$configure_input%g
23333 s%@srcdir@%$srcdir%g
23334 s%@top_srcdir@%$top_srcdir%g
23335 s%@INSTALL@%$INSTALL%g
23336 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23337 fi; done
23338 rm -f conftest.s*
23339
23340 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23341 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23342 #
23343 # ac_d sets the value in "#define NAME VALUE" lines.
23344 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23345 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23346 ac_dC='\3'
23347 ac_dD='%g'
23348 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23349 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23350 ac_uB='\([      ]\)%\1#\2define\3'
23351 ac_uC=' '
23352 ac_uD='\4%g'
23353 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23354 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23355 ac_eB='$%\1#\2define\3'
23356 ac_eC=' '
23357 ac_eD='%g'
23358
23359 if test "${CONFIG_HEADERS+set}" != set; then
23360 EOF
23361 cat >> $CONFIG_STATUS <<EOF
23362   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23363 EOF
23364 cat >> $CONFIG_STATUS <<\EOF
23365 fi
23366 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23367   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23368   case "$ac_file" in
23369   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23370        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23371   *) ac_file_in="${ac_file}.in" ;;
23372   esac
23373
23374   echo creating $ac_file
23375
23376   rm -f conftest.frag conftest.in conftest.out
23377   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23378   cat $ac_file_inputs > conftest.in
23379
23380 EOF
23381
23382 # Transform confdefs.h into a sed script conftest.vals that substitutes
23383 # the proper values into config.h.in to produce config.h.  And first:
23384 # Protect against being on the right side of a sed subst in config.status.
23385 # Protect against being in an unquoted here document in config.status.
23386 rm -f conftest.vals
23387 cat > conftest.hdr <<\EOF
23388 s/[\\&%]/\\&/g
23389 s%[\\$`]%\\&%g
23390 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23391 s%ac_d%ac_u%gp
23392 s%ac_u%ac_e%gp
23393 EOF
23394 sed -n -f conftest.hdr confdefs.h > conftest.vals
23395 rm -f conftest.hdr
23396
23397 # This sed command replaces #undef with comments.  This is necessary, for
23398 # example, in the case of _POSIX_SOURCE, which is predefined and required
23399 # on some systems where configure will not decide to define it.
23400 cat >> conftest.vals <<\EOF
23401 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23402 EOF
23403
23404 # Break up conftest.vals because some shells have a limit on
23405 # the size of here documents, and old seds have small limits too.
23406
23407 rm -f conftest.tail
23408 while :
23409 do
23410   ac_lines=`grep -c . conftest.vals`
23411   # grep -c gives empty output for an empty file on some AIX systems.
23412   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23413   # Write a limited-size here document to conftest.frag.
23414   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23415   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23416   echo 'CEOF
23417   sed -f conftest.frag conftest.in > conftest.out
23418   rm -f conftest.in
23419   mv conftest.out conftest.in
23420 ' >> $CONFIG_STATUS
23421   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23422   rm -f conftest.vals
23423   mv conftest.tail conftest.vals
23424 done
23425 rm -f conftest.vals
23426
23427 cat >> $CONFIG_STATUS <<\EOF
23428   rm -f conftest.frag conftest.h
23429   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23430   cat conftest.in >> conftest.h
23431   rm -f conftest.in
23432   if cmp -s $ac_file conftest.h 2>/dev/null; then
23433     echo "$ac_file is unchanged"
23434     rm -f conftest.h
23435   else
23436     # Remove last slash and all that follows it.  Not all systems have dirname.
23437       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23438       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23439       # The file is in a subdirectory.
23440       test ! -d "$ac_dir" && mkdir "$ac_dir"
23441     fi
23442     rm -f $ac_file
23443     mv conftest.h $ac_file
23444   fi
23445 fi; done
23446
23447 EOF
23448 cat >> $CONFIG_STATUS <<EOF
23449
23450 EOF
23451 cat >> $CONFIG_STATUS <<\EOF
23452
23453 date > stamp-h
23454 echo Please run \"make depend\" to build dependencies
23455
23456 exit 0
23457 EOF
23458 chmod +x $CONFIG_STATUS
23459 rm -fr confdefs* $ac_clean_files
23460 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23461