]> git.sur5r.net Git - openldap/blob - configure
Fix test
[openldap] / configure
1 #! /bin/sh
2 # From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.678 2009/01/16 23:04:25 kurt Exp .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.61.
5 #
6 # Copyright 1998-2008 The OpenLDAP Foundation. All rights reserved.
7 # Restrictions apply, see COPYRIGHT and LICENSE files.
8 #
9 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
10 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## --------------------- ##
14 ## M4sh Initialization.  ##
15 ## --------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20   emulate sh
21   NULLCMD=:
22   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23   # is contrary to our usage.  Disable this feature.
24   alias -g '${1+"$@"}'='"$@"'
25   setopt NO_GLOB_SUBST
26 else
27   case `(set -o) 2>/dev/null` in
28   *posix*) set -o posix ;;
29 esac
30
31 fi
32
33
34
35
36 # PATH needs CR
37 # Avoid depending upon Character Ranges.
38 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
39 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
40 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
41 as_cr_digits='0123456789'
42 as_cr_alnum=$as_cr_Letters$as_cr_digits
43
44 # The user is always right.
45 if test "${PATH_SEPARATOR+set}" != set; then
46   echo "#! /bin/sh" >conf$$.sh
47   echo  "exit 0"   >>conf$$.sh
48   chmod +x conf$$.sh
49   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
50     PATH_SEPARATOR=';'
51   else
52     PATH_SEPARATOR=:
53   fi
54   rm -f conf$$.sh
55 fi
56
57 # Support unset when possible.
58 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
59   as_unset=unset
60 else
61   as_unset=false
62 fi
63
64
65 # IFS
66 # We need space, tab and new line, in precisely that order.  Quoting is
67 # there to prevent editors from complaining about space-tab.
68 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
69 # splitting by setting IFS to empty value.)
70 as_nl='
71 '
72 IFS=" ""        $as_nl"
73
74 # Find who we are.  Look in the path if we contain no directory separator.
75 case $0 in
76   *[\\/]* ) as_myself=$0 ;;
77   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
78 for as_dir in $PATH
79 do
80   IFS=$as_save_IFS
81   test -z "$as_dir" && as_dir=.
82   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
83 done
84 IFS=$as_save_IFS
85
86      ;;
87 esac
88 # We did not find ourselves, most probably we were run as `sh COMMAND'
89 # in which case we are not to be found in the path.
90 if test "x$as_myself" = x; then
91   as_myself=$0
92 fi
93 if test ! -f "$as_myself"; then
94   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
95   { (exit 1); exit 1; }
96 fi
97
98 # Work around bugs in pre-3.0 UWIN ksh.
99 for as_var in ENV MAIL MAILPATH
100 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
101 done
102 PS1='$ '
103 PS2='> '
104 PS4='+ '
105
106 # NLS nuisances.
107 for as_var in \
108   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
109   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
110   LC_TELEPHONE LC_TIME
111 do
112   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
113     eval $as_var=C; export $as_var
114   else
115     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
116   fi
117 done
118
119 # Required to use basename.
120 if expr a : '\(a\)' >/dev/null 2>&1 &&
121    test "X`expr 00001 : '.*\(...\)'`" = X001; then
122   as_expr=expr
123 else
124   as_expr=false
125 fi
126
127 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
128   as_basename=basename
129 else
130   as_basename=false
131 fi
132
133
134 # Name of the executable.
135 as_me=`$as_basename -- "$0" ||
136 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
137          X"$0" : 'X\(//\)$' \| \
138          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
139 echo X/"$0" |
140     sed '/^.*\/\([^/][^/]*\)\/*$/{
141             s//\1/
142             q
143           }
144           /^X\/\(\/\/\)$/{
145             s//\1/
146             q
147           }
148           /^X\/\(\/\).*/{
149             s//\1/
150             q
151           }
152           s/.*/./; q'`
153
154 # CDPATH.
155 $as_unset CDPATH
156
157
158 if test "x$CONFIG_SHELL" = x; then
159   if (eval ":") 2>/dev/null; then
160   as_have_required=yes
161 else
162   as_have_required=no
163 fi
164
165   if test $as_have_required = yes &&     (eval ":
166 (as_func_return () {
167   (exit \$1)
168 }
169 as_func_success () {
170   as_func_return 0
171 }
172 as_func_failure () {
173   as_func_return 1
174 }
175 as_func_ret_success () {
176   return 0
177 }
178 as_func_ret_failure () {
179   return 1
180 }
181
182 exitcode=0
183 if as_func_success; then
184   :
185 else
186   exitcode=1
187   echo as_func_success failed.
188 fi
189
190 if as_func_failure; then
191   exitcode=1
192   echo as_func_failure succeeded.
193 fi
194
195 if as_func_ret_success; then
196   :
197 else
198   exitcode=1
199   echo as_func_ret_success failed.
200 fi
201
202 if as_func_ret_failure; then
203   exitcode=1
204   echo as_func_ret_failure succeeded.
205 fi
206
207 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
208   :
209 else
210   exitcode=1
211   echo positional parameters were not saved.
212 fi
213
214 test \$exitcode = 0) || { (exit 1); exit 1; }
215
216 (
217   as_lineno_1=\$LINENO
218   as_lineno_2=\$LINENO
219   test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
220   test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
221 ") 2> /dev/null; then
222   :
223 else
224   as_candidate_shells=
225     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
226 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
227 do
228   IFS=$as_save_IFS
229   test -z "$as_dir" && as_dir=.
230   case $as_dir in
231          /*)
232            for as_base in sh bash ksh sh5; do
233              as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
234            done;;
235        esac
236 done
237 IFS=$as_save_IFS
238
239
240       for as_shell in $as_candidate_shells $SHELL; do
241          # Try only shells that exist, to save several forks.
242          if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
243                 { ("$as_shell") 2> /dev/null <<\_ASEOF
244 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
245   emulate sh
246   NULLCMD=:
247   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
248   # is contrary to our usage.  Disable this feature.
249   alias -g '${1+"$@"}'='"$@"'
250   setopt NO_GLOB_SUBST
251 else
252   case `(set -o) 2>/dev/null` in
253   *posix*) set -o posix ;;
254 esac
255
256 fi
257
258
259 :
260 _ASEOF
261 }; then
262   CONFIG_SHELL=$as_shell
263                as_have_required=yes
264                if { "$as_shell" 2> /dev/null <<\_ASEOF
265 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
266   emulate sh
267   NULLCMD=:
268   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
269   # is contrary to our usage.  Disable this feature.
270   alias -g '${1+"$@"}'='"$@"'
271   setopt NO_GLOB_SUBST
272 else
273   case `(set -o) 2>/dev/null` in
274   *posix*) set -o posix ;;
275 esac
276
277 fi
278
279
280 :
281 (as_func_return () {
282   (exit $1)
283 }
284 as_func_success () {
285   as_func_return 0
286 }
287 as_func_failure () {
288   as_func_return 1
289 }
290 as_func_ret_success () {
291   return 0
292 }
293 as_func_ret_failure () {
294   return 1
295 }
296
297 exitcode=0
298 if as_func_success; then
299   :
300 else
301   exitcode=1
302   echo as_func_success failed.
303 fi
304
305 if as_func_failure; then
306   exitcode=1
307   echo as_func_failure succeeded.
308 fi
309
310 if as_func_ret_success; then
311   :
312 else
313   exitcode=1
314   echo as_func_ret_success failed.
315 fi
316
317 if as_func_ret_failure; then
318   exitcode=1
319   echo as_func_ret_failure succeeded.
320 fi
321
322 if ( set x; as_func_ret_success y && test x = "$1" ); then
323   :
324 else
325   exitcode=1
326   echo positional parameters were not saved.
327 fi
328
329 test $exitcode = 0) || { (exit 1); exit 1; }
330
331 (
332   as_lineno_1=$LINENO
333   as_lineno_2=$LINENO
334   test "x$as_lineno_1" != "x$as_lineno_2" &&
335   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
336
337 _ASEOF
338 }; then
339   break
340 fi
341
342 fi
343
344       done
345
346       if test "x$CONFIG_SHELL" != x; then
347   for as_var in BASH_ENV ENV
348         do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
349         done
350         export CONFIG_SHELL
351         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
352 fi
353
354
355     if test $as_have_required = no; then
356   echo This script requires a shell more modern than all the
357       echo shells that I found on your system.  Please install a
358       echo modern shell, or manually run the script under such a
359       echo shell if you do have one.
360       { (exit 1); exit 1; }
361 fi
362
363
364 fi
365
366 fi
367
368
369
370 (eval "as_func_return () {
371   (exit \$1)
372 }
373 as_func_success () {
374   as_func_return 0
375 }
376 as_func_failure () {
377   as_func_return 1
378 }
379 as_func_ret_success () {
380   return 0
381 }
382 as_func_ret_failure () {
383   return 1
384 }
385
386 exitcode=0
387 if as_func_success; then
388   :
389 else
390   exitcode=1
391   echo as_func_success failed.
392 fi
393
394 if as_func_failure; then
395   exitcode=1
396   echo as_func_failure succeeded.
397 fi
398
399 if as_func_ret_success; then
400   :
401 else
402   exitcode=1
403   echo as_func_ret_success failed.
404 fi
405
406 if as_func_ret_failure; then
407   exitcode=1
408   echo as_func_ret_failure succeeded.
409 fi
410
411 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
412   :
413 else
414   exitcode=1
415   echo positional parameters were not saved.
416 fi
417
418 test \$exitcode = 0") || {
419   echo No shell found that supports shell functions.
420   echo Please tell autoconf@gnu.org about your system,
421   echo including any error possibly output before this
422   echo message
423 }
424
425
426
427   as_lineno_1=$LINENO
428   as_lineno_2=$LINENO
429   test "x$as_lineno_1" != "x$as_lineno_2" &&
430   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
431
432   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
433   # uniformly replaced by the line number.  The first 'sed' inserts a
434   # line-number line after each line using $LINENO; the second 'sed'
435   # does the real work.  The second script uses 'N' to pair each
436   # line-number line with the line containing $LINENO, and appends
437   # trailing '-' during substitution so that $LINENO is not a special
438   # case at line end.
439   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
440   # scripts with optimization help from Paolo Bonzini.  Blame Lee
441   # E. McMahon (1931-1989) for sed's syntax.  :-)
442   sed -n '
443     p
444     /[$]LINENO/=
445   ' <$as_myself |
446     sed '
447       s/[$]LINENO.*/&-/
448       t lineno
449       b
450       :lineno
451       N
452       :loop
453       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
454       t loop
455       s/-\n.*//
456     ' >$as_me.lineno &&
457   chmod +x "$as_me.lineno" ||
458     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
459    { (exit 1); exit 1; }; }
460
461   # Don't try to exec as it changes $[0], causing all sort of problems
462   # (the dirname of $[0] is not the place where we might find the
463   # original and so on.  Autoconf is especially sensitive to this).
464   . "./$as_me.lineno"
465   # Exit status is that of the last command.
466   exit
467 }
468
469
470 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
471   as_dirname=dirname
472 else
473   as_dirname=false
474 fi
475
476 ECHO_C= ECHO_N= ECHO_T=
477 case `echo -n x` in
478 -n*)
479   case `echo 'x\c'` in
480   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
481   *)   ECHO_C='\c';;
482   esac;;
483 *)
484   ECHO_N='-n';;
485 esac
486
487 if expr a : '\(a\)' >/dev/null 2>&1 &&
488    test "X`expr 00001 : '.*\(...\)'`" = X001; then
489   as_expr=expr
490 else
491   as_expr=false
492 fi
493
494 rm -f conf$$ conf$$.exe conf$$.file
495 if test -d conf$$.dir; then
496   rm -f conf$$.dir/conf$$.file
497 else
498   rm -f conf$$.dir
499   mkdir conf$$.dir
500 fi
501 echo >conf$$.file
502 if ln -s conf$$.file conf$$ 2>/dev/null; then
503   as_ln_s='ln -s'
504   # ... but there are two gotchas:
505   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
506   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
507   # In both cases, we have to default to `cp -p'.
508   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
509     as_ln_s='cp -p'
510 elif ln conf$$.file conf$$ 2>/dev/null; then
511   as_ln_s=ln
512 else
513   as_ln_s='cp -p'
514 fi
515 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
516 rmdir conf$$.dir 2>/dev/null
517
518 if mkdir -p . 2>/dev/null; then
519   as_mkdir_p=:
520 else
521   test -d ./-p && rmdir ./-p
522   as_mkdir_p=false
523 fi
524
525 if test -x / >/dev/null 2>&1; then
526   as_test_x='test -x'
527 else
528   if ls -dL / >/dev/null 2>&1; then
529     as_ls_L_option=L
530   else
531     as_ls_L_option=
532   fi
533   as_test_x='
534     eval sh -c '\''
535       if test -d "$1"; then
536         test -d "$1/.";
537       else
538         case $1 in
539         -*)set "./$1";;
540         esac;
541         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
542         ???[sx]*):;;*)false;;esac;fi
543     '\'' sh
544   '
545 fi
546 as_executable_p=$as_test_x
547
548 # Sed expression to map a string onto a valid CPP name.
549 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
550
551 # Sed expression to map a string onto a valid variable name.
552 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
553
554
555
556
557 # Check that we are running under the correct shell.
558 SHELL=${CONFIG_SHELL-/bin/sh}
559
560 case X$ECHO in
561 X*--fallback-echo)
562   # Remove one level of quotation (which was required for Make).
563   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
564   ;;
565 esac
566
567 echo=${ECHO-echo}
568 if test "X$1" = X--no-reexec; then
569   # Discard the --no-reexec flag, and continue.
570   shift
571 elif test "X$1" = X--fallback-echo; then
572   # Avoid inline document here, it may be left over
573   :
574 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
575   # Yippee, $echo works!
576   :
577 else
578   # Restart under the correct shell.
579   exec $SHELL "$0" --no-reexec ${1+"$@"}
580 fi
581
582 if test "X$1" = X--fallback-echo; then
583   # used as fallback echo
584   shift
585   cat <<EOF
586 $*
587 EOF
588   exit 0
589 fi
590
591 # The HP-UX ksh and POSIX shell print the target directory to stdout
592 # if CDPATH is set.
593 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
594
595 if test -z "$ECHO"; then
596 if test "X${echo_test_string+set}" != Xset; then
597 # find a string as large as possible, as long as the shell can cope with it
598   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
599     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
600     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
601        echo_test_string=`eval $cmd` &&
602        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
603     then
604       break
605     fi
606   done
607 fi
608
609 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
610    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
611    test "X$echo_testing_string" = "X$echo_test_string"; then
612   :
613 else
614   # The Solaris, AIX, and Digital Unix default echo programs unquote
615   # backslashes.  This makes it impossible to quote backslashes using
616   #   echo "$something" | sed 's/\\/\\\\/g'
617   #
618   # So, first we look for a working echo in the user's PATH.
619
620   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
621   for dir in $PATH /usr/ucb; do
622     IFS="$lt_save_ifs"
623     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
624        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
625        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
626        test "X$echo_testing_string" = "X$echo_test_string"; then
627       echo="$dir/echo"
628       break
629     fi
630   done
631   IFS="$lt_save_ifs"
632
633   if test "X$echo" = Xecho; then
634     # We didn't find a better echo, so look for alternatives.
635     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
636        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
637        test "X$echo_testing_string" = "X$echo_test_string"; then
638       # This shell has a builtin print -r that does the trick.
639       echo='print -r'
640     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
641          test "X$CONFIG_SHELL" != X/bin/ksh; then
642       # If we have ksh, try running configure again with it.
643       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
644       export ORIGINAL_CONFIG_SHELL
645       CONFIG_SHELL=/bin/ksh
646       export CONFIG_SHELL
647       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
648     else
649       # Try using printf.
650       echo='printf %s\n'
651       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
652          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
653          test "X$echo_testing_string" = "X$echo_test_string"; then
654         # Cool, printf works
655         :
656       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
657            test "X$echo_testing_string" = 'X\t' &&
658            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
659            test "X$echo_testing_string" = "X$echo_test_string"; then
660         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
661         export CONFIG_SHELL
662         SHELL="$CONFIG_SHELL"
663         export SHELL
664         echo="$CONFIG_SHELL $0 --fallback-echo"
665       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
666            test "X$echo_testing_string" = 'X\t' &&
667            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
668            test "X$echo_testing_string" = "X$echo_test_string"; then
669         echo="$CONFIG_SHELL $0 --fallback-echo"
670       else
671         # maybe with a smaller string...
672         prev=:
673
674         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
675           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
676           then
677             break
678           fi
679           prev="$cmd"
680         done
681
682         if test "$prev" != 'sed 50q "$0"'; then
683           echo_test_string=`eval $prev`
684           export echo_test_string
685           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
686         else
687           # Oops.  We lost completely, so just stick with echo.
688           echo=echo
689         fi
690       fi
691     fi
692   fi
693 fi
694 fi
695
696 # Copy echo and quote the copy suitably for passing to libtool from
697 # the Makefile, instead of quoting the original, which is used later.
698 ECHO=$echo
699 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
700    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
701 fi
702
703
704
705
706 exec 7<&0 </dev/null 6>&1
707
708 # Name of the host.
709 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
710 # so uname gets run too.
711 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
712
713 #
714 # Initializations.
715 #
716 ac_default_prefix=/usr/local
717 ac_clean_files=
718 ac_config_libobj_dir=.
719 LIBOBJS=
720 cross_compiling=no
721 subdirs=
722 MFLAGS=
723 MAKEFLAGS=
724 SHELL=${CONFIG_SHELL-/bin/sh}
725
726 # Identity of this package.
727 PACKAGE_NAME=
728 PACKAGE_TARNAME=
729 PACKAGE_VERSION=
730 PACKAGE_STRING=
731 PACKAGE_BUGREPORT=
732
733 ac_unique_file="OpenLDAP"
734 ac_unique_file="build/version.sh"
735 ac_default_prefix=/usr/local
736 # Factoring default headers for most tests.
737 ac_includes_default="\
738 #include <stdio.h>
739 #ifdef HAVE_SYS_TYPES_H
740 # include <sys/types.h>
741 #endif
742 #ifdef HAVE_SYS_STAT_H
743 # include <sys/stat.h>
744 #endif
745 #ifdef STDC_HEADERS
746 # include <stdlib.h>
747 # include <stddef.h>
748 #else
749 # ifdef HAVE_STDLIB_H
750 #  include <stdlib.h>
751 # endif
752 #endif
753 #ifdef HAVE_STRING_H
754 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
755 #  include <memory.h>
756 # endif
757 # include <string.h>
758 #endif
759 #ifdef HAVE_STRINGS_H
760 # include <strings.h>
761 #endif
762 #ifdef HAVE_INTTYPES_H
763 # include <inttypes.h>
764 #endif
765 #ifdef HAVE_STDINT_H
766 # include <stdint.h>
767 #endif
768 #ifdef HAVE_UNISTD_H
769 # include <unistd.h>
770 #endif"
771
772 ac_subst_vars='SHELL
773 PATH_SEPARATOR
774 PACKAGE_NAME
775 PACKAGE_TARNAME
776 PACKAGE_VERSION
777 PACKAGE_STRING
778 PACKAGE_BUGREPORT
779 exec_prefix
780 prefix
781 program_transform_name
782 bindir
783 sbindir
784 libexecdir
785 datarootdir
786 datadir
787 sysconfdir
788 sharedstatedir
789 localstatedir
790 includedir
791 oldincludedir
792 docdir
793 infodir
794 htmldir
795 dvidir
796 pdfdir
797 psdir
798 libdir
799 localedir
800 mandir
801 DEFS
802 ECHO_C
803 ECHO_N
804 ECHO_T
805 LIBS
806 build_alias
807 host_alias
808 target_alias
809 build
810 build_cpu
811 build_vendor
812 build_os
813 host
814 host_cpu
815 host_vendor
816 host_os
817 target
818 target_cpu
819 target_vendor
820 target_os
821 INSTALL_PROGRAM
822 INSTALL_SCRIPT
823 INSTALL_DATA
824 CYGPATH_W
825 PACKAGE
826 VERSION
827 ACLOCAL
828 AUTOCONF
829 AUTOMAKE
830 AUTOHEADER
831 MAKEINFO
832 install_sh
833 STRIP
834 INSTALL_STRIP_PROGRAM
835 mkdir_p
836 AWK
837 SET_MAKE
838 am__leading_dot
839 AMTAR
840 am__tar
841 am__untar
842 OPENLDAP_LIBRELEASE
843 OPENLDAP_LIBVERSION
844 OPENLDAP_RELEASE_DATE
845 top_builddir
846 ldap_subdir
847 CC
848 AR
849 CFLAGS
850 LDFLAGS
851 CPPFLAGS
852 ac_ct_CC
853 EXEEXT
854 OBJEXT
855 DEPDIR
856 am__include
857 am__quote
858 AMDEP_TRUE
859 AMDEP_FALSE
860 AMDEPBACKSLASH
861 CCDEPMODE
862 am__fastdepCC_TRUE
863 am__fastdepCC_FALSE
864 GREP
865 EGREP
866 LN_S
867 ECHO
868 RANLIB
869 DLLTOOL
870 AS
871 OBJDUMP
872 CPP
873 LIBTOOL
874 PERLBIN
875 OL_MKDEP
876 OL_MKDEP_FLAGS
877 LTSTATIC
878 MYSQL
879 LIBOBJS
880 LIBSRCS
881 PLAT
882 WITH_SASL
883 WITH_TLS
884 WITH_MODULES_ENABLED
885 WITH_ACI_ENABLED
886 BUILD_THREAD
887 BUILD_LIBS_DYNAMIC
888 BUILD_SLAPD
889 BUILD_SLAPI
890 SLAPD_SLAPI_DEPEND
891 BUILD_BDB
892 BUILD_DNSSRV
893 BUILD_HDB
894 BUILD_LDAP
895 BUILD_META
896 BUILD_MONITOR
897 BUILD_NDB
898 BUILD_NULL
899 BUILD_PASSWD
900 BUILD_RELAY
901 BUILD_PERL
902 BUILD_SHELL
903 BUILD_SOCK
904 BUILD_SQL
905 BUILD_ACCESSLOG
906 BUILD_AUDITLOG
907 BUILD_COLLECT
908 BUILD_CONSTRAINT
909 BUILD_DDS
910 BUILD_DENYOP
911 BUILD_DYNGROUP
912 BUILD_DYNLIST
913 BUILD_LASTMOD
914 BUILD_MEMBEROF
915 BUILD_PPOLICY
916 BUILD_PROXYCACHE
917 BUILD_REFINT
918 BUILD_RETCODE
919 BUILD_RWM
920 BUILD_SEQMOD
921 BUILD_SYNCPROV
922 BUILD_TRANSLUCENT
923 BUILD_UNIQUE
924 BUILD_VALSORT
925 LDAP_LIBS
926 SLAPD_LIBS
927 BDB_LIBS
928 SLAPD_NDB_LIBS
929 SLAPD_NDB_INCS
930 LTHREAD_LIBS
931 LUTIL_LIBS
932 WRAP_LIBS
933 SLAPD_MODULES_CPPFLAGS
934 SLAPD_MODULES_LDFLAGS
935 SLAPD_NO_STATIC
936 SLAPD_STATIC_BACKENDS
937 SLAPD_DYNAMIC_BACKENDS
938 SLAPD_STATIC_OVERLAYS
939 SLAPD_DYNAMIC_OVERLAYS
940 PERL_CPPFLAGS
941 SLAPD_PERL_LDFLAGS
942 MOD_PERL_LDFLAGS
943 KRB4_LIBS
944 KRB5_LIBS
945 SASL_LIBS
946 GSSAPI_LIBS
947 TLS_LIBS
948 MODULES_LIBS
949 SLAPI_LIBS
950 LIBSLAPI
951 LIBSLAPITOOLS
952 AUTH_LIBS
953 ICU_LIBS
954 SLAPD_SLP_LIBS
955 SLAPD_GMP_LIBS
956 SLAPD_SQL_LDFLAGS
957 SLAPD_SQL_LIBS
958 SLAPD_SQL_INCLUDES
959 LTLIBOBJS'
960 ac_subst_files=''
961       ac_precious_vars='build_alias
962 host_alias
963 target_alias
964 CC
965 CFLAGS
966 LDFLAGS
967 LIBS
968 CPPFLAGS
969 CPP'
970
971
972 # Initialize some variables set by options.
973 ac_init_help=
974 ac_init_version=false
975 # The variables have the same names as the options, with
976 # dashes changed to underlines.
977 cache_file=/dev/null
978 exec_prefix=NONE
979 no_create=
980 no_recursion=
981 prefix=NONE
982 program_prefix=NONE
983 program_suffix=NONE
984 program_transform_name=s,x,x,
985 silent=
986 site=
987 srcdir=
988 verbose=
989 x_includes=NONE
990 x_libraries=NONE
991
992 # Installation directory options.
993 # These are left unexpanded so users can "make install exec_prefix=/foo"
994 # and all the variables that are supposed to be based on exec_prefix
995 # by default will actually change.
996 # Use braces instead of parens because sh, perl, etc. also accept them.
997 # (The list follows the same order as the GNU Coding Standards.)
998 bindir='${exec_prefix}/bin'
999 sbindir='${exec_prefix}/sbin'
1000 libexecdir='${exec_prefix}/libexec'
1001 datarootdir='${prefix}/share'
1002 datadir='${datarootdir}'
1003 sysconfdir='${prefix}/etc'
1004 sharedstatedir='${prefix}/com'
1005 localstatedir='${prefix}/var'
1006 includedir='${prefix}/include'
1007 oldincludedir='/usr/include'
1008 docdir='${datarootdir}/doc/${PACKAGE}'
1009 infodir='${datarootdir}/info'
1010 htmldir='${docdir}'
1011 dvidir='${docdir}'
1012 pdfdir='${docdir}'
1013 psdir='${docdir}'
1014 libdir='${exec_prefix}/lib'
1015 localedir='${datarootdir}/locale'
1016 mandir='${datarootdir}/man'
1017
1018 ac_prev=
1019 ac_dashdash=
1020 for ac_option
1021 do
1022   # If the previous option needs an argument, assign it.
1023   if test -n "$ac_prev"; then
1024     eval $ac_prev=\$ac_option
1025     ac_prev=
1026     continue
1027   fi
1028
1029   case $ac_option in
1030   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1031   *)    ac_optarg=yes ;;
1032   esac
1033
1034   # Accept the important Cygnus configure options, so we can diagnose typos.
1035
1036   case $ac_dashdash$ac_option in
1037   --)
1038     ac_dashdash=yes ;;
1039
1040   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1041     ac_prev=bindir ;;
1042   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1043     bindir=$ac_optarg ;;
1044
1045   -build | --build | --buil | --bui | --bu)
1046     ac_prev=build_alias ;;
1047   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1048     build_alias=$ac_optarg ;;
1049
1050   -cache-file | --cache-file | --cache-fil | --cache-fi \
1051   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1052     ac_prev=cache_file ;;
1053   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1054   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1055     cache_file=$ac_optarg ;;
1056
1057   --config-cache | -C)
1058     cache_file=config.cache ;;
1059
1060   -datadir | --datadir | --datadi | --datad)
1061     ac_prev=datadir ;;
1062   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1063     datadir=$ac_optarg ;;
1064
1065   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1066   | --dataroo | --dataro | --datar)
1067     ac_prev=datarootdir ;;
1068   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1069   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1070     datarootdir=$ac_optarg ;;
1071
1072   -disable-* | --disable-*)
1073     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1074     # Reject names that are not valid shell variable names.
1075     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1076       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
1077    { (exit 1); exit 1; }; }
1078     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
1079     eval enable_$ac_feature=no ;;
1080
1081   -docdir | --docdir | --docdi | --doc | --do)
1082     ac_prev=docdir ;;
1083   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1084     docdir=$ac_optarg ;;
1085
1086   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1087     ac_prev=dvidir ;;
1088   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1089     dvidir=$ac_optarg ;;
1090
1091   -enable-* | --enable-*)
1092     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1093     # Reject names that are not valid shell variable names.
1094     expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1095       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
1096    { (exit 1); exit 1; }; }
1097     ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
1098     eval enable_$ac_feature=\$ac_optarg ;;
1099
1100   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1101   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1102   | --exec | --exe | --ex)
1103     ac_prev=exec_prefix ;;
1104   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1105   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1106   | --exec=* | --exe=* | --ex=*)
1107     exec_prefix=$ac_optarg ;;
1108
1109   -gas | --gas | --ga | --g)
1110     # Obsolete; use --with-gas.
1111     with_gas=yes ;;
1112
1113   -help | --help | --hel | --he | -h)
1114     ac_init_help=long ;;
1115   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1116     ac_init_help=recursive ;;
1117   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1118     ac_init_help=short ;;
1119
1120   -host | --host | --hos | --ho)
1121     ac_prev=host_alias ;;
1122   -host=* | --host=* | --hos=* | --ho=*)
1123     host_alias=$ac_optarg ;;
1124
1125   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1126     ac_prev=htmldir ;;
1127   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1128   | --ht=*)
1129     htmldir=$ac_optarg ;;
1130
1131   -includedir | --includedir | --includedi | --included | --include \
1132   | --includ | --inclu | --incl | --inc)
1133     ac_prev=includedir ;;
1134   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1135   | --includ=* | --inclu=* | --incl=* | --inc=*)
1136     includedir=$ac_optarg ;;
1137
1138   -infodir | --infodir | --infodi | --infod | --info | --inf)
1139     ac_prev=infodir ;;
1140   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1141     infodir=$ac_optarg ;;
1142
1143   -libdir | --libdir | --libdi | --libd)
1144     ac_prev=libdir ;;
1145   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1146     libdir=$ac_optarg ;;
1147
1148   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1149   | --libexe | --libex | --libe)
1150     ac_prev=libexecdir ;;
1151   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1152   | --libexe=* | --libex=* | --libe=*)
1153     libexecdir=$ac_optarg ;;
1154
1155   -localedir | --localedir | --localedi | --localed | --locale)
1156     ac_prev=localedir ;;
1157   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1158     localedir=$ac_optarg ;;
1159
1160   -localstatedir | --localstatedir | --localstatedi | --localstated \
1161   | --localstate | --localstat | --localsta | --localst | --locals)
1162     ac_prev=localstatedir ;;
1163   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1164   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1165     localstatedir=$ac_optarg ;;
1166
1167   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1168     ac_prev=mandir ;;
1169   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1170     mandir=$ac_optarg ;;
1171
1172   -nfp | --nfp | --nf)
1173     # Obsolete; use --without-fp.
1174     with_fp=no ;;
1175
1176   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1177   | --no-cr | --no-c | -n)
1178     no_create=yes ;;
1179
1180   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1181   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1182     no_recursion=yes ;;
1183
1184   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1185   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1186   | --oldin | --oldi | --old | --ol | --o)
1187     ac_prev=oldincludedir ;;
1188   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1189   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1190   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1191     oldincludedir=$ac_optarg ;;
1192
1193   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1194     ac_prev=prefix ;;
1195   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1196     prefix=$ac_optarg ;;
1197
1198   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1199   | --program-pre | --program-pr | --program-p)
1200     ac_prev=program_prefix ;;
1201   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1202   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1203     program_prefix=$ac_optarg ;;
1204
1205   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1206   | --program-suf | --program-su | --program-s)
1207     ac_prev=program_suffix ;;
1208   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1209   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1210     program_suffix=$ac_optarg ;;
1211
1212   -program-transform-name | --program-transform-name \
1213   | --program-transform-nam | --program-transform-na \
1214   | --program-transform-n | --program-transform- \
1215   | --program-transform | --program-transfor \
1216   | --program-transfo | --program-transf \
1217   | --program-trans | --program-tran \
1218   | --progr-tra | --program-tr | --program-t)
1219     ac_prev=program_transform_name ;;
1220   -program-transform-name=* | --program-transform-name=* \
1221   | --program-transform-nam=* | --program-transform-na=* \
1222   | --program-transform-n=* | --program-transform-=* \
1223   | --program-transform=* | --program-transfor=* \
1224   | --program-transfo=* | --program-transf=* \
1225   | --program-trans=* | --program-tran=* \
1226   | --progr-tra=* | --program-tr=* | --program-t=*)
1227     program_transform_name=$ac_optarg ;;
1228
1229   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1230     ac_prev=pdfdir ;;
1231   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1232     pdfdir=$ac_optarg ;;
1233
1234   -psdir | --psdir | --psdi | --psd | --ps)
1235     ac_prev=psdir ;;
1236   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1237     psdir=$ac_optarg ;;
1238
1239   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1240   | -silent | --silent | --silen | --sile | --sil)
1241     silent=yes ;;
1242
1243   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1244     ac_prev=sbindir ;;
1245   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1246   | --sbi=* | --sb=*)
1247     sbindir=$ac_optarg ;;
1248
1249   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1250   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1251   | --sharedst | --shareds | --shared | --share | --shar \
1252   | --sha | --sh)
1253     ac_prev=sharedstatedir ;;
1254   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1255   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1256   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1257   | --sha=* | --sh=*)
1258     sharedstatedir=$ac_optarg ;;
1259
1260   -site | --site | --sit)
1261     ac_prev=site ;;
1262   -site=* | --site=* | --sit=*)
1263     site=$ac_optarg ;;
1264
1265   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1266     ac_prev=srcdir ;;
1267   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1268     srcdir=$ac_optarg ;;
1269
1270   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1271   | --syscon | --sysco | --sysc | --sys | --sy)
1272     ac_prev=sysconfdir ;;
1273   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1274   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1275     sysconfdir=$ac_optarg ;;
1276
1277   -target | --target | --targe | --targ | --tar | --ta | --t)
1278     ac_prev=target_alias ;;
1279   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1280     target_alias=$ac_optarg ;;
1281
1282   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1283     verbose=yes ;;
1284
1285   -version | --version | --versio | --versi | --vers | -V)
1286     ac_init_version=: ;;
1287
1288   -with-* | --with-*)
1289     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1290     # Reject names that are not valid shell variable names.
1291     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1292       { echo "$as_me: error: invalid package name: $ac_package" >&2
1293    { (exit 1); exit 1; }; }
1294     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1295     eval with_$ac_package=\$ac_optarg ;;
1296
1297   -without-* | --without-*)
1298     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1299     # Reject names that are not valid shell variable names.
1300     expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1301       { echo "$as_me: error: invalid package name: $ac_package" >&2
1302    { (exit 1); exit 1; }; }
1303     ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1304     eval with_$ac_package=no ;;
1305
1306   --x)
1307     # Obsolete; use --with-x.
1308     with_x=yes ;;
1309
1310   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1311   | --x-incl | --x-inc | --x-in | --x-i)
1312     ac_prev=x_includes ;;
1313   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1314   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1315     x_includes=$ac_optarg ;;
1316
1317   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1318   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1319     ac_prev=x_libraries ;;
1320   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1321   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1322     x_libraries=$ac_optarg ;;
1323
1324   -*) { echo "$as_me: error: unrecognized option: $ac_option
1325 Try \`$0 --help' for more information." >&2
1326    { (exit 1); exit 1; }; }
1327     ;;
1328
1329   *=*)
1330     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1331     # Reject names that are not valid shell variable names.
1332     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1333       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1334    { (exit 1); exit 1; }; }
1335     eval $ac_envvar=\$ac_optarg
1336     export $ac_envvar ;;
1337
1338   *)
1339     # FIXME: should be removed in autoconf 3.0.
1340     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1341     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1342       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1343     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1344     ;;
1345
1346   esac
1347 done
1348
1349 if test -n "$ac_prev"; then
1350   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1351   { echo "$as_me: error: missing argument to $ac_option" >&2
1352    { (exit 1); exit 1; }; }
1353 fi
1354
1355 # Be sure to have absolute directory names.
1356 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1357                 datadir sysconfdir sharedstatedir localstatedir includedir \
1358                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1359                 libdir localedir mandir
1360 do
1361   eval ac_val=\$$ac_var
1362   case $ac_val in
1363     [\\/$]* | ?:[\\/]* )  continue;;
1364     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1365   esac
1366   { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1367    { (exit 1); exit 1; }; }
1368 done
1369
1370 # There might be people who depend on the old broken behavior: `$host'
1371 # used to hold the argument of --host etc.
1372 # FIXME: To remove some day.
1373 build=$build_alias
1374 host=$host_alias
1375 target=$target_alias
1376
1377 # FIXME: To remove some day.
1378 if test "x$host_alias" != x; then
1379   if test "x$build_alias" = x; then
1380     cross_compiling=maybe
1381     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1382     If a cross compiler is detected then cross compile mode will be used." >&2
1383   elif test "x$build_alias" != "x$host_alias"; then
1384     cross_compiling=yes
1385   fi
1386 fi
1387
1388 ac_tool_prefix=
1389 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1390
1391 test "$silent" = yes && exec 6>/dev/null
1392
1393
1394 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1395 ac_ls_di=`ls -di .` &&
1396 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1397   { echo "$as_me: error: Working directory cannot be determined" >&2
1398    { (exit 1); exit 1; }; }
1399 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1400   { echo "$as_me: error: pwd does not report name of working directory" >&2
1401    { (exit 1); exit 1; }; }
1402
1403
1404 # Find the source files, if location was not specified.
1405 if test -z "$srcdir"; then
1406   ac_srcdir_defaulted=yes
1407   # Try the directory containing this script, then the parent directory.
1408   ac_confdir=`$as_dirname -- "$0" ||
1409 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1410          X"$0" : 'X\(//\)[^/]' \| \
1411          X"$0" : 'X\(//\)$' \| \
1412          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1413 echo X"$0" |
1414     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1415             s//\1/
1416             q
1417           }
1418           /^X\(\/\/\)[^/].*/{
1419             s//\1/
1420             q
1421           }
1422           /^X\(\/\/\)$/{
1423             s//\1/
1424             q
1425           }
1426           /^X\(\/\).*/{
1427             s//\1/
1428             q
1429           }
1430           s/.*/./; q'`
1431   srcdir=$ac_confdir
1432   if test ! -r "$srcdir/$ac_unique_file"; then
1433     srcdir=..
1434   fi
1435 else
1436   ac_srcdir_defaulted=no
1437 fi
1438 if test ! -r "$srcdir/$ac_unique_file"; then
1439   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1440   { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1441    { (exit 1); exit 1; }; }
1442 fi
1443 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1444 ac_abs_confdir=`(
1445         cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1446    { (exit 1); exit 1; }; }
1447         pwd)`
1448 # When building in place, set srcdir=.
1449 if test "$ac_abs_confdir" = "$ac_pwd"; then
1450   srcdir=.
1451 fi
1452 # Remove unnecessary trailing slashes from srcdir.
1453 # Double slashes in file names in object file debugging info
1454 # mess up M-x gdb in Emacs.
1455 case $srcdir in
1456 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1457 esac
1458 for ac_var in $ac_precious_vars; do
1459   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1460   eval ac_env_${ac_var}_value=\$${ac_var}
1461   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1462   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1463 done
1464
1465 #
1466 # Report the --help message.
1467 #
1468 if test "$ac_init_help" = "long"; then
1469   # Omit some internal or obsolete options to make the list less imposing.
1470   # This message is too long to be a string in the A/UX 3.1 sh.
1471   cat <<_ACEOF
1472 \`configure' configures this package to adapt to many kinds of systems.
1473
1474 Usage: $0 [OPTION]... [VAR=VALUE]...
1475
1476 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1477 VAR=VALUE.  See below for descriptions of some of the useful variables.
1478
1479 Defaults for the options are specified in brackets.
1480
1481 Configuration:
1482   -h, --help              display this help and exit
1483       --help=short        display options specific to this package
1484       --help=recursive    display the short help of all the included packages
1485   -V, --version           display version information and exit
1486   -q, --quiet, --silent   do not print \`checking...' messages
1487       --cache-file=FILE   cache test results in FILE [disabled]
1488   -C, --config-cache      alias for \`--cache-file=config.cache'
1489   -n, --no-create         do not create output files
1490       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1491
1492 Installation directories:
1493   --prefix=PREFIX         install architecture-independent files in PREFIX
1494                           [$ac_default_prefix]
1495   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1496                           [PREFIX]
1497
1498 By default, \`make install' will install all the files in
1499 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1500 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1501 for instance \`--prefix=\$HOME'.
1502
1503 For better control, use the options below.
1504
1505 Fine tuning of the installation directories:
1506   --bindir=DIR           user executables [EPREFIX/bin]
1507   --sbindir=DIR          system admin executables [EPREFIX/sbin]
1508   --libexecdir=DIR       program executables [EPREFIX/libexec]
1509   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1510   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1511   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1512   --libdir=DIR           object code libraries [EPREFIX/lib]
1513   --includedir=DIR       C header files [PREFIX/include]
1514   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1515   --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1516   --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1517   --infodir=DIR          info documentation [DATAROOTDIR/info]
1518   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1519   --mandir=DIR           man documentation [DATAROOTDIR/man]
1520   --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
1521   --htmldir=DIR          html documentation [DOCDIR]
1522   --dvidir=DIR           dvi documentation [DOCDIR]
1523   --pdfdir=DIR           pdf documentation [DOCDIR]
1524   --psdir=DIR            ps documentation [DOCDIR]
1525 _ACEOF
1526
1527   cat <<\_ACEOF
1528
1529 Program names:
1530   --program-prefix=PREFIX            prepend PREFIX to installed program names
1531   --program-suffix=SUFFIX            append SUFFIX to installed program names
1532   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1533
1534 System types:
1535   --build=BUILD     configure for building on BUILD [guessed]
1536   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1537   --target=TARGET   configure for building compilers for TARGET [HOST]
1538 _ACEOF
1539 fi
1540
1541 if test -n "$ac_init_help"; then
1542
1543   cat <<\_ACEOF
1544
1545 Optional Features:
1546   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1547   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1548   --enable-debug          enable debugging no|yes|traditional [yes]
1549   --enable-dynamic        enable linking built binaries with dynamic libs [no]
1550   --enable-syslog         enable syslog support [auto]
1551   --enable-proctitle      enable proctitle support [yes]
1552   --enable-ipv6           enable IPv6 support [auto]
1553   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]
1554
1555 SLAPD (Standalone LDAP Daemon) Options:
1556   --enable-slapd          enable building slapd [yes]
1557     --enable-dynacl       enable run-time loadable ACL support (experimental) [no]
1558     --enable-aci          enable per-object ACIs (experimental) no|yes|mod [no]
1559     --enable-cleartext    enable cleartext passwords [yes]
1560     --enable-crypt        enable crypt(3) passwords [no]
1561     --enable-lmpasswd     enable LAN Manager passwords [no]
1562     --enable-spasswd      enable (Cyrus) SASL password verification [no]
1563     --enable-modules      enable dynamic module support [no]
1564     --enable-rewrite      enable DN rewriting in back-ldap and rwm overlay [auto]
1565     --enable-rlookups     enable reverse lookups of client hostnames [no]
1566     --enable-slapi        enable SLAPI support (experimental) [no]
1567     --enable-slp          enable SLPv2 support [no]
1568     --enable-wrappers     enable tcp wrapper support [no]
1569
1570 SLAPD Backend Options:
1571     --enable-backends     enable all available backends no|yes|mod
1572     --enable-bdb          enable Berkeley DB backend no|yes|mod [no]
1573     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]
1574     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]
1575     --enable-ldap         enable ldap backend no|yes|mod [no]
1576     --enable-meta         enable metadirectory backend no|yes|mod [no]
1577     --enable-monitor      enable monitor backend no|yes|mod [yes]
1578     --enable-ndb          enable MySQL NDB Cluster backend no|yes|mod [no]
1579     --enable-null         enable null backend no|yes|mod [no]
1580     --enable-passwd       enable passwd backend no|yes|mod [no]
1581     --enable-perl         enable perl backend no|yes|mod [no]
1582     --enable-relay        enable relay backend no|yes|mod [yes]
1583     --enable-shell        enable shell backend no|yes|mod [no]
1584     --enable-sock         enable sock backend no|yes|mod [no]
1585     --enable-sql          enable sql backend no|yes|mod [no]
1586
1587 SLAPD Overlay Options:
1588     --enable-overlays     enable all available overlays no|yes|mod
1589     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [no]
1590     --enable-auditlog     Audit Logging overlay no|yes|mod [no]
1591     --enable-collect      Collect overlay no|yes|mod [no]
1592     --enable-constraint   Attribute Constraint overlay no|yes|mod [no]
1593     --enable-dds          Dynamic Directory Services overlay no|yes|mod [no]
1594     --enable-deref        Dereference overlay no|yes|mod [no]
1595     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1596     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1597     --enable-memberof     Reverse Group Membership overlay no|yes|mod [no]
1598     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1599     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1600     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1601     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1602     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1603     --enable-seqmod       Sequential Modify overlay no|yes|mod [yes]
1604     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1605     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1606     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1607     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1608
1609 Library Generation & Linking Options
1610   --enable-static[=PKGS]  build static libraries [default=yes]
1611   --enable-shared[=PKGS]  build shared libraries [default=yes]
1612   --enable-fast-install[=PKGS]
1613                           optimize for fast installation [default=yes]
1614   --disable-dependency-tracking  speeds up one-time build
1615   --enable-dependency-tracking   do not reject slow dependency extractors
1616   --disable-libtool-lock  avoid locking (might break parallel builds)
1617
1618 Optional Packages:
1619   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1620   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1621   --with-subdir=DIR       change default subdirectory used for installs
1622   --with-cyrus-sasl       with Cyrus SASL support [auto]
1623   --with-fetch            with fetch(3) URL support [auto]
1624   --with-gssapi           with GSSAPI support [auto]
1625   --with-threads          with threads [auto]
1626   --with-tls              with TLS/SSL support auto|openssl|gnutls [auto]
1627   --with-yielding-select  with implicitly yielding select [auto]
1628   --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1629   --with-odbc             with specific ODBC support iodbc|unixodbc|odbc32|auto [auto]
1630   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1631   --with-pic              try to use only PIC/non-PIC objects [default=use
1632                           both]
1633   --with-tags[=TAGS]      include additional configurations [automatic]
1634
1635 See INSTALL file for further details.
1636
1637 Some influential environment variables:
1638   CC          C compiler command
1639   CFLAGS      C compiler flags
1640   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1641               nonstandard directory <lib dir>
1642   LIBS        libraries to pass to the linker, e.g. -l<library>
1643   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1644               you have headers in a nonstandard directory <include dir>
1645   CPP         C preprocessor
1646
1647 Use these variables to override the choices made by `configure' or to help
1648 it to find libraries and programs with nonstandard names/locations.
1649
1650 _ACEOF
1651 ac_status=$?
1652 fi
1653
1654 if test "$ac_init_help" = "recursive"; then
1655   # If there are subdirs, report their specific --help.
1656   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1657     test -d "$ac_dir" || continue
1658     ac_builddir=.
1659
1660 case "$ac_dir" in
1661 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1662 *)
1663   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1664   # A ".." for each directory in $ac_dir_suffix.
1665   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1666   case $ac_top_builddir_sub in
1667   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1668   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1669   esac ;;
1670 esac
1671 ac_abs_top_builddir=$ac_pwd
1672 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1673 # for backward compatibility:
1674 ac_top_builddir=$ac_top_build_prefix
1675
1676 case $srcdir in
1677   .)  # We are building in place.
1678     ac_srcdir=.
1679     ac_top_srcdir=$ac_top_builddir_sub
1680     ac_abs_top_srcdir=$ac_pwd ;;
1681   [\\/]* | ?:[\\/]* )  # Absolute name.
1682     ac_srcdir=$srcdir$ac_dir_suffix;
1683     ac_top_srcdir=$srcdir
1684     ac_abs_top_srcdir=$srcdir ;;
1685   *) # Relative name.
1686     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1687     ac_top_srcdir=$ac_top_build_prefix$srcdir
1688     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1689 esac
1690 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1691
1692     cd "$ac_dir" || { ac_status=$?; continue; }
1693     # Check for guested configure.
1694     if test -f "$ac_srcdir/configure.gnu"; then
1695       echo &&
1696       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1697     elif test -f "$ac_srcdir/configure"; then
1698       echo &&
1699       $SHELL "$ac_srcdir/configure" --help=recursive
1700     else
1701       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1702     fi || ac_status=$?
1703     cd "$ac_pwd" || { ac_status=$?; break; }
1704   done
1705 fi
1706
1707 test -n "$ac_init_help" && exit $ac_status
1708 if $ac_init_version; then
1709   cat <<\_ACEOF
1710 configure
1711 generated by GNU Autoconf 2.61
1712
1713 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1714 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1715 This configure script is free software; the Free Software Foundation
1716 gives unlimited permission to copy, distribute and modify it.
1717
1718 Copyright 1998-2008 The OpenLDAP Foundation. All rights reserved.
1719 Restrictions apply, see COPYRIGHT and LICENSE files.
1720 _ACEOF
1721   exit
1722 fi
1723 cat >config.log <<_ACEOF
1724 This file contains any messages produced by compilers while
1725 running configure, to aid debugging if configure makes a mistake.
1726
1727 It was created by $as_me, which was
1728 generated by GNU Autoconf 2.61.  Invocation command line was
1729
1730   $ $0 $@
1731
1732 _ACEOF
1733 exec 5>>config.log
1734 {
1735 cat <<_ASUNAME
1736 ## --------- ##
1737 ## Platform. ##
1738 ## --------- ##
1739
1740 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1741 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1742 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1743 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1744 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1745
1746 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1747 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1748
1749 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1750 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1751 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1752 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1753 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1754 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1755 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1756
1757 _ASUNAME
1758
1759 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1760 for as_dir in $PATH
1761 do
1762   IFS=$as_save_IFS
1763   test -z "$as_dir" && as_dir=.
1764   echo "PATH: $as_dir"
1765 done
1766 IFS=$as_save_IFS
1767
1768 } >&5
1769
1770 cat >&5 <<_ACEOF
1771
1772
1773 ## ----------- ##
1774 ## Core tests. ##
1775 ## ----------- ##
1776
1777 _ACEOF
1778
1779
1780 # Keep a trace of the command line.
1781 # Strip out --no-create and --no-recursion so they do not pile up.
1782 # Strip out --silent because we don't want to record it for future runs.
1783 # Also quote any args containing shell meta-characters.
1784 # Make two passes to allow for proper duplicate-argument suppression.
1785 ac_configure_args=
1786 ac_configure_args0=
1787 ac_configure_args1=
1788 ac_must_keep_next=false
1789 for ac_pass in 1 2
1790 do
1791   for ac_arg
1792   do
1793     case $ac_arg in
1794     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1795     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1796     | -silent | --silent | --silen | --sile | --sil)
1797       continue ;;
1798     *\'*)
1799       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1800     esac
1801     case $ac_pass in
1802     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1803     2)
1804       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1805       if test $ac_must_keep_next = true; then
1806         ac_must_keep_next=false # Got value, back to normal.
1807       else
1808         case $ac_arg in
1809           *=* | --config-cache | -C | -disable-* | --disable-* \
1810           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1811           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1812           | -with-* | --with-* | -without-* | --without-* | --x)
1813             case "$ac_configure_args0 " in
1814               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1815             esac
1816             ;;
1817           -* ) ac_must_keep_next=true ;;
1818         esac
1819       fi
1820       ac_configure_args="$ac_configure_args '$ac_arg'"
1821       ;;
1822     esac
1823   done
1824 done
1825 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1826 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1827
1828 # When interrupted or exit'd, cleanup temporary files, and complete
1829 # config.log.  We remove comments because anyway the quotes in there
1830 # would cause problems or look ugly.
1831 # WARNING: Use '\'' to represent an apostrophe within the trap.
1832 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1833 trap 'exit_status=$?
1834   # Save into config.log some information that might help in debugging.
1835   {
1836     echo
1837
1838     cat <<\_ASBOX
1839 ## ---------------- ##
1840 ## Cache variables. ##
1841 ## ---------------- ##
1842 _ASBOX
1843     echo
1844     # The following way of writing the cache mishandles newlines in values,
1845 (
1846   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1847     eval ac_val=\$$ac_var
1848     case $ac_val in #(
1849     *${as_nl}*)
1850       case $ac_var in #(
1851       *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1852 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1853       esac
1854       case $ac_var in #(
1855       _ | IFS | as_nl) ;; #(
1856       *) $as_unset $ac_var ;;
1857       esac ;;
1858     esac
1859   done
1860   (set) 2>&1 |
1861     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1862     *${as_nl}ac_space=\ *)
1863       sed -n \
1864         "s/'\''/'\''\\\\'\'''\''/g;
1865           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1866       ;; #(
1867     *)
1868       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1869       ;;
1870     esac |
1871     sort
1872 )
1873     echo
1874
1875     cat <<\_ASBOX
1876 ## ----------------- ##
1877 ## Output variables. ##
1878 ## ----------------- ##
1879 _ASBOX
1880     echo
1881     for ac_var in $ac_subst_vars
1882     do
1883       eval ac_val=\$$ac_var
1884       case $ac_val in
1885       *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1886       esac
1887       echo "$ac_var='\''$ac_val'\''"
1888     done | sort
1889     echo
1890
1891     if test -n "$ac_subst_files"; then
1892       cat <<\_ASBOX
1893 ## ------------------- ##
1894 ## File substitutions. ##
1895 ## ------------------- ##
1896 _ASBOX
1897       echo
1898       for ac_var in $ac_subst_files
1899       do
1900         eval ac_val=\$$ac_var
1901         case $ac_val in
1902         *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1903         esac
1904         echo "$ac_var='\''$ac_val'\''"
1905       done | sort
1906       echo
1907     fi
1908
1909     if test -s confdefs.h; then
1910       cat <<\_ASBOX
1911 ## ----------- ##
1912 ## confdefs.h. ##
1913 ## ----------- ##
1914 _ASBOX
1915       echo
1916       cat confdefs.h
1917       echo
1918     fi
1919     test "$ac_signal" != 0 &&
1920       echo "$as_me: caught signal $ac_signal"
1921     echo "$as_me: exit $exit_status"
1922   } >&5
1923   rm -f core *.core core.conftest.* &&
1924     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1925     exit $exit_status
1926 ' 0
1927 for ac_signal in 1 2 13 15; do
1928   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1929 done
1930 ac_signal=0
1931
1932 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1933 rm -f -r conftest* confdefs.h
1934
1935 # Predefined preprocessor variables.
1936
1937 cat >>confdefs.h <<_ACEOF
1938 #define PACKAGE_NAME "$PACKAGE_NAME"
1939 _ACEOF
1940
1941
1942 cat >>confdefs.h <<_ACEOF
1943 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1944 _ACEOF
1945
1946
1947 cat >>confdefs.h <<_ACEOF
1948 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1949 _ACEOF
1950
1951
1952 cat >>confdefs.h <<_ACEOF
1953 #define PACKAGE_STRING "$PACKAGE_STRING"
1954 _ACEOF
1955
1956
1957 cat >>confdefs.h <<_ACEOF
1958 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1959 _ACEOF
1960
1961
1962 # Let the site file select an alternate cache file if it wants to.
1963 # Prefer explicitly selected file to automatically selected ones.
1964 if test -n "$CONFIG_SITE"; then
1965   set x "$CONFIG_SITE"
1966 elif test "x$prefix" != xNONE; then
1967   set x "$prefix/share/config.site" "$prefix/etc/config.site"
1968 else
1969   set x "$ac_default_prefix/share/config.site" \
1970         "$ac_default_prefix/etc/config.site"
1971 fi
1972 shift
1973 for ac_site_file
1974 do
1975   if test -r "$ac_site_file"; then
1976     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1977 echo "$as_me: loading site script $ac_site_file" >&6;}
1978     sed 's/^/| /' "$ac_site_file" >&5
1979     . "$ac_site_file"
1980   fi
1981 done
1982
1983
1984 # Check that the precious variables saved in the cache have kept the same
1985 # value.
1986 ac_cache_corrupted=false
1987 for ac_var in $ac_precious_vars; do
1988   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1989   eval ac_new_set=\$ac_env_${ac_var}_set
1990   eval ac_old_val=\$ac_cv_env_${ac_var}_value
1991   eval ac_new_val=\$ac_env_${ac_var}_value
1992   case $ac_old_set,$ac_new_set in
1993     set,)
1994       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1995 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1996       ac_cache_corrupted=: ;;
1997     ,set)
1998       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1999 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2000       ac_cache_corrupted=: ;;
2001     ,);;
2002     *)
2003       if test "x$ac_old_val" != "x$ac_new_val"; then
2004         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
2005 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2006         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
2007 echo "$as_me:   former value:  $ac_old_val" >&2;}
2008         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
2009 echo "$as_me:   current value: $ac_new_val" >&2;}
2010         ac_cache_corrupted=:
2011       fi;;
2012   esac
2013   # Pass precious variables to config.status.
2014   if test "$ac_new_set" = set; then
2015     case $ac_new_val in
2016     *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2017     *) ac_arg=$ac_var=$ac_new_val ;;
2018     esac
2019     case " $ac_configure_args " in
2020       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2021       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
2022     esac
2023   fi
2024 done
2025 if $ac_cache_corrupted; then
2026   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
2027 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2028   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
2029 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
2030    { (exit 1); exit 1; }; }
2031 fi
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049 ac_ext=c
2050 ac_cpp='$CPP $CPPFLAGS'
2051 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2052 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2053 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080 ac_aux_dir=
2081 for ac_dir in build "$srcdir"/build; do
2082   if test -f "$ac_dir/install-sh"; then
2083     ac_aux_dir=$ac_dir
2084     ac_install_sh="$ac_aux_dir/install-sh -c"
2085     break
2086   elif test -f "$ac_dir/install.sh"; then
2087     ac_aux_dir=$ac_dir
2088     ac_install_sh="$ac_aux_dir/install.sh -c"
2089     break
2090   elif test -f "$ac_dir/shtool"; then
2091     ac_aux_dir=$ac_dir
2092     ac_install_sh="$ac_aux_dir/shtool install -c"
2093     break
2094   fi
2095 done
2096 if test -z "$ac_aux_dir"; then
2097   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build \"$srcdir\"/build" >&5
2098 echo "$as_me: error: cannot find install-sh or install.sh in build \"$srcdir\"/build" >&2;}
2099    { (exit 1); exit 1; }; }
2100 fi
2101
2102 # These three variables are undocumented and unsupported,
2103 # and are intended to be withdrawn in a future Autoconf release.
2104 # They can cause serious problems if a builder's source tree is in a directory
2105 # whose full name contains unusual characters.
2106 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2107 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2108 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2109
2110
2111 eval `$ac_aux_dir/version.sh`
2112 if test -z "$OL_STRING"; then
2113         { { echo "$as_me:$LINENO: error: could not determine version" >&5
2114 echo "$as_me: error: could not determine version" >&2;}
2115    { (exit 1); exit 1; }; }
2116 fi
2117
2118 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
2119         ac_cv_shtool="$ac_aux_dir/shtool"
2120 else
2121         { { echo "$as_me:$LINENO: error: no shtool found in $ac_aux_dir" >&5
2122 echo "$as_me: error: no shtool found in $ac_aux_dir" >&2;}
2123    { (exit 1); exit 1; }; }
2124 fi
2125
2126 SHTOOL="$ac_cv_shtool"
2127
2128 TB="" TN=""
2129 if test -t 1; then
2130         TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
2131         TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
2132 fi
2133
2134 OPENLDAP_CVS=""
2135 if test -d $ac_aux_dir/CVS; then
2136         OPENLDAP_CVS="(from CVS sources) "
2137 fi
2138
2139 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
2140
2141 # Make sure we can run config.sub.
2142 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2143   { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2144 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2145    { (exit 1); exit 1; }; }
2146
2147 { echo "$as_me:$LINENO: checking build system type" >&5
2148 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
2149 if test "${ac_cv_build+set}" = set; then
2150   echo $ECHO_N "(cached) $ECHO_C" >&6
2151 else
2152   ac_build_alias=$build_alias
2153 test "x$ac_build_alias" = x &&
2154   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2155 test "x$ac_build_alias" = x &&
2156   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2157 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2158    { (exit 1); exit 1; }; }
2159 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2160   { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2161 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2162    { (exit 1); exit 1; }; }
2163
2164 fi
2165 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2166 echo "${ECHO_T}$ac_cv_build" >&6; }
2167 case $ac_cv_build in
2168 *-*-*) ;;
2169 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2170 echo "$as_me: error: invalid value of canonical build" >&2;}
2171    { (exit 1); exit 1; }; };;
2172 esac
2173 build=$ac_cv_build
2174 ac_save_IFS=$IFS; IFS='-'
2175 set x $ac_cv_build
2176 shift
2177 build_cpu=$1
2178 build_vendor=$2
2179 shift; shift
2180 # Remember, the first character of IFS is used to create $*,
2181 # except with old shells:
2182 build_os=$*
2183 IFS=$ac_save_IFS
2184 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2185
2186
2187 { echo "$as_me:$LINENO: checking host system type" >&5
2188 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
2189 if test "${ac_cv_host+set}" = set; then
2190   echo $ECHO_N "(cached) $ECHO_C" >&6
2191 else
2192   if test "x$host_alias" = x; then
2193   ac_cv_host=$ac_cv_build
2194 else
2195   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2196     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2197 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2198    { (exit 1); exit 1; }; }
2199 fi
2200
2201 fi
2202 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2203 echo "${ECHO_T}$ac_cv_host" >&6; }
2204 case $ac_cv_host in
2205 *-*-*) ;;
2206 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2207 echo "$as_me: error: invalid value of canonical host" >&2;}
2208    { (exit 1); exit 1; }; };;
2209 esac
2210 host=$ac_cv_host
2211 ac_save_IFS=$IFS; IFS='-'
2212 set x $ac_cv_host
2213 shift
2214 host_cpu=$1
2215 host_vendor=$2
2216 shift; shift
2217 # Remember, the first character of IFS is used to create $*,
2218 # except with old shells:
2219 host_os=$*
2220 IFS=$ac_save_IFS
2221 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2222
2223
2224 { echo "$as_me:$LINENO: checking target system type" >&5
2225 echo $ECHO_N "checking target system type... $ECHO_C" >&6; }
2226 if test "${ac_cv_target+set}" = set; then
2227   echo $ECHO_N "(cached) $ECHO_C" >&6
2228 else
2229   if test "x$target_alias" = x; then
2230   ac_cv_target=$ac_cv_host
2231 else
2232   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2233     { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
2234 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
2235    { (exit 1); exit 1; }; }
2236 fi
2237
2238 fi
2239 { echo "$as_me:$LINENO: result: $ac_cv_target" >&5
2240 echo "${ECHO_T}$ac_cv_target" >&6; }
2241 case $ac_cv_target in
2242 *-*-*) ;;
2243 *) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
2244 echo "$as_me: error: invalid value of canonical target" >&2;}
2245    { (exit 1); exit 1; }; };;
2246 esac
2247 target=$ac_cv_target
2248 ac_save_IFS=$IFS; IFS='-'
2249 set x $ac_cv_target
2250 shift
2251 target_cpu=$1
2252 target_vendor=$2
2253 shift; shift
2254 # Remember, the first character of IFS is used to create $*,
2255 # except with old shells:
2256 target_os=$*
2257 IFS=$ac_save_IFS
2258 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2259
2260
2261 # The aliases save the names the user supplied, while $host etc.
2262 # will get canonicalized.
2263 test -n "$target_alias" &&
2264   test "$program_prefix$program_suffix$program_transform_name" = \
2265     NONENONEs,x,x, &&
2266   program_prefix=${target_alias}-
2267
2268 am__api_version="1.9"
2269 # Find a good install program.  We prefer a C program (faster),
2270 # so one script is as good as another.  But avoid the broken or
2271 # incompatible versions:
2272 # SysV /etc/install, /usr/sbin/install
2273 # SunOS /usr/etc/install
2274 # IRIX /sbin/install
2275 # AIX /bin/install
2276 # AmigaOS /C/install, which installs bootblocks on floppy discs
2277 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2278 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2279 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2280 # OS/2's system install, which has a completely different semantic
2281 # ./install, which can be erroneously created by make from ./install.sh.
2282 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2283 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
2284 if test -z "$INSTALL"; then
2285 if test "${ac_cv_path_install+set}" = set; then
2286   echo $ECHO_N "(cached) $ECHO_C" >&6
2287 else
2288   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2289 for as_dir in $PATH
2290 do
2291   IFS=$as_save_IFS
2292   test -z "$as_dir" && as_dir=.
2293   # Account for people who put trailing slashes in PATH elements.
2294 case $as_dir/ in
2295   ./ | .// | /cC/* | \
2296   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2297   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
2298   /usr/ucb/* ) ;;
2299   *)
2300     # OSF1 and SCO ODT 3.0 have their own names for install.
2301     # Don't use installbsd from OSF since it installs stuff as root
2302     # by default.
2303     for ac_prog in ginstall scoinst install; do
2304       for ac_exec_ext in '' $ac_executable_extensions; do
2305         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2306           if test $ac_prog = install &&
2307             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2308             # AIX install.  It has an incompatible calling convention.
2309             :
2310           elif test $ac_prog = install &&
2311             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2312             # program-specific install script used by HP pwplus--don't use.
2313             :
2314           else
2315             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2316             break 3
2317           fi
2318         fi
2319       done
2320     done
2321     ;;
2322 esac
2323 done
2324 IFS=$as_save_IFS
2325
2326
2327 fi
2328   if test "${ac_cv_path_install+set}" = set; then
2329     INSTALL=$ac_cv_path_install
2330   else
2331     # As a last resort, use the slow shell script.  Don't cache a
2332     # value for INSTALL within a source directory, because that will
2333     # break other packages using the cache if that directory is
2334     # removed, or if the value is a relative name.
2335     INSTALL=$ac_install_sh
2336   fi
2337 fi
2338 { echo "$as_me:$LINENO: result: $INSTALL" >&5
2339 echo "${ECHO_T}$INSTALL" >&6; }
2340
2341 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2342 # It thinks the first close brace ends the variable substitution.
2343 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2344
2345 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2346
2347 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2348
2349 { echo "$as_me:$LINENO: checking whether build environment is sane" >&5
2350 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
2351 # Just in case
2352 sleep 1
2353 echo timestamp > conftest.file
2354 # Do `set' in a subshell so we don't clobber the current shell's
2355 # arguments.  Must try -L first in case configure is actually a
2356 # symlink; some systems play weird games with the mod time of symlinks
2357 # (eg FreeBSD returns the mod time of the symlink's containing
2358 # directory).
2359 if (
2360    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2361    if test "$*" = "X"; then
2362       # -L didn't work.
2363       set X `ls -t $srcdir/configure conftest.file`
2364    fi
2365    rm -f conftest.file
2366    if test "$*" != "X $srcdir/configure conftest.file" \
2367       && test "$*" != "X conftest.file $srcdir/configure"; then
2368
2369       # If neither matched, then we have a broken ls.  This can happen
2370       # if, for instance, CONFIG_SHELL is bash and it inherits a
2371       # broken ls alias from the environment.  This has actually
2372       # happened.  Such a system could not be considered "sane".
2373       { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
2374 alias in your environment" >&5
2375 echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
2376 alias in your environment" >&2;}
2377    { (exit 1); exit 1; }; }
2378    fi
2379
2380    test "$2" = conftest.file
2381    )
2382 then
2383    # Ok.
2384    :
2385 else
2386    { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
2387 Check your system clock" >&5
2388 echo "$as_me: error: newly created file is older than distributed files!
2389 Check your system clock" >&2;}
2390    { (exit 1); exit 1; }; }
2391 fi
2392 { echo "$as_me:$LINENO: result: yes" >&5
2393 echo "${ECHO_T}yes" >&6; }
2394 test "$program_prefix" != NONE &&
2395   program_transform_name="s&^&$program_prefix&;$program_transform_name"
2396 # Use a double $ so make ignores it.
2397 test "$program_suffix" != NONE &&
2398   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2399 # Double any \ or $.  echo might interpret backslashes.
2400 # By default was `s,x,x', remove it if useless.
2401 cat <<\_ACEOF >conftest.sed
2402 s/[\\$]/&&/g;s/;s,x,x,$//
2403 _ACEOF
2404 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2405 rm -f conftest.sed
2406
2407 # expand $ac_aux_dir to an absolute path
2408 am_aux_dir=`cd $ac_aux_dir && pwd`
2409
2410 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2411 # Use eval to expand $SHELL
2412 if eval "$MISSING --run true"; then
2413   am_missing_run="$MISSING --run "
2414 else
2415   am_missing_run=
2416   { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
2417 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
2418 fi
2419
2420 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
2421   # We used to keeping the `.' as first argument, in order to
2422   # allow $(mkdir_p) to be used without argument.  As in
2423   #   $(mkdir_p) $(somedir)
2424   # where $(somedir) is conditionally defined.  However this is wrong
2425   # for two reasons:
2426   #  1. if the package is installed by a user who cannot write `.'
2427   #     make install will fail,
2428   #  2. the above comment should most certainly read
2429   #     $(mkdir_p) $(DESTDIR)$(somedir)
2430   #     so it does not work when $(somedir) is undefined and
2431   #     $(DESTDIR) is not.
2432   #  To support the latter case, we have to write
2433   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
2434   #  so the `.' trick is pointless.
2435   mkdir_p='mkdir -p --'
2436 else
2437   # On NextStep and OpenStep, the `mkdir' command does not
2438   # recognize any option.  It will interpret all options as
2439   # directories to create, and then abort because `.' already
2440   # exists.
2441   for d in ./-p ./--version;
2442   do
2443     test -d $d && rmdir $d
2444   done
2445   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
2446   if test -f "$ac_aux_dir/mkinstalldirs"; then
2447     mkdir_p='$(mkinstalldirs)'
2448   else
2449     mkdir_p='$(install_sh) -d'
2450   fi
2451 fi
2452
2453 for ac_prog in gawk mawk nawk awk
2454 do
2455   # Extract the first word of "$ac_prog", so it can be a program name with args.
2456 set dummy $ac_prog; ac_word=$2
2457 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2458 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2459 if test "${ac_cv_prog_AWK+set}" = set; then
2460   echo $ECHO_N "(cached) $ECHO_C" >&6
2461 else
2462   if test -n "$AWK"; then
2463   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2464 else
2465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2466 for as_dir in $PATH
2467 do
2468   IFS=$as_save_IFS
2469   test -z "$as_dir" && as_dir=.
2470   for ac_exec_ext in '' $ac_executable_extensions; do
2471   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2472     ac_cv_prog_AWK="$ac_prog"
2473     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2474     break 2
2475   fi
2476 done
2477 done
2478 IFS=$as_save_IFS
2479
2480 fi
2481 fi
2482 AWK=$ac_cv_prog_AWK
2483 if test -n "$AWK"; then
2484   { echo "$as_me:$LINENO: result: $AWK" >&5
2485 echo "${ECHO_T}$AWK" >&6; }
2486 else
2487   { echo "$as_me:$LINENO: result: no" >&5
2488 echo "${ECHO_T}no" >&6; }
2489 fi
2490
2491
2492   test -n "$AWK" && break
2493 done
2494
2495 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2496 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
2497 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2498 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
2499   echo $ECHO_N "(cached) $ECHO_C" >&6
2500 else
2501   cat >conftest.make <<\_ACEOF
2502 SHELL = /bin/sh
2503 all:
2504         @echo '@@@%%%=$(MAKE)=@@@%%%'
2505 _ACEOF
2506 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2507 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2508   *@@@%%%=?*=@@@%%%*)
2509     eval ac_cv_prog_make_${ac_make}_set=yes;;
2510   *)
2511     eval ac_cv_prog_make_${ac_make}_set=no;;
2512 esac
2513 rm -f conftest.make
2514 fi
2515 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2516   { echo "$as_me:$LINENO: result: yes" >&5
2517 echo "${ECHO_T}yes" >&6; }
2518   SET_MAKE=
2519 else
2520   { echo "$as_me:$LINENO: result: no" >&5
2521 echo "${ECHO_T}no" >&6; }
2522   SET_MAKE="MAKE=${MAKE-make}"
2523 fi
2524
2525 rm -rf .tst 2>/dev/null
2526 mkdir .tst 2>/dev/null
2527 if test -d .tst; then
2528   am__leading_dot=.
2529 else
2530   am__leading_dot=_
2531 fi
2532 rmdir .tst 2>/dev/null
2533
2534 # test to see if srcdir already configured
2535 if test "`cd $srcdir && pwd`" != "`pwd`" &&
2536    test -f $srcdir/config.status; then
2537   { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
2538 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
2539    { (exit 1); exit 1; }; }
2540 fi
2541
2542 # test whether we have cygpath
2543 if test -z "$CYGPATH_W"; then
2544   if (cygpath --version) >/dev/null 2>/dev/null; then
2545     CYGPATH_W='cygpath -w'
2546   else
2547     CYGPATH_W=echo
2548   fi
2549 fi
2550
2551
2552 # Define the identity of the package.
2553  PACKAGE=$OL_PACKAGE
2554  VERSION=$OL_VERSION
2555
2556
2557 # Some tools Automake needs.
2558
2559 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2560
2561
2562 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2563
2564
2565 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2566
2567
2568 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2569
2570
2571 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2572
2573 install_sh=${install_sh-"$am_aux_dir/install-sh"}
2574
2575 # Installed binaries are usually stripped using `strip' when the user
2576 # run `make install-strip'.  However `strip' might not be the right
2577 # tool to use in cross-compilation environments, therefore Automake
2578 # will honor the `STRIP' environment variable to overrule this program.
2579 if test "$cross_compiling" != no; then
2580   if test -n "$ac_tool_prefix"; then
2581   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2582 set dummy ${ac_tool_prefix}strip; ac_word=$2
2583 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2584 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2585 if test "${ac_cv_prog_STRIP+set}" = set; then
2586   echo $ECHO_N "(cached) $ECHO_C" >&6
2587 else
2588   if test -n "$STRIP"; then
2589   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2590 else
2591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2592 for as_dir in $PATH
2593 do
2594   IFS=$as_save_IFS
2595   test -z "$as_dir" && as_dir=.
2596   for ac_exec_ext in '' $ac_executable_extensions; do
2597   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2598     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2599     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2600     break 2
2601   fi
2602 done
2603 done
2604 IFS=$as_save_IFS
2605
2606 fi
2607 fi
2608 STRIP=$ac_cv_prog_STRIP
2609 if test -n "$STRIP"; then
2610   { echo "$as_me:$LINENO: result: $STRIP" >&5
2611 echo "${ECHO_T}$STRIP" >&6; }
2612 else
2613   { echo "$as_me:$LINENO: result: no" >&5
2614 echo "${ECHO_T}no" >&6; }
2615 fi
2616
2617
2618 fi
2619 if test -z "$ac_cv_prog_STRIP"; then
2620   ac_ct_STRIP=$STRIP
2621   # Extract the first word of "strip", so it can be a program name with args.
2622 set dummy strip; ac_word=$2
2623 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2624 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2625 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2626   echo $ECHO_N "(cached) $ECHO_C" >&6
2627 else
2628   if test -n "$ac_ct_STRIP"; then
2629   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2630 else
2631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2632 for as_dir in $PATH
2633 do
2634   IFS=$as_save_IFS
2635   test -z "$as_dir" && as_dir=.
2636   for ac_exec_ext in '' $ac_executable_extensions; do
2637   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2638     ac_cv_prog_ac_ct_STRIP="strip"
2639     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2640     break 2
2641   fi
2642 done
2643 done
2644 IFS=$as_save_IFS
2645
2646 fi
2647 fi
2648 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2649 if test -n "$ac_ct_STRIP"; then
2650   { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2651 echo "${ECHO_T}$ac_ct_STRIP" >&6; }
2652 else
2653   { echo "$as_me:$LINENO: result: no" >&5
2654 echo "${ECHO_T}no" >&6; }
2655 fi
2656
2657   if test "x$ac_ct_STRIP" = x; then
2658     STRIP=":"
2659   else
2660     case $cross_compiling:$ac_tool_warned in
2661 yes:)
2662 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2663 whose name does not start with the host triplet.  If you think this
2664 configuration is useful to you, please write to autoconf@gnu.org." >&5
2665 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2666 whose name does not start with the host triplet.  If you think this
2667 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2668 ac_tool_warned=yes ;;
2669 esac
2670     STRIP=$ac_ct_STRIP
2671   fi
2672 else
2673   STRIP="$ac_cv_prog_STRIP"
2674 fi
2675
2676 fi
2677 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2678
2679 # We need awk for the "check" target.  The system "awk" is bad on
2680 # some platforms.
2681 # Always define AMTAR for backward compatibility.
2682
2683 AMTAR=${AMTAR-"${am_missing_run}tar"}
2684
2685 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2686
2687
2688
2689
2690
2691 cat >>confdefs.h <<_ACEOF
2692 #define OPENLDAP_PACKAGE "$PACKAGE"
2693 _ACEOF
2694
2695
2696 cat >>confdefs.h <<_ACEOF
2697 #define OPENLDAP_VERSION "$VERSION"
2698 _ACEOF
2699
2700
2701
2702 cat >>confdefs.h <<_ACEOF
2703 #define LDAP_VENDOR_VERSION $OL_API_INC
2704 _ACEOF
2705
2706
2707 cat >>confdefs.h <<_ACEOF
2708 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
2709 _ACEOF
2710
2711
2712 cat >>confdefs.h <<_ACEOF
2713 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
2714 _ACEOF
2715
2716
2717 cat >>confdefs.h <<_ACEOF
2718 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
2719 _ACEOF
2720
2721
2722 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
2723
2724 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
2725
2726 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
2727
2728
2729
2730
2731
2732
2733
2734 ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
2735
2736 ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
2737
2738 ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
2739
2740
2741 { echo "$as_me:$LINENO: checking configure arguments" >&5
2742 echo $ECHO_N "checking configure arguments... $ECHO_C" >&6; }
2743
2744
2745 top_builddir=`pwd`
2746
2747 ldap_subdir="/openldap"
2748
2749
2750 # Check whether --with-subdir was given.
2751 if test "${with_subdir+set}" = set; then
2752   withval=$with_subdir; case "$withval" in
2753         no) ldap_subdir=""
2754                 ;;
2755         yes)
2756                 ;;
2757         /*|\\*)
2758                 ldap_subdir="$withval"
2759                 ;;
2760         *)
2761                 ldap_subdir="/$withval"
2762                 ;;
2763 esac
2764
2765 fi
2766
2767
2768 # OpenLDAP --enable-debug
2769
2770         # Check whether --enable-debug was given.
2771 if test "${enable_debug+set}" = set; then
2772   enableval=$enable_debug;
2773         ol_arg=invalid
2774         for ol_val in no yes traditional ; do
2775                 if test "$enableval" = "$ol_val" ; then
2776                         ol_arg="$ol_val"
2777                 fi
2778         done
2779         if test "$ol_arg" = "invalid" ; then
2780                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-debug" >&5
2781 echo "$as_me: error: bad value $enableval for --enable-debug" >&2;}
2782    { (exit 1); exit 1; }; }
2783         fi
2784         ol_enable_debug="$ol_arg"
2785
2786 else
2787         ol_enable_debug=yes
2788 fi
2789
2790 # end --enable-debug
2791 # OpenLDAP --enable-dynamic
2792
2793         # Check whether --enable-dynamic was given.
2794 if test "${enable_dynamic+set}" = set; then
2795   enableval=$enable_dynamic;
2796         ol_arg=invalid
2797         for ol_val in auto yes no ; do
2798                 if test "$enableval" = "$ol_val" ; then
2799                         ol_arg="$ol_val"
2800                 fi
2801         done
2802         if test "$ol_arg" = "invalid" ; then
2803                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynamic" >&5
2804 echo "$as_me: error: bad value $enableval for --enable-dynamic" >&2;}
2805    { (exit 1); exit 1; }; }
2806         fi
2807         ol_enable_dynamic="$ol_arg"
2808
2809 else
2810         ol_enable_dynamic=no
2811 fi
2812
2813 # end --enable-dynamic
2814 # OpenLDAP --enable-syslog
2815
2816         # Check whether --enable-syslog was given.
2817 if test "${enable_syslog+set}" = set; then
2818   enableval=$enable_syslog;
2819         ol_arg=invalid
2820         for ol_val in auto yes no ; do
2821                 if test "$enableval" = "$ol_val" ; then
2822                         ol_arg="$ol_val"
2823                 fi
2824         done
2825         if test "$ol_arg" = "invalid" ; then
2826                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syslog" >&5
2827 echo "$as_me: error: bad value $enableval for --enable-syslog" >&2;}
2828    { (exit 1); exit 1; }; }
2829         fi
2830         ol_enable_syslog="$ol_arg"
2831
2832 else
2833         ol_enable_syslog=auto
2834 fi
2835
2836 # end --enable-syslog
2837 # OpenLDAP --enable-proctitle
2838
2839         # Check whether --enable-proctitle was given.
2840 if test "${enable_proctitle+set}" = set; then
2841   enableval=$enable_proctitle;
2842         ol_arg=invalid
2843         for ol_val in auto yes no ; do
2844                 if test "$enableval" = "$ol_val" ; then
2845                         ol_arg="$ol_val"
2846                 fi
2847         done
2848         if test "$ol_arg" = "invalid" ; then
2849                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proctitle" >&5
2850 echo "$as_me: error: bad value $enableval for --enable-proctitle" >&2;}
2851    { (exit 1); exit 1; }; }
2852         fi
2853         ol_enable_proctitle="$ol_arg"
2854
2855 else
2856         ol_enable_proctitle=yes
2857 fi
2858
2859 # end --enable-proctitle
2860 ol_enable_referrals=${ol_enable_referrals-no}
2861 # OpenLDAP --enable-ipv6
2862
2863         # Check whether --enable-ipv6 was given.
2864 if test "${enable_ipv6+set}" = set; then
2865   enableval=$enable_ipv6;
2866         ol_arg=invalid
2867         for ol_val in auto yes no ; do
2868                 if test "$enableval" = "$ol_val" ; then
2869                         ol_arg="$ol_val"
2870                 fi
2871         done
2872         if test "$ol_arg" = "invalid" ; then
2873                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ipv6" >&5
2874 echo "$as_me: error: bad value $enableval for --enable-ipv6" >&2;}
2875    { (exit 1); exit 1; }; }
2876         fi
2877         ol_enable_ipv6="$ol_arg"
2878
2879 else
2880         ol_enable_ipv6=auto
2881 fi
2882
2883 # end --enable-ipv6
2884 # OpenLDAP --enable-local
2885
2886         # Check whether --enable-local was given.
2887 if test "${enable_local+set}" = set; then
2888   enableval=$enable_local;
2889         ol_arg=invalid
2890         for ol_val in auto yes no ; do
2891                 if test "$enableval" = "$ol_val" ; then
2892                         ol_arg="$ol_val"
2893                 fi
2894         done
2895         if test "$ol_arg" = "invalid" ; then
2896                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-local" >&5
2897 echo "$as_me: error: bad value $enableval for --enable-local" >&2;}
2898    { (exit 1); exit 1; }; }
2899         fi
2900         ol_enable_local="$ol_arg"
2901
2902 else
2903         ol_enable_local=auto
2904 fi
2905
2906 # end --enable-local
2907
2908 # OpenLDAP --with-cyrus_sasl
2909
2910 # Check whether --with-cyrus_sasl was given.
2911 if test "${with_cyrus_sasl+set}" = set; then
2912   withval=$with_cyrus_sasl;
2913         ol_arg=invalid
2914         for ol_val in auto yes no  ; do
2915                 if test "$withval" = "$ol_val" ; then
2916                         ol_arg="$ol_val"
2917                 fi
2918         done
2919         if test "$ol_arg" = "invalid" ; then
2920                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-cyrus_sasl" >&5
2921 echo "$as_me: error: bad value $withval for --with-cyrus_sasl" >&2;}
2922    { (exit 1); exit 1; }; }
2923         fi
2924         ol_with_cyrus_sasl="$ol_arg"
2925
2926 else
2927         ol_with_cyrus_sasl="auto"
2928 fi
2929 # end --with-cyrus_sasl
2930
2931 # OpenLDAP --with-fetch
2932
2933 # Check whether --with-fetch was given.
2934 if test "${with_fetch+set}" = set; then
2935   withval=$with_fetch;
2936         ol_arg=invalid
2937         for ol_val in auto yes no  ; do
2938                 if test "$withval" = "$ol_val" ; then
2939                         ol_arg="$ol_val"
2940                 fi
2941         done
2942         if test "$ol_arg" = "invalid" ; then
2943                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-fetch" >&5
2944 echo "$as_me: error: bad value $withval for --with-fetch" >&2;}
2945    { (exit 1); exit 1; }; }
2946         fi
2947         ol_with_fetch="$ol_arg"
2948
2949 else
2950         ol_with_fetch="auto"
2951 fi
2952 # end --with-fetch
2953
2954 # OpenLDAP --with-gssapi
2955
2956 # Check whether --with-gssapi was given.
2957 if test "${with_gssapi+set}" = set; then
2958   withval=$with_gssapi;
2959         ol_arg=invalid
2960         for ol_val in auto yes no  ; do
2961                 if test "$withval" = "$ol_val" ; then
2962                         ol_arg="$ol_val"
2963                 fi
2964         done
2965         if test "$ol_arg" = "invalid" ; then
2966                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-gssapi" >&5
2967 echo "$as_me: error: bad value $withval for --with-gssapi" >&2;}
2968    { (exit 1); exit 1; }; }
2969         fi
2970         ol_with_gssapi="$ol_arg"
2971
2972 else
2973         ol_with_gssapi="auto"
2974 fi
2975 # end --with-gssapi
2976
2977 # OpenLDAP --with-threads
2978
2979 # Check whether --with-threads was given.
2980 if test "${with_threads+set}" = set; then
2981   withval=$with_threads;
2982         ol_arg=invalid
2983         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
2984                 if test "$withval" = "$ol_val" ; then
2985                         ol_arg="$ol_val"
2986                 fi
2987         done
2988         if test "$ol_arg" = "invalid" ; then
2989                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-threads" >&5
2990 echo "$as_me: error: bad value $withval for --with-threads" >&2;}
2991    { (exit 1); exit 1; }; }
2992         fi
2993         ol_with_threads="$ol_arg"
2994
2995 else
2996         ol_with_threads="auto"
2997 fi
2998 # end --with-threads
2999
3000 # OpenLDAP --with-tls
3001
3002 # Check whether --with-tls was given.
3003 if test "${with_tls+set}" = set; then
3004   withval=$with_tls;
3005         ol_arg=invalid
3006         for ol_val in auto openssl gnutls yes no  ; do
3007                 if test "$withval" = "$ol_val" ; then
3008                         ol_arg="$ol_val"
3009                 fi
3010         done
3011         if test "$ol_arg" = "invalid" ; then
3012                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-tls" >&5
3013 echo "$as_me: error: bad value $withval for --with-tls" >&2;}
3014    { (exit 1); exit 1; }; }
3015         fi
3016         ol_with_tls="$ol_arg"
3017
3018 else
3019         ol_with_tls="auto"
3020 fi
3021 # end --with-tls
3022
3023 # OpenLDAP --with-yielding_select
3024
3025 # Check whether --with-yielding_select was given.
3026 if test "${with_yielding_select+set}" = set; then
3027   withval=$with_yielding_select;
3028         ol_arg=invalid
3029         for ol_val in auto yes no manual  ; do
3030                 if test "$withval" = "$ol_val" ; then
3031                         ol_arg="$ol_val"
3032                 fi
3033         done
3034         if test "$ol_arg" = "invalid" ; then
3035                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-yielding_select" >&5
3036 echo "$as_me: error: bad value $withval for --with-yielding_select" >&2;}
3037    { (exit 1); exit 1; }; }
3038         fi
3039         ol_with_yielding_select="$ol_arg"
3040
3041 else
3042         ol_with_yielding_select="auto"
3043 fi
3044 # end --with-yielding_select
3045
3046 # OpenLDAP --with-mp
3047
3048 # Check whether --with-mp was given.
3049 if test "${with_mp+set}" = set; then
3050   withval=$with_mp;
3051         ol_arg=invalid
3052         for ol_val in auto longlong long bignum gmp yes no ; do
3053                 if test "$withval" = "$ol_val" ; then
3054                         ol_arg="$ol_val"
3055                 fi
3056         done
3057         if test "$ol_arg" = "invalid" ; then
3058                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-mp" >&5
3059 echo "$as_me: error: bad value $withval for --with-mp" >&2;}
3060    { (exit 1); exit 1; }; }
3061         fi
3062         ol_with_mp="$ol_arg"
3063
3064 else
3065         ol_with_mp="auto"
3066 fi
3067 # end --with-mp
3068
3069 # OpenLDAP --with-odbc
3070
3071 # Check whether --with-odbc was given.
3072 if test "${with_odbc+set}" = set; then
3073   withval=$with_odbc;
3074         ol_arg=invalid
3075         for ol_val in auto iodbc unixodbc odbc32  ; do
3076                 if test "$withval" = "$ol_val" ; then
3077                         ol_arg="$ol_val"
3078                 fi
3079         done
3080         if test "$ol_arg" = "invalid" ; then
3081                 { { echo "$as_me:$LINENO: error: bad value $withval for --with-odbc" >&5
3082 echo "$as_me: error: bad value $withval for --with-odbc" >&2;}
3083    { (exit 1); exit 1; }; }
3084         fi
3085         ol_with_odbc="$ol_arg"
3086
3087 else
3088         ol_with_odbc="auto"
3089 fi
3090 # end --with-odbc
3091
3092
3093
3094 # Check whether --enable-xxslapdoptions was given.
3095 if test "${enable_xxslapdoptions+set}" = set; then
3096   enableval=$enable_xxslapdoptions;
3097 fi
3098
3099 # OpenLDAP --enable-slapd
3100
3101         # Check whether --enable-slapd was given.
3102 if test "${enable_slapd+set}" = set; then
3103   enableval=$enable_slapd;
3104         ol_arg=invalid
3105         for ol_val in auto yes no ; do
3106                 if test "$enableval" = "$ol_val" ; then
3107                         ol_arg="$ol_val"
3108                 fi
3109         done
3110         if test "$ol_arg" = "invalid" ; then
3111                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapd" >&5
3112 echo "$as_me: error: bad value $enableval for --enable-slapd" >&2;}
3113    { (exit 1); exit 1; }; }
3114         fi
3115         ol_enable_slapd="$ol_arg"
3116
3117 else
3118         ol_enable_slapd=yes
3119 fi
3120
3121 # end --enable-slapd
3122 # OpenLDAP --enable-dynacl
3123
3124         # Check whether --enable-dynacl was given.
3125 if test "${enable_dynacl+set}" = set; then
3126   enableval=$enable_dynacl;
3127         ol_arg=invalid
3128         for ol_val in auto yes no ; do
3129                 if test "$enableval" = "$ol_val" ; then
3130                         ol_arg="$ol_val"
3131                 fi
3132         done
3133         if test "$ol_arg" = "invalid" ; then
3134                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynacl" >&5
3135 echo "$as_me: error: bad value $enableval for --enable-dynacl" >&2;}
3136    { (exit 1); exit 1; }; }
3137         fi
3138         ol_enable_dynacl="$ol_arg"
3139
3140 else
3141         ol_enable_dynacl=no
3142 fi
3143
3144 # end --enable-dynacl
3145 # OpenLDAP --enable-aci
3146
3147         # Check whether --enable-aci was given.
3148 if test "${enable_aci+set}" = set; then
3149   enableval=$enable_aci;
3150         ol_arg=invalid
3151         for ol_val in no yes mod ; do
3152                 if test "$enableval" = "$ol_val" ; then
3153                         ol_arg="$ol_val"
3154                 fi
3155         done
3156         if test "$ol_arg" = "invalid" ; then
3157                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-aci" >&5
3158 echo "$as_me: error: bad value $enableval for --enable-aci" >&2;}
3159    { (exit 1); exit 1; }; }
3160         fi
3161         ol_enable_aci="$ol_arg"
3162
3163 else
3164         ol_enable_aci=no
3165 fi
3166
3167 # end --enable-aci
3168 # OpenLDAP --enable-cleartext
3169
3170         # Check whether --enable-cleartext was given.
3171 if test "${enable_cleartext+set}" = set; then
3172   enableval=$enable_cleartext;
3173         ol_arg=invalid
3174         for ol_val in auto yes no ; do
3175                 if test "$enableval" = "$ol_val" ; then
3176                         ol_arg="$ol_val"
3177                 fi
3178         done
3179         if test "$ol_arg" = "invalid" ; then
3180                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-cleartext" >&5
3181 echo "$as_me: error: bad value $enableval for --enable-cleartext" >&2;}
3182    { (exit 1); exit 1; }; }
3183         fi
3184         ol_enable_cleartext="$ol_arg"
3185
3186 else
3187         ol_enable_cleartext=yes
3188 fi
3189
3190 # end --enable-cleartext
3191 # OpenLDAP --enable-crypt
3192
3193         # Check whether --enable-crypt was given.
3194 if test "${enable_crypt+set}" = set; then
3195   enableval=$enable_crypt;
3196         ol_arg=invalid
3197         for ol_val in auto yes no ; do
3198                 if test "$enableval" = "$ol_val" ; then
3199                         ol_arg="$ol_val"
3200                 fi
3201         done
3202         if test "$ol_arg" = "invalid" ; then
3203                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-crypt" >&5
3204 echo "$as_me: error: bad value $enableval for --enable-crypt" >&2;}
3205    { (exit 1); exit 1; }; }
3206         fi
3207         ol_enable_crypt="$ol_arg"
3208
3209 else
3210         ol_enable_crypt=no
3211 fi
3212
3213 # end --enable-crypt
3214 # OpenLDAP --enable-lmpasswd
3215
3216         # Check whether --enable-lmpasswd was given.
3217 if test "${enable_lmpasswd+set}" = set; then
3218   enableval=$enable_lmpasswd;
3219         ol_arg=invalid
3220         for ol_val in auto yes no ; do
3221                 if test "$enableval" = "$ol_val" ; then
3222                         ol_arg="$ol_val"
3223                 fi
3224         done
3225         if test "$ol_arg" = "invalid" ; then
3226                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-lmpasswd" >&5
3227 echo "$as_me: error: bad value $enableval for --enable-lmpasswd" >&2;}
3228    { (exit 1); exit 1; }; }
3229         fi
3230         ol_enable_lmpasswd="$ol_arg"
3231
3232 else
3233         ol_enable_lmpasswd=no
3234 fi
3235
3236 # end --enable-lmpasswd
3237 # OpenLDAP --enable-spasswd
3238
3239         # Check whether --enable-spasswd was given.
3240 if test "${enable_spasswd+set}" = set; then
3241   enableval=$enable_spasswd;
3242         ol_arg=invalid
3243         for ol_val in auto yes no ; do
3244                 if test "$enableval" = "$ol_val" ; then
3245                         ol_arg="$ol_val"
3246                 fi
3247         done
3248         if test "$ol_arg" = "invalid" ; then
3249                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-spasswd" >&5
3250 echo "$as_me: error: bad value $enableval for --enable-spasswd" >&2;}
3251    { (exit 1); exit 1; }; }
3252         fi
3253         ol_enable_spasswd="$ol_arg"
3254
3255 else
3256         ol_enable_spasswd=no
3257 fi
3258
3259 # end --enable-spasswd
3260 # OpenLDAP --enable-modules
3261
3262         # Check whether --enable-modules was given.
3263 if test "${enable_modules+set}" = set; then
3264   enableval=$enable_modules;
3265         ol_arg=invalid
3266         for ol_val in auto yes no ; do
3267                 if test "$enableval" = "$ol_val" ; then
3268                         ol_arg="$ol_val"
3269                 fi
3270         done
3271         if test "$ol_arg" = "invalid" ; then
3272                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-modules" >&5
3273 echo "$as_me: error: bad value $enableval for --enable-modules" >&2;}
3274    { (exit 1); exit 1; }; }
3275         fi
3276         ol_enable_modules="$ol_arg"
3277
3278 else
3279         ol_enable_modules=no
3280 fi
3281
3282 # end --enable-modules
3283 # OpenLDAP --enable-rewrite
3284
3285         # Check whether --enable-rewrite was given.
3286 if test "${enable_rewrite+set}" = set; then
3287   enableval=$enable_rewrite;
3288         ol_arg=invalid
3289         for ol_val in auto yes no ; do
3290                 if test "$enableval" = "$ol_val" ; then
3291                         ol_arg="$ol_val"
3292                 fi
3293         done
3294         if test "$ol_arg" = "invalid" ; then
3295                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rewrite" >&5
3296 echo "$as_me: error: bad value $enableval for --enable-rewrite" >&2;}
3297    { (exit 1); exit 1; }; }
3298         fi
3299         ol_enable_rewrite="$ol_arg"
3300
3301 else
3302         ol_enable_rewrite=auto
3303 fi
3304
3305 # end --enable-rewrite
3306 # OpenLDAP --enable-rlookups
3307
3308         # Check whether --enable-rlookups was given.
3309 if test "${enable_rlookups+set}" = set; then
3310   enableval=$enable_rlookups;
3311         ol_arg=invalid
3312         for ol_val in auto yes no ; do
3313                 if test "$enableval" = "$ol_val" ; then
3314                         ol_arg="$ol_val"
3315                 fi
3316         done
3317         if test "$ol_arg" = "invalid" ; then
3318                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rlookups" >&5
3319 echo "$as_me: error: bad value $enableval for --enable-rlookups" >&2;}
3320    { (exit 1); exit 1; }; }
3321         fi
3322         ol_enable_rlookups="$ol_arg"
3323
3324 else
3325         ol_enable_rlookups=no
3326 fi
3327
3328 # end --enable-rlookups
3329 # OpenLDAP --enable-slapi
3330
3331         # Check whether --enable-slapi was given.
3332 if test "${enable_slapi+set}" = set; then
3333   enableval=$enable_slapi;
3334         ol_arg=invalid
3335         for ol_val in auto yes no ; do
3336                 if test "$enableval" = "$ol_val" ; then
3337                         ol_arg="$ol_val"
3338                 fi
3339         done
3340         if test "$ol_arg" = "invalid" ; then
3341                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slapi" >&5
3342 echo "$as_me: error: bad value $enableval for --enable-slapi" >&2;}
3343    { (exit 1); exit 1; }; }
3344         fi
3345         ol_enable_slapi="$ol_arg"
3346
3347 else
3348         ol_enable_slapi=no
3349 fi
3350
3351 # end --enable-slapi
3352 # OpenLDAP --enable-slp
3353
3354         # Check whether --enable-slp was given.
3355 if test "${enable_slp+set}" = set; then
3356   enableval=$enable_slp;
3357         ol_arg=invalid
3358         for ol_val in auto yes no ; do
3359                 if test "$enableval" = "$ol_val" ; then
3360                         ol_arg="$ol_val"
3361                 fi
3362         done
3363         if test "$ol_arg" = "invalid" ; then
3364                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-slp" >&5
3365 echo "$as_me: error: bad value $enableval for --enable-slp" >&2;}
3366    { (exit 1); exit 1; }; }
3367         fi
3368         ol_enable_slp="$ol_arg"
3369
3370 else
3371         ol_enable_slp=no
3372 fi
3373
3374 # end --enable-slp
3375 # OpenLDAP --enable-wrappers
3376
3377         # Check whether --enable-wrappers was given.
3378 if test "${enable_wrappers+set}" = set; then
3379   enableval=$enable_wrappers;
3380         ol_arg=invalid
3381         for ol_val in auto yes no ; do
3382                 if test "$enableval" = "$ol_val" ; then
3383                         ol_arg="$ol_val"
3384                 fi
3385         done
3386         if test "$ol_arg" = "invalid" ; then
3387                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-wrappers" >&5
3388 echo "$as_me: error: bad value $enableval for --enable-wrappers" >&2;}
3389    { (exit 1); exit 1; }; }
3390         fi
3391         ol_enable_wrappers="$ol_arg"
3392
3393 else
3394         ol_enable_wrappers=no
3395 fi
3396
3397 # end --enable-wrappers
3398
3399 Backends="bdb \
3400         dnssrv \
3401         hdb \
3402         ldap \
3403         meta \
3404         monitor \
3405         ndb \
3406         null \
3407         passwd \
3408         perl \
3409         relay \
3410         shell \
3411         sock \
3412         sql"
3413
3414 # Check whether --enable-xxslapbackends was given.
3415 if test "${enable_xxslapbackends+set}" = set; then
3416   enableval=$enable_xxslapbackends;
3417 fi
3418
3419
3420 # OpenLDAP --enable-backends
3421
3422         # Check whether --enable-backends was given.
3423 if test "${enable_backends+set}" = set; then
3424   enableval=$enable_backends;
3425         ol_arg=invalid
3426         for ol_val in no yes mod ; do
3427                 if test "$enableval" = "$ol_val" ; then
3428                         ol_arg="$ol_val"
3429                 fi
3430         done
3431         if test "$ol_arg" = "invalid" ; then
3432                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-backends" >&5
3433 echo "$as_me: error: bad value $enableval for --enable-backends" >&2;}
3434    { (exit 1); exit 1; }; }
3435         fi
3436         ol_enable_backends="$ol_arg"
3437
3438 fi
3439
3440 # end --enable-backends
3441 # OpenLDAP --enable-bdb
3442
3443         # Check whether --enable-bdb was given.
3444 if test "${enable_bdb+set}" = set; then
3445   enableval=$enable_bdb;
3446         ol_arg=invalid
3447         for ol_val in no yes mod ; do
3448                 if test "$enableval" = "$ol_val" ; then
3449                         ol_arg="$ol_val"
3450                 fi
3451         done
3452         if test "$ol_arg" = "invalid" ; then
3453                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-bdb" >&5
3454 echo "$as_me: error: bad value $enableval for --enable-bdb" >&2;}
3455    { (exit 1); exit 1; }; }
3456         fi
3457         ol_enable_bdb="$ol_arg"
3458
3459 else
3460         ol_enable_bdb=${ol_enable_backends:-no}
3461 fi
3462
3463 # end --enable-bdb
3464 # OpenLDAP --enable-dnssrv
3465
3466         # Check whether --enable-dnssrv was given.
3467 if test "${enable_dnssrv+set}" = set; then
3468   enableval=$enable_dnssrv;
3469         ol_arg=invalid
3470         for ol_val in no yes mod ; do
3471                 if test "$enableval" = "$ol_val" ; then
3472                         ol_arg="$ol_val"
3473                 fi
3474         done
3475         if test "$ol_arg" = "invalid" ; then
3476                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dnssrv" >&5
3477 echo "$as_me: error: bad value $enableval for --enable-dnssrv" >&2;}
3478    { (exit 1); exit 1; }; }
3479         fi
3480         ol_enable_dnssrv="$ol_arg"
3481
3482 else
3483         ol_enable_dnssrv=${ol_enable_backends:-no}
3484 fi
3485
3486 # end --enable-dnssrv
3487 # OpenLDAP --enable-hdb
3488
3489         # Check whether --enable-hdb was given.
3490 if test "${enable_hdb+set}" = set; then
3491   enableval=$enable_hdb;
3492         ol_arg=invalid
3493         for ol_val in no yes mod ; do
3494                 if test "$enableval" = "$ol_val" ; then
3495                         ol_arg="$ol_val"
3496                 fi
3497         done
3498         if test "$ol_arg" = "invalid" ; then
3499                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-hdb" >&5
3500 echo "$as_me: error: bad value $enableval for --enable-hdb" >&2;}
3501    { (exit 1); exit 1; }; }
3502         fi
3503         ol_enable_hdb="$ol_arg"
3504
3505 else
3506         ol_enable_hdb=${ol_enable_backends:-yes}
3507 fi
3508
3509 # end --enable-hdb
3510 # OpenLDAP --enable-ldap
3511
3512         # Check whether --enable-ldap was given.
3513 if test "${enable_ldap+set}" = set; then
3514   enableval=$enable_ldap;
3515         ol_arg=invalid
3516         for ol_val in no yes mod ; do
3517                 if test "$enableval" = "$ol_val" ; then
3518                         ol_arg="$ol_val"
3519                 fi
3520         done
3521         if test "$ol_arg" = "invalid" ; then
3522                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ldap" >&5
3523 echo "$as_me: error: bad value $enableval for --enable-ldap" >&2;}
3524    { (exit 1); exit 1; }; }
3525         fi
3526         ol_enable_ldap="$ol_arg"
3527
3528 else
3529         ol_enable_ldap=${ol_enable_backends:-no}
3530 fi
3531
3532 # end --enable-ldap
3533 # OpenLDAP --enable-meta
3534
3535         # Check whether --enable-meta was given.
3536 if test "${enable_meta+set}" = set; then
3537   enableval=$enable_meta;
3538         ol_arg=invalid
3539         for ol_val in no yes mod ; do
3540                 if test "$enableval" = "$ol_val" ; then
3541                         ol_arg="$ol_val"
3542                 fi
3543         done
3544         if test "$ol_arg" = "invalid" ; then
3545                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-meta" >&5
3546 echo "$as_me: error: bad value $enableval for --enable-meta" >&2;}
3547    { (exit 1); exit 1; }; }
3548         fi
3549         ol_enable_meta="$ol_arg"
3550
3551 else
3552         ol_enable_meta=${ol_enable_backends:-no}
3553 fi
3554
3555 # end --enable-meta
3556 # OpenLDAP --enable-monitor
3557
3558         # Check whether --enable-monitor was given.
3559 if test "${enable_monitor+set}" = set; then
3560   enableval=$enable_monitor;
3561         ol_arg=invalid
3562         for ol_val in no yes mod ; do
3563                 if test "$enableval" = "$ol_val" ; then
3564                         ol_arg="$ol_val"
3565                 fi
3566         done
3567         if test "$ol_arg" = "invalid" ; then
3568                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-monitor" >&5
3569 echo "$as_me: error: bad value $enableval for --enable-monitor" >&2;}
3570    { (exit 1); exit 1; }; }
3571         fi
3572         ol_enable_monitor="$ol_arg"
3573
3574 else
3575         ol_enable_monitor=${ol_enable_backends:-yes}
3576 fi
3577
3578 # end --enable-monitor
3579 # OpenLDAP --enable-ndb
3580
3581         # Check whether --enable-ndb was given.
3582 if test "${enable_ndb+set}" = set; then
3583   enableval=$enable_ndb;
3584         ol_arg=invalid
3585         for ol_val in no yes mod ; do
3586                 if test "$enableval" = "$ol_val" ; then
3587                         ol_arg="$ol_val"
3588                 fi
3589         done
3590         if test "$ol_arg" = "invalid" ; then
3591                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ndb" >&5
3592 echo "$as_me: error: bad value $enableval for --enable-ndb" >&2;}
3593    { (exit 1); exit 1; }; }
3594         fi
3595         ol_enable_ndb="$ol_arg"
3596
3597 else
3598         ol_enable_ndb=${ol_enable_backends:-no}
3599 fi
3600
3601 # end --enable-ndb
3602 # OpenLDAP --enable-null
3603
3604         # Check whether --enable-null was given.
3605 if test "${enable_null+set}" = set; then
3606   enableval=$enable_null;
3607         ol_arg=invalid
3608         for ol_val in no yes mod ; do
3609                 if test "$enableval" = "$ol_val" ; then
3610                         ol_arg="$ol_val"
3611                 fi
3612         done
3613         if test "$ol_arg" = "invalid" ; then
3614                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-null" >&5
3615 echo "$as_me: error: bad value $enableval for --enable-null" >&2;}
3616    { (exit 1); exit 1; }; }
3617         fi
3618         ol_enable_null="$ol_arg"
3619
3620 else
3621         ol_enable_null=${ol_enable_backends:-no}
3622 fi
3623
3624 # end --enable-null
3625 # OpenLDAP --enable-passwd
3626
3627         # Check whether --enable-passwd was given.
3628 if test "${enable_passwd+set}" = set; then
3629   enableval=$enable_passwd;
3630         ol_arg=invalid
3631         for ol_val in no yes mod ; do
3632                 if test "$enableval" = "$ol_val" ; then
3633                         ol_arg="$ol_val"
3634                 fi
3635         done
3636         if test "$ol_arg" = "invalid" ; then
3637                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-passwd" >&5
3638 echo "$as_me: error: bad value $enableval for --enable-passwd" >&2;}
3639    { (exit 1); exit 1; }; }
3640         fi
3641         ol_enable_passwd="$ol_arg"
3642
3643 else
3644         ol_enable_passwd=${ol_enable_backends:-no}
3645 fi
3646
3647 # end --enable-passwd
3648 # OpenLDAP --enable-perl
3649
3650         # Check whether --enable-perl was given.
3651 if test "${enable_perl+set}" = set; then
3652   enableval=$enable_perl;
3653         ol_arg=invalid
3654         for ol_val in no yes mod ; do
3655                 if test "$enableval" = "$ol_val" ; then
3656                         ol_arg="$ol_val"
3657                 fi
3658         done
3659         if test "$ol_arg" = "invalid" ; then
3660                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-perl" >&5
3661 echo "$as_me: error: bad value $enableval for --enable-perl" >&2;}
3662    { (exit 1); exit 1; }; }
3663         fi
3664         ol_enable_perl="$ol_arg"
3665
3666 else
3667         ol_enable_perl=${ol_enable_backends:-no}
3668 fi
3669
3670 # end --enable-perl
3671 # OpenLDAP --enable-relay
3672
3673         # Check whether --enable-relay was given.
3674 if test "${enable_relay+set}" = set; then
3675   enableval=$enable_relay;
3676         ol_arg=invalid
3677         for ol_val in no yes mod ; do
3678                 if test "$enableval" = "$ol_val" ; then
3679                         ol_arg="$ol_val"
3680                 fi
3681         done
3682         if test "$ol_arg" = "invalid" ; then
3683                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-relay" >&5
3684 echo "$as_me: error: bad value $enableval for --enable-relay" >&2;}
3685    { (exit 1); exit 1; }; }
3686         fi
3687         ol_enable_relay="$ol_arg"
3688
3689 else
3690         ol_enable_relay=${ol_enable_backends:-yes}
3691 fi
3692
3693 # end --enable-relay
3694 # OpenLDAP --enable-shell
3695
3696         # Check whether --enable-shell was given.
3697 if test "${enable_shell+set}" = set; then
3698   enableval=$enable_shell;
3699         ol_arg=invalid
3700         for ol_val in no yes mod ; do
3701                 if test "$enableval" = "$ol_val" ; then
3702                         ol_arg="$ol_val"
3703                 fi
3704         done
3705         if test "$ol_arg" = "invalid" ; then
3706                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-shell" >&5
3707 echo "$as_me: error: bad value $enableval for --enable-shell" >&2;}
3708    { (exit 1); exit 1; }; }
3709         fi
3710         ol_enable_shell="$ol_arg"
3711
3712 else
3713         ol_enable_shell=${ol_enable_backends:-no}
3714 fi
3715
3716 # end --enable-shell
3717 # OpenLDAP --enable-sock
3718
3719         # Check whether --enable-sock was given.
3720 if test "${enable_sock+set}" = set; then
3721   enableval=$enable_sock;
3722         ol_arg=invalid
3723         for ol_val in no yes mod ; do
3724                 if test "$enableval" = "$ol_val" ; then
3725                         ol_arg="$ol_val"
3726                 fi
3727         done
3728         if test "$ol_arg" = "invalid" ; then
3729                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sock" >&5
3730 echo "$as_me: error: bad value $enableval for --enable-sock" >&2;}
3731    { (exit 1); exit 1; }; }
3732         fi
3733         ol_enable_sock="$ol_arg"
3734
3735 else
3736         ol_enable_sock=${ol_enable_backends:-no}
3737 fi
3738
3739 # end --enable-sock
3740 # OpenLDAP --enable-sql
3741
3742         # Check whether --enable-sql was given.
3743 if test "${enable_sql+set}" = set; then
3744   enableval=$enable_sql;
3745         ol_arg=invalid
3746         for ol_val in no yes mod ; do
3747                 if test "$enableval" = "$ol_val" ; then
3748                         ol_arg="$ol_val"
3749                 fi
3750         done
3751         if test "$ol_arg" = "invalid" ; then
3752                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-sql" >&5
3753 echo "$as_me: error: bad value $enableval for --enable-sql" >&2;}
3754    { (exit 1); exit 1; }; }
3755         fi
3756         ol_enable_sql="$ol_arg"
3757
3758 else
3759         ol_enable_sql=${ol_enable_backends:-no}
3760 fi
3761
3762 # end --enable-sql
3763
3764 Overlays="accesslog \
3765         auditlog \
3766         collect \
3767         constraint \
3768         dds \
3769         deref \
3770         dyngroup \
3771         dynlist \
3772         memberof \
3773         ppolicy \
3774         proxycache \
3775         refint \
3776         retcode \
3777         rwm \
3778         seqmod \
3779         syncprov \
3780         translucent \
3781         unique \
3782         valsort"
3783
3784 # Check whether --enable-xxslapoverlays was given.
3785 if test "${enable_xxslapoverlays+set}" = set; then
3786   enableval=$enable_xxslapoverlays;
3787 fi
3788
3789
3790 # OpenLDAP --enable-overlays
3791
3792         # Check whether --enable-overlays was given.
3793 if test "${enable_overlays+set}" = set; then
3794   enableval=$enable_overlays;
3795         ol_arg=invalid
3796         for ol_val in no yes mod ; do
3797                 if test "$enableval" = "$ol_val" ; then
3798                         ol_arg="$ol_val"
3799                 fi
3800         done
3801         if test "$ol_arg" = "invalid" ; then
3802                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-overlays" >&5
3803 echo "$as_me: error: bad value $enableval for --enable-overlays" >&2;}
3804    { (exit 1); exit 1; }; }
3805         fi
3806         ol_enable_overlays="$ol_arg"
3807
3808 fi
3809
3810 # end --enable-overlays
3811 # OpenLDAP --enable-accesslog
3812
3813         # Check whether --enable-accesslog was given.
3814 if test "${enable_accesslog+set}" = set; then
3815   enableval=$enable_accesslog;
3816         ol_arg=invalid
3817         for ol_val in no yes mod ; do
3818                 if test "$enableval" = "$ol_val" ; then
3819                         ol_arg="$ol_val"
3820                 fi
3821         done
3822         if test "$ol_arg" = "invalid" ; then
3823                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-accesslog" >&5
3824 echo "$as_me: error: bad value $enableval for --enable-accesslog" >&2;}
3825    { (exit 1); exit 1; }; }
3826         fi
3827         ol_enable_accesslog="$ol_arg"
3828
3829 else
3830         ol_enable_accesslog=${ol_enable_overlays:-no}
3831 fi
3832
3833 # end --enable-accesslog
3834
3835 # OpenLDAP --enable-auditlog
3836
3837         # Check whether --enable-auditlog was given.
3838 if test "${enable_auditlog+set}" = set; then
3839   enableval=$enable_auditlog;
3840         ol_arg=invalid
3841         for ol_val in no yes mod ; do
3842                 if test "$enableval" = "$ol_val" ; then
3843                         ol_arg="$ol_val"
3844                 fi
3845         done
3846         if test "$ol_arg" = "invalid" ; then
3847                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-auditlog" >&5
3848 echo "$as_me: error: bad value $enableval for --enable-auditlog" >&2;}
3849    { (exit 1); exit 1; }; }
3850         fi
3851         ol_enable_auditlog="$ol_arg"
3852
3853 else
3854         ol_enable_auditlog=${ol_enable_overlays:-no}
3855 fi
3856
3857 # end --enable-auditlog
3858
3859 # OpenLDAP --enable-collect
3860
3861         # Check whether --enable-collect was given.
3862 if test "${enable_collect+set}" = set; then
3863   enableval=$enable_collect;
3864         ol_arg=invalid
3865         for ol_val in no yes mod ; do
3866                 if test "$enableval" = "$ol_val" ; then
3867                         ol_arg="$ol_val"
3868                 fi
3869         done
3870         if test "$ol_arg" = "invalid" ; then
3871                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-collect" >&5
3872 echo "$as_me: error: bad value $enableval for --enable-collect" >&2;}
3873    { (exit 1); exit 1; }; }
3874         fi
3875         ol_enable_collect="$ol_arg"
3876
3877 else
3878         ol_enable_collect=${ol_enable_overlays:-no}
3879 fi
3880
3881 # end --enable-collect
3882
3883 # OpenLDAP --enable-constraint
3884
3885         # Check whether --enable-constraint was given.
3886 if test "${enable_constraint+set}" = set; then
3887   enableval=$enable_constraint;
3888         ol_arg=invalid
3889         for ol_val in no yes mod ; do
3890                 if test "$enableval" = "$ol_val" ; then
3891                         ol_arg="$ol_val"
3892                 fi
3893         done
3894         if test "$ol_arg" = "invalid" ; then
3895                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-constraint" >&5
3896 echo "$as_me: error: bad value $enableval for --enable-constraint" >&2;}
3897    { (exit 1); exit 1; }; }
3898         fi
3899         ol_enable_constraint="$ol_arg"
3900
3901 else
3902         ol_enable_constraint=${ol_enable_overlays:-no}
3903 fi
3904
3905 # end --enable-constraint
3906
3907 # OpenLDAP --enable-dds
3908
3909         # Check whether --enable-dds was given.
3910 if test "${enable_dds+set}" = set; then
3911   enableval=$enable_dds;
3912         ol_arg=invalid
3913         for ol_val in no yes mod ; do
3914                 if test "$enableval" = "$ol_val" ; then
3915                         ol_arg="$ol_val"
3916                 fi
3917         done
3918         if test "$ol_arg" = "invalid" ; then
3919                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dds" >&5
3920 echo "$as_me: error: bad value $enableval for --enable-dds" >&2;}
3921    { (exit 1); exit 1; }; }
3922         fi
3923         ol_enable_dds="$ol_arg"
3924
3925 else
3926         ol_enable_dds=${ol_enable_overlays:-no}
3927 fi
3928
3929 # end --enable-dds
3930
3931 # OpenLDAP --enable-deref
3932
3933         # Check whether --enable-deref was given.
3934 if test "${enable_deref+set}" = set; then
3935   enableval=$enable_deref;
3936         ol_arg=invalid
3937         for ol_val in no yes mod ; do
3938                 if test "$enableval" = "$ol_val" ; then
3939                         ol_arg="$ol_val"
3940                 fi
3941         done
3942         if test "$ol_arg" = "invalid" ; then
3943                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-deref" >&5
3944 echo "$as_me: error: bad value $enableval for --enable-deref" >&2;}
3945    { (exit 1); exit 1; }; }
3946         fi
3947         ol_enable_deref="$ol_arg"
3948
3949 else
3950         ol_enable_deref=${ol_enable_overlays:-no}
3951 fi
3952
3953 # end --enable-deref
3954
3955 # OpenLDAP --enable-dyngroup
3956
3957         # Check whether --enable-dyngroup was given.
3958 if test "${enable_dyngroup+set}" = set; then
3959   enableval=$enable_dyngroup;
3960         ol_arg=invalid
3961         for ol_val in no yes mod ; do
3962                 if test "$enableval" = "$ol_val" ; then
3963                         ol_arg="$ol_val"
3964                 fi
3965         done
3966         if test "$ol_arg" = "invalid" ; then
3967                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dyngroup" >&5
3968 echo "$as_me: error: bad value $enableval for --enable-dyngroup" >&2;}
3969    { (exit 1); exit 1; }; }
3970         fi
3971         ol_enable_dyngroup="$ol_arg"
3972
3973 else
3974         ol_enable_dyngroup=${ol_enable_overlays:-no}
3975 fi
3976
3977 # end --enable-dyngroup
3978
3979 # OpenLDAP --enable-dynlist
3980
3981         # Check whether --enable-dynlist was given.
3982 if test "${enable_dynlist+set}" = set; then
3983   enableval=$enable_dynlist;
3984         ol_arg=invalid
3985         for ol_val in no yes mod ; do
3986                 if test "$enableval" = "$ol_val" ; then
3987                         ol_arg="$ol_val"
3988                 fi
3989         done
3990         if test "$ol_arg" = "invalid" ; then
3991                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-dynlist" >&5
3992 echo "$as_me: error: bad value $enableval for --enable-dynlist" >&2;}
3993    { (exit 1); exit 1; }; }
3994         fi
3995         ol_enable_dynlist="$ol_arg"
3996
3997 else
3998         ol_enable_dynlist=${ol_enable_overlays:-no}
3999 fi
4000
4001 # end --enable-dynlist
4002
4003 # OpenLDAP --enable-memberof
4004
4005         # Check whether --enable-memberof was given.
4006 if test "${enable_memberof+set}" = set; then
4007   enableval=$enable_memberof;
4008         ol_arg=invalid
4009         for ol_val in no yes mod ; do
4010                 if test "$enableval" = "$ol_val" ; then
4011                         ol_arg="$ol_val"
4012                 fi
4013         done
4014         if test "$ol_arg" = "invalid" ; then
4015                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-memberof" >&5
4016 echo "$as_me: error: bad value $enableval for --enable-memberof" >&2;}
4017    { (exit 1); exit 1; }; }
4018         fi
4019         ol_enable_memberof="$ol_arg"
4020
4021 else
4022         ol_enable_memberof=${ol_enable_overlays:-no}
4023 fi
4024
4025 # end --enable-memberof
4026
4027 # OpenLDAP --enable-ppolicy
4028
4029         # Check whether --enable-ppolicy was given.
4030 if test "${enable_ppolicy+set}" = set; then
4031   enableval=$enable_ppolicy;
4032         ol_arg=invalid
4033         for ol_val in no yes mod ; do
4034                 if test "$enableval" = "$ol_val" ; then
4035                         ol_arg="$ol_val"
4036                 fi
4037         done
4038         if test "$ol_arg" = "invalid" ; then
4039                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-ppolicy" >&5
4040 echo "$as_me: error: bad value $enableval for --enable-ppolicy" >&2;}
4041    { (exit 1); exit 1; }; }
4042         fi
4043         ol_enable_ppolicy="$ol_arg"
4044
4045 else
4046         ol_enable_ppolicy=${ol_enable_overlays:-no}
4047 fi
4048
4049 # end --enable-ppolicy
4050
4051 # OpenLDAP --enable-proxycache
4052
4053         # Check whether --enable-proxycache was given.
4054 if test "${enable_proxycache+set}" = set; then
4055   enableval=$enable_proxycache;
4056         ol_arg=invalid
4057         for ol_val in no yes mod ; do
4058                 if test "$enableval" = "$ol_val" ; then
4059                         ol_arg="$ol_val"
4060                 fi
4061         done
4062         if test "$ol_arg" = "invalid" ; then
4063                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-proxycache" >&5
4064 echo "$as_me: error: bad value $enableval for --enable-proxycache" >&2;}
4065    { (exit 1); exit 1; }; }
4066         fi
4067         ol_enable_proxycache="$ol_arg"
4068
4069 else
4070         ol_enable_proxycache=${ol_enable_overlays:-no}
4071 fi
4072
4073 # end --enable-proxycache
4074
4075 # OpenLDAP --enable-refint
4076
4077         # Check whether --enable-refint was given.
4078 if test "${enable_refint+set}" = set; then
4079   enableval=$enable_refint;
4080         ol_arg=invalid
4081         for ol_val in no yes mod ; do
4082                 if test "$enableval" = "$ol_val" ; then
4083                         ol_arg="$ol_val"
4084                 fi
4085         done
4086         if test "$ol_arg" = "invalid" ; then
4087                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-refint" >&5
4088 echo "$as_me: error: bad value $enableval for --enable-refint" >&2;}
4089    { (exit 1); exit 1; }; }
4090         fi
4091         ol_enable_refint="$ol_arg"
4092
4093 else
4094         ol_enable_refint=${ol_enable_overlays:-no}
4095 fi
4096
4097 # end --enable-refint
4098
4099 # OpenLDAP --enable-retcode
4100
4101         # Check whether --enable-retcode was given.
4102 if test "${enable_retcode+set}" = set; then
4103   enableval=$enable_retcode;
4104         ol_arg=invalid
4105         for ol_val in no yes mod ; do
4106                 if test "$enableval" = "$ol_val" ; then
4107                         ol_arg="$ol_val"
4108                 fi
4109         done
4110         if test "$ol_arg" = "invalid" ; then
4111                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-retcode" >&5
4112 echo "$as_me: error: bad value $enableval for --enable-retcode" >&2;}
4113    { (exit 1); exit 1; }; }
4114         fi
4115         ol_enable_retcode="$ol_arg"
4116
4117 else
4118         ol_enable_retcode=${ol_enable_overlays:-no}
4119 fi
4120
4121 # end --enable-retcode
4122
4123 # OpenLDAP --enable-rwm
4124
4125         # Check whether --enable-rwm was given.
4126 if test "${enable_rwm+set}" = set; then
4127   enableval=$enable_rwm;
4128         ol_arg=invalid
4129         for ol_val in no yes mod ; do
4130                 if test "$enableval" = "$ol_val" ; then
4131                         ol_arg="$ol_val"
4132                 fi
4133         done
4134         if test "$ol_arg" = "invalid" ; then
4135                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-rwm" >&5
4136 echo "$as_me: error: bad value $enableval for --enable-rwm" >&2;}
4137    { (exit 1); exit 1; }; }
4138         fi
4139         ol_enable_rwm="$ol_arg"
4140
4141 else
4142         ol_enable_rwm=${ol_enable_overlays:-no}
4143 fi
4144
4145 # end --enable-rwm
4146
4147 # OpenLDAP --enable-seqmod
4148
4149         # Check whether --enable-seqmod was given.
4150 if test "${enable_seqmod+set}" = set; then
4151   enableval=$enable_seqmod;
4152         ol_arg=invalid
4153         for ol_val in no yes mod ; do
4154                 if test "$enableval" = "$ol_val" ; then
4155                         ol_arg="$ol_val"
4156                 fi
4157         done
4158         if test "$ol_arg" = "invalid" ; then
4159                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-seqmod" >&5
4160 echo "$as_me: error: bad value $enableval for --enable-seqmod" >&2;}
4161    { (exit 1); exit 1; }; }
4162         fi
4163         ol_enable_seqmod="$ol_arg"
4164
4165 else
4166         ol_enable_seqmod=${ol_enable_overlays:-yes}
4167 fi
4168
4169 # end --enable-seqmod
4170
4171 # OpenLDAP --enable-syncprov
4172
4173         # Check whether --enable-syncprov was given.
4174 if test "${enable_syncprov+set}" = set; then
4175   enableval=$enable_syncprov;
4176         ol_arg=invalid
4177         for ol_val in no yes mod ; do
4178                 if test "$enableval" = "$ol_val" ; then
4179                         ol_arg="$ol_val"
4180                 fi
4181         done
4182         if test "$ol_arg" = "invalid" ; then
4183                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-syncprov" >&5
4184 echo "$as_me: error: bad value $enableval for --enable-syncprov" >&2;}
4185    { (exit 1); exit 1; }; }
4186         fi
4187         ol_enable_syncprov="$ol_arg"
4188
4189 else
4190         ol_enable_syncprov=${ol_enable_overlays:-yes}
4191 fi
4192
4193 # end --enable-syncprov
4194
4195 # OpenLDAP --enable-translucent
4196
4197         # Check whether --enable-translucent was given.
4198 if test "${enable_translucent+set}" = set; then
4199   enableval=$enable_translucent;
4200         ol_arg=invalid
4201         for ol_val in no yes mod ; do
4202                 if test "$enableval" = "$ol_val" ; then
4203                         ol_arg="$ol_val"
4204                 fi
4205         done
4206         if test "$ol_arg" = "invalid" ; then
4207                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-translucent" >&5
4208 echo "$as_me: error: bad value $enableval for --enable-translucent" >&2;}
4209    { (exit 1); exit 1; }; }
4210         fi
4211         ol_enable_translucent="$ol_arg"
4212
4213 else
4214         ol_enable_translucent=${ol_enable_overlays:-no}
4215 fi
4216
4217 # end --enable-translucent
4218
4219 # OpenLDAP --enable-unique
4220
4221         # Check whether --enable-unique was given.
4222 if test "${enable_unique+set}" = set; then
4223   enableval=$enable_unique;
4224         ol_arg=invalid
4225         for ol_val in no yes mod ; do
4226                 if test "$enableval" = "$ol_val" ; then
4227                         ol_arg="$ol_val"
4228                 fi
4229         done
4230         if test "$ol_arg" = "invalid" ; then
4231                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-unique" >&5
4232 echo "$as_me: error: bad value $enableval for --enable-unique" >&2;}
4233    { (exit 1); exit 1; }; }
4234         fi
4235         ol_enable_unique="$ol_arg"
4236
4237 else
4238         ol_enable_unique=${ol_enable_overlays:-no}
4239 fi
4240
4241 # end --enable-unique
4242
4243 # OpenLDAP --enable-valsort
4244
4245         # Check whether --enable-valsort was given.
4246 if test "${enable_valsort+set}" = set; then
4247   enableval=$enable_valsort;
4248         ol_arg=invalid
4249         for ol_val in no yes mod ; do
4250                 if test "$enableval" = "$ol_val" ; then
4251                         ol_arg="$ol_val"
4252                 fi
4253         done
4254         if test "$ol_arg" = "invalid" ; then
4255                 { { echo "$as_me:$LINENO: error: bad value $enableval for --enable-valsort" >&5
4256 echo "$as_me: error: bad value $enableval for --enable-valsort" >&2;}
4257    { (exit 1); exit 1; }; }
4258         fi
4259         ol_enable_valsort="$ol_arg"
4260
4261 else
4262         ol_enable_valsort=${ol_enable_overlays:-no}
4263 fi
4264
4265 # end --enable-valsort
4266
4267
4268 # Check whether --enable-xxliboptions was given.
4269 if test "${enable_xxliboptions+set}" = set; then
4270   enableval=$enable_xxliboptions;
4271 fi
4272
4273 # Check whether --enable-static was given.
4274 if test "${enable_static+set}" = set; then
4275   enableval=$enable_static; p=${PACKAGE-default}
4276     case $enableval in
4277     yes) enable_static=yes ;;
4278     no) enable_static=no ;;
4279     *)
4280      enable_static=no
4281       # Look at the argument we got.  We use all the common list separators.
4282       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4283       for pkg in $enableval; do
4284         IFS="$lt_save_ifs"
4285         if test "X$pkg" = "X$p"; then
4286           enable_static=yes
4287         fi
4288       done
4289       IFS="$lt_save_ifs"
4290       ;;
4291     esac
4292 else
4293   enable_static=yes
4294 fi
4295
4296
4297 # Check whether --enable-shared was given.
4298 if test "${enable_shared+set}" = set; then
4299   enableval=$enable_shared; p=${PACKAGE-default}
4300     case $enableval in
4301     yes) enable_shared=yes ;;
4302     no) enable_shared=no ;;
4303     *)
4304       enable_shared=no
4305       # Look at the argument we got.  We use all the common list separators.
4306       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4307       for pkg in $enableval; do
4308         IFS="$lt_save_ifs"
4309         if test "X$pkg" = "X$p"; then
4310           enable_shared=yes
4311         fi
4312       done
4313       IFS="$lt_save_ifs"
4314       ;;
4315     esac
4316 else
4317   enable_shared=yes
4318 fi
4319
4320
4321
4322
4323 # validate options
4324 if test $ol_enable_slapd = no ; then
4325                 if test $ol_enable_slapi = yes ; then
4326                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
4327 echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
4328         fi
4329         case "$ol_enable_backends" in yes | mod)
4330                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
4331 echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
4332         esac
4333         for i in $Backends; do
4334                 eval "ol_tmp=\$ol_enable_$i"
4335                 if test $ol_tmp != no ; then
4336                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
4337 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
4338                         eval "ol_enable_$i=no"
4339                 fi
4340         done
4341         if test $ol_enable_modules = yes ; then
4342                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
4343 echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
4344         fi
4345         if test $ol_enable_wrappers = yes ; then
4346                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
4347 echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
4348         fi
4349         if test $ol_enable_rlookups = yes ; then
4350                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
4351 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
4352         fi
4353         if test $ol_enable_dynacl = yes ; then
4354                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
4355 echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
4356         fi
4357         if test $ol_enable_aci != no ; then
4358                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
4359 echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
4360         fi
4361         if test $ol_enable_rewrite = yes ; then
4362                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
4363 echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
4364         fi
4365                 case "$ol_enable_overlays" in yes | mod)
4366                 { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
4367 echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
4368         esac
4369         for i in $Overlays; do
4370                 eval "ol_tmp=\$ol_enable_$i"
4371                 if test $ol_tmp != no ; then
4372                         { echo "$as_me:$LINENO: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
4373 echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
4374                         eval "ol_enable_$i=no"
4375                 fi
4376         done
4377
4378         # force settings to no
4379         ol_enable_slapi=no
4380
4381         ol_enable_backends=
4382         ol_enable_overlays=
4383         ol_enable_modules=no
4384         ol_enable_rlookups=no
4385         ol_enable_dynacl=no
4386         ol_enable_aci=no
4387         ol_enable_wrappers=no
4388
4389         ol_enable_rewrite=no
4390
4391 elif test $ol_enable_modules != yes &&
4392         test $ol_enable_bdb = no &&
4393         test $ol_enable_dnssrv = no &&
4394         test $ol_enable_hdb = no &&
4395         test $ol_enable_ldap = no &&
4396         test $ol_enable_meta = no &&
4397         test $ol_enable_monitor = no &&
4398         test $ol_enable_ndb = no &&
4399         test $ol_enable_null = no &&
4400         test $ol_enable_passwd = no &&
4401         test $ol_enable_perl = no &&
4402         test $ol_enable_relay = no &&
4403         test $ol_enable_shell = no &&
4404         test $ol_enable_sock = no &&
4405         test $ol_enable_sql = no ; then
4406
4407         if test $ol_enable_slapd = yes ; then
4408                 { { echo "$as_me:$LINENO: error: slapd requires a backend" >&5
4409 echo "$as_me: error: slapd requires a backend" >&2;}
4410    { (exit 1); exit 1; }; }
4411         else
4412                 { echo "$as_me:$LINENO: WARNING: skipping slapd, no backend specified" >&5
4413 echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
4414                 ol_enable_slapd=no
4415         fi
4416 fi
4417
4418 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
4419         { { echo "$as_me:$LINENO: error: --enable-meta requires --enable-ldap" >&5
4420 echo "$as_me: error: --enable-meta requires --enable-ldap" >&2;}
4421    { (exit 1); exit 1; }; }
4422 fi
4423
4424 if test $ol_enable_lmpasswd = yes ; then
4425         if test $ol_with_tls = no ; then
4426                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
4427 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
4428    { (exit 1); exit 1; }; }
4429         fi
4430 fi
4431
4432 if test $ol_enable_spasswd = yes ; then
4433         if test $ol_with_cyrus_sasl = no ; then
4434                 { { echo "$as_me:$LINENO: error: options require --with-cyrus-sasl" >&5
4435 echo "$as_me: error: options require --with-cyrus-sasl" >&2;}
4436    { (exit 1); exit 1; }; }
4437         fi
4438         ol_with_cyrus_sasl=yes
4439 fi
4440
4441 { echo "$as_me:$LINENO: result: done" >&5
4442 echo "${ECHO_T}done" >&6; }
4443
4444 LDAP_LIBS=
4445 BDB_LIBS=
4446 SLAPD_NDB_LIBS=
4447 SLAPD_NDB_INCS=
4448 LTHREAD_LIBS=
4449 LUTIL_LIBS=
4450
4451 SLAPD_LIBS=
4452
4453 BUILD_SLAPD=no
4454
4455 BUILD_THREAD=no
4456
4457 BUILD_SLAPI=no
4458 SLAPD_SLAPI_DEPEND=
4459
4460 BUILD_BDB=no
4461 BUILD_DNSSRV=no
4462 BUILD_HDB=no
4463 BUILD_LDAP=no
4464 BUILD_META=no
4465 BUILD_MONITOR=no
4466 BUILD_NDB=no
4467 BUILD_NULL=no
4468 BUILD_PASSWD=no
4469 BUILD_PERL=no
4470 BUILD_RELAY=no
4471 BUILD_SHELL=no
4472 BUILD_SOCK=no
4473 BUILD_SQL=no
4474
4475 BUILD_ACCESSLOG=no
4476 BUILD_AUDITLOG=no
4477 BUILD_CONSTRAINT=no
4478 BUILD_DDS=no
4479 BUILD_DENYOP=no
4480 BUILD_DYNGROUP=no
4481 BUILD_DYNLIST=no
4482 BUILD_LASTMOD=no
4483 BUILD_MEMBEROF=no
4484 BUILD_PPOLICY=no
4485 BUILD_PROXYCACHE=no
4486 BUILD_REFINT=no
4487 BUILD_RETCODE=no
4488 BUILD_RWM=no
4489 BUILD_SEQMOD=no
4490 BUILD_SYNCPROV=no
4491 BUILD_TRANSLUCENT=no
4492 BUILD_UNIQUE=no
4493 BUILD_VALSORT=no
4494
4495 SLAPD_STATIC_OVERLAYS=
4496 SLAPD_DYNAMIC_OVERLAYS=
4497
4498 SLAPD_MODULES_LDFLAGS=
4499 SLAPD_MODULES_CPPFLAGS=
4500
4501 SLAPD_STATIC_BACKENDS=back-ldif
4502 SLAPD_DYNAMIC_BACKENDS=
4503
4504 SLAPD_PERL_LDFLAGS=
4505 MOD_PERL_LDFLAGS=
4506 PERL_CPPFLAGS=
4507
4508 SLAPD_SQL_LDFLAGS=
4509 SLAPD_SQL_LIBS=
4510 SLAPD_SQL_INCLUDES=
4511
4512 KRB4_LIBS=
4513 KRB5_LIBS=
4514 SASL_LIBS=
4515 GSSAPI_LIBS=
4516 TLS_LIBS=
4517 MODULES_LIBS=
4518 SLAPI_LIBS=
4519 LIBSLAPI=
4520 LIBSLAPITOOLS=
4521 AUTH_LIBS=
4522 ICU_LIBS=
4523
4524 SLAPD_SLP_LIBS=
4525 SLAPD_GMP_LIBS=
4526
4527
4528
4529 cat >>confdefs.h <<\_ACEOF
4530 #define HAVE_MKVERSION 1
4531 _ACEOF
4532
4533
4534
4535
4536 ol_aix_threads=no
4537 case "$target" in
4538 *-*-aix*)       if test -z "$CC" ; then
4539                 case "$ol_with_threads" in
4540                 auto | yes |  posix) ol_aix_threads=yes ;;
4541                 esac
4542         fi
4543 ;;
4544 esac
4545
4546 if test $ol_aix_threads = yes ; then
4547         if test -z "${CC}" ; then
4548                 for ac_prog in cc_r xlc_r cc
4549 do
4550   # Extract the first word of "$ac_prog", so it can be a program name with args.
4551 set dummy $ac_prog; ac_word=$2
4552 { echo "$as_me:$LINENO: checking for $ac_word" >&5
4553 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4554 if test "${ac_cv_prog_CC+set}" = set; then
4555   echo $ECHO_N "(cached) $ECHO_C" >&6
4556 else
4557   if test -n "$CC"; then
4558   ac_cv_prog_CC="$CC" # Let the user override the test.
4559 else
4560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4561 for as_dir in $PATH
4562 do
4563   IFS=$as_save_IFS
4564   test -z "$as_dir" && as_dir=.
4565   for ac_exec_ext in '' $ac_executable_extensions; do
4566   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4567     ac_cv_prog_CC="$ac_prog"
4568     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4569     break 2
4570   fi
4571 done
4572 done
4573 IFS=$as_save_IFS
4574
4575 fi
4576 fi
4577 CC=$ac_cv_prog_CC
4578 if test -n "$CC"; then
4579   { echo "$as_me:$LINENO: result: $CC" >&5
4580 echo "${ECHO_T}$CC" >&6; }
4581 else
4582   { echo "$as_me:$LINENO: result: no" >&5
4583 echo "${ECHO_T}no" >&6; }
4584 fi
4585
4586
4587   test -n "$CC" && break
4588 done
4589
4590
4591                 if test "$CC" = cc ; then
4592                                                 if test $ol_with_threads != auto ; then
4593                                 { { echo "$as_me:$LINENO: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&5
4594 echo "$as_me: error: --with-threads requires cc_r (or other suitable compiler) on AIX" >&2;}
4595    { (exit 1); exit 1; }; }
4596                         else
4597                                 { echo "$as_me:$LINENO: WARNING: disabling threads, no cc_r on AIX" >&5
4598 echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
4599                         fi
4600                         ol_with_threads=no
4601                 fi
4602         fi
4603
4604         case ${CC} in cc_r | xlc_r)
4605                 ol_with_threads=posix
4606                 ol_cv_pthread_create=yes
4607                 ;;
4608         esac
4609 fi
4610
4611 if test -z "${CC}"; then
4612         for ac_prog in cc gcc
4613 do
4614   # Extract the first word of "$ac_prog", so it can be a program name with args.
4615 set dummy $ac_prog; ac_word=$2
4616 { echo "$as_me:$LINENO: checking for $ac_word" >&5
4617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4618 if test "${ac_cv_prog_CC+set}" = set; then
4619   echo $ECHO_N "(cached) $ECHO_C" >&6
4620 else
4621   if test -n "$CC"; then
4622   ac_cv_prog_CC="$CC" # Let the user override the test.
4623 else
4624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4625 for as_dir in $PATH
4626 do
4627   IFS=$as_save_IFS
4628   test -z "$as_dir" && as_dir=.
4629   for ac_exec_ext in '' $ac_executable_extensions; do
4630   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4631     ac_cv_prog_CC="$ac_prog"
4632     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4633     break 2
4634   fi
4635 done
4636 done
4637 IFS=$as_save_IFS
4638
4639 fi
4640 fi
4641 CC=$ac_cv_prog_CC
4642 if test -n "$CC"; then
4643   { echo "$as_me:$LINENO: result: $CC" >&5
4644 echo "${ECHO_T}$CC" >&6; }
4645 else
4646   { echo "$as_me:$LINENO: result: no" >&5
4647 echo "${ECHO_T}no" >&6; }
4648 fi
4649
4650
4651   test -n "$CC" && break
4652 done
4653 test -n "$CC" || CC="missing"
4654
4655
4656         if test "${CC}" = "missing" ; then
4657                 { { echo "$as_me:$LINENO: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&5
4658 echo "$as_me: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." >&2;}
4659    { (exit 1); exit 1; }; }
4660         fi
4661 fi
4662
4663 if test -z "${AR}"; then
4664         for ac_prog in ar gar
4665 do
4666   # Extract the first word of "$ac_prog", so it can be a program name with args.
4667 set dummy $ac_prog; ac_word=$2
4668 { echo "$as_me:$LINENO: checking for $ac_word" >&5
4669 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4670 if test "${ac_cv_prog_AR+set}" = set; then
4671   echo $ECHO_N "(cached) $ECHO_C" >&6
4672 else
4673   if test -n "$AR"; then
4674   ac_cv_prog_AR="$AR" # Let the user override the test.
4675 else
4676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4677 for as_dir in $PATH
4678 do
4679   IFS=$as_save_IFS
4680   test -z "$as_dir" && as_dir=.
4681   for ac_exec_ext in '' $ac_executable_extensions; do
4682   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4683     ac_cv_prog_AR="$ac_prog"
4684     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4685     break 2
4686   fi
4687 done
4688 done
4689 IFS=$as_save_IFS
4690
4691 fi
4692 fi
4693 AR=$ac_cv_prog_AR
4694 if test -n "$AR"; then
4695   { echo "$as_me:$LINENO: result: $AR" >&5
4696 echo "${ECHO_T}$AR" >&6; }
4697 else
4698   { echo "$as_me:$LINENO: result: no" >&5
4699 echo "${ECHO_T}no" >&6; }
4700 fi
4701
4702
4703   test -n "$AR" && break
4704 done
4705 test -n "$AR" || AR="missing"
4706
4707
4708         if test "${AR}" = "missing" ; then
4709                 { { echo "$as_me:$LINENO: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&5
4710 echo "$as_me: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." >&2;}
4711    { (exit 1); exit 1; }; }
4712         fi
4713 fi
4714
4715
4716
4717
4718
4719 # Check whether --enable-fast-install was given.
4720 if test "${enable_fast_install+set}" = set; then
4721   enableval=$enable_fast_install; p=${PACKAGE-default}
4722     case $enableval in
4723     yes) enable_fast_install=yes ;;
4724     no) enable_fast_install=no ;;
4725     *)
4726       enable_fast_install=no
4727       # Look at the argument we got.  We use all the common list separators.
4728       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4729       for pkg in $enableval; do
4730         IFS="$lt_save_ifs"
4731         if test "X$pkg" = "X$p"; then
4732           enable_fast_install=yes
4733         fi
4734       done
4735       IFS="$lt_save_ifs"
4736       ;;
4737     esac
4738 else
4739   enable_fast_install=yes
4740 fi
4741
4742
4743 DEPDIR="${am__leading_dot}deps"
4744
4745 ac_config_commands="$ac_config_commands depfiles"
4746
4747
4748 am_make=${MAKE-make}
4749 cat > confinc << 'END'
4750 am__doit:
4751         @echo done
4752 .PHONY: am__doit
4753 END
4754 # If we don't find an include directive, just comment out the code.
4755 { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
4756 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
4757 am__include="#"
4758 am__quote=
4759 _am_result=none
4760 # First try GNU make style include.
4761 echo "include confinc" > confmf
4762 # We grep out `Entering directory' and `Leaving directory'
4763 # messages which can occur if `w' ends up in MAKEFLAGS.
4764 # In particular we don't look at `^make:' because GNU make might
4765 # be invoked under some other name (usually "gmake"), in which
4766 # case it prints its new name instead of `make'.
4767 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
4768    am__include=include
4769    am__quote=
4770    _am_result=GNU
4771 fi
4772 # Now try BSD make style include.
4773 if test "$am__include" = "#"; then
4774    echo '.include "confinc"' > confmf
4775    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
4776       am__include=.include
4777       am__quote="\""
4778       _am_result=BSD
4779    fi
4780 fi
4781
4782
4783 { echo "$as_me:$LINENO: result: $_am_result" >&5
4784 echo "${ECHO_T}$_am_result" >&6; }
4785 rm -f confinc confmf
4786
4787 # Check whether --enable-dependency-tracking was given.
4788 if test "${enable_dependency_tracking+set}" = set; then
4789   enableval=$enable_dependency_tracking;
4790 fi
4791
4792 if test "x$enable_dependency_tracking" != xno; then
4793   am_depcomp="$ac_aux_dir/depcomp"
4794   AMDEPBACKSLASH='\'
4795 fi
4796
4797
4798 if test "x$enable_dependency_tracking" != xno; then
4799   AMDEP_TRUE=
4800   AMDEP_FALSE='#'
4801 else
4802   AMDEP_TRUE='#'
4803   AMDEP_FALSE=
4804 fi
4805
4806
4807
4808 ac_ext=c
4809 ac_cpp='$CPP $CPPFLAGS'
4810 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4811 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4812 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4813 if test -n "$ac_tool_prefix"; then
4814   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4815 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4816 { echo "$as_me:$LINENO: checking for $ac_word" >&5
4817 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4818 if test "${ac_cv_prog_CC+set}" = set; then
4819   echo $ECHO_N "(cached) $ECHO_C" >&6
4820 else
4821   if test -n "$CC"; then
4822   ac_cv_prog_CC="$CC" # Let the user override the test.
4823 else
4824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825 for as_dir in $PATH
4826 do
4827   IFS=$as_save_IFS
4828   test -z "$as_dir" && as_dir=.
4829   for ac_exec_ext in '' $ac_executable_extensions; do
4830   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4831     ac_cv_prog_CC="${ac_tool_prefix}gcc"
4832     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4833     break 2
4834   fi
4835 done
4836 done
4837 IFS=$as_save_IFS
4838
4839 fi
4840 fi
4841 CC=$ac_cv_prog_CC
4842 if test -n "$CC"; then
4843   { echo "$as_me:$LINENO: result: $CC" >&5
4844 echo "${ECHO_T}$CC" >&6; }
4845 else
4846   { echo "$as_me:$LINENO: result: no" >&5
4847 echo "${ECHO_T}no" >&6; }
4848 fi
4849
4850
4851 fi
4852 if test -z "$ac_cv_prog_CC"; then
4853   ac_ct_CC=$CC
4854   # Extract the first word of "gcc", so it can be a program name with args.
4855 set dummy gcc; ac_word=$2
4856 { echo "$as_me:$LINENO: checking for $ac_word" >&5
4857 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4858 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
4859   echo $ECHO_N "(cached) $ECHO_C" >&6
4860 else
4861   if test -n "$ac_ct_CC"; then
4862   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4863 else
4864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4865 for as_dir in $PATH
4866 do
4867   IFS=$as_save_IFS
4868   test -z "$as_dir" && as_dir=.
4869   for ac_exec_ext in '' $ac_executable_extensions; do
4870   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4871     ac_cv_prog_ac_ct_CC="gcc"
4872     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4873     break 2
4874   fi
4875 done
4876 done
4877 IFS=$as_save_IFS
4878
4879 fi
4880 fi
4881 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4882 if test -n "$ac_ct_CC"; then
4883   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
4884 echo "${ECHO_T}$ac_ct_CC" >&6; }
4885 else
4886   { echo "$as_me:$LINENO: result: no" >&5
4887 echo "${ECHO_T}no" >&6; }
4888 fi
4889
4890   if test "x$ac_ct_CC" = x; then
4891     CC=""
4892   else
4893     case $cross_compiling:$ac_tool_warned in
4894 yes:)
4895 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4896 whose name does not start with the host triplet.  If you think this
4897 configuration is useful to you, please write to autoconf@gnu.org." >&5
4898 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4899 whose name does not start with the host triplet.  If you think this
4900 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4901 ac_tool_warned=yes ;;
4902 esac
4903     CC=$ac_ct_CC
4904   fi
4905 else
4906   CC="$ac_cv_prog_CC"
4907 fi
4908
4909 if test -z "$CC"; then
4910           if test -n "$ac_tool_prefix"; then
4911     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4912 set dummy ${ac_tool_prefix}cc; ac_word=$2
4913 { echo "$as_me:$LINENO: checking for $ac_word" >&5
4914 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4915 if test "${ac_cv_prog_CC+set}" = set; then
4916   echo $ECHO_N "(cached) $ECHO_C" >&6
4917 else
4918   if test -n "$CC"; then
4919   ac_cv_prog_CC="$CC" # Let the user override the test.
4920 else
4921 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4922 for as_dir in $PATH
4923 do
4924   IFS=$as_save_IFS
4925   test -z "$as_dir" && as_dir=.
4926   for ac_exec_ext in '' $ac_executable_extensions; do
4927   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4928     ac_cv_prog_CC="${ac_tool_prefix}cc"
4929     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4930     break 2
4931   fi
4932 done
4933 done
4934 IFS=$as_save_IFS
4935
4936 fi
4937 fi
4938 CC=$ac_cv_prog_CC
4939 if test -n "$CC"; then
4940   { echo "$as_me:$LINENO: result: $CC" >&5
4941 echo "${ECHO_T}$CC" >&6; }
4942 else
4943   { echo "$as_me:$LINENO: result: no" >&5
4944 echo "${ECHO_T}no" >&6; }
4945 fi
4946
4947
4948   fi
4949 fi
4950 if test -z "$CC"; then
4951   # Extract the first word of "cc", so it can be a program name with args.
4952 set dummy cc; ac_word=$2
4953 { echo "$as_me:$LINENO: checking for $ac_word" >&5
4954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4955 if test "${ac_cv_prog_CC+set}" = set; then
4956   echo $ECHO_N "(cached) $ECHO_C" >&6
4957 else
4958   if test -n "$CC"; then
4959   ac_cv_prog_CC="$CC" # Let the user override the test.
4960 else
4961   ac_prog_rejected=no
4962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4963 for as_dir in $PATH
4964 do
4965   IFS=$as_save_IFS
4966   test -z "$as_dir" && as_dir=.
4967   for ac_exec_ext in '' $ac_executable_extensions; do
4968   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4969     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4970        ac_prog_rejected=yes
4971        continue
4972      fi
4973     ac_cv_prog_CC="cc"
4974     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4975     break 2
4976   fi
4977 done
4978 done
4979 IFS=$as_save_IFS
4980
4981 if test $ac_prog_rejected = yes; then
4982   # We found a bogon in the path, so make sure we never use it.
4983   set dummy $ac_cv_prog_CC
4984   shift
4985   if test $# != 0; then
4986     # We chose a different compiler from the bogus one.
4987     # However, it has the same basename, so the bogon will be chosen
4988     # first if we set CC to just the basename; use the full file name.
4989     shift
4990     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4991   fi
4992 fi
4993 fi
4994 fi
4995 CC=$ac_cv_prog_CC
4996 if test -n "$CC"; then
4997   { echo "$as_me:$LINENO: result: $CC" >&5
4998 echo "${ECHO_T}$CC" >&6; }
4999 else
5000   { echo "$as_me:$LINENO: result: no" >&5
5001 echo "${ECHO_T}no" >&6; }
5002 fi
5003
5004
5005 fi
5006 if test -z "$CC"; then
5007   if test -n "$ac_tool_prefix"; then
5008   for ac_prog in cl.exe
5009   do
5010     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5011 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5012 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5013 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5014 if test "${ac_cv_prog_CC+set}" = set; then
5015   echo $ECHO_N "(cached) $ECHO_C" >&6
5016 else
5017   if test -n "$CC"; then
5018   ac_cv_prog_CC="$CC" # Let the user override the test.
5019 else
5020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5021 for as_dir in $PATH
5022 do
5023   IFS=$as_save_IFS
5024   test -z "$as_dir" && as_dir=.
5025   for ac_exec_ext in '' $ac_executable_extensions; do
5026   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5027     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5028     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5029     break 2
5030   fi
5031 done
5032 done
5033 IFS=$as_save_IFS
5034
5035 fi
5036 fi
5037 CC=$ac_cv_prog_CC
5038 if test -n "$CC"; then
5039   { echo "$as_me:$LINENO: result: $CC" >&5
5040 echo "${ECHO_T}$CC" >&6; }
5041 else
5042   { echo "$as_me:$LINENO: result: no" >&5
5043 echo "${ECHO_T}no" >&6; }
5044 fi
5045
5046
5047     test -n "$CC" && break
5048   done
5049 fi
5050 if test -z "$CC"; then
5051   ac_ct_CC=$CC
5052   for ac_prog in cl.exe
5053 do
5054   # Extract the first word of "$ac_prog", so it can be a program name with args.
5055 set dummy $ac_prog; ac_word=$2
5056 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5057 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5058 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
5059   echo $ECHO_N "(cached) $ECHO_C" >&6
5060 else
5061   if test -n "$ac_ct_CC"; then
5062   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5063 else
5064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5065 for as_dir in $PATH
5066 do
5067   IFS=$as_save_IFS
5068   test -z "$as_dir" && as_dir=.
5069   for ac_exec_ext in '' $ac_executable_extensions; do
5070   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5071     ac_cv_prog_ac_ct_CC="$ac_prog"
5072     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5073     break 2
5074   fi
5075 done
5076 done
5077 IFS=$as_save_IFS
5078
5079 fi
5080 fi
5081 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5082 if test -n "$ac_ct_CC"; then
5083   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
5084 echo "${ECHO_T}$ac_ct_CC" >&6; }
5085 else
5086   { echo "$as_me:$LINENO: result: no" >&5
5087 echo "${ECHO_T}no" >&6; }
5088 fi
5089
5090
5091   test -n "$ac_ct_CC" && break
5092 done
5093
5094   if test "x$ac_ct_CC" = x; then
5095     CC=""
5096   else
5097     case $cross_compiling:$ac_tool_warned in
5098 yes:)
5099 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5100 whose name does not start with the host triplet.  If you think this
5101 configuration is useful to you, please write to autoconf@gnu.org." >&5
5102 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5103 whose name does not start with the host triplet.  If you think this
5104 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5105 ac_tool_warned=yes ;;
5106 esac
5107     CC=$ac_ct_CC
5108   fi
5109 fi
5110
5111 fi
5112
5113
5114 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
5115 See \`config.log' for more details." >&5
5116 echo "$as_me: error: no acceptable C compiler found in \$PATH
5117 See \`config.log' for more details." >&2;}
5118    { (exit 1); exit 1; }; }
5119
5120 # Provide some information about the compiler.
5121 echo "$as_me:$LINENO: checking for C compiler version" >&5
5122 ac_compiler=`set X $ac_compile; echo $2`
5123 { (ac_try="$ac_compiler --version >&5"
5124 case "(($ac_try" in
5125   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5126   *) ac_try_echo=$ac_try;;
5127 esac
5128 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5129   (eval "$ac_compiler --version >&5") 2>&5
5130   ac_status=$?
5131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132   (exit $ac_status); }
5133 { (ac_try="$ac_compiler -v >&5"
5134 case "(($ac_try" in
5135   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5136   *) ac_try_echo=$ac_try;;
5137 esac
5138 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5139   (eval "$ac_compiler -v >&5") 2>&5
5140   ac_status=$?
5141   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5142   (exit $ac_status); }
5143 { (ac_try="$ac_compiler -V >&5"
5144 case "(($ac_try" in
5145   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5146   *) ac_try_echo=$ac_try;;
5147 esac
5148 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5149   (eval "$ac_compiler -V >&5") 2>&5
5150   ac_status=$?
5151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5152   (exit $ac_status); }
5153
5154 cat >conftest.$ac_ext <<_ACEOF
5155 /* confdefs.h.  */
5156 _ACEOF
5157 cat confdefs.h >>conftest.$ac_ext
5158 cat >>conftest.$ac_ext <<_ACEOF
5159 /* end confdefs.h.  */
5160
5161 int
5162 main ()
5163 {
5164
5165   ;
5166   return 0;
5167 }
5168 _ACEOF
5169 ac_clean_files_save=$ac_clean_files
5170 ac_clean_files="$ac_clean_files a.out a.exe b.out"
5171 # Try to create an executable without -o first, disregard a.out.
5172 # It will help us diagnose broken compilers, and finding out an intuition
5173 # of exeext.
5174 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
5175 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
5176 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5177 #
5178 # List of possible output files, starting from the most likely.
5179 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
5180 # only as a last resort.  b.out is created by i960 compilers.
5181 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
5182 #
5183 # The IRIX 6 linker writes into existing files which may not be
5184 # executable, retaining their permissions.  Remove them first so a
5185 # subsequent execution test works.
5186 ac_rmfiles=
5187 for ac_file in $ac_files
5188 do
5189   case $ac_file in
5190     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
5191     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5192   esac
5193 done
5194 rm -f $ac_rmfiles
5195
5196 if { (ac_try="$ac_link_default"
5197 case "(($ac_try" in
5198   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5199   *) ac_try_echo=$ac_try;;
5200 esac
5201 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5202   (eval "$ac_link_default") 2>&5
5203   ac_status=$?
5204   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205   (exit $ac_status); }; then
5206   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5207 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5208 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
5209 # so that the user can short-circuit this test for compilers unknown to
5210 # Autoconf.
5211 for ac_file in $ac_files ''
5212 do
5213   test -f "$ac_file" || continue
5214   case $ac_file in
5215     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
5216         ;;
5217     [ab].out )
5218         # We found the default executable, but exeext='' is most
5219         # certainly right.
5220         break;;
5221     *.* )
5222         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5223         then :; else
5224            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5225         fi
5226         # We set ac_cv_exeext here because the later test for it is not
5227         # safe: cross compilers may not add the suffix if given an `-o'
5228         # argument, so we may need to know it at that point already.
5229         # Even if this section looks crufty: it has the advantage of
5230         # actually working.
5231         break;;
5232     * )
5233         break;;
5234   esac
5235 done
5236 test "$ac_cv_exeext" = no && ac_cv_exeext=
5237
5238 else
5239   ac_file=''
5240 fi
5241
5242 { echo "$as_me:$LINENO: result: $ac_file" >&5
5243 echo "${ECHO_T}$ac_file" >&6; }
5244 if test -z "$ac_file"; then
5245   echo "$as_me: failed program was:" >&5
5246 sed 's/^/| /' conftest.$ac_ext >&5
5247
5248 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
5249 See \`config.log' for more details." >&5
5250 echo "$as_me: error: C compiler cannot create executables
5251 See \`config.log' for more details." >&2;}
5252    { (exit 77); exit 77; }; }
5253 fi
5254
5255 ac_exeext=$ac_cv_exeext
5256
5257 # Check that the compiler produces executables we can run.  If not, either
5258 # the compiler is broken, or we cross compile.
5259 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
5260 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
5261 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
5262 # If not cross compiling, check that we can run a simple program.
5263 if test "$cross_compiling" != yes; then
5264   if { ac_try='./$ac_file'
5265   { (case "(($ac_try" in
5266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5267   *) ac_try_echo=$ac_try;;
5268 esac
5269 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5270   (eval "$ac_try") 2>&5
5271   ac_status=$?
5272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5273   (exit $ac_status); }; }; then
5274     cross_compiling=no
5275   else
5276     if test "$cross_compiling" = maybe; then
5277         cross_compiling=yes
5278     else
5279         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
5280 If you meant to cross compile, use \`--host'.
5281 See \`config.log' for more details." >&5
5282 echo "$as_me: error: cannot run C compiled programs.
5283 If you meant to cross compile, use \`--host'.
5284 See \`config.log' for more details." >&2;}
5285    { (exit 1); exit 1; }; }
5286     fi
5287   fi
5288 fi
5289 { echo "$as_me:$LINENO: result: yes" >&5
5290 echo "${ECHO_T}yes" >&6; }
5291
5292 rm -f a.out a.exe conftest$ac_cv_exeext b.out
5293 ac_clean_files=$ac_clean_files_save
5294 # Check that the compiler produces executables we can run.  If not, either
5295 # the compiler is broken, or we cross compile.
5296 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
5297 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
5298 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
5299 echo "${ECHO_T}$cross_compiling" >&6; }
5300
5301 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
5302 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
5303 if { (ac_try="$ac_link"
5304 case "(($ac_try" in
5305   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5306   *) ac_try_echo=$ac_try;;
5307 esac
5308 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5309   (eval "$ac_link") 2>&5
5310   ac_status=$?
5311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5312   (exit $ac_status); }; then
5313   # If both `conftest.exe' and `conftest' are `present' (well, observable)
5314 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5315 # work properly (i.e., refer to `conftest.exe'), while it won't with
5316 # `rm'.
5317 for ac_file in conftest.exe conftest conftest.*; do
5318   test -f "$ac_file" || continue
5319   case $ac_file in
5320     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
5321     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5322           break;;
5323     * ) break;;
5324   esac
5325 done
5326 else
5327   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
5328 See \`config.log' for more details." >&5
5329 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
5330 See \`config.log' for more details." >&2;}
5331    { (exit 1); exit 1; }; }
5332 fi
5333
5334 rm -f conftest$ac_cv_exeext
5335 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
5336 echo "${ECHO_T}$ac_cv_exeext" >&6; }
5337
5338 rm -f conftest.$ac_ext
5339 EXEEXT=$ac_cv_exeext
5340 ac_exeext=$EXEEXT
5341 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
5342 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
5343 if test "${ac_cv_objext+set}" = set; then
5344   echo $ECHO_N "(cached) $ECHO_C" >&6
5345 else
5346   cat >conftest.$ac_ext <<_ACEOF
5347 /* confdefs.h.  */
5348 _ACEOF
5349 cat confdefs.h >>conftest.$ac_ext
5350 cat >>conftest.$ac_ext <<_ACEOF
5351 /* end confdefs.h.  */
5352
5353 int
5354 main ()
5355 {
5356
5357   ;
5358   return 0;
5359 }
5360 _ACEOF
5361 rm -f conftest.o conftest.obj
5362 if { (ac_try="$ac_compile"
5363 case "(($ac_try" in
5364   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5365   *) ac_try_echo=$ac_try;;
5366 esac
5367 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5368   (eval "$ac_compile") 2>&5
5369   ac_status=$?
5370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5371   (exit $ac_status); }; then
5372   for ac_file in conftest.o conftest.obj conftest.*; do
5373   test -f "$ac_file" || continue;
5374   case $ac_file in
5375     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
5376     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5377        break;;
5378   esac
5379 done
5380 else
5381   echo "$as_me: failed program was:" >&5
5382 sed 's/^/| /' conftest.$ac_ext >&5
5383
5384 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
5385 See \`config.log' for more details." >&5
5386 echo "$as_me: error: cannot compute suffix of object files: cannot compile
5387 See \`config.log' for more details." >&2;}
5388    { (exit 1); exit 1; }; }
5389 fi
5390
5391 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5392 fi
5393 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
5394 echo "${ECHO_T}$ac_cv_objext" >&6; }
5395 OBJEXT=$ac_cv_objext
5396 ac_objext=$OBJEXT
5397 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
5398 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
5399 if test "${ac_cv_c_compiler_gnu+set}" = set; then
5400   echo $ECHO_N "(cached) $ECHO_C" >&6
5401 else
5402   cat >conftest.$ac_ext <<_ACEOF
5403 /* confdefs.h.  */
5404 _ACEOF
5405 cat confdefs.h >>conftest.$ac_ext
5406 cat >>conftest.$ac_ext <<_ACEOF
5407 /* end confdefs.h.  */
5408
5409 int
5410 main ()
5411 {
5412 #ifndef __GNUC__
5413        choke me
5414 #endif
5415
5416   ;
5417   return 0;
5418 }
5419 _ACEOF
5420 rm -f conftest.$ac_objext
5421 if { (ac_try="$ac_compile"
5422 case "(($ac_try" in
5423   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5424   *) ac_try_echo=$ac_try;;
5425 esac
5426 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5427   (eval "$ac_compile") 2>conftest.er1
5428   ac_status=$?
5429   grep -v '^ *+' conftest.er1 >conftest.err
5430   rm -f conftest.er1
5431   cat conftest.err >&5
5432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5433   (exit $ac_status); } && {
5434          test -z "$ac_c_werror_flag" ||
5435          test ! -s conftest.err
5436        } && test -s conftest.$ac_objext; then
5437   ac_compiler_gnu=yes
5438 else
5439   echo "$as_me: failed program was:" >&5
5440 sed 's/^/| /' conftest.$ac_ext >&5
5441
5442         ac_compiler_gnu=no
5443 fi
5444
5445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5446 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5447
5448 fi
5449 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
5450 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
5451 GCC=`test $ac_compiler_gnu = yes && echo yes`
5452 ac_test_CFLAGS=${CFLAGS+set}
5453 ac_save_CFLAGS=$CFLAGS
5454 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
5455 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
5456 if test "${ac_cv_prog_cc_g+set}" = set; then
5457   echo $ECHO_N "(cached) $ECHO_C" >&6
5458 else
5459   ac_save_c_werror_flag=$ac_c_werror_flag
5460    ac_c_werror_flag=yes
5461    ac_cv_prog_cc_g=no
5462    CFLAGS="-g"
5463    cat >conftest.$ac_ext <<_ACEOF
5464 /* confdefs.h.  */
5465 _ACEOF
5466 cat confdefs.h >>conftest.$ac_ext
5467 cat >>conftest.$ac_ext <<_ACEOF
5468 /* end confdefs.h.  */
5469
5470 int
5471 main ()
5472 {
5473
5474   ;
5475   return 0;
5476 }
5477 _ACEOF
5478 rm -f conftest.$ac_objext
5479 if { (ac_try="$ac_compile"
5480 case "(($ac_try" in
5481   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5482   *) ac_try_echo=$ac_try;;
5483 esac
5484 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5485   (eval "$ac_compile") 2>conftest.er1
5486   ac_status=$?
5487   grep -v '^ *+' conftest.er1 >conftest.err
5488   rm -f conftest.er1
5489   cat conftest.err >&5
5490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491   (exit $ac_status); } && {
5492          test -z "$ac_c_werror_flag" ||
5493          test ! -s conftest.err
5494        } && test -s conftest.$ac_objext; then
5495   ac_cv_prog_cc_g=yes
5496 else
5497   echo "$as_me: failed program was:" >&5
5498 sed 's/^/| /' conftest.$ac_ext >&5
5499
5500         CFLAGS=""
5501       cat >conftest.$ac_ext <<_ACEOF
5502 /* confdefs.h.  */
5503 _ACEOF
5504 cat confdefs.h >>conftest.$ac_ext
5505 cat >>conftest.$ac_ext <<_ACEOF
5506 /* end confdefs.h.  */
5507
5508 int
5509 main ()
5510 {
5511
5512   ;
5513   return 0;
5514 }
5515 _ACEOF
5516 rm -f conftest.$ac_objext
5517 if { (ac_try="$ac_compile"
5518 case "(($ac_try" in
5519   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5520   *) ac_try_echo=$ac_try;;
5521 esac
5522 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5523   (eval "$ac_compile") 2>conftest.er1
5524   ac_status=$?
5525   grep -v '^ *+' conftest.er1 >conftest.err
5526   rm -f conftest.er1
5527   cat conftest.err >&5
5528   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5529   (exit $ac_status); } && {
5530          test -z "$ac_c_werror_flag" ||
5531          test ! -s conftest.err
5532        } && test -s conftest.$ac_objext; then
5533   :
5534 else
5535   echo "$as_me: failed program was:" >&5
5536 sed 's/^/| /' conftest.$ac_ext >&5
5537
5538         ac_c_werror_flag=$ac_save_c_werror_flag
5539          CFLAGS="-g"
5540          cat >conftest.$ac_ext <<_ACEOF
5541 /* confdefs.h.  */
5542 _ACEOF
5543 cat confdefs.h >>conftest.$ac_ext
5544 cat >>conftest.$ac_ext <<_ACEOF
5545 /* end confdefs.h.  */
5546
5547 int
5548 main ()
5549 {
5550
5551   ;
5552   return 0;
5553 }
5554 _ACEOF
5555 rm -f conftest.$ac_objext
5556 if { (ac_try="$ac_compile"
5557 case "(($ac_try" in
5558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5559   *) ac_try_echo=$ac_try;;
5560 esac
5561 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5562   (eval "$ac_compile") 2>conftest.er1
5563   ac_status=$?
5564   grep -v '^ *+' conftest.er1 >conftest.err
5565   rm -f conftest.er1
5566   cat conftest.err >&5
5567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5568   (exit $ac_status); } && {
5569          test -z "$ac_c_werror_flag" ||
5570          test ! -s conftest.err
5571        } && test -s conftest.$ac_objext; then
5572   ac_cv_prog_cc_g=yes
5573 else
5574   echo "$as_me: failed program was:" >&5
5575 sed 's/^/| /' conftest.$ac_ext >&5
5576
5577
5578 fi
5579
5580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5581 fi
5582
5583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5584 fi
5585
5586 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5587    ac_c_werror_flag=$ac_save_c_werror_flag
5588 fi
5589 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
5590 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
5591 if test "$ac_test_CFLAGS" = set; then
5592   CFLAGS=$ac_save_CFLAGS
5593 elif test $ac_cv_prog_cc_g = yes; then
5594   if test "$GCC" = yes; then
5595     CFLAGS="-g -O2"
5596   else
5597     CFLAGS="-g"
5598   fi
5599 else
5600   if test "$GCC" = yes; then
5601     CFLAGS="-O2"
5602   else
5603     CFLAGS=
5604   fi
5605 fi
5606 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
5607 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
5608 if test "${ac_cv_prog_cc_c89+set}" = set; then
5609   echo $ECHO_N "(cached) $ECHO_C" >&6
5610 else
5611   ac_cv_prog_cc_c89=no
5612 ac_save_CC=$CC
5613 cat >conftest.$ac_ext <<_ACEOF
5614 /* confdefs.h.  */
5615 _ACEOF
5616 cat confdefs.h >>conftest.$ac_ext
5617 cat >>conftest.$ac_ext <<_ACEOF
5618 /* end confdefs.h.  */
5619 #include <stdarg.h>
5620 #include <stdio.h>
5621 #include <sys/types.h>
5622 #include <sys/stat.h>
5623 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5624 struct buf { int x; };
5625 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5626 static char *e (p, i)
5627      char **p;
5628      int i;
5629 {
5630   return p[i];
5631 }
5632 static char *f (char * (*g) (char **, int), char **p, ...)
5633 {
5634   char *s;
5635   va_list v;
5636   va_start (v,p);
5637   s = g (p, va_arg (v,int));
5638   va_end (v);
5639   return s;
5640 }
5641
5642 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5643    function prototypes and stuff, but not '\xHH' hex character constants.
5644    These don't provoke an error unfortunately, instead are silently treated
5645    as 'x'.  The following induces an error, until -std is added to get
5646    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5647    array size at least.  It's necessary to write '\x00'==0 to get something
5648    that's true only with -std.  */
5649 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5650
5651 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5652    inside strings and character constants.  */
5653 #define FOO(x) 'x'
5654 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5655
5656 int test (int i, double x);
5657 struct s1 {int (*f) (int a);};
5658 struct s2 {int (*f) (double a);};
5659 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5660 int argc;
5661 char **argv;
5662 int
5663 main ()
5664 {
5665 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5666   ;
5667   return 0;
5668 }
5669 _ACEOF
5670 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5671         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5672 do
5673   CC="$ac_save_CC $ac_arg"
5674   rm -f conftest.$ac_objext
5675 if { (ac_try="$ac_compile"
5676 case "(($ac_try" in
5677   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5678   *) ac_try_echo=$ac_try;;
5679 esac
5680 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5681   (eval "$ac_compile") 2>conftest.er1
5682   ac_status=$?
5683   grep -v '^ *+' conftest.er1 >conftest.err
5684   rm -f conftest.er1
5685   cat conftest.err >&5
5686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5687   (exit $ac_status); } && {
5688          test -z "$ac_c_werror_flag" ||
5689          test ! -s conftest.err
5690        } && test -s conftest.$ac_objext; then
5691   ac_cv_prog_cc_c89=$ac_arg
5692 else
5693   echo "$as_me: failed program was:" >&5
5694 sed 's/^/| /' conftest.$ac_ext >&5
5695
5696
5697 fi
5698
5699 rm -f core conftest.err conftest.$ac_objext
5700   test "x$ac_cv_prog_cc_c89" != "xno" && break
5701 done
5702 rm -f conftest.$ac_ext
5703 CC=$ac_save_CC
5704
5705 fi
5706 # AC_CACHE_VAL
5707 case "x$ac_cv_prog_cc_c89" in
5708   x)
5709     { echo "$as_me:$LINENO: result: none needed" >&5
5710 echo "${ECHO_T}none needed" >&6; } ;;
5711   xno)
5712     { echo "$as_me:$LINENO: result: unsupported" >&5
5713 echo "${ECHO_T}unsupported" >&6; } ;;
5714   *)
5715     CC="$CC $ac_cv_prog_cc_c89"
5716     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
5717 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
5718 esac
5719
5720
5721 ac_ext=c
5722 ac_cpp='$CPP $CPPFLAGS'
5723 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5724 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5725 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5726
5727 depcc="$CC"   am_compiler_list=
5728
5729 { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
5730 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
5731 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
5732   echo $ECHO_N "(cached) $ECHO_C" >&6
5733 else
5734   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5735   # We make a subdir and do the tests there.  Otherwise we can end up
5736   # making bogus files that we don't know about and never remove.  For
5737   # instance it was reported that on HP-UX the gcc test will end up
5738   # making a dummy file named `D' -- because `-MD' means `put the output
5739   # in D'.
5740   mkdir conftest.dir
5741   # Copy depcomp to subdir because otherwise we won't find it if we're
5742   # using a relative directory.
5743   cp "$am_depcomp" conftest.dir
5744   cd conftest.dir
5745   # We will build objects and dependencies in a subdirectory because
5746   # it helps to detect inapplicable dependency modes.  For instance
5747   # both Tru64's cc and ICC support -MD to output dependencies as a
5748   # side effect of compilation, but ICC will put the dependencies in
5749   # the current directory while Tru64 will put them in the object
5750   # directory.
5751   mkdir sub
5752
5753   am_cv_CC_dependencies_compiler_type=none
5754   if test "$am_compiler_list" = ""; then
5755      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5756   fi
5757   for depmode in $am_compiler_list; do
5758     # Setup a source with many dependencies, because some compilers
5759     # like to wrap large dependency lists on column 80 (with \), and
5760     # we should not choose a depcomp mode which is confused by this.
5761     #
5762     # We need to recreate these files for each test, as the compiler may
5763     # overwrite some of them when testing with obscure command lines.
5764     # This happens at least with the AIX C compiler.
5765     : > sub/conftest.c
5766     for i in 1 2 3 4 5 6; do
5767       echo '#include "conftst'$i'.h"' >> sub/conftest.c
5768       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5769       # Solaris 8's {/usr,}/bin/sh.
5770       touch sub/conftst$i.h
5771     done
5772     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5773
5774     case $depmode in
5775     nosideeffect)
5776       # after this tag, mechanisms are not by side-effect, so they'll
5777       # only be used when explicitly requested
5778       if test "x$enable_dependency_tracking" = xyes; then
5779         continue
5780       else
5781         break
5782       fi
5783       ;;
5784     none) break ;;
5785     esac
5786     # We check with `-c' and `-o' for the sake of the "dashmstdout"
5787     # mode.  It turns out that the SunPro C++ compiler does not properly
5788     # handle `-M -o', and we need to detect this.
5789     if depmode=$depmode \
5790        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5791        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5792        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5793          >/dev/null 2>conftest.err &&
5794        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5795        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5796        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5797       # icc doesn't choke on unknown options, it will just issue warnings
5798       # or remarks (even with -Werror).  So we grep stderr for any message
5799       # that says an option was ignored or not supported.
5800       # When given -MP, icc 7.0 and 7.1 complain thusly:
5801       #   icc: Command line warning: ignoring option '-M'; no argument required
5802       # The diagnosis changed in icc 8.0:
5803       #   icc: Command line remark: option '-MP' not supported
5804       if (grep 'ignoring option' conftest.err ||
5805           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5806         am_cv_CC_dependencies_compiler_type=$depmode
5807         break
5808       fi
5809     fi
5810   done
5811
5812   cd ..
5813   rm -rf conftest.dir
5814 else
5815   am_cv_CC_dependencies_compiler_type=none
5816 fi
5817
5818 fi
5819 { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
5820 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
5821 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5822
5823
5824
5825 if
5826   test "x$enable_dependency_tracking" != xno \
5827   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5828   am__fastdepCC_TRUE=
5829   am__fastdepCC_FALSE='#'
5830 else
5831   am__fastdepCC_TRUE='#'
5832   am__fastdepCC_FALSE=
5833 fi
5834
5835
5836 { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
5837 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
5838 if test "${lt_cv_path_SED+set}" = set; then
5839   echo $ECHO_N "(cached) $ECHO_C" >&6
5840 else
5841   # Loop through the user's path and test for sed and gsed.
5842 # Then use that list of sed's as ones to test for truncation.
5843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5844 for as_dir in $PATH
5845 do
5846   IFS=$as_save_IFS
5847   test -z "$as_dir" && as_dir=.
5848   for lt_ac_prog in sed gsed; do
5849     for ac_exec_ext in '' $ac_executable_extensions; do
5850       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5851         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5852       fi
5853     done
5854   done
5855 done
5856 lt_ac_max=0
5857 lt_ac_count=0
5858 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5859 # along with /bin/sed that truncates output.
5860 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5861   test ! -f $lt_ac_sed && continue
5862   cat /dev/null > conftest.in
5863   lt_ac_count=0
5864   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5865   # Check for GNU sed and select it if it is found.
5866   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5867     lt_cv_path_SED=$lt_ac_sed
5868     break
5869   fi
5870   while true; do
5871     cat conftest.in conftest.in >conftest.tmp
5872     mv conftest.tmp conftest.in
5873     cp conftest.in conftest.nl
5874     echo >>conftest.nl
5875     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5876     cmp -s conftest.out conftest.nl || break
5877     # 10000 chars as input seems more than enough
5878     test $lt_ac_count -gt 10 && break
5879     lt_ac_count=`expr $lt_ac_count + 1`
5880     if test $lt_ac_count -gt $lt_ac_max; then
5881       lt_ac_max=$lt_ac_count
5882       lt_cv_path_SED=$lt_ac_sed
5883     fi
5884   done
5885 done
5886
5887 fi
5888
5889 SED=$lt_cv_path_SED
5890 { echo "$as_me:$LINENO: result: $SED" >&5
5891 echo "${ECHO_T}$SED" >&6; }
5892
5893 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
5894 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
5895 if test "${ac_cv_path_GREP+set}" = set; then
5896   echo $ECHO_N "(cached) $ECHO_C" >&6
5897 else
5898   # Extract the first word of "grep ggrep" to use in msg output
5899 if test -z "$GREP"; then
5900 set dummy grep ggrep; ac_prog_name=$2
5901 if test "${ac_cv_path_GREP+set}" = set; then
5902   echo $ECHO_N "(cached) $ECHO_C" >&6
5903 else
5904   ac_path_GREP_found=false
5905 # Loop through the user's path and test for each of PROGNAME-LIST
5906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5907 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5908 do
5909   IFS=$as_save_IFS
5910   test -z "$as_dir" && as_dir=.
5911   for ac_prog in grep ggrep; do
5912   for ac_exec_ext in '' $ac_executable_extensions; do
5913     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5914     { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5915     # Check for GNU ac_path_GREP and select it if it is found.
5916   # Check for GNU $ac_path_GREP
5917 case `"$ac_path_GREP" --version 2>&1` in
5918 *GNU*)
5919   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5920 *)
5921   ac_count=0
5922   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
5923   while :
5924   do
5925     cat "conftest.in" "conftest.in" >"conftest.tmp"
5926     mv "conftest.tmp" "conftest.in"
5927     cp "conftest.in" "conftest.nl"
5928     echo 'GREP' >> "conftest.nl"
5929     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5930     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5931     ac_count=`expr $ac_count + 1`
5932     if test $ac_count -gt ${ac_path_GREP_max-0}; then
5933       # Best one so far, save it but keep looking for a better one
5934       ac_cv_path_GREP="$ac_path_GREP"
5935       ac_path_GREP_max=$ac_count
5936     fi
5937     # 10*(2^10) chars as input seems more than enough
5938     test $ac_count -gt 10 && break
5939   done
5940   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5941 esac
5942
5943
5944     $ac_path_GREP_found && break 3
5945   done
5946 done
5947
5948 done
5949 IFS=$as_save_IFS
5950
5951
5952 fi
5953
5954 GREP="$ac_cv_path_GREP"
5955 if test -z "$GREP"; then
5956   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
5957 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
5958    { (exit 1); exit 1; }; }
5959 fi
5960
5961 else
5962   ac_cv_path_GREP=$GREP
5963 fi
5964
5965
5966 fi
5967 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
5968 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
5969  GREP="$ac_cv_path_GREP"
5970
5971
5972 { echo "$as_me:$LINENO: checking for egrep" >&5
5973 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
5974 if test "${ac_cv_path_EGREP+set}" = set; then
5975   echo $ECHO_N "(cached) $ECHO_C" >&6
5976 else
5977   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5978    then ac_cv_path_EGREP="$GREP -E"
5979    else
5980      # Extract the first word of "egrep" to use in msg output
5981 if test -z "$EGREP"; then
5982 set dummy egrep; ac_prog_name=$2
5983 if test "${ac_cv_path_EGREP+set}" = set; then
5984   echo $ECHO_N "(cached) $ECHO_C" >&6
5985 else
5986   ac_path_EGREP_found=false
5987 # Loop through the user's path and test for each of PROGNAME-LIST
5988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5989 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5990 do
5991   IFS=$as_save_IFS
5992   test -z "$as_dir" && as_dir=.
5993   for ac_prog in egrep; do
5994   for ac_exec_ext in '' $ac_executable_extensions; do
5995     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5996     { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5997     # Check for GNU ac_path_EGREP and select it if it is found.
5998   # Check for GNU $ac_path_EGREP
5999 case `"$ac_path_EGREP" --version 2>&1` in
6000 *GNU*)
6001   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6002 *)
6003   ac_count=0
6004   echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
6005   while :
6006   do
6007     cat "conftest.in" "conftest.in" >"conftest.tmp"
6008     mv "conftest.tmp" "conftest.in"
6009     cp "conftest.in" "conftest.nl"
6010     echo 'EGREP' >> "conftest.nl"
6011     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6012     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6013     ac_count=`expr $ac_count + 1`
6014     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6015       # Best one so far, save it but keep looking for a better one
6016       ac_cv_path_EGREP="$ac_path_EGREP"
6017       ac_path_EGREP_max=$ac_count
6018     fi
6019     # 10*(2^10) chars as input seems more than enough
6020     test $ac_count -gt 10 && break
6021   done
6022   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6023 esac
6024
6025
6026     $ac_path_EGREP_found && break 3
6027   done
6028 done
6029
6030 done
6031 IFS=$as_save_IFS
6032
6033
6034 fi
6035
6036 EGREP="$ac_cv_path_EGREP"
6037 if test -z "$EGREP"; then
6038   { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
6039 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
6040    { (exit 1); exit 1; }; }
6041 fi
6042
6043 else
6044   ac_cv_path_EGREP=$EGREP
6045 fi
6046
6047
6048    fi
6049 fi
6050 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
6051 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
6052  EGREP="$ac_cv_path_EGREP"
6053
6054
6055
6056 # Check whether --with-gnu-ld was given.
6057 if test "${with_gnu_ld+set}" = set; then
6058   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6059 else
6060   with_gnu_ld=no
6061 fi
6062
6063 ac_prog=ld
6064 if test "$GCC" = yes; then
6065   # Check if gcc -print-prog-name=ld gives a path.
6066   { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
6067 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
6068   case $host in
6069   *-*-mingw*)
6070     # gcc leaves a trailing carriage return which upsets mingw
6071     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6072   *)
6073     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6074   esac
6075   case $ac_prog in
6076     # Accept absolute paths.
6077     [\\/]* | ?:[\\/]*)
6078       re_direlt='/[^/][^/]*/\.\./'
6079       # Canonicalize the pathname of ld
6080       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
6081       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6082         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
6083       done
6084       test -z "$LD" && LD="$ac_prog"
6085       ;;
6086   "")
6087     # If it fails, then pretend we aren't using GCC.
6088     ac_prog=ld
6089     ;;
6090   *)
6091     # If it is relative, then search for the first ld in PATH.
6092     with_gnu_ld=unknown
6093     ;;
6094   esac
6095 elif test "$with_gnu_ld" = yes; then
6096   { echo "$as_me:$LINENO: checking for GNU ld" >&5
6097 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
6098 else
6099   { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
6100 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
6101 fi
6102 if test "${lt_cv_path_LD+set}" = set; then
6103   echo $ECHO_N "(cached) $ECHO_C" >&6
6104 else
6105   if test -z "$LD"; then
6106   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6107   for ac_dir in $PATH; do
6108     IFS="$lt_save_ifs"
6109     test -z "$ac_dir" && ac_dir=.
6110     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6111       lt_cv_path_LD="$ac_dir/$ac_prog"
6112       # Check to see if the program is GNU ld.  I'd rather use --version,
6113       # but apparently some variants of GNU ld only accept -v.
6114       # Break only if it was the GNU/non-GNU ld that we prefer.
6115       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6116       *GNU* | *'with BFD'*)
6117         test "$with_gnu_ld" != no && break
6118         ;;
6119       *)
6120         test "$with_gnu_ld" != yes && break
6121         ;;
6122       esac
6123     fi
6124   done
6125   IFS="$lt_save_ifs"
6126 else
6127   lt_cv_path_LD="$LD" # Let the user override the test with a path.
6128 fi
6129 fi
6130
6131 LD="$lt_cv_path_LD"
6132 if test -n "$LD"; then
6133   { echo "$as_me:$LINENO: result: $LD" >&5
6134 echo "${ECHO_T}$LD" >&6; }
6135 else
6136   { echo "$as_me:$LINENO: result: no" >&5
6137 echo "${ECHO_T}no" >&6; }
6138 fi
6139 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
6140 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
6141    { (exit 1); exit 1; }; }
6142 { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
6143 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
6144 if test "${lt_cv_prog_gnu_ld+set}" = set; then
6145   echo $ECHO_N "(cached) $ECHO_C" >&6
6146 else
6147   # I'd rather use --version here, but apparently some GNU lds only accept -v.
6148 case `$LD -v 2>&1 </dev/null` in
6149 *GNU* | *'with BFD'*)
6150   lt_cv_prog_gnu_ld=yes
6151   ;;
6152 *)
6153   lt_cv_prog_gnu_ld=no
6154   ;;
6155 esac
6156 fi
6157 { echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
6158 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
6159 with_gnu_ld=$lt_cv_prog_gnu_ld
6160
6161
6162 { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
6163 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; }
6164 if test "${lt_cv_ld_reload_flag+set}" = set; then
6165   echo $ECHO_N "(cached) $ECHO_C" >&6
6166 else
6167   lt_cv_ld_reload_flag='-r'
6168 fi
6169 { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
6170 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; }
6171 reload_flag=$lt_cv_ld_reload_flag
6172 case $reload_flag in
6173 "" | " "*) ;;
6174 *) reload_flag=" $reload_flag" ;;
6175 esac
6176 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6177 case $host_os in
6178   darwin*)
6179     if test "$GCC" = yes; then
6180       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
6181     else
6182       reload_cmds='$LD$reload_flag -o $output$reload_objs'
6183     fi
6184     ;;
6185 esac
6186
6187 { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
6188 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; }
6189 if test "${lt_cv_path_NM+set}" = set; then
6190   echo $ECHO_N "(cached) $ECHO_C" >&6
6191 else
6192   if test -n "$NM"; then
6193   # Let the user override the test.
6194   lt_cv_path_NM="$NM"
6195 else
6196   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6197   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
6198     IFS="$lt_save_ifs"
6199     test -z "$ac_dir" && ac_dir=.
6200     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
6201     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6202       # Check to see if the nm accepts a BSD-compat flag.
6203       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
6204       #   nm: unknown option "B" ignored
6205       # Tru64's nm complains that /dev/null is an invalid object file
6206       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
6207       */dev/null* | *'Invalid file or object type'*)
6208         lt_cv_path_NM="$tmp_nm -B"
6209         break
6210         ;;
6211       *)
6212         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
6213         */dev/null*)
6214           lt_cv_path_NM="$tmp_nm -p"
6215           break
6216           ;;
6217         *)
6218           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6219           continue # so that we can try to find one that supports BSD flags
6220           ;;
6221         esac
6222       esac
6223     fi
6224   done
6225   IFS="$lt_save_ifs"
6226   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
6227 fi
6228 fi
6229 { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
6230 echo "${ECHO_T}$lt_cv_path_NM" >&6; }
6231 NM="$lt_cv_path_NM"
6232
6233 { echo "$as_me:$LINENO: checking whether ln -s works" >&5
6234 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
6235 LN_S=$as_ln_s
6236 if test "$LN_S" = "ln -s"; then
6237   { echo "$as_me:$LINENO: result: yes" >&5
6238 echo "${ECHO_T}yes" >&6; }
6239 else
6240   { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
6241 echo "${ECHO_T}no, using $LN_S" >&6; }
6242 fi
6243
6244 { echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
6245 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; }
6246 if test "${lt_cv_deplibs_check_method+set}" = set; then
6247   echo $ECHO_N "(cached) $ECHO_C" >&6
6248 else
6249   lt_cv_file_magic_cmd='$MAGIC_CMD'
6250 lt_cv_file_magic_test_file=
6251 lt_cv_deplibs_check_method='unknown'
6252 # Need to set the preceding variable on all platforms that support
6253 # interlibrary dependencies.
6254 # 'none' -- dependencies not supported.
6255 # `unknown' -- same as none, but documents that we really don't know.
6256 # 'pass_all' -- all dependencies passed with no checks.
6257 # 'test_compile' -- check by making test program.
6258 # 'file_magic [[regex]]' -- check by looking for files in library path
6259 # which responds to the $file_magic_cmd with a given extended regex.
6260 # If you have `file' or equivalent on your system and you're not sure
6261 # whether `pass_all' will *always* work, you probably want this one.
6262
6263 case $host_os in
6264 aix4* | aix5*)
6265   lt_cv_deplibs_check_method=pass_all
6266   ;;
6267
6268 beos*)
6269   lt_cv_deplibs_check_method=pass_all
6270   ;;
6271
6272 bsdi[45]*)
6273   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6274   lt_cv_file_magic_cmd='/usr/bin/file -L'
6275   lt_cv_file_magic_test_file=/shlib/libc.so
6276   ;;
6277
6278 cygwin*)
6279   # func_win32_libid is a shell function defined in ltmain.sh
6280   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6281   lt_cv_file_magic_cmd='func_win32_libid'
6282   ;;
6283
6284 mingw* | pw32*)
6285   # Base MSYS/MinGW do not provide the 'file' command needed by
6286   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
6287   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6288   lt_cv_file_magic_cmd='$OBJDUMP -f'
6289   ;;
6290
6291 darwin* | rhapsody*)
6292   lt_cv_deplibs_check_method=pass_all
6293   ;;
6294
6295 freebsd* | kfreebsd*-gnu | dragonfly*)
6296   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6297     case $host_cpu in
6298     i*86 )
6299       # Not sure whether the presence of OpenBSD here was a mistake.
6300       # Let's accept both of them until this is cleared up.
6301       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6302       lt_cv_file_magic_cmd=/usr/bin/file
6303       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6304       ;;
6305     esac
6306   else
6307     lt_cv_deplibs_check_method=pass_all
6308   fi
6309   ;;
6310
6311 gnu*)
6312   lt_cv_deplibs_check_method=pass_all
6313   ;;
6314
6315 hpux10.20* | hpux11*)
6316   lt_cv_file_magic_cmd=/usr/bin/file
6317   case $host_cpu in
6318   ia64*)
6319     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6320     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6321     ;;
6322   hppa*64*)
6323     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
6324     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6325     ;;
6326   *)
6327     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
6328     lt_cv_file_magic_test_file=/usr/lib/libc.sl
6329     ;;
6330   esac
6331   ;;
6332
6333 irix5* | irix6* | nonstopux*)
6334   case $LD in
6335   *-32|*"-32 ") libmagic=32-bit;;
6336   *-n32|*"-n32 ") libmagic=N32;;
6337   *-64|*"-64 ") libmagic=64-bit;;
6338   *) libmagic=never-match;;
6339   esac
6340   lt_cv_deplibs_check_method=pass_all
6341   ;;
6342
6343 # This must be Linux ELF.
6344 linux*)
6345   lt_cv_deplibs_check_method=pass_all
6346   ;;
6347
6348 netbsd*)
6349   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6350     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6351   else
6352     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6353   fi
6354   ;;
6355
6356 newos6*)
6357   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6358   lt_cv_file_magic_cmd=/usr/bin/file
6359   lt_cv_file_magic_test_file=/usr/lib/libnls.so
6360   ;;
6361
6362 nto-qnx*)
6363   lt_cv_deplibs_check_method=unknown
6364   ;;
6365
6366 openbsd*)
6367   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6368     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6369   else
6370     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6371   fi
6372   ;;
6373
6374 osf3* | osf4* | osf5*)
6375   lt_cv_deplibs_check_method=pass_all
6376   ;;
6377
6378 sco3.2v5*)
6379   lt_cv_deplibs_check_method=pass_all
6380   ;;
6381
6382 solaris*)
6383   lt_cv_deplibs_check_method=pass_all
6384   ;;
6385
6386 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6387   case $host_vendor in
6388   motorola)
6389     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]'
6390     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6391     ;;
6392   ncr)
6393     lt_cv_deplibs_check_method=pass_all
6394     ;;
6395   sequent)
6396     lt_cv_file_magic_cmd='/bin/file'
6397     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6398     ;;
6399   sni)
6400     lt_cv_file_magic_cmd='/bin/file'
6401     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6402     lt_cv_file_magic_test_file=/lib/libc.so
6403     ;;
6404   siemens)
6405     lt_cv_deplibs_check_method=pass_all
6406     ;;
6407   esac
6408   ;;
6409
6410 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
6411   lt_cv_deplibs_check_method=pass_all
6412   ;;
6413 esac
6414
6415 fi
6416 { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
6417 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; }
6418 file_magic_cmd=$lt_cv_file_magic_cmd
6419 deplibs_check_method=$lt_cv_deplibs_check_method
6420 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6421
6422
6423
6424
6425 # If no C compiler was specified, use CC.
6426 LTCC=${LTCC-"$CC"}
6427
6428 # Allow CC to be a program name with arguments.
6429 compiler=$CC
6430
6431
6432 # Check whether --enable-libtool-lock was given.
6433 if test "${enable_libtool_lock+set}" = set; then
6434   enableval=$enable_libtool_lock;
6435 fi
6436
6437 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6438
6439 # Some flags need to be propagated to the compiler or linker for good
6440 # libtool support.
6441 case $host in
6442 ia64-*-hpux*)
6443   # Find out which ABI we are using.
6444   echo 'int i;' > conftest.$ac_ext
6445   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6446   (eval $ac_compile) 2>&5
6447   ac_status=$?
6448   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6449   (exit $ac_status); }; then
6450     case `/usr/bin/file conftest.$ac_objext` in
6451     *ELF-32*)
6452       HPUX_IA64_MODE="32"
6453       ;;
6454     *ELF-64*)
6455       HPUX_IA64_MODE="64"
6456       ;;
6457     esac
6458   fi
6459   rm -rf conftest*
6460   ;;
6461 *-*-irix6*)
6462   # Find out which ABI we are using.
6463   echo '#line 6463 "configure"' > conftest.$ac_ext
6464   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6465   (eval $ac_compile) 2>&5
6466   ac_status=$?
6467   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6468   (exit $ac_status); }; then
6469    if test "$lt_cv_prog_gnu_ld" = yes; then
6470     case `/usr/bin/file conftest.$ac_objext` in
6471     *32-bit*)
6472       LD="${LD-ld} -melf32bsmip"
6473       ;;
6474     *N32*)
6475       LD="${LD-ld} -melf32bmipn32"
6476       ;;
6477     *64-bit*)
6478       LD="${LD-ld} -melf64bmip"
6479       ;;
6480     esac
6481    else
6482     case `/usr/bin/file conftest.$ac_objext` in
6483     *32-bit*)
6484       LD="${LD-ld} -32"
6485       ;;
6486     *N32*)
6487       LD="${LD-ld} -n32"
6488       ;;
6489     *64-bit*)
6490       LD="${LD-ld} -64"
6491       ;;
6492     esac
6493    fi
6494   fi
6495   rm -rf conftest*
6496   ;;
6497
6498 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6499   # Find out which ABI we are using.
6500   echo 'int i;' > conftest.$ac_ext
6501   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6502   (eval $ac_compile) 2>&5
6503   ac_status=$?
6504   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6505   (exit $ac_status); }; then
6506     case `/usr/bin/file conftest.o` in
6507     *32-bit*)
6508       case $host in
6509         x86_64-*linux*)
6510           LD="${LD-ld} -m elf_i386"
6511           ;;
6512         ppc64-*linux*|powerpc64-*linux*)
6513           LD="${LD-ld} -m elf32ppclinux"
6514           ;;
6515         s390x-*linux*)
6516           LD="${LD-ld} -m elf_s390"
6517           ;;
6518         sparc64-*linux*)
6519           LD="${LD-ld} -m elf32_sparc"
6520           ;;
6521       esac
6522       ;;
6523     *64-bit*)
6524       case $host in
6525         x86_64-*linux*)
6526           LD="${LD-ld} -m elf_x86_64"
6527           ;;
6528         ppc*-*linux*|powerpc*-*linux*)
6529           LD="${LD-ld} -m elf64ppc"
6530           ;;
6531         s390*-*linux*)
6532           LD="${LD-ld} -m elf64_s390"
6533           ;;
6534         sparc*-*linux*)
6535           LD="${LD-ld} -m elf64_sparc"
6536           ;;
6537       esac
6538       ;;
6539     esac
6540   fi
6541   rm -rf conftest*
6542   ;;
6543
6544 *-*-sco3.2v5*)
6545   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6546   SAVE_CFLAGS="$CFLAGS"
6547   CFLAGS="$CFLAGS -belf"
6548   { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
6549 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; }
6550 if test "${lt_cv_cc_needs_belf+set}" = set; then
6551   echo $ECHO_N "(cached) $ECHO_C" >&6
6552 else
6553   ac_ext=c
6554 ac_cpp='$CPP $CPPFLAGS'
6555 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6556 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6557 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6558
6559      cat >conftest.$ac_ext <<_ACEOF
6560 /* confdefs.h.  */
6561 _ACEOF
6562 cat confdefs.h >>conftest.$ac_ext
6563 cat >>conftest.$ac_ext <<_ACEOF
6564 /* end confdefs.h.  */
6565
6566 int
6567 main ()
6568 {
6569
6570   ;
6571   return 0;
6572 }
6573 _ACEOF
6574 rm -f conftest.$ac_objext conftest$ac_exeext
6575 if { (ac_try="$ac_link"
6576 case "(($ac_try" in
6577   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6578   *) ac_try_echo=$ac_try;;
6579 esac
6580 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6581   (eval "$ac_link") 2>conftest.er1
6582   ac_status=$?
6583   grep -v '^ *+' conftest.er1 >conftest.err
6584   rm -f conftest.er1
6585   cat conftest.err >&5
6586   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6587   (exit $ac_status); } && {
6588          test -z "$ac_c_werror_flag" ||
6589          test ! -s conftest.err
6590        } && test -s conftest$ac_exeext &&
6591        $as_test_x conftest$ac_exeext; then
6592   lt_cv_cc_needs_belf=yes
6593 else
6594   echo "$as_me: failed program was:" >&5
6595 sed 's/^/| /' conftest.$ac_ext >&5
6596
6597         lt_cv_cc_needs_belf=no
6598 fi
6599
6600 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6601       conftest$ac_exeext conftest.$ac_ext
6602      ac_ext=c
6603 ac_cpp='$CPP $CPPFLAGS'
6604 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6605 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6606 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6607
6608 fi
6609 { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
6610 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; }
6611   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
6612     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
6613     CFLAGS="$SAVE_CFLAGS"
6614   fi
6615   ;;
6616 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
6617   if test -n "$ac_tool_prefix"; then
6618   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
6619 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
6620 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6621 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6622 if test "${ac_cv_prog_DLLTOOL+set}" = set; then
6623   echo $ECHO_N "(cached) $ECHO_C" >&6
6624 else
6625   if test -n "$DLLTOOL"; then
6626   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
6627 else
6628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6629 for as_dir in $PATH
6630 do
6631   IFS=$as_save_IFS
6632   test -z "$as_dir" && as_dir=.
6633   for ac_exec_ext in '' $ac_executable_extensions; do
6634   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6635     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6636     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6637     break 2
6638   fi
6639 done
6640 done
6641 IFS=$as_save_IFS
6642
6643 fi
6644 fi
6645 DLLTOOL=$ac_cv_prog_DLLTOOL
6646 if test -n "$DLLTOOL"; then
6647   { echo "$as_me:$LINENO: result: $DLLTOOL" >&5
6648 echo "${ECHO_T}$DLLTOOL" >&6; }
6649 else
6650   { echo "$as_me:$LINENO: result: no" >&5
6651 echo "${ECHO_T}no" >&6; }
6652 fi
6653
6654
6655 fi
6656 if test -z "$ac_cv_prog_DLLTOOL"; then
6657   ac_ct_DLLTOOL=$DLLTOOL
6658   # Extract the first word of "dlltool", so it can be a program name with args.
6659 set dummy dlltool; ac_word=$2
6660 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6662 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then
6663   echo $ECHO_N "(cached) $ECHO_C" >&6
6664 else
6665   if test -n "$ac_ct_DLLTOOL"; then
6666   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
6667 else
6668 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6669 for as_dir in $PATH
6670 do
6671   IFS=$as_save_IFS
6672   test -z "$as_dir" && as_dir=.
6673   for ac_exec_ext in '' $ac_executable_extensions; do
6674   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6675     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
6676     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6677     break 2
6678   fi
6679 done
6680 done
6681 IFS=$as_save_IFS
6682
6683 fi
6684 fi
6685 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
6686 if test -n "$ac_ct_DLLTOOL"; then
6687   { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5
6688 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; }
6689 else
6690   { echo "$as_me:$LINENO: result: no" >&5
6691 echo "${ECHO_T}no" >&6; }
6692 fi
6693
6694   if test "x$ac_ct_DLLTOOL" = x; then
6695     DLLTOOL="false"
6696   else
6697     case $cross_compiling:$ac_tool_warned in
6698 yes:)
6699 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6700 whose name does not start with the host triplet.  If you think this
6701 configuration is useful to you, please write to autoconf@gnu.org." >&5
6702 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6703 whose name does not start with the host triplet.  If you think this
6704 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6705 ac_tool_warned=yes ;;
6706 esac
6707     DLLTOOL=$ac_ct_DLLTOOL
6708   fi
6709 else
6710   DLLTOOL="$ac_cv_prog_DLLTOOL"
6711 fi
6712
6713   if test -n "$ac_tool_prefix"; then
6714   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
6715 set dummy ${ac_tool_prefix}as; ac_word=$2
6716 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6718 if test "${ac_cv_prog_AS+set}" = set; then
6719   echo $ECHO_N "(cached) $ECHO_C" >&6
6720 else
6721   if test -n "$AS"; then
6722   ac_cv_prog_AS="$AS" # Let the user override the test.
6723 else
6724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6725 for as_dir in $PATH
6726 do
6727   IFS=$as_save_IFS
6728   test -z "$as_dir" && as_dir=.
6729   for ac_exec_ext in '' $ac_executable_extensions; do
6730   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6731     ac_cv_prog_AS="${ac_tool_prefix}as"
6732     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6733     break 2
6734   fi
6735 done
6736 done
6737 IFS=$as_save_IFS
6738
6739 fi
6740 fi
6741 AS=$ac_cv_prog_AS
6742 if test -n "$AS"; then
6743   { echo "$as_me:$LINENO: result: $AS" >&5
6744 echo "${ECHO_T}$AS" >&6; }
6745 else
6746   { echo "$as_me:$LINENO: result: no" >&5
6747 echo "${ECHO_T}no" >&6; }
6748 fi
6749
6750
6751 fi
6752 if test -z "$ac_cv_prog_AS"; then
6753   ac_ct_AS=$AS
6754   # Extract the first word of "as", so it can be a program name with args.
6755 set dummy as; ac_word=$2
6756 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6758 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then
6759   echo $ECHO_N "(cached) $ECHO_C" >&6
6760 else
6761   if test -n "$ac_ct_AS"; then
6762   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
6763 else
6764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6765 for as_dir in $PATH
6766 do
6767   IFS=$as_save_IFS
6768   test -z "$as_dir" && as_dir=.
6769   for ac_exec_ext in '' $ac_executable_extensions; do
6770   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6771     ac_cv_prog_ac_ct_AS="as"
6772     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6773     break 2
6774   fi
6775 done
6776 done
6777 IFS=$as_save_IFS
6778
6779 fi
6780 fi
6781 ac_ct_AS=$ac_cv_prog_ac_ct_AS
6782 if test -n "$ac_ct_AS"; then
6783   { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5
6784 echo "${ECHO_T}$ac_ct_AS" >&6; }
6785 else
6786   { echo "$as_me:$LINENO: result: no" >&5
6787 echo "${ECHO_T}no" >&6; }
6788 fi
6789
6790   if test "x$ac_ct_AS" = x; then
6791     AS="false"
6792   else
6793     case $cross_compiling:$ac_tool_warned in
6794 yes:)
6795 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6796 whose name does not start with the host triplet.  If you think this
6797 configuration is useful to you, please write to autoconf@gnu.org." >&5
6798 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6799 whose name does not start with the host triplet.  If you think this
6800 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6801 ac_tool_warned=yes ;;
6802 esac
6803     AS=$ac_ct_AS
6804   fi
6805 else
6806   AS="$ac_cv_prog_AS"
6807 fi
6808
6809   if test -n "$ac_tool_prefix"; then
6810   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6811 set dummy ${ac_tool_prefix}objdump; ac_word=$2
6812 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6813 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6814 if test "${ac_cv_prog_OBJDUMP+set}" = set; then
6815   echo $ECHO_N "(cached) $ECHO_C" >&6
6816 else
6817   if test -n "$OBJDUMP"; then
6818   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6819 else
6820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6821 for as_dir in $PATH
6822 do
6823   IFS=$as_save_IFS
6824   test -z "$as_dir" && as_dir=.
6825   for ac_exec_ext in '' $ac_executable_extensions; do
6826   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6827     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6828     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6829     break 2
6830   fi
6831 done
6832 done
6833 IFS=$as_save_IFS
6834
6835 fi
6836 fi
6837 OBJDUMP=$ac_cv_prog_OBJDUMP
6838 if test -n "$OBJDUMP"; then
6839   { echo "$as_me:$LINENO: result: $OBJDUMP" >&5
6840 echo "${ECHO_T}$OBJDUMP" >&6; }
6841 else
6842   { echo "$as_me:$LINENO: result: no" >&5
6843 echo "${ECHO_T}no" >&6; }
6844 fi
6845
6846
6847 fi
6848 if test -z "$ac_cv_prog_OBJDUMP"; then
6849   ac_ct_OBJDUMP=$OBJDUMP
6850   # Extract the first word of "objdump", so it can be a program name with args.
6851 set dummy objdump; ac_word=$2
6852 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6854 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
6855   echo $ECHO_N "(cached) $ECHO_C" >&6
6856 else
6857   if test -n "$ac_ct_OBJDUMP"; then
6858   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6859 else
6860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6861 for as_dir in $PATH
6862 do
6863   IFS=$as_save_IFS
6864   test -z "$as_dir" && as_dir=.
6865   for ac_exec_ext in '' $ac_executable_extensions; do
6866   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6867     ac_cv_prog_ac_ct_OBJDUMP="objdump"
6868     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6869     break 2
6870   fi
6871 done
6872 done
6873 IFS=$as_save_IFS
6874
6875 fi
6876 fi
6877 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6878 if test -n "$ac_ct_OBJDUMP"; then
6879   { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
6880 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; }
6881 else
6882   { echo "$as_me:$LINENO: result: no" >&5
6883 echo "${ECHO_T}no" >&6; }
6884 fi
6885
6886   if test "x$ac_ct_OBJDUMP" = x; then
6887     OBJDUMP="false"
6888   else
6889     case $cross_compiling:$ac_tool_warned in
6890 yes:)
6891 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6892 whose name does not start with the host triplet.  If you think this
6893 configuration is useful to you, please write to autoconf@gnu.org." >&5
6894 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6895 whose name does not start with the host triplet.  If you think this
6896 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6897 ac_tool_warned=yes ;;
6898 esac
6899     OBJDUMP=$ac_ct_OBJDUMP
6900   fi
6901 else
6902   OBJDUMP="$ac_cv_prog_OBJDUMP"
6903 fi
6904
6905   ;;
6906
6907 esac
6908
6909 need_locks="$enable_libtool_lock"
6910
6911
6912 ac_ext=c
6913 ac_cpp='$CPP $CPPFLAGS'
6914 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6915 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6916 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6917 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
6918 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
6919 # On Suns, sometimes $CPP names a directory.
6920 if test -n "$CPP" && test -d "$CPP"; then
6921   CPP=
6922 fi
6923 if test -z "$CPP"; then
6924   if test "${ac_cv_prog_CPP+set}" = set; then
6925   echo $ECHO_N "(cached) $ECHO_C" >&6
6926 else
6927       # Double quotes because CPP needs to be expanded
6928     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6929     do
6930       ac_preproc_ok=false
6931 for ac_c_preproc_warn_flag in '' yes
6932 do
6933   # Use a header file that comes with gcc, so configuring glibc
6934   # with a fresh cross-compiler works.
6935   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6936   # <limits.h> exists even on freestanding compilers.
6937   # On the NeXT, cc -E runs the code through the compiler's parser,
6938   # not just through cpp. "Syntax error" is here to catch this case.
6939   cat >conftest.$ac_ext <<_ACEOF
6940 /* confdefs.h.  */
6941 _ACEOF
6942 cat confdefs.h >>conftest.$ac_ext
6943 cat >>conftest.$ac_ext <<_ACEOF
6944 /* end confdefs.h.  */
6945 #ifdef __STDC__
6946 # include <limits.h>
6947 #else
6948 # include <assert.h>
6949 #endif
6950                      Syntax error
6951 _ACEOF
6952 if { (ac_try="$ac_cpp conftest.$ac_ext"
6953 case "(($ac_try" in
6954   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6955   *) ac_try_echo=$ac_try;;
6956 esac
6957 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6958   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6959   ac_status=$?
6960   grep -v '^ *+' conftest.er1 >conftest.err
6961   rm -f conftest.er1
6962   cat conftest.err >&5
6963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6964   (exit $ac_status); } >/dev/null && {
6965          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6966          test ! -s conftest.err
6967        }; then
6968   :
6969 else
6970   echo "$as_me: failed program was:" >&5
6971 sed 's/^/| /' conftest.$ac_ext >&5
6972
6973   # Broken: fails on valid input.
6974 continue
6975 fi
6976
6977 rm -f conftest.err conftest.$ac_ext
6978
6979   # OK, works on sane cases.  Now check whether nonexistent headers
6980   # can be detected and how.
6981   cat >conftest.$ac_ext <<_ACEOF
6982 /* confdefs.h.  */
6983 _ACEOF
6984 cat confdefs.h >>conftest.$ac_ext
6985 cat >>conftest.$ac_ext <<_ACEOF
6986 /* end confdefs.h.  */
6987 #include <ac_nonexistent.h>
6988 _ACEOF
6989 if { (ac_try="$ac_cpp conftest.$ac_ext"
6990 case "(($ac_try" in
6991   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6992   *) ac_try_echo=$ac_try;;
6993 esac
6994 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6995   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6996   ac_status=$?
6997   grep -v '^ *+' conftest.er1 >conftest.err
6998   rm -f conftest.er1
6999   cat conftest.err >&5
7000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7001   (exit $ac_status); } >/dev/null && {
7002          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7003          test ! -s conftest.err
7004        }; then
7005   # Broken: success on invalid input.
7006 continue
7007 else
7008   echo "$as_me: failed program was:" >&5
7009 sed 's/^/| /' conftest.$ac_ext >&5
7010
7011   # Passes both tests.
7012 ac_preproc_ok=:
7013 break
7014 fi
7015
7016 rm -f conftest.err conftest.$ac_ext
7017
7018 done
7019 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7020 rm -f conftest.err conftest.$ac_ext
7021 if $ac_preproc_ok; then
7022   break
7023 fi
7024
7025     done
7026     ac_cv_prog_CPP=$CPP
7027
7028 fi
7029   CPP=$ac_cv_prog_CPP
7030 else
7031   ac_cv_prog_CPP=$CPP
7032 fi
7033 { echo "$as_me:$LINENO: result: $CPP" >&5
7034 echo "${ECHO_T}$CPP" >&6; }
7035 ac_preproc_ok=false
7036 for ac_c_preproc_warn_flag in '' yes
7037 do
7038   # Use a header file that comes with gcc, so configuring glibc
7039   # with a fresh cross-compiler works.
7040   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7041   # <limits.h> exists even on freestanding compilers.
7042   # On the NeXT, cc -E runs the code through the compiler's parser,
7043   # not just through cpp. "Syntax error" is here to catch this case.
7044   cat >conftest.$ac_ext <<_ACEOF
7045 /* confdefs.h.  */
7046 _ACEOF
7047 cat confdefs.h >>conftest.$ac_ext
7048 cat >>conftest.$ac_ext <<_ACEOF
7049 /* end confdefs.h.  */
7050 #ifdef __STDC__
7051 # include <limits.h>
7052 #else
7053 # include <assert.h>
7054 #endif
7055                      Syntax error
7056 _ACEOF
7057 if { (ac_try="$ac_cpp conftest.$ac_ext"
7058 case "(($ac_try" in
7059   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7060   *) ac_try_echo=$ac_try;;
7061 esac
7062 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7063   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7064   ac_status=$?
7065   grep -v '^ *+' conftest.er1 >conftest.err
7066   rm -f conftest.er1
7067   cat conftest.err >&5
7068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7069   (exit $ac_status); } >/dev/null && {
7070          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7071          test ! -s conftest.err
7072        }; then
7073   :
7074 else
7075   echo "$as_me: failed program was:" >&5
7076 sed 's/^/| /' conftest.$ac_ext >&5
7077
7078   # Broken: fails on valid input.
7079 continue
7080 fi
7081
7082 rm -f conftest.err conftest.$ac_ext
7083
7084   # OK, works on sane cases.  Now check whether nonexistent headers
7085   # can be detected and how.
7086   cat >conftest.$ac_ext <<_ACEOF
7087 /* confdefs.h.  */
7088 _ACEOF
7089 cat confdefs.h >>conftest.$ac_ext
7090 cat >>conftest.$ac_ext <<_ACEOF
7091 /* end confdefs.h.  */
7092 #include <ac_nonexistent.h>
7093 _ACEOF
7094 if { (ac_try="$ac_cpp conftest.$ac_ext"
7095 case "(($ac_try" in
7096   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7097   *) ac_try_echo=$ac_try;;
7098 esac
7099 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7100   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7101   ac_status=$?
7102   grep -v '^ *+' conftest.er1 >conftest.err
7103   rm -f conftest.er1
7104   cat conftest.err >&5
7105   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7106   (exit $ac_status); } >/dev/null && {
7107          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7108          test ! -s conftest.err
7109        }; then
7110   # Broken: success on invalid input.
7111 continue
7112 else
7113   echo "$as_me: failed program was:" >&5
7114 sed 's/^/| /' conftest.$ac_ext >&5
7115
7116   # Passes both tests.
7117 ac_preproc_ok=:
7118 break
7119 fi
7120
7121 rm -f conftest.err conftest.$ac_ext
7122
7123 done
7124 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7125 rm -f conftest.err conftest.$ac_ext
7126 if $ac_preproc_ok; then
7127   :
7128 else
7129   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
7130 See \`config.log' for more details." >&5
7131 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
7132 See \`config.log' for more details." >&2;}
7133    { (exit 1); exit 1; }; }
7134 fi
7135
7136 ac_ext=c
7137 ac_cpp='$CPP $CPPFLAGS'
7138 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7139 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7140 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7141
7142
7143 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
7144 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
7145 if test "${ac_cv_header_stdc+set}" = set; then
7146   echo $ECHO_N "(cached) $ECHO_C" >&6
7147 else
7148   cat >conftest.$ac_ext <<_ACEOF
7149 /* confdefs.h.  */
7150 _ACEOF
7151 cat confdefs.h >>conftest.$ac_ext
7152 cat >>conftest.$ac_ext <<_ACEOF
7153 /* end confdefs.h.  */
7154 #include <stdlib.h>
7155 #include <stdarg.h>
7156 #include <string.h>
7157 #include <float.h>
7158
7159 int
7160 main ()
7161 {
7162
7163   ;
7164   return 0;
7165 }
7166 _ACEOF
7167 rm -f conftest.$ac_objext
7168 if { (ac_try="$ac_compile"
7169 case "(($ac_try" in
7170   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7171   *) ac_try_echo=$ac_try;;
7172 esac
7173 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7174   (eval "$ac_compile") 2>conftest.er1
7175   ac_status=$?
7176   grep -v '^ *+' conftest.er1 >conftest.err
7177   rm -f conftest.er1
7178   cat conftest.err >&5
7179   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7180   (exit $ac_status); } && {
7181          test -z "$ac_c_werror_flag" ||
7182          test ! -s conftest.err
7183        } && test -s conftest.$ac_objext; then
7184   ac_cv_header_stdc=yes
7185 else
7186   echo "$as_me: failed program was:" >&5
7187 sed 's/^/| /' conftest.$ac_ext >&5
7188
7189         ac_cv_header_stdc=no
7190 fi
7191
7192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7193
7194 if test $ac_cv_header_stdc = yes; then
7195   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7196   cat >conftest.$ac_ext <<_ACEOF
7197 /* confdefs.h.  */
7198 _ACEOF
7199 cat confdefs.h >>conftest.$ac_ext
7200 cat >>conftest.$ac_ext <<_ACEOF
7201 /* end confdefs.h.  */
7202 #include <string.h>
7203
7204 _ACEOF
7205 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7206   $EGREP "memchr" >/dev/null 2>&1; then
7207   :
7208 else
7209   ac_cv_header_stdc=no
7210 fi
7211 rm -f conftest*
7212
7213 fi
7214
7215 if test $ac_cv_header_stdc = yes; then
7216   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7217   cat >conftest.$ac_ext <<_ACEOF
7218 /* confdefs.h.  */
7219 _ACEOF
7220 cat confdefs.h >>conftest.$ac_ext
7221 cat >>conftest.$ac_ext <<_ACEOF
7222 /* end confdefs.h.  */
7223 #include <stdlib.h>
7224
7225 _ACEOF
7226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7227   $EGREP "free" >/dev/null 2>&1; then
7228   :
7229 else
7230   ac_cv_header_stdc=no
7231 fi
7232 rm -f conftest*
7233
7234 fi
7235
7236 if test $ac_cv_header_stdc = yes; then
7237   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7238   if test "$cross_compiling" = yes; then
7239   :
7240 else
7241   cat >conftest.$ac_ext <<_ACEOF
7242 /* confdefs.h.  */
7243 _ACEOF
7244 cat confdefs.h >>conftest.$ac_ext
7245 cat >>conftest.$ac_ext <<_ACEOF
7246 /* end confdefs.h.  */
7247 #include <ctype.h>
7248 #include <stdlib.h>
7249 #if ((' ' & 0x0FF) == 0x020)
7250 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7251 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7252 #else
7253 # define ISLOWER(c) \
7254                    (('a' <= (c) && (c) <= 'i') \
7255                      || ('j' <= (c) && (c) <= 'r') \
7256                      || ('s' <= (c) && (c) <= 'z'))
7257 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7258 #endif
7259
7260 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7261 int
7262 main ()
7263 {
7264   int i;
7265   for (i = 0; i < 256; i++)
7266     if (XOR (islower (i), ISLOWER (i))
7267         || toupper (i) != TOUPPER (i))
7268       return 2;
7269   return 0;
7270 }
7271 _ACEOF
7272 rm -f conftest$ac_exeext
7273 if { (ac_try="$ac_link"
7274 case "(($ac_try" in
7275   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7276   *) ac_try_echo=$ac_try;;
7277 esac
7278 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7279   (eval "$ac_link") 2>&5
7280   ac_status=$?
7281   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7282   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7283   { (case "(($ac_try" in
7284   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7285   *) ac_try_echo=$ac_try;;
7286 esac
7287 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7288   (eval "$ac_try") 2>&5
7289   ac_status=$?
7290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7291   (exit $ac_status); }; }; then
7292   :
7293 else
7294   echo "$as_me: program exited with status $ac_status" >&5
7295 echo "$as_me: failed program was:" >&5
7296 sed 's/^/| /' conftest.$ac_ext >&5
7297
7298 ( exit $ac_status )
7299 ac_cv_header_stdc=no
7300 fi
7301 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7302 fi
7303
7304
7305 fi
7306 fi
7307 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7308 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
7309 if test $ac_cv_header_stdc = yes; then
7310
7311 cat >>confdefs.h <<\_ACEOF
7312 #define STDC_HEADERS 1
7313 _ACEOF
7314
7315 fi
7316
7317 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7328                   inttypes.h stdint.h unistd.h
7329 do
7330 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7331 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7332 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7333 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7334   echo $ECHO_N "(cached) $ECHO_C" >&6
7335 else
7336   cat >conftest.$ac_ext <<_ACEOF
7337 /* confdefs.h.  */
7338 _ACEOF
7339 cat confdefs.h >>conftest.$ac_ext
7340 cat >>conftest.$ac_ext <<_ACEOF
7341 /* end confdefs.h.  */
7342 $ac_includes_default
7343
7344 #include <$ac_header>
7345 _ACEOF
7346 rm -f conftest.$ac_objext
7347 if { (ac_try="$ac_compile"
7348 case "(($ac_try" in
7349   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7350   *) ac_try_echo=$ac_try;;
7351 esac
7352 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7353   (eval "$ac_compile") 2>conftest.er1
7354   ac_status=$?
7355   grep -v '^ *+' conftest.er1 >conftest.err
7356   rm -f conftest.er1
7357   cat conftest.err >&5
7358   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7359   (exit $ac_status); } && {
7360          test -z "$ac_c_werror_flag" ||
7361          test ! -s conftest.err
7362        } && test -s conftest.$ac_objext; then
7363   eval "$as_ac_Header=yes"
7364 else
7365   echo "$as_me: failed program was:" >&5
7366 sed 's/^/| /' conftest.$ac_ext >&5
7367
7368         eval "$as_ac_Header=no"
7369 fi
7370
7371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7372 fi
7373 ac_res=`eval echo '${'$as_ac_Header'}'`
7374                { echo "$as_me:$LINENO: result: $ac_res" >&5
7375 echo "${ECHO_T}$ac_res" >&6; }
7376 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7377   cat >>confdefs.h <<_ACEOF
7378 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7379 _ACEOF
7380
7381 fi
7382
7383 done
7384
7385
7386
7387 for ac_header in dlfcn.h
7388 do
7389 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7390 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7391   { echo "$as_me:$LINENO: checking for $ac_header" >&5
7392 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7393 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7394   echo $ECHO_N "(cached) $ECHO_C" >&6
7395 fi
7396 ac_res=`eval echo '${'$as_ac_Header'}'`
7397                { echo "$as_me:$LINENO: result: $ac_res" >&5
7398 echo "${ECHO_T}$ac_res" >&6; }
7399 else
7400   # Is the header compilable?
7401 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
7402 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7403 cat >conftest.$ac_ext <<_ACEOF
7404 /* confdefs.h.  */
7405 _ACEOF
7406 cat confdefs.h >>conftest.$ac_ext
7407 cat >>conftest.$ac_ext <<_ACEOF
7408 /* end confdefs.h.  */
7409 $ac_includes_default
7410 #include <$ac_header>
7411 _ACEOF
7412 rm -f conftest.$ac_objext
7413 if { (ac_try="$ac_compile"
7414 case "(($ac_try" in
7415   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7416   *) ac_try_echo=$ac_try;;
7417 esac
7418 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7419   (eval "$ac_compile") 2>conftest.er1
7420   ac_status=$?
7421   grep -v '^ *+' conftest.er1 >conftest.err
7422   rm -f conftest.er1
7423   cat conftest.err >&5
7424   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7425   (exit $ac_status); } && {
7426          test -z "$ac_c_werror_flag" ||
7427          test ! -s conftest.err
7428        } && test -s conftest.$ac_objext; then
7429   ac_header_compiler=yes
7430 else
7431   echo "$as_me: failed program was:" >&5
7432 sed 's/^/| /' conftest.$ac_ext >&5
7433
7434         ac_header_compiler=no
7435 fi
7436
7437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7438 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7439 echo "${ECHO_T}$ac_header_compiler" >&6; }
7440
7441 # Is the header present?
7442 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
7443 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7444 cat >conftest.$ac_ext <<_ACEOF
7445 /* confdefs.h.  */
7446 _ACEOF
7447 cat confdefs.h >>conftest.$ac_ext
7448 cat >>conftest.$ac_ext <<_ACEOF
7449 /* end confdefs.h.  */
7450 #include <$ac_header>
7451 _ACEOF
7452 if { (ac_try="$ac_cpp conftest.$ac_ext"
7453 case "(($ac_try" in
7454   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7455   *) ac_try_echo=$ac_try;;
7456 esac
7457 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7458   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7459   ac_status=$?
7460   grep -v '^ *+' conftest.er1 >conftest.err
7461   rm -f conftest.er1
7462   cat conftest.err >&5
7463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7464   (exit $ac_status); } >/dev/null && {
7465          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7466          test ! -s conftest.err
7467        }; then
7468   ac_header_preproc=yes
7469 else
7470   echo "$as_me: failed program was:" >&5
7471 sed 's/^/| /' conftest.$ac_ext >&5
7472
7473   ac_header_preproc=no
7474 fi
7475
7476 rm -f conftest.err conftest.$ac_ext
7477 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7478 echo "${ECHO_T}$ac_header_preproc" >&6; }
7479
7480 # So?  What about this header?
7481 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7482   yes:no: )
7483     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7484 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
7485     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7486 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7487     ac_header_preproc=yes
7488     ;;
7489   no:yes:* )
7490     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7491 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
7492     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
7493 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
7494     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7495 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7496     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
7497 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
7498     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7499 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
7500     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7501 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
7502     ( cat <<\_ASBOX
7503 ## --------------------------------------------- ##
7504 ## Report this to <http://www.openldap.org/its/> ##
7505 ## --------------------------------------------- ##
7506 _ASBOX
7507      ) | sed "s/^/$as_me: WARNING:     /" >&2
7508     ;;
7509 esac
7510 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7511 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7512 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7513   echo $ECHO_N "(cached) $ECHO_C" >&6
7514 else
7515   eval "$as_ac_Header=\$ac_header_preproc"
7516 fi
7517 ac_res=`eval echo '${'$as_ac_Header'}'`
7518                { echo "$as_me:$LINENO: result: $ac_res" >&5
7519 echo "${ECHO_T}$ac_res" >&6; }
7520
7521 fi
7522 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7523   cat >>confdefs.h <<_ACEOF
7524 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7525 _ACEOF
7526
7527 fi
7528
7529 done
7530
7531
7532 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
7533
7534 # find the maximum length of command line arguments
7535 { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
7536 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; }
7537 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
7538   echo $ECHO_N "(cached) $ECHO_C" >&6
7539 else
7540     i=0
7541   teststring="ABCD"
7542
7543   case $build_os in
7544   msdosdjgpp*)
7545     # On DJGPP, this test can blow up pretty badly due to problems in libc
7546     # (any single argument exceeding 2000 bytes causes a buffer overrun
7547     # during glob expansion).  Even if it were fixed, the result of this
7548     # check would be larger than it should be.
7549     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7550     ;;
7551
7552   gnu*)
7553     # Under GNU Hurd, this test is not required because there is
7554     # no limit to the length of command line arguments.
7555     # Libtool will interpret -1 as no limit whatsoever
7556     lt_cv_sys_max_cmd_len=-1;
7557     ;;
7558
7559   cygwin* | mingw*)
7560     # On Win9x/ME, this test blows up -- it succeeds, but takes
7561     # about 5 minutes as the teststring grows exponentially.
7562     # Worse, since 9x/ME are not pre-emptively multitasking,
7563     # you end up with a "frozen" computer, even though with patience
7564     # the test eventually succeeds (with a max line length of 256k).
7565     # Instead, let's just punt: use the minimum linelength reported by
7566     # all of the supported platforms: 8192 (on NT/2K/XP).
7567     lt_cv_sys_max_cmd_len=8192;
7568     ;;
7569
7570   amigaos*)
7571     # On AmigaOS with pdksh, this test takes hours, literally.
7572     # So we just punt and use a minimum line length of 8192.
7573     lt_cv_sys_max_cmd_len=8192;
7574     ;;
7575
7576   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7577     # This has been around since 386BSD, at least.  Likely further.
7578     if test -x /sbin/sysctl; then
7579       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7580     elif test -x /usr/sbin/sysctl; then
7581       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7582     else
7583       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7584     fi
7585     # And add a safety zone
7586     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7587     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7588     ;;
7589   osf*)
7590     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7591     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7592     # nice to cause kernel panics so lets avoid the loop below.
7593     # First set a reasonable default.
7594     lt_cv_sys_max_cmd_len=16384
7595     #
7596     if test -x /sbin/sysconfig; then
7597       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7598         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7599       esac
7600     fi
7601     ;;
7602   *)
7603     # If test is not a shell built-in, we'll probably end up computing a
7604     # maximum length that is only half of the actual maximum length, but
7605     # we can't tell.
7606     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7607     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
7608                = "XX$teststring") >/dev/null 2>&1 &&
7609             new_result=`expr "X$teststring" : ".*" 2>&1` &&
7610             lt_cv_sys_max_cmd_len=$new_result &&
7611             test $i != 17 # 1/2 MB should be enough
7612     do
7613       i=`expr $i + 1`
7614       teststring=$teststring$teststring
7615     done
7616     teststring=
7617     # Add a significant safety factor because C++ compilers can tack on massive
7618     # amounts of additional arguments before passing them to the linker.
7619     # It appears as though 1/2 is a usable value.
7620     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7621     ;;
7622   esac
7623
7624 fi
7625
7626 if test -n $lt_cv_sys_max_cmd_len ; then
7627   { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
7628 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; }
7629 else
7630   { echo "$as_me:$LINENO: result: none" >&5
7631 echo "${ECHO_T}none" >&6; }
7632 fi
7633
7634
7635
7636
7637 # Check for command to grab the raw symbol name followed by C symbol from nm.
7638 { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
7639 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
7640 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
7641   echo $ECHO_N "(cached) $ECHO_C" >&6
7642 else
7643
7644 # These are sane defaults that work on at least a few old systems.
7645 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
7646
7647 # Character class describing NM global symbol codes.
7648 symcode='[BCDEGRST]'
7649
7650 # Regexp to match symbols that can be accessed directly from C.
7651 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7652
7653 # Transform an extracted symbol line into a proper C declaration
7654 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
7655
7656 # Transform an extracted symbol line into symbol name and symbol address
7657 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
7658
7659 # Define system-specific variables.
7660 case $host_os in
7661 aix*)
7662   symcode='[BCDT]'
7663   ;;
7664 cygwin* | mingw* | pw32*)
7665   symcode='[ABCDGISTW]'
7666   ;;
7667 hpux*) # Its linker distinguishes data from code symbols
7668   if test "$host_cpu" = ia64; then
7669     symcode='[ABCDEGRST]'
7670   fi
7671   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7672   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
7673   ;;
7674 linux*)
7675   if test "$host_cpu" = ia64; then
7676     symcode='[ABCDGIRSTW]'
7677     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7678     lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
7679   fi
7680   ;;
7681 irix* | nonstopux*)
7682   symcode='[BCDEGRST]'
7683   ;;
7684 osf*)
7685   symcode='[BCDEGQRST]'
7686   ;;
7687 solaris* | sysv5*)
7688   symcode='[BDRT]'
7689   ;;
7690 sysv4)
7691   symcode='[DFNSTU]'
7692   ;;
7693 esac
7694
7695 # Handle CRLF in mingw tool chain
7696 opt_cr=
7697 case $build_os in
7698 mingw*)
7699   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7700   ;;
7701 esac
7702
7703 # If we're using GNU nm, then use its standard symbol codes.
7704 case `$NM -V 2>&1` in
7705 *GNU* | *'with BFD'*)
7706   symcode='[ABCDGIRSTW]' ;;
7707 esac
7708
7709 # Try without a prefix undercore, then with it.
7710 for ac_symprfx in "" "_"; do
7711
7712   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7713   symxfrm="\\1 $ac_symprfx\\2 \\2"
7714
7715   # Write the raw and C identifiers.
7716   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7717
7718   # Check to see that the pipe works correctly.
7719   pipe_works=no
7720
7721   rm -f conftest*
7722   cat > conftest.$ac_ext <<EOF
7723 #ifdef __cplusplus
7724 extern "C" {
7725 #endif
7726 char nm_test_var;
7727 void nm_test_func(){}
7728 #ifdef __cplusplus
7729 }
7730 #endif
7731 int main(){nm_test_var='a';nm_test_func();return(0);}
7732 EOF
7733
7734   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7735   (eval $ac_compile) 2>&5
7736   ac_status=$?
7737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7738   (exit $ac_status); }; then
7739     # Now try to grab the symbols.
7740     nlist=conftest.nm
7741     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
7742   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
7743   ac_status=$?
7744   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7745   (exit $ac_status); } && test -s "$nlist"; then
7746       # Try sorting and uniquifying the output.
7747       if sort "$nlist" | uniq > "$nlist"T; then
7748         mv -f "$nlist"T "$nlist"
7749       else
7750         rm -f "$nlist"T
7751       fi
7752
7753       # Make sure that we snagged all the symbols we need.
7754       if grep ' nm_test_var$' "$nlist" >/dev/null; then
7755         if grep ' nm_test_func$' "$nlist" >/dev/null; then
7756           cat <<EOF > conftest.$ac_ext
7757 #ifdef __cplusplus
7758 extern "C" {
7759 #endif
7760
7761 EOF
7762           # Now generate the symbol file.
7763           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7764
7765           cat <<EOF >> conftest.$ac_ext
7766 #if defined (__STDC__) && __STDC__
7767 # define lt_ptr_t void *
7768 #else
7769 # define lt_ptr_t char *
7770 # define const
7771 #endif
7772
7773 /* The mapping between symbol names and symbols. */
7774 const struct {
7775   const char *name;
7776   lt_ptr_t address;
7777 }
7778 lt_preloaded_symbols[] =
7779 {
7780 EOF
7781           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7782           cat <<\EOF >> conftest.$ac_ext
7783   {0, (lt_ptr_t) 0}
7784 };
7785
7786 #ifdef __cplusplus
7787 }
7788 #endif
7789 EOF
7790           # Now try linking the two files.
7791           mv conftest.$ac_objext conftstm.$ac_objext
7792           lt_save_LIBS="$LIBS"
7793           lt_save_CFLAGS="$CFLAGS"
7794           LIBS="conftstm.$ac_objext"
7795           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7796           if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7797   (eval $ac_link) 2>&5
7798   ac_status=$?
7799   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7800   (exit $ac_status); } && test -s conftest${ac_exeext}; then
7801             pipe_works=yes
7802           fi
7803           LIBS="$lt_save_LIBS"
7804           CFLAGS="$lt_save_CFLAGS"
7805         else
7806           echo "cannot find nm_test_func in $nlist" >&5
7807         fi
7808       else
7809         echo "cannot find nm_test_var in $nlist" >&5
7810       fi
7811     else
7812       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7813     fi
7814   else
7815     echo "$progname: failed program was:" >&5
7816     cat conftest.$ac_ext >&5
7817   fi
7818   rm -f conftest* conftst*
7819
7820   # Do not use the global_symbol_pipe unless it works.
7821   if test "$pipe_works" = yes; then
7822     break
7823   else
7824     lt_cv_sys_global_symbol_pipe=
7825   fi
7826 done
7827
7828 fi
7829
7830 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7831   lt_cv_sys_global_symbol_to_cdecl=
7832 fi
7833 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7834   { echo "$as_me:$LINENO: result: failed" >&5
7835 echo "${ECHO_T}failed" >&6; }
7836 else
7837   { echo "$as_me:$LINENO: result: ok" >&5
7838 echo "${ECHO_T}ok" >&6; }
7839 fi
7840
7841 { echo "$as_me:$LINENO: checking for objdir" >&5
7842 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; }
7843 if test "${lt_cv_objdir+set}" = set; then
7844   echo $ECHO_N "(cached) $ECHO_C" >&6
7845 else
7846   rm -f .libs 2>/dev/null
7847 mkdir .libs 2>/dev/null
7848 if test -d .libs; then
7849   lt_cv_objdir=.libs
7850 else
7851   # MS-DOS does not allow filenames that begin with a dot.
7852   lt_cv_objdir=_libs
7853 fi
7854 rmdir .libs 2>/dev/null
7855 fi
7856 { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
7857 echo "${ECHO_T}$lt_cv_objdir" >&6; }
7858 objdir=$lt_cv_objdir
7859
7860
7861
7862
7863
7864 case $host_os in
7865 aix3*)
7866   # AIX sometimes has problems with the GCC collect2 program.  For some
7867   # reason, if we set the COLLECT_NAMES environment variable, the problems
7868   # vanish in a puff of smoke.
7869   if test "X${COLLECT_NAMES+set}" != Xset; then
7870     COLLECT_NAMES=
7871     export COLLECT_NAMES
7872   fi
7873   ;;
7874 esac
7875
7876 # Sed substitution that helps us do robust quoting.  It backslashifies
7877 # metacharacters that are still active within double-quoted strings.
7878 Xsed='sed -e 1s/^X//'
7879 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
7880
7881 # Same as above, but do not quote variable references.
7882 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
7883
7884 # Sed substitution to delay expansion of an escaped shell variable in a
7885 # double_quote_subst'ed string.
7886 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7887
7888 # Sed substitution to avoid accidental globbing in evaled expressions
7889 no_glob_subst='s/\*/\\\*/g'
7890
7891 # Constants:
7892 rm="rm -f"
7893
7894 # Global variables:
7895 default_ofile=libtool
7896 can_build_shared=yes
7897
7898 # All known linkers require a `.a' archive for static linking (except MSVC,
7899 # which needs '.lib').
7900 libext=a
7901 ltmain="$ac_aux_dir/ltmain.sh"
7902 ofile="$default_ofile"
7903 with_gnu_ld="$lt_cv_prog_gnu_ld"
7904
7905 if test -n "$ac_tool_prefix"; then
7906   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7907 set dummy ${ac_tool_prefix}ar; ac_word=$2
7908 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7909 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7910 if test "${ac_cv_prog_AR+set}" = set; then
7911   echo $ECHO_N "(cached) $ECHO_C" >&6
7912 else
7913   if test -n "$AR"; then
7914   ac_cv_prog_AR="$AR" # Let the user override the test.
7915 else
7916 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7917 for as_dir in $PATH
7918 do
7919   IFS=$as_save_IFS
7920   test -z "$as_dir" && as_dir=.
7921   for ac_exec_ext in '' $ac_executable_extensions; do
7922   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7923     ac_cv_prog_AR="${ac_tool_prefix}ar"
7924     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7925     break 2
7926   fi
7927 done
7928 done
7929 IFS=$as_save_IFS
7930
7931 fi
7932 fi
7933 AR=$ac_cv_prog_AR
7934 if test -n "$AR"; then
7935   { echo "$as_me:$LINENO: result: $AR" >&5
7936 echo "${ECHO_T}$AR" >&6; }
7937 else
7938   { echo "$as_me:$LINENO: result: no" >&5
7939 echo "${ECHO_T}no" >&6; }
7940 fi
7941
7942
7943 fi
7944 if test -z "$ac_cv_prog_AR"; then
7945   ac_ct_AR=$AR
7946   # Extract the first word of "ar", so it can be a program name with args.
7947 set dummy ar; ac_word=$2
7948 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7949 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7950 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
7951   echo $ECHO_N "(cached) $ECHO_C" >&6
7952 else
7953   if test -n "$ac_ct_AR"; then
7954   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7955 else
7956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7957 for as_dir in $PATH
7958 do
7959   IFS=$as_save_IFS
7960   test -z "$as_dir" && as_dir=.
7961   for ac_exec_ext in '' $ac_executable_extensions; do
7962   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7963     ac_cv_prog_ac_ct_AR="ar"
7964     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7965     break 2
7966   fi
7967 done
7968 done
7969 IFS=$as_save_IFS
7970
7971 fi
7972 fi
7973 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7974 if test -n "$ac_ct_AR"; then
7975   { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
7976 echo "${ECHO_T}$ac_ct_AR" >&6; }
7977 else
7978   { echo "$as_me:$LINENO: result: no" >&5
7979 echo "${ECHO_T}no" >&6; }
7980 fi
7981
7982   if test "x$ac_ct_AR" = x; then
7983     AR="false"
7984   else
7985     case $cross_compiling:$ac_tool_warned in
7986 yes:)
7987 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
7988 whose name does not start with the host triplet.  If you think this
7989 configuration is useful to you, please write to autoconf@gnu.org." >&5
7990 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
7991 whose name does not start with the host triplet.  If you think this
7992 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
7993 ac_tool_warned=yes ;;
7994 esac
7995     AR=$ac_ct_AR
7996   fi
7997 else
7998   AR="$ac_cv_prog_AR"
7999 fi
8000
8001 if test -n "$ac_tool_prefix"; then
8002   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8003 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8004 { echo "$as_me:$LINENO: checking for $ac_word" >&5
8005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
8006 if test "${ac_cv_prog_RANLIB+set}" = set; then
8007   echo $ECHO_N "(cached) $ECHO_C" >&6
8008 else
8009   if test -n "$RANLIB"; then
8010   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8011 else
8012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8013 for as_dir in $PATH
8014 do
8015   IFS=$as_save_IFS
8016   test -z "$as_dir" && as_dir=.
8017   for ac_exec_ext in '' $ac_executable_extensions; do
8018   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8019     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8020     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8021     break 2
8022   fi
8023 done
8024 done
8025 IFS=$as_save_IFS
8026
8027 fi
8028 fi
8029 RANLIB=$ac_cv_prog_RANLIB
8030 if test -n "$RANLIB"; then
8031   { echo "$as_me:$LINENO: result: $RANLIB" >&5
8032 echo "${ECHO_T}$RANLIB" >&6; }
8033 else
8034   { echo "$as_me:$LINENO: result: no" >&5
8035 echo "${ECHO_T}no" >&6; }
8036 fi
8037
8038
8039 fi
8040 if test -z "$ac_cv_prog_RANLIB"; then
8041   ac_ct_RANLIB=$RANLIB
8042   # Extract the first word of "ranlib", so it can be a program name with args.
8043 set dummy ranlib; ac_word=$2
8044 { echo "$as_me:$LINENO: checking for $ac_word" >&5
8045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
8046 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
8047   echo $ECHO_N "(cached) $ECHO_C" >&6
8048 else
8049   if test -n "$ac_ct_RANLIB"; then
8050   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8051 else
8052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8053 for as_dir in $PATH
8054 do
8055   IFS=$as_save_IFS
8056   test -z "$as_dir" && as_dir=.
8057   for ac_exec_ext in '' $ac_executable_extensions; do
8058   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8059     ac_cv_prog_ac_ct_RANLIB="ranlib"
8060     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8061     break 2
8062   fi
8063 done
8064 done
8065 IFS=$as_save_IFS
8066
8067 fi
8068 fi
8069 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8070 if test -n "$ac_ct_RANLIB"; then
8071   { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
8072 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
8073 else
8074   { echo "$as_me:$LINENO: result: no" >&5
8075 echo "${ECHO_T}no" >&6; }
8076 fi
8077
8078   if test "x$ac_ct_RANLIB" = x; then
8079     RANLIB=":"
8080   else
8081     case $cross_compiling:$ac_tool_warned in
8082 yes:)
8083 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
8084 whose name does not start with the host triplet.  If you think this
8085 configuration is useful to you, please write to autoconf@gnu.org." >&5
8086 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
8087 whose name does not start with the host triplet.  If you think this
8088 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
8089 ac_tool_warned=yes ;;
8090 esac
8091     RANLIB=$ac_ct_RANLIB
8092   fi
8093 else
8094   RANLIB="$ac_cv_prog_RANLIB"
8095 fi
8096
8097 if test -n "$ac_tool_prefix"; then
8098   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8099 set dummy ${ac_tool_prefix}strip; ac_word=$2
8100 { echo "$as_me:$LINENO: checking for $ac_word" >&5
8101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
8102 if test "${ac_cv_prog_STRIP+set}" = set; then
8103   echo $ECHO_N "(cached) $ECHO_C" >&6
8104 else
8105   if test -n "$STRIP"; then
8106   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8107 else
8108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8109 for as_dir in $PATH
8110 do
8111   IFS=$as_save_IFS
8112   test -z "$as_dir" && as_dir=.
8113   for ac_exec_ext in '' $ac_executable_extensions; do
8114   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8115     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8116     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8117     break 2
8118   fi
8119 done
8120 done
8121 IFS=$as_save_IFS
8122
8123 fi
8124 fi
8125 STRIP=$ac_cv_prog_STRIP
8126 if test -n "$STRIP"; then
8127   { echo "$as_me:$LINENO: result: $STRIP" >&5
8128 echo "${ECHO_T}$STRIP" >&6; }
8129 else
8130   { echo "$as_me:$LINENO: result: no" >&5
8131 echo "${ECHO_T}no" >&6; }
8132 fi
8133
8134
8135 fi
8136 if test -z "$ac_cv_prog_STRIP"; then
8137   ac_ct_STRIP=$STRIP
8138   # Extract the first word of "strip", so it can be a program name with args.
8139 set dummy strip; ac_word=$2
8140 { echo "$as_me:$LINENO: checking for $ac_word" >&5
8141 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
8142 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
8143   echo $ECHO_N "(cached) $ECHO_C" >&6
8144 else
8145   if test -n "$ac_ct_STRIP"; then
8146   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8147 else
8148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8149 for as_dir in $PATH
8150 do
8151   IFS=$as_save_IFS
8152   test -z "$as_dir" && as_dir=.
8153   for ac_exec_ext in '' $ac_executable_extensions; do
8154   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8155     ac_cv_prog_ac_ct_STRIP="strip"
8156     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8157     break 2
8158   fi
8159 done
8160 done
8161 IFS=$as_save_IFS
8162
8163 fi
8164 fi
8165 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8166 if test -n "$ac_ct_STRIP"; then
8167   { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
8168 echo "${ECHO_T}$ac_ct_STRIP" >&6; }
8169 else
8170   { echo "$as_me:$LINENO: result: no" >&5
8171 echo "${ECHO_T}no" >&6; }
8172 fi
8173
8174   if test "x$ac_ct_STRIP" = x; then
8175     STRIP=":"
8176   else
8177     case $cross_compiling:$ac_tool_warned in
8178 yes:)
8179 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
8180 whose name does not start with the host triplet.  If you think this
8181 configuration is useful to you, please write to autoconf@gnu.org." >&5
8182 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
8183 whose name does not start with the host triplet.  If you think this
8184 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
8185 ac_tool_warned=yes ;;
8186 esac
8187     STRIP=$ac_ct_STRIP
8188   fi
8189 else
8190   STRIP="$ac_cv_prog_STRIP"
8191 fi
8192
8193
8194 old_CC="$CC"
8195 old_CFLAGS="$CFLAGS"
8196
8197 # Set sane defaults for various variables
8198 test -z "$AR" && AR=ar
8199 test -z "$AR_FLAGS" && AR_FLAGS=cru
8200 test -z "$AS" && AS=as
8201 test -z "$CC" && CC=cc
8202 test -z "$LTCC" && LTCC=$CC
8203 test -z "$DLLTOOL" && DLLTOOL=dlltool
8204 test -z "$LD" && LD=ld
8205 test -z "$LN_S" && LN_S="ln -s"
8206 test -z "$MAGIC_CMD" && MAGIC_CMD=file
8207 test -z "$NM" && NM=nm
8208 test -z "$SED" && SED=sed
8209 test -z "$OBJDUMP" && OBJDUMP=objdump
8210 test -z "$RANLIB" && RANLIB=:
8211 test -z "$STRIP" && STRIP=:
8212 test -z "$ac_objext" && ac_objext=o
8213
8214 # Determine commands to create old-style static archives.
8215 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
8216 old_postinstall_cmds='chmod 644 $oldlib'
8217 old_postuninstall_cmds=
8218
8219 if test -n "$RANLIB"; then
8220   case $host_os in
8221   openbsd*)
8222     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
8223     ;;
8224   *)
8225     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
8226     ;;
8227   esac
8228   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
8229 fi
8230
8231 for cc_temp in $compiler""; do
8232   case $cc_temp in
8233     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8234     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8235     \-*) ;;
8236     *) break;;
8237   esac
8238 done
8239 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8240
8241
8242 # Only perform the check for file, if the check method requires it
8243 case $deplibs_check_method in
8244 file_magic*)
8245   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8246     { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
8247 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; }
8248 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
8249   echo $ECHO_N "(cached) $ECHO_C" >&6
8250 else
8251   case $MAGIC_CMD in
8252 [\\/*] |  ?:[\\/]*)
8253   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8254   ;;
8255 *)
8256   lt_save_MAGIC_CMD="$MAGIC_CMD"
8257   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8258   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8259   for ac_dir in $ac_dummy; do
8260     IFS="$lt_save_ifs"
8261     test -z "$ac_dir" && ac_dir=.
8262     if test -f $ac_dir/${ac_tool_prefix}file; then
8263       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8264       if test -n "$file_magic_test_file"; then
8265         case $deplibs_check_method in
8266         "file_magic "*)
8267           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8268           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8269           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8270             $EGREP "$file_magic_regex" > /dev/null; then
8271             :
8272           else
8273             cat <<EOF 1>&2
8274
8275 *** Warning: the command libtool uses to detect shared libraries,
8276 *** $file_magic_cmd, produces output that libtool cannot recognize.
8277 *** The result is that libtool may fail to recognize shared libraries
8278 *** as such.  This will affect the creation of libtool libraries that
8279 *** depend on shared libraries, but programs linked with such libtool
8280 *** libraries will work regardless of this problem.  Nevertheless, you
8281 *** may want to report the problem to your system manager and/or to
8282 *** bug-libtool@gnu.org
8283
8284 EOF
8285           fi ;;
8286         esac
8287       fi
8288       break
8289     fi
8290   done
8291   IFS="$lt_save_ifs"
8292   MAGIC_CMD="$lt_save_MAGIC_CMD"
8293   ;;
8294 esac
8295 fi
8296
8297 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8298 if test -n "$MAGIC_CMD"; then
8299   { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
8300 echo "${ECHO_T}$MAGIC_CMD" >&6; }
8301 else
8302   { echo "$as_me:$LINENO: result: no" >&5
8303 echo "${ECHO_T}no" >&6; }
8304 fi
8305
8306 if test -z "$lt_cv_path_MAGIC_CMD"; then
8307   if test -n "$ac_tool_prefix"; then
8308     { echo "$as_me:$LINENO: checking for file" >&5
8309 echo $ECHO_N "checking for file... $ECHO_C" >&6; }
8310 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
8311   echo $ECHO_N "(cached) $ECHO_C" >&6
8312 else
8313   case $MAGIC_CMD in
8314 [\\/*] |  ?:[\\/]*)
8315   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8316   ;;
8317 *)
8318   lt_save_MAGIC_CMD="$MAGIC_CMD"
8319   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8320   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8321   for ac_dir in $ac_dummy; do
8322     IFS="$lt_save_ifs"
8323     test -z "$ac_dir" && ac_dir=.
8324     if test -f $ac_dir/file; then
8325       lt_cv_path_MAGIC_CMD="$ac_dir/file"
8326       if test -n "$file_magic_test_file"; then
8327         case $deplibs_check_method in
8328         "file_magic "*)
8329           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8330           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8331           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8332             $EGREP "$file_magic_regex" > /dev/null; then
8333             :
8334           else
8335             cat <<EOF 1>&2
8336
8337 *** Warning: the command libtool uses to detect shared libraries,
8338 *** $file_magic_cmd, produces output that libtool cannot recognize.
8339 *** The result is that libtool may fail to recognize shared libraries
8340 *** as such.  This will affect the creation of libtool libraries that
8341 *** depend on shared libraries, but programs linked with such libtool
8342 *** libraries will work regardless of this problem.  Nevertheless, you
8343 *** may want to report the problem to your system manager and/or to
8344 *** bug-libtool@gnu.org
8345
8346 EOF
8347           fi ;;
8348         esac
8349       fi
8350       break
8351     fi
8352   done
8353   IFS="$lt_save_ifs"
8354   MAGIC_CMD="$lt_save_MAGIC_CMD"
8355   ;;
8356 esac
8357 fi
8358
8359 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8360 if test -n "$MAGIC_CMD"; then
8361   { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
8362 echo "${ECHO_T}$MAGIC_CMD" >&6; }
8363 else
8364   { echo "$as_me:$LINENO: result: no" >&5
8365 echo "${ECHO_T}no" >&6; }
8366 fi
8367
8368   else
8369     MAGIC_CMD=:
8370   fi
8371 fi
8372
8373   fi
8374   ;;
8375 esac
8376
8377 enable_dlopen=yes
8378 enable_win32_dll=yes
8379
8380 # Check whether --enable-libtool-lock was given.
8381 if test "${enable_libtool_lock+set}" = set; then
8382   enableval=$enable_libtool_lock;
8383 fi
8384
8385 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
8386
8387
8388 # Check whether --with-pic was given.
8389 if test "${with_pic+set}" = set; then
8390   withval=$with_pic; pic_mode="$withval"
8391 else
8392   pic_mode=default
8393 fi
8394
8395 test -z "$pic_mode" && pic_mode=default
8396
8397 # Use C for the default configuration in the libtool script
8398 tagname=
8399 lt_save_CC="$CC"
8400 ac_ext=c
8401 ac_cpp='$CPP $CPPFLAGS'
8402 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8403 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8404 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8405
8406
8407 # Source file extension for C test sources.
8408 ac_ext=c
8409
8410 # Object file extension for compiled C test sources.
8411 objext=o
8412 objext=$objext
8413
8414 # Code to be used in simple compile tests
8415 lt_simple_compile_test_code="int some_variable = 0;\n"
8416
8417 # Code to be used in simple link tests
8418 lt_simple_link_test_code='int main(){return(0);}\n'
8419
8420
8421 # If no C compiler was specified, use CC.
8422 LTCC=${LTCC-"$CC"}
8423
8424 # Allow CC to be a program name with arguments.
8425 compiler=$CC
8426
8427
8428 # save warnings/boilerplate of simple test code
8429 ac_outfile=conftest.$ac_objext
8430 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
8431 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8432 _lt_compiler_boilerplate=`cat conftest.err`
8433 $rm conftest*
8434
8435 ac_outfile=conftest.$ac_objext
8436 printf "$lt_simple_link_test_code" >conftest.$ac_ext
8437 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8438 _lt_linker_boilerplate=`cat conftest.err`
8439 $rm conftest*
8440
8441
8442 #
8443 # Check for any special shared library compilation flags.
8444 #
8445 lt_prog_cc_shlib=
8446 if test "$GCC" = no; then
8447   case $host_os in
8448   sco3.2v5*)
8449     lt_prog_cc_shlib='-belf'
8450     ;;
8451   esac
8452 fi
8453 if test -n "$lt_prog_cc_shlib"; then
8454   { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
8455 echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
8456   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
8457   else
8458     { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
8459 echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
8460     lt_cv_prog_cc_can_build_shared=no
8461   fi
8462 fi
8463
8464
8465 #
8466 # Check to make sure the static flag actually works.
8467 #
8468 { echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
8469 echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6; }
8470 if test "${lt_prog_compiler_static_works+set}" = set; then
8471   echo $ECHO_N "(cached) $ECHO_C" >&6
8472 else
8473   lt_prog_compiler_static_works=no
8474    save_LDFLAGS="$LDFLAGS"
8475    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
8476    printf "$lt_simple_link_test_code" > conftest.$ac_ext
8477    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8478      # The linker can only warn and ignore the option if not recognized
8479      # So say no if there are warnings
8480      if test -s conftest.err; then
8481        # Append any errors to the config.log.
8482        cat conftest.err 1>&5
8483        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
8484        $SED '/^$/d' conftest.err >conftest.er2
8485        if diff conftest.exp conftest.er2 >/dev/null; then
8486          lt_prog_compiler_static_works=yes
8487        fi
8488      else
8489        lt_prog_compiler_static_works=yes
8490      fi
8491    fi
8492    $rm conftest*
8493    LDFLAGS="$save_LDFLAGS"
8494
8495 fi
8496 { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
8497 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; }
8498
8499 if test x"$lt_prog_compiler_static_works" = xyes; then
8500     :
8501 else
8502     lt_prog_compiler_static=
8503 fi
8504
8505
8506
8507
8508 lt_prog_compiler_no_builtin_flag=
8509
8510 if test "$GCC" = yes; then
8511   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
8512
8513
8514 { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
8515 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
8516 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
8517   echo $ECHO_N "(cached) $ECHO_C" >&6
8518 else
8519   lt_cv_prog_compiler_rtti_exceptions=no
8520   ac_outfile=conftest.$ac_objext
8521    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8522    lt_compiler_flag="-fno-rtti -fno-exceptions"
8523    # Insert the option either (1) after the last *FLAGS variable, or
8524    # (2) before a word containing "conftest.", or (3) at the end.
8525    # Note that $ac_compile itself does not contain backslashes and begins
8526    # with a dollar sign (not a hyphen), so the echo should work correctly.
8527    # The option is referenced via a variable to avoid confusing sed.
8528    lt_compile=`echo "$ac_compile" | $SED \
8529    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8530    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8531    -e 's:$: $lt_compiler_flag:'`
8532    (eval echo "\"\$as_me:8532: $lt_compile\"" >&5)
8533    (eval "$lt_compile" 2>conftest.err)
8534    ac_status=$?
8535    cat conftest.err >&5
8536    echo "$as_me:8536: \$? = $ac_status" >&5
8537    if (exit $ac_status) && test -s "$ac_outfile"; then
8538      # The compiler can only warn and ignore the option if not recognized
8539      # So say no if there are warnings other than the usual output.
8540      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8541      $SED '/^$/d' conftest.err >conftest.er2
8542      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8543        lt_cv_prog_compiler_rtti_exceptions=yes
8544      fi
8545    fi
8546    $rm conftest*
8547
8548 fi
8549 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
8550 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
8551
8552 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
8553     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
8554 else
8555     :
8556 fi
8557
8558 fi
8559
8560 lt_prog_compiler_wl=
8561 lt_prog_compiler_pic=
8562 lt_prog_compiler_static=
8563
8564 { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
8565 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
8566
8567   if test "$GCC" = yes; then
8568     lt_prog_compiler_wl='-Wl,'
8569     lt_prog_compiler_static='-static'
8570
8571     case $host_os in
8572       aix*)
8573       # All AIX code is PIC.
8574       if test "$host_cpu" = ia64; then
8575         # AIX 5 now supports IA64 processor
8576         lt_prog_compiler_static='-Bstatic'
8577       fi
8578       ;;
8579
8580     amigaos*)
8581       # FIXME: we need at least 68020 code to build shared libraries, but
8582       # adding the `-m68020' flag to GCC prevents building anything better,
8583       # like `-m68040'.
8584       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
8585       ;;
8586
8587     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8588       # PIC is the default for these OSes.
8589       ;;
8590
8591     mingw* | pw32* | os2*)
8592       # This hack is so that the source file can tell whether it is being
8593       # built for inclusion in a dll (and should export symbols for example).
8594       lt_prog_compiler_pic='-DDLL_EXPORT'
8595       ;;
8596
8597     darwin* | rhapsody*)
8598       # PIC is the default on this platform
8599       # Common symbols not allowed in MH_DYLIB files
8600       lt_prog_compiler_pic='-fno-common'
8601       ;;
8602
8603     msdosdjgpp*)
8604       # Just because we use GCC doesn't mean we suddenly get shared libraries
8605       # on systems that don't support them.
8606       lt_prog_compiler_can_build_shared=no
8607       enable_shared=no
8608       ;;
8609
8610     sysv4*MP*)
8611       if test -d /usr/nec; then
8612         lt_prog_compiler_pic=-Kconform_pic
8613       fi
8614       ;;
8615
8616     hpux*)
8617       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8618       # not for PA HP-UX.
8619       case $host_cpu in
8620       hppa*64*|ia64*)
8621         # +Z the default
8622         ;;
8623       *)
8624         lt_prog_compiler_pic='-fPIC'
8625         ;;
8626       esac
8627       ;;
8628
8629     *)
8630       lt_prog_compiler_pic='-fPIC'
8631       ;;
8632     esac
8633   else
8634     # PORTME Check for flag to pass linker flags through the system compiler.
8635     case $host_os in
8636     aix*)
8637       lt_prog_compiler_wl='-Wl,'
8638       if test "$host_cpu" = ia64; then
8639         # AIX 5 now supports IA64 processor
8640         lt_prog_compiler_static='-Bstatic'
8641       else
8642         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
8643       fi
8644       ;;
8645       darwin*)
8646         # PIC is the default on this platform
8647         # Common symbols not allowed in MH_DYLIB files
8648        case $cc_basename in
8649          xlc*)
8650          lt_prog_compiler_pic='-qnocommon'
8651          lt_prog_compiler_wl='-Wl,'
8652          ;;
8653        esac
8654        ;;
8655
8656     mingw* | pw32* | os2*)
8657       # This hack is so that the source file can tell whether it is being
8658       # built for inclusion in a dll (and should export symbols for example).
8659       lt_prog_compiler_pic='-DDLL_EXPORT'
8660       ;;
8661
8662     hpux9* | hpux10* | hpux11*)
8663       lt_prog_compiler_wl='-Wl,'
8664       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8665       # not for PA HP-UX.
8666       case $host_cpu in
8667       hppa*64*|ia64*)
8668         # +Z the default
8669         ;;
8670       *)
8671         lt_prog_compiler_pic='+Z'
8672         ;;
8673       esac
8674       # Is there a better lt_prog_compiler_static that works with the bundled CC?
8675       lt_prog_compiler_static='${wl}-a ${wl}archive'
8676       ;;
8677
8678     irix5* | irix6* | nonstopux*)
8679       lt_prog_compiler_wl='-Wl,'
8680       # PIC (with -KPIC) is the default.
8681       lt_prog_compiler_static='-non_shared'
8682       ;;
8683
8684     newsos6)
8685       lt_prog_compiler_pic='-KPIC'
8686       lt_prog_compiler_static='-Bstatic'
8687       ;;
8688
8689     linux*)
8690       case $cc_basename in
8691       icc* | ecc*)
8692         lt_prog_compiler_wl='-Wl,'
8693         lt_prog_compiler_pic='-KPIC'
8694         lt_prog_compiler_static='-static'
8695         ;;
8696       pgcc* | pgf77* | pgf90* | pgf95*)
8697         # Portland Group compilers (*not* the Pentium gcc compiler,
8698         # which looks to be a dead project)
8699         lt_prog_compiler_wl='-Wl,'
8700         lt_prog_compiler_pic='-fpic'
8701         lt_prog_compiler_static='-Bstatic'
8702         ;;
8703       ccc*)
8704         lt_prog_compiler_wl='-Wl,'
8705         # All Alpha code is PIC.
8706         lt_prog_compiler_static='-non_shared'
8707         ;;
8708       esac
8709       ;;
8710
8711     osf3* | osf4* | osf5*)
8712       lt_prog_compiler_wl='-Wl,'
8713       # All OSF/1 code is PIC.
8714       lt_prog_compiler_static='-non_shared'
8715       ;;
8716
8717     sco3.2v5*)
8718       lt_prog_compiler_pic='-Kpic'
8719       lt_prog_compiler_static='-dn'
8720       ;;
8721
8722     solaris*)
8723       lt_prog_compiler_pic='-KPIC'
8724       lt_prog_compiler_static='-Bstatic'
8725       case $cc_basename in
8726       f77* | f90* | f95*)
8727         lt_prog_compiler_wl='-Qoption ld ';;
8728       *)
8729         lt_prog_compiler_wl='-Wl,';;
8730       esac
8731       ;;
8732
8733     sunos4*)
8734       lt_prog_compiler_wl='-Qoption ld '
8735       lt_prog_compiler_pic='-PIC'
8736       lt_prog_compiler_static='-Bstatic'
8737       ;;
8738
8739     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8740       lt_prog_compiler_wl='-Wl,'
8741       lt_prog_compiler_pic='-KPIC'
8742       lt_prog_compiler_static='-Bstatic'
8743       ;;
8744
8745     sysv4*MP*)
8746       if test -d /usr/nec ;then
8747         lt_prog_compiler_pic='-Kconform_pic'
8748         lt_prog_compiler_static='-Bstatic'
8749       fi
8750       ;;
8751
8752     unicos*)
8753       lt_prog_compiler_wl='-Wl,'
8754       lt_prog_compiler_can_build_shared=no
8755       ;;
8756
8757     uts4*)
8758       lt_prog_compiler_pic='-pic'
8759       lt_prog_compiler_static='-Bstatic'
8760       ;;
8761
8762     *)
8763       lt_prog_compiler_can_build_shared=no
8764       ;;
8765     esac
8766   fi
8767
8768 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
8769 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; }
8770
8771 #
8772 # Check to make sure the PIC flag actually works.
8773 #
8774 if test -n "$lt_prog_compiler_pic"; then
8775
8776 { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8777 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; }
8778 if test "${lt_prog_compiler_pic_works+set}" = set; then
8779   echo $ECHO_N "(cached) $ECHO_C" >&6
8780 else
8781   lt_prog_compiler_pic_works=no
8782   ac_outfile=conftest.$ac_objext
8783    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8784    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8785    # Insert the option either (1) after the last *FLAGS variable, or
8786    # (2) before a word containing "conftest.", or (3) at the end.
8787    # Note that $ac_compile itself does not contain backslashes and begins
8788    # with a dollar sign (not a hyphen), so the echo should work correctly.
8789    # The option is referenced via a variable to avoid confusing sed.
8790    lt_compile=`echo "$ac_compile" | $SED \
8791    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8792    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8793    -e 's:$: $lt_compiler_flag:'`
8794    (eval echo "\"\$as_me:8794: $lt_compile\"" >&5)
8795    (eval "$lt_compile" 2>conftest.err)
8796    ac_status=$?
8797    cat conftest.err >&5
8798    echo "$as_me:8798: \$? = $ac_status" >&5
8799    if (exit $ac_status) && test -s "$ac_outfile"; then
8800      # The compiler can only warn and ignore the option if not recognized
8801      # So say no if there are warnings other than the usual output.
8802      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8803      $SED '/^$/d' conftest.err >conftest.er2
8804      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8805        lt_prog_compiler_pic_works=yes
8806      fi
8807    fi
8808    $rm conftest*
8809
8810 fi
8811 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
8812 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; }
8813
8814 if test x"$lt_prog_compiler_pic_works" = xyes; then
8815     case $lt_prog_compiler_pic in
8816      "" | " "*) ;;
8817      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8818      esac
8819 else
8820     lt_prog_compiler_pic=
8821      lt_prog_compiler_can_build_shared=no
8822 fi
8823
8824 fi
8825 case $host_os in
8826   # For platforms which do not support PIC, -DPIC is meaningless:
8827   *djgpp*)
8828     lt_prog_compiler_pic=
8829     ;;
8830   *)
8831     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8832     ;;
8833 esac
8834
8835 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
8836 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
8837 if test "${lt_cv_prog_compiler_c_o+set}" = set; then
8838   echo $ECHO_N "(cached) $ECHO_C" >&6
8839 else
8840   lt_cv_prog_compiler_c_o=no
8841    $rm -r conftest 2>/dev/null
8842    mkdir conftest
8843    cd conftest
8844    mkdir out
8845    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8846
8847    lt_compiler_flag="-o out/conftest2.$ac_objext"
8848    # Insert the option either (1) after the last *FLAGS variable, or
8849    # (2) before a word containing "conftest.", or (3) at the end.
8850    # Note that $ac_compile itself does not contain backslashes and begins
8851    # with a dollar sign (not a hyphen), so the echo should work correctly.
8852    lt_compile=`echo "$ac_compile" | $SED \
8853    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8854    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8855    -e 's:$: $lt_compiler_flag:'`
8856    (eval echo "\"\$as_me:8856: $lt_compile\"" >&5)
8857    (eval "$lt_compile" 2>out/conftest.err)
8858    ac_status=$?
8859    cat out/conftest.err >&5
8860    echo "$as_me:8860: \$? = $ac_status" >&5
8861    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8862    then
8863      # The compiler can only warn and ignore the option if not recognized
8864      # So say no if there are warnings
8865      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
8866      $SED '/^$/d' out/conftest.err >out/conftest.er2
8867      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8868        lt_cv_prog_compiler_c_o=yes
8869      fi
8870    fi
8871    chmod u+w . 2>&5
8872    $rm conftest*
8873    # SGI C++ compiler will create directory out/ii_files/ for
8874    # template instantiation
8875    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
8876    $rm out/* && rmdir out
8877    cd ..
8878    rmdir conftest
8879    $rm conftest*
8880
8881 fi
8882 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
8883 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
8884
8885
8886 hard_links="nottested"
8887 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8888   # do not overwrite the value of need_locks provided by the user
8889   { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
8890 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
8891   hard_links=yes
8892   $rm conftest*
8893   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8894   touch conftest.a
8895   ln conftest.a conftest.b 2>&5 || hard_links=no
8896   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8897   { echo "$as_me:$LINENO: result: $hard_links" >&5
8898 echo "${ECHO_T}$hard_links" >&6; }
8899   if test "$hard_links" = no; then
8900     { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8901 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8902     need_locks=warn
8903   fi
8904 else
8905   need_locks=no
8906 fi
8907
8908 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8909 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
8910
8911   runpath_var=
8912   allow_undefined_flag=
8913   enable_shared_with_static_runtimes=no
8914   archive_cmds=
8915   archive_expsym_cmds=
8916   old_archive_From_new_cmds=
8917   old_archive_from_expsyms_cmds=
8918   export_dynamic_flag_spec=
8919   whole_archive_flag_spec=
8920   thread_safe_flag_spec=
8921   hardcode_libdir_flag_spec=
8922   hardcode_libdir_flag_spec_ld=
8923   hardcode_libdir_separator=
8924   hardcode_direct=no
8925   hardcode_minus_L=no
8926   hardcode_shlibpath_var=unsupported
8927   link_all_deplibs=unknown
8928   hardcode_automatic=no
8929   module_cmds=
8930   module_expsym_cmds=
8931   always_export_symbols=no
8932   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8933   # include_expsyms should be a list of space-separated symbols to be *always*
8934   # included in the symbol list
8935   include_expsyms=
8936   # exclude_expsyms can be an extended regexp of symbols to exclude
8937   # it will be wrapped by ` (' and `)$', so one must not match beginning or
8938   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8939   # as well as any symbol that contains `d'.
8940   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
8941   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8942   # platforms (ab)use it in PIC code, but their linkers get confused if
8943   # the symbol is explicitly referenced.  Since portable code cannot
8944   # rely on this symbol name, it's probably fine to never include it in
8945   # preloaded symbol tables.
8946   extract_expsyms_cmds=
8947   # Just being paranoid about ensuring that cc_basename is set.
8948   for cc_temp in $compiler""; do
8949   case $cc_temp in
8950     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8951     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8952     \-*) ;;
8953     *) break;;
8954   esac
8955 done
8956 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8957
8958   case $host_os in
8959   cygwin* | mingw* | pw32*)
8960     # FIXME: the MSVC++ port hasn't been tested in a loooong time
8961     # When not using gcc, we currently assume that we are using
8962     # Microsoft Visual C++.
8963     if test "$GCC" != yes; then
8964       with_gnu_ld=no
8965     fi
8966     ;;
8967   openbsd*)
8968     with_gnu_ld=no
8969     ;;
8970   esac
8971
8972   ld_shlibs=yes
8973   if test "$with_gnu_ld" = yes; then
8974     # If archive_cmds runs LD, not CC, wlarc should be empty
8975     wlarc='${wl}'
8976
8977     # Set some defaults for GNU ld with shared library support. These
8978     # are reset later if shared libraries are not supported. Putting them
8979     # here allows them to be overridden if necessary.
8980     runpath_var=LD_RUN_PATH
8981     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
8982     export_dynamic_flag_spec='${wl}--export-dynamic'
8983     # ancient GNU ld didn't support --whole-archive et. al.
8984     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8985         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8986       else
8987         whole_archive_flag_spec=
8988     fi
8989     supports_anon_versioning=no
8990     case `$LD -v 2>/dev/null` in
8991       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8992       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8993       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8994       *\ 2.11.*) ;; # other 2.11 versions
8995       *) supports_anon_versioning=yes ;;
8996     esac
8997
8998     # See if GNU ld supports shared libraries.
8999     case $host_os in
9000     aix3* | aix4* | aix5*)
9001       # On AIX/PPC, the GNU linker is very broken
9002       if test "$host_cpu" != ia64; then
9003         ld_shlibs=no
9004         cat <<EOF 1>&2
9005
9006 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
9007 *** to be unable to reliably create shared libraries on AIX.
9008 *** Therefore, libtool is disabling shared libraries support.  If you
9009 *** really care for shared libraries, you may want to modify your PATH
9010 *** so that a non-GNU linker is found, and then restart.
9011
9012 EOF
9013       fi
9014       ;;
9015
9016     amigaos*)
9017       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)'
9018       hardcode_libdir_flag_spec='-L$libdir'
9019       hardcode_minus_L=yes
9020
9021       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9022       # that the semantics of dynamic libraries on AmigaOS, at least up
9023       # to version 4, is to share data among multiple programs linked
9024       # with the same dynamic library.  Since this doesn't match the
9025       # behavior of shared libraries on other platforms, we can't use
9026       # them.
9027       ld_shlibs=no
9028       ;;
9029
9030     beos*)
9031       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9032         allow_undefined_flag=unsupported
9033         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9034         # support --undefined.  This deserves some investigation.  FIXME
9035         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9036       else
9037         ld_shlibs=no
9038       fi
9039       ;;
9040
9041     cygwin* | mingw* | pw32*)
9042       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9043       # as there is no search path for DLLs.
9044       hardcode_libdir_flag_spec='-L$libdir'
9045       allow_undefined_flag=unsupported
9046       always_export_symbols=no
9047       enable_shared_with_static_runtimes=yes
9048       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
9049
9050       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
9051         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
9052         # If the export-symbols file already is a .def file (1st line
9053         # is EXPORTS), use it as is; otherwise, prepend...
9054         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9055           cp $export_symbols $output_objdir/$soname.def;
9056         else
9057           echo EXPORTS > $output_objdir/$soname.def;
9058           cat $export_symbols >> $output_objdir/$soname.def;
9059         fi~
9060         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
9061       else
9062         ld_shlibs=no
9063       fi
9064       ;;
9065
9066     linux*)
9067       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9068         tmp_addflag=
9069         case $cc_basename,$host_cpu in
9070         pgcc*)                          # Portland Group C compiler
9071           whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
9072           tmp_addflag=' $pic_flag'
9073           ;;
9074         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
9075           whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
9076           tmp_addflag=' $pic_flag -Mnomain' ;;
9077         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
9078           tmp_addflag=' -i_dynamic' ;;
9079         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
9080           tmp_addflag=' -i_dynamic -nofor_main' ;;
9081         ifc* | ifort*)                  # Intel Fortran compiler
9082           tmp_addflag=' -nofor_main' ;;
9083         esac
9084         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9085
9086         if test $supports_anon_versioning = yes; then
9087           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
9088   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9089   $echo "local: *; };" >> $output_objdir/$libname.ver~
9090           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9091         fi
9092       else
9093         ld_shlibs=no
9094       fi
9095       ;;
9096
9097     netbsd*)
9098       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9099         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9100         wlarc=
9101       else
9102         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9103         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9104       fi
9105       ;;
9106
9107     solaris* | sysv5*)
9108       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
9109         ld_shlibs=no
9110         cat <<EOF 1>&2
9111
9112 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
9113 *** create shared libraries on Solaris systems.  Therefore, libtool
9114 *** is disabling shared libraries support.  We urge you to upgrade GNU
9115 *** binutils to release 2.9.1 or newer.  Another option is to modify
9116 *** your PATH or compiler configuration so that the native linker is
9117 *** used, and then restart.
9118
9119 EOF
9120       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9121         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9122         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9123       else
9124         ld_shlibs=no
9125       fi
9126       ;;
9127
9128     sunos4*)
9129       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9130       wlarc=
9131       hardcode_direct=yes
9132       hardcode_shlibpath_var=no
9133       ;;
9134
9135     *)
9136       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9137         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9138         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9139       else
9140         ld_shlibs=no
9141       fi
9142       ;;
9143     esac
9144
9145     if test "$ld_shlibs" = no; then
9146       runpath_var=
9147       hardcode_libdir_flag_spec=
9148       export_dynamic_flag_spec=
9149       whole_archive_flag_spec=
9150     fi
9151   else
9152     # PORTME fill in a description of your system's linker (not GNU ld)
9153     case $host_os in
9154     aix3*)
9155       allow_undefined_flag=unsupported
9156       always_export_symbols=yes
9157       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'
9158       # Note: this linker hardcodes the directories in LIBPATH if there
9159       # are no directories specified by -L.
9160       hardcode_minus_L=yes
9161       if test "$GCC" = yes && test -z "$link_static_flag"; then
9162         # Neither direct hardcoding nor static linking is supported with a
9163         # broken collect2.
9164         hardcode_direct=unsupported
9165       fi
9166       ;;
9167
9168     aix4* | aix5*)
9169       if test "$host_cpu" = ia64; then
9170         # On IA64, the linker does run time linking by default, so we don't
9171         # have to do anything special.
9172         aix_use_runtimelinking=no
9173         exp_sym_flag='-Bexport'
9174         no_entry_flag=""
9175       else
9176         # If we're using GNU nm, then we don't want the "-C" option.
9177         # -C means demangle to AIX nm, but means don't demangle with GNU nm
9178         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
9179           export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
9180         else
9181           export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
9182         fi
9183         aix_use_runtimelinking=no
9184
9185         # Test if we are trying to use run time linking or normal
9186         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9187         # need to do runtime linking.
9188         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
9189           for ld_flag in $LDFLAGS; do
9190           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
9191             aix_use_runtimelinking=yes
9192             break
9193           fi
9194           done
9195         esac
9196
9197         exp_sym_flag='-bexport'
9198         no_entry_flag='-bnoentry'
9199       fi
9200
9201       # When large executables or shared objects are built, AIX ld can
9202       # have problems creating the table of contents.  If linking a library
9203       # or program results in "error TOC overflow" add -mminimal-toc to
9204       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9205       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9206
9207       archive_cmds=''
9208       hardcode_direct=yes
9209       hardcode_libdir_separator=':'
9210       link_all_deplibs=yes
9211
9212       if test "$GCC" = yes; then
9213         case $host_os in aix4.[012]|aix4.[012].*)
9214         # We only want to do this on AIX 4.2 and lower, the check
9215         # below for broken collect2 doesn't work under 4.3+
9216           collect2name=`${CC} -print-prog-name=collect2`
9217           if test -f "$collect2name" && \
9218            strings "$collect2name" | grep resolve_lib_name >/dev/null
9219           then
9220           # We have reworked collect2
9221           hardcode_direct=yes
9222           else
9223           # We have old collect2
9224           hardcode_direct=unsupported
9225           # It fails to find uninstalled libraries when the uninstalled
9226           # path is not listed in the libpath.  Setting hardcode_minus_L
9227           # to unsupported forces relinking
9228           hardcode_minus_L=yes
9229           hardcode_libdir_flag_spec='-L$libdir'
9230           hardcode_libdir_separator=
9231           fi
9232         esac
9233         shared_flag='-shared'
9234         if test "$aix_use_runtimelinking" = yes; then
9235           shared_flag="$shared_flag "'${wl}-G'
9236         fi
9237       else
9238         # not using gcc
9239         if test "$host_cpu" = ia64; then
9240         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9241         # chokes on -Wl,-G. The following line is correct:
9242           shared_flag='-G'
9243         else
9244         if test "$aix_use_runtimelinking" = yes; then
9245             shared_flag='${wl}-G'
9246           else
9247             shared_flag='${wl}-bM:SRE'
9248         fi
9249         fi
9250       fi
9251
9252       # It seems that -bexpall does not export symbols beginning with
9253       # underscore (_), so it is better to generate a list of symbols to export.
9254       always_export_symbols=yes
9255       if test "$aix_use_runtimelinking" = yes; then
9256         # Warning - without using the other runtime loading flags (-brtl),
9257         # -berok will link without error, but may produce a broken library.
9258         allow_undefined_flag='-berok'
9259        # Determine the default libpath from the value encoded in an empty executable.
9260        cat >conftest.$ac_ext <<_ACEOF
9261 /* confdefs.h.  */
9262 _ACEOF
9263 cat confdefs.h >>conftest.$ac_ext
9264 cat >>conftest.$ac_ext <<_ACEOF
9265 /* end confdefs.h.  */
9266
9267 int
9268 main ()
9269 {
9270
9271   ;
9272   return 0;
9273 }
9274 _ACEOF
9275 rm -f conftest.$ac_objext conftest$ac_exeext
9276 if { (ac_try="$ac_link"
9277 case "(($ac_try" in
9278   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9279   *) ac_try_echo=$ac_try;;
9280 esac
9281 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9282   (eval "$ac_link") 2>conftest.er1
9283   ac_status=$?
9284   grep -v '^ *+' conftest.er1 >conftest.err
9285   rm -f conftest.er1
9286   cat conftest.err >&5
9287   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9288   (exit $ac_status); } && {
9289          test -z "$ac_c_werror_flag" ||
9290          test ! -s conftest.err
9291        } && test -s conftest$ac_exeext &&
9292        $as_test_x conftest$ac_exeext; then
9293
9294 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9295 }'`
9296 # Check for a 64-bit object if we didn't find anything.
9297 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9298 }'`; fi
9299 else
9300   echo "$as_me: failed program was:" >&5
9301 sed 's/^/| /' conftest.$ac_ext >&5
9302
9303
9304 fi
9305
9306 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9307       conftest$ac_exeext conftest.$ac_ext
9308 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9309
9310        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9311         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"
9312        else
9313         if test "$host_cpu" = ia64; then
9314           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
9315           allow_undefined_flag="-z nodefs"
9316           archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
9317         else
9318          # Determine the default libpath from the value encoded in an empty executable.
9319          cat >conftest.$ac_ext <<_ACEOF
9320 /* confdefs.h.  */
9321 _ACEOF
9322 cat confdefs.h >>conftest.$ac_ext
9323 cat >>conftest.$ac_ext <<_ACEOF
9324 /* end confdefs.h.  */
9325
9326 int
9327 main ()
9328 {
9329
9330   ;
9331   return 0;
9332 }
9333 _ACEOF
9334 rm -f conftest.$ac_objext conftest$ac_exeext
9335 if { (ac_try="$ac_link"
9336 case "(($ac_try" in
9337   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9338   *) ac_try_echo=$ac_try;;
9339 esac
9340 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9341   (eval "$ac_link") 2>conftest.er1
9342   ac_status=$?
9343   grep -v '^ *+' conftest.er1 >conftest.err
9344   rm -f conftest.er1
9345   cat conftest.err >&5
9346   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9347   (exit $ac_status); } && {
9348          test -z "$ac_c_werror_flag" ||
9349          test ! -s conftest.err
9350        } && test -s conftest$ac_exeext &&
9351        $as_test_x conftest$ac_exeext; then
9352
9353 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9354 }'`
9355 # Check for a 64-bit object if we didn't find anything.
9356 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9357 }'`; fi
9358 else
9359   echo "$as_me: failed program was:" >&5
9360 sed 's/^/| /' conftest.$ac_ext >&5
9361
9362
9363 fi
9364
9365 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9366       conftest$ac_exeext conftest.$ac_ext
9367 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9368
9369          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9370           # Warning - without using the other run time loading flags,
9371           # -berok will link without error, but may produce a broken library.
9372           no_undefined_flag=' ${wl}-bernotok'
9373           allow_undefined_flag=' ${wl}-berok'
9374           # -bexpall does not export symbols beginning with underscore (_)
9375           always_export_symbols=yes
9376           # Exported symbols can be pulled into shared objects from archives
9377           whole_archive_flag_spec=' '
9378           archive_cmds_need_lc=yes
9379           # This is similar to how AIX traditionally builds its shared libraries.
9380           archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
9381         fi
9382       fi
9383       ;;
9384
9385     amigaos*)
9386       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)'
9387       hardcode_libdir_flag_spec='-L$libdir'
9388       hardcode_minus_L=yes
9389       # see comment about different semantics on the GNU ld section
9390       ld_shlibs=no
9391       ;;
9392
9393     bsdi[45]*)
9394       export_dynamic_flag_spec=-rdynamic
9395       ;;
9396
9397     cygwin* | mingw* | pw32*)
9398       # When not using gcc, we currently assume that we are using
9399       # Microsoft Visual C++.
9400       # hardcode_libdir_flag_spec is actually meaningless, as there is
9401       # no search path for DLLs.
9402       hardcode_libdir_flag_spec=' '
9403       allow_undefined_flag=unsupported
9404       # Tell ltmain to make .lib files, not .a files.
9405       libext=lib
9406       # Tell ltmain to make .dll files, not .so files.
9407       shrext_cmds=".dll"
9408       # FIXME: Setting linknames here is a bad hack.
9409       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
9410       # The linker will automatically build a .lib file if we build a DLL.
9411       old_archive_From_new_cmds='true'
9412       # FIXME: Should let the user specify the lib program.
9413       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
9414       fix_srcfile_path='`cygpath -w "$srcfile"`'
9415       enable_shared_with_static_runtimes=yes
9416       ;;
9417
9418     darwin* | rhapsody*)
9419       case $host_os in
9420         rhapsody* | darwin1.[012])
9421          allow_undefined_flag='${wl}-undefined ${wl}suppress'
9422          ;;
9423        *) # Darwin 1.3 on
9424          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
9425            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9426          else
9427            case ${MACOSX_DEPLOYMENT_TARGET} in
9428              10.[012])
9429                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9430                ;;
9431              10.*)
9432                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
9433                ;;
9434            esac
9435          fi
9436          ;;
9437       esac
9438       archive_cmds_need_lc=no
9439       hardcode_direct=no
9440       hardcode_automatic=yes
9441       hardcode_shlibpath_var=unsupported
9442       whole_archive_flag_spec=''
9443       link_all_deplibs=yes
9444     if test "$GCC" = yes ; then
9445         output_verbose_link_cmd='echo'
9446         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
9447       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9448       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9449       archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
9450       module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
9451     else
9452       case $cc_basename in
9453         xlc*)
9454          output_verbose_link_cmd='echo'
9455          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
9456          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9457           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9458          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
9459           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
9460           ;;
9461        *)
9462          ld_shlibs=no
9463           ;;
9464       esac
9465     fi
9466       ;;
9467
9468     dgux*)
9469       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9470       hardcode_libdir_flag_spec='-L$libdir'
9471       hardcode_shlibpath_var=no
9472       ;;
9473
9474     freebsd1*)
9475       ld_shlibs=no
9476       ;;
9477
9478     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9479     # support.  Future versions do this automatically, but an explicit c++rt0.o
9480     # does not break anything, and helps significantly (at the cost of a little
9481     # extra space).
9482     freebsd2.2*)
9483       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9484       hardcode_libdir_flag_spec='-R$libdir'
9485       hardcode_direct=yes
9486       hardcode_shlibpath_var=no
9487       ;;
9488
9489     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9490     freebsd2*)
9491       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9492       hardcode_direct=yes
9493       hardcode_minus_L=yes
9494       hardcode_shlibpath_var=no
9495       ;;
9496
9497     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9498     freebsd* | kfreebsd*-gnu | dragonfly*)
9499       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9500       hardcode_libdir_flag_spec='-R$libdir'
9501       hardcode_direct=yes
9502       hardcode_shlibpath_var=no
9503       ;;
9504
9505     hpux9*)
9506       if test "$GCC" = yes; then
9507         archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
9508       else
9509         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'
9510       fi
9511       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9512       hardcode_libdir_separator=:
9513       hardcode_direct=yes
9514
9515       # hardcode_minus_L: Not really in the search PATH,
9516       # but as the default location of the library.
9517       hardcode_minus_L=yes
9518       export_dynamic_flag_spec='${wl}-E'
9519       ;;
9520
9521     hpux10* | hpux11*)
9522       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9523         case $host_cpu in
9524         hppa*64*|ia64*)
9525           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9526           ;;
9527         *)
9528           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9529           ;;
9530         esac
9531       else
9532         case $host_cpu in
9533         hppa*64*|ia64*)
9534           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
9535           ;;
9536         *)
9537           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9538           ;;
9539         esac
9540       fi
9541       if test "$with_gnu_ld" = no; then
9542         case $host_cpu in
9543         hppa*64*)
9544           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9545           hardcode_libdir_flag_spec_ld='+b $libdir'
9546           hardcode_libdir_separator=:
9547           hardcode_direct=no
9548           hardcode_shlibpath_var=no
9549           ;;
9550         ia64*)
9551           hardcode_libdir_flag_spec='-L$libdir'
9552           hardcode_direct=no
9553           hardcode_shlibpath_var=no
9554
9555           # hardcode_minus_L: Not really in the search PATH,
9556           # but as the default location of the library.
9557           hardcode_minus_L=yes
9558           ;;
9559         *)
9560           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9561           hardcode_libdir_separator=:
9562           hardcode_direct=yes
9563           export_dynamic_flag_spec='${wl}-E'
9564
9565           # hardcode_minus_L: Not really in the search PATH,
9566           # but as the default location of the library.
9567           hardcode_minus_L=yes
9568           ;;
9569         esac
9570       fi
9571       ;;
9572
9573     irix5* | irix6* | nonstopux*)
9574       if test "$GCC" = yes; then
9575         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'
9576       else
9577         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'
9578         hardcode_libdir_flag_spec_ld='-rpath $libdir'
9579       fi
9580       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9581       hardcode_libdir_separator=:
9582       link_all_deplibs=yes
9583       ;;
9584
9585     netbsd*)
9586       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9587         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
9588       else
9589         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
9590       fi
9591       hardcode_libdir_flag_spec='-R$libdir'
9592       hardcode_direct=yes
9593       hardcode_shlibpath_var=no
9594       ;;
9595
9596     newsos6)
9597       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9598       hardcode_direct=yes
9599       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9600       hardcode_libdir_separator=:
9601       hardcode_shlibpath_var=no
9602       ;;
9603
9604     openbsd*)
9605       hardcode_direct=yes
9606       hardcode_shlibpath_var=no
9607       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9608         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9609         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9610         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9611         export_dynamic_flag_spec='${wl}-E'
9612       else
9613        case $host_os in
9614          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9615            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9616            hardcode_libdir_flag_spec='-R$libdir'
9617            ;;
9618          *)
9619            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9620            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9621            ;;
9622        esac
9623       fi
9624       ;;
9625
9626     os2*)
9627       hardcode_libdir_flag_spec='-L$libdir'
9628       hardcode_minus_L=yes
9629       allow_undefined_flag=unsupported
9630       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'
9631       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9632       ;;
9633
9634     osf3*)
9635       if test "$GCC" = yes; then
9636         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9637         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'
9638       else
9639         allow_undefined_flag=' -expect_unresolved \*'
9640         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'
9641       fi
9642       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9643       hardcode_libdir_separator=:
9644       ;;
9645
9646     osf4* | osf5*)      # as osf3* with the addition of -msym flag
9647       if test "$GCC" = yes; then
9648         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9649         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'
9650         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9651       else
9652         allow_undefined_flag=' -expect_unresolved \*'
9653         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'
9654         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
9655         $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
9656
9657         # Both c and cxx compiler support -rpath directly
9658         hardcode_libdir_flag_spec='-rpath $libdir'
9659       fi
9660       hardcode_libdir_separator=:
9661       ;;
9662
9663     sco3.2v5*)
9664       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9665       hardcode_shlibpath_var=no
9666       export_dynamic_flag_spec='${wl}-Bexport'
9667       runpath_var=LD_RUN_PATH
9668       hardcode_runpath_var=yes
9669       ;;
9670
9671     solaris*)
9672       no_undefined_flag=' -z text'
9673       if test "$GCC" = yes; then
9674         wlarc='${wl}'
9675         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9676         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9677           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
9678       else
9679         wlarc=''
9680         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9681         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9682         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9683       fi
9684       hardcode_libdir_flag_spec='-R$libdir'
9685       hardcode_shlibpath_var=no
9686       case $host_os in
9687       solaris2.[0-5] | solaris2.[0-5].*) ;;
9688       *)
9689         # The compiler driver will combine linker options so we
9690         # cannot just pass the convience library names through
9691         # without $wl, iff we do not link with $LD.
9692         # Luckily, gcc supports the same syntax we need for Sun Studio.
9693         # Supported since Solaris 2.6 (maybe 2.5.1?)
9694         case $wlarc in
9695         '')
9696           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
9697         *)
9698           whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
9699         esac ;;
9700       esac
9701       link_all_deplibs=yes
9702       ;;
9703
9704     sunos4*)
9705       if test "x$host_vendor" = xsequent; then
9706         # Use $CC to link under sequent, because it throws in some extra .o
9707         # files that make .init and .fini sections work.
9708         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9709       else
9710         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9711       fi
9712       hardcode_libdir_flag_spec='-L$libdir'
9713       hardcode_direct=yes
9714       hardcode_minus_L=yes
9715       hardcode_shlibpath_var=no
9716       ;;
9717
9718     sysv4)
9719       case $host_vendor in
9720         sni)
9721           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9722           hardcode_direct=yes # is this really true???
9723         ;;
9724         siemens)
9725           ## LD is ld it makes a PLAMLIB
9726           ## CC just makes a GrossModule.
9727           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9728           reload_cmds='$CC -r -o $output$reload_objs'
9729           hardcode_direct=no
9730         ;;
9731         motorola)
9732           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9733           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9734         ;;
9735       esac
9736       runpath_var='LD_RUN_PATH'
9737       hardcode_shlibpath_var=no
9738       ;;
9739
9740     sysv4.3*)
9741       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9742       hardcode_shlibpath_var=no
9743       export_dynamic_flag_spec='-Bexport'
9744       ;;
9745
9746     sysv4*MP*)
9747       if test -d /usr/nec; then
9748         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9749         hardcode_shlibpath_var=no
9750         runpath_var=LD_RUN_PATH
9751         hardcode_runpath_var=yes
9752         ld_shlibs=yes
9753       fi
9754       ;;
9755
9756     sysv4.2uw2*)
9757       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9758       hardcode_direct=yes
9759       hardcode_minus_L=no
9760       hardcode_shlibpath_var=no
9761       hardcode_runpath_var=yes
9762       runpath_var=LD_RUN_PATH
9763       ;;
9764
9765    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
9766       no_undefined_flag='${wl}-z ${wl}text'
9767       if test "$GCC" = yes; then
9768         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9769       else
9770         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9771       fi
9772       runpath_var='LD_RUN_PATH'
9773       hardcode_shlibpath_var=no
9774       ;;
9775
9776     sysv5*)
9777       no_undefined_flag=' -z text'
9778       # $CC -shared without GNU ld will not create a library from C++
9779       # object files and a static libstdc++, better avoid it by now
9780       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9781       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9782                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9783       hardcode_libdir_flag_spec=
9784       hardcode_shlibpath_var=no
9785       runpath_var='LD_RUN_PATH'
9786       ;;
9787
9788     uts4*)
9789       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9790       hardcode_libdir_flag_spec='-L$libdir'
9791       hardcode_shlibpath_var=no
9792       ;;
9793
9794     *)
9795       ld_shlibs=no
9796       ;;
9797     esac
9798   fi
9799
9800 { echo "$as_me:$LINENO: result: $ld_shlibs" >&5
9801 echo "${ECHO_T}$ld_shlibs" >&6; }
9802 test "$ld_shlibs" = no && can_build_shared=no
9803
9804 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9805 if test "$GCC" = yes; then
9806   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9807 fi
9808
9809 #
9810 # Do we need to explicitly link libc?
9811 #
9812 case "x$archive_cmds_need_lc" in
9813 x|xyes)
9814   # Assume -lc should be added
9815   archive_cmds_need_lc=yes
9816
9817   if test "$enable_shared" = yes && test "$GCC" = yes; then
9818     case $archive_cmds in
9819     *'~'*)
9820       # FIXME: we may have to deal with multi-command sequences.
9821       ;;
9822     '$CC '*)
9823       # Test whether the compiler implicitly links with -lc since on some
9824       # systems, -lgcc has to come before -lc. If gcc already passes -lc
9825       # to ld, don't add -lc before -lgcc.
9826       { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
9827 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
9828       $rm conftest*
9829       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
9830
9831       if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9832   (eval $ac_compile) 2>&5
9833   ac_status=$?
9834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9835   (exit $ac_status); } 2>conftest.err; then
9836         soname=conftest
9837         lib=conftest
9838         libobjs=conftest.$ac_objext
9839         deplibs=
9840         wl=$lt_prog_compiler_wl
9841         compiler_flags=-v
9842         linker_flags=-v
9843         verstring=
9844         output_objdir=.
9845         libname=conftest
9846         lt_save_allow_undefined_flag=$allow_undefined_flag
9847         allow_undefined_flag=
9848         if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
9849   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
9850   ac_status=$?
9851   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9852   (exit $ac_status); }
9853         then
9854           archive_cmds_need_lc=no
9855         else
9856           archive_cmds_need_lc=yes
9857         fi
9858         allow_undefined_flag=$lt_save_allow_undefined_flag
9859       else
9860         cat conftest.err 1>&5
9861       fi
9862       $rm conftest*
9863       { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
9864 echo "${ECHO_T}$archive_cmds_need_lc" >&6; }
9865       ;;
9866     esac
9867   fi
9868   ;;
9869 esac
9870
9871 { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
9872 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
9873 library_names_spec=
9874 libname_spec='lib$name'
9875 soname_spec=
9876 shrext_cmds=".so"
9877 postinstall_cmds=
9878 postuninstall_cmds=
9879 finish_cmds=
9880 finish_eval=
9881 shlibpath_var=
9882 shlibpath_overrides_runpath=unknown
9883 version_type=none
9884 dynamic_linker="$host_os ld.so"
9885 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9886 if test "$GCC" = yes; then
9887   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9888   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9889     # if the path contains ";" then we assume it to be the separator
9890     # otherwise default to the standard path separator (i.e. ":") - it is
9891     # assumed that no part of a normal pathname contains ";" but that should
9892     # okay in the real world where ";" in dirpaths is itself problematic.
9893     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9894   else
9895     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9896   fi
9897 else
9898   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9899 fi
9900 need_lib_prefix=unknown
9901 hardcode_into_libs=no
9902
9903 # when you set need_version to no, make sure it does not cause -set_version
9904 # flags to be left without arguments
9905 need_version=unknown
9906
9907 case $host_os in
9908 aix3*)
9909   version_type=linux
9910   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9911   shlibpath_var=LIBPATH
9912
9913   # AIX 3 has no versioning support, so we append a major version to the name.
9914   soname_spec='${libname}${release}${shared_ext}$major'
9915   ;;
9916
9917 aix4* | aix5*)
9918   version_type=linux
9919   need_lib_prefix=no
9920   need_version=no
9921   hardcode_into_libs=yes
9922   if test "$host_cpu" = ia64; then
9923     # AIX 5 supports IA64
9924     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9925     shlibpath_var=LD_LIBRARY_PATH
9926   else
9927     # With GCC up to 2.95.x, collect2 would create an import file
9928     # for dependence libraries.  The import file would start with
9929     # the line `#! .'.  This would cause the generated library to
9930     # depend on `.', always an invalid library.  This was fixed in
9931     # development snapshots of GCC prior to 3.0.
9932     case $host_os in
9933       aix4 | aix4.[01] | aix4.[01].*)
9934       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9935            echo ' yes '
9936            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9937         :
9938       else
9939         can_build_shared=no
9940       fi
9941       ;;
9942     esac
9943     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9944     # soname into executable. Probably we can add versioning support to
9945     # collect2, so additional links can be useful in future.
9946     if test "$aix_use_runtimelinking" = yes; then
9947       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9948       # instead of lib<name>.a to let people know that these are not
9949       # typical AIX shared libraries.
9950       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9951     else
9952       # We preserve .a as extension for shared libraries through AIX4.2
9953       # and later when we are not doing run time linking.
9954       library_names_spec='${libname}${release}.a $libname.a'
9955       soname_spec='${libname}${release}${shared_ext}$major'
9956     fi
9957     shlibpath_var=LIBPATH
9958   fi
9959   ;;
9960
9961 amigaos*)
9962   library_names_spec='$libname.ixlibrary $libname.a'
9963   # Create ${libname}_ixlibrary.a entries in /sys/libs.
9964   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'
9965   ;;
9966
9967 beos*)
9968   library_names_spec='${libname}${shared_ext}'
9969   dynamic_linker="$host_os ld.so"
9970   shlibpath_var=LIBRARY_PATH
9971   ;;
9972
9973 bsdi[45]*)
9974   version_type=linux
9975   need_version=no
9976   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9977   soname_spec='${libname}${release}${shared_ext}$major'
9978   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9979   shlibpath_var=LD_LIBRARY_PATH
9980   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9981   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9982   # the default ld.so.conf also contains /usr/contrib/lib and
9983   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9984   # libtool to hard-code these into programs
9985   ;;
9986
9987 cygwin* | mingw* | pw32*)
9988   version_type=windows
9989   shrext_cmds=".dll"
9990   need_version=no
9991   need_lib_prefix=no
9992
9993   case $GCC,$host_os in
9994   yes,cygwin* | yes,mingw* | yes,pw32*)
9995     library_names_spec='$libname.dll.a'
9996     # DLL is installed to $(libdir)/../bin by postinstall_cmds
9997     postinstall_cmds='base_file=`basename \${file}`~
9998       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
9999       dldir=$destdir/`dirname \$dlpath`~
10000       test -d \$dldir || mkdir -p \$dldir~
10001       $install_prog $dir/$dlname \$dldir/$dlname~
10002       chmod a+x \$dldir/$dlname'
10003     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10004       dlpath=$dir/\$dldll~
10005        $rm \$dlpath'
10006     shlibpath_overrides_runpath=yes
10007
10008     case $host_os in
10009     cygwin*)
10010       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
10011       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10012       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
10013       ;;
10014     mingw*)
10015       # MinGW DLLs use traditional 'lib' prefix
10016       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10017       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
10018       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
10019         # It is most probably a Windows format PATH printed by
10020         # mingw gcc, but we are running on Cygwin. Gcc prints its search
10021         # path with ; separators, and with drive letters. We can handle the
10022         # drive letters (cygwin fileutils understands them), so leave them,
10023         # especially as we might pass files found there to a mingw objdump,
10024         # which wouldn't understand a cygwinified path. Ahh.
10025         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10026       else
10027         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
10028       fi
10029       ;;
10030     pw32*)
10031       # pw32 DLLs use 'pw' prefix rather than 'lib'
10032       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10033       ;;
10034     esac
10035     ;;
10036
10037   *)
10038     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10039     ;;
10040   esac
10041   dynamic_linker='Win32 ld.exe'
10042   # FIXME: first we should search . and the directory the executable is in
10043   shlibpath_var=PATH
10044   ;;
10045
10046 darwin* | rhapsody*)
10047   dynamic_linker="$host_os dyld"
10048   version_type=darwin
10049   need_lib_prefix=no
10050   need_version=no
10051   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
10052   soname_spec='${libname}${release}${major}$shared_ext'
10053   shlibpath_overrides_runpath=yes
10054   shlibpath_var=DYLD_LIBRARY_PATH
10055   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10056   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
10057   if test "$GCC" = yes; then
10058     sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
10059   else
10060     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
10061   fi
10062   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10063   ;;
10064
10065 dgux*)
10066   version_type=linux
10067   need_lib_prefix=no
10068   need_version=no
10069   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10070   soname_spec='${libname}${release}${shared_ext}$major'
10071   shlibpath_var=LD_LIBRARY_PATH
10072   ;;
10073
10074 freebsd1*)
10075   dynamic_linker=no
10076   ;;
10077
10078 kfreebsd*-gnu)
10079   version_type=linux
10080   need_lib_prefix=no
10081   need_version=no
10082   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10083   soname_spec='${libname}${release}${shared_ext}$major'
10084   shlibpath_var=LD_LIBRARY_PATH
10085   shlibpath_overrides_runpath=no
10086   hardcode_into_libs=yes
10087   dynamic_linker='GNU ld.so'
10088   ;;
10089
10090 freebsd* | dragonfly*)
10091   # DragonFly does not have aout.  When/if they implement a new
10092   # versioning mechanism, adjust this.
10093   if test -x /usr/bin/objformat; then
10094     objformat=`/usr/bin/objformat`
10095   else
10096     case $host_os in
10097     freebsd[123]*) objformat=aout ;;
10098     *) objformat=elf ;;
10099     esac
10100   fi
10101   version_type=freebsd-$objformat
10102   case $version_type in
10103     freebsd-elf*)
10104       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10105       need_version=no
10106       need_lib_prefix=no
10107       ;;
10108     freebsd-*)
10109       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
10110       need_version=yes
10111       ;;
10112   esac
10113   shlibpath_var=LD_LIBRARY_PATH
10114   case $host_os in
10115   freebsd2*)
10116     shlibpath_overrides_runpath=yes
10117     ;;
10118   freebsd3.[01]* | freebsdelf3.[01]*)
10119     shlibpath_overrides_runpath=yes
10120     hardcode_into_libs=yes
10121     ;;
10122   *) # from 3.2 on
10123     shlibpath_overrides_runpath=no
10124     hardcode_into_libs=yes
10125     ;;
10126   esac
10127   ;;
10128
10129 gnu*)
10130   version_type=linux
10131   need_lib_prefix=no
10132   need_version=no
10133   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10134   soname_spec='${libname}${release}${shared_ext}$major'
10135   shlibpath_var=LD_LIBRARY_PATH
10136   hardcode_into_libs=yes
10137   ;;
10138
10139 hpux9* | hpux10* | hpux11*)
10140   # Give a soname corresponding to the major version so that dld.sl refuses to
10141   # link against other versions.
10142   version_type=sunos
10143   need_lib_prefix=no
10144   need_version=no
10145   case $host_cpu in
10146   ia64*)
10147     shrext_cmds='.so'
10148     hardcode_into_libs=yes
10149     dynamic_linker="$host_os dld.so"
10150     shlibpath_var=LD_LIBRARY_PATH
10151     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10152     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10153     soname_spec='${libname}${release}${shared_ext}$major'
10154     if test "X$HPUX_IA64_MODE" = X32; then
10155       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10156     else
10157       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10158     fi
10159     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10160     ;;
10161    hppa*64*)
10162      shrext_cmds='.sl'
10163      hardcode_into_libs=yes
10164      dynamic_linker="$host_os dld.sl"
10165      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10166      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10167      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10168      soname_spec='${libname}${release}${shared_ext}$major'
10169      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10170      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10171      ;;
10172    *)
10173     shrext_cmds='.sl'
10174     dynamic_linker="$host_os dld.sl"
10175     shlibpath_var=SHLIB_PATH
10176     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10177     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10178     soname_spec='${libname}${release}${shared_ext}$major'
10179     ;;
10180   esac
10181   # HP-UX runs *really* slowly unless shared libraries are mode 555.
10182   postinstall_cmds='chmod 555 $lib'
10183   ;;
10184
10185 irix5* | irix6* | nonstopux*)
10186   case $host_os in
10187     nonstopux*) version_type=nonstopux ;;
10188     *)
10189         if test "$lt_cv_prog_gnu_ld" = yes; then
10190                 version_type=linux
10191         else
10192                 version_type=irix
10193         fi ;;
10194   esac
10195   need_lib_prefix=no
10196   need_version=no
10197   soname_spec='${libname}${release}${shared_ext}$major'
10198   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
10199   case $host_os in
10200   irix5* | nonstopux*)
10201     libsuff= shlibsuff=
10202     ;;
10203   *)
10204     case $LD in # libtool.m4 will add one of these switches to LD
10205     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10206       libsuff= shlibsuff= libmagic=32-bit;;
10207     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10208       libsuff=32 shlibsuff=N32 libmagic=N32;;
10209     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10210       libsuff=64 shlibsuff=64 libmagic=64-bit;;
10211     *) libsuff= shlibsuff= libmagic=never-match;;
10212     esac
10213     ;;
10214   esac
10215   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10216   shlibpath_overrides_runpath=no
10217   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10218   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
10219   hardcode_into_libs=yes
10220   ;;
10221
10222 # No shared lib support for Linux oldld, aout, or coff.
10223 linux*oldld* | linux*aout* | linux*coff*)
10224   dynamic_linker=no
10225   ;;
10226
10227 # This must be Linux ELF.
10228 linux*)
10229   version_type=linux
10230   need_lib_prefix=no
10231   need_version=no
10232   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10233   soname_spec='${libname}${release}${shared_ext}$major'
10234   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10235   shlibpath_var=LD_LIBRARY_PATH
10236   shlibpath_overrides_runpath=no
10237   # This implies no fast_install, which is unacceptable.
10238   # Some rework will be needed to allow for fast_install
10239   # before this can be enabled.
10240   hardcode_into_libs=yes
10241
10242   # Append ld.so.conf contents to the search path
10243   if test -f /etc/ld.so.conf; then
10244     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,        ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
10245     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10246   fi
10247
10248   # We used to test for /lib/ld.so.1 and disable shared libraries on
10249   # powerpc, because MkLinux only supported shared libraries with the
10250   # GNU dynamic linker.  Since this was broken with cross compilers,
10251   # most powerpc-linux boxes support dynamic linking these days and
10252   # people can always --disable-shared, the test was removed, and we
10253   # assume the GNU/Linux dynamic linker is in use.
10254   dynamic_linker='GNU/Linux ld.so'
10255   ;;
10256
10257 knetbsd*-gnu)
10258   version_type=linux
10259   need_lib_prefix=no
10260   need_version=no
10261   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10262   soname_spec='${libname}${release}${shared_ext}$major'
10263   shlibpath_var=LD_LIBRARY_PATH
10264   shlibpath_overrides_runpath=no
10265   hardcode_into_libs=yes
10266   dynamic_linker='GNU ld.so'
10267   ;;
10268
10269 netbsd*)
10270   version_type=sunos
10271   need_lib_prefix=no
10272   need_version=no
10273   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10274     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10275     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10276     dynamic_linker='NetBSD (a.out) ld.so'
10277   else
10278     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10279     soname_spec='${libname}${release}${shared_ext}$major'
10280     dynamic_linker='NetBSD ld.elf_so'
10281   fi
10282   shlibpath_var=LD_LIBRARY_PATH
10283   shlibpath_overrides_runpath=yes
10284   hardcode_into_libs=yes
10285   ;;
10286
10287 newsos6)
10288   version_type=linux
10289   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10290   shlibpath_var=LD_LIBRARY_PATH
10291   shlibpath_overrides_runpath=yes
10292   ;;
10293
10294 nto-qnx*)
10295   version_type=linux
10296   need_lib_prefix=no
10297   need_version=no
10298   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10299   soname_spec='${libname}${release}${shared_ext}$major'
10300   shlibpath_var=LD_LIBRARY_PATH
10301   shlibpath_overrides_runpath=yes
10302   ;;
10303
10304 openbsd*)
10305   version_type=sunos
10306   need_lib_prefix=no
10307   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10308   case $host_os in
10309     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10310     *)                         need_version=no  ;;
10311   esac
10312   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10313   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10314   shlibpath_var=LD_LIBRARY_PATH
10315   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10316     case $host_os in
10317       openbsd2.[89] | openbsd2.[89].*)
10318         shlibpath_overrides_runpath=no
10319         ;;
10320       *)
10321         shlibpath_overrides_runpath=yes
10322         ;;
10323       esac
10324   else
10325     shlibpath_overrides_runpath=yes
10326   fi
10327   ;;
10328
10329 os2*)
10330   libname_spec='$name'
10331   shrext_cmds=".dll"
10332   need_lib_prefix=no
10333   library_names_spec='$libname${shared_ext} $libname.a'
10334   dynamic_linker='OS/2 ld.exe'
10335   shlibpath_var=LIBPATH
10336   ;;
10337
10338 osf3* | osf4* | osf5*)
10339   version_type=osf
10340   need_lib_prefix=no
10341   need_version=no
10342   soname_spec='${libname}${release}${shared_ext}$major'
10343   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10344   shlibpath_var=LD_LIBRARY_PATH
10345   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10346   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
10347   ;;
10348
10349 sco3.2v5*)
10350   version_type=osf
10351   soname_spec='${libname}${release}${shared_ext}$major'
10352   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10353   shlibpath_var=LD_LIBRARY_PATH
10354   ;;
10355
10356 solaris*)
10357   version_type=linux
10358   need_lib_prefix=no
10359   need_version=no
10360   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10361   soname_spec='${libname}${release}${shared_ext}$major'
10362   shlibpath_var=LD_LIBRARY_PATH
10363   shlibpath_overrides_runpath=yes
10364   hardcode_into_libs=yes
10365   # ldd complains unless libraries are executable
10366   postinstall_cmds='chmod +x $lib'
10367   ;;
10368
10369 sunos4*)
10370   version_type=sunos
10371   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10372   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10373   shlibpath_var=LD_LIBRARY_PATH
10374   shlibpath_overrides_runpath=yes
10375   if test "$with_gnu_ld" = yes; then
10376     need_lib_prefix=no
10377   fi
10378   need_version=yes
10379   ;;
10380
10381 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10382   version_type=linux
10383   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10384   soname_spec='${libname}${release}${shared_ext}$major'
10385   shlibpath_var=LD_LIBRARY_PATH
10386   case $host_vendor in
10387     sni)
10388       shlibpath_overrides_runpath=no
10389       need_lib_prefix=no
10390       export_dynamic_flag_spec='${wl}-Blargedynsym'
10391       runpath_var=LD_RUN_PATH
10392       ;;
10393     siemens)
10394       need_lib_prefix=no
10395       ;;
10396     motorola)
10397       need_lib_prefix=no
10398       need_version=no
10399       shlibpath_overrides_runpath=no
10400       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10401       ;;
10402   esac
10403   ;;
10404
10405 sysv4*MP*)
10406   if test -d /usr/nec ;then
10407     version_type=linux
10408     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
10409     soname_spec='$libname${shared_ext}.$major'
10410     shlibpath_var=LD_LIBRARY_PATH
10411   fi
10412   ;;
10413
10414 uts4*)
10415   version_type=linux
10416   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10417   soname_spec='${libname}${release}${shared_ext}$major'
10418   shlibpath_var=LD_LIBRARY_PATH
10419   ;;
10420
10421 *)
10422   dynamic_linker=no
10423   ;;
10424 esac
10425 { echo "$as_me:$LINENO: result: $dynamic_linker" >&5
10426 echo "${ECHO_T}$dynamic_linker" >&6; }
10427 test "$dynamic_linker" = no && can_build_shared=no
10428
10429 { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
10430 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
10431 hardcode_action=
10432 if test -n "$hardcode_libdir_flag_spec" || \
10433    test -n "$runpath_var" || \
10434    test "X$hardcode_automatic" = "Xyes" ; then
10435
10436   # We can hardcode non-existant directories.
10437   if test "$hardcode_direct" != no &&
10438      # If the only mechanism to avoid hardcoding is shlibpath_var, we
10439      # have to relink, otherwise we might link with an installed library
10440      # when we should be linking with a yet-to-be-installed one
10441      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
10442      test "$hardcode_minus_L" != no; then
10443     # Linking always hardcodes the temporary library directory.
10444     hardcode_action=relink
10445   else
10446     # We can link without hardcoding, and we can hardcode nonexisting dirs.
10447     hardcode_action=immediate
10448   fi
10449 else
10450   # We cannot hardcode anything, or else we can only hardcode existing
10451   # directories.
10452   hardcode_action=unsupported
10453 fi
10454 { echo "$as_me:$LINENO: result: $hardcode_action" >&5
10455 echo "${ECHO_T}$hardcode_action" >&6; }
10456
10457 if test "$hardcode_action" = relink; then
10458   # Fast installation is not supported
10459   enable_fast_install=no
10460 elif test "$shlibpath_overrides_runpath" = yes ||
10461      test "$enable_shared" = no; then
10462   # Fast installation is not necessary
10463   enable_fast_install=needless
10464 fi
10465
10466 striplib=
10467 old_striplib=
10468 { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
10469 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
10470 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
10471   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
10472   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
10473   { echo "$as_me:$LINENO: result: yes" >&5
10474 echo "${ECHO_T}yes" >&6; }
10475 else
10476 # FIXME - insert some real tests, host_os isn't really good enough
10477   case $host_os in
10478    darwin*)
10479        if test -n "$STRIP" ; then
10480          striplib="$STRIP -x"
10481          { echo "$as_me:$LINENO: result: yes" >&5
10482 echo "${ECHO_T}yes" >&6; }
10483        else
10484   { echo "$as_me:$LINENO: result: no" >&5
10485 echo "${ECHO_T}no" >&6; }
10486 fi
10487        ;;
10488    *)
10489   { echo "$as_me:$LINENO: result: no" >&5
10490 echo "${ECHO_T}no" >&6; }
10491     ;;
10492   esac
10493 fi
10494
10495 if test "x$enable_dlopen" != xyes; then
10496   enable_dlopen=unknown
10497   enable_dlopen_self=unknown
10498   enable_dlopen_self_static=unknown
10499 else
10500   lt_cv_dlopen=no
10501   lt_cv_dlopen_libs=
10502
10503   case $host_os in
10504   beos*)
10505     lt_cv_dlopen="load_add_on"
10506     lt_cv_dlopen_libs=
10507     lt_cv_dlopen_self=yes
10508     ;;
10509
10510   mingw* | pw32*)
10511     lt_cv_dlopen="LoadLibrary"
10512     lt_cv_dlopen_libs=
10513    ;;
10514
10515   cygwin*)
10516     lt_cv_dlopen="dlopen"
10517     lt_cv_dlopen_libs=
10518    ;;
10519
10520   darwin*)
10521   # if libdl is installed we need to link against it
10522     { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10523 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
10524 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10525   echo $ECHO_N "(cached) $ECHO_C" >&6
10526 else
10527   ac_check_lib_save_LIBS=$LIBS
10528 LIBS="-ldl  $LIBS"
10529 cat >conftest.$ac_ext <<_ACEOF
10530 /* confdefs.h.  */
10531 _ACEOF
10532 cat confdefs.h >>conftest.$ac_ext
10533 cat >>conftest.$ac_ext <<_ACEOF
10534 /* end confdefs.h.  */
10535
10536 /* Override any GCC internal prototype to avoid an error.
10537    Use char because int might match the return type of a GCC
10538    builtin and then its argument prototype would still apply.  */
10539 #ifdef __cplusplus
10540 extern "C"
10541 #endif
10542 char dlopen ();
10543 int
10544 main ()
10545 {
10546 return dlopen ();
10547   ;
10548   return 0;
10549 }
10550 _ACEOF
10551 rm -f conftest.$ac_objext conftest$ac_exeext
10552 if { (ac_try="$ac_link"
10553 case "(($ac_try" in
10554   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10555   *) ac_try_echo=$ac_try;;
10556 esac
10557 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10558   (eval "$ac_link") 2>conftest.er1
10559   ac_status=$?
10560   grep -v '^ *+' conftest.er1 >conftest.err
10561   rm -f conftest.er1
10562   cat conftest.err >&5
10563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10564   (exit $ac_status); } && {
10565          test -z "$ac_c_werror_flag" ||
10566          test ! -s conftest.err
10567        } && test -s conftest$ac_exeext &&
10568        $as_test_x conftest$ac_exeext; then
10569   ac_cv_lib_dl_dlopen=yes
10570 else
10571   echo "$as_me: failed program was:" >&5
10572 sed 's/^/| /' conftest.$ac_ext >&5
10573
10574         ac_cv_lib_dl_dlopen=no
10575 fi
10576
10577 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10578       conftest$ac_exeext conftest.$ac_ext
10579 LIBS=$ac_check_lib_save_LIBS
10580 fi
10581 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10582 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
10583 if test $ac_cv_lib_dl_dlopen = yes; then
10584   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10585 else
10586
10587     lt_cv_dlopen="dyld"
10588     lt_cv_dlopen_libs=
10589     lt_cv_dlopen_self=yes
10590
10591 fi
10592
10593    ;;
10594
10595   *)
10596     { echo "$as_me:$LINENO: checking for shl_load" >&5
10597 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
10598 if test "${ac_cv_func_shl_load+set}" = set; then
10599   echo $ECHO_N "(cached) $ECHO_C" >&6
10600 else
10601   cat >conftest.$ac_ext <<_ACEOF
10602 /* confdefs.h.  */
10603 _ACEOF
10604 cat confdefs.h >>conftest.$ac_ext
10605 cat >>conftest.$ac_ext <<_ACEOF
10606 /* end confdefs.h.  */
10607 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
10608    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10609 #define shl_load innocuous_shl_load
10610
10611 /* System header to define __stub macros and hopefully few prototypes,
10612     which can conflict with char shl_load (); below.
10613     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10614     <limits.h> exists even on freestanding compilers.  */
10615
10616 #ifdef __STDC__
10617 # include <limits.h>
10618 #else
10619 # include <assert.h>
10620 #endif
10621
10622 #undef shl_load
10623
10624 /* Override any GCC internal prototype to avoid an error.
10625    Use char because int might match the return type of a GCC
10626    builtin and then its argument prototype would still apply.  */
10627 #ifdef __cplusplus
10628 extern "C"
10629 #endif
10630 char shl_load ();
10631 /* The GNU C library defines this for functions which it implements
10632     to always fail with ENOSYS.  Some functions are actually named
10633     something starting with __ and the normal name is an alias.  */
10634 #if defined __stub_shl_load || defined __stub___shl_load
10635 choke me
10636 #endif
10637
10638 int
10639 main ()
10640 {
10641 return shl_load ();
10642   ;
10643   return 0;
10644 }
10645 _ACEOF
10646 rm -f conftest.$ac_objext conftest$ac_exeext
10647 if { (ac_try="$ac_link"
10648 case "(($ac_try" in
10649   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10650   *) ac_try_echo=$ac_try;;
10651 esac
10652 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10653   (eval "$ac_link") 2>conftest.er1
10654   ac_status=$?
10655   grep -v '^ *+' conftest.er1 >conftest.err
10656   rm -f conftest.er1
10657   cat conftest.err >&5
10658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10659   (exit $ac_status); } && {
10660          test -z "$ac_c_werror_flag" ||
10661          test ! -s conftest.err
10662        } && test -s conftest$ac_exeext &&
10663        $as_test_x conftest$ac_exeext; then
10664   ac_cv_func_shl_load=yes
10665 else
10666   echo "$as_me: failed program was:" >&5
10667 sed 's/^/| /' conftest.$ac_ext >&5
10668
10669         ac_cv_func_shl_load=no
10670 fi
10671
10672 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10673       conftest$ac_exeext conftest.$ac_ext
10674 fi
10675 { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
10676 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
10677 if test $ac_cv_func_shl_load = yes; then
10678   lt_cv_dlopen="shl_load"
10679 else
10680   { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10681 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
10682 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10683   echo $ECHO_N "(cached) $ECHO_C" >&6
10684 else
10685   ac_check_lib_save_LIBS=$LIBS
10686 LIBS="-ldld  $LIBS"
10687 cat >conftest.$ac_ext <<_ACEOF
10688 /* confdefs.h.  */
10689 _ACEOF
10690 cat confdefs.h >>conftest.$ac_ext
10691 cat >>conftest.$ac_ext <<_ACEOF
10692 /* end confdefs.h.  */
10693
10694 /* Override any GCC internal prototype to avoid an error.
10695    Use char because int might match the return type of a GCC
10696    builtin and then its argument prototype would still apply.  */
10697 #ifdef __cplusplus
10698 extern "C"
10699 #endif
10700 char shl_load ();
10701 int
10702 main ()
10703 {
10704 return shl_load ();
10705   ;
10706   return 0;
10707 }
10708 _ACEOF
10709 rm -f conftest.$ac_objext conftest$ac_exeext
10710 if { (ac_try="$ac_link"
10711 case "(($ac_try" in
10712   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10713   *) ac_try_echo=$ac_try;;
10714 esac
10715 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10716   (eval "$ac_link") 2>conftest.er1
10717   ac_status=$?
10718   grep -v '^ *+' conftest.er1 >conftest.err
10719   rm -f conftest.er1
10720   cat conftest.err >&5
10721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10722   (exit $ac_status); } && {
10723          test -z "$ac_c_werror_flag" ||
10724          test ! -s conftest.err
10725        } && test -s conftest$ac_exeext &&
10726        $as_test_x conftest$ac_exeext; then
10727   ac_cv_lib_dld_shl_load=yes
10728 else
10729   echo "$as_me: failed program was:" >&5
10730 sed 's/^/| /' conftest.$ac_ext >&5
10731
10732         ac_cv_lib_dld_shl_load=no
10733 fi
10734
10735 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10736       conftest$ac_exeext conftest.$ac_ext
10737 LIBS=$ac_check_lib_save_LIBS
10738 fi
10739 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10740 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
10741 if test $ac_cv_lib_dld_shl_load = yes; then
10742   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
10743 else
10744   { echo "$as_me:$LINENO: checking for dlopen" >&5
10745 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
10746 if test "${ac_cv_func_dlopen+set}" = set; then
10747   echo $ECHO_N "(cached) $ECHO_C" >&6
10748 else
10749   cat >conftest.$ac_ext <<_ACEOF
10750 /* confdefs.h.  */
10751 _ACEOF
10752 cat confdefs.h >>conftest.$ac_ext
10753 cat >>conftest.$ac_ext <<_ACEOF
10754 /* end confdefs.h.  */
10755 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
10756    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
10757 #define dlopen innocuous_dlopen
10758
10759 /* System header to define __stub macros and hopefully few prototypes,
10760     which can conflict with char dlopen (); below.
10761     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10762     <limits.h> exists even on freestanding compilers.  */
10763
10764 #ifdef __STDC__
10765 # include <limits.h>
10766 #else
10767 # include <assert.h>
10768 #endif
10769
10770 #undef dlopen
10771
10772 /* Override any GCC internal prototype to avoid an error.
10773    Use char because int might match the return type of a GCC
10774    builtin and then its argument prototype would still apply.  */
10775 #ifdef __cplusplus
10776 extern "C"
10777 #endif
10778 char dlopen ();
10779 /* The GNU C library defines this for functions which it implements
10780     to always fail with ENOSYS.  Some functions are actually named
10781     something starting with __ and the normal name is an alias.  */
10782 #if defined __stub_dlopen || defined __stub___dlopen
10783 choke me
10784 #endif
10785
10786 int
10787 main ()
10788 {
10789 return dlopen ();
10790   ;
10791   return 0;
10792 }
10793 _ACEOF
10794 rm -f conftest.$ac_objext conftest$ac_exeext
10795 if { (ac_try="$ac_link"
10796 case "(($ac_try" in
10797   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10798   *) ac_try_echo=$ac_try;;
10799 esac
10800 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10801   (eval "$ac_link") 2>conftest.er1
10802   ac_status=$?
10803   grep -v '^ *+' conftest.er1 >conftest.err
10804   rm -f conftest.er1
10805   cat conftest.err >&5
10806   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10807   (exit $ac_status); } && {
10808          test -z "$ac_c_werror_flag" ||
10809          test ! -s conftest.err
10810        } && test -s conftest$ac_exeext &&
10811        $as_test_x conftest$ac_exeext; then
10812   ac_cv_func_dlopen=yes
10813 else
10814   echo "$as_me: failed program was:" >&5
10815 sed 's/^/| /' conftest.$ac_ext >&5
10816
10817         ac_cv_func_dlopen=no
10818 fi
10819
10820 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10821       conftest$ac_exeext conftest.$ac_ext
10822 fi
10823 { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
10824 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
10825 if test $ac_cv_func_dlopen = yes; then
10826   lt_cv_dlopen="dlopen"
10827 else
10828   { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10829 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
10830 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10831   echo $ECHO_N "(cached) $ECHO_C" >&6
10832 else
10833   ac_check_lib_save_LIBS=$LIBS
10834 LIBS="-ldl  $LIBS"
10835 cat >conftest.$ac_ext <<_ACEOF
10836 /* confdefs.h.  */
10837 _ACEOF
10838 cat confdefs.h >>conftest.$ac_ext
10839 cat >>conftest.$ac_ext <<_ACEOF
10840 /* end confdefs.h.  */
10841
10842 /* Override any GCC internal prototype to avoid an error.
10843    Use char because int might match the return type of a GCC
10844    builtin and then its argument prototype would still apply.  */
10845 #ifdef __cplusplus
10846 extern "C"
10847 #endif
10848 char dlopen ();
10849 int
10850 main ()
10851 {
10852 return dlopen ();
10853   ;
10854   return 0;
10855 }
10856 _ACEOF
10857 rm -f conftest.$ac_objext conftest$ac_exeext
10858 if { (ac_try="$ac_link"
10859 case "(($ac_try" in
10860   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10861   *) ac_try_echo=$ac_try;;
10862 esac
10863 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10864   (eval "$ac_link") 2>conftest.er1
10865   ac_status=$?
10866   grep -v '^ *+' conftest.er1 >conftest.err
10867   rm -f conftest.er1
10868   cat conftest.err >&5
10869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10870   (exit $ac_status); } && {
10871          test -z "$ac_c_werror_flag" ||
10872          test ! -s conftest.err
10873        } && test -s conftest$ac_exeext &&
10874        $as_test_x conftest$ac_exeext; then
10875   ac_cv_lib_dl_dlopen=yes
10876 else
10877   echo "$as_me: failed program was:" >&5
10878 sed 's/^/| /' conftest.$ac_ext >&5
10879
10880         ac_cv_lib_dl_dlopen=no
10881 fi
10882
10883 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10884       conftest$ac_exeext conftest.$ac_ext
10885 LIBS=$ac_check_lib_save_LIBS
10886 fi
10887 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10888 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
10889 if test $ac_cv_lib_dl_dlopen = yes; then
10890   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10891 else
10892   { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
10893 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
10894 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
10895   echo $ECHO_N "(cached) $ECHO_C" >&6
10896 else
10897   ac_check_lib_save_LIBS=$LIBS
10898 LIBS="-lsvld  $LIBS"
10899 cat >conftest.$ac_ext <<_ACEOF
10900 /* confdefs.h.  */
10901 _ACEOF
10902 cat confdefs.h >>conftest.$ac_ext
10903 cat >>conftest.$ac_ext <<_ACEOF
10904 /* end confdefs.h.  */
10905
10906 /* Override any GCC internal prototype to avoid an error.
10907    Use char because int might match the return type of a GCC
10908    builtin and then its argument prototype would still apply.  */
10909 #ifdef __cplusplus
10910 extern "C"
10911 #endif
10912 char dlopen ();
10913 int
10914 main ()
10915 {
10916 return dlopen ();
10917   ;
10918   return 0;
10919 }
10920 _ACEOF
10921 rm -f conftest.$ac_objext conftest$ac_exeext
10922 if { (ac_try="$ac_link"
10923 case "(($ac_try" in
10924   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10925   *) ac_try_echo=$ac_try;;
10926 esac
10927 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10928   (eval "$ac_link") 2>conftest.er1
10929   ac_status=$?
10930   grep -v '^ *+' conftest.er1 >conftest.err
10931   rm -f conftest.er1
10932   cat conftest.err >&5
10933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10934   (exit $ac_status); } && {
10935          test -z "$ac_c_werror_flag" ||
10936          test ! -s conftest.err
10937        } && test -s conftest$ac_exeext &&
10938        $as_test_x conftest$ac_exeext; then
10939   ac_cv_lib_svld_dlopen=yes
10940 else
10941   echo "$as_me: failed program was:" >&5
10942 sed 's/^/| /' conftest.$ac_ext >&5
10943
10944         ac_cv_lib_svld_dlopen=no
10945 fi
10946
10947 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10948       conftest$ac_exeext conftest.$ac_ext
10949 LIBS=$ac_check_lib_save_LIBS
10950 fi
10951 { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
10952 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
10953 if test $ac_cv_lib_svld_dlopen = yes; then
10954   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10955 else
10956   { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
10957 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
10958 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
10959   echo $ECHO_N "(cached) $ECHO_C" >&6
10960 else
10961   ac_check_lib_save_LIBS=$LIBS
10962 LIBS="-ldld  $LIBS"
10963 cat >conftest.$ac_ext <<_ACEOF
10964 /* confdefs.h.  */
10965 _ACEOF
10966 cat confdefs.h >>conftest.$ac_ext
10967 cat >>conftest.$ac_ext <<_ACEOF
10968 /* end confdefs.h.  */
10969
10970 /* Override any GCC internal prototype to avoid an error.
10971    Use char because int might match the return type of a GCC
10972    builtin and then its argument prototype would still apply.  */
10973 #ifdef __cplusplus
10974 extern "C"
10975 #endif
10976 char dld_link ();
10977 int
10978 main ()
10979 {
10980 return dld_link ();
10981   ;
10982   return 0;
10983 }
10984 _ACEOF
10985 rm -f conftest.$ac_objext conftest$ac_exeext
10986 if { (ac_try="$ac_link"
10987 case "(($ac_try" in
10988   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10989   *) ac_try_echo=$ac_try;;
10990 esac
10991 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10992   (eval "$ac_link") 2>conftest.er1
10993   ac_status=$?
10994   grep -v '^ *+' conftest.er1 >conftest.err
10995   rm -f conftest.er1
10996   cat conftest.err >&5
10997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10998   (exit $ac_status); } && {
10999          test -z "$ac_c_werror_flag" ||
11000          test ! -s conftest.err
11001        } && test -s conftest$ac_exeext &&
11002        $as_test_x conftest$ac_exeext; then
11003   ac_cv_lib_dld_dld_link=yes
11004 else
11005   echo "$as_me: failed program was:" >&5
11006 sed 's/^/| /' conftest.$ac_ext >&5
11007
11008         ac_cv_lib_dld_dld_link=no
11009 fi
11010
11011 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11012       conftest$ac_exeext conftest.$ac_ext
11013 LIBS=$ac_check_lib_save_LIBS
11014 fi
11015 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
11016 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
11017 if test $ac_cv_lib_dld_dld_link = yes; then
11018   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
11019 fi
11020
11021
11022 fi
11023
11024
11025 fi
11026
11027
11028 fi
11029
11030
11031 fi
11032
11033
11034 fi
11035
11036     ;;
11037   esac
11038
11039   if test "x$lt_cv_dlopen" != xno; then
11040     enable_dlopen=yes
11041   else
11042     enable_dlopen=no
11043   fi
11044
11045   case $lt_cv_dlopen in
11046   dlopen)
11047     save_CPPFLAGS="$CPPFLAGS"
11048     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
11049
11050     save_LDFLAGS="$LDFLAGS"
11051     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
11052
11053     save_LIBS="$LIBS"
11054     LIBS="$lt_cv_dlopen_libs $LIBS"
11055
11056     { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
11057 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
11058 if test "${lt_cv_dlopen_self+set}" = set; then
11059   echo $ECHO_N "(cached) $ECHO_C" >&6
11060 else
11061           if test "$cross_compiling" = yes; then :
11062   lt_cv_dlopen_self=cross
11063 else
11064   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11065   lt_status=$lt_dlunknown
11066   cat > conftest.$ac_ext <<EOF
11067 #line 11067 "configure"
11068 #include "confdefs.h"
11069
11070 #if HAVE_DLFCN_H
11071 #include <dlfcn.h>
11072 #endif
11073
11074 #include <stdio.h>
11075
11076 #ifdef RTLD_GLOBAL
11077 #  define LT_DLGLOBAL           RTLD_GLOBAL
11078 #else
11079 #  ifdef DL_GLOBAL
11080 #    define LT_DLGLOBAL         DL_GLOBAL
11081 #  else
11082 #    define LT_DLGLOBAL         0
11083 #  endif
11084 #endif
11085
11086 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11087    find out it does not work in some platform. */
11088 #ifndef LT_DLLAZY_OR_NOW
11089 #  ifdef RTLD_LAZY
11090 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
11091 #  else
11092 #    ifdef DL_LAZY
11093 #      define LT_DLLAZY_OR_NOW          DL_LAZY
11094 #    else
11095 #      ifdef RTLD_NOW
11096 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
11097 #      else
11098 #        ifdef DL_NOW
11099 #          define LT_DLLAZY_OR_NOW      DL_NOW
11100 #        else
11101 #          define LT_DLLAZY_OR_NOW      0
11102 #        endif
11103 #      endif
11104 #    endif
11105 #  endif
11106 #endif
11107
11108 #ifdef __cplusplus
11109 extern "C" void exit (int);
11110 #endif
11111
11112 void fnord() { int i=42;}
11113 int main ()
11114 {
11115   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11116   int status = $lt_dlunknown;
11117
11118   if (self)
11119     {
11120       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
11121       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11122       /* dlclose (self); */
11123     }
11124
11125     exit (status);
11126 }
11127 EOF
11128   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11129   (eval $ac_link) 2>&5
11130   ac_status=$?
11131   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11132   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
11133     (./conftest; exit; ) >&5 2>/dev/null
11134     lt_status=$?
11135     case x$lt_status in
11136       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
11137       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
11138       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
11139     esac
11140   else :
11141     # compilation failed
11142     lt_cv_dlopen_self=no
11143   fi
11144 fi
11145 rm -fr conftest*
11146
11147
11148 fi
11149 { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
11150 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
11151
11152     if test "x$lt_cv_dlopen_self" = xyes; then
11153       LDFLAGS="$LDFLAGS $link_static_flag"
11154       { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
11155 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
11156 if test "${lt_cv_dlopen_self_static+set}" = set; then
11157   echo $ECHO_N "(cached) $ECHO_C" >&6
11158 else
11159           if test "$cross_compiling" = yes; then :
11160   lt_cv_dlopen_self_static=cross
11161 else
11162   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11163   lt_status=$lt_dlunknown
11164   cat > conftest.$ac_ext <<EOF
11165 #line 11165 "configure"
11166 #include "confdefs.h"
11167
11168 #if HAVE_DLFCN_H
11169 #include <dlfcn.h>
11170 #endif
11171
11172 #include <stdio.h>
11173
11174 #ifdef RTLD_GLOBAL
11175 #  define LT_DLGLOBAL           RTLD_GLOBAL
11176 #else
11177 #  ifdef DL_GLOBAL
11178 #    define LT_DLGLOBAL         DL_GLOBAL
11179 #  else
11180 #    define LT_DLGLOBAL         0
11181 #  endif
11182 #endif
11183
11184 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11185    find out it does not work in some platform. */
11186 #ifndef LT_DLLAZY_OR_NOW
11187 #  ifdef RTLD_LAZY
11188 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
11189 #  else
11190 #    ifdef DL_LAZY
11191 #      define LT_DLLAZY_OR_NOW          DL_LAZY
11192 #    else
11193 #      ifdef RTLD_NOW
11194 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
11195 #      else
11196 #        ifdef DL_NOW
11197 #          define LT_DLLAZY_OR_NOW      DL_NOW
11198 #        else
11199 #          define LT_DLLAZY_OR_NOW      0
11200 #        endif
11201 #      endif
11202 #    endif
11203 #  endif
11204 #endif
11205
11206 #ifdef __cplusplus
11207 extern "C" void exit (int);
11208 #endif
11209
11210 void fnord() { int i=42;}
11211 int main ()
11212 {
11213   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11214   int status = $lt_dlunknown;
11215
11216   if (self)
11217     {
11218       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
11219       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11220       /* dlclose (self); */
11221     }
11222
11223     exit (status);
11224 }
11225 EOF
11226   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11227   (eval $ac_link) 2>&5
11228   ac_status=$?
11229   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11230   (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
11231     (./conftest; exit; ) >&5 2>/dev/null
11232     lt_status=$?
11233     case x$lt_status in
11234       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
11235       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
11236       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
11237     esac
11238   else :
11239     # compilation failed
11240     lt_cv_dlopen_self_static=no
11241   fi
11242 fi
11243 rm -fr conftest*
11244
11245
11246 fi
11247 { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
11248 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
11249     fi
11250
11251     CPPFLAGS="$save_CPPFLAGS"
11252     LDFLAGS="$save_LDFLAGS"
11253     LIBS="$save_LIBS"
11254     ;;
11255   esac
11256
11257   case $lt_cv_dlopen_self in
11258   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
11259   *) enable_dlopen_self=unknown ;;
11260   esac
11261
11262   case $lt_cv_dlopen_self_static in
11263   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
11264   *) enable_dlopen_self_static=unknown ;;
11265   esac
11266 fi
11267
11268
11269 # Report which librarie types wil actually be built
11270 { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
11271 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
11272 { echo "$as_me:$LINENO: result: $can_build_shared" >&5
11273 echo "${ECHO_T}$can_build_shared" >&6; }
11274
11275 { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
11276 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
11277 test "$can_build_shared" = "no" && enable_shared=no
11278
11279 # On AIX, shared libraries and static libraries use the same namespace, and
11280 # are all built from PIC.
11281 case $host_os in
11282 aix3*)
11283   test "$enable_shared" = yes && enable_static=no
11284   if test -n "$RANLIB"; then
11285     archive_cmds="$archive_cmds~\$RANLIB \$lib"
11286     postinstall_cmds='$RANLIB $lib'
11287   fi
11288   ;;
11289
11290 aix4* | aix5*)
11291   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
11292     test "$enable_shared" = yes && enable_static=no
11293   fi
11294     ;;
11295 esac
11296 { echo "$as_me:$LINENO: result: $enable_shared" >&5
11297 echo "${ECHO_T}$enable_shared" >&6; }
11298
11299 { echo "$as_me:$LINENO: checking whether to build static libraries" >&5
11300 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
11301 # Make sure either enable_shared or enable_static is yes.
11302 test "$enable_shared" = yes || enable_static=yes
11303 { echo "$as_me:$LINENO: result: $enable_static" >&5
11304 echo "${ECHO_T}$enable_static" >&6; }
11305
11306 # The else clause should only fire when bootstrapping the
11307 # libtool distribution, otherwise you forgot to ship ltmain.sh
11308 # with your package, and you will get complaints that there are
11309 # no rules to generate ltmain.sh.
11310 if test -f "$ltmain"; then
11311   # See if we are running on zsh, and set the options which allow our commands through
11312   # without removal of \ escapes.
11313   if test -n "${ZSH_VERSION+set}" ; then
11314     setopt NO_GLOB_SUBST
11315   fi
11316   # Now quote all the things that may contain metacharacters while being
11317   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11318   # variables and quote the copies for generation of the libtool script.
11319   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11320     SED SHELL STRIP \
11321     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11322     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11323     deplibs_check_method reload_flag reload_cmds need_locks \
11324     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11325     lt_cv_sys_global_symbol_to_c_name_address \
11326     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11327     old_postinstall_cmds old_postuninstall_cmds \
11328     compiler \
11329     CC \
11330     LD \
11331     lt_prog_compiler_wl \
11332     lt_prog_compiler_pic \
11333     lt_prog_compiler_static \
11334     lt_prog_compiler_no_builtin_flag \
11335     export_dynamic_flag_spec \
11336     thread_safe_flag_spec \
11337     whole_archive_flag_spec \
11338     enable_shared_with_static_runtimes \
11339     old_archive_cmds \
11340     old_archive_from_new_cmds \
11341     predep_objects \
11342     postdep_objects \
11343     predeps \
11344     postdeps \
11345     compiler_lib_search_path \
11346     archive_cmds \
11347     archive_expsym_cmds \
11348     postinstall_cmds \
11349     postuninstall_cmds \
11350     old_archive_from_expsyms_cmds \
11351     allow_undefined_flag \
11352     no_undefined_flag \
11353     export_symbols_cmds \
11354     hardcode_libdir_flag_spec \
11355     hardcode_libdir_flag_spec_ld \
11356     hardcode_libdir_separator \
11357     hardcode_automatic \
11358     module_cmds \
11359     module_expsym_cmds \
11360     lt_cv_prog_compiler_c_o \
11361     exclude_expsyms \
11362     include_expsyms; do
11363
11364     case $var in
11365     old_archive_cmds | \
11366     old_archive_from_new_cmds | \
11367     archive_cmds | \
11368     archive_expsym_cmds | \
11369     module_cmds | \
11370     module_expsym_cmds | \
11371     old_archive_from_expsyms_cmds | \
11372     export_symbols_cmds | \
11373     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11374     postinstall_cmds | postuninstall_cmds | \
11375     old_postinstall_cmds | old_postuninstall_cmds | \
11376     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11377       # Double-quote double-evaled strings.
11378       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11379       ;;
11380     *)
11381       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11382       ;;
11383     esac
11384   done
11385
11386   case $lt_echo in
11387   *'\$0 --fallback-echo"')
11388     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11389     ;;
11390   esac
11391
11392 cfgfile="${ofile}T"
11393   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
11394   $rm -f "$cfgfile"
11395   { echo "$as_me:$LINENO: creating $ofile" >&5
11396 echo "$as_me: creating $ofile" >&6;}
11397
11398   cat <<__EOF__ >> "$cfgfile"
11399 #! $SHELL
11400
11401 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
11402 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
11403 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
11404 #
11405 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
11406 # Free Software Foundation, Inc.
11407 #
11408 # This file is part of GNU Libtool:
11409 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
11410 #
11411 # This program is free software; you can redistribute it and/or modify
11412 # it under the terms of the GNU General Public License as published by
11413 # the Free Software Foundation; either version 2 of the License, or
11414 # (at your option) any later version.
11415 #
11416 # This program is distributed in the hope that it will be useful, but
11417 # WITHOUT ANY WARRANTY; without even the implied warranty of
11418 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11419 # General Public License for more details.
11420 #
11421 # You should have received a copy of the GNU General Public License
11422 # along with this program; if not, write to the Free Software
11423 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
11424 #
11425 # As a special exception to the GNU General Public License, if you
11426 # distribute this file as part of a program that contains a
11427 # configuration script generated by Autoconf, you may include it under
11428 # the same distribution terms that you use for the rest of that program.
11429
11430 # A sed program that does not truncate output.
11431 SED=$lt_SED
11432
11433 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
11434 Xsed="$SED -e 1s/^X//"
11435
11436 # The HP-UX ksh and POSIX shell print the target directory to stdout
11437 # if CDPATH is set.
11438 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11439
11440 # The names of the tagged configurations supported by this script.
11441 available_tags=
11442
11443 # ### BEGIN LIBTOOL CONFIG
11444
11445 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11446
11447 # Shell to use when invoking shell scripts.
11448 SHELL=$lt_SHELL
11449
11450 # Whether or not to build shared libraries.
11451 build_libtool_libs=$enable_shared
11452
11453 # Whether or not to build static libraries.
11454 build_old_libs=$enable_static
11455
11456 # Whether or not to add -lc for building shared libraries.
11457 build_libtool_need_lc=$archive_cmds_need_lc
11458
11459 # Whether or not to disallow shared libs when runtime libs are static
11460 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
11461
11462 # Whether or not to optimize for fast installation.
11463 fast_install=$enable_fast_install
11464
11465 # The host system.
11466 host_alias=$host_alias
11467 host=$host
11468 host_os=$host_os
11469
11470 # The build system.
11471 build_alias=$build_alias
11472 build=$build
11473 build_os=$build_os
11474
11475 # An echo program that does not interpret backslashes.
11476 echo=$lt_echo
11477
11478 # The archiver.
11479 AR=$lt_AR
11480 AR_FLAGS=$lt_AR_FLAGS
11481
11482 # A C compiler.
11483 LTCC=$lt_LTCC
11484
11485 # A language-specific compiler.
11486 CC=$lt_compiler
11487
11488 # Is the compiler the GNU C compiler?
11489 with_gcc=$GCC
11490
11491 # An ERE matcher.
11492 EGREP=$lt_EGREP
11493
11494 # The linker used to build libraries.
11495 LD=$lt_LD
11496
11497 # Whether we need hard or soft links.
11498 LN_S=$lt_LN_S
11499
11500 # A BSD-compatible nm program.
11501 NM=$lt_NM
11502
11503 # A symbol stripping program
11504 STRIP=$lt_STRIP
11505
11506 # Used to examine libraries when file_magic_cmd begins "file"
11507 MAGIC_CMD=$MAGIC_CMD
11508
11509 # Used on cygwin: DLL creation program.
11510 DLLTOOL="$DLLTOOL"
11511
11512 # Used on cygwin: object dumper.
11513 OBJDUMP="$OBJDUMP"
11514
11515 # Used on cygwin: assembler.
11516 AS="$AS"
11517
11518 # The name of the directory that contains temporary libtool files.
11519 objdir=$objdir
11520
11521 # How to create reloadable object files.
11522 reload_flag=$lt_reload_flag
11523 reload_cmds=$lt_reload_cmds
11524
11525 # How to pass a linker flag through the compiler.
11526 wl=$lt_lt_prog_compiler_wl
11527
11528 # Object file suffix (normally "o").
11529 objext="$ac_objext"
11530
11531 # Old archive suffix (normally "a").
11532 libext="$libext"
11533
11534 # Shared library suffix (normally ".so").
11535 shrext_cmds='$shrext_cmds'
11536
11537 # Executable file suffix (normally "").
11538 exeext="$exeext"
11539
11540 # Additional compiler flags for building library objects.
11541 pic_flag=$lt_lt_prog_compiler_pic
11542 pic_mode=$pic_mode
11543
11544 # What is the maximum length of a command?
11545 max_cmd_len=$lt_cv_sys_max_cmd_len
11546
11547 # Does compiler simultaneously support -c and -o options?
11548 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
11549
11550 # Must we lock files when doing compilation?
11551 need_locks=$lt_need_locks
11552
11553 # Do we need the lib prefix for modules?
11554 need_lib_prefix=$need_lib_prefix
11555
11556 # Do we need a version for libraries?
11557 need_version=$need_version
11558
11559 # Whether dlopen is supported.
11560 dlopen_support=$enable_dlopen
11561
11562 # Whether dlopen of programs is supported.
11563 dlopen_self=$enable_dlopen_self
11564
11565 # Whether dlopen of statically linked programs is supported.
11566 dlopen_self_static=$enable_dlopen_self_static
11567
11568 # Compiler flag to prevent dynamic linking.
11569 link_static_flag=$lt_lt_prog_compiler_static
11570
11571 # Compiler flag to turn off builtin functions.
11572 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
11573
11574 # Compiler flag to allow reflexive dlopens.
11575 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
11576
11577 # Compiler flag to generate shared objects directly from archives.
11578 whole_archive_flag_spec=$lt_whole_archive_flag_spec
11579
11580 # Compiler flag to generate thread-safe objects.
11581 thread_safe_flag_spec=$lt_thread_safe_flag_spec
11582
11583 # Library versioning type.
11584 version_type=$version_type
11585
11586 # Format of library name prefix.
11587 libname_spec=$lt_libname_spec
11588
11589 # List of archive names.  First name is the real one, the rest are links.
11590 # The last name is the one that the linker finds with -lNAME.
11591 library_names_spec=$lt_library_names_spec
11592
11593 # The coded name of the library, if different from the real name.
11594 soname_spec=$lt_soname_spec
11595
11596 # Commands used to build and install an old-style archive.
11597 RANLIB=$lt_RANLIB
11598 old_archive_cmds=$lt_old_archive_cmds
11599 old_postinstall_cmds=$lt_old_postinstall_cmds
11600 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11601
11602 # Create an old-style archive from a shared archive.
11603 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
11604
11605 # Create a temporary old-style archive to link instead of a shared archive.
11606 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
11607
11608 # Commands used to build and install a shared archive.
11609 archive_cmds=$lt_archive_cmds
11610 archive_expsym_cmds=$lt_archive_expsym_cmds
11611 postinstall_cmds=$lt_postinstall_cmds
11612 postuninstall_cmds=$lt_postuninstall_cmds
11613
11614 # Commands used to build a loadable module (assumed same as above if empty)
11615 module_cmds=$lt_module_cmds
11616 module_expsym_cmds=$lt_module_expsym_cmds
11617
11618 # Commands to strip libraries.
11619 old_striplib=$lt_old_striplib
11620 striplib=$lt_striplib
11621
11622 # Dependencies to place before the objects being linked to create a
11623 # shared library.
11624 predep_objects=$lt_predep_objects
11625
11626 # Dependencies to place after the objects being linked to create a
11627 # shared library.
11628 postdep_objects=$lt_postdep_objects
11629
11630 # Dependencies to place before the objects being linked to create a
11631 # shared library.
11632 predeps=$lt_predeps
11633
11634 # Dependencies to place after the objects being linked to create a
11635 # shared library.
11636 postdeps=$lt_postdeps
11637
11638 # The library search path used internally by the compiler when linking
11639 # a shared library.
11640 compiler_lib_search_path=$lt_compiler_lib_search_path
11641
11642 # Method to check whether dependent libraries are shared objects.
11643 deplibs_check_method=$lt_deplibs_check_method
11644
11645 # Command to use when deplibs_check_method == file_magic.
11646 file_magic_cmd=$lt_file_magic_cmd
11647
11648 # Flag that allows shared libraries with undefined symbols to be built.
11649 allow_undefined_flag=$lt_allow_undefined_flag
11650
11651 # Flag that forces no undefined symbols.
11652 no_undefined_flag=$lt_no_undefined_flag
11653
11654 # Commands used to finish a libtool library installation in a directory.
11655 finish_cmds=$lt_finish_cmds
11656
11657 # Same as above, but a single script fragment to be evaled but not shown.
11658 finish_eval=$lt_finish_eval
11659
11660 # Take the output of nm and produce a listing of raw symbols and C names.
11661 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11662
11663 # Transform the output of nm in a proper C declaration
11664 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11665
11666 # Transform the output of nm in a C name address pair
11667 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11668
11669 # This is the shared library runtime path variable.
11670 runpath_var=$runpath_var
11671
11672 # This is the shared library path variable.
11673 shlibpath_var=$shlibpath_var
11674
11675 # Is shlibpath searched before the hard-coded library search path?
11676 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11677
11678 # How to hardcode a shared library path into an executable.
11679 hardcode_action=$hardcode_action
11680
11681 # Whether we should hardcode library paths into libraries.
11682 hardcode_into_libs=$hardcode_into_libs
11683
11684 # Flag to hardcode \$libdir into a binary during linking.
11685 # This must work even if \$libdir does not exist.
11686 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
11687
11688 # If ld is used when linking, flag to hardcode \$libdir into
11689 # a binary during linking. This must work even if \$libdir does
11690 # not exist.
11691 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
11692
11693 # Whether we need a single -rpath flag with a separated argument.
11694 hardcode_libdir_separator=$lt_hardcode_libdir_separator
11695
11696 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11697 # resulting binary.
11698 hardcode_direct=$hardcode_direct
11699
11700 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11701 # resulting binary.
11702 hardcode_minus_L=$hardcode_minus_L
11703
11704 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11705 # the resulting binary.
11706 hardcode_shlibpath_var=$hardcode_shlibpath_var
11707
11708 # Set to yes if building a shared library automatically hardcodes DIR into the library
11709 # and all subsequent libraries and executables linked against it.
11710 hardcode_automatic=$hardcode_automatic
11711
11712 # Variables whose values should be saved in libtool wrapper scripts and
11713 # restored at relink time.
11714 variables_saved_for_relink="$variables_saved_for_relink"
11715
11716 # Whether libtool must link a program against all its dependency libraries.
11717 link_all_deplibs=$link_all_deplibs
11718
11719 # Compile-time system search path for libraries
11720 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11721
11722 # Run-time system search path for libraries
11723 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11724
11725 # Fix the shell variable \$srcfile for the compiler.
11726 fix_srcfile_path="$fix_srcfile_path"
11727
11728 # Set to yes if exported symbols are required.
11729 always_export_symbols=$always_export_symbols
11730
11731 # The commands to list exported symbols.
11732 export_symbols_cmds=$lt_export_symbols_cmds
11733
11734 # The commands to extract the exported symbol list from a shared archive.
11735 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11736
11737 # Symbols that should not be listed in the preloaded symbols.
11738 exclude_expsyms=$lt_exclude_expsyms
11739
11740 # Symbols that must always be exported.
11741 include_expsyms=$lt_include_expsyms
11742
11743 # ### END LIBTOOL CONFIG
11744
11745 __EOF__
11746
11747
11748   case $host_os in
11749   aix3*)
11750     cat <<\EOF >> "$cfgfile"
11751
11752 # AIX sometimes has problems with the GCC collect2 program.  For some
11753 # reason, if we set the COLLECT_NAMES environment variable, the problems
11754 # vanish in a puff of smoke.
11755 if test "X${COLLECT_NAMES+set}" != Xset; then
11756   COLLECT_NAMES=
11757   export COLLECT_NAMES
11758 fi
11759 EOF
11760     ;;
11761   esac
11762
11763   # We use sed instead of cat because bash on DJGPP gets confused if
11764   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
11765   # text mode, it properly converts lines to CR/LF.  This bash problem
11766   # is reportedly fixed, but why not run on old versions too?
11767   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
11768
11769   mv -f "$cfgfile" "$ofile" || \
11770     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
11771   chmod +x "$ofile"
11772
11773 else
11774   # If there is no Makefile yet, we rely on a make rule to execute
11775   # `config.status --recheck' to rerun these tests and create the
11776   # libtool script then.
11777   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11778   if test -f "$ltmain_in"; then
11779     test -f Makefile && make "$ltmain"
11780   fi
11781 fi
11782
11783
11784 ac_ext=c
11785 ac_cpp='$CPP $CPPFLAGS'
11786 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11787 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11788 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11789
11790 CC="$lt_save_CC"
11791
11792
11793 # Check whether --with-tags was given.
11794 if test "${with_tags+set}" = set; then
11795   withval=$with_tags; tagnames="$withval"
11796 fi
11797
11798
11799 if test -f "$ltmain" && test -n "$tagnames"; then
11800   if test ! -f "${ofile}"; then
11801     { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
11802 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11803   fi
11804
11805   if test -z "$LTCC"; then
11806     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11807     if test -z "$LTCC"; then
11808       { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11809 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11810     else
11811       { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11812 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11813     fi
11814   fi
11815
11816   # Extract list of available tagged configurations in $ofile.
11817   # Note that this assumes the entire list is on one line.
11818   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11819
11820   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11821   for tagname in $tagnames; do
11822     IFS="$lt_save_ifs"
11823     # Check whether tagname contains only valid characters
11824     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11825     "") ;;
11826     *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
11827 echo "$as_me: error: invalid tag name: $tagname" >&2;}
11828    { (exit 1); exit 1; }; }
11829         ;;
11830     esac
11831
11832     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11833     then
11834       { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
11835 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
11836    { (exit 1); exit 1; }; }
11837     fi
11838
11839     # Update the list of available tags.
11840     if test -n "$tagname"; then
11841       echo appending configuration tag \"$tagname\" to $ofile
11842
11843       case $tagname in
11844       CXX)
11845         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11846             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11847             (test "X$CXX" != "Xg++"))) ; then
11848           :
11849         else
11850           tagname=""
11851         fi
11852         ;;
11853
11854       F77)
11855         if test -n "$F77" && test "X$F77" != "Xno"; then
11856           :
11857         else
11858           tagname=""
11859         fi
11860         ;;
11861
11862       GCJ)
11863         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11864           :
11865         else
11866           tagname=""
11867         fi
11868         ;;
11869
11870       RC)
11871
11872
11873 # Source file extension for RC test sources.
11874 ac_ext=rc
11875
11876 # Object file extension for compiled RC test sources.
11877 objext=o
11878 objext_RC=$objext
11879
11880 # Code to be used in simple compile tests
11881 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11882
11883 # Code to be used in simple link tests
11884 lt_simple_link_test_code="$lt_simple_compile_test_code"
11885
11886 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11887
11888 # If no C compiler was specified, use CC.
11889 LTCC=${LTCC-"$CC"}
11890
11891 # Allow CC to be a program name with arguments.
11892 compiler=$CC
11893
11894
11895 # save warnings/boilerplate of simple test code
11896 ac_outfile=conftest.$ac_objext
11897 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11898 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11899 _lt_compiler_boilerplate=`cat conftest.err`
11900 $rm conftest*
11901
11902 ac_outfile=conftest.$ac_objext
11903 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11904 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11905 _lt_linker_boilerplate=`cat conftest.err`
11906 $rm conftest*
11907
11908
11909 # Allow CC to be a program name with arguments.
11910 lt_save_CC="$CC"
11911 CC=${RC-"windres"}
11912 compiler=$CC
11913 compiler_RC=$CC
11914 for cc_temp in $compiler""; do
11915   case $cc_temp in
11916     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11917     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11918     \-*) ;;
11919     *) break;;
11920   esac
11921 done
11922 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11923
11924 lt_cv_prog_compiler_c_o_RC=yes
11925
11926 # The else clause should only fire when bootstrapping the
11927 # libtool distribution, otherwise you forgot to ship ltmain.sh
11928 # with your package, and you will get complaints that there are
11929 # no rules to generate ltmain.sh.
11930 if test -f "$ltmain"; then
11931   # See if we are running on zsh, and set the options which allow our commands through
11932   # without removal of \ escapes.
11933   if test -n "${ZSH_VERSION+set}" ; then
11934     setopt NO_GLOB_SUBST
11935   fi
11936   # Now quote all the things that may contain metacharacters while being
11937   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11938   # variables and quote the copies for generation of the libtool script.
11939   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11940     SED SHELL STRIP \
11941     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11942     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11943     deplibs_check_method reload_flag reload_cmds need_locks \
11944     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11945     lt_cv_sys_global_symbol_to_c_name_address \
11946     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11947     old_postinstall_cmds old_postuninstall_cmds \
11948     compiler_RC \
11949     CC_RC \
11950     LD_RC \
11951     lt_prog_compiler_wl_RC \
11952     lt_prog_compiler_pic_RC \
11953     lt_prog_compiler_static_RC \
11954     lt_prog_compiler_no_builtin_flag_RC \
11955     export_dynamic_flag_spec_RC \
11956     thread_safe_flag_spec_RC \
11957     whole_archive_flag_spec_RC \
11958     enable_shared_with_static_runtimes_RC \
11959     old_archive_cmds_RC \
11960     old_archive_from_new_cmds_RC \
11961     predep_objects_RC \
11962     postdep_objects_RC \
11963     predeps_RC \
11964     postdeps_RC \
11965     compiler_lib_search_path_RC \
11966     archive_cmds_RC \
11967     archive_expsym_cmds_RC \
11968     postinstall_cmds_RC \
11969     postuninstall_cmds_RC \
11970     old_archive_from_expsyms_cmds_RC \
11971     allow_undefined_flag_RC \
11972     no_undefined_flag_RC \
11973     export_symbols_cmds_RC \
11974     hardcode_libdir_flag_spec_RC \
11975     hardcode_libdir_flag_spec_ld_RC \
11976     hardcode_libdir_separator_RC \
11977     hardcode_automatic_RC \
11978     module_cmds_RC \
11979     module_expsym_cmds_RC \
11980     lt_cv_prog_compiler_c_o_RC \
11981     exclude_expsyms_RC \
11982     include_expsyms_RC; do
11983
11984     case $var in
11985     old_archive_cmds_RC | \
11986     old_archive_from_new_cmds_RC | \
11987     archive_cmds_RC | \
11988     archive_expsym_cmds_RC | \
11989     module_cmds_RC | \
11990     module_expsym_cmds_RC | \
11991     old_archive_from_expsyms_cmds_RC | \
11992     export_symbols_cmds_RC | \
11993     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11994     postinstall_cmds | postuninstall_cmds | \
11995     old_postinstall_cmds | old_postuninstall_cmds | \
11996     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11997       # Double-quote double-evaled strings.
11998       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11999       ;;
12000     *)
12001       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
12002       ;;
12003     esac
12004   done
12005
12006   case $lt_echo in
12007   *'\$0 --fallback-echo"')
12008     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
12009     ;;
12010   esac
12011
12012 cfgfile="$ofile"
12013
12014   cat <<__EOF__ >> "$cfgfile"
12015 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
12016
12017 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12018
12019 # Shell to use when invoking shell scripts.
12020 SHELL=$lt_SHELL
12021
12022 # Whether or not to build shared libraries.
12023 build_libtool_libs=$enable_shared
12024
12025 # Whether or not to build static libraries.
12026 build_old_libs=$enable_static
12027
12028 # Whether or not to add -lc for building shared libraries.
12029 build_libtool_need_lc=$archive_cmds_need_lc_RC
12030
12031 # Whether or not to disallow shared libs when runtime libs are static
12032 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
12033
12034 # Whether or not to optimize for fast installation.
12035 fast_install=$enable_fast_install
12036
12037 # The host system.
12038 host_alias=$host_alias
12039 host=$host
12040 host_os=$host_os
12041
12042 # The build system.
12043 build_alias=$build_alias
12044 build=$build
12045 build_os=$build_os
12046
12047 # An echo program that does not interpret backslashes.
12048 echo=$lt_echo
12049
12050 # The archiver.
12051 AR=$lt_AR
12052 AR_FLAGS=$lt_AR_FLAGS
12053
12054 # A C compiler.
12055 LTCC=$lt_LTCC
12056
12057 # A language-specific compiler.
12058 CC=$lt_compiler_RC
12059
12060 # Is the compiler the GNU C compiler?
12061 with_gcc=$GCC_RC
12062
12063 # An ERE matcher.
12064 EGREP=$lt_EGREP
12065
12066 # The linker used to build libraries.
12067 LD=$lt_LD_RC
12068
12069 # Whether we need hard or soft links.
12070 LN_S=$lt_LN_S
12071
12072 # A BSD-compatible nm program.
12073 NM=$lt_NM
12074
12075 # A symbol stripping program
12076 STRIP=$lt_STRIP
12077
12078 # Used to examine libraries when file_magic_cmd begins "file"
12079 MAGIC_CMD=$MAGIC_CMD
12080
12081 # Used on cygwin: DLL creation program.
12082 DLLTOOL="$DLLTOOL"
12083
12084 # Used on cygwin: object dumper.
12085 OBJDUMP="$OBJDUMP"
12086
12087 # Used on cygwin: assembler.
12088 AS="$AS"
12089
12090 # The name of the directory that contains temporary libtool files.
12091 objdir=$objdir
12092
12093 # How to create reloadable object files.
12094 reload_flag=$lt_reload_flag
12095 reload_cmds=$lt_reload_cmds
12096
12097 # How to pass a linker flag through the compiler.
12098 wl=$lt_lt_prog_compiler_wl_RC
12099
12100 # Object file suffix (normally "o").
12101 objext="$ac_objext"
12102
12103 # Old archive suffix (normally "a").
12104 libext="$libext"
12105
12106 # Shared library suffix (normally ".so").
12107 shrext_cmds='$shrext_cmds'
12108
12109 # Executable file suffix (normally "").
12110 exeext="$exeext"
12111
12112 # Additional compiler flags for building library objects.
12113 pic_flag=$lt_lt_prog_compiler_pic_RC
12114 pic_mode=$pic_mode
12115
12116 # What is the maximum length of a command?
12117 max_cmd_len=$lt_cv_sys_max_cmd_len
12118
12119 # Does compiler simultaneously support -c and -o options?
12120 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
12121
12122 # Must we lock files when doing compilation?
12123 need_locks=$lt_need_locks
12124
12125 # Do we need the lib prefix for modules?
12126 need_lib_prefix=$need_lib_prefix
12127
12128 # Do we need a version for libraries?
12129 need_version=$need_version
12130
12131 # Whether dlopen is supported.
12132 dlopen_support=$enable_dlopen
12133
12134 # Whether dlopen of programs is supported.
12135 dlopen_self=$enable_dlopen_self
12136
12137 # Whether dlopen of statically linked programs is supported.
12138 dlopen_self_static=$enable_dlopen_self_static
12139
12140 # Compiler flag to prevent dynamic linking.
12141 link_static_flag=$lt_lt_prog_compiler_static_RC
12142
12143 # Compiler flag to turn off builtin functions.
12144 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
12145
12146 # Compiler flag to allow reflexive dlopens.
12147 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
12148
12149 # Compiler flag to generate shared objects directly from archives.
12150 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
12151
12152 # Compiler flag to generate thread-safe objects.
12153 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
12154
12155 # Library versioning type.
12156 version_type=$version_type
12157
12158 # Format of library name prefix.
12159 libname_spec=$lt_libname_spec
12160
12161 # List of archive names.  First name is the real one, the rest are links.
12162 # The last name is the one that the linker finds with -lNAME.
12163 library_names_spec=$lt_library_names_spec
12164
12165 # The coded name of the library, if different from the real name.
12166 soname_spec=$lt_soname_spec
12167
12168 # Commands used to build and install an old-style archive.
12169 RANLIB=$lt_RANLIB
12170 old_archive_cmds=$lt_old_archive_cmds_RC
12171 old_postinstall_cmds=$lt_old_postinstall_cmds
12172 old_postuninstall_cmds=$lt_old_postuninstall_cmds
12173
12174 # Create an old-style archive from a shared archive.
12175 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
12176
12177 # Create a temporary old-style archive to link instead of a shared archive.
12178 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
12179
12180 # Commands used to build and install a shared archive.
12181 archive_cmds=$lt_archive_cmds_RC
12182 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
12183 postinstall_cmds=$lt_postinstall_cmds
12184 postuninstall_cmds=$lt_postuninstall_cmds
12185
12186 # Commands used to build a loadable module (assumed same as above if empty)
12187 module_cmds=$lt_module_cmds_RC
12188 module_expsym_cmds=$lt_module_expsym_cmds_RC
12189
12190 # Commands to strip libraries.
12191 old_striplib=$lt_old_striplib
12192 striplib=$lt_striplib
12193
12194 # Dependencies to place before the objects being linked to create a
12195 # shared library.
12196 predep_objects=$lt_predep_objects_RC
12197
12198 # Dependencies to place after the objects being linked to create a
12199 # shared library.
12200 postdep_objects=$lt_postdep_objects_RC
12201
12202 # Dependencies to place before the objects being linked to create a
12203 # shared library.
12204 predeps=$lt_predeps_RC
12205
12206 # Dependencies to place after the objects being linked to create a
12207 # shared library.
12208 postdeps=$lt_postdeps_RC
12209
12210 # The library search path used internally by the compiler when linking
12211 # a shared library.
12212 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
12213
12214 # Method to check whether dependent libraries are shared objects.
12215 deplibs_check_method=$lt_deplibs_check_method
12216
12217 # Command to use when deplibs_check_method == file_magic.
12218 file_magic_cmd=$lt_file_magic_cmd
12219
12220 # Flag that allows shared libraries with undefined symbols to be built.
12221 allow_undefined_flag=$lt_allow_undefined_flag_RC
12222
12223 # Flag that forces no undefined symbols.
12224 no_undefined_flag=$lt_no_undefined_flag_RC
12225
12226 # Commands used to finish a libtool library installation in a directory.
12227 finish_cmds=$lt_finish_cmds
12228
12229 # Same as above, but a single script fragment to be evaled but not shown.
12230 finish_eval=$lt_finish_eval
12231
12232 # Take the output of nm and produce a listing of raw symbols and C names.
12233 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
12234
12235 # Transform the output of nm in a proper C declaration
12236 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
12237
12238 # Transform the output of nm in a C name address pair
12239 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
12240
12241 # This is the shared library runtime path variable.
12242 runpath_var=$runpath_var
12243
12244 # This is the shared library path variable.
12245 shlibpath_var=$shlibpath_var
12246
12247 # Is shlibpath searched before the hard-coded library search path?
12248 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
12249
12250 # How to hardcode a shared library path into an executable.
12251 hardcode_action=$hardcode_action_RC
12252
12253 # Whether we should hardcode library paths into libraries.
12254 hardcode_into_libs=$hardcode_into_libs
12255
12256 # Flag to hardcode \$libdir into a binary during linking.
12257 # This must work even if \$libdir does not exist.
12258 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
12259
12260 # If ld is used when linking, flag to hardcode \$libdir into
12261 # a binary during linking. This must work even if \$libdir does
12262 # not exist.
12263 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
12264
12265 # Whether we need a single -rpath flag with a separated argument.
12266 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
12267
12268 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
12269 # resulting binary.
12270 hardcode_direct=$hardcode_direct_RC
12271
12272 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
12273 # resulting binary.
12274 hardcode_minus_L=$hardcode_minus_L_RC
12275
12276 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
12277 # the resulting binary.
12278 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
12279
12280 # Set to yes if building a shared library automatically hardcodes DIR into the library
12281 # and all subsequent libraries and executables linked against it.
12282 hardcode_automatic=$hardcode_automatic_RC
12283
12284 # Variables whose values should be saved in libtool wrapper scripts and
12285 # restored at relink time.
12286 variables_saved_for_relink="$variables_saved_for_relink"
12287
12288 # Whether libtool must link a program against all its dependency libraries.
12289 link_all_deplibs=$link_all_deplibs_RC
12290
12291 # Compile-time system search path for libraries
12292 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
12293
12294 # Run-time system search path for libraries
12295 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
12296
12297 # Fix the shell variable \$srcfile for the compiler.
12298 fix_srcfile_path="$fix_srcfile_path_RC"
12299
12300 # Set to yes if exported symbols are required.
12301 always_export_symbols=$always_export_symbols_RC
12302
12303 # The commands to list exported symbols.
12304 export_symbols_cmds=$lt_export_symbols_cmds_RC
12305
12306 # The commands to extract the exported symbol list from a shared archive.
12307 extract_expsyms_cmds=$lt_extract_expsyms_cmds
12308
12309 # Symbols that should not be listed in the preloaded symbols.
12310 exclude_expsyms=$lt_exclude_expsyms_RC
12311
12312 # Symbols that must always be exported.
12313 include_expsyms=$lt_include_expsyms_RC
12314
12315 # ### END LIBTOOL TAG CONFIG: $tagname
12316
12317 __EOF__
12318
12319
12320 else
12321   # If there is no Makefile yet, we rely on a make rule to execute
12322   # `config.status --recheck' to rerun these tests and create the
12323   # libtool script then.
12324   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
12325   if test -f "$ltmain_in"; then
12326     test -f Makefile && make "$ltmain"
12327   fi
12328 fi
12329
12330
12331 ac_ext=c
12332 ac_cpp='$CPP $CPPFLAGS'
12333 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12334 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12335 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12336
12337 CC="$lt_save_CC"
12338
12339         ;;
12340
12341       *)
12342         { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
12343 echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
12344    { (exit 1); exit 1; }; }
12345         ;;
12346       esac
12347
12348       # Append the new tag name to the list of available tags.
12349       if test -n "$tagname" ; then
12350       available_tags="$available_tags $tagname"
12351     fi
12352     fi
12353   done
12354   IFS="$lt_save_ifs"
12355
12356   # Now substitute the updated list of available tags.
12357   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
12358     mv "${ofile}T" "$ofile"
12359     chmod +x "$ofile"
12360   else
12361     rm -f "${ofile}T"
12362     { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
12363 echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
12364    { (exit 1); exit 1; }; }
12365   fi
12366 fi
12367
12368
12369
12370 # This can be used to rebuild libtool when needed
12371 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
12372
12373 # Always use our own libtool.
12374 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
12375
12376 # Prevent multiple expansion
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387 ol_link_perl=no
12388 if test $ol_enable_perl != no ; then
12389         # Extract the first word of "perl", so it can be a program name with args.
12390 set dummy perl; ac_word=$2
12391 { echo "$as_me:$LINENO: checking for $ac_word" >&5
12392 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12393 if test "${ac_cv_path_PERLBIN+set}" = set; then
12394   echo $ECHO_N "(cached) $ECHO_C" >&6
12395 else
12396   case $PERLBIN in
12397   [\\/]* | ?:[\\/]*)
12398   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
12399   ;;
12400   *)
12401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12402 for as_dir in $PATH
12403 do
12404   IFS=$as_save_IFS
12405   test -z "$as_dir" && as_dir=.
12406   for ac_exec_ext in '' $ac_executable_extensions; do
12407   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12408     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
12409     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12410     break 2
12411   fi
12412 done
12413 done
12414 IFS=$as_save_IFS
12415
12416   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
12417   ;;
12418 esac
12419 fi
12420 PERLBIN=$ac_cv_path_PERLBIN
12421 if test -n "$PERLBIN"; then
12422   { echo "$as_me:$LINENO: result: $PERLBIN" >&5
12423 echo "${ECHO_T}$PERLBIN" >&6; }
12424 else
12425   { echo "$as_me:$LINENO: result: no" >&5
12426 echo "${ECHO_T}no" >&6; }
12427 fi
12428
12429
12430
12431         if test "no$PERLBIN" = "no" ; then
12432                 if test $ol_enable_perl = yes ; then
12433                         { { echo "$as_me:$LINENO: error: could not locate perl" >&5
12434 echo "$as_me: error: could not locate perl" >&2;}
12435    { (exit 1); exit 1; }; }
12436                 fi
12437
12438         else
12439                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
12440                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
12441
12442                 if test x"$ol_enable_perl" = "xyes" ; then
12443                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
12444                 else
12445                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
12446                 fi
12447                                 ol_link_perl=yes
12448         fi
12449 fi
12450
12451 ac_ext=c
12452 ac_cpp='$CPP $CPPFLAGS'
12453 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12454 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12455 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12456 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
12457 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
12458 # On Suns, sometimes $CPP names a directory.
12459 if test -n "$CPP" && test -d "$CPP"; then
12460   CPP=
12461 fi
12462 if test -z "$CPP"; then
12463   if test "${ac_cv_prog_CPP+set}" = set; then
12464   echo $ECHO_N "(cached) $ECHO_C" >&6
12465 else
12466       # Double quotes because CPP needs to be expanded
12467     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
12468     do
12469       ac_preproc_ok=false
12470 for ac_c_preproc_warn_flag in '' yes
12471 do
12472   # Use a header file that comes with gcc, so configuring glibc
12473   # with a fresh cross-compiler works.
12474   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12475   # <limits.h> exists even on freestanding compilers.
12476   # On the NeXT, cc -E runs the code through the compiler's parser,
12477   # not just through cpp. "Syntax error" is here to catch this case.
12478   cat >conftest.$ac_ext <<_ACEOF
12479 /* confdefs.h.  */
12480 _ACEOF
12481 cat confdefs.h >>conftest.$ac_ext
12482 cat >>conftest.$ac_ext <<_ACEOF
12483 /* end confdefs.h.  */
12484 #ifdef __STDC__
12485 # include <limits.h>
12486 #else
12487 # include <assert.h>
12488 #endif
12489                      Syntax error
12490 _ACEOF
12491 if { (ac_try="$ac_cpp conftest.$ac_ext"
12492 case "(($ac_try" in
12493   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12494   *) ac_try_echo=$ac_try;;
12495 esac
12496 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12497   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12498   ac_status=$?
12499   grep -v '^ *+' conftest.er1 >conftest.err
12500   rm -f conftest.er1
12501   cat conftest.err >&5
12502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12503   (exit $ac_status); } >/dev/null && {
12504          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12505          test ! -s conftest.err
12506        }; then
12507   :
12508 else
12509   echo "$as_me: failed program was:" >&5
12510 sed 's/^/| /' conftest.$ac_ext >&5
12511
12512   # Broken: fails on valid input.
12513 continue
12514 fi
12515
12516 rm -f conftest.err conftest.$ac_ext
12517
12518   # OK, works on sane cases.  Now check whether nonexistent headers
12519   # can be detected and how.
12520   cat >conftest.$ac_ext <<_ACEOF
12521 /* confdefs.h.  */
12522 _ACEOF
12523 cat confdefs.h >>conftest.$ac_ext
12524 cat >>conftest.$ac_ext <<_ACEOF
12525 /* end confdefs.h.  */
12526 #include <ac_nonexistent.h>
12527 _ACEOF
12528 if { (ac_try="$ac_cpp conftest.$ac_ext"
12529 case "(($ac_try" in
12530   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12531   *) ac_try_echo=$ac_try;;
12532 esac
12533 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12534   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12535   ac_status=$?
12536   grep -v '^ *+' conftest.er1 >conftest.err
12537   rm -f conftest.er1
12538   cat conftest.err >&5
12539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12540   (exit $ac_status); } >/dev/null && {
12541          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12542          test ! -s conftest.err
12543        }; then
12544   # Broken: success on invalid input.
12545 continue
12546 else
12547   echo "$as_me: failed program was:" >&5
12548 sed 's/^/| /' conftest.$ac_ext >&5
12549
12550   # Passes both tests.
12551 ac_preproc_ok=:
12552 break
12553 fi
12554
12555 rm -f conftest.err conftest.$ac_ext
12556
12557 done
12558 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12559 rm -f conftest.err conftest.$ac_ext
12560 if $ac_preproc_ok; then
12561   break
12562 fi
12563
12564     done
12565     ac_cv_prog_CPP=$CPP
12566
12567 fi
12568   CPP=$ac_cv_prog_CPP
12569 else
12570   ac_cv_prog_CPP=$CPP
12571 fi
12572 { echo "$as_me:$LINENO: result: $CPP" >&5
12573 echo "${ECHO_T}$CPP" >&6; }
12574 ac_preproc_ok=false
12575 for ac_c_preproc_warn_flag in '' yes
12576 do
12577   # Use a header file that comes with gcc, so configuring glibc
12578   # with a fresh cross-compiler works.
12579   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12580   # <limits.h> exists even on freestanding compilers.
12581   # On the NeXT, cc -E runs the code through the compiler's parser,
12582   # not just through cpp. "Syntax error" is here to catch this case.
12583   cat >conftest.$ac_ext <<_ACEOF
12584 /* confdefs.h.  */
12585 _ACEOF
12586 cat confdefs.h >>conftest.$ac_ext
12587 cat >>conftest.$ac_ext <<_ACEOF
12588 /* end confdefs.h.  */
12589 #ifdef __STDC__
12590 # include <limits.h>
12591 #else
12592 # include <assert.h>
12593 #endif
12594                      Syntax error
12595 _ACEOF
12596 if { (ac_try="$ac_cpp conftest.$ac_ext"
12597 case "(($ac_try" in
12598   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12599   *) ac_try_echo=$ac_try;;
12600 esac
12601 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12602   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12603   ac_status=$?
12604   grep -v '^ *+' conftest.er1 >conftest.err
12605   rm -f conftest.er1
12606   cat conftest.err >&5
12607   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12608   (exit $ac_status); } >/dev/null && {
12609          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12610          test ! -s conftest.err
12611        }; then
12612   :
12613 else
12614   echo "$as_me: failed program was:" >&5
12615 sed 's/^/| /' conftest.$ac_ext >&5
12616
12617   # Broken: fails on valid input.
12618 continue
12619 fi
12620
12621 rm -f conftest.err conftest.$ac_ext
12622
12623   # OK, works on sane cases.  Now check whether nonexistent headers
12624   # can be detected and how.
12625   cat >conftest.$ac_ext <<_ACEOF
12626 /* confdefs.h.  */
12627 _ACEOF
12628 cat confdefs.h >>conftest.$ac_ext
12629 cat >>conftest.$ac_ext <<_ACEOF
12630 /* end confdefs.h.  */
12631 #include <ac_nonexistent.h>
12632 _ACEOF
12633 if { (ac_try="$ac_cpp conftest.$ac_ext"
12634 case "(($ac_try" in
12635   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12636   *) ac_try_echo=$ac_try;;
12637 esac
12638 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12639   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12640   ac_status=$?
12641   grep -v '^ *+' conftest.er1 >conftest.err
12642   rm -f conftest.er1
12643   cat conftest.err >&5
12644   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12645   (exit $ac_status); } >/dev/null && {
12646          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12647          test ! -s conftest.err
12648        }; then
12649   # Broken: success on invalid input.
12650 continue
12651 else
12652   echo "$as_me: failed program was:" >&5
12653 sed 's/^/| /' conftest.$ac_ext >&5
12654
12655   # Passes both tests.
12656 ac_preproc_ok=:
12657 break
12658 fi
12659
12660 rm -f conftest.err conftest.$ac_ext
12661
12662 done
12663 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12664 rm -f conftest.err conftest.$ac_ext
12665 if $ac_preproc_ok; then
12666   :
12667 else
12668   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
12669 See \`config.log' for more details." >&5
12670 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
12671 See \`config.log' for more details." >&2;}
12672    { (exit 1); exit 1; }; }
12673 fi
12674
12675 ac_ext=c
12676 ac_cpp='$CPP $CPPFLAGS'
12677 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12678 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12679 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12680
12681
12682 case $host_os in
12683   *mingw32* ) ac_cv_mingw32=yes ;;
12684   *cygwin* ) ac_cv_cygwin=yes ;;
12685 esac
12686
12687
12688
12689
12690 cat >>confdefs.h <<_ACEOF
12691 #define EXEEXT "${EXEEXT}"
12692 _ACEOF
12693
12694
12695 { echo "$as_me:$LINENO: checking for be_app in -lbe" >&5
12696 echo $ECHO_N "checking for be_app in -lbe... $ECHO_C" >&6; }
12697 if test "${ac_cv_lib_be_be_app+set}" = set; then
12698   echo $ECHO_N "(cached) $ECHO_C" >&6
12699 else
12700   ac_check_lib_save_LIBS=$LIBS
12701 LIBS="-lbe -lroot -lnet $LIBS"
12702 cat >conftest.$ac_ext <<_ACEOF
12703 /* confdefs.h.  */
12704 _ACEOF
12705 cat confdefs.h >>conftest.$ac_ext
12706 cat >>conftest.$ac_ext <<_ACEOF
12707 /* end confdefs.h.  */
12708
12709 /* Override any GCC internal prototype to avoid an error.
12710    Use char because int might match the return type of a GCC
12711    builtin and then its argument prototype would still apply.  */
12712 #ifdef __cplusplus
12713 extern "C"
12714 #endif
12715 char be_app ();
12716 int
12717 main ()
12718 {
12719 return be_app ();
12720   ;
12721   return 0;
12722 }
12723 _ACEOF
12724 rm -f conftest.$ac_objext conftest$ac_exeext
12725 if { (ac_try="$ac_link"
12726 case "(($ac_try" in
12727   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12728   *) ac_try_echo=$ac_try;;
12729 esac
12730 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12731   (eval "$ac_link") 2>conftest.er1
12732   ac_status=$?
12733   grep -v '^ *+' conftest.er1 >conftest.err
12734   rm -f conftest.er1
12735   cat conftest.err >&5
12736   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12737   (exit $ac_status); } && {
12738          test -z "$ac_c_werror_flag" ||
12739          test ! -s conftest.err
12740        } && test -s conftest$ac_exeext &&
12741        $as_test_x conftest$ac_exeext; then
12742   ac_cv_lib_be_be_app=yes
12743 else
12744   echo "$as_me: failed program was:" >&5
12745 sed 's/^/| /' conftest.$ac_ext >&5
12746
12747         ac_cv_lib_be_be_app=no
12748 fi
12749
12750 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12751       conftest$ac_exeext conftest.$ac_ext
12752 LIBS=$ac_check_lib_save_LIBS
12753 fi
12754 { echo "$as_me:$LINENO: result: $ac_cv_lib_be_be_app" >&5
12755 echo "${ECHO_T}$ac_cv_lib_be_be_app" >&6; }
12756 if test $ac_cv_lib_be_be_app = yes; then
12757   LIBS="$LIBS -lbe -lroot -lnet"
12758 else
12759   :
12760 fi
12761
12762
12763 ac_ext=c
12764 ac_cpp='$CPP $CPPFLAGS'
12765 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12766 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12767 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12768 if test -n "$ac_tool_prefix"; then
12769   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
12770 set dummy ${ac_tool_prefix}gcc; ac_word=$2
12771 { echo "$as_me:$LINENO: checking for $ac_word" >&5
12772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12773 if test "${ac_cv_prog_CC+set}" = set; then
12774   echo $ECHO_N "(cached) $ECHO_C" >&6
12775 else
12776   if test -n "$CC"; then
12777   ac_cv_prog_CC="$CC" # Let the user override the test.
12778 else
12779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12780 for as_dir in $PATH
12781 do
12782   IFS=$as_save_IFS
12783   test -z "$as_dir" && as_dir=.
12784   for ac_exec_ext in '' $ac_executable_extensions; do
12785   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12786     ac_cv_prog_CC="${ac_tool_prefix}gcc"
12787     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12788     break 2
12789   fi
12790 done
12791 done
12792 IFS=$as_save_IFS
12793
12794 fi
12795 fi
12796 CC=$ac_cv_prog_CC
12797 if test -n "$CC"; then
12798   { echo "$as_me:$LINENO: result: $CC" >&5
12799 echo "${ECHO_T}$CC" >&6; }
12800 else
12801   { echo "$as_me:$LINENO: result: no" >&5
12802 echo "${ECHO_T}no" >&6; }
12803 fi
12804
12805
12806 fi
12807 if test -z "$ac_cv_prog_CC"; then
12808   ac_ct_CC=$CC
12809   # Extract the first word of "gcc", so it can be a program name with args.
12810 set dummy gcc; ac_word=$2
12811 { echo "$as_me:$LINENO: checking for $ac_word" >&5
12812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12813 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
12814   echo $ECHO_N "(cached) $ECHO_C" >&6
12815 else
12816   if test -n "$ac_ct_CC"; then
12817   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12818 else
12819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12820 for as_dir in $PATH
12821 do
12822   IFS=$as_save_IFS
12823   test -z "$as_dir" && as_dir=.
12824   for ac_exec_ext in '' $ac_executable_extensions; do
12825   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12826     ac_cv_prog_ac_ct_CC="gcc"
12827     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12828     break 2
12829   fi
12830 done
12831 done
12832 IFS=$as_save_IFS
12833
12834 fi
12835 fi
12836 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12837 if test -n "$ac_ct_CC"; then
12838   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
12839 echo "${ECHO_T}$ac_ct_CC" >&6; }
12840 else
12841   { echo "$as_me:$LINENO: result: no" >&5
12842 echo "${ECHO_T}no" >&6; }
12843 fi
12844
12845   if test "x$ac_ct_CC" = x; then
12846     CC=""
12847   else
12848     case $cross_compiling:$ac_tool_warned in
12849 yes:)
12850 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
12851 whose name does not start with the host triplet.  If you think this
12852 configuration is useful to you, please write to autoconf@gnu.org." >&5
12853 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
12854 whose name does not start with the host triplet.  If you think this
12855 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
12856 ac_tool_warned=yes ;;
12857 esac
12858     CC=$ac_ct_CC
12859   fi
12860 else
12861   CC="$ac_cv_prog_CC"
12862 fi
12863
12864 if test -z "$CC"; then
12865           if test -n "$ac_tool_prefix"; then
12866     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12867 set dummy ${ac_tool_prefix}cc; ac_word=$2
12868 { echo "$as_me:$LINENO: checking for $ac_word" >&5
12869 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12870 if test "${ac_cv_prog_CC+set}" = set; then
12871   echo $ECHO_N "(cached) $ECHO_C" >&6
12872 else
12873   if test -n "$CC"; then
12874   ac_cv_prog_CC="$CC" # Let the user override the test.
12875 else
12876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12877 for as_dir in $PATH
12878 do
12879   IFS=$as_save_IFS
12880   test -z "$as_dir" && as_dir=.
12881   for ac_exec_ext in '' $ac_executable_extensions; do
12882   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12883     ac_cv_prog_CC="${ac_tool_prefix}cc"
12884     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12885     break 2
12886   fi
12887 done
12888 done
12889 IFS=$as_save_IFS
12890
12891 fi
12892 fi
12893 CC=$ac_cv_prog_CC
12894 if test -n "$CC"; then
12895   { echo "$as_me:$LINENO: result: $CC" >&5
12896 echo "${ECHO_T}$CC" >&6; }
12897 else
12898   { echo "$as_me:$LINENO: result: no" >&5
12899 echo "${ECHO_T}no" >&6; }
12900 fi
12901
12902
12903   fi
12904 fi
12905 if test -z "$CC"; then
12906   # Extract the first word of "cc", so it can be a program name with args.
12907 set dummy cc; ac_word=$2
12908 { echo "$as_me:$LINENO: checking for $ac_word" >&5
12909 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12910 if test "${ac_cv_prog_CC+set}" = set; then
12911   echo $ECHO_N "(cached) $ECHO_C" >&6
12912 else
12913   if test -n "$CC"; then
12914   ac_cv_prog_CC="$CC" # Let the user override the test.
12915 else
12916   ac_prog_rejected=no
12917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12918 for as_dir in $PATH
12919 do
12920   IFS=$as_save_IFS
12921   test -z "$as_dir" && as_dir=.
12922   for ac_exec_ext in '' $ac_executable_extensions; do
12923   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12924     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12925        ac_prog_rejected=yes
12926        continue
12927      fi
12928     ac_cv_prog_CC="cc"
12929     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12930     break 2
12931   fi
12932 done
12933 done
12934 IFS=$as_save_IFS
12935
12936 if test $ac_prog_rejected = yes; then
12937   # We found a bogon in the path, so make sure we never use it.
12938   set dummy $ac_cv_prog_CC
12939   shift
12940   if test $# != 0; then
12941     # We chose a different compiler from the bogus one.
12942     # However, it has the same basename, so the bogon will be chosen
12943     # first if we set CC to just the basename; use the full file name.
12944     shift
12945     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12946   fi
12947 fi
12948 fi
12949 fi
12950 CC=$ac_cv_prog_CC
12951 if test -n "$CC"; then
12952   { echo "$as_me:$LINENO: result: $CC" >&5
12953 echo "${ECHO_T}$CC" >&6; }
12954 else
12955   { echo "$as_me:$LINENO: result: no" >&5
12956 echo "${ECHO_T}no" >&6; }
12957 fi
12958
12959
12960 fi
12961 if test -z "$CC"; then
12962   if test -n "$ac_tool_prefix"; then
12963   for ac_prog in cl.exe
12964   do
12965     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12966 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12967 { echo "$as_me:$LINENO: checking for $ac_word" >&5
12968 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12969 if test "${ac_cv_prog_CC+set}" = set; then
12970   echo $ECHO_N "(cached) $ECHO_C" >&6
12971 else
12972   if test -n "$CC"; then
12973   ac_cv_prog_CC="$CC" # Let the user override the test.
12974 else
12975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12976 for as_dir in $PATH
12977 do
12978   IFS=$as_save_IFS
12979   test -z "$as_dir" && as_dir=.
12980   for ac_exec_ext in '' $ac_executable_extensions; do
12981   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12982     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12983     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12984     break 2
12985   fi
12986 done
12987 done
12988 IFS=$as_save_IFS
12989
12990 fi
12991 fi
12992 CC=$ac_cv_prog_CC
12993 if test -n "$CC"; then
12994   { echo "$as_me:$LINENO: result: $CC" >&5
12995 echo "${ECHO_T}$CC" >&6; }
12996 else
12997   { echo "$as_me:$LINENO: result: no" >&5
12998 echo "${ECHO_T}no" >&6; }
12999 fi
13000
13001
13002     test -n "$CC" && break
13003   done
13004 fi
13005 if test -z "$CC"; then
13006   ac_ct_CC=$CC
13007   for ac_prog in cl.exe
13008 do
13009   # Extract the first word of "$ac_prog", so it can be a program name with args.
13010 set dummy $ac_prog; ac_word=$2
13011 { echo "$as_me:$LINENO: checking for $ac_word" >&5
13012 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13013 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
13014   echo $ECHO_N "(cached) $ECHO_C" >&6
13015 else
13016   if test -n "$ac_ct_CC"; then
13017   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
13018 else
13019 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13020 for as_dir in $PATH
13021 do
13022   IFS=$as_save_IFS
13023   test -z "$as_dir" && as_dir=.
13024   for ac_exec_ext in '' $ac_executable_extensions; do
13025   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13026     ac_cv_prog_ac_ct_CC="$ac_prog"
13027     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13028     break 2
13029   fi
13030 done
13031 done
13032 IFS=$as_save_IFS
13033
13034 fi
13035 fi
13036 ac_ct_CC=$ac_cv_prog_ac_ct_CC
13037 if test -n "$ac_ct_CC"; then
13038   { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
13039 echo "${ECHO_T}$ac_ct_CC" >&6; }
13040 else
13041   { echo "$as_me:$LINENO: result: no" >&5
13042 echo "${ECHO_T}no" >&6; }
13043 fi
13044
13045
13046   test -n "$ac_ct_CC" && break
13047 done
13048
13049   if test "x$ac_ct_CC" = x; then
13050     CC=""
13051   else
13052     case $cross_compiling:$ac_tool_warned in
13053 yes:)
13054 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
13055 whose name does not start with the host triplet.  If you think this
13056 configuration is useful to you, please write to autoconf@gnu.org." >&5
13057 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
13058 whose name does not start with the host triplet.  If you think this
13059 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
13060 ac_tool_warned=yes ;;
13061 esac
13062     CC=$ac_ct_CC
13063   fi
13064 fi
13065
13066 fi
13067
13068
13069 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
13070 See \`config.log' for more details." >&5
13071 echo "$as_me: error: no acceptable C compiler found in \$PATH
13072 See \`config.log' for more details." >&2;}
13073    { (exit 1); exit 1; }; }
13074
13075 # Provide some information about the compiler.
13076 echo "$as_me:$LINENO: checking for C compiler version" >&5
13077 ac_compiler=`set X $ac_compile; echo $2`
13078 { (ac_try="$ac_compiler --version >&5"
13079 case "(($ac_try" in
13080   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13081   *) ac_try_echo=$ac_try;;
13082 esac
13083 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13084   (eval "$ac_compiler --version >&5") 2>&5
13085   ac_status=$?
13086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13087   (exit $ac_status); }
13088 { (ac_try="$ac_compiler -v >&5"
13089 case "(($ac_try" in
13090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13091   *) ac_try_echo=$ac_try;;
13092 esac
13093 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13094   (eval "$ac_compiler -v >&5") 2>&5
13095   ac_status=$?
13096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13097   (exit $ac_status); }
13098 { (ac_try="$ac_compiler -V >&5"
13099 case "(($ac_try" in
13100   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13101   *) ac_try_echo=$ac_try;;
13102 esac
13103 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13104   (eval "$ac_compiler -V >&5") 2>&5
13105   ac_status=$?
13106   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13107   (exit $ac_status); }
13108
13109 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
13110 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
13111 if test "${ac_cv_c_compiler_gnu+set}" = set; then
13112   echo $ECHO_N "(cached) $ECHO_C" >&6
13113 else
13114   cat >conftest.$ac_ext <<_ACEOF
13115 /* confdefs.h.  */
13116 _ACEOF
13117 cat confdefs.h >>conftest.$ac_ext
13118 cat >>conftest.$ac_ext <<_ACEOF
13119 /* end confdefs.h.  */
13120
13121 int
13122 main ()
13123 {
13124 #ifndef __GNUC__
13125        choke me
13126 #endif
13127
13128   ;
13129   return 0;
13130 }
13131 _ACEOF
13132 rm -f conftest.$ac_objext
13133 if { (ac_try="$ac_compile"
13134 case "(($ac_try" in
13135   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13136   *) ac_try_echo=$ac_try;;
13137 esac
13138 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13139   (eval "$ac_compile") 2>conftest.er1
13140   ac_status=$?
13141   grep -v '^ *+' conftest.er1 >conftest.err
13142   rm -f conftest.er1
13143   cat conftest.err >&5
13144   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13145   (exit $ac_status); } && {
13146          test -z "$ac_c_werror_flag" ||
13147          test ! -s conftest.err
13148        } && test -s conftest.$ac_objext; then
13149   ac_compiler_gnu=yes
13150 else
13151   echo "$as_me: failed program was:" >&5
13152 sed 's/^/| /' conftest.$ac_ext >&5
13153
13154         ac_compiler_gnu=no
13155 fi
13156
13157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13158 ac_cv_c_compiler_gnu=$ac_compiler_gnu
13159
13160 fi
13161 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
13162 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
13163 GCC=`test $ac_compiler_gnu = yes && echo yes`
13164 ac_test_CFLAGS=${CFLAGS+set}
13165 ac_save_CFLAGS=$CFLAGS
13166 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
13167 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
13168 if test "${ac_cv_prog_cc_g+set}" = set; then
13169   echo $ECHO_N "(cached) $ECHO_C" >&6
13170 else
13171   ac_save_c_werror_flag=$ac_c_werror_flag
13172    ac_c_werror_flag=yes
13173    ac_cv_prog_cc_g=no
13174    CFLAGS="-g"
13175    cat >conftest.$ac_ext <<_ACEOF
13176 /* confdefs.h.  */
13177 _ACEOF
13178 cat confdefs.h >>conftest.$ac_ext
13179 cat >>conftest.$ac_ext <<_ACEOF
13180 /* end confdefs.h.  */
13181
13182 int
13183 main ()
13184 {
13185
13186   ;
13187   return 0;
13188 }
13189 _ACEOF
13190 rm -f conftest.$ac_objext
13191 if { (ac_try="$ac_compile"
13192 case "(($ac_try" in
13193   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13194   *) ac_try_echo=$ac_try;;
13195 esac
13196 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13197   (eval "$ac_compile") 2>conftest.er1
13198   ac_status=$?
13199   grep -v '^ *+' conftest.er1 >conftest.err
13200   rm -f conftest.er1
13201   cat conftest.err >&5
13202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13203   (exit $ac_status); } && {
13204          test -z "$ac_c_werror_flag" ||
13205          test ! -s conftest.err
13206        } && test -s conftest.$ac_objext; then
13207   ac_cv_prog_cc_g=yes
13208 else
13209   echo "$as_me: failed program was:" >&5
13210 sed 's/^/| /' conftest.$ac_ext >&5
13211
13212         CFLAGS=""
13213       cat >conftest.$ac_ext <<_ACEOF
13214 /* confdefs.h.  */
13215 _ACEOF
13216 cat confdefs.h >>conftest.$ac_ext
13217 cat >>conftest.$ac_ext <<_ACEOF
13218 /* end confdefs.h.  */
13219
13220 int
13221 main ()
13222 {
13223
13224   ;
13225   return 0;
13226 }
13227 _ACEOF
13228 rm -f conftest.$ac_objext
13229 if { (ac_try="$ac_compile"
13230 case "(($ac_try" in
13231   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13232   *) ac_try_echo=$ac_try;;
13233 esac
13234 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13235   (eval "$ac_compile") 2>conftest.er1
13236   ac_status=$?
13237   grep -v '^ *+' conftest.er1 >conftest.err
13238   rm -f conftest.er1
13239   cat conftest.err >&5
13240   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13241   (exit $ac_status); } && {
13242          test -z "$ac_c_werror_flag" ||
13243          test ! -s conftest.err
13244        } && test -s conftest.$ac_objext; then
13245   :
13246 else
13247   echo "$as_me: failed program was:" >&5
13248 sed 's/^/| /' conftest.$ac_ext >&5
13249
13250         ac_c_werror_flag=$ac_save_c_werror_flag
13251          CFLAGS="-g"
13252          cat >conftest.$ac_ext <<_ACEOF
13253 /* confdefs.h.  */
13254 _ACEOF
13255 cat confdefs.h >>conftest.$ac_ext
13256 cat >>conftest.$ac_ext <<_ACEOF
13257 /* end confdefs.h.  */
13258
13259 int
13260 main ()
13261 {
13262
13263   ;
13264   return 0;
13265 }
13266 _ACEOF
13267 rm -f conftest.$ac_objext
13268 if { (ac_try="$ac_compile"
13269 case "(($ac_try" in
13270   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13271   *) ac_try_echo=$ac_try;;
13272 esac
13273 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13274   (eval "$ac_compile") 2>conftest.er1
13275   ac_status=$?
13276   grep -v '^ *+' conftest.er1 >conftest.err
13277   rm -f conftest.er1
13278   cat conftest.err >&5
13279   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13280   (exit $ac_status); } && {
13281          test -z "$ac_c_werror_flag" ||
13282          test ! -s conftest.err
13283        } && test -s conftest.$ac_objext; then
13284   ac_cv_prog_cc_g=yes
13285 else
13286   echo "$as_me: failed program was:" >&5
13287 sed 's/^/| /' conftest.$ac_ext >&5
13288
13289
13290 fi
13291
13292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13293 fi
13294
13295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13296 fi
13297
13298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13299    ac_c_werror_flag=$ac_save_c_werror_flag
13300 fi
13301 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
13302 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
13303 if test "$ac_test_CFLAGS" = set; then
13304   CFLAGS=$ac_save_CFLAGS
13305 elif test $ac_cv_prog_cc_g = yes; then
13306   if test "$GCC" = yes; then
13307     CFLAGS="-g -O2"
13308   else
13309     CFLAGS="-g"
13310   fi
13311 else
13312   if test "$GCC" = yes; then
13313     CFLAGS="-O2"
13314   else
13315     CFLAGS=
13316   fi
13317 fi
13318 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
13319 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
13320 if test "${ac_cv_prog_cc_c89+set}" = set; then
13321   echo $ECHO_N "(cached) $ECHO_C" >&6
13322 else
13323   ac_cv_prog_cc_c89=no
13324 ac_save_CC=$CC
13325 cat >conftest.$ac_ext <<_ACEOF
13326 /* confdefs.h.  */
13327 _ACEOF
13328 cat confdefs.h >>conftest.$ac_ext
13329 cat >>conftest.$ac_ext <<_ACEOF
13330 /* end confdefs.h.  */
13331 #include <stdarg.h>
13332 #include <stdio.h>
13333 #include <sys/types.h>
13334 #include <sys/stat.h>
13335 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13336 struct buf { int x; };
13337 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13338 static char *e (p, i)
13339      char **p;
13340      int i;
13341 {
13342   return p[i];
13343 }
13344 static char *f (char * (*g) (char **, int), char **p, ...)
13345 {
13346   char *s;
13347   va_list v;
13348   va_start (v,p);
13349   s = g (p, va_arg (v,int));
13350   va_end (v);
13351   return s;
13352 }
13353
13354 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
13355    function prototypes and stuff, but not '\xHH' hex character constants.
13356    These don't provoke an error unfortunately, instead are silently treated
13357    as 'x'.  The following induces an error, until -std is added to get
13358    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
13359    array size at least.  It's necessary to write '\x00'==0 to get something
13360    that's true only with -std.  */
13361 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
13362
13363 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
13364    inside strings and character constants.  */
13365 #define FOO(x) 'x'
13366 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
13367
13368 int test (int i, double x);
13369 struct s1 {int (*f) (int a);};
13370 struct s2 {int (*f) (double a);};
13371 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13372 int argc;
13373 char **argv;
13374 int
13375 main ()
13376 {
13377 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13378   ;
13379   return 0;
13380 }
13381 _ACEOF
13382 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
13383         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13384 do
13385   CC="$ac_save_CC $ac_arg"
13386   rm -f conftest.$ac_objext
13387 if { (ac_try="$ac_compile"
13388 case "(($ac_try" in
13389   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13390   *) ac_try_echo=$ac_try;;
13391 esac
13392 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13393   (eval "$ac_compile") 2>conftest.er1
13394   ac_status=$?
13395   grep -v '^ *+' conftest.er1 >conftest.err
13396   rm -f conftest.er1
13397   cat conftest.err >&5
13398   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13399   (exit $ac_status); } && {
13400          test -z "$ac_c_werror_flag" ||
13401          test ! -s conftest.err
13402        } && test -s conftest.$ac_objext; then
13403   ac_cv_prog_cc_c89=$ac_arg
13404 else
13405   echo "$as_me: failed program was:" >&5
13406 sed 's/^/| /' conftest.$ac_ext >&5
13407
13408
13409 fi
13410
13411 rm -f core conftest.err conftest.$ac_objext
13412   test "x$ac_cv_prog_cc_c89" != "xno" && break
13413 done
13414 rm -f conftest.$ac_ext
13415 CC=$ac_save_CC
13416
13417 fi
13418 # AC_CACHE_VAL
13419 case "x$ac_cv_prog_cc_c89" in
13420   x)
13421     { echo "$as_me:$LINENO: result: none needed" >&5
13422 echo "${ECHO_T}none needed" >&6; } ;;
13423   xno)
13424     { echo "$as_me:$LINENO: result: unsupported" >&5
13425 echo "${ECHO_T}unsupported" >&6; } ;;
13426   *)
13427     CC="$CC $ac_cv_prog_cc_c89"
13428     { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
13429 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
13430 esac
13431
13432
13433 ac_ext=c
13434 ac_cpp='$CPP $CPPFLAGS'
13435 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13436 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13437 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13438
13439 depcc="$CC"   am_compiler_list=
13440
13441 { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
13442 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
13443 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
13444   echo $ECHO_N "(cached) $ECHO_C" >&6
13445 else
13446   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
13447   # We make a subdir and do the tests there.  Otherwise we can end up
13448   # making bogus files that we don't know about and never remove.  For
13449   # instance it was reported that on HP-UX the gcc test will end up
13450   # making a dummy file named `D' -- because `-MD' means `put the output
13451   # in D'.
13452   mkdir conftest.dir
13453   # Copy depcomp to subdir because otherwise we won't find it if we're
13454   # using a relative directory.
13455   cp "$am_depcomp" conftest.dir
13456   cd conftest.dir
13457   # We will build objects and dependencies in a subdirectory because
13458   # it helps to detect inapplicable dependency modes.  For instance
13459   # both Tru64's cc and ICC support -MD to output dependencies as a
13460   # side effect of compilation, but ICC will put the dependencies in
13461   # the current directory while Tru64 will put them in the object
13462   # directory.
13463   mkdir sub
13464
13465   am_cv_CC_dependencies_compiler_type=none
13466   if test "$am_compiler_list" = ""; then
13467      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
13468   fi
13469   for depmode in $am_compiler_list; do
13470     # Setup a source with many dependencies, because some compilers
13471     # like to wrap large dependency lists on column 80 (with \), and
13472     # we should not choose a depcomp mode which is confused by this.
13473     #
13474     # We need to recreate these files for each test, as the compiler may
13475     # overwrite some of them when testing with obscure command lines.
13476     # This happens at least with the AIX C compiler.
13477     : > sub/conftest.c
13478     for i in 1 2 3 4 5 6; do
13479       echo '#include "conftst'$i'.h"' >> sub/conftest.c
13480       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
13481       # Solaris 8's {/usr,}/bin/sh.
13482       touch sub/conftst$i.h
13483     done
13484     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
13485
13486     case $depmode in
13487     nosideeffect)
13488       # after this tag, mechanisms are not by side-effect, so they'll
13489       # only be used when explicitly requested
13490       if test "x$enable_dependency_tracking" = xyes; then
13491         continue
13492       else
13493         break
13494       fi
13495       ;;
13496     none) break ;;
13497     esac
13498     # We check with `-c' and `-o' for the sake of the "dashmstdout"
13499     # mode.  It turns out that the SunPro C++ compiler does not properly
13500     # handle `-M -o', and we need to detect this.
13501     if depmode=$depmode \
13502        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
13503        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
13504        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
13505          >/dev/null 2>conftest.err &&
13506        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
13507        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
13508        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
13509       # icc doesn't choke on unknown options, it will just issue warnings
13510       # or remarks (even with -Werror).  So we grep stderr for any message
13511       # that says an option was ignored or not supported.
13512       # When given -MP, icc 7.0 and 7.1 complain thusly:
13513       #   icc: Command line warning: ignoring option '-M'; no argument required
13514       # The diagnosis changed in icc 8.0:
13515       #   icc: Command line remark: option '-MP' not supported
13516       if (grep 'ignoring option' conftest.err ||
13517           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
13518         am_cv_CC_dependencies_compiler_type=$depmode
13519         break
13520       fi
13521     fi
13522   done
13523
13524   cd ..
13525   rm -rf conftest.dir
13526 else
13527   am_cv_CC_dependencies_compiler_type=none
13528 fi
13529
13530 fi
13531 { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
13532 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
13533 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
13534
13535
13536
13537 if
13538   test "x$enable_dependency_tracking" != xno \
13539   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
13540   am__fastdepCC_TRUE=
13541   am__fastdepCC_FALSE='#'
13542 else
13543   am__fastdepCC_TRUE='#'
13544   am__fastdepCC_FALSE=
13545 fi
13546
13547
13548 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
13549         { { echo "$as_me:$LINENO: error: OpenLDAP requires compiler to support STDC constructs." >&5
13550 echo "$as_me: error: OpenLDAP requires compiler to support STDC constructs." >&2;}
13551    { (exit 1); exit 1; }; }
13552 fi
13553
13554 # test for make depend flag
13555 OL_MKDEP=
13556 OL_MKDEP_FLAGS=
13557 if test -z "${MKDEP}"; then
13558         OL_MKDEP="${CC-cc}"
13559         if test -z "${MKDEP_FLAGS}"; then
13560                 { echo "$as_me:$LINENO: checking for ${OL_MKDEP} depend flag" >&5
13561 echo $ECHO_N "checking for ${OL_MKDEP} depend flag... $ECHO_C" >&6; }
13562 if test "${ol_cv_mkdep+set}" = set; then
13563   echo $ECHO_N "(cached) $ECHO_C" >&6
13564 else
13565
13566                         ol_cv_mkdep=no
13567                         for flag in "-M" "-xM"; do
13568                                 cat > conftest.c <<EOF
13569  noCode;
13570 EOF
13571                                 if { ac_try='$OL_MKDEP $flag conftest.c'
13572   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13573   (eval $ac_try) 2>&5
13574   ac_status=$?
13575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13576   (exit $ac_status); }; } \
13577                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
13578                                 then
13579                                         if test ! -f conftest."${ac_object}" ; then
13580                                                 ol_cv_mkdep=$flag
13581                                                 OL_MKDEP_FLAGS="$flag"
13582                                                 break
13583                                         fi
13584                                 fi
13585                         done
13586                         rm -f conftest*
13587
13588 fi
13589 { echo "$as_me:$LINENO: result: $ol_cv_mkdep" >&5
13590 echo "${ECHO_T}$ol_cv_mkdep" >&6; }
13591                 test "$ol_cv_mkdep" = no && OL_MKDEP=":"
13592         else
13593                 cc_cv_mkdep=yes
13594                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13595         fi
13596 else
13597         cc_cv_mkdep=yes
13598         OL_MKDEP="${MKDEP}"
13599         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13600 fi
13601
13602
13603
13604 if test "${ol_cv_mkdep}" = no ; then
13605         # this will soon become an error
13606         { echo "$as_me:$LINENO: WARNING: do not know how to generate dependencies" >&5
13607 echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
13608 fi
13609
13610 { echo "$as_me:$LINENO: checking for afopen in -ls" >&5
13611 echo $ECHO_N "checking for afopen in -ls... $ECHO_C" >&6; }
13612 if test "${ac_cv_lib_s_afopen+set}" = set; then
13613   echo $ECHO_N "(cached) $ECHO_C" >&6
13614 else
13615   ac_check_lib_save_LIBS=$LIBS
13616 LIBS="-ls  $LIBS"
13617 cat >conftest.$ac_ext <<_ACEOF
13618 /* confdefs.h.  */
13619 _ACEOF
13620 cat confdefs.h >>conftest.$ac_ext
13621 cat >>conftest.$ac_ext <<_ACEOF
13622 /* end confdefs.h.  */
13623
13624 /* Override any GCC internal prototype to avoid an error.
13625    Use char because int might match the return type of a GCC
13626    builtin and then its argument prototype would still apply.  */
13627 #ifdef __cplusplus
13628 extern "C"
13629 #endif
13630 char afopen ();
13631 int
13632 main ()
13633 {
13634 return afopen ();
13635   ;
13636   return 0;
13637 }
13638 _ACEOF
13639 rm -f conftest.$ac_objext conftest$ac_exeext
13640 if { (ac_try="$ac_link"
13641 case "(($ac_try" in
13642   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13643   *) ac_try_echo=$ac_try;;
13644 esac
13645 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13646   (eval "$ac_link") 2>conftest.er1
13647   ac_status=$?
13648   grep -v '^ *+' conftest.er1 >conftest.err
13649   rm -f conftest.er1
13650   cat conftest.err >&5
13651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13652   (exit $ac_status); } && {
13653          test -z "$ac_c_werror_flag" ||
13654          test ! -s conftest.err
13655        } && test -s conftest$ac_exeext &&
13656        $as_test_x conftest$ac_exeext; then
13657   ac_cv_lib_s_afopen=yes
13658 else
13659   echo "$as_me: failed program was:" >&5
13660 sed 's/^/| /' conftest.$ac_ext >&5
13661
13662         ac_cv_lib_s_afopen=no
13663 fi
13664
13665 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13666       conftest$ac_exeext conftest.$ac_ext
13667 LIBS=$ac_check_lib_save_LIBS
13668 fi
13669 { echo "$as_me:$LINENO: result: $ac_cv_lib_s_afopen" >&5
13670 echo "${ECHO_T}$ac_cv_lib_s_afopen" >&6; }
13671 if test $ac_cv_lib_s_afopen = yes; then
13672
13673         AUTH_LIBS=-ls
13674
13675 cat >>confdefs.h <<\_ACEOF
13676 #define HAVE_AIX_SECURITY 1
13677 _ACEOF
13678
13679
13680 fi
13681
13682
13683 case "$target" in
13684 *-ibm-openedition)
13685         ac_cv_func_getopt=no
13686
13687 cat >>confdefs.h <<\_ACEOF
13688 #define BOTH_STRINGS_H 1
13689 _ACEOF
13690
13691         ;;
13692 esac
13693
13694 ol_link_modules=no
13695 WITH_MODULES_ENABLED=no
13696 if test $ol_enable_modules != no ; then
13697
13698 for ac_header in ltdl.h
13699 do
13700 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13701 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13702   { echo "$as_me:$LINENO: checking for $ac_header" >&5
13703 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13704 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13705   echo $ECHO_N "(cached) $ECHO_C" >&6
13706 fi
13707 ac_res=`eval echo '${'$as_ac_Header'}'`
13708                { echo "$as_me:$LINENO: result: $ac_res" >&5
13709 echo "${ECHO_T}$ac_res" >&6; }
13710 else
13711   # Is the header compilable?
13712 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
13713 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
13714 cat >conftest.$ac_ext <<_ACEOF
13715 /* confdefs.h.  */
13716 _ACEOF
13717 cat confdefs.h >>conftest.$ac_ext
13718 cat >>conftest.$ac_ext <<_ACEOF
13719 /* end confdefs.h.  */
13720 $ac_includes_default
13721 #include <$ac_header>
13722 _ACEOF
13723 rm -f conftest.$ac_objext
13724 if { (ac_try="$ac_compile"
13725 case "(($ac_try" in
13726   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13727   *) ac_try_echo=$ac_try;;
13728 esac
13729 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13730   (eval "$ac_compile") 2>conftest.er1
13731   ac_status=$?
13732   grep -v '^ *+' conftest.er1 >conftest.err
13733   rm -f conftest.er1
13734   cat conftest.err >&5
13735   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13736   (exit $ac_status); } && {
13737          test -z "$ac_c_werror_flag" ||
13738          test ! -s conftest.err
13739        } && test -s conftest.$ac_objext; then
13740   ac_header_compiler=yes
13741 else
13742   echo "$as_me: failed program was:" >&5
13743 sed 's/^/| /' conftest.$ac_ext >&5
13744
13745         ac_header_compiler=no
13746 fi
13747
13748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13749 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13750 echo "${ECHO_T}$ac_header_compiler" >&6; }
13751
13752 # Is the header present?
13753 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
13754 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
13755 cat >conftest.$ac_ext <<_ACEOF
13756 /* confdefs.h.  */
13757 _ACEOF
13758 cat confdefs.h >>conftest.$ac_ext
13759 cat >>conftest.$ac_ext <<_ACEOF
13760 /* end confdefs.h.  */
13761 #include <$ac_header>
13762 _ACEOF
13763 if { (ac_try="$ac_cpp conftest.$ac_ext"
13764 case "(($ac_try" in
13765   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13766   *) ac_try_echo=$ac_try;;
13767 esac
13768 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13769   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13770   ac_status=$?
13771   grep -v '^ *+' conftest.er1 >conftest.err
13772   rm -f conftest.er1
13773   cat conftest.err >&5
13774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13775   (exit $ac_status); } >/dev/null && {
13776          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13777          test ! -s conftest.err
13778        }; then
13779   ac_header_preproc=yes
13780 else
13781   echo "$as_me: failed program was:" >&5
13782 sed 's/^/| /' conftest.$ac_ext >&5
13783
13784   ac_header_preproc=no
13785 fi
13786
13787 rm -f conftest.err conftest.$ac_ext
13788 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13789 echo "${ECHO_T}$ac_header_preproc" >&6; }
13790
13791 # So?  What about this header?
13792 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13793   yes:no: )
13794     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13795 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13796     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13797 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13798     ac_header_preproc=yes
13799     ;;
13800   no:yes:* )
13801     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13802 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13803     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
13804 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
13805     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13806 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13807     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
13808 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
13809     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13810 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13811     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13812 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13813     ( cat <<\_ASBOX
13814 ## --------------------------------------------- ##
13815 ## Report this to <http://www.openldap.org/its/> ##
13816 ## --------------------------------------------- ##
13817 _ASBOX
13818      ) | sed "s/^/$as_me: WARNING:     /" >&2
13819     ;;
13820 esac
13821 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13822 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13823 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13824   echo $ECHO_N "(cached) $ECHO_C" >&6
13825 else
13826   eval "$as_ac_Header=\$ac_header_preproc"
13827 fi
13828 ac_res=`eval echo '${'$as_ac_Header'}'`
13829                { echo "$as_me:$LINENO: result: $ac_res" >&5
13830 echo "${ECHO_T}$ac_res" >&6; }
13831
13832 fi
13833 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13834   cat >>confdefs.h <<_ACEOF
13835 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13836 _ACEOF
13837
13838 fi
13839
13840 done
13841
13842
13843         if test $ac_cv_header_ltdl_h = no ; then
13844                 { { echo "$as_me:$LINENO: error: could not locate libtool ltdl.h" >&5
13845 echo "$as_me: error: could not locate libtool ltdl.h" >&2;}
13846    { (exit 1); exit 1; }; }
13847         fi
13848
13849         { echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
13850 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6; }
13851 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
13852   echo $ECHO_N "(cached) $ECHO_C" >&6
13853 else
13854   ac_check_lib_save_LIBS=$LIBS
13855 LIBS="-lltdl  $LIBS"
13856 cat >conftest.$ac_ext <<_ACEOF
13857 /* confdefs.h.  */
13858 _ACEOF
13859 cat confdefs.h >>conftest.$ac_ext
13860 cat >>conftest.$ac_ext <<_ACEOF
13861 /* end confdefs.h.  */
13862
13863 /* Override any GCC internal prototype to avoid an error.
13864    Use char because int might match the return type of a GCC
13865    builtin and then its argument prototype would still apply.  */
13866 #ifdef __cplusplus
13867 extern "C"
13868 #endif
13869 char lt_dlinit ();
13870 int
13871 main ()
13872 {
13873 return lt_dlinit ();
13874   ;
13875   return 0;
13876 }
13877 _ACEOF
13878 rm -f conftest.$ac_objext conftest$ac_exeext
13879 if { (ac_try="$ac_link"
13880 case "(($ac_try" in
13881   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13882   *) ac_try_echo=$ac_try;;
13883 esac
13884 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13885   (eval "$ac_link") 2>conftest.er1
13886   ac_status=$?
13887   grep -v '^ *+' conftest.er1 >conftest.err
13888   rm -f conftest.er1
13889   cat conftest.err >&5
13890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13891   (exit $ac_status); } && {
13892          test -z "$ac_c_werror_flag" ||
13893          test ! -s conftest.err
13894        } && test -s conftest$ac_exeext &&
13895        $as_test_x conftest$ac_exeext; then
13896   ac_cv_lib_ltdl_lt_dlinit=yes
13897 else
13898   echo "$as_me: failed program was:" >&5
13899 sed 's/^/| /' conftest.$ac_ext >&5
13900
13901         ac_cv_lib_ltdl_lt_dlinit=no
13902 fi
13903
13904 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13905       conftest$ac_exeext conftest.$ac_ext
13906 LIBS=$ac_check_lib_save_LIBS
13907 fi
13908 { echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13909 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6; }
13910 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
13911
13912                 MODULES_LIBS=-lltdl
13913
13914 cat >>confdefs.h <<\_ACEOF
13915 #define HAVE_LIBLTDL 1
13916 _ACEOF
13917
13918
13919 fi
13920
13921
13922         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13923                 { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
13924 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
13925    { (exit 1); exit 1; }; }
13926         fi
13927         ol_link_modules=yes
13928         WITH_MODULES_ENABLED=yes
13929
13930 else
13931         for i in $Backends; do
13932                 eval "ol_tmp=\$ol_enable_$i"
13933                 if test $ol_tmp = mod ; then
13934                         { echo "$as_me:$LINENO: WARNING: building static $i backend" >&5
13935 echo "$as_me: WARNING: building static $i backend" >&2;}
13936                         eval "ol_enable_$i=yes"
13937                 fi
13938         done
13939         for i in $Overlays; do
13940                 eval "ol_tmp=\$ol_enable_$i"
13941                 if test $ol_tmp = mod ; then
13942                         { echo "$as_me:$LINENO: WARNING: building static $i overlay" >&5
13943 echo "$as_me: WARNING: building static $i overlay" >&2;}
13944                         eval "ol_enable_$i=yes"
13945                 fi
13946         done
13947 fi
13948
13949 # test for EBCDIC
13950 { echo "$as_me:$LINENO: checking for EBCDIC" >&5
13951 echo $ECHO_N "checking for EBCDIC... $ECHO_C" >&6; }
13952 if test "${ol_cv_cpp_ebcdic+set}" = set; then
13953   echo $ECHO_N "(cached) $ECHO_C" >&6
13954 else
13955
13956         cat >conftest.$ac_ext <<_ACEOF
13957 /* confdefs.h.  */
13958 _ACEOF
13959 cat confdefs.h >>conftest.$ac_ext
13960 cat >>conftest.$ac_ext <<_ACEOF
13961 /* end confdefs.h.  */
13962
13963 #if !('M' == 0xd4)
13964 #include <__ASCII__/generate_error.h>
13965 #endif
13966
13967 _ACEOF
13968 if { (ac_try="$ac_cpp conftest.$ac_ext"
13969 case "(($ac_try" in
13970   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13971   *) ac_try_echo=$ac_try;;
13972 esac
13973 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13974   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13975   ac_status=$?
13976   grep -v '^ *+' conftest.er1 >conftest.err
13977   rm -f conftest.er1
13978   cat conftest.err >&5
13979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13980   (exit $ac_status); } >/dev/null && {
13981          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13982          test ! -s conftest.err
13983        }; then
13984   ol_cv_cpp_ebcdic=yes
13985 else
13986   echo "$as_me: failed program was:" >&5
13987 sed 's/^/| /' conftest.$ac_ext >&5
13988
13989   ol_cv_cpp_ebcdic=no
13990 fi
13991
13992 rm -f conftest.err conftest.$ac_ext
13993 fi
13994 { echo "$as_me:$LINENO: result: $ol_cv_cpp_ebcdic" >&5
13995 echo "${ECHO_T}$ol_cv_cpp_ebcdic" >&6; }
13996 if test $ol_cv_cpp_ebcdic = yes ; then
13997
13998 cat >>confdefs.h <<\_ACEOF
13999 #define HAVE_EBCDIC 1
14000 _ACEOF
14001
14002 fi
14003
14004 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
14005 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
14006 if test "${ol_cv_header_stdc+set}" = set; then
14007   echo $ECHO_N "(cached) $ECHO_C" >&6
14008 else
14009   cat >conftest.$ac_ext <<_ACEOF
14010 /* confdefs.h.  */
14011 _ACEOF
14012 cat confdefs.h >>conftest.$ac_ext
14013 cat >>conftest.$ac_ext <<_ACEOF
14014 /* end confdefs.h.  */
14015 #include <stdlib.h>
14016 #include <stdarg.h>
14017 #include <string.h>
14018 #include <float.h>
14019 _ACEOF
14020 if { (ac_try="$ac_cpp conftest.$ac_ext"
14021 case "(($ac_try" in
14022   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14023   *) ac_try_echo=$ac_try;;
14024 esac
14025 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14026   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14027   ac_status=$?
14028   grep -v '^ *+' conftest.er1 >conftest.err
14029   rm -f conftest.er1
14030   cat conftest.err >&5
14031   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14032   (exit $ac_status); } >/dev/null && {
14033          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14034          test ! -s conftest.err
14035        }; then
14036   ol_cv_header_stdc=yes
14037 else
14038   echo "$as_me: failed program was:" >&5
14039 sed 's/^/| /' conftest.$ac_ext >&5
14040
14041   ol_cv_header_stdc=no
14042 fi
14043
14044 rm -f conftest.err conftest.$ac_ext
14045
14046 if test $ol_cv_header_stdc = yes; then
14047   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14048 cat >conftest.$ac_ext <<_ACEOF
14049 /* confdefs.h.  */
14050 _ACEOF
14051 cat confdefs.h >>conftest.$ac_ext
14052 cat >>conftest.$ac_ext <<_ACEOF
14053 /* end confdefs.h.  */
14054 #include <string.h>
14055
14056 _ACEOF
14057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14058   $EGREP "memchr" >/dev/null 2>&1; then
14059   :
14060 else
14061   ol_cv_header_stdc=no
14062 fi
14063 rm -f conftest*
14064
14065 fi
14066
14067 if test $ol_cv_header_stdc = yes; then
14068   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14069 cat >conftest.$ac_ext <<_ACEOF
14070 /* confdefs.h.  */
14071 _ACEOF
14072 cat confdefs.h >>conftest.$ac_ext
14073 cat >>conftest.$ac_ext <<_ACEOF
14074 /* end confdefs.h.  */
14075 #include <stdlib.h>
14076
14077 _ACEOF
14078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14079   $EGREP "free" >/dev/null 2>&1; then
14080   :
14081 else
14082   ol_cv_header_stdc=no
14083 fi
14084 rm -f conftest*
14085
14086 fi
14087
14088 if test $ol_cv_header_stdc = yes; then
14089   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14090 if test "$cross_compiling" = yes; then
14091   :
14092 else
14093   cat >conftest.$ac_ext <<_ACEOF
14094 /* confdefs.h.  */
14095 _ACEOF
14096 cat confdefs.h >>conftest.$ac_ext
14097 cat >>conftest.$ac_ext <<_ACEOF
14098 /* end confdefs.h.  */
14099 #include <ctype.h>
14100 #ifndef HAVE_EBCDIC
14101 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14102 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14103 #else
14104 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14105                 || ('j' <= (c) && (c) <= 'r') \
14106                 || ('s' <= (c) && (c) <= 'z'))
14107 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
14108 #endif
14109 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14110 int main () { int i; for (i = 0; i < 256; i++)
14111 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
14112 exit (0); }
14113
14114 _ACEOF
14115 rm -f conftest$ac_exeext
14116 if { (ac_try="$ac_link"
14117 case "(($ac_try" in
14118   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14119   *) ac_try_echo=$ac_try;;
14120 esac
14121 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14122   (eval "$ac_link") 2>&5
14123   ac_status=$?
14124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14125   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14126   { (case "(($ac_try" in
14127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14128   *) ac_try_echo=$ac_try;;
14129 esac
14130 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14131   (eval "$ac_try") 2>&5
14132   ac_status=$?
14133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14134   (exit $ac_status); }; }; then
14135   :
14136 else
14137   echo "$as_me: program exited with status $ac_status" >&5
14138 echo "$as_me: failed program was:" >&5
14139 sed 's/^/| /' conftest.$ac_ext >&5
14140
14141 ( exit $ac_status )
14142 ol_cv_header_stdc=no
14143 fi
14144 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14145 fi
14146
14147
14148 fi
14149 fi
14150 { echo "$as_me:$LINENO: result: $ol_cv_header_stdc" >&5
14151 echo "${ECHO_T}$ol_cv_header_stdc" >&6; }
14152 if test $ol_cv_header_stdc = yes; then
14153   cat >>confdefs.h <<\_ACEOF
14154 #define STDC_HEADERS 1
14155 _ACEOF
14156
14157 fi
14158 ac_cv_header_stdc=disable
14159
14160
14161 if test $ol_cv_header_stdc != yes; then
14162         { echo "$as_me:$LINENO: WARNING: could not locate Standard C compliant headers" >&5
14163 echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
14164 fi
14165
14166
14167
14168
14169
14170
14171 ac_header_dirent=no
14172 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14173   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14174 { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
14175 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
14176 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14177   echo $ECHO_N "(cached) $ECHO_C" >&6
14178 else
14179   cat >conftest.$ac_ext <<_ACEOF
14180 /* confdefs.h.  */
14181 _ACEOF
14182 cat confdefs.h >>conftest.$ac_ext
14183 cat >>conftest.$ac_ext <<_ACEOF
14184 /* end confdefs.h.  */
14185 #include <sys/types.h>
14186 #include <$ac_hdr>
14187
14188 int
14189 main ()
14190 {
14191 if ((DIR *) 0)
14192 return 0;
14193   ;
14194   return 0;
14195 }
14196 _ACEOF
14197 rm -f conftest.$ac_objext
14198 if { (ac_try="$ac_compile"
14199 case "(($ac_try" in
14200   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14201   *) ac_try_echo=$ac_try;;
14202 esac
14203 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14204   (eval "$ac_compile") 2>conftest.er1
14205   ac_status=$?
14206   grep -v '^ *+' conftest.er1 >conftest.err
14207   rm -f conftest.er1
14208   cat conftest.err >&5
14209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14210   (exit $ac_status); } && {
14211          test -z "$ac_c_werror_flag" ||
14212          test ! -s conftest.err
14213        } && test -s conftest.$ac_objext; then
14214   eval "$as_ac_Header=yes"
14215 else
14216   echo "$as_me: failed program was:" >&5
14217 sed 's/^/| /' conftest.$ac_ext >&5
14218
14219         eval "$as_ac_Header=no"
14220 fi
14221
14222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14223 fi
14224 ac_res=`eval echo '${'$as_ac_Header'}'`
14225                { echo "$as_me:$LINENO: result: $ac_res" >&5
14226 echo "${ECHO_T}$ac_res" >&6; }
14227 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14228   cat >>confdefs.h <<_ACEOF
14229 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14230 _ACEOF
14231
14232 ac_header_dirent=$ac_hdr; break
14233 fi
14234
14235 done
14236 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14237 if test $ac_header_dirent = dirent.h; then
14238   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
14239 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
14240 if test "${ac_cv_search_opendir+set}" = set; then
14241   echo $ECHO_N "(cached) $ECHO_C" >&6
14242 else
14243   ac_func_search_save_LIBS=$LIBS
14244 cat >conftest.$ac_ext <<_ACEOF
14245 /* confdefs.h.  */
14246 _ACEOF
14247 cat confdefs.h >>conftest.$ac_ext
14248 cat >>conftest.$ac_ext <<_ACEOF
14249 /* end confdefs.h.  */
14250
14251 /* Override any GCC internal prototype to avoid an error.
14252    Use char because int might match the return type of a GCC
14253    builtin and then its argument prototype would still apply.  */
14254 #ifdef __cplusplus
14255 extern "C"
14256 #endif
14257 char opendir ();
14258 int
14259 main ()
14260 {
14261 return opendir ();
14262   ;
14263   return 0;
14264 }
14265 _ACEOF
14266 for ac_lib in '' dir; do
14267   if test -z "$ac_lib"; then
14268     ac_res="none required"
14269   else
14270     ac_res=-l$ac_lib
14271     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14272   fi
14273   rm -f conftest.$ac_objext conftest$ac_exeext
14274 if { (ac_try="$ac_link"
14275 case "(($ac_try" in
14276   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14277   *) ac_try_echo=$ac_try;;
14278 esac
14279 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14280   (eval "$ac_link") 2>conftest.er1
14281   ac_status=$?
14282   grep -v '^ *+' conftest.er1 >conftest.err
14283   rm -f conftest.er1
14284   cat conftest.err >&5
14285   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14286   (exit $ac_status); } && {
14287          test -z "$ac_c_werror_flag" ||
14288          test ! -s conftest.err
14289        } && test -s conftest$ac_exeext &&
14290        $as_test_x conftest$ac_exeext; then
14291   ac_cv_search_opendir=$ac_res
14292 else
14293   echo "$as_me: failed program was:" >&5
14294 sed 's/^/| /' conftest.$ac_ext >&5
14295
14296
14297 fi
14298
14299 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14300       conftest$ac_exeext
14301   if test "${ac_cv_search_opendir+set}" = set; then
14302   break
14303 fi
14304 done
14305 if test "${ac_cv_search_opendir+set}" = set; then
14306   :
14307 else
14308   ac_cv_search_opendir=no
14309 fi
14310 rm conftest.$ac_ext
14311 LIBS=$ac_func_search_save_LIBS
14312 fi
14313 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
14314 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
14315 ac_res=$ac_cv_search_opendir
14316 if test "$ac_res" != no; then
14317   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14318
14319 fi
14320
14321 else
14322   { echo "$as_me:$LINENO: checking for library containing opendir" >&5
14323 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
14324 if test "${ac_cv_search_opendir+set}" = set; then
14325   echo $ECHO_N "(cached) $ECHO_C" >&6
14326 else
14327   ac_func_search_save_LIBS=$LIBS
14328 cat >conftest.$ac_ext <<_ACEOF
14329 /* confdefs.h.  */
14330 _ACEOF
14331 cat confdefs.h >>conftest.$ac_ext
14332 cat >>conftest.$ac_ext <<_ACEOF
14333 /* end confdefs.h.  */
14334
14335 /* Override any GCC internal prototype to avoid an error.
14336    Use char because int might match the return type of a GCC
14337    builtin and then its argument prototype would still apply.  */
14338 #ifdef __cplusplus
14339 extern "C"
14340 #endif
14341 char opendir ();
14342 int
14343 main ()
14344 {
14345 return opendir ();
14346   ;
14347   return 0;
14348 }
14349 _ACEOF
14350 for ac_lib in '' x; do
14351   if test -z "$ac_lib"; then
14352     ac_res="none required"
14353   else
14354     ac_res=-l$ac_lib
14355     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14356   fi
14357   rm -f conftest.$ac_objext conftest$ac_exeext
14358 if { (ac_try="$ac_link"
14359 case "(($ac_try" in
14360   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14361   *) ac_try_echo=$ac_try;;
14362 esac
14363 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14364   (eval "$ac_link") 2>conftest.er1
14365   ac_status=$?
14366   grep -v '^ *+' conftest.er1 >conftest.err
14367   rm -f conftest.er1
14368   cat conftest.err >&5
14369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14370   (exit $ac_status); } && {
14371          test -z "$ac_c_werror_flag" ||
14372          test ! -s conftest.err
14373        } && test -s conftest$ac_exeext &&
14374        $as_test_x conftest$ac_exeext; then
14375   ac_cv_search_opendir=$ac_res
14376 else
14377   echo "$as_me: failed program was:" >&5
14378 sed 's/^/| /' conftest.$ac_ext >&5
14379
14380
14381 fi
14382
14383 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14384       conftest$ac_exeext
14385   if test "${ac_cv_search_opendir+set}" = set; then
14386   break
14387 fi
14388 done
14389 if test "${ac_cv_search_opendir+set}" = set; then
14390   :
14391 else
14392   ac_cv_search_opendir=no
14393 fi
14394 rm conftest.$ac_ext
14395 LIBS=$ac_func_search_save_LIBS
14396 fi
14397 { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
14398 echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
14399 ac_res=$ac_cv_search_opendir
14400 if test "$ac_res" != no; then
14401   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14402
14403 fi
14404
14405 fi
14406
14407 { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
14408 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
14409 if test "${ac_cv_header_sys_wait_h+set}" = set; then
14410   echo $ECHO_N "(cached) $ECHO_C" >&6
14411 else
14412   cat >conftest.$ac_ext <<_ACEOF
14413 /* confdefs.h.  */
14414 _ACEOF
14415 cat confdefs.h >>conftest.$ac_ext
14416 cat >>conftest.$ac_ext <<_ACEOF
14417 /* end confdefs.h.  */
14418 #include <sys/types.h>
14419 #include <sys/wait.h>
14420 #ifndef WEXITSTATUS
14421 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
14422 #endif
14423 #ifndef WIFEXITED
14424 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
14425 #endif
14426
14427 int
14428 main ()
14429 {
14430   int s;
14431   wait (&s);
14432   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
14433   ;
14434   return 0;
14435 }
14436 _ACEOF
14437 rm -f conftest.$ac_objext
14438 if { (ac_try="$ac_compile"
14439 case "(($ac_try" in
14440   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14441   *) ac_try_echo=$ac_try;;
14442 esac
14443 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14444   (eval "$ac_compile") 2>conftest.er1
14445   ac_status=$?
14446   grep -v '^ *+' conftest.er1 >conftest.err
14447   rm -f conftest.er1
14448   cat conftest.err >&5
14449   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14450   (exit $ac_status); } && {
14451          test -z "$ac_c_werror_flag" ||
14452          test ! -s conftest.err
14453        } && test -s conftest.$ac_objext; then
14454   ac_cv_header_sys_wait_h=yes
14455 else
14456   echo "$as_me: failed program was:" >&5
14457 sed 's/^/| /' conftest.$ac_ext >&5
14458
14459         ac_cv_header_sys_wait_h=no
14460 fi
14461
14462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14463 fi
14464 { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
14465 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
14466 if test $ac_cv_header_sys_wait_h = yes; then
14467
14468 cat >>confdefs.h <<\_ACEOF
14469 #define HAVE_SYS_WAIT_H 1
14470 _ACEOF
14471
14472 fi
14473
14474 { echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5
14475 echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6; }
14476 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
14477   echo $ECHO_N "(cached) $ECHO_C" >&6
14478 else
14479   cat >conftest.$ac_ext <<_ACEOF
14480 /* confdefs.h.  */
14481 _ACEOF
14482 cat confdefs.h >>conftest.$ac_ext
14483 cat >>conftest.$ac_ext <<_ACEOF
14484 /* end confdefs.h.  */
14485 #include <sys/types.h>
14486 #include <termios.h>
14487 #ifdef TIOCGWINSZ
14488   yes
14489 #endif
14490
14491 _ACEOF
14492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14493   $EGREP "yes" >/dev/null 2>&1; then
14494   ac_cv_sys_tiocgwinsz_in_termios_h=yes
14495 else
14496   ac_cv_sys_tiocgwinsz_in_termios_h=no
14497 fi
14498 rm -f conftest*
14499
14500 fi
14501 { echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
14502 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
14503
14504 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
14505   { echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
14506 echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6; }
14507 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
14508   echo $ECHO_N "(cached) $ECHO_C" >&6
14509 else
14510   cat >conftest.$ac_ext <<_ACEOF
14511 /* confdefs.h.  */
14512 _ACEOF
14513 cat confdefs.h >>conftest.$ac_ext
14514 cat >>conftest.$ac_ext <<_ACEOF
14515 /* end confdefs.h.  */
14516 #include <sys/types.h>
14517 #include <sys/ioctl.h>
14518 #ifdef TIOCGWINSZ
14519   yes
14520 #endif
14521
14522 _ACEOF
14523 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14524   $EGREP "yes" >/dev/null 2>&1; then
14525   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
14526 else
14527   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
14528 fi
14529 rm -f conftest*
14530
14531 fi
14532 { echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
14533 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
14534
14535   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
14536
14537 cat >>confdefs.h <<\_ACEOF
14538 #define GWINSZ_IN_SYS_IOCTL 1
14539 _ACEOF
14540
14541   fi
14542 fi
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592 for ac_header in \
14593         arpa/inet.h             \
14594         arpa/nameser.h  \
14595         assert.h                \
14596         bits/types.h    \
14597         conio.h                 \
14598         crypt.h                 \
14599         direct.h                \
14600         errno.h                 \
14601         fcntl.h                 \
14602         filio.h                 \
14603         getopt.h                \
14604         grp.h                   \
14605         io.h                    \
14606         libutil.h               \
14607         limits.h                \
14608         locale.h                \
14609         malloc.h                \
14610         memory.h                \
14611         psap.h                  \
14612         pwd.h                   \
14613         process.h               \
14614         sgtty.h                 \
14615         shadow.h                \
14616         stddef.h                \
14617         string.h                \
14618         strings.h               \
14619         sysexits.h              \
14620         sys/file.h              \
14621         sys/filio.h             \
14622         sys/fstyp.h             \
14623         sys/errno.h             \
14624         sys/ioctl.h             \
14625         sys/param.h             \
14626         sys/privgrp.h   \
14627         sys/resource.h  \
14628         sys/select.h    \
14629         sys/socket.h    \
14630         sys/stat.h              \
14631         sys/syslog.h    \
14632         sys/time.h              \
14633         sys/types.h             \
14634         sys/uio.h               \
14635         sys/vmount.h    \
14636         syslog.h                \
14637         termios.h               \
14638         unistd.h                \
14639         utime.h                 \
14640
14641 do
14642 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14643 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14644   { echo "$as_me:$LINENO: checking for $ac_header" >&5
14645 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14646 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14647   echo $ECHO_N "(cached) $ECHO_C" >&6
14648 fi
14649 ac_res=`eval echo '${'$as_ac_Header'}'`
14650                { echo "$as_me:$LINENO: result: $ac_res" >&5
14651 echo "${ECHO_T}$ac_res" >&6; }
14652 else
14653   # Is the header compilable?
14654 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
14655 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
14656 cat >conftest.$ac_ext <<_ACEOF
14657 /* confdefs.h.  */
14658 _ACEOF
14659 cat confdefs.h >>conftest.$ac_ext
14660 cat >>conftest.$ac_ext <<_ACEOF
14661 /* end confdefs.h.  */
14662 $ac_includes_default
14663 #include <$ac_header>
14664 _ACEOF
14665 rm -f conftest.$ac_objext
14666 if { (ac_try="$ac_compile"
14667 case "(($ac_try" in
14668   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14669   *) ac_try_echo=$ac_try;;
14670 esac
14671 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14672   (eval "$ac_compile") 2>conftest.er1
14673   ac_status=$?
14674   grep -v '^ *+' conftest.er1 >conftest.err
14675   rm -f conftest.er1
14676   cat conftest.err >&5
14677   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14678   (exit $ac_status); } && {
14679          test -z "$ac_c_werror_flag" ||
14680          test ! -s conftest.err
14681        } && test -s conftest.$ac_objext; then
14682   ac_header_compiler=yes
14683 else
14684   echo "$as_me: failed program was:" >&5
14685 sed 's/^/| /' conftest.$ac_ext >&5
14686
14687         ac_header_compiler=no
14688 fi
14689
14690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14691 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14692 echo "${ECHO_T}$ac_header_compiler" >&6; }
14693
14694 # Is the header present?
14695 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
14696 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
14697 cat >conftest.$ac_ext <<_ACEOF
14698 /* confdefs.h.  */
14699 _ACEOF
14700 cat confdefs.h >>conftest.$ac_ext
14701 cat >>conftest.$ac_ext <<_ACEOF
14702 /* end confdefs.h.  */
14703 #include <$ac_header>
14704 _ACEOF
14705 if { (ac_try="$ac_cpp conftest.$ac_ext"
14706 case "(($ac_try" in
14707   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14708   *) ac_try_echo=$ac_try;;
14709 esac
14710 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14711   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14712   ac_status=$?
14713   grep -v '^ *+' conftest.er1 >conftest.err
14714   rm -f conftest.er1
14715   cat conftest.err >&5
14716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14717   (exit $ac_status); } >/dev/null && {
14718          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14719          test ! -s conftest.err
14720        }; then
14721   ac_header_preproc=yes
14722 else
14723   echo "$as_me: failed program was:" >&5
14724 sed 's/^/| /' conftest.$ac_ext >&5
14725
14726   ac_header_preproc=no
14727 fi
14728
14729 rm -f conftest.err conftest.$ac_ext
14730 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14731 echo "${ECHO_T}$ac_header_preproc" >&6; }
14732
14733 # So?  What about this header?
14734 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14735   yes:no: )
14736     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14737 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14738     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14739 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14740     ac_header_preproc=yes
14741     ;;
14742   no:yes:* )
14743     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14744 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14745     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14746 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14747     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14748 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14749     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14750 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14751     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14752 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14753     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14754 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14755     ( cat <<\_ASBOX
14756 ## --------------------------------------------- ##
14757 ## Report this to <http://www.openldap.org/its/> ##
14758 ## --------------------------------------------- ##
14759 _ASBOX
14760      ) | sed "s/^/$as_me: WARNING:     /" >&2
14761     ;;
14762 esac
14763 { echo "$as_me:$LINENO: checking for $ac_header" >&5
14764 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14765 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14766   echo $ECHO_N "(cached) $ECHO_C" >&6
14767 else
14768   eval "$as_ac_Header=\$ac_header_preproc"
14769 fi
14770 ac_res=`eval echo '${'$as_ac_Header'}'`
14771                { echo "$as_me:$LINENO: result: $ac_res" >&5
14772 echo "${ECHO_T}$ac_res" >&6; }
14773
14774 fi
14775 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14776   cat >>confdefs.h <<_ACEOF
14777 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14778 _ACEOF
14779
14780 fi
14781
14782 done
14783
14784
14785 if test "$ac_cv_mingw32" = yes -o \( "$ac_cv_cygwin32" = yes -a $GCC = no \) ; then
14786
14787
14788 for ac_header in winsock.h winsock2.h
14789 do
14790 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14791 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14792   { echo "$as_me:$LINENO: checking for $ac_header" >&5
14793 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14794 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14795   echo $ECHO_N "(cached) $ECHO_C" >&6
14796 fi
14797 ac_res=`eval echo '${'$as_ac_Header'}'`
14798                { echo "$as_me:$LINENO: result: $ac_res" >&5
14799 echo "${ECHO_T}$ac_res" >&6; }
14800 else
14801   # Is the header compilable?
14802 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
14803 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
14804 cat >conftest.$ac_ext <<_ACEOF
14805 /* confdefs.h.  */
14806 _ACEOF
14807 cat confdefs.h >>conftest.$ac_ext
14808 cat >>conftest.$ac_ext <<_ACEOF
14809 /* end confdefs.h.  */
14810 $ac_includes_default
14811 #include <$ac_header>
14812 _ACEOF
14813 rm -f conftest.$ac_objext
14814 if { (ac_try="$ac_compile"
14815 case "(($ac_try" in
14816   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14817   *) ac_try_echo=$ac_try;;
14818 esac
14819 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14820   (eval "$ac_compile") 2>conftest.er1
14821   ac_status=$?
14822   grep -v '^ *+' conftest.er1 >conftest.err
14823   rm -f conftest.er1
14824   cat conftest.err >&5
14825   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14826   (exit $ac_status); } && {
14827          test -z "$ac_c_werror_flag" ||
14828          test ! -s conftest.err
14829        } && test -s conftest.$ac_objext; then
14830   ac_header_compiler=yes
14831 else
14832   echo "$as_me: failed program was:" >&5
14833 sed 's/^/| /' conftest.$ac_ext >&5
14834
14835         ac_header_compiler=no
14836 fi
14837
14838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14839 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14840 echo "${ECHO_T}$ac_header_compiler" >&6; }
14841
14842 # Is the header present?
14843 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
14844 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
14845 cat >conftest.$ac_ext <<_ACEOF
14846 /* confdefs.h.  */
14847 _ACEOF
14848 cat confdefs.h >>conftest.$ac_ext
14849 cat >>conftest.$ac_ext <<_ACEOF
14850 /* end confdefs.h.  */
14851 #include <$ac_header>
14852 _ACEOF
14853 if { (ac_try="$ac_cpp conftest.$ac_ext"
14854 case "(($ac_try" in
14855   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14856   *) ac_try_echo=$ac_try;;
14857 esac
14858 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14859   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14860   ac_status=$?
14861   grep -v '^ *+' conftest.er1 >conftest.err
14862   rm -f conftest.er1
14863   cat conftest.err >&5
14864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14865   (exit $ac_status); } >/dev/null && {
14866          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14867          test ! -s conftest.err
14868        }; then
14869   ac_header_preproc=yes
14870 else
14871   echo "$as_me: failed program was:" >&5
14872 sed 's/^/| /' conftest.$ac_ext >&5
14873
14874   ac_header_preproc=no
14875 fi
14876
14877 rm -f conftest.err conftest.$ac_ext
14878 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14879 echo "${ECHO_T}$ac_header_preproc" >&6; }
14880
14881 # So?  What about this header?
14882 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14883   yes:no: )
14884     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14885 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
14886     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14887 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14888     ac_header_preproc=yes
14889     ;;
14890   no:yes:* )
14891     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14892 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
14893     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
14894 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
14895     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14896 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14897     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
14898 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
14899     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
14900 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
14901     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14902 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
14903     ( cat <<\_ASBOX
14904 ## --------------------------------------------- ##
14905 ## Report this to <http://www.openldap.org/its/> ##
14906 ## --------------------------------------------- ##
14907 _ASBOX
14908      ) | sed "s/^/$as_me: WARNING:     /" >&2
14909     ;;
14910 esac
14911 { echo "$as_me:$LINENO: checking for $ac_header" >&5
14912 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14913 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14914   echo $ECHO_N "(cached) $ECHO_C" >&6
14915 else
14916   eval "$as_ac_Header=\$ac_header_preproc"
14917 fi
14918 ac_res=`eval echo '${'$as_ac_Header'}'`
14919                { echo "$as_me:$LINENO: result: $ac_res" >&5
14920 echo "${ECHO_T}$ac_res" >&6; }
14921
14922 fi
14923 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14924   cat >>confdefs.h <<_ACEOF
14925 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14926 _ACEOF
14927
14928 fi
14929
14930 done
14931
14932 fi
14933
14934
14935 for ac_header in resolv.h
14936 do
14937 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14938 { echo "$as_me:$LINENO: checking for $ac_header" >&5
14939 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14940 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14941   echo $ECHO_N "(cached) $ECHO_C" >&6
14942 else
14943   cat >conftest.$ac_ext <<_ACEOF
14944 /* confdefs.h.  */
14945 _ACEOF
14946 cat confdefs.h >>conftest.$ac_ext
14947 cat >>conftest.$ac_ext <<_ACEOF
14948 /* end confdefs.h.  */
14949 $ac_includes_default
14950 #include <netinet/in.h>
14951
14952
14953 #include <$ac_header>
14954 _ACEOF
14955 rm -f conftest.$ac_objext
14956 if { (ac_try="$ac_compile"
14957 case "(($ac_try" in
14958   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14959   *) ac_try_echo=$ac_try;;
14960 esac
14961 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14962   (eval "$ac_compile") 2>conftest.er1
14963   ac_status=$?
14964   grep -v '^ *+' conftest.er1 >conftest.err
14965   rm -f conftest.er1
14966   cat conftest.err >&5
14967   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14968   (exit $ac_status); } && {
14969          test -z "$ac_c_werror_flag" ||
14970          test ! -s conftest.err
14971        } && test -s conftest.$ac_objext; then
14972   eval "$as_ac_Header=yes"
14973 else
14974   echo "$as_me: failed program was:" >&5
14975 sed 's/^/| /' conftest.$ac_ext >&5
14976
14977         eval "$as_ac_Header=no"
14978 fi
14979
14980 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14981 fi
14982 ac_res=`eval echo '${'$as_ac_Header'}'`
14983                { echo "$as_me:$LINENO: result: $ac_res" >&5
14984 echo "${ECHO_T}$ac_res" >&6; }
14985 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14986   cat >>confdefs.h <<_ACEOF
14987 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14988 _ACEOF
14989
14990 fi
14991
14992 done
14993
14994
14995
14996 for ac_header in netinet/tcp.h
14997 do
14998 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14999 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15000 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15001 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15002   echo $ECHO_N "(cached) $ECHO_C" >&6
15003 else
15004   cat >conftest.$ac_ext <<_ACEOF
15005 /* confdefs.h.  */
15006 _ACEOF
15007 cat confdefs.h >>conftest.$ac_ext
15008 cat >>conftest.$ac_ext <<_ACEOF
15009 /* end confdefs.h.  */
15010 $ac_includes_default
15011 #include <netinet/in.h>
15012
15013
15014 #include <$ac_header>
15015 _ACEOF
15016 rm -f conftest.$ac_objext
15017 if { (ac_try="$ac_compile"
15018 case "(($ac_try" in
15019   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15020   *) ac_try_echo=$ac_try;;
15021 esac
15022 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15023   (eval "$ac_compile") 2>conftest.er1
15024   ac_status=$?
15025   grep -v '^ *+' conftest.er1 >conftest.err
15026   rm -f conftest.er1
15027   cat conftest.err >&5
15028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15029   (exit $ac_status); } && {
15030          test -z "$ac_c_werror_flag" ||
15031          test ! -s conftest.err
15032        } && test -s conftest.$ac_objext; then
15033   eval "$as_ac_Header=yes"
15034 else
15035   echo "$as_me: failed program was:" >&5
15036 sed 's/^/| /' conftest.$ac_ext >&5
15037
15038         eval "$as_ac_Header=no"
15039 fi
15040
15041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15042 fi
15043 ac_res=`eval echo '${'$as_ac_Header'}'`
15044                { echo "$as_me:$LINENO: result: $ac_res" >&5
15045 echo "${ECHO_T}$ac_res" >&6; }
15046 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15047   cat >>confdefs.h <<_ACEOF
15048 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15049 _ACEOF
15050
15051 fi
15052
15053 done
15054
15055
15056
15057 for ac_header in sys/ucred.h
15058 do
15059 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15060 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15061 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15062 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15063   echo $ECHO_N "(cached) $ECHO_C" >&6
15064 else
15065   cat >conftest.$ac_ext <<_ACEOF
15066 /* confdefs.h.  */
15067 _ACEOF
15068 cat confdefs.h >>conftest.$ac_ext
15069 cat >>conftest.$ac_ext <<_ACEOF
15070 /* end confdefs.h.  */
15071 $ac_includes_default
15072 #ifdef HAVE_SYS_PARAM_H
15073 #include <sys/param.h>
15074 #endif
15075
15076
15077 #include <$ac_header>
15078 _ACEOF
15079 rm -f conftest.$ac_objext
15080 if { (ac_try="$ac_compile"
15081 case "(($ac_try" in
15082   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15083   *) ac_try_echo=$ac_try;;
15084 esac
15085 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15086   (eval "$ac_compile") 2>conftest.er1
15087   ac_status=$?
15088   grep -v '^ *+' conftest.er1 >conftest.err
15089   rm -f conftest.er1
15090   cat conftest.err >&5
15091   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15092   (exit $ac_status); } && {
15093          test -z "$ac_c_werror_flag" ||
15094          test ! -s conftest.err
15095        } && test -s conftest.$ac_objext; then
15096   eval "$as_ac_Header=yes"
15097 else
15098   echo "$as_me: failed program was:" >&5
15099 sed 's/^/| /' conftest.$ac_ext >&5
15100
15101         eval "$as_ac_Header=no"
15102 fi
15103
15104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15105 fi
15106 ac_res=`eval echo '${'$as_ac_Header'}'`
15107                { echo "$as_me:$LINENO: result: $ac_res" >&5
15108 echo "${ECHO_T}$ac_res" >&6; }
15109 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15110   cat >>confdefs.h <<_ACEOF
15111 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15112 _ACEOF
15113
15114 fi
15115
15116 done
15117
15118
15119
15120
15121
15122 for ac_func in sigaction sigset
15123 do
15124 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15125 { echo "$as_me:$LINENO: checking for $ac_func" >&5
15126 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15127 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15128   echo $ECHO_N "(cached) $ECHO_C" >&6
15129 else
15130   cat >conftest.$ac_ext <<_ACEOF
15131 /* confdefs.h.  */
15132 _ACEOF
15133 cat confdefs.h >>conftest.$ac_ext
15134 cat >>conftest.$ac_ext <<_ACEOF
15135 /* end confdefs.h.  */
15136 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15137    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15138 #define $ac_func innocuous_$ac_func
15139
15140 /* System header to define __stub macros and hopefully few prototypes,
15141     which can conflict with char $ac_func (); below.
15142     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15143     <limits.h> exists even on freestanding compilers.  */
15144
15145 #ifdef __STDC__
15146 # include <limits.h>
15147 #else
15148 # include <assert.h>
15149 #endif
15150
15151 #undef $ac_func
15152
15153 /* Override any GCC internal prototype to avoid an error.
15154    Use char because int might match the return type of a GCC
15155    builtin and then its argument prototype would still apply.  */
15156 #ifdef __cplusplus
15157 extern "C"
15158 #endif
15159 char $ac_func ();
15160 /* The GNU C library defines this for functions which it implements
15161     to always fail with ENOSYS.  Some functions are actually named
15162     something starting with __ and the normal name is an alias.  */
15163 #if defined __stub_$ac_func || defined __stub___$ac_func
15164 choke me
15165 #endif
15166
15167 int
15168 main ()
15169 {
15170 return $ac_func ();
15171   ;
15172   return 0;
15173 }
15174 _ACEOF
15175 rm -f conftest.$ac_objext conftest$ac_exeext
15176 if { (ac_try="$ac_link"
15177 case "(($ac_try" in
15178   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15179   *) ac_try_echo=$ac_try;;
15180 esac
15181 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15182   (eval "$ac_link") 2>conftest.er1
15183   ac_status=$?
15184   grep -v '^ *+' conftest.er1 >conftest.err
15185   rm -f conftest.er1
15186   cat conftest.err >&5
15187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15188   (exit $ac_status); } && {
15189          test -z "$ac_c_werror_flag" ||
15190          test ! -s conftest.err
15191        } && test -s conftest$ac_exeext &&
15192        $as_test_x conftest$ac_exeext; then
15193   eval "$as_ac_var=yes"
15194 else
15195   echo "$as_me: failed program was:" >&5
15196 sed 's/^/| /' conftest.$ac_ext >&5
15197
15198         eval "$as_ac_var=no"
15199 fi
15200
15201 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15202       conftest$ac_exeext conftest.$ac_ext
15203 fi
15204 ac_res=`eval echo '${'$as_ac_var'}'`
15205                { echo "$as_me:$LINENO: result: $ac_res" >&5
15206 echo "${ECHO_T}$ac_res" >&6; }
15207 if test `eval echo '${'$as_ac_var'}'` = yes; then
15208   cat >>confdefs.h <<_ACEOF
15209 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15210 _ACEOF
15211
15212 fi
15213 done
15214
15215
15216 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
15217
15218 { echo "$as_me:$LINENO: checking for sigset in -lV3" >&5
15219 echo $ECHO_N "checking for sigset in -lV3... $ECHO_C" >&6; }
15220 if test "${ac_cv_lib_V3_sigset+set}" = set; then
15221   echo $ECHO_N "(cached) $ECHO_C" >&6
15222 else
15223   ac_check_lib_save_LIBS=$LIBS
15224 LIBS="-lV3  $LIBS"
15225 cat >conftest.$ac_ext <<_ACEOF
15226 /* confdefs.h.  */
15227 _ACEOF
15228 cat confdefs.h >>conftest.$ac_ext
15229 cat >>conftest.$ac_ext <<_ACEOF
15230 /* end confdefs.h.  */
15231
15232 /* Override any GCC internal prototype to avoid an error.
15233    Use char because int might match the return type of a GCC
15234    builtin and then its argument prototype would still apply.  */
15235 #ifdef __cplusplus
15236 extern "C"
15237 #endif
15238 char sigset ();
15239 int
15240 main ()
15241 {
15242 return sigset ();
15243   ;
15244   return 0;
15245 }
15246 _ACEOF
15247 rm -f conftest.$ac_objext conftest$ac_exeext
15248 if { (ac_try="$ac_link"
15249 case "(($ac_try" in
15250   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15251   *) ac_try_echo=$ac_try;;
15252 esac
15253 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15254   (eval "$ac_link") 2>conftest.er1
15255   ac_status=$?
15256   grep -v '^ *+' conftest.er1 >conftest.err
15257   rm -f conftest.er1
15258   cat conftest.err >&5
15259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15260   (exit $ac_status); } && {
15261          test -z "$ac_c_werror_flag" ||
15262          test ! -s conftest.err
15263        } && test -s conftest$ac_exeext &&
15264        $as_test_x conftest$ac_exeext; then
15265   ac_cv_lib_V3_sigset=yes
15266 else
15267   echo "$as_me: failed program was:" >&5
15268 sed 's/^/| /' conftest.$ac_ext >&5
15269
15270         ac_cv_lib_V3_sigset=no
15271 fi
15272
15273 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15274       conftest$ac_exeext conftest.$ac_ext
15275 LIBS=$ac_check_lib_save_LIBS
15276 fi
15277 { echo "$as_me:$LINENO: result: $ac_cv_lib_V3_sigset" >&5
15278 echo "${ECHO_T}$ac_cv_lib_V3_sigset" >&6; }
15279 if test $ac_cv_lib_V3_sigset = yes; then
15280   cat >>confdefs.h <<_ACEOF
15281 #define HAVE_LIBV3 1
15282 _ACEOF
15283
15284   LIBS="-lV3 $LIBS"
15285
15286 fi
15287
15288 fi
15289
15290 if test "$ac_cv_header_winsock_h" = yes; then
15291 { echo "$as_me:$LINENO: checking for winsock" >&5
15292 echo $ECHO_N "checking for winsock... $ECHO_C" >&6; }
15293 if test "${ol_cv_winsock+set}" = set; then
15294   echo $ECHO_N "(cached) $ECHO_C" >&6
15295 else
15296
15297 save_LIBS="$LIBS"
15298 for curlib in none ws2_32 wsock32; do
15299         if test curlib != none ; then
15300             LIBS="$save_LIBS -l$curlib"
15301         fi
15302         cat >conftest.$ac_ext <<_ACEOF
15303 /* confdefs.h.  */
15304 _ACEOF
15305 cat confdefs.h >>conftest.$ac_ext
15306 cat >>conftest.$ac_ext <<_ACEOF
15307 /* end confdefs.h.  */
15308 #include <winsock.h>
15309
15310 int
15311 main ()
15312 {
15313
15314                         socket(0,0,0);
15315                         select(0,NULL,NULL,NULL,NULL);
15316                         closesocket(0);
15317                         gethostname(NULL,0);
15318
15319   ;
15320   return 0;
15321 }
15322 _ACEOF
15323 rm -f conftest.$ac_objext conftest$ac_exeext
15324 if { (ac_try="$ac_link"
15325 case "(($ac_try" in
15326   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15327   *) ac_try_echo=$ac_try;;
15328 esac
15329 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15330   (eval "$ac_link") 2>conftest.er1
15331   ac_status=$?
15332   grep -v '^ *+' conftest.er1 >conftest.err
15333   rm -f conftest.er1
15334   cat conftest.err >&5
15335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15336   (exit $ac_status); } && {
15337          test -z "$ac_c_werror_flag" ||
15338          test ! -s conftest.err
15339        } && test -s conftest$ac_exeext &&
15340        $as_test_x conftest$ac_exeext; then
15341   ol_cv_winsock=$curlib
15342 else
15343   echo "$as_me: failed program was:" >&5
15344 sed 's/^/| /' conftest.$ac_ext >&5
15345
15346         ol_cv_winsock=no
15347 fi
15348
15349 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15350       conftest$ac_exeext conftest.$ac_ext
15351
15352         test $ol_cv_winsock != no && break;
15353 done
15354 LIBS="$save_LIBS"
15355
15356 fi
15357 { echo "$as_me:$LINENO: result: $ol_cv_winsock" >&5
15358 echo "${ECHO_T}$ol_cv_winsock" >&6; }
15359 if test $ol_cv_winsock != no ; then
15360
15361 cat >>confdefs.h <<\_ACEOF
15362 #define HAVE_WINSOCK 1
15363 _ACEOF
15364
15365     ac_cv_func_socket=yes
15366     ac_cv_func_select=yes
15367     ac_cv_func_closesocket=yes
15368     ac_cv_func_gethostname=yes
15369
15370         if test $ol_cv_winsock != none ; then
15371         LIBS="$LIBS -l$ol_cv_winsock"
15372         fi
15373
15374     if test $ol_cv_winsock = ws2_32 ; then
15375
15376 cat >>confdefs.h <<\_ACEOF
15377 #define HAVE_WINSOCK2 1
15378 _ACEOF
15379
15380     fi
15381 fi
15382
15383
15384 { echo "$as_me:$LINENO: checking for socket" >&5
15385 echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
15386 if test "${ac_cv_func_socket+set}" = set; then
15387   echo $ECHO_N "(cached) $ECHO_C" >&6
15388 else
15389   cat >conftest.$ac_ext <<_ACEOF
15390 /* confdefs.h.  */
15391 _ACEOF
15392 cat confdefs.h >>conftest.$ac_ext
15393 cat >>conftest.$ac_ext <<_ACEOF
15394 /* end confdefs.h.  */
15395 /* Define socket to an innocuous variant, in case <limits.h> declares socket.
15396    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15397 #define socket innocuous_socket
15398
15399 /* System header to define __stub macros and hopefully few prototypes,
15400     which can conflict with char socket (); below.
15401     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15402     <limits.h> exists even on freestanding compilers.  */
15403
15404 #ifdef __STDC__
15405 # include <limits.h>
15406 #else
15407 # include <assert.h>
15408 #endif
15409
15410 #undef socket
15411
15412 /* Override any GCC internal prototype to avoid an error.
15413    Use char because int might match the return type of a GCC
15414    builtin and then its argument prototype would still apply.  */
15415 #ifdef __cplusplus
15416 extern "C"
15417 #endif
15418 char socket ();
15419 /* The GNU C library defines this for functions which it implements
15420     to always fail with ENOSYS.  Some functions are actually named
15421     something starting with __ and the normal name is an alias.  */
15422 #if defined __stub_socket || defined __stub___socket
15423 choke me
15424 #endif
15425
15426 int
15427 main ()
15428 {
15429 return socket ();
15430   ;
15431   return 0;
15432 }
15433 _ACEOF
15434 rm -f conftest.$ac_objext conftest$ac_exeext
15435 if { (ac_try="$ac_link"
15436 case "(($ac_try" in
15437   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15438   *) ac_try_echo=$ac_try;;
15439 esac
15440 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15441   (eval "$ac_link") 2>conftest.er1
15442   ac_status=$?
15443   grep -v '^ *+' conftest.er1 >conftest.err
15444   rm -f conftest.er1
15445   cat conftest.err >&5
15446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15447   (exit $ac_status); } && {
15448          test -z "$ac_c_werror_flag" ||
15449          test ! -s conftest.err
15450        } && test -s conftest$ac_exeext &&
15451        $as_test_x conftest$ac_exeext; then
15452   ac_cv_func_socket=yes
15453 else
15454   echo "$as_me: failed program was:" >&5
15455 sed 's/^/| /' conftest.$ac_ext >&5
15456
15457         ac_cv_func_socket=no
15458 fi
15459
15460 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15461       conftest$ac_exeext conftest.$ac_ext
15462 fi
15463 { echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
15464 echo "${ECHO_T}$ac_cv_func_socket" >&6; }
15465 if test $ac_cv_func_socket = yes; then
15466   :
15467 else
15468
15469
15470 { echo "$as_me:$LINENO: checking for main in -lsocket" >&5
15471 echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6; }
15472 if test "${ac_cv_lib_socket_main+set}" = set; then
15473   echo $ECHO_N "(cached) $ECHO_C" >&6
15474 else
15475   ac_check_lib_save_LIBS=$LIBS
15476 LIBS="-lsocket  $LIBS"
15477 cat >conftest.$ac_ext <<_ACEOF
15478 /* confdefs.h.  */
15479 _ACEOF
15480 cat confdefs.h >>conftest.$ac_ext
15481 cat >>conftest.$ac_ext <<_ACEOF
15482 /* end confdefs.h.  */
15483
15484
15485 int
15486 main ()
15487 {
15488 return main ();
15489   ;
15490   return 0;
15491 }
15492 _ACEOF
15493 rm -f conftest.$ac_objext conftest$ac_exeext
15494 if { (ac_try="$ac_link"
15495 case "(($ac_try" in
15496   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15497   *) ac_try_echo=$ac_try;;
15498 esac
15499 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15500   (eval "$ac_link") 2>conftest.er1
15501   ac_status=$?
15502   grep -v '^ *+' conftest.er1 >conftest.err
15503   rm -f conftest.er1
15504   cat conftest.err >&5
15505   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15506   (exit $ac_status); } && {
15507          test -z "$ac_c_werror_flag" ||
15508          test ! -s conftest.err
15509        } && test -s conftest$ac_exeext &&
15510        $as_test_x conftest$ac_exeext; then
15511   ac_cv_lib_socket_main=yes
15512 else
15513   echo "$as_me: failed program was:" >&5
15514 sed 's/^/| /' conftest.$ac_ext >&5
15515
15516         ac_cv_lib_socket_main=no
15517 fi
15518
15519 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15520       conftest$ac_exeext conftest.$ac_ext
15521 LIBS=$ac_check_lib_save_LIBS
15522 fi
15523 { echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5
15524 echo "${ECHO_T}$ac_cv_lib_socket_main" >&6; }
15525 if test $ac_cv_lib_socket_main = yes; then
15526   cat >>confdefs.h <<_ACEOF
15527 #define HAVE_LIBSOCKET 1
15528 _ACEOF
15529
15530   LIBS="-lsocket $LIBS"
15531
15532 fi
15533
15534
15535 { echo "$as_me:$LINENO: checking for main in -lnet" >&5
15536 echo $ECHO_N "checking for main in -lnet... $ECHO_C" >&6; }
15537 if test "${ac_cv_lib_net_main+set}" = set; then
15538   echo $ECHO_N "(cached) $ECHO_C" >&6
15539 else
15540   ac_check_lib_save_LIBS=$LIBS
15541 LIBS="-lnet  $LIBS"
15542 cat >conftest.$ac_ext <<_ACEOF
15543 /* confdefs.h.  */
15544 _ACEOF
15545 cat confdefs.h >>conftest.$ac_ext
15546 cat >>conftest.$ac_ext <<_ACEOF
15547 /* end confdefs.h.  */
15548
15549
15550 int
15551 main ()
15552 {
15553 return main ();
15554   ;
15555   return 0;
15556 }
15557 _ACEOF
15558 rm -f conftest.$ac_objext conftest$ac_exeext
15559 if { (ac_try="$ac_link"
15560 case "(($ac_try" in
15561   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15562   *) ac_try_echo=$ac_try;;
15563 esac
15564 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15565   (eval "$ac_link") 2>conftest.er1
15566   ac_status=$?
15567   grep -v '^ *+' conftest.er1 >conftest.err
15568   rm -f conftest.er1
15569   cat conftest.err >&5
15570   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15571   (exit $ac_status); } && {
15572          test -z "$ac_c_werror_flag" ||
15573          test ! -s conftest.err
15574        } && test -s conftest$ac_exeext &&
15575        $as_test_x conftest$ac_exeext; then
15576   ac_cv_lib_net_main=yes
15577 else
15578   echo "$as_me: failed program was:" >&5
15579 sed 's/^/| /' conftest.$ac_ext >&5
15580
15581         ac_cv_lib_net_main=no
15582 fi
15583
15584 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15585       conftest$ac_exeext conftest.$ac_ext
15586 LIBS=$ac_check_lib_save_LIBS
15587 fi
15588 { echo "$as_me:$LINENO: result: $ac_cv_lib_net_main" >&5
15589 echo "${ECHO_T}$ac_cv_lib_net_main" >&6; }
15590 if test $ac_cv_lib_net_main = yes; then
15591   cat >>confdefs.h <<_ACEOF
15592 #define HAVE_LIBNET 1
15593 _ACEOF
15594
15595   LIBS="-lnet $LIBS"
15596
15597 fi
15598
15599
15600 { echo "$as_me:$LINENO: checking for main in -lnsl_s" >&5
15601 echo $ECHO_N "checking for main in -lnsl_s... $ECHO_C" >&6; }
15602 if test "${ac_cv_lib_nsl_s_main+set}" = set; then
15603   echo $ECHO_N "(cached) $ECHO_C" >&6
15604 else
15605   ac_check_lib_save_LIBS=$LIBS
15606 LIBS="-lnsl_s  $LIBS"
15607 cat >conftest.$ac_ext <<_ACEOF
15608 /* confdefs.h.  */
15609 _ACEOF
15610 cat confdefs.h >>conftest.$ac_ext
15611 cat >>conftest.$ac_ext <<_ACEOF
15612 /* end confdefs.h.  */
15613
15614
15615 int
15616 main ()
15617 {
15618 return main ();
15619   ;
15620   return 0;
15621 }
15622 _ACEOF
15623 rm -f conftest.$ac_objext conftest$ac_exeext
15624 if { (ac_try="$ac_link"
15625 case "(($ac_try" in
15626   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15627   *) ac_try_echo=$ac_try;;
15628 esac
15629 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15630   (eval "$ac_link") 2>conftest.er1
15631   ac_status=$?
15632   grep -v '^ *+' conftest.er1 >conftest.err
15633   rm -f conftest.er1
15634   cat conftest.err >&5
15635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15636   (exit $ac_status); } && {
15637          test -z "$ac_c_werror_flag" ||
15638          test ! -s conftest.err
15639        } && test -s conftest$ac_exeext &&
15640        $as_test_x conftest$ac_exeext; then
15641   ac_cv_lib_nsl_s_main=yes
15642 else
15643   echo "$as_me: failed program was:" >&5
15644 sed 's/^/| /' conftest.$ac_ext >&5
15645
15646         ac_cv_lib_nsl_s_main=no
15647 fi
15648
15649 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15650       conftest$ac_exeext conftest.$ac_ext
15651 LIBS=$ac_check_lib_save_LIBS
15652 fi
15653 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_s_main" >&5
15654 echo "${ECHO_T}$ac_cv_lib_nsl_s_main" >&6; }
15655 if test $ac_cv_lib_nsl_s_main = yes; then
15656   cat >>confdefs.h <<_ACEOF
15657 #define HAVE_LIBNSL_S 1
15658 _ACEOF
15659
15660   LIBS="-lnsl_s $LIBS"
15661
15662 fi
15663
15664
15665 { echo "$as_me:$LINENO: checking for main in -lnsl" >&5
15666 echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6; }
15667 if test "${ac_cv_lib_nsl_main+set}" = set; then
15668   echo $ECHO_N "(cached) $ECHO_C" >&6
15669 else
15670   ac_check_lib_save_LIBS=$LIBS
15671 LIBS="-lnsl  $LIBS"
15672 cat >conftest.$ac_ext <<_ACEOF
15673 /* confdefs.h.  */
15674 _ACEOF
15675 cat confdefs.h >>conftest.$ac_ext
15676 cat >>conftest.$ac_ext <<_ACEOF
15677 /* end confdefs.h.  */
15678
15679
15680 int
15681 main ()
15682 {
15683 return main ();
15684   ;
15685   return 0;
15686 }
15687 _ACEOF
15688 rm -f conftest.$ac_objext conftest$ac_exeext
15689 if { (ac_try="$ac_link"
15690 case "(($ac_try" in
15691   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15692   *) ac_try_echo=$ac_try;;
15693 esac
15694 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15695   (eval "$ac_link") 2>conftest.er1
15696   ac_status=$?
15697   grep -v '^ *+' conftest.er1 >conftest.err
15698   rm -f conftest.er1
15699   cat conftest.err >&5
15700   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15701   (exit $ac_status); } && {
15702          test -z "$ac_c_werror_flag" ||
15703          test ! -s conftest.err
15704        } && test -s conftest$ac_exeext &&
15705        $as_test_x conftest$ac_exeext; then
15706   ac_cv_lib_nsl_main=yes
15707 else
15708   echo "$as_me: failed program was:" >&5
15709 sed 's/^/| /' conftest.$ac_ext >&5
15710
15711         ac_cv_lib_nsl_main=no
15712 fi
15713
15714 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15715       conftest$ac_exeext conftest.$ac_ext
15716 LIBS=$ac_check_lib_save_LIBS
15717 fi
15718 { echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
15719 echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6; }
15720 if test $ac_cv_lib_nsl_main = yes; then
15721   cat >>confdefs.h <<_ACEOF
15722 #define HAVE_LIBNSL 1
15723 _ACEOF
15724
15725   LIBS="-lnsl $LIBS"
15726
15727 fi
15728
15729
15730 { echo "$as_me:$LINENO: checking for socket in -linet" >&5
15731 echo $ECHO_N "checking for socket in -linet... $ECHO_C" >&6; }
15732 if test "${ac_cv_lib_inet_socket+set}" = set; then
15733   echo $ECHO_N "(cached) $ECHO_C" >&6
15734 else
15735   ac_check_lib_save_LIBS=$LIBS
15736 LIBS="-linet  $LIBS"
15737 cat >conftest.$ac_ext <<_ACEOF
15738 /* confdefs.h.  */
15739 _ACEOF
15740 cat confdefs.h >>conftest.$ac_ext
15741 cat >>conftest.$ac_ext <<_ACEOF
15742 /* end confdefs.h.  */
15743
15744 /* Override any GCC internal prototype to avoid an error.
15745    Use char because int might match the return type of a GCC
15746    builtin and then its argument prototype would still apply.  */
15747 #ifdef __cplusplus
15748 extern "C"
15749 #endif
15750 char socket ();
15751 int
15752 main ()
15753 {
15754 return socket ();
15755   ;
15756   return 0;
15757 }
15758 _ACEOF
15759 rm -f conftest.$ac_objext conftest$ac_exeext
15760 if { (ac_try="$ac_link"
15761 case "(($ac_try" in
15762   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15763   *) ac_try_echo=$ac_try;;
15764 esac
15765 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15766   (eval "$ac_link") 2>conftest.er1
15767   ac_status=$?
15768   grep -v '^ *+' conftest.er1 >conftest.err
15769   rm -f conftest.er1
15770   cat conftest.err >&5
15771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15772   (exit $ac_status); } && {
15773          test -z "$ac_c_werror_flag" ||
15774          test ! -s conftest.err
15775        } && test -s conftest$ac_exeext &&
15776        $as_test_x conftest$ac_exeext; then
15777   ac_cv_lib_inet_socket=yes
15778 else
15779   echo "$as_me: failed program was:" >&5
15780 sed 's/^/| /' conftest.$ac_ext >&5
15781
15782         ac_cv_lib_inet_socket=no
15783 fi
15784
15785 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15786       conftest$ac_exeext conftest.$ac_ext
15787 LIBS=$ac_check_lib_save_LIBS
15788 fi
15789 { echo "$as_me:$LINENO: result: $ac_cv_lib_inet_socket" >&5
15790 echo "${ECHO_T}$ac_cv_lib_inet_socket" >&6; }
15791 if test $ac_cv_lib_inet_socket = yes; then
15792   cat >>confdefs.h <<_ACEOF
15793 #define HAVE_LIBINET 1
15794 _ACEOF
15795
15796   LIBS="-linet $LIBS"
15797
15798 fi
15799
15800
15801 { echo "$as_me:$LINENO: checking for main in -lgen" >&5
15802 echo $ECHO_N "checking for main in -lgen... $ECHO_C" >&6; }
15803 if test "${ac_cv_lib_gen_main+set}" = set; then
15804   echo $ECHO_N "(cached) $ECHO_C" >&6
15805 else
15806   ac_check_lib_save_LIBS=$LIBS
15807 LIBS="-lgen  $LIBS"
15808 cat >conftest.$ac_ext <<_ACEOF
15809 /* confdefs.h.  */
15810 _ACEOF
15811 cat confdefs.h >>conftest.$ac_ext
15812 cat >>conftest.$ac_ext <<_ACEOF
15813 /* end confdefs.h.  */
15814
15815
15816 int
15817 main ()
15818 {
15819 return main ();
15820   ;
15821   return 0;
15822 }
15823 _ACEOF
15824 rm -f conftest.$ac_objext conftest$ac_exeext
15825 if { (ac_try="$ac_link"
15826 case "(($ac_try" in
15827   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15828   *) ac_try_echo=$ac_try;;
15829 esac
15830 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15831   (eval "$ac_link") 2>conftest.er1
15832   ac_status=$?
15833   grep -v '^ *+' conftest.er1 >conftest.err
15834   rm -f conftest.er1
15835   cat conftest.err >&5
15836   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15837   (exit $ac_status); } && {
15838          test -z "$ac_c_werror_flag" ||
15839          test ! -s conftest.err
15840        } && test -s conftest$ac_exeext &&
15841        $as_test_x conftest$ac_exeext; then
15842   ac_cv_lib_gen_main=yes
15843 else
15844   echo "$as_me: failed program was:" >&5
15845 sed 's/^/| /' conftest.$ac_ext >&5
15846
15847         ac_cv_lib_gen_main=no
15848 fi
15849
15850 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15851       conftest$ac_exeext conftest.$ac_ext
15852 LIBS=$ac_check_lib_save_LIBS
15853 fi
15854 { echo "$as_me:$LINENO: result: $ac_cv_lib_gen_main" >&5
15855 echo "${ECHO_T}$ac_cv_lib_gen_main" >&6; }
15856 if test $ac_cv_lib_gen_main = yes; then
15857   cat >>confdefs.h <<_ACEOF
15858 #define HAVE_LIBGEN 1
15859 _ACEOF
15860
15861   LIBS="-lgen $LIBS"
15862
15863 fi
15864
15865
15866 fi
15867
15868
15869 { echo "$as_me:$LINENO: checking for select" >&5
15870 echo $ECHO_N "checking for select... $ECHO_C" >&6; }
15871 if test "${ac_cv_func_select+set}" = set; then
15872   echo $ECHO_N "(cached) $ECHO_C" >&6
15873 else
15874   cat >conftest.$ac_ext <<_ACEOF
15875 /* confdefs.h.  */
15876 _ACEOF
15877 cat confdefs.h >>conftest.$ac_ext
15878 cat >>conftest.$ac_ext <<_ACEOF
15879 /* end confdefs.h.  */
15880 /* Define select to an innocuous variant, in case <limits.h> declares select.
15881    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15882 #define select innocuous_select
15883
15884 /* System header to define __stub macros and hopefully few prototypes,
15885     which can conflict with char select (); below.
15886     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15887     <limits.h> exists even on freestanding compilers.  */
15888
15889 #ifdef __STDC__
15890 # include <limits.h>
15891 #else
15892 # include <assert.h>
15893 #endif
15894
15895 #undef select
15896
15897 /* Override any GCC internal prototype to avoid an error.
15898    Use char because int might match the return type of a GCC
15899    builtin and then its argument prototype would still apply.  */
15900 #ifdef __cplusplus
15901 extern "C"
15902 #endif
15903 char select ();
15904 /* The GNU C library defines this for functions which it implements
15905     to always fail with ENOSYS.  Some functions are actually named
15906     something starting with __ and the normal name is an alias.  */
15907 #if defined __stub_select || defined __stub___select
15908 choke me
15909 #endif
15910
15911 int
15912 main ()
15913 {
15914 return select ();
15915   ;
15916   return 0;
15917 }
15918 _ACEOF
15919 rm -f conftest.$ac_objext conftest$ac_exeext
15920 if { (ac_try="$ac_link"
15921 case "(($ac_try" in
15922   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15923   *) ac_try_echo=$ac_try;;
15924 esac
15925 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15926   (eval "$ac_link") 2>conftest.er1
15927   ac_status=$?
15928   grep -v '^ *+' conftest.er1 >conftest.err
15929   rm -f conftest.er1
15930   cat conftest.err >&5
15931   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15932   (exit $ac_status); } && {
15933          test -z "$ac_c_werror_flag" ||
15934          test ! -s conftest.err
15935        } && test -s conftest$ac_exeext &&
15936        $as_test_x conftest$ac_exeext; then
15937   ac_cv_func_select=yes
15938 else
15939   echo "$as_me: failed program was:" >&5
15940 sed 's/^/| /' conftest.$ac_ext >&5
15941
15942         ac_cv_func_select=no
15943 fi
15944
15945 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15946       conftest$ac_exeext conftest.$ac_ext
15947 fi
15948 { echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5
15949 echo "${ECHO_T}$ac_cv_func_select" >&6; }
15950 if test $ac_cv_func_select = yes; then
15951   :
15952 else
15953   { { echo "$as_me:$LINENO: error: select() required." >&5
15954 echo "$as_me: error: select() required." >&2;}
15955    { (exit 1); exit 1; }; }
15956 fi
15957
15958
15959 if test "${ac_cv_header_winsock_h}" != yes; then
15960
15961
15962 for ac_header in sys/select.h sys/socket.h
15963 do
15964 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15965 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15966   { echo "$as_me:$LINENO: checking for $ac_header" >&5
15967 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15968 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15969   echo $ECHO_N "(cached) $ECHO_C" >&6
15970 fi
15971 ac_res=`eval echo '${'$as_ac_Header'}'`
15972                { echo "$as_me:$LINENO: result: $ac_res" >&5
15973 echo "${ECHO_T}$ac_res" >&6; }
15974 else
15975   # Is the header compilable?
15976 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
15977 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
15978 cat >conftest.$ac_ext <<_ACEOF
15979 /* confdefs.h.  */
15980 _ACEOF
15981 cat confdefs.h >>conftest.$ac_ext
15982 cat >>conftest.$ac_ext <<_ACEOF
15983 /* end confdefs.h.  */
15984 $ac_includes_default
15985 #include <$ac_header>
15986 _ACEOF
15987 rm -f conftest.$ac_objext
15988 if { (ac_try="$ac_compile"
15989 case "(($ac_try" in
15990   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15991   *) ac_try_echo=$ac_try;;
15992 esac
15993 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15994   (eval "$ac_compile") 2>conftest.er1
15995   ac_status=$?
15996   grep -v '^ *+' conftest.er1 >conftest.err
15997   rm -f conftest.er1
15998   cat conftest.err >&5
15999   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16000   (exit $ac_status); } && {
16001          test -z "$ac_c_werror_flag" ||
16002          test ! -s conftest.err
16003        } && test -s conftest.$ac_objext; then
16004   ac_header_compiler=yes
16005 else
16006   echo "$as_me: failed program was:" >&5
16007 sed 's/^/| /' conftest.$ac_ext >&5
16008
16009         ac_header_compiler=no
16010 fi
16011
16012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16013 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16014 echo "${ECHO_T}$ac_header_compiler" >&6; }
16015
16016 # Is the header present?
16017 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
16018 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
16019 cat >conftest.$ac_ext <<_ACEOF
16020 /* confdefs.h.  */
16021 _ACEOF
16022 cat confdefs.h >>conftest.$ac_ext
16023 cat >>conftest.$ac_ext <<_ACEOF
16024 /* end confdefs.h.  */
16025 #include <$ac_header>
16026 _ACEOF
16027 if { (ac_try="$ac_cpp conftest.$ac_ext"
16028 case "(($ac_try" in
16029   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16030   *) ac_try_echo=$ac_try;;
16031 esac
16032 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16033   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16034   ac_status=$?
16035   grep -v '^ *+' conftest.er1 >conftest.err
16036   rm -f conftest.er1
16037   cat conftest.err >&5
16038   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16039   (exit $ac_status); } >/dev/null && {
16040          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16041          test ! -s conftest.err
16042        }; then
16043   ac_header_preproc=yes
16044 else
16045   echo "$as_me: failed program was:" >&5
16046 sed 's/^/| /' conftest.$ac_ext >&5
16047
16048   ac_header_preproc=no
16049 fi
16050
16051 rm -f conftest.err conftest.$ac_ext
16052 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16053 echo "${ECHO_T}$ac_header_preproc" >&6; }
16054
16055 # So?  What about this header?
16056 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16057   yes:no: )
16058     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16059 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16060     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16061 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16062     ac_header_preproc=yes
16063     ;;
16064   no:yes:* )
16065     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16066 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16067     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16068 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16069     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16070 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16071     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16072 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16073     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16074 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16075     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16076 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16077     ( cat <<\_ASBOX
16078 ## --------------------------------------------- ##
16079 ## Report this to <http://www.openldap.org/its/> ##
16080 ## --------------------------------------------- ##
16081 _ASBOX
16082      ) | sed "s/^/$as_me: WARNING:     /" >&2
16083     ;;
16084 esac
16085 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16086 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16087 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16088   echo $ECHO_N "(cached) $ECHO_C" >&6
16089 else
16090   eval "$as_ac_Header=\$ac_header_preproc"
16091 fi
16092 ac_res=`eval echo '${'$as_ac_Header'}'`
16093                { echo "$as_me:$LINENO: result: $ac_res" >&5
16094 echo "${ECHO_T}$ac_res" >&6; }
16095
16096 fi
16097 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16098   cat >>confdefs.h <<_ACEOF
16099 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16100 _ACEOF
16101
16102 fi
16103
16104 done
16105
16106 { echo "$as_me:$LINENO: checking types of arguments for select" >&5
16107 echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6; }
16108 if test "${ac_cv_func_select_args+set}" = set; then
16109   echo $ECHO_N "(cached) $ECHO_C" >&6
16110 else
16111   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
16112  for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
16113   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
16114    cat >conftest.$ac_ext <<_ACEOF
16115 /* confdefs.h.  */
16116 _ACEOF
16117 cat confdefs.h >>conftest.$ac_ext
16118 cat >>conftest.$ac_ext <<_ACEOF
16119 /* end confdefs.h.  */
16120 $ac_includes_default
16121 #ifdef HAVE_SYS_SELECT_H
16122 # include <sys/select.h>
16123 #endif
16124 #ifdef HAVE_SYS_SOCKET_H
16125 # include <sys/socket.h>
16126 #endif
16127
16128 int
16129 main ()
16130 {
16131 extern int select ($ac_arg1,
16132                                             $ac_arg234, $ac_arg234, $ac_arg234,
16133                                             $ac_arg5);
16134   ;
16135   return 0;
16136 }
16137 _ACEOF
16138 rm -f conftest.$ac_objext
16139 if { (ac_try="$ac_compile"
16140 case "(($ac_try" in
16141   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16142   *) ac_try_echo=$ac_try;;
16143 esac
16144 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16145   (eval "$ac_compile") 2>conftest.er1
16146   ac_status=$?
16147   grep -v '^ *+' conftest.er1 >conftest.err
16148   rm -f conftest.er1
16149   cat conftest.err >&5
16150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16151   (exit $ac_status); } && {
16152          test -z "$ac_c_werror_flag" ||
16153          test ! -s conftest.err
16154        } && test -s conftest.$ac_objext; then
16155   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
16156 else
16157   echo "$as_me: failed program was:" >&5
16158 sed 's/^/| /' conftest.$ac_ext >&5
16159
16160
16161 fi
16162
16163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16164   done
16165  done
16166 done
16167 # Provide a safe default value.
16168 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
16169
16170 fi
16171 { echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5
16172 echo "${ECHO_T}$ac_cv_func_select_args" >&6; }
16173 ac_save_IFS=$IFS; IFS=','
16174 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
16175 IFS=$ac_save_IFS
16176 shift
16177
16178 cat >>confdefs.h <<_ACEOF
16179 #define SELECT_TYPE_ARG1 $1
16180 _ACEOF
16181
16182
16183 cat >>confdefs.h <<_ACEOF
16184 #define SELECT_TYPE_ARG234 ($2)
16185 _ACEOF
16186
16187
16188 cat >>confdefs.h <<_ACEOF
16189 #define SELECT_TYPE_ARG5 ($3)
16190 _ACEOF
16191
16192 rm -f conftest*
16193
16194 fi
16195
16196
16197
16198 for ac_func in poll
16199 do
16200 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16201 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16202 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16203 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16204   echo $ECHO_N "(cached) $ECHO_C" >&6
16205 else
16206   cat >conftest.$ac_ext <<_ACEOF
16207 /* confdefs.h.  */
16208 _ACEOF
16209 cat confdefs.h >>conftest.$ac_ext
16210 cat >>conftest.$ac_ext <<_ACEOF
16211 /* end confdefs.h.  */
16212 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16213    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16214 #define $ac_func innocuous_$ac_func
16215
16216 /* System header to define __stub macros and hopefully few prototypes,
16217     which can conflict with char $ac_func (); below.
16218     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16219     <limits.h> exists even on freestanding compilers.  */
16220
16221 #ifdef __STDC__
16222 # include <limits.h>
16223 #else
16224 # include <assert.h>
16225 #endif
16226
16227 #undef $ac_func
16228
16229 /* Override any GCC internal prototype to avoid an error.
16230    Use char because int might match the return type of a GCC
16231    builtin and then its argument prototype would still apply.  */
16232 #ifdef __cplusplus
16233 extern "C"
16234 #endif
16235 char $ac_func ();
16236 /* The GNU C library defines this for functions which it implements
16237     to always fail with ENOSYS.  Some functions are actually named
16238     something starting with __ and the normal name is an alias.  */
16239 #if defined __stub_$ac_func || defined __stub___$ac_func
16240 choke me
16241 #endif
16242
16243 int
16244 main ()
16245 {
16246 return $ac_func ();
16247   ;
16248   return 0;
16249 }
16250 _ACEOF
16251 rm -f conftest.$ac_objext conftest$ac_exeext
16252 if { (ac_try="$ac_link"
16253 case "(($ac_try" in
16254   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16255   *) ac_try_echo=$ac_try;;
16256 esac
16257 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16258   (eval "$ac_link") 2>conftest.er1
16259   ac_status=$?
16260   grep -v '^ *+' conftest.er1 >conftest.err
16261   rm -f conftest.er1
16262   cat conftest.err >&5
16263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16264   (exit $ac_status); } && {
16265          test -z "$ac_c_werror_flag" ||
16266          test ! -s conftest.err
16267        } && test -s conftest$ac_exeext &&
16268        $as_test_x conftest$ac_exeext; then
16269   eval "$as_ac_var=yes"
16270 else
16271   echo "$as_me: failed program was:" >&5
16272 sed 's/^/| /' conftest.$ac_ext >&5
16273
16274         eval "$as_ac_var=no"
16275 fi
16276
16277 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16278       conftest$ac_exeext conftest.$ac_ext
16279 fi
16280 ac_res=`eval echo '${'$as_ac_var'}'`
16281                { echo "$as_me:$LINENO: result: $ac_res" >&5
16282 echo "${ECHO_T}$ac_res" >&6; }
16283 if test `eval echo '${'$as_ac_var'}'` = yes; then
16284   cat >>confdefs.h <<_ACEOF
16285 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16286 _ACEOF
16287
16288 fi
16289 done
16290
16291 if test $ac_cv_func_poll = yes; then
16292
16293
16294 for ac_header in poll.h sys/poll.h
16295 do
16296 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16297 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16298   { echo "$as_me:$LINENO: checking for $ac_header" >&5
16299 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16300 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16301   echo $ECHO_N "(cached) $ECHO_C" >&6
16302 fi
16303 ac_res=`eval echo '${'$as_ac_Header'}'`
16304                { echo "$as_me:$LINENO: result: $ac_res" >&5
16305 echo "${ECHO_T}$ac_res" >&6; }
16306 else
16307   # Is the header compilable?
16308 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
16309 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
16310 cat >conftest.$ac_ext <<_ACEOF
16311 /* confdefs.h.  */
16312 _ACEOF
16313 cat confdefs.h >>conftest.$ac_ext
16314 cat >>conftest.$ac_ext <<_ACEOF
16315 /* end confdefs.h.  */
16316 $ac_includes_default
16317 #include <$ac_header>
16318 _ACEOF
16319 rm -f conftest.$ac_objext
16320 if { (ac_try="$ac_compile"
16321 case "(($ac_try" in
16322   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16323   *) ac_try_echo=$ac_try;;
16324 esac
16325 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16326   (eval "$ac_compile") 2>conftest.er1
16327   ac_status=$?
16328   grep -v '^ *+' conftest.er1 >conftest.err
16329   rm -f conftest.er1
16330   cat conftest.err >&5
16331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16332   (exit $ac_status); } && {
16333          test -z "$ac_c_werror_flag" ||
16334          test ! -s conftest.err
16335        } && test -s conftest.$ac_objext; then
16336   ac_header_compiler=yes
16337 else
16338   echo "$as_me: failed program was:" >&5
16339 sed 's/^/| /' conftest.$ac_ext >&5
16340
16341         ac_header_compiler=no
16342 fi
16343
16344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16345 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16346 echo "${ECHO_T}$ac_header_compiler" >&6; }
16347
16348 # Is the header present?
16349 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
16350 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
16351 cat >conftest.$ac_ext <<_ACEOF
16352 /* confdefs.h.  */
16353 _ACEOF
16354 cat confdefs.h >>conftest.$ac_ext
16355 cat >>conftest.$ac_ext <<_ACEOF
16356 /* end confdefs.h.  */
16357 #include <$ac_header>
16358 _ACEOF
16359 if { (ac_try="$ac_cpp conftest.$ac_ext"
16360 case "(($ac_try" in
16361   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16362   *) ac_try_echo=$ac_try;;
16363 esac
16364 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16365   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16366   ac_status=$?
16367   grep -v '^ *+' conftest.er1 >conftest.err
16368   rm -f conftest.er1
16369   cat conftest.err >&5
16370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16371   (exit $ac_status); } >/dev/null && {
16372          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16373          test ! -s conftest.err
16374        }; then
16375   ac_header_preproc=yes
16376 else
16377   echo "$as_me: failed program was:" >&5
16378 sed 's/^/| /' conftest.$ac_ext >&5
16379
16380   ac_header_preproc=no
16381 fi
16382
16383 rm -f conftest.err conftest.$ac_ext
16384 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16385 echo "${ECHO_T}$ac_header_preproc" >&6; }
16386
16387 # So?  What about this header?
16388 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16389   yes:no: )
16390     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16391 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16392     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16393 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16394     ac_header_preproc=yes
16395     ;;
16396   no:yes:* )
16397     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16398 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16399     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16400 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16401     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16402 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16403     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16404 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16405     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16406 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16407     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16408 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16409     ( cat <<\_ASBOX
16410 ## --------------------------------------------- ##
16411 ## Report this to <http://www.openldap.org/its/> ##
16412 ## --------------------------------------------- ##
16413 _ASBOX
16414      ) | sed "s/^/$as_me: WARNING:     /" >&2
16415     ;;
16416 esac
16417 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16418 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16419 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16420   echo $ECHO_N "(cached) $ECHO_C" >&6
16421 else
16422   eval "$as_ac_Header=\$ac_header_preproc"
16423 fi
16424 ac_res=`eval echo '${'$as_ac_Header'}'`
16425                { echo "$as_me:$LINENO: result: $ac_res" >&5
16426 echo "${ECHO_T}$ac_res" >&6; }
16427
16428 fi
16429 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16430   cat >>confdefs.h <<_ACEOF
16431 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16432 _ACEOF
16433
16434 fi
16435
16436 done
16437
16438 fi
16439
16440
16441 for ac_header in sys/epoll.h
16442 do
16443 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16444 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16445   { echo "$as_me:$LINENO: checking for $ac_header" >&5
16446 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16447 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16448   echo $ECHO_N "(cached) $ECHO_C" >&6
16449 fi
16450 ac_res=`eval echo '${'$as_ac_Header'}'`
16451                { echo "$as_me:$LINENO: result: $ac_res" >&5
16452 echo "${ECHO_T}$ac_res" >&6; }
16453 else
16454   # Is the header compilable?
16455 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
16456 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
16457 cat >conftest.$ac_ext <<_ACEOF
16458 /* confdefs.h.  */
16459 _ACEOF
16460 cat confdefs.h >>conftest.$ac_ext
16461 cat >>conftest.$ac_ext <<_ACEOF
16462 /* end confdefs.h.  */
16463 $ac_includes_default
16464 #include <$ac_header>
16465 _ACEOF
16466 rm -f conftest.$ac_objext
16467 if { (ac_try="$ac_compile"
16468 case "(($ac_try" in
16469   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16470   *) ac_try_echo=$ac_try;;
16471 esac
16472 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16473   (eval "$ac_compile") 2>conftest.er1
16474   ac_status=$?
16475   grep -v '^ *+' conftest.er1 >conftest.err
16476   rm -f conftest.er1
16477   cat conftest.err >&5
16478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16479   (exit $ac_status); } && {
16480          test -z "$ac_c_werror_flag" ||
16481          test ! -s conftest.err
16482        } && test -s conftest.$ac_objext; then
16483   ac_header_compiler=yes
16484 else
16485   echo "$as_me: failed program was:" >&5
16486 sed 's/^/| /' conftest.$ac_ext >&5
16487
16488         ac_header_compiler=no
16489 fi
16490
16491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16492 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16493 echo "${ECHO_T}$ac_header_compiler" >&6; }
16494
16495 # Is the header present?
16496 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
16497 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
16498 cat >conftest.$ac_ext <<_ACEOF
16499 /* confdefs.h.  */
16500 _ACEOF
16501 cat confdefs.h >>conftest.$ac_ext
16502 cat >>conftest.$ac_ext <<_ACEOF
16503 /* end confdefs.h.  */
16504 #include <$ac_header>
16505 _ACEOF
16506 if { (ac_try="$ac_cpp conftest.$ac_ext"
16507 case "(($ac_try" in
16508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16509   *) ac_try_echo=$ac_try;;
16510 esac
16511 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16512   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16513   ac_status=$?
16514   grep -v '^ *+' conftest.er1 >conftest.err
16515   rm -f conftest.er1
16516   cat conftest.err >&5
16517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16518   (exit $ac_status); } >/dev/null && {
16519          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16520          test ! -s conftest.err
16521        }; then
16522   ac_header_preproc=yes
16523 else
16524   echo "$as_me: failed program was:" >&5
16525 sed 's/^/| /' conftest.$ac_ext >&5
16526
16527   ac_header_preproc=no
16528 fi
16529
16530 rm -f conftest.err conftest.$ac_ext
16531 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16532 echo "${ECHO_T}$ac_header_preproc" >&6; }
16533
16534 # So?  What about this header?
16535 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16536   yes:no: )
16537     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16538 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16539     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16540 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16541     ac_header_preproc=yes
16542     ;;
16543   no:yes:* )
16544     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16545 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16546     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16547 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16548     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16549 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16550     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16551 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16552     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16553 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16554     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16555 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16556     ( cat <<\_ASBOX
16557 ## --------------------------------------------- ##
16558 ## Report this to <http://www.openldap.org/its/> ##
16559 ## --------------------------------------------- ##
16560 _ASBOX
16561      ) | sed "s/^/$as_me: WARNING:     /" >&2
16562     ;;
16563 esac
16564 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16565 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16566 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16567   echo $ECHO_N "(cached) $ECHO_C" >&6
16568 else
16569   eval "$as_ac_Header=\$ac_header_preproc"
16570 fi
16571 ac_res=`eval echo '${'$as_ac_Header'}'`
16572                { echo "$as_me:$LINENO: result: $ac_res" >&5
16573 echo "${ECHO_T}$ac_res" >&6; }
16574
16575 fi
16576 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16577   cat >>confdefs.h <<_ACEOF
16578 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16579 _ACEOF
16580
16581 fi
16582
16583 done
16584
16585 if test "${ac_cv_header_sys_epoll_h}" = yes; then
16586         { echo "$as_me:$LINENO: checking for epoll system call" >&5
16587 echo $ECHO_N "checking for epoll system call... $ECHO_C" >&6; }
16588         if test "$cross_compiling" = yes; then
16589   { echo "$as_me:$LINENO: result: no" >&5
16590 echo "${ECHO_T}no" >&6; }
16591 else
16592   cat >conftest.$ac_ext <<_ACEOF
16593 /* confdefs.h.  */
16594 _ACEOF
16595 cat confdefs.h >>conftest.$ac_ext
16596 cat >>conftest.$ac_ext <<_ACEOF
16597 /* end confdefs.h.  */
16598 int main(int argc, char **argv)
16599 {
16600         int epfd = epoll_create(256);
16601         exit (epfd == -1 ? 1 : 0);
16602 }
16603 _ACEOF
16604 rm -f conftest$ac_exeext
16605 if { (ac_try="$ac_link"
16606 case "(($ac_try" in
16607   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16608   *) ac_try_echo=$ac_try;;
16609 esac
16610 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16611   (eval "$ac_link") 2>&5
16612   ac_status=$?
16613   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16614   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16615   { (case "(($ac_try" in
16616   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16617   *) ac_try_echo=$ac_try;;
16618 esac
16619 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16620   (eval "$ac_try") 2>&5
16621   ac_status=$?
16622   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16623   (exit $ac_status); }; }; then
16624   { echo "$as_me:$LINENO: result: yes" >&5
16625 echo "${ECHO_T}yes" >&6; }
16626
16627 cat >>confdefs.h <<\_ACEOF
16628 #define HAVE_EPOLL 1
16629 _ACEOF
16630
16631 else
16632   echo "$as_me: program exited with status $ac_status" >&5
16633 echo "$as_me: failed program was:" >&5
16634 sed 's/^/| /' conftest.$ac_ext >&5
16635
16636 ( exit $ac_status )
16637 { echo "$as_me:$LINENO: result: no" >&5
16638 echo "${ECHO_T}no" >&6; }
16639 fi
16640 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16641 fi
16642
16643
16644 fi
16645
16646
16647 for ac_header in sys/devpoll.h
16648 do
16649 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16650 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16651   { echo "$as_me:$LINENO: checking for $ac_header" >&5
16652 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16653 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16654   echo $ECHO_N "(cached) $ECHO_C" >&6
16655 fi
16656 ac_res=`eval echo '${'$as_ac_Header'}'`
16657                { echo "$as_me:$LINENO: result: $ac_res" >&5
16658 echo "${ECHO_T}$ac_res" >&6; }
16659 else
16660   # Is the header compilable?
16661 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
16662 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
16663 cat >conftest.$ac_ext <<_ACEOF
16664 /* confdefs.h.  */
16665 _ACEOF
16666 cat confdefs.h >>conftest.$ac_ext
16667 cat >>conftest.$ac_ext <<_ACEOF
16668 /* end confdefs.h.  */
16669 $ac_includes_default
16670 #include <$ac_header>
16671 _ACEOF
16672 rm -f conftest.$ac_objext
16673 if { (ac_try="$ac_compile"
16674 case "(($ac_try" in
16675   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16676   *) ac_try_echo=$ac_try;;
16677 esac
16678 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16679   (eval "$ac_compile") 2>conftest.er1
16680   ac_status=$?
16681   grep -v '^ *+' conftest.er1 >conftest.err
16682   rm -f conftest.er1
16683   cat conftest.err >&5
16684   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16685   (exit $ac_status); } && {
16686          test -z "$ac_c_werror_flag" ||
16687          test ! -s conftest.err
16688        } && test -s conftest.$ac_objext; then
16689   ac_header_compiler=yes
16690 else
16691   echo "$as_me: failed program was:" >&5
16692 sed 's/^/| /' conftest.$ac_ext >&5
16693
16694         ac_header_compiler=no
16695 fi
16696
16697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16698 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16699 echo "${ECHO_T}$ac_header_compiler" >&6; }
16700
16701 # Is the header present?
16702 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
16703 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
16704 cat >conftest.$ac_ext <<_ACEOF
16705 /* confdefs.h.  */
16706 _ACEOF
16707 cat confdefs.h >>conftest.$ac_ext
16708 cat >>conftest.$ac_ext <<_ACEOF
16709 /* end confdefs.h.  */
16710 #include <$ac_header>
16711 _ACEOF
16712 if { (ac_try="$ac_cpp conftest.$ac_ext"
16713 case "(($ac_try" in
16714   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16715   *) ac_try_echo=$ac_try;;
16716 esac
16717 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16718   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
16719   ac_status=$?
16720   grep -v '^ *+' conftest.er1 >conftest.err
16721   rm -f conftest.er1
16722   cat conftest.err >&5
16723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16724   (exit $ac_status); } >/dev/null && {
16725          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16726          test ! -s conftest.err
16727        }; then
16728   ac_header_preproc=yes
16729 else
16730   echo "$as_me: failed program was:" >&5
16731 sed 's/^/| /' conftest.$ac_ext >&5
16732
16733   ac_header_preproc=no
16734 fi
16735
16736 rm -f conftest.err conftest.$ac_ext
16737 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16738 echo "${ECHO_T}$ac_header_preproc" >&6; }
16739
16740 # So?  What about this header?
16741 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16742   yes:no: )
16743     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16744 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
16745     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16746 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16747     ac_header_preproc=yes
16748     ;;
16749   no:yes:* )
16750     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16751 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
16752     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
16753 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
16754     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16755 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16756     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
16757 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
16758     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
16759 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
16760     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16761 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
16762     ( cat <<\_ASBOX
16763 ## --------------------------------------------- ##
16764 ## Report this to <http://www.openldap.org/its/> ##
16765 ## --------------------------------------------- ##
16766 _ASBOX
16767      ) | sed "s/^/$as_me: WARNING:     /" >&2
16768     ;;
16769 esac
16770 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16771 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16772 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16773   echo $ECHO_N "(cached) $ECHO_C" >&6
16774 else
16775   eval "$as_ac_Header=\$ac_header_preproc"
16776 fi
16777 ac_res=`eval echo '${'$as_ac_Header'}'`
16778                { echo "$as_me:$LINENO: result: $ac_res" >&5
16779 echo "${ECHO_T}$ac_res" >&6; }
16780
16781 fi
16782 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16783   cat >>confdefs.h <<_ACEOF
16784 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16785 _ACEOF
16786
16787 fi
16788
16789 done
16790
16791 if test "${ac_cv_header_sys_devpoll_h}" = yes \
16792                 -a "${ac_cv_header_poll_h}" = yes ; \
16793 then
16794         { echo "$as_me:$LINENO: checking for /dev/poll" >&5
16795 echo $ECHO_N "checking for /dev/poll... $ECHO_C" >&6; }
16796         if test "$cross_compiling" = yes; then
16797   { echo "$as_me:$LINENO: result: no" >&5
16798 echo "${ECHO_T}no" >&6; }
16799 else
16800   cat >conftest.$ac_ext <<_ACEOF
16801 /* confdefs.h.  */
16802 _ACEOF
16803 cat confdefs.h >>conftest.$ac_ext
16804 cat >>conftest.$ac_ext <<_ACEOF
16805 /* end confdefs.h.  */
16806 int main(int argc, char **argv)
16807 {
16808         int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
16809         exit (devpollfd == -1 ? 1 : 0);
16810 }
16811 _ACEOF
16812 rm -f conftest$ac_exeext
16813 if { (ac_try="$ac_link"
16814 case "(($ac_try" in
16815   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16816   *) ac_try_echo=$ac_try;;
16817 esac
16818 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16819   (eval "$ac_link") 2>&5
16820   ac_status=$?
16821   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16822   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16823   { (case "(($ac_try" in
16824   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16825   *) ac_try_echo=$ac_try;;
16826 esac
16827 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16828   (eval "$ac_try") 2>&5
16829   ac_status=$?
16830   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16831   (exit $ac_status); }; }; then
16832   { echo "$as_me:$LINENO: result: yes" >&5
16833 echo "${ECHO_T}yes" >&6; }
16834
16835 cat >>confdefs.h <<\_ACEOF
16836 #define HAVE_DEVPOLL 1
16837 _ACEOF
16838
16839 else
16840   echo "$as_me: program exited with status $ac_status" >&5
16841 echo "$as_me: failed program was:" >&5
16842 sed 's/^/| /' conftest.$ac_ext >&5
16843
16844 ( exit $ac_status )
16845 { echo "$as_me:$LINENO: result: no" >&5
16846 echo "${ECHO_T}no" >&6; }
16847 fi
16848 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16849 fi
16850
16851
16852 fi
16853
16854 # strerror checks
16855 { echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
16856 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6; }
16857 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
16858   echo $ECHO_N "(cached) $ECHO_C" >&6
16859 else
16860
16861         cat >conftest.$ac_ext <<_ACEOF
16862 /* confdefs.h.  */
16863 _ACEOF
16864 cat confdefs.h >>conftest.$ac_ext
16865 cat >>conftest.$ac_ext <<_ACEOF
16866 /* end confdefs.h.  */
16867
16868 #include <stdio.h>
16869 #include <sys/types.h>
16870 #include <errno.h>
16871 #ifdef _WIN32
16872 #include <stdlib.h>
16873 #endif
16874 int
16875 main ()
16876 {
16877 char *c = (char *) *sys_errlist
16878   ;
16879   return 0;
16880 }
16881 _ACEOF
16882 rm -f conftest.$ac_objext
16883 if { (ac_try="$ac_compile"
16884 case "(($ac_try" in
16885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16886   *) ac_try_echo=$ac_try;;
16887 esac
16888 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16889   (eval "$ac_compile") 2>conftest.er1
16890   ac_status=$?
16891   grep -v '^ *+' conftest.er1 >conftest.err
16892   rm -f conftest.er1
16893   cat conftest.err >&5
16894   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16895   (exit $ac_status); } && {
16896          test -z "$ac_c_werror_flag" ||
16897          test ! -s conftest.err
16898        } && test -s conftest.$ac_objext; then
16899   ol_cv_dcl_sys_errlist=yes
16900         ol_cv_have_sys_errlist=yes
16901 else
16902   echo "$as_me: failed program was:" >&5
16903 sed 's/^/| /' conftest.$ac_ext >&5
16904
16905         ol_cv_dcl_sys_errlist=no
16906 fi
16907
16908 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16909 fi
16910 { echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
16911 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6; }
16912 #
16913 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
16914 if test $ol_cv_dcl_sys_errlist = no ; then
16915
16916 cat >>confdefs.h <<\_ACEOF
16917 #define DECL_SYS_ERRLIST 1
16918 _ACEOF
16919
16920
16921         { echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
16922 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6; }
16923 if test "${ol_cv_have_sys_errlist+set}" = set; then
16924   echo $ECHO_N "(cached) $ECHO_C" >&6
16925 else
16926
16927                 cat >conftest.$ac_ext <<_ACEOF
16928 /* confdefs.h.  */
16929 _ACEOF
16930 cat confdefs.h >>conftest.$ac_ext
16931 cat >>conftest.$ac_ext <<_ACEOF
16932 /* end confdefs.h.  */
16933 #include <errno.h>
16934 int
16935 main ()
16936 {
16937 char *c = (char *) *sys_errlist
16938   ;
16939   return 0;
16940 }
16941 _ACEOF
16942 rm -f conftest.$ac_objext conftest$ac_exeext
16943 if { (ac_try="$ac_link"
16944 case "(($ac_try" in
16945   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16946   *) ac_try_echo=$ac_try;;
16947 esac
16948 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16949   (eval "$ac_link") 2>conftest.er1
16950   ac_status=$?
16951   grep -v '^ *+' conftest.er1 >conftest.err
16952   rm -f conftest.er1
16953   cat conftest.err >&5
16954   echo "$as_me:$LINENO: \$? = $ac_status" >&5
16955   (exit $ac_status); } && {
16956          test -z "$ac_c_werror_flag" ||
16957          test ! -s conftest.err
16958        } && test -s conftest$ac_exeext &&
16959        $as_test_x conftest$ac_exeext; then
16960   ol_cv_have_sys_errlist=yes
16961 else
16962   echo "$as_me: failed program was:" >&5
16963 sed 's/^/| /' conftest.$ac_ext >&5
16964
16965         ol_cv_have_sys_errlist=no
16966 fi
16967
16968 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16969       conftest$ac_exeext conftest.$ac_ext
16970 fi
16971 { echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
16972 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6; }
16973 fi
16974 if test $ol_cv_have_sys_errlist = yes ; then
16975
16976 cat >>confdefs.h <<\_ACEOF
16977 #define HAVE_SYS_ERRLIST 1
16978 _ACEOF
16979
16980 fi
16981
16982
16983 for ac_func in strerror strerror_r
16984 do
16985 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16986 { echo "$as_me:$LINENO: checking for $ac_func" >&5
16987 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16988 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16989   echo $ECHO_N "(cached) $ECHO_C" >&6
16990 else
16991   cat >conftest.$ac_ext <<_ACEOF
16992 /* confdefs.h.  */
16993 _ACEOF
16994 cat confdefs.h >>conftest.$ac_ext
16995 cat >>conftest.$ac_ext <<_ACEOF
16996 /* end confdefs.h.  */
16997 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16998    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
16999 #define $ac_func innocuous_$ac_func
17000
17001 /* System header to define __stub macros and hopefully few prototypes,
17002     which can conflict with char $ac_func (); below.
17003     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17004     <limits.h> exists even on freestanding compilers.  */
17005
17006 #ifdef __STDC__
17007 # include <limits.h>
17008 #else
17009 # include <assert.h>
17010 #endif
17011
17012 #undef $ac_func
17013
17014 /* Override any GCC internal prototype to avoid an error.
17015    Use char because int might match the return type of a GCC
17016    builtin and then its argument prototype would still apply.  */
17017 #ifdef __cplusplus
17018 extern "C"
17019 #endif
17020 char $ac_func ();
17021 /* The GNU C library defines this for functions which it implements
17022     to always fail with ENOSYS.  Some functions are actually named
17023     something starting with __ and the normal name is an alias.  */
17024 #if defined __stub_$ac_func || defined __stub___$ac_func
17025 choke me
17026 #endif
17027
17028 int
17029 main ()
17030 {
17031 return $ac_func ();
17032   ;
17033   return 0;
17034 }
17035 _ACEOF
17036 rm -f conftest.$ac_objext conftest$ac_exeext
17037 if { (ac_try="$ac_link"
17038 case "(($ac_try" in
17039   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17040   *) ac_try_echo=$ac_try;;
17041 esac
17042 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17043   (eval "$ac_link") 2>conftest.er1
17044   ac_status=$?
17045   grep -v '^ *+' conftest.er1 >conftest.err
17046   rm -f conftest.er1
17047   cat conftest.err >&5
17048   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17049   (exit $ac_status); } && {
17050          test -z "$ac_c_werror_flag" ||
17051          test ! -s conftest.err
17052        } && test -s conftest$ac_exeext &&
17053        $as_test_x conftest$ac_exeext; then
17054   eval "$as_ac_var=yes"
17055 else
17056   echo "$as_me: failed program was:" >&5
17057 sed 's/^/| /' conftest.$ac_ext >&5
17058
17059         eval "$as_ac_var=no"
17060 fi
17061
17062 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17063       conftest$ac_exeext conftest.$ac_ext
17064 fi
17065 ac_res=`eval echo '${'$as_ac_var'}'`
17066                { echo "$as_me:$LINENO: result: $ac_res" >&5
17067 echo "${ECHO_T}$ac_res" >&6; }
17068 if test `eval echo '${'$as_ac_var'}'` = yes; then
17069   cat >>confdefs.h <<_ACEOF
17070 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17071 _ACEOF
17072
17073 fi
17074 done
17075
17076 ol_cv_func_strerror_r=no
17077 if test "${ac_cv_func_strerror_r}" = yes ; then
17078         { echo "$as_me:$LINENO: checking non-posix strerror_r" >&5
17079 echo $ECHO_N "checking non-posix strerror_r... $ECHO_C" >&6; }
17080 if test "${ol_cv_nonposix_strerror_r+set}" = set; then
17081   echo $ECHO_N "(cached) $ECHO_C" >&6
17082 else
17083
17084         cat >conftest.$ac_ext <<_ACEOF
17085 /* confdefs.h.  */
17086 _ACEOF
17087 cat confdefs.h >>conftest.$ac_ext
17088 cat >>conftest.$ac_ext <<_ACEOF
17089 /* end confdefs.h.  */
17090 #include <string.h>
17091 _ACEOF
17092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17093   $EGREP "strerror_r" >/dev/null 2>&1; then
17094   ol_decl_strerror_r=yes
17095 else
17096   ol_decl_strerror_r=no
17097 fi
17098 rm -f conftest*
17099
17100         if test $ol_decl_strerror_r = yes ; then
17101                 cat >conftest.$ac_ext <<_ACEOF
17102 /* confdefs.h.  */
17103 _ACEOF
17104 cat confdefs.h >>conftest.$ac_ext
17105 cat >>conftest.$ac_ext <<_ACEOF
17106 /* end confdefs.h.  */
17107 #include <string.h>
17108 int
17109 main ()
17110 {
17111    /* from autoconf 2.59 */
17112                                 char buf[100];
17113                                 char x = *strerror_r (0, buf, sizeof buf);
17114                                 char *p = strerror_r (0, buf, sizeof buf);
17115
17116   ;
17117   return 0;
17118 }
17119 _ACEOF
17120 rm -f conftest.$ac_objext
17121 if { (ac_try="$ac_compile"
17122 case "(($ac_try" in
17123   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17124   *) ac_try_echo=$ac_try;;
17125 esac
17126 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17127   (eval "$ac_compile") 2>conftest.er1
17128   ac_status=$?
17129   grep -v '^ *+' conftest.er1 >conftest.err
17130   rm -f conftest.er1
17131   cat conftest.err >&5
17132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17133   (exit $ac_status); } && {
17134          test -z "$ac_c_werror_flag" ||
17135          test ! -s conftest.err
17136        } && test -s conftest.$ac_objext; then
17137   ol_cv_nonposix_strerror_r=yes
17138 else
17139   echo "$as_me: failed program was:" >&5
17140 sed 's/^/| /' conftest.$ac_ext >&5
17141
17142         ol_cv_nonposix_strerror_r=no
17143 fi
17144
17145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17146         else
17147                 if test "$cross_compiling" = yes; then
17148   ol_cv_nonposix_strerror=no
17149 else
17150   cat >conftest.$ac_ext <<_ACEOF
17151 /* confdefs.h.  */
17152 _ACEOF
17153 cat confdefs.h >>conftest.$ac_ext
17154 cat >>conftest.$ac_ext <<_ACEOF
17155 /* end confdefs.h.  */
17156
17157                         main() {
17158                                 char buf[100];
17159                                 buf[0] = 0;
17160                                 strerror_r( 1, buf, sizeof buf );
17161                                 exit( buf[0] == 0 );
17162                         }
17163
17164 _ACEOF
17165 rm -f conftest$ac_exeext
17166 if { (ac_try="$ac_link"
17167 case "(($ac_try" in
17168   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17169   *) ac_try_echo=$ac_try;;
17170 esac
17171 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17172   (eval "$ac_link") 2>&5
17173   ac_status=$?
17174   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17175   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17176   { (case "(($ac_try" in
17177   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17178   *) ac_try_echo=$ac_try;;
17179 esac
17180 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17181   (eval "$ac_try") 2>&5
17182   ac_status=$?
17183   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17184   (exit $ac_status); }; }; then
17185   ol_cv_nonposix_strerror_r=yes
17186 else
17187   echo "$as_me: program exited with status $ac_status" >&5
17188 echo "$as_me: failed program was:" >&5
17189 sed 's/^/| /' conftest.$ac_ext >&5
17190
17191 ( exit $ac_status )
17192 ol_cv_nonposix_strerror=no
17193 fi
17194 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17195 fi
17196
17197
17198         fi
17199
17200 fi
17201 { echo "$as_me:$LINENO: result: $ol_cv_nonposix_strerror_r" >&5
17202 echo "${ECHO_T}$ol_cv_nonposix_strerror_r" >&6; }
17203 if test $ol_cv_nonposix_strerror_r = yes ; then
17204
17205 cat >>confdefs.h <<\_ACEOF
17206 #define HAVE_NONPOSIX_STRERROR_R 1
17207 _ACEOF
17208
17209 fi
17210
17211 elif test "${ac_cv_func_strerror}" = no ; then
17212         { echo "$as_me:$LINENO: checking declaration of sys_errlist" >&5
17213 echo $ECHO_N "checking declaration of sys_errlist... $ECHO_C" >&6; }
17214 if test "${ol_cv_dcl_sys_errlist+set}" = set; then
17215   echo $ECHO_N "(cached) $ECHO_C" >&6
17216 else
17217
17218         cat >conftest.$ac_ext <<_ACEOF
17219 /* confdefs.h.  */
17220 _ACEOF
17221 cat confdefs.h >>conftest.$ac_ext
17222 cat >>conftest.$ac_ext <<_ACEOF
17223 /* end confdefs.h.  */
17224
17225 #include <stdio.h>
17226 #include <sys/types.h>
17227 #include <errno.h>
17228 #ifdef _WIN32
17229 #include <stdlib.h>
17230 #endif
17231 int
17232 main ()
17233 {
17234 char *c = (char *) *sys_errlist
17235   ;
17236   return 0;
17237 }
17238 _ACEOF
17239 rm -f conftest.$ac_objext
17240 if { (ac_try="$ac_compile"
17241 case "(($ac_try" in
17242   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17243   *) ac_try_echo=$ac_try;;
17244 esac
17245 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17246   (eval "$ac_compile") 2>conftest.er1
17247   ac_status=$?
17248   grep -v '^ *+' conftest.er1 >conftest.err
17249   rm -f conftest.er1
17250   cat conftest.err >&5
17251   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17252   (exit $ac_status); } && {
17253          test -z "$ac_c_werror_flag" ||
17254          test ! -s conftest.err
17255        } && test -s conftest.$ac_objext; then
17256   ol_cv_dcl_sys_errlist=yes
17257         ol_cv_have_sys_errlist=yes
17258 else
17259   echo "$as_me: failed program was:" >&5
17260 sed 's/^/| /' conftest.$ac_ext >&5
17261
17262         ol_cv_dcl_sys_errlist=no
17263 fi
17264
17265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17266 fi
17267 { echo "$as_me:$LINENO: result: $ol_cv_dcl_sys_errlist" >&5
17268 echo "${ECHO_T}$ol_cv_dcl_sys_errlist" >&6; }
17269 #
17270 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
17271 if test $ol_cv_dcl_sys_errlist = no ; then
17272
17273 cat >>confdefs.h <<\_ACEOF
17274 #define DECL_SYS_ERRLIST 1
17275 _ACEOF
17276
17277
17278         { echo "$as_me:$LINENO: checking existence of sys_errlist" >&5
17279 echo $ECHO_N "checking existence of sys_errlist... $ECHO_C" >&6; }
17280 if test "${ol_cv_have_sys_errlist+set}" = set; then
17281   echo $ECHO_N "(cached) $ECHO_C" >&6
17282 else
17283
17284                 cat >conftest.$ac_ext <<_ACEOF
17285 /* confdefs.h.  */
17286 _ACEOF
17287 cat confdefs.h >>conftest.$ac_ext
17288 cat >>conftest.$ac_ext <<_ACEOF
17289 /* end confdefs.h.  */
17290 #include <errno.h>
17291 int
17292 main ()
17293 {
17294 char *c = (char *) *sys_errlist
17295   ;
17296   return 0;
17297 }
17298 _ACEOF
17299 rm -f conftest.$ac_objext conftest$ac_exeext
17300 if { (ac_try="$ac_link"
17301 case "(($ac_try" in
17302   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17303   *) ac_try_echo=$ac_try;;
17304 esac
17305 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17306   (eval "$ac_link") 2>conftest.er1
17307   ac_status=$?
17308   grep -v '^ *+' conftest.er1 >conftest.err
17309   rm -f conftest.er1
17310   cat conftest.err >&5
17311   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17312   (exit $ac_status); } && {
17313          test -z "$ac_c_werror_flag" ||
17314          test ! -s conftest.err
17315        } && test -s conftest$ac_exeext &&
17316        $as_test_x conftest$ac_exeext; then
17317   ol_cv_have_sys_errlist=yes
17318 else
17319   echo "$as_me: failed program was:" >&5
17320 sed 's/^/| /' conftest.$ac_ext >&5
17321
17322         ol_cv_have_sys_errlist=no
17323 fi
17324
17325 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17326       conftest$ac_exeext conftest.$ac_ext
17327 fi
17328 { echo "$as_me:$LINENO: result: $ol_cv_have_sys_errlist" >&5
17329 echo "${ECHO_T}$ol_cv_have_sys_errlist" >&6; }
17330 fi
17331 if test $ol_cv_have_sys_errlist = yes ; then
17332
17333 cat >>confdefs.h <<\_ACEOF
17334 #define HAVE_SYS_ERRLIST 1
17335 _ACEOF
17336
17337 fi
17338
17339 fi
17340
17341
17342
17343 for ac_header in regex.h
17344 do
17345 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17346 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17347 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17348 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17349   echo $ECHO_N "(cached) $ECHO_C" >&6
17350 else
17351   cat >conftest.$ac_ext <<_ACEOF
17352 /* confdefs.h.  */
17353 _ACEOF
17354 cat confdefs.h >>conftest.$ac_ext
17355 cat >>conftest.$ac_ext <<_ACEOF
17356 /* end confdefs.h.  */
17357 $ac_includes_default
17358 #ifdef HAVE_SYS_TYPES_H
17359 #include <sys/types.h>
17360 #endif
17361
17362
17363 #include <$ac_header>
17364 _ACEOF
17365 rm -f conftest.$ac_objext
17366 if { (ac_try="$ac_compile"
17367 case "(($ac_try" in
17368   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17369   *) ac_try_echo=$ac_try;;
17370 esac
17371 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17372   (eval "$ac_compile") 2>conftest.er1
17373   ac_status=$?
17374   grep -v '^ *+' conftest.er1 >conftest.err
17375   rm -f conftest.er1
17376   cat conftest.err >&5
17377   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17378   (exit $ac_status); } && {
17379          test -z "$ac_c_werror_flag" ||
17380          test ! -s conftest.err
17381        } && test -s conftest.$ac_objext; then
17382   eval "$as_ac_Header=yes"
17383 else
17384   echo "$as_me: failed program was:" >&5
17385 sed 's/^/| /' conftest.$ac_ext >&5
17386
17387         eval "$as_ac_Header=no"
17388 fi
17389
17390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17391 fi
17392 ac_res=`eval echo '${'$as_ac_Header'}'`
17393                { echo "$as_me:$LINENO: result: $ac_res" >&5
17394 echo "${ECHO_T}$ac_res" >&6; }
17395 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17396   cat >>confdefs.h <<_ACEOF
17397 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17398 _ACEOF
17399
17400 fi
17401
17402 done
17403
17404
17405 if test "$ac_cv_header_regex_h" != yes ; then
17406         { { echo "$as_me:$LINENO: error: POSIX regex.h required." >&5
17407 echo "$as_me: error: POSIX regex.h required." >&2;}
17408    { (exit 1); exit 1; }; }
17409 fi
17410 { echo "$as_me:$LINENO: checking for library containing regfree" >&5
17411 echo $ECHO_N "checking for library containing regfree... $ECHO_C" >&6; }
17412 if test "${ac_cv_search_regfree+set}" = set; then
17413   echo $ECHO_N "(cached) $ECHO_C" >&6
17414 else
17415   ac_func_search_save_LIBS=$LIBS
17416 cat >conftest.$ac_ext <<_ACEOF
17417 /* confdefs.h.  */
17418 _ACEOF
17419 cat confdefs.h >>conftest.$ac_ext
17420 cat >>conftest.$ac_ext <<_ACEOF
17421 /* end confdefs.h.  */
17422
17423 /* Override any GCC internal prototype to avoid an error.
17424    Use char because int might match the return type of a GCC
17425    builtin and then its argument prototype would still apply.  */
17426 #ifdef __cplusplus
17427 extern "C"
17428 #endif
17429 char regfree ();
17430 int
17431 main ()
17432 {
17433 return regfree ();
17434   ;
17435   return 0;
17436 }
17437 _ACEOF
17438 for ac_lib in '' regex gnuregex; do
17439   if test -z "$ac_lib"; then
17440     ac_res="none required"
17441   else
17442     ac_res=-l$ac_lib
17443     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17444   fi
17445   rm -f conftest.$ac_objext conftest$ac_exeext
17446 if { (ac_try="$ac_link"
17447 case "(($ac_try" in
17448   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17449   *) ac_try_echo=$ac_try;;
17450 esac
17451 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17452   (eval "$ac_link") 2>conftest.er1
17453   ac_status=$?
17454   grep -v '^ *+' conftest.er1 >conftest.err
17455   rm -f conftest.er1
17456   cat conftest.err >&5
17457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17458   (exit $ac_status); } && {
17459          test -z "$ac_c_werror_flag" ||
17460          test ! -s conftest.err
17461        } && test -s conftest$ac_exeext &&
17462        $as_test_x conftest$ac_exeext; then
17463   ac_cv_search_regfree=$ac_res
17464 else
17465   echo "$as_me: failed program was:" >&5
17466 sed 's/^/| /' conftest.$ac_ext >&5
17467
17468
17469 fi
17470
17471 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17472       conftest$ac_exeext
17473   if test "${ac_cv_search_regfree+set}" = set; then
17474   break
17475 fi
17476 done
17477 if test "${ac_cv_search_regfree+set}" = set; then
17478   :
17479 else
17480   ac_cv_search_regfree=no
17481 fi
17482 rm conftest.$ac_ext
17483 LIBS=$ac_func_search_save_LIBS
17484 fi
17485 { echo "$as_me:$LINENO: result: $ac_cv_search_regfree" >&5
17486 echo "${ECHO_T}$ac_cv_search_regfree" >&6; }
17487 ac_res=$ac_cv_search_regfree
17488 if test "$ac_res" != no; then
17489   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17490   :
17491 else
17492   { { echo "$as_me:$LINENO: error: POSIX regex required." >&5
17493 echo "$as_me: error: POSIX regex required." >&2;}
17494    { (exit 1); exit 1; }; }
17495 fi
17496
17497
17498
17499 { echo "$as_me:$LINENO: checking for compatible POSIX regex" >&5
17500 echo $ECHO_N "checking for compatible POSIX regex... $ECHO_C" >&6; }
17501 if test "${ol_cv_c_posix_regex+set}" = set; then
17502   echo $ECHO_N "(cached) $ECHO_C" >&6
17503 else
17504
17505         if test "$cross_compiling" = yes; then
17506   ol_cv_c_posix_regex=cross
17507 else
17508   cat >conftest.$ac_ext <<_ACEOF
17509 /* confdefs.h.  */
17510 _ACEOF
17511 cat confdefs.h >>conftest.$ac_ext
17512 cat >>conftest.$ac_ext <<_ACEOF
17513 /* end confdefs.h.  */
17514
17515 #include <sys/types.h>
17516 #include <regex.h>
17517 static char *pattern, *string;
17518 main()
17519 {
17520         int rc;
17521         regex_t re;
17522
17523         pattern = "^A";
17524
17525         if(regcomp(&re, pattern, 0)) {
17526                 return -1;
17527         }
17528
17529         string = "ALL MATCH";
17530
17531         rc = regexec(&re, string, 0, (void*)0, 0);
17532
17533         regfree(&re);
17534
17535         return rc;
17536 }
17537 _ACEOF
17538 rm -f conftest$ac_exeext
17539 if { (ac_try="$ac_link"
17540 case "(($ac_try" in
17541   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17542   *) ac_try_echo=$ac_try;;
17543 esac
17544 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17545   (eval "$ac_link") 2>&5
17546   ac_status=$?
17547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17548   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17549   { (case "(($ac_try" in
17550   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17551   *) ac_try_echo=$ac_try;;
17552 esac
17553 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17554   (eval "$ac_try") 2>&5
17555   ac_status=$?
17556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17557   (exit $ac_status); }; }; then
17558   ol_cv_c_posix_regex=yes
17559 else
17560   echo "$as_me: program exited with status $ac_status" >&5
17561 echo "$as_me: failed program was:" >&5
17562 sed 's/^/| /' conftest.$ac_ext >&5
17563
17564 ( exit $ac_status )
17565 ol_cv_c_posix_regex=no
17566 fi
17567 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17568 fi
17569
17570
17571 fi
17572 { echo "$as_me:$LINENO: result: $ol_cv_c_posix_regex" >&5
17573 echo "${ECHO_T}$ol_cv_c_posix_regex" >&6; }
17574
17575 if test "$ol_cv_c_posix_regex" = no ; then
17576         { { echo "$as_me:$LINENO: error: broken POSIX regex!" >&5
17577 echo "$as_me: error: broken POSIX regex!" >&2;}
17578    { (exit 1); exit 1; }; }
17579 fi
17580
17581
17582 have_uuid=no
17583
17584 for ac_header in sys/uuid.h
17585 do
17586 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17587 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17588   { echo "$as_me:$LINENO: checking for $ac_header" >&5
17589 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17590 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17591   echo $ECHO_N "(cached) $ECHO_C" >&6
17592 fi
17593 ac_res=`eval echo '${'$as_ac_Header'}'`
17594                { echo "$as_me:$LINENO: result: $ac_res" >&5
17595 echo "${ECHO_T}$ac_res" >&6; }
17596 else
17597   # Is the header compilable?
17598 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
17599 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
17600 cat >conftest.$ac_ext <<_ACEOF
17601 /* confdefs.h.  */
17602 _ACEOF
17603 cat confdefs.h >>conftest.$ac_ext
17604 cat >>conftest.$ac_ext <<_ACEOF
17605 /* end confdefs.h.  */
17606 $ac_includes_default
17607 #include <$ac_header>
17608 _ACEOF
17609 rm -f conftest.$ac_objext
17610 if { (ac_try="$ac_compile"
17611 case "(($ac_try" in
17612   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17613   *) ac_try_echo=$ac_try;;
17614 esac
17615 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17616   (eval "$ac_compile") 2>conftest.er1
17617   ac_status=$?
17618   grep -v '^ *+' conftest.er1 >conftest.err
17619   rm -f conftest.er1
17620   cat conftest.err >&5
17621   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17622   (exit $ac_status); } && {
17623          test -z "$ac_c_werror_flag" ||
17624          test ! -s conftest.err
17625        } && test -s conftest.$ac_objext; then
17626   ac_header_compiler=yes
17627 else
17628   echo "$as_me: failed program was:" >&5
17629 sed 's/^/| /' conftest.$ac_ext >&5
17630
17631         ac_header_compiler=no
17632 fi
17633
17634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17635 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17636 echo "${ECHO_T}$ac_header_compiler" >&6; }
17637
17638 # Is the header present?
17639 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
17640 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
17641 cat >conftest.$ac_ext <<_ACEOF
17642 /* confdefs.h.  */
17643 _ACEOF
17644 cat confdefs.h >>conftest.$ac_ext
17645 cat >>conftest.$ac_ext <<_ACEOF
17646 /* end confdefs.h.  */
17647 #include <$ac_header>
17648 _ACEOF
17649 if { (ac_try="$ac_cpp conftest.$ac_ext"
17650 case "(($ac_try" in
17651   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17652   *) ac_try_echo=$ac_try;;
17653 esac
17654 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17655   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17656   ac_status=$?
17657   grep -v '^ *+' conftest.er1 >conftest.err
17658   rm -f conftest.er1
17659   cat conftest.err >&5
17660   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17661   (exit $ac_status); } >/dev/null && {
17662          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17663          test ! -s conftest.err
17664        }; then
17665   ac_header_preproc=yes
17666 else
17667   echo "$as_me: failed program was:" >&5
17668 sed 's/^/| /' conftest.$ac_ext >&5
17669
17670   ac_header_preproc=no
17671 fi
17672
17673 rm -f conftest.err conftest.$ac_ext
17674 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17675 echo "${ECHO_T}$ac_header_preproc" >&6; }
17676
17677 # So?  What about this header?
17678 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17679   yes:no: )
17680     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17681 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17682     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17683 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17684     ac_header_preproc=yes
17685     ;;
17686   no:yes:* )
17687     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17688 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17689     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17690 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17691     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17692 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17693     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17694 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17695     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17696 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17697     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17698 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17699     ( cat <<\_ASBOX
17700 ## --------------------------------------------- ##
17701 ## Report this to <http://www.openldap.org/its/> ##
17702 ## --------------------------------------------- ##
17703 _ASBOX
17704      ) | sed "s/^/$as_me: WARNING:     /" >&2
17705     ;;
17706 esac
17707 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17708 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17709 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17710   echo $ECHO_N "(cached) $ECHO_C" >&6
17711 else
17712   eval "$as_ac_Header=\$ac_header_preproc"
17713 fi
17714 ac_res=`eval echo '${'$as_ac_Header'}'`
17715                { echo "$as_me:$LINENO: result: $ac_res" >&5
17716 echo "${ECHO_T}$ac_res" >&6; }
17717
17718 fi
17719 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17720   cat >>confdefs.h <<_ACEOF
17721 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17722 _ACEOF
17723
17724 fi
17725
17726 done
17727
17728 if test $ac_cv_header_sys_uuid_h = yes ; then
17729         save_LIBS="$LIBS"
17730         { echo "$as_me:$LINENO: checking for library containing uuid_to_str" >&5
17731 echo $ECHO_N "checking for library containing uuid_to_str... $ECHO_C" >&6; }
17732 if test "${ac_cv_search_uuid_to_str+set}" = set; then
17733   echo $ECHO_N "(cached) $ECHO_C" >&6
17734 else
17735   ac_func_search_save_LIBS=$LIBS
17736 cat >conftest.$ac_ext <<_ACEOF
17737 /* confdefs.h.  */
17738 _ACEOF
17739 cat confdefs.h >>conftest.$ac_ext
17740 cat >>conftest.$ac_ext <<_ACEOF
17741 /* end confdefs.h.  */
17742
17743 /* Override any GCC internal prototype to avoid an error.
17744    Use char because int might match the return type of a GCC
17745    builtin and then its argument prototype would still apply.  */
17746 #ifdef __cplusplus
17747 extern "C"
17748 #endif
17749 char uuid_to_str ();
17750 int
17751 main ()
17752 {
17753 return uuid_to_str ();
17754   ;
17755   return 0;
17756 }
17757 _ACEOF
17758 for ac_lib in '' uuid; do
17759   if test -z "$ac_lib"; then
17760     ac_res="none required"
17761   else
17762     ac_res=-l$ac_lib
17763     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17764   fi
17765   rm -f conftest.$ac_objext conftest$ac_exeext
17766 if { (ac_try="$ac_link"
17767 case "(($ac_try" in
17768   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17769   *) ac_try_echo=$ac_try;;
17770 esac
17771 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17772   (eval "$ac_link") 2>conftest.er1
17773   ac_status=$?
17774   grep -v '^ *+' conftest.er1 >conftest.err
17775   rm -f conftest.er1
17776   cat conftest.err >&5
17777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17778   (exit $ac_status); } && {
17779          test -z "$ac_c_werror_flag" ||
17780          test ! -s conftest.err
17781        } && test -s conftest$ac_exeext &&
17782        $as_test_x conftest$ac_exeext; then
17783   ac_cv_search_uuid_to_str=$ac_res
17784 else
17785   echo "$as_me: failed program was:" >&5
17786 sed 's/^/| /' conftest.$ac_ext >&5
17787
17788
17789 fi
17790
17791 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17792       conftest$ac_exeext
17793   if test "${ac_cv_search_uuid_to_str+set}" = set; then
17794   break
17795 fi
17796 done
17797 if test "${ac_cv_search_uuid_to_str+set}" = set; then
17798   :
17799 else
17800   ac_cv_search_uuid_to_str=no
17801 fi
17802 rm conftest.$ac_ext
17803 LIBS=$ac_func_search_save_LIBS
17804 fi
17805 { echo "$as_me:$LINENO: result: $ac_cv_search_uuid_to_str" >&5
17806 echo "${ECHO_T}$ac_cv_search_uuid_to_str" >&6; }
17807 ac_res=$ac_cv_search_uuid_to_str
17808 if test "$ac_res" != no; then
17809   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17810   have_uuid=yes
17811 else
17812   :
17813 fi
17814
17815         LIBS="$save_LIBS"
17816
17817         if test have_uuid = yes ; then
17818
17819 cat >>confdefs.h <<\_ACEOF
17820 #define HAVE_UUID_TO_STR 1
17821 _ACEOF
17822
17823
17824                 test "$ac_cv_search_uuid_to_str" = "none required" || \
17825                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
17826         fi
17827 fi
17828
17829 if test $have_uuid = no ; then
17830
17831 for ac_header in uuid/uuid.h
17832 do
17833 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17834 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17835   { echo "$as_me:$LINENO: checking for $ac_header" >&5
17836 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17837 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17838   echo $ECHO_N "(cached) $ECHO_C" >&6
17839 fi
17840 ac_res=`eval echo '${'$as_ac_Header'}'`
17841                { echo "$as_me:$LINENO: result: $ac_res" >&5
17842 echo "${ECHO_T}$ac_res" >&6; }
17843 else
17844   # Is the header compilable?
17845 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
17846 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
17847 cat >conftest.$ac_ext <<_ACEOF
17848 /* confdefs.h.  */
17849 _ACEOF
17850 cat confdefs.h >>conftest.$ac_ext
17851 cat >>conftest.$ac_ext <<_ACEOF
17852 /* end confdefs.h.  */
17853 $ac_includes_default
17854 #include <$ac_header>
17855 _ACEOF
17856 rm -f conftest.$ac_objext
17857 if { (ac_try="$ac_compile"
17858 case "(($ac_try" in
17859   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17860   *) ac_try_echo=$ac_try;;
17861 esac
17862 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17863   (eval "$ac_compile") 2>conftest.er1
17864   ac_status=$?
17865   grep -v '^ *+' conftest.er1 >conftest.err
17866   rm -f conftest.er1
17867   cat conftest.err >&5
17868   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17869   (exit $ac_status); } && {
17870          test -z "$ac_c_werror_flag" ||
17871          test ! -s conftest.err
17872        } && test -s conftest.$ac_objext; then
17873   ac_header_compiler=yes
17874 else
17875   echo "$as_me: failed program was:" >&5
17876 sed 's/^/| /' conftest.$ac_ext >&5
17877
17878         ac_header_compiler=no
17879 fi
17880
17881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17882 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17883 echo "${ECHO_T}$ac_header_compiler" >&6; }
17884
17885 # Is the header present?
17886 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
17887 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
17888 cat >conftest.$ac_ext <<_ACEOF
17889 /* confdefs.h.  */
17890 _ACEOF
17891 cat confdefs.h >>conftest.$ac_ext
17892 cat >>conftest.$ac_ext <<_ACEOF
17893 /* end confdefs.h.  */
17894 #include <$ac_header>
17895 _ACEOF
17896 if { (ac_try="$ac_cpp conftest.$ac_ext"
17897 case "(($ac_try" in
17898   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17899   *) ac_try_echo=$ac_try;;
17900 esac
17901 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17902   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17903   ac_status=$?
17904   grep -v '^ *+' conftest.er1 >conftest.err
17905   rm -f conftest.er1
17906   cat conftest.err >&5
17907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
17908   (exit $ac_status); } >/dev/null && {
17909          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17910          test ! -s conftest.err
17911        }; then
17912   ac_header_preproc=yes
17913 else
17914   echo "$as_me: failed program was:" >&5
17915 sed 's/^/| /' conftest.$ac_ext >&5
17916
17917   ac_header_preproc=no
17918 fi
17919
17920 rm -f conftest.err conftest.$ac_ext
17921 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17922 echo "${ECHO_T}$ac_header_preproc" >&6; }
17923
17924 # So?  What about this header?
17925 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17926   yes:no: )
17927     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17928 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17929     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17930 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17931     ac_header_preproc=yes
17932     ;;
17933   no:yes:* )
17934     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17935 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17936     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
17937 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
17938     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17939 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17940     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
17941 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
17942     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17943 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17944     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17945 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
17946     ( cat <<\_ASBOX
17947 ## --------------------------------------------- ##
17948 ## Report this to <http://www.openldap.org/its/> ##
17949 ## --------------------------------------------- ##
17950 _ASBOX
17951      ) | sed "s/^/$as_me: WARNING:     /" >&2
17952     ;;
17953 esac
17954 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17955 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17956 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17957   echo $ECHO_N "(cached) $ECHO_C" >&6
17958 else
17959   eval "$as_ac_Header=\$ac_header_preproc"
17960 fi
17961 ac_res=`eval echo '${'$as_ac_Header'}'`
17962                { echo "$as_me:$LINENO: result: $ac_res" >&5
17963 echo "${ECHO_T}$ac_res" >&6; }
17964
17965 fi
17966 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17967   cat >>confdefs.h <<_ACEOF
17968 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17969 _ACEOF
17970
17971 fi
17972
17973 done
17974
17975         if test $ac_cv_header_uuid_uuid_h = yes ; then
17976                 save_LIBS="$LIBS"
17977                 { echo "$as_me:$LINENO: checking for library containing uuid_generate" >&5
17978 echo $ECHO_N "checking for library containing uuid_generate... $ECHO_C" >&6; }
17979 if test "${ac_cv_search_uuid_generate+set}" = set; then
17980   echo $ECHO_N "(cached) $ECHO_C" >&6
17981 else
17982   ac_func_search_save_LIBS=$LIBS
17983 cat >conftest.$ac_ext <<_ACEOF
17984 /* confdefs.h.  */
17985 _ACEOF
17986 cat confdefs.h >>conftest.$ac_ext
17987 cat >>conftest.$ac_ext <<_ACEOF
17988 /* end confdefs.h.  */
17989
17990 /* Override any GCC internal prototype to avoid an error.
17991    Use char because int might match the return type of a GCC
17992    builtin and then its argument prototype would still apply.  */
17993 #ifdef __cplusplus
17994 extern "C"
17995 #endif
17996 char uuid_generate ();
17997 int
17998 main ()
17999 {
18000 return uuid_generate ();
18001   ;
18002   return 0;
18003 }
18004 _ACEOF
18005 for ac_lib in '' uuid; do
18006   if test -z "$ac_lib"; then
18007     ac_res="none required"
18008   else
18009     ac_res=-l$ac_lib
18010     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18011   fi
18012   rm -f conftest.$ac_objext conftest$ac_exeext
18013 if { (ac_try="$ac_link"
18014 case "(($ac_try" in
18015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18016   *) ac_try_echo=$ac_try;;
18017 esac
18018 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18019   (eval "$ac_link") 2>conftest.er1
18020   ac_status=$?
18021   grep -v '^ *+' conftest.er1 >conftest.err
18022   rm -f conftest.er1
18023   cat conftest.err >&5
18024   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18025   (exit $ac_status); } && {
18026          test -z "$ac_c_werror_flag" ||
18027          test ! -s conftest.err
18028        } && test -s conftest$ac_exeext &&
18029        $as_test_x conftest$ac_exeext; then
18030   ac_cv_search_uuid_generate=$ac_res
18031 else
18032   echo "$as_me: failed program was:" >&5
18033 sed 's/^/| /' conftest.$ac_ext >&5
18034
18035
18036 fi
18037
18038 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18039       conftest$ac_exeext
18040   if test "${ac_cv_search_uuid_generate+set}" = set; then
18041   break
18042 fi
18043 done
18044 if test "${ac_cv_search_uuid_generate+set}" = set; then
18045   :
18046 else
18047   ac_cv_search_uuid_generate=no
18048 fi
18049 rm conftest.$ac_ext
18050 LIBS=$ac_func_search_save_LIBS
18051 fi
18052 { echo "$as_me:$LINENO: result: $ac_cv_search_uuid_generate" >&5
18053 echo "${ECHO_T}$ac_cv_search_uuid_generate" >&6; }
18054 ac_res=$ac_cv_search_uuid_generate
18055 if test "$ac_res" != no; then
18056   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18057   have_uuid=yes
18058 else
18059   :
18060 fi
18061
18062                 LIBS="$save_LIBS"
18063
18064                 if test have_uuid = yes ; then
18065
18066 cat >>confdefs.h <<\_ACEOF
18067 #define HAVE_UUID_GENERATE 1
18068 _ACEOF
18069
18070
18071                         test "$ac_cv_search_uuid_generate" = "none required" || \
18072                                 SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_generate"
18073                 fi
18074         fi
18075 fi
18076
18077 if test $have_uuid = no ; then
18078         { echo "$as_me:$LINENO: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
18079 echo $ECHO_N "checking to see if -lrpcrt4 is needed for win32 UUID support... $ECHO_C" >&6; }
18080         save_LIBS="$LIBS"
18081         LIBS="$LIBS -lrpcrt4"
18082         cat >conftest.$ac_ext <<_ACEOF
18083 /* confdefs.h.  */
18084 _ACEOF
18085 cat confdefs.h >>conftest.$ac_ext
18086 cat >>conftest.$ac_ext <<_ACEOF
18087 /* end confdefs.h.  */
18088
18089                 int __stdcall UuidCreate(void *);
18090                 int __stdcall UuidToStringA(void *,void **);
18091
18092 int
18093 main ()
18094 {
18095
18096                 UuidCreate(0);
18097                 UuidToStringA(0,0);
18098
18099   ;
18100   return 0;
18101 }
18102 _ACEOF
18103 rm -f conftest.$ac_objext conftest$ac_exeext
18104 if { (ac_try="$ac_link"
18105 case "(($ac_try" in
18106   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18107   *) ac_try_echo=$ac_try;;
18108 esac
18109 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18110   (eval "$ac_link") 2>conftest.er1
18111   ac_status=$?
18112   grep -v '^ *+' conftest.er1 >conftest.err
18113   rm -f conftest.er1
18114   cat conftest.err >&5
18115   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18116   (exit $ac_status); } && {
18117          test -z "$ac_c_werror_flag" ||
18118          test ! -s conftest.err
18119        } && test -s conftest$ac_exeext &&
18120        $as_test_x conftest$ac_exeext; then
18121   need_rpcrt=yes
18122 else
18123   echo "$as_me: failed program was:" >&5
18124 sed 's/^/| /' conftest.$ac_ext >&5
18125
18126         need_rpcrt=no
18127 fi
18128
18129 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18130       conftest$ac_exeext conftest.$ac_ext
18131         if test $need_rpcrt = yes; then
18132                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
18133         fi
18134         LIBS="$save_LIBS"
18135         { echo "$as_me:$LINENO: result: $need_rpcrt" >&5
18136 echo "${ECHO_T}$need_rpcrt" >&6; }
18137 fi
18138
18139 ol_cv_lib_resolver=no
18140 if test $ol_cv_lib_resolver = no ; then
18141         { echo "$as_me:$LINENO: checking for resolver link (default)" >&5
18142 echo $ECHO_N "checking for resolver link (default)... $ECHO_C" >&6; }
18143 if test "${ol_cv_resolver_none+set}" = set; then
18144   echo $ECHO_N "(cached) $ECHO_C" >&6
18145 else
18146
18147         ol_RESOLVER_LIB=
18148         ol_LIBS=$LIBS
18149         LIBS="$ol_RESOLVER_LIB $LIBS"
18150
18151         cat >conftest.$ac_ext <<_ACEOF
18152 /* confdefs.h.  */
18153 _ACEOF
18154 cat confdefs.h >>conftest.$ac_ext
18155 cat >>conftest.$ac_ext <<_ACEOF
18156 /* end confdefs.h.  */
18157
18158 #ifdef HAVE_SYS_TYPES_H
18159 #       include <sys/types.h>
18160 #endif
18161 #include <netinet/in.h>
18162 #ifdef HAVE_ARPA_NAMESER_H
18163 #       include <arpa/nameser.h>
18164 #endif
18165 #ifdef HAVE_RESOLV_H
18166 #       include <resolv.h>
18167 #endif
18168
18169 int
18170 main ()
18171 {
18172 {
18173         int len, status;
18174         char *request = NULL;
18175         unsigned char reply[64*1024];
18176         unsigned char host[64*1024];
18177         unsigned char *p;
18178
18179 #ifdef NS_HFIXEDSZ
18180         /* Bind 8/9 interface */
18181         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
18182 #else
18183         /* Bind 4 interface */
18184 # ifndef T_SRV
18185 #  define T_SRV 33
18186 # endif
18187         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
18188 #endif
18189         p = reply;
18190 #ifdef NS_HFIXEDSZ
18191         /* Bind 8/9 interface */
18192         p += NS_HFIXEDSZ;
18193 #elif defined(HFIXEDSZ)
18194         /* Bind 4 interface w/ HFIXEDSZ */
18195         p += HFIXEDSZ;
18196 #else
18197         /* Bind 4 interface w/o HFIXEDSZ */
18198         p += sizeof(HEADER);
18199 #endif
18200         status = dn_expand( reply, reply+len, p, host, sizeof(host));
18201 }
18202   ;
18203   return 0;
18204 }
18205 _ACEOF
18206 rm -f conftest.$ac_objext conftest$ac_exeext
18207 if { (ac_try="$ac_link"
18208 case "(($ac_try" in
18209   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18210   *) ac_try_echo=$ac_try;;
18211 esac
18212 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18213   (eval "$ac_link") 2>conftest.er1
18214   ac_status=$?
18215   grep -v '^ *+' conftest.er1 >conftest.err
18216   rm -f conftest.er1
18217   cat conftest.err >&5
18218   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18219   (exit $ac_status); } && {
18220          test -z "$ac_c_werror_flag" ||
18221          test ! -s conftest.err
18222        } && test -s conftest$ac_exeext &&
18223        $as_test_x conftest$ac_exeext; then
18224   ol_cv_resolver_none=yes
18225 else
18226   echo "$as_me: failed program was:" >&5
18227 sed 's/^/| /' conftest.$ac_ext >&5
18228
18229         ol_cv_resolver_none=no
18230 fi
18231
18232 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18233       conftest$ac_exeext conftest.$ac_ext
18234
18235         LIBS="$ol_LIBS"
18236
18237 fi
18238 { echo "$as_me:$LINENO: result: $ol_cv_resolver_none" >&5
18239 echo "${ECHO_T}$ol_cv_resolver_none" >&6; }
18240
18241         if test $ol_cv_resolver_none = yes ; then
18242                 ol_cv_lib_resolver=yes
18243         fi
18244 fi
18245
18246 if test $ol_cv_lib_resolver = no ; then
18247         { echo "$as_me:$LINENO: checking for resolver link (-lresolv)" >&5
18248 echo $ECHO_N "checking for resolver link (-lresolv)... $ECHO_C" >&6; }
18249 if test "${ol_cv_resolver_resolv+set}" = set; then
18250   echo $ECHO_N "(cached) $ECHO_C" >&6
18251 else
18252
18253         ol_RESOLVER_LIB=-lresolv
18254         ol_LIBS=$LIBS
18255         LIBS="$ol_RESOLVER_LIB $LIBS"
18256
18257         cat >conftest.$ac_ext <<_ACEOF
18258 /* confdefs.h.  */
18259 _ACEOF
18260 cat confdefs.h >>conftest.$ac_ext
18261 cat >>conftest.$ac_ext <<_ACEOF
18262 /* end confdefs.h.  */
18263
18264 #ifdef HAVE_SYS_TYPES_H
18265 #       include <sys/types.h>
18266 #endif
18267 #include <netinet/in.h>
18268 #ifdef HAVE_ARPA_NAMESER_H
18269 #       include <arpa/nameser.h>
18270 #endif
18271 #ifdef HAVE_RESOLV_H
18272 #       include <resolv.h>
18273 #endif
18274
18275 int
18276 main ()
18277 {
18278 {
18279         int len, status;
18280         char *request = NULL;
18281         unsigned char reply[64*1024];
18282         unsigned char host[64*1024];
18283         unsigned char *p;
18284
18285 #ifdef NS_HFIXEDSZ
18286         /* Bind 8/9 interface */
18287         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
18288 #else
18289         /* Bind 4 interface */
18290 # ifndef T_SRV
18291 #  define T_SRV 33
18292 # endif
18293         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
18294 #endif
18295         p = reply;
18296 #ifdef NS_HFIXEDSZ
18297         /* Bind 8/9 interface */
18298         p += NS_HFIXEDSZ;
18299 #elif defined(HFIXEDSZ)
18300         /* Bind 4 interface w/ HFIXEDSZ */
18301         p += HFIXEDSZ;
18302 #else
18303         /* Bind 4 interface w/o HFIXEDSZ */
18304         p += sizeof(HEADER);
18305 #endif
18306         status = dn_expand( reply, reply+len, p, host, sizeof(host));
18307 }
18308   ;
18309   return 0;
18310 }
18311 _ACEOF
18312 rm -f conftest.$ac_objext conftest$ac_exeext
18313 if { (ac_try="$ac_link"
18314 case "(($ac_try" in
18315   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18316   *) ac_try_echo=$ac_try;;
18317 esac
18318 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18319   (eval "$ac_link") 2>conftest.er1
18320   ac_status=$?
18321   grep -v '^ *+' conftest.er1 >conftest.err
18322   rm -f conftest.er1
18323   cat conftest.err >&5
18324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18325   (exit $ac_status); } && {
18326          test -z "$ac_c_werror_flag" ||
18327          test ! -s conftest.err
18328        } && test -s conftest$ac_exeext &&
18329        $as_test_x conftest$ac_exeext; then
18330   ol_cv_resolver_resolv=yes
18331 else
18332   echo "$as_me: failed program was:" >&5
18333 sed 's/^/| /' conftest.$ac_ext >&5
18334
18335         ol_cv_resolver_resolv=no
18336 fi
18337
18338 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18339       conftest$ac_exeext conftest.$ac_ext
18340
18341         LIBS="$ol_LIBS"
18342
18343 fi
18344 { echo "$as_me:$LINENO: result: $ol_cv_resolver_resolv" >&5
18345 echo "${ECHO_T}$ol_cv_resolver_resolv" >&6; }
18346
18347         if test $ol_cv_resolver_resolv = yes ; then
18348                 ol_cv_lib_resolver=-lresolv
18349         fi
18350 fi
18351
18352 if test $ol_cv_lib_resolver = no ; then
18353         { echo "$as_me:$LINENO: checking for resolver link (-lbind)" >&5
18354 echo $ECHO_N "checking for resolver link (-lbind)... $ECHO_C" >&6; }
18355 if test "${ol_cv_resolver_bind+set}" = set; then
18356   echo $ECHO_N "(cached) $ECHO_C" >&6
18357 else
18358
18359         ol_RESOLVER_LIB=-lbind
18360         ol_LIBS=$LIBS
18361         LIBS="$ol_RESOLVER_LIB $LIBS"
18362
18363         cat >conftest.$ac_ext <<_ACEOF
18364 /* confdefs.h.  */
18365 _ACEOF
18366 cat confdefs.h >>conftest.$ac_ext
18367 cat >>conftest.$ac_ext <<_ACEOF
18368 /* end confdefs.h.  */
18369
18370 #ifdef HAVE_SYS_TYPES_H
18371 #       include <sys/types.h>
18372 #endif
18373 #include <netinet/in.h>
18374 #ifdef HAVE_ARPA_NAMESER_H
18375 #       include <arpa/nameser.h>
18376 #endif
18377 #ifdef HAVE_RESOLV_H
18378 #       include <resolv.h>
18379 #endif
18380
18381 int
18382 main ()
18383 {
18384 {
18385         int len, status;
18386         char *request = NULL;
18387         unsigned char reply[64*1024];
18388         unsigned char host[64*1024];
18389         unsigned char *p;
18390
18391 #ifdef NS_HFIXEDSZ
18392         /* Bind 8/9 interface */
18393         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
18394 #else
18395         /* Bind 4 interface */
18396 # ifndef T_SRV
18397 #  define T_SRV 33
18398 # endif
18399         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
18400 #endif
18401         p = reply;
18402 #ifdef NS_HFIXEDSZ
18403         /* Bind 8/9 interface */
18404         p += NS_HFIXEDSZ;
18405 #elif defined(HFIXEDSZ)
18406         /* Bind 4 interface w/ HFIXEDSZ */
18407         p += HFIXEDSZ;
18408 #else
18409         /* Bind 4 interface w/o HFIXEDSZ */
18410         p += sizeof(HEADER);
18411 #endif
18412         status = dn_expand( reply, reply+len, p, host, sizeof(host));
18413 }
18414   ;
18415   return 0;
18416 }
18417 _ACEOF
18418 rm -f conftest.$ac_objext conftest$ac_exeext
18419 if { (ac_try="$ac_link"
18420 case "(($ac_try" in
18421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18422   *) ac_try_echo=$ac_try;;
18423 esac
18424 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18425   (eval "$ac_link") 2>conftest.er1
18426   ac_status=$?
18427   grep -v '^ *+' conftest.er1 >conftest.err
18428   rm -f conftest.er1
18429   cat conftest.err >&5
18430   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18431   (exit $ac_status); } && {
18432          test -z "$ac_c_werror_flag" ||
18433          test ! -s conftest.err
18434        } && test -s conftest$ac_exeext &&
18435        $as_test_x conftest$ac_exeext; then
18436   ol_cv_resolver_bind=yes
18437 else
18438   echo "$as_me: failed program was:" >&5
18439 sed 's/^/| /' conftest.$ac_ext >&5
18440
18441         ol_cv_resolver_bind=no
18442 fi
18443
18444 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18445       conftest$ac_exeext conftest.$ac_ext
18446
18447         LIBS="$ol_LIBS"
18448
18449 fi
18450 { echo "$as_me:$LINENO: result: $ol_cv_resolver_bind" >&5
18451 echo "${ECHO_T}$ol_cv_resolver_bind" >&6; }
18452
18453         if test $ol_cv_resolver_bind = yes ; then
18454                 ol_cv_lib_resolver=-lbind
18455         fi
18456 fi
18457
18458
18459
18460 ol_link_dnssrv=no
18461 if test "$ol_cv_lib_resolver" != no ; then
18462
18463 cat >>confdefs.h <<\_ACEOF
18464 #define HAVE_RES_QUERY 1
18465 _ACEOF
18466
18467
18468         if test "$ol_enable_dnssrv" != no ; then
18469                 ol_link_dnssrv=yes
18470         fi
18471
18472         if test "$ol_cv_lib_resolver" != yes ; then
18473                 LIBS="$ol_cv_lib_resolver $LIBS"
18474         fi
18475 fi
18476
18477 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
18478         if test "$ol_link_dnssrv" = no ; then
18479                 { { echo "$as_me:$LINENO: error: DNSSRV requires res_query()" >&5
18480 echo "$as_me: error: DNSSRV requires res_query()" >&2;}
18481    { (exit 1); exit 1; }; }
18482         fi
18483 else
18484         ol_enable_dnssrv=no
18485 fi
18486
18487
18488 for ac_func in hstrerror
18489 do
18490 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18491 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18492 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18493 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18494   echo $ECHO_N "(cached) $ECHO_C" >&6
18495 else
18496   cat >conftest.$ac_ext <<_ACEOF
18497 /* confdefs.h.  */
18498 _ACEOF
18499 cat confdefs.h >>conftest.$ac_ext
18500 cat >>conftest.$ac_ext <<_ACEOF
18501 /* end confdefs.h.  */
18502 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18503    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18504 #define $ac_func innocuous_$ac_func
18505
18506 /* System header to define __stub macros and hopefully few prototypes,
18507     which can conflict with char $ac_func (); below.
18508     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18509     <limits.h> exists even on freestanding compilers.  */
18510
18511 #ifdef __STDC__
18512 # include <limits.h>
18513 #else
18514 # include <assert.h>
18515 #endif
18516
18517 #undef $ac_func
18518
18519 /* Override any GCC internal prototype to avoid an error.
18520    Use char because int might match the return type of a GCC
18521    builtin and then its argument prototype would still apply.  */
18522 #ifdef __cplusplus
18523 extern "C"
18524 #endif
18525 char $ac_func ();
18526 /* The GNU C library defines this for functions which it implements
18527     to always fail with ENOSYS.  Some functions are actually named
18528     something starting with __ and the normal name is an alias.  */
18529 #if defined __stub_$ac_func || defined __stub___$ac_func
18530 choke me
18531 #endif
18532
18533 int
18534 main ()
18535 {
18536 return $ac_func ();
18537   ;
18538   return 0;
18539 }
18540 _ACEOF
18541 rm -f conftest.$ac_objext conftest$ac_exeext
18542 if { (ac_try="$ac_link"
18543 case "(($ac_try" in
18544   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18545   *) ac_try_echo=$ac_try;;
18546 esac
18547 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18548   (eval "$ac_link") 2>conftest.er1
18549   ac_status=$?
18550   grep -v '^ *+' conftest.er1 >conftest.err
18551   rm -f conftest.er1
18552   cat conftest.err >&5
18553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18554   (exit $ac_status); } && {
18555          test -z "$ac_c_werror_flag" ||
18556          test ! -s conftest.err
18557        } && test -s conftest$ac_exeext &&
18558        $as_test_x conftest$ac_exeext; then
18559   eval "$as_ac_var=yes"
18560 else
18561   echo "$as_me: failed program was:" >&5
18562 sed 's/^/| /' conftest.$ac_ext >&5
18563
18564         eval "$as_ac_var=no"
18565 fi
18566
18567 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18568       conftest$ac_exeext conftest.$ac_ext
18569 fi
18570 ac_res=`eval echo '${'$as_ac_var'}'`
18571                { echo "$as_me:$LINENO: result: $ac_res" >&5
18572 echo "${ECHO_T}$ac_res" >&6; }
18573 if test `eval echo '${'$as_ac_var'}'` = yes; then
18574   cat >>confdefs.h <<_ACEOF
18575 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18576 _ACEOF
18577
18578 fi
18579 done
18580
18581
18582
18583
18584
18585
18586 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
18587 do
18588 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18589 { echo "$as_me:$LINENO: checking for $ac_func" >&5
18590 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18591 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18592   echo $ECHO_N "(cached) $ECHO_C" >&6
18593 else
18594   cat >conftest.$ac_ext <<_ACEOF
18595 /* confdefs.h.  */
18596 _ACEOF
18597 cat confdefs.h >>conftest.$ac_ext
18598 cat >>conftest.$ac_ext <<_ACEOF
18599 /* end confdefs.h.  */
18600 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18601    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
18602 #define $ac_func innocuous_$ac_func
18603
18604 /* System header to define __stub macros and hopefully few prototypes,
18605     which can conflict with char $ac_func (); below.
18606     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18607     <limits.h> exists even on freestanding compilers.  */
18608
18609 #ifdef __STDC__
18610 # include <limits.h>
18611 #else
18612 # include <assert.h>
18613 #endif
18614
18615 #undef $ac_func
18616
18617 /* Override any GCC internal prototype to avoid an error.
18618    Use char because int might match the return type of a GCC
18619    builtin and then its argument prototype would still apply.  */
18620 #ifdef __cplusplus
18621 extern "C"
18622 #endif
18623 char $ac_func ();
18624 /* The GNU C library defines this for functions which it implements
18625     to always fail with ENOSYS.  Some functions are actually named
18626     something starting with __ and the normal name is an alias.  */
18627 #if defined __stub_$ac_func || defined __stub___$ac_func
18628 choke me
18629 #endif
18630
18631 int
18632 main ()
18633 {
18634 return $ac_func ();
18635   ;
18636   return 0;
18637 }
18638 _ACEOF
18639 rm -f conftest.$ac_objext conftest$ac_exeext
18640 if { (ac_try="$ac_link"
18641 case "(($ac_try" in
18642   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18643   *) ac_try_echo=$ac_try;;
18644 esac
18645 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18646   (eval "$ac_link") 2>conftest.er1
18647   ac_status=$?
18648   grep -v '^ *+' conftest.er1 >conftest.err
18649   rm -f conftest.er1
18650   cat conftest.err >&5
18651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18652   (exit $ac_status); } && {
18653          test -z "$ac_c_werror_flag" ||
18654          test ! -s conftest.err
18655        } && test -s conftest$ac_exeext &&
18656        $as_test_x conftest$ac_exeext; then
18657   eval "$as_ac_var=yes"
18658 else
18659   echo "$as_me: failed program was:" >&5
18660 sed 's/^/| /' conftest.$ac_ext >&5
18661
18662         eval "$as_ac_var=no"
18663 fi
18664
18665 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18666       conftest$ac_exeext conftest.$ac_ext
18667 fi
18668 ac_res=`eval echo '${'$as_ac_var'}'`
18669                { echo "$as_me:$LINENO: result: $ac_res" >&5
18670 echo "${ECHO_T}$ac_res" >&6; }
18671 if test `eval echo '${'$as_ac_var'}'` = yes; then
18672   cat >>confdefs.h <<_ACEOF
18673 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18674 _ACEOF
18675
18676 fi
18677 done
18678
18679
18680 ol_link_ipv6=no
18681 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
18682         if test $ol_enable_ipv6 = yes ; then
18683                 { { echo "$as_me:$LINENO: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&5
18684 echo "$as_me: error: IPv6 support requires getaddrinfo() and inet_ntop()" >&2;}
18685    { (exit 1); exit 1; }; }
18686         fi
18687 elif test $ol_enable_ipv6 != no ; then
18688         { echo "$as_me:$LINENO: checking INET6_ADDRSTRLEN" >&5
18689 echo $ECHO_N "checking INET6_ADDRSTRLEN... $ECHO_C" >&6; }
18690 if test "${ol_cv_inet6_addrstrlen+set}" = set; then
18691   echo $ECHO_N "(cached) $ECHO_C" >&6
18692 else
18693
18694                 cat >conftest.$ac_ext <<_ACEOF
18695 /* confdefs.h.  */
18696 _ACEOF
18697 cat confdefs.h >>conftest.$ac_ext
18698 cat >>conftest.$ac_ext <<_ACEOF
18699 /* end confdefs.h.  */
18700
18701 #                       include <netinet/in.h>
18702 #                       ifdef INET6_ADDRSTRLEN
18703                                 __has_inet6_addrstrlen__;
18704 #                       endif
18705
18706 _ACEOF
18707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18708   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
18709   ol_cv_inet6_addrstrlen=yes
18710 else
18711   ol_cv_inet6_addrstrlen=no
18712 fi
18713 rm -f conftest*
18714
18715 fi
18716 { echo "$as_me:$LINENO: result: $ol_cv_inet6_addrstrlen" >&5
18717 echo "${ECHO_T}$ol_cv_inet6_addrstrlen" >&6; }
18718
18719
18720         { echo "$as_me:$LINENO: checking struct sockaddr_storage" >&5
18721 echo $ECHO_N "checking struct sockaddr_storage... $ECHO_C" >&6; }
18722 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then
18723   echo $ECHO_N "(cached) $ECHO_C" >&6
18724 else
18725
18726                 cat >conftest.$ac_ext <<_ACEOF
18727 /* confdefs.h.  */
18728 _ACEOF
18729 cat confdefs.h >>conftest.$ac_ext
18730 cat >>conftest.$ac_ext <<_ACEOF
18731 /* end confdefs.h.  */
18732
18733 #include <sys/types.h>
18734 #include <sys/socket.h>
18735
18736 int
18737 main ()
18738 {
18739
18740                         struct sockaddr_storage ss;
18741
18742   ;
18743   return 0;
18744 }
18745 _ACEOF
18746 rm -f conftest.$ac_objext
18747 if { (ac_try="$ac_compile"
18748 case "(($ac_try" in
18749   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18750   *) ac_try_echo=$ac_try;;
18751 esac
18752 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18753   (eval "$ac_compile") 2>conftest.er1
18754   ac_status=$?
18755   grep -v '^ *+' conftest.er1 >conftest.err
18756   rm -f conftest.er1
18757   cat conftest.err >&5
18758   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18759   (exit $ac_status); } && {
18760          test -z "$ac_c_werror_flag" ||
18761          test ! -s conftest.err
18762        } && test -s conftest.$ac_objext; then
18763   ol_cv_struct_sockaddr_storage=yes
18764 else
18765   echo "$as_me: failed program was:" >&5
18766 sed 's/^/| /' conftest.$ac_ext >&5
18767
18768         ol_cv_struct_sockaddr_storage=no
18769 fi
18770
18771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18772 fi
18773 { echo "$as_me:$LINENO: result: $ol_cv_struct_sockaddr_storage" >&5
18774 echo "${ECHO_T}$ol_cv_struct_sockaddr_storage" >&6; }
18775
18776         if test $ol_cv_inet6_addrstrlen = yes &&
18777            test $ol_cv_struct_sockaddr_storage = yes ; then
18778                 ol_link_ipv6=yes
18779         elif test $ol_enable_ipv6 = yes &&
18780              test $ol_cv_inet6_addrstrlen = no ; then
18781                 { { echo "$as_me:$LINENO: error: IPv6 support requires INET6_ADDRSTRLEN" >&5
18782 echo "$as_me: error: IPv6 support requires INET6_ADDRSTRLEN" >&2;}
18783    { (exit 1); exit 1; }; }
18784         elif test $ol_enable_ipv6 = yes &&
18785              test $ol_cv_struct_sockaddr_storage = no ; then
18786                 { { echo "$as_me:$LINENO: error: IPv6 support requires struct sockaddr_storage" >&5
18787 echo "$as_me: error: IPv6 support requires struct sockaddr_storage" >&2;}
18788    { (exit 1); exit 1; }; }
18789         fi
18790 fi
18791
18792 if test $ol_enable_local != no ; then
18793
18794 for ac_header in sys/un.h
18795 do
18796 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18797 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18798   { echo "$as_me:$LINENO: checking for $ac_header" >&5
18799 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18800 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18801   echo $ECHO_N "(cached) $ECHO_C" >&6
18802 fi
18803 ac_res=`eval echo '${'$as_ac_Header'}'`
18804                { echo "$as_me:$LINENO: result: $ac_res" >&5
18805 echo "${ECHO_T}$ac_res" >&6; }
18806 else
18807   # Is the header compilable?
18808 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
18809 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
18810 cat >conftest.$ac_ext <<_ACEOF
18811 /* confdefs.h.  */
18812 _ACEOF
18813 cat confdefs.h >>conftest.$ac_ext
18814 cat >>conftest.$ac_ext <<_ACEOF
18815 /* end confdefs.h.  */
18816 $ac_includes_default
18817 #include <$ac_header>
18818 _ACEOF
18819 rm -f conftest.$ac_objext
18820 if { (ac_try="$ac_compile"
18821 case "(($ac_try" in
18822   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18823   *) ac_try_echo=$ac_try;;
18824 esac
18825 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18826   (eval "$ac_compile") 2>conftest.er1
18827   ac_status=$?
18828   grep -v '^ *+' conftest.er1 >conftest.err
18829   rm -f conftest.er1
18830   cat conftest.err >&5
18831   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18832   (exit $ac_status); } && {
18833          test -z "$ac_c_werror_flag" ||
18834          test ! -s conftest.err
18835        } && test -s conftest.$ac_objext; then
18836   ac_header_compiler=yes
18837 else
18838   echo "$as_me: failed program was:" >&5
18839 sed 's/^/| /' conftest.$ac_ext >&5
18840
18841         ac_header_compiler=no
18842 fi
18843
18844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18845 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18846 echo "${ECHO_T}$ac_header_compiler" >&6; }
18847
18848 # Is the header present?
18849 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
18850 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
18851 cat >conftest.$ac_ext <<_ACEOF
18852 /* confdefs.h.  */
18853 _ACEOF
18854 cat confdefs.h >>conftest.$ac_ext
18855 cat >>conftest.$ac_ext <<_ACEOF
18856 /* end confdefs.h.  */
18857 #include <$ac_header>
18858 _ACEOF
18859 if { (ac_try="$ac_cpp conftest.$ac_ext"
18860 case "(($ac_try" in
18861   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18862   *) ac_try_echo=$ac_try;;
18863 esac
18864 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18865   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
18866   ac_status=$?
18867   grep -v '^ *+' conftest.er1 >conftest.err
18868   rm -f conftest.er1
18869   cat conftest.err >&5
18870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18871   (exit $ac_status); } >/dev/null && {
18872          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18873          test ! -s conftest.err
18874        }; then
18875   ac_header_preproc=yes
18876 else
18877   echo "$as_me: failed program was:" >&5
18878 sed 's/^/| /' conftest.$ac_ext >&5
18879
18880   ac_header_preproc=no
18881 fi
18882
18883 rm -f conftest.err conftest.$ac_ext
18884 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18885 echo "${ECHO_T}$ac_header_preproc" >&6; }
18886
18887 # So?  What about this header?
18888 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18889   yes:no: )
18890     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18891 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18892     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18893 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18894     ac_header_preproc=yes
18895     ;;
18896   no:yes:* )
18897     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18898 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18899     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
18900 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
18901     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18902 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18903     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
18904 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
18905     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18906 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18907     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18908 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
18909     ( cat <<\_ASBOX
18910 ## --------------------------------------------- ##
18911 ## Report this to <http://www.openldap.org/its/> ##
18912 ## --------------------------------------------- ##
18913 _ASBOX
18914      ) | sed "s/^/$as_me: WARNING:     /" >&2
18915     ;;
18916 esac
18917 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18918 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18919 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18920   echo $ECHO_N "(cached) $ECHO_C" >&6
18921 else
18922   eval "$as_ac_Header=\$ac_header_preproc"
18923 fi
18924 ac_res=`eval echo '${'$as_ac_Header'}'`
18925                { echo "$as_me:$LINENO: result: $ac_res" >&5
18926 echo "${ECHO_T}$ac_res" >&6; }
18927
18928 fi
18929 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18930   cat >>confdefs.h <<_ACEOF
18931 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18932 _ACEOF
18933
18934 fi
18935
18936 done
18937
18938
18939         if test $ol_enable_local = auto ; then
18940                 ol_enable_local=$ac_cv_header_sys_un_h
18941         elif test $ac_cv_header_sys_un_h = no ; then
18942                 { { echo "$as_me:$LINENO: error: AF_LOCAL domain support requires sys/un.h" >&5
18943 echo "$as_me: error: AF_LOCAL domain support requires sys/un.h" >&2;}
18944    { (exit 1); exit 1; }; }
18945         fi
18946 fi
18947
18948 ol_link_gssapi=no
18949
18950 case $ol_with_gssapi in yes | auto)
18951
18952         ol_header_gssapi=no
18953
18954 for ac_header in gssapi/gssapi.h
18955 do
18956 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18957 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18958   { echo "$as_me:$LINENO: checking for $ac_header" >&5
18959 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18960 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18961   echo $ECHO_N "(cached) $ECHO_C" >&6
18962 fi
18963 ac_res=`eval echo '${'$as_ac_Header'}'`
18964                { echo "$as_me:$LINENO: result: $ac_res" >&5
18965 echo "${ECHO_T}$ac_res" >&6; }
18966 else
18967   # Is the header compilable?
18968 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
18969 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
18970 cat >conftest.$ac_ext <<_ACEOF
18971 /* confdefs.h.  */
18972 _ACEOF
18973 cat confdefs.h >>conftest.$ac_ext
18974 cat >>conftest.$ac_ext <<_ACEOF
18975 /* end confdefs.h.  */
18976 $ac_includes_default
18977 #include <$ac_header>
18978 _ACEOF
18979 rm -f conftest.$ac_objext
18980 if { (ac_try="$ac_compile"
18981 case "(($ac_try" in
18982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18983   *) ac_try_echo=$ac_try;;
18984 esac
18985 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18986   (eval "$ac_compile") 2>conftest.er1
18987   ac_status=$?
18988   grep -v '^ *+' conftest.er1 >conftest.err
18989   rm -f conftest.er1
18990   cat conftest.err >&5
18991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
18992   (exit $ac_status); } && {
18993          test -z "$ac_c_werror_flag" ||
18994          test ! -s conftest.err
18995        } && test -s conftest.$ac_objext; then
18996   ac_header_compiler=yes
18997 else
18998   echo "$as_me: failed program was:" >&5
18999 sed 's/^/| /' conftest.$ac_ext >&5
19000
19001         ac_header_compiler=no
19002 fi
19003
19004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19005 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19006 echo "${ECHO_T}$ac_header_compiler" >&6; }
19007
19008 # Is the header present?
19009 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
19010 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
19011 cat >conftest.$ac_ext <<_ACEOF
19012 /* confdefs.h.  */
19013 _ACEOF
19014 cat confdefs.h >>conftest.$ac_ext
19015 cat >>conftest.$ac_ext <<_ACEOF
19016 /* end confdefs.h.  */
19017 #include <$ac_header>
19018 _ACEOF
19019 if { (ac_try="$ac_cpp conftest.$ac_ext"
19020 case "(($ac_try" in
19021   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19022   *) ac_try_echo=$ac_try;;
19023 esac
19024 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19025   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19026   ac_status=$?
19027   grep -v '^ *+' conftest.er1 >conftest.err
19028   rm -f conftest.er1
19029   cat conftest.err >&5
19030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19031   (exit $ac_status); } >/dev/null && {
19032          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19033          test ! -s conftest.err
19034        }; then
19035   ac_header_preproc=yes
19036 else
19037   echo "$as_me: failed program was:" >&5
19038 sed 's/^/| /' conftest.$ac_ext >&5
19039
19040   ac_header_preproc=no
19041 fi
19042
19043 rm -f conftest.err conftest.$ac_ext
19044 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19045 echo "${ECHO_T}$ac_header_preproc" >&6; }
19046
19047 # So?  What about this header?
19048 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19049   yes:no: )
19050     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19051 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19052     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19053 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19054     ac_header_preproc=yes
19055     ;;
19056   no:yes:* )
19057     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19058 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19059     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19060 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19061     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19062 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19063     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19064 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19065     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19066 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19067     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19068 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19069     ( cat <<\_ASBOX
19070 ## --------------------------------------------- ##
19071 ## Report this to <http://www.openldap.org/its/> ##
19072 ## --------------------------------------------- ##
19073 _ASBOX
19074      ) | sed "s/^/$as_me: WARNING:     /" >&2
19075     ;;
19076 esac
19077 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19078 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19079 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19080   echo $ECHO_N "(cached) $ECHO_C" >&6
19081 else
19082   eval "$as_ac_Header=\$ac_header_preproc"
19083 fi
19084 ac_res=`eval echo '${'$as_ac_Header'}'`
19085                { echo "$as_me:$LINENO: result: $ac_res" >&5
19086 echo "${ECHO_T}$ac_res" >&6; }
19087
19088 fi
19089 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19090   cat >>confdefs.h <<_ACEOF
19091 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19092 _ACEOF
19093
19094 fi
19095
19096 done
19097
19098         if test $ac_cv_header_gssapi_gssapi_h = yes ; then
19099                 ol_header_gssapi=yes
19100         else
19101
19102 for ac_header in gssapi.h
19103 do
19104 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19105 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19106   { echo "$as_me:$LINENO: checking for $ac_header" >&5
19107 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19108 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19109   echo $ECHO_N "(cached) $ECHO_C" >&6
19110 fi
19111 ac_res=`eval echo '${'$as_ac_Header'}'`
19112                { echo "$as_me:$LINENO: result: $ac_res" >&5
19113 echo "${ECHO_T}$ac_res" >&6; }
19114 else
19115   # Is the header compilable?
19116 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
19117 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
19118 cat >conftest.$ac_ext <<_ACEOF
19119 /* confdefs.h.  */
19120 _ACEOF
19121 cat confdefs.h >>conftest.$ac_ext
19122 cat >>conftest.$ac_ext <<_ACEOF
19123 /* end confdefs.h.  */
19124 $ac_includes_default
19125 #include <$ac_header>
19126 _ACEOF
19127 rm -f conftest.$ac_objext
19128 if { (ac_try="$ac_compile"
19129 case "(($ac_try" in
19130   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19131   *) ac_try_echo=$ac_try;;
19132 esac
19133 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19134   (eval "$ac_compile") 2>conftest.er1
19135   ac_status=$?
19136   grep -v '^ *+' conftest.er1 >conftest.err
19137   rm -f conftest.er1
19138   cat conftest.err >&5
19139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19140   (exit $ac_status); } && {
19141          test -z "$ac_c_werror_flag" ||
19142          test ! -s conftest.err
19143        } && test -s conftest.$ac_objext; then
19144   ac_header_compiler=yes
19145 else
19146   echo "$as_me: failed program was:" >&5
19147 sed 's/^/| /' conftest.$ac_ext >&5
19148
19149         ac_header_compiler=no
19150 fi
19151
19152 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19153 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19154 echo "${ECHO_T}$ac_header_compiler" >&6; }
19155
19156 # Is the header present?
19157 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
19158 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
19159 cat >conftest.$ac_ext <<_ACEOF
19160 /* confdefs.h.  */
19161 _ACEOF
19162 cat confdefs.h >>conftest.$ac_ext
19163 cat >>conftest.$ac_ext <<_ACEOF
19164 /* end confdefs.h.  */
19165 #include <$ac_header>
19166 _ACEOF
19167 if { (ac_try="$ac_cpp conftest.$ac_ext"
19168 case "(($ac_try" in
19169   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19170   *) ac_try_echo=$ac_try;;
19171 esac
19172 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19173   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19174   ac_status=$?
19175   grep -v '^ *+' conftest.er1 >conftest.err
19176   rm -f conftest.er1
19177   cat conftest.err >&5
19178   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19179   (exit $ac_status); } >/dev/null && {
19180          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19181          test ! -s conftest.err
19182        }; then
19183   ac_header_preproc=yes
19184 else
19185   echo "$as_me: failed program was:" >&5
19186 sed 's/^/| /' conftest.$ac_ext >&5
19187
19188   ac_header_preproc=no
19189 fi
19190
19191 rm -f conftest.err conftest.$ac_ext
19192 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19193 echo "${ECHO_T}$ac_header_preproc" >&6; }
19194
19195 # So?  What about this header?
19196 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19197   yes:no: )
19198     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19199 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19200     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19201 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19202     ac_header_preproc=yes
19203     ;;
19204   no:yes:* )
19205     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19206 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19207     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19208 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19209     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19210 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19211     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19212 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19213     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19214 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19215     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19216 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19217     ( cat <<\_ASBOX
19218 ## --------------------------------------------- ##
19219 ## Report this to <http://www.openldap.org/its/> ##
19220 ## --------------------------------------------- ##
19221 _ASBOX
19222      ) | sed "s/^/$as_me: WARNING:     /" >&2
19223     ;;
19224 esac
19225 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19226 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19227 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19228   echo $ECHO_N "(cached) $ECHO_C" >&6
19229 else
19230   eval "$as_ac_Header=\$ac_header_preproc"
19231 fi
19232 ac_res=`eval echo '${'$as_ac_Header'}'`
19233                { echo "$as_me:$LINENO: result: $ac_res" >&5
19234 echo "${ECHO_T}$ac_res" >&6; }
19235
19236 fi
19237 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19238   cat >>confdefs.h <<_ACEOF
19239 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19240 _ACEOF
19241
19242 fi
19243
19244 done
19245
19246                 if test $ac_cv_header_gssapi_h = yes ; then
19247                         ol_header_gssapi=yes
19248                 fi
19249
19250                                                                 saveLIBS="$LIBS"
19251                 LIBS="$LIBS $GSSAPI_LIBS"
19252
19253 for ac_func in gss_oid_to_str
19254 do
19255 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19256 { echo "$as_me:$LINENO: checking for $ac_func" >&5
19257 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19258 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19259   echo $ECHO_N "(cached) $ECHO_C" >&6
19260 else
19261   cat >conftest.$ac_ext <<_ACEOF
19262 /* confdefs.h.  */
19263 _ACEOF
19264 cat confdefs.h >>conftest.$ac_ext
19265 cat >>conftest.$ac_ext <<_ACEOF
19266 /* end confdefs.h.  */
19267 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19268    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
19269 #define $ac_func innocuous_$ac_func
19270
19271 /* System header to define __stub macros and hopefully few prototypes,
19272     which can conflict with char $ac_func (); below.
19273     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19274     <limits.h> exists even on freestanding compilers.  */
19275
19276 #ifdef __STDC__
19277 # include <limits.h>
19278 #else
19279 # include <assert.h>
19280 #endif
19281
19282 #undef $ac_func
19283
19284 /* Override any GCC internal prototype to avoid an error.
19285    Use char because int might match the return type of a GCC
19286    builtin and then its argument prototype would still apply.  */
19287 #ifdef __cplusplus
19288 extern "C"
19289 #endif
19290 char $ac_func ();
19291 /* The GNU C library defines this for functions which it implements
19292     to always fail with ENOSYS.  Some functions are actually named
19293     something starting with __ and the normal name is an alias.  */
19294 #if defined __stub_$ac_func || defined __stub___$ac_func
19295 choke me
19296 #endif
19297
19298 int
19299 main ()
19300 {
19301 return $ac_func ();
19302   ;
19303   return 0;
19304 }
19305 _ACEOF
19306 rm -f conftest.$ac_objext conftest$ac_exeext
19307 if { (ac_try="$ac_link"
19308 case "(($ac_try" in
19309   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19310   *) ac_try_echo=$ac_try;;
19311 esac
19312 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19313   (eval "$ac_link") 2>conftest.er1
19314   ac_status=$?
19315   grep -v '^ *+' conftest.er1 >conftest.err
19316   rm -f conftest.er1
19317   cat conftest.err >&5
19318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19319   (exit $ac_status); } && {
19320          test -z "$ac_c_werror_flag" ||
19321          test ! -s conftest.err
19322        } && test -s conftest$ac_exeext &&
19323        $as_test_x conftest$ac_exeext; then
19324   eval "$as_ac_var=yes"
19325 else
19326   echo "$as_me: failed program was:" >&5
19327 sed 's/^/| /' conftest.$ac_ext >&5
19328
19329         eval "$as_ac_var=no"
19330 fi
19331
19332 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19333       conftest$ac_exeext conftest.$ac_ext
19334 fi
19335 ac_res=`eval echo '${'$as_ac_var'}'`
19336                { echo "$as_me:$LINENO: result: $ac_res" >&5
19337 echo "${ECHO_T}$ac_res" >&6; }
19338 if test `eval echo '${'$as_ac_var'}'` = yes; then
19339   cat >>confdefs.h <<_ACEOF
19340 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19341 _ACEOF
19342
19343 fi
19344 done
19345
19346                 LIBS="$saveLIBS"
19347         fi
19348
19349         if test $ol_header_gssapi = yes ; then
19350                                                 { echo "$as_me:$LINENO: checking for gss_wrap in -lgssapi" >&5
19351 echo $ECHO_N "checking for gss_wrap in -lgssapi... $ECHO_C" >&6; }
19352 if test "${ac_cv_lib_gssapi_gss_wrap+set}" = set; then
19353   echo $ECHO_N "(cached) $ECHO_C" >&6
19354 else
19355   ac_check_lib_save_LIBS=$LIBS
19356 LIBS="-lgssapi  $LIBS"
19357 cat >conftest.$ac_ext <<_ACEOF
19358 /* confdefs.h.  */
19359 _ACEOF
19360 cat confdefs.h >>conftest.$ac_ext
19361 cat >>conftest.$ac_ext <<_ACEOF
19362 /* end confdefs.h.  */
19363
19364 /* Override any GCC internal prototype to avoid an error.
19365    Use char because int might match the return type of a GCC
19366    builtin and then its argument prototype would still apply.  */
19367 #ifdef __cplusplus
19368 extern "C"
19369 #endif
19370 char gss_wrap ();
19371 int
19372 main ()
19373 {
19374 return gss_wrap ();
19375   ;
19376   return 0;
19377 }
19378 _ACEOF
19379 rm -f conftest.$ac_objext conftest$ac_exeext
19380 if { (ac_try="$ac_link"
19381 case "(($ac_try" in
19382   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19383   *) ac_try_echo=$ac_try;;
19384 esac
19385 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19386   (eval "$ac_link") 2>conftest.er1
19387   ac_status=$?
19388   grep -v '^ *+' conftest.er1 >conftest.err
19389   rm -f conftest.er1
19390   cat conftest.err >&5
19391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19392   (exit $ac_status); } && {
19393          test -z "$ac_c_werror_flag" ||
19394          test ! -s conftest.err
19395        } && test -s conftest$ac_exeext &&
19396        $as_test_x conftest$ac_exeext; then
19397   ac_cv_lib_gssapi_gss_wrap=yes
19398 else
19399   echo "$as_me: failed program was:" >&5
19400 sed 's/^/| /' conftest.$ac_ext >&5
19401
19402         ac_cv_lib_gssapi_gss_wrap=no
19403 fi
19404
19405 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19406       conftest$ac_exeext conftest.$ac_ext
19407 LIBS=$ac_check_lib_save_LIBS
19408 fi
19409 { echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_wrap" >&5
19410 echo "${ECHO_T}$ac_cv_lib_gssapi_gss_wrap" >&6; }
19411 if test $ac_cv_lib_gssapi_gss_wrap = yes; then
19412   ol_link_gssapi=yes;GSSAPI_LIBS="-lgssapi"
19413 else
19414   ol_link_gssapi=no
19415 fi
19416
19417                 if test $ol_link_gssapi != yes ; then
19418                         { echo "$as_me:$LINENO: checking for gss_wrap in -lgssapi_krb5" >&5
19419 echo $ECHO_N "checking for gss_wrap in -lgssapi_krb5... $ECHO_C" >&6; }
19420 if test "${ac_cv_lib_gssapi_krb5_gss_wrap+set}" = set; then
19421   echo $ECHO_N "(cached) $ECHO_C" >&6
19422 else
19423   ac_check_lib_save_LIBS=$LIBS
19424 LIBS="-lgssapi_krb5  $LIBS"
19425 cat >conftest.$ac_ext <<_ACEOF
19426 /* confdefs.h.  */
19427 _ACEOF
19428 cat confdefs.h >>conftest.$ac_ext
19429 cat >>conftest.$ac_ext <<_ACEOF
19430 /* end confdefs.h.  */
19431
19432 /* Override any GCC internal prototype to avoid an error.
19433    Use char because int might match the return type of a GCC
19434    builtin and then its argument prototype would still apply.  */
19435 #ifdef __cplusplus
19436 extern "C"
19437 #endif
19438 char gss_wrap ();
19439 int
19440 main ()
19441 {
19442 return gss_wrap ();
19443   ;
19444   return 0;
19445 }
19446 _ACEOF
19447 rm -f conftest.$ac_objext conftest$ac_exeext
19448 if { (ac_try="$ac_link"
19449 case "(($ac_try" in
19450   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19451   *) ac_try_echo=$ac_try;;
19452 esac
19453 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19454   (eval "$ac_link") 2>conftest.er1
19455   ac_status=$?
19456   grep -v '^ *+' conftest.er1 >conftest.err
19457   rm -f conftest.er1
19458   cat conftest.err >&5
19459   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19460   (exit $ac_status); } && {
19461          test -z "$ac_c_werror_flag" ||
19462          test ! -s conftest.err
19463        } && test -s conftest$ac_exeext &&
19464        $as_test_x conftest$ac_exeext; then
19465   ac_cv_lib_gssapi_krb5_gss_wrap=yes
19466 else
19467   echo "$as_me: failed program was:" >&5
19468 sed 's/^/| /' conftest.$ac_ext >&5
19469
19470         ac_cv_lib_gssapi_krb5_gss_wrap=no
19471 fi
19472
19473 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19474       conftest$ac_exeext conftest.$ac_ext
19475 LIBS=$ac_check_lib_save_LIBS
19476 fi
19477 { echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_wrap" >&5
19478 echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_wrap" >&6; }
19479 if test $ac_cv_lib_gssapi_krb5_gss_wrap = yes; then
19480   ol_link_gssapi=yes;GSSAPI_LIBS="-lgssapi_krb5"
19481 else
19482   ol_link_gssapi=no
19483 fi
19484
19485                 fi
19486         fi
19487
19488         ;;
19489 esac
19490
19491 WITH_GSSAPI=no
19492 if test $ol_link_gssapi = yes; then
19493
19494 cat >>confdefs.h <<\_ACEOF
19495 #define HAVE_GSSAPI 1
19496 _ACEOF
19497
19498         WITH_GSSAPI=yes
19499 elif test $ol_with_gssapi = auto ; then
19500         { echo "$as_me:$LINENO: WARNING: Could not locate GSSAPI package" >&5
19501 echo "$as_me: WARNING: Could not locate GSSAPI package" >&2;}
19502         { echo "$as_me:$LINENO: WARNING: GSSAPI authentication not supported!" >&5
19503 echo "$as_me: WARNING: GSSAPI authentication not supported!" >&2;}
19504 elif test $ol_with_gssapi = yes ; then
19505         { { echo "$as_me:$LINENO: error: GSSAPI detection failed" >&5
19506 echo "$as_me: error: GSSAPI detection failed" >&2;}
19507    { (exit 1); exit 1; }; }
19508 fi
19509
19510
19511 if test $ol_with_tls = yes ; then
19512         ol_with_tls=auto
19513 fi
19514
19515 ol_link_tls=no
19516 if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
19517
19518 for ac_header in openssl/ssl.h
19519 do
19520 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19521 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19522   { echo "$as_me:$LINENO: checking for $ac_header" >&5
19523 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19524 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19525   echo $ECHO_N "(cached) $ECHO_C" >&6
19526 fi
19527 ac_res=`eval echo '${'$as_ac_Header'}'`
19528                { echo "$as_me:$LINENO: result: $ac_res" >&5
19529 echo "${ECHO_T}$ac_res" >&6; }
19530 else
19531   # Is the header compilable?
19532 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
19533 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
19534 cat >conftest.$ac_ext <<_ACEOF
19535 /* confdefs.h.  */
19536 _ACEOF
19537 cat confdefs.h >>conftest.$ac_ext
19538 cat >>conftest.$ac_ext <<_ACEOF
19539 /* end confdefs.h.  */
19540 $ac_includes_default
19541 #include <$ac_header>
19542 _ACEOF
19543 rm -f conftest.$ac_objext
19544 if { (ac_try="$ac_compile"
19545 case "(($ac_try" in
19546   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19547   *) ac_try_echo=$ac_try;;
19548 esac
19549 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19550   (eval "$ac_compile") 2>conftest.er1
19551   ac_status=$?
19552   grep -v '^ *+' conftest.er1 >conftest.err
19553   rm -f conftest.er1
19554   cat conftest.err >&5
19555   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19556   (exit $ac_status); } && {
19557          test -z "$ac_c_werror_flag" ||
19558          test ! -s conftest.err
19559        } && test -s conftest.$ac_objext; then
19560   ac_header_compiler=yes
19561 else
19562   echo "$as_me: failed program was:" >&5
19563 sed 's/^/| /' conftest.$ac_ext >&5
19564
19565         ac_header_compiler=no
19566 fi
19567
19568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19569 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19570 echo "${ECHO_T}$ac_header_compiler" >&6; }
19571
19572 # Is the header present?
19573 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
19574 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
19575 cat >conftest.$ac_ext <<_ACEOF
19576 /* confdefs.h.  */
19577 _ACEOF
19578 cat confdefs.h >>conftest.$ac_ext
19579 cat >>conftest.$ac_ext <<_ACEOF
19580 /* end confdefs.h.  */
19581 #include <$ac_header>
19582 _ACEOF
19583 if { (ac_try="$ac_cpp conftest.$ac_ext"
19584 case "(($ac_try" in
19585   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19586   *) ac_try_echo=$ac_try;;
19587 esac
19588 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19589   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19590   ac_status=$?
19591   grep -v '^ *+' conftest.er1 >conftest.err
19592   rm -f conftest.er1
19593   cat conftest.err >&5
19594   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19595   (exit $ac_status); } >/dev/null && {
19596          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19597          test ! -s conftest.err
19598        }; then
19599   ac_header_preproc=yes
19600 else
19601   echo "$as_me: failed program was:" >&5
19602 sed 's/^/| /' conftest.$ac_ext >&5
19603
19604   ac_header_preproc=no
19605 fi
19606
19607 rm -f conftest.err conftest.$ac_ext
19608 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19609 echo "${ECHO_T}$ac_header_preproc" >&6; }
19610
19611 # So?  What about this header?
19612 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19613   yes:no: )
19614     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19615 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19616     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19617 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19618     ac_header_preproc=yes
19619     ;;
19620   no:yes:* )
19621     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19622 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19623     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19624 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19625     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19626 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19627     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19628 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19629     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19630 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19631     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19632 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19633     ( cat <<\_ASBOX
19634 ## --------------------------------------------- ##
19635 ## Report this to <http://www.openldap.org/its/> ##
19636 ## --------------------------------------------- ##
19637 _ASBOX
19638      ) | sed "s/^/$as_me: WARNING:     /" >&2
19639     ;;
19640 esac
19641 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19642 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19643 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19644   echo $ECHO_N "(cached) $ECHO_C" >&6
19645 else
19646   eval "$as_ac_Header=\$ac_header_preproc"
19647 fi
19648 ac_res=`eval echo '${'$as_ac_Header'}'`
19649                { echo "$as_me:$LINENO: result: $ac_res" >&5
19650 echo "${ECHO_T}$ac_res" >&6; }
19651
19652 fi
19653 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19654   cat >>confdefs.h <<_ACEOF
19655 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19656 _ACEOF
19657
19658 fi
19659
19660 done
19661
19662
19663         if test $ac_cv_header_openssl_ssl_h = yes ; then
19664                 { echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
19665 echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6; }
19666 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
19667   echo $ECHO_N "(cached) $ECHO_C" >&6
19668 else
19669   ac_check_lib_save_LIBS=$LIBS
19670 LIBS="-lssl -lcrypto $LIBS"
19671 cat >conftest.$ac_ext <<_ACEOF
19672 /* confdefs.h.  */
19673 _ACEOF
19674 cat confdefs.h >>conftest.$ac_ext
19675 cat >>conftest.$ac_ext <<_ACEOF
19676 /* end confdefs.h.  */
19677
19678 /* Override any GCC internal prototype to avoid an error.
19679    Use char because int might match the return type of a GCC
19680    builtin and then its argument prototype would still apply.  */
19681 #ifdef __cplusplus
19682 extern "C"
19683 #endif
19684 char SSL_library_init ();
19685 int
19686 main ()
19687 {
19688 return SSL_library_init ();
19689   ;
19690   return 0;
19691 }
19692 _ACEOF
19693 rm -f conftest.$ac_objext conftest$ac_exeext
19694 if { (ac_try="$ac_link"
19695 case "(($ac_try" in
19696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19697   *) ac_try_echo=$ac_try;;
19698 esac
19699 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19700   (eval "$ac_link") 2>conftest.er1
19701   ac_status=$?
19702   grep -v '^ *+' conftest.er1 >conftest.err
19703   rm -f conftest.er1
19704   cat conftest.err >&5
19705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19706   (exit $ac_status); } && {
19707          test -z "$ac_c_werror_flag" ||
19708          test ! -s conftest.err
19709        } && test -s conftest$ac_exeext &&
19710        $as_test_x conftest$ac_exeext; then
19711   ac_cv_lib_ssl_SSL_library_init=yes
19712 else
19713   echo "$as_me: failed program was:" >&5
19714 sed 's/^/| /' conftest.$ac_ext >&5
19715
19716         ac_cv_lib_ssl_SSL_library_init=no
19717 fi
19718
19719 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19720       conftest$ac_exeext conftest.$ac_ext
19721 LIBS=$ac_check_lib_save_LIBS
19722 fi
19723 { echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
19724 echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6; }
19725 if test $ac_cv_lib_ssl_SSL_library_init = yes; then
19726   have_openssl=yes
19727                         need_rsaref=no
19728 else
19729   have_openssl=no
19730 fi
19731
19732
19733                 if test $have_openssl = no ; then
19734                         { echo "$as_me:$LINENO: checking for ssl3_accept in -lssl" >&5
19735 echo $ECHO_N "checking for ssl3_accept in -lssl... $ECHO_C" >&6; }
19736 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then
19737   echo $ECHO_N "(cached) $ECHO_C" >&6
19738 else
19739   ac_check_lib_save_LIBS=$LIBS
19740 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
19741 cat >conftest.$ac_ext <<_ACEOF
19742 /* confdefs.h.  */
19743 _ACEOF
19744 cat confdefs.h >>conftest.$ac_ext
19745 cat >>conftest.$ac_ext <<_ACEOF
19746 /* end confdefs.h.  */
19747
19748 /* Override any GCC internal prototype to avoid an error.
19749    Use char because int might match the return type of a GCC
19750    builtin and then its argument prototype would still apply.  */
19751 #ifdef __cplusplus
19752 extern "C"
19753 #endif
19754 char ssl3_accept ();
19755 int
19756 main ()
19757 {
19758 return ssl3_accept ();
19759   ;
19760   return 0;
19761 }
19762 _ACEOF
19763 rm -f conftest.$ac_objext conftest$ac_exeext
19764 if { (ac_try="$ac_link"
19765 case "(($ac_try" in
19766   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19767   *) ac_try_echo=$ac_try;;
19768 esac
19769 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19770   (eval "$ac_link") 2>conftest.er1
19771   ac_status=$?
19772   grep -v '^ *+' conftest.er1 >conftest.err
19773   rm -f conftest.er1
19774   cat conftest.err >&5
19775   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19776   (exit $ac_status); } && {
19777          test -z "$ac_c_werror_flag" ||
19778          test ! -s conftest.err
19779        } && test -s conftest$ac_exeext &&
19780        $as_test_x conftest$ac_exeext; then
19781   ac_cv_lib_ssl_ssl3_accept=yes
19782 else
19783   echo "$as_me: failed program was:" >&5
19784 sed 's/^/| /' conftest.$ac_ext >&5
19785
19786         ac_cv_lib_ssl_ssl3_accept=no
19787 fi
19788
19789 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19790       conftest$ac_exeext conftest.$ac_ext
19791 LIBS=$ac_check_lib_save_LIBS
19792 fi
19793 { echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ssl3_accept" >&5
19794 echo "${ECHO_T}$ac_cv_lib_ssl_ssl3_accept" >&6; }
19795 if test $ac_cv_lib_ssl_ssl3_accept = yes; then
19796   have_openssl=yes
19797                                 need_rsaref=yes
19798 else
19799   have_openssl=no
19800 fi
19801
19802                 fi
19803
19804                 if test $have_openssl = yes ; then
19805                         ol_with_tls=openssl
19806                         ol_link_tls=yes
19807
19808
19809 cat >>confdefs.h <<\_ACEOF
19810 #define HAVE_OPENSSL 1
19811 _ACEOF
19812
19813
19814                         if test $need_rsaref = yes; then
19815
19816 cat >>confdefs.h <<\_ACEOF
19817 #define HAVE_RSAREF 1
19818 _ACEOF
19819
19820
19821                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
19822                         else
19823                                 TLS_LIBS="-lssl -lcrypto"
19824                         fi
19825
19826                         { echo "$as_me:$LINENO: checking OpenSSL library version (CRL checking capability)" >&5
19827 echo $ECHO_N "checking OpenSSL library version (CRL checking capability)... $ECHO_C" >&6; }
19828 if test "${ol_cv_ssl_crl_compat+set}" = set; then
19829   echo $ECHO_N "(cached) $ECHO_C" >&6
19830 else
19831
19832                 cat >conftest.$ac_ext <<_ACEOF
19833 /* confdefs.h.  */
19834 _ACEOF
19835 cat confdefs.h >>conftest.$ac_ext
19836 cat >>conftest.$ac_ext <<_ACEOF
19837 /* end confdefs.h.  */
19838
19839 #ifdef HAVE_OPENSSL_SSL_H
19840 #include <openssl/ssl.h>
19841 #endif
19842
19843 /* Require 0.9.7d+ */
19844 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
19845         char *__ssl_compat = "0.9.7d";
19846 #endif
19847
19848 _ACEOF
19849 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19850   $EGREP "__ssl_compat" >/dev/null 2>&1; then
19851   ol_cv_ssl_crl_compat=yes
19852 else
19853   ol_cv_ssl_crl_compat=no
19854 fi
19855 rm -f conftest*
19856
19857 fi
19858 { echo "$as_me:$LINENO: result: $ol_cv_ssl_crl_compat" >&5
19859 echo "${ECHO_T}$ol_cv_ssl_crl_compat" >&6; }
19860
19861                         if test $ol_cv_ssl_crl_compat = yes ; then
19862
19863 cat >>confdefs.h <<\_ACEOF
19864 #define HAVE_OPENSSL_CRL 1
19865 _ACEOF
19866
19867                         fi
19868                 fi
19869         fi
19870 fi
19871
19872 if test $ol_link_tls = no ; then
19873         if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then
19874
19875 for ac_header in gnutls/gnutls.h
19876 do
19877 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19878 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19879   { echo "$as_me:$LINENO: checking for $ac_header" >&5
19880 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19881 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19882   echo $ECHO_N "(cached) $ECHO_C" >&6
19883 fi
19884 ac_res=`eval echo '${'$as_ac_Header'}'`
19885                { echo "$as_me:$LINENO: result: $ac_res" >&5
19886 echo "${ECHO_T}$ac_res" >&6; }
19887 else
19888   # Is the header compilable?
19889 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
19890 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
19891 cat >conftest.$ac_ext <<_ACEOF
19892 /* confdefs.h.  */
19893 _ACEOF
19894 cat confdefs.h >>conftest.$ac_ext
19895 cat >>conftest.$ac_ext <<_ACEOF
19896 /* end confdefs.h.  */
19897 $ac_includes_default
19898 #include <$ac_header>
19899 _ACEOF
19900 rm -f conftest.$ac_objext
19901 if { (ac_try="$ac_compile"
19902 case "(($ac_try" in
19903   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19904   *) ac_try_echo=$ac_try;;
19905 esac
19906 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19907   (eval "$ac_compile") 2>conftest.er1
19908   ac_status=$?
19909   grep -v '^ *+' conftest.er1 >conftest.err
19910   rm -f conftest.er1
19911   cat conftest.err >&5
19912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19913   (exit $ac_status); } && {
19914          test -z "$ac_c_werror_flag" ||
19915          test ! -s conftest.err
19916        } && test -s conftest.$ac_objext; then
19917   ac_header_compiler=yes
19918 else
19919   echo "$as_me: failed program was:" >&5
19920 sed 's/^/| /' conftest.$ac_ext >&5
19921
19922         ac_header_compiler=no
19923 fi
19924
19925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19926 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19927 echo "${ECHO_T}$ac_header_compiler" >&6; }
19928
19929 # Is the header present?
19930 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
19931 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
19932 cat >conftest.$ac_ext <<_ACEOF
19933 /* confdefs.h.  */
19934 _ACEOF
19935 cat confdefs.h >>conftest.$ac_ext
19936 cat >>conftest.$ac_ext <<_ACEOF
19937 /* end confdefs.h.  */
19938 #include <$ac_header>
19939 _ACEOF
19940 if { (ac_try="$ac_cpp conftest.$ac_ext"
19941 case "(($ac_try" in
19942   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19943   *) ac_try_echo=$ac_try;;
19944 esac
19945 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19946   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
19947   ac_status=$?
19948   grep -v '^ *+' conftest.er1 >conftest.err
19949   rm -f conftest.er1
19950   cat conftest.err >&5
19951   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19952   (exit $ac_status); } >/dev/null && {
19953          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19954          test ! -s conftest.err
19955        }; then
19956   ac_header_preproc=yes
19957 else
19958   echo "$as_me: failed program was:" >&5
19959 sed 's/^/| /' conftest.$ac_ext >&5
19960
19961   ac_header_preproc=no
19962 fi
19963
19964 rm -f conftest.err conftest.$ac_ext
19965 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19966 echo "${ECHO_T}$ac_header_preproc" >&6; }
19967
19968 # So?  What about this header?
19969 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19970   yes:no: )
19971     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19972 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19973     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19974 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19975     ac_header_preproc=yes
19976     ;;
19977   no:yes:* )
19978     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19979 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19980     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
19981 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
19982     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19983 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19984     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
19985 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
19986     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19987 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19988     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19989 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
19990     ( cat <<\_ASBOX
19991 ## --------------------------------------------- ##
19992 ## Report this to <http://www.openldap.org/its/> ##
19993 ## --------------------------------------------- ##
19994 _ASBOX
19995      ) | sed "s/^/$as_me: WARNING:     /" >&2
19996     ;;
19997 esac
19998 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19999 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20000 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20001   echo $ECHO_N "(cached) $ECHO_C" >&6
20002 else
20003   eval "$as_ac_Header=\$ac_header_preproc"
20004 fi
20005 ac_res=`eval echo '${'$as_ac_Header'}'`
20006                { echo "$as_me:$LINENO: result: $ac_res" >&5
20007 echo "${ECHO_T}$ac_res" >&6; }
20008
20009 fi
20010 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20011   cat >>confdefs.h <<_ACEOF
20012 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20013 _ACEOF
20014
20015 fi
20016
20017 done
20018
20019
20020                 if test $ac_cv_header_gnutls_gnutls_h = yes ; then
20021                         { echo "$as_me:$LINENO: checking for gnutls_init in -lgnutls" >&5
20022 echo $ECHO_N "checking for gnutls_init in -lgnutls... $ECHO_C" >&6; }
20023 if test "${ac_cv_lib_gnutls_gnutls_init+set}" = set; then
20024   echo $ECHO_N "(cached) $ECHO_C" >&6
20025 else
20026   ac_check_lib_save_LIBS=$LIBS
20027 LIBS="-lgnutls  $LIBS"
20028 cat >conftest.$ac_ext <<_ACEOF
20029 /* confdefs.h.  */
20030 _ACEOF
20031 cat confdefs.h >>conftest.$ac_ext
20032 cat >>conftest.$ac_ext <<_ACEOF
20033 /* end confdefs.h.  */
20034
20035 /* Override any GCC internal prototype to avoid an error.
20036    Use char because int might match the return type of a GCC
20037    builtin and then its argument prototype would still apply.  */
20038 #ifdef __cplusplus
20039 extern "C"
20040 #endif
20041 char gnutls_init ();
20042 int
20043 main ()
20044 {
20045 return gnutls_init ();
20046   ;
20047   return 0;
20048 }
20049 _ACEOF
20050 rm -f conftest.$ac_objext conftest$ac_exeext
20051 if { (ac_try="$ac_link"
20052 case "(($ac_try" in
20053   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20054   *) ac_try_echo=$ac_try;;
20055 esac
20056 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20057   (eval "$ac_link") 2>conftest.er1
20058   ac_status=$?
20059   grep -v '^ *+' conftest.er1 >conftest.err
20060   rm -f conftest.er1
20061   cat conftest.err >&5
20062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20063   (exit $ac_status); } && {
20064          test -z "$ac_c_werror_flag" ||
20065          test ! -s conftest.err
20066        } && test -s conftest$ac_exeext &&
20067        $as_test_x conftest$ac_exeext; then
20068   ac_cv_lib_gnutls_gnutls_init=yes
20069 else
20070   echo "$as_me: failed program was:" >&5
20071 sed 's/^/| /' conftest.$ac_ext >&5
20072
20073         ac_cv_lib_gnutls_gnutls_init=no
20074 fi
20075
20076 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20077       conftest$ac_exeext conftest.$ac_ext
20078 LIBS=$ac_check_lib_save_LIBS
20079 fi
20080 { echo "$as_me:$LINENO: result: $ac_cv_lib_gnutls_gnutls_init" >&5
20081 echo "${ECHO_T}$ac_cv_lib_gnutls_gnutls_init" >&6; }
20082 if test $ac_cv_lib_gnutls_gnutls_init = yes; then
20083   have_gnutls=yes
20084 else
20085   have_gnutls=no
20086 fi
20087
20088
20089                         if test $have_gnutls = yes ; then
20090                                 ol_with_tls=gnutls
20091                                 ol_link_tls=yes
20092
20093                                 TLS_LIBS="-lgnutls"
20094
20095
20096 cat >>confdefs.h <<\_ACEOF
20097 #define HAVE_GNUTLS 1
20098 _ACEOF
20099
20100                         fi
20101                 fi
20102         fi
20103 fi
20104
20105 WITH_TLS=no
20106 if test $ol_link_tls = yes ; then
20107
20108 cat >>confdefs.h <<\_ACEOF
20109 #define HAVE_TLS 1
20110 _ACEOF
20111
20112         WITH_TLS=yes
20113 elif test $ol_with_tls = auto ; then
20114         { echo "$as_me:$LINENO: WARNING: Could not locate TLS/SSL package" >&5
20115 echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
20116         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
20117 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
20118 elif test $ol_with_tls != no ; then
20119         { { echo "$as_me:$LINENO: error: Could not locate TLS/SSL package" >&5
20120 echo "$as_me: error: Could not locate TLS/SSL package" >&2;}
20121    { (exit 1); exit 1; }; }
20122 else
20123         { echo "$as_me:$LINENO: WARNING: TLS data protection not supported!" >&5
20124 echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
20125 fi
20126
20127 if test $ol_enable_lmpasswd != no; then
20128         if test $ol_link_tls != yes ; then
20129                 { { echo "$as_me:$LINENO: error: LAN Manager passwords require OpenSSL" >&5
20130 echo "$as_me: error: LAN Manager passwords require OpenSSL" >&2;}
20131    { (exit 1); exit 1; }; }
20132         fi
20133
20134
20135 cat >>confdefs.h <<\_ACEOF
20136 #define SLAPD_LMHASH 1
20137 _ACEOF
20138
20139 fi
20140
20141 ol_link_threads=no
20142
20143 case $ol_with_threads in auto | yes | nt)
20144
20145
20146         { echo "$as_me:$LINENO: checking for _beginthread" >&5
20147 echo $ECHO_N "checking for _beginthread... $ECHO_C" >&6; }
20148 if test "${ac_cv_func__beginthread+set}" = set; then
20149   echo $ECHO_N "(cached) $ECHO_C" >&6
20150 else
20151   cat >conftest.$ac_ext <<_ACEOF
20152 /* confdefs.h.  */
20153 _ACEOF
20154 cat confdefs.h >>conftest.$ac_ext
20155 cat >>conftest.$ac_ext <<_ACEOF
20156 /* end confdefs.h.  */
20157 /* Define _beginthread to an innocuous variant, in case <limits.h> declares _beginthread.
20158    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
20159 #define _beginthread innocuous__beginthread
20160
20161 /* System header to define __stub macros and hopefully few prototypes,
20162     which can conflict with char _beginthread (); below.
20163     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20164     <limits.h> exists even on freestanding compilers.  */
20165
20166 #ifdef __STDC__
20167 # include <limits.h>
20168 #else
20169 # include <assert.h>
20170 #endif
20171
20172 #undef _beginthread
20173
20174 /* Override any GCC internal prototype to avoid an error.
20175    Use char because int might match the return type of a GCC
20176    builtin and then its argument prototype would still apply.  */
20177 #ifdef __cplusplus
20178 extern "C"
20179 #endif
20180 char _beginthread ();
20181 /* The GNU C library defines this for functions which it implements
20182     to always fail with ENOSYS.  Some functions are actually named
20183     something starting with __ and the normal name is an alias.  */
20184 #if defined __stub__beginthread || defined __stub____beginthread
20185 choke me
20186 #endif
20187
20188 int
20189 main ()
20190 {
20191 return _beginthread ();
20192   ;
20193   return 0;
20194 }
20195 _ACEOF
20196 rm -f conftest.$ac_objext conftest$ac_exeext
20197 if { (ac_try="$ac_link"
20198 case "(($ac_try" in
20199   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20200   *) ac_try_echo=$ac_try;;
20201 esac
20202 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20203   (eval "$ac_link") 2>conftest.er1
20204   ac_status=$?
20205   grep -v '^ *+' conftest.er1 >conftest.err
20206   rm -f conftest.er1
20207   cat conftest.err >&5
20208   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20209   (exit $ac_status); } && {
20210          test -z "$ac_c_werror_flag" ||
20211          test ! -s conftest.err
20212        } && test -s conftest$ac_exeext &&
20213        $as_test_x conftest$ac_exeext; then
20214   ac_cv_func__beginthread=yes
20215 else
20216   echo "$as_me: failed program was:" >&5
20217 sed 's/^/| /' conftest.$ac_ext >&5
20218
20219         ac_cv_func__beginthread=no
20220 fi
20221
20222 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20223       conftest$ac_exeext conftest.$ac_ext
20224 fi
20225 { echo "$as_me:$LINENO: result: $ac_cv_func__beginthread" >&5
20226 echo "${ECHO_T}$ac_cv_func__beginthread" >&6; }
20227
20228
20229         if test $ac_cv_func__beginthread = yes ; then
20230
20231 cat >>confdefs.h <<\_ACEOF
20232 #define HAVE_NT_THREADS 1
20233 _ACEOF
20234
20235                 ol_cv_nt_threads=yes
20236         fi
20237
20238
20239         if test "$ol_cv_nt_threads" = yes ; then
20240                 ol_link_threads=nt
20241                 ol_with_threads=found
20242                 ol_with_yielding_select=yes
20243
20244
20245 cat >>confdefs.h <<\_ACEOF
20246 #define HAVE_NT_SERVICE_MANAGER 1
20247 _ACEOF
20248
20249
20250 cat >>confdefs.h <<\_ACEOF
20251 #define HAVE_NT_EVENT_LOG 1
20252 _ACEOF
20253
20254         fi
20255
20256         if test $ol_with_threads = nt ; then
20257                 { { echo "$as_me:$LINENO: error: could not locate NT Threads" >&5
20258 echo "$as_me: error: could not locate NT Threads" >&2;}
20259    { (exit 1); exit 1; }; }
20260         fi
20261         ;;
20262 esac
20263
20264 case $ol_with_threads in auto | yes | posix)
20265
20266
20267 for ac_header in pthread.h
20268 do
20269 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20270 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20271   { echo "$as_me:$LINENO: checking for $ac_header" >&5
20272 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20273 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20274   echo $ECHO_N "(cached) $ECHO_C" >&6
20275 fi
20276 ac_res=`eval echo '${'$as_ac_Header'}'`
20277                { echo "$as_me:$LINENO: result: $ac_res" >&5
20278 echo "${ECHO_T}$ac_res" >&6; }
20279 else
20280   # Is the header compilable?
20281 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
20282 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
20283 cat >conftest.$ac_ext <<_ACEOF
20284 /* confdefs.h.  */
20285 _ACEOF
20286 cat confdefs.h >>conftest.$ac_ext
20287 cat >>conftest.$ac_ext <<_ACEOF
20288 /* end confdefs.h.  */
20289 $ac_includes_default
20290 #include <$ac_header>
20291 _ACEOF
20292 rm -f conftest.$ac_objext
20293 if { (ac_try="$ac_compile"
20294 case "(($ac_try" in
20295   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20296   *) ac_try_echo=$ac_try;;
20297 esac
20298 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20299   (eval "$ac_compile") 2>conftest.er1
20300   ac_status=$?
20301   grep -v '^ *+' conftest.er1 >conftest.err
20302   rm -f conftest.er1
20303   cat conftest.err >&5
20304   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20305   (exit $ac_status); } && {
20306          test -z "$ac_c_werror_flag" ||
20307          test ! -s conftest.err
20308        } && test -s conftest.$ac_objext; then
20309   ac_header_compiler=yes
20310 else
20311   echo "$as_me: failed program was:" >&5
20312 sed 's/^/| /' conftest.$ac_ext >&5
20313
20314         ac_header_compiler=no
20315 fi
20316
20317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20318 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20319 echo "${ECHO_T}$ac_header_compiler" >&6; }
20320
20321 # Is the header present?
20322 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
20323 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
20324 cat >conftest.$ac_ext <<_ACEOF
20325 /* confdefs.h.  */
20326 _ACEOF
20327 cat confdefs.h >>conftest.$ac_ext
20328 cat >>conftest.$ac_ext <<_ACEOF
20329 /* end confdefs.h.  */
20330 #include <$ac_header>
20331 _ACEOF
20332 if { (ac_try="$ac_cpp conftest.$ac_ext"
20333 case "(($ac_try" in
20334   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20335   *) ac_try_echo=$ac_try;;
20336 esac
20337 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20338   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20339   ac_status=$?
20340   grep -v '^ *+' conftest.er1 >conftest.err
20341   rm -f conftest.er1
20342   cat conftest.err >&5
20343   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20344   (exit $ac_status); } >/dev/null && {
20345          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20346          test ! -s conftest.err
20347        }; then
20348   ac_header_preproc=yes
20349 else
20350   echo "$as_me: failed program was:" >&5
20351 sed 's/^/| /' conftest.$ac_ext >&5
20352
20353   ac_header_preproc=no
20354 fi
20355
20356 rm -f conftest.err conftest.$ac_ext
20357 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20358 echo "${ECHO_T}$ac_header_preproc" >&6; }
20359
20360 # So?  What about this header?
20361 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20362   yes:no: )
20363     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20364 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20365     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20366 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20367     ac_header_preproc=yes
20368     ;;
20369   no:yes:* )
20370     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20371 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20372     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
20373 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
20374     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20375 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20376     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
20377 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
20378     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20379 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20380     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20381 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20382     ( cat <<\_ASBOX
20383 ## --------------------------------------------- ##
20384 ## Report this to <http://www.openldap.org/its/> ##
20385 ## --------------------------------------------- ##
20386 _ASBOX
20387      ) | sed "s/^/$as_me: WARNING:     /" >&2
20388     ;;
20389 esac
20390 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20391 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20392 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20393   echo $ECHO_N "(cached) $ECHO_C" >&6
20394 else
20395   eval "$as_ac_Header=\$ac_header_preproc"
20396 fi
20397 ac_res=`eval echo '${'$as_ac_Header'}'`
20398                { echo "$as_me:$LINENO: result: $ac_res" >&5
20399 echo "${ECHO_T}$ac_res" >&6; }
20400
20401 fi
20402 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20403   cat >>confdefs.h <<_ACEOF
20404 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20405 _ACEOF
20406
20407 fi
20408
20409 done
20410
20411
20412         if test $ac_cv_header_pthread_h = yes ; then
20413                 { echo "$as_me:$LINENO: checking POSIX thread version" >&5
20414 echo $ECHO_N "checking POSIX thread version... $ECHO_C" >&6; }
20415 if test "${ol_cv_pthread_version+set}" = set; then
20416   echo $ECHO_N "(cached) $ECHO_C" >&6
20417 else
20418
20419         cat >conftest.$ac_ext <<_ACEOF
20420 /* confdefs.h.  */
20421 _ACEOF
20422 cat confdefs.h >>conftest.$ac_ext
20423 cat >>conftest.$ac_ext <<_ACEOF
20424 /* end confdefs.h.  */
20425
20426 #               include <pthread.h>
20427
20428 int
20429 main ()
20430 {
20431
20432                 int i = PTHREAD_CREATE_JOINABLE;
20433
20434   ;
20435   return 0;
20436 }
20437 _ACEOF
20438 rm -f conftest.$ac_objext
20439 if { (ac_try="$ac_compile"
20440 case "(($ac_try" in
20441   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20442   *) ac_try_echo=$ac_try;;
20443 esac
20444 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20445   (eval "$ac_compile") 2>conftest.er1
20446   ac_status=$?
20447   grep -v '^ *+' conftest.er1 >conftest.err
20448   rm -f conftest.er1
20449   cat conftest.err >&5
20450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20451   (exit $ac_status); } && {
20452          test -z "$ac_c_werror_flag" ||
20453          test ! -s conftest.err
20454        } && test -s conftest.$ac_objext; then
20455
20456         cat >conftest.$ac_ext <<_ACEOF
20457 /* confdefs.h.  */
20458 _ACEOF
20459 cat confdefs.h >>conftest.$ac_ext
20460 cat >>conftest.$ac_ext <<_ACEOF
20461 /* end confdefs.h.  */
20462 #include <pthread.h>
20463
20464 _ACEOF
20465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20466   $EGREP "pthread_detach" >/dev/null 2>&1; then
20467   ol_cv_pthread_version=10
20468 else
20469   ol_cv_pthread_version=8
20470 fi
20471 rm -f conftest*
20472
20473 else
20474   echo "$as_me: failed program was:" >&5
20475 sed 's/^/| /' conftest.$ac_ext >&5
20476
20477
20478         cat >conftest.$ac_ext <<_ACEOF
20479 /* confdefs.h.  */
20480 _ACEOF
20481 cat confdefs.h >>conftest.$ac_ext
20482 cat >>conftest.$ac_ext <<_ACEOF
20483 /* end confdefs.h.  */
20484
20485 #               include <pthread.h>
20486 #               ifdef PTHREAD_CREATE_UNDETACHED
20487                 draft7
20488 #               endif
20489
20490 _ACEOF
20491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20492   $EGREP "draft7" >/dev/null 2>&1; then
20493   ol_cv_pthread_version=7
20494 else
20495
20496         cat >conftest.$ac_ext <<_ACEOF
20497 /* confdefs.h.  */
20498 _ACEOF
20499 cat confdefs.h >>conftest.$ac_ext
20500 cat >>conftest.$ac_ext <<_ACEOF
20501 /* end confdefs.h.  */
20502 #include <pthread.h>
20503
20504 _ACEOF
20505 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20506   $EGREP "pthread_attr_init" >/dev/null 2>&1; then
20507   ol_cv_pthread_version=6
20508 else
20509
20510         cat >conftest.$ac_ext <<_ACEOF
20511 /* confdefs.h.  */
20512 _ACEOF
20513 cat confdefs.h >>conftest.$ac_ext
20514 cat >>conftest.$ac_ext <<_ACEOF
20515 /* end confdefs.h.  */
20516
20517 #               include <pthread.h>
20518 #ifdef          PTHREAD_MUTEX_INITIALIZER
20519                 draft5
20520 #endif
20521
20522 _ACEOF
20523 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20524   $EGREP "draft5" >/dev/null 2>&1; then
20525   ol_cv_pthread_version=5
20526 else
20527   ol_cv_pthread_version=4
20528 fi
20529 rm -f conftest*
20530
20531 fi
20532 rm -f conftest*
20533
20534 fi
20535 rm -f conftest*
20536
20537 fi
20538
20539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20540
20541 fi
20542 { echo "$as_me:$LINENO: result: $ol_cv_pthread_version" >&5
20543 echo "${ECHO_T}$ol_cv_pthread_version" >&6; }
20544
20545
20546                 if test $ol_cv_pthread_version != 0 ; then
20547
20548 cat >>confdefs.h <<_ACEOF
20549 #define HAVE_PTHREADS $ol_cv_pthread_version
20550 _ACEOF
20551
20552                 else
20553                         { { echo "$as_me:$LINENO: error: unknown pthread version" >&5
20554 echo "$as_me: error: unknown pthread version" >&2;}
20555    { (exit 1); exit 1; }; }
20556                 fi
20557
20558                 # consider threads found
20559                 ol_with_threads=found
20560
20561
20562         { echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
20563 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6; }
20564 if test "${ol_cv_header_linux_threads+set}" = set; then
20565   echo $ECHO_N "(cached) $ECHO_C" >&6
20566 else
20567   cat >conftest.$ac_ext <<_ACEOF
20568 /* confdefs.h.  */
20569 _ACEOF
20570 cat confdefs.h >>conftest.$ac_ext
20571 cat >>conftest.$ac_ext <<_ACEOF
20572 /* end confdefs.h.  */
20573 #include <pthread.h>
20574 _ACEOF
20575 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20576   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
20577   ol_cv_header_linux_threads=yes
20578 else
20579   ol_cv_header_linux_threads=no
20580 fi
20581 rm -f conftest*
20582
20583
20584 fi
20585 { echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
20586 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6; }
20587         if test $ol_cv_header_linux_threads = yes; then
20588
20589 cat >>confdefs.h <<\_ACEOF
20590 #define HAVE_LINUX_THREADS 1
20591 _ACEOF
20592
20593         fi
20594
20595
20596         { echo "$as_me:$LINENO: checking for GNU Pth pthread.h" >&5
20597 echo $ECHO_N "checking for GNU Pth pthread.h... $ECHO_C" >&6; }
20598 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then
20599   echo $ECHO_N "(cached) $ECHO_C" >&6
20600 else
20601   cat >conftest.$ac_ext <<_ACEOF
20602 /* confdefs.h.  */
20603 _ACEOF
20604 cat confdefs.h >>conftest.$ac_ext
20605 cat >>conftest.$ac_ext <<_ACEOF
20606 /* end confdefs.h.  */
20607 #include <pthread.h>
20608 #ifdef _POSIX_THREAD_IS_GNU_PTH
20609         __gnu_pth__;
20610 #endif
20611
20612 _ACEOF
20613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20614   $EGREP "__gnu_pth__" >/dev/null 2>&1; then
20615   ol_cv_header_gnu_pth_pthread_h=yes
20616 else
20617   ol_cv_header_gnu_pth_pthread_h=no
20618 fi
20619 rm -f conftest*
20620
20621
20622 fi
20623 { echo "$as_me:$LINENO: result: $ol_cv_header_gnu_pth_pthread_h" >&5
20624 echo "${ECHO_T}$ol_cv_header_gnu_pth_pthread_h" >&6; }
20625
20626
20627                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
20628
20629 for ac_header in sched.h
20630 do
20631 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20632 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20633   { echo "$as_me:$LINENO: checking for $ac_header" >&5
20634 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20635 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20636   echo $ECHO_N "(cached) $ECHO_C" >&6
20637 fi
20638 ac_res=`eval echo '${'$as_ac_Header'}'`
20639                { echo "$as_me:$LINENO: result: $ac_res" >&5
20640 echo "${ECHO_T}$ac_res" >&6; }
20641 else
20642   # Is the header compilable?
20643 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
20644 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
20645 cat >conftest.$ac_ext <<_ACEOF
20646 /* confdefs.h.  */
20647 _ACEOF
20648 cat confdefs.h >>conftest.$ac_ext
20649 cat >>conftest.$ac_ext <<_ACEOF
20650 /* end confdefs.h.  */
20651 $ac_includes_default
20652 #include <$ac_header>
20653 _ACEOF
20654 rm -f conftest.$ac_objext
20655 if { (ac_try="$ac_compile"
20656 case "(($ac_try" in
20657   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20658   *) ac_try_echo=$ac_try;;
20659 esac
20660 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20661   (eval "$ac_compile") 2>conftest.er1
20662   ac_status=$?
20663   grep -v '^ *+' conftest.er1 >conftest.err
20664   rm -f conftest.er1
20665   cat conftest.err >&5
20666   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20667   (exit $ac_status); } && {
20668          test -z "$ac_c_werror_flag" ||
20669          test ! -s conftest.err
20670        } && test -s conftest.$ac_objext; then
20671   ac_header_compiler=yes
20672 else
20673   echo "$as_me: failed program was:" >&5
20674 sed 's/^/| /' conftest.$ac_ext >&5
20675
20676         ac_header_compiler=no
20677 fi
20678
20679 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20680 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20681 echo "${ECHO_T}$ac_header_compiler" >&6; }
20682
20683 # Is the header present?
20684 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
20685 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
20686 cat >conftest.$ac_ext <<_ACEOF
20687 /* confdefs.h.  */
20688 _ACEOF
20689 cat confdefs.h >>conftest.$ac_ext
20690 cat >>conftest.$ac_ext <<_ACEOF
20691 /* end confdefs.h.  */
20692 #include <$ac_header>
20693 _ACEOF
20694 if { (ac_try="$ac_cpp conftest.$ac_ext"
20695 case "(($ac_try" in
20696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20697   *) ac_try_echo=$ac_try;;
20698 esac
20699 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20700   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20701   ac_status=$?
20702   grep -v '^ *+' conftest.er1 >conftest.err
20703   rm -f conftest.er1
20704   cat conftest.err >&5
20705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20706   (exit $ac_status); } >/dev/null && {
20707          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20708          test ! -s conftest.err
20709        }; then
20710   ac_header_preproc=yes
20711 else
20712   echo "$as_me: failed program was:" >&5
20713 sed 's/^/| /' conftest.$ac_ext >&5
20714
20715   ac_header_preproc=no
20716 fi
20717
20718 rm -f conftest.err conftest.$ac_ext
20719 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20720 echo "${ECHO_T}$ac_header_preproc" >&6; }
20721
20722 # So?  What about this header?
20723 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20724   yes:no: )
20725     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20726 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20727     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20728 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20729     ac_header_preproc=yes
20730     ;;
20731   no:yes:* )
20732     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20733 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20734     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
20735 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
20736     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20737 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20738     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
20739 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
20740     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20741 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20742     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20743 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20744     ( cat <<\_ASBOX
20745 ## --------------------------------------------- ##
20746 ## Report this to <http://www.openldap.org/its/> ##
20747 ## --------------------------------------------- ##
20748 _ASBOX
20749      ) | sed "s/^/$as_me: WARNING:     /" >&2
20750     ;;
20751 esac
20752 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20753 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20754 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20755   echo $ECHO_N "(cached) $ECHO_C" >&6
20756 else
20757   eval "$as_ac_Header=\$ac_header_preproc"
20758 fi
20759 ac_res=`eval echo '${'$as_ac_Header'}'`
20760                { echo "$as_me:$LINENO: result: $ac_res" >&5
20761 echo "${ECHO_T}$ac_res" >&6; }
20762
20763 fi
20764 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20765   cat >>confdefs.h <<_ACEOF
20766 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20767 _ACEOF
20768
20769 fi
20770
20771 done
20772
20773                 fi
20774
20775
20776                                 { echo "$as_me:$LINENO: checking for pthread_create in default libraries" >&5
20777 echo $ECHO_N "checking for pthread_create in default libraries... $ECHO_C" >&6; }
20778 if test "${ol_cv_pthread_create+set}" = set; then
20779   echo $ECHO_N "(cached) $ECHO_C" >&6
20780 else
20781
20782                         if test "$cross_compiling" = yes; then
20783   cat >conftest.$ac_ext <<_ACEOF
20784 /* confdefs.h.  */
20785 _ACEOF
20786 cat confdefs.h >>conftest.$ac_ext
20787 cat >>conftest.$ac_ext <<_ACEOF
20788 /* end confdefs.h.  */
20789
20790 /* pthread test headers */
20791 #include <pthread.h>
20792 #if HAVE_PTHREADS < 7
20793 #include <errno.h>
20794 #endif
20795 #ifndef NULL
20796 #define NULL (void*)0
20797 #endif
20798
20799 static void *task(p)
20800         void *p;
20801 {
20802         return (void *) (p == NULL);
20803 }
20804
20805 int
20806 main ()
20807 {
20808
20809         /* pthread test function */
20810 #ifndef PTHREAD_CREATE_DETACHED
20811 #define PTHREAD_CREATE_DETACHED 1
20812 #endif
20813         pthread_t t;
20814         int status;
20815         int detach = PTHREAD_CREATE_DETACHED;
20816
20817 #if HAVE_PTHREADS > 4
20818         /* Final pthreads */
20819         pthread_attr_t attr;
20820
20821         status = pthread_attr_init(&attr);
20822         if( status ) return status;
20823
20824 #if HAVE_PTHREADS < 7
20825         status = pthread_attr_setdetachstate(&attr, &detach);
20826         if( status < 0 ) status = errno;
20827 #else
20828         status = pthread_attr_setdetachstate(&attr, detach);
20829 #endif
20830         if( status ) return status;
20831         status = pthread_create( &t, &attr, task, NULL );
20832 #if HAVE_PTHREADS < 7
20833         if( status < 0 ) status = errno;
20834 #endif
20835         if( status ) return status;
20836 #else
20837         /* Draft 4 pthreads */
20838         status = pthread_create( &t, pthread_attr_default, task, NULL );
20839         if( status ) return errno;
20840
20841         /* give thread a chance to complete */
20842         /* it should remain joinable and hence detachable */
20843         sleep( 1 );
20844
20845         status = pthread_detach( &t );
20846         if( status ) return errno;
20847 #endif
20848
20849 #ifdef HAVE_LINUX_THREADS
20850         pthread_kill_other_threads_np();
20851 #endif
20852
20853         return 0;
20854
20855   ;
20856   return 0;
20857 }
20858 _ACEOF
20859 rm -f conftest.$ac_objext conftest$ac_exeext
20860 if { (ac_try="$ac_link"
20861 case "(($ac_try" in
20862   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20863   *) ac_try_echo=$ac_try;;
20864 esac
20865 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20866   (eval "$ac_link") 2>conftest.er1
20867   ac_status=$?
20868   grep -v '^ *+' conftest.er1 >conftest.err
20869   rm -f conftest.er1
20870   cat conftest.err >&5
20871   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20872   (exit $ac_status); } && {
20873          test -z "$ac_c_werror_flag" ||
20874          test ! -s conftest.err
20875        } && test -s conftest$ac_exeext &&
20876        $as_test_x conftest$ac_exeext; then
20877   ol_cv_pthread_create=yes
20878 else
20879   echo "$as_me: failed program was:" >&5
20880 sed 's/^/| /' conftest.$ac_ext >&5
20881
20882         ol_cv_pthread_create=no
20883 fi
20884
20885 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20886       conftest$ac_exeext conftest.$ac_ext
20887 else
20888   cat >conftest.$ac_ext <<_ACEOF
20889 /* confdefs.h.  */
20890 _ACEOF
20891 cat confdefs.h >>conftest.$ac_ext
20892 cat >>conftest.$ac_ext <<_ACEOF
20893 /* end confdefs.h.  */
20894
20895 /* pthread test headers */
20896 #include <pthread.h>
20897 #if HAVE_PTHREADS < 7
20898 #include <errno.h>
20899 #endif
20900 #ifndef NULL
20901 #define NULL (void*)0
20902 #endif
20903
20904 static void *task(p)
20905         void *p;
20906 {
20907         return (void *) (p == NULL);
20908 }
20909
20910
20911 int main(argc, argv)
20912         int argc;
20913         char **argv;
20914 {
20915
20916         /* pthread test function */
20917 #ifndef PTHREAD_CREATE_DETACHED
20918 #define PTHREAD_CREATE_DETACHED 1
20919 #endif
20920         pthread_t t;
20921         int status;
20922         int detach = PTHREAD_CREATE_DETACHED;
20923
20924 #if HAVE_PTHREADS > 4
20925         /* Final pthreads */
20926         pthread_attr_t attr;
20927
20928         status = pthread_attr_init(&attr);
20929         if( status ) return status;
20930
20931 #if HAVE_PTHREADS < 7
20932         status = pthread_attr_setdetachstate(&attr, &detach);
20933         if( status < 0 ) status = errno;
20934 #else
20935         status = pthread_attr_setdetachstate(&attr, detach);
20936 #endif
20937         if( status ) return status;
20938         status = pthread_create( &t, &attr, task, NULL );
20939 #if HAVE_PTHREADS < 7
20940         if( status < 0 ) status = errno;
20941 #endif
20942         if( status ) return status;
20943 #else
20944         /* Draft 4 pthreads */
20945         status = pthread_create( &t, pthread_attr_default, task, NULL );
20946         if( status ) return errno;
20947
20948         /* give thread a chance to complete */
20949         /* it should remain joinable and hence detachable */
20950         sleep( 1 );
20951
20952         status = pthread_detach( &t );
20953         if( status ) return errno;
20954 #endif
20955
20956 #ifdef HAVE_LINUX_THREADS
20957         pthread_kill_other_threads_np();
20958 #endif
20959
20960         return 0;
20961
20962 }
20963
20964 _ACEOF
20965 rm -f conftest$ac_exeext
20966 if { (ac_try="$ac_link"
20967 case "(($ac_try" in
20968   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20969   *) ac_try_echo=$ac_try;;
20970 esac
20971 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20972   (eval "$ac_link") 2>&5
20973   ac_status=$?
20974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20975   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20976   { (case "(($ac_try" in
20977   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20978   *) ac_try_echo=$ac_try;;
20979 esac
20980 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20981   (eval "$ac_try") 2>&5
20982   ac_status=$?
20983   echo "$as_me:$LINENO: \$? = $ac_status" >&5
20984   (exit $ac_status); }; }; then
20985   ol_cv_pthread_create=yes
20986 else
20987   echo "$as_me: program exited with status $ac_status" >&5
20988 echo "$as_me: failed program was:" >&5
20989 sed 's/^/| /' conftest.$ac_ext >&5
20990
20991 ( exit $ac_status )
20992 ol_cv_pthread_create=no
20993 fi
20994 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20995 fi
20996
20997
20998 fi
20999 { echo "$as_me:$LINENO: result: $ol_cv_pthread_create" >&5
21000 echo "${ECHO_T}$ol_cv_pthread_create" >&6; }
21001
21002                 if test $ol_cv_pthread_create != no ; then
21003                         ol_link_threads=posix
21004                         ol_link_pthreads=""
21005                 fi
21006
21007                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
21008 if test "$ol_link_threads" = no ; then
21009         # try -kthread
21010         { echo "$as_me:$LINENO: checking for pthread link with -kthread" >&5
21011 echo $ECHO_N "checking for pthread link with -kthread... $ECHO_C" >&6; }
21012 if test "${ol_cv_pthread_kthread+set}" = set; then
21013   echo $ECHO_N "(cached) $ECHO_C" >&6
21014 else
21015
21016                 # save the flags
21017                 ol_LIBS="$LIBS"
21018                 LIBS="-kthread $LIBS"
21019
21020                 if test "$cross_compiling" = yes; then
21021   cat >conftest.$ac_ext <<_ACEOF
21022 /* confdefs.h.  */
21023 _ACEOF
21024 cat confdefs.h >>conftest.$ac_ext
21025 cat >>conftest.$ac_ext <<_ACEOF
21026 /* end confdefs.h.  */
21027
21028 /* pthread test headers */
21029 #include <pthread.h>
21030 #if HAVE_PTHREADS < 7
21031 #include <errno.h>
21032 #endif
21033 #ifndef NULL
21034 #define NULL (void*)0
21035 #endif
21036
21037 static void *task(p)
21038         void *p;
21039 {
21040         return (void *) (p == NULL);
21041 }
21042
21043 int
21044 main ()
21045 {
21046
21047         /* pthread test function */
21048 #ifndef PTHREAD_CREATE_DETACHED
21049 #define PTHREAD_CREATE_DETACHED 1
21050 #endif
21051         pthread_t t;
21052         int status;
21053         int detach = PTHREAD_CREATE_DETACHED;
21054
21055 #if HAVE_PTHREADS > 4
21056         /* Final pthreads */
21057         pthread_attr_t attr;
21058
21059         status = pthread_attr_init(&attr);
21060         if( status ) return status;
21061
21062 #if HAVE_PTHREADS < 7
21063         status = pthread_attr_setdetachstate(&attr, &detach);
21064         if( status < 0 ) status = errno;
21065 #else
21066         status = pthread_attr_setdetachstate(&attr, detach);
21067 #endif
21068         if( status ) return status;
21069         status = pthread_create( &t, &attr, task, NULL );
21070 #if HAVE_PTHREADS < 7
21071         if( status < 0 ) status = errno;
21072 #endif
21073         if( status ) return status;
21074 #else
21075         /* Draft 4 pthreads */
21076         status = pthread_create( &t, pthread_attr_default, task, NULL );
21077         if( status ) return errno;
21078
21079         /* give thread a chance to complete */
21080         /* it should remain joinable and hence detachable */
21081         sleep( 1 );
21082
21083         status = pthread_detach( &t );
21084         if( status ) return errno;
21085 #endif
21086
21087 #ifdef HAVE_LINUX_THREADS
21088         pthread_kill_other_threads_np();
21089 #endif
21090
21091         return 0;
21092
21093   ;
21094   return 0;
21095 }
21096 _ACEOF
21097 rm -f conftest.$ac_objext conftest$ac_exeext
21098 if { (ac_try="$ac_link"
21099 case "(($ac_try" in
21100   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21101   *) ac_try_echo=$ac_try;;
21102 esac
21103 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21104   (eval "$ac_link") 2>conftest.er1
21105   ac_status=$?
21106   grep -v '^ *+' conftest.er1 >conftest.err
21107   rm -f conftest.er1
21108   cat conftest.err >&5
21109   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21110   (exit $ac_status); } && {
21111          test -z "$ac_c_werror_flag" ||
21112          test ! -s conftest.err
21113        } && test -s conftest$ac_exeext &&
21114        $as_test_x conftest$ac_exeext; then
21115   ol_cv_pthread_kthread=yes
21116 else
21117   echo "$as_me: failed program was:" >&5
21118 sed 's/^/| /' conftest.$ac_ext >&5
21119
21120         ol_cv_pthread_kthread=no
21121 fi
21122
21123 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21124       conftest$ac_exeext conftest.$ac_ext
21125 else
21126   cat >conftest.$ac_ext <<_ACEOF
21127 /* confdefs.h.  */
21128 _ACEOF
21129 cat confdefs.h >>conftest.$ac_ext
21130 cat >>conftest.$ac_ext <<_ACEOF
21131 /* end confdefs.h.  */
21132
21133 /* pthread test headers */
21134 #include <pthread.h>
21135 #if HAVE_PTHREADS < 7
21136 #include <errno.h>
21137 #endif
21138 #ifndef NULL
21139 #define NULL (void*)0
21140 #endif
21141
21142 static void *task(p)
21143         void *p;
21144 {
21145         return (void *) (p == NULL);
21146 }
21147
21148
21149 int main(argc, argv)
21150         int argc;
21151         char **argv;
21152 {
21153
21154         /* pthread test function */
21155 #ifndef PTHREAD_CREATE_DETACHED
21156 #define PTHREAD_CREATE_DETACHED 1
21157 #endif
21158         pthread_t t;
21159         int status;
21160         int detach = PTHREAD_CREATE_DETACHED;
21161
21162 #if HAVE_PTHREADS > 4
21163         /* Final pthreads */
21164         pthread_attr_t attr;
21165
21166         status = pthread_attr_init(&attr);
21167         if( status ) return status;
21168
21169 #if HAVE_PTHREADS < 7
21170         status = pthread_attr_setdetachstate(&attr, &detach);
21171         if( status < 0 ) status = errno;
21172 #else
21173         status = pthread_attr_setdetachstate(&attr, detach);
21174 #endif
21175         if( status ) return status;
21176         status = pthread_create( &t, &attr, task, NULL );
21177 #if HAVE_PTHREADS < 7
21178         if( status < 0 ) status = errno;
21179 #endif
21180         if( status ) return status;
21181 #else
21182         /* Draft 4 pthreads */
21183         status = pthread_create( &t, pthread_attr_default, task, NULL );
21184         if( status ) return errno;
21185
21186         /* give thread a chance to complete */
21187         /* it should remain joinable and hence detachable */
21188         sleep( 1 );
21189
21190         status = pthread_detach( &t );
21191         if( status ) return errno;
21192 #endif
21193
21194 #ifdef HAVE_LINUX_THREADS
21195         pthread_kill_other_threads_np();
21196 #endif
21197
21198         return 0;
21199
21200 }
21201
21202 _ACEOF
21203 rm -f conftest$ac_exeext
21204 if { (ac_try="$ac_link"
21205 case "(($ac_try" in
21206   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21207   *) ac_try_echo=$ac_try;;
21208 esac
21209 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21210   (eval "$ac_link") 2>&5
21211   ac_status=$?
21212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21213   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21214   { (case "(($ac_try" in
21215   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21216   *) ac_try_echo=$ac_try;;
21217 esac
21218 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21219   (eval "$ac_try") 2>&5
21220   ac_status=$?
21221   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21222   (exit $ac_status); }; }; then
21223   ol_cv_pthread_kthread=yes
21224 else
21225   echo "$as_me: program exited with status $ac_status" >&5
21226 echo "$as_me: failed program was:" >&5
21227 sed 's/^/| /' conftest.$ac_ext >&5
21228
21229 ( exit $ac_status )
21230 ol_cv_pthread_kthread=no
21231 fi
21232 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21233 fi
21234
21235
21236
21237                 # restore the LIBS
21238                 LIBS="$ol_LIBS"
21239
21240 fi
21241 { echo "$as_me:$LINENO: result: $ol_cv_pthread_kthread" >&5
21242 echo "${ECHO_T}$ol_cv_pthread_kthread" >&6; }
21243
21244         if test $ol_cv_pthread_kthread = yes ; then
21245                 ol_link_pthreads="-kthread"
21246                 ol_link_threads=posix
21247         fi
21248 fi
21249
21250                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
21251 if test "$ol_link_threads" = no ; then
21252         # try -pthread
21253         { echo "$as_me:$LINENO: checking for pthread link with -pthread" >&5
21254 echo $ECHO_N "checking for pthread link with -pthread... $ECHO_C" >&6; }
21255 if test "${ol_cv_pthread_pthread+set}" = set; then
21256   echo $ECHO_N "(cached) $ECHO_C" >&6
21257 else
21258
21259                 # save the flags
21260                 ol_LIBS="$LIBS"
21261                 LIBS="-pthread $LIBS"
21262
21263                 if test "$cross_compiling" = yes; then
21264   cat >conftest.$ac_ext <<_ACEOF
21265 /* confdefs.h.  */
21266 _ACEOF
21267 cat confdefs.h >>conftest.$ac_ext
21268 cat >>conftest.$ac_ext <<_ACEOF
21269 /* end confdefs.h.  */
21270
21271 /* pthread test headers */
21272 #include <pthread.h>
21273 #if HAVE_PTHREADS < 7
21274 #include <errno.h>
21275 #endif
21276 #ifndef NULL
21277 #define NULL (void*)0
21278 #endif
21279
21280 static void *task(p)
21281         void *p;
21282 {
21283         return (void *) (p == NULL);
21284 }
21285
21286 int
21287 main ()
21288 {
21289
21290         /* pthread test function */
21291 #ifndef PTHREAD_CREATE_DETACHED
21292 #define PTHREAD_CREATE_DETACHED 1
21293 #endif
21294         pthread_t t;
21295         int status;
21296         int detach = PTHREAD_CREATE_DETACHED;
21297
21298 #if HAVE_PTHREADS > 4
21299         /* Final pthreads */
21300         pthread_attr_t attr;
21301
21302         status = pthread_attr_init(&attr);
21303         if( status ) return status;
21304
21305 #if HAVE_PTHREADS < 7
21306         status = pthread_attr_setdetachstate(&attr, &detach);
21307         if( status < 0 ) status = errno;
21308 #else
21309         status = pthread_attr_setdetachstate(&attr, detach);
21310 #endif
21311         if( status ) return status;
21312         status = pthread_create( &t, &attr, task, NULL );
21313 #if HAVE_PTHREADS < 7
21314         if( status < 0 ) status = errno;
21315 #endif
21316         if( status ) return status;
21317 #else
21318         /* Draft 4 pthreads */
21319         status = pthread_create( &t, pthread_attr_default, task, NULL );
21320         if( status ) return errno;
21321
21322         /* give thread a chance to complete */
21323         /* it should remain joinable and hence detachable */
21324         sleep( 1 );
21325
21326         status = pthread_detach( &t );
21327         if( status ) return errno;
21328 #endif
21329
21330 #ifdef HAVE_LINUX_THREADS
21331         pthread_kill_other_threads_np();
21332 #endif
21333
21334         return 0;
21335
21336   ;
21337   return 0;
21338 }
21339 _ACEOF
21340 rm -f conftest.$ac_objext conftest$ac_exeext
21341 if { (ac_try="$ac_link"
21342 case "(($ac_try" in
21343   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21344   *) ac_try_echo=$ac_try;;
21345 esac
21346 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21347   (eval "$ac_link") 2>conftest.er1
21348   ac_status=$?
21349   grep -v '^ *+' conftest.er1 >conftest.err
21350   rm -f conftest.er1
21351   cat conftest.err >&5
21352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21353   (exit $ac_status); } && {
21354          test -z "$ac_c_werror_flag" ||
21355          test ! -s conftest.err
21356        } && test -s conftest$ac_exeext &&
21357        $as_test_x conftest$ac_exeext; then
21358   ol_cv_pthread_pthread=yes
21359 else
21360   echo "$as_me: failed program was:" >&5
21361 sed 's/^/| /' conftest.$ac_ext >&5
21362
21363         ol_cv_pthread_pthread=no
21364 fi
21365
21366 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21367       conftest$ac_exeext conftest.$ac_ext
21368 else
21369   cat >conftest.$ac_ext <<_ACEOF
21370 /* confdefs.h.  */
21371 _ACEOF
21372 cat confdefs.h >>conftest.$ac_ext
21373 cat >>conftest.$ac_ext <<_ACEOF
21374 /* end confdefs.h.  */
21375
21376 /* pthread test headers */
21377 #include <pthread.h>
21378 #if HAVE_PTHREADS < 7
21379 #include <errno.h>
21380 #endif
21381 #ifndef NULL
21382 #define NULL (void*)0
21383 #endif
21384
21385 static void *task(p)
21386         void *p;
21387 {
21388         return (void *) (p == NULL);
21389 }
21390
21391
21392 int main(argc, argv)
21393         int argc;
21394         char **argv;
21395 {
21396
21397         /* pthread test function */
21398 #ifndef PTHREAD_CREATE_DETACHED
21399 #define PTHREAD_CREATE_DETACHED 1
21400 #endif
21401         pthread_t t;
21402         int status;
21403         int detach = PTHREAD_CREATE_DETACHED;
21404
21405 #if HAVE_PTHREADS > 4
21406         /* Final pthreads */
21407         pthread_attr_t attr;
21408
21409         status = pthread_attr_init(&attr);
21410         if( status ) return status;
21411
21412 #if HAVE_PTHREADS < 7
21413         status = pthread_attr_setdetachstate(&attr, &detach);
21414         if( status < 0 ) status = errno;
21415 #else
21416         status = pthread_attr_setdetachstate(&attr, detach);
21417 #endif
21418         if( status ) return status;
21419         status = pthread_create( &t, &attr, task, NULL );
21420 #if HAVE_PTHREADS < 7
21421         if( status < 0 ) status = errno;
21422 #endif
21423         if( status ) return status;
21424 #else
21425         /* Draft 4 pthreads */
21426         status = pthread_create( &t, pthread_attr_default, task, NULL );
21427         if( status ) return errno;
21428
21429         /* give thread a chance to complete */
21430         /* it should remain joinable and hence detachable */
21431         sleep( 1 );
21432
21433         status = pthread_detach( &t );
21434         if( status ) return errno;
21435 #endif
21436
21437 #ifdef HAVE_LINUX_THREADS
21438         pthread_kill_other_threads_np();
21439 #endif
21440
21441         return 0;
21442
21443 }
21444
21445 _ACEOF
21446 rm -f conftest$ac_exeext
21447 if { (ac_try="$ac_link"
21448 case "(($ac_try" in
21449   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21450   *) ac_try_echo=$ac_try;;
21451 esac
21452 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21453   (eval "$ac_link") 2>&5
21454   ac_status=$?
21455   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21456   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21457   { (case "(($ac_try" in
21458   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21459   *) ac_try_echo=$ac_try;;
21460 esac
21461 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21462   (eval "$ac_try") 2>&5
21463   ac_status=$?
21464   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21465   (exit $ac_status); }; }; then
21466   ol_cv_pthread_pthread=yes
21467 else
21468   echo "$as_me: program exited with status $ac_status" >&5
21469 echo "$as_me: failed program was:" >&5
21470 sed 's/^/| /' conftest.$ac_ext >&5
21471
21472 ( exit $ac_status )
21473 ol_cv_pthread_pthread=no
21474 fi
21475 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21476 fi
21477
21478
21479
21480                 # restore the LIBS
21481                 LIBS="$ol_LIBS"
21482
21483 fi
21484 { echo "$as_me:$LINENO: result: $ol_cv_pthread_pthread" >&5
21485 echo "${ECHO_T}$ol_cv_pthread_pthread" >&6; }
21486
21487         if test $ol_cv_pthread_pthread = yes ; then
21488                 ol_link_pthreads="-pthread"
21489                 ol_link_threads=posix
21490         fi
21491 fi
21492
21493                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
21494 if test "$ol_link_threads" = no ; then
21495         # try -pthreads
21496         { echo "$as_me:$LINENO: checking for pthread link with -pthreads" >&5
21497 echo $ECHO_N "checking for pthread link with -pthreads... $ECHO_C" >&6; }
21498 if test "${ol_cv_pthread_pthreads+set}" = set; then
21499   echo $ECHO_N "(cached) $ECHO_C" >&6
21500 else
21501
21502                 # save the flags
21503                 ol_LIBS="$LIBS"
21504                 LIBS="-pthreads $LIBS"
21505
21506                 if test "$cross_compiling" = yes; then
21507   cat >conftest.$ac_ext <<_ACEOF
21508 /* confdefs.h.  */
21509 _ACEOF
21510 cat confdefs.h >>conftest.$ac_ext
21511 cat >>conftest.$ac_ext <<_ACEOF
21512 /* end confdefs.h.  */
21513
21514 /* pthread test headers */
21515 #include <pthread.h>
21516 #if HAVE_PTHREADS < 7
21517 #include <errno.h>
21518 #endif
21519 #ifndef NULL
21520 #define NULL (void*)0
21521 #endif
21522
21523 static void *task(p)
21524         void *p;
21525 {
21526         return (void *) (p == NULL);
21527 }
21528
21529 int
21530 main ()
21531 {
21532
21533         /* pthread test function */
21534 #ifndef PTHREAD_CREATE_DETACHED
21535 #define PTHREAD_CREATE_DETACHED 1
21536 #endif
21537         pthread_t t;
21538         int status;
21539         int detach = PTHREAD_CREATE_DETACHED;
21540
21541 #if HAVE_PTHREADS > 4
21542         /* Final pthreads */
21543         pthread_attr_t attr;
21544
21545         status = pthread_attr_init(&attr);
21546         if( status ) return status;
21547
21548 #if HAVE_PTHREADS < 7
21549         status = pthread_attr_setdetachstate(&attr, &detach);
21550         if( status < 0 ) status = errno;
21551 #else
21552         status = pthread_attr_setdetachstate(&attr, detach);
21553 #endif
21554         if( status ) return status;
21555         status = pthread_create( &t, &attr, task, NULL );
21556 #if HAVE_PTHREADS < 7
21557         if( status < 0 ) status = errno;
21558 #endif
21559         if( status ) return status;
21560 #else
21561         /* Draft 4 pthreads */
21562         status = pthread_create( &t, pthread_attr_default, task, NULL );
21563         if( status ) return errno;
21564
21565         /* give thread a chance to complete */
21566         /* it should remain joinable and hence detachable */
21567         sleep( 1 );
21568
21569         status = pthread_detach( &t );
21570         if( status ) return errno;
21571 #endif
21572
21573 #ifdef HAVE_LINUX_THREADS
21574         pthread_kill_other_threads_np();
21575 #endif
21576
21577         return 0;
21578
21579   ;
21580   return 0;
21581 }
21582 _ACEOF
21583 rm -f conftest.$ac_objext conftest$ac_exeext
21584 if { (ac_try="$ac_link"
21585 case "(($ac_try" in
21586   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21587   *) ac_try_echo=$ac_try;;
21588 esac
21589 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21590   (eval "$ac_link") 2>conftest.er1
21591   ac_status=$?
21592   grep -v '^ *+' conftest.er1 >conftest.err
21593   rm -f conftest.er1
21594   cat conftest.err >&5
21595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21596   (exit $ac_status); } && {
21597          test -z "$ac_c_werror_flag" ||
21598          test ! -s conftest.err
21599        } && test -s conftest$ac_exeext &&
21600        $as_test_x conftest$ac_exeext; then
21601   ol_cv_pthread_pthreads=yes
21602 else
21603   echo "$as_me: failed program was:" >&5
21604 sed 's/^/| /' conftest.$ac_ext >&5
21605
21606         ol_cv_pthread_pthreads=no
21607 fi
21608
21609 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21610       conftest$ac_exeext conftest.$ac_ext
21611 else
21612   cat >conftest.$ac_ext <<_ACEOF
21613 /* confdefs.h.  */
21614 _ACEOF
21615 cat confdefs.h >>conftest.$ac_ext
21616 cat >>conftest.$ac_ext <<_ACEOF
21617 /* end confdefs.h.  */
21618
21619 /* pthread test headers */
21620 #include <pthread.h>
21621 #if HAVE_PTHREADS < 7
21622 #include <errno.h>
21623 #endif
21624 #ifndef NULL
21625 #define NULL (void*)0
21626 #endif
21627
21628 static void *task(p)
21629         void *p;
21630 {
21631         return (void *) (p == NULL);
21632 }
21633
21634
21635 int main(argc, argv)
21636         int argc;
21637         char **argv;
21638 {
21639
21640         /* pthread test function */
21641 #ifndef PTHREAD_CREATE_DETACHED
21642 #define PTHREAD_CREATE_DETACHED 1
21643 #endif
21644         pthread_t t;
21645         int status;
21646         int detach = PTHREAD_CREATE_DETACHED;
21647
21648 #if HAVE_PTHREADS > 4
21649         /* Final pthreads */
21650         pthread_attr_t attr;
21651
21652         status = pthread_attr_init(&attr);
21653         if( status ) return status;
21654
21655 #if HAVE_PTHREADS < 7
21656         status = pthread_attr_setdetachstate(&attr, &detach);
21657         if( status < 0 ) status = errno;
21658 #else
21659         status = pthread_attr_setdetachstate(&attr, detach);
21660 #endif
21661         if( status ) return status;
21662         status = pthread_create( &t, &attr, task, NULL );
21663 #if HAVE_PTHREADS < 7
21664         if( status < 0 ) status = errno;
21665 #endif
21666         if( status ) return status;
21667 #else
21668         /* Draft 4 pthreads */
21669         status = pthread_create( &t, pthread_attr_default, task, NULL );
21670         if( status ) return errno;
21671
21672         /* give thread a chance to complete */
21673         /* it should remain joinable and hence detachable */
21674         sleep( 1 );
21675
21676         status = pthread_detach( &t );
21677         if( status ) return errno;
21678 #endif
21679
21680 #ifdef HAVE_LINUX_THREADS
21681         pthread_kill_other_threads_np();
21682 #endif
21683
21684         return 0;
21685
21686 }
21687
21688 _ACEOF
21689 rm -f conftest$ac_exeext
21690 if { (ac_try="$ac_link"
21691 case "(($ac_try" in
21692   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21693   *) ac_try_echo=$ac_try;;
21694 esac
21695 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21696   (eval "$ac_link") 2>&5
21697   ac_status=$?
21698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21699   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21700   { (case "(($ac_try" in
21701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21702   *) ac_try_echo=$ac_try;;
21703 esac
21704 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21705   (eval "$ac_try") 2>&5
21706   ac_status=$?
21707   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21708   (exit $ac_status); }; }; then
21709   ol_cv_pthread_pthreads=yes
21710 else
21711   echo "$as_me: program exited with status $ac_status" >&5
21712 echo "$as_me: failed program was:" >&5
21713 sed 's/^/| /' conftest.$ac_ext >&5
21714
21715 ( exit $ac_status )
21716 ol_cv_pthread_pthreads=no
21717 fi
21718 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21719 fi
21720
21721
21722
21723                 # restore the LIBS
21724                 LIBS="$ol_LIBS"
21725
21726 fi
21727 { echo "$as_me:$LINENO: result: $ol_cv_pthread_pthreads" >&5
21728 echo "${ECHO_T}$ol_cv_pthread_pthreads" >&6; }
21729
21730         if test $ol_cv_pthread_pthreads = yes ; then
21731                 ol_link_pthreads="-pthreads"
21732                 ol_link_threads=posix
21733         fi
21734 fi
21735
21736                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
21737 if test "$ol_link_threads" = no ; then
21738         # try -mthreads
21739         { echo "$as_me:$LINENO: checking for pthread link with -mthreads" >&5
21740 echo $ECHO_N "checking for pthread link with -mthreads... $ECHO_C" >&6; }
21741 if test "${ol_cv_pthread_mthreads+set}" = set; then
21742   echo $ECHO_N "(cached) $ECHO_C" >&6
21743 else
21744
21745                 # save the flags
21746                 ol_LIBS="$LIBS"
21747                 LIBS="-mthreads $LIBS"
21748
21749                 if test "$cross_compiling" = yes; then
21750   cat >conftest.$ac_ext <<_ACEOF
21751 /* confdefs.h.  */
21752 _ACEOF
21753 cat confdefs.h >>conftest.$ac_ext
21754 cat >>conftest.$ac_ext <<_ACEOF
21755 /* end confdefs.h.  */
21756
21757 /* pthread test headers */
21758 #include <pthread.h>
21759 #if HAVE_PTHREADS < 7
21760 #include <errno.h>
21761 #endif
21762 #ifndef NULL
21763 #define NULL (void*)0
21764 #endif
21765
21766 static void *task(p)
21767         void *p;
21768 {
21769         return (void *) (p == NULL);
21770 }
21771
21772 int
21773 main ()
21774 {
21775
21776         /* pthread test function */
21777 #ifndef PTHREAD_CREATE_DETACHED
21778 #define PTHREAD_CREATE_DETACHED 1
21779 #endif
21780         pthread_t t;
21781         int status;
21782         int detach = PTHREAD_CREATE_DETACHED;
21783
21784 #if HAVE_PTHREADS > 4
21785         /* Final pthreads */
21786         pthread_attr_t attr;
21787
21788         status = pthread_attr_init(&attr);
21789         if( status ) return status;
21790
21791 #if HAVE_PTHREADS < 7
21792         status = pthread_attr_setdetachstate(&attr, &detach);
21793         if( status < 0 ) status = errno;
21794 #else
21795         status = pthread_attr_setdetachstate(&attr, detach);
21796 #endif
21797         if( status ) return status;
21798         status = pthread_create( &t, &attr, task, NULL );
21799 #if HAVE_PTHREADS < 7
21800         if( status < 0 ) status = errno;
21801 #endif
21802         if( status ) return status;
21803 #else
21804         /* Draft 4 pthreads */
21805         status = pthread_create( &t, pthread_attr_default, task, NULL );
21806         if( status ) return errno;
21807
21808         /* give thread a chance to complete */
21809         /* it should remain joinable and hence detachable */
21810         sleep( 1 );
21811
21812         status = pthread_detach( &t );
21813         if( status ) return errno;
21814 #endif
21815
21816 #ifdef HAVE_LINUX_THREADS
21817         pthread_kill_other_threads_np();
21818 #endif
21819
21820         return 0;
21821
21822   ;
21823   return 0;
21824 }
21825 _ACEOF
21826 rm -f conftest.$ac_objext conftest$ac_exeext
21827 if { (ac_try="$ac_link"
21828 case "(($ac_try" in
21829   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21830   *) ac_try_echo=$ac_try;;
21831 esac
21832 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21833   (eval "$ac_link") 2>conftest.er1
21834   ac_status=$?
21835   grep -v '^ *+' conftest.er1 >conftest.err
21836   rm -f conftest.er1
21837   cat conftest.err >&5
21838   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21839   (exit $ac_status); } && {
21840          test -z "$ac_c_werror_flag" ||
21841          test ! -s conftest.err
21842        } && test -s conftest$ac_exeext &&
21843        $as_test_x conftest$ac_exeext; then
21844   ol_cv_pthread_mthreads=yes
21845 else
21846   echo "$as_me: failed program was:" >&5
21847 sed 's/^/| /' conftest.$ac_ext >&5
21848
21849         ol_cv_pthread_mthreads=no
21850 fi
21851
21852 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21853       conftest$ac_exeext conftest.$ac_ext
21854 else
21855   cat >conftest.$ac_ext <<_ACEOF
21856 /* confdefs.h.  */
21857 _ACEOF
21858 cat confdefs.h >>conftest.$ac_ext
21859 cat >>conftest.$ac_ext <<_ACEOF
21860 /* end confdefs.h.  */
21861
21862 /* pthread test headers */
21863 #include <pthread.h>
21864 #if HAVE_PTHREADS < 7
21865 #include <errno.h>
21866 #endif
21867 #ifndef NULL
21868 #define NULL (void*)0
21869 #endif
21870
21871 static void *task(p)
21872         void *p;
21873 {
21874         return (void *) (p == NULL);
21875 }
21876
21877
21878 int main(argc, argv)
21879         int argc;
21880         char **argv;
21881 {
21882
21883         /* pthread test function */
21884 #ifndef PTHREAD_CREATE_DETACHED
21885 #define PTHREAD_CREATE_DETACHED 1
21886 #endif
21887         pthread_t t;
21888         int status;
21889         int detach = PTHREAD_CREATE_DETACHED;
21890
21891 #if HAVE_PTHREADS > 4
21892         /* Final pthreads */
21893         pthread_attr_t attr;
21894
21895         status = pthread_attr_init(&attr);
21896         if( status ) return status;
21897
21898 #if HAVE_PTHREADS < 7
21899         status = pthread_attr_setdetachstate(&attr, &detach);
21900         if( status < 0 ) status = errno;
21901 #else
21902         status = pthread_attr_setdetachstate(&attr, detach);
21903 #endif
21904         if( status ) return status;
21905         status = pthread_create( &t, &attr, task, NULL );
21906 #if HAVE_PTHREADS < 7
21907         if( status < 0 ) status = errno;
21908 #endif
21909         if( status ) return status;
21910 #else
21911         /* Draft 4 pthreads */
21912         status = pthread_create( &t, pthread_attr_default, task, NULL );
21913         if( status ) return errno;
21914
21915         /* give thread a chance to complete */
21916         /* it should remain joinable and hence detachable */
21917         sleep( 1 );
21918
21919         status = pthread_detach( &t );
21920         if( status ) return errno;
21921 #endif
21922
21923 #ifdef HAVE_LINUX_THREADS
21924         pthread_kill_other_threads_np();
21925 #endif
21926
21927         return 0;
21928
21929 }
21930
21931 _ACEOF
21932 rm -f conftest$ac_exeext
21933 if { (ac_try="$ac_link"
21934 case "(($ac_try" in
21935   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21936   *) ac_try_echo=$ac_try;;
21937 esac
21938 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21939   (eval "$ac_link") 2>&5
21940   ac_status=$?
21941   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21942   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21943   { (case "(($ac_try" in
21944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21945   *) ac_try_echo=$ac_try;;
21946 esac
21947 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21948   (eval "$ac_try") 2>&5
21949   ac_status=$?
21950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
21951   (exit $ac_status); }; }; then
21952   ol_cv_pthread_mthreads=yes
21953 else
21954   echo "$as_me: program exited with status $ac_status" >&5
21955 echo "$as_me: failed program was:" >&5
21956 sed 's/^/| /' conftest.$ac_ext >&5
21957
21958 ( exit $ac_status )
21959 ol_cv_pthread_mthreads=no
21960 fi
21961 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21962 fi
21963
21964
21965
21966                 # restore the LIBS
21967                 LIBS="$ol_LIBS"
21968
21969 fi
21970 { echo "$as_me:$LINENO: result: $ol_cv_pthread_mthreads" >&5
21971 echo "${ECHO_T}$ol_cv_pthread_mthreads" >&6; }
21972
21973         if test $ol_cv_pthread_mthreads = yes ; then
21974                 ol_link_pthreads="-mthreads"
21975                 ol_link_threads=posix
21976         fi
21977 fi
21978
21979                 # Pthread try link: -thread (ol_cv_pthread_thread)
21980 if test "$ol_link_threads" = no ; then
21981         # try -thread
21982         { echo "$as_me:$LINENO: checking for pthread link with -thread" >&5
21983 echo $ECHO_N "checking for pthread link with -thread... $ECHO_C" >&6; }
21984 if test "${ol_cv_pthread_thread+set}" = set; then
21985   echo $ECHO_N "(cached) $ECHO_C" >&6
21986 else
21987
21988                 # save the flags
21989                 ol_LIBS="$LIBS"
21990                 LIBS="-thread $LIBS"
21991
21992                 if test "$cross_compiling" = yes; then
21993   cat >conftest.$ac_ext <<_ACEOF
21994 /* confdefs.h.  */
21995 _ACEOF
21996 cat confdefs.h >>conftest.$ac_ext
21997 cat >>conftest.$ac_ext <<_ACEOF
21998 /* end confdefs.h.  */
21999
22000 /* pthread test headers */
22001 #include <pthread.h>
22002 #if HAVE_PTHREADS < 7
22003 #include <errno.h>
22004 #endif
22005 #ifndef NULL
22006 #define NULL (void*)0
22007 #endif
22008
22009 static void *task(p)
22010         void *p;
22011 {
22012         return (void *) (p == NULL);
22013 }
22014
22015 int
22016 main ()
22017 {
22018
22019         /* pthread test function */
22020 #ifndef PTHREAD_CREATE_DETACHED
22021 #define PTHREAD_CREATE_DETACHED 1
22022 #endif
22023         pthread_t t;
22024         int status;
22025         int detach = PTHREAD_CREATE_DETACHED;
22026
22027 #if HAVE_PTHREADS > 4
22028         /* Final pthreads */
22029         pthread_attr_t attr;
22030
22031         status = pthread_attr_init(&attr);
22032         if( status ) return status;
22033
22034 #if HAVE_PTHREADS < 7
22035         status = pthread_attr_setdetachstate(&attr, &detach);
22036         if( status < 0 ) status = errno;
22037 #else
22038         status = pthread_attr_setdetachstate(&attr, detach);
22039 #endif
22040         if( status ) return status;
22041         status = pthread_create( &t, &attr, task, NULL );
22042 #if HAVE_PTHREADS < 7
22043         if( status < 0 ) status = errno;
22044 #endif
22045         if( status ) return status;
22046 #else
22047         /* Draft 4 pthreads */
22048         status = pthread_create( &t, pthread_attr_default, task, NULL );
22049         if( status ) return errno;
22050
22051         /* give thread a chance to complete */
22052         /* it should remain joinable and hence detachable */
22053         sleep( 1 );
22054
22055         status = pthread_detach( &t );
22056         if( status ) return errno;
22057 #endif
22058
22059 #ifdef HAVE_LINUX_THREADS
22060         pthread_kill_other_threads_np();
22061 #endif
22062
22063         return 0;
22064
22065   ;
22066   return 0;
22067 }
22068 _ACEOF
22069 rm -f conftest.$ac_objext conftest$ac_exeext
22070 if { (ac_try="$ac_link"
22071 case "(($ac_try" in
22072   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22073   *) ac_try_echo=$ac_try;;
22074 esac
22075 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22076   (eval "$ac_link") 2>conftest.er1
22077   ac_status=$?
22078   grep -v '^ *+' conftest.er1 >conftest.err
22079   rm -f conftest.er1
22080   cat conftest.err >&5
22081   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22082   (exit $ac_status); } && {
22083          test -z "$ac_c_werror_flag" ||
22084          test ! -s conftest.err
22085        } && test -s conftest$ac_exeext &&
22086        $as_test_x conftest$ac_exeext; then
22087   ol_cv_pthread_thread=yes
22088 else
22089   echo "$as_me: failed program was:" >&5
22090 sed 's/^/| /' conftest.$ac_ext >&5
22091
22092         ol_cv_pthread_thread=no
22093 fi
22094
22095 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22096       conftest$ac_exeext conftest.$ac_ext
22097 else
22098   cat >conftest.$ac_ext <<_ACEOF
22099 /* confdefs.h.  */
22100 _ACEOF
22101 cat confdefs.h >>conftest.$ac_ext
22102 cat >>conftest.$ac_ext <<_ACEOF
22103 /* end confdefs.h.  */
22104
22105 /* pthread test headers */
22106 #include <pthread.h>
22107 #if HAVE_PTHREADS < 7
22108 #include <errno.h>
22109 #endif
22110 #ifndef NULL
22111 #define NULL (void*)0
22112 #endif
22113
22114 static void *task(p)
22115         void *p;
22116 {
22117         return (void *) (p == NULL);
22118 }
22119
22120
22121 int main(argc, argv)
22122         int argc;
22123         char **argv;
22124 {
22125
22126         /* pthread test function */
22127 #ifndef PTHREAD_CREATE_DETACHED
22128 #define PTHREAD_CREATE_DETACHED 1
22129 #endif
22130         pthread_t t;
22131         int status;
22132         int detach = PTHREAD_CREATE_DETACHED;
22133
22134 #if HAVE_PTHREADS > 4
22135         /* Final pthreads */
22136         pthread_attr_t attr;
22137
22138         status = pthread_attr_init(&attr);
22139         if( status ) return status;
22140
22141 #if HAVE_PTHREADS < 7
22142         status = pthread_attr_setdetachstate(&attr, &detach);
22143         if( status < 0 ) status = errno;
22144 #else
22145         status = pthread_attr_setdetachstate(&attr, detach);
22146 #endif
22147         if( status ) return status;
22148         status = pthread_create( &t, &attr, task, NULL );
22149 #if HAVE_PTHREADS < 7
22150         if( status < 0 ) status = errno;
22151 #endif
22152         if( status ) return status;
22153 #else
22154         /* Draft 4 pthreads */
22155         status = pthread_create( &t, pthread_attr_default, task, NULL );
22156         if( status ) return errno;
22157
22158         /* give thread a chance to complete */
22159         /* it should remain joinable and hence detachable */
22160         sleep( 1 );
22161
22162         status = pthread_detach( &t );
22163         if( status ) return errno;
22164 #endif
22165
22166 #ifdef HAVE_LINUX_THREADS
22167         pthread_kill_other_threads_np();
22168 #endif
22169
22170         return 0;
22171
22172 }
22173
22174 _ACEOF
22175 rm -f conftest$ac_exeext
22176 if { (ac_try="$ac_link"
22177 case "(($ac_try" in
22178   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22179   *) ac_try_echo=$ac_try;;
22180 esac
22181 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22182   (eval "$ac_link") 2>&5
22183   ac_status=$?
22184   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22185   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22186   { (case "(($ac_try" in
22187   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22188   *) ac_try_echo=$ac_try;;
22189 esac
22190 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22191   (eval "$ac_try") 2>&5
22192   ac_status=$?
22193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22194   (exit $ac_status); }; }; then
22195   ol_cv_pthread_thread=yes
22196 else
22197   echo "$as_me: program exited with status $ac_status" >&5
22198 echo "$as_me: failed program was:" >&5
22199 sed 's/^/| /' conftest.$ac_ext >&5
22200
22201 ( exit $ac_status )
22202 ol_cv_pthread_thread=no
22203 fi
22204 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22205 fi
22206
22207
22208
22209                 # restore the LIBS
22210                 LIBS="$ol_LIBS"
22211
22212 fi
22213 { echo "$as_me:$LINENO: result: $ol_cv_pthread_thread" >&5
22214 echo "${ECHO_T}$ol_cv_pthread_thread" >&6; }
22215
22216         if test $ol_cv_pthread_thread = yes ; then
22217                 ol_link_pthreads="-thread"
22218                 ol_link_threads=posix
22219         fi
22220 fi
22221
22222
22223                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
22224 if test "$ol_link_threads" = no ; then
22225         # try -lpthread -lmach -lexc -lc_r
22226         { echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
22227 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc -lc_r... $ECHO_C" >&6; }
22228 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then
22229   echo $ECHO_N "(cached) $ECHO_C" >&6
22230 else
22231
22232                 # save the flags
22233                 ol_LIBS="$LIBS"
22234                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
22235
22236                 if test "$cross_compiling" = yes; then
22237   cat >conftest.$ac_ext <<_ACEOF
22238 /* confdefs.h.  */
22239 _ACEOF
22240 cat confdefs.h >>conftest.$ac_ext
22241 cat >>conftest.$ac_ext <<_ACEOF
22242 /* end confdefs.h.  */
22243
22244 /* pthread test headers */
22245 #include <pthread.h>
22246 #if HAVE_PTHREADS < 7
22247 #include <errno.h>
22248 #endif
22249 #ifndef NULL
22250 #define NULL (void*)0
22251 #endif
22252
22253 static void *task(p)
22254         void *p;
22255 {
22256         return (void *) (p == NULL);
22257 }
22258
22259 int
22260 main ()
22261 {
22262
22263         /* pthread test function */
22264 #ifndef PTHREAD_CREATE_DETACHED
22265 #define PTHREAD_CREATE_DETACHED 1
22266 #endif
22267         pthread_t t;
22268         int status;
22269         int detach = PTHREAD_CREATE_DETACHED;
22270
22271 #if HAVE_PTHREADS > 4
22272         /* Final pthreads */
22273         pthread_attr_t attr;
22274
22275         status = pthread_attr_init(&attr);
22276         if( status ) return status;
22277
22278 #if HAVE_PTHREADS < 7
22279         status = pthread_attr_setdetachstate(&attr, &detach);
22280         if( status < 0 ) status = errno;
22281 #else
22282         status = pthread_attr_setdetachstate(&attr, detach);
22283 #endif
22284         if( status ) return status;
22285         status = pthread_create( &t, &attr, task, NULL );
22286 #if HAVE_PTHREADS < 7
22287         if( status < 0 ) status = errno;
22288 #endif
22289         if( status ) return status;
22290 #else
22291         /* Draft 4 pthreads */
22292         status = pthread_create( &t, pthread_attr_default, task, NULL );
22293         if( status ) return errno;
22294
22295         /* give thread a chance to complete */
22296         /* it should remain joinable and hence detachable */
22297         sleep( 1 );
22298
22299         status = pthread_detach( &t );
22300         if( status ) return errno;
22301 #endif
22302
22303 #ifdef HAVE_LINUX_THREADS
22304         pthread_kill_other_threads_np();
22305 #endif
22306
22307         return 0;
22308
22309   ;
22310   return 0;
22311 }
22312 _ACEOF
22313 rm -f conftest.$ac_objext conftest$ac_exeext
22314 if { (ac_try="$ac_link"
22315 case "(($ac_try" in
22316   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22317   *) ac_try_echo=$ac_try;;
22318 esac
22319 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22320   (eval "$ac_link") 2>conftest.er1
22321   ac_status=$?
22322   grep -v '^ *+' conftest.er1 >conftest.err
22323   rm -f conftest.er1
22324   cat conftest.err >&5
22325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22326   (exit $ac_status); } && {
22327          test -z "$ac_c_werror_flag" ||
22328          test ! -s conftest.err
22329        } && test -s conftest$ac_exeext &&
22330        $as_test_x conftest$ac_exeext; then
22331   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
22332 else
22333   echo "$as_me: failed program was:" >&5
22334 sed 's/^/| /' conftest.$ac_ext >&5
22335
22336         ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
22337 fi
22338
22339 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22340       conftest$ac_exeext conftest.$ac_ext
22341 else
22342   cat >conftest.$ac_ext <<_ACEOF
22343 /* confdefs.h.  */
22344 _ACEOF
22345 cat confdefs.h >>conftest.$ac_ext
22346 cat >>conftest.$ac_ext <<_ACEOF
22347 /* end confdefs.h.  */
22348
22349 /* pthread test headers */
22350 #include <pthread.h>
22351 #if HAVE_PTHREADS < 7
22352 #include <errno.h>
22353 #endif
22354 #ifndef NULL
22355 #define NULL (void*)0
22356 #endif
22357
22358 static void *task(p)
22359         void *p;
22360 {
22361         return (void *) (p == NULL);
22362 }
22363
22364
22365 int main(argc, argv)
22366         int argc;
22367         char **argv;
22368 {
22369
22370         /* pthread test function */
22371 #ifndef PTHREAD_CREATE_DETACHED
22372 #define PTHREAD_CREATE_DETACHED 1
22373 #endif
22374         pthread_t t;
22375         int status;
22376         int detach = PTHREAD_CREATE_DETACHED;
22377
22378 #if HAVE_PTHREADS > 4
22379         /* Final pthreads */
22380         pthread_attr_t attr;
22381
22382         status = pthread_attr_init(&attr);
22383         if( status ) return status;
22384
22385 #if HAVE_PTHREADS < 7
22386         status = pthread_attr_setdetachstate(&attr, &detach);
22387         if( status < 0 ) status = errno;
22388 #else
22389         status = pthread_attr_setdetachstate(&attr, detach);
22390 #endif
22391         if( status ) return status;
22392         status = pthread_create( &t, &attr, task, NULL );
22393 #if HAVE_PTHREADS < 7
22394         if( status < 0 ) status = errno;
22395 #endif
22396         if( status ) return status;
22397 #else
22398         /* Draft 4 pthreads */
22399         status = pthread_create( &t, pthread_attr_default, task, NULL );
22400         if( status ) return errno;
22401
22402         /* give thread a chance to complete */
22403         /* it should remain joinable and hence detachable */
22404         sleep( 1 );
22405
22406         status = pthread_detach( &t );
22407         if( status ) return errno;
22408 #endif
22409
22410 #ifdef HAVE_LINUX_THREADS
22411         pthread_kill_other_threads_np();
22412 #endif
22413
22414         return 0;
22415
22416 }
22417
22418 _ACEOF
22419 rm -f conftest$ac_exeext
22420 if { (ac_try="$ac_link"
22421 case "(($ac_try" in
22422   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22423   *) ac_try_echo=$ac_try;;
22424 esac
22425 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22426   (eval "$ac_link") 2>&5
22427   ac_status=$?
22428   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22429   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22430   { (case "(($ac_try" in
22431   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22432   *) ac_try_echo=$ac_try;;
22433 esac
22434 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22435   (eval "$ac_try") 2>&5
22436   ac_status=$?
22437   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22438   (exit $ac_status); }; }; then
22439   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
22440 else
22441   echo "$as_me: program exited with status $ac_status" >&5
22442 echo "$as_me: failed program was:" >&5
22443 sed 's/^/| /' conftest.$ac_ext >&5
22444
22445 ( exit $ac_status )
22446 ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
22447 fi
22448 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22449 fi
22450
22451
22452
22453                 # restore the LIBS
22454                 LIBS="$ol_LIBS"
22455
22456 fi
22457 { echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
22458 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
22459
22460         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
22461                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
22462                 ol_link_threads=posix
22463         fi
22464 fi
22465
22466                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
22467 if test "$ol_link_threads" = no ; then
22468         # try -lpthread -lmach -lexc
22469         { echo "$as_me:$LINENO: checking for pthread link with -lpthread -lmach -lexc" >&5
22470 echo $ECHO_N "checking for pthread link with -lpthread -lmach -lexc... $ECHO_C" >&6; }
22471 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then
22472   echo $ECHO_N "(cached) $ECHO_C" >&6
22473 else
22474
22475                 # save the flags
22476                 ol_LIBS="$LIBS"
22477                 LIBS="-lpthread -lmach -lexc $LIBS"
22478
22479                 if test "$cross_compiling" = yes; then
22480   cat >conftest.$ac_ext <<_ACEOF
22481 /* confdefs.h.  */
22482 _ACEOF
22483 cat confdefs.h >>conftest.$ac_ext
22484 cat >>conftest.$ac_ext <<_ACEOF
22485 /* end confdefs.h.  */
22486
22487 /* pthread test headers */
22488 #include <pthread.h>
22489 #if HAVE_PTHREADS < 7
22490 #include <errno.h>
22491 #endif
22492 #ifndef NULL
22493 #define NULL (void*)0
22494 #endif
22495
22496 static void *task(p)
22497         void *p;
22498 {
22499         return (void *) (p == NULL);
22500 }
22501
22502 int
22503 main ()
22504 {
22505
22506         /* pthread test function */
22507 #ifndef PTHREAD_CREATE_DETACHED
22508 #define PTHREAD_CREATE_DETACHED 1
22509 #endif
22510         pthread_t t;
22511         int status;
22512         int detach = PTHREAD_CREATE_DETACHED;
22513
22514 #if HAVE_PTHREADS > 4
22515         /* Final pthreads */
22516         pthread_attr_t attr;
22517
22518         status = pthread_attr_init(&attr);
22519         if( status ) return status;
22520
22521 #if HAVE_PTHREADS < 7
22522         status = pthread_attr_setdetachstate(&attr, &detach);
22523         if( status < 0 ) status = errno;
22524 #else
22525         status = pthread_attr_setdetachstate(&attr, detach);
22526 #endif
22527         if( status ) return status;
22528         status = pthread_create( &t, &attr, task, NULL );
22529 #if HAVE_PTHREADS < 7
22530         if( status < 0 ) status = errno;
22531 #endif
22532         if( status ) return status;
22533 #else
22534         /* Draft 4 pthreads */
22535         status = pthread_create( &t, pthread_attr_default, task, NULL );
22536         if( status ) return errno;
22537
22538         /* give thread a chance to complete */
22539         /* it should remain joinable and hence detachable */
22540         sleep( 1 );
22541
22542         status = pthread_detach( &t );
22543         if( status ) return errno;
22544 #endif
22545
22546 #ifdef HAVE_LINUX_THREADS
22547         pthread_kill_other_threads_np();
22548 #endif
22549
22550         return 0;
22551
22552   ;
22553   return 0;
22554 }
22555 _ACEOF
22556 rm -f conftest.$ac_objext conftest$ac_exeext
22557 if { (ac_try="$ac_link"
22558 case "(($ac_try" in
22559   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22560   *) ac_try_echo=$ac_try;;
22561 esac
22562 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22563   (eval "$ac_link") 2>conftest.er1
22564   ac_status=$?
22565   grep -v '^ *+' conftest.er1 >conftest.err
22566   rm -f conftest.er1
22567   cat conftest.err >&5
22568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22569   (exit $ac_status); } && {
22570          test -z "$ac_c_werror_flag" ||
22571          test ! -s conftest.err
22572        } && test -s conftest$ac_exeext &&
22573        $as_test_x conftest$ac_exeext; then
22574   ol_cv_pthread_lpthread_lmach_lexc=yes
22575 else
22576   echo "$as_me: failed program was:" >&5
22577 sed 's/^/| /' conftest.$ac_ext >&5
22578
22579         ol_cv_pthread_lpthread_lmach_lexc=no
22580 fi
22581
22582 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22583       conftest$ac_exeext conftest.$ac_ext
22584 else
22585   cat >conftest.$ac_ext <<_ACEOF
22586 /* confdefs.h.  */
22587 _ACEOF
22588 cat confdefs.h >>conftest.$ac_ext
22589 cat >>conftest.$ac_ext <<_ACEOF
22590 /* end confdefs.h.  */
22591
22592 /* pthread test headers */
22593 #include <pthread.h>
22594 #if HAVE_PTHREADS < 7
22595 #include <errno.h>
22596 #endif
22597 #ifndef NULL
22598 #define NULL (void*)0
22599 #endif
22600
22601 static void *task(p)
22602         void *p;
22603 {
22604         return (void *) (p == NULL);
22605 }
22606
22607
22608 int main(argc, argv)
22609         int argc;
22610         char **argv;
22611 {
22612
22613         /* pthread test function */
22614 #ifndef PTHREAD_CREATE_DETACHED
22615 #define PTHREAD_CREATE_DETACHED 1
22616 #endif
22617         pthread_t t;
22618         int status;
22619         int detach = PTHREAD_CREATE_DETACHED;
22620
22621 #if HAVE_PTHREADS > 4
22622         /* Final pthreads */
22623         pthread_attr_t attr;
22624
22625         status = pthread_attr_init(&attr);
22626         if( status ) return status;
22627
22628 #if HAVE_PTHREADS < 7
22629         status = pthread_attr_setdetachstate(&attr, &detach);
22630         if( status < 0 ) status = errno;
22631 #else
22632         status = pthread_attr_setdetachstate(&attr, detach);
22633 #endif
22634         if( status ) return status;
22635         status = pthread_create( &t, &attr, task, NULL );
22636 #if HAVE_PTHREADS < 7
22637         if( status < 0 ) status = errno;
22638 #endif
22639         if( status ) return status;
22640 #else
22641         /* Draft 4 pthreads */
22642         status = pthread_create( &t, pthread_attr_default, task, NULL );
22643         if( status ) return errno;
22644
22645         /* give thread a chance to complete */
22646         /* it should remain joinable and hence detachable */
22647         sleep( 1 );
22648
22649         status = pthread_detach( &t );
22650         if( status ) return errno;
22651 #endif
22652
22653 #ifdef HAVE_LINUX_THREADS
22654         pthread_kill_other_threads_np();
22655 #endif
22656
22657         return 0;
22658
22659 }
22660
22661 _ACEOF
22662 rm -f conftest$ac_exeext
22663 if { (ac_try="$ac_link"
22664 case "(($ac_try" in
22665   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22666   *) ac_try_echo=$ac_try;;
22667 esac
22668 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22669   (eval "$ac_link") 2>&5
22670   ac_status=$?
22671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22672   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22673   { (case "(($ac_try" in
22674   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22675   *) ac_try_echo=$ac_try;;
22676 esac
22677 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22678   (eval "$ac_try") 2>&5
22679   ac_status=$?
22680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22681   (exit $ac_status); }; }; then
22682   ol_cv_pthread_lpthread_lmach_lexc=yes
22683 else
22684   echo "$as_me: program exited with status $ac_status" >&5
22685 echo "$as_me: failed program was:" >&5
22686 sed 's/^/| /' conftest.$ac_ext >&5
22687
22688 ( exit $ac_status )
22689 ol_cv_pthread_lpthread_lmach_lexc=no
22690 fi
22691 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22692 fi
22693
22694
22695
22696                 # restore the LIBS
22697                 LIBS="$ol_LIBS"
22698
22699 fi
22700 { echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
22701 echo "${ECHO_T}$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
22702
22703         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
22704                 ol_link_pthreads="-lpthread -lmach -lexc"
22705                 ol_link_threads=posix
22706         fi
22707 fi
22708
22709
22710                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
22711 if test "$ol_link_threads" = no ; then
22712         # try -lpthread -Wl,-woff,85
22713         { echo "$as_me:$LINENO: checking for pthread link with -lpthread -Wl,-woff,85" >&5
22714 echo $ECHO_N "checking for pthread link with -lpthread -Wl,-woff,85... $ECHO_C" >&6; }
22715 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then
22716   echo $ECHO_N "(cached) $ECHO_C" >&6
22717 else
22718
22719                 # save the flags
22720                 ol_LIBS="$LIBS"
22721                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
22722
22723                 if test "$cross_compiling" = yes; then
22724   cat >conftest.$ac_ext <<_ACEOF
22725 /* confdefs.h.  */
22726 _ACEOF
22727 cat confdefs.h >>conftest.$ac_ext
22728 cat >>conftest.$ac_ext <<_ACEOF
22729 /* end confdefs.h.  */
22730
22731 /* pthread test headers */
22732 #include <pthread.h>
22733 #if HAVE_PTHREADS < 7
22734 #include <errno.h>
22735 #endif
22736 #ifndef NULL
22737 #define NULL (void*)0
22738 #endif
22739
22740 static void *task(p)
22741         void *p;
22742 {
22743         return (void *) (p == NULL);
22744 }
22745
22746 int
22747 main ()
22748 {
22749
22750         /* pthread test function */
22751 #ifndef PTHREAD_CREATE_DETACHED
22752 #define PTHREAD_CREATE_DETACHED 1
22753 #endif
22754         pthread_t t;
22755         int status;
22756         int detach = PTHREAD_CREATE_DETACHED;
22757
22758 #if HAVE_PTHREADS > 4
22759         /* Final pthreads */
22760         pthread_attr_t attr;
22761
22762         status = pthread_attr_init(&attr);
22763         if( status ) return status;
22764
22765 #if HAVE_PTHREADS < 7
22766         status = pthread_attr_setdetachstate(&attr, &detach);
22767         if( status < 0 ) status = errno;
22768 #else
22769         status = pthread_attr_setdetachstate(&attr, detach);
22770 #endif
22771         if( status ) return status;
22772         status = pthread_create( &t, &attr, task, NULL );
22773 #if HAVE_PTHREADS < 7
22774         if( status < 0 ) status = errno;
22775 #endif
22776         if( status ) return status;
22777 #else
22778         /* Draft 4 pthreads */
22779         status = pthread_create( &t, pthread_attr_default, task, NULL );
22780         if( status ) return errno;
22781
22782         /* give thread a chance to complete */
22783         /* it should remain joinable and hence detachable */
22784         sleep( 1 );
22785
22786         status = pthread_detach( &t );
22787         if( status ) return errno;
22788 #endif
22789
22790 #ifdef HAVE_LINUX_THREADS
22791         pthread_kill_other_threads_np();
22792 #endif
22793
22794         return 0;
22795
22796   ;
22797   return 0;
22798 }
22799 _ACEOF
22800 rm -f conftest.$ac_objext conftest$ac_exeext
22801 if { (ac_try="$ac_link"
22802 case "(($ac_try" in
22803   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22804   *) ac_try_echo=$ac_try;;
22805 esac
22806 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22807   (eval "$ac_link") 2>conftest.er1
22808   ac_status=$?
22809   grep -v '^ *+' conftest.er1 >conftest.err
22810   rm -f conftest.er1
22811   cat conftest.err >&5
22812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22813   (exit $ac_status); } && {
22814          test -z "$ac_c_werror_flag" ||
22815          test ! -s conftest.err
22816        } && test -s conftest$ac_exeext &&
22817        $as_test_x conftest$ac_exeext; then
22818   ol_cv_pthread_lib_lpthread_woff=yes
22819 else
22820   echo "$as_me: failed program was:" >&5
22821 sed 's/^/| /' conftest.$ac_ext >&5
22822
22823         ol_cv_pthread_lib_lpthread_woff=no
22824 fi
22825
22826 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22827       conftest$ac_exeext conftest.$ac_ext
22828 else
22829   cat >conftest.$ac_ext <<_ACEOF
22830 /* confdefs.h.  */
22831 _ACEOF
22832 cat confdefs.h >>conftest.$ac_ext
22833 cat >>conftest.$ac_ext <<_ACEOF
22834 /* end confdefs.h.  */
22835
22836 /* pthread test headers */
22837 #include <pthread.h>
22838 #if HAVE_PTHREADS < 7
22839 #include <errno.h>
22840 #endif
22841 #ifndef NULL
22842 #define NULL (void*)0
22843 #endif
22844
22845 static void *task(p)
22846         void *p;
22847 {
22848         return (void *) (p == NULL);
22849 }
22850
22851
22852 int main(argc, argv)
22853         int argc;
22854         char **argv;
22855 {
22856
22857         /* pthread test function */
22858 #ifndef PTHREAD_CREATE_DETACHED
22859 #define PTHREAD_CREATE_DETACHED 1
22860 #endif
22861         pthread_t t;
22862         int status;
22863         int detach = PTHREAD_CREATE_DETACHED;
22864
22865 #if HAVE_PTHREADS > 4
22866         /* Final pthreads */
22867         pthread_attr_t attr;
22868
22869         status = pthread_attr_init(&attr);
22870         if( status ) return status;
22871
22872 #if HAVE_PTHREADS < 7
22873         status = pthread_attr_setdetachstate(&attr, &detach);
22874         if( status < 0 ) status = errno;
22875 #else
22876         status = pthread_attr_setdetachstate(&attr, detach);
22877 #endif
22878         if( status ) return status;
22879         status = pthread_create( &t, &attr, task, NULL );
22880 #if HAVE_PTHREADS < 7
22881         if( status < 0 ) status = errno;
22882 #endif
22883         if( status ) return status;
22884 #else
22885         /* Draft 4 pthreads */
22886         status = pthread_create( &t, pthread_attr_default, task, NULL );
22887         if( status ) return errno;
22888
22889         /* give thread a chance to complete */
22890         /* it should remain joinable and hence detachable */
22891         sleep( 1 );
22892
22893         status = pthread_detach( &t );
22894         if( status ) return errno;
22895 #endif
22896
22897 #ifdef HAVE_LINUX_THREADS
22898         pthread_kill_other_threads_np();
22899 #endif
22900
22901         return 0;
22902
22903 }
22904
22905 _ACEOF
22906 rm -f conftest$ac_exeext
22907 if { (ac_try="$ac_link"
22908 case "(($ac_try" in
22909   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22910   *) ac_try_echo=$ac_try;;
22911 esac
22912 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22913   (eval "$ac_link") 2>&5
22914   ac_status=$?
22915   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22916   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22917   { (case "(($ac_try" in
22918   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22919   *) ac_try_echo=$ac_try;;
22920 esac
22921 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22922   (eval "$ac_try") 2>&5
22923   ac_status=$?
22924   echo "$as_me:$LINENO: \$? = $ac_status" >&5
22925   (exit $ac_status); }; }; then
22926   ol_cv_pthread_lib_lpthread_woff=yes
22927 else
22928   echo "$as_me: program exited with status $ac_status" >&5
22929 echo "$as_me: failed program was:" >&5
22930 sed 's/^/| /' conftest.$ac_ext >&5
22931
22932 ( exit $ac_status )
22933 ol_cv_pthread_lib_lpthread_woff=no
22934 fi
22935 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22936 fi
22937
22938
22939
22940                 # restore the LIBS
22941                 LIBS="$ol_LIBS"
22942
22943 fi
22944 { echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthread_woff" >&5
22945 echo "${ECHO_T}$ol_cv_pthread_lib_lpthread_woff" >&6; }
22946
22947         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
22948                 ol_link_pthreads="-lpthread -Wl,-woff,85"
22949                 ol_link_threads=posix
22950         fi
22951 fi
22952
22953
22954                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
22955 if test "$ol_link_threads" = no ; then
22956         # try -lpthread
22957         { echo "$as_me:$LINENO: checking for pthread link with -lpthread" >&5
22958 echo $ECHO_N "checking for pthread link with -lpthread... $ECHO_C" >&6; }
22959 if test "${ol_cv_pthread_lpthread+set}" = set; then
22960   echo $ECHO_N "(cached) $ECHO_C" >&6
22961 else
22962
22963                 # save the flags
22964                 ol_LIBS="$LIBS"
22965                 LIBS="-lpthread $LIBS"
22966
22967                 if test "$cross_compiling" = yes; then
22968   cat >conftest.$ac_ext <<_ACEOF
22969 /* confdefs.h.  */
22970 _ACEOF
22971 cat confdefs.h >>conftest.$ac_ext
22972 cat >>conftest.$ac_ext <<_ACEOF
22973 /* end confdefs.h.  */
22974
22975 /* pthread test headers */
22976 #include <pthread.h>
22977 #if HAVE_PTHREADS < 7
22978 #include <errno.h>
22979 #endif
22980 #ifndef NULL
22981 #define NULL (void*)0
22982 #endif
22983
22984 static void *task(p)
22985         void *p;
22986 {
22987         return (void *) (p == NULL);
22988 }
22989
22990 int
22991 main ()
22992 {
22993
22994         /* pthread test function */
22995 #ifndef PTHREAD_CREATE_DETACHED
22996 #define PTHREAD_CREATE_DETACHED 1
22997 #endif
22998         pthread_t t;
22999         int status;
23000         int detach = PTHREAD_CREATE_DETACHED;
23001
23002 #if HAVE_PTHREADS > 4
23003         /* Final pthreads */
23004         pthread_attr_t attr;
23005
23006         status = pthread_attr_init(&attr);
23007         if( status ) return status;
23008
23009 #if HAVE_PTHREADS < 7
23010         status = pthread_attr_setdetachstate(&attr, &detach);
23011         if( status < 0 ) status = errno;
23012 #else
23013         status = pthread_attr_setdetachstate(&attr, detach);
23014 #endif
23015         if( status ) return status;
23016         status = pthread_create( &t, &attr, task, NULL );
23017 #if HAVE_PTHREADS < 7
23018         if( status < 0 ) status = errno;
23019 #endif
23020         if( status ) return status;
23021 #else
23022         /* Draft 4 pthreads */
23023         status = pthread_create( &t, pthread_attr_default, task, NULL );
23024         if( status ) return errno;
23025
23026         /* give thread a chance to complete */
23027         /* it should remain joinable and hence detachable */
23028         sleep( 1 );
23029
23030         status = pthread_detach( &t );
23031         if( status ) return errno;
23032 #endif
23033
23034 #ifdef HAVE_LINUX_THREADS
23035         pthread_kill_other_threads_np();
23036 #endif
23037
23038         return 0;
23039
23040   ;
23041   return 0;
23042 }
23043 _ACEOF
23044 rm -f conftest.$ac_objext conftest$ac_exeext
23045 if { (ac_try="$ac_link"
23046 case "(($ac_try" in
23047   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23048   *) ac_try_echo=$ac_try;;
23049 esac
23050 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23051   (eval "$ac_link") 2>conftest.er1
23052   ac_status=$?
23053   grep -v '^ *+' conftest.er1 >conftest.err
23054   rm -f conftest.er1
23055   cat conftest.err >&5
23056   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23057   (exit $ac_status); } && {
23058          test -z "$ac_c_werror_flag" ||
23059          test ! -s conftest.err
23060        } && test -s conftest$ac_exeext &&
23061        $as_test_x conftest$ac_exeext; then
23062   ol_cv_pthread_lpthread=yes
23063 else
23064   echo "$as_me: failed program was:" >&5
23065 sed 's/^/| /' conftest.$ac_ext >&5
23066
23067         ol_cv_pthread_lpthread=no
23068 fi
23069
23070 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23071       conftest$ac_exeext conftest.$ac_ext
23072 else
23073   cat >conftest.$ac_ext <<_ACEOF
23074 /* confdefs.h.  */
23075 _ACEOF
23076 cat confdefs.h >>conftest.$ac_ext
23077 cat >>conftest.$ac_ext <<_ACEOF
23078 /* end confdefs.h.  */
23079
23080 /* pthread test headers */
23081 #include <pthread.h>
23082 #if HAVE_PTHREADS < 7
23083 #include <errno.h>
23084 #endif
23085 #ifndef NULL
23086 #define NULL (void*)0
23087 #endif
23088
23089 static void *task(p)
23090         void *p;
23091 {
23092         return (void *) (p == NULL);
23093 }
23094
23095
23096 int main(argc, argv)
23097         int argc;
23098         char **argv;
23099 {
23100
23101         /* pthread test function */
23102 #ifndef PTHREAD_CREATE_DETACHED
23103 #define PTHREAD_CREATE_DETACHED 1
23104 #endif
23105         pthread_t t;
23106         int status;
23107         int detach = PTHREAD_CREATE_DETACHED;
23108
23109 #if HAVE_PTHREADS > 4
23110         /* Final pthreads */
23111         pthread_attr_t attr;
23112
23113         status = pthread_attr_init(&attr);
23114         if( status ) return status;
23115
23116 #if HAVE_PTHREADS < 7
23117         status = pthread_attr_setdetachstate(&attr, &detach);
23118         if( status < 0 ) status = errno;
23119 #else
23120         status = pthread_attr_setdetachstate(&attr, detach);
23121 #endif
23122         if( status ) return status;
23123         status = pthread_create( &t, &attr, task, NULL );
23124 #if HAVE_PTHREADS < 7
23125         if( status < 0 ) status = errno;
23126 #endif
23127         if( status ) return status;
23128 #else
23129         /* Draft 4 pthreads */
23130         status = pthread_create( &t, pthread_attr_default, task, NULL );
23131         if( status ) return errno;
23132
23133         /* give thread a chance to complete */
23134         /* it should remain joinable and hence detachable */
23135         sleep( 1 );
23136
23137         status = pthread_detach( &t );
23138         if( status ) return errno;
23139 #endif
23140
23141 #ifdef HAVE_LINUX_THREADS
23142         pthread_kill_other_threads_np();
23143 #endif
23144
23145         return 0;
23146
23147 }
23148
23149 _ACEOF
23150 rm -f conftest$ac_exeext
23151 if { (ac_try="$ac_link"
23152 case "(($ac_try" in
23153   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23154   *) ac_try_echo=$ac_try;;
23155 esac
23156 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23157   (eval "$ac_link") 2>&5
23158   ac_status=$?
23159   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23160   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23161   { (case "(($ac_try" in
23162   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23163   *) ac_try_echo=$ac_try;;
23164 esac
23165 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23166   (eval "$ac_try") 2>&5
23167   ac_status=$?
23168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23169   (exit $ac_status); }; }; then
23170   ol_cv_pthread_lpthread=yes
23171 else
23172   echo "$as_me: program exited with status $ac_status" >&5
23173 echo "$as_me: failed program was:" >&5
23174 sed 's/^/| /' conftest.$ac_ext >&5
23175
23176 ( exit $ac_status )
23177 ol_cv_pthread_lpthread=no
23178 fi
23179 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23180 fi
23181
23182
23183
23184                 # restore the LIBS
23185                 LIBS="$ol_LIBS"
23186
23187 fi
23188 { echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthread" >&5
23189 echo "${ECHO_T}$ol_cv_pthread_lpthread" >&6; }
23190
23191         if test $ol_cv_pthread_lpthread = yes ; then
23192                 ol_link_pthreads="-lpthread"
23193                 ol_link_threads=posix
23194         fi
23195 fi
23196
23197                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
23198 if test "$ol_link_threads" = no ; then
23199         # try -lc_r
23200         { echo "$as_me:$LINENO: checking for pthread link with -lc_r" >&5
23201 echo $ECHO_N "checking for pthread link with -lc_r... $ECHO_C" >&6; }
23202 if test "${ol_cv_pthread_lc_r+set}" = set; then
23203   echo $ECHO_N "(cached) $ECHO_C" >&6
23204 else
23205
23206                 # save the flags
23207                 ol_LIBS="$LIBS"
23208                 LIBS="-lc_r $LIBS"
23209
23210                 if test "$cross_compiling" = yes; then
23211   cat >conftest.$ac_ext <<_ACEOF
23212 /* confdefs.h.  */
23213 _ACEOF
23214 cat confdefs.h >>conftest.$ac_ext
23215 cat >>conftest.$ac_ext <<_ACEOF
23216 /* end confdefs.h.  */
23217
23218 /* pthread test headers */
23219 #include <pthread.h>
23220 #if HAVE_PTHREADS < 7
23221 #include <errno.h>
23222 #endif
23223 #ifndef NULL
23224 #define NULL (void*)0
23225 #endif
23226
23227 static void *task(p)
23228         void *p;
23229 {
23230         return (void *) (p == NULL);
23231 }
23232
23233 int
23234 main ()
23235 {
23236
23237         /* pthread test function */
23238 #ifndef PTHREAD_CREATE_DETACHED
23239 #define PTHREAD_CREATE_DETACHED 1
23240 #endif
23241         pthread_t t;
23242         int status;
23243         int detach = PTHREAD_CREATE_DETACHED;
23244
23245 #if HAVE_PTHREADS > 4
23246         /* Final pthreads */
23247         pthread_attr_t attr;
23248
23249         status = pthread_attr_init(&attr);
23250         if( status ) return status;
23251
23252 #if HAVE_PTHREADS < 7
23253         status = pthread_attr_setdetachstate(&attr, &detach);
23254         if( status < 0 ) status = errno;
23255 #else
23256         status = pthread_attr_setdetachstate(&attr, detach);
23257 #endif
23258         if( status ) return status;
23259         status = pthread_create( &t, &attr, task, NULL );
23260 #if HAVE_PTHREADS < 7
23261         if( status < 0 ) status = errno;
23262 #endif
23263         if( status ) return status;
23264 #else
23265         /* Draft 4 pthreads */
23266         status = pthread_create( &t, pthread_attr_default, task, NULL );
23267         if( status ) return errno;
23268
23269         /* give thread a chance to complete */
23270         /* it should remain joinable and hence detachable */
23271         sleep( 1 );
23272
23273         status = pthread_detach( &t );
23274         if( status ) return errno;
23275 #endif
23276
23277 #ifdef HAVE_LINUX_THREADS
23278         pthread_kill_other_threads_np();
23279 #endif
23280
23281         return 0;
23282
23283   ;
23284   return 0;
23285 }
23286 _ACEOF
23287 rm -f conftest.$ac_objext conftest$ac_exeext
23288 if { (ac_try="$ac_link"
23289 case "(($ac_try" in
23290   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23291   *) ac_try_echo=$ac_try;;
23292 esac
23293 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23294   (eval "$ac_link") 2>conftest.er1
23295   ac_status=$?
23296   grep -v '^ *+' conftest.er1 >conftest.err
23297   rm -f conftest.er1
23298   cat conftest.err >&5
23299   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23300   (exit $ac_status); } && {
23301          test -z "$ac_c_werror_flag" ||
23302          test ! -s conftest.err
23303        } && test -s conftest$ac_exeext &&
23304        $as_test_x conftest$ac_exeext; then
23305   ol_cv_pthread_lc_r=yes
23306 else
23307   echo "$as_me: failed program was:" >&5
23308 sed 's/^/| /' conftest.$ac_ext >&5
23309
23310         ol_cv_pthread_lc_r=no
23311 fi
23312
23313 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23314       conftest$ac_exeext conftest.$ac_ext
23315 else
23316   cat >conftest.$ac_ext <<_ACEOF
23317 /* confdefs.h.  */
23318 _ACEOF
23319 cat confdefs.h >>conftest.$ac_ext
23320 cat >>conftest.$ac_ext <<_ACEOF
23321 /* end confdefs.h.  */
23322
23323 /* pthread test headers */
23324 #include <pthread.h>
23325 #if HAVE_PTHREADS < 7
23326 #include <errno.h>
23327 #endif
23328 #ifndef NULL
23329 #define NULL (void*)0
23330 #endif
23331
23332 static void *task(p)
23333         void *p;
23334 {
23335         return (void *) (p == NULL);
23336 }
23337
23338
23339 int main(argc, argv)
23340         int argc;
23341         char **argv;
23342 {
23343
23344         /* pthread test function */
23345 #ifndef PTHREAD_CREATE_DETACHED
23346 #define PTHREAD_CREATE_DETACHED 1
23347 #endif
23348         pthread_t t;
23349         int status;
23350         int detach = PTHREAD_CREATE_DETACHED;
23351
23352 #if HAVE_PTHREADS > 4
23353         /* Final pthreads */
23354         pthread_attr_t attr;
23355
23356         status = pthread_attr_init(&attr);
23357         if( status ) return status;
23358
23359 #if HAVE_PTHREADS < 7
23360         status = pthread_attr_setdetachstate(&attr, &detach);
23361         if( status < 0 ) status = errno;
23362 #else
23363         status = pthread_attr_setdetachstate(&attr, detach);
23364 #endif
23365         if( status ) return status;
23366         status = pthread_create( &t, &attr, task, NULL );
23367 #if HAVE_PTHREADS < 7
23368         if( status < 0 ) status = errno;
23369 #endif
23370         if( status ) return status;
23371 #else
23372         /* Draft 4 pthreads */
23373         status = pthread_create( &t, pthread_attr_default, task, NULL );
23374         if( status ) return errno;
23375
23376         /* give thread a chance to complete */
23377         /* it should remain joinable and hence detachable */
23378         sleep( 1 );
23379
23380         status = pthread_detach( &t );
23381         if( status ) return errno;
23382 #endif
23383
23384 #ifdef HAVE_LINUX_THREADS
23385         pthread_kill_other_threads_np();
23386 #endif
23387
23388         return 0;
23389
23390 }
23391
23392 _ACEOF
23393 rm -f conftest$ac_exeext
23394 if { (ac_try="$ac_link"
23395 case "(($ac_try" in
23396   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23397   *) ac_try_echo=$ac_try;;
23398 esac
23399 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23400   (eval "$ac_link") 2>&5
23401   ac_status=$?
23402   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23403   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23404   { (case "(($ac_try" in
23405   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23406   *) ac_try_echo=$ac_try;;
23407 esac
23408 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23409   (eval "$ac_try") 2>&5
23410   ac_status=$?
23411   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23412   (exit $ac_status); }; }; then
23413   ol_cv_pthread_lc_r=yes
23414 else
23415   echo "$as_me: program exited with status $ac_status" >&5
23416 echo "$as_me: failed program was:" >&5
23417 sed 's/^/| /' conftest.$ac_ext >&5
23418
23419 ( exit $ac_status )
23420 ol_cv_pthread_lc_r=no
23421 fi
23422 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23423 fi
23424
23425
23426
23427                 # restore the LIBS
23428                 LIBS="$ol_LIBS"
23429
23430 fi
23431 { echo "$as_me:$LINENO: result: $ol_cv_pthread_lc_r" >&5
23432 echo "${ECHO_T}$ol_cv_pthread_lc_r" >&6; }
23433
23434         if test $ol_cv_pthread_lc_r = yes ; then
23435                 ol_link_pthreads="-lc_r"
23436                 ol_link_threads=posix
23437         fi
23438 fi
23439
23440
23441                 # Pthread try link: -threads (ol_cv_pthread_threads)
23442 if test "$ol_link_threads" = no ; then
23443         # try -threads
23444         { echo "$as_me:$LINENO: checking for pthread link with -threads" >&5
23445 echo $ECHO_N "checking for pthread link with -threads... $ECHO_C" >&6; }
23446 if test "${ol_cv_pthread_threads+set}" = set; then
23447   echo $ECHO_N "(cached) $ECHO_C" >&6
23448 else
23449
23450                 # save the flags
23451                 ol_LIBS="$LIBS"
23452                 LIBS="-threads $LIBS"
23453
23454                 if test "$cross_compiling" = yes; then
23455   cat >conftest.$ac_ext <<_ACEOF
23456 /* confdefs.h.  */
23457 _ACEOF
23458 cat confdefs.h >>conftest.$ac_ext
23459 cat >>conftest.$ac_ext <<_ACEOF
23460 /* end confdefs.h.  */
23461
23462 /* pthread test headers */
23463 #include <pthread.h>
23464 #if HAVE_PTHREADS < 7
23465 #include <errno.h>
23466 #endif
23467 #ifndef NULL
23468 #define NULL (void*)0
23469 #endif
23470
23471 static void *task(p)
23472         void *p;
23473 {
23474         return (void *) (p == NULL);
23475 }
23476
23477 int
23478 main ()
23479 {
23480
23481         /* pthread test function */
23482 #ifndef PTHREAD_CREATE_DETACHED
23483 #define PTHREAD_CREATE_DETACHED 1
23484 #endif
23485         pthread_t t;
23486         int status;
23487         int detach = PTHREAD_CREATE_DETACHED;
23488
23489 #if HAVE_PTHREADS > 4
23490         /* Final pthreads */
23491         pthread_attr_t attr;
23492
23493         status = pthread_attr_init(&attr);
23494         if( status ) return status;
23495
23496 #if HAVE_PTHREADS < 7
23497         status = pthread_attr_setdetachstate(&attr, &detach);
23498         if( status < 0 ) status = errno;
23499 #else
23500         status = pthread_attr_setdetachstate(&attr, detach);
23501 #endif
23502         if( status ) return status;
23503         status = pthread_create( &t, &attr, task, NULL );
23504 #if HAVE_PTHREADS < 7
23505         if( status < 0 ) status = errno;
23506 #endif
23507         if( status ) return status;
23508 #else
23509         /* Draft 4 pthreads */
23510         status = pthread_create( &t, pthread_attr_default, task, NULL );
23511         if( status ) return errno;
23512
23513         /* give thread a chance to complete */
23514         /* it should remain joinable and hence detachable */
23515         sleep( 1 );
23516
23517         status = pthread_detach( &t );
23518         if( status ) return errno;
23519 #endif
23520
23521 #ifdef HAVE_LINUX_THREADS
23522         pthread_kill_other_threads_np();
23523 #endif
23524
23525         return 0;
23526
23527   ;
23528   return 0;
23529 }
23530 _ACEOF
23531 rm -f conftest.$ac_objext conftest$ac_exeext
23532 if { (ac_try="$ac_link"
23533 case "(($ac_try" in
23534   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23535   *) ac_try_echo=$ac_try;;
23536 esac
23537 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23538   (eval "$ac_link") 2>conftest.er1
23539   ac_status=$?
23540   grep -v '^ *+' conftest.er1 >conftest.err
23541   rm -f conftest.er1
23542   cat conftest.err >&5
23543   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23544   (exit $ac_status); } && {
23545          test -z "$ac_c_werror_flag" ||
23546          test ! -s conftest.err
23547        } && test -s conftest$ac_exeext &&
23548        $as_test_x conftest$ac_exeext; then
23549   ol_cv_pthread_threads=yes
23550 else
23551   echo "$as_me: failed program was:" >&5
23552 sed 's/^/| /' conftest.$ac_ext >&5
23553
23554         ol_cv_pthread_threads=no
23555 fi
23556
23557 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23558       conftest$ac_exeext conftest.$ac_ext
23559 else
23560   cat >conftest.$ac_ext <<_ACEOF
23561 /* confdefs.h.  */
23562 _ACEOF
23563 cat confdefs.h >>conftest.$ac_ext
23564 cat >>conftest.$ac_ext <<_ACEOF
23565 /* end confdefs.h.  */
23566
23567 /* pthread test headers */
23568 #include <pthread.h>
23569 #if HAVE_PTHREADS < 7
23570 #include <errno.h>
23571 #endif
23572 #ifndef NULL
23573 #define NULL (void*)0
23574 #endif
23575
23576 static void *task(p)
23577         void *p;
23578 {
23579         return (void *) (p == NULL);
23580 }
23581
23582
23583 int main(argc, argv)
23584         int argc;
23585         char **argv;
23586 {
23587
23588         /* pthread test function */
23589 #ifndef PTHREAD_CREATE_DETACHED
23590 #define PTHREAD_CREATE_DETACHED 1
23591 #endif
23592         pthread_t t;
23593         int status;
23594         int detach = PTHREAD_CREATE_DETACHED;
23595
23596 #if HAVE_PTHREADS > 4
23597         /* Final pthreads */
23598         pthread_attr_t attr;
23599
23600         status = pthread_attr_init(&attr);
23601         if( status ) return status;
23602
23603 #if HAVE_PTHREADS < 7
23604         status = pthread_attr_setdetachstate(&attr, &detach);
23605         if( status < 0 ) status = errno;
23606 #else
23607         status = pthread_attr_setdetachstate(&attr, detach);
23608 #endif
23609         if( status ) return status;
23610         status = pthread_create( &t, &attr, task, NULL );
23611 #if HAVE_PTHREADS < 7
23612         if( status < 0 ) status = errno;
23613 #endif
23614         if( status ) return status;
23615 #else
23616         /* Draft 4 pthreads */
23617         status = pthread_create( &t, pthread_attr_default, task, NULL );
23618         if( status ) return errno;
23619
23620         /* give thread a chance to complete */
23621         /* it should remain joinable and hence detachable */
23622         sleep( 1 );
23623
23624         status = pthread_detach( &t );
23625         if( status ) return errno;
23626 #endif
23627
23628 #ifdef HAVE_LINUX_THREADS
23629         pthread_kill_other_threads_np();
23630 #endif
23631
23632         return 0;
23633
23634 }
23635
23636 _ACEOF
23637 rm -f conftest$ac_exeext
23638 if { (ac_try="$ac_link"
23639 case "(($ac_try" in
23640   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23641   *) ac_try_echo=$ac_try;;
23642 esac
23643 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23644   (eval "$ac_link") 2>&5
23645   ac_status=$?
23646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23647   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23648   { (case "(($ac_try" in
23649   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23650   *) ac_try_echo=$ac_try;;
23651 esac
23652 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23653   (eval "$ac_try") 2>&5
23654   ac_status=$?
23655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23656   (exit $ac_status); }; }; then
23657   ol_cv_pthread_threads=yes
23658 else
23659   echo "$as_me: program exited with status $ac_status" >&5
23660 echo "$as_me: failed program was:" >&5
23661 sed 's/^/| /' conftest.$ac_ext >&5
23662
23663 ( exit $ac_status )
23664 ol_cv_pthread_threads=no
23665 fi
23666 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23667 fi
23668
23669
23670
23671                 # restore the LIBS
23672                 LIBS="$ol_LIBS"
23673
23674 fi
23675 { echo "$as_me:$LINENO: result: $ol_cv_pthread_threads" >&5
23676 echo "${ECHO_T}$ol_cv_pthread_threads" >&6; }
23677
23678         if test $ol_cv_pthread_threads = yes ; then
23679                 ol_link_pthreads="-threads"
23680                 ol_link_threads=posix
23681         fi
23682 fi
23683
23684
23685                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
23686 if test "$ol_link_threads" = no ; then
23687         # try -lpthreads -lmach -lexc -lc_r
23688         { echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
23689 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc -lc_r... $ECHO_C" >&6; }
23690 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then
23691   echo $ECHO_N "(cached) $ECHO_C" >&6
23692 else
23693
23694                 # save the flags
23695                 ol_LIBS="$LIBS"
23696                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
23697
23698                 if test "$cross_compiling" = yes; then
23699   cat >conftest.$ac_ext <<_ACEOF
23700 /* confdefs.h.  */
23701 _ACEOF
23702 cat confdefs.h >>conftest.$ac_ext
23703 cat >>conftest.$ac_ext <<_ACEOF
23704 /* end confdefs.h.  */
23705
23706 /* pthread test headers */
23707 #include <pthread.h>
23708 #if HAVE_PTHREADS < 7
23709 #include <errno.h>
23710 #endif
23711 #ifndef NULL
23712 #define NULL (void*)0
23713 #endif
23714
23715 static void *task(p)
23716         void *p;
23717 {
23718         return (void *) (p == NULL);
23719 }
23720
23721 int
23722 main ()
23723 {
23724
23725         /* pthread test function */
23726 #ifndef PTHREAD_CREATE_DETACHED
23727 #define PTHREAD_CREATE_DETACHED 1
23728 #endif
23729         pthread_t t;
23730         int status;
23731         int detach = PTHREAD_CREATE_DETACHED;
23732
23733 #if HAVE_PTHREADS > 4
23734         /* Final pthreads */
23735         pthread_attr_t attr;
23736
23737         status = pthread_attr_init(&attr);
23738         if( status ) return status;
23739
23740 #if HAVE_PTHREADS < 7
23741         status = pthread_attr_setdetachstate(&attr, &detach);
23742         if( status < 0 ) status = errno;
23743 #else
23744         status = pthread_attr_setdetachstate(&attr, detach);
23745 #endif
23746         if( status ) return status;
23747         status = pthread_create( &t, &attr, task, NULL );
23748 #if HAVE_PTHREADS < 7
23749         if( status < 0 ) status = errno;
23750 #endif
23751         if( status ) return status;
23752 #else
23753         /* Draft 4 pthreads */
23754         status = pthread_create( &t, pthread_attr_default, task, NULL );
23755         if( status ) return errno;
23756
23757         /* give thread a chance to complete */
23758         /* it should remain joinable and hence detachable */
23759         sleep( 1 );
23760
23761         status = pthread_detach( &t );
23762         if( status ) return errno;
23763 #endif
23764
23765 #ifdef HAVE_LINUX_THREADS
23766         pthread_kill_other_threads_np();
23767 #endif
23768
23769         return 0;
23770
23771   ;
23772   return 0;
23773 }
23774 _ACEOF
23775 rm -f conftest.$ac_objext conftest$ac_exeext
23776 if { (ac_try="$ac_link"
23777 case "(($ac_try" in
23778   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23779   *) ac_try_echo=$ac_try;;
23780 esac
23781 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23782   (eval "$ac_link") 2>conftest.er1
23783   ac_status=$?
23784   grep -v '^ *+' conftest.er1 >conftest.err
23785   rm -f conftest.er1
23786   cat conftest.err >&5
23787   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23788   (exit $ac_status); } && {
23789          test -z "$ac_c_werror_flag" ||
23790          test ! -s conftest.err
23791        } && test -s conftest$ac_exeext &&
23792        $as_test_x conftest$ac_exeext; then
23793   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23794 else
23795   echo "$as_me: failed program was:" >&5
23796 sed 's/^/| /' conftest.$ac_ext >&5
23797
23798         ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23799 fi
23800
23801 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23802       conftest$ac_exeext conftest.$ac_ext
23803 else
23804   cat >conftest.$ac_ext <<_ACEOF
23805 /* confdefs.h.  */
23806 _ACEOF
23807 cat confdefs.h >>conftest.$ac_ext
23808 cat >>conftest.$ac_ext <<_ACEOF
23809 /* end confdefs.h.  */
23810
23811 /* pthread test headers */
23812 #include <pthread.h>
23813 #if HAVE_PTHREADS < 7
23814 #include <errno.h>
23815 #endif
23816 #ifndef NULL
23817 #define NULL (void*)0
23818 #endif
23819
23820 static void *task(p)
23821         void *p;
23822 {
23823         return (void *) (p == NULL);
23824 }
23825
23826
23827 int main(argc, argv)
23828         int argc;
23829         char **argv;
23830 {
23831
23832         /* pthread test function */
23833 #ifndef PTHREAD_CREATE_DETACHED
23834 #define PTHREAD_CREATE_DETACHED 1
23835 #endif
23836         pthread_t t;
23837         int status;
23838         int detach = PTHREAD_CREATE_DETACHED;
23839
23840 #if HAVE_PTHREADS > 4
23841         /* Final pthreads */
23842         pthread_attr_t attr;
23843
23844         status = pthread_attr_init(&attr);
23845         if( status ) return status;
23846
23847 #if HAVE_PTHREADS < 7
23848         status = pthread_attr_setdetachstate(&attr, &detach);
23849         if( status < 0 ) status = errno;
23850 #else
23851         status = pthread_attr_setdetachstate(&attr, detach);
23852 #endif
23853         if( status ) return status;
23854         status = pthread_create( &t, &attr, task, NULL );
23855 #if HAVE_PTHREADS < 7
23856         if( status < 0 ) status = errno;
23857 #endif
23858         if( status ) return status;
23859 #else
23860         /* Draft 4 pthreads */
23861         status = pthread_create( &t, pthread_attr_default, task, NULL );
23862         if( status ) return errno;
23863
23864         /* give thread a chance to complete */
23865         /* it should remain joinable and hence detachable */
23866         sleep( 1 );
23867
23868         status = pthread_detach( &t );
23869         if( status ) return errno;
23870 #endif
23871
23872 #ifdef HAVE_LINUX_THREADS
23873         pthread_kill_other_threads_np();
23874 #endif
23875
23876         return 0;
23877
23878 }
23879
23880 _ACEOF
23881 rm -f conftest$ac_exeext
23882 if { (ac_try="$ac_link"
23883 case "(($ac_try" in
23884   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23885   *) ac_try_echo=$ac_try;;
23886 esac
23887 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23888   (eval "$ac_link") 2>&5
23889   ac_status=$?
23890   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23891   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23892   { (case "(($ac_try" in
23893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23894   *) ac_try_echo=$ac_try;;
23895 esac
23896 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23897   (eval "$ac_try") 2>&5
23898   ac_status=$?
23899   echo "$as_me:$LINENO: \$? = $ac_status" >&5
23900   (exit $ac_status); }; }; then
23901   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
23902 else
23903   echo "$as_me: program exited with status $ac_status" >&5
23904 echo "$as_me: failed program was:" >&5
23905 sed 's/^/| /' conftest.$ac_ext >&5
23906
23907 ( exit $ac_status )
23908 ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
23909 fi
23910 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23911 fi
23912
23913
23914
23915                 # restore the LIBS
23916                 LIBS="$ol_LIBS"
23917
23918 fi
23919 { echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
23920 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
23921
23922         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
23923                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
23924                 ol_link_threads=posix
23925         fi
23926 fi
23927
23928                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
23929 if test "$ol_link_threads" = no ; then
23930         # try -lpthreads -lmach -lexc
23931         { echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lmach -lexc" >&5
23932 echo $ECHO_N "checking for pthread link with -lpthreads -lmach -lexc... $ECHO_C" >&6; }
23933 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then
23934   echo $ECHO_N "(cached) $ECHO_C" >&6
23935 else
23936
23937                 # save the flags
23938                 ol_LIBS="$LIBS"
23939                 LIBS="-lpthreads -lmach -lexc $LIBS"
23940
23941                 if test "$cross_compiling" = yes; then
23942   cat >conftest.$ac_ext <<_ACEOF
23943 /* confdefs.h.  */
23944 _ACEOF
23945 cat confdefs.h >>conftest.$ac_ext
23946 cat >>conftest.$ac_ext <<_ACEOF
23947 /* end confdefs.h.  */
23948
23949 /* pthread test headers */
23950 #include <pthread.h>
23951 #if HAVE_PTHREADS < 7
23952 #include <errno.h>
23953 #endif
23954 #ifndef NULL
23955 #define NULL (void*)0
23956 #endif
23957
23958 static void *task(p)
23959         void *p;
23960 {
23961         return (void *) (p == NULL);
23962 }
23963
23964 int
23965 main ()
23966 {
23967
23968         /* pthread test function */
23969 #ifndef PTHREAD_CREATE_DETACHED
23970 #define PTHREAD_CREATE_DETACHED 1
23971 #endif
23972         pthread_t t;
23973         int status;
23974         int detach = PTHREAD_CREATE_DETACHED;
23975
23976 #if HAVE_PTHREADS > 4
23977         /* Final pthreads */
23978         pthread_attr_t attr;
23979
23980         status = pthread_attr_init(&attr);
23981         if( status ) return status;
23982
23983 #if HAVE_PTHREADS < 7
23984         status = pthread_attr_setdetachstate(&attr, &detach);
23985         if( status < 0 ) status = errno;
23986 #else
23987         status = pthread_attr_setdetachstate(&attr, detach);
23988 #endif
23989         if( status ) return status;
23990         status = pthread_create( &t, &attr, task, NULL );
23991 #if HAVE_PTHREADS < 7
23992         if( status < 0 ) status = errno;
23993 #endif
23994         if( status ) return status;
23995 #else
23996         /* Draft 4 pthreads */
23997         status = pthread_create( &t, pthread_attr_default, task, NULL );
23998         if( status ) return errno;
23999
24000         /* give thread a chance to complete */
24001         /* it should remain joinable and hence detachable */
24002         sleep( 1 );
24003
24004         status = pthread_detach( &t );
24005         if( status ) return errno;
24006 #endif
24007
24008 #ifdef HAVE_LINUX_THREADS
24009         pthread_kill_other_threads_np();
24010 #endif
24011
24012         return 0;
24013
24014   ;
24015   return 0;
24016 }
24017 _ACEOF
24018 rm -f conftest.$ac_objext conftest$ac_exeext
24019 if { (ac_try="$ac_link"
24020 case "(($ac_try" in
24021   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24022   *) ac_try_echo=$ac_try;;
24023 esac
24024 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24025   (eval "$ac_link") 2>conftest.er1
24026   ac_status=$?
24027   grep -v '^ *+' conftest.er1 >conftest.err
24028   rm -f conftest.er1
24029   cat conftest.err >&5
24030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24031   (exit $ac_status); } && {
24032          test -z "$ac_c_werror_flag" ||
24033          test ! -s conftest.err
24034        } && test -s conftest$ac_exeext &&
24035        $as_test_x conftest$ac_exeext; then
24036   ol_cv_pthread_lpthreads_lmach_lexc=yes
24037 else
24038   echo "$as_me: failed program was:" >&5
24039 sed 's/^/| /' conftest.$ac_ext >&5
24040
24041         ol_cv_pthread_lpthreads_lmach_lexc=no
24042 fi
24043
24044 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24045       conftest$ac_exeext conftest.$ac_ext
24046 else
24047   cat >conftest.$ac_ext <<_ACEOF
24048 /* confdefs.h.  */
24049 _ACEOF
24050 cat confdefs.h >>conftest.$ac_ext
24051 cat >>conftest.$ac_ext <<_ACEOF
24052 /* end confdefs.h.  */
24053
24054 /* pthread test headers */
24055 #include <pthread.h>
24056 #if HAVE_PTHREADS < 7
24057 #include <errno.h>
24058 #endif
24059 #ifndef NULL
24060 #define NULL (void*)0
24061 #endif
24062
24063 static void *task(p)
24064         void *p;
24065 {
24066         return (void *) (p == NULL);
24067 }
24068
24069
24070 int main(argc, argv)
24071         int argc;
24072         char **argv;
24073 {
24074
24075         /* pthread test function */
24076 #ifndef PTHREAD_CREATE_DETACHED
24077 #define PTHREAD_CREATE_DETACHED 1
24078 #endif
24079         pthread_t t;
24080         int status;
24081         int detach = PTHREAD_CREATE_DETACHED;
24082
24083 #if HAVE_PTHREADS > 4
24084         /* Final pthreads */
24085         pthread_attr_t attr;
24086
24087         status = pthread_attr_init(&attr);
24088         if( status ) return status;
24089
24090 #if HAVE_PTHREADS < 7
24091         status = pthread_attr_setdetachstate(&attr, &detach);
24092         if( status < 0 ) status = errno;
24093 #else
24094         status = pthread_attr_setdetachstate(&attr, detach);
24095 #endif
24096         if( status ) return status;
24097         status = pthread_create( &t, &attr, task, NULL );
24098 #if HAVE_PTHREADS < 7
24099         if( status < 0 ) status = errno;
24100 #endif
24101         if( status ) return status;
24102 #else
24103         /* Draft 4 pthreads */
24104         status = pthread_create( &t, pthread_attr_default, task, NULL );
24105         if( status ) return errno;
24106
24107         /* give thread a chance to complete */
24108         /* it should remain joinable and hence detachable */
24109         sleep( 1 );
24110
24111         status = pthread_detach( &t );
24112         if( status ) return errno;
24113 #endif
24114
24115 #ifdef HAVE_LINUX_THREADS
24116         pthread_kill_other_threads_np();
24117 #endif
24118
24119         return 0;
24120
24121 }
24122
24123 _ACEOF
24124 rm -f conftest$ac_exeext
24125 if { (ac_try="$ac_link"
24126 case "(($ac_try" in
24127   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24128   *) ac_try_echo=$ac_try;;
24129 esac
24130 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24131   (eval "$ac_link") 2>&5
24132   ac_status=$?
24133   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24134   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24135   { (case "(($ac_try" in
24136   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24137   *) ac_try_echo=$ac_try;;
24138 esac
24139 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24140   (eval "$ac_try") 2>&5
24141   ac_status=$?
24142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24143   (exit $ac_status); }; }; then
24144   ol_cv_pthread_lpthreads_lmach_lexc=yes
24145 else
24146   echo "$as_me: program exited with status $ac_status" >&5
24147 echo "$as_me: failed program was:" >&5
24148 sed 's/^/| /' conftest.$ac_ext >&5
24149
24150 ( exit $ac_status )
24151 ol_cv_pthread_lpthreads_lmach_lexc=no
24152 fi
24153 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24154 fi
24155
24156
24157
24158                 # restore the LIBS
24159                 LIBS="$ol_LIBS"
24160
24161 fi
24162 { echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
24163 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
24164
24165         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
24166                 ol_link_pthreads="-lpthreads -lmach -lexc"
24167                 ol_link_threads=posix
24168         fi
24169 fi
24170
24171                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
24172 if test "$ol_link_threads" = no ; then
24173         # try -lpthreads -lexc
24174         { echo "$as_me:$LINENO: checking for pthread link with -lpthreads -lexc" >&5
24175 echo $ECHO_N "checking for pthread link with -lpthreads -lexc... $ECHO_C" >&6; }
24176 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then
24177   echo $ECHO_N "(cached) $ECHO_C" >&6
24178 else
24179
24180                 # save the flags
24181                 ol_LIBS="$LIBS"
24182                 LIBS="-lpthreads -lexc $LIBS"
24183
24184                 if test "$cross_compiling" = yes; then
24185   cat >conftest.$ac_ext <<_ACEOF
24186 /* confdefs.h.  */
24187 _ACEOF
24188 cat confdefs.h >>conftest.$ac_ext
24189 cat >>conftest.$ac_ext <<_ACEOF
24190 /* end confdefs.h.  */
24191
24192 /* pthread test headers */
24193 #include <pthread.h>
24194 #if HAVE_PTHREADS < 7
24195 #include <errno.h>
24196 #endif
24197 #ifndef NULL
24198 #define NULL (void*)0
24199 #endif
24200
24201 static void *task(p)
24202         void *p;
24203 {
24204         return (void *) (p == NULL);
24205 }
24206
24207 int
24208 main ()
24209 {
24210
24211         /* pthread test function */
24212 #ifndef PTHREAD_CREATE_DETACHED
24213 #define PTHREAD_CREATE_DETACHED 1
24214 #endif
24215         pthread_t t;
24216         int status;
24217         int detach = PTHREAD_CREATE_DETACHED;
24218
24219 #if HAVE_PTHREADS > 4
24220         /* Final pthreads */
24221         pthread_attr_t attr;
24222
24223         status = pthread_attr_init(&attr);
24224         if( status ) return status;
24225
24226 #if HAVE_PTHREADS < 7
24227         status = pthread_attr_setdetachstate(&attr, &detach);
24228         if( status < 0 ) status = errno;
24229 #else
24230         status = pthread_attr_setdetachstate(&attr, detach);
24231 #endif
24232         if( status ) return status;
24233         status = pthread_create( &t, &attr, task, NULL );
24234 #if HAVE_PTHREADS < 7
24235         if( status < 0 ) status = errno;
24236 #endif
24237         if( status ) return status;
24238 #else
24239         /* Draft 4 pthreads */
24240         status = pthread_create( &t, pthread_attr_default, task, NULL );
24241         if( status ) return errno;
24242
24243         /* give thread a chance to complete */
24244         /* it should remain joinable and hence detachable */
24245         sleep( 1 );
24246
24247         status = pthread_detach( &t );
24248         if( status ) return errno;
24249 #endif
24250
24251 #ifdef HAVE_LINUX_THREADS
24252         pthread_kill_other_threads_np();
24253 #endif
24254
24255         return 0;
24256
24257   ;
24258   return 0;
24259 }
24260 _ACEOF
24261 rm -f conftest.$ac_objext conftest$ac_exeext
24262 if { (ac_try="$ac_link"
24263 case "(($ac_try" in
24264   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24265   *) ac_try_echo=$ac_try;;
24266 esac
24267 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24268   (eval "$ac_link") 2>conftest.er1
24269   ac_status=$?
24270   grep -v '^ *+' conftest.er1 >conftest.err
24271   rm -f conftest.er1
24272   cat conftest.err >&5
24273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24274   (exit $ac_status); } && {
24275          test -z "$ac_c_werror_flag" ||
24276          test ! -s conftest.err
24277        } && test -s conftest$ac_exeext &&
24278        $as_test_x conftest$ac_exeext; then
24279   ol_cv_pthread_lpthreads_lexc=yes
24280 else
24281   echo "$as_me: failed program was:" >&5
24282 sed 's/^/| /' conftest.$ac_ext >&5
24283
24284         ol_cv_pthread_lpthreads_lexc=no
24285 fi
24286
24287 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24288       conftest$ac_exeext conftest.$ac_ext
24289 else
24290   cat >conftest.$ac_ext <<_ACEOF
24291 /* confdefs.h.  */
24292 _ACEOF
24293 cat confdefs.h >>conftest.$ac_ext
24294 cat >>conftest.$ac_ext <<_ACEOF
24295 /* end confdefs.h.  */
24296
24297 /* pthread test headers */
24298 #include <pthread.h>
24299 #if HAVE_PTHREADS < 7
24300 #include <errno.h>
24301 #endif
24302 #ifndef NULL
24303 #define NULL (void*)0
24304 #endif
24305
24306 static void *task(p)
24307         void *p;
24308 {
24309         return (void *) (p == NULL);
24310 }
24311
24312
24313 int main(argc, argv)
24314         int argc;
24315         char **argv;
24316 {
24317
24318         /* pthread test function */
24319 #ifndef PTHREAD_CREATE_DETACHED
24320 #define PTHREAD_CREATE_DETACHED 1
24321 #endif
24322         pthread_t t;
24323         int status;
24324         int detach = PTHREAD_CREATE_DETACHED;
24325
24326 #if HAVE_PTHREADS > 4
24327         /* Final pthreads */
24328         pthread_attr_t attr;
24329
24330         status = pthread_attr_init(&attr);
24331         if( status ) return status;
24332
24333 #if HAVE_PTHREADS < 7
24334         status = pthread_attr_setdetachstate(&attr, &detach);
24335         if( status < 0 ) status = errno;
24336 #else
24337         status = pthread_attr_setdetachstate(&attr, detach);
24338 #endif
24339         if( status ) return status;
24340         status = pthread_create( &t, &attr, task, NULL );
24341 #if HAVE_PTHREADS < 7
24342         if( status < 0 ) status = errno;
24343 #endif
24344         if( status ) return status;
24345 #else
24346         /* Draft 4 pthreads */
24347         status = pthread_create( &t, pthread_attr_default, task, NULL );
24348         if( status ) return errno;
24349
24350         /* give thread a chance to complete */
24351         /* it should remain joinable and hence detachable */
24352         sleep( 1 );
24353
24354         status = pthread_detach( &t );
24355         if( status ) return errno;
24356 #endif
24357
24358 #ifdef HAVE_LINUX_THREADS
24359         pthread_kill_other_threads_np();
24360 #endif
24361
24362         return 0;
24363
24364 }
24365
24366 _ACEOF
24367 rm -f conftest$ac_exeext
24368 if { (ac_try="$ac_link"
24369 case "(($ac_try" in
24370   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24371   *) ac_try_echo=$ac_try;;
24372 esac
24373 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24374   (eval "$ac_link") 2>&5
24375   ac_status=$?
24376   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24377   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24378   { (case "(($ac_try" in
24379   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24380   *) ac_try_echo=$ac_try;;
24381 esac
24382 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24383   (eval "$ac_try") 2>&5
24384   ac_status=$?
24385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24386   (exit $ac_status); }; }; then
24387   ol_cv_pthread_lpthreads_lexc=yes
24388 else
24389   echo "$as_me: program exited with status $ac_status" >&5
24390 echo "$as_me: failed program was:" >&5
24391 sed 's/^/| /' conftest.$ac_ext >&5
24392
24393 ( exit $ac_status )
24394 ol_cv_pthread_lpthreads_lexc=no
24395 fi
24396 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24397 fi
24398
24399
24400
24401                 # restore the LIBS
24402                 LIBS="$ol_LIBS"
24403
24404 fi
24405 { echo "$as_me:$LINENO: result: $ol_cv_pthread_lpthreads_lexc" >&5
24406 echo "${ECHO_T}$ol_cv_pthread_lpthreads_lexc" >&6; }
24407
24408         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
24409                 ol_link_pthreads="-lpthreads -lexc"
24410                 ol_link_threads=posix
24411         fi
24412 fi
24413
24414
24415                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
24416 if test "$ol_link_threads" = no ; then
24417         # try -lpthreads
24418         { echo "$as_me:$LINENO: checking for pthread link with -lpthreads" >&5
24419 echo $ECHO_N "checking for pthread link with -lpthreads... $ECHO_C" >&6; }
24420 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then
24421   echo $ECHO_N "(cached) $ECHO_C" >&6
24422 else
24423
24424                 # save the flags
24425                 ol_LIBS="$LIBS"
24426                 LIBS="-lpthreads $LIBS"
24427
24428                 if test "$cross_compiling" = yes; then
24429   cat >conftest.$ac_ext <<_ACEOF
24430 /* confdefs.h.  */
24431 _ACEOF
24432 cat confdefs.h >>conftest.$ac_ext
24433 cat >>conftest.$ac_ext <<_ACEOF
24434 /* end confdefs.h.  */
24435
24436 /* pthread test headers */
24437 #include <pthread.h>
24438 #if HAVE_PTHREADS < 7
24439 #include <errno.h>
24440 #endif
24441 #ifndef NULL
24442 #define NULL (void*)0
24443 #endif
24444
24445 static void *task(p)
24446         void *p;
24447 {
24448         return (void *) (p == NULL);
24449 }
24450
24451 int
24452 main ()
24453 {
24454
24455         /* pthread test function */
24456 #ifndef PTHREAD_CREATE_DETACHED
24457 #define PTHREAD_CREATE_DETACHED 1
24458 #endif
24459         pthread_t t;
24460         int status;
24461         int detach = PTHREAD_CREATE_DETACHED;
24462
24463 #if HAVE_PTHREADS > 4
24464         /* Final pthreads */
24465         pthread_attr_t attr;
24466
24467         status = pthread_attr_init(&attr);
24468         if( status ) return status;
24469
24470 #if HAVE_PTHREADS < 7
24471         status = pthread_attr_setdetachstate(&attr, &detach);
24472         if( status < 0 ) status = errno;
24473 #else
24474         status = pthread_attr_setdetachstate(&attr, detach);
24475 #endif
24476         if( status ) return status;
24477         status = pthread_create( &t, &attr, task, NULL );
24478 #if HAVE_PTHREADS < 7
24479         if( status < 0 ) status = errno;
24480 #endif
24481         if( status ) return status;
24482 #else
24483         /* Draft 4 pthreads */
24484         status = pthread_create( &t, pthread_attr_default, task, NULL );
24485         if( status ) return errno;
24486
24487         /* give thread a chance to complete */
24488         /* it should remain joinable and hence detachable */
24489         sleep( 1 );
24490
24491         status = pthread_detach( &t );
24492         if( status ) return errno;
24493 #endif
24494
24495 #ifdef HAVE_LINUX_THREADS
24496         pthread_kill_other_threads_np();
24497 #endif
24498
24499         return 0;
24500
24501   ;
24502   return 0;
24503 }
24504 _ACEOF
24505 rm -f conftest.$ac_objext conftest$ac_exeext
24506 if { (ac_try="$ac_link"
24507 case "(($ac_try" in
24508   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24509   *) ac_try_echo=$ac_try;;
24510 esac
24511 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24512   (eval "$ac_link") 2>conftest.er1
24513   ac_status=$?
24514   grep -v '^ *+' conftest.er1 >conftest.err
24515   rm -f conftest.er1
24516   cat conftest.err >&5
24517   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24518   (exit $ac_status); } && {
24519          test -z "$ac_c_werror_flag" ||
24520          test ! -s conftest.err
24521        } && test -s conftest$ac_exeext &&
24522        $as_test_x conftest$ac_exeext; then
24523   ol_cv_pthread_lib_lpthreads=yes
24524 else
24525   echo "$as_me: failed program was:" >&5
24526 sed 's/^/| /' conftest.$ac_ext >&5
24527
24528         ol_cv_pthread_lib_lpthreads=no
24529 fi
24530
24531 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24532       conftest$ac_exeext conftest.$ac_ext
24533 else
24534   cat >conftest.$ac_ext <<_ACEOF
24535 /* confdefs.h.  */
24536 _ACEOF
24537 cat confdefs.h >>conftest.$ac_ext
24538 cat >>conftest.$ac_ext <<_ACEOF
24539 /* end confdefs.h.  */
24540
24541 /* pthread test headers */
24542 #include <pthread.h>
24543 #if HAVE_PTHREADS < 7
24544 #include <errno.h>
24545 #endif
24546 #ifndef NULL
24547 #define NULL (void*)0
24548 #endif
24549
24550 static void *task(p)
24551         void *p;
24552 {
24553         return (void *) (p == NULL);
24554 }
24555
24556
24557 int main(argc, argv)
24558         int argc;
24559         char **argv;
24560 {
24561
24562         /* pthread test function */
24563 #ifndef PTHREAD_CREATE_DETACHED
24564 #define PTHREAD_CREATE_DETACHED 1
24565 #endif
24566         pthread_t t;
24567         int status;
24568         int detach = PTHREAD_CREATE_DETACHED;
24569
24570 #if HAVE_PTHREADS > 4
24571         /* Final pthreads */
24572         pthread_attr_t attr;
24573
24574         status = pthread_attr_init(&attr);
24575         if( status ) return status;
24576
24577 #if HAVE_PTHREADS < 7
24578         status = pthread_attr_setdetachstate(&attr, &detach);
24579         if( status < 0 ) status = errno;
24580 #else
24581         status = pthread_attr_setdetachstate(&attr, detach);
24582 #endif
24583         if( status ) return status;
24584         status = pthread_create( &t, &attr, task, NULL );
24585 #if HAVE_PTHREADS < 7
24586         if( status < 0 ) status = errno;
24587 #endif
24588         if( status ) return status;
24589 #else
24590         /* Draft 4 pthreads */
24591         status = pthread_create( &t, pthread_attr_default, task, NULL );
24592         if( status ) return errno;
24593
24594         /* give thread a chance to complete */
24595         /* it should remain joinable and hence detachable */
24596         sleep( 1 );
24597
24598         status = pthread_detach( &t );
24599         if( status ) return errno;
24600 #endif
24601
24602 #ifdef HAVE_LINUX_THREADS
24603         pthread_kill_other_threads_np();
24604 #endif
24605
24606         return 0;
24607
24608 }
24609
24610 _ACEOF
24611 rm -f conftest$ac_exeext
24612 if { (ac_try="$ac_link"
24613 case "(($ac_try" in
24614   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24615   *) ac_try_echo=$ac_try;;
24616 esac
24617 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24618   (eval "$ac_link") 2>&5
24619   ac_status=$?
24620   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24621   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24622   { (case "(($ac_try" in
24623   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24624   *) ac_try_echo=$ac_try;;
24625 esac
24626 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24627   (eval "$ac_try") 2>&5
24628   ac_status=$?
24629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24630   (exit $ac_status); }; }; then
24631   ol_cv_pthread_lib_lpthreads=yes
24632 else
24633   echo "$as_me: program exited with status $ac_status" >&5
24634 echo "$as_me: failed program was:" >&5
24635 sed 's/^/| /' conftest.$ac_ext >&5
24636
24637 ( exit $ac_status )
24638 ol_cv_pthread_lib_lpthreads=no
24639 fi
24640 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24641 fi
24642
24643
24644
24645                 # restore the LIBS
24646                 LIBS="$ol_LIBS"
24647
24648 fi
24649 { echo "$as_me:$LINENO: result: $ol_cv_pthread_lib_lpthreads" >&5
24650 echo "${ECHO_T}$ol_cv_pthread_lib_lpthreads" >&6; }
24651
24652         if test $ol_cv_pthread_lib_lpthreads = yes ; then
24653                 ol_link_pthreads="-lpthreads"
24654                 ol_link_threads=posix
24655         fi
24656 fi
24657
24658
24659                 if test $ol_link_threads != no ; then
24660                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
24661
24662                                                 save_CPPFLAGS="$CPPFLAGS"
24663                         save_LIBS="$LIBS"
24664                         LIBS="$LTHREAD_LIBS $LIBS"
24665
24666
24667
24668
24669 for ac_func in sched_yield pthread_yield thr_yield
24670 do
24671 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24672 { echo "$as_me:$LINENO: checking for $ac_func" >&5
24673 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24674 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24675   echo $ECHO_N "(cached) $ECHO_C" >&6
24676 else
24677   cat >conftest.$ac_ext <<_ACEOF
24678 /* confdefs.h.  */
24679 _ACEOF
24680 cat confdefs.h >>conftest.$ac_ext
24681 cat >>conftest.$ac_ext <<_ACEOF
24682 /* end confdefs.h.  */
24683 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24684    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24685 #define $ac_func innocuous_$ac_func
24686
24687 /* System header to define __stub macros and hopefully few prototypes,
24688     which can conflict with char $ac_func (); below.
24689     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24690     <limits.h> exists even on freestanding compilers.  */
24691
24692 #ifdef __STDC__
24693 # include <limits.h>
24694 #else
24695 # include <assert.h>
24696 #endif
24697
24698 #undef $ac_func
24699
24700 /* Override any GCC internal prototype to avoid an error.
24701    Use char because int might match the return type of a GCC
24702    builtin and then its argument prototype would still apply.  */
24703 #ifdef __cplusplus
24704 extern "C"
24705 #endif
24706 char $ac_func ();
24707 /* The GNU C library defines this for functions which it implements
24708     to always fail with ENOSYS.  Some functions are actually named
24709     something starting with __ and the normal name is an alias.  */
24710 #if defined __stub_$ac_func || defined __stub___$ac_func
24711 choke me
24712 #endif
24713
24714 int
24715 main ()
24716 {
24717 return $ac_func ();
24718   ;
24719   return 0;
24720 }
24721 _ACEOF
24722 rm -f conftest.$ac_objext conftest$ac_exeext
24723 if { (ac_try="$ac_link"
24724 case "(($ac_try" in
24725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24726   *) ac_try_echo=$ac_try;;
24727 esac
24728 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24729   (eval "$ac_link") 2>conftest.er1
24730   ac_status=$?
24731   grep -v '^ *+' conftest.er1 >conftest.err
24732   rm -f conftest.er1
24733   cat conftest.err >&5
24734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24735   (exit $ac_status); } && {
24736          test -z "$ac_c_werror_flag" ||
24737          test ! -s conftest.err
24738        } && test -s conftest$ac_exeext &&
24739        $as_test_x conftest$ac_exeext; then
24740   eval "$as_ac_var=yes"
24741 else
24742   echo "$as_me: failed program was:" >&5
24743 sed 's/^/| /' conftest.$ac_ext >&5
24744
24745         eval "$as_ac_var=no"
24746 fi
24747
24748 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24749       conftest$ac_exeext conftest.$ac_ext
24750 fi
24751 ac_res=`eval echo '${'$as_ac_var'}'`
24752                { echo "$as_me:$LINENO: result: $ac_res" >&5
24753 echo "${ECHO_T}$ac_res" >&6; }
24754 if test `eval echo '${'$as_ac_var'}'` = yes; then
24755   cat >>confdefs.h <<_ACEOF
24756 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24757 _ACEOF
24758
24759 fi
24760 done
24761
24762
24763                         if test $ac_cv_func_sched_yield = no &&
24764                            test $ac_cv_func_pthread_yield = no &&
24765                            test $ac_cv_func_thr_yield = no ; then
24766                                                                 { echo "$as_me:$LINENO: checking for sched_yield in -lrt" >&5
24767 echo $ECHO_N "checking for sched_yield in -lrt... $ECHO_C" >&6; }
24768 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then
24769   echo $ECHO_N "(cached) $ECHO_C" >&6
24770 else
24771   ac_check_lib_save_LIBS=$LIBS
24772 LIBS="-lrt  $LIBS"
24773 cat >conftest.$ac_ext <<_ACEOF
24774 /* confdefs.h.  */
24775 _ACEOF
24776 cat confdefs.h >>conftest.$ac_ext
24777 cat >>conftest.$ac_ext <<_ACEOF
24778 /* end confdefs.h.  */
24779
24780 /* Override any GCC internal prototype to avoid an error.
24781    Use char because int might match the return type of a GCC
24782    builtin and then its argument prototype would still apply.  */
24783 #ifdef __cplusplus
24784 extern "C"
24785 #endif
24786 char sched_yield ();
24787 int
24788 main ()
24789 {
24790 return sched_yield ();
24791   ;
24792   return 0;
24793 }
24794 _ACEOF
24795 rm -f conftest.$ac_objext conftest$ac_exeext
24796 if { (ac_try="$ac_link"
24797 case "(($ac_try" in
24798   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24799   *) ac_try_echo=$ac_try;;
24800 esac
24801 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24802   (eval "$ac_link") 2>conftest.er1
24803   ac_status=$?
24804   grep -v '^ *+' conftest.er1 >conftest.err
24805   rm -f conftest.er1
24806   cat conftest.err >&5
24807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24808   (exit $ac_status); } && {
24809          test -z "$ac_c_werror_flag" ||
24810          test ! -s conftest.err
24811        } && test -s conftest$ac_exeext &&
24812        $as_test_x conftest$ac_exeext; then
24813   ac_cv_lib_rt_sched_yield=yes
24814 else
24815   echo "$as_me: failed program was:" >&5
24816 sed 's/^/| /' conftest.$ac_ext >&5
24817
24818         ac_cv_lib_rt_sched_yield=no
24819 fi
24820
24821 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24822       conftest$ac_exeext conftest.$ac_ext
24823 LIBS=$ac_check_lib_save_LIBS
24824 fi
24825 { echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sched_yield" >&5
24826 echo "${ECHO_T}$ac_cv_lib_rt_sched_yield" >&6; }
24827 if test $ac_cv_lib_rt_sched_yield = yes; then
24828   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
24829
24830 cat >>confdefs.h <<\_ACEOF
24831 #define HAVE_SCHED_YIELD 1
24832 _ACEOF
24833
24834                                         ac_cv_func_sched_yield=yes
24835 else
24836   ac_cv_func_sched_yield=no
24837 fi
24838
24839                         fi
24840                         if test $ac_cv_func_sched_yield = no &&
24841                            test $ac_cv_func_pthread_yield = no &&
24842                            test "$ac_cv_func_thr_yield" = no ; then
24843                                 { echo "$as_me:$LINENO: WARNING: could not locate sched_yield() or pthread_yield()" >&5
24844 echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
24845                         fi
24846
24847
24848 for ac_func in pthread_kill
24849 do
24850 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24851 { echo "$as_me:$LINENO: checking for $ac_func" >&5
24852 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24853 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24854   echo $ECHO_N "(cached) $ECHO_C" >&6
24855 else
24856   cat >conftest.$ac_ext <<_ACEOF
24857 /* confdefs.h.  */
24858 _ACEOF
24859 cat confdefs.h >>conftest.$ac_ext
24860 cat >>conftest.$ac_ext <<_ACEOF
24861 /* end confdefs.h.  */
24862 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24863    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
24864 #define $ac_func innocuous_$ac_func
24865
24866 /* System header to define __stub macros and hopefully few prototypes,
24867     which can conflict with char $ac_func (); below.
24868     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24869     <limits.h> exists even on freestanding compilers.  */
24870
24871 #ifdef __STDC__
24872 # include <limits.h>
24873 #else
24874 # include <assert.h>
24875 #endif
24876
24877 #undef $ac_func
24878
24879 /* Override any GCC internal prototype to avoid an error.
24880    Use char because int might match the return type of a GCC
24881    builtin and then its argument prototype would still apply.  */
24882 #ifdef __cplusplus
24883 extern "C"
24884 #endif
24885 char $ac_func ();
24886 /* The GNU C library defines this for functions which it implements
24887     to always fail with ENOSYS.  Some functions are actually named
24888     something starting with __ and the normal name is an alias.  */
24889 #if defined __stub_$ac_func || defined __stub___$ac_func
24890 choke me
24891 #endif
24892
24893 int
24894 main ()
24895 {
24896 return $ac_func ();
24897   ;
24898   return 0;
24899 }
24900 _ACEOF
24901 rm -f conftest.$ac_objext conftest$ac_exeext
24902 if { (ac_try="$ac_link"
24903 case "(($ac_try" in
24904   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24905   *) ac_try_echo=$ac_try;;
24906 esac
24907 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24908   (eval "$ac_link") 2>conftest.er1
24909   ac_status=$?
24910   grep -v '^ *+' conftest.er1 >conftest.err
24911   rm -f conftest.er1
24912   cat conftest.err >&5
24913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24914   (exit $ac_status); } && {
24915          test -z "$ac_c_werror_flag" ||
24916          test ! -s conftest.err
24917        } && test -s conftest$ac_exeext &&
24918        $as_test_x conftest$ac_exeext; then
24919   eval "$as_ac_var=yes"
24920 else
24921   echo "$as_me: failed program was:" >&5
24922 sed 's/^/| /' conftest.$ac_ext >&5
24923
24924         eval "$as_ac_var=no"
24925 fi
24926
24927 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24928       conftest$ac_exeext conftest.$ac_ext
24929 fi
24930 ac_res=`eval echo '${'$as_ac_var'}'`
24931                { echo "$as_me:$LINENO: result: $ac_res" >&5
24932 echo "${ECHO_T}$ac_res" >&6; }
24933 if test `eval echo '${'$as_ac_var'}'` = yes; then
24934   cat >>confdefs.h <<_ACEOF
24935 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24936 _ACEOF
24937
24938 fi
24939 done
24940
24941
24942                                                                         { echo "$as_me:$LINENO: checking for pthread_rwlock_destroy with <pthread.h>" >&5
24943 echo $ECHO_N "checking for pthread_rwlock_destroy with <pthread.h>... $ECHO_C" >&6; }
24944 if test "${ol_cv_func_pthread_rwlock_destroy+set}" = set; then
24945   echo $ECHO_N "(cached) $ECHO_C" >&6
24946 else
24947
24948                                                                 cat >conftest.$ac_ext <<_ACEOF
24949 /* confdefs.h.  */
24950 _ACEOF
24951 cat confdefs.h >>conftest.$ac_ext
24952 cat >>conftest.$ac_ext <<_ACEOF
24953 /* end confdefs.h.  */
24954
24955 #include <pthread.h>
24956 pthread_rwlock_t rwlock;
24957
24958 int
24959 main ()
24960 {
24961 pthread_rwlock_destroy(&rwlock);
24962   ;
24963   return 0;
24964 }
24965 _ACEOF
24966 rm -f conftest.$ac_objext conftest$ac_exeext
24967 if { (ac_try="$ac_link"
24968 case "(($ac_try" in
24969   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24970   *) ac_try_echo=$ac_try;;
24971 esac
24972 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24973   (eval "$ac_link") 2>conftest.er1
24974   ac_status=$?
24975   grep -v '^ *+' conftest.er1 >conftest.err
24976   rm -f conftest.er1
24977   cat conftest.err >&5
24978   echo "$as_me:$LINENO: \$? = $ac_status" >&5
24979   (exit $ac_status); } && {
24980          test -z "$ac_c_werror_flag" ||
24981          test ! -s conftest.err
24982        } && test -s conftest$ac_exeext &&
24983        $as_test_x conftest$ac_exeext; then
24984   ol_cv_func_pthread_rwlock_destroy=yes
24985 else
24986   echo "$as_me: failed program was:" >&5
24987 sed 's/^/| /' conftest.$ac_ext >&5
24988
24989         ol_cv_func_pthread_rwlock_destroy=no
24990 fi
24991
24992 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24993       conftest$ac_exeext conftest.$ac_ext
24994
24995 fi
24996 { echo "$as_me:$LINENO: result: $ol_cv_func_pthread_rwlock_destroy" >&5
24997 echo "${ECHO_T}$ol_cv_func_pthread_rwlock_destroy" >&6; }
24998                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
24999
25000 cat >>confdefs.h <<\_ACEOF
25001 #define HAVE_PTHREAD_RWLOCK_DESTROY 1
25002 _ACEOF
25003
25004                         fi
25005
25006                                                                         { echo "$as_me:$LINENO: checking for pthread_detach with <pthread.h>" >&5
25007 echo $ECHO_N "checking for pthread_detach with <pthread.h>... $ECHO_C" >&6; }
25008 if test "${ol_cv_func_pthread_detach+set}" = set; then
25009   echo $ECHO_N "(cached) $ECHO_C" >&6
25010 else
25011
25012                                                                 cat >conftest.$ac_ext <<_ACEOF
25013 /* confdefs.h.  */
25014 _ACEOF
25015 cat confdefs.h >>conftest.$ac_ext
25016 cat >>conftest.$ac_ext <<_ACEOF
25017 /* end confdefs.h.  */
25018
25019 #include <pthread.h>
25020 #ifndef NULL
25021 #define NULL (void*)0
25022 #endif
25023
25024 int
25025 main ()
25026 {
25027 pthread_detach(NULL);
25028   ;
25029   return 0;
25030 }
25031 _ACEOF
25032 rm -f conftest.$ac_objext conftest$ac_exeext
25033 if { (ac_try="$ac_link"
25034 case "(($ac_try" in
25035   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25036   *) ac_try_echo=$ac_try;;
25037 esac
25038 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25039   (eval "$ac_link") 2>conftest.er1
25040   ac_status=$?
25041   grep -v '^ *+' conftest.er1 >conftest.err
25042   rm -f conftest.er1
25043   cat conftest.err >&5
25044   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25045   (exit $ac_status); } && {
25046          test -z "$ac_c_werror_flag" ||
25047          test ! -s conftest.err
25048        } && test -s conftest$ac_exeext &&
25049        $as_test_x conftest$ac_exeext; then
25050   ol_cv_func_pthread_detach=yes
25051 else
25052   echo "$as_me: failed program was:" >&5
25053 sed 's/^/| /' conftest.$ac_ext >&5
25054
25055         ol_cv_func_pthread_detach=no
25056 fi
25057
25058 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25059       conftest$ac_exeext conftest.$ac_ext
25060
25061 fi
25062 { echo "$as_me:$LINENO: result: $ol_cv_func_pthread_detach" >&5
25063 echo "${ECHO_T}$ol_cv_func_pthread_detach" >&6; }
25064
25065                         if test $ol_cv_func_pthread_detach = no ; then
25066                                 { { echo "$as_me:$LINENO: error: could not locate pthread_detach()" >&5
25067 echo "$as_me: error: could not locate pthread_detach()" >&2;}
25068    { (exit 1); exit 1; }; }
25069                         fi
25070
25071
25072 cat >>confdefs.h <<\_ACEOF
25073 #define HAVE_PTHREAD_DETACH 1
25074 _ACEOF
25075
25076
25077
25078
25079
25080
25081 for ac_func in \
25082                                 pthread_setconcurrency \
25083                                 pthread_getconcurrency \
25084                                 thr_setconcurrency \
25085                                 thr_getconcurrency \
25086
25087 do
25088 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
25089 { echo "$as_me:$LINENO: checking for $ac_func" >&5
25090 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
25091 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
25092   echo $ECHO_N "(cached) $ECHO_C" >&6
25093 else
25094   cat >conftest.$ac_ext <<_ACEOF
25095 /* confdefs.h.  */
25096 _ACEOF
25097 cat confdefs.h >>conftest.$ac_ext
25098 cat >>conftest.$ac_ext <<_ACEOF
25099 /* end confdefs.h.  */
25100 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
25101    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25102 #define $ac_func innocuous_$ac_func
25103
25104 /* System header to define __stub macros and hopefully few prototypes,
25105     which can conflict with char $ac_func (); below.
25106     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25107     <limits.h> exists even on freestanding compilers.  */
25108
25109 #ifdef __STDC__
25110 # include <limits.h>
25111 #else
25112 # include <assert.h>
25113 #endif
25114
25115 #undef $ac_func
25116
25117 /* Override any GCC internal prototype to avoid an error.
25118    Use char because int might match the return type of a GCC
25119    builtin and then its argument prototype would still apply.  */
25120 #ifdef __cplusplus
25121 extern "C"
25122 #endif
25123 char $ac_func ();
25124 /* The GNU C library defines this for functions which it implements
25125     to always fail with ENOSYS.  Some functions are actually named
25126     something starting with __ and the normal name is an alias.  */
25127 #if defined __stub_$ac_func || defined __stub___$ac_func
25128 choke me
25129 #endif
25130
25131 int
25132 main ()
25133 {
25134 return $ac_func ();
25135   ;
25136   return 0;
25137 }
25138 _ACEOF
25139 rm -f conftest.$ac_objext conftest$ac_exeext
25140 if { (ac_try="$ac_link"
25141 case "(($ac_try" in
25142   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25143   *) ac_try_echo=$ac_try;;
25144 esac
25145 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25146   (eval "$ac_link") 2>conftest.er1
25147   ac_status=$?
25148   grep -v '^ *+' conftest.er1 >conftest.err
25149   rm -f conftest.er1
25150   cat conftest.err >&5
25151   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25152   (exit $ac_status); } && {
25153          test -z "$ac_c_werror_flag" ||
25154          test ! -s conftest.err
25155        } && test -s conftest$ac_exeext &&
25156        $as_test_x conftest$ac_exeext; then
25157   eval "$as_ac_var=yes"
25158 else
25159   echo "$as_me: failed program was:" >&5
25160 sed 's/^/| /' conftest.$ac_ext >&5
25161
25162         eval "$as_ac_var=no"
25163 fi
25164
25165 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25166       conftest$ac_exeext conftest.$ac_ext
25167 fi
25168 ac_res=`eval echo '${'$as_ac_var'}'`
25169                { echo "$as_me:$LINENO: result: $ac_res" >&5
25170 echo "${ECHO_T}$ac_res" >&6; }
25171 if test `eval echo '${'$as_ac_var'}'` = yes; then
25172   cat >>confdefs.h <<_ACEOF
25173 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
25174 _ACEOF
25175
25176 fi
25177 done
25178
25179
25180
25181
25182 for ac_func in pthread_kill_other_threads_np
25183 do
25184 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
25185 { echo "$as_me:$LINENO: checking for $ac_func" >&5
25186 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
25187 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
25188   echo $ECHO_N "(cached) $ECHO_C" >&6
25189 else
25190   cat >conftest.$ac_ext <<_ACEOF
25191 /* confdefs.h.  */
25192 _ACEOF
25193 cat confdefs.h >>conftest.$ac_ext
25194 cat >>conftest.$ac_ext <<_ACEOF
25195 /* end confdefs.h.  */
25196 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
25197    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25198 #define $ac_func innocuous_$ac_func
25199
25200 /* System header to define __stub macros and hopefully few prototypes,
25201     which can conflict with char $ac_func (); below.
25202     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25203     <limits.h> exists even on freestanding compilers.  */
25204
25205 #ifdef __STDC__
25206 # include <limits.h>
25207 #else
25208 # include <assert.h>
25209 #endif
25210
25211 #undef $ac_func
25212
25213 /* Override any GCC internal prototype to avoid an error.
25214    Use char because int might match the return type of a GCC
25215    builtin and then its argument prototype would still apply.  */
25216 #ifdef __cplusplus
25217 extern "C"
25218 #endif
25219 char $ac_func ();
25220 /* The GNU C library defines this for functions which it implements
25221     to always fail with ENOSYS.  Some functions are actually named
25222     something starting with __ and the normal name is an alias.  */
25223 #if defined __stub_$ac_func || defined __stub___$ac_func
25224 choke me
25225 #endif
25226
25227 int
25228 main ()
25229 {
25230 return $ac_func ();
25231   ;
25232   return 0;
25233 }
25234 _ACEOF
25235 rm -f conftest.$ac_objext conftest$ac_exeext
25236 if { (ac_try="$ac_link"
25237 case "(($ac_try" in
25238   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25239   *) ac_try_echo=$ac_try;;
25240 esac
25241 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25242   (eval "$ac_link") 2>conftest.er1
25243   ac_status=$?
25244   grep -v '^ *+' conftest.er1 >conftest.err
25245   rm -f conftest.er1
25246   cat conftest.err >&5
25247   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25248   (exit $ac_status); } && {
25249          test -z "$ac_c_werror_flag" ||
25250          test ! -s conftest.err
25251        } && test -s conftest$ac_exeext &&
25252        $as_test_x conftest$ac_exeext; then
25253   eval "$as_ac_var=yes"
25254 else
25255   echo "$as_me: failed program was:" >&5
25256 sed 's/^/| /' conftest.$ac_ext >&5
25257
25258         eval "$as_ac_var=no"
25259 fi
25260
25261 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25262       conftest$ac_exeext conftest.$ac_ext
25263 fi
25264 ac_res=`eval echo '${'$as_ac_var'}'`
25265                { echo "$as_me:$LINENO: result: $ac_res" >&5
25266 echo "${ECHO_T}$ac_res" >&6; }
25267 if test `eval echo '${'$as_ac_var'}'` = yes; then
25268   cat >>confdefs.h <<_ACEOF
25269 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
25270 _ACEOF
25271
25272 fi
25273 done
25274
25275         { echo "$as_me:$LINENO: checking for LinuxThreads implementation" >&5
25276 echo $ECHO_N "checking for LinuxThreads implementation... $ECHO_C" >&6; }
25277 if test "${ol_cv_sys_linux_threads+set}" = set; then
25278   echo $ECHO_N "(cached) $ECHO_C" >&6
25279 else
25280   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
25281 fi
25282 { echo "$as_me:$LINENO: result: $ol_cv_sys_linux_threads" >&5
25283 echo "${ECHO_T}$ol_cv_sys_linux_threads" >&6; }
25284
25285
25286
25287
25288         { echo "$as_me:$LINENO: checking for LinuxThreads consistency" >&5
25289 echo $ECHO_N "checking for LinuxThreads consistency... $ECHO_C" >&6; }
25290 if test "${ol_cv_linux_threads+set}" = set; then
25291   echo $ECHO_N "(cached) $ECHO_C" >&6
25292 else
25293
25294                 if test $ol_cv_header_linux_threads = yes &&
25295                    test $ol_cv_sys_linux_threads = yes; then
25296                         ol_cv_linux_threads=yes
25297                 elif test $ol_cv_header_linux_threads = no &&
25298                      test $ol_cv_sys_linux_threads = no; then
25299                         ol_cv_linux_threads=no
25300                 else
25301                         ol_cv_linux_threads=error
25302                 fi
25303
25304 fi
25305 { echo "$as_me:$LINENO: result: $ol_cv_linux_threads" >&5
25306 echo "${ECHO_T}$ol_cv_linux_threads" >&6; }
25307
25308
25309                         if test $ol_cv_linux_threads = error; then
25310                                 { { echo "$as_me:$LINENO: error: LinuxThreads header/library mismatch" >&5
25311 echo "$as_me: error: LinuxThreads header/library mismatch" >&2;}
25312    { (exit 1); exit 1; }; };
25313                         fi
25314
25315                         { echo "$as_me:$LINENO: checking if pthread_create() works" >&5
25316 echo $ECHO_N "checking if pthread_create() works... $ECHO_C" >&6; }
25317 if test "${ol_cv_pthread_create_works+set}" = set; then
25318   echo $ECHO_N "(cached) $ECHO_C" >&6
25319 else
25320
25321                         if test "$cross_compiling" = yes; then
25322                                 ol_cv_pthread_create_works=yes
25323 else
25324   cat >conftest.$ac_ext <<_ACEOF
25325 /* confdefs.h.  */
25326 _ACEOF
25327 cat confdefs.h >>conftest.$ac_ext
25328 cat >>conftest.$ac_ext <<_ACEOF
25329 /* end confdefs.h.  */
25330
25331 /* pthread test headers */
25332 #include <pthread.h>
25333 #if HAVE_PTHREADS < 7
25334 #include <errno.h>
25335 #endif
25336 #ifndef NULL
25337 #define NULL (void*)0
25338 #endif
25339
25340 static void *task(p)
25341         void *p;
25342 {
25343         return (void *) (p == NULL);
25344 }
25345
25346
25347 int main(argc, argv)
25348         int argc;
25349         char **argv;
25350 {
25351
25352         /* pthread test function */
25353 #ifndef PTHREAD_CREATE_DETACHED
25354 #define PTHREAD_CREATE_DETACHED 1
25355 #endif
25356         pthread_t t;
25357         int status;
25358         int detach = PTHREAD_CREATE_DETACHED;
25359
25360 #if HAVE_PTHREADS > 4
25361         /* Final pthreads */
25362         pthread_attr_t attr;
25363
25364         status = pthread_attr_init(&attr);
25365         if( status ) return status;
25366
25367 #if HAVE_PTHREADS < 7
25368         status = pthread_attr_setdetachstate(&attr, &detach);
25369         if( status < 0 ) status = errno;
25370 #else
25371         status = pthread_attr_setdetachstate(&attr, detach);
25372 #endif
25373         if( status ) return status;
25374         status = pthread_create( &t, &attr, task, NULL );
25375 #if HAVE_PTHREADS < 7
25376         if( status < 0 ) status = errno;
25377 #endif
25378         if( status ) return status;
25379 #else
25380         /* Draft 4 pthreads */
25381         status = pthread_create( &t, pthread_attr_default, task, NULL );
25382         if( status ) return errno;
25383
25384         /* give thread a chance to complete */
25385         /* it should remain joinable and hence detachable */
25386         sleep( 1 );
25387
25388         status = pthread_detach( &t );
25389         if( status ) return errno;
25390 #endif
25391
25392 #ifdef HAVE_LINUX_THREADS
25393         pthread_kill_other_threads_np();
25394 #endif
25395
25396         return 0;
25397
25398 }
25399
25400 _ACEOF
25401 rm -f conftest$ac_exeext
25402 if { (ac_try="$ac_link"
25403 case "(($ac_try" in
25404   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25405   *) ac_try_echo=$ac_try;;
25406 esac
25407 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25408   (eval "$ac_link") 2>&5
25409   ac_status=$?
25410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25411   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25412   { (case "(($ac_try" in
25413   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25414   *) ac_try_echo=$ac_try;;
25415 esac
25416 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25417   (eval "$ac_try") 2>&5
25418   ac_status=$?
25419   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25420   (exit $ac_status); }; }; then
25421   ol_cv_pthread_create_works=yes
25422 else
25423   echo "$as_me: program exited with status $ac_status" >&5
25424 echo "$as_me: failed program was:" >&5
25425 sed 's/^/| /' conftest.$ac_ext >&5
25426
25427 ( exit $ac_status )
25428 ol_cv_pthread_create_works=no
25429 fi
25430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25431 fi
25432
25433
25434 fi
25435 { echo "$as_me:$LINENO: result: $ol_cv_pthread_create_works" >&5
25436 echo "${ECHO_T}$ol_cv_pthread_create_works" >&6; }
25437
25438                         if test $ol_cv_pthread_create_works = no ; then
25439                                 { { echo "$as_me:$LINENO: error: pthread_create is not usable, check environment settings" >&5
25440 echo "$as_me: error: pthread_create is not usable, check environment settings" >&2;}
25441    { (exit 1); exit 1; }; }
25442                         fi
25443
25444                         ol_replace_broken_yield=no
25445
25446                         if test $ol_replace_broken_yield = yes ; then
25447
25448 cat >>confdefs.h <<\_ACEOF
25449 #define REPLACE_BROKEN_YIELD 1
25450 _ACEOF
25451
25452                         fi
25453
25454                                                 if test $ol_with_yielding_select = auto ; then
25455                                 { echo "$as_me:$LINENO: checking if select yields when using pthreads" >&5
25456 echo $ECHO_N "checking if select yields when using pthreads... $ECHO_C" >&6; }
25457 if test "${ol_cv_pthread_select_yields+set}" = set; then
25458   echo $ECHO_N "(cached) $ECHO_C" >&6
25459 else
25460
25461                                 if test "$cross_compiling" = yes; then
25462   ol_cv_pthread_select_yields=cross
25463 else
25464   cat >conftest.$ac_ext <<_ACEOF
25465 /* confdefs.h.  */
25466 _ACEOF
25467 cat confdefs.h >>conftest.$ac_ext
25468 cat >>conftest.$ac_ext <<_ACEOF
25469 /* end confdefs.h.  */
25470
25471 #include <sys/types.h>
25472 #include <sys/time.h>
25473 #include <unistd.h>
25474 #include <pthread.h>
25475 #ifndef NULL
25476 #define NULL (void*) 0
25477 #endif
25478
25479 static int fildes[2];
25480
25481 static void *task(p)
25482         void *p;
25483 {
25484         int i;
25485         struct timeval tv;
25486
25487         fd_set rfds;
25488
25489         tv.tv_sec=10;
25490         tv.tv_usec=0;
25491
25492         FD_ZERO(&rfds);
25493         FD_SET(fildes[0], &rfds);
25494
25495         /* we're not interested in any fds */
25496         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
25497
25498         if(i < 0) {
25499                 perror("select");
25500                 exit(10);
25501         }
25502
25503         exit(0); /* if we exit here, the select blocked the whole process */
25504 }
25505
25506 int main(argc, argv)
25507         int argc;
25508         char **argv;
25509 {
25510         pthread_t t;
25511
25512         /* create a pipe to select */
25513         if(pipe(&fildes[0])) {
25514                 perror("select");
25515                 exit(1);
25516         }
25517
25518 #ifdef HAVE_PTHREAD_SETCONCURRENCY
25519         (void) pthread_setconcurrency(2);
25520 #else
25521 #ifdef HAVE_THR_SETCONCURRENCY
25522         /* Set Solaris LWP concurrency to 2 */
25523         thr_setconcurrency(2);
25524 #endif
25525 #endif
25526
25527 #if HAVE_PTHREADS < 6
25528         pthread_create(&t, pthread_attr_default, task, NULL);
25529 #else
25530         pthread_create(&t, NULL, task, NULL);
25531 #endif
25532
25533         /* make sure task runs first */
25534 #ifdef HAVE_THR_YIELD
25535         thr_yield();
25536 #elif defined( HAVE_SCHED_YIELD )
25537         sched_yield();
25538 #elif defined( HAVE_PTHREAD_YIELD )
25539         pthread_yield();
25540 #endif
25541
25542         exit(2);
25543 }
25544 _ACEOF
25545 rm -f conftest$ac_exeext
25546 if { (ac_try="$ac_link"
25547 case "(($ac_try" in
25548   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25549   *) ac_try_echo=$ac_try;;
25550 esac
25551 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25552   (eval "$ac_link") 2>&5
25553   ac_status=$?
25554   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25555   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25556   { (case "(($ac_try" in
25557   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25558   *) ac_try_echo=$ac_try;;
25559 esac
25560 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25561   (eval "$ac_try") 2>&5
25562   ac_status=$?
25563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25564   (exit $ac_status); }; }; then
25565   ol_cv_pthread_select_yields=no
25566 else
25567   echo "$as_me: program exited with status $ac_status" >&5
25568 echo "$as_me: failed program was:" >&5
25569 sed 's/^/| /' conftest.$ac_ext >&5
25570
25571 ( exit $ac_status )
25572 ol_cv_pthread_select_yields=yes
25573 fi
25574 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25575 fi
25576
25577
25578 fi
25579 { echo "$as_me:$LINENO: result: $ol_cv_pthread_select_yields" >&5
25580 echo "${ECHO_T}$ol_cv_pthread_select_yields" >&6; }
25581
25582                                 if test $ol_cv_pthread_select_yields = cross ; then
25583                                         { { echo "$as_me:$LINENO: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&5
25584 echo "$as_me: error: crossing compiling: use --with-yielding_select=yes|no|manual" >&2;}
25585    { (exit 1); exit 1; }; }
25586                                 fi
25587
25588                                 if test $ol_cv_pthread_select_yields = yes ; then
25589                                         ol_with_yielding_select=yes
25590                                 fi
25591                         fi
25592
25593                                                 CPPFLAGS="$save_CPPFLAGS"
25594                         LIBS="$save_LIBS"
25595                 else
25596                         { { echo "$as_me:$LINENO: error: could not locate usable POSIX Threads" >&5
25597 echo "$as_me: error: could not locate usable POSIX Threads" >&2;}
25598    { (exit 1); exit 1; }; }
25599                 fi
25600         fi
25601
25602         if test $ol_with_threads = posix ; then
25603                 { { echo "$as_me:$LINENO: error: could not locate POSIX Threads" >&5
25604 echo "$as_me: error: could not locate POSIX Threads" >&2;}
25605    { (exit 1); exit 1; }; }
25606         fi
25607         ;;
25608 esac
25609
25610 case $ol_with_threads in auto | yes | mach)
25611
25612
25613
25614 for ac_header in mach/cthreads.h cthreads.h
25615 do
25616 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25617 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
25618   { echo "$as_me:$LINENO: checking for $ac_header" >&5
25619 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
25620 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
25621   echo $ECHO_N "(cached) $ECHO_C" >&6
25622 fi
25623 ac_res=`eval echo '${'$as_ac_Header'}'`
25624                { echo "$as_me:$LINENO: result: $ac_res" >&5
25625 echo "${ECHO_T}$ac_res" >&6; }
25626 else
25627   # Is the header compilable?
25628 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
25629 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
25630 cat >conftest.$ac_ext <<_ACEOF
25631 /* confdefs.h.  */
25632 _ACEOF
25633 cat confdefs.h >>conftest.$ac_ext
25634 cat >>conftest.$ac_ext <<_ACEOF
25635 /* end confdefs.h.  */
25636 $ac_includes_default
25637 #include <$ac_header>
25638 _ACEOF
25639 rm -f conftest.$ac_objext
25640 if { (ac_try="$ac_compile"
25641 case "(($ac_try" in
25642   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25643   *) ac_try_echo=$ac_try;;
25644 esac
25645 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25646   (eval "$ac_compile") 2>conftest.er1
25647   ac_status=$?
25648   grep -v '^ *+' conftest.er1 >conftest.err
25649   rm -f conftest.er1
25650   cat conftest.err >&5
25651   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25652   (exit $ac_status); } && {
25653          test -z "$ac_c_werror_flag" ||
25654          test ! -s conftest.err
25655        } && test -s conftest.$ac_objext; then
25656   ac_header_compiler=yes
25657 else
25658   echo "$as_me: failed program was:" >&5
25659 sed 's/^/| /' conftest.$ac_ext >&5
25660
25661         ac_header_compiler=no
25662 fi
25663
25664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25665 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25666 echo "${ECHO_T}$ac_header_compiler" >&6; }
25667
25668 # Is the header present?
25669 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
25670 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
25671 cat >conftest.$ac_ext <<_ACEOF
25672 /* confdefs.h.  */
25673 _ACEOF
25674 cat confdefs.h >>conftest.$ac_ext
25675 cat >>conftest.$ac_ext <<_ACEOF
25676 /* end confdefs.h.  */
25677 #include <$ac_header>
25678 _ACEOF
25679 if { (ac_try="$ac_cpp conftest.$ac_ext"
25680 case "(($ac_try" in
25681   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25682   *) ac_try_echo=$ac_try;;
25683 esac
25684 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25685   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
25686   ac_status=$?
25687   grep -v '^ *+' conftest.er1 >conftest.err
25688   rm -f conftest.er1
25689   cat conftest.err >&5
25690   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25691   (exit $ac_status); } >/dev/null && {
25692          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25693          test ! -s conftest.err
25694        }; then
25695   ac_header_preproc=yes
25696 else
25697   echo "$as_me: failed program was:" >&5
25698 sed 's/^/| /' conftest.$ac_ext >&5
25699
25700   ac_header_preproc=no
25701 fi
25702
25703 rm -f conftest.err conftest.$ac_ext
25704 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25705 echo "${ECHO_T}$ac_header_preproc" >&6; }
25706
25707 # So?  What about this header?
25708 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25709   yes:no: )
25710     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
25711 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
25712     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
25713 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
25714     ac_header_preproc=yes
25715     ;;
25716   no:yes:* )
25717     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
25718 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
25719     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
25720 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
25721     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
25722 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
25723     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
25724 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
25725     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
25726 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
25727     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
25728 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
25729     ( cat <<\_ASBOX
25730 ## --------------------------------------------- ##
25731 ## Report this to <http://www.openldap.org/its/> ##
25732 ## --------------------------------------------- ##
25733 _ASBOX
25734      ) | sed "s/^/$as_me: WARNING:     /" >&2
25735     ;;
25736 esac
25737 { echo "$as_me:$LINENO: checking for $ac_header" >&5
25738 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
25739 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
25740   echo $ECHO_N "(cached) $ECHO_C" >&6
25741 else
25742   eval "$as_ac_Header=\$ac_header_preproc"
25743 fi
25744 ac_res=`eval echo '${'$as_ac_Header'}'`
25745                { echo "$as_me:$LINENO: result: $ac_res" >&5
25746 echo "${ECHO_T}$ac_res" >&6; }
25747
25748 fi
25749 if test `eval echo '${'$as_ac_Header'}'` = yes; then
25750   cat >>confdefs.h <<_ACEOF
25751 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25752 _ACEOF
25753
25754 fi
25755
25756 done
25757
25758         if test $ac_cv_header_mach_cthreads_h = yes ; then
25759                 ol_with_threads=found
25760
25761                                 { echo "$as_me:$LINENO: checking for cthread_fork" >&5
25762 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6; }
25763 if test "${ac_cv_func_cthread_fork+set}" = set; then
25764   echo $ECHO_N "(cached) $ECHO_C" >&6
25765 else
25766   cat >conftest.$ac_ext <<_ACEOF
25767 /* confdefs.h.  */
25768 _ACEOF
25769 cat confdefs.h >>conftest.$ac_ext
25770 cat >>conftest.$ac_ext <<_ACEOF
25771 /* end confdefs.h.  */
25772 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25773    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25774 #define cthread_fork innocuous_cthread_fork
25775
25776 /* System header to define __stub macros and hopefully few prototypes,
25777     which can conflict with char cthread_fork (); below.
25778     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25779     <limits.h> exists even on freestanding compilers.  */
25780
25781 #ifdef __STDC__
25782 # include <limits.h>
25783 #else
25784 # include <assert.h>
25785 #endif
25786
25787 #undef cthread_fork
25788
25789 /* Override any GCC internal prototype to avoid an error.
25790    Use char because int might match the return type of a GCC
25791    builtin and then its argument prototype would still apply.  */
25792 #ifdef __cplusplus
25793 extern "C"
25794 #endif
25795 char cthread_fork ();
25796 /* The GNU C library defines this for functions which it implements
25797     to always fail with ENOSYS.  Some functions are actually named
25798     something starting with __ and the normal name is an alias.  */
25799 #if defined __stub_cthread_fork || defined __stub___cthread_fork
25800 choke me
25801 #endif
25802
25803 int
25804 main ()
25805 {
25806 return cthread_fork ();
25807   ;
25808   return 0;
25809 }
25810 _ACEOF
25811 rm -f conftest.$ac_objext conftest$ac_exeext
25812 if { (ac_try="$ac_link"
25813 case "(($ac_try" in
25814   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25815   *) ac_try_echo=$ac_try;;
25816 esac
25817 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25818   (eval "$ac_link") 2>conftest.er1
25819   ac_status=$?
25820   grep -v '^ *+' conftest.er1 >conftest.err
25821   rm -f conftest.er1
25822   cat conftest.err >&5
25823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25824   (exit $ac_status); } && {
25825          test -z "$ac_c_werror_flag" ||
25826          test ! -s conftest.err
25827        } && test -s conftest$ac_exeext &&
25828        $as_test_x conftest$ac_exeext; then
25829   ac_cv_func_cthread_fork=yes
25830 else
25831   echo "$as_me: failed program was:" >&5
25832 sed 's/^/| /' conftest.$ac_ext >&5
25833
25834         ac_cv_func_cthread_fork=no
25835 fi
25836
25837 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25838       conftest$ac_exeext conftest.$ac_ext
25839 fi
25840 { echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
25841 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6; }
25842 if test $ac_cv_func_cthread_fork = yes; then
25843   ol_link_threads=yes
25844 fi
25845
25846
25847                 if test $ol_link_threads = no ; then
25848                                                                         { echo "$as_me:$LINENO: checking for cthread_fork with -all_load" >&5
25849 echo $ECHO_N "checking for cthread_fork with -all_load... $ECHO_C" >&6; }
25850 if test "${ol_cv_cthread_all_load+set}" = set; then
25851   echo $ECHO_N "(cached) $ECHO_C" >&6
25852 else
25853
25854                                                                 save_LIBS="$LIBS"
25855                                 LIBS="-all_load $LIBS"
25856                                 cat >conftest.$ac_ext <<_ACEOF
25857 /* confdefs.h.  */
25858 _ACEOF
25859 cat confdefs.h >>conftest.$ac_ext
25860 cat >>conftest.$ac_ext <<_ACEOF
25861 /* end confdefs.h.  */
25862 #include <mach/cthreads.h>
25863 int
25864 main ()
25865 {
25866
25867                                         cthread_fork((void *)0, (void *)0);
25868
25869   ;
25870   return 0;
25871 }
25872 _ACEOF
25873 rm -f conftest.$ac_objext conftest$ac_exeext
25874 if { (ac_try="$ac_link"
25875 case "(($ac_try" in
25876   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25877   *) ac_try_echo=$ac_try;;
25878 esac
25879 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25880   (eval "$ac_link") 2>conftest.er1
25881   ac_status=$?
25882   grep -v '^ *+' conftest.er1 >conftest.err
25883   rm -f conftest.er1
25884   cat conftest.err >&5
25885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25886   (exit $ac_status); } && {
25887          test -z "$ac_c_werror_flag" ||
25888          test ! -s conftest.err
25889        } && test -s conftest$ac_exeext &&
25890        $as_test_x conftest$ac_exeext; then
25891   ol_cv_cthread_all_load=yes
25892 else
25893   echo "$as_me: failed program was:" >&5
25894 sed 's/^/| /' conftest.$ac_ext >&5
25895
25896         ol_cv_cthread_all_load=no
25897 fi
25898
25899 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25900       conftest$ac_exeext conftest.$ac_ext
25901                                                                 LIBS="$save_LIBS"
25902
25903 fi
25904 { echo "$as_me:$LINENO: result: $ol_cv_cthread_all_load" >&5
25905 echo "${ECHO_T}$ol_cv_cthread_all_load" >&6; }
25906
25907                         if test $ol_cv_cthread_all_load = yes ; then
25908                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
25909                                 ol_link_threads=mach
25910                                 ol_with_threads=found
25911                         fi
25912                 fi
25913
25914         elif test $ac_cv_header_cthreads_h = yes ; then
25915
25916                 ol_with_threads=found
25917
25918                                 save_LIBS="$LIBS"
25919                 LIBS="$LIBS -lthreads"
25920                 { echo "$as_me:$LINENO: checking for cthread_fork" >&5
25921 echo $ECHO_N "checking for cthread_fork... $ECHO_C" >&6; }
25922 if test "${ac_cv_func_cthread_fork+set}" = set; then
25923   echo $ECHO_N "(cached) $ECHO_C" >&6
25924 else
25925   cat >conftest.$ac_ext <<_ACEOF
25926 /* confdefs.h.  */
25927 _ACEOF
25928 cat confdefs.h >>conftest.$ac_ext
25929 cat >>conftest.$ac_ext <<_ACEOF
25930 /* end confdefs.h.  */
25931 /* Define cthread_fork to an innocuous variant, in case <limits.h> declares cthread_fork.
25932    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
25933 #define cthread_fork innocuous_cthread_fork
25934
25935 /* System header to define __stub macros and hopefully few prototypes,
25936     which can conflict with char cthread_fork (); below.
25937     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25938     <limits.h> exists even on freestanding compilers.  */
25939
25940 #ifdef __STDC__
25941 # include <limits.h>
25942 #else
25943 # include <assert.h>
25944 #endif
25945
25946 #undef cthread_fork
25947
25948 /* Override any GCC internal prototype to avoid an error.
25949    Use char because int might match the return type of a GCC
25950    builtin and then its argument prototype would still apply.  */
25951 #ifdef __cplusplus
25952 extern "C"
25953 #endif
25954 char cthread_fork ();
25955 /* The GNU C library defines this for functions which it implements
25956     to always fail with ENOSYS.  Some functions are actually named
25957     something starting with __ and the normal name is an alias.  */
25958 #if defined __stub_cthread_fork || defined __stub___cthread_fork
25959 choke me
25960 #endif
25961
25962 int
25963 main ()
25964 {
25965 return cthread_fork ();
25966   ;
25967   return 0;
25968 }
25969 _ACEOF
25970 rm -f conftest.$ac_objext conftest$ac_exeext
25971 if { (ac_try="$ac_link"
25972 case "(($ac_try" in
25973   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25974   *) ac_try_echo=$ac_try;;
25975 esac
25976 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25977   (eval "$ac_link") 2>conftest.er1
25978   ac_status=$?
25979   grep -v '^ *+' conftest.er1 >conftest.err
25980   rm -f conftest.er1
25981   cat conftest.err >&5
25982   echo "$as_me:$LINENO: \$? = $ac_status" >&5
25983   (exit $ac_status); } && {
25984          test -z "$ac_c_werror_flag" ||
25985          test ! -s conftest.err
25986        } && test -s conftest$ac_exeext &&
25987        $as_test_x conftest$ac_exeext; then
25988   ac_cv_func_cthread_fork=yes
25989 else
25990   echo "$as_me: failed program was:" >&5
25991 sed 's/^/| /' conftest.$ac_ext >&5
25992
25993         ac_cv_func_cthread_fork=no
25994 fi
25995
25996 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25997       conftest$ac_exeext conftest.$ac_ext
25998 fi
25999 { echo "$as_me:$LINENO: result: $ac_cv_func_cthread_fork" >&5
26000 echo "${ECHO_T}$ac_cv_func_cthread_fork" >&6; }
26001 if test $ac_cv_func_cthread_fork = yes; then
26002   ol_link_threads=yes
26003 fi
26004
26005                 LIBS="$save_LIBS"
26006
26007                 if test $ol_link_threads = yes ; then
26008                         LTHREAD_LIBS="-lthreads"
26009                         ol_link_threads=mach
26010                         ol_with_threads=found
26011                 else
26012                         { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
26013 echo "$as_me: error: could not link with Mach CThreads" >&2;}
26014    { (exit 1); exit 1; }; }
26015                 fi
26016
26017         elif test $ol_with_threads = mach ; then
26018                 { { echo "$as_me:$LINENO: error: could not locate Mach CThreads" >&5
26019 echo "$as_me: error: could not locate Mach CThreads" >&2;}
26020    { (exit 1); exit 1; }; }
26021         fi
26022
26023         if test $ol_link_threads = mach ; then
26024
26025 cat >>confdefs.h <<\_ACEOF
26026 #define HAVE_MACH_CTHREADS 1
26027 _ACEOF
26028
26029         elif test $ol_with_threads = found ; then
26030                 { { echo "$as_me:$LINENO: error: could not link with Mach CThreads" >&5
26031 echo "$as_me: error: could not link with Mach CThreads" >&2;}
26032    { (exit 1); exit 1; }; }
26033         fi
26034         ;;
26035 esac
26036
26037 case $ol_with_threads in auto | yes | pth)
26038
26039
26040 for ac_header in pth.h
26041 do
26042 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26043 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26044   { echo "$as_me:$LINENO: checking for $ac_header" >&5
26045 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
26046 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26047   echo $ECHO_N "(cached) $ECHO_C" >&6
26048 fi
26049 ac_res=`eval echo '${'$as_ac_Header'}'`
26050                { echo "$as_me:$LINENO: result: $ac_res" >&5
26051 echo "${ECHO_T}$ac_res" >&6; }
26052 else
26053   # Is the header compilable?
26054 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
26055 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
26056 cat >conftest.$ac_ext <<_ACEOF
26057 /* confdefs.h.  */
26058 _ACEOF
26059 cat confdefs.h >>conftest.$ac_ext
26060 cat >>conftest.$ac_ext <<_ACEOF
26061 /* end confdefs.h.  */
26062 $ac_includes_default
26063 #include <$ac_header>
26064 _ACEOF
26065 rm -f conftest.$ac_objext
26066 if { (ac_try="$ac_compile"
26067 case "(($ac_try" in
26068   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26069   *) ac_try_echo=$ac_try;;
26070 esac
26071 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26072   (eval "$ac_compile") 2>conftest.er1
26073   ac_status=$?
26074   grep -v '^ *+' conftest.er1 >conftest.err
26075   rm -f conftest.er1
26076   cat conftest.err >&5
26077   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26078   (exit $ac_status); } && {
26079          test -z "$ac_c_werror_flag" ||
26080          test ! -s conftest.err
26081        } && test -s conftest.$ac_objext; then
26082   ac_header_compiler=yes
26083 else
26084   echo "$as_me: failed program was:" >&5
26085 sed 's/^/| /' conftest.$ac_ext >&5
26086
26087         ac_header_compiler=no
26088 fi
26089
26090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26091 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26092 echo "${ECHO_T}$ac_header_compiler" >&6; }
26093
26094 # Is the header present?
26095 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
26096 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
26097 cat >conftest.$ac_ext <<_ACEOF
26098 /* confdefs.h.  */
26099 _ACEOF
26100 cat confdefs.h >>conftest.$ac_ext
26101 cat >>conftest.$ac_ext <<_ACEOF
26102 /* end confdefs.h.  */
26103 #include <$ac_header>
26104 _ACEOF
26105 if { (ac_try="$ac_cpp conftest.$ac_ext"
26106 case "(($ac_try" in
26107   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26108   *) ac_try_echo=$ac_try;;
26109 esac
26110 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26111   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
26112   ac_status=$?
26113   grep -v '^ *+' conftest.er1 >conftest.err
26114   rm -f conftest.er1
26115   cat conftest.err >&5
26116   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26117   (exit $ac_status); } >/dev/null && {
26118          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26119          test ! -s conftest.err
26120        }; then
26121   ac_header_preproc=yes
26122 else
26123   echo "$as_me: failed program was:" >&5
26124 sed 's/^/| /' conftest.$ac_ext >&5
26125
26126   ac_header_preproc=no
26127 fi
26128
26129 rm -f conftest.err conftest.$ac_ext
26130 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26131 echo "${ECHO_T}$ac_header_preproc" >&6; }
26132
26133 # So?  What about this header?
26134 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26135   yes:no: )
26136     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26137 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26138     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26139 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26140     ac_header_preproc=yes
26141     ;;
26142   no:yes:* )
26143     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26144 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26145     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26146 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26147     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26148 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26149     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26150 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26151     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26152 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26153     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26154 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26155     ( cat <<\_ASBOX
26156 ## --------------------------------------------- ##
26157 ## Report this to <http://www.openldap.org/its/> ##
26158 ## --------------------------------------------- ##
26159 _ASBOX
26160      ) | sed "s/^/$as_me: WARNING:     /" >&2
26161     ;;
26162 esac
26163 { echo "$as_me:$LINENO: checking for $ac_header" >&5
26164 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
26165 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26166   echo $ECHO_N "(cached) $ECHO_C" >&6
26167 else
26168   eval "$as_ac_Header=\$ac_header_preproc"
26169 fi
26170 ac_res=`eval echo '${'$as_ac_Header'}'`
26171                { echo "$as_me:$LINENO: result: $ac_res" >&5
26172 echo "${ECHO_T}$ac_res" >&6; }
26173
26174 fi
26175 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26176   cat >>confdefs.h <<_ACEOF
26177 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26178 _ACEOF
26179
26180 fi
26181
26182 done
26183
26184
26185         if test $ac_cv_header_pth_h = yes ; then
26186                 { echo "$as_me:$LINENO: checking for pth_version in -lpth" >&5
26187 echo $ECHO_N "checking for pth_version in -lpth... $ECHO_C" >&6; }
26188 if test "${ac_cv_lib_pth_pth_version+set}" = set; then
26189   echo $ECHO_N "(cached) $ECHO_C" >&6
26190 else
26191   ac_check_lib_save_LIBS=$LIBS
26192 LIBS="-lpth  $LIBS"
26193 cat >conftest.$ac_ext <<_ACEOF
26194 /* confdefs.h.  */
26195 _ACEOF
26196 cat confdefs.h >>conftest.$ac_ext
26197 cat >>conftest.$ac_ext <<_ACEOF
26198 /* end confdefs.h.  */
26199
26200 /* Override any GCC internal prototype to avoid an error.
26201    Use char because int might match the return type of a GCC
26202    builtin and then its argument prototype would still apply.  */
26203 #ifdef __cplusplus
26204 extern "C"
26205 #endif
26206 char pth_version ();
26207 int
26208 main ()
26209 {
26210 return pth_version ();
26211   ;
26212   return 0;
26213 }
26214 _ACEOF
26215 rm -f conftest.$ac_objext conftest$ac_exeext
26216 if { (ac_try="$ac_link"
26217 case "(($ac_try" in
26218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26219   *) ac_try_echo=$ac_try;;
26220 esac
26221 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26222   (eval "$ac_link") 2>conftest.er1
26223   ac_status=$?
26224   grep -v '^ *+' conftest.er1 >conftest.err
26225   rm -f conftest.er1
26226   cat conftest.err >&5
26227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26228   (exit $ac_status); } && {
26229          test -z "$ac_c_werror_flag" ||
26230          test ! -s conftest.err
26231        } && test -s conftest$ac_exeext &&
26232        $as_test_x conftest$ac_exeext; then
26233   ac_cv_lib_pth_pth_version=yes
26234 else
26235   echo "$as_me: failed program was:" >&5
26236 sed 's/^/| /' conftest.$ac_ext >&5
26237
26238         ac_cv_lib_pth_pth_version=no
26239 fi
26240
26241 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26242       conftest$ac_exeext conftest.$ac_ext
26243 LIBS=$ac_check_lib_save_LIBS
26244 fi
26245 { echo "$as_me:$LINENO: result: $ac_cv_lib_pth_pth_version" >&5
26246 echo "${ECHO_T}$ac_cv_lib_pth_pth_version" >&6; }
26247 if test $ac_cv_lib_pth_pth_version = yes; then
26248   have_pth=yes
26249 else
26250   have_pth=no
26251 fi
26252
26253
26254                 if test $have_pth = yes ; then
26255
26256 cat >>confdefs.h <<\_ACEOF
26257 #define HAVE_GNU_PTH 1
26258 _ACEOF
26259
26260                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
26261                         ol_link_threads=pth
26262                         ol_with_threads=found
26263
26264                         if test $ol_with_yielding_select = auto ; then
26265                                 ol_with_yielding_select=yes
26266                         fi
26267                 fi
26268         fi
26269         ;;
26270 esac
26271
26272 case $ol_with_threads in auto | yes | lwp)
26273
26274
26275
26276 for ac_header in thread.h synch.h
26277 do
26278 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26279 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26280   { echo "$as_me:$LINENO: checking for $ac_header" >&5
26281 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
26282 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26283   echo $ECHO_N "(cached) $ECHO_C" >&6
26284 fi
26285 ac_res=`eval echo '${'$as_ac_Header'}'`
26286                { echo "$as_me:$LINENO: result: $ac_res" >&5
26287 echo "${ECHO_T}$ac_res" >&6; }
26288 else
26289   # Is the header compilable?
26290 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
26291 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
26292 cat >conftest.$ac_ext <<_ACEOF
26293 /* confdefs.h.  */
26294 _ACEOF
26295 cat confdefs.h >>conftest.$ac_ext
26296 cat >>conftest.$ac_ext <<_ACEOF
26297 /* end confdefs.h.  */
26298 $ac_includes_default
26299 #include <$ac_header>
26300 _ACEOF
26301 rm -f conftest.$ac_objext
26302 if { (ac_try="$ac_compile"
26303 case "(($ac_try" in
26304   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26305   *) ac_try_echo=$ac_try;;
26306 esac
26307 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26308   (eval "$ac_compile") 2>conftest.er1
26309   ac_status=$?
26310   grep -v '^ *+' conftest.er1 >conftest.err
26311   rm -f conftest.er1
26312   cat conftest.err >&5
26313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26314   (exit $ac_status); } && {
26315          test -z "$ac_c_werror_flag" ||
26316          test ! -s conftest.err
26317        } && test -s conftest.$ac_objext; then
26318   ac_header_compiler=yes
26319 else
26320   echo "$as_me: failed program was:" >&5
26321 sed 's/^/| /' conftest.$ac_ext >&5
26322
26323         ac_header_compiler=no
26324 fi
26325
26326 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26327 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26328 echo "${ECHO_T}$ac_header_compiler" >&6; }
26329
26330 # Is the header present?
26331 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
26332 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
26333 cat >conftest.$ac_ext <<_ACEOF
26334 /* confdefs.h.  */
26335 _ACEOF
26336 cat confdefs.h >>conftest.$ac_ext
26337 cat >>conftest.$ac_ext <<_ACEOF
26338 /* end confdefs.h.  */
26339 #include <$ac_header>
26340 _ACEOF
26341 if { (ac_try="$ac_cpp conftest.$ac_ext"
26342 case "(($ac_try" in
26343   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26344   *) ac_try_echo=$ac_try;;
26345 esac
26346 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26347   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
26348   ac_status=$?
26349   grep -v '^ *+' conftest.er1 >conftest.err
26350   rm -f conftest.er1
26351   cat conftest.err >&5
26352   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26353   (exit $ac_status); } >/dev/null && {
26354          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26355          test ! -s conftest.err
26356        }; then
26357   ac_header_preproc=yes
26358 else
26359   echo "$as_me: failed program was:" >&5
26360 sed 's/^/| /' conftest.$ac_ext >&5
26361
26362   ac_header_preproc=no
26363 fi
26364
26365 rm -f conftest.err conftest.$ac_ext
26366 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26367 echo "${ECHO_T}$ac_header_preproc" >&6; }
26368
26369 # So?  What about this header?
26370 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26371   yes:no: )
26372     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26373 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26374     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26375 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26376     ac_header_preproc=yes
26377     ;;
26378   no:yes:* )
26379     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26380 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26381     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26382 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26383     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26384 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26385     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26386 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26387     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26388 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26389     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26390 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26391     ( cat <<\_ASBOX
26392 ## --------------------------------------------- ##
26393 ## Report this to <http://www.openldap.org/its/> ##
26394 ## --------------------------------------------- ##
26395 _ASBOX
26396      ) | sed "s/^/$as_me: WARNING:     /" >&2
26397     ;;
26398 esac
26399 { echo "$as_me:$LINENO: checking for $ac_header" >&5
26400 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
26401 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26402   echo $ECHO_N "(cached) $ECHO_C" >&6
26403 else
26404   eval "$as_ac_Header=\$ac_header_preproc"
26405 fi
26406 ac_res=`eval echo '${'$as_ac_Header'}'`
26407                { echo "$as_me:$LINENO: result: $ac_res" >&5
26408 echo "${ECHO_T}$ac_res" >&6; }
26409
26410 fi
26411 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26412   cat >>confdefs.h <<_ACEOF
26413 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26414 _ACEOF
26415
26416 fi
26417
26418 done
26419
26420         if test $ac_cv_header_thread_h = yes &&
26421            test $ac_cv_header_synch_h = yes ; then
26422                 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
26423 echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
26424 if test "${ac_cv_lib_thread_thr_create+set}" = set; then
26425   echo $ECHO_N "(cached) $ECHO_C" >&6
26426 else
26427   ac_check_lib_save_LIBS=$LIBS
26428 LIBS="-lthread  $LIBS"
26429 cat >conftest.$ac_ext <<_ACEOF
26430 /* confdefs.h.  */
26431 _ACEOF
26432 cat confdefs.h >>conftest.$ac_ext
26433 cat >>conftest.$ac_ext <<_ACEOF
26434 /* end confdefs.h.  */
26435
26436 /* Override any GCC internal prototype to avoid an error.
26437    Use char because int might match the return type of a GCC
26438    builtin and then its argument prototype would still apply.  */
26439 #ifdef __cplusplus
26440 extern "C"
26441 #endif
26442 char thr_create ();
26443 int
26444 main ()
26445 {
26446 return thr_create ();
26447   ;
26448   return 0;
26449 }
26450 _ACEOF
26451 rm -f conftest.$ac_objext conftest$ac_exeext
26452 if { (ac_try="$ac_link"
26453 case "(($ac_try" in
26454   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26455   *) ac_try_echo=$ac_try;;
26456 esac
26457 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26458   (eval "$ac_link") 2>conftest.er1
26459   ac_status=$?
26460   grep -v '^ *+' conftest.er1 >conftest.err
26461   rm -f conftest.er1
26462   cat conftest.err >&5
26463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26464   (exit $ac_status); } && {
26465          test -z "$ac_c_werror_flag" ||
26466          test ! -s conftest.err
26467        } && test -s conftest$ac_exeext &&
26468        $as_test_x conftest$ac_exeext; then
26469   ac_cv_lib_thread_thr_create=yes
26470 else
26471   echo "$as_me: failed program was:" >&5
26472 sed 's/^/| /' conftest.$ac_ext >&5
26473
26474         ac_cv_lib_thread_thr_create=no
26475 fi
26476
26477 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26478       conftest$ac_exeext conftest.$ac_ext
26479 LIBS=$ac_check_lib_save_LIBS
26480 fi
26481 { echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
26482 echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
26483 if test $ac_cv_lib_thread_thr_create = yes; then
26484   have_thr=yes
26485 else
26486   have_thr=no
26487 fi
26488
26489
26490                 if test $have_thr = yes ; then
26491
26492 cat >>confdefs.h <<\_ACEOF
26493 #define HAVE_THR 1
26494 _ACEOF
26495
26496                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
26497                         ol_link_threads=thr
26498
26499                         if test $ol_with_yielding_select = auto ; then
26500                                 ol_with_yielding_select=yes
26501                         fi
26502
26503
26504
26505 for ac_func in \
26506                                 thr_setconcurrency \
26507                                 thr_getconcurrency \
26508
26509 do
26510 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26511 { echo "$as_me:$LINENO: checking for $ac_func" >&5
26512 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
26513 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
26514   echo $ECHO_N "(cached) $ECHO_C" >&6
26515 else
26516   cat >conftest.$ac_ext <<_ACEOF
26517 /* confdefs.h.  */
26518 _ACEOF
26519 cat confdefs.h >>conftest.$ac_ext
26520 cat >>conftest.$ac_ext <<_ACEOF
26521 /* end confdefs.h.  */
26522 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26523    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
26524 #define $ac_func innocuous_$ac_func
26525
26526 /* System header to define __stub macros and hopefully few prototypes,
26527     which can conflict with char $ac_func (); below.
26528     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26529     <limits.h> exists even on freestanding compilers.  */
26530
26531 #ifdef __STDC__
26532 # include <limits.h>
26533 #else
26534 # include <assert.h>
26535 #endif
26536
26537 #undef $ac_func
26538
26539 /* Override any GCC internal prototype to avoid an error.
26540    Use char because int might match the return type of a GCC
26541    builtin and then its argument prototype would still apply.  */
26542 #ifdef __cplusplus
26543 extern "C"
26544 #endif
26545 char $ac_func ();
26546 /* The GNU C library defines this for functions which it implements
26547     to always fail with ENOSYS.  Some functions are actually named
26548     something starting with __ and the normal name is an alias.  */
26549 #if defined __stub_$ac_func || defined __stub___$ac_func
26550 choke me
26551 #endif
26552
26553 int
26554 main ()
26555 {
26556 return $ac_func ();
26557   ;
26558   return 0;
26559 }
26560 _ACEOF
26561 rm -f conftest.$ac_objext conftest$ac_exeext
26562 if { (ac_try="$ac_link"
26563 case "(($ac_try" in
26564   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26565   *) ac_try_echo=$ac_try;;
26566 esac
26567 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26568   (eval "$ac_link") 2>conftest.er1
26569   ac_status=$?
26570   grep -v '^ *+' conftest.er1 >conftest.err
26571   rm -f conftest.er1
26572   cat conftest.err >&5
26573   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26574   (exit $ac_status); } && {
26575          test -z "$ac_c_werror_flag" ||
26576          test ! -s conftest.err
26577        } && test -s conftest$ac_exeext &&
26578        $as_test_x conftest$ac_exeext; then
26579   eval "$as_ac_var=yes"
26580 else
26581   echo "$as_me: failed program was:" >&5
26582 sed 's/^/| /' conftest.$ac_ext >&5
26583
26584         eval "$as_ac_var=no"
26585 fi
26586
26587 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26588       conftest$ac_exeext conftest.$ac_ext
26589 fi
26590 ac_res=`eval echo '${'$as_ac_var'}'`
26591                { echo "$as_me:$LINENO: result: $ac_res" >&5
26592 echo "${ECHO_T}$ac_res" >&6; }
26593 if test `eval echo '${'$as_ac_var'}'` = yes; then
26594   cat >>confdefs.h <<_ACEOF
26595 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26596 _ACEOF
26597
26598 fi
26599 done
26600
26601                 fi
26602         fi
26603
26604
26605 for ac_header in lwp/lwp.h
26606 do
26607 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26608 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26609   { echo "$as_me:$LINENO: checking for $ac_header" >&5
26610 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
26611 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26612   echo $ECHO_N "(cached) $ECHO_C" >&6
26613 fi
26614 ac_res=`eval echo '${'$as_ac_Header'}'`
26615                { echo "$as_me:$LINENO: result: $ac_res" >&5
26616 echo "${ECHO_T}$ac_res" >&6; }
26617 else
26618   # Is the header compilable?
26619 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
26620 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
26621 cat >conftest.$ac_ext <<_ACEOF
26622 /* confdefs.h.  */
26623 _ACEOF
26624 cat confdefs.h >>conftest.$ac_ext
26625 cat >>conftest.$ac_ext <<_ACEOF
26626 /* end confdefs.h.  */
26627 $ac_includes_default
26628 #include <$ac_header>
26629 _ACEOF
26630 rm -f conftest.$ac_objext
26631 if { (ac_try="$ac_compile"
26632 case "(($ac_try" in
26633   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26634   *) ac_try_echo=$ac_try;;
26635 esac
26636 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26637   (eval "$ac_compile") 2>conftest.er1
26638   ac_status=$?
26639   grep -v '^ *+' conftest.er1 >conftest.err
26640   rm -f conftest.er1
26641   cat conftest.err >&5
26642   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26643   (exit $ac_status); } && {
26644          test -z "$ac_c_werror_flag" ||
26645          test ! -s conftest.err
26646        } && test -s conftest.$ac_objext; then
26647   ac_header_compiler=yes
26648 else
26649   echo "$as_me: failed program was:" >&5
26650 sed 's/^/| /' conftest.$ac_ext >&5
26651
26652         ac_header_compiler=no
26653 fi
26654
26655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26656 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26657 echo "${ECHO_T}$ac_header_compiler" >&6; }
26658
26659 # Is the header present?
26660 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
26661 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
26662 cat >conftest.$ac_ext <<_ACEOF
26663 /* confdefs.h.  */
26664 _ACEOF
26665 cat confdefs.h >>conftest.$ac_ext
26666 cat >>conftest.$ac_ext <<_ACEOF
26667 /* end confdefs.h.  */
26668 #include <$ac_header>
26669 _ACEOF
26670 if { (ac_try="$ac_cpp conftest.$ac_ext"
26671 case "(($ac_try" in
26672   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26673   *) ac_try_echo=$ac_try;;
26674 esac
26675 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26676   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
26677   ac_status=$?
26678   grep -v '^ *+' conftest.er1 >conftest.err
26679   rm -f conftest.er1
26680   cat conftest.err >&5
26681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26682   (exit $ac_status); } >/dev/null && {
26683          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26684          test ! -s conftest.err
26685        }; then
26686   ac_header_preproc=yes
26687 else
26688   echo "$as_me: failed program was:" >&5
26689 sed 's/^/| /' conftest.$ac_ext >&5
26690
26691   ac_header_preproc=no
26692 fi
26693
26694 rm -f conftest.err conftest.$ac_ext
26695 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26696 echo "${ECHO_T}$ac_header_preproc" >&6; }
26697
26698 # So?  What about this header?
26699 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26700   yes:no: )
26701     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26702 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26703     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26704 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26705     ac_header_preproc=yes
26706     ;;
26707   no:yes:* )
26708     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26709 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26710     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26711 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26712     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26713 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26714     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26715 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26716     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26717 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26718     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26719 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26720     ( cat <<\_ASBOX
26721 ## --------------------------------------------- ##
26722 ## Report this to <http://www.openldap.org/its/> ##
26723 ## --------------------------------------------- ##
26724 _ASBOX
26725      ) | sed "s/^/$as_me: WARNING:     /" >&2
26726     ;;
26727 esac
26728 { echo "$as_me:$LINENO: checking for $ac_header" >&5
26729 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
26730 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26731   echo $ECHO_N "(cached) $ECHO_C" >&6
26732 else
26733   eval "$as_ac_Header=\$ac_header_preproc"
26734 fi
26735 ac_res=`eval echo '${'$as_ac_Header'}'`
26736                { echo "$as_me:$LINENO: result: $ac_res" >&5
26737 echo "${ECHO_T}$ac_res" >&6; }
26738
26739 fi
26740 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26741   cat >>confdefs.h <<_ACEOF
26742 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26743 _ACEOF
26744
26745 fi
26746
26747 done
26748
26749         if test $ac_cv_header_lwp_lwp_h = yes ; then
26750                 { echo "$as_me:$LINENO: checking for lwp_create in -llwp" >&5
26751 echo $ECHO_N "checking for lwp_create in -llwp... $ECHO_C" >&6; }
26752 if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then
26753   echo $ECHO_N "(cached) $ECHO_C" >&6
26754 else
26755   ac_check_lib_save_LIBS=$LIBS
26756 LIBS="-llwp  $LIBS"
26757 cat >conftest.$ac_ext <<_ACEOF
26758 /* confdefs.h.  */
26759 _ACEOF
26760 cat confdefs.h >>conftest.$ac_ext
26761 cat >>conftest.$ac_ext <<_ACEOF
26762 /* end confdefs.h.  */
26763
26764 /* Override any GCC internal prototype to avoid an error.
26765    Use char because int might match the return type of a GCC
26766    builtin and then its argument prototype would still apply.  */
26767 #ifdef __cplusplus
26768 extern "C"
26769 #endif
26770 char lwp_create ();
26771 int
26772 main ()
26773 {
26774 return lwp_create ();
26775   ;
26776   return 0;
26777 }
26778 _ACEOF
26779 rm -f conftest.$ac_objext conftest$ac_exeext
26780 if { (ac_try="$ac_link"
26781 case "(($ac_try" in
26782   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26783   *) ac_try_echo=$ac_try;;
26784 esac
26785 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26786   (eval "$ac_link") 2>conftest.er1
26787   ac_status=$?
26788   grep -v '^ *+' conftest.er1 >conftest.err
26789   rm -f conftest.er1
26790   cat conftest.err >&5
26791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26792   (exit $ac_status); } && {
26793          test -z "$ac_c_werror_flag" ||
26794          test ! -s conftest.err
26795        } && test -s conftest$ac_exeext &&
26796        $as_test_x conftest$ac_exeext; then
26797   ac_cv_lib_lwp_lwp_create=yes
26798 else
26799   echo "$as_me: failed program was:" >&5
26800 sed 's/^/| /' conftest.$ac_ext >&5
26801
26802         ac_cv_lib_lwp_lwp_create=no
26803 fi
26804
26805 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26806       conftest$ac_exeext conftest.$ac_ext
26807 LIBS=$ac_check_lib_save_LIBS
26808 fi
26809 { echo "$as_me:$LINENO: result: $ac_cv_lib_lwp_lwp_create" >&5
26810 echo "${ECHO_T}$ac_cv_lib_lwp_lwp_create" >&6; }
26811 if test $ac_cv_lib_lwp_lwp_create = yes; then
26812   have_lwp=yes
26813 else
26814   have_lwp=no
26815 fi
26816
26817
26818                 if test $have_lwp = yes ; then
26819
26820 cat >>confdefs.h <<\_ACEOF
26821 #define HAVE_LWP 1
26822 _ACEOF
26823
26824                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
26825                         ol_link_threads=lwp
26826
26827                         if test $ol_with_yielding_select = auto ; then
26828                                 ol_with_yielding_select=no
26829                         fi
26830                 fi
26831         fi
26832         ;;
26833 esac
26834
26835 if test $ol_with_yielding_select = yes ; then
26836
26837 cat >>confdefs.h <<\_ACEOF
26838 #define HAVE_YIELDING_SELECT 1
26839 _ACEOF
26840
26841 fi
26842
26843 if test $ol_with_threads = manual ; then
26844                 ol_link_threads=yes
26845
26846         { echo "$as_me:$LINENO: WARNING: thread defines and link options must be set manually" >&5
26847 echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
26848
26849
26850
26851 for ac_header in pthread.h sched.h
26852 do
26853 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26854 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26855   { echo "$as_me:$LINENO: checking for $ac_header" >&5
26856 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
26857 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26858   echo $ECHO_N "(cached) $ECHO_C" >&6
26859 fi
26860 ac_res=`eval echo '${'$as_ac_Header'}'`
26861                { echo "$as_me:$LINENO: result: $ac_res" >&5
26862 echo "${ECHO_T}$ac_res" >&6; }
26863 else
26864   # Is the header compilable?
26865 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
26866 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
26867 cat >conftest.$ac_ext <<_ACEOF
26868 /* confdefs.h.  */
26869 _ACEOF
26870 cat confdefs.h >>conftest.$ac_ext
26871 cat >>conftest.$ac_ext <<_ACEOF
26872 /* end confdefs.h.  */
26873 $ac_includes_default
26874 #include <$ac_header>
26875 _ACEOF
26876 rm -f conftest.$ac_objext
26877 if { (ac_try="$ac_compile"
26878 case "(($ac_try" in
26879   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26880   *) ac_try_echo=$ac_try;;
26881 esac
26882 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26883   (eval "$ac_compile") 2>conftest.er1
26884   ac_status=$?
26885   grep -v '^ *+' conftest.er1 >conftest.err
26886   rm -f conftest.er1
26887   cat conftest.err >&5
26888   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26889   (exit $ac_status); } && {
26890          test -z "$ac_c_werror_flag" ||
26891          test ! -s conftest.err
26892        } && test -s conftest.$ac_objext; then
26893   ac_header_compiler=yes
26894 else
26895   echo "$as_me: failed program was:" >&5
26896 sed 's/^/| /' conftest.$ac_ext >&5
26897
26898         ac_header_compiler=no
26899 fi
26900
26901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26902 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
26903 echo "${ECHO_T}$ac_header_compiler" >&6; }
26904
26905 # Is the header present?
26906 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
26907 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
26908 cat >conftest.$ac_ext <<_ACEOF
26909 /* confdefs.h.  */
26910 _ACEOF
26911 cat confdefs.h >>conftest.$ac_ext
26912 cat >>conftest.$ac_ext <<_ACEOF
26913 /* end confdefs.h.  */
26914 #include <$ac_header>
26915 _ACEOF
26916 if { (ac_try="$ac_cpp conftest.$ac_ext"
26917 case "(($ac_try" in
26918   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26919   *) ac_try_echo=$ac_try;;
26920 esac
26921 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26922   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
26923   ac_status=$?
26924   grep -v '^ *+' conftest.er1 >conftest.err
26925   rm -f conftest.er1
26926   cat conftest.err >&5
26927   echo "$as_me:$LINENO: \$? = $ac_status" >&5
26928   (exit $ac_status); } >/dev/null && {
26929          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26930          test ! -s conftest.err
26931        }; then
26932   ac_header_preproc=yes
26933 else
26934   echo "$as_me: failed program was:" >&5
26935 sed 's/^/| /' conftest.$ac_ext >&5
26936
26937   ac_header_preproc=no
26938 fi
26939
26940 rm -f conftest.err conftest.$ac_ext
26941 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
26942 echo "${ECHO_T}$ac_header_preproc" >&6; }
26943
26944 # So?  What about this header?
26945 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
26946   yes:no: )
26947     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
26948 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
26949     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
26950 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
26951     ac_header_preproc=yes
26952     ;;
26953   no:yes:* )
26954     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
26955 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
26956     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
26957 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
26958     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
26959 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
26960     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
26961 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
26962     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
26963 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
26964     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
26965 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
26966     ( cat <<\_ASBOX
26967 ## --------------------------------------------- ##
26968 ## Report this to <http://www.openldap.org/its/> ##
26969 ## --------------------------------------------- ##
26970 _ASBOX
26971      ) | sed "s/^/$as_me: WARNING:     /" >&2
26972     ;;
26973 esac
26974 { echo "$as_me:$LINENO: checking for $ac_header" >&5
26975 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
26976 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
26977   echo $ECHO_N "(cached) $ECHO_C" >&6
26978 else
26979   eval "$as_ac_Header=\$ac_header_preproc"
26980 fi
26981 ac_res=`eval echo '${'$as_ac_Header'}'`
26982                { echo "$as_me:$LINENO: result: $ac_res" >&5
26983 echo "${ECHO_T}$ac_res" >&6; }
26984
26985 fi
26986 if test `eval echo '${'$as_ac_Header'}'` = yes; then
26987   cat >>confdefs.h <<_ACEOF
26988 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26989 _ACEOF
26990
26991 fi
26992
26993 done
26994
26995
26996
26997 for ac_func in sched_yield pthread_yield
26998 do
26999 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
27000 { echo "$as_me:$LINENO: checking for $ac_func" >&5
27001 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
27002 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
27003   echo $ECHO_N "(cached) $ECHO_C" >&6
27004 else
27005   cat >conftest.$ac_ext <<_ACEOF
27006 /* confdefs.h.  */
27007 _ACEOF
27008 cat confdefs.h >>conftest.$ac_ext
27009 cat >>conftest.$ac_ext <<_ACEOF
27010 /* end confdefs.h.  */
27011 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
27012    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
27013 #define $ac_func innocuous_$ac_func
27014
27015 /* System header to define __stub macros and hopefully few prototypes,
27016     which can conflict with char $ac_func (); below.
27017     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27018     <limits.h> exists even on freestanding compilers.  */
27019
27020 #ifdef __STDC__
27021 # include <limits.h>
27022 #else
27023 # include <assert.h>
27024 #endif
27025
27026 #undef $ac_func
27027
27028 /* Override any GCC internal prototype to avoid an error.
27029    Use char because int might match the return type of a GCC
27030    builtin and then its argument prototype would still apply.  */
27031 #ifdef __cplusplus
27032 extern "C"
27033 #endif
27034 char $ac_func ();
27035 /* The GNU C library defines this for functions which it implements
27036     to always fail with ENOSYS.  Some functions are actually named
27037     something starting with __ and the normal name is an alias.  */
27038 #if defined __stub_$ac_func || defined __stub___$ac_func
27039 choke me
27040 #endif
27041
27042 int
27043 main ()
27044 {
27045 return $ac_func ();
27046   ;
27047   return 0;
27048 }
27049 _ACEOF
27050 rm -f conftest.$ac_objext conftest$ac_exeext
27051 if { (ac_try="$ac_link"
27052 case "(($ac_try" in
27053   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27054   *) ac_try_echo=$ac_try;;
27055 esac
27056 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27057   (eval "$ac_link") 2>conftest.er1
27058   ac_status=$?
27059   grep -v '^ *+' conftest.er1 >conftest.err
27060   rm -f conftest.er1
27061   cat conftest.err >&5
27062   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27063   (exit $ac_status); } && {
27064          test -z "$ac_c_werror_flag" ||
27065          test ! -s conftest.err
27066        } && test -s conftest$ac_exeext &&
27067        $as_test_x conftest$ac_exeext; then
27068   eval "$as_ac_var=yes"
27069 else
27070   echo "$as_me: failed program was:" >&5
27071 sed 's/^/| /' conftest.$ac_ext >&5
27072
27073         eval "$as_ac_var=no"
27074 fi
27075
27076 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27077       conftest$ac_exeext conftest.$ac_ext
27078 fi
27079 ac_res=`eval echo '${'$as_ac_var'}'`
27080                { echo "$as_me:$LINENO: result: $ac_res" >&5
27081 echo "${ECHO_T}$ac_res" >&6; }
27082 if test `eval echo '${'$as_ac_var'}'` = yes; then
27083   cat >>confdefs.h <<_ACEOF
27084 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
27085 _ACEOF
27086
27087 fi
27088 done
27089
27090
27091         { echo "$as_me:$LINENO: checking for LinuxThreads pthread.h" >&5
27092 echo $ECHO_N "checking for LinuxThreads pthread.h... $ECHO_C" >&6; }
27093 if test "${ol_cv_header_linux_threads+set}" = set; then
27094   echo $ECHO_N "(cached) $ECHO_C" >&6
27095 else
27096   cat >conftest.$ac_ext <<_ACEOF
27097 /* confdefs.h.  */
27098 _ACEOF
27099 cat confdefs.h >>conftest.$ac_ext
27100 cat >>conftest.$ac_ext <<_ACEOF
27101 /* end confdefs.h.  */
27102 #include <pthread.h>
27103 _ACEOF
27104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27105   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then
27106   ol_cv_header_linux_threads=yes
27107 else
27108   ol_cv_header_linux_threads=no
27109 fi
27110 rm -f conftest*
27111
27112
27113 fi
27114 { echo "$as_me:$LINENO: result: $ol_cv_header_linux_threads" >&5
27115 echo "${ECHO_T}$ol_cv_header_linux_threads" >&6; }
27116         if test $ol_cv_header_linux_threads = yes; then
27117
27118 cat >>confdefs.h <<\_ACEOF
27119 #define HAVE_LINUX_THREADS 1
27120 _ACEOF
27121
27122         fi
27123
27124
27125
27126 for ac_header in mach/cthreads.h
27127 do
27128 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27129 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27130   { echo "$as_me:$LINENO: checking for $ac_header" >&5
27131 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
27132 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27133   echo $ECHO_N "(cached) $ECHO_C" >&6
27134 fi
27135 ac_res=`eval echo '${'$as_ac_Header'}'`
27136                { echo "$as_me:$LINENO: result: $ac_res" >&5
27137 echo "${ECHO_T}$ac_res" >&6; }
27138 else
27139   # Is the header compilable?
27140 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
27141 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
27142 cat >conftest.$ac_ext <<_ACEOF
27143 /* confdefs.h.  */
27144 _ACEOF
27145 cat confdefs.h >>conftest.$ac_ext
27146 cat >>conftest.$ac_ext <<_ACEOF
27147 /* end confdefs.h.  */
27148 $ac_includes_default
27149 #include <$ac_header>
27150 _ACEOF
27151 rm -f conftest.$ac_objext
27152 if { (ac_try="$ac_compile"
27153 case "(($ac_try" in
27154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27155   *) ac_try_echo=$ac_try;;
27156 esac
27157 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27158   (eval "$ac_compile") 2>conftest.er1
27159   ac_status=$?
27160   grep -v '^ *+' conftest.er1 >conftest.err
27161   rm -f conftest.er1
27162   cat conftest.err >&5
27163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27164   (exit $ac_status); } && {
27165          test -z "$ac_c_werror_flag" ||
27166          test ! -s conftest.err
27167        } && test -s conftest.$ac_objext; then
27168   ac_header_compiler=yes
27169 else
27170   echo "$as_me: failed program was:" >&5
27171 sed 's/^/| /' conftest.$ac_ext >&5
27172
27173         ac_header_compiler=no
27174 fi
27175
27176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27177 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27178 echo "${ECHO_T}$ac_header_compiler" >&6; }
27179
27180 # Is the header present?
27181 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
27182 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
27183 cat >conftest.$ac_ext <<_ACEOF
27184 /* confdefs.h.  */
27185 _ACEOF
27186 cat confdefs.h >>conftest.$ac_ext
27187 cat >>conftest.$ac_ext <<_ACEOF
27188 /* end confdefs.h.  */
27189 #include <$ac_header>
27190 _ACEOF
27191 if { (ac_try="$ac_cpp conftest.$ac_ext"
27192 case "(($ac_try" in
27193   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27194   *) ac_try_echo=$ac_try;;
27195 esac
27196 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27197   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
27198   ac_status=$?
27199   grep -v '^ *+' conftest.er1 >conftest.err
27200   rm -f conftest.er1
27201   cat conftest.err >&5
27202   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27203   (exit $ac_status); } >/dev/null && {
27204          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
27205          test ! -s conftest.err
27206        }; then
27207   ac_header_preproc=yes
27208 else
27209   echo "$as_me: failed program was:" >&5
27210 sed 's/^/| /' conftest.$ac_ext >&5
27211
27212   ac_header_preproc=no
27213 fi
27214
27215 rm -f conftest.err conftest.$ac_ext
27216 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27217 echo "${ECHO_T}$ac_header_preproc" >&6; }
27218
27219 # So?  What about this header?
27220 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27221   yes:no: )
27222     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27223 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27224     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27225 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27226     ac_header_preproc=yes
27227     ;;
27228   no:yes:* )
27229     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27230 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27231     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27232 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27233     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27234 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27235     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27236 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27237     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27238 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27239     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27240 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27241     ( cat <<\_ASBOX
27242 ## --------------------------------------------- ##
27243 ## Report this to <http://www.openldap.org/its/> ##
27244 ## --------------------------------------------- ##
27245 _ASBOX
27246      ) | sed "s/^/$as_me: WARNING:     /" >&2
27247     ;;
27248 esac
27249 { echo "$as_me:$LINENO: checking for $ac_header" >&5
27250 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
27251 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27252   echo $ECHO_N "(cached) $ECHO_C" >&6
27253 else
27254   eval "$as_ac_Header=\$ac_header_preproc"
27255 fi
27256 ac_res=`eval echo '${'$as_ac_Header'}'`
27257                { echo "$as_me:$LINENO: result: $ac_res" >&5
27258 echo "${ECHO_T}$ac_res" >&6; }
27259
27260 fi
27261 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27262   cat >>confdefs.h <<_ACEOF
27263 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27264 _ACEOF
27265
27266 fi
27267
27268 done
27269
27270
27271 for ac_header in lwp/lwp.h
27272 do
27273 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27274 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27275   { echo "$as_me:$LINENO: checking for $ac_header" >&5
27276 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
27277 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27278   echo $ECHO_N "(cached) $ECHO_C" >&6
27279 fi
27280 ac_res=`eval echo '${'$as_ac_Header'}'`
27281                { echo "$as_me:$LINENO: result: $ac_res" >&5
27282 echo "${ECHO_T}$ac_res" >&6; }
27283 else
27284   # Is the header compilable?
27285 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
27286 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
27287 cat >conftest.$ac_ext <<_ACEOF
27288 /* confdefs.h.  */
27289 _ACEOF
27290 cat confdefs.h >>conftest.$ac_ext
27291 cat >>conftest.$ac_ext <<_ACEOF
27292 /* end confdefs.h.  */
27293 $ac_includes_default
27294 #include <$ac_header>
27295 _ACEOF
27296 rm -f conftest.$ac_objext
27297 if { (ac_try="$ac_compile"
27298 case "(($ac_try" in
27299   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27300   *) ac_try_echo=$ac_try;;
27301 esac
27302 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27303   (eval "$ac_compile") 2>conftest.er1
27304   ac_status=$?
27305   grep -v '^ *+' conftest.er1 >conftest.err
27306   rm -f conftest.er1
27307   cat conftest.err >&5
27308   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27309   (exit $ac_status); } && {
27310          test -z "$ac_c_werror_flag" ||
27311          test ! -s conftest.err
27312        } && test -s conftest.$ac_objext; then
27313   ac_header_compiler=yes
27314 else
27315   echo "$as_me: failed program was:" >&5
27316 sed 's/^/| /' conftest.$ac_ext >&5
27317
27318         ac_header_compiler=no
27319 fi
27320
27321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27322 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27323 echo "${ECHO_T}$ac_header_compiler" >&6; }
27324
27325 # Is the header present?
27326 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
27327 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
27328 cat >conftest.$ac_ext <<_ACEOF
27329 /* confdefs.h.  */
27330 _ACEOF
27331 cat confdefs.h >>conftest.$ac_ext
27332 cat >>conftest.$ac_ext <<_ACEOF
27333 /* end confdefs.h.  */
27334 #include <$ac_header>
27335 _ACEOF
27336 if { (ac_try="$ac_cpp conftest.$ac_ext"
27337 case "(($ac_try" in
27338   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27339   *) ac_try_echo=$ac_try;;
27340 esac
27341 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27342   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
27343   ac_status=$?
27344   grep -v '^ *+' conftest.er1 >conftest.err
27345   rm -f conftest.er1
27346   cat conftest.err >&5
27347   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27348   (exit $ac_status); } >/dev/null && {
27349          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
27350          test ! -s conftest.err
27351        }; then
27352   ac_header_preproc=yes
27353 else
27354   echo "$as_me: failed program was:" >&5
27355 sed 's/^/| /' conftest.$ac_ext >&5
27356
27357   ac_header_preproc=no
27358 fi
27359
27360 rm -f conftest.err conftest.$ac_ext
27361 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27362 echo "${ECHO_T}$ac_header_preproc" >&6; }
27363
27364 # So?  What about this header?
27365 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27366   yes:no: )
27367     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27368 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27369     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27370 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27371     ac_header_preproc=yes
27372     ;;
27373   no:yes:* )
27374     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27375 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27376     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27377 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27378     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27379 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27380     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27381 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27382     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27383 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27384     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27385 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27386     ( cat <<\_ASBOX
27387 ## --------------------------------------------- ##
27388 ## Report this to <http://www.openldap.org/its/> ##
27389 ## --------------------------------------------- ##
27390 _ASBOX
27391      ) | sed "s/^/$as_me: WARNING:     /" >&2
27392     ;;
27393 esac
27394 { echo "$as_me:$LINENO: checking for $ac_header" >&5
27395 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
27396 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27397   echo $ECHO_N "(cached) $ECHO_C" >&6
27398 else
27399   eval "$as_ac_Header=\$ac_header_preproc"
27400 fi
27401 ac_res=`eval echo '${'$as_ac_Header'}'`
27402                { echo "$as_me:$LINENO: result: $ac_res" >&5
27403 echo "${ECHO_T}$ac_res" >&6; }
27404
27405 fi
27406 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27407   cat >>confdefs.h <<_ACEOF
27408 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27409 _ACEOF
27410
27411 fi
27412
27413 done
27414
27415
27416
27417 for ac_header in thread.h synch.h
27418 do
27419 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
27420 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27421   { echo "$as_me:$LINENO: checking for $ac_header" >&5
27422 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
27423 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27424   echo $ECHO_N "(cached) $ECHO_C" >&6
27425 fi
27426 ac_res=`eval echo '${'$as_ac_Header'}'`
27427                { echo "$as_me:$LINENO: result: $ac_res" >&5
27428 echo "${ECHO_T}$ac_res" >&6; }
27429 else
27430   # Is the header compilable?
27431 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
27432 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
27433 cat >conftest.$ac_ext <<_ACEOF
27434 /* confdefs.h.  */
27435 _ACEOF
27436 cat confdefs.h >>conftest.$ac_ext
27437 cat >>conftest.$ac_ext <<_ACEOF
27438 /* end confdefs.h.  */
27439 $ac_includes_default
27440 #include <$ac_header>
27441 _ACEOF
27442 rm -f conftest.$ac_objext
27443 if { (ac_try="$ac_compile"
27444 case "(($ac_try" in
27445   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27446   *) ac_try_echo=$ac_try;;
27447 esac
27448 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27449   (eval "$ac_compile") 2>conftest.er1
27450   ac_status=$?
27451   grep -v '^ *+' conftest.er1 >conftest.err
27452   rm -f conftest.er1
27453   cat conftest.err >&5
27454   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27455   (exit $ac_status); } && {
27456          test -z "$ac_c_werror_flag" ||
27457          test ! -s conftest.err
27458        } && test -s conftest.$ac_objext; then
27459   ac_header_compiler=yes
27460 else
27461   echo "$as_me: failed program was:" >&5
27462 sed 's/^/| /' conftest.$ac_ext >&5
27463
27464         ac_header_compiler=no
27465 fi
27466
27467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27468 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27469 echo "${ECHO_T}$ac_header_compiler" >&6; }
27470
27471 # Is the header present?
27472 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
27473 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
27474 cat >conftest.$ac_ext <<_ACEOF
27475 /* confdefs.h.  */
27476 _ACEOF
27477 cat confdefs.h >>conftest.$ac_ext
27478 cat >>conftest.$ac_ext <<_ACEOF
27479 /* end confdefs.h.  */
27480 #include <$ac_header>
27481 _ACEOF
27482 if { (ac_try="$ac_cpp conftest.$ac_ext"
27483 case "(($ac_try" in
27484   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27485   *) ac_try_echo=$ac_try;;
27486 esac
27487 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27488   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
27489   ac_status=$?
27490   grep -v '^ *+' conftest.er1 >conftest.err
27491   rm -f conftest.er1
27492   cat conftest.err >&5
27493   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27494   (exit $ac_status); } >/dev/null && {
27495          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
27496          test ! -s conftest.err
27497        }; then
27498   ac_header_preproc=yes
27499 else
27500   echo "$as_me: failed program was:" >&5
27501 sed 's/^/| /' conftest.$ac_ext >&5
27502
27503   ac_header_preproc=no
27504 fi
27505
27506 rm -f conftest.err conftest.$ac_ext
27507 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27508 echo "${ECHO_T}$ac_header_preproc" >&6; }
27509
27510 # So?  What about this header?
27511 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27512   yes:no: )
27513     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
27514 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
27515     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
27516 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
27517     ac_header_preproc=yes
27518     ;;
27519   no:yes:* )
27520     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
27521 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
27522     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
27523 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
27524     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
27525 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
27526     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
27527 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
27528     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
27529 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
27530     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
27531 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
27532     ( cat <<\_ASBOX
27533 ## --------------------------------------------- ##
27534 ## Report this to <http://www.openldap.org/its/> ##
27535 ## --------------------------------------------- ##
27536 _ASBOX
27537      ) | sed "s/^/$as_me: WARNING:     /" >&2
27538     ;;
27539 esac
27540 { echo "$as_me:$LINENO: checking for $ac_header" >&5
27541 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
27542 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
27543   echo $ECHO_N "(cached) $ECHO_C" >&6
27544 else
27545   eval "$as_ac_Header=\$ac_header_preproc"
27546 fi
27547 ac_res=`eval echo '${'$as_ac_Header'}'`
27548                { echo "$as_me:$LINENO: result: $ac_res" >&5
27549 echo "${ECHO_T}$ac_res" >&6; }
27550
27551 fi
27552 if test `eval echo '${'$as_ac_Header'}'` = yes; then
27553   cat >>confdefs.h <<_ACEOF
27554 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
27555 _ACEOF
27556
27557 fi
27558
27559 done
27560
27561 fi
27562
27563 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
27564                         cat >>confdefs.h <<\_ACEOF
27565 #define REENTRANT 1
27566 _ACEOF
27567
27568         cat >>confdefs.h <<\_ACEOF
27569 #define _REENTRANT 1
27570 _ACEOF
27571
27572         cat >>confdefs.h <<\_ACEOF
27573 #define THREAD_SAFE 1
27574 _ACEOF
27575
27576         cat >>confdefs.h <<\_ACEOF
27577 #define _THREAD_SAFE 1
27578 _ACEOF
27579
27580         cat >>confdefs.h <<\_ACEOF
27581 #define THREADSAFE 1
27582 _ACEOF
27583
27584         cat >>confdefs.h <<\_ACEOF
27585 #define _THREADSAFE 1
27586 _ACEOF
27587
27588         cat >>confdefs.h <<\_ACEOF
27589 #define _SGI_MP_SOURCE 1
27590 _ACEOF
27591
27592
27593                         { echo "$as_me:$LINENO: checking for thread specific errno" >&5
27594 echo $ECHO_N "checking for thread specific errno... $ECHO_C" >&6; }
27595 if test "${ol_cv_errno_thread_specific+set}" = set; then
27596   echo $ECHO_N "(cached) $ECHO_C" >&6
27597 else
27598
27599                 cat >conftest.$ac_ext <<_ACEOF
27600 /* confdefs.h.  */
27601 _ACEOF
27602 cat confdefs.h >>conftest.$ac_ext
27603 cat >>conftest.$ac_ext <<_ACEOF
27604 /* end confdefs.h.  */
27605 #include <errno.h>
27606 int
27607 main ()
27608 {
27609 errno = 0;
27610   ;
27611   return 0;
27612 }
27613 _ACEOF
27614 rm -f conftest.$ac_objext conftest$ac_exeext
27615 if { (ac_try="$ac_link"
27616 case "(($ac_try" in
27617   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27618   *) ac_try_echo=$ac_try;;
27619 esac
27620 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27621   (eval "$ac_link") 2>conftest.er1
27622   ac_status=$?
27623   grep -v '^ *+' conftest.er1 >conftest.err
27624   rm -f conftest.er1
27625   cat conftest.err >&5
27626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27627   (exit $ac_status); } && {
27628          test -z "$ac_c_werror_flag" ||
27629          test ! -s conftest.err
27630        } && test -s conftest$ac_exeext &&
27631        $as_test_x conftest$ac_exeext; then
27632   ol_cv_errno_thread_specific=yes
27633 else
27634   echo "$as_me: failed program was:" >&5
27635 sed 's/^/| /' conftest.$ac_ext >&5
27636
27637         ol_cv_errno_thread_specific=no
27638 fi
27639
27640 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27641       conftest$ac_exeext conftest.$ac_ext
27642
27643 fi
27644 { echo "$as_me:$LINENO: result: $ol_cv_errno_thread_specific" >&5
27645 echo "${ECHO_T}$ol_cv_errno_thread_specific" >&6; }
27646
27647                         { echo "$as_me:$LINENO: checking for thread specific h_errno" >&5
27648 echo $ECHO_N "checking for thread specific h_errno... $ECHO_C" >&6; }
27649 if test "${ol_cv_h_errno_thread_specific+set}" = set; then
27650   echo $ECHO_N "(cached) $ECHO_C" >&6
27651 else
27652
27653                 cat >conftest.$ac_ext <<_ACEOF
27654 /* confdefs.h.  */
27655 _ACEOF
27656 cat confdefs.h >>conftest.$ac_ext
27657 cat >>conftest.$ac_ext <<_ACEOF
27658 /* end confdefs.h.  */
27659 #include <netdb.h>
27660 int
27661 main ()
27662 {
27663 h_errno = 0;
27664   ;
27665   return 0;
27666 }
27667 _ACEOF
27668 rm -f conftest.$ac_objext conftest$ac_exeext
27669 if { (ac_try="$ac_link"
27670 case "(($ac_try" in
27671   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27672   *) ac_try_echo=$ac_try;;
27673 esac
27674 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27675   (eval "$ac_link") 2>conftest.er1
27676   ac_status=$?
27677   grep -v '^ *+' conftest.er1 >conftest.err
27678   rm -f conftest.er1
27679   cat conftest.err >&5
27680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27681   (exit $ac_status); } && {
27682          test -z "$ac_c_werror_flag" ||
27683          test ! -s conftest.err
27684        } && test -s conftest$ac_exeext &&
27685        $as_test_x conftest$ac_exeext; then
27686   ol_cv_h_errno_thread_specific=yes
27687 else
27688   echo "$as_me: failed program was:" >&5
27689 sed 's/^/| /' conftest.$ac_ext >&5
27690
27691         ol_cv_h_errno_thread_specific=no
27692 fi
27693
27694 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27695       conftest$ac_exeext conftest.$ac_ext
27696
27697 fi
27698 { echo "$as_me:$LINENO: result: $ol_cv_h_errno_thread_specific" >&5
27699 echo "${ECHO_T}$ol_cv_h_errno_thread_specific" >&6; }
27700
27701         if test $ol_cv_errno_thread_specific != yes ||
27702            test $ol_cv_h_errno_thread_specific != yes ; then
27703                 LIBS="$LTHREAD_LIBS $LIBS"
27704                 LTHREAD_LIBS=""
27705         fi
27706
27707 fi
27708
27709 if test $ol_link_threads = no ; then
27710         if test $ol_with_threads = yes ; then
27711                 { { echo "$as_me:$LINENO: error: no suitable thread support" >&5
27712 echo "$as_me: error: no suitable thread support" >&2;}
27713    { (exit 1); exit 1; }; }
27714         fi
27715
27716         if test $ol_with_threads = auto ; then
27717                 { echo "$as_me:$LINENO: WARNING: no suitable thread support, disabling threads" >&5
27718 echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
27719                 ol_with_threads=no
27720         fi
27721
27722
27723 cat >>confdefs.h <<\_ACEOF
27724 #define NO_THREADS 1
27725 _ACEOF
27726
27727         LTHREAD_LIBS=""
27728         BUILD_THREAD=no
27729 else
27730         BUILD_THREAD=yes
27731 fi
27732
27733 if test $ol_link_threads != no ; then
27734
27735 cat >>confdefs.h <<\_ACEOF
27736 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
27737 _ACEOF
27738
27739 fi
27740
27741
27742
27743
27744 for ac_func in \
27745         ctime_r                 \
27746         gethostbyname_r gethostbyaddr_r \
27747
27748 do
27749 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
27750 { echo "$as_me:$LINENO: checking for $ac_func" >&5
27751 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
27752 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
27753   echo $ECHO_N "(cached) $ECHO_C" >&6
27754 else
27755   cat >conftest.$ac_ext <<_ACEOF
27756 /* confdefs.h.  */
27757 _ACEOF
27758 cat confdefs.h >>conftest.$ac_ext
27759 cat >>conftest.$ac_ext <<_ACEOF
27760 /* end confdefs.h.  */
27761 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
27762    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
27763 #define $ac_func innocuous_$ac_func
27764
27765 /* System header to define __stub macros and hopefully few prototypes,
27766     which can conflict with char $ac_func (); below.
27767     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27768     <limits.h> exists even on freestanding compilers.  */
27769
27770 #ifdef __STDC__
27771 # include <limits.h>
27772 #else
27773 # include <assert.h>
27774 #endif
27775
27776 #undef $ac_func
27777
27778 /* Override any GCC internal prototype to avoid an error.
27779    Use char because int might match the return type of a GCC
27780    builtin and then its argument prototype would still apply.  */
27781 #ifdef __cplusplus
27782 extern "C"
27783 #endif
27784 char $ac_func ();
27785 /* The GNU C library defines this for functions which it implements
27786     to always fail with ENOSYS.  Some functions are actually named
27787     something starting with __ and the normal name is an alias.  */
27788 #if defined __stub_$ac_func || defined __stub___$ac_func
27789 choke me
27790 #endif
27791
27792 int
27793 main ()
27794 {
27795 return $ac_func ();
27796   ;
27797   return 0;
27798 }
27799 _ACEOF
27800 rm -f conftest.$ac_objext conftest$ac_exeext
27801 if { (ac_try="$ac_link"
27802 case "(($ac_try" in
27803   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27804   *) ac_try_echo=$ac_try;;
27805 esac
27806 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27807   (eval "$ac_link") 2>conftest.er1
27808   ac_status=$?
27809   grep -v '^ *+' conftest.er1 >conftest.err
27810   rm -f conftest.er1
27811   cat conftest.err >&5
27812   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27813   (exit $ac_status); } && {
27814          test -z "$ac_c_werror_flag" ||
27815          test ! -s conftest.err
27816        } && test -s conftest$ac_exeext &&
27817        $as_test_x conftest$ac_exeext; then
27818   eval "$as_ac_var=yes"
27819 else
27820   echo "$as_me: failed program was:" >&5
27821 sed 's/^/| /' conftest.$ac_ext >&5
27822
27823         eval "$as_ac_var=no"
27824 fi
27825
27826 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27827       conftest$ac_exeext conftest.$ac_ext
27828 fi
27829 ac_res=`eval echo '${'$as_ac_var'}'`
27830                { echo "$as_me:$LINENO: result: $ac_res" >&5
27831 echo "${ECHO_T}$ac_res" >&6; }
27832 if test `eval echo '${'$as_ac_var'}'` = yes; then
27833   cat >>confdefs.h <<_ACEOF
27834 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
27835 _ACEOF
27836
27837 fi
27838 done
27839
27840
27841 if test "$ac_cv_func_ctime_r" = no ; then
27842         ol_cv_func_ctime_r_nargs=0
27843 else
27844         { echo "$as_me:$LINENO: checking number of arguments of ctime_r" >&5
27845 echo $ECHO_N "checking number of arguments of ctime_r... $ECHO_C" >&6; }
27846 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then
27847   echo $ECHO_N "(cached) $ECHO_C" >&6
27848 else
27849   cat >conftest.$ac_ext <<_ACEOF
27850 /* confdefs.h.  */
27851 _ACEOF
27852 cat confdefs.h >>conftest.$ac_ext
27853 cat >>conftest.$ac_ext <<_ACEOF
27854 /* end confdefs.h.  */
27855 #include <time.h>
27856 int
27857 main ()
27858 {
27859 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
27860   ;
27861   return 0;
27862 }
27863 _ACEOF
27864 rm -f conftest.$ac_objext
27865 if { (ac_try="$ac_compile"
27866 case "(($ac_try" in
27867   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27868   *) ac_try_echo=$ac_try;;
27869 esac
27870 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27871   (eval "$ac_compile") 2>conftest.er1
27872   ac_status=$?
27873   grep -v '^ *+' conftest.er1 >conftest.err
27874   rm -f conftest.er1
27875   cat conftest.err >&5
27876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27877   (exit $ac_status); } && {
27878          test -z "$ac_c_werror_flag" ||
27879          test ! -s conftest.err
27880        } && test -s conftest.$ac_objext; then
27881   ol_cv_func_ctime_r_nargs3=yes
27882 else
27883   echo "$as_me: failed program was:" >&5
27884 sed 's/^/| /' conftest.$ac_ext >&5
27885
27886         ol_cv_func_ctime_r_nargs3=no
27887 fi
27888
27889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27890
27891         cat >conftest.$ac_ext <<_ACEOF
27892 /* confdefs.h.  */
27893 _ACEOF
27894 cat confdefs.h >>conftest.$ac_ext
27895 cat >>conftest.$ac_ext <<_ACEOF
27896 /* end confdefs.h.  */
27897 #include <time.h>
27898 int
27899 main ()
27900 {
27901 time_t ti; char *buffer; ctime_r(&ti,buffer);
27902   ;
27903   return 0;
27904 }
27905 _ACEOF
27906 rm -f conftest.$ac_objext
27907 if { (ac_try="$ac_compile"
27908 case "(($ac_try" in
27909   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27910   *) ac_try_echo=$ac_try;;
27911 esac
27912 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27913   (eval "$ac_compile") 2>conftest.er1
27914   ac_status=$?
27915   grep -v '^ *+' conftest.er1 >conftest.err
27916   rm -f conftest.er1
27917   cat conftest.err >&5
27918   echo "$as_me:$LINENO: \$? = $ac_status" >&5
27919   (exit $ac_status); } && {
27920          test -z "$ac_c_werror_flag" ||
27921          test ! -s conftest.err
27922        } && test -s conftest.$ac_objext; then
27923   ol_cv_func_ctime_r_nargs2=yes
27924 else
27925   echo "$as_me: failed program was:" >&5
27926 sed 's/^/| /' conftest.$ac_ext >&5
27927
27928         ol_cv_func_ctime_r_nargs2=no
27929 fi
27930
27931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27932
27933         if test $ol_cv_func_ctime_r_nargs3 = yes &&
27934            test $ol_cv_func_ctime_r_nargs2 = no ; then
27935
27936                 ol_cv_func_ctime_r_nargs=3
27937
27938         elif test $ol_cv_func_ctime_r_nargs3 = no &&
27939              test $ol_cv_func_ctime_r_nargs2 = yes ; then
27940
27941                 ol_cv_func_ctime_r_nargs=2
27942
27943         else
27944                 ol_cv_func_ctime_r_nargs=0
27945         fi
27946
27947 fi
27948 { echo "$as_me:$LINENO: result: $ol_cv_func_ctime_r_nargs" >&5
27949 echo "${ECHO_T}$ol_cv_func_ctime_r_nargs" >&6; }
27950
27951   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
27952
27953 cat >>confdefs.h <<_ACEOF
27954 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
27955 _ACEOF
27956
27957   fi
27958
27959 fi
27960
27961 if test "$ac_cv_func_gethostbyname_r" = yes ; then
27962         { echo "$as_me:$LINENO: checking number of arguments of gethostbyname_r" >&5
27963 echo $ECHO_N "checking number of arguments of gethostbyname_r... $ECHO_C" >&6; }
27964 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then
27965   echo $ECHO_N "(cached) $ECHO_C" >&6
27966 else
27967   cat >conftest.$ac_ext <<_ACEOF
27968 /* confdefs.h.  */
27969 _ACEOF
27970 cat confdefs.h >>conftest.$ac_ext
27971 cat >>conftest.$ac_ext <<_ACEOF
27972 /* end confdefs.h.  */
27973 #include <sys/types.h>
27974 #include <sys/socket.h>
27975 #include <netinet/in.h>
27976 #include <netdb.h>
27977 #define BUFSIZE (sizeof(struct hostent)+10)
27978 int
27979 main ()
27980 {
27981 struct hostent hent; char buffer[BUFSIZE];
27982                 int bufsize=BUFSIZE;int h_errno;
27983                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
27984                         buffer, bufsize, &h_errno);
27985   ;
27986   return 0;
27987 }
27988 _ACEOF
27989 rm -f conftest.$ac_objext
27990 if { (ac_try="$ac_compile"
27991 case "(($ac_try" in
27992   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27993   *) ac_try_echo=$ac_try;;
27994 esac
27995 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27996   (eval "$ac_compile") 2>conftest.er1
27997   ac_status=$?
27998   grep -v '^ *+' conftest.er1 >conftest.err
27999   rm -f conftest.er1
28000   cat conftest.err >&5
28001   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28002   (exit $ac_status); } && {
28003          test -z "$ac_c_werror_flag" ||
28004          test ! -s conftest.err
28005        } && test -s conftest.$ac_objext; then
28006   ol_cv_func_gethostbyname_r_nargs5=yes
28007 else
28008   echo "$as_me: failed program was:" >&5
28009 sed 's/^/| /' conftest.$ac_ext >&5
28010
28011         ol_cv_func_gethostbyname_r_nargs5=no
28012 fi
28013
28014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28015
28016         cat >conftest.$ac_ext <<_ACEOF
28017 /* confdefs.h.  */
28018 _ACEOF
28019 cat confdefs.h >>conftest.$ac_ext
28020 cat >>conftest.$ac_ext <<_ACEOF
28021 /* end confdefs.h.  */
28022 #include <sys/types.h>
28023 #include <sys/socket.h>
28024 #include <netinet/in.h>
28025 #include <netdb.h>
28026 #define BUFSIZE (sizeof(struct hostent)+10)
28027 int
28028 main ()
28029 {
28030 struct hostent hent;struct hostent *rhent;
28031                 char buffer[BUFSIZE];
28032                 int bufsize=BUFSIZE;int h_errno;
28033                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
28034                         &rhent, &h_errno);
28035   ;
28036   return 0;
28037 }
28038 _ACEOF
28039 rm -f conftest.$ac_objext
28040 if { (ac_try="$ac_compile"
28041 case "(($ac_try" in
28042   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28043   *) ac_try_echo=$ac_try;;
28044 esac
28045 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28046   (eval "$ac_compile") 2>conftest.er1
28047   ac_status=$?
28048   grep -v '^ *+' conftest.er1 >conftest.err
28049   rm -f conftest.er1
28050   cat conftest.err >&5
28051   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28052   (exit $ac_status); } && {
28053          test -z "$ac_c_werror_flag" ||
28054          test ! -s conftest.err
28055        } && test -s conftest.$ac_objext; then
28056   ol_cv_func_gethostbyname_r_nargs6=yes
28057 else
28058   echo "$as_me: failed program was:" >&5
28059 sed 's/^/| /' conftest.$ac_ext >&5
28060
28061         ol_cv_func_gethostbyname_r_nargs6=no
28062 fi
28063
28064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28065
28066         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
28067            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
28068
28069                 ol_cv_func_gethostbyname_r_nargs=5
28070
28071         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
28072              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
28073
28074                 ol_cv_func_gethostbyname_r_nargs=6
28075
28076         else
28077                 ol_cv_func_gethostbyname_r_nargs=0
28078         fi
28079
28080 fi
28081 { echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyname_r_nargs" >&5
28082 echo "${ECHO_T}$ol_cv_func_gethostbyname_r_nargs" >&6; }
28083   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
28084
28085 cat >>confdefs.h <<_ACEOF
28086 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
28087 _ACEOF
28088
28089   fi
28090
28091 else
28092         ol_cv_func_gethostbyname_r_nargs=0
28093 fi
28094
28095 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
28096         { echo "$as_me:$LINENO: checking number of arguments of gethostbyaddr_r" >&5
28097 echo $ECHO_N "checking number of arguments of gethostbyaddr_r... $ECHO_C" >&6; }
28098 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then
28099   echo $ECHO_N "(cached) $ECHO_C" >&6
28100 else
28101   cat >conftest.$ac_ext <<_ACEOF
28102 /* confdefs.h.  */
28103 _ACEOF
28104 cat confdefs.h >>conftest.$ac_ext
28105 cat >>conftest.$ac_ext <<_ACEOF
28106 /* end confdefs.h.  */
28107 #include <sys/types.h>
28108 #include <sys/socket.h>
28109 #include <netinet/in.h>
28110 #include <netdb.h>
28111 #define BUFSIZE (sizeof(struct hostent)+10)
28112 int
28113 main ()
28114 {
28115 struct hostent hent; char buffer[BUFSIZE];
28116             struct in_addr add;
28117             size_t alen=sizeof(struct in_addr);
28118             int bufsize=BUFSIZE;int h_errno;
28119                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
28120                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
28121   ;
28122   return 0;
28123 }
28124 _ACEOF
28125 rm -f conftest.$ac_objext
28126 if { (ac_try="$ac_compile"
28127 case "(($ac_try" in
28128   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28129   *) ac_try_echo=$ac_try;;
28130 esac
28131 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28132   (eval "$ac_compile") 2>conftest.er1
28133   ac_status=$?
28134   grep -v '^ *+' conftest.er1 >conftest.err
28135   rm -f conftest.er1
28136   cat conftest.err >&5
28137   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28138   (exit $ac_status); } && {
28139          test -z "$ac_c_werror_flag" ||
28140          test ! -s conftest.err
28141        } && test -s conftest.$ac_objext; then
28142   ol_cv_func_gethostbyaddr_r_nargs7=yes
28143 else
28144   echo "$as_me: failed program was:" >&5
28145 sed 's/^/| /' conftest.$ac_ext >&5
28146
28147         ol_cv_func_gethostbyaddr_r_nargs7=no
28148 fi
28149
28150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28151
28152         cat >conftest.$ac_ext <<_ACEOF
28153 /* confdefs.h.  */
28154 _ACEOF
28155 cat confdefs.h >>conftest.$ac_ext
28156 cat >>conftest.$ac_ext <<_ACEOF
28157 /* end confdefs.h.  */
28158 #include <sys/types.h>
28159 #include <sys/socket.h>
28160 #include <netinet/in.h>
28161 #include <netdb.h>
28162 #define BUFSIZE (sizeof(struct hostent)+10)
28163 int
28164 main ()
28165 {
28166 struct hostent hent;
28167                 struct hostent *rhent; char buffer[BUFSIZE];
28168                 struct in_addr add;
28169                 size_t alen=sizeof(struct in_addr);
28170                 int bufsize=BUFSIZE;int h_errno;
28171                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
28172                         alen, AF_INET, &hent, buffer, bufsize,
28173                         &rhent, &h_errno);
28174   ;
28175   return 0;
28176 }
28177 _ACEOF
28178 rm -f conftest.$ac_objext
28179 if { (ac_try="$ac_compile"
28180 case "(($ac_try" in
28181   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28182   *) ac_try_echo=$ac_try;;
28183 esac
28184 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28185   (eval "$ac_compile") 2>conftest.er1
28186   ac_status=$?
28187   grep -v '^ *+' conftest.er1 >conftest.err
28188   rm -f conftest.er1
28189   cat conftest.err >&5
28190   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28191   (exit $ac_status); } && {
28192          test -z "$ac_c_werror_flag" ||
28193          test ! -s conftest.err
28194        } && test -s conftest.$ac_objext; then
28195   ol_cv_func_gethostbyaddr_r_nargs8=yes
28196 else
28197   echo "$as_me: failed program was:" >&5
28198 sed 's/^/| /' conftest.$ac_ext >&5
28199
28200         ol_cv_func_gethostbyaddr_r_nargs8=no
28201 fi
28202
28203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28204
28205         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
28206            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
28207
28208                 ol_cv_func_gethostbyaddr_r_nargs=7
28209
28210         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
28211              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
28212
28213                 ol_cv_func_gethostbyaddr_r_nargs=8
28214
28215         else
28216                 ol_cv_func_gethostbyaddr_r_nargs=0
28217         fi
28218
28219 fi
28220 { echo "$as_me:$LINENO: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
28221 echo "${ECHO_T}$ol_cv_func_gethostbyaddr_r_nargs" >&6; }
28222   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
28223
28224 cat >>confdefs.h <<_ACEOF
28225 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
28226 _ACEOF
28227
28228   fi
28229
28230 else
28231         ol_cv_func_gethostbyaddr_r_nargs=0
28232 fi
28233
28234 ol_link_bdb=no
28235
28236 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
28237         ol_cv_berkeley_db=no
28238
28239 for ac_header in db.h
28240 do
28241 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
28242 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
28243   { echo "$as_me:$LINENO: checking for $ac_header" >&5
28244 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
28245 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
28246   echo $ECHO_N "(cached) $ECHO_C" >&6
28247 fi
28248 ac_res=`eval echo '${'$as_ac_Header'}'`
28249                { echo "$as_me:$LINENO: result: $ac_res" >&5
28250 echo "${ECHO_T}$ac_res" >&6; }
28251 else
28252   # Is the header compilable?
28253 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
28254 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
28255 cat >conftest.$ac_ext <<_ACEOF
28256 /* confdefs.h.  */
28257 _ACEOF
28258 cat confdefs.h >>conftest.$ac_ext
28259 cat >>conftest.$ac_ext <<_ACEOF
28260 /* end confdefs.h.  */
28261 $ac_includes_default
28262 #include <$ac_header>
28263 _ACEOF
28264 rm -f conftest.$ac_objext
28265 if { (ac_try="$ac_compile"
28266 case "(($ac_try" in
28267   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28268   *) ac_try_echo=$ac_try;;
28269 esac
28270 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28271   (eval "$ac_compile") 2>conftest.er1
28272   ac_status=$?
28273   grep -v '^ *+' conftest.er1 >conftest.err
28274   rm -f conftest.er1
28275   cat conftest.err >&5
28276   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28277   (exit $ac_status); } && {
28278          test -z "$ac_c_werror_flag" ||
28279          test ! -s conftest.err
28280        } && test -s conftest.$ac_objext; then
28281   ac_header_compiler=yes
28282 else
28283   echo "$as_me: failed program was:" >&5
28284 sed 's/^/| /' conftest.$ac_ext >&5
28285
28286         ac_header_compiler=no
28287 fi
28288
28289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28290 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28291 echo "${ECHO_T}$ac_header_compiler" >&6; }
28292
28293 # Is the header present?
28294 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
28295 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
28296 cat >conftest.$ac_ext <<_ACEOF
28297 /* confdefs.h.  */
28298 _ACEOF
28299 cat confdefs.h >>conftest.$ac_ext
28300 cat >>conftest.$ac_ext <<_ACEOF
28301 /* end confdefs.h.  */
28302 #include <$ac_header>
28303 _ACEOF
28304 if { (ac_try="$ac_cpp conftest.$ac_ext"
28305 case "(($ac_try" in
28306   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28307   *) ac_try_echo=$ac_try;;
28308 esac
28309 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28310   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28311   ac_status=$?
28312   grep -v '^ *+' conftest.er1 >conftest.err
28313   rm -f conftest.er1
28314   cat conftest.err >&5
28315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28316   (exit $ac_status); } >/dev/null && {
28317          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28318          test ! -s conftest.err
28319        }; then
28320   ac_header_preproc=yes
28321 else
28322   echo "$as_me: failed program was:" >&5
28323 sed 's/^/| /' conftest.$ac_ext >&5
28324
28325   ac_header_preproc=no
28326 fi
28327
28328 rm -f conftest.err conftest.$ac_ext
28329 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28330 echo "${ECHO_T}$ac_header_preproc" >&6; }
28331
28332 # So?  What about this header?
28333 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28334   yes:no: )
28335     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
28336 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
28337     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
28338 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
28339     ac_header_preproc=yes
28340     ;;
28341   no:yes:* )
28342     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
28343 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
28344     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
28345 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
28346     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
28347 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
28348     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
28349 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
28350     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
28351 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
28352     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
28353 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
28354     ( cat <<\_ASBOX
28355 ## --------------------------------------------- ##
28356 ## Report this to <http://www.openldap.org/its/> ##
28357 ## --------------------------------------------- ##
28358 _ASBOX
28359      ) | sed "s/^/$as_me: WARNING:     /" >&2
28360     ;;
28361 esac
28362 { echo "$as_me:$LINENO: checking for $ac_header" >&5
28363 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
28364 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
28365   echo $ECHO_N "(cached) $ECHO_C" >&6
28366 else
28367   eval "$as_ac_Header=\$ac_header_preproc"
28368 fi
28369 ac_res=`eval echo '${'$as_ac_Header'}'`
28370                { echo "$as_me:$LINENO: result: $ac_res" >&5
28371 echo "${ECHO_T}$ac_res" >&6; }
28372
28373 fi
28374 if test `eval echo '${'$as_ac_Header'}'` = yes; then
28375   cat >>confdefs.h <<_ACEOF
28376 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28377 _ACEOF
28378
28379 fi
28380
28381 done
28382
28383 if test $ac_cv_header_db_h = yes; then
28384         { echo "$as_me:$LINENO: checking for Berkeley DB major version in db.h" >&5
28385 echo $ECHO_N "checking for Berkeley DB major version in db.h... $ECHO_C" >&6; }
28386 if test "${ol_cv_bdb_major+set}" = set; then
28387   echo $ECHO_N "(cached) $ECHO_C" >&6
28388 else
28389
28390         cat >conftest.$ac_ext <<_ACEOF
28391
28392 #include <db.h>
28393 #ifndef DB_VERSION_MAJOR
28394 #       define DB_VERSION_MAJOR 1
28395 #endif
28396 __db_version DB_VERSION_MAJOR
28397
28398 _ACEOF
28399         set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
28400         ol_cv_bdb_major=${3}
28401
28402 fi
28403 { echo "$as_me:$LINENO: result: $ol_cv_bdb_major" >&5
28404 echo "${ECHO_T}$ol_cv_bdb_major" >&6; }
28405 case $ol_cv_bdb_major in [1-9]*) : ;; *)
28406         { { echo "$as_me:$LINENO: error: Unknown Berkeley DB major version in db.h" >&5
28407 echo "$as_me: error: Unknown Berkeley DB major version in db.h" >&2;}
28408    { (exit 1); exit 1; }; } ;;
28409 esac
28410
28411 { echo "$as_me:$LINENO: checking for Berkeley DB minor version in db.h" >&5
28412 echo $ECHO_N "checking for Berkeley DB minor version in db.h... $ECHO_C" >&6; }
28413 if test "${ol_cv_bdb_minor+set}" = set; then
28414   echo $ECHO_N "(cached) $ECHO_C" >&6
28415 else
28416
28417         cat >conftest.$ac_ext <<_ACEOF
28418
28419 #include <db.h>
28420 #ifndef DB_VERSION_MINOR
28421 #       define DB_VERSION_MINOR 0
28422 #endif
28423 __db_version DB_VERSION_MINOR
28424
28425 _ACEOF
28426         set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
28427         ol_cv_bdb_minor=${3}
28428
28429 fi
28430 { echo "$as_me:$LINENO: result: $ol_cv_bdb_minor" >&5
28431 echo "${ECHO_T}$ol_cv_bdb_minor" >&6; }
28432 case $ol_cv_bdb_minor in [0-9]*) : ;; *)
28433         { { echo "$as_me:$LINENO: error: Unknown Berkeley DB minor version in db.h" >&5
28434 echo "$as_me: error: Unknown Berkeley DB minor version in db.h" >&2;}
28435    { (exit 1); exit 1; }; } ;;
28436 esac
28437
28438         { echo "$as_me:$LINENO: checking if Berkeley DB version supported by BDB/HDB backends" >&5
28439 echo $ECHO_N "checking if Berkeley DB version supported by BDB/HDB backends... $ECHO_C" >&6; }
28440 if test "${ol_cv_bdb_compat+set}" = set; then
28441   echo $ECHO_N "(cached) $ECHO_C" >&6
28442 else
28443
28444         cat >conftest.$ac_ext <<_ACEOF
28445 /* confdefs.h.  */
28446 _ACEOF
28447 cat confdefs.h >>conftest.$ac_ext
28448 cat >>conftest.$ac_ext <<_ACEOF
28449 /* end confdefs.h.  */
28450
28451 #include <db.h>
28452
28453  /* this check could be improved */
28454 #ifndef DB_VERSION_MAJOR
28455 #       define DB_VERSION_MAJOR 1
28456 #endif
28457 #ifndef DB_VERSION_MINOR
28458 #       define DB_VERSION_MINOR 0
28459 #endif
28460
28461 #define DB_VERSION_MM   ((DB_VERSION_MAJOR<<8)|DB_VERSION_MINOR)
28462
28463 /* require 4.4 or later */
28464 #if DB_VERSION_MM >= 0x0404
28465         __db_version_compat
28466 #endif
28467
28468 _ACEOF
28469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28470   $EGREP "__db_version_compat" >/dev/null 2>&1; then
28471   ol_cv_bdb_compat=yes
28472 else
28473   ol_cv_bdb_compat=no
28474 fi
28475 rm -f conftest*
28476
28477 fi
28478 { echo "$as_me:$LINENO: result: $ol_cv_bdb_compat" >&5
28479 echo "${ECHO_T}$ol_cv_bdb_compat" >&6; }
28480
28481
28482         if test $ol_cv_bdb_compat != yes ; then
28483                 { { echo "$as_me:$LINENO: error: BerkeleyDB version incompatible with BDB/HDB backends" >&5
28484 echo "$as_me: error: BerkeleyDB version incompatible with BDB/HDB backends" >&2;}
28485    { (exit 1); exit 1; }; }
28486         fi
28487
28488         ol_cv_lib_db=no
28489
28490 if test $ol_cv_bdb_major = 4 ; then
28491         if test $ol_cv_lib_db = no ; then
28492         { echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)" >&5
28493 echo $ECHO_N "checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)... $ECHO_C" >&6; }
28494 if test "${ol_cv_db_db_4_dot_m+set}" = set; then
28495   echo $ECHO_N "(cached) $ECHO_C" >&6
28496 else
28497
28498         ol_DB_LIB=-ldb-4.$ol_cv_bdb_minor
28499         ol_LIBS=$LIBS
28500         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28501
28502         cat >conftest.$ac_ext <<_ACEOF
28503 /* confdefs.h.  */
28504 _ACEOF
28505 cat confdefs.h >>conftest.$ac_ext
28506 cat >>conftest.$ac_ext <<_ACEOF
28507 /* end confdefs.h.  */
28508
28509 #ifdef HAVE_DB_185_H
28510 # include <db_185.h>
28511 #else
28512 # include <db.h>
28513 #endif
28514
28515 #ifndef DB_VERSION_MAJOR
28516 # define DB_VERSION_MAJOR 1
28517 #endif
28518
28519 #ifndef NULL
28520 #define NULL ((void*)0)
28521 #endif
28522
28523 int
28524 main ()
28525 {
28526
28527 #if DB_VERSION_MAJOR > 2
28528         db_env_create( NULL, 0 );
28529 #elif DB_VERSION_MAJOR > 1
28530         db_appexit( NULL );
28531 #else
28532         (void) dbopen( NULL, 0, 0, 0, NULL);
28533 #endif
28534
28535   ;
28536   return 0;
28537 }
28538 _ACEOF
28539 rm -f conftest.$ac_objext conftest$ac_exeext
28540 if { (ac_try="$ac_link"
28541 case "(($ac_try" in
28542   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28543   *) ac_try_echo=$ac_try;;
28544 esac
28545 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28546   (eval "$ac_link") 2>conftest.er1
28547   ac_status=$?
28548   grep -v '^ *+' conftest.er1 >conftest.err
28549   rm -f conftest.er1
28550   cat conftest.err >&5
28551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28552   (exit $ac_status); } && {
28553          test -z "$ac_c_werror_flag" ||
28554          test ! -s conftest.err
28555        } && test -s conftest$ac_exeext &&
28556        $as_test_x conftest$ac_exeext; then
28557   ol_cv_db_db_4_dot_m=yes
28558 else
28559   echo "$as_me: failed program was:" >&5
28560 sed 's/^/| /' conftest.$ac_ext >&5
28561
28562         ol_cv_db_db_4_dot_m=no
28563 fi
28564
28565 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28566       conftest$ac_exeext conftest.$ac_ext
28567
28568         LIBS="$ol_LIBS"
28569
28570 fi
28571 { echo "$as_me:$LINENO: result: $ol_cv_db_db_4_dot_m" >&5
28572 echo "${ECHO_T}$ol_cv_db_db_4_dot_m" >&6; }
28573
28574         if test $ol_cv_db_db_4_dot_m = yes ; then
28575                 ol_cv_lib_db=-ldb-4.$ol_cv_bdb_minor
28576         fi
28577 fi
28578
28579         if test $ol_cv_lib_db = no ; then
28580         { echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)" >&5
28581 echo $ECHO_N "checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)... $ECHO_C" >&6; }
28582 if test "${ol_cv_db_db4m+set}" = set; then
28583   echo $ECHO_N "(cached) $ECHO_C" >&6
28584 else
28585
28586         ol_DB_LIB=-ldb4$ol_cv_bdb_minor
28587         ol_LIBS=$LIBS
28588         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28589
28590         cat >conftest.$ac_ext <<_ACEOF
28591 /* confdefs.h.  */
28592 _ACEOF
28593 cat confdefs.h >>conftest.$ac_ext
28594 cat >>conftest.$ac_ext <<_ACEOF
28595 /* end confdefs.h.  */
28596
28597 #ifdef HAVE_DB_185_H
28598 # include <db_185.h>
28599 #else
28600 # include <db.h>
28601 #endif
28602
28603 #ifndef DB_VERSION_MAJOR
28604 # define DB_VERSION_MAJOR 1
28605 #endif
28606
28607 #ifndef NULL
28608 #define NULL ((void*)0)
28609 #endif
28610
28611 int
28612 main ()
28613 {
28614
28615 #if DB_VERSION_MAJOR > 2
28616         db_env_create( NULL, 0 );
28617 #elif DB_VERSION_MAJOR > 1
28618         db_appexit( NULL );
28619 #else
28620         (void) dbopen( NULL, 0, 0, 0, NULL);
28621 #endif
28622
28623   ;
28624   return 0;
28625 }
28626 _ACEOF
28627 rm -f conftest.$ac_objext conftest$ac_exeext
28628 if { (ac_try="$ac_link"
28629 case "(($ac_try" in
28630   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28631   *) ac_try_echo=$ac_try;;
28632 esac
28633 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28634   (eval "$ac_link") 2>conftest.er1
28635   ac_status=$?
28636   grep -v '^ *+' conftest.er1 >conftest.err
28637   rm -f conftest.er1
28638   cat conftest.err >&5
28639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28640   (exit $ac_status); } && {
28641          test -z "$ac_c_werror_flag" ||
28642          test ! -s conftest.err
28643        } && test -s conftest$ac_exeext &&
28644        $as_test_x conftest$ac_exeext; then
28645   ol_cv_db_db4m=yes
28646 else
28647   echo "$as_me: failed program was:" >&5
28648 sed 's/^/| /' conftest.$ac_ext >&5
28649
28650         ol_cv_db_db4m=no
28651 fi
28652
28653 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28654       conftest$ac_exeext conftest.$ac_ext
28655
28656         LIBS="$ol_LIBS"
28657
28658 fi
28659 { echo "$as_me:$LINENO: result: $ol_cv_db_db4m" >&5
28660 echo "${ECHO_T}$ol_cv_db_db4m" >&6; }
28661
28662         if test $ol_cv_db_db4m = yes ; then
28663                 ol_cv_lib_db=-ldb4$ol_cv_bdb_minor
28664         fi
28665 fi
28666
28667         if test $ol_cv_lib_db = no ; then
28668         { echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)" >&5
28669 echo $ECHO_N "checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)... $ECHO_C" >&6; }
28670 if test "${ol_cv_db_db_4m+set}" = set; then
28671   echo $ECHO_N "(cached) $ECHO_C" >&6
28672 else
28673
28674         ol_DB_LIB=-ldb-4$ol_cv_bdb_minor
28675         ol_LIBS=$LIBS
28676         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28677
28678         cat >conftest.$ac_ext <<_ACEOF
28679 /* confdefs.h.  */
28680 _ACEOF
28681 cat confdefs.h >>conftest.$ac_ext
28682 cat >>conftest.$ac_ext <<_ACEOF
28683 /* end confdefs.h.  */
28684
28685 #ifdef HAVE_DB_185_H
28686 # include <db_185.h>
28687 #else
28688 # include <db.h>
28689 #endif
28690
28691 #ifndef DB_VERSION_MAJOR
28692 # define DB_VERSION_MAJOR 1
28693 #endif
28694
28695 #ifndef NULL
28696 #define NULL ((void*)0)
28697 #endif
28698
28699 int
28700 main ()
28701 {
28702
28703 #if DB_VERSION_MAJOR > 2
28704         db_env_create( NULL, 0 );
28705 #elif DB_VERSION_MAJOR > 1
28706         db_appexit( NULL );
28707 #else
28708         (void) dbopen( NULL, 0, 0, 0, NULL);
28709 #endif
28710
28711   ;
28712   return 0;
28713 }
28714 _ACEOF
28715 rm -f conftest.$ac_objext conftest$ac_exeext
28716 if { (ac_try="$ac_link"
28717 case "(($ac_try" in
28718   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28719   *) ac_try_echo=$ac_try;;
28720 esac
28721 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28722   (eval "$ac_link") 2>conftest.er1
28723   ac_status=$?
28724   grep -v '^ *+' conftest.er1 >conftest.err
28725   rm -f conftest.er1
28726   cat conftest.err >&5
28727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28728   (exit $ac_status); } && {
28729          test -z "$ac_c_werror_flag" ||
28730          test ! -s conftest.err
28731        } && test -s conftest$ac_exeext &&
28732        $as_test_x conftest$ac_exeext; then
28733   ol_cv_db_db_4m=yes
28734 else
28735   echo "$as_me: failed program was:" >&5
28736 sed 's/^/| /' conftest.$ac_ext >&5
28737
28738         ol_cv_db_db_4m=no
28739 fi
28740
28741 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28742       conftest$ac_exeext conftest.$ac_ext
28743
28744         LIBS="$ol_LIBS"
28745
28746 fi
28747 { echo "$as_me:$LINENO: result: $ol_cv_db_db_4m" >&5
28748 echo "${ECHO_T}$ol_cv_db_db_4m" >&6; }
28749
28750         if test $ol_cv_db_db_4m = yes ; then
28751                 ol_cv_lib_db=-ldb-4$ol_cv_bdb_minor
28752         fi
28753 fi
28754
28755         if test $ol_cv_lib_db = no ; then
28756         { echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)" >&5
28757 echo $ECHO_N "checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)... $ECHO_C" >&6; }
28758 if test "${ol_cv_db_db_4_m+set}" = set; then
28759   echo $ECHO_N "(cached) $ECHO_C" >&6
28760 else
28761
28762         ol_DB_LIB=-ldb-4-$ol_cv_bdb_minor
28763         ol_LIBS=$LIBS
28764         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28765
28766         cat >conftest.$ac_ext <<_ACEOF
28767 /* confdefs.h.  */
28768 _ACEOF
28769 cat confdefs.h >>conftest.$ac_ext
28770 cat >>conftest.$ac_ext <<_ACEOF
28771 /* end confdefs.h.  */
28772
28773 #ifdef HAVE_DB_185_H
28774 # include <db_185.h>
28775 #else
28776 # include <db.h>
28777 #endif
28778
28779 #ifndef DB_VERSION_MAJOR
28780 # define DB_VERSION_MAJOR 1
28781 #endif
28782
28783 #ifndef NULL
28784 #define NULL ((void*)0)
28785 #endif
28786
28787 int
28788 main ()
28789 {
28790
28791 #if DB_VERSION_MAJOR > 2
28792         db_env_create( NULL, 0 );
28793 #elif DB_VERSION_MAJOR > 1
28794         db_appexit( NULL );
28795 #else
28796         (void) dbopen( NULL, 0, 0, 0, NULL);
28797 #endif
28798
28799   ;
28800   return 0;
28801 }
28802 _ACEOF
28803 rm -f conftest.$ac_objext conftest$ac_exeext
28804 if { (ac_try="$ac_link"
28805 case "(($ac_try" in
28806   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28807   *) ac_try_echo=$ac_try;;
28808 esac
28809 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28810   (eval "$ac_link") 2>conftest.er1
28811   ac_status=$?
28812   grep -v '^ *+' conftest.er1 >conftest.err
28813   rm -f conftest.er1
28814   cat conftest.err >&5
28815   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28816   (exit $ac_status); } && {
28817          test -z "$ac_c_werror_flag" ||
28818          test ! -s conftest.err
28819        } && test -s conftest$ac_exeext &&
28820        $as_test_x conftest$ac_exeext; then
28821   ol_cv_db_db_4_m=yes
28822 else
28823   echo "$as_me: failed program was:" >&5
28824 sed 's/^/| /' conftest.$ac_ext >&5
28825
28826         ol_cv_db_db_4_m=no
28827 fi
28828
28829 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28830       conftest$ac_exeext conftest.$ac_ext
28831
28832         LIBS="$ol_LIBS"
28833
28834 fi
28835 { echo "$as_me:$LINENO: result: $ol_cv_db_db_4_m" >&5
28836 echo "${ECHO_T}$ol_cv_db_db_4_m" >&6; }
28837
28838         if test $ol_cv_db_db_4_m = yes ; then
28839                 ol_cv_lib_db=-ldb-4-$ol_cv_bdb_minor
28840         fi
28841 fi
28842
28843         if test $ol_cv_lib_db = no ; then
28844         { echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb-4)" >&5
28845 echo $ECHO_N "checking for Berkeley DB link (-ldb-4)... $ECHO_C" >&6; }
28846 if test "${ol_cv_db_db_4+set}" = set; then
28847   echo $ECHO_N "(cached) $ECHO_C" >&6
28848 else
28849
28850         ol_DB_LIB=-ldb-4
28851         ol_LIBS=$LIBS
28852         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28853
28854         cat >conftest.$ac_ext <<_ACEOF
28855 /* confdefs.h.  */
28856 _ACEOF
28857 cat confdefs.h >>conftest.$ac_ext
28858 cat >>conftest.$ac_ext <<_ACEOF
28859 /* end confdefs.h.  */
28860
28861 #ifdef HAVE_DB_185_H
28862 # include <db_185.h>
28863 #else
28864 # include <db.h>
28865 #endif
28866
28867 #ifndef DB_VERSION_MAJOR
28868 # define DB_VERSION_MAJOR 1
28869 #endif
28870
28871 #ifndef NULL
28872 #define NULL ((void*)0)
28873 #endif
28874
28875 int
28876 main ()
28877 {
28878
28879 #if DB_VERSION_MAJOR > 2
28880         db_env_create( NULL, 0 );
28881 #elif DB_VERSION_MAJOR > 1
28882         db_appexit( NULL );
28883 #else
28884         (void) dbopen( NULL, 0, 0, 0, NULL);
28885 #endif
28886
28887   ;
28888   return 0;
28889 }
28890 _ACEOF
28891 rm -f conftest.$ac_objext conftest$ac_exeext
28892 if { (ac_try="$ac_link"
28893 case "(($ac_try" in
28894   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28895   *) ac_try_echo=$ac_try;;
28896 esac
28897 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28898   (eval "$ac_link") 2>conftest.er1
28899   ac_status=$?
28900   grep -v '^ *+' conftest.er1 >conftest.err
28901   rm -f conftest.er1
28902   cat conftest.err >&5
28903   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28904   (exit $ac_status); } && {
28905          test -z "$ac_c_werror_flag" ||
28906          test ! -s conftest.err
28907        } && test -s conftest$ac_exeext &&
28908        $as_test_x conftest$ac_exeext; then
28909   ol_cv_db_db_4=yes
28910 else
28911   echo "$as_me: failed program was:" >&5
28912 sed 's/^/| /' conftest.$ac_ext >&5
28913
28914         ol_cv_db_db_4=no
28915 fi
28916
28917 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
28918       conftest$ac_exeext conftest.$ac_ext
28919
28920         LIBS="$ol_LIBS"
28921
28922 fi
28923 { echo "$as_me:$LINENO: result: $ol_cv_db_db_4" >&5
28924 echo "${ECHO_T}$ol_cv_db_db_4" >&6; }
28925
28926         if test $ol_cv_db_db_4 = yes ; then
28927                 ol_cv_lib_db=-ldb-4
28928         fi
28929 fi
28930
28931         if test $ol_cv_lib_db = no ; then
28932         { echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb4)" >&5
28933 echo $ECHO_N "checking for Berkeley DB link (-ldb4)... $ECHO_C" >&6; }
28934 if test "${ol_cv_db_db4+set}" = set; then
28935   echo $ECHO_N "(cached) $ECHO_C" >&6
28936 else
28937
28938         ol_DB_LIB=-ldb4
28939         ol_LIBS=$LIBS
28940         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
28941
28942         cat >conftest.$ac_ext <<_ACEOF
28943 /* confdefs.h.  */
28944 _ACEOF
28945 cat confdefs.h >>conftest.$ac_ext
28946 cat >>conftest.$ac_ext <<_ACEOF
28947 /* end confdefs.h.  */
28948
28949 #ifdef HAVE_DB_185_H
28950 # include <db_185.h>
28951 #else
28952 # include <db.h>
28953 #endif
28954
28955 #ifndef DB_VERSION_MAJOR
28956 # define DB_VERSION_MAJOR 1
28957 #endif
28958
28959 #ifndef NULL
28960 #define NULL ((void*)0)
28961 #endif
28962
28963 int
28964 main ()
28965 {
28966
28967 #if DB_VERSION_MAJOR > 2
28968         db_env_create( NULL, 0 );
28969 #elif DB_VERSION_MAJOR > 1
28970         db_appexit( NULL );
28971 #else
28972         (void) dbopen( NULL, 0, 0, 0, NULL);
28973 #endif
28974
28975   ;
28976   return 0;
28977 }
28978 _ACEOF
28979 rm -f conftest.$ac_objext conftest$ac_exeext
28980 if { (ac_try="$ac_link"
28981 case "(($ac_try" in
28982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28983   *) ac_try_echo=$ac_try;;
28984 esac
28985 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28986   (eval "$ac_link") 2>conftest.er1
28987   ac_status=$?
28988   grep -v '^ *+' conftest.er1 >conftest.err
28989   rm -f conftest.er1
28990   cat conftest.err >&5
28991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
28992   (exit $ac_status); } && {
28993          test -z "$ac_c_werror_flag" ||
28994          test ! -s conftest.err
28995        } && test -s conftest$ac_exeext &&
28996        $as_test_x conftest$ac_exeext; then
28997   ol_cv_db_db4=yes
28998 else
28999   echo "$as_me: failed program was:" >&5
29000 sed 's/^/| /' conftest.$ac_ext >&5
29001
29002         ol_cv_db_db4=no
29003 fi
29004
29005 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29006       conftest$ac_exeext conftest.$ac_ext
29007
29008         LIBS="$ol_LIBS"
29009
29010 fi
29011 { echo "$as_me:$LINENO: result: $ol_cv_db_db4" >&5
29012 echo "${ECHO_T}$ol_cv_db_db4" >&6; }
29013
29014         if test $ol_cv_db_db4 = yes ; then
29015                 ol_cv_lib_db=-ldb4
29016         fi
29017 fi
29018
29019         if test $ol_cv_lib_db = no ; then
29020         { echo "$as_me:$LINENO: checking for Berkeley DB link (-ldb)" >&5
29021 echo $ECHO_N "checking for Berkeley DB link (-ldb)... $ECHO_C" >&6; }
29022 if test "${ol_cv_db_db+set}" = set; then
29023   echo $ECHO_N "(cached) $ECHO_C" >&6
29024 else
29025
29026         ol_DB_LIB=-ldb
29027         ol_LIBS=$LIBS
29028         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29029
29030         cat >conftest.$ac_ext <<_ACEOF
29031 /* confdefs.h.  */
29032 _ACEOF
29033 cat confdefs.h >>conftest.$ac_ext
29034 cat >>conftest.$ac_ext <<_ACEOF
29035 /* end confdefs.h.  */
29036
29037 #ifdef HAVE_DB_185_H
29038 # include <db_185.h>
29039 #else
29040 # include <db.h>
29041 #endif
29042
29043 #ifndef DB_VERSION_MAJOR
29044 # define DB_VERSION_MAJOR 1
29045 #endif
29046
29047 #ifndef NULL
29048 #define NULL ((void*)0)
29049 #endif
29050
29051 int
29052 main ()
29053 {
29054
29055 #if DB_VERSION_MAJOR > 2
29056         db_env_create( NULL, 0 );
29057 #elif DB_VERSION_MAJOR > 1
29058         db_appexit( NULL );
29059 #else
29060         (void) dbopen( NULL, 0, 0, 0, NULL);
29061 #endif
29062
29063   ;
29064   return 0;
29065 }
29066 _ACEOF
29067 rm -f conftest.$ac_objext conftest$ac_exeext
29068 if { (ac_try="$ac_link"
29069 case "(($ac_try" in
29070   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29071   *) ac_try_echo=$ac_try;;
29072 esac
29073 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29074   (eval "$ac_link") 2>conftest.er1
29075   ac_status=$?
29076   grep -v '^ *+' conftest.er1 >conftest.err
29077   rm -f conftest.er1
29078   cat conftest.err >&5
29079   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29080   (exit $ac_status); } && {
29081          test -z "$ac_c_werror_flag" ||
29082          test ! -s conftest.err
29083        } && test -s conftest$ac_exeext &&
29084        $as_test_x conftest$ac_exeext; then
29085   ol_cv_db_db=yes
29086 else
29087   echo "$as_me: failed program was:" >&5
29088 sed 's/^/| /' conftest.$ac_ext >&5
29089
29090         ol_cv_db_db=no
29091 fi
29092
29093 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29094       conftest$ac_exeext conftest.$ac_ext
29095
29096         LIBS="$ol_LIBS"
29097
29098 fi
29099 { echo "$as_me:$LINENO: result: $ol_cv_db_db" >&5
29100 echo "${ECHO_T}$ol_cv_db_db" >&6; }
29101
29102         if test $ol_cv_db_db = yes ; then
29103                 ol_cv_lib_db=-ldb
29104         fi
29105 fi
29106
29107 fi
29108 if test $ol_cv_lib_db = no ; then
29109         { echo "$as_me:$LINENO: checking for Berkeley DB link (default)" >&5
29110 echo $ECHO_N "checking for Berkeley DB link (default)... $ECHO_C" >&6; }
29111 if test "${ol_cv_db_none+set}" = set; then
29112   echo $ECHO_N "(cached) $ECHO_C" >&6
29113 else
29114
29115         ol_DB_LIB=
29116         ol_LIBS=$LIBS
29117         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
29118
29119         cat >conftest.$ac_ext <<_ACEOF
29120 /* confdefs.h.  */
29121 _ACEOF
29122 cat confdefs.h >>conftest.$ac_ext
29123 cat >>conftest.$ac_ext <<_ACEOF
29124 /* end confdefs.h.  */
29125
29126 #ifdef HAVE_DB_185_H
29127 # include <db_185.h>
29128 #else
29129 # include <db.h>
29130 #endif
29131
29132 #ifndef DB_VERSION_MAJOR
29133 # define DB_VERSION_MAJOR 1
29134 #endif
29135
29136 #ifndef NULL
29137 #define NULL ((void*)0)
29138 #endif
29139
29140 int
29141 main ()
29142 {
29143
29144 #if DB_VERSION_MAJOR > 2
29145         db_env_create( NULL, 0 );
29146 #elif DB_VERSION_MAJOR > 1
29147         db_appexit( NULL );
29148 #else
29149         (void) dbopen( NULL, 0, 0, 0, NULL);
29150 #endif
29151
29152   ;
29153   return 0;
29154 }
29155 _ACEOF
29156 rm -f conftest.$ac_objext conftest$ac_exeext
29157 if { (ac_try="$ac_link"
29158 case "(($ac_try" in
29159   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29160   *) ac_try_echo=$ac_try;;
29161 esac
29162 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29163   (eval "$ac_link") 2>conftest.er1
29164   ac_status=$?
29165   grep -v '^ *+' conftest.er1 >conftest.err
29166   rm -f conftest.er1
29167   cat conftest.err >&5
29168   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29169   (exit $ac_status); } && {
29170          test -z "$ac_c_werror_flag" ||
29171          test ! -s conftest.err
29172        } && test -s conftest$ac_exeext &&
29173        $as_test_x conftest$ac_exeext; then
29174   ol_cv_db_none=yes
29175 else
29176   echo "$as_me: failed program was:" >&5
29177 sed 's/^/| /' conftest.$ac_ext >&5
29178
29179         ol_cv_db_none=no
29180 fi
29181
29182 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29183       conftest$ac_exeext conftest.$ac_ext
29184
29185         LIBS="$ol_LIBS"
29186
29187 fi
29188 { echo "$as_me:$LINENO: result: $ol_cv_db_none" >&5
29189 echo "${ECHO_T}$ol_cv_db_none" >&6; }
29190
29191         if test $ol_cv_db_none = yes ; then
29192                 ol_cv_lib_db=yes
29193         fi
29194 fi
29195
29196
29197         if test "$ol_cv_lib_db" != no ; then
29198                 ol_cv_berkeley_db=yes
29199                 { echo "$as_me:$LINENO: checking for Berkeley DB library and header version match" >&5
29200 echo $ECHO_N "checking for Berkeley DB library and header version match... $ECHO_C" >&6; }
29201 if test "${ol_cv_berkeley_db_version+set}" = set; then
29202   echo $ECHO_N "(cached) $ECHO_C" >&6
29203 else
29204
29205         ol_LIBS="$LIBS"
29206         LIBS="$LTHREAD_LIBS $LIBS"
29207         if test $ol_cv_lib_db != yes ; then
29208                 LIBS="$ol_cv_lib_db $LIBS"
29209         fi
29210
29211         if test "$cross_compiling" = yes; then
29212   ol_cv_berkeley_db_version=cross
29213 else
29214   cat >conftest.$ac_ext <<_ACEOF
29215 /* confdefs.h.  */
29216 _ACEOF
29217 cat confdefs.h >>conftest.$ac_ext
29218 cat >>conftest.$ac_ext <<_ACEOF
29219 /* end confdefs.h.  */
29220
29221 #ifdef HAVE_DB_185_H
29222         choke me;
29223 #else
29224 #include <db.h>
29225 #endif
29226 #ifndef DB_VERSION_MAJOR
29227 # define DB_VERSION_MAJOR 1
29228 #endif
29229 #ifndef NULL
29230 #define NULL ((void *)0)
29231 #endif
29232 main()
29233 {
29234 #if DB_VERSION_MAJOR > 1
29235         char *version;
29236         int major, minor, patch;
29237
29238         version = db_version( &major, &minor, &patch );
29239
29240         if( major != DB_VERSION_MAJOR ||
29241                 minor != DB_VERSION_MINOR ||
29242                 patch != DB_VERSION_PATCH )
29243         {
29244                 printf("Berkeley DB version mismatch\n"
29245                         "\theader: %s\n\tlibrary: %s\n",
29246                         DB_VERSION_STRING, version);
29247                 return 1;
29248         }
29249 #endif
29250
29251         return 0;
29252 }
29253 _ACEOF
29254 rm -f conftest$ac_exeext
29255 if { (ac_try="$ac_link"
29256 case "(($ac_try" in
29257   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29258   *) ac_try_echo=$ac_try;;
29259 esac
29260 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29261   (eval "$ac_link") 2>&5
29262   ac_status=$?
29263   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29264   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
29265   { (case "(($ac_try" in
29266   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29267   *) ac_try_echo=$ac_try;;
29268 esac
29269 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29270   (eval "$ac_try") 2>&5
29271   ac_status=$?
29272   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29273   (exit $ac_status); }; }; then
29274   ol_cv_berkeley_db_version=yes
29275 else
29276   echo "$as_me: program exited with status $ac_status" >&5
29277 echo "$as_me: failed program was:" >&5
29278 sed 's/^/| /' conftest.$ac_ext >&5
29279
29280 ( exit $ac_status )
29281 ol_cv_berkeley_db_version=no
29282 fi
29283 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
29284 fi
29285
29286
29287
29288         LIBS="$ol_LIBS"
29289
29290 fi
29291 { echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_version" >&5
29292 echo "${ECHO_T}$ol_cv_berkeley_db_version" >&6; }
29293
29294         if test $ol_cv_berkeley_db_version = no ; then
29295                 { { echo "$as_me:$LINENO: error: Berkeley DB version mismatch" >&5
29296 echo "$as_me: error: Berkeley DB version mismatch" >&2;}
29297    { (exit 1); exit 1; }; }
29298         fi
29299
29300                 { echo "$as_me:$LINENO: checking for Berkeley DB thread support" >&5
29301 echo $ECHO_N "checking for Berkeley DB thread support... $ECHO_C" >&6; }
29302 if test "${ol_cv_berkeley_db_thread+set}" = set; then
29303   echo $ECHO_N "(cached) $ECHO_C" >&6
29304 else
29305
29306         ol_LIBS="$LIBS"
29307         LIBS="$LTHREAD_LIBS $LIBS"
29308         if test $ol_cv_lib_db != yes ; then
29309                 LIBS="$ol_cv_lib_db $LIBS"
29310         fi
29311
29312         if test "$cross_compiling" = yes; then
29313   ol_cv_berkeley_db_thread=cross
29314 else
29315   cat >conftest.$ac_ext <<_ACEOF
29316 /* confdefs.h.  */
29317 _ACEOF
29318 cat confdefs.h >>conftest.$ac_ext
29319 cat >>conftest.$ac_ext <<_ACEOF
29320 /* end confdefs.h.  */
29321
29322 #ifdef HAVE_DB_185_H
29323         choke me;
29324 #else
29325 #include <db.h>
29326 #endif
29327 #ifndef NULL
29328 #define NULL ((void *)0)
29329 #endif
29330 main()
29331 {
29332         int rc;
29333         u_int32_t flags = DB_CREATE |
29334 #ifdef DB_PRIVATE
29335                 DB_PRIVATE |
29336 #endif
29337                 DB_THREAD;
29338
29339 #if DB_VERSION_MAJOR > 2
29340         DB_ENV *env = NULL;
29341
29342         rc = db_env_create( &env, 0 );
29343
29344         flags |= DB_INIT_MPOOL;
29345 #ifdef DB_MPOOL_PRIVATE
29346         flags |= DB_MPOOL_PRIVATE;
29347 #endif
29348
29349         if( rc ) {
29350                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
29351                 return rc;
29352         }
29353
29354 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
29355         rc = (env->open)( env, NULL, flags, 0 );
29356 #else
29357         rc = (env->open)( env, NULL, NULL, flags, 0 );
29358 #endif
29359
29360         if ( rc == 0 ) {
29361                 rc = env->close( env, 0 );
29362         }
29363
29364         if( rc ) {
29365                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
29366                 return rc;
29367         }
29368
29369 #else
29370         DB_ENV env;
29371         memset( &env, '\0', sizeof(env) );
29372
29373         rc = db_appinit( NULL, NULL, &env, flags );
29374
29375         if( rc == 0 ) {
29376                 db_appexit( &env );
29377         }
29378
29379         unlink("__db_mpool.share");
29380         unlink("__db_lock.share");
29381 #endif
29382
29383         return rc;
29384 }
29385 _ACEOF
29386 rm -f conftest$ac_exeext
29387 if { (ac_try="$ac_link"
29388 case "(($ac_try" in
29389   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29390   *) ac_try_echo=$ac_try;;
29391 esac
29392 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29393   (eval "$ac_link") 2>&5
29394   ac_status=$?
29395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29396   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
29397   { (case "(($ac_try" in
29398   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29399   *) ac_try_echo=$ac_try;;
29400 esac
29401 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29402   (eval "$ac_try") 2>&5
29403   ac_status=$?
29404   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29405   (exit $ac_status); }; }; then
29406   ol_cv_berkeley_db_thread=yes
29407 else
29408   echo "$as_me: program exited with status $ac_status" >&5
29409 echo "$as_me: failed program was:" >&5
29410 sed 's/^/| /' conftest.$ac_ext >&5
29411
29412 ( exit $ac_status )
29413 ol_cv_berkeley_db_thread=no
29414 fi
29415 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
29416 fi
29417
29418
29419
29420         LIBS="$ol_LIBS"
29421
29422 fi
29423 { echo "$as_me:$LINENO: result: $ol_cv_berkeley_db_thread" >&5
29424 echo "${ECHO_T}$ol_cv_berkeley_db_thread" >&6; }
29425
29426         if test $ol_cv_berkeley_db_thread != no ; then
29427
29428 cat >>confdefs.h <<\_ACEOF
29429 #define HAVE_BERKELEY_DB_THREAD 1
29430 _ACEOF
29431
29432         fi
29433
29434         fi
29435 fi
29436
29437
29438         if test $ol_cv_berkeley_db = no ; then
29439                 { { echo "$as_me:$LINENO: error: BDB/HDB: BerkeleyDB not available" >&5
29440 echo "$as_me: error: BDB/HDB: BerkeleyDB not available" >&2;}
29441    { (exit 1); exit 1; }; }
29442         fi
29443
29444
29445 cat >>confdefs.h <<\_ACEOF
29446 #define HAVE_BERKELEY_DB 1
29447 _ACEOF
29448
29449
29450                         if test $ol_cv_lib_db != yes ; then
29451                 BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
29452         fi
29453
29454         SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
29455
29456         ol_link_bdb=yes
29457 fi
29458
29459
29460 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
29461         BUILD_LIBS_DYNAMIC=shared
29462
29463 cat >>confdefs.h <<\_ACEOF
29464 #define LDAP_LIBS_DYNAMIC 1
29465 _ACEOF
29466
29467         LTSTATIC=""
29468 else
29469         BUILD_LIBS_DYNAMIC=static
29470         LTSTATIC="-static"
29471 fi
29472
29473 if test $ol_enable_wrappers != no ; then
29474
29475 for ac_header in tcpd.h
29476 do
29477 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
29478 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29479   { echo "$as_me:$LINENO: checking for $ac_header" >&5
29480 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29481 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29482   echo $ECHO_N "(cached) $ECHO_C" >&6
29483 fi
29484 ac_res=`eval echo '${'$as_ac_Header'}'`
29485                { echo "$as_me:$LINENO: result: $ac_res" >&5
29486 echo "${ECHO_T}$ac_res" >&6; }
29487 else
29488   # Is the header compilable?
29489 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
29490 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
29491 cat >conftest.$ac_ext <<_ACEOF
29492 /* confdefs.h.  */
29493 _ACEOF
29494 cat confdefs.h >>conftest.$ac_ext
29495 cat >>conftest.$ac_ext <<_ACEOF
29496 /* end confdefs.h.  */
29497 $ac_includes_default
29498 #include <$ac_header>
29499 _ACEOF
29500 rm -f conftest.$ac_objext
29501 if { (ac_try="$ac_compile"
29502 case "(($ac_try" in
29503   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29504   *) ac_try_echo=$ac_try;;
29505 esac
29506 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29507   (eval "$ac_compile") 2>conftest.er1
29508   ac_status=$?
29509   grep -v '^ *+' conftest.er1 >conftest.err
29510   rm -f conftest.er1
29511   cat conftest.err >&5
29512   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29513   (exit $ac_status); } && {
29514          test -z "$ac_c_werror_flag" ||
29515          test ! -s conftest.err
29516        } && test -s conftest.$ac_objext; then
29517   ac_header_compiler=yes
29518 else
29519   echo "$as_me: failed program was:" >&5
29520 sed 's/^/| /' conftest.$ac_ext >&5
29521
29522         ac_header_compiler=no
29523 fi
29524
29525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29526 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29527 echo "${ECHO_T}$ac_header_compiler" >&6; }
29528
29529 # Is the header present?
29530 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
29531 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
29532 cat >conftest.$ac_ext <<_ACEOF
29533 /* confdefs.h.  */
29534 _ACEOF
29535 cat confdefs.h >>conftest.$ac_ext
29536 cat >>conftest.$ac_ext <<_ACEOF
29537 /* end confdefs.h.  */
29538 #include <$ac_header>
29539 _ACEOF
29540 if { (ac_try="$ac_cpp conftest.$ac_ext"
29541 case "(($ac_try" in
29542   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29543   *) ac_try_echo=$ac_try;;
29544 esac
29545 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29546   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29547   ac_status=$?
29548   grep -v '^ *+' conftest.er1 >conftest.err
29549   rm -f conftest.er1
29550   cat conftest.err >&5
29551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29552   (exit $ac_status); } >/dev/null && {
29553          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29554          test ! -s conftest.err
29555        }; then
29556   ac_header_preproc=yes
29557 else
29558   echo "$as_me: failed program was:" >&5
29559 sed 's/^/| /' conftest.$ac_ext >&5
29560
29561   ac_header_preproc=no
29562 fi
29563
29564 rm -f conftest.err conftest.$ac_ext
29565 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29566 echo "${ECHO_T}$ac_header_preproc" >&6; }
29567
29568 # So?  What about this header?
29569 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29570   yes:no: )
29571     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
29572 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
29573     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
29574 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
29575     ac_header_preproc=yes
29576     ;;
29577   no:yes:* )
29578     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
29579 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
29580     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
29581 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
29582     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
29583 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
29584     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
29585 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
29586     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
29587 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
29588     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
29589 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
29590     ( cat <<\_ASBOX
29591 ## --------------------------------------------- ##
29592 ## Report this to <http://www.openldap.org/its/> ##
29593 ## --------------------------------------------- ##
29594 _ASBOX
29595      ) | sed "s/^/$as_me: WARNING:     /" >&2
29596     ;;
29597 esac
29598 { echo "$as_me:$LINENO: checking for $ac_header" >&5
29599 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29600 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29601   echo $ECHO_N "(cached) $ECHO_C" >&6
29602 else
29603   eval "$as_ac_Header=\$ac_header_preproc"
29604 fi
29605 ac_res=`eval echo '${'$as_ac_Header'}'`
29606                { echo "$as_me:$LINENO: result: $ac_res" >&5
29607 echo "${ECHO_T}$ac_res" >&6; }
29608
29609 fi
29610 if test `eval echo '${'$as_ac_Header'}'` = yes; then
29611   cat >>confdefs.h <<_ACEOF
29612 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
29613 _ACEOF
29614
29615                 { echo "$as_me:$LINENO: checking for TCP wrappers library" >&5
29616 echo $ECHO_N "checking for TCP wrappers library... $ECHO_C" >&6; }
29617                 save_LIBS="$LIBS"
29618                 LIBS="$LIBS -lwrap"
29619                 cat >conftest.$ac_ext <<_ACEOF
29620 /* confdefs.h.  */
29621 _ACEOF
29622 cat confdefs.h >>conftest.$ac_ext
29623 cat >>conftest.$ac_ext <<_ACEOF
29624 /* end confdefs.h.  */
29625
29626 #include <tcpd.h>
29627 int allow_severity = 0;
29628 int deny_severity  = 0;
29629
29630 struct request_info *req;
29631
29632 int
29633 main ()
29634 {
29635
29636 hosts_access(req)
29637
29638   ;
29639   return 0;
29640 }
29641 _ACEOF
29642 rm -f conftest.$ac_objext conftest$ac_exeext
29643 if { (ac_try="$ac_link"
29644 case "(($ac_try" in
29645   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29646   *) ac_try_echo=$ac_try;;
29647 esac
29648 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29649   (eval "$ac_link") 2>conftest.er1
29650   ac_status=$?
29651   grep -v '^ *+' conftest.er1 >conftest.err
29652   rm -f conftest.er1
29653   cat conftest.err >&5
29654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29655   (exit $ac_status); } && {
29656          test -z "$ac_c_werror_flag" ||
29657          test ! -s conftest.err
29658        } && test -s conftest$ac_exeext &&
29659        $as_test_x conftest$ac_exeext; then
29660   { echo "$as_me:$LINENO: result: -lwrap" >&5
29661 echo "${ECHO_T}-lwrap" >&6; }
29662                 have_wrappers=yes
29663                 LIBS="$save_LIBS"
29664 else
29665   echo "$as_me: failed program was:" >&5
29666 sed 's/^/| /' conftest.$ac_ext >&5
29667
29668
29669                                 LIBS="$LIBS -lnsl"
29670                 cat >conftest.$ac_ext <<_ACEOF
29671 /* confdefs.h.  */
29672 _ACEOF
29673 cat confdefs.h >>conftest.$ac_ext
29674 cat >>conftest.$ac_ext <<_ACEOF
29675 /* end confdefs.h.  */
29676
29677 #include <tcpd.h>
29678 int allow_severity = 0;
29679 int deny_severity  = 0;
29680
29681 struct request_info *req;
29682
29683 int
29684 main ()
29685 {
29686
29687 hosts_access(req)
29688
29689   ;
29690   return 0;
29691 }
29692 _ACEOF
29693 rm -f conftest.$ac_objext conftest$ac_exeext
29694 if { (ac_try="$ac_link"
29695 case "(($ac_try" in
29696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29697   *) ac_try_echo=$ac_try;;
29698 esac
29699 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29700   (eval "$ac_link") 2>conftest.er1
29701   ac_status=$?
29702   grep -v '^ *+' conftest.er1 >conftest.err
29703   rm -f conftest.er1
29704   cat conftest.err >&5
29705   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29706   (exit $ac_status); } && {
29707          test -z "$ac_c_werror_flag" ||
29708          test ! -s conftest.err
29709        } && test -s conftest$ac_exeext &&
29710        $as_test_x conftest$ac_exeext; then
29711   { echo "$as_me:$LINENO: result: -lwrap -lnsl" >&5
29712 echo "${ECHO_T}-lwrap -lnsl" >&6; }
29713                 have_wrappers=yes
29714                 LIBS="$save_LIBS -lnsl"
29715 else
29716   echo "$as_me: failed program was:" >&5
29717 sed 's/^/| /' conftest.$ac_ext >&5
29718
29719
29720                 { echo "$as_me:$LINENO: result: no" >&5
29721 echo "${ECHO_T}no" >&6; }
29722                 have_wrappers=no
29723                 LIBS=$save_LIBS
29724 fi
29725
29726 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29727       conftest$ac_exeext conftest.$ac_ext
29728 fi
29729
29730 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29731       conftest$ac_exeext conftest.$ac_ext
29732 else
29733   have_wrappers=no
29734 fi
29735
29736 done
29737
29738
29739         if test $have_wrappers = yes ; then
29740
29741 cat >>confdefs.h <<\_ACEOF
29742 #define HAVE_TCPD 1
29743 _ACEOF
29744
29745                 WRAP_LIBS="-lwrap"
29746         elif test $ol_enable_wrappers = yes ; then
29747                 { { echo "$as_me:$LINENO: error: could not find TCP wrappers, select apppropriate options or disable" >&5
29748 echo "$as_me: error: could not find TCP wrappers, select apppropriate options or disable" >&2;}
29749    { (exit 1); exit 1; }; }
29750         else
29751                 { echo "$as_me:$LINENO: WARNING: could not find TCP wrappers, support disabled" >&5
29752 echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
29753                 WRAP_LIBS=""
29754         fi
29755 fi
29756
29757 if test $ol_enable_syslog != no ; then
29758         { echo "$as_me:$LINENO: checking for openlog" >&5
29759 echo $ECHO_N "checking for openlog... $ECHO_C" >&6; }
29760 if test "${ac_cv_func_openlog+set}" = set; then
29761   echo $ECHO_N "(cached) $ECHO_C" >&6
29762 else
29763   cat >conftest.$ac_ext <<_ACEOF
29764 /* confdefs.h.  */
29765 _ACEOF
29766 cat confdefs.h >>conftest.$ac_ext
29767 cat >>conftest.$ac_ext <<_ACEOF
29768 /* end confdefs.h.  */
29769 /* Define openlog to an innocuous variant, in case <limits.h> declares openlog.
29770    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
29771 #define openlog innocuous_openlog
29772
29773 /* System header to define __stub macros and hopefully few prototypes,
29774     which can conflict with char openlog (); below.
29775     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
29776     <limits.h> exists even on freestanding compilers.  */
29777
29778 #ifdef __STDC__
29779 # include <limits.h>
29780 #else
29781 # include <assert.h>
29782 #endif
29783
29784 #undef openlog
29785
29786 /* Override any GCC internal prototype to avoid an error.
29787    Use char because int might match the return type of a GCC
29788    builtin and then its argument prototype would still apply.  */
29789 #ifdef __cplusplus
29790 extern "C"
29791 #endif
29792 char openlog ();
29793 /* The GNU C library defines this for functions which it implements
29794     to always fail with ENOSYS.  Some functions are actually named
29795     something starting with __ and the normal name is an alias.  */
29796 #if defined __stub_openlog || defined __stub___openlog
29797 choke me
29798 #endif
29799
29800 int
29801 main ()
29802 {
29803 return openlog ();
29804   ;
29805   return 0;
29806 }
29807 _ACEOF
29808 rm -f conftest.$ac_objext conftest$ac_exeext
29809 if { (ac_try="$ac_link"
29810 case "(($ac_try" in
29811   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29812   *) ac_try_echo=$ac_try;;
29813 esac
29814 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29815   (eval "$ac_link") 2>conftest.er1
29816   ac_status=$?
29817   grep -v '^ *+' conftest.er1 >conftest.err
29818   rm -f conftest.er1
29819   cat conftest.err >&5
29820   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29821   (exit $ac_status); } && {
29822          test -z "$ac_c_werror_flag" ||
29823          test ! -s conftest.err
29824        } && test -s conftest$ac_exeext &&
29825        $as_test_x conftest$ac_exeext; then
29826   ac_cv_func_openlog=yes
29827 else
29828   echo "$as_me: failed program was:" >&5
29829 sed 's/^/| /' conftest.$ac_ext >&5
29830
29831         ac_cv_func_openlog=no
29832 fi
29833
29834 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
29835       conftest$ac_exeext conftest.$ac_ext
29836 fi
29837 { echo "$as_me:$LINENO: result: $ac_cv_func_openlog" >&5
29838 echo "${ECHO_T}$ac_cv_func_openlog" >&6; }
29839
29840         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
29841                 { { echo "$as_me:$LINENO: error: could not find syslog" >&5
29842 echo "$as_me: error: could not find syslog" >&2;}
29843    { (exit select appropriate options or disable); exit select appropriate options or disable; }; }
29844         fi
29845         ol_enable_syslog=$ac_cv_func_openlog
29846 fi
29847
29848 ol_link_sql=no
29849 if test $ol_enable_sql != no ; then
29850
29851
29852 for ac_header in sql.h sqlext.h
29853 do
29854 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
29855 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29856   { echo "$as_me:$LINENO: checking for $ac_header" >&5
29857 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29858 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29859   echo $ECHO_N "(cached) $ECHO_C" >&6
29860 fi
29861 ac_res=`eval echo '${'$as_ac_Header'}'`
29862                { echo "$as_me:$LINENO: result: $ac_res" >&5
29863 echo "${ECHO_T}$ac_res" >&6; }
29864 else
29865   # Is the header compilable?
29866 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
29867 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
29868 cat >conftest.$ac_ext <<_ACEOF
29869 /* confdefs.h.  */
29870 _ACEOF
29871 cat confdefs.h >>conftest.$ac_ext
29872 cat >>conftest.$ac_ext <<_ACEOF
29873 /* end confdefs.h.  */
29874 $ac_includes_default
29875 #include <$ac_header>
29876 _ACEOF
29877 rm -f conftest.$ac_objext
29878 if { (ac_try="$ac_compile"
29879 case "(($ac_try" in
29880   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29881   *) ac_try_echo=$ac_try;;
29882 esac
29883 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29884   (eval "$ac_compile") 2>conftest.er1
29885   ac_status=$?
29886   grep -v '^ *+' conftest.er1 >conftest.err
29887   rm -f conftest.er1
29888   cat conftest.err >&5
29889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29890   (exit $ac_status); } && {
29891          test -z "$ac_c_werror_flag" ||
29892          test ! -s conftest.err
29893        } && test -s conftest.$ac_objext; then
29894   ac_header_compiler=yes
29895 else
29896   echo "$as_me: failed program was:" >&5
29897 sed 's/^/| /' conftest.$ac_ext >&5
29898
29899         ac_header_compiler=no
29900 fi
29901
29902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29903 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29904 echo "${ECHO_T}$ac_header_compiler" >&6; }
29905
29906 # Is the header present?
29907 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
29908 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
29909 cat >conftest.$ac_ext <<_ACEOF
29910 /* confdefs.h.  */
29911 _ACEOF
29912 cat confdefs.h >>conftest.$ac_ext
29913 cat >>conftest.$ac_ext <<_ACEOF
29914 /* end confdefs.h.  */
29915 #include <$ac_header>
29916 _ACEOF
29917 if { (ac_try="$ac_cpp conftest.$ac_ext"
29918 case "(($ac_try" in
29919   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29920   *) ac_try_echo=$ac_try;;
29921 esac
29922 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29923   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29924   ac_status=$?
29925   grep -v '^ *+' conftest.er1 >conftest.err
29926   rm -f conftest.er1
29927   cat conftest.err >&5
29928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
29929   (exit $ac_status); } >/dev/null && {
29930          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29931          test ! -s conftest.err
29932        }; then
29933   ac_header_preproc=yes
29934 else
29935   echo "$as_me: failed program was:" >&5
29936 sed 's/^/| /' conftest.$ac_ext >&5
29937
29938   ac_header_preproc=no
29939 fi
29940
29941 rm -f conftest.err conftest.$ac_ext
29942 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29943 echo "${ECHO_T}$ac_header_preproc" >&6; }
29944
29945 # So?  What about this header?
29946 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29947   yes:no: )
29948     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
29949 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
29950     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
29951 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
29952     ac_header_preproc=yes
29953     ;;
29954   no:yes:* )
29955     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
29956 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
29957     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
29958 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
29959     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
29960 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
29961     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
29962 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
29963     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
29964 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
29965     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
29966 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
29967     ( cat <<\_ASBOX
29968 ## --------------------------------------------- ##
29969 ## Report this to <http://www.openldap.org/its/> ##
29970 ## --------------------------------------------- ##
29971 _ASBOX
29972      ) | sed "s/^/$as_me: WARNING:     /" >&2
29973     ;;
29974 esac
29975 { echo "$as_me:$LINENO: checking for $ac_header" >&5
29976 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29977 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29978   echo $ECHO_N "(cached) $ECHO_C" >&6
29979 else
29980   eval "$as_ac_Header=\$ac_header_preproc"
29981 fi
29982 ac_res=`eval echo '${'$as_ac_Header'}'`
29983                { echo "$as_me:$LINENO: result: $ac_res" >&5
29984 echo "${ECHO_T}$ac_res" >&6; }
29985
29986 fi
29987 if test `eval echo '${'$as_ac_Header'}'` = yes; then
29988   cat >>confdefs.h <<_ACEOF
29989 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
29990 _ACEOF
29991
29992 else
29993
29994                 { { echo "$as_me:$LINENO: error: could not locate SQL headers" >&5
29995 echo "$as_me: error: could not locate SQL headers" >&2;}
29996    { (exit 1); exit 1; }; }
29997
29998 fi
29999
30000 done
30001
30002
30003         sql_LIBS="$LIBS"
30004         LIBS="$LTHREAD_LIBS"
30005
30006         if test $ol_with_odbc = auto ; then
30007                 ol_with_odbc="iodbc unixodbc odbc32"
30008         fi
30009
30010         for odbc in $ol_with_odbc ; do
30011                 if test $ol_link_sql = no ; then
30012                         case $odbc in
30013                         iodbc)
30014                                 { echo "$as_me:$LINENO: checking for SQLDriverConnect in -liodbc" >&5
30015 echo $ECHO_N "checking for SQLDriverConnect in -liodbc... $ECHO_C" >&6; }
30016 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then
30017   echo $ECHO_N "(cached) $ECHO_C" >&6
30018 else
30019   ac_check_lib_save_LIBS=$LIBS
30020 LIBS="-liodbc  $LIBS"
30021 cat >conftest.$ac_ext <<_ACEOF
30022 /* confdefs.h.  */
30023 _ACEOF
30024 cat confdefs.h >>conftest.$ac_ext
30025 cat >>conftest.$ac_ext <<_ACEOF
30026 /* end confdefs.h.  */
30027
30028 /* Override any GCC internal prototype to avoid an error.
30029    Use char because int might match the return type of a GCC
30030    builtin and then its argument prototype would still apply.  */
30031 #ifdef __cplusplus
30032 extern "C"
30033 #endif
30034 char SQLDriverConnect ();
30035 int
30036 main ()
30037 {
30038 return SQLDriverConnect ();
30039   ;
30040   return 0;
30041 }
30042 _ACEOF
30043 rm -f conftest.$ac_objext conftest$ac_exeext
30044 if { (ac_try="$ac_link"
30045 case "(($ac_try" in
30046   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30047   *) ac_try_echo=$ac_try;;
30048 esac
30049 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30050   (eval "$ac_link") 2>conftest.er1
30051   ac_status=$?
30052   grep -v '^ *+' conftest.er1 >conftest.err
30053   rm -f conftest.er1
30054   cat conftest.err >&5
30055   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30056   (exit $ac_status); } && {
30057          test -z "$ac_c_werror_flag" ||
30058          test ! -s conftest.err
30059        } && test -s conftest$ac_exeext &&
30060        $as_test_x conftest$ac_exeext; then
30061   ac_cv_lib_iodbc_SQLDriverConnect=yes
30062 else
30063   echo "$as_me: failed program was:" >&5
30064 sed 's/^/| /' conftest.$ac_ext >&5
30065
30066         ac_cv_lib_iodbc_SQLDriverConnect=no
30067 fi
30068
30069 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30070       conftest$ac_exeext conftest.$ac_ext
30071 LIBS=$ac_check_lib_save_LIBS
30072 fi
30073 { echo "$as_me:$LINENO: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
30074 echo "${ECHO_T}$ac_cv_lib_iodbc_SQLDriverConnect" >&6; }
30075 if test $ac_cv_lib_iodbc_SQLDriverConnect = yes; then
30076   have_iodbc=yes
30077 else
30078   have_iodbc=no
30079 fi
30080
30081                                 if test $have_iodbc = yes ; then
30082                                         ol_link_sql="-liodbc"
30083                                 fi
30084                                 ;;
30085
30086                         unixodbc)
30087                                 { echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc" >&5
30088 echo $ECHO_N "checking for SQLDriverConnect in -lodbc... $ECHO_C" >&6; }
30089 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then
30090   echo $ECHO_N "(cached) $ECHO_C" >&6
30091 else
30092   ac_check_lib_save_LIBS=$LIBS
30093 LIBS="-lodbc  $LIBS"
30094 cat >conftest.$ac_ext <<_ACEOF
30095 /* confdefs.h.  */
30096 _ACEOF
30097 cat confdefs.h >>conftest.$ac_ext
30098 cat >>conftest.$ac_ext <<_ACEOF
30099 /* end confdefs.h.  */
30100
30101 /* Override any GCC internal prototype to avoid an error.
30102    Use char because int might match the return type of a GCC
30103    builtin and then its argument prototype would still apply.  */
30104 #ifdef __cplusplus
30105 extern "C"
30106 #endif
30107 char SQLDriverConnect ();
30108 int
30109 main ()
30110 {
30111 return SQLDriverConnect ();
30112   ;
30113   return 0;
30114 }
30115 _ACEOF
30116 rm -f conftest.$ac_objext conftest$ac_exeext
30117 if { (ac_try="$ac_link"
30118 case "(($ac_try" in
30119   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30120   *) ac_try_echo=$ac_try;;
30121 esac
30122 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30123   (eval "$ac_link") 2>conftest.er1
30124   ac_status=$?
30125   grep -v '^ *+' conftest.er1 >conftest.err
30126   rm -f conftest.er1
30127   cat conftest.err >&5
30128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30129   (exit $ac_status); } && {
30130          test -z "$ac_c_werror_flag" ||
30131          test ! -s conftest.err
30132        } && test -s conftest$ac_exeext &&
30133        $as_test_x conftest$ac_exeext; then
30134   ac_cv_lib_odbc_SQLDriverConnect=yes
30135 else
30136   echo "$as_me: failed program was:" >&5
30137 sed 's/^/| /' conftest.$ac_ext >&5
30138
30139         ac_cv_lib_odbc_SQLDriverConnect=no
30140 fi
30141
30142 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30143       conftest$ac_exeext conftest.$ac_ext
30144 LIBS=$ac_check_lib_save_LIBS
30145 fi
30146 { echo "$as_me:$LINENO: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
30147 echo "${ECHO_T}$ac_cv_lib_odbc_SQLDriverConnect" >&6; }
30148 if test $ac_cv_lib_odbc_SQLDriverConnect = yes; then
30149   have_odbc=yes
30150 else
30151   have_odbc=no
30152 fi
30153
30154                                 if test $have_odbc = yes ; then
30155                                         ol_link_sql="-lodbc"
30156                                 fi
30157                                 ;;
30158
30159                         odbc32)
30160                                 { echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc32" >&5
30161 echo $ECHO_N "checking for SQLDriverConnect in -lodbc32... $ECHO_C" >&6; }
30162 if test "${ac_cv_lib_odbc32_SQLDriverConnect+set}" = set; then
30163   echo $ECHO_N "(cached) $ECHO_C" >&6
30164 else
30165   ac_check_lib_save_LIBS=$LIBS
30166 LIBS="-lodbc32  $LIBS"
30167 cat >conftest.$ac_ext <<_ACEOF
30168 /* confdefs.h.  */
30169 _ACEOF
30170 cat confdefs.h >>conftest.$ac_ext
30171 cat >>conftest.$ac_ext <<_ACEOF
30172 /* end confdefs.h.  */
30173
30174 /* Override any GCC internal prototype to avoid an error.
30175    Use char because int might match the return type of a GCC
30176    builtin and then its argument prototype would still apply.  */
30177 #ifdef __cplusplus
30178 extern "C"
30179 #endif
30180 char SQLDriverConnect ();
30181 int
30182 main ()
30183 {
30184 return SQLDriverConnect ();
30185   ;
30186   return 0;
30187 }
30188 _ACEOF
30189 rm -f conftest.$ac_objext conftest$ac_exeext
30190 if { (ac_try="$ac_link"
30191 case "(($ac_try" in
30192   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30193   *) ac_try_echo=$ac_try;;
30194 esac
30195 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30196   (eval "$ac_link") 2>conftest.er1
30197   ac_status=$?
30198   grep -v '^ *+' conftest.er1 >conftest.err
30199   rm -f conftest.er1
30200   cat conftest.err >&5
30201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30202   (exit $ac_status); } && {
30203          test -z "$ac_c_werror_flag" ||
30204          test ! -s conftest.err
30205        } && test -s conftest$ac_exeext &&
30206        $as_test_x conftest$ac_exeext; then
30207   ac_cv_lib_odbc32_SQLDriverConnect=yes
30208 else
30209   echo "$as_me: failed program was:" >&5
30210 sed 's/^/| /' conftest.$ac_ext >&5
30211
30212         ac_cv_lib_odbc32_SQLDriverConnect=no
30213 fi
30214
30215 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30216       conftest$ac_exeext conftest.$ac_ext
30217 LIBS=$ac_check_lib_save_LIBS
30218 fi
30219 { echo "$as_me:$LINENO: result: $ac_cv_lib_odbc32_SQLDriverConnect" >&5
30220 echo "${ECHO_T}$ac_cv_lib_odbc32_SQLDriverConnect" >&6; }
30221 if test $ac_cv_lib_odbc32_SQLDriverConnect = yes; then
30222   have_odbc32=yes
30223 else
30224   have_odbc32=no
30225 fi
30226
30227                                 if test $have_odbc32 = yes ; then
30228                                         ol_link_sql="-lodbc32"
30229                                 fi
30230                                 ;;
30231
30232                         *)
30233                                 { { echo "$as_me:$LINENO: error: unknown ODBC library" >&5
30234 echo "$as_me: error: unknown ODBC library" >&2;}
30235    { (exit 1); exit 1; }; }
30236                                 ;;
30237                         esac
30238                 fi
30239         done
30240
30241         LIBS="$sql_LIBS"
30242
30243         if test $ol_link_sql != no ; then
30244                 SLAPD_SQL_LIBS="$ol_link_sql"
30245
30246         elif test $ol_enable_sql != auto ; then
30247                 { { echo "$as_me:$LINENO: error: could not locate suitable ODBC library" >&5
30248 echo "$as_me: error: could not locate suitable ODBC library" >&2;}
30249    { (exit 1); exit 1; }; }
30250         fi
30251 fi
30252
30253 ol_link_ndb=no
30254 if test $ol_enable_ndb != no ; then
30255         # Extract the first word of "mysql_config", so it can be a program name with args.
30256 set dummy mysql_config; ac_word=$2
30257 { echo "$as_me:$LINENO: checking for $ac_word" >&5
30258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
30259 if test "${ac_cv_prog_MYSQL+set}" = set; then
30260   echo $ECHO_N "(cached) $ECHO_C" >&6
30261 else
30262   if test -n "$MYSQL"; then
30263   ac_cv_prog_MYSQL="$MYSQL" # Let the user override the test.
30264 else
30265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30266 for as_dir in $PATH
30267 do
30268   IFS=$as_save_IFS
30269   test -z "$as_dir" && as_dir=.
30270   for ac_exec_ext in '' $ac_executable_extensions; do
30271   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
30272     ac_cv_prog_MYSQL="yes"
30273     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
30274     break 2
30275   fi
30276 done
30277 done
30278 IFS=$as_save_IFS
30279
30280 fi
30281 fi
30282 MYSQL=$ac_cv_prog_MYSQL
30283 if test -n "$MYSQL"; then
30284   { echo "$as_me:$LINENO: result: $MYSQL" >&5
30285 echo "${ECHO_T}$MYSQL" >&6; }
30286 else
30287   { echo "$as_me:$LINENO: result: no" >&5
30288 echo "${ECHO_T}no" >&6; }
30289 fi
30290
30291
30292         if test "$MYSQL" != yes ; then
30293                 { { echo "$as_me:$LINENO: error: could not locate mysql_config" >&5
30294 echo "$as_me: error: could not locate mysql_config" >&2;}
30295    { (exit 1); exit 1; }; }
30296         fi
30297
30298         SQL_INC=`mysql_config --include`
30299         SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi"
30300
30301         save_CPPFLAGS="$CPPFLAGS"
30302         CPPFLAGS="$SLAPD_NDB_INCS"
30303         { echo "$as_me:$LINENO: checking for NdbApi.hpp" >&5
30304 echo $ECHO_N "checking for NdbApi.hpp... $ECHO_C" >&6; }
30305         cat >conftest.$ac_ext <<_ACEOF
30306 /* confdefs.h.  */
30307 _ACEOF
30308 cat confdefs.h >>conftest.$ac_ext
30309 cat >>conftest.$ac_ext <<_ACEOF
30310 /* end confdefs.h.  */
30311 #include <NdbApi.hpp>
30312 _ACEOF
30313 if { (ac_try="$ac_cpp conftest.$ac_ext"
30314 case "(($ac_try" in
30315   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30316   *) ac_try_echo=$ac_try;;
30317 esac
30318 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30319   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
30320   ac_status=$?
30321   grep -v '^ *+' conftest.er1 >conftest.err
30322   rm -f conftest.er1
30323   cat conftest.err >&5
30324   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30325   (exit $ac_status); } >/dev/null && {
30326          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
30327          test ! -s conftest.err
30328        }; then
30329   { echo "$as_me:$LINENO: result: yes" >&5
30330 echo "${ECHO_T}yes" >&6; }
30331 else
30332   echo "$as_me: failed program was:" >&5
30333 sed 's/^/| /' conftest.$ac_ext >&5
30334
30335   { { echo "$as_me:$LINENO: error: could not locate NdbApi headers" >&5
30336 echo "$as_me: error: could not locate NdbApi headers" >&2;}
30337    { (exit 1); exit 1; }; }
30338
30339 fi
30340
30341 rm -f conftest.err conftest.$ac_ext
30342         CPPFLAGS="$save_CPPFLAGS"
30343
30344         SQL_LIB=`mysql_config --libs_r`
30345         SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++"
30346
30347         save_LDFLAGS="$LDFLAGS"
30348         save_LIBS="$LIBS"
30349         LDFLAGS="$SQL_LIB"
30350         { echo "$as_me:$LINENO: checking for ndb_init in -lndbclient" >&5
30351 echo $ECHO_N "checking for ndb_init in -lndbclient... $ECHO_C" >&6; }
30352 if test "${ac_cv_lib_ndbclient_ndb_init+set}" = set; then
30353   echo $ECHO_N "(cached) $ECHO_C" >&6
30354 else
30355   ac_check_lib_save_LIBS=$LIBS
30356 LIBS="-lndbclient -lstdc++ $LIBS"
30357 cat >conftest.$ac_ext <<_ACEOF
30358 /* confdefs.h.  */
30359 _ACEOF
30360 cat confdefs.h >>conftest.$ac_ext
30361 cat >>conftest.$ac_ext <<_ACEOF
30362 /* end confdefs.h.  */
30363
30364 /* Override any GCC internal prototype to avoid an error.
30365    Use char because int might match the return type of a GCC
30366    builtin and then its argument prototype would still apply.  */
30367 #ifdef __cplusplus
30368 extern "C"
30369 #endif
30370 char ndb_init ();
30371 int
30372 main ()
30373 {
30374 return ndb_init ();
30375   ;
30376   return 0;
30377 }
30378 _ACEOF
30379 rm -f conftest.$ac_objext conftest$ac_exeext
30380 if { (ac_try="$ac_link"
30381 case "(($ac_try" in
30382   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30383   *) ac_try_echo=$ac_try;;
30384 esac
30385 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30386   (eval "$ac_link") 2>conftest.er1
30387   ac_status=$?
30388   grep -v '^ *+' conftest.er1 >conftest.err
30389   rm -f conftest.er1
30390   cat conftest.err >&5
30391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30392   (exit $ac_status); } && {
30393          test -z "$ac_c_werror_flag" ||
30394          test ! -s conftest.err
30395        } && test -s conftest$ac_exeext &&
30396        $as_test_x conftest$ac_exeext; then
30397   ac_cv_lib_ndbclient_ndb_init=yes
30398 else
30399   echo "$as_me: failed program was:" >&5
30400 sed 's/^/| /' conftest.$ac_ext >&5
30401
30402         ac_cv_lib_ndbclient_ndb_init=no
30403 fi
30404
30405 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30406       conftest$ac_exeext conftest.$ac_ext
30407 LIBS=$ac_check_lib_save_LIBS
30408 fi
30409 { echo "$as_me:$LINENO: result: $ac_cv_lib_ndbclient_ndb_init" >&5
30410 echo "${ECHO_T}$ac_cv_lib_ndbclient_ndb_init" >&6; }
30411 if test $ac_cv_lib_ndbclient_ndb_init = yes; then
30412   : ok
30413 else
30414
30415                 { { echo "$as_me:$LINENO: error: could not locate ndbclient library" >&5
30416 echo "$as_me: error: could not locate ndbclient library" >&2;}
30417    { (exit 1); exit 1; }; }
30418
30419 fi
30420
30421         LIBS="$save_LIBS"
30422         LDFLAGS="$save_LDFLAGS"
30423
30424         if test "$ol_enable_ndb" = yes ; then
30425                 SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
30426         fi
30427 fi
30428
30429 ol_icu=no
30430
30431 for ac_header in unicode/utypes.h
30432 do
30433 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
30434 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
30435   { echo "$as_me:$LINENO: checking for $ac_header" >&5
30436 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
30437 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
30438   echo $ECHO_N "(cached) $ECHO_C" >&6
30439 fi
30440 ac_res=`eval echo '${'$as_ac_Header'}'`
30441                { echo "$as_me:$LINENO: result: $ac_res" >&5
30442 echo "${ECHO_T}$ac_res" >&6; }
30443 else
30444   # Is the header compilable?
30445 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
30446 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
30447 cat >conftest.$ac_ext <<_ACEOF
30448 /* confdefs.h.  */
30449 _ACEOF
30450 cat confdefs.h >>conftest.$ac_ext
30451 cat >>conftest.$ac_ext <<_ACEOF
30452 /* end confdefs.h.  */
30453 $ac_includes_default
30454 #include <$ac_header>
30455 _ACEOF
30456 rm -f conftest.$ac_objext
30457 if { (ac_try="$ac_compile"
30458 case "(($ac_try" in
30459   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30460   *) ac_try_echo=$ac_try;;
30461 esac
30462 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30463   (eval "$ac_compile") 2>conftest.er1
30464   ac_status=$?
30465   grep -v '^ *+' conftest.er1 >conftest.err
30466   rm -f conftest.er1
30467   cat conftest.err >&5
30468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30469   (exit $ac_status); } && {
30470          test -z "$ac_c_werror_flag" ||
30471          test ! -s conftest.err
30472        } && test -s conftest.$ac_objext; then
30473   ac_header_compiler=yes
30474 else
30475   echo "$as_me: failed program was:" >&5
30476 sed 's/^/| /' conftest.$ac_ext >&5
30477
30478         ac_header_compiler=no
30479 fi
30480
30481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30482 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
30483 echo "${ECHO_T}$ac_header_compiler" >&6; }
30484
30485 # Is the header present?
30486 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
30487 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
30488 cat >conftest.$ac_ext <<_ACEOF
30489 /* confdefs.h.  */
30490 _ACEOF
30491 cat confdefs.h >>conftest.$ac_ext
30492 cat >>conftest.$ac_ext <<_ACEOF
30493 /* end confdefs.h.  */
30494 #include <$ac_header>
30495 _ACEOF
30496 if { (ac_try="$ac_cpp conftest.$ac_ext"
30497 case "(($ac_try" in
30498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30499   *) ac_try_echo=$ac_try;;
30500 esac
30501 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30502   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
30503   ac_status=$?
30504   grep -v '^ *+' conftest.er1 >conftest.err
30505   rm -f conftest.er1
30506   cat conftest.err >&5
30507   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30508   (exit $ac_status); } >/dev/null && {
30509          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
30510          test ! -s conftest.err
30511        }; then
30512   ac_header_preproc=yes
30513 else
30514   echo "$as_me: failed program was:" >&5
30515 sed 's/^/| /' conftest.$ac_ext >&5
30516
30517   ac_header_preproc=no
30518 fi
30519
30520 rm -f conftest.err conftest.$ac_ext
30521 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
30522 echo "${ECHO_T}$ac_header_preproc" >&6; }
30523
30524 # So?  What about this header?
30525 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
30526   yes:no: )
30527     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
30528 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
30529     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
30530 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
30531     ac_header_preproc=yes
30532     ;;
30533   no:yes:* )
30534     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
30535 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
30536     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
30537 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
30538     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
30539 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
30540     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
30541 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
30542     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
30543 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
30544     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
30545 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
30546     ( cat <<\_ASBOX
30547 ## --------------------------------------------- ##
30548 ## Report this to <http://www.openldap.org/its/> ##
30549 ## --------------------------------------------- ##
30550 _ASBOX
30551      ) | sed "s/^/$as_me: WARNING:     /" >&2
30552     ;;
30553 esac
30554 { echo "$as_me:$LINENO: checking for $ac_header" >&5
30555 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
30556 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
30557   echo $ECHO_N "(cached) $ECHO_C" >&6
30558 else
30559   eval "$as_ac_Header=\$ac_header_preproc"
30560 fi
30561 ac_res=`eval echo '${'$as_ac_Header'}'`
30562                { echo "$as_me:$LINENO: result: $ac_res" >&5
30563 echo "${ECHO_T}$ac_res" >&6; }
30564
30565 fi
30566 if test `eval echo '${'$as_ac_Header'}'` = yes; then
30567   cat >>confdefs.h <<_ACEOF
30568 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
30569 _ACEOF
30570
30571 fi
30572
30573 done
30574
30575 if test $ac_cv_header_unicode_utypes_h = yes ; then
30576                 OL_ICULIBS="-licuuc -licudata"
30577
30578         { echo "$as_me:$LINENO: checking for ICU libraries" >&5
30579 echo $ECHO_N "checking for ICU libraries... $ECHO_C" >&6; }
30580 if test "${ol_cv_lib_icu+set}" = set; then
30581   echo $ECHO_N "(cached) $ECHO_C" >&6
30582 else
30583
30584                 ol_LIBS="$LIBS"
30585                 LIBS="$OL_ICULIBS $LIBS"
30586                 cat >conftest.$ac_ext <<_ACEOF
30587 /* confdefs.h.  */
30588 _ACEOF
30589 cat confdefs.h >>conftest.$ac_ext
30590 cat >>conftest.$ac_ext <<_ACEOF
30591 /* end confdefs.h.  */
30592
30593 #include <unicode/utypes.h>
30594
30595 int
30596 main ()
30597 {
30598
30599 (void) u_errorName(0);
30600
30601   ;
30602   return 0;
30603 }
30604 _ACEOF
30605 rm -f conftest.$ac_objext conftest$ac_exeext
30606 if { (ac_try="$ac_link"
30607 case "(($ac_try" in
30608   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30609   *) ac_try_echo=$ac_try;;
30610 esac
30611 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30612   (eval "$ac_link") 2>conftest.er1
30613   ac_status=$?
30614   grep -v '^ *+' conftest.er1 >conftest.err
30615   rm -f conftest.er1
30616   cat conftest.err >&5
30617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30618   (exit $ac_status); } && {
30619          test -z "$ac_c_werror_flag" ||
30620          test ! -s conftest.err
30621        } && test -s conftest$ac_exeext &&
30622        $as_test_x conftest$ac_exeext; then
30623   ol_cv_lib_icu=yes
30624 else
30625   echo "$as_me: failed program was:" >&5
30626 sed 's/^/| /' conftest.$ac_ext >&5
30627
30628         ol_cv_lib_icu=no
30629 fi
30630
30631 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30632       conftest$ac_exeext conftest.$ac_ext
30633                 LIBS="$ol_LIBS"
30634
30635 fi
30636 { echo "$as_me:$LINENO: result: $ol_cv_lib_icu" >&5
30637 echo "${ECHO_T}$ol_cv_lib_icu" >&6; }
30638
30639         if test $ol_cv_lib_icu != no ; then
30640                 ol_icu="$OL_ICULIBS"
30641
30642 cat >>confdefs.h <<\_ACEOF
30643 #define HAVE_ICU 1
30644 _ACEOF
30645
30646         fi
30647 fi
30648
30649 if test "$ol_icu" = no ; then
30650         { echo "$as_me:$LINENO: WARNING: ICU not available" >&5
30651 echo "$as_me: WARNING: ICU not available" >&2;}
30652 else
30653         ICU_LIBS="$ol_icu"
30654 fi
30655 WITH_SASL=no
30656 ol_link_sasl=no
30657 ol_link_spasswd=no
30658 if test $ol_with_cyrus_sasl != no ; then
30659
30660
30661 for ac_header in sasl/sasl.h sasl.h
30662 do
30663 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
30664 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
30665   { echo "$as_me:$LINENO: checking for $ac_header" >&5
30666 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
30667 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
30668   echo $ECHO_N "(cached) $ECHO_C" >&6
30669 fi
30670 ac_res=`eval echo '${'$as_ac_Header'}'`
30671                { echo "$as_me:$LINENO: result: $ac_res" >&5
30672 echo "${ECHO_T}$ac_res" >&6; }
30673 else
30674   # Is the header compilable?
30675 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
30676 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
30677 cat >conftest.$ac_ext <<_ACEOF
30678 /* confdefs.h.  */
30679 _ACEOF
30680 cat confdefs.h >>conftest.$ac_ext
30681 cat >>conftest.$ac_ext <<_ACEOF
30682 /* end confdefs.h.  */
30683 $ac_includes_default
30684 #include <$ac_header>
30685 _ACEOF
30686 rm -f conftest.$ac_objext
30687 if { (ac_try="$ac_compile"
30688 case "(($ac_try" in
30689   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30690   *) ac_try_echo=$ac_try;;
30691 esac
30692 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30693   (eval "$ac_compile") 2>conftest.er1
30694   ac_status=$?
30695   grep -v '^ *+' conftest.er1 >conftest.err
30696   rm -f conftest.er1
30697   cat conftest.err >&5
30698   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30699   (exit $ac_status); } && {
30700          test -z "$ac_c_werror_flag" ||
30701          test ! -s conftest.err
30702        } && test -s conftest.$ac_objext; then
30703   ac_header_compiler=yes
30704 else
30705   echo "$as_me: failed program was:" >&5
30706 sed 's/^/| /' conftest.$ac_ext >&5
30707
30708         ac_header_compiler=no
30709 fi
30710
30711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30712 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
30713 echo "${ECHO_T}$ac_header_compiler" >&6; }
30714
30715 # Is the header present?
30716 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
30717 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
30718 cat >conftest.$ac_ext <<_ACEOF
30719 /* confdefs.h.  */
30720 _ACEOF
30721 cat confdefs.h >>conftest.$ac_ext
30722 cat >>conftest.$ac_ext <<_ACEOF
30723 /* end confdefs.h.  */
30724 #include <$ac_header>
30725 _ACEOF
30726 if { (ac_try="$ac_cpp conftest.$ac_ext"
30727 case "(($ac_try" in
30728   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30729   *) ac_try_echo=$ac_try;;
30730 esac
30731 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30732   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
30733   ac_status=$?
30734   grep -v '^ *+' conftest.er1 >conftest.err
30735   rm -f conftest.er1
30736   cat conftest.err >&5
30737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30738   (exit $ac_status); } >/dev/null && {
30739          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
30740          test ! -s conftest.err
30741        }; then
30742   ac_header_preproc=yes
30743 else
30744   echo "$as_me: failed program was:" >&5
30745 sed 's/^/| /' conftest.$ac_ext >&5
30746
30747   ac_header_preproc=no
30748 fi
30749
30750 rm -f conftest.err conftest.$ac_ext
30751 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
30752 echo "${ECHO_T}$ac_header_preproc" >&6; }
30753
30754 # So?  What about this header?
30755 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
30756   yes:no: )
30757     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
30758 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
30759     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
30760 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
30761     ac_header_preproc=yes
30762     ;;
30763   no:yes:* )
30764     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
30765 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
30766     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
30767 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
30768     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
30769 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
30770     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
30771 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
30772     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
30773 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
30774     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
30775 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
30776     ( cat <<\_ASBOX
30777 ## --------------------------------------------- ##
30778 ## Report this to <http://www.openldap.org/its/> ##
30779 ## --------------------------------------------- ##
30780 _ASBOX
30781      ) | sed "s/^/$as_me: WARNING:     /" >&2
30782     ;;
30783 esac
30784 { echo "$as_me:$LINENO: checking for $ac_header" >&5
30785 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
30786 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
30787   echo $ECHO_N "(cached) $ECHO_C" >&6
30788 else
30789   eval "$as_ac_Header=\$ac_header_preproc"
30790 fi
30791 ac_res=`eval echo '${'$as_ac_Header'}'`
30792                { echo "$as_me:$LINENO: result: $ac_res" >&5
30793 echo "${ECHO_T}$ac_res" >&6; }
30794
30795 fi
30796 if test `eval echo '${'$as_ac_Header'}'` = yes; then
30797   cat >>confdefs.h <<_ACEOF
30798 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
30799 _ACEOF
30800
30801 fi
30802
30803 done
30804
30805
30806         if test $ac_cv_header_sasl_sasl_h = yes ||
30807            test $ac_cv_header_sasl_h = yes; then
30808                 { echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl2" >&5
30809 echo $ECHO_N "checking for sasl_client_init in -lsasl2... $ECHO_C" >&6; }
30810 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then
30811   echo $ECHO_N "(cached) $ECHO_C" >&6
30812 else
30813   ac_check_lib_save_LIBS=$LIBS
30814 LIBS="-lsasl2  $LIBS"
30815 cat >conftest.$ac_ext <<_ACEOF
30816 /* confdefs.h.  */
30817 _ACEOF
30818 cat confdefs.h >>conftest.$ac_ext
30819 cat >>conftest.$ac_ext <<_ACEOF
30820 /* end confdefs.h.  */
30821
30822 /* Override any GCC internal prototype to avoid an error.
30823    Use char because int might match the return type of a GCC
30824    builtin and then its argument prototype would still apply.  */
30825 #ifdef __cplusplus
30826 extern "C"
30827 #endif
30828 char sasl_client_init ();
30829 int
30830 main ()
30831 {
30832 return sasl_client_init ();
30833   ;
30834   return 0;
30835 }
30836 _ACEOF
30837 rm -f conftest.$ac_objext conftest$ac_exeext
30838 if { (ac_try="$ac_link"
30839 case "(($ac_try" in
30840   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30841   *) ac_try_echo=$ac_try;;
30842 esac
30843 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30844   (eval "$ac_link") 2>conftest.er1
30845   ac_status=$?
30846   grep -v '^ *+' conftest.er1 >conftest.err
30847   rm -f conftest.er1
30848   cat conftest.err >&5
30849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30850   (exit $ac_status); } && {
30851          test -z "$ac_c_werror_flag" ||
30852          test ! -s conftest.err
30853        } && test -s conftest$ac_exeext &&
30854        $as_test_x conftest$ac_exeext; then
30855   ac_cv_lib_sasl2_sasl_client_init=yes
30856 else
30857   echo "$as_me: failed program was:" >&5
30858 sed 's/^/| /' conftest.$ac_ext >&5
30859
30860         ac_cv_lib_sasl2_sasl_client_init=no
30861 fi
30862
30863 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30864       conftest$ac_exeext conftest.$ac_ext
30865 LIBS=$ac_check_lib_save_LIBS
30866 fi
30867 { echo "$as_me:$LINENO: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
30868 echo "${ECHO_T}$ac_cv_lib_sasl2_sasl_client_init" >&6; }
30869 if test $ac_cv_lib_sasl2_sasl_client_init = yes; then
30870   ol_link_sasl="-lsasl2"
30871 else
30872   { echo "$as_me:$LINENO: checking for sasl_client_init in -lsasl" >&5
30873 echo $ECHO_N "checking for sasl_client_init in -lsasl... $ECHO_C" >&6; }
30874 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then
30875   echo $ECHO_N "(cached) $ECHO_C" >&6
30876 else
30877   ac_check_lib_save_LIBS=$LIBS
30878 LIBS="-lsasl  $LIBS"
30879 cat >conftest.$ac_ext <<_ACEOF
30880 /* confdefs.h.  */
30881 _ACEOF
30882 cat confdefs.h >>conftest.$ac_ext
30883 cat >>conftest.$ac_ext <<_ACEOF
30884 /* end confdefs.h.  */
30885
30886 /* Override any GCC internal prototype to avoid an error.
30887    Use char because int might match the return type of a GCC
30888    builtin and then its argument prototype would still apply.  */
30889 #ifdef __cplusplus
30890 extern "C"
30891 #endif
30892 char sasl_client_init ();
30893 int
30894 main ()
30895 {
30896 return sasl_client_init ();
30897   ;
30898   return 0;
30899 }
30900 _ACEOF
30901 rm -f conftest.$ac_objext conftest$ac_exeext
30902 if { (ac_try="$ac_link"
30903 case "(($ac_try" in
30904   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30905   *) ac_try_echo=$ac_try;;
30906 esac
30907 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30908   (eval "$ac_link") 2>conftest.er1
30909   ac_status=$?
30910   grep -v '^ *+' conftest.er1 >conftest.err
30911   rm -f conftest.er1
30912   cat conftest.err >&5
30913   echo "$as_me:$LINENO: \$? = $ac_status" >&5
30914   (exit $ac_status); } && {
30915          test -z "$ac_c_werror_flag" ||
30916          test ! -s conftest.err
30917        } && test -s conftest$ac_exeext &&
30918        $as_test_x conftest$ac_exeext; then
30919   ac_cv_lib_sasl_sasl_client_init=yes
30920 else
30921   echo "$as_me: failed program was:" >&5
30922 sed 's/^/| /' conftest.$ac_ext >&5
30923
30924         ac_cv_lib_sasl_sasl_client_init=no
30925 fi
30926
30927 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
30928       conftest$ac_exeext conftest.$ac_ext
30929 LIBS=$ac_check_lib_save_LIBS
30930 fi
30931 { echo "$as_me:$LINENO: result: $ac_cv_lib_sasl_sasl_client_init" >&5
30932 echo "${ECHO_T}$ac_cv_lib_sasl_sasl_client_init" >&6; }
30933 if test $ac_cv_lib_sasl_sasl_client_init = yes; then
30934   ol_link_sasl="-lsasl"
30935 fi
30936
30937 fi
30938
30939         fi
30940
30941         if test $ol_link_sasl = no ; then
30942                 if test $ol_with_cyrus_sasl != auto ; then
30943                         { { echo "$as_me:$LINENO: error: Could not locate Cyrus SASL" >&5
30944 echo "$as_me: error: Could not locate Cyrus SASL" >&2;}
30945    { (exit 1); exit 1; }; }
30946                 else
30947                         { echo "$as_me:$LINENO: WARNING: Could not locate Cyrus SASL" >&5
30948 echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
30949                         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
30950 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
30951                         if test $ol_link_tls = no ; then
30952                                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
30953 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
30954                         fi
30955                 fi
30956         else
30957                 { echo "$as_me:$LINENO: checking Cyrus SASL library version" >&5
30958 echo $ECHO_N "checking Cyrus SASL library version... $ECHO_C" >&6; }
30959 if test "${ol_cv_sasl_compat+set}" = set; then
30960   echo $ECHO_N "(cached) $ECHO_C" >&6
30961 else
30962
30963         cat >conftest.$ac_ext <<_ACEOF
30964 /* confdefs.h.  */
30965 _ACEOF
30966 cat confdefs.h >>conftest.$ac_ext
30967 cat >>conftest.$ac_ext <<_ACEOF
30968 /* end confdefs.h.  */
30969
30970 #ifdef HAVE_SASL_SASL_H
30971 #include <sasl/sasl.h>
30972 #else
30973 #include <sasl.h>
30974 #endif
30975
30976 /* Require 2.1.15+ */
30977 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
30978         char *__sasl_compat = "2.2+ or better okay (we guess)";
30979 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
30980         && SASL_VERSION_STEP >=15
30981         char *__sasl_compat = "2.1.15+ or better okay";
30982 #endif
30983
30984 _ACEOF
30985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30986   $EGREP "__sasl_compat" >/dev/null 2>&1; then
30987   ol_cv_sasl_compat=yes
30988 else
30989   ol_cv_sasl_compat=no
30990 fi
30991 rm -f conftest*
30992
30993 fi
30994 { echo "$as_me:$LINENO: result: $ol_cv_sasl_compat" >&5
30995 echo "${ECHO_T}$ol_cv_sasl_compat" >&6; }
30996
30997                 if test $ol_cv_sasl_compat = no ; then
30998                         ol_link_sasl=no
30999                         { { echo "$as_me:$LINENO: error: Cyrus SASL library located but is incompatible" >&5
31000 echo "$as_me: error: Cyrus SASL library located but is incompatible" >&2;}
31001    { (exit 1); exit 1; }; }
31002                 fi
31003
31004
31005 cat >>confdefs.h <<\_ACEOF
31006 #define HAVE_CYRUS_SASL 1
31007 _ACEOF
31008
31009                 SASL_LIBS="$ol_link_sasl"
31010                 if test $ol_enable_spasswd != no ; then
31011                         ol_link_spasswd=yes
31012                 fi
31013
31014                 ac_save_LIBS="$LIBS"
31015                 LIBS="$LIBS $ol_link_sasl"
31016                 { echo "$as_me:$LINENO: checking for sasl_version" >&5
31017 echo $ECHO_N "checking for sasl_version... $ECHO_C" >&6; }
31018 if test "${ac_cv_func_sasl_version+set}" = set; then
31019   echo $ECHO_N "(cached) $ECHO_C" >&6
31020 else
31021   cat >conftest.$ac_ext <<_ACEOF
31022 /* confdefs.h.  */
31023 _ACEOF
31024 cat confdefs.h >>conftest.$ac_ext
31025 cat >>conftest.$ac_ext <<_ACEOF
31026 /* end confdefs.h.  */
31027 /* Define sasl_version to an innocuous variant, in case <limits.h> declares sasl_version.
31028    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
31029 #define sasl_version innocuous_sasl_version
31030
31031 /* System header to define __stub macros and hopefully few prototypes,
31032     which can conflict with char sasl_version (); below.
31033     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31034     <limits.h> exists even on freestanding compilers.  */
31035
31036 #ifdef __STDC__
31037 # include <limits.h>
31038 #else
31039 # include <assert.h>
31040 #endif
31041
31042 #undef sasl_version
31043
31044 /* Override any GCC internal prototype to avoid an error.
31045    Use char because int might match the return type of a GCC
31046    builtin and then its argument prototype would still apply.  */
31047 #ifdef __cplusplus
31048 extern "C"
31049 #endif
31050 char sasl_version ();
31051 /* The GNU C library defines this for functions which it implements
31052     to always fail with ENOSYS.  Some functions are actually named
31053     something starting with __ and the normal name is an alias.  */
31054 #if defined __stub_sasl_version || defined __stub___sasl_version
31055 choke me
31056 #endif
31057
31058 int
31059 main ()
31060 {
31061 return sasl_version ();
31062   ;
31063   return 0;
31064 }
31065 _ACEOF
31066 rm -f conftest.$ac_objext conftest$ac_exeext
31067 if { (ac_try="$ac_link"
31068 case "(($ac_try" in
31069   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31070   *) ac_try_echo=$ac_try;;
31071 esac
31072 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
31073   (eval "$ac_link") 2>conftest.er1
31074   ac_status=$?
31075   grep -v '^ *+' conftest.er1 >conftest.err
31076   rm -f conftest.er1
31077   cat conftest.err >&5
31078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31079   (exit $ac_status); } && {
31080          test -z "$ac_c_werror_flag" ||
31081          test ! -s conftest.err
31082        } && test -s conftest$ac_exeext &&
31083        $as_test_x conftest$ac_exeext; then
31084   ac_cv_func_sasl_version=yes
31085 else
31086   echo "$as_me: failed program was:" >&5
31087 sed 's/^/| /' conftest.$ac_ext >&5
31088
31089         ac_cv_func_sasl_version=no
31090 fi
31091
31092 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31093       conftest$ac_exeext conftest.$ac_ext
31094 fi
31095 { echo "$as_me:$LINENO: result: $ac_cv_func_sasl_version" >&5
31096 echo "${ECHO_T}$ac_cv_func_sasl_version" >&6; }
31097 if test $ac_cv_func_sasl_version = yes; then
31098
31099 cat >>confdefs.h <<\_ACEOF
31100 #define HAVE_SASL_VERSION 1
31101 _ACEOF
31102
31103 fi
31104
31105                 LIBS="$ac_save_LIBS"
31106
31107                 WITH_SASL=yes
31108         fi
31109
31110 else
31111         { echo "$as_me:$LINENO: WARNING: SASL authentication not supported!" >&5
31112 echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
31113         if test $ol_link_tls = no ; then
31114                 { echo "$as_me:$LINENO: WARNING: Strong authentication not supported!" >&5
31115 echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
31116         fi
31117 fi
31118
31119 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
31120         dev=no
31121         if test -r /dev/urandom ; then
31122                 dev="/dev/urandom";
31123         elif test -r /idev/urandom ; then
31124                 dev="/idev/urandom";
31125         elif test -r /dev/srandom ; then
31126                 dev="/dev/srandom";
31127         elif test -r /dev/random ; then
31128                 dev="/dev/random";
31129         elif test -r /idev/random ; then
31130                 dev="/idev/random";
31131         fi
31132
31133         if test $dev != no ; then
31134
31135 cat >>confdefs.h <<_ACEOF
31136 #define URANDOM_DEVICE "$dev"
31137 _ACEOF
31138
31139         fi
31140 fi
31141
31142 ol_link_fetch=no
31143 if test $ol_with_fetch != no ; then
31144         ol_LIBS=$LIBS
31145 LIBS="-lfetch -lcom_err $LIBS"
31146 { echo "$as_me:$LINENO: checking fetch(3) library" >&5
31147 echo $ECHO_N "checking fetch(3) library... $ECHO_C" >&6; }
31148 if test "${ol_cv_lib_fetch+set}" = set; then
31149   echo $ECHO_N "(cached) $ECHO_C" >&6
31150 else
31151
31152         cat >conftest.$ac_ext <<_ACEOF
31153 /* confdefs.h.  */
31154 _ACEOF
31155 cat confdefs.h >>conftest.$ac_ext
31156 cat >>conftest.$ac_ext <<_ACEOF
31157 /* end confdefs.h.  */
31158
31159 #include <sys/param.h>
31160 #include <stdio.h>
31161 #include <fetch.h>
31162 int
31163 main ()
31164 {
31165 struct url *u = fetchParseURL("file:///");
31166   ;
31167   return 0;
31168 }
31169 _ACEOF
31170 rm -f conftest.$ac_objext conftest$ac_exeext
31171 if { (ac_try="$ac_link"
31172 case "(($ac_try" in
31173   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31174   *) ac_try_echo=$ac_try;;
31175 esac
31176 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
31177   (eval "$ac_link") 2>conftest.er1
31178   ac_status=$?
31179   grep -v '^ *+' conftest.er1 >conftest.err
31180   rm -f conftest.er1
31181   cat conftest.err >&5
31182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31183   (exit $ac_status); } && {
31184          test -z "$ac_c_werror_flag" ||
31185          test ! -s conftest.err
31186        } && test -s conftest$ac_exeext &&
31187        $as_test_x conftest$ac_exeext; then
31188   ol_cv_lib_fetch=yes
31189 else
31190   echo "$as_me: failed program was:" >&5
31191 sed 's/^/| /' conftest.$ac_ext >&5
31192
31193         ol_cv_lib_fetch=no
31194 fi
31195
31196 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31197       conftest$ac_exeext conftest.$ac_ext
31198 fi
31199 { echo "$as_me:$LINENO: result: $ol_cv_lib_fetch" >&5
31200 echo "${ECHO_T}$ol_cv_lib_fetch" >&6; }
31201 LIBS=$ol_LIBS
31202 if test $ol_cv_lib_fetch != no ; then
31203         ol_link_fetch="-lfetch -lcom_err"
31204
31205 cat >>confdefs.h <<\_ACEOF
31206 #define HAVE_FETCH 1
31207 _ACEOF
31208
31209 fi
31210
31211
31212         if test $ol_cv_lib_fetch != no ; then
31213                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
31214                 ol_link_fetch=freebsd
31215
31216         elif test $ol_with_fetch != auto ; then
31217                 { { echo "$as_me:$LINENO: error: no suitable API for --with-fetch=$ol_with_fetch" >&5
31218 echo "$as_me: error: no suitable API for --with-fetch=$ol_with_fetch" >&2;}
31219    { (exit 1); exit 1; }; }
31220         fi
31221 fi
31222
31223 if test $ol_enable_crypt != no ; then
31224         save_LIBS="$LIBS"
31225         LIBS="$TLS_LIBS $LIBS"
31226
31227         { echo "$as_me:$LINENO: checking for crypt" >&5
31228 echo $ECHO_N "checking for crypt... $ECHO_C" >&6; }
31229 if test "${ac_cv_func_crypt+set}" = set; then
31230   echo $ECHO_N "(cached) $ECHO_C" >&6
31231 else
31232   cat >conftest.$ac_ext <<_ACEOF
31233 /* confdefs.h.  */
31234 _ACEOF
31235 cat confdefs.h >>conftest.$ac_ext
31236 cat >>conftest.$ac_ext <<_ACEOF
31237 /* end confdefs.h.  */
31238 /* Define crypt to an innocuous variant, in case <limits.h> declares crypt.
31239    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
31240 #define crypt innocuous_crypt
31241
31242 /* System header to define __stub macros and hopefully few prototypes,
31243     which can conflict with char crypt (); below.
31244     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31245     <limits.h> exists even on freestanding compilers.  */
31246
31247 #ifdef __STDC__
31248 # include <limits.h>
31249 #else
31250 # include <assert.h>
31251 #endif
31252
31253 #undef crypt
31254
31255 /* Override any GCC internal prototype to avoid an error.
31256    Use char because int might match the return type of a GCC
31257    builtin and then its argument prototype would still apply.  */
31258 #ifdef __cplusplus
31259 extern "C"
31260 #endif
31261 char crypt ();
31262 /* The GNU C library defines this for functions which it implements
31263     to always fail with ENOSYS.  Some functions are actually named
31264     something starting with __ and the normal name is an alias.  */
31265 #if defined __stub_crypt || defined __stub___crypt
31266 choke me
31267 #endif
31268
31269 int
31270 main ()
31271 {
31272 return crypt ();
31273   ;
31274   return 0;
31275 }
31276 _ACEOF
31277 rm -f conftest.$ac_objext conftest$ac_exeext
31278 if { (ac_try="$ac_link"
31279 case "(($ac_try" in
31280   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31281   *) ac_try_echo=$ac_try;;
31282 esac
31283 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
31284   (eval "$ac_link") 2>conftest.er1
31285   ac_status=$?
31286   grep -v '^ *+' conftest.er1 >conftest.err
31287   rm -f conftest.er1
31288   cat conftest.err >&5
31289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31290   (exit $ac_status); } && {
31291          test -z "$ac_c_werror_flag" ||
31292          test ! -s conftest.err
31293        } && test -s conftest$ac_exeext &&
31294        $as_test_x conftest$ac_exeext; then
31295   ac_cv_func_crypt=yes
31296 else
31297   echo "$as_me: failed program was:" >&5
31298 sed 's/^/| /' conftest.$ac_ext >&5
31299
31300         ac_cv_func_crypt=no
31301 fi
31302
31303 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31304       conftest$ac_exeext conftest.$ac_ext
31305 fi
31306 { echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
31307 echo "${ECHO_T}$ac_cv_func_crypt" >&6; }
31308 if test $ac_cv_func_crypt = yes; then
31309   have_crypt=yes
31310 else
31311
31312                 LIBS="$save_LIBS"
31313                 { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
31314 echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; }
31315 if test "${ac_cv_lib_crypt_crypt+set}" = set; then
31316   echo $ECHO_N "(cached) $ECHO_C" >&6
31317 else
31318   ac_check_lib_save_LIBS=$LIBS
31319 LIBS="-lcrypt  $LIBS"
31320 cat >conftest.$ac_ext <<_ACEOF
31321 /* confdefs.h.  */
31322 _ACEOF
31323 cat confdefs.h >>conftest.$ac_ext
31324 cat >>conftest.$ac_ext <<_ACEOF
31325 /* end confdefs.h.  */
31326
31327 /* Override any GCC internal prototype to avoid an error.
31328    Use char because int might match the return type of a GCC
31329    builtin and then its argument prototype would still apply.  */
31330 #ifdef __cplusplus
31331 extern "C"
31332 #endif
31333 char crypt ();
31334 int
31335 main ()
31336 {
31337 return crypt ();
31338   ;
31339   return 0;
31340 }
31341 _ACEOF
31342 rm -f conftest.$ac_objext conftest$ac_exeext
31343 if { (ac_try="$ac_link"
31344 case "(($ac_try" in
31345   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31346   *) ac_try_echo=$ac_try;;
31347 esac
31348 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
31349   (eval "$ac_link") 2>conftest.er1
31350   ac_status=$?
31351   grep -v '^ *+' conftest.er1 >conftest.err
31352   rm -f conftest.er1
31353   cat conftest.err >&5
31354   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31355   (exit $ac_status); } && {
31356          test -z "$ac_c_werror_flag" ||
31357          test ! -s conftest.err
31358        } && test -s conftest$ac_exeext &&
31359        $as_test_x conftest$ac_exeext; then
31360   ac_cv_lib_crypt_crypt=yes
31361 else
31362   echo "$as_me: failed program was:" >&5
31363 sed 's/^/| /' conftest.$ac_ext >&5
31364
31365         ac_cv_lib_crypt_crypt=no
31366 fi
31367
31368 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31369       conftest$ac_exeext conftest.$ac_ext
31370 LIBS=$ac_check_lib_save_LIBS
31371 fi
31372 { echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
31373 echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; }
31374 if test $ac_cv_lib_crypt_crypt = yes; then
31375   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
31376                         have_crypt=yes
31377 else
31378   have_crypt=no
31379 fi
31380
31381 fi
31382
31383
31384         LIBS="$save_LIBS"
31385
31386         if test $have_crypt = yes ; then
31387
31388 cat >>confdefs.h <<\_ACEOF
31389 #define HAVE_CRYPT 1
31390 _ACEOF
31391
31392         else
31393                 { echo "$as_me:$LINENO: WARNING: could not find crypt" >&5
31394 echo "$as_me: WARNING: could not find crypt" >&2;}
31395                 if test $ol_enable_crypt = yes ; then
31396                         { { echo "$as_me:$LINENO: error: could not find crypt, select appropriate options or disable" >&5
31397 echo "$as_me: error: could not find crypt, select appropriate options or disable" >&2;}
31398    { (exit 1); exit 1; }; }
31399                 fi
31400
31401                 { echo "$as_me:$LINENO: WARNING: disabling crypt support" >&5
31402 echo "$as_me: WARNING: disabling crypt support" >&2;}
31403                 ol_enable_crypt=no
31404         fi
31405 fi
31406
31407 if test $ol_enable_proctitle != no ; then
31408         { echo "$as_me:$LINENO: checking for setproctitle" >&5
31409 echo $ECHO_N "checking for setproctitle... $ECHO_C" >&6; }
31410 if test "${ac_cv_func_setproctitle+set}" = set; then
31411   echo $ECHO_N "(cached) $ECHO_C" >&6
31412 else
31413   cat >conftest.$ac_ext <<_ACEOF
31414 /* confdefs.h.  */
31415 _ACEOF
31416 cat confdefs.h >>conftest.$ac_ext
31417 cat >>conftest.$ac_ext <<_ACEOF
31418 /* end confdefs.h.  */
31419 /* Define setproctitle to an innocuous variant, in case <limits.h> declares setproctitle.
31420    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
31421 #define setproctitle innocuous_setproctitle
31422
31423 /* System header to define __stub macros and hopefully few prototypes,
31424     which can conflict with char setproctitle (); below.
31425     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31426     <limits.h> exists even on freestanding compilers.  */
31427
31428 #ifdef __STDC__
31429 # include <limits.h>
31430 #else
31431 # include <assert.h>
31432 #endif
31433
31434 #undef setproctitle
31435
31436 /* Override any GCC internal prototype to avoid an error.
31437    Use char because int might match the return type of a GCC
31438    builtin and then its argument prototype would still apply.  */
31439 #ifdef __cplusplus
31440 extern "C"
31441 #endif
31442 char setproctitle ();
31443 /* The GNU C library defines this for functions which it implements
31444     to always fail with ENOSYS.  Some functions are actually named
31445     something starting with __ and the normal name is an alias.  */
31446 #if defined __stub_setproctitle || defined __stub___setproctitle
31447 choke me
31448 #endif
31449
31450 int
31451 main ()
31452 {
31453 return setproctitle ();
31454   ;
31455   return 0;
31456 }
31457 _ACEOF
31458 rm -f conftest.$ac_objext conftest$ac_exeext
31459 if { (ac_try="$ac_link"
31460 case "(($ac_try" in
31461   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31462   *) ac_try_echo=$ac_try;;
31463 esac
31464 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
31465   (eval "$ac_link") 2>conftest.er1
31466   ac_status=$?
31467   grep -v '^ *+' conftest.er1 >conftest.err
31468   rm -f conftest.er1
31469   cat conftest.err >&5
31470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31471   (exit $ac_status); } && {
31472          test -z "$ac_c_werror_flag" ||
31473          test ! -s conftest.err
31474        } && test -s conftest$ac_exeext &&
31475        $as_test_x conftest$ac_exeext; then
31476   ac_cv_func_setproctitle=yes
31477 else
31478   echo "$as_me: failed program was:" >&5
31479 sed 's/^/| /' conftest.$ac_ext >&5
31480
31481         ac_cv_func_setproctitle=no
31482 fi
31483
31484 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31485       conftest$ac_exeext conftest.$ac_ext
31486 fi
31487 { echo "$as_me:$LINENO: result: $ac_cv_func_setproctitle" >&5
31488 echo "${ECHO_T}$ac_cv_func_setproctitle" >&6; }
31489 if test $ac_cv_func_setproctitle = yes; then
31490   have_setproctitle=yes
31491 else
31492
31493                 { echo "$as_me:$LINENO: checking for setproctitle in -lutil" >&5
31494 echo $ECHO_N "checking for setproctitle in -lutil... $ECHO_C" >&6; }
31495 if test "${ac_cv_lib_util_setproctitle+set}" = set; then
31496   echo $ECHO_N "(cached) $ECHO_C" >&6
31497 else
31498   ac_check_lib_save_LIBS=$LIBS
31499 LIBS="-lutil  $LIBS"
31500 cat >conftest.$ac_ext <<_ACEOF
31501 /* confdefs.h.  */
31502 _ACEOF
31503 cat confdefs.h >>conftest.$ac_ext
31504 cat >>conftest.$ac_ext <<_ACEOF
31505 /* end confdefs.h.  */
31506
31507 /* Override any GCC internal prototype to avoid an error.
31508    Use char because int might match the return type of a GCC
31509    builtin and then its argument prototype would still apply.  */
31510 #ifdef __cplusplus
31511 extern "C"
31512 #endif
31513 char setproctitle ();
31514 int
31515 main ()
31516 {
31517 return setproctitle ();
31518   ;
31519   return 0;
31520 }
31521 _ACEOF
31522 rm -f conftest.$ac_objext conftest$ac_exeext
31523 if { (ac_try="$ac_link"
31524 case "(($ac_try" in
31525   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31526   *) ac_try_echo=$ac_try;;
31527 esac
31528 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
31529   (eval "$ac_link") 2>conftest.er1
31530   ac_status=$?
31531   grep -v '^ *+' conftest.er1 >conftest.err
31532   rm -f conftest.er1
31533   cat conftest.err >&5
31534   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31535   (exit $ac_status); } && {
31536          test -z "$ac_c_werror_flag" ||
31537          test ! -s conftest.err
31538        } && test -s conftest$ac_exeext &&
31539        $as_test_x conftest$ac_exeext; then
31540   ac_cv_lib_util_setproctitle=yes
31541 else
31542   echo "$as_me: failed program was:" >&5
31543 sed 's/^/| /' conftest.$ac_ext >&5
31544
31545         ac_cv_lib_util_setproctitle=no
31546 fi
31547
31548 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31549       conftest$ac_exeext conftest.$ac_ext
31550 LIBS=$ac_check_lib_save_LIBS
31551 fi
31552 { echo "$as_me:$LINENO: result: $ac_cv_lib_util_setproctitle" >&5
31553 echo "${ECHO_T}$ac_cv_lib_util_setproctitle" >&6; }
31554 if test $ac_cv_lib_util_setproctitle = yes; then
31555   have_setproctitle=yes
31556                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
31557 else
31558   have_setproctitle=no
31559                         case " $LIBOBJS " in
31560   *" setproctitle.$ac_objext "* ) ;;
31561   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
31562  ;;
31563 esac
31564
31565                         LIBSRCS="$LIBSRCS setproctitle.c"
31566 fi
31567
31568 fi
31569
31570
31571         if test $have_setproctitle = yes ; then
31572
31573 cat >>confdefs.h <<\_ACEOF
31574 #define HAVE_SETPROCTITLE 1
31575 _ACEOF
31576
31577         fi
31578 fi
31579
31580 if test $ol_enable_slp != no ; then
31581
31582 for ac_header in slp.h
31583 do
31584 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31585 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31586   { echo "$as_me:$LINENO: checking for $ac_header" >&5
31587 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
31588 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31589   echo $ECHO_N "(cached) $ECHO_C" >&6
31590 fi
31591 ac_res=`eval echo '${'$as_ac_Header'}'`
31592                { echo "$as_me:$LINENO: result: $ac_res" >&5
31593 echo "${ECHO_T}$ac_res" >&6; }
31594 else
31595   # Is the header compilable?
31596 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
31597 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
31598 cat >conftest.$ac_ext <<_ACEOF
31599 /* confdefs.h.  */
31600 _ACEOF
31601 cat confdefs.h >>conftest.$ac_ext
31602 cat >>conftest.$ac_ext <<_ACEOF
31603 /* end confdefs.h.  */
31604 $ac_includes_default
31605 #include <$ac_header>
31606 _ACEOF
31607 rm -f conftest.$ac_objext
31608 if { (ac_try="$ac_compile"
31609 case "(($ac_try" in
31610   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31611   *) ac_try_echo=$ac_try;;
31612 esac
31613 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
31614   (eval "$ac_compile") 2>conftest.er1
31615   ac_status=$?
31616   grep -v '^ *+' conftest.er1 >conftest.err
31617   rm -f conftest.er1
31618   cat conftest.err >&5
31619   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31620   (exit $ac_status); } && {
31621          test -z "$ac_c_werror_flag" ||
31622          test ! -s conftest.err
31623        } && test -s conftest.$ac_objext; then
31624   ac_header_compiler=yes
31625 else
31626   echo "$as_me: failed program was:" >&5
31627 sed 's/^/| /' conftest.$ac_ext >&5
31628
31629         ac_header_compiler=no
31630 fi
31631
31632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31633 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
31634 echo "${ECHO_T}$ac_header_compiler" >&6; }
31635
31636 # Is the header present?
31637 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
31638 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
31639 cat >conftest.$ac_ext <<_ACEOF
31640 /* confdefs.h.  */
31641 _ACEOF
31642 cat confdefs.h >>conftest.$ac_ext
31643 cat >>conftest.$ac_ext <<_ACEOF
31644 /* end confdefs.h.  */
31645 #include <$ac_header>
31646 _ACEOF
31647 if { (ac_try="$ac_cpp conftest.$ac_ext"
31648 case "(($ac_try" in
31649   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31650   *) ac_try_echo=$ac_try;;
31651 esac
31652 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
31653   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
31654   ac_status=$?
31655   grep -v '^ *+' conftest.er1 >conftest.err
31656   rm -f conftest.er1
31657   cat conftest.err >&5
31658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31659   (exit $ac_status); } >/dev/null && {
31660          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
31661          test ! -s conftest.err
31662        }; then
31663   ac_header_preproc=yes
31664 else
31665   echo "$as_me: failed program was:" >&5
31666 sed 's/^/| /' conftest.$ac_ext >&5
31667
31668   ac_header_preproc=no
31669 fi
31670
31671 rm -f conftest.err conftest.$ac_ext
31672 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
31673 echo "${ECHO_T}$ac_header_preproc" >&6; }
31674
31675 # So?  What about this header?
31676 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
31677   yes:no: )
31678     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
31679 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
31680     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
31681 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
31682     ac_header_preproc=yes
31683     ;;
31684   no:yes:* )
31685     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
31686 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
31687     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
31688 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
31689     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
31690 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
31691     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
31692 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
31693     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
31694 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
31695     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
31696 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
31697     ( cat <<\_ASBOX
31698 ## --------------------------------------------- ##
31699 ## Report this to <http://www.openldap.org/its/> ##
31700 ## --------------------------------------------- ##
31701 _ASBOX
31702      ) | sed "s/^/$as_me: WARNING:     /" >&2
31703     ;;
31704 esac
31705 { echo "$as_me:$LINENO: checking for $ac_header" >&5
31706 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
31707 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
31708   echo $ECHO_N "(cached) $ECHO_C" >&6
31709 else
31710   eval "$as_ac_Header=\$ac_header_preproc"
31711 fi
31712 ac_res=`eval echo '${'$as_ac_Header'}'`
31713                { echo "$as_me:$LINENO: result: $ac_res" >&5
31714 echo "${ECHO_T}$ac_res" >&6; }
31715
31716 fi
31717 if test `eval echo '${'$as_ac_Header'}'` = yes; then
31718   cat >>confdefs.h <<_ACEOF
31719 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31720 _ACEOF
31721
31722 fi
31723
31724 done
31725
31726
31727         if test $ac_cv_header_slp_h = yes ; then
31728                 { echo "$as_me:$LINENO: checking for SLPOpen in -lslp" >&5
31729 echo $ECHO_N "checking for SLPOpen in -lslp... $ECHO_C" >&6; }
31730 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then
31731   echo $ECHO_N "(cached) $ECHO_C" >&6
31732 else
31733   ac_check_lib_save_LIBS=$LIBS
31734 LIBS="-lslp  $LIBS"
31735 cat >conftest.$ac_ext <<_ACEOF
31736 /* confdefs.h.  */
31737 _ACEOF
31738 cat confdefs.h >>conftest.$ac_ext
31739 cat >>conftest.$ac_ext <<_ACEOF
31740 /* end confdefs.h.  */
31741
31742 /* Override any GCC internal prototype to avoid an error.
31743    Use char because int might match the return type of a GCC
31744    builtin and then its argument prototype would still apply.  */
31745 #ifdef __cplusplus
31746 extern "C"
31747 #endif
31748 char SLPOpen ();
31749 int
31750 main ()
31751 {
31752 return SLPOpen ();
31753   ;
31754   return 0;
31755 }
31756 _ACEOF
31757 rm -f conftest.$ac_objext conftest$ac_exeext
31758 if { (ac_try="$ac_link"
31759 case "(($ac_try" in
31760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31761   *) ac_try_echo=$ac_try;;
31762 esac
31763 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
31764   (eval "$ac_link") 2>conftest.er1
31765   ac_status=$?
31766   grep -v '^ *+' conftest.er1 >conftest.err
31767   rm -f conftest.er1
31768   cat conftest.err >&5
31769   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31770   (exit $ac_status); } && {
31771          test -z "$ac_c_werror_flag" ||
31772          test ! -s conftest.err
31773        } && test -s conftest$ac_exeext &&
31774        $as_test_x conftest$ac_exeext; then
31775   ac_cv_lib_slp_SLPOpen=yes
31776 else
31777   echo "$as_me: failed program was:" >&5
31778 sed 's/^/| /' conftest.$ac_ext >&5
31779
31780         ac_cv_lib_slp_SLPOpen=no
31781 fi
31782
31783 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
31784       conftest$ac_exeext conftest.$ac_ext
31785 LIBS=$ac_check_lib_save_LIBS
31786 fi
31787 { echo "$as_me:$LINENO: result: $ac_cv_lib_slp_SLPOpen" >&5
31788 echo "${ECHO_T}$ac_cv_lib_slp_SLPOpen" >&6; }
31789 if test $ac_cv_lib_slp_SLPOpen = yes; then
31790   have_slp=yes
31791 else
31792   have_slp=no
31793 fi
31794
31795                 if test $have_slp = yes ; then
31796
31797 cat >>confdefs.h <<\_ACEOF
31798 #define HAVE_SLP 1
31799 _ACEOF
31800
31801                         SLAPD_SLP_LIBS=-lslp
31802                 fi
31803
31804         elif test $ol_enable_slp = yes ; then
31805                 { { echo "$as_me:$LINENO: error: SLP not found" >&5
31806 echo "$as_me: error: SLP not found" >&2;}
31807    { (exit 1); exit 1; }; }
31808         fi
31809 fi
31810
31811
31812 { echo "$as_me:$LINENO: checking for mode_t" >&5
31813 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
31814 if test "${ac_cv_type_mode_t+set}" = set; then
31815   echo $ECHO_N "(cached) $ECHO_C" >&6
31816 else
31817   cat >conftest.$ac_ext <<_ACEOF
31818 /* confdefs.h.  */
31819 _ACEOF
31820 cat confdefs.h >>conftest.$ac_ext
31821 cat >>conftest.$ac_ext <<_ACEOF
31822 /* end confdefs.h.  */
31823 $ac_includes_default
31824 typedef mode_t ac__type_new_;
31825 int
31826 main ()
31827 {
31828 if ((ac__type_new_ *) 0)
31829   return 0;
31830 if (sizeof (ac__type_new_))
31831   return 0;
31832   ;
31833   return 0;
31834 }
31835 _ACEOF
31836 rm -f conftest.$ac_objext
31837 if { (ac_try="$ac_compile"
31838 case "(($ac_try" in
31839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31840   *) ac_try_echo=$ac_try;;
31841 esac
31842 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
31843   (eval "$ac_compile") 2>conftest.er1
31844   ac_status=$?
31845   grep -v '^ *+' conftest.er1 >conftest.err
31846   rm -f conftest.er1
31847   cat conftest.err >&5
31848   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31849   (exit $ac_status); } && {
31850          test -z "$ac_c_werror_flag" ||
31851          test ! -s conftest.err
31852        } && test -s conftest.$ac_objext; then
31853   ac_cv_type_mode_t=yes
31854 else
31855   echo "$as_me: failed program was:" >&5
31856 sed 's/^/| /' conftest.$ac_ext >&5
31857
31858         ac_cv_type_mode_t=no
31859 fi
31860
31861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31862 fi
31863 { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
31864 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
31865 if test $ac_cv_type_mode_t = yes; then
31866   :
31867 else
31868
31869 cat >>confdefs.h <<_ACEOF
31870 #define mode_t int
31871 _ACEOF
31872
31873 fi
31874
31875 { echo "$as_me:$LINENO: checking for off_t" >&5
31876 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
31877 if test "${ac_cv_type_off_t+set}" = set; then
31878   echo $ECHO_N "(cached) $ECHO_C" >&6
31879 else
31880   cat >conftest.$ac_ext <<_ACEOF
31881 /* confdefs.h.  */
31882 _ACEOF
31883 cat confdefs.h >>conftest.$ac_ext
31884 cat >>conftest.$ac_ext <<_ACEOF
31885 /* end confdefs.h.  */
31886 $ac_includes_default
31887 typedef off_t ac__type_new_;
31888 int
31889 main ()
31890 {
31891 if ((ac__type_new_ *) 0)
31892   return 0;
31893 if (sizeof (ac__type_new_))
31894   return 0;
31895   ;
31896   return 0;
31897 }
31898 _ACEOF
31899 rm -f conftest.$ac_objext
31900 if { (ac_try="$ac_compile"
31901 case "(($ac_try" in
31902   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31903   *) ac_try_echo=$ac_try;;
31904 esac
31905 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
31906   (eval "$ac_compile") 2>conftest.er1
31907   ac_status=$?
31908   grep -v '^ *+' conftest.er1 >conftest.err
31909   rm -f conftest.er1
31910   cat conftest.err >&5
31911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31912   (exit $ac_status); } && {
31913          test -z "$ac_c_werror_flag" ||
31914          test ! -s conftest.err
31915        } && test -s conftest.$ac_objext; then
31916   ac_cv_type_off_t=yes
31917 else
31918   echo "$as_me: failed program was:" >&5
31919 sed 's/^/| /' conftest.$ac_ext >&5
31920
31921         ac_cv_type_off_t=no
31922 fi
31923
31924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31925 fi
31926 { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
31927 echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
31928 if test $ac_cv_type_off_t = yes; then
31929   :
31930 else
31931
31932 cat >>confdefs.h <<_ACEOF
31933 #define off_t long
31934 _ACEOF
31935
31936 fi
31937
31938 { echo "$as_me:$LINENO: checking for pid_t" >&5
31939 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
31940 if test "${ac_cv_type_pid_t+set}" = set; then
31941   echo $ECHO_N "(cached) $ECHO_C" >&6
31942 else
31943   cat >conftest.$ac_ext <<_ACEOF
31944 /* confdefs.h.  */
31945 _ACEOF
31946 cat confdefs.h >>conftest.$ac_ext
31947 cat >>conftest.$ac_ext <<_ACEOF
31948 /* end confdefs.h.  */
31949 $ac_includes_default
31950 typedef pid_t ac__type_new_;
31951 int
31952 main ()
31953 {
31954 if ((ac__type_new_ *) 0)
31955   return 0;
31956 if (sizeof (ac__type_new_))
31957   return 0;
31958   ;
31959   return 0;
31960 }
31961 _ACEOF
31962 rm -f conftest.$ac_objext
31963 if { (ac_try="$ac_compile"
31964 case "(($ac_try" in
31965   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31966   *) ac_try_echo=$ac_try;;
31967 esac
31968 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
31969   (eval "$ac_compile") 2>conftest.er1
31970   ac_status=$?
31971   grep -v '^ *+' conftest.er1 >conftest.err
31972   rm -f conftest.er1
31973   cat conftest.err >&5
31974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
31975   (exit $ac_status); } && {
31976          test -z "$ac_c_werror_flag" ||
31977          test ! -s conftest.err
31978        } && test -s conftest.$ac_objext; then
31979   ac_cv_type_pid_t=yes
31980 else
31981   echo "$as_me: failed program was:" >&5
31982 sed 's/^/| /' conftest.$ac_ext >&5
31983
31984         ac_cv_type_pid_t=no
31985 fi
31986
31987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31988 fi
31989 { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
31990 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
31991 if test $ac_cv_type_pid_t = yes; then
31992   :
31993 else
31994
31995 cat >>confdefs.h <<_ACEOF
31996 #define pid_t int
31997 _ACEOF
31998
31999 fi
32000
32001 { echo "$as_me:$LINENO: checking for ssize_t" >&5
32002 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
32003 if test "${ac_cv_type_ssize_t+set}" = set; then
32004   echo $ECHO_N "(cached) $ECHO_C" >&6
32005 else
32006   cat >conftest.$ac_ext <<_ACEOF
32007 /* confdefs.h.  */
32008 _ACEOF
32009 cat confdefs.h >>conftest.$ac_ext
32010 cat >>conftest.$ac_ext <<_ACEOF
32011 /* end confdefs.h.  */
32012 $ac_includes_default
32013 typedef ssize_t ac__type_new_;
32014 int
32015 main ()
32016 {
32017 if ((ac__type_new_ *) 0)
32018   return 0;
32019 if (sizeof (ac__type_new_))
32020   return 0;
32021   ;
32022   return 0;
32023 }
32024 _ACEOF
32025 rm -f conftest.$ac_objext
32026 if { (ac_try="$ac_compile"
32027 case "(($ac_try" in
32028   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32029   *) ac_try_echo=$ac_try;;
32030 esac
32031 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32032   (eval "$ac_compile") 2>conftest.er1
32033   ac_status=$?
32034   grep -v '^ *+' conftest.er1 >conftest.err
32035   rm -f conftest.er1
32036   cat conftest.err >&5
32037   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32038   (exit $ac_status); } && {
32039          test -z "$ac_c_werror_flag" ||
32040          test ! -s conftest.err
32041        } && test -s conftest.$ac_objext; then
32042   ac_cv_type_ssize_t=yes
32043 else
32044   echo "$as_me: failed program was:" >&5
32045 sed 's/^/| /' conftest.$ac_ext >&5
32046
32047         ac_cv_type_ssize_t=no
32048 fi
32049
32050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32051 fi
32052 { echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
32053 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
32054 if test $ac_cv_type_ssize_t = yes; then
32055   :
32056 else
32057
32058 cat >>confdefs.h <<_ACEOF
32059 #define ssize_t signed int
32060 _ACEOF
32061
32062 fi
32063
32064 { echo "$as_me:$LINENO: checking for caddr_t" >&5
32065 echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6; }
32066 if test "${ac_cv_type_caddr_t+set}" = set; then
32067   echo $ECHO_N "(cached) $ECHO_C" >&6
32068 else
32069   cat >conftest.$ac_ext <<_ACEOF
32070 /* confdefs.h.  */
32071 _ACEOF
32072 cat confdefs.h >>conftest.$ac_ext
32073 cat >>conftest.$ac_ext <<_ACEOF
32074 /* end confdefs.h.  */
32075 $ac_includes_default
32076 typedef caddr_t ac__type_new_;
32077 int
32078 main ()
32079 {
32080 if ((ac__type_new_ *) 0)
32081   return 0;
32082 if (sizeof (ac__type_new_))
32083   return 0;
32084   ;
32085   return 0;
32086 }
32087 _ACEOF
32088 rm -f conftest.$ac_objext
32089 if { (ac_try="$ac_compile"
32090 case "(($ac_try" in
32091   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32092   *) ac_try_echo=$ac_try;;
32093 esac
32094 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32095   (eval "$ac_compile") 2>conftest.er1
32096   ac_status=$?
32097   grep -v '^ *+' conftest.er1 >conftest.err
32098   rm -f conftest.er1
32099   cat conftest.err >&5
32100   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32101   (exit $ac_status); } && {
32102          test -z "$ac_c_werror_flag" ||
32103          test ! -s conftest.err
32104        } && test -s conftest.$ac_objext; then
32105   ac_cv_type_caddr_t=yes
32106 else
32107   echo "$as_me: failed program was:" >&5
32108 sed 's/^/| /' conftest.$ac_ext >&5
32109
32110         ac_cv_type_caddr_t=no
32111 fi
32112
32113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32114 fi
32115 { echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
32116 echo "${ECHO_T}$ac_cv_type_caddr_t" >&6; }
32117 if test $ac_cv_type_caddr_t = yes; then
32118   :
32119 else
32120
32121 cat >>confdefs.h <<_ACEOF
32122 #define caddr_t char *
32123 _ACEOF
32124
32125 fi
32126
32127 { echo "$as_me:$LINENO: checking for size_t" >&5
32128 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
32129 if test "${ac_cv_type_size_t+set}" = set; then
32130   echo $ECHO_N "(cached) $ECHO_C" >&6
32131 else
32132   cat >conftest.$ac_ext <<_ACEOF
32133 /* confdefs.h.  */
32134 _ACEOF
32135 cat confdefs.h >>conftest.$ac_ext
32136 cat >>conftest.$ac_ext <<_ACEOF
32137 /* end confdefs.h.  */
32138 $ac_includes_default
32139 typedef size_t ac__type_new_;
32140 int
32141 main ()
32142 {
32143 if ((ac__type_new_ *) 0)
32144   return 0;
32145 if (sizeof (ac__type_new_))
32146   return 0;
32147   ;
32148   return 0;
32149 }
32150 _ACEOF
32151 rm -f conftest.$ac_objext
32152 if { (ac_try="$ac_compile"
32153 case "(($ac_try" in
32154   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32155   *) ac_try_echo=$ac_try;;
32156 esac
32157 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32158   (eval "$ac_compile") 2>conftest.er1
32159   ac_status=$?
32160   grep -v '^ *+' conftest.er1 >conftest.err
32161   rm -f conftest.er1
32162   cat conftest.err >&5
32163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32164   (exit $ac_status); } && {
32165          test -z "$ac_c_werror_flag" ||
32166          test ! -s conftest.err
32167        } && test -s conftest.$ac_objext; then
32168   ac_cv_type_size_t=yes
32169 else
32170   echo "$as_me: failed program was:" >&5
32171 sed 's/^/| /' conftest.$ac_ext >&5
32172
32173         ac_cv_type_size_t=no
32174 fi
32175
32176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32177 fi
32178 { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
32179 echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
32180 if test $ac_cv_type_size_t = yes; then
32181   :
32182 else
32183
32184 cat >>confdefs.h <<_ACEOF
32185 #define size_t unsigned
32186 _ACEOF
32187
32188 fi
32189
32190
32191 { echo "$as_me:$LINENO: checking for long long" >&5
32192 echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
32193 if test "${ac_cv_type_long_long+set}" = set; then
32194   echo $ECHO_N "(cached) $ECHO_C" >&6
32195 else
32196   cat >conftest.$ac_ext <<_ACEOF
32197 /* confdefs.h.  */
32198 _ACEOF
32199 cat confdefs.h >>conftest.$ac_ext
32200 cat >>conftest.$ac_ext <<_ACEOF
32201 /* end confdefs.h.  */
32202 $ac_includes_default
32203 typedef long long ac__type_new_;
32204 int
32205 main ()
32206 {
32207 if ((ac__type_new_ *) 0)
32208   return 0;
32209 if (sizeof (ac__type_new_))
32210   return 0;
32211   ;
32212   return 0;
32213 }
32214 _ACEOF
32215 rm -f conftest.$ac_objext
32216 if { (ac_try="$ac_compile"
32217 case "(($ac_try" in
32218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32219   *) ac_try_echo=$ac_try;;
32220 esac
32221 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32222   (eval "$ac_compile") 2>conftest.er1
32223   ac_status=$?
32224   grep -v '^ *+' conftest.er1 >conftest.err
32225   rm -f conftest.er1
32226   cat conftest.err >&5
32227   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32228   (exit $ac_status); } && {
32229          test -z "$ac_c_werror_flag" ||
32230          test ! -s conftest.err
32231        } && test -s conftest.$ac_objext; then
32232   ac_cv_type_long_long=yes
32233 else
32234   echo "$as_me: failed program was:" >&5
32235 sed 's/^/| /' conftest.$ac_ext >&5
32236
32237         ac_cv_type_long_long=no
32238 fi
32239
32240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32241 fi
32242 { echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
32243 echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
32244 if test $ac_cv_type_long_long = yes; then
32245
32246 cat >>confdefs.h <<_ACEOF
32247 #define HAVE_LONG_LONG 1
32248 _ACEOF
32249
32250
32251 fi
32252
32253 { echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
32254 echo $ECHO_N "checking for ptrdiff_t... $ECHO_C" >&6; }
32255 if test "${ac_cv_type_ptrdiff_t+set}" = set; then
32256   echo $ECHO_N "(cached) $ECHO_C" >&6
32257 else
32258   cat >conftest.$ac_ext <<_ACEOF
32259 /* confdefs.h.  */
32260 _ACEOF
32261 cat confdefs.h >>conftest.$ac_ext
32262 cat >>conftest.$ac_ext <<_ACEOF
32263 /* end confdefs.h.  */
32264 $ac_includes_default
32265 typedef ptrdiff_t ac__type_new_;
32266 int
32267 main ()
32268 {
32269 if ((ac__type_new_ *) 0)
32270   return 0;
32271 if (sizeof (ac__type_new_))
32272   return 0;
32273   ;
32274   return 0;
32275 }
32276 _ACEOF
32277 rm -f conftest.$ac_objext
32278 if { (ac_try="$ac_compile"
32279 case "(($ac_try" in
32280   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32281   *) ac_try_echo=$ac_try;;
32282 esac
32283 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32284   (eval "$ac_compile") 2>conftest.er1
32285   ac_status=$?
32286   grep -v '^ *+' conftest.er1 >conftest.err
32287   rm -f conftest.er1
32288   cat conftest.err >&5
32289   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32290   (exit $ac_status); } && {
32291          test -z "$ac_c_werror_flag" ||
32292          test ! -s conftest.err
32293        } && test -s conftest.$ac_objext; then
32294   ac_cv_type_ptrdiff_t=yes
32295 else
32296   echo "$as_me: failed program was:" >&5
32297 sed 's/^/| /' conftest.$ac_ext >&5
32298
32299         ac_cv_type_ptrdiff_t=no
32300 fi
32301
32302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32303 fi
32304 { echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
32305 echo "${ECHO_T}$ac_cv_type_ptrdiff_t" >&6; }
32306 if test $ac_cv_type_ptrdiff_t = yes; then
32307
32308 cat >>confdefs.h <<_ACEOF
32309 #define HAVE_PTRDIFF_T 1
32310 _ACEOF
32311
32312
32313 fi
32314
32315
32316
32317 { echo "$as_me:$LINENO: checking for socklen_t" >&5
32318 echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
32319 if test "${ac_cv_type_socklen_t+set}" = set; then
32320   echo $ECHO_N "(cached) $ECHO_C" >&6
32321 else
32322   cat >conftest.$ac_ext <<_ACEOF
32323 /* confdefs.h.  */
32324 _ACEOF
32325 cat confdefs.h >>conftest.$ac_ext
32326 cat >>conftest.$ac_ext <<_ACEOF
32327 /* end confdefs.h.  */
32328 $ac_includes_default
32329 #ifdef HAVE_SYS_SOCKET_H
32330 #include <sys/socket.h>
32331 #endif
32332
32333 typedef socklen_t ac__type_new_;
32334 int
32335 main ()
32336 {
32337 if ((ac__type_new_ *) 0)
32338   return 0;
32339 if (sizeof (ac__type_new_))
32340   return 0;
32341   ;
32342   return 0;
32343 }
32344 _ACEOF
32345 rm -f conftest.$ac_objext
32346 if { (ac_try="$ac_compile"
32347 case "(($ac_try" in
32348   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32349   *) ac_try_echo=$ac_try;;
32350 esac
32351 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32352   (eval "$ac_compile") 2>conftest.er1
32353   ac_status=$?
32354   grep -v '^ *+' conftest.er1 >conftest.err
32355   rm -f conftest.er1
32356   cat conftest.err >&5
32357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32358   (exit $ac_status); } && {
32359          test -z "$ac_c_werror_flag" ||
32360          test ! -s conftest.err
32361        } && test -s conftest.$ac_objext; then
32362   ac_cv_type_socklen_t=yes
32363 else
32364   echo "$as_me: failed program was:" >&5
32365 sed 's/^/| /' conftest.$ac_ext >&5
32366
32367         ac_cv_type_socklen_t=no
32368 fi
32369
32370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32371 fi
32372 { echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
32373 echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
32374
32375
32376 { echo "$as_me:$LINENO: checking the type of arg 3 to accept()" >&5
32377 echo $ECHO_N "checking the type of arg 3 to accept()... $ECHO_C" >&6; }
32378 if test "${ol_cv_type_ber_socklen_t+set}" = set; then
32379   echo $ECHO_N "(cached) $ECHO_C" >&6
32380 else
32381
32382         set socklen_t int unsigned "unsigned long" long size_t
32383         test "$ac_cv_type_socklen_t" = yes || shift
32384         ol_cv_type_ber_socklen_t=$1 guessing="guessing "
32385         for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
32386                 cat >conftest.$ac_ext <<_ACEOF
32387 /* confdefs.h.  */
32388 _ACEOF
32389 cat confdefs.h >>conftest.$ac_ext
32390 cat >>conftest.$ac_ext <<_ACEOF
32391 /* end confdefs.h.  */
32392 $ac_includes_default
32393 #ifdef HAVE_SYS_SOCKET_H
32394 #include <sys/socket.h>
32395 #endif
32396 extern int accept(int s, $addrtype *ap, $lentype *lp);
32397
32398 int
32399 main ()
32400 {
32401
32402 accept(0, (struct sockaddr *) 0, ($lentype *) 0);
32403
32404   ;
32405   return 0;
32406 }
32407 _ACEOF
32408 rm -f conftest.$ac_objext
32409 if { (ac_try="$ac_compile"
32410 case "(($ac_try" in
32411   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32412   *) ac_try_echo=$ac_try;;
32413 esac
32414 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32415   (eval "$ac_compile") 2>conftest.er1
32416   ac_status=$?
32417   grep -v '^ *+' conftest.er1 >conftest.err
32418   rm -f conftest.er1
32419   cat conftest.err >&5
32420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32421   (exit $ac_status); } && {
32422          test -z "$ac_c_werror_flag" ||
32423          test ! -s conftest.err
32424        } && test -s conftest.$ac_objext; then
32425   ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
32426 else
32427   echo "$as_me: failed program was:" >&5
32428 sed 's/^/| /' conftest.$ac_ext >&5
32429
32430
32431 fi
32432
32433 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32434         done ; done
32435 fi
32436
32437 { echo "$as_me:$LINENO: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
32438 echo "${ECHO_T}$guessing$ol_cv_type_ber_socklen_t *" >&6; }
32439
32440 cat >>confdefs.h <<_ACEOF
32441 #define ber_socklen_t $ol_cv_type_ber_socklen_t
32442 _ACEOF
32443
32444
32445 if test "$ac_cv_type_socklen_t" != yes; then
32446
32447 cat >>confdefs.h <<_ACEOF
32448 #define socklen_t $ol_cv_type_ber_socklen_t
32449 _ACEOF
32450
32451 fi
32452
32453
32454 { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
32455 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
32456 if test "${ac_cv_type_signal+set}" = set; then
32457   echo $ECHO_N "(cached) $ECHO_C" >&6
32458 else
32459   cat >conftest.$ac_ext <<_ACEOF
32460 /* confdefs.h.  */
32461 _ACEOF
32462 cat confdefs.h >>conftest.$ac_ext
32463 cat >>conftest.$ac_ext <<_ACEOF
32464 /* end confdefs.h.  */
32465 #include <sys/types.h>
32466 #include <signal.h>
32467
32468 int
32469 main ()
32470 {
32471 return *(signal (0, 0)) (0) == 1;
32472   ;
32473   return 0;
32474 }
32475 _ACEOF
32476 rm -f conftest.$ac_objext
32477 if { (ac_try="$ac_compile"
32478 case "(($ac_try" in
32479   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32480   *) ac_try_echo=$ac_try;;
32481 esac
32482 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32483   (eval "$ac_compile") 2>conftest.er1
32484   ac_status=$?
32485   grep -v '^ *+' conftest.er1 >conftest.err
32486   rm -f conftest.er1
32487   cat conftest.err >&5
32488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32489   (exit $ac_status); } && {
32490          test -z "$ac_c_werror_flag" ||
32491          test ! -s conftest.err
32492        } && test -s conftest.$ac_objext; then
32493   ac_cv_type_signal=int
32494 else
32495   echo "$as_me: failed program was:" >&5
32496 sed 's/^/| /' conftest.$ac_ext >&5
32497
32498         ac_cv_type_signal=void
32499 fi
32500
32501 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32502 fi
32503 { echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
32504 echo "${ECHO_T}$ac_cv_type_signal" >&6; }
32505
32506 cat >>confdefs.h <<_ACEOF
32507 #define RETSIGTYPE $ac_cv_type_signal
32508 _ACEOF
32509
32510
32511
32512 { echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
32513 echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; }
32514 if test "${ac_cv_type_sig_atomic_t+set}" = set; then
32515   echo $ECHO_N "(cached) $ECHO_C" >&6
32516 else
32517   cat >conftest.$ac_ext <<_ACEOF
32518 /* confdefs.h.  */
32519 _ACEOF
32520 cat confdefs.h >>conftest.$ac_ext
32521 cat >>conftest.$ac_ext <<_ACEOF
32522 /* end confdefs.h.  */
32523 $ac_includes_default
32524 #include <signal.h>
32525
32526
32527 typedef sig_atomic_t ac__type_new_;
32528 int
32529 main ()
32530 {
32531 if ((ac__type_new_ *) 0)
32532   return 0;
32533 if (sizeof (ac__type_new_))
32534   return 0;
32535   ;
32536   return 0;
32537 }
32538 _ACEOF
32539 rm -f conftest.$ac_objext
32540 if { (ac_try="$ac_compile"
32541 case "(($ac_try" in
32542   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32543   *) ac_try_echo=$ac_try;;
32544 esac
32545 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32546   (eval "$ac_compile") 2>conftest.er1
32547   ac_status=$?
32548   grep -v '^ *+' conftest.er1 >conftest.err
32549   rm -f conftest.er1
32550   cat conftest.err >&5
32551   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32552   (exit $ac_status); } && {
32553          test -z "$ac_c_werror_flag" ||
32554          test ! -s conftest.err
32555        } && test -s conftest.$ac_objext; then
32556   ac_cv_type_sig_atomic_t=yes
32557 else
32558   echo "$as_me: failed program was:" >&5
32559 sed 's/^/| /' conftest.$ac_ext >&5
32560
32561         ac_cv_type_sig_atomic_t=no
32562 fi
32563
32564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32565 fi
32566 { echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
32567 echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
32568 if test $ac_cv_type_sig_atomic_t = yes; then
32569   :
32570 else
32571
32572 cat >>confdefs.h <<_ACEOF
32573 #define sig_atomic_t int
32574 _ACEOF
32575
32576 fi
32577
32578
32579 { echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
32580 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
32581 if test "${ac_cv_type_uid_t+set}" = set; then
32582   echo $ECHO_N "(cached) $ECHO_C" >&6
32583 else
32584   cat >conftest.$ac_ext <<_ACEOF
32585 /* confdefs.h.  */
32586 _ACEOF
32587 cat confdefs.h >>conftest.$ac_ext
32588 cat >>conftest.$ac_ext <<_ACEOF
32589 /* end confdefs.h.  */
32590 #include <sys/types.h>
32591
32592 _ACEOF
32593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32594   $EGREP "uid_t" >/dev/null 2>&1; then
32595   ac_cv_type_uid_t=yes
32596 else
32597   ac_cv_type_uid_t=no
32598 fi
32599 rm -f conftest*
32600
32601 fi
32602 { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
32603 echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
32604 if test $ac_cv_type_uid_t = no; then
32605
32606 cat >>confdefs.h <<\_ACEOF
32607 #define uid_t int
32608 _ACEOF
32609
32610
32611 cat >>confdefs.h <<\_ACEOF
32612 #define gid_t int
32613 _ACEOF
32614
32615 fi
32616
32617
32618 { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
32619 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
32620 if test "${ac_cv_header_time+set}" = set; then
32621   echo $ECHO_N "(cached) $ECHO_C" >&6
32622 else
32623   cat >conftest.$ac_ext <<_ACEOF
32624 /* confdefs.h.  */
32625 _ACEOF
32626 cat confdefs.h >>conftest.$ac_ext
32627 cat >>conftest.$ac_ext <<_ACEOF
32628 /* end confdefs.h.  */
32629 #include <sys/types.h>
32630 #include <sys/time.h>
32631 #include <time.h>
32632
32633 int
32634 main ()
32635 {
32636 if ((struct tm *) 0)
32637 return 0;
32638   ;
32639   return 0;
32640 }
32641 _ACEOF
32642 rm -f conftest.$ac_objext
32643 if { (ac_try="$ac_compile"
32644 case "(($ac_try" in
32645   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32646   *) ac_try_echo=$ac_try;;
32647 esac
32648 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32649   (eval "$ac_compile") 2>conftest.er1
32650   ac_status=$?
32651   grep -v '^ *+' conftest.er1 >conftest.err
32652   rm -f conftest.er1
32653   cat conftest.err >&5
32654   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32655   (exit $ac_status); } && {
32656          test -z "$ac_c_werror_flag" ||
32657          test ! -s conftest.err
32658        } && test -s conftest.$ac_objext; then
32659   ac_cv_header_time=yes
32660 else
32661   echo "$as_me: failed program was:" >&5
32662 sed 's/^/| /' conftest.$ac_ext >&5
32663
32664         ac_cv_header_time=no
32665 fi
32666
32667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32668 fi
32669 { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
32670 echo "${ECHO_T}$ac_cv_header_time" >&6; }
32671 if test $ac_cv_header_time = yes; then
32672
32673 cat >>confdefs.h <<\_ACEOF
32674 #define TIME_WITH_SYS_TIME 1
32675 _ACEOF
32676
32677 fi
32678
32679 { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
32680 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
32681 if test "${ac_cv_struct_tm+set}" = set; then
32682   echo $ECHO_N "(cached) $ECHO_C" >&6
32683 else
32684   cat >conftest.$ac_ext <<_ACEOF
32685 /* confdefs.h.  */
32686 _ACEOF
32687 cat confdefs.h >>conftest.$ac_ext
32688 cat >>conftest.$ac_ext <<_ACEOF
32689 /* end confdefs.h.  */
32690 #include <sys/types.h>
32691 #include <time.h>
32692
32693 int
32694 main ()
32695 {
32696 struct tm tm;
32697                                      int *p = &tm.tm_sec;
32698                                      return !p;
32699   ;
32700   return 0;
32701 }
32702 _ACEOF
32703 rm -f conftest.$ac_objext
32704 if { (ac_try="$ac_compile"
32705 case "(($ac_try" in
32706   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32707   *) ac_try_echo=$ac_try;;
32708 esac
32709 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32710   (eval "$ac_compile") 2>conftest.er1
32711   ac_status=$?
32712   grep -v '^ *+' conftest.er1 >conftest.err
32713   rm -f conftest.er1
32714   cat conftest.err >&5
32715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32716   (exit $ac_status); } && {
32717          test -z "$ac_c_werror_flag" ||
32718          test ! -s conftest.err
32719        } && test -s conftest.$ac_objext; then
32720   ac_cv_struct_tm=time.h
32721 else
32722   echo "$as_me: failed program was:" >&5
32723 sed 's/^/| /' conftest.$ac_ext >&5
32724
32725         ac_cv_struct_tm=sys/time.h
32726 fi
32727
32728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32729 fi
32730 { echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
32731 echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
32732 if test $ac_cv_struct_tm = sys/time.h; then
32733
32734 cat >>confdefs.h <<\_ACEOF
32735 #define TM_IN_SYS_TIME 1
32736 _ACEOF
32737
32738 fi
32739
32740 { echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
32741 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
32742 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
32743   echo $ECHO_N "(cached) $ECHO_C" >&6
32744 else
32745   cat >conftest.$ac_ext <<_ACEOF
32746 /* confdefs.h.  */
32747 _ACEOF
32748 cat confdefs.h >>conftest.$ac_ext
32749 cat >>conftest.$ac_ext <<_ACEOF
32750 /* end confdefs.h.  */
32751 $ac_includes_default
32752 int
32753 main ()
32754 {
32755 static struct stat ac_aggr;
32756 if (ac_aggr.st_blksize)
32757 return 0;
32758   ;
32759   return 0;
32760 }
32761 _ACEOF
32762 rm -f conftest.$ac_objext
32763 if { (ac_try="$ac_compile"
32764 case "(($ac_try" in
32765   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32766   *) ac_try_echo=$ac_try;;
32767 esac
32768 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32769   (eval "$ac_compile") 2>conftest.er1
32770   ac_status=$?
32771   grep -v '^ *+' conftest.er1 >conftest.err
32772   rm -f conftest.er1
32773   cat conftest.err >&5
32774   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32775   (exit $ac_status); } && {
32776          test -z "$ac_c_werror_flag" ||
32777          test ! -s conftest.err
32778        } && test -s conftest.$ac_objext; then
32779   ac_cv_member_struct_stat_st_blksize=yes
32780 else
32781   echo "$as_me: failed program was:" >&5
32782 sed 's/^/| /' conftest.$ac_ext >&5
32783
32784         cat >conftest.$ac_ext <<_ACEOF
32785 /* confdefs.h.  */
32786 _ACEOF
32787 cat confdefs.h >>conftest.$ac_ext
32788 cat >>conftest.$ac_ext <<_ACEOF
32789 /* end confdefs.h.  */
32790 $ac_includes_default
32791 int
32792 main ()
32793 {
32794 static struct stat ac_aggr;
32795 if (sizeof ac_aggr.st_blksize)
32796 return 0;
32797   ;
32798   return 0;
32799 }
32800 _ACEOF
32801 rm -f conftest.$ac_objext
32802 if { (ac_try="$ac_compile"
32803 case "(($ac_try" in
32804   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32805   *) ac_try_echo=$ac_try;;
32806 esac
32807 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32808   (eval "$ac_compile") 2>conftest.er1
32809   ac_status=$?
32810   grep -v '^ *+' conftest.er1 >conftest.err
32811   rm -f conftest.er1
32812   cat conftest.err >&5
32813   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32814   (exit $ac_status); } && {
32815          test -z "$ac_c_werror_flag" ||
32816          test ! -s conftest.err
32817        } && test -s conftest.$ac_objext; then
32818   ac_cv_member_struct_stat_st_blksize=yes
32819 else
32820   echo "$as_me: failed program was:" >&5
32821 sed 's/^/| /' conftest.$ac_ext >&5
32822
32823         ac_cv_member_struct_stat_st_blksize=no
32824 fi
32825
32826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32827 fi
32828
32829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32830 fi
32831 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
32832 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
32833 if test $ac_cv_member_struct_stat_st_blksize = yes; then
32834
32835 cat >>confdefs.h <<_ACEOF
32836 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
32837 _ACEOF
32838
32839
32840 fi
32841
32842 { echo "$as_me:$LINENO: checking for struct passwd.pw_gecos" >&5
32843 echo $ECHO_N "checking for struct passwd.pw_gecos... $ECHO_C" >&6; }
32844 if test "${ac_cv_member_struct_passwd_pw_gecos+set}" = set; then
32845   echo $ECHO_N "(cached) $ECHO_C" >&6
32846 else
32847   cat >conftest.$ac_ext <<_ACEOF
32848 /* confdefs.h.  */
32849 _ACEOF
32850 cat confdefs.h >>conftest.$ac_ext
32851 cat >>conftest.$ac_ext <<_ACEOF
32852 /* end confdefs.h.  */
32853 $ac_includes_default
32854 #include <pwd.h>
32855
32856 int
32857 main ()
32858 {
32859 static struct passwd ac_aggr;
32860 if (ac_aggr.pw_gecos)
32861 return 0;
32862   ;
32863   return 0;
32864 }
32865 _ACEOF
32866 rm -f conftest.$ac_objext
32867 if { (ac_try="$ac_compile"
32868 case "(($ac_try" in
32869   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32870   *) ac_try_echo=$ac_try;;
32871 esac
32872 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32873   (eval "$ac_compile") 2>conftest.er1
32874   ac_status=$?
32875   grep -v '^ *+' conftest.er1 >conftest.err
32876   rm -f conftest.er1
32877   cat conftest.err >&5
32878   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32879   (exit $ac_status); } && {
32880          test -z "$ac_c_werror_flag" ||
32881          test ! -s conftest.err
32882        } && test -s conftest.$ac_objext; then
32883   ac_cv_member_struct_passwd_pw_gecos=yes
32884 else
32885   echo "$as_me: failed program was:" >&5
32886 sed 's/^/| /' conftest.$ac_ext >&5
32887
32888         cat >conftest.$ac_ext <<_ACEOF
32889 /* confdefs.h.  */
32890 _ACEOF
32891 cat confdefs.h >>conftest.$ac_ext
32892 cat >>conftest.$ac_ext <<_ACEOF
32893 /* end confdefs.h.  */
32894 $ac_includes_default
32895 #include <pwd.h>
32896
32897 int
32898 main ()
32899 {
32900 static struct passwd ac_aggr;
32901 if (sizeof ac_aggr.pw_gecos)
32902 return 0;
32903   ;
32904   return 0;
32905 }
32906 _ACEOF
32907 rm -f conftest.$ac_objext
32908 if { (ac_try="$ac_compile"
32909 case "(($ac_try" in
32910   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32911   *) ac_try_echo=$ac_try;;
32912 esac
32913 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32914   (eval "$ac_compile") 2>conftest.er1
32915   ac_status=$?
32916   grep -v '^ *+' conftest.er1 >conftest.err
32917   rm -f conftest.er1
32918   cat conftest.err >&5
32919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32920   (exit $ac_status); } && {
32921          test -z "$ac_c_werror_flag" ||
32922          test ! -s conftest.err
32923        } && test -s conftest.$ac_objext; then
32924   ac_cv_member_struct_passwd_pw_gecos=yes
32925 else
32926   echo "$as_me: failed program was:" >&5
32927 sed 's/^/| /' conftest.$ac_ext >&5
32928
32929         ac_cv_member_struct_passwd_pw_gecos=no
32930 fi
32931
32932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32933 fi
32934
32935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32936 fi
32937 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_gecos" >&5
32938 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_gecos" >&6; }
32939 if test $ac_cv_member_struct_passwd_pw_gecos = yes; then
32940
32941 cat >>confdefs.h <<_ACEOF
32942 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
32943 _ACEOF
32944
32945
32946 fi
32947
32948 { echo "$as_me:$LINENO: checking for struct passwd.pw_passwd" >&5
32949 echo $ECHO_N "checking for struct passwd.pw_passwd... $ECHO_C" >&6; }
32950 if test "${ac_cv_member_struct_passwd_pw_passwd+set}" = set; then
32951   echo $ECHO_N "(cached) $ECHO_C" >&6
32952 else
32953   cat >conftest.$ac_ext <<_ACEOF
32954 /* confdefs.h.  */
32955 _ACEOF
32956 cat confdefs.h >>conftest.$ac_ext
32957 cat >>conftest.$ac_ext <<_ACEOF
32958 /* end confdefs.h.  */
32959 $ac_includes_default
32960 #include <pwd.h>
32961
32962 int
32963 main ()
32964 {
32965 static struct passwd ac_aggr;
32966 if (ac_aggr.pw_passwd)
32967 return 0;
32968   ;
32969   return 0;
32970 }
32971 _ACEOF
32972 rm -f conftest.$ac_objext
32973 if { (ac_try="$ac_compile"
32974 case "(($ac_try" in
32975   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32976   *) ac_try_echo=$ac_try;;
32977 esac
32978 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
32979   (eval "$ac_compile") 2>conftest.er1
32980   ac_status=$?
32981   grep -v '^ *+' conftest.er1 >conftest.err
32982   rm -f conftest.er1
32983   cat conftest.err >&5
32984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
32985   (exit $ac_status); } && {
32986          test -z "$ac_c_werror_flag" ||
32987          test ! -s conftest.err
32988        } && test -s conftest.$ac_objext; then
32989   ac_cv_member_struct_passwd_pw_passwd=yes
32990 else
32991   echo "$as_me: failed program was:" >&5
32992 sed 's/^/| /' conftest.$ac_ext >&5
32993
32994         cat >conftest.$ac_ext <<_ACEOF
32995 /* confdefs.h.  */
32996 _ACEOF
32997 cat confdefs.h >>conftest.$ac_ext
32998 cat >>conftest.$ac_ext <<_ACEOF
32999 /* end confdefs.h.  */
33000 $ac_includes_default
33001 #include <pwd.h>
33002
33003 int
33004 main ()
33005 {
33006 static struct passwd ac_aggr;
33007 if (sizeof ac_aggr.pw_passwd)
33008 return 0;
33009   ;
33010   return 0;
33011 }
33012 _ACEOF
33013 rm -f conftest.$ac_objext
33014 if { (ac_try="$ac_compile"
33015 case "(($ac_try" in
33016   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33017   *) ac_try_echo=$ac_try;;
33018 esac
33019 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33020   (eval "$ac_compile") 2>conftest.er1
33021   ac_status=$?
33022   grep -v '^ *+' conftest.er1 >conftest.err
33023   rm -f conftest.er1
33024   cat conftest.err >&5
33025   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33026   (exit $ac_status); } && {
33027          test -z "$ac_c_werror_flag" ||
33028          test ! -s conftest.err
33029        } && test -s conftest.$ac_objext; then
33030   ac_cv_member_struct_passwd_pw_passwd=yes
33031 else
33032   echo "$as_me: failed program was:" >&5
33033 sed 's/^/| /' conftest.$ac_ext >&5
33034
33035         ac_cv_member_struct_passwd_pw_passwd=no
33036 fi
33037
33038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33039 fi
33040
33041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33042 fi
33043 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_passwd" >&5
33044 echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_passwd" >&6; }
33045 if test $ac_cv_member_struct_passwd_pw_passwd = yes; then
33046
33047 cat >>confdefs.h <<_ACEOF
33048 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
33049 _ACEOF
33050
33051
33052 fi
33053
33054
33055 { echo "$as_me:$LINENO: checking if toupper() requires islower()" >&5
33056 echo $ECHO_N "checking if toupper() requires islower()... $ECHO_C" >&6; }
33057 if test "${ol_cv_c_upper_lower+set}" = set; then
33058   echo $ECHO_N "(cached) $ECHO_C" >&6
33059 else
33060
33061         if test "$cross_compiling" = yes; then
33062   ol_cv_c_upper_lower=safe
33063 else
33064   cat >conftest.$ac_ext <<_ACEOF
33065 /* confdefs.h.  */
33066 _ACEOF
33067 cat confdefs.h >>conftest.$ac_ext
33068 cat >>conftest.$ac_ext <<_ACEOF
33069 /* end confdefs.h.  */
33070
33071 #include <ctype.h>
33072 main()
33073 {
33074         if ('C' == toupper('C'))
33075                 exit(0);
33076         else
33077                 exit(1);
33078 }
33079 _ACEOF
33080 rm -f conftest$ac_exeext
33081 if { (ac_try="$ac_link"
33082 case "(($ac_try" in
33083   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33084   *) ac_try_echo=$ac_try;;
33085 esac
33086 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33087   (eval "$ac_link") 2>&5
33088   ac_status=$?
33089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33090   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
33091   { (case "(($ac_try" in
33092   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33093   *) ac_try_echo=$ac_try;;
33094 esac
33095 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33096   (eval "$ac_try") 2>&5
33097   ac_status=$?
33098   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33099   (exit $ac_status); }; }; then
33100   ol_cv_c_upper_lower=no
33101 else
33102   echo "$as_me: program exited with status $ac_status" >&5
33103 echo "$as_me: failed program was:" >&5
33104 sed 's/^/| /' conftest.$ac_ext >&5
33105
33106 ( exit $ac_status )
33107 ol_cv_c_upper_lower=yes
33108 fi
33109 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
33110 fi
33111
33112
33113 fi
33114 { echo "$as_me:$LINENO: result: $ol_cv_c_upper_lower" >&5
33115 echo "${ECHO_T}$ol_cv_c_upper_lower" >&6; }
33116 if test $ol_cv_c_upper_lower != no ; then
33117
33118 cat >>confdefs.h <<\_ACEOF
33119 #define C_UPPER_LOWER 1
33120 _ACEOF
33121
33122 fi
33123
33124 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
33125 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
33126 if test "${ac_cv_c_const+set}" = set; then
33127   echo $ECHO_N "(cached) $ECHO_C" >&6
33128 else
33129   cat >conftest.$ac_ext <<_ACEOF
33130 /* confdefs.h.  */
33131 _ACEOF
33132 cat confdefs.h >>conftest.$ac_ext
33133 cat >>conftest.$ac_ext <<_ACEOF
33134 /* end confdefs.h.  */
33135
33136 int
33137 main ()
33138 {
33139 /* FIXME: Include the comments suggested by Paul. */
33140 #ifndef __cplusplus
33141   /* Ultrix mips cc rejects this.  */
33142   typedef int charset[2];
33143   const charset cs;
33144   /* SunOS 4.1.1 cc rejects this.  */
33145   char const *const *pcpcc;
33146   char **ppc;
33147   /* NEC SVR4.0.2 mips cc rejects this.  */
33148   struct point {int x, y;};
33149   static struct point const zero = {0,0};
33150   /* AIX XL C 1.02.0.0 rejects this.
33151      It does not let you subtract one const X* pointer from another in
33152      an arm of an if-expression whose if-part is not a constant
33153      expression */
33154   const char *g = "string";
33155   pcpcc = &g + (g ? g-g : 0);
33156   /* HPUX 7.0 cc rejects these. */
33157   ++pcpcc;
33158   ppc = (char**) pcpcc;
33159   pcpcc = (char const *const *) ppc;
33160   { /* SCO 3.2v4 cc rejects this.  */
33161     char *t;
33162     char const *s = 0 ? (char *) 0 : (char const *) 0;
33163
33164     *t++ = 0;
33165     if (s) return 0;
33166   }
33167   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
33168     int x[] = {25, 17};
33169     const int *foo = &x[0];
33170     ++foo;
33171   }
33172   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
33173     typedef const int *iptr;
33174     iptr p = 0;
33175     ++p;
33176   }
33177   { /* AIX XL C 1.02.0.0 rejects this saying
33178        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
33179     struct s { int j; const int *ap[3]; };
33180     struct s *b; b->j = 5;
33181   }
33182   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
33183     const int foo = 10;
33184     if (!foo) return 0;
33185   }
33186   return !cs[0] && !zero.x;
33187 #endif
33188
33189   ;
33190   return 0;
33191 }
33192 _ACEOF
33193 rm -f conftest.$ac_objext
33194 if { (ac_try="$ac_compile"
33195 case "(($ac_try" in
33196   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33197   *) ac_try_echo=$ac_try;;
33198 esac
33199 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33200   (eval "$ac_compile") 2>conftest.er1
33201   ac_status=$?
33202   grep -v '^ *+' conftest.er1 >conftest.err
33203   rm -f conftest.er1
33204   cat conftest.err >&5
33205   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33206   (exit $ac_status); } && {
33207          test -z "$ac_c_werror_flag" ||
33208          test ! -s conftest.err
33209        } && test -s conftest.$ac_objext; then
33210   ac_cv_c_const=yes
33211 else
33212   echo "$as_me: failed program was:" >&5
33213 sed 's/^/| /' conftest.$ac_ext >&5
33214
33215         ac_cv_c_const=no
33216 fi
33217
33218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33219 fi
33220 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
33221 echo "${ECHO_T}$ac_cv_c_const" >&6; }
33222 if test $ac_cv_c_const = no; then
33223
33224 cat >>confdefs.h <<\_ACEOF
33225 #define const
33226 _ACEOF
33227
33228 fi
33229
33230 { echo "$as_me:$LINENO: checking if compiler understands volatile" >&5
33231 echo $ECHO_N "checking if compiler understands volatile... $ECHO_C" >&6; }
33232 if test "${ol_cv_c_volatile+set}" = set; then
33233   echo $ECHO_N "(cached) $ECHO_C" >&6
33234 else
33235   cat >conftest.$ac_ext <<_ACEOF
33236 /* confdefs.h.  */
33237 _ACEOF
33238 cat confdefs.h >>conftest.$ac_ext
33239 cat >>conftest.$ac_ext <<_ACEOF
33240 /* end confdefs.h.  */
33241 int x, y, z;
33242 int
33243 main ()
33244 {
33245 volatile int a; int * volatile b = x ? &y : &z;
33246       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
33247       *b = 0;
33248   ;
33249   return 0;
33250 }
33251 _ACEOF
33252 rm -f conftest.$ac_objext
33253 if { (ac_try="$ac_compile"
33254 case "(($ac_try" in
33255   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33256   *) ac_try_echo=$ac_try;;
33257 esac
33258 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33259   (eval "$ac_compile") 2>conftest.er1
33260   ac_status=$?
33261   grep -v '^ *+' conftest.er1 >conftest.err
33262   rm -f conftest.er1
33263   cat conftest.err >&5
33264   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33265   (exit $ac_status); } && {
33266          test -z "$ac_c_werror_flag" ||
33267          test ! -s conftest.err
33268        } && test -s conftest.$ac_objext; then
33269   ol_cv_c_volatile=yes
33270 else
33271   echo "$as_me: failed program was:" >&5
33272 sed 's/^/| /' conftest.$ac_ext >&5
33273
33274         ol_cv_c_volatile=no
33275 fi
33276
33277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33278 fi
33279 { echo "$as_me:$LINENO: result: $ol_cv_c_volatile" >&5
33280 echo "${ECHO_T}$ol_cv_c_volatile" >&6; }
33281   if test $ol_cv_c_volatile = yes; then
33282     :
33283   else
33284
33285 cat >>confdefs.h <<\_ACEOF
33286 #define volatile
33287 _ACEOF
33288
33289   fi
33290
33291
33292 if test $cross_compiling = yes ; then
33293         { echo "$as_me:$LINENO: WARNING: Crossing compiling... all bets are off!" >&5
33294 echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
33295
33296 cat >>confdefs.h <<\_ACEOF
33297 #define CROSS_COMPILING 1
33298 _ACEOF
33299
33300 else
33301         { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
33302 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
33303 if test "${ac_cv_c_bigendian+set}" = set; then
33304   echo $ECHO_N "(cached) $ECHO_C" >&6
33305 else
33306   # See if sys/param.h defines the BYTE_ORDER macro.
33307 cat >conftest.$ac_ext <<_ACEOF
33308 /* confdefs.h.  */
33309 _ACEOF
33310 cat confdefs.h >>conftest.$ac_ext
33311 cat >>conftest.$ac_ext <<_ACEOF
33312 /* end confdefs.h.  */
33313 #include <sys/types.h>
33314 #include <sys/param.h>
33315
33316 int
33317 main ()
33318 {
33319 #if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
33320         && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
33321  bogus endian macros
33322 #endif
33323
33324   ;
33325   return 0;
33326 }
33327 _ACEOF
33328 rm -f conftest.$ac_objext
33329 if { (ac_try="$ac_compile"
33330 case "(($ac_try" in
33331   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33332   *) ac_try_echo=$ac_try;;
33333 esac
33334 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33335   (eval "$ac_compile") 2>conftest.er1
33336   ac_status=$?
33337   grep -v '^ *+' conftest.er1 >conftest.err
33338   rm -f conftest.er1
33339   cat conftest.err >&5
33340   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33341   (exit $ac_status); } && {
33342          test -z "$ac_c_werror_flag" ||
33343          test ! -s conftest.err
33344        } && test -s conftest.$ac_objext; then
33345   # It does; now see whether it defined to BIG_ENDIAN or not.
33346 cat >conftest.$ac_ext <<_ACEOF
33347 /* confdefs.h.  */
33348 _ACEOF
33349 cat confdefs.h >>conftest.$ac_ext
33350 cat >>conftest.$ac_ext <<_ACEOF
33351 /* end confdefs.h.  */
33352 #include <sys/types.h>
33353 #include <sys/param.h>
33354
33355 int
33356 main ()
33357 {
33358 #if BYTE_ORDER != BIG_ENDIAN
33359  not big endian
33360 #endif
33361
33362   ;
33363   return 0;
33364 }
33365 _ACEOF
33366 rm -f conftest.$ac_objext
33367 if { (ac_try="$ac_compile"
33368 case "(($ac_try" in
33369   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33370   *) ac_try_echo=$ac_try;;
33371 esac
33372 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33373   (eval "$ac_compile") 2>conftest.er1
33374   ac_status=$?
33375   grep -v '^ *+' conftest.er1 >conftest.err
33376   rm -f conftest.er1
33377   cat conftest.err >&5
33378   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33379   (exit $ac_status); } && {
33380          test -z "$ac_c_werror_flag" ||
33381          test ! -s conftest.err
33382        } && test -s conftest.$ac_objext; then
33383   ac_cv_c_bigendian=yes
33384 else
33385   echo "$as_me: failed program was:" >&5
33386 sed 's/^/| /' conftest.$ac_ext >&5
33387
33388         ac_cv_c_bigendian=no
33389 fi
33390
33391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33392 else
33393   echo "$as_me: failed program was:" >&5
33394 sed 's/^/| /' conftest.$ac_ext >&5
33395
33396         # It does not; compile a test program.
33397 if test "$cross_compiling" = yes; then
33398   # try to guess the endianness by grepping values into an object file
33399   ac_cv_c_bigendian=unknown
33400   cat >conftest.$ac_ext <<_ACEOF
33401 /* confdefs.h.  */
33402 _ACEOF
33403 cat confdefs.h >>conftest.$ac_ext
33404 cat >>conftest.$ac_ext <<_ACEOF
33405 /* end confdefs.h.  */
33406 short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
33407 short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
33408 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
33409 short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
33410 short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
33411 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
33412 int
33413 main ()
33414 {
33415  _ascii (); _ebcdic ();
33416   ;
33417   return 0;
33418 }
33419 _ACEOF
33420 rm -f conftest.$ac_objext
33421 if { (ac_try="$ac_compile"
33422 case "(($ac_try" in
33423   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33424   *) ac_try_echo=$ac_try;;
33425 esac
33426 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33427   (eval "$ac_compile") 2>conftest.er1
33428   ac_status=$?
33429   grep -v '^ *+' conftest.er1 >conftest.err
33430   rm -f conftest.er1
33431   cat conftest.err >&5
33432   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33433   (exit $ac_status); } && {
33434          test -z "$ac_c_werror_flag" ||
33435          test ! -s conftest.err
33436        } && test -s conftest.$ac_objext; then
33437   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
33438   ac_cv_c_bigendian=yes
33439 fi
33440 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
33441   if test "$ac_cv_c_bigendian" = unknown; then
33442     ac_cv_c_bigendian=no
33443   else
33444     # finding both strings is unlikely to happen, but who knows?
33445     ac_cv_c_bigendian=unknown
33446   fi
33447 fi
33448 else
33449   echo "$as_me: failed program was:" >&5
33450 sed 's/^/| /' conftest.$ac_ext >&5
33451
33452
33453 fi
33454
33455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33456 else
33457   cat >conftest.$ac_ext <<_ACEOF
33458 /* confdefs.h.  */
33459 _ACEOF
33460 cat confdefs.h >>conftest.$ac_ext
33461 cat >>conftest.$ac_ext <<_ACEOF
33462 /* end confdefs.h.  */
33463 $ac_includes_default
33464 int
33465 main ()
33466 {
33467
33468   /* Are we little or big endian?  From Harbison&Steele.  */
33469   union
33470   {
33471     long int l;
33472     char c[sizeof (long int)];
33473   } u;
33474   u.l = 1;
33475   return u.c[sizeof (long int) - 1] == 1;
33476
33477   ;
33478   return 0;
33479 }
33480 _ACEOF
33481 rm -f conftest$ac_exeext
33482 if { (ac_try="$ac_link"
33483 case "(($ac_try" in
33484   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33485   *) ac_try_echo=$ac_try;;
33486 esac
33487 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33488   (eval "$ac_link") 2>&5
33489   ac_status=$?
33490   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33491   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
33492   { (case "(($ac_try" in
33493   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33494   *) ac_try_echo=$ac_try;;
33495 esac
33496 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33497   (eval "$ac_try") 2>&5
33498   ac_status=$?
33499   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33500   (exit $ac_status); }; }; then
33501   ac_cv_c_bigendian=no
33502 else
33503   echo "$as_me: program exited with status $ac_status" >&5
33504 echo "$as_me: failed program was:" >&5
33505 sed 's/^/| /' conftest.$ac_ext >&5
33506
33507 ( exit $ac_status )
33508 ac_cv_c_bigendian=yes
33509 fi
33510 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
33511 fi
33512
33513
33514 fi
33515
33516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33517 fi
33518 { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
33519 echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
33520 case $ac_cv_c_bigendian in
33521   yes)
33522
33523 cat >>confdefs.h <<\_ACEOF
33524 #define WORDS_BIGENDIAN 1
33525 _ACEOF
33526  ;;
33527   no)
33528      ;;
33529   *)
33530     { { echo "$as_me:$LINENO: error: unknown endianness
33531 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
33532 echo "$as_me: error: unknown endianness
33533 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
33534    { (exit 1); exit 1; }; } ;;
33535 esac
33536
33537 fi
33538
33539 { echo "$as_me:$LINENO: checking for short" >&5
33540 echo $ECHO_N "checking for short... $ECHO_C" >&6; }
33541 if test "${ac_cv_type_short+set}" = set; then
33542   echo $ECHO_N "(cached) $ECHO_C" >&6
33543 else
33544   cat >conftest.$ac_ext <<_ACEOF
33545 /* confdefs.h.  */
33546 _ACEOF
33547 cat confdefs.h >>conftest.$ac_ext
33548 cat >>conftest.$ac_ext <<_ACEOF
33549 /* end confdefs.h.  */
33550 $ac_includes_default
33551 typedef short ac__type_new_;
33552 int
33553 main ()
33554 {
33555 if ((ac__type_new_ *) 0)
33556   return 0;
33557 if (sizeof (ac__type_new_))
33558   return 0;
33559   ;
33560   return 0;
33561 }
33562 _ACEOF
33563 rm -f conftest.$ac_objext
33564 if { (ac_try="$ac_compile"
33565 case "(($ac_try" in
33566   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33567   *) ac_try_echo=$ac_try;;
33568 esac
33569 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33570   (eval "$ac_compile") 2>conftest.er1
33571   ac_status=$?
33572   grep -v '^ *+' conftest.er1 >conftest.err
33573   rm -f conftest.er1
33574   cat conftest.err >&5
33575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33576   (exit $ac_status); } && {
33577          test -z "$ac_c_werror_flag" ||
33578          test ! -s conftest.err
33579        } && test -s conftest.$ac_objext; then
33580   ac_cv_type_short=yes
33581 else
33582   echo "$as_me: failed program was:" >&5
33583 sed 's/^/| /' conftest.$ac_ext >&5
33584
33585         ac_cv_type_short=no
33586 fi
33587
33588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33589 fi
33590 { echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
33591 echo "${ECHO_T}$ac_cv_type_short" >&6; }
33592
33593 # The cast to long int works around a bug in the HP C Compiler
33594 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
33595 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
33596 # This bug is HP SR number 8606223364.
33597 { echo "$as_me:$LINENO: checking size of short" >&5
33598 echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
33599 if test "${ac_cv_sizeof_short+set}" = set; then
33600   echo $ECHO_N "(cached) $ECHO_C" >&6
33601 else
33602   if test "$cross_compiling" = yes; then
33603   # Depending upon the size, compute the lo and hi bounds.
33604 cat >conftest.$ac_ext <<_ACEOF
33605 /* confdefs.h.  */
33606 _ACEOF
33607 cat confdefs.h >>conftest.$ac_ext
33608 cat >>conftest.$ac_ext <<_ACEOF
33609 /* end confdefs.h.  */
33610 $ac_includes_default
33611    typedef short ac__type_sizeof_;
33612 int
33613 main ()
33614 {
33615 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
33616 test_array [0] = 0
33617
33618   ;
33619   return 0;
33620 }
33621 _ACEOF
33622 rm -f conftest.$ac_objext
33623 if { (ac_try="$ac_compile"
33624 case "(($ac_try" in
33625   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33626   *) ac_try_echo=$ac_try;;
33627 esac
33628 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33629   (eval "$ac_compile") 2>conftest.er1
33630   ac_status=$?
33631   grep -v '^ *+' conftest.er1 >conftest.err
33632   rm -f conftest.er1
33633   cat conftest.err >&5
33634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33635   (exit $ac_status); } && {
33636          test -z "$ac_c_werror_flag" ||
33637          test ! -s conftest.err
33638        } && test -s conftest.$ac_objext; then
33639   ac_lo=0 ac_mid=0
33640   while :; do
33641     cat >conftest.$ac_ext <<_ACEOF
33642 /* confdefs.h.  */
33643 _ACEOF
33644 cat confdefs.h >>conftest.$ac_ext
33645 cat >>conftest.$ac_ext <<_ACEOF
33646 /* end confdefs.h.  */
33647 $ac_includes_default
33648    typedef short ac__type_sizeof_;
33649 int
33650 main ()
33651 {
33652 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
33653 test_array [0] = 0
33654
33655   ;
33656   return 0;
33657 }
33658 _ACEOF
33659 rm -f conftest.$ac_objext
33660 if { (ac_try="$ac_compile"
33661 case "(($ac_try" in
33662   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33663   *) ac_try_echo=$ac_try;;
33664 esac
33665 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33666   (eval "$ac_compile") 2>conftest.er1
33667   ac_status=$?
33668   grep -v '^ *+' conftest.er1 >conftest.err
33669   rm -f conftest.er1
33670   cat conftest.err >&5
33671   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33672   (exit $ac_status); } && {
33673          test -z "$ac_c_werror_flag" ||
33674          test ! -s conftest.err
33675        } && test -s conftest.$ac_objext; then
33676   ac_hi=$ac_mid; break
33677 else
33678   echo "$as_me: failed program was:" >&5
33679 sed 's/^/| /' conftest.$ac_ext >&5
33680
33681         ac_lo=`expr $ac_mid + 1`
33682                         if test $ac_lo -le $ac_mid; then
33683                           ac_lo= ac_hi=
33684                           break
33685                         fi
33686                         ac_mid=`expr 2 '*' $ac_mid + 1`
33687 fi
33688
33689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33690   done
33691 else
33692   echo "$as_me: failed program was:" >&5
33693 sed 's/^/| /' conftest.$ac_ext >&5
33694
33695         cat >conftest.$ac_ext <<_ACEOF
33696 /* confdefs.h.  */
33697 _ACEOF
33698 cat confdefs.h >>conftest.$ac_ext
33699 cat >>conftest.$ac_ext <<_ACEOF
33700 /* end confdefs.h.  */
33701 $ac_includes_default
33702    typedef short ac__type_sizeof_;
33703 int
33704 main ()
33705 {
33706 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
33707 test_array [0] = 0
33708
33709   ;
33710   return 0;
33711 }
33712 _ACEOF
33713 rm -f conftest.$ac_objext
33714 if { (ac_try="$ac_compile"
33715 case "(($ac_try" in
33716   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33717   *) ac_try_echo=$ac_try;;
33718 esac
33719 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33720   (eval "$ac_compile") 2>conftest.er1
33721   ac_status=$?
33722   grep -v '^ *+' conftest.er1 >conftest.err
33723   rm -f conftest.er1
33724   cat conftest.err >&5
33725   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33726   (exit $ac_status); } && {
33727          test -z "$ac_c_werror_flag" ||
33728          test ! -s conftest.err
33729        } && test -s conftest.$ac_objext; then
33730   ac_hi=-1 ac_mid=-1
33731   while :; do
33732     cat >conftest.$ac_ext <<_ACEOF
33733 /* confdefs.h.  */
33734 _ACEOF
33735 cat confdefs.h >>conftest.$ac_ext
33736 cat >>conftest.$ac_ext <<_ACEOF
33737 /* end confdefs.h.  */
33738 $ac_includes_default
33739    typedef short ac__type_sizeof_;
33740 int
33741 main ()
33742 {
33743 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
33744 test_array [0] = 0
33745
33746   ;
33747   return 0;
33748 }
33749 _ACEOF
33750 rm -f conftest.$ac_objext
33751 if { (ac_try="$ac_compile"
33752 case "(($ac_try" in
33753   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33754   *) ac_try_echo=$ac_try;;
33755 esac
33756 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33757   (eval "$ac_compile") 2>conftest.er1
33758   ac_status=$?
33759   grep -v '^ *+' conftest.er1 >conftest.err
33760   rm -f conftest.er1
33761   cat conftest.err >&5
33762   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33763   (exit $ac_status); } && {
33764          test -z "$ac_c_werror_flag" ||
33765          test ! -s conftest.err
33766        } && test -s conftest.$ac_objext; then
33767   ac_lo=$ac_mid; break
33768 else
33769   echo "$as_me: failed program was:" >&5
33770 sed 's/^/| /' conftest.$ac_ext >&5
33771
33772         ac_hi=`expr '(' $ac_mid ')' - 1`
33773                         if test $ac_mid -le $ac_hi; then
33774                           ac_lo= ac_hi=
33775                           break
33776                         fi
33777                         ac_mid=`expr 2 '*' $ac_mid`
33778 fi
33779
33780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33781   done
33782 else
33783   echo "$as_me: failed program was:" >&5
33784 sed 's/^/| /' conftest.$ac_ext >&5
33785
33786         ac_lo= ac_hi=
33787 fi
33788
33789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33790 fi
33791
33792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33793 # Binary search between lo and hi bounds.
33794 while test "x$ac_lo" != "x$ac_hi"; do
33795   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
33796   cat >conftest.$ac_ext <<_ACEOF
33797 /* confdefs.h.  */
33798 _ACEOF
33799 cat confdefs.h >>conftest.$ac_ext
33800 cat >>conftest.$ac_ext <<_ACEOF
33801 /* end confdefs.h.  */
33802 $ac_includes_default
33803    typedef short ac__type_sizeof_;
33804 int
33805 main ()
33806 {
33807 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
33808 test_array [0] = 0
33809
33810   ;
33811   return 0;
33812 }
33813 _ACEOF
33814 rm -f conftest.$ac_objext
33815 if { (ac_try="$ac_compile"
33816 case "(($ac_try" in
33817   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33818   *) ac_try_echo=$ac_try;;
33819 esac
33820 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33821   (eval "$ac_compile") 2>conftest.er1
33822   ac_status=$?
33823   grep -v '^ *+' conftest.er1 >conftest.err
33824   rm -f conftest.er1
33825   cat conftest.err >&5
33826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33827   (exit $ac_status); } && {
33828          test -z "$ac_c_werror_flag" ||
33829          test ! -s conftest.err
33830        } && test -s conftest.$ac_objext; then
33831   ac_hi=$ac_mid
33832 else
33833   echo "$as_me: failed program was:" >&5
33834 sed 's/^/| /' conftest.$ac_ext >&5
33835
33836         ac_lo=`expr '(' $ac_mid ')' + 1`
33837 fi
33838
33839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33840 done
33841 case $ac_lo in
33842 ?*) ac_cv_sizeof_short=$ac_lo;;
33843 '') if test "$ac_cv_type_short" = yes; then
33844      { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
33845 See \`config.log' for more details." >&5
33846 echo "$as_me: error: cannot compute sizeof (short)
33847 See \`config.log' for more details." >&2;}
33848    { (exit 77); exit 77; }; }
33849    else
33850      ac_cv_sizeof_short=0
33851    fi ;;
33852 esac
33853 else
33854   cat >conftest.$ac_ext <<_ACEOF
33855 /* confdefs.h.  */
33856 _ACEOF
33857 cat confdefs.h >>conftest.$ac_ext
33858 cat >>conftest.$ac_ext <<_ACEOF
33859 /* end confdefs.h.  */
33860 $ac_includes_default
33861    typedef short ac__type_sizeof_;
33862 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
33863 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
33864 #include <stdio.h>
33865 #include <stdlib.h>
33866 int
33867 main ()
33868 {
33869
33870   FILE *f = fopen ("conftest.val", "w");
33871   if (! f)
33872     return 1;
33873   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
33874     {
33875       long int i = longval ();
33876       if (i != ((long int) (sizeof (ac__type_sizeof_))))
33877         return 1;
33878       fprintf (f, "%ld\n", i);
33879     }
33880   else
33881     {
33882       unsigned long int i = ulongval ();
33883       if (i != ((long int) (sizeof (ac__type_sizeof_))))
33884         return 1;
33885       fprintf (f, "%lu\n", i);
33886     }
33887   return ferror (f) || fclose (f) != 0;
33888
33889   ;
33890   return 0;
33891 }
33892 _ACEOF
33893 rm -f conftest$ac_exeext
33894 if { (ac_try="$ac_link"
33895 case "(($ac_try" in
33896   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33897   *) ac_try_echo=$ac_try;;
33898 esac
33899 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33900   (eval "$ac_link") 2>&5
33901   ac_status=$?
33902   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33903   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
33904   { (case "(($ac_try" in
33905   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33906   *) ac_try_echo=$ac_try;;
33907 esac
33908 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33909   (eval "$ac_try") 2>&5
33910   ac_status=$?
33911   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33912   (exit $ac_status); }; }; then
33913   ac_cv_sizeof_short=`cat conftest.val`
33914 else
33915   echo "$as_me: program exited with status $ac_status" >&5
33916 echo "$as_me: failed program was:" >&5
33917 sed 's/^/| /' conftest.$ac_ext >&5
33918
33919 ( exit $ac_status )
33920 if test "$ac_cv_type_short" = yes; then
33921      { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
33922 See \`config.log' for more details." >&5
33923 echo "$as_me: error: cannot compute sizeof (short)
33924 See \`config.log' for more details." >&2;}
33925    { (exit 77); exit 77; }; }
33926    else
33927      ac_cv_sizeof_short=0
33928    fi
33929 fi
33930 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
33931 fi
33932 rm -f conftest.val
33933 fi
33934 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
33935 echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
33936
33937
33938
33939 cat >>confdefs.h <<_ACEOF
33940 #define SIZEOF_SHORT $ac_cv_sizeof_short
33941 _ACEOF
33942
33943
33944 { echo "$as_me:$LINENO: checking for int" >&5
33945 echo $ECHO_N "checking for int... $ECHO_C" >&6; }
33946 if test "${ac_cv_type_int+set}" = set; then
33947   echo $ECHO_N "(cached) $ECHO_C" >&6
33948 else
33949   cat >conftest.$ac_ext <<_ACEOF
33950 /* confdefs.h.  */
33951 _ACEOF
33952 cat confdefs.h >>conftest.$ac_ext
33953 cat >>conftest.$ac_ext <<_ACEOF
33954 /* end confdefs.h.  */
33955 $ac_includes_default
33956 typedef int ac__type_new_;
33957 int
33958 main ()
33959 {
33960 if ((ac__type_new_ *) 0)
33961   return 0;
33962 if (sizeof (ac__type_new_))
33963   return 0;
33964   ;
33965   return 0;
33966 }
33967 _ACEOF
33968 rm -f conftest.$ac_objext
33969 if { (ac_try="$ac_compile"
33970 case "(($ac_try" in
33971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33972   *) ac_try_echo=$ac_try;;
33973 esac
33974 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
33975   (eval "$ac_compile") 2>conftest.er1
33976   ac_status=$?
33977   grep -v '^ *+' conftest.er1 >conftest.err
33978   rm -f conftest.er1
33979   cat conftest.err >&5
33980   echo "$as_me:$LINENO: \$? = $ac_status" >&5
33981   (exit $ac_status); } && {
33982          test -z "$ac_c_werror_flag" ||
33983          test ! -s conftest.err
33984        } && test -s conftest.$ac_objext; then
33985   ac_cv_type_int=yes
33986 else
33987   echo "$as_me: failed program was:" >&5
33988 sed 's/^/| /' conftest.$ac_ext >&5
33989
33990         ac_cv_type_int=no
33991 fi
33992
33993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33994 fi
33995 { echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
33996 echo "${ECHO_T}$ac_cv_type_int" >&6; }
33997
33998 # The cast to long int works around a bug in the HP C Compiler
33999 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
34000 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
34001 # This bug is HP SR number 8606223364.
34002 { echo "$as_me:$LINENO: checking size of int" >&5
34003 echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
34004 if test "${ac_cv_sizeof_int+set}" = set; then
34005   echo $ECHO_N "(cached) $ECHO_C" >&6
34006 else
34007   if test "$cross_compiling" = yes; then
34008   # Depending upon the size, compute the lo and hi bounds.
34009 cat >conftest.$ac_ext <<_ACEOF
34010 /* confdefs.h.  */
34011 _ACEOF
34012 cat confdefs.h >>conftest.$ac_ext
34013 cat >>conftest.$ac_ext <<_ACEOF
34014 /* end confdefs.h.  */
34015 $ac_includes_default
34016    typedef int ac__type_sizeof_;
34017 int
34018 main ()
34019 {
34020 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
34021 test_array [0] = 0
34022
34023   ;
34024   return 0;
34025 }
34026 _ACEOF
34027 rm -f conftest.$ac_objext
34028 if { (ac_try="$ac_compile"
34029 case "(($ac_try" in
34030   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34031   *) ac_try_echo=$ac_try;;
34032 esac
34033 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34034   (eval "$ac_compile") 2>conftest.er1
34035   ac_status=$?
34036   grep -v '^ *+' conftest.er1 >conftest.err
34037   rm -f conftest.er1
34038   cat conftest.err >&5
34039   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34040   (exit $ac_status); } && {
34041          test -z "$ac_c_werror_flag" ||
34042          test ! -s conftest.err
34043        } && test -s conftest.$ac_objext; then
34044   ac_lo=0 ac_mid=0
34045   while :; do
34046     cat >conftest.$ac_ext <<_ACEOF
34047 /* confdefs.h.  */
34048 _ACEOF
34049 cat confdefs.h >>conftest.$ac_ext
34050 cat >>conftest.$ac_ext <<_ACEOF
34051 /* end confdefs.h.  */
34052 $ac_includes_default
34053    typedef int ac__type_sizeof_;
34054 int
34055 main ()
34056 {
34057 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
34058 test_array [0] = 0
34059
34060   ;
34061   return 0;
34062 }
34063 _ACEOF
34064 rm -f conftest.$ac_objext
34065 if { (ac_try="$ac_compile"
34066 case "(($ac_try" in
34067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34068   *) ac_try_echo=$ac_try;;
34069 esac
34070 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34071   (eval "$ac_compile") 2>conftest.er1
34072   ac_status=$?
34073   grep -v '^ *+' conftest.er1 >conftest.err
34074   rm -f conftest.er1
34075   cat conftest.err >&5
34076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34077   (exit $ac_status); } && {
34078          test -z "$ac_c_werror_flag" ||
34079          test ! -s conftest.err
34080        } && test -s conftest.$ac_objext; then
34081   ac_hi=$ac_mid; break
34082 else
34083   echo "$as_me: failed program was:" >&5
34084 sed 's/^/| /' conftest.$ac_ext >&5
34085
34086         ac_lo=`expr $ac_mid + 1`
34087                         if test $ac_lo -le $ac_mid; then
34088                           ac_lo= ac_hi=
34089                           break
34090                         fi
34091                         ac_mid=`expr 2 '*' $ac_mid + 1`
34092 fi
34093
34094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34095   done
34096 else
34097   echo "$as_me: failed program was:" >&5
34098 sed 's/^/| /' conftest.$ac_ext >&5
34099
34100         cat >conftest.$ac_ext <<_ACEOF
34101 /* confdefs.h.  */
34102 _ACEOF
34103 cat confdefs.h >>conftest.$ac_ext
34104 cat >>conftest.$ac_ext <<_ACEOF
34105 /* end confdefs.h.  */
34106 $ac_includes_default
34107    typedef int ac__type_sizeof_;
34108 int
34109 main ()
34110 {
34111 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
34112 test_array [0] = 0
34113
34114   ;
34115   return 0;
34116 }
34117 _ACEOF
34118 rm -f conftest.$ac_objext
34119 if { (ac_try="$ac_compile"
34120 case "(($ac_try" in
34121   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34122   *) ac_try_echo=$ac_try;;
34123 esac
34124 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34125   (eval "$ac_compile") 2>conftest.er1
34126   ac_status=$?
34127   grep -v '^ *+' conftest.er1 >conftest.err
34128   rm -f conftest.er1
34129   cat conftest.err >&5
34130   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34131   (exit $ac_status); } && {
34132          test -z "$ac_c_werror_flag" ||
34133          test ! -s conftest.err
34134        } && test -s conftest.$ac_objext; then
34135   ac_hi=-1 ac_mid=-1
34136   while :; do
34137     cat >conftest.$ac_ext <<_ACEOF
34138 /* confdefs.h.  */
34139 _ACEOF
34140 cat confdefs.h >>conftest.$ac_ext
34141 cat >>conftest.$ac_ext <<_ACEOF
34142 /* end confdefs.h.  */
34143 $ac_includes_default
34144    typedef int ac__type_sizeof_;
34145 int
34146 main ()
34147 {
34148 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
34149 test_array [0] = 0
34150
34151   ;
34152   return 0;
34153 }
34154 _ACEOF
34155 rm -f conftest.$ac_objext
34156 if { (ac_try="$ac_compile"
34157 case "(($ac_try" in
34158   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34159   *) ac_try_echo=$ac_try;;
34160 esac
34161 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34162   (eval "$ac_compile") 2>conftest.er1
34163   ac_status=$?
34164   grep -v '^ *+' conftest.er1 >conftest.err
34165   rm -f conftest.er1
34166   cat conftest.err >&5
34167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34168   (exit $ac_status); } && {
34169          test -z "$ac_c_werror_flag" ||
34170          test ! -s conftest.err
34171        } && test -s conftest.$ac_objext; then
34172   ac_lo=$ac_mid; break
34173 else
34174   echo "$as_me: failed program was:" >&5
34175 sed 's/^/| /' conftest.$ac_ext >&5
34176
34177         ac_hi=`expr '(' $ac_mid ')' - 1`
34178                         if test $ac_mid -le $ac_hi; then
34179                           ac_lo= ac_hi=
34180                           break
34181                         fi
34182                         ac_mid=`expr 2 '*' $ac_mid`
34183 fi
34184
34185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34186   done
34187 else
34188   echo "$as_me: failed program was:" >&5
34189 sed 's/^/| /' conftest.$ac_ext >&5
34190
34191         ac_lo= ac_hi=
34192 fi
34193
34194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34195 fi
34196
34197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34198 # Binary search between lo and hi bounds.
34199 while test "x$ac_lo" != "x$ac_hi"; do
34200   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
34201   cat >conftest.$ac_ext <<_ACEOF
34202 /* confdefs.h.  */
34203 _ACEOF
34204 cat confdefs.h >>conftest.$ac_ext
34205 cat >>conftest.$ac_ext <<_ACEOF
34206 /* end confdefs.h.  */
34207 $ac_includes_default
34208    typedef int ac__type_sizeof_;
34209 int
34210 main ()
34211 {
34212 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
34213 test_array [0] = 0
34214
34215   ;
34216   return 0;
34217 }
34218 _ACEOF
34219 rm -f conftest.$ac_objext
34220 if { (ac_try="$ac_compile"
34221 case "(($ac_try" in
34222   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34223   *) ac_try_echo=$ac_try;;
34224 esac
34225 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34226   (eval "$ac_compile") 2>conftest.er1
34227   ac_status=$?
34228   grep -v '^ *+' conftest.er1 >conftest.err
34229   rm -f conftest.er1
34230   cat conftest.err >&5
34231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34232   (exit $ac_status); } && {
34233          test -z "$ac_c_werror_flag" ||
34234          test ! -s conftest.err
34235        } && test -s conftest.$ac_objext; then
34236   ac_hi=$ac_mid
34237 else
34238   echo "$as_me: failed program was:" >&5
34239 sed 's/^/| /' conftest.$ac_ext >&5
34240
34241         ac_lo=`expr '(' $ac_mid ')' + 1`
34242 fi
34243
34244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34245 done
34246 case $ac_lo in
34247 ?*) ac_cv_sizeof_int=$ac_lo;;
34248 '') if test "$ac_cv_type_int" = yes; then
34249      { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
34250 See \`config.log' for more details." >&5
34251 echo "$as_me: error: cannot compute sizeof (int)
34252 See \`config.log' for more details." >&2;}
34253    { (exit 77); exit 77; }; }
34254    else
34255      ac_cv_sizeof_int=0
34256    fi ;;
34257 esac
34258 else
34259   cat >conftest.$ac_ext <<_ACEOF
34260 /* confdefs.h.  */
34261 _ACEOF
34262 cat confdefs.h >>conftest.$ac_ext
34263 cat >>conftest.$ac_ext <<_ACEOF
34264 /* end confdefs.h.  */
34265 $ac_includes_default
34266    typedef int ac__type_sizeof_;
34267 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
34268 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
34269 #include <stdio.h>
34270 #include <stdlib.h>
34271 int
34272 main ()
34273 {
34274
34275   FILE *f = fopen ("conftest.val", "w");
34276   if (! f)
34277     return 1;
34278   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
34279     {
34280       long int i = longval ();
34281       if (i != ((long int) (sizeof (ac__type_sizeof_))))
34282         return 1;
34283       fprintf (f, "%ld\n", i);
34284     }
34285   else
34286     {
34287       unsigned long int i = ulongval ();
34288       if (i != ((long int) (sizeof (ac__type_sizeof_))))
34289         return 1;
34290       fprintf (f, "%lu\n", i);
34291     }
34292   return ferror (f) || fclose (f) != 0;
34293
34294   ;
34295   return 0;
34296 }
34297 _ACEOF
34298 rm -f conftest$ac_exeext
34299 if { (ac_try="$ac_link"
34300 case "(($ac_try" in
34301   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34302   *) ac_try_echo=$ac_try;;
34303 esac
34304 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34305   (eval "$ac_link") 2>&5
34306   ac_status=$?
34307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34308   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34309   { (case "(($ac_try" in
34310   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34311   *) ac_try_echo=$ac_try;;
34312 esac
34313 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34314   (eval "$ac_try") 2>&5
34315   ac_status=$?
34316   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34317   (exit $ac_status); }; }; then
34318   ac_cv_sizeof_int=`cat conftest.val`
34319 else
34320   echo "$as_me: program exited with status $ac_status" >&5
34321 echo "$as_me: failed program was:" >&5
34322 sed 's/^/| /' conftest.$ac_ext >&5
34323
34324 ( exit $ac_status )
34325 if test "$ac_cv_type_int" = yes; then
34326      { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
34327 See \`config.log' for more details." >&5
34328 echo "$as_me: error: cannot compute sizeof (int)
34329 See \`config.log' for more details." >&2;}
34330    { (exit 77); exit 77; }; }
34331    else
34332      ac_cv_sizeof_int=0
34333    fi
34334 fi
34335 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34336 fi
34337 rm -f conftest.val
34338 fi
34339 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
34340 echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
34341
34342
34343
34344 cat >>confdefs.h <<_ACEOF
34345 #define SIZEOF_INT $ac_cv_sizeof_int
34346 _ACEOF
34347
34348
34349 { echo "$as_me:$LINENO: checking for long" >&5
34350 echo $ECHO_N "checking for long... $ECHO_C" >&6; }
34351 if test "${ac_cv_type_long+set}" = set; then
34352   echo $ECHO_N "(cached) $ECHO_C" >&6
34353 else
34354   cat >conftest.$ac_ext <<_ACEOF
34355 /* confdefs.h.  */
34356 _ACEOF
34357 cat confdefs.h >>conftest.$ac_ext
34358 cat >>conftest.$ac_ext <<_ACEOF
34359 /* end confdefs.h.  */
34360 $ac_includes_default
34361 typedef long ac__type_new_;
34362 int
34363 main ()
34364 {
34365 if ((ac__type_new_ *) 0)
34366   return 0;
34367 if (sizeof (ac__type_new_))
34368   return 0;
34369   ;
34370   return 0;
34371 }
34372 _ACEOF
34373 rm -f conftest.$ac_objext
34374 if { (ac_try="$ac_compile"
34375 case "(($ac_try" in
34376   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34377   *) ac_try_echo=$ac_try;;
34378 esac
34379 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34380   (eval "$ac_compile") 2>conftest.er1
34381   ac_status=$?
34382   grep -v '^ *+' conftest.er1 >conftest.err
34383   rm -f conftest.er1
34384   cat conftest.err >&5
34385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34386   (exit $ac_status); } && {
34387          test -z "$ac_c_werror_flag" ||
34388          test ! -s conftest.err
34389        } && test -s conftest.$ac_objext; then
34390   ac_cv_type_long=yes
34391 else
34392   echo "$as_me: failed program was:" >&5
34393 sed 's/^/| /' conftest.$ac_ext >&5
34394
34395         ac_cv_type_long=no
34396 fi
34397
34398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34399 fi
34400 { echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
34401 echo "${ECHO_T}$ac_cv_type_long" >&6; }
34402
34403 # The cast to long int works around a bug in the HP C Compiler
34404 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
34405 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
34406 # This bug is HP SR number 8606223364.
34407 { echo "$as_me:$LINENO: checking size of long" >&5
34408 echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
34409 if test "${ac_cv_sizeof_long+set}" = set; then
34410   echo $ECHO_N "(cached) $ECHO_C" >&6
34411 else
34412   if test "$cross_compiling" = yes; then
34413   # Depending upon the size, compute the lo and hi bounds.
34414 cat >conftest.$ac_ext <<_ACEOF
34415 /* confdefs.h.  */
34416 _ACEOF
34417 cat confdefs.h >>conftest.$ac_ext
34418 cat >>conftest.$ac_ext <<_ACEOF
34419 /* end confdefs.h.  */
34420 $ac_includes_default
34421    typedef long ac__type_sizeof_;
34422 int
34423 main ()
34424 {
34425 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
34426 test_array [0] = 0
34427
34428   ;
34429   return 0;
34430 }
34431 _ACEOF
34432 rm -f conftest.$ac_objext
34433 if { (ac_try="$ac_compile"
34434 case "(($ac_try" in
34435   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34436   *) ac_try_echo=$ac_try;;
34437 esac
34438 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34439   (eval "$ac_compile") 2>conftest.er1
34440   ac_status=$?
34441   grep -v '^ *+' conftest.er1 >conftest.err
34442   rm -f conftest.er1
34443   cat conftest.err >&5
34444   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34445   (exit $ac_status); } && {
34446          test -z "$ac_c_werror_flag" ||
34447          test ! -s conftest.err
34448        } && test -s conftest.$ac_objext; then
34449   ac_lo=0 ac_mid=0
34450   while :; do
34451     cat >conftest.$ac_ext <<_ACEOF
34452 /* confdefs.h.  */
34453 _ACEOF
34454 cat confdefs.h >>conftest.$ac_ext
34455 cat >>conftest.$ac_ext <<_ACEOF
34456 /* end confdefs.h.  */
34457 $ac_includes_default
34458    typedef long ac__type_sizeof_;
34459 int
34460 main ()
34461 {
34462 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
34463 test_array [0] = 0
34464
34465   ;
34466   return 0;
34467 }
34468 _ACEOF
34469 rm -f conftest.$ac_objext
34470 if { (ac_try="$ac_compile"
34471 case "(($ac_try" in
34472   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34473   *) ac_try_echo=$ac_try;;
34474 esac
34475 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34476   (eval "$ac_compile") 2>conftest.er1
34477   ac_status=$?
34478   grep -v '^ *+' conftest.er1 >conftest.err
34479   rm -f conftest.er1
34480   cat conftest.err >&5
34481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34482   (exit $ac_status); } && {
34483          test -z "$ac_c_werror_flag" ||
34484          test ! -s conftest.err
34485        } && test -s conftest.$ac_objext; then
34486   ac_hi=$ac_mid; break
34487 else
34488   echo "$as_me: failed program was:" >&5
34489 sed 's/^/| /' conftest.$ac_ext >&5
34490
34491         ac_lo=`expr $ac_mid + 1`
34492                         if test $ac_lo -le $ac_mid; then
34493                           ac_lo= ac_hi=
34494                           break
34495                         fi
34496                         ac_mid=`expr 2 '*' $ac_mid + 1`
34497 fi
34498
34499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34500   done
34501 else
34502   echo "$as_me: failed program was:" >&5
34503 sed 's/^/| /' conftest.$ac_ext >&5
34504
34505         cat >conftest.$ac_ext <<_ACEOF
34506 /* confdefs.h.  */
34507 _ACEOF
34508 cat confdefs.h >>conftest.$ac_ext
34509 cat >>conftest.$ac_ext <<_ACEOF
34510 /* end confdefs.h.  */
34511 $ac_includes_default
34512    typedef long ac__type_sizeof_;
34513 int
34514 main ()
34515 {
34516 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
34517 test_array [0] = 0
34518
34519   ;
34520   return 0;
34521 }
34522 _ACEOF
34523 rm -f conftest.$ac_objext
34524 if { (ac_try="$ac_compile"
34525 case "(($ac_try" in
34526   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34527   *) ac_try_echo=$ac_try;;
34528 esac
34529 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34530   (eval "$ac_compile") 2>conftest.er1
34531   ac_status=$?
34532   grep -v '^ *+' conftest.er1 >conftest.err
34533   rm -f conftest.er1
34534   cat conftest.err >&5
34535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34536   (exit $ac_status); } && {
34537          test -z "$ac_c_werror_flag" ||
34538          test ! -s conftest.err
34539        } && test -s conftest.$ac_objext; then
34540   ac_hi=-1 ac_mid=-1
34541   while :; do
34542     cat >conftest.$ac_ext <<_ACEOF
34543 /* confdefs.h.  */
34544 _ACEOF
34545 cat confdefs.h >>conftest.$ac_ext
34546 cat >>conftest.$ac_ext <<_ACEOF
34547 /* end confdefs.h.  */
34548 $ac_includes_default
34549    typedef long ac__type_sizeof_;
34550 int
34551 main ()
34552 {
34553 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
34554 test_array [0] = 0
34555
34556   ;
34557   return 0;
34558 }
34559 _ACEOF
34560 rm -f conftest.$ac_objext
34561 if { (ac_try="$ac_compile"
34562 case "(($ac_try" in
34563   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34564   *) ac_try_echo=$ac_try;;
34565 esac
34566 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34567   (eval "$ac_compile") 2>conftest.er1
34568   ac_status=$?
34569   grep -v '^ *+' conftest.er1 >conftest.err
34570   rm -f conftest.er1
34571   cat conftest.err >&5
34572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34573   (exit $ac_status); } && {
34574          test -z "$ac_c_werror_flag" ||
34575          test ! -s conftest.err
34576        } && test -s conftest.$ac_objext; then
34577   ac_lo=$ac_mid; break
34578 else
34579   echo "$as_me: failed program was:" >&5
34580 sed 's/^/| /' conftest.$ac_ext >&5
34581
34582         ac_hi=`expr '(' $ac_mid ')' - 1`
34583                         if test $ac_mid -le $ac_hi; then
34584                           ac_lo= ac_hi=
34585                           break
34586                         fi
34587                         ac_mid=`expr 2 '*' $ac_mid`
34588 fi
34589
34590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34591   done
34592 else
34593   echo "$as_me: failed program was:" >&5
34594 sed 's/^/| /' conftest.$ac_ext >&5
34595
34596         ac_lo= ac_hi=
34597 fi
34598
34599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34600 fi
34601
34602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34603 # Binary search between lo and hi bounds.
34604 while test "x$ac_lo" != "x$ac_hi"; do
34605   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
34606   cat >conftest.$ac_ext <<_ACEOF
34607 /* confdefs.h.  */
34608 _ACEOF
34609 cat confdefs.h >>conftest.$ac_ext
34610 cat >>conftest.$ac_ext <<_ACEOF
34611 /* end confdefs.h.  */
34612 $ac_includes_default
34613    typedef long ac__type_sizeof_;
34614 int
34615 main ()
34616 {
34617 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
34618 test_array [0] = 0
34619
34620   ;
34621   return 0;
34622 }
34623 _ACEOF
34624 rm -f conftest.$ac_objext
34625 if { (ac_try="$ac_compile"
34626 case "(($ac_try" in
34627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34628   *) ac_try_echo=$ac_try;;
34629 esac
34630 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34631   (eval "$ac_compile") 2>conftest.er1
34632   ac_status=$?
34633   grep -v '^ *+' conftest.er1 >conftest.err
34634   rm -f conftest.er1
34635   cat conftest.err >&5
34636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34637   (exit $ac_status); } && {
34638          test -z "$ac_c_werror_flag" ||
34639          test ! -s conftest.err
34640        } && test -s conftest.$ac_objext; then
34641   ac_hi=$ac_mid
34642 else
34643   echo "$as_me: failed program was:" >&5
34644 sed 's/^/| /' conftest.$ac_ext >&5
34645
34646         ac_lo=`expr '(' $ac_mid ')' + 1`
34647 fi
34648
34649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34650 done
34651 case $ac_lo in
34652 ?*) ac_cv_sizeof_long=$ac_lo;;
34653 '') if test "$ac_cv_type_long" = yes; then
34654      { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
34655 See \`config.log' for more details." >&5
34656 echo "$as_me: error: cannot compute sizeof (long)
34657 See \`config.log' for more details." >&2;}
34658    { (exit 77); exit 77; }; }
34659    else
34660      ac_cv_sizeof_long=0
34661    fi ;;
34662 esac
34663 else
34664   cat >conftest.$ac_ext <<_ACEOF
34665 /* confdefs.h.  */
34666 _ACEOF
34667 cat confdefs.h >>conftest.$ac_ext
34668 cat >>conftest.$ac_ext <<_ACEOF
34669 /* end confdefs.h.  */
34670 $ac_includes_default
34671    typedef long ac__type_sizeof_;
34672 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
34673 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
34674 #include <stdio.h>
34675 #include <stdlib.h>
34676 int
34677 main ()
34678 {
34679
34680   FILE *f = fopen ("conftest.val", "w");
34681   if (! f)
34682     return 1;
34683   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
34684     {
34685       long int i = longval ();
34686       if (i != ((long int) (sizeof (ac__type_sizeof_))))
34687         return 1;
34688       fprintf (f, "%ld\n", i);
34689     }
34690   else
34691     {
34692       unsigned long int i = ulongval ();
34693       if (i != ((long int) (sizeof (ac__type_sizeof_))))
34694         return 1;
34695       fprintf (f, "%lu\n", i);
34696     }
34697   return ferror (f) || fclose (f) != 0;
34698
34699   ;
34700   return 0;
34701 }
34702 _ACEOF
34703 rm -f conftest$ac_exeext
34704 if { (ac_try="$ac_link"
34705 case "(($ac_try" in
34706   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34707   *) ac_try_echo=$ac_try;;
34708 esac
34709 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34710   (eval "$ac_link") 2>&5
34711   ac_status=$?
34712   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34713   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
34714   { (case "(($ac_try" in
34715   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34716   *) ac_try_echo=$ac_try;;
34717 esac
34718 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34719   (eval "$ac_try") 2>&5
34720   ac_status=$?
34721   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34722   (exit $ac_status); }; }; then
34723   ac_cv_sizeof_long=`cat conftest.val`
34724 else
34725   echo "$as_me: program exited with status $ac_status" >&5
34726 echo "$as_me: failed program was:" >&5
34727 sed 's/^/| /' conftest.$ac_ext >&5
34728
34729 ( exit $ac_status )
34730 if test "$ac_cv_type_long" = yes; then
34731      { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
34732 See \`config.log' for more details." >&5
34733 echo "$as_me: error: cannot compute sizeof (long)
34734 See \`config.log' for more details." >&2;}
34735    { (exit 77); exit 77; }; }
34736    else
34737      ac_cv_sizeof_long=0
34738    fi
34739 fi
34740 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
34741 fi
34742 rm -f conftest.val
34743 fi
34744 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
34745 echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
34746
34747
34748
34749 cat >>confdefs.h <<_ACEOF
34750 #define SIZEOF_LONG $ac_cv_sizeof_long
34751 _ACEOF
34752
34753
34754 { echo "$as_me:$LINENO: checking for long long" >&5
34755 echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
34756 if test "${ac_cv_type_long_long+set}" = set; then
34757   echo $ECHO_N "(cached) $ECHO_C" >&6
34758 else
34759   cat >conftest.$ac_ext <<_ACEOF
34760 /* confdefs.h.  */
34761 _ACEOF
34762 cat confdefs.h >>conftest.$ac_ext
34763 cat >>conftest.$ac_ext <<_ACEOF
34764 /* end confdefs.h.  */
34765 $ac_includes_default
34766 typedef long long ac__type_new_;
34767 int
34768 main ()
34769 {
34770 if ((ac__type_new_ *) 0)
34771   return 0;
34772 if (sizeof (ac__type_new_))
34773   return 0;
34774   ;
34775   return 0;
34776 }
34777 _ACEOF
34778 rm -f conftest.$ac_objext
34779 if { (ac_try="$ac_compile"
34780 case "(($ac_try" in
34781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34782   *) ac_try_echo=$ac_try;;
34783 esac
34784 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34785   (eval "$ac_compile") 2>conftest.er1
34786   ac_status=$?
34787   grep -v '^ *+' conftest.er1 >conftest.err
34788   rm -f conftest.er1
34789   cat conftest.err >&5
34790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34791   (exit $ac_status); } && {
34792          test -z "$ac_c_werror_flag" ||
34793          test ! -s conftest.err
34794        } && test -s conftest.$ac_objext; then
34795   ac_cv_type_long_long=yes
34796 else
34797   echo "$as_me: failed program was:" >&5
34798 sed 's/^/| /' conftest.$ac_ext >&5
34799
34800         ac_cv_type_long_long=no
34801 fi
34802
34803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34804 fi
34805 { echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
34806 echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
34807
34808 # The cast to long int works around a bug in the HP C Compiler
34809 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
34810 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
34811 # This bug is HP SR number 8606223364.
34812 { echo "$as_me:$LINENO: checking size of long long" >&5
34813 echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
34814 if test "${ac_cv_sizeof_long_long+set}" = set; then
34815   echo $ECHO_N "(cached) $ECHO_C" >&6
34816 else
34817   if test "$cross_compiling" = yes; then
34818   # Depending upon the size, compute the lo and hi bounds.
34819 cat >conftest.$ac_ext <<_ACEOF
34820 /* confdefs.h.  */
34821 _ACEOF
34822 cat confdefs.h >>conftest.$ac_ext
34823 cat >>conftest.$ac_ext <<_ACEOF
34824 /* end confdefs.h.  */
34825 $ac_includes_default
34826    typedef long long ac__type_sizeof_;
34827 int
34828 main ()
34829 {
34830 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
34831 test_array [0] = 0
34832
34833   ;
34834   return 0;
34835 }
34836 _ACEOF
34837 rm -f conftest.$ac_objext
34838 if { (ac_try="$ac_compile"
34839 case "(($ac_try" in
34840   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34841   *) ac_try_echo=$ac_try;;
34842 esac
34843 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34844   (eval "$ac_compile") 2>conftest.er1
34845   ac_status=$?
34846   grep -v '^ *+' conftest.er1 >conftest.err
34847   rm -f conftest.er1
34848   cat conftest.err >&5
34849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34850   (exit $ac_status); } && {
34851          test -z "$ac_c_werror_flag" ||
34852          test ! -s conftest.err
34853        } && test -s conftest.$ac_objext; then
34854   ac_lo=0 ac_mid=0
34855   while :; do
34856     cat >conftest.$ac_ext <<_ACEOF
34857 /* confdefs.h.  */
34858 _ACEOF
34859 cat confdefs.h >>conftest.$ac_ext
34860 cat >>conftest.$ac_ext <<_ACEOF
34861 /* end confdefs.h.  */
34862 $ac_includes_default
34863    typedef long long ac__type_sizeof_;
34864 int
34865 main ()
34866 {
34867 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
34868 test_array [0] = 0
34869
34870   ;
34871   return 0;
34872 }
34873 _ACEOF
34874 rm -f conftest.$ac_objext
34875 if { (ac_try="$ac_compile"
34876 case "(($ac_try" in
34877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34878   *) ac_try_echo=$ac_try;;
34879 esac
34880 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34881   (eval "$ac_compile") 2>conftest.er1
34882   ac_status=$?
34883   grep -v '^ *+' conftest.er1 >conftest.err
34884   rm -f conftest.er1
34885   cat conftest.err >&5
34886   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34887   (exit $ac_status); } && {
34888          test -z "$ac_c_werror_flag" ||
34889          test ! -s conftest.err
34890        } && test -s conftest.$ac_objext; then
34891   ac_hi=$ac_mid; break
34892 else
34893   echo "$as_me: failed program was:" >&5
34894 sed 's/^/| /' conftest.$ac_ext >&5
34895
34896         ac_lo=`expr $ac_mid + 1`
34897                         if test $ac_lo -le $ac_mid; then
34898                           ac_lo= ac_hi=
34899                           break
34900                         fi
34901                         ac_mid=`expr 2 '*' $ac_mid + 1`
34902 fi
34903
34904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34905   done
34906 else
34907   echo "$as_me: failed program was:" >&5
34908 sed 's/^/| /' conftest.$ac_ext >&5
34909
34910         cat >conftest.$ac_ext <<_ACEOF
34911 /* confdefs.h.  */
34912 _ACEOF
34913 cat confdefs.h >>conftest.$ac_ext
34914 cat >>conftest.$ac_ext <<_ACEOF
34915 /* end confdefs.h.  */
34916 $ac_includes_default
34917    typedef long long ac__type_sizeof_;
34918 int
34919 main ()
34920 {
34921 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
34922 test_array [0] = 0
34923
34924   ;
34925   return 0;
34926 }
34927 _ACEOF
34928 rm -f conftest.$ac_objext
34929 if { (ac_try="$ac_compile"
34930 case "(($ac_try" in
34931   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34932   *) ac_try_echo=$ac_try;;
34933 esac
34934 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34935   (eval "$ac_compile") 2>conftest.er1
34936   ac_status=$?
34937   grep -v '^ *+' conftest.er1 >conftest.err
34938   rm -f conftest.er1
34939   cat conftest.err >&5
34940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34941   (exit $ac_status); } && {
34942          test -z "$ac_c_werror_flag" ||
34943          test ! -s conftest.err
34944        } && test -s conftest.$ac_objext; then
34945   ac_hi=-1 ac_mid=-1
34946   while :; do
34947     cat >conftest.$ac_ext <<_ACEOF
34948 /* confdefs.h.  */
34949 _ACEOF
34950 cat confdefs.h >>conftest.$ac_ext
34951 cat >>conftest.$ac_ext <<_ACEOF
34952 /* end confdefs.h.  */
34953 $ac_includes_default
34954    typedef long long ac__type_sizeof_;
34955 int
34956 main ()
34957 {
34958 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
34959 test_array [0] = 0
34960
34961   ;
34962   return 0;
34963 }
34964 _ACEOF
34965 rm -f conftest.$ac_objext
34966 if { (ac_try="$ac_compile"
34967 case "(($ac_try" in
34968   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34969   *) ac_try_echo=$ac_try;;
34970 esac
34971 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
34972   (eval "$ac_compile") 2>conftest.er1
34973   ac_status=$?
34974   grep -v '^ *+' conftest.er1 >conftest.err
34975   rm -f conftest.er1
34976   cat conftest.err >&5
34977   echo "$as_me:$LINENO: \$? = $ac_status" >&5
34978   (exit $ac_status); } && {
34979          test -z "$ac_c_werror_flag" ||
34980          test ! -s conftest.err
34981        } && test -s conftest.$ac_objext; then
34982   ac_lo=$ac_mid; break
34983 else
34984   echo "$as_me: failed program was:" >&5
34985 sed 's/^/| /' conftest.$ac_ext >&5
34986
34987         ac_hi=`expr '(' $ac_mid ')' - 1`
34988                         if test $ac_mid -le $ac_hi; then
34989                           ac_lo= ac_hi=
34990                           break
34991                         fi
34992                         ac_mid=`expr 2 '*' $ac_mid`
34993 fi
34994
34995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34996   done
34997 else
34998   echo "$as_me: failed program was:" >&5
34999 sed 's/^/| /' conftest.$ac_ext >&5
35000
35001         ac_lo= ac_hi=
35002 fi
35003
35004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35005 fi
35006
35007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35008 # Binary search between lo and hi bounds.
35009 while test "x$ac_lo" != "x$ac_hi"; do
35010   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
35011   cat >conftest.$ac_ext <<_ACEOF
35012 /* confdefs.h.  */
35013 _ACEOF
35014 cat confdefs.h >>conftest.$ac_ext
35015 cat >>conftest.$ac_ext <<_ACEOF
35016 /* end confdefs.h.  */
35017 $ac_includes_default
35018    typedef long long ac__type_sizeof_;
35019 int
35020 main ()
35021 {
35022 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
35023 test_array [0] = 0
35024
35025   ;
35026   return 0;
35027 }
35028 _ACEOF
35029 rm -f conftest.$ac_objext
35030 if { (ac_try="$ac_compile"
35031 case "(($ac_try" in
35032   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35033   *) ac_try_echo=$ac_try;;
35034 esac
35035 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35036   (eval "$ac_compile") 2>conftest.er1
35037   ac_status=$?
35038   grep -v '^ *+' conftest.er1 >conftest.err
35039   rm -f conftest.er1
35040   cat conftest.err >&5
35041   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35042   (exit $ac_status); } && {
35043          test -z "$ac_c_werror_flag" ||
35044          test ! -s conftest.err
35045        } && test -s conftest.$ac_objext; then
35046   ac_hi=$ac_mid
35047 else
35048   echo "$as_me: failed program was:" >&5
35049 sed 's/^/| /' conftest.$ac_ext >&5
35050
35051         ac_lo=`expr '(' $ac_mid ')' + 1`
35052 fi
35053
35054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35055 done
35056 case $ac_lo in
35057 ?*) ac_cv_sizeof_long_long=$ac_lo;;
35058 '') if test "$ac_cv_type_long_long" = yes; then
35059      { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
35060 See \`config.log' for more details." >&5
35061 echo "$as_me: error: cannot compute sizeof (long long)
35062 See \`config.log' for more details." >&2;}
35063    { (exit 77); exit 77; }; }
35064    else
35065      ac_cv_sizeof_long_long=0
35066    fi ;;
35067 esac
35068 else
35069   cat >conftest.$ac_ext <<_ACEOF
35070 /* confdefs.h.  */
35071 _ACEOF
35072 cat confdefs.h >>conftest.$ac_ext
35073 cat >>conftest.$ac_ext <<_ACEOF
35074 /* end confdefs.h.  */
35075 $ac_includes_default
35076    typedef long long ac__type_sizeof_;
35077 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
35078 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
35079 #include <stdio.h>
35080 #include <stdlib.h>
35081 int
35082 main ()
35083 {
35084
35085   FILE *f = fopen ("conftest.val", "w");
35086   if (! f)
35087     return 1;
35088   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
35089     {
35090       long int i = longval ();
35091       if (i != ((long int) (sizeof (ac__type_sizeof_))))
35092         return 1;
35093       fprintf (f, "%ld\n", i);
35094     }
35095   else
35096     {
35097       unsigned long int i = ulongval ();
35098       if (i != ((long int) (sizeof (ac__type_sizeof_))))
35099         return 1;
35100       fprintf (f, "%lu\n", i);
35101     }
35102   return ferror (f) || fclose (f) != 0;
35103
35104   ;
35105   return 0;
35106 }
35107 _ACEOF
35108 rm -f conftest$ac_exeext
35109 if { (ac_try="$ac_link"
35110 case "(($ac_try" in
35111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35112   *) ac_try_echo=$ac_try;;
35113 esac
35114 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35115   (eval "$ac_link") 2>&5
35116   ac_status=$?
35117   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35118   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
35119   { (case "(($ac_try" in
35120   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35121   *) ac_try_echo=$ac_try;;
35122 esac
35123 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35124   (eval "$ac_try") 2>&5
35125   ac_status=$?
35126   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35127   (exit $ac_status); }; }; then
35128   ac_cv_sizeof_long_long=`cat conftest.val`
35129 else
35130   echo "$as_me: program exited with status $ac_status" >&5
35131 echo "$as_me: failed program was:" >&5
35132 sed 's/^/| /' conftest.$ac_ext >&5
35133
35134 ( exit $ac_status )
35135 if test "$ac_cv_type_long_long" = yes; then
35136      { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
35137 See \`config.log' for more details." >&5
35138 echo "$as_me: error: cannot compute sizeof (long long)
35139 See \`config.log' for more details." >&2;}
35140    { (exit 77); exit 77; }; }
35141    else
35142      ac_cv_sizeof_long_long=0
35143    fi
35144 fi
35145 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
35146 fi
35147 rm -f conftest.val
35148 fi
35149 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
35150 echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
35151
35152
35153
35154 cat >>confdefs.h <<_ACEOF
35155 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
35156 _ACEOF
35157
35158
35159 { echo "$as_me:$LINENO: checking for wchar_t" >&5
35160 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
35161 if test "${ac_cv_type_wchar_t+set}" = set; then
35162   echo $ECHO_N "(cached) $ECHO_C" >&6
35163 else
35164   cat >conftest.$ac_ext <<_ACEOF
35165 /* confdefs.h.  */
35166 _ACEOF
35167 cat confdefs.h >>conftest.$ac_ext
35168 cat >>conftest.$ac_ext <<_ACEOF
35169 /* end confdefs.h.  */
35170 $ac_includes_default
35171 typedef wchar_t ac__type_new_;
35172 int
35173 main ()
35174 {
35175 if ((ac__type_new_ *) 0)
35176   return 0;
35177 if (sizeof (ac__type_new_))
35178   return 0;
35179   ;
35180   return 0;
35181 }
35182 _ACEOF
35183 rm -f conftest.$ac_objext
35184 if { (ac_try="$ac_compile"
35185 case "(($ac_try" in
35186   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35187   *) ac_try_echo=$ac_try;;
35188 esac
35189 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35190   (eval "$ac_compile") 2>conftest.er1
35191   ac_status=$?
35192   grep -v '^ *+' conftest.er1 >conftest.err
35193   rm -f conftest.er1
35194   cat conftest.err >&5
35195   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35196   (exit $ac_status); } && {
35197          test -z "$ac_c_werror_flag" ||
35198          test ! -s conftest.err
35199        } && test -s conftest.$ac_objext; then
35200   ac_cv_type_wchar_t=yes
35201 else
35202   echo "$as_me: failed program was:" >&5
35203 sed 's/^/| /' conftest.$ac_ext >&5
35204
35205         ac_cv_type_wchar_t=no
35206 fi
35207
35208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35209 fi
35210 { echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
35211 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
35212
35213 # The cast to long int works around a bug in the HP C Compiler
35214 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
35215 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
35216 # This bug is HP SR number 8606223364.
35217 { echo "$as_me:$LINENO: checking size of wchar_t" >&5
35218 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
35219 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
35220   echo $ECHO_N "(cached) $ECHO_C" >&6
35221 else
35222   if test "$cross_compiling" = yes; then
35223   # Depending upon the size, compute the lo and hi bounds.
35224 cat >conftest.$ac_ext <<_ACEOF
35225 /* confdefs.h.  */
35226 _ACEOF
35227 cat confdefs.h >>conftest.$ac_ext
35228 cat >>conftest.$ac_ext <<_ACEOF
35229 /* end confdefs.h.  */
35230 $ac_includes_default
35231    typedef wchar_t ac__type_sizeof_;
35232 int
35233 main ()
35234 {
35235 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
35236 test_array [0] = 0
35237
35238   ;
35239   return 0;
35240 }
35241 _ACEOF
35242 rm -f conftest.$ac_objext
35243 if { (ac_try="$ac_compile"
35244 case "(($ac_try" in
35245   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35246   *) ac_try_echo=$ac_try;;
35247 esac
35248 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35249   (eval "$ac_compile") 2>conftest.er1
35250   ac_status=$?
35251   grep -v '^ *+' conftest.er1 >conftest.err
35252   rm -f conftest.er1
35253   cat conftest.err >&5
35254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35255   (exit $ac_status); } && {
35256          test -z "$ac_c_werror_flag" ||
35257          test ! -s conftest.err
35258        } && test -s conftest.$ac_objext; then
35259   ac_lo=0 ac_mid=0
35260   while :; do
35261     cat >conftest.$ac_ext <<_ACEOF
35262 /* confdefs.h.  */
35263 _ACEOF
35264 cat confdefs.h >>conftest.$ac_ext
35265 cat >>conftest.$ac_ext <<_ACEOF
35266 /* end confdefs.h.  */
35267 $ac_includes_default
35268    typedef wchar_t ac__type_sizeof_;
35269 int
35270 main ()
35271 {
35272 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
35273 test_array [0] = 0
35274
35275   ;
35276   return 0;
35277 }
35278 _ACEOF
35279 rm -f conftest.$ac_objext
35280 if { (ac_try="$ac_compile"
35281 case "(($ac_try" in
35282   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35283   *) ac_try_echo=$ac_try;;
35284 esac
35285 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35286   (eval "$ac_compile") 2>conftest.er1
35287   ac_status=$?
35288   grep -v '^ *+' conftest.er1 >conftest.err
35289   rm -f conftest.er1
35290   cat conftest.err >&5
35291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35292   (exit $ac_status); } && {
35293          test -z "$ac_c_werror_flag" ||
35294          test ! -s conftest.err
35295        } && test -s conftest.$ac_objext; then
35296   ac_hi=$ac_mid; break
35297 else
35298   echo "$as_me: failed program was:" >&5
35299 sed 's/^/| /' conftest.$ac_ext >&5
35300
35301         ac_lo=`expr $ac_mid + 1`
35302                         if test $ac_lo -le $ac_mid; then
35303                           ac_lo= ac_hi=
35304                           break
35305                         fi
35306                         ac_mid=`expr 2 '*' $ac_mid + 1`
35307 fi
35308
35309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35310   done
35311 else
35312   echo "$as_me: failed program was:" >&5
35313 sed 's/^/| /' conftest.$ac_ext >&5
35314
35315         cat >conftest.$ac_ext <<_ACEOF
35316 /* confdefs.h.  */
35317 _ACEOF
35318 cat confdefs.h >>conftest.$ac_ext
35319 cat >>conftest.$ac_ext <<_ACEOF
35320 /* end confdefs.h.  */
35321 $ac_includes_default
35322    typedef wchar_t ac__type_sizeof_;
35323 int
35324 main ()
35325 {
35326 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
35327 test_array [0] = 0
35328
35329   ;
35330   return 0;
35331 }
35332 _ACEOF
35333 rm -f conftest.$ac_objext
35334 if { (ac_try="$ac_compile"
35335 case "(($ac_try" in
35336   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35337   *) ac_try_echo=$ac_try;;
35338 esac
35339 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35340   (eval "$ac_compile") 2>conftest.er1
35341   ac_status=$?
35342   grep -v '^ *+' conftest.er1 >conftest.err
35343   rm -f conftest.er1
35344   cat conftest.err >&5
35345   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35346   (exit $ac_status); } && {
35347          test -z "$ac_c_werror_flag" ||
35348          test ! -s conftest.err
35349        } && test -s conftest.$ac_objext; then
35350   ac_hi=-1 ac_mid=-1
35351   while :; do
35352     cat >conftest.$ac_ext <<_ACEOF
35353 /* confdefs.h.  */
35354 _ACEOF
35355 cat confdefs.h >>conftest.$ac_ext
35356 cat >>conftest.$ac_ext <<_ACEOF
35357 /* end confdefs.h.  */
35358 $ac_includes_default
35359    typedef wchar_t ac__type_sizeof_;
35360 int
35361 main ()
35362 {
35363 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
35364 test_array [0] = 0
35365
35366   ;
35367   return 0;
35368 }
35369 _ACEOF
35370 rm -f conftest.$ac_objext
35371 if { (ac_try="$ac_compile"
35372 case "(($ac_try" in
35373   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35374   *) ac_try_echo=$ac_try;;
35375 esac
35376 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35377   (eval "$ac_compile") 2>conftest.er1
35378   ac_status=$?
35379   grep -v '^ *+' conftest.er1 >conftest.err
35380   rm -f conftest.er1
35381   cat conftest.err >&5
35382   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35383   (exit $ac_status); } && {
35384          test -z "$ac_c_werror_flag" ||
35385          test ! -s conftest.err
35386        } && test -s conftest.$ac_objext; then
35387   ac_lo=$ac_mid; break
35388 else
35389   echo "$as_me: failed program was:" >&5
35390 sed 's/^/| /' conftest.$ac_ext >&5
35391
35392         ac_hi=`expr '(' $ac_mid ')' - 1`
35393                         if test $ac_mid -le $ac_hi; then
35394                           ac_lo= ac_hi=
35395                           break
35396                         fi
35397                         ac_mid=`expr 2 '*' $ac_mid`
35398 fi
35399
35400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35401   done
35402 else
35403   echo "$as_me: failed program was:" >&5
35404 sed 's/^/| /' conftest.$ac_ext >&5
35405
35406         ac_lo= ac_hi=
35407 fi
35408
35409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35410 fi
35411
35412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35413 # Binary search between lo and hi bounds.
35414 while test "x$ac_lo" != "x$ac_hi"; do
35415   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
35416   cat >conftest.$ac_ext <<_ACEOF
35417 /* confdefs.h.  */
35418 _ACEOF
35419 cat confdefs.h >>conftest.$ac_ext
35420 cat >>conftest.$ac_ext <<_ACEOF
35421 /* end confdefs.h.  */
35422 $ac_includes_default
35423    typedef wchar_t ac__type_sizeof_;
35424 int
35425 main ()
35426 {
35427 static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
35428 test_array [0] = 0
35429
35430   ;
35431   return 0;
35432 }
35433 _ACEOF
35434 rm -f conftest.$ac_objext
35435 if { (ac_try="$ac_compile"
35436 case "(($ac_try" in
35437   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35438   *) ac_try_echo=$ac_try;;
35439 esac
35440 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35441   (eval "$ac_compile") 2>conftest.er1
35442   ac_status=$?
35443   grep -v '^ *+' conftest.er1 >conftest.err
35444   rm -f conftest.er1
35445   cat conftest.err >&5
35446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35447   (exit $ac_status); } && {
35448          test -z "$ac_c_werror_flag" ||
35449          test ! -s conftest.err
35450        } && test -s conftest.$ac_objext; then
35451   ac_hi=$ac_mid
35452 else
35453   echo "$as_me: failed program was:" >&5
35454 sed 's/^/| /' conftest.$ac_ext >&5
35455
35456         ac_lo=`expr '(' $ac_mid ')' + 1`
35457 fi
35458
35459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35460 done
35461 case $ac_lo in
35462 ?*) ac_cv_sizeof_wchar_t=$ac_lo;;
35463 '') if test "$ac_cv_type_wchar_t" = yes; then
35464      { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
35465 See \`config.log' for more details." >&5
35466 echo "$as_me: error: cannot compute sizeof (wchar_t)
35467 See \`config.log' for more details." >&2;}
35468    { (exit 77); exit 77; }; }
35469    else
35470      ac_cv_sizeof_wchar_t=0
35471    fi ;;
35472 esac
35473 else
35474   cat >conftest.$ac_ext <<_ACEOF
35475 /* confdefs.h.  */
35476 _ACEOF
35477 cat confdefs.h >>conftest.$ac_ext
35478 cat >>conftest.$ac_ext <<_ACEOF
35479 /* end confdefs.h.  */
35480 $ac_includes_default
35481    typedef wchar_t ac__type_sizeof_;
35482 static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
35483 static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
35484 #include <stdio.h>
35485 #include <stdlib.h>
35486 int
35487 main ()
35488 {
35489
35490   FILE *f = fopen ("conftest.val", "w");
35491   if (! f)
35492     return 1;
35493   if (((long int) (sizeof (ac__type_sizeof_))) < 0)
35494     {
35495       long int i = longval ();
35496       if (i != ((long int) (sizeof (ac__type_sizeof_))))
35497         return 1;
35498       fprintf (f, "%ld\n", i);
35499     }
35500   else
35501     {
35502       unsigned long int i = ulongval ();
35503       if (i != ((long int) (sizeof (ac__type_sizeof_))))
35504         return 1;
35505       fprintf (f, "%lu\n", i);
35506     }
35507   return ferror (f) || fclose (f) != 0;
35508
35509   ;
35510   return 0;
35511 }
35512 _ACEOF
35513 rm -f conftest$ac_exeext
35514 if { (ac_try="$ac_link"
35515 case "(($ac_try" in
35516   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35517   *) ac_try_echo=$ac_try;;
35518 esac
35519 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35520   (eval "$ac_link") 2>&5
35521   ac_status=$?
35522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35523   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
35524   { (case "(($ac_try" in
35525   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35526   *) ac_try_echo=$ac_try;;
35527 esac
35528 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35529   (eval "$ac_try") 2>&5
35530   ac_status=$?
35531   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35532   (exit $ac_status); }; }; then
35533   ac_cv_sizeof_wchar_t=`cat conftest.val`
35534 else
35535   echo "$as_me: program exited with status $ac_status" >&5
35536 echo "$as_me: failed program was:" >&5
35537 sed 's/^/| /' conftest.$ac_ext >&5
35538
35539 ( exit $ac_status )
35540 if test "$ac_cv_type_wchar_t" = yes; then
35541      { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
35542 See \`config.log' for more details." >&5
35543 echo "$as_me: error: cannot compute sizeof (wchar_t)
35544 See \`config.log' for more details." >&2;}
35545    { (exit 77); exit 77; }; }
35546    else
35547      ac_cv_sizeof_wchar_t=0
35548    fi
35549 fi
35550 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
35551 fi
35552 rm -f conftest.val
35553 fi
35554 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
35555 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
35556
35557
35558
35559 cat >>confdefs.h <<_ACEOF
35560 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
35561 _ACEOF
35562
35563
35564
35565 if test "$ac_cv_sizeof_int" -lt 4 ; then
35566         { echo "$as_me:$LINENO: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
35567 echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
35568
35569
35570 cat >>confdefs.h <<\_ACEOF
35571 #define LBER_INT_T long
35572 _ACEOF
35573
35574 else
35575
35576 cat >>confdefs.h <<\_ACEOF
35577 #define LBER_INT_T int
35578 _ACEOF
35579
35580 fi
35581
35582
35583 cat >>confdefs.h <<\_ACEOF
35584 #define LBER_LEN_T long
35585 _ACEOF
35586
35587
35588 cat >>confdefs.h <<\_ACEOF
35589 #define LBER_SOCKET_T int
35590 _ACEOF
35591
35592
35593 cat >>confdefs.h <<\_ACEOF
35594 #define LBER_TAG_T long
35595 _ACEOF
35596
35597
35598 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
35599         if test $ac_cv_sizeof_long_long -gt 4 ; then
35600                 ol_with_mp=longlong
35601
35602 cat >>confdefs.h <<\_ACEOF
35603 #define USE_MP_LONG_LONG 1
35604 _ACEOF
35605
35606         elif test $ol_with_mp = longlong ; then
35607                 { { echo "$as_me:$LINENO: error: long long unusable for multiple precision" >&5
35608 echo "$as_me: error: long long unusable for multiple precision" >&2;}
35609    { (exit 1); exit 1; }; }
35610         fi
35611 fi
35612 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
35613         if test $ac_cv_sizeof_long -gt 4 ; then
35614                 ol_with_mp=long
35615
35616 cat >>confdefs.h <<\_ACEOF
35617 #define USE_MP_LONG 1
35618 _ACEOF
35619
35620         elif test $ol_with_mp = long ; then
35621                 { { echo "$as_me:$LINENO: error: long unusable for multiple precision" >&5
35622 echo "$as_me: error: long unusable for multiple precision" >&2;}
35623    { (exit 1); exit 1; }; }
35624         fi
35625 fi
35626 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
35627
35628 for ac_header in openssl/bn.h
35629 do
35630 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35631 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
35632   { echo "$as_me:$LINENO: checking for $ac_header" >&5
35633 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
35634 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
35635   echo $ECHO_N "(cached) $ECHO_C" >&6
35636 fi
35637 ac_res=`eval echo '${'$as_ac_Header'}'`
35638                { echo "$as_me:$LINENO: result: $ac_res" >&5
35639 echo "${ECHO_T}$ac_res" >&6; }
35640 else
35641   # Is the header compilable?
35642 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
35643 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
35644 cat >conftest.$ac_ext <<_ACEOF
35645 /* confdefs.h.  */
35646 _ACEOF
35647 cat confdefs.h >>conftest.$ac_ext
35648 cat >>conftest.$ac_ext <<_ACEOF
35649 /* end confdefs.h.  */
35650 $ac_includes_default
35651 #include <$ac_header>
35652 _ACEOF
35653 rm -f conftest.$ac_objext
35654 if { (ac_try="$ac_compile"
35655 case "(($ac_try" in
35656   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35657   *) ac_try_echo=$ac_try;;
35658 esac
35659 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35660   (eval "$ac_compile") 2>conftest.er1
35661   ac_status=$?
35662   grep -v '^ *+' conftest.er1 >conftest.err
35663   rm -f conftest.er1
35664   cat conftest.err >&5
35665   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35666   (exit $ac_status); } && {
35667          test -z "$ac_c_werror_flag" ||
35668          test ! -s conftest.err
35669        } && test -s conftest.$ac_objext; then
35670   ac_header_compiler=yes
35671 else
35672   echo "$as_me: failed program was:" >&5
35673 sed 's/^/| /' conftest.$ac_ext >&5
35674
35675         ac_header_compiler=no
35676 fi
35677
35678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35679 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35680 echo "${ECHO_T}$ac_header_compiler" >&6; }
35681
35682 # Is the header present?
35683 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
35684 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
35685 cat >conftest.$ac_ext <<_ACEOF
35686 /* confdefs.h.  */
35687 _ACEOF
35688 cat confdefs.h >>conftest.$ac_ext
35689 cat >>conftest.$ac_ext <<_ACEOF
35690 /* end confdefs.h.  */
35691 #include <$ac_header>
35692 _ACEOF
35693 if { (ac_try="$ac_cpp conftest.$ac_ext"
35694 case "(($ac_try" in
35695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35696   *) ac_try_echo=$ac_try;;
35697 esac
35698 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35699   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
35700   ac_status=$?
35701   grep -v '^ *+' conftest.er1 >conftest.err
35702   rm -f conftest.er1
35703   cat conftest.err >&5
35704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35705   (exit $ac_status); } >/dev/null && {
35706          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
35707          test ! -s conftest.err
35708        }; then
35709   ac_header_preproc=yes
35710 else
35711   echo "$as_me: failed program was:" >&5
35712 sed 's/^/| /' conftest.$ac_ext >&5
35713
35714   ac_header_preproc=no
35715 fi
35716
35717 rm -f conftest.err conftest.$ac_ext
35718 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
35719 echo "${ECHO_T}$ac_header_preproc" >&6; }
35720
35721 # So?  What about this header?
35722 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
35723   yes:no: )
35724     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
35725 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35726     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
35727 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
35728     ac_header_preproc=yes
35729     ;;
35730   no:yes:* )
35731     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
35732 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35733     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
35734 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
35735     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
35736 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
35737     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
35738 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
35739     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
35740 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35741     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
35742 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
35743     ( cat <<\_ASBOX
35744 ## --------------------------------------------- ##
35745 ## Report this to <http://www.openldap.org/its/> ##
35746 ## --------------------------------------------- ##
35747 _ASBOX
35748      ) | sed "s/^/$as_me: WARNING:     /" >&2
35749     ;;
35750 esac
35751 { echo "$as_me:$LINENO: checking for $ac_header" >&5
35752 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
35753 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
35754   echo $ECHO_N "(cached) $ECHO_C" >&6
35755 else
35756   eval "$as_ac_Header=\$ac_header_preproc"
35757 fi
35758 ac_res=`eval echo '${'$as_ac_Header'}'`
35759                { echo "$as_me:$LINENO: result: $ac_res" >&5
35760 echo "${ECHO_T}$ac_res" >&6; }
35761
35762 fi
35763 if test `eval echo '${'$as_ac_Header'}'` = yes; then
35764   cat >>confdefs.h <<_ACEOF
35765 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
35766 _ACEOF
35767
35768 fi
35769
35770 done
35771
35772
35773 for ac_header in openssl/crypto.h
35774 do
35775 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35776 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
35777   { echo "$as_me:$LINENO: checking for $ac_header" >&5
35778 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
35779 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
35780   echo $ECHO_N "(cached) $ECHO_C" >&6
35781 fi
35782 ac_res=`eval echo '${'$as_ac_Header'}'`
35783                { echo "$as_me:$LINENO: result: $ac_res" >&5
35784 echo "${ECHO_T}$ac_res" >&6; }
35785 else
35786   # Is the header compilable?
35787 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
35788 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
35789 cat >conftest.$ac_ext <<_ACEOF
35790 /* confdefs.h.  */
35791 _ACEOF
35792 cat confdefs.h >>conftest.$ac_ext
35793 cat >>conftest.$ac_ext <<_ACEOF
35794 /* end confdefs.h.  */
35795 $ac_includes_default
35796 #include <$ac_header>
35797 _ACEOF
35798 rm -f conftest.$ac_objext
35799 if { (ac_try="$ac_compile"
35800 case "(($ac_try" in
35801   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35802   *) ac_try_echo=$ac_try;;
35803 esac
35804 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35805   (eval "$ac_compile") 2>conftest.er1
35806   ac_status=$?
35807   grep -v '^ *+' conftest.er1 >conftest.err
35808   rm -f conftest.er1
35809   cat conftest.err >&5
35810   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35811   (exit $ac_status); } && {
35812          test -z "$ac_c_werror_flag" ||
35813          test ! -s conftest.err
35814        } && test -s conftest.$ac_objext; then
35815   ac_header_compiler=yes
35816 else
35817   echo "$as_me: failed program was:" >&5
35818 sed 's/^/| /' conftest.$ac_ext >&5
35819
35820         ac_header_compiler=no
35821 fi
35822
35823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35824 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35825 echo "${ECHO_T}$ac_header_compiler" >&6; }
35826
35827 # Is the header present?
35828 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
35829 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
35830 cat >conftest.$ac_ext <<_ACEOF
35831 /* confdefs.h.  */
35832 _ACEOF
35833 cat confdefs.h >>conftest.$ac_ext
35834 cat >>conftest.$ac_ext <<_ACEOF
35835 /* end confdefs.h.  */
35836 #include <$ac_header>
35837 _ACEOF
35838 if { (ac_try="$ac_cpp conftest.$ac_ext"
35839 case "(($ac_try" in
35840   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35841   *) ac_try_echo=$ac_try;;
35842 esac
35843 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35844   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
35845   ac_status=$?
35846   grep -v '^ *+' conftest.er1 >conftest.err
35847   rm -f conftest.er1
35848   cat conftest.err >&5
35849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35850   (exit $ac_status); } >/dev/null && {
35851          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
35852          test ! -s conftest.err
35853        }; then
35854   ac_header_preproc=yes
35855 else
35856   echo "$as_me: failed program was:" >&5
35857 sed 's/^/| /' conftest.$ac_ext >&5
35858
35859   ac_header_preproc=no
35860 fi
35861
35862 rm -f conftest.err conftest.$ac_ext
35863 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
35864 echo "${ECHO_T}$ac_header_preproc" >&6; }
35865
35866 # So?  What about this header?
35867 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
35868   yes:no: )
35869     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
35870 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
35871     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
35872 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
35873     ac_header_preproc=yes
35874     ;;
35875   no:yes:* )
35876     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
35877 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
35878     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
35879 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
35880     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
35881 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
35882     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
35883 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
35884     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
35885 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
35886     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
35887 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
35888     ( cat <<\_ASBOX
35889 ## --------------------------------------------- ##
35890 ## Report this to <http://www.openldap.org/its/> ##
35891 ## --------------------------------------------- ##
35892 _ASBOX
35893      ) | sed "s/^/$as_me: WARNING:     /" >&2
35894     ;;
35895 esac
35896 { echo "$as_me:$LINENO: checking for $ac_header" >&5
35897 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
35898 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
35899   echo $ECHO_N "(cached) $ECHO_C" >&6
35900 else
35901   eval "$as_ac_Header=\$ac_header_preproc"
35902 fi
35903 ac_res=`eval echo '${'$as_ac_Header'}'`
35904                { echo "$as_me:$LINENO: result: $ac_res" >&5
35905 echo "${ECHO_T}$ac_res" >&6; }
35906
35907 fi
35908 if test `eval echo '${'$as_ac_Header'}'` = yes; then
35909   cat >>confdefs.h <<_ACEOF
35910 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
35911 _ACEOF
35912
35913 fi
35914
35915 done
35916
35917         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
35918                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
35919                 test "$ol_with_tls" = "found" ; then
35920                 ol_with_mp=bignum
35921
35922 cat >>confdefs.h <<\_ACEOF
35923 #define USE_MP_BIGNUM 1
35924 _ACEOF
35925
35926         elif test $ol_with_mp = bignum ; then
35927                 { { echo "$as_me:$LINENO: error: bignum not available" >&5
35928 echo "$as_me: error: bignum not available" >&2;}
35929    { (exit 1); exit 1; }; }
35930         fi
35931 fi
35932 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
35933
35934 for ac_header in gmp.h
35935 do
35936 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
35937 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
35938   { echo "$as_me:$LINENO: checking for $ac_header" >&5
35939 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
35940 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
35941   echo $ECHO_N "(cached) $ECHO_C" >&6
35942 fi
35943 ac_res=`eval echo '${'$as_ac_Header'}'`
35944                { echo "$as_me:$LINENO: result: $ac_res" >&5
35945 echo "${ECHO_T}$ac_res" >&6; }
35946 else
35947   # Is the header compilable?
35948 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
35949 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
35950 cat >conftest.$ac_ext <<_ACEOF
35951 /* confdefs.h.  */
35952 _ACEOF
35953 cat confdefs.h >>conftest.$ac_ext
35954 cat >>conftest.$ac_ext <<_ACEOF
35955 /* end confdefs.h.  */
35956 $ac_includes_default
35957 #include <$ac_header>
35958 _ACEOF
35959 rm -f conftest.$ac_objext
35960 if { (ac_try="$ac_compile"
35961 case "(($ac_try" in
35962   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35963   *) ac_try_echo=$ac_try;;
35964 esac
35965 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
35966   (eval "$ac_compile") 2>conftest.er1
35967   ac_status=$?
35968   grep -v '^ *+' conftest.er1 >conftest.err
35969   rm -f conftest.er1
35970   cat conftest.err >&5
35971   echo "$as_me:$LINENO: \$? = $ac_status" >&5
35972   (exit $ac_status); } && {
35973          test -z "$ac_c_werror_flag" ||
35974          test ! -s conftest.err
35975        } && test -s conftest.$ac_objext; then
35976   ac_header_compiler=yes
35977 else
35978   echo "$as_me: failed program was:" >&5
35979 sed 's/^/| /' conftest.$ac_ext >&5
35980
35981         ac_header_compiler=no
35982 fi
35983
35984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35985 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
35986 echo "${ECHO_T}$ac_header_compiler" >&6; }
35987
35988 # Is the header present?
35989 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
35990 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
35991 cat >conftest.$ac_ext <<_ACEOF
35992 /* confdefs.h.  */
35993 _ACEOF
35994 cat confdefs.h >>conftest.$ac_ext
35995 cat >>conftest.$ac_ext <<_ACEOF
35996 /* end confdefs.h.  */
35997 #include <$ac_header>
35998 _ACEOF
35999 if { (ac_try="$ac_cpp conftest.$ac_ext"
36000 case "(($ac_try" in
36001   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36002   *) ac_try_echo=$ac_try;;
36003 esac
36004 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36005   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
36006   ac_status=$?
36007   grep -v '^ *+' conftest.er1 >conftest.err
36008   rm -f conftest.er1
36009   cat conftest.err >&5
36010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36011   (exit $ac_status); } >/dev/null && {
36012          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
36013          test ! -s conftest.err
36014        }; then
36015   ac_header_preproc=yes
36016 else
36017   echo "$as_me: failed program was:" >&5
36018 sed 's/^/| /' conftest.$ac_ext >&5
36019
36020   ac_header_preproc=no
36021 fi
36022
36023 rm -f conftest.err conftest.$ac_ext
36024 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
36025 echo "${ECHO_T}$ac_header_preproc" >&6; }
36026
36027 # So?  What about this header?
36028 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
36029   yes:no: )
36030     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
36031 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
36032     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
36033 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
36034     ac_header_preproc=yes
36035     ;;
36036   no:yes:* )
36037     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
36038 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
36039     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
36040 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
36041     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
36042 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
36043     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
36044 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
36045     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
36046 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
36047     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
36048 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
36049     ( cat <<\_ASBOX
36050 ## --------------------------------------------- ##
36051 ## Report this to <http://www.openldap.org/its/> ##
36052 ## --------------------------------------------- ##
36053 _ASBOX
36054      ) | sed "s/^/$as_me: WARNING:     /" >&2
36055     ;;
36056 esac
36057 { echo "$as_me:$LINENO: checking for $ac_header" >&5
36058 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
36059 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
36060   echo $ECHO_N "(cached) $ECHO_C" >&6
36061 else
36062   eval "$as_ac_Header=\$ac_header_preproc"
36063 fi
36064 ac_res=`eval echo '${'$as_ac_Header'}'`
36065                { echo "$as_me:$LINENO: result: $ac_res" >&5
36066 echo "${ECHO_T}$ac_res" >&6; }
36067
36068 fi
36069 if test `eval echo '${'$as_ac_Header'}'` = yes; then
36070   cat >>confdefs.h <<_ACEOF
36071 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36072 _ACEOF
36073
36074 fi
36075
36076 done
36077
36078
36079 { echo "$as_me:$LINENO: checking for __gmpz_add_ui in -lgmp" >&5
36080 echo $ECHO_N "checking for __gmpz_add_ui in -lgmp... $ECHO_C" >&6; }
36081 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then
36082   echo $ECHO_N "(cached) $ECHO_C" >&6
36083 else
36084   ac_check_lib_save_LIBS=$LIBS
36085 LIBS="-lgmp  $LIBS"
36086 cat >conftest.$ac_ext <<_ACEOF
36087 /* confdefs.h.  */
36088 _ACEOF
36089 cat confdefs.h >>conftest.$ac_ext
36090 cat >>conftest.$ac_ext <<_ACEOF
36091 /* end confdefs.h.  */
36092
36093 /* Override any GCC internal prototype to avoid an error.
36094    Use char because int might match the return type of a GCC
36095    builtin and then its argument prototype would still apply.  */
36096 #ifdef __cplusplus
36097 extern "C"
36098 #endif
36099 char __gmpz_add_ui ();
36100 int
36101 main ()
36102 {
36103 return __gmpz_add_ui ();
36104   ;
36105   return 0;
36106 }
36107 _ACEOF
36108 rm -f conftest.$ac_objext conftest$ac_exeext
36109 if { (ac_try="$ac_link"
36110 case "(($ac_try" in
36111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36112   *) ac_try_echo=$ac_try;;
36113 esac
36114 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36115   (eval "$ac_link") 2>conftest.er1
36116   ac_status=$?
36117   grep -v '^ *+' conftest.er1 >conftest.err
36118   rm -f conftest.er1
36119   cat conftest.err >&5
36120   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36121   (exit $ac_status); } && {
36122          test -z "$ac_c_werror_flag" ||
36123          test ! -s conftest.err
36124        } && test -s conftest$ac_exeext &&
36125        $as_test_x conftest$ac_exeext; then
36126   ac_cv_lib_gmp___gmpz_add_ui=yes
36127 else
36128   echo "$as_me: failed program was:" >&5
36129 sed 's/^/| /' conftest.$ac_ext >&5
36130
36131         ac_cv_lib_gmp___gmpz_add_ui=no
36132 fi
36133
36134 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
36135       conftest$ac_exeext conftest.$ac_ext
36136 LIBS=$ac_check_lib_save_LIBS
36137 fi
36138 { echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
36139 echo "${ECHO_T}$ac_cv_lib_gmp___gmpz_add_ui" >&6; }
36140 if test $ac_cv_lib_gmp___gmpz_add_ui = yes; then
36141   cat >>confdefs.h <<_ACEOF
36142 #define HAVE_LIBGMP 1
36143 _ACEOF
36144
36145   LIBS="-lgmp $LIBS"
36146
36147 fi
36148
36149         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
36150
36151 cat >>confdefs.h <<\_ACEOF
36152 #define USE_MP_GMP 1
36153 _ACEOF
36154
36155                 ol_with_mp=gmp
36156         elif test $ol_with_mp = gmp ; then
36157                 { { echo "$as_me:$LINENO: error: gmp not available" >&5
36158 echo "$as_me: error: gmp not available" >&2;}
36159    { (exit 1); exit 1; }; }
36160         fi
36161 fi
36162 if test $ol_with_mp = auto ; then
36163         ol_with_mp=no
36164 fi
36165
36166 { echo "$as_me:$LINENO: checking for working memcmp" >&5
36167 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; }
36168 if test "${ac_cv_func_memcmp_working+set}" = set; then
36169   echo $ECHO_N "(cached) $ECHO_C" >&6
36170 else
36171   if test "$cross_compiling" = yes; then
36172   ac_cv_func_memcmp_working=no
36173 else
36174   cat >conftest.$ac_ext <<_ACEOF
36175 /* confdefs.h.  */
36176 _ACEOF
36177 cat confdefs.h >>conftest.$ac_ext
36178 cat >>conftest.$ac_ext <<_ACEOF
36179 /* end confdefs.h.  */
36180 $ac_includes_default
36181 int
36182 main ()
36183 {
36184
36185   /* Some versions of memcmp are not 8-bit clean.  */
36186   char c0 = '\100', c1 = '\200', c2 = '\201';
36187   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
36188     return 1;
36189
36190   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
36191      or more and with at least one buffer not starting on a 4-byte boundary.
36192      William Lewis provided this test program.   */
36193   {
36194     char foo[21];
36195     char bar[21];
36196     int i;
36197     for (i = 0; i < 4; i++)
36198       {
36199         char *a = foo + i;
36200         char *b = bar + i;
36201         strcpy (a, "--------01111111");
36202         strcpy (b, "--------10000000");
36203         if (memcmp (a, b, 16) >= 0)
36204           return 1;
36205       }
36206     return 0;
36207   }
36208
36209   ;
36210   return 0;
36211 }
36212 _ACEOF
36213 rm -f conftest$ac_exeext
36214 if { (ac_try="$ac_link"
36215 case "(($ac_try" in
36216   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36217   *) ac_try_echo=$ac_try;;
36218 esac
36219 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36220   (eval "$ac_link") 2>&5
36221   ac_status=$?
36222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36223   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
36224   { (case "(($ac_try" in
36225   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36226   *) ac_try_echo=$ac_try;;
36227 esac
36228 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36229   (eval "$ac_try") 2>&5
36230   ac_status=$?
36231   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36232   (exit $ac_status); }; }; then
36233   ac_cv_func_memcmp_working=yes
36234 else
36235   echo "$as_me: program exited with status $ac_status" >&5
36236 echo "$as_me: failed program was:" >&5
36237 sed 's/^/| /' conftest.$ac_ext >&5
36238
36239 ( exit $ac_status )
36240 ac_cv_func_memcmp_working=no
36241 fi
36242 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
36243 fi
36244
36245
36246 fi
36247 { echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5
36248 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; }
36249 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
36250   *" memcmp.$ac_objext "* ) ;;
36251   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
36252  ;;
36253 esac
36254
36255
36256
36257 if test $ac_cv_func_memcmp_working = no ; then
36258
36259 cat >>confdefs.h <<\_ACEOF
36260 #define NEED_MEMCMP_REPLACEMENT 1
36261 _ACEOF
36262
36263 fi
36264
36265
36266 for ac_func in strftime
36267 do
36268 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
36269 { echo "$as_me:$LINENO: checking for $ac_func" >&5
36270 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
36271 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
36272   echo $ECHO_N "(cached) $ECHO_C" >&6
36273 else
36274   cat >conftest.$ac_ext <<_ACEOF
36275 /* confdefs.h.  */
36276 _ACEOF
36277 cat confdefs.h >>conftest.$ac_ext
36278 cat >>conftest.$ac_ext <<_ACEOF
36279 /* end confdefs.h.  */
36280 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
36281    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36282 #define $ac_func innocuous_$ac_func
36283
36284 /* System header to define __stub macros and hopefully few prototypes,
36285     which can conflict with char $ac_func (); below.
36286     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36287     <limits.h> exists even on freestanding compilers.  */
36288
36289 #ifdef __STDC__
36290 # include <limits.h>
36291 #else
36292 # include <assert.h>
36293 #endif
36294
36295 #undef $ac_func
36296
36297 /* Override any GCC internal prototype to avoid an error.
36298    Use char because int might match the return type of a GCC
36299    builtin and then its argument prototype would still apply.  */
36300 #ifdef __cplusplus
36301 extern "C"
36302 #endif
36303 char $ac_func ();
36304 /* The GNU C library defines this for functions which it implements
36305     to always fail with ENOSYS.  Some functions are actually named
36306     something starting with __ and the normal name is an alias.  */
36307 #if defined __stub_$ac_func || defined __stub___$ac_func
36308 choke me
36309 #endif
36310
36311 int
36312 main ()
36313 {
36314 return $ac_func ();
36315   ;
36316   return 0;
36317 }
36318 _ACEOF
36319 rm -f conftest.$ac_objext conftest$ac_exeext
36320 if { (ac_try="$ac_link"
36321 case "(($ac_try" in
36322   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36323   *) ac_try_echo=$ac_try;;
36324 esac
36325 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36326   (eval "$ac_link") 2>conftest.er1
36327   ac_status=$?
36328   grep -v '^ *+' conftest.er1 >conftest.err
36329   rm -f conftest.er1
36330   cat conftest.err >&5
36331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36332   (exit $ac_status); } && {
36333          test -z "$ac_c_werror_flag" ||
36334          test ! -s conftest.err
36335        } && test -s conftest$ac_exeext &&
36336        $as_test_x conftest$ac_exeext; then
36337   eval "$as_ac_var=yes"
36338 else
36339   echo "$as_me: failed program was:" >&5
36340 sed 's/^/| /' conftest.$ac_ext >&5
36341
36342         eval "$as_ac_var=no"
36343 fi
36344
36345 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
36346       conftest$ac_exeext conftest.$ac_ext
36347 fi
36348 ac_res=`eval echo '${'$as_ac_var'}'`
36349                { echo "$as_me:$LINENO: result: $ac_res" >&5
36350 echo "${ECHO_T}$ac_res" >&6; }
36351 if test `eval echo '${'$as_ac_var'}'` = yes; then
36352   cat >>confdefs.h <<_ACEOF
36353 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
36354 _ACEOF
36355
36356 else
36357   # strftime is in -lintl on SCO UNIX.
36358 { echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
36359 echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
36360 if test "${ac_cv_lib_intl_strftime+set}" = set; then
36361   echo $ECHO_N "(cached) $ECHO_C" >&6
36362 else
36363   ac_check_lib_save_LIBS=$LIBS
36364 LIBS="-lintl  $LIBS"
36365 cat >conftest.$ac_ext <<_ACEOF
36366 /* confdefs.h.  */
36367 _ACEOF
36368 cat confdefs.h >>conftest.$ac_ext
36369 cat >>conftest.$ac_ext <<_ACEOF
36370 /* end confdefs.h.  */
36371
36372 /* Override any GCC internal prototype to avoid an error.
36373    Use char because int might match the return type of a GCC
36374    builtin and then its argument prototype would still apply.  */
36375 #ifdef __cplusplus
36376 extern "C"
36377 #endif
36378 char strftime ();
36379 int
36380 main ()
36381 {
36382 return strftime ();
36383   ;
36384   return 0;
36385 }
36386 _ACEOF
36387 rm -f conftest.$ac_objext conftest$ac_exeext
36388 if { (ac_try="$ac_link"
36389 case "(($ac_try" in
36390   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36391   *) ac_try_echo=$ac_try;;
36392 esac
36393 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36394   (eval "$ac_link") 2>conftest.er1
36395   ac_status=$?
36396   grep -v '^ *+' conftest.er1 >conftest.err
36397   rm -f conftest.er1
36398   cat conftest.err >&5
36399   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36400   (exit $ac_status); } && {
36401          test -z "$ac_c_werror_flag" ||
36402          test ! -s conftest.err
36403        } && test -s conftest$ac_exeext &&
36404        $as_test_x conftest$ac_exeext; then
36405   ac_cv_lib_intl_strftime=yes
36406 else
36407   echo "$as_me: failed program was:" >&5
36408 sed 's/^/| /' conftest.$ac_ext >&5
36409
36410         ac_cv_lib_intl_strftime=no
36411 fi
36412
36413 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
36414       conftest$ac_exeext conftest.$ac_ext
36415 LIBS=$ac_check_lib_save_LIBS
36416 fi
36417 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
36418 echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
36419 if test $ac_cv_lib_intl_strftime = yes; then
36420   cat >>confdefs.h <<\_ACEOF
36421 #define HAVE_STRFTIME 1
36422 _ACEOF
36423
36424 LIBS="-lintl $LIBS"
36425 fi
36426
36427 fi
36428 done
36429
36430
36431 { echo "$as_me:$LINENO: checking for inet_aton()" >&5
36432 echo $ECHO_N "checking for inet_aton()... $ECHO_C" >&6; }
36433 if test "${ol_cv_func_inet_aton+set}" = set; then
36434   echo $ECHO_N "(cached) $ECHO_C" >&6
36435 else
36436   cat >conftest.$ac_ext <<_ACEOF
36437 /* confdefs.h.  */
36438 _ACEOF
36439 cat confdefs.h >>conftest.$ac_ext
36440 cat >>conftest.$ac_ext <<_ACEOF
36441 /* end confdefs.h.  */
36442
36443 #ifdef HAVE_SYS_TYPES_H
36444 #       include <sys/types.h>
36445 #endif
36446 #ifdef HAVE_SYS_SOCKET_H
36447 #       include <sys/socket.h>
36448 #       ifdef HAVE_SYS_SELECT_H
36449 #               include <sys/select.h>
36450 #       endif
36451 #       include <netinet/in.h>
36452 #       ifdef HAVE_ARPA_INET_H
36453 #               include <arpa/inet.h>
36454 #       endif
36455 #endif
36456
36457 int
36458 main ()
36459 {
36460 struct in_addr in;
36461 int rc = inet_aton( "255.255.255.255", &in );
36462   ;
36463   return 0;
36464 }
36465 _ACEOF
36466 rm -f conftest.$ac_objext conftest$ac_exeext
36467 if { (ac_try="$ac_link"
36468 case "(($ac_try" in
36469   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36470   *) ac_try_echo=$ac_try;;
36471 esac
36472 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36473   (eval "$ac_link") 2>conftest.er1
36474   ac_status=$?
36475   grep -v '^ *+' conftest.er1 >conftest.err
36476   rm -f conftest.er1
36477   cat conftest.err >&5
36478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36479   (exit $ac_status); } && {
36480          test -z "$ac_c_werror_flag" ||
36481          test ! -s conftest.err
36482        } && test -s conftest$ac_exeext &&
36483        $as_test_x conftest$ac_exeext; then
36484   ol_cv_func_inet_aton=yes
36485 else
36486   echo "$as_me: failed program was:" >&5
36487 sed 's/^/| /' conftest.$ac_ext >&5
36488
36489         ol_cv_func_inet_aton=no
36490 fi
36491
36492 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
36493       conftest$ac_exeext conftest.$ac_ext
36494 fi
36495 { echo "$as_me:$LINENO: result: $ol_cv_func_inet_aton" >&5
36496 echo "${ECHO_T}$ol_cv_func_inet_aton" >&6; }
36497   if test $ol_cv_func_inet_aton != no; then
36498
36499 cat >>confdefs.h <<\_ACEOF
36500 #define HAVE_INET_ATON 1
36501 _ACEOF
36502
36503   fi
36504
36505
36506 { echo "$as_me:$LINENO: checking for _spawnlp" >&5
36507 echo $ECHO_N "checking for _spawnlp... $ECHO_C" >&6; }
36508 if test "${ac_cv_func__spawnlp+set}" = set; then
36509   echo $ECHO_N "(cached) $ECHO_C" >&6
36510 else
36511   cat >conftest.$ac_ext <<_ACEOF
36512 /* confdefs.h.  */
36513 _ACEOF
36514 cat confdefs.h >>conftest.$ac_ext
36515 cat >>conftest.$ac_ext <<_ACEOF
36516 /* end confdefs.h.  */
36517 /* Define _spawnlp to an innocuous variant, in case <limits.h> declares _spawnlp.
36518    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36519 #define _spawnlp innocuous__spawnlp
36520
36521 /* System header to define __stub macros and hopefully few prototypes,
36522     which can conflict with char _spawnlp (); below.
36523     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36524     <limits.h> exists even on freestanding compilers.  */
36525
36526 #ifdef __STDC__
36527 # include <limits.h>
36528 #else
36529 # include <assert.h>
36530 #endif
36531
36532 #undef _spawnlp
36533
36534 /* Override any GCC internal prototype to avoid an error.
36535    Use char because int might match the return type of a GCC
36536    builtin and then its argument prototype would still apply.  */
36537 #ifdef __cplusplus
36538 extern "C"
36539 #endif
36540 char _spawnlp ();
36541 /* The GNU C library defines this for functions which it implements
36542     to always fail with ENOSYS.  Some functions are actually named
36543     something starting with __ and the normal name is an alias.  */
36544 #if defined __stub__spawnlp || defined __stub____spawnlp
36545 choke me
36546 #endif
36547
36548 int
36549 main ()
36550 {
36551 return _spawnlp ();
36552   ;
36553   return 0;
36554 }
36555 _ACEOF
36556 rm -f conftest.$ac_objext conftest$ac_exeext
36557 if { (ac_try="$ac_link"
36558 case "(($ac_try" in
36559   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36560   *) ac_try_echo=$ac_try;;
36561 esac
36562 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36563   (eval "$ac_link") 2>conftest.er1
36564   ac_status=$?
36565   grep -v '^ *+' conftest.er1 >conftest.err
36566   rm -f conftest.er1
36567   cat conftest.err >&5
36568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36569   (exit $ac_status); } && {
36570          test -z "$ac_c_werror_flag" ||
36571          test ! -s conftest.err
36572        } && test -s conftest$ac_exeext &&
36573        $as_test_x conftest$ac_exeext; then
36574   ac_cv_func__spawnlp=yes
36575 else
36576   echo "$as_me: failed program was:" >&5
36577 sed 's/^/| /' conftest.$ac_ext >&5
36578
36579         ac_cv_func__spawnlp=no
36580 fi
36581
36582 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
36583       conftest$ac_exeext conftest.$ac_ext
36584 fi
36585 { echo "$as_me:$LINENO: result: $ac_cv_func__spawnlp" >&5
36586 echo "${ECHO_T}$ac_cv_func__spawnlp" >&6; }
36587 if test $ac_cv_func__spawnlp = yes; then
36588
36589 cat >>confdefs.h <<\_ACEOF
36590 #define HAVE_SPAWNLP 1
36591 _ACEOF
36592
36593 fi
36594
36595
36596 { echo "$as_me:$LINENO: checking for _snprintf" >&5
36597 echo $ECHO_N "checking for _snprintf... $ECHO_C" >&6; }
36598 if test "${ac_cv_func__snprintf+set}" = set; then
36599   echo $ECHO_N "(cached) $ECHO_C" >&6
36600 else
36601   cat >conftest.$ac_ext <<_ACEOF
36602 /* confdefs.h.  */
36603 _ACEOF
36604 cat confdefs.h >>conftest.$ac_ext
36605 cat >>conftest.$ac_ext <<_ACEOF
36606 /* end confdefs.h.  */
36607 /* Define _snprintf to an innocuous variant, in case <limits.h> declares _snprintf.
36608    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36609 #define _snprintf innocuous__snprintf
36610
36611 /* System header to define __stub macros and hopefully few prototypes,
36612     which can conflict with char _snprintf (); below.
36613     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36614     <limits.h> exists even on freestanding compilers.  */
36615
36616 #ifdef __STDC__
36617 # include <limits.h>
36618 #else
36619 # include <assert.h>
36620 #endif
36621
36622 #undef _snprintf
36623
36624 /* Override any GCC internal prototype to avoid an error.
36625    Use char because int might match the return type of a GCC
36626    builtin and then its argument prototype would still apply.  */
36627 #ifdef __cplusplus
36628 extern "C"
36629 #endif
36630 char _snprintf ();
36631 /* The GNU C library defines this for functions which it implements
36632     to always fail with ENOSYS.  Some functions are actually named
36633     something starting with __ and the normal name is an alias.  */
36634 #if defined __stub__snprintf || defined __stub____snprintf
36635 choke me
36636 #endif
36637
36638 int
36639 main ()
36640 {
36641 return _snprintf ();
36642   ;
36643   return 0;
36644 }
36645 _ACEOF
36646 rm -f conftest.$ac_objext conftest$ac_exeext
36647 if { (ac_try="$ac_link"
36648 case "(($ac_try" in
36649   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36650   *) ac_try_echo=$ac_try;;
36651 esac
36652 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36653   (eval "$ac_link") 2>conftest.er1
36654   ac_status=$?
36655   grep -v '^ *+' conftest.er1 >conftest.err
36656   rm -f conftest.er1
36657   cat conftest.err >&5
36658   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36659   (exit $ac_status); } && {
36660          test -z "$ac_c_werror_flag" ||
36661          test ! -s conftest.err
36662        } && test -s conftest$ac_exeext &&
36663        $as_test_x conftest$ac_exeext; then
36664   ac_cv_func__snprintf=yes
36665 else
36666   echo "$as_me: failed program was:" >&5
36667 sed 's/^/| /' conftest.$ac_ext >&5
36668
36669         ac_cv_func__snprintf=no
36670 fi
36671
36672 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
36673       conftest$ac_exeext conftest.$ac_ext
36674 fi
36675 { echo "$as_me:$LINENO: result: $ac_cv_func__snprintf" >&5
36676 echo "${ECHO_T}$ac_cv_func__snprintf" >&6; }
36677 if test $ac_cv_func__snprintf = yes; then
36678   ac_cv_func_snprintf=yes
36679
36680 cat >>confdefs.h <<\_ACEOF
36681 #define snprintf _snprintf
36682 _ACEOF
36683
36684
36685 fi
36686
36687
36688
36689
36690 for ac_func in vsnprintf _vsnprintf
36691 do
36692 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
36693 { echo "$as_me:$LINENO: checking for $ac_func" >&5
36694 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
36695 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
36696   echo $ECHO_N "(cached) $ECHO_C" >&6
36697 else
36698   cat >conftest.$ac_ext <<_ACEOF
36699 /* confdefs.h.  */
36700 _ACEOF
36701 cat confdefs.h >>conftest.$ac_ext
36702 cat >>conftest.$ac_ext <<_ACEOF
36703 /* end confdefs.h.  */
36704 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
36705    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36706 #define $ac_func innocuous_$ac_func
36707
36708 /* System header to define __stub macros and hopefully few prototypes,
36709     which can conflict with char $ac_func (); below.
36710     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36711     <limits.h> exists even on freestanding compilers.  */
36712
36713 #ifdef __STDC__
36714 # include <limits.h>
36715 #else
36716 # include <assert.h>
36717 #endif
36718
36719 #undef $ac_func
36720
36721 /* Override any GCC internal prototype to avoid an error.
36722    Use char because int might match the return type of a GCC
36723    builtin and then its argument prototype would still apply.  */
36724 #ifdef __cplusplus
36725 extern "C"
36726 #endif
36727 char $ac_func ();
36728 /* The GNU C library defines this for functions which it implements
36729     to always fail with ENOSYS.  Some functions are actually named
36730     something starting with __ and the normal name is an alias.  */
36731 #if defined __stub_$ac_func || defined __stub___$ac_func
36732 choke me
36733 #endif
36734
36735 int
36736 main ()
36737 {
36738 return $ac_func ();
36739   ;
36740   return 0;
36741 }
36742 _ACEOF
36743 rm -f conftest.$ac_objext conftest$ac_exeext
36744 if { (ac_try="$ac_link"
36745 case "(($ac_try" in
36746   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36747   *) ac_try_echo=$ac_try;;
36748 esac
36749 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36750   (eval "$ac_link") 2>conftest.er1
36751   ac_status=$?
36752   grep -v '^ *+' conftest.er1 >conftest.err
36753   rm -f conftest.er1
36754   cat conftest.err >&5
36755   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36756   (exit $ac_status); } && {
36757          test -z "$ac_c_werror_flag" ||
36758          test ! -s conftest.err
36759        } && test -s conftest$ac_exeext &&
36760        $as_test_x conftest$ac_exeext; then
36761   eval "$as_ac_var=yes"
36762 else
36763   echo "$as_me: failed program was:" >&5
36764 sed 's/^/| /' conftest.$ac_ext >&5
36765
36766         eval "$as_ac_var=no"
36767 fi
36768
36769 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
36770       conftest$ac_exeext conftest.$ac_ext
36771 fi
36772 ac_res=`eval echo '${'$as_ac_var'}'`
36773                { echo "$as_me:$LINENO: result: $ac_res" >&5
36774 echo "${ECHO_T}$ac_res" >&6; }
36775 if test `eval echo '${'$as_ac_var'}'` = yes; then
36776   cat >>confdefs.h <<_ACEOF
36777 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
36778 _ACEOF
36779
36780 fi
36781 done
36782
36783
36784 if test $ac_cv_func_vsnprintf = no -a $ac_cv_func__vsnprintf = yes ; then
36785         ac_cv_func_vsnprintf=yes
36786
36787 cat >>confdefs.h <<\_ACEOF
36788 #define vsnprintf _vsnprintf
36789 _ACEOF
36790
36791 fi
36792
36793
36794 for ac_func in vprintf
36795 do
36796 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
36797 { echo "$as_me:$LINENO: checking for $ac_func" >&5
36798 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
36799 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
36800   echo $ECHO_N "(cached) $ECHO_C" >&6
36801 else
36802   cat >conftest.$ac_ext <<_ACEOF
36803 /* confdefs.h.  */
36804 _ACEOF
36805 cat confdefs.h >>conftest.$ac_ext
36806 cat >>conftest.$ac_ext <<_ACEOF
36807 /* end confdefs.h.  */
36808 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
36809    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36810 #define $ac_func innocuous_$ac_func
36811
36812 /* System header to define __stub macros and hopefully few prototypes,
36813     which can conflict with char $ac_func (); below.
36814     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36815     <limits.h> exists even on freestanding compilers.  */
36816
36817 #ifdef __STDC__
36818 # include <limits.h>
36819 #else
36820 # include <assert.h>
36821 #endif
36822
36823 #undef $ac_func
36824
36825 /* Override any GCC internal prototype to avoid an error.
36826    Use char because int might match the return type of a GCC
36827    builtin and then its argument prototype would still apply.  */
36828 #ifdef __cplusplus
36829 extern "C"
36830 #endif
36831 char $ac_func ();
36832 /* The GNU C library defines this for functions which it implements
36833     to always fail with ENOSYS.  Some functions are actually named
36834     something starting with __ and the normal name is an alias.  */
36835 #if defined __stub_$ac_func || defined __stub___$ac_func
36836 choke me
36837 #endif
36838
36839 int
36840 main ()
36841 {
36842 return $ac_func ();
36843   ;
36844   return 0;
36845 }
36846 _ACEOF
36847 rm -f conftest.$ac_objext conftest$ac_exeext
36848 if { (ac_try="$ac_link"
36849 case "(($ac_try" in
36850   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36851   *) ac_try_echo=$ac_try;;
36852 esac
36853 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36854   (eval "$ac_link") 2>conftest.er1
36855   ac_status=$?
36856   grep -v '^ *+' conftest.er1 >conftest.err
36857   rm -f conftest.er1
36858   cat conftest.err >&5
36859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36860   (exit $ac_status); } && {
36861          test -z "$ac_c_werror_flag" ||
36862          test ! -s conftest.err
36863        } && test -s conftest$ac_exeext &&
36864        $as_test_x conftest$ac_exeext; then
36865   eval "$as_ac_var=yes"
36866 else
36867   echo "$as_me: failed program was:" >&5
36868 sed 's/^/| /' conftest.$ac_ext >&5
36869
36870         eval "$as_ac_var=no"
36871 fi
36872
36873 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
36874       conftest$ac_exeext conftest.$ac_ext
36875 fi
36876 ac_res=`eval echo '${'$as_ac_var'}'`
36877                { echo "$as_me:$LINENO: result: $ac_res" >&5
36878 echo "${ECHO_T}$ac_res" >&6; }
36879 if test `eval echo '${'$as_ac_var'}'` = yes; then
36880   cat >>confdefs.h <<_ACEOF
36881 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
36882 _ACEOF
36883
36884 { echo "$as_me:$LINENO: checking for _doprnt" >&5
36885 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; }
36886 if test "${ac_cv_func__doprnt+set}" = set; then
36887   echo $ECHO_N "(cached) $ECHO_C" >&6
36888 else
36889   cat >conftest.$ac_ext <<_ACEOF
36890 /* confdefs.h.  */
36891 _ACEOF
36892 cat confdefs.h >>conftest.$ac_ext
36893 cat >>conftest.$ac_ext <<_ACEOF
36894 /* end confdefs.h.  */
36895 /* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
36896    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36897 #define _doprnt innocuous__doprnt
36898
36899 /* System header to define __stub macros and hopefully few prototypes,
36900     which can conflict with char _doprnt (); below.
36901     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36902     <limits.h> exists even on freestanding compilers.  */
36903
36904 #ifdef __STDC__
36905 # include <limits.h>
36906 #else
36907 # include <assert.h>
36908 #endif
36909
36910 #undef _doprnt
36911
36912 /* Override any GCC internal prototype to avoid an error.
36913    Use char because int might match the return type of a GCC
36914    builtin and then its argument prototype would still apply.  */
36915 #ifdef __cplusplus
36916 extern "C"
36917 #endif
36918 char _doprnt ();
36919 /* The GNU C library defines this for functions which it implements
36920     to always fail with ENOSYS.  Some functions are actually named
36921     something starting with __ and the normal name is an alias.  */
36922 #if defined __stub__doprnt || defined __stub____doprnt
36923 choke me
36924 #endif
36925
36926 int
36927 main ()
36928 {
36929 return _doprnt ();
36930   ;
36931   return 0;
36932 }
36933 _ACEOF
36934 rm -f conftest.$ac_objext conftest$ac_exeext
36935 if { (ac_try="$ac_link"
36936 case "(($ac_try" in
36937   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36938   *) ac_try_echo=$ac_try;;
36939 esac
36940 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
36941   (eval "$ac_link") 2>conftest.er1
36942   ac_status=$?
36943   grep -v '^ *+' conftest.er1 >conftest.err
36944   rm -f conftest.er1
36945   cat conftest.err >&5
36946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36947   (exit $ac_status); } && {
36948          test -z "$ac_c_werror_flag" ||
36949          test ! -s conftest.err
36950        } && test -s conftest$ac_exeext &&
36951        $as_test_x conftest$ac_exeext; then
36952   ac_cv_func__doprnt=yes
36953 else
36954   echo "$as_me: failed program was:" >&5
36955 sed 's/^/| /' conftest.$ac_ext >&5
36956
36957         ac_cv_func__doprnt=no
36958 fi
36959
36960 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
36961       conftest$ac_exeext conftest.$ac_ext
36962 fi
36963 { echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
36964 echo "${ECHO_T}$ac_cv_func__doprnt" >&6; }
36965 if test $ac_cv_func__doprnt = yes; then
36966
36967 cat >>confdefs.h <<\_ACEOF
36968 #define HAVE_DOPRNT 1
36969 _ACEOF
36970
36971 fi
36972
36973 fi
36974 done
36975
36976
36977
36978 if test $ac_cv_func_vprintf = yes ; then
36979
36980
36981 for ac_func in snprintf vsnprintf
36982 do
36983 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
36984 { echo "$as_me:$LINENO: checking for $ac_func" >&5
36985 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
36986 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
36987   echo $ECHO_N "(cached) $ECHO_C" >&6
36988 else
36989   cat >conftest.$ac_ext <<_ACEOF
36990 /* confdefs.h.  */
36991 _ACEOF
36992 cat confdefs.h >>conftest.$ac_ext
36993 cat >>conftest.$ac_ext <<_ACEOF
36994 /* end confdefs.h.  */
36995 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
36996    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
36997 #define $ac_func innocuous_$ac_func
36998
36999 /* System header to define __stub macros and hopefully few prototypes,
37000     which can conflict with char $ac_func (); below.
37001     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37002     <limits.h> exists even on freestanding compilers.  */
37003
37004 #ifdef __STDC__
37005 # include <limits.h>
37006 #else
37007 # include <assert.h>
37008 #endif
37009
37010 #undef $ac_func
37011
37012 /* Override any GCC internal prototype to avoid an error.
37013    Use char because int might match the return type of a GCC
37014    builtin and then its argument prototype would still apply.  */
37015 #ifdef __cplusplus
37016 extern "C"
37017 #endif
37018 char $ac_func ();
37019 /* The GNU C library defines this for functions which it implements
37020     to always fail with ENOSYS.  Some functions are actually named
37021     something starting with __ and the normal name is an alias.  */
37022 #if defined __stub_$ac_func || defined __stub___$ac_func
37023 choke me
37024 #endif
37025
37026 int
37027 main ()
37028 {
37029 return $ac_func ();
37030   ;
37031   return 0;
37032 }
37033 _ACEOF
37034 rm -f conftest.$ac_objext conftest$ac_exeext
37035 if { (ac_try="$ac_link"
37036 case "(($ac_try" in
37037   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37038   *) ac_try_echo=$ac_try;;
37039 esac
37040 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37041   (eval "$ac_link") 2>conftest.er1
37042   ac_status=$?
37043   grep -v '^ *+' conftest.er1 >conftest.err
37044   rm -f conftest.er1
37045   cat conftest.err >&5
37046   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37047   (exit $ac_status); } && {
37048          test -z "$ac_c_werror_flag" ||
37049          test ! -s conftest.err
37050        } && test -s conftest$ac_exeext &&
37051        $as_test_x conftest$ac_exeext; then
37052   eval "$as_ac_var=yes"
37053 else
37054   echo "$as_me: failed program was:" >&5
37055 sed 's/^/| /' conftest.$ac_ext >&5
37056
37057         eval "$as_ac_var=no"
37058 fi
37059
37060 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
37061       conftest$ac_exeext conftest.$ac_ext
37062 fi
37063 ac_res=`eval echo '${'$as_ac_var'}'`
37064                { echo "$as_me:$LINENO: result: $ac_res" >&5
37065 echo "${ECHO_T}$ac_res" >&6; }
37066 if test `eval echo '${'$as_ac_var'}'` = yes; then
37067   cat >>confdefs.h <<_ACEOF
37068 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
37069 _ACEOF
37070
37071 fi
37072 done
37073
37074 fi
37075
37076
37077
37078
37079
37080
37081
37082
37083
37084
37085
37086
37087
37088
37089
37090
37091
37092
37093
37094
37095
37096
37097
37098
37099
37100
37101
37102
37103
37104
37105
37106
37107
37108
37109
37110
37111
37112
37113
37114
37115
37116
37117
37118
37119
37120
37121
37122
37123
37124
37125
37126
37127
37128
37129
37130
37131
37132 for ac_func in \
37133         bcopy                   \
37134         closesocket             \
37135         chroot                  \
37136         endgrent                \
37137         endpwent                \
37138         fcntl                   \
37139         flock                   \
37140         fstat                   \
37141         getdtablesize           \
37142         geteuid                 \
37143         getgrgid                \
37144         gethostname             \
37145         getpass                 \
37146         getpassphrase           \
37147         getpwuid                \
37148         getpwnam                \
37149         getspnam                \
37150         gettimeofday            \
37151         initgroups              \
37152         inet_ntoa_b             \
37153         ioctl                   \
37154         lockf                   \
37155         memcpy                  \
37156         memmove                 \
37157         memrchr                 \
37158         mkstemp                 \
37159         mktemp                  \
37160         pipe                    \
37161         read                    \
37162         recv                    \
37163         recvfrom                \
37164         setpwfile               \
37165         setgid                  \
37166         setegid                 \
37167         setsid                  \
37168         setuid                  \
37169         seteuid                 \
37170         signal                  \
37171         strdup                  \
37172         strpbrk                 \
37173         strrchr                 \
37174         strsep                  \
37175         strstr                  \
37176         strtol                  \
37177         strtoul                 \
37178         strtoq                  \
37179         strtouq                 \
37180         strtoll                 \
37181         strspn                  \
37182         sysconf                 \
37183         waitpid                 \
37184         wait4                   \
37185         write                   \
37186         send                    \
37187         sendmsg                 \
37188         sendto                  \
37189
37190 do
37191 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
37192 { echo "$as_me:$LINENO: checking for $ac_func" >&5
37193 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
37194 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
37195   echo $ECHO_N "(cached) $ECHO_C" >&6
37196 else
37197   cat >conftest.$ac_ext <<_ACEOF
37198 /* confdefs.h.  */
37199 _ACEOF
37200 cat confdefs.h >>conftest.$ac_ext
37201 cat >>conftest.$ac_ext <<_ACEOF
37202 /* end confdefs.h.  */
37203 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
37204    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37205 #define $ac_func innocuous_$ac_func
37206
37207 /* System header to define __stub macros and hopefully few prototypes,
37208     which can conflict with char $ac_func (); below.
37209     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37210     <limits.h> exists even on freestanding compilers.  */
37211
37212 #ifdef __STDC__
37213 # include <limits.h>
37214 #else
37215 # include <assert.h>
37216 #endif
37217
37218 #undef $ac_func
37219
37220 /* Override any GCC internal prototype to avoid an error.
37221    Use char because int might match the return type of a GCC
37222    builtin and then its argument prototype would still apply.  */
37223 #ifdef __cplusplus
37224 extern "C"
37225 #endif
37226 char $ac_func ();
37227 /* The GNU C library defines this for functions which it implements
37228     to always fail with ENOSYS.  Some functions are actually named
37229     something starting with __ and the normal name is an alias.  */
37230 #if defined __stub_$ac_func || defined __stub___$ac_func
37231 choke me
37232 #endif
37233
37234 int
37235 main ()
37236 {
37237 return $ac_func ();
37238   ;
37239   return 0;
37240 }
37241 _ACEOF
37242 rm -f conftest.$ac_objext conftest$ac_exeext
37243 if { (ac_try="$ac_link"
37244 case "(($ac_try" in
37245   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37246   *) ac_try_echo=$ac_try;;
37247 esac
37248 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37249   (eval "$ac_link") 2>conftest.er1
37250   ac_status=$?
37251   grep -v '^ *+' conftest.er1 >conftest.err
37252   rm -f conftest.er1
37253   cat conftest.err >&5
37254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37255   (exit $ac_status); } && {
37256          test -z "$ac_c_werror_flag" ||
37257          test ! -s conftest.err
37258        } && test -s conftest$ac_exeext &&
37259        $as_test_x conftest$ac_exeext; then
37260   eval "$as_ac_var=yes"
37261 else
37262   echo "$as_me: failed program was:" >&5
37263 sed 's/^/| /' conftest.$ac_ext >&5
37264
37265         eval "$as_ac_var=no"
37266 fi
37267
37268 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
37269       conftest$ac_exeext conftest.$ac_ext
37270 fi
37271 ac_res=`eval echo '${'$as_ac_var'}'`
37272                { echo "$as_me:$LINENO: result: $ac_res" >&5
37273 echo "${ECHO_T}$ac_res" >&6; }
37274 if test `eval echo '${'$as_ac_var'}'` = yes; then
37275   cat >>confdefs.h <<_ACEOF
37276 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
37277 _ACEOF
37278
37279 fi
37280 done
37281
37282
37283
37284
37285 for ac_func in getopt getpeereid
37286 do
37287 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
37288 { echo "$as_me:$LINENO: checking for $ac_func" >&5
37289 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
37290 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
37291   echo $ECHO_N "(cached) $ECHO_C" >&6
37292 else
37293   cat >conftest.$ac_ext <<_ACEOF
37294 /* confdefs.h.  */
37295 _ACEOF
37296 cat confdefs.h >>conftest.$ac_ext
37297 cat >>conftest.$ac_ext <<_ACEOF
37298 /* end confdefs.h.  */
37299 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
37300    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37301 #define $ac_func innocuous_$ac_func
37302
37303 /* System header to define __stub macros and hopefully few prototypes,
37304     which can conflict with char $ac_func (); below.
37305     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37306     <limits.h> exists even on freestanding compilers.  */
37307
37308 #ifdef __STDC__
37309 # include <limits.h>
37310 #else
37311 # include <assert.h>
37312 #endif
37313
37314 #undef $ac_func
37315
37316 /* Override any GCC internal prototype to avoid an error.
37317    Use char because int might match the return type of a GCC
37318    builtin and then its argument prototype would still apply.  */
37319 #ifdef __cplusplus
37320 extern "C"
37321 #endif
37322 char $ac_func ();
37323 /* The GNU C library defines this for functions which it implements
37324     to always fail with ENOSYS.  Some functions are actually named
37325     something starting with __ and the normal name is an alias.  */
37326 #if defined __stub_$ac_func || defined __stub___$ac_func
37327 choke me
37328 #endif
37329
37330 int
37331 main ()
37332 {
37333 return $ac_func ();
37334   ;
37335   return 0;
37336 }
37337 _ACEOF
37338 rm -f conftest.$ac_objext conftest$ac_exeext
37339 if { (ac_try="$ac_link"
37340 case "(($ac_try" in
37341   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37342   *) ac_try_echo=$ac_try;;
37343 esac
37344 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37345   (eval "$ac_link") 2>conftest.er1
37346   ac_status=$?
37347   grep -v '^ *+' conftest.er1 >conftest.err
37348   rm -f conftest.er1
37349   cat conftest.err >&5
37350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37351   (exit $ac_status); } && {
37352          test -z "$ac_c_werror_flag" ||
37353          test ! -s conftest.err
37354        } && test -s conftest$ac_exeext &&
37355        $as_test_x conftest$ac_exeext; then
37356   eval "$as_ac_var=yes"
37357 else
37358   echo "$as_me: failed program was:" >&5
37359 sed 's/^/| /' conftest.$ac_ext >&5
37360
37361         eval "$as_ac_var=no"
37362 fi
37363
37364 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
37365       conftest$ac_exeext conftest.$ac_ext
37366 fi
37367 ac_res=`eval echo '${'$as_ac_var'}'`
37368                { echo "$as_me:$LINENO: result: $ac_res" >&5
37369 echo "${ECHO_T}$ac_res" >&6; }
37370 if test `eval echo '${'$as_ac_var'}'` = yes; then
37371   cat >>confdefs.h <<_ACEOF
37372 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
37373 _ACEOF
37374
37375 else
37376   case " $LIBOBJS " in
37377   *" $ac_func.$ac_objext "* ) ;;
37378   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
37379  ;;
37380 esac
37381
37382 fi
37383 done
37384
37385
37386
37387 if test "$ac_cv_func_getopt" != yes; then
37388         LIBSRCS="$LIBSRCS getopt.c"
37389 fi
37390
37391 if test "$ac_cv_func_getpeereid" != yes; then
37392
37393 for ac_func in getpeerucred
37394 do
37395 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
37396 { echo "$as_me:$LINENO: checking for $ac_func" >&5
37397 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
37398 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
37399   echo $ECHO_N "(cached) $ECHO_C" >&6
37400 else
37401   cat >conftest.$ac_ext <<_ACEOF
37402 /* confdefs.h.  */
37403 _ACEOF
37404 cat confdefs.h >>conftest.$ac_ext
37405 cat >>conftest.$ac_ext <<_ACEOF
37406 /* end confdefs.h.  */
37407 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
37408    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
37409 #define $ac_func innocuous_$ac_func
37410
37411 /* System header to define __stub macros and hopefully few prototypes,
37412     which can conflict with char $ac_func (); below.
37413     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
37414     <limits.h> exists even on freestanding compilers.  */
37415
37416 #ifdef __STDC__
37417 # include <limits.h>
37418 #else
37419 # include <assert.h>
37420 #endif
37421
37422 #undef $ac_func
37423
37424 /* Override any GCC internal prototype to avoid an error.
37425    Use char because int might match the return type of a GCC
37426    builtin and then its argument prototype would still apply.  */
37427 #ifdef __cplusplus
37428 extern "C"
37429 #endif
37430 char $ac_func ();
37431 /* The GNU C library defines this for functions which it implements
37432     to always fail with ENOSYS.  Some functions are actually named
37433     something starting with __ and the normal name is an alias.  */
37434 #if defined __stub_$ac_func || defined __stub___$ac_func
37435 choke me
37436 #endif
37437
37438 int
37439 main ()
37440 {
37441 return $ac_func ();
37442   ;
37443   return 0;
37444 }
37445 _ACEOF
37446 rm -f conftest.$ac_objext conftest$ac_exeext
37447 if { (ac_try="$ac_link"
37448 case "(($ac_try" in
37449   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37450   *) ac_try_echo=$ac_try;;
37451 esac
37452 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37453   (eval "$ac_link") 2>conftest.er1
37454   ac_status=$?
37455   grep -v '^ *+' conftest.er1 >conftest.err
37456   rm -f conftest.er1
37457   cat conftest.err >&5
37458   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37459   (exit $ac_status); } && {
37460          test -z "$ac_c_werror_flag" ||
37461          test ! -s conftest.err
37462        } && test -s conftest$ac_exeext &&
37463        $as_test_x conftest$ac_exeext; then
37464   eval "$as_ac_var=yes"
37465 else
37466   echo "$as_me: failed program was:" >&5
37467 sed 's/^/| /' conftest.$ac_ext >&5
37468
37469         eval "$as_ac_var=no"
37470 fi
37471
37472 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
37473       conftest$ac_exeext conftest.$ac_ext
37474 fi
37475 ac_res=`eval echo '${'$as_ac_var'}'`
37476                { echo "$as_me:$LINENO: result: $ac_res" >&5
37477 echo "${ECHO_T}$ac_res" >&6; }
37478 if test `eval echo '${'$as_ac_var'}'` = yes; then
37479   cat >>confdefs.h <<_ACEOF
37480 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
37481 _ACEOF
37482
37483 fi
37484 done
37485
37486         if test "$ac_cv_func_getpeerucred" != yes ; then
37487                 { echo "$as_me:$LINENO: checking for struct msghdr.msg_accrightslen" >&5
37488 echo $ECHO_N "checking for struct msghdr.msg_accrightslen... $ECHO_C" >&6; }
37489 if test "${ac_cv_member_struct_msghdr_msg_accrightslen+set}" = set; then
37490   echo $ECHO_N "(cached) $ECHO_C" >&6
37491 else
37492   cat >conftest.$ac_ext <<_ACEOF
37493 /* confdefs.h.  */
37494 _ACEOF
37495 cat confdefs.h >>conftest.$ac_ext
37496 cat >>conftest.$ac_ext <<_ACEOF
37497 /* end confdefs.h.  */
37498 $ac_includes_default
37499 #ifdef HAVE_SYS_SOCKET_H
37500 #include <sys/socket.h>
37501 #endif
37502
37503 int
37504 main ()
37505 {
37506 static struct msghdr ac_aggr;
37507 if (ac_aggr.msg_accrightslen)
37508 return 0;
37509   ;
37510   return 0;
37511 }
37512 _ACEOF
37513 rm -f conftest.$ac_objext
37514 if { (ac_try="$ac_compile"
37515 case "(($ac_try" in
37516   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37517   *) ac_try_echo=$ac_try;;
37518 esac
37519 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37520   (eval "$ac_compile") 2>conftest.er1
37521   ac_status=$?
37522   grep -v '^ *+' conftest.er1 >conftest.err
37523   rm -f conftest.er1
37524   cat conftest.err >&5
37525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37526   (exit $ac_status); } && {
37527          test -z "$ac_c_werror_flag" ||
37528          test ! -s conftest.err
37529        } && test -s conftest.$ac_objext; then
37530   ac_cv_member_struct_msghdr_msg_accrightslen=yes
37531 else
37532   echo "$as_me: failed program was:" >&5
37533 sed 's/^/| /' conftest.$ac_ext >&5
37534
37535         cat >conftest.$ac_ext <<_ACEOF
37536 /* confdefs.h.  */
37537 _ACEOF
37538 cat confdefs.h >>conftest.$ac_ext
37539 cat >>conftest.$ac_ext <<_ACEOF
37540 /* end confdefs.h.  */
37541 $ac_includes_default
37542 #ifdef HAVE_SYS_SOCKET_H
37543 #include <sys/socket.h>
37544 #endif
37545
37546 int
37547 main ()
37548 {
37549 static struct msghdr ac_aggr;
37550 if (sizeof ac_aggr.msg_accrightslen)
37551 return 0;
37552   ;
37553   return 0;
37554 }
37555 _ACEOF
37556 rm -f conftest.$ac_objext
37557 if { (ac_try="$ac_compile"
37558 case "(($ac_try" in
37559   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37560   *) ac_try_echo=$ac_try;;
37561 esac
37562 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37563   (eval "$ac_compile") 2>conftest.er1
37564   ac_status=$?
37565   grep -v '^ *+' conftest.er1 >conftest.err
37566   rm -f conftest.er1
37567   cat conftest.err >&5
37568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37569   (exit $ac_status); } && {
37570          test -z "$ac_c_werror_flag" ||
37571          test ! -s conftest.err
37572        } && test -s conftest.$ac_objext; then
37573   ac_cv_member_struct_msghdr_msg_accrightslen=yes
37574 else
37575   echo "$as_me: failed program was:" >&5
37576 sed 's/^/| /' conftest.$ac_ext >&5
37577
37578         ac_cv_member_struct_msghdr_msg_accrightslen=no
37579 fi
37580
37581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37582 fi
37583
37584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37585 fi
37586 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_accrightslen" >&5
37587 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_accrightslen" >&6; }
37588 if test $ac_cv_member_struct_msghdr_msg_accrightslen = yes; then
37589
37590 cat >>confdefs.h <<_ACEOF
37591 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
37592 _ACEOF
37593
37594
37595 fi
37596
37597                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
37598                         { echo "$as_me:$LINENO: checking for struct msghdr.msg_control" >&5
37599 echo $ECHO_N "checking for struct msghdr.msg_control... $ECHO_C" >&6; }
37600 if test "${ac_cv_member_struct_msghdr_msg_control+set}" = set; then
37601   echo $ECHO_N "(cached) $ECHO_C" >&6
37602 else
37603   cat >conftest.$ac_ext <<_ACEOF
37604 /* confdefs.h.  */
37605 _ACEOF
37606 cat confdefs.h >>conftest.$ac_ext
37607 cat >>conftest.$ac_ext <<_ACEOF
37608 /* end confdefs.h.  */
37609 $ac_includes_default
37610 #ifdef HAVE_SYS_SOCKET_H
37611 #include <sys/socket.h>
37612 #endif
37613
37614 int
37615 main ()
37616 {
37617 static struct msghdr ac_aggr;
37618 if (ac_aggr.msg_control)
37619 return 0;
37620   ;
37621   return 0;
37622 }
37623 _ACEOF
37624 rm -f conftest.$ac_objext
37625 if { (ac_try="$ac_compile"
37626 case "(($ac_try" in
37627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37628   *) ac_try_echo=$ac_try;;
37629 esac
37630 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37631   (eval "$ac_compile") 2>conftest.er1
37632   ac_status=$?
37633   grep -v '^ *+' conftest.er1 >conftest.err
37634   rm -f conftest.er1
37635   cat conftest.err >&5
37636   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37637   (exit $ac_status); } && {
37638          test -z "$ac_c_werror_flag" ||
37639          test ! -s conftest.err
37640        } && test -s conftest.$ac_objext; then
37641   ac_cv_member_struct_msghdr_msg_control=yes
37642 else
37643   echo "$as_me: failed program was:" >&5
37644 sed 's/^/| /' conftest.$ac_ext >&5
37645
37646         cat >conftest.$ac_ext <<_ACEOF
37647 /* confdefs.h.  */
37648 _ACEOF
37649 cat confdefs.h >>conftest.$ac_ext
37650 cat >>conftest.$ac_ext <<_ACEOF
37651 /* end confdefs.h.  */
37652 $ac_includes_default
37653 #ifdef HAVE_SYS_SOCKET_H
37654 #include <sys/socket.h>
37655 #endif
37656
37657 int
37658 main ()
37659 {
37660 static struct msghdr ac_aggr;
37661 if (sizeof ac_aggr.msg_control)
37662 return 0;
37663   ;
37664   return 0;
37665 }
37666 _ACEOF
37667 rm -f conftest.$ac_objext
37668 if { (ac_try="$ac_compile"
37669 case "(($ac_try" in
37670   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37671   *) ac_try_echo=$ac_try;;
37672 esac
37673 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37674   (eval "$ac_compile") 2>conftest.er1
37675   ac_status=$?
37676   grep -v '^ *+' conftest.er1 >conftest.err
37677   rm -f conftest.er1
37678   cat conftest.err >&5
37679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37680   (exit $ac_status); } && {
37681          test -z "$ac_c_werror_flag" ||
37682          test ! -s conftest.err
37683        } && test -s conftest.$ac_objext; then
37684   ac_cv_member_struct_msghdr_msg_control=yes
37685 else
37686   echo "$as_me: failed program was:" >&5
37687 sed 's/^/| /' conftest.$ac_ext >&5
37688
37689         ac_cv_member_struct_msghdr_msg_control=no
37690 fi
37691
37692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37693 fi
37694
37695 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37696 fi
37697 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5
37698 echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_control" >&6; }
37699 if test $ac_cv_member_struct_msghdr_msg_control = yes; then
37700
37701 cat >>confdefs.h <<_ACEOF
37702 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
37703 _ACEOF
37704
37705
37706 fi
37707
37708                 fi
37709                 { echo "$as_me:$LINENO: checking for struct stat.st_fstype" >&5
37710 echo $ECHO_N "checking for struct stat.st_fstype... $ECHO_C" >&6; }
37711 if test "${ac_cv_member_struct_stat_st_fstype+set}" = set; then
37712   echo $ECHO_N "(cached) $ECHO_C" >&6
37713 else
37714   cat >conftest.$ac_ext <<_ACEOF
37715 /* confdefs.h.  */
37716 _ACEOF
37717 cat confdefs.h >>conftest.$ac_ext
37718 cat >>conftest.$ac_ext <<_ACEOF
37719 /* end confdefs.h.  */
37720 $ac_includes_default
37721 int
37722 main ()
37723 {
37724 static struct stat ac_aggr;
37725 if (ac_aggr.st_fstype)
37726 return 0;
37727   ;
37728   return 0;
37729 }
37730 _ACEOF
37731 rm -f conftest.$ac_objext
37732 if { (ac_try="$ac_compile"
37733 case "(($ac_try" in
37734   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37735   *) ac_try_echo=$ac_try;;
37736 esac
37737 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37738   (eval "$ac_compile") 2>conftest.er1
37739   ac_status=$?
37740   grep -v '^ *+' conftest.er1 >conftest.err
37741   rm -f conftest.er1
37742   cat conftest.err >&5
37743   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37744   (exit $ac_status); } && {
37745          test -z "$ac_c_werror_flag" ||
37746          test ! -s conftest.err
37747        } && test -s conftest.$ac_objext; then
37748   ac_cv_member_struct_stat_st_fstype=yes
37749 else
37750   echo "$as_me: failed program was:" >&5
37751 sed 's/^/| /' conftest.$ac_ext >&5
37752
37753         cat >conftest.$ac_ext <<_ACEOF
37754 /* confdefs.h.  */
37755 _ACEOF
37756 cat confdefs.h >>conftest.$ac_ext
37757 cat >>conftest.$ac_ext <<_ACEOF
37758 /* end confdefs.h.  */
37759 $ac_includes_default
37760 int
37761 main ()
37762 {
37763 static struct stat ac_aggr;
37764 if (sizeof ac_aggr.st_fstype)
37765 return 0;
37766   ;
37767   return 0;
37768 }
37769 _ACEOF
37770 rm -f conftest.$ac_objext
37771 if { (ac_try="$ac_compile"
37772 case "(($ac_try" in
37773   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37774   *) ac_try_echo=$ac_try;;
37775 esac
37776 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37777   (eval "$ac_compile") 2>conftest.er1
37778   ac_status=$?
37779   grep -v '^ *+' conftest.er1 >conftest.err
37780   rm -f conftest.er1
37781   cat conftest.err >&5
37782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37783   (exit $ac_status); } && {
37784          test -z "$ac_c_werror_flag" ||
37785          test ! -s conftest.err
37786        } && test -s conftest.$ac_objext; then
37787   ac_cv_member_struct_stat_st_fstype=yes
37788 else
37789   echo "$as_me: failed program was:" >&5
37790 sed 's/^/| /' conftest.$ac_ext >&5
37791
37792         ac_cv_member_struct_stat_st_fstype=no
37793 fi
37794
37795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37796 fi
37797
37798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37799 fi
37800 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_fstype" >&5
37801 echo "${ECHO_T}$ac_cv_member_struct_stat_st_fstype" >&6; }
37802 if test $ac_cv_member_struct_stat_st_fstype = yes; then
37803
37804 cat >>confdefs.h <<_ACEOF
37805 #define HAVE_STRUCT_STAT_ST_FSTYPE 1
37806 _ACEOF
37807
37808
37809 fi
37810 { echo "$as_me:$LINENO: checking for struct stat.st_vfstype" >&5
37811 echo $ECHO_N "checking for struct stat.st_vfstype... $ECHO_C" >&6; }
37812 if test "${ac_cv_member_struct_stat_st_vfstype+set}" = set; then
37813   echo $ECHO_N "(cached) $ECHO_C" >&6
37814 else
37815   cat >conftest.$ac_ext <<_ACEOF
37816 /* confdefs.h.  */
37817 _ACEOF
37818 cat confdefs.h >>conftest.$ac_ext
37819 cat >>conftest.$ac_ext <<_ACEOF
37820 /* end confdefs.h.  */
37821 $ac_includes_default
37822 int
37823 main ()
37824 {
37825 static struct stat ac_aggr;
37826 if (ac_aggr.st_vfstype)
37827 return 0;
37828   ;
37829   return 0;
37830 }
37831 _ACEOF
37832 rm -f conftest.$ac_objext
37833 if { (ac_try="$ac_compile"
37834 case "(($ac_try" in
37835   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37836   *) ac_try_echo=$ac_try;;
37837 esac
37838 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37839   (eval "$ac_compile") 2>conftest.er1
37840   ac_status=$?
37841   grep -v '^ *+' conftest.er1 >conftest.err
37842   rm -f conftest.er1
37843   cat conftest.err >&5
37844   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37845   (exit $ac_status); } && {
37846          test -z "$ac_c_werror_flag" ||
37847          test ! -s conftest.err
37848        } && test -s conftest.$ac_objext; then
37849   ac_cv_member_struct_stat_st_vfstype=yes
37850 else
37851   echo "$as_me: failed program was:" >&5
37852 sed 's/^/| /' conftest.$ac_ext >&5
37853
37854         cat >conftest.$ac_ext <<_ACEOF
37855 /* confdefs.h.  */
37856 _ACEOF
37857 cat confdefs.h >>conftest.$ac_ext
37858 cat >>conftest.$ac_ext <<_ACEOF
37859 /* end confdefs.h.  */
37860 $ac_includes_default
37861 int
37862 main ()
37863 {
37864 static struct stat ac_aggr;
37865 if (sizeof ac_aggr.st_vfstype)
37866 return 0;
37867   ;
37868   return 0;
37869 }
37870 _ACEOF
37871 rm -f conftest.$ac_objext
37872 if { (ac_try="$ac_compile"
37873 case "(($ac_try" in
37874   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37875   *) ac_try_echo=$ac_try;;
37876 esac
37877 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37878   (eval "$ac_compile") 2>conftest.er1
37879   ac_status=$?
37880   grep -v '^ *+' conftest.er1 >conftest.err
37881   rm -f conftest.er1
37882   cat conftest.err >&5
37883   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37884   (exit $ac_status); } && {
37885          test -z "$ac_c_werror_flag" ||
37886          test ! -s conftest.err
37887        } && test -s conftest.$ac_objext; then
37888   ac_cv_member_struct_stat_st_vfstype=yes
37889 else
37890   echo "$as_me: failed program was:" >&5
37891 sed 's/^/| /' conftest.$ac_ext >&5
37892
37893         ac_cv_member_struct_stat_st_vfstype=no
37894 fi
37895
37896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37897 fi
37898
37899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37900 fi
37901 { echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_vfstype" >&5
37902 echo "${ECHO_T}$ac_cv_member_struct_stat_st_vfstype" >&6; }
37903 if test $ac_cv_member_struct_stat_st_vfstype = yes; then
37904
37905 cat >>confdefs.h <<_ACEOF
37906 #define HAVE_STRUCT_STAT_ST_VFSTYPE 1
37907 _ACEOF
37908
37909
37910 fi
37911
37912                 if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
37913                         cat >conftest.$ac_ext <<_ACEOF
37914 struct stat st; char *ptr=st.st_fstype;
37915 _ACEOF
37916 rm -f conftest.$ac_objext
37917 if { (ac_try="$ac_compile"
37918 case "(($ac_try" in
37919   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
37920   *) ac_try_echo=$ac_try;;
37921 esac
37922 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
37923   (eval "$ac_compile") 2>conftest.er1
37924   ac_status=$?
37925   grep -v '^ *+' conftest.er1 >conftest.err
37926   rm -f conftest.er1
37927   cat conftest.err >&5
37928   echo "$as_me:$LINENO: \$? = $ac_status" >&5
37929   (exit $ac_status); } && {
37930          test -z "$ac_c_werror_flag" ||
37931          test ! -s conftest.err
37932        } && test -s conftest.$ac_objext; then
37933
37934 cat >>confdefs.h <<\_ACEOF
37935 #define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1
37936 _ACEOF
37937
37938 else
37939   echo "$as_me: failed program was:" >&5
37940 sed 's/^/| /' conftest.$ac_ext >&5
37941
37942
37943 cat >>confdefs.h <<\_ACEOF
37944 #define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1
37945 _ACEOF
37946
37947 fi
37948
37949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37950                 fi
37951         fi
37952         LIBSRCS="$LIBSRCS getpeereid.c"
37953 fi
37954
37955 if test "$ac_cv_func_snprintf" != yes ||
37956    test "$ac_cv_func_vsnprintf" != yes; then
37957         if test "$ac_cv_func_snprintf" != yes; then
37958
37959 cat >>confdefs.h <<\_ACEOF
37960 #define snprintf ber_pvt_snprintf
37961 _ACEOF
37962
37963         fi
37964         if test "$ac_cv_func_vsnprintf" != yes; then
37965
37966 cat >>confdefs.h <<\_ACEOF
37967 #define vsnprintf ber_pvt_vsnprintf
37968 _ACEOF
37969
37970         fi
37971 fi
37972
37973
37974 if test "$ol_enable_slapi" != no ; then
37975
37976 for ac_header in ltdl.h
37977 do
37978 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
37979 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
37980   { echo "$as_me:$LINENO: checking for $ac_header" >&5
37981 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
37982 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
37983   echo $ECHO_N "(cached) $ECHO_C" >&6
37984 fi
37985 ac_res=`eval echo '${'$as_ac_Header'}'`
37986                { echo "$as_me:$LINENO: result: $ac_res" >&5
37987 echo "${ECHO_T}$ac_res" >&6; }
37988 else
37989   # Is the header compilable?
37990 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
37991 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
37992 cat >conftest.$ac_ext <<_ACEOF
37993 /* confdefs.h.  */
37994 _ACEOF
37995 cat confdefs.h >>conftest.$ac_ext
37996 cat >>conftest.$ac_ext <<_ACEOF
37997 /* end confdefs.h.  */
37998 $ac_includes_default
37999 #include <$ac_header>
38000 _ACEOF
38001 rm -f conftest.$ac_objext
38002 if { (ac_try="$ac_compile"
38003 case "(($ac_try" in
38004   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
38005   *) ac_try_echo=$ac_try;;
38006 esac
38007 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
38008   (eval "$ac_compile") 2>conftest.er1
38009   ac_status=$?
38010   grep -v '^ *+' conftest.er1 >conftest.err
38011   rm -f conftest.er1
38012   cat conftest.err >&5
38013   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38014   (exit $ac_status); } && {
38015          test -z "$ac_c_werror_flag" ||
38016          test ! -s conftest.err
38017        } && test -s conftest.$ac_objext; then
38018   ac_header_compiler=yes
38019 else
38020   echo "$as_me: failed program was:" >&5
38021 sed 's/^/| /' conftest.$ac_ext >&5
38022
38023         ac_header_compiler=no
38024 fi
38025
38026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38027 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
38028 echo "${ECHO_T}$ac_header_compiler" >&6; }
38029
38030 # Is the header present?
38031 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
38032 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
38033 cat >conftest.$ac_ext <<_ACEOF
38034 /* confdefs.h.  */
38035 _ACEOF
38036 cat confdefs.h >>conftest.$ac_ext
38037 cat >>conftest.$ac_ext <<_ACEOF
38038 /* end confdefs.h.  */
38039 #include <$ac_header>
38040 _ACEOF
38041 if { (ac_try="$ac_cpp conftest.$ac_ext"
38042 case "(($ac_try" in
38043   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
38044   *) ac_try_echo=$ac_try;;
38045 esac
38046 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
38047   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
38048   ac_status=$?
38049   grep -v '^ *+' conftest.er1 >conftest.err
38050   rm -f conftest.er1
38051   cat conftest.err >&5
38052   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38053   (exit $ac_status); } >/dev/null && {
38054          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
38055          test ! -s conftest.err
38056        }; then
38057   ac_header_preproc=yes
38058 else
38059   echo "$as_me: failed program was:" >&5
38060 sed 's/^/| /' conftest.$ac_ext >&5
38061
38062   ac_header_preproc=no
38063 fi
38064
38065 rm -f conftest.err conftest.$ac_ext
38066 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
38067 echo "${ECHO_T}$ac_header_preproc" >&6; }
38068
38069 # So?  What about this header?
38070 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
38071   yes:no: )
38072     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
38073 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
38074     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
38075 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
38076     ac_header_preproc=yes
38077     ;;
38078   no:yes:* )
38079     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
38080 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
38081     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
38082 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
38083     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
38084 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
38085     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
38086 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
38087     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
38088 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
38089     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
38090 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
38091     ( cat <<\_ASBOX
38092 ## --------------------------------------------- ##
38093 ## Report this to <http://www.openldap.org/its/> ##
38094 ## --------------------------------------------- ##
38095 _ASBOX
38096      ) | sed "s/^/$as_me: WARNING:     /" >&2
38097     ;;
38098 esac
38099 { echo "$as_me:$LINENO: checking for $ac_header" >&5
38100 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
38101 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
38102   echo $ECHO_N "(cached) $ECHO_C" >&6
38103 else
38104   eval "$as_ac_Header=\$ac_header_preproc"
38105 fi
38106 ac_res=`eval echo '${'$as_ac_Header'}'`
38107                { echo "$as_me:$LINENO: result: $ac_res" >&5
38108 echo "${ECHO_T}$ac_res" >&6; }
38109
38110 fi
38111 if test `eval echo '${'$as_ac_Header'}'` = yes; then
38112   cat >>confdefs.h <<_ACEOF
38113 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
38114 _ACEOF
38115
38116 fi
38117
38118 done
38119
38120
38121         if test $ac_cv_header_ltdl_h != yes ; then
38122                 { { echo "$as_me:$LINENO: error: could not locate <ltdl.h>" >&5
38123 echo "$as_me: error: could not locate <ltdl.h>" >&2;}
38124    { (exit 1); exit 1; }; }
38125         fi
38126         { echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5
38127 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6; }
38128 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then
38129   echo $ECHO_N "(cached) $ECHO_C" >&6
38130 else
38131   ac_check_lib_save_LIBS=$LIBS
38132 LIBS="-lltdl  $LIBS"
38133 cat >conftest.$ac_ext <<_ACEOF
38134 /* confdefs.h.  */
38135 _ACEOF
38136 cat confdefs.h >>conftest.$ac_ext
38137 cat >>conftest.$ac_ext <<_ACEOF
38138 /* end confdefs.h.  */
38139
38140 /* Override any GCC internal prototype to avoid an error.
38141    Use char because int might match the return type of a GCC
38142    builtin and then its argument prototype would still apply.  */
38143 #ifdef __cplusplus
38144 extern "C"
38145 #endif
38146 char lt_dlinit ();
38147 int
38148 main ()
38149 {
38150 return lt_dlinit ();
38151   ;
38152   return 0;
38153 }
38154 _ACEOF
38155 rm -f conftest.$ac_objext conftest$ac_exeext
38156 if { (ac_try="$ac_link"
38157 case "(($ac_try" in
38158   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
38159   *) ac_try_echo=$ac_try;;
38160 esac
38161 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
38162   (eval "$ac_link") 2>conftest.er1
38163   ac_status=$?
38164   grep -v '^ *+' conftest.er1 >conftest.err
38165   rm -f conftest.er1
38166   cat conftest.err >&5
38167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
38168   (exit $ac_status); } && {
38169          test -z "$ac_c_werror_flag" ||
38170          test ! -s conftest.err
38171        } && test -s conftest$ac_exeext &&
38172        $as_test_x conftest$ac_exeext; then
38173   ac_cv_lib_ltdl_lt_dlinit=yes
38174 else
38175   echo "$as_me: failed program was:" >&5
38176 sed 's/^/| /' conftest.$ac_ext >&5
38177
38178         ac_cv_lib_ltdl_lt_dlinit=no
38179 fi
38180
38181 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
38182       conftest$ac_exeext conftest.$ac_ext
38183 LIBS=$ac_check_lib_save_LIBS
38184 fi
38185 { echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
38186 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6; }
38187 if test $ac_cv_lib_ltdl_lt_dlinit = yes; then
38188
38189                 SLAPI_LIBS=-lltdl
38190                 LIBSLAPI=libslapi.a
38191                 LIBSLAPITOOLS=../libslapi.a
38192
38193 cat >>confdefs.h <<\_ACEOF
38194 #define HAVE_LIBLTDL 1
38195 _ACEOF
38196
38197
38198 else
38199   { { echo "$as_me:$LINENO: error: could not locate libtool -lltdl" >&5
38200 echo "$as_me: error: could not locate libtool -lltdl" >&2;}
38201    { (exit 1); exit 1; }; }
38202 fi
38203
38204
38205
38206 cat >>confdefs.h <<\_ACEOF
38207 #define LDAP_SLAPI 1
38208 _ACEOF
38209
38210 fi
38211
38212 if test "$ol_enable_debug" != no ; then
38213         if test "$ol_enable_debug" = traditional; then
38214
38215 cat >>confdefs.h <<\_ACEOF
38216 #define OLD_DEBUG 1
38217 _ACEOF
38218
38219         fi
38220
38221 cat >>confdefs.h <<\_ACEOF
38222 #define LDAP_DEBUG 1
38223 _ACEOF
38224
38225 fi
38226 if test "$ol_enable_syslog" = yes ; then
38227
38228 cat >>confdefs.h <<\_ACEOF
38229 #define LDAP_SYSLOG 1
38230 _ACEOF
38231
38232 fi
38233 if test "$ol_enable_proctitle" != no ; then
38234
38235 cat >>confdefs.h <<\_ACEOF
38236 #define LDAP_PROCTITLE 1
38237 _ACEOF
38238
38239 fi
38240 if test "$ol_enable_referrals" != no ; then
38241
38242 cat >>confdefs.h <<\_ACEOF
38243 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
38244 _ACEOF
38245
38246 fi
38247 if test "$ol_enable_local" != no; then
38248
38249 cat >>confdefs.h <<\_ACEOF
38250 #define LDAP_PF_LOCAL 1
38251 _ACEOF
38252
38253 fi
38254 if test "$ol_link_ipv6" != no; then
38255
38256 cat >>confdefs.h <<\_ACEOF
38257 #define LDAP_PF_INET6 1
38258 _ACEOF
38259
38260 fi
38261 if test "$ol_enable_cleartext" != no ; then
38262
38263 cat >>confdefs.h <<\_ACEOF
38264 #define SLAPD_CLEARTEXT 1
38265 _ACEOF
38266
38267 fi
38268 if test "$ol_enable_crypt" != no ; then
38269
38270 cat >>confdefs.h <<\_ACEOF
38271 #define SLAPD_CRYPT 1
38272 _ACEOF
38273
38274 fi
38275 if test "$ol_link_spasswd" != no ; then
38276
38277 cat >>confdefs.h <<\_ACEOF
38278 #define SLAPD_SPASSWD 1
38279 _ACEOF
38280
38281 fi
38282 if test "$ol_enable_rlookups" != no ; then
38283
38284 cat >>confdefs.h <<\_ACEOF
38285 #define SLAPD_RLOOKUPS 1
38286 _ACEOF
38287
38288 fi
38289 if test "$ol_enable_aci" != no ; then
38290         if test $ol_enable_dynacl = no ; then
38291                 ol_enable_dynacl=yes
38292                 { echo "$as_me:$LINENO: WARNING: ACIs need dynacl" >&5
38293 echo "$as_me: WARNING: ACIs need dynacl" >&2;}
38294         fi
38295         if test "$ol_enable_aci" = mod ; then
38296                 MFLAG=SLAPD_MOD_DYNAMIC
38297                                 { { echo "$as_me:$LINENO: error: ACI build as dynamic module not supported (yet)" >&5
38298 echo "$as_me: error: ACI build as dynamic module not supported (yet)" >&2;}
38299    { (exit 1); exit 1; }; }
38300         else
38301                 MFLAG=SLAPD_MOD_STATIC
38302         fi
38303         WITH_ACI_ENABLED=$ol_enable_aci
38304
38305 cat >>confdefs.h <<_ACEOF
38306 #define SLAPD_ACI_ENABLED $MFLAG
38307 _ACEOF
38308
38309 else
38310         WITH_ACI_ENABLED=no
38311 fi
38312 if test "$ol_enable_dynacl" != no ; then
38313
38314 cat >>confdefs.h <<\_ACEOF
38315 #define SLAP_DYNACL 1
38316 _ACEOF
38317
38318 fi
38319
38320 if test "$ol_link_modules" != no ; then
38321
38322 cat >>confdefs.h <<\_ACEOF
38323 #define SLAPD_MODULES 1
38324 _ACEOF
38325
38326         BUILD_SLAPD=yes
38327         SLAPD_MODULES_LDFLAGS="-dlopen self"
38328 fi
38329
38330
38331 cat >>confdefs.h <<\_ACEOF
38332 #define SLAPD_MOD_STATIC 1
38333 _ACEOF
38334
38335
38336 cat >>confdefs.h <<\_ACEOF
38337 #define SLAPD_MOD_DYNAMIC 2
38338 _ACEOF
38339
38340
38341 if test "$ol_enable_monitor" != no ; then
38342         BUILD_SLAPD=yes
38343         BUILD_MONITOR=$ol_enable_monitor
38344         if test "$ol_enable_monitor" = mod ; then
38345                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
38346                 MFLAG=SLAPD_MOD_DYNAMIC
38347         else
38348                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
38349                 MFLAG=SLAPD_MOD_STATIC
38350         fi
38351
38352 cat >>confdefs.h <<_ACEOF
38353 #define SLAPD_MONITOR $MFLAG
38354 _ACEOF
38355
38356 fi
38357
38358 if test "$ol_enable_bdb" != no ; then
38359         BUILD_SLAPD=yes
38360         BUILD_BDB=$ol_enable_bdb
38361         if test "$ol_enable_bdb" = mod ; then
38362                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
38363                 MFLAG=SLAPD_MOD_DYNAMIC
38364         else
38365                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
38366                 MFLAG=SLAPD_MOD_STATIC
38367         fi
38368
38369 cat >>confdefs.h <<_ACEOF
38370 #define SLAPD_BDB $MFLAG
38371 _ACEOF
38372
38373 fi
38374
38375 if test "$ol_enable_dnssrv" != no ; then
38376         BUILD_SLAPD=yes
38377         BUILD_DNSSRV=$ol_enable_dnssrv
38378         if test "$ol_enable_dnssrv" = mod ; then
38379                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
38380                 MFLAG=SLAPD_MOD_DYNAMIC
38381         else
38382                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
38383                 MFLAG=SLAPD_MOD_STATIC
38384         fi
38385
38386 cat >>confdefs.h <<_ACEOF
38387 #define SLAPD_DNSSRV $MFLAG
38388 _ACEOF
38389
38390 fi
38391
38392 if test "$ol_enable_hdb" != no ; then
38393         BUILD_SLAPD=yes
38394         BUILD_HDB=$ol_enable_hdb
38395         if test "$ol_enable_hdb" = mod ; then
38396                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
38397                 MFLAG=SLAPD_MOD_DYNAMIC
38398         else
38399                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
38400                 MFLAG=SLAPD_MOD_STATIC
38401         fi
38402
38403 cat >>confdefs.h <<_ACEOF
38404 #define SLAPD_HDB $MFLAG
38405 _ACEOF
38406
38407 fi
38408
38409 if test "$ol_enable_ldap" != no ; then
38410         BUILD_SLAPD=yes
38411         BUILD_LDAP=$ol_enable_ldap
38412         if test "$ol_enable_ldap" = mod ; then
38413                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
38414                 MFLAG=SLAPD_MOD_DYNAMIC
38415         else
38416                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
38417                 MFLAG=SLAPD_MOD_STATIC
38418         fi
38419
38420 cat >>confdefs.h <<_ACEOF
38421 #define SLAPD_LDAP $MFLAG
38422 _ACEOF
38423
38424 fi
38425
38426 if test "$ol_enable_meta" != no ; then
38427         BUILD_SLAPD=yes
38428         BUILD_META=$ol_enable_meta
38429         BUILD_REWRITE=yes
38430         if test "$ol_enable_meta" = mod ; then
38431                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
38432                 MFLAG=SLAPD_MOD_DYNAMIC
38433         else
38434                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
38435                 MFLAG=SLAPD_MOD_STATIC
38436         fi
38437
38438 cat >>confdefs.h <<_ACEOF
38439 #define SLAPD_META $MFLAG
38440 _ACEOF
38441
38442 fi
38443
38444 if test "$ol_enable_ndb" != no ; then
38445         BUILD_SLAPD=yes
38446         BUILD_NDB=$ol_enable_ndb
38447         if test "$ol_enable_ndb" = mod ; then
38448                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ndb"
38449                 MFLAG=SLAPD_MOD_DYNAMIC
38450         else
38451                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ndb"
38452                 MFLAG=SLAPD_MOD_STATIC
38453         fi
38454
38455 cat >>confdefs.h <<_ACEOF
38456 #define SLAPD_NDB $MFLAG
38457 _ACEOF
38458
38459 fi
38460
38461 if test "$ol_enable_null" != no ; then
38462         BUILD_SLAPD=yes
38463         BUILD_NULL=$ol_enable_null
38464         if test "$ol_enable_null" = mod ; then
38465                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
38466                 MFLAG=SLAPD_MOD_DYNAMIC
38467         else
38468                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
38469                 MFLAG=SLAPD_MOD_STATIC
38470         fi
38471
38472 cat >>confdefs.h <<_ACEOF
38473 #define SLAPD_NULL $MFLAG
38474 _ACEOF
38475
38476 fi
38477
38478 if test "$ol_enable_passwd" != no ; then
38479         BUILD_SLAPD=yes
38480         BUILD_PASSWD=$ol_enable_passwd
38481         if test "$ol_enable_passwd" = mod ; then
38482                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
38483                 MFLAG=SLAPD_MOD_DYNAMIC
38484         else
38485                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
38486                 MFLAG=SLAPD_MOD_STATIC
38487         fi
38488
38489 cat >>confdefs.h <<_ACEOF
38490 #define SLAPD_PASSWD $MFLAG
38491 _ACEOF
38492
38493 fi
38494
38495 if test "$ol_link_perl" != no ; then
38496         BUILD_SLAPD=yes
38497         BUILD_PERL=$ol_enable_perl
38498         if test "$ol_enable_perl" = mod ; then
38499                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
38500                 MFLAG=SLAPD_MOD_DYNAMIC
38501         else
38502                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
38503                 MFLAG=SLAPD_MOD_STATIC
38504         fi
38505
38506 cat >>confdefs.h <<_ACEOF
38507 #define SLAPD_PERL $MFLAG
38508 _ACEOF
38509
38510 fi
38511
38512 if test "$ol_enable_relay" != no ; then
38513         BUILD_SLAPD=yes
38514         BUILD_RELAY=$ol_enable_relay
38515         if test "$ol_enable_relay" = mod ; then
38516                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
38517                 MFLAG=SLAPD_MOD_DYNAMIC
38518         else
38519                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
38520                 MFLAG=SLAPD_MOD_STATIC
38521         fi
38522
38523 cat >>confdefs.h <<_ACEOF
38524 #define SLAPD_RELAY $MFLAG
38525 _ACEOF
38526
38527 fi
38528
38529 if test "$ol_enable_shell" != no ; then
38530         if test "$ol_link_threads" != no ; then
38531                 { echo "$as_me:$LINENO: WARNING: Use of --without-threads is recommended with back-shell" >&5
38532 echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
38533         fi
38534         BUILD_SLAPD=yes
38535         BUILD_SHELL=$ol_enable_shell
38536         if test "$ol_enable_shell" = mod ; then
38537                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
38538                 MFLAG=SLAPD_MOD_DYNAMIC
38539         else
38540                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
38541                 MFLAG=SLAPD_MOD_STATIC
38542         fi
38543
38544 cat >>confdefs.h <<_ACEOF
38545 #define SLAPD_SHELL $MFLAG
38546 _ACEOF
38547
38548 fi
38549
38550 if test "$ol_enable_sock" != no ; then
38551         BUILD_SLAPD=yes
38552         BUILD_SOCK=$ol_enable_sock
38553         if test "$ol_enable_sock" = mod ; then
38554                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sock"
38555                 MFLAG=SLAPD_MOD_DYNAMIC
38556         else
38557                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sock"
38558                 MFLAG=SLAPD_MOD_STATIC
38559         fi
38560
38561 cat >>confdefs.h <<_ACEOF
38562 #define SLAPD_SOCK $MFLAG
38563 _ACEOF
38564
38565 fi
38566
38567 if test "$ol_link_sql" != no ; then
38568         BUILD_SLAPD=yes
38569         BUILD_SQL=$ol_enable_sql
38570         if test "$ol_enable_sql" = mod; then
38571                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
38572                 MFLAG=SLAPD_MOD_DYNAMIC
38573         else
38574                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
38575                 MFLAG=SLAPD_MOD_STATIC
38576         fi
38577
38578 cat >>confdefs.h <<_ACEOF
38579 #define SLAPD_SQL $MFLAG
38580 _ACEOF
38581
38582 fi
38583
38584 if test "$ol_enable_accesslog" != no ; then
38585         BUILD_ACCESSLOG=$ol_enable_accesslog
38586         if test "$ol_enable_accesslog" = mod ; then
38587                 MFLAG=SLAPD_MOD_DYNAMIC
38588                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
38589         else
38590                 MFLAG=SLAPD_MOD_STATIC
38591                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
38592         fi
38593
38594 cat >>confdefs.h <<_ACEOF
38595 #define SLAPD_OVER_ACCESSLOG $MFLAG
38596 _ACEOF
38597
38598 fi
38599
38600 if test "$ol_enable_auditlog" != no ; then
38601         BUILD_AUDITLOG=$ol_enable_auditlog
38602         if test "$ol_enable_auditlog" = mod ; then
38603                 MFLAG=SLAPD_MOD_DYNAMIC
38604                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
38605         else
38606                 MFLAG=SLAPD_MOD_STATIC
38607                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
38608         fi
38609
38610 cat >>confdefs.h <<_ACEOF
38611 #define SLAPD_OVER_AUDITLOG $MFLAG
38612 _ACEOF
38613
38614 fi
38615
38616 if test "$ol_enable_collect" != no ; then
38617         BUILD_COLLECT=$ol_enable_collect
38618         if test "$ol_enable_collect" = mod ; then
38619                 MFLAG=SLAPD_MOD_DYNAMIC
38620                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS collect.la"
38621         else
38622                 MFLAG=SLAPD_MOD_STATIC
38623                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS collect.o"
38624         fi
38625
38626 cat >>confdefs.h <<_ACEOF
38627 #define SLAPD_OVER_COLLECT $MFLAG
38628 _ACEOF
38629
38630 fi
38631
38632 if test "$ol_enable_constraint" != no ; then
38633         BUILD_CONSTRAINT=$ol_enable_constraint
38634         if test "$ol_enable_constraint" = mod ; then
38635                 MFLAG=SLAPD_MOD_DYNAMIC
38636                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la"
38637         else
38638                 MFLAG=SLAPD_MOD_STATIC
38639                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o"
38640         fi
38641
38642 cat >>confdefs.h <<_ACEOF
38643 #define SLAPD_OVER_CONSTRAINT $MFLAG
38644 _ACEOF
38645
38646 fi
38647
38648 if test "$ol_enable_dds" != no ; then
38649         BUILD_DDS=$ol_enable_dds
38650         if test "$ol_enable_dds" = mod ; then
38651                 MFLAG=SLAPD_MOD_DYNAMIC
38652                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
38653         else
38654                 MFLAG=SLAPD_MOD_STATIC
38655                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
38656         fi
38657
38658 cat >>confdefs.h <<_ACEOF
38659 #define SLAPD_OVER_DDS $MFLAG
38660 _ACEOF
38661
38662 fi
38663
38664 if test "$ol_enable_deref" != no ; then
38665         BUILD_DDS=$ol_enable_deref
38666         if test "$ol_enable_deref" = mod ; then
38667                 MFLAG=SLAPD_MOD_DYNAMIC
38668                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS deref.la"
38669         else
38670                 MFLAG=SLAPD_MOD_STATIC
38671                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS deref.o"
38672         fi
38673
38674 cat >>confdefs.h <<_ACEOF
38675 #define SLAPD_OVER_DEREF $MFLAG
38676 _ACEOF
38677
38678 fi
38679
38680 if test "$ol_enable_dyngroup" != no ; then
38681         BUILD_DYNGROUP=$ol_enable_dyngroup
38682         if test "$ol_enable_dyngroup" = mod ; then
38683                 MFLAG=SLAPD_MOD_DYNAMIC
38684                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
38685         else
38686                 MFLAG=SLAPD_MOD_STATIC
38687                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
38688         fi
38689
38690 cat >>confdefs.h <<_ACEOF
38691 #define SLAPD_OVER_DYNGROUP $MFLAG
38692 _ACEOF
38693
38694 fi
38695
38696 if test "$ol_enable_dynlist" != no ; then
38697         BUILD_DYNLIST=$ol_enable_dynlist
38698         if test "$ol_enable_dynlist" = mod ; then
38699                 MFLAG=SLAPD_MOD_DYNAMIC
38700                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
38701         else
38702                 MFLAG=SLAPD_MOD_STATIC
38703                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
38704         fi
38705
38706 cat >>confdefs.h <<_ACEOF
38707 #define SLAPD_OVER_DYNLIST $MFLAG
38708 _ACEOF
38709
38710 fi
38711
38712 if test "$ol_enable_memberof" != no ; then
38713         BUILD_MEMBEROF=$ol_enable_memberof
38714         if test "$ol_enable_memberof" = mod ; then
38715                 MFLAG=SLAPD_MOD_DYNAMIC
38716                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la"
38717         else
38718                 MFLAG=SLAPD_MOD_STATIC
38719                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o"
38720         fi
38721
38722 cat >>confdefs.h <<_ACEOF
38723 #define SLAPD_OVER_MEMBEROF $MFLAG
38724 _ACEOF
38725
38726 fi
38727
38728 if test "$ol_enable_ppolicy" != no ; then
38729         BUILD_PPOLICY=$ol_enable_ppolicy
38730         if test "$ol_enable_ppolicy" = mod ; then
38731                 MFLAG=SLAPD_MOD_DYNAMIC
38732                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
38733         else
38734                 MFLAG=SLAPD_MOD_STATIC
38735                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
38736         fi
38737
38738 cat >>confdefs.h <<_ACEOF
38739 #define SLAPD_OVER_PPOLICY $MFLAG
38740 _ACEOF
38741
38742 fi
38743
38744 if test "$ol_enable_proxycache" != no ; then
38745         BUILD_PROXYCACHE=$ol_enable_proxycache
38746         if test "$ol_enable_proxycache" = mod ; then
38747                 MFLAG=SLAPD_MOD_DYNAMIC
38748                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
38749         else
38750                 MFLAG=SLAPD_MOD_STATIC
38751                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
38752         fi
38753
38754 cat >>confdefs.h <<_ACEOF
38755 #define SLAPD_OVER_PROXYCACHE $MFLAG
38756 _ACEOF
38757
38758 fi
38759
38760 if test "$ol_enable_refint" != no ; then
38761         BUILD_REFINT=$ol_enable_refint
38762         if test "$ol_enable_refint" = mod ; then
38763                 MFLAG=SLAPD_MOD_DYNAMIC
38764                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
38765         else
38766                 MFLAG=SLAPD_MOD_STATIC
38767                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
38768         fi
38769
38770 cat >>confdefs.h <<_ACEOF
38771 #define SLAPD_OVER_REFINT $MFLAG
38772 _ACEOF
38773
38774 fi
38775
38776 if test "$ol_enable_retcode" != no ; then
38777         BUILD_RETCODE=$ol_enable_retcode
38778         if test "$ol_enable_retcode" = mod ; then
38779                 MFLAG=SLAPD_MOD_DYNAMIC
38780                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
38781         else
38782                 MFLAG=SLAPD_MOD_STATIC
38783                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
38784         fi
38785
38786 cat >>confdefs.h <<_ACEOF
38787 #define SLAPD_OVER_RETCODE $MFLAG
38788 _ACEOF
38789
38790 fi
38791
38792 if test "$ol_enable_rwm" != no ; then
38793         BUILD_REWRITE=yes
38794         BUILD_RWM=$ol_enable_rwm
38795         if test "$ol_enable_rwm" = mod ; then
38796                 MFLAG=SLAPD_MOD_DYNAMIC
38797                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
38798         else
38799                 MFLAG=SLAPD_MOD_STATIC
38800                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
38801         fi
38802
38803 cat >>confdefs.h <<_ACEOF
38804 #define SLAPD_OVER_RWM $MFLAG
38805 _ACEOF
38806
38807 fi
38808
38809 if test "$ol_enable_seqmod" != no ; then
38810         BUILD_SEQMOD=$ol_enable_seqmod
38811         if test "$ol_enable_seqmod" = mod ; then
38812                 MFLAG=SLAPD_MOD_DYNAMIC
38813                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
38814         else
38815                 MFLAG=SLAPD_MOD_STATIC
38816                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
38817         fi
38818
38819 cat >>confdefs.h <<_ACEOF
38820 #define SLAPD_OVER_SEQMOD $MFLAG
38821 _ACEOF
38822
38823 fi
38824
38825 if test "$ol_enable_syncprov" != no ; then
38826         BUILD_SYNCPROV=$ol_enable_syncprov
38827         if test "$ol_enable_syncprov" = mod ; then
38828                 MFLAG=SLAPD_MOD_DYNAMIC
38829                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
38830         else
38831                 MFLAG=SLAPD_MOD_STATIC
38832                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
38833         fi
38834
38835 cat >>confdefs.h <<_ACEOF
38836 #define SLAPD_OVER_SYNCPROV $MFLAG
38837 _ACEOF
38838
38839 fi
38840
38841 if test "$ol_enable_translucent" != no ; then
38842         BUILD_TRANSLUCENT=$ol_enable_translucent
38843         if test "$ol_enable_translucent" = mod ; then
38844                 MFLAG=SLAPD_MOD_DYNAMIC
38845                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
38846         else
38847                 MFLAG=SLAPD_MOD_STATIC
38848                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
38849         fi
38850
38851 cat >>confdefs.h <<_ACEOF
38852 #define SLAPD_OVER_TRANSLUCENT $MFLAG
38853 _ACEOF
38854
38855 fi
38856
38857 if test "$ol_enable_unique" != no ; then
38858         BUILD_UNIQUE=$ol_enable_unique
38859         if test "$ol_enable_unique" = mod ; then
38860                 MFLAG=SLAPD_MOD_DYNAMIC
38861                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
38862         else
38863                 MFLAG=SLAPD_MOD_STATIC
38864                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
38865         fi
38866
38867 cat >>confdefs.h <<_ACEOF
38868 #define SLAPD_OVER_UNIQUE $MFLAG
38869 _ACEOF
38870
38871 fi
38872
38873 if test "$ol_enable_valsort" != no ; then
38874         BUILD_VALSORT=$ol_enable_valsort
38875         if test "$ol_enable_valsort" = mod ; then
38876                 MFLAG=SLAPD_MOD_DYNAMIC
38877                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
38878         else
38879                 MFLAG=SLAPD_MOD_STATIC
38880                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
38881         fi
38882
38883 cat >>confdefs.h <<_ACEOF
38884 #define SLAPD_OVER_VALSORT $MFLAG
38885 _ACEOF
38886
38887 fi
38888
38889 if test "$ol_enable_rewrite" != no ; then
38890
38891 cat >>confdefs.h <<\_ACEOF
38892 #define ENABLE_REWRITE 1
38893 _ACEOF
38894
38895         BUILD_REWRITE=yes
38896 fi
38897
38898 if test "$ol_enable_slapi" != no ; then
38899
38900 cat >>confdefs.h <<\_ACEOF
38901 #define ENABLE_SLAPI 1
38902 _ACEOF
38903
38904         BUILD_SLAPI=yes
38905         SLAPD_SLAPI_DEPEND=libslapi.a
38906 fi
38907
38908
38909
38910 if test "$ac_cv_mingw32" = yes ; then
38911         PLAT=NT
38912         SLAPD_MODULES_LDFLAGS=
38913 else
38914         PLAT=UNIX
38915 fi
38916
38917
38918
38919
38920
38921
38922
38923
38924
38925
38926
38927
38928
38929
38930
38931
38932
38933
38934
38935
38936
38937
38938
38939
38940
38941
38942
38943
38944
38945
38946
38947
38948
38949
38950
38951
38952
38953
38954
38955
38956
38957
38958
38959
38960
38961
38962
38963
38964
38965
38966
38967
38968
38969
38970
38971
38972
38973
38974
38975
38976
38977
38978
38979
38980
38981
38982
38983
38984
38985
38986
38987
38988
38989
38990
38991
38992
38993
38994
38995
38996
38997
38998
38999
39000
39001
39002
39003
39004
39005
39006 # Check whether --with-xxinstall was given.
39007 if test "${with_xxinstall+set}" = set; then
39008   withval=$with_xxinstall;
39009 fi
39010
39011
39012
39013 ac_config_files="$ac_config_files Makefile:build/top.mk:Makefile.in:build/dir.mk doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk include/Makefile:build/top.mk:include/Makefile.in libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk servers/slapd/back-ndb/Makefile:build/top.mk:servers/slapd/back-ndb/Makefile.in:build/mod.mk servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk servers/slapd/back-sock/Makefile:build/top.mk:servers/slapd/back-sock/Makefile.in:build/mod.mk servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk tests/run tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk"
39014
39015
39016 ac_config_commands="$ac_config_commands default"
39017
39018
39019
39020 test "x$prefix" = xNONE && prefix=$ac_default_prefix
39021 # Let make expand exec_prefix.
39022 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
39023
39024 DEFS=-DHAVE_CONFIG_H
39025
39026 ac_libobjs=
39027 ac_ltlibobjs=
39028 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
39029   # 1. Remove the extension, and $U if already installed.
39030   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
39031   ac_i=`echo "$ac_i" | sed "$ac_script"`
39032   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
39033   #    will be set to the directory where LIBOBJS objects are built.
39034   ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
39035   ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
39036 done
39037 LIBOBJS=$ac_libobjs
39038
39039 LTLIBOBJS=$ac_ltlibobjs
39040
39041
39042 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
39043   { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
39044 Usually this means the macro was only invoked conditionally." >&5
39045 echo "$as_me: error: conditional \"AMDEP\" was never defined.
39046 Usually this means the macro was only invoked conditionally." >&2;}
39047    { (exit 1); exit 1; }; }
39048 fi
39049 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
39050   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
39051 Usually this means the macro was only invoked conditionally." >&5
39052 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
39053 Usually this means the macro was only invoked conditionally." >&2;}
39054    { (exit 1); exit 1; }; }
39055 fi
39056 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
39057   { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
39058 Usually this means the macro was only invoked conditionally." >&5
39059 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
39060 Usually this means the macro was only invoked conditionally." >&2;}
39061    { (exit 1); exit 1; }; }
39062 fi
39063
39064 : ${CONFIG_STATUS=./config.status}
39065 ac_clean_files_save=$ac_clean_files
39066 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
39067 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
39068 echo "$as_me: creating $CONFIG_STATUS" >&6;}
39069 cat >$CONFIG_STATUS <<_ACEOF
39070 #! $SHELL
39071 # Generated by $as_me.
39072 # Run this file to recreate the current configuration.
39073 # Compiler output produced by configure, useful for debugging
39074 # configure, is in config.log if it exists.
39075
39076 debug=false
39077 ac_cs_recheck=false
39078 ac_cs_silent=false
39079 SHELL=\${CONFIG_SHELL-$SHELL}
39080 _ACEOF
39081
39082 cat >>$CONFIG_STATUS <<\_ACEOF
39083 ## --------------------- ##
39084 ## M4sh Initialization.  ##
39085 ## --------------------- ##
39086
39087 # Be more Bourne compatible
39088 DUALCASE=1; export DUALCASE # for MKS sh
39089 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
39090   emulate sh
39091   NULLCMD=:
39092   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
39093   # is contrary to our usage.  Disable this feature.
39094   alias -g '${1+"$@"}'='"$@"'
39095   setopt NO_GLOB_SUBST
39096 else
39097   case `(set -o) 2>/dev/null` in
39098   *posix*) set -o posix ;;
39099 esac
39100
39101 fi
39102
39103
39104
39105
39106 # PATH needs CR
39107 # Avoid depending upon Character Ranges.
39108 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
39109 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39110 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
39111 as_cr_digits='0123456789'
39112 as_cr_alnum=$as_cr_Letters$as_cr_digits
39113
39114 # The user is always right.
39115 if test "${PATH_SEPARATOR+set}" != set; then
39116   echo "#! /bin/sh" >conf$$.sh
39117   echo  "exit 0"   >>conf$$.sh
39118   chmod +x conf$$.sh
39119   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
39120     PATH_SEPARATOR=';'
39121   else
39122     PATH_SEPARATOR=:
39123   fi
39124   rm -f conf$$.sh
39125 fi
39126
39127 # Support unset when possible.
39128 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
39129   as_unset=unset
39130 else
39131   as_unset=false
39132 fi
39133
39134
39135 # IFS
39136 # We need space, tab and new line, in precisely that order.  Quoting is
39137 # there to prevent editors from complaining about space-tab.
39138 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
39139 # splitting by setting IFS to empty value.)
39140 as_nl='
39141 '
39142 IFS=" ""        $as_nl"
39143
39144 # Find who we are.  Look in the path if we contain no directory separator.
39145 case $0 in
39146   *[\\/]* ) as_myself=$0 ;;
39147   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39148 for as_dir in $PATH
39149 do
39150   IFS=$as_save_IFS
39151   test -z "$as_dir" && as_dir=.
39152   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
39153 done
39154 IFS=$as_save_IFS
39155
39156      ;;
39157 esac
39158 # We did not find ourselves, most probably we were run as `sh COMMAND'
39159 # in which case we are not to be found in the path.
39160 if test "x$as_myself" = x; then
39161   as_myself=$0
39162 fi
39163 if test ! -f "$as_myself"; then
39164   echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
39165   { (exit 1); exit 1; }
39166 fi
39167
39168 # Work around bugs in pre-3.0 UWIN ksh.
39169 for as_var in ENV MAIL MAILPATH
39170 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
39171 done
39172 PS1='$ '
39173 PS2='> '
39174 PS4='+ '
39175
39176 # NLS nuisances.
39177 for as_var in \
39178   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
39179   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
39180   LC_TELEPHONE LC_TIME
39181 do
39182   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
39183     eval $as_var=C; export $as_var
39184   else
39185     ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
39186   fi
39187 done
39188
39189 # Required to use basename.
39190 if expr a : '\(a\)' >/dev/null 2>&1 &&
39191    test "X`expr 00001 : '.*\(...\)'`" = X001; then
39192   as_expr=expr
39193 else
39194   as_expr=false
39195 fi
39196
39197 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
39198   as_basename=basename
39199 else
39200   as_basename=false
39201 fi
39202
39203
39204 # Name of the executable.
39205 as_me=`$as_basename -- "$0" ||
39206 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
39207          X"$0" : 'X\(//\)$' \| \
39208          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
39209 echo X/"$0" |
39210     sed '/^.*\/\([^/][^/]*\)\/*$/{
39211             s//\1/
39212             q
39213           }
39214           /^X\/\(\/\/\)$/{
39215             s//\1/
39216             q
39217           }
39218           /^X\/\(\/\).*/{
39219             s//\1/
39220             q
39221           }
39222           s/.*/./; q'`
39223
39224 # CDPATH.
39225 $as_unset CDPATH
39226
39227
39228
39229   as_lineno_1=$LINENO
39230   as_lineno_2=$LINENO
39231   test "x$as_lineno_1" != "x$as_lineno_2" &&
39232   test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
39233
39234   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
39235   # uniformly replaced by the line number.  The first 'sed' inserts a
39236   # line-number line after each line using $LINENO; the second 'sed'
39237   # does the real work.  The second script uses 'N' to pair each
39238   # line-number line with the line containing $LINENO, and appends
39239   # trailing '-' during substitution so that $LINENO is not a special
39240   # case at line end.
39241   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
39242   # scripts with optimization help from Paolo Bonzini.  Blame Lee
39243   # E. McMahon (1931-1989) for sed's syntax.  :-)
39244   sed -n '
39245     p
39246     /[$]LINENO/=
39247   ' <$as_myself |
39248     sed '
39249       s/[$]LINENO.*/&-/
39250       t lineno
39251       b
39252       :lineno
39253       N
39254       :loop
39255       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
39256       t loop
39257       s/-\n.*//
39258     ' >$as_me.lineno &&
39259   chmod +x "$as_me.lineno" ||
39260     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
39261    { (exit 1); exit 1; }; }
39262
39263   # Don't try to exec as it changes $[0], causing all sort of problems
39264   # (the dirname of $[0] is not the place where we might find the
39265   # original and so on.  Autoconf is especially sensitive to this).
39266   . "./$as_me.lineno"
39267   # Exit status is that of the last command.
39268   exit
39269 }
39270
39271
39272 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
39273   as_dirname=dirname
39274 else
39275   as_dirname=false
39276 fi
39277
39278 ECHO_C= ECHO_N= ECHO_T=
39279 case `echo -n x` in
39280 -n*)
39281   case `echo 'x\c'` in
39282   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
39283   *)   ECHO_C='\c';;
39284   esac;;
39285 *)
39286   ECHO_N='-n';;
39287 esac
39288
39289 if expr a : '\(a\)' >/dev/null 2>&1 &&
39290    test "X`expr 00001 : '.*\(...\)'`" = X001; then
39291   as_expr=expr
39292 else
39293   as_expr=false
39294 fi
39295
39296 rm -f conf$$ conf$$.exe conf$$.file
39297 if test -d conf$$.dir; then
39298   rm -f conf$$.dir/conf$$.file
39299 else
39300   rm -f conf$$.dir
39301   mkdir conf$$.dir
39302 fi
39303 echo >conf$$.file
39304 if ln -s conf$$.file conf$$ 2>/dev/null; then
39305   as_ln_s='ln -s'
39306   # ... but there are two gotchas:
39307   # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
39308   # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
39309   # In both cases, we have to default to `cp -p'.
39310   ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
39311     as_ln_s='cp -p'
39312 elif ln conf$$.file conf$$ 2>/dev/null; then
39313   as_ln_s=ln
39314 else
39315   as_ln_s='cp -p'
39316 fi
39317 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
39318 rmdir conf$$.dir 2>/dev/null
39319
39320 if mkdir -p . 2>/dev/null; then
39321   as_mkdir_p=:
39322 else
39323   test -d ./-p && rmdir ./-p
39324   as_mkdir_p=false
39325 fi
39326
39327 if test -x / >/dev/null 2>&1; then
39328   as_test_x='test -x'
39329 else
39330   if ls -dL / >/dev/null 2>&1; then
39331     as_ls_L_option=L
39332   else
39333     as_ls_L_option=
39334   fi
39335   as_test_x='
39336     eval sh -c '\''
39337       if test -d "$1"; then
39338         test -d "$1/.";
39339       else
39340         case $1 in
39341         -*)set "./$1";;
39342         esac;
39343         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
39344         ???[sx]*):;;*)false;;esac;fi
39345     '\'' sh
39346   '
39347 fi
39348 as_executable_p=$as_test_x
39349
39350 # Sed expression to map a string onto a valid CPP name.
39351 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
39352
39353 # Sed expression to map a string onto a valid variable name.
39354 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
39355
39356
39357 exec 6>&1
39358
39359 # Save the log message, to keep $[0] and so on meaningful, and to
39360 # report actual input values of CONFIG_FILES etc. instead of their
39361 # values after options handling.
39362 ac_log="
39363 This file was extended by $as_me, which was
39364 generated by GNU Autoconf 2.61.  Invocation command line was
39365
39366   CONFIG_FILES    = $CONFIG_FILES
39367   CONFIG_HEADERS  = $CONFIG_HEADERS
39368   CONFIG_LINKS    = $CONFIG_LINKS
39369   CONFIG_COMMANDS = $CONFIG_COMMANDS
39370   $ $0 $@
39371
39372 on `(hostname || uname -n) 2>/dev/null | sed 1q`
39373 "
39374
39375 _ACEOF
39376
39377 cat >>$CONFIG_STATUS <<_ACEOF
39378 # Files that config.status was made for.
39379 config_files="$ac_config_files"
39380 config_headers="$ac_config_headers"
39381 config_commands="$ac_config_commands"
39382
39383 _ACEOF
39384
39385 cat >>$CONFIG_STATUS <<\_ACEOF
39386 ac_cs_usage="\
39387 \`$as_me' instantiates files from templates according to the
39388 current configuration.
39389
39390 Usage: $0 [OPTIONS] [FILE]...
39391
39392   -h, --help       print this help, then exit
39393   -V, --version    print version number and configuration settings, then exit
39394   -q, --quiet      do not print progress messages
39395   -d, --debug      don't remove temporary files
39396       --recheck    update $as_me by reconfiguring in the same conditions
39397   --file=FILE[:TEMPLATE]
39398                    instantiate the configuration file FILE
39399   --header=FILE[:TEMPLATE]
39400                    instantiate the configuration header FILE
39401
39402 Configuration files:
39403 $config_files
39404
39405 Configuration headers:
39406 $config_headers
39407
39408 Configuration commands:
39409 $config_commands
39410
39411 Report bugs to <bug-autoconf@gnu.org>."
39412
39413 _ACEOF
39414 cat >>$CONFIG_STATUS <<_ACEOF
39415 ac_cs_version="\\
39416 config.status
39417 configured by $0, generated by GNU Autoconf 2.61,
39418   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
39419
39420 Copyright (C) 2006 Free Software Foundation, Inc.
39421 This config.status script is free software; the Free Software Foundation
39422 gives unlimited permission to copy, distribute and modify it."
39423
39424 ac_pwd='$ac_pwd'
39425 srcdir='$srcdir'
39426 INSTALL='$INSTALL'
39427 _ACEOF
39428
39429 cat >>$CONFIG_STATUS <<\_ACEOF
39430 # If no file are specified by the user, then we need to provide default
39431 # value.  By we need to know if files were specified by the user.
39432 ac_need_defaults=:
39433 while test $# != 0
39434 do
39435   case $1 in
39436   --*=*)
39437     ac_option=`expr "X$1" : 'X\([^=]*\)='`
39438     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
39439     ac_shift=:
39440     ;;
39441   *)
39442     ac_option=$1
39443     ac_optarg=$2
39444     ac_shift=shift
39445     ;;
39446   esac
39447
39448   case $ac_option in
39449   # Handling of the options.
39450   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
39451     ac_cs_recheck=: ;;
39452   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
39453     echo "$ac_cs_version"; exit ;;
39454   --debug | --debu | --deb | --de | --d | -d )
39455     debug=: ;;
39456   --file | --fil | --fi | --f )
39457     $ac_shift
39458     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
39459     ac_need_defaults=false;;
39460   --header | --heade | --head | --hea )
39461     $ac_shift
39462     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
39463     ac_need_defaults=false;;
39464   --he | --h)
39465     # Conflict between --help and --header
39466     { echo "$as_me: error: ambiguous option: $1
39467 Try \`$0 --help' for more information." >&2
39468    { (exit 1); exit 1; }; };;
39469   --help | --hel | -h )
39470     echo "$ac_cs_usage"; exit ;;
39471   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
39472   | -silent | --silent | --silen | --sile | --sil | --si | --s)
39473     ac_cs_silent=: ;;
39474
39475   # This is an error.
39476   -*) { echo "$as_me: error: unrecognized option: $1
39477 Try \`$0 --help' for more information." >&2
39478    { (exit 1); exit 1; }; } ;;
39479
39480   *) ac_config_targets="$ac_config_targets $1"
39481      ac_need_defaults=false ;;
39482
39483   esac
39484   shift
39485 done
39486
39487 ac_configure_extra_args=
39488
39489 if $ac_cs_silent; then
39490   exec 6>/dev/null
39491   ac_configure_extra_args="$ac_configure_extra_args --silent"
39492 fi
39493
39494 _ACEOF
39495 cat >>$CONFIG_STATUS <<_ACEOF
39496 if \$ac_cs_recheck; then
39497   echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
39498   CONFIG_SHELL=$SHELL
39499   export CONFIG_SHELL
39500   exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
39501 fi
39502
39503 _ACEOF
39504 cat >>$CONFIG_STATUS <<\_ACEOF
39505 exec 5>>config.log
39506 {
39507   echo
39508   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
39509 ## Running $as_me. ##
39510 _ASBOX
39511   echo "$ac_log"
39512 } >&5
39513
39514 _ACEOF
39515 cat >>$CONFIG_STATUS <<_ACEOF
39516 #
39517 # INIT-COMMANDS
39518 #
39519 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
39520
39521 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
39522 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
39523
39524
39525 _ACEOF
39526
39527 cat >>$CONFIG_STATUS <<\_ACEOF
39528
39529 # Handling of arguments.
39530 for ac_config_target in $ac_config_targets
39531 do
39532   case $ac_config_target in
39533     "include/portable.h") CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
39534     "include/ldap_features.h") CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
39535     "include/lber_types.h") CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
39536     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
39537     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
39538     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
39539     "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
39540     "doc/man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
39541     "doc/man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
39542     "doc/man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
39543     "doc/man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
39544     "clients/Makefile") CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
39545     "clients/tools/Makefile") CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
39546     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
39547     "libraries/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
39548     "libraries/liblber/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
39549     "libraries/libldap/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
39550     "libraries/libldap_r/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
39551     "libraries/liblunicode/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
39552     "libraries/liblutil/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
39553     "libraries/librewrite/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
39554     "servers/Makefile") CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
39555     "servers/slapd/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
39556     "servers/slapd/back-bdb/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk" ;;
39557     "servers/slapd/back-dnssrv/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk" ;;
39558     "servers/slapd/back-hdb/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk" ;;
39559     "servers/slapd/back-ldap/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk" ;;
39560     "servers/slapd/back-ldif/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk" ;;
39561     "servers/slapd/back-meta/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk" ;;
39562     "servers/slapd/back-monitor/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk" ;;
39563     "servers/slapd/back-ndb/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-ndb/Makefile:build/top.mk:servers/slapd/back-ndb/Makefile.in:build/mod.mk" ;;
39564     "servers/slapd/back-null/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk" ;;
39565     "servers/slapd/back-passwd/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk" ;;
39566     "servers/slapd/back-perl/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk" ;;
39567     "servers/slapd/back-relay/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk" ;;
39568     "servers/slapd/back-shell/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk" ;;
39569     "servers/slapd/back-sock/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-sock/Makefile:build/top.mk:servers/slapd/back-sock/Makefile.in:build/mod.mk" ;;
39570     "servers/slapd/back-sql/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk" ;;
39571     "servers/slapd/shell-backends/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk" ;;
39572     "servers/slapd/slapi/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
39573     "servers/slapd/overlays/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
39574     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
39575     "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;;
39576     "tests/progs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
39577     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
39578
39579   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
39580 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
39581    { (exit 1); exit 1; }; };;
39582   esac
39583 done
39584
39585
39586 # If the user did not use the arguments to specify the items to instantiate,
39587 # then the envvar interface is used.  Set only those that are not.
39588 # We use the long form for the default assignment because of an extremely
39589 # bizarre bug on SunOS 4.1.3.
39590 if $ac_need_defaults; then
39591   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
39592   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
39593   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
39594 fi
39595
39596 # Have a temporary directory for convenience.  Make it in the build tree
39597 # simply because there is no reason against having it here, and in addition,
39598 # creating and moving files from /tmp can sometimes cause problems.
39599 # Hook for its removal unless debugging.
39600 # Note that there is a small window in which the directory will not be cleaned:
39601 # after its creation but before its name has been assigned to `$tmp'.
39602 $debug ||
39603 {
39604   tmp=
39605   trap 'exit_status=$?
39606   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
39607 ' 0
39608   trap '{ (exit 1); exit 1; }' 1 2 13 15
39609 }
39610 # Create a (secure) tmp directory for tmp files.
39611
39612 {
39613   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
39614   test -n "$tmp" && test -d "$tmp"
39615 }  ||
39616 {
39617   tmp=./conf$$-$RANDOM
39618   (umask 077 && mkdir "$tmp")
39619 } ||
39620 {
39621    echo "$me: cannot create a temporary directory in ." >&2
39622    { (exit 1); exit 1; }
39623 }
39624
39625 #
39626 # Set up the sed scripts for CONFIG_FILES section.
39627 #
39628
39629 # No need to generate the scripts if there are no CONFIG_FILES.
39630 # This happens for instance when ./config.status config.h
39631 if test -n "$CONFIG_FILES"; then
39632
39633 _ACEOF
39634
39635
39636
39637 ac_delim='%!_!# '
39638 for ac_last_try in false false false false false :; do
39639   cat >conf$$subs.sed <<_ACEOF
39640 SHELL!$SHELL$ac_delim
39641 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
39642 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
39643 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
39644 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
39645 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
39646 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
39647 exec_prefix!$exec_prefix$ac_delim
39648 prefix!$prefix$ac_delim
39649 program_transform_name!$program_transform_name$ac_delim
39650 bindir!$bindir$ac_delim
39651 sbindir!$sbindir$ac_delim
39652 libexecdir!$libexecdir$ac_delim
39653 datarootdir!$datarootdir$ac_delim
39654 datadir!$datadir$ac_delim
39655 sysconfdir!$sysconfdir$ac_delim
39656 sharedstatedir!$sharedstatedir$ac_delim
39657 localstatedir!$localstatedir$ac_delim
39658 includedir!$includedir$ac_delim
39659 oldincludedir!$oldincludedir$ac_delim
39660 docdir!$docdir$ac_delim
39661 infodir!$infodir$ac_delim
39662 htmldir!$htmldir$ac_delim
39663 dvidir!$dvidir$ac_delim
39664 pdfdir!$pdfdir$ac_delim
39665 psdir!$psdir$ac_delim
39666 libdir!$libdir$ac_delim
39667 localedir!$localedir$ac_delim
39668 mandir!$mandir$ac_delim
39669 DEFS!$DEFS$ac_delim
39670 ECHO_C!$ECHO_C$ac_delim
39671 ECHO_N!$ECHO_N$ac_delim
39672 ECHO_T!$ECHO_T$ac_delim
39673 LIBS!$LIBS$ac_delim
39674 build_alias!$build_alias$ac_delim
39675 host_alias!$host_alias$ac_delim
39676 target_alias!$target_alias$ac_delim
39677 build!$build$ac_delim
39678 build_cpu!$build_cpu$ac_delim
39679 build_vendor!$build_vendor$ac_delim
39680 build_os!$build_os$ac_delim
39681 host!$host$ac_delim
39682 host_cpu!$host_cpu$ac_delim
39683 host_vendor!$host_vendor$ac_delim
39684 host_os!$host_os$ac_delim
39685 target!$target$ac_delim
39686 target_cpu!$target_cpu$ac_delim
39687 target_vendor!$target_vendor$ac_delim
39688 target_os!$target_os$ac_delim
39689 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
39690 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
39691 INSTALL_DATA!$INSTALL_DATA$ac_delim
39692 CYGPATH_W!$CYGPATH_W$ac_delim
39693 PACKAGE!$PACKAGE$ac_delim
39694 VERSION!$VERSION$ac_delim
39695 ACLOCAL!$ACLOCAL$ac_delim
39696 AUTOCONF!$AUTOCONF$ac_delim
39697 AUTOMAKE!$AUTOMAKE$ac_delim
39698 AUTOHEADER!$AUTOHEADER$ac_delim
39699 MAKEINFO!$MAKEINFO$ac_delim
39700 install_sh!$install_sh$ac_delim
39701 STRIP!$STRIP$ac_delim
39702 INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
39703 mkdir_p!$mkdir_p$ac_delim
39704 AWK!$AWK$ac_delim
39705 SET_MAKE!$SET_MAKE$ac_delim
39706 am__leading_dot!$am__leading_dot$ac_delim
39707 AMTAR!$AMTAR$ac_delim
39708 am__tar!$am__tar$ac_delim
39709 am__untar!$am__untar$ac_delim
39710 OPENLDAP_LIBRELEASE!$OPENLDAP_LIBRELEASE$ac_delim
39711 OPENLDAP_LIBVERSION!$OPENLDAP_LIBVERSION$ac_delim
39712 OPENLDAP_RELEASE_DATE!$OPENLDAP_RELEASE_DATE$ac_delim
39713 top_builddir!$top_builddir$ac_delim
39714 ldap_subdir!$ldap_subdir$ac_delim
39715 CC!$CC$ac_delim
39716 AR!$AR$ac_delim
39717 CFLAGS!$CFLAGS$ac_delim
39718 LDFLAGS!$LDFLAGS$ac_delim
39719 CPPFLAGS!$CPPFLAGS$ac_delim
39720 ac_ct_CC!$ac_ct_CC$ac_delim
39721 EXEEXT!$EXEEXT$ac_delim
39722 OBJEXT!$OBJEXT$ac_delim
39723 DEPDIR!$DEPDIR$ac_delim
39724 am__include!$am__include$ac_delim
39725 am__quote!$am__quote$ac_delim
39726 AMDEP_TRUE!$AMDEP_TRUE$ac_delim
39727 AMDEP_FALSE!$AMDEP_FALSE$ac_delim
39728 AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
39729 CCDEPMODE!$CCDEPMODE$ac_delim
39730 am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
39731 am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
39732 GREP!$GREP$ac_delim
39733 EGREP!$EGREP$ac_delim
39734 LN_S!$LN_S$ac_delim
39735 ECHO!$ECHO$ac_delim
39736 RANLIB!$RANLIB$ac_delim
39737 _ACEOF
39738
39739   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
39740     break
39741   elif $ac_last_try; then
39742     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
39743 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
39744    { (exit 1); exit 1; }; }
39745   else
39746     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
39747   fi
39748 done
39749
39750 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
39751 if test -n "$ac_eof"; then
39752   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
39753   ac_eof=`expr $ac_eof + 1`
39754 fi
39755
39756 cat >>$CONFIG_STATUS <<_ACEOF
39757 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
39758 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
39759 _ACEOF
39760 sed '
39761 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
39762 s/^/s,@/; s/!/@,|#_!!_#|/
39763 :n
39764 t n
39765 s/'"$ac_delim"'$/,g/; t
39766 s/$/\\/; p
39767 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
39768 ' >>$CONFIG_STATUS <conf$$subs.sed
39769 rm -f conf$$subs.sed
39770 cat >>$CONFIG_STATUS <<_ACEOF
39771 CEOF$ac_eof
39772 _ACEOF
39773
39774
39775 ac_delim='%!_!# '
39776 for ac_last_try in false false false false false :; do
39777   cat >conf$$subs.sed <<_ACEOF
39778 DLLTOOL!$DLLTOOL$ac_delim
39779 AS!$AS$ac_delim
39780 OBJDUMP!$OBJDUMP$ac_delim
39781 CPP!$CPP$ac_delim
39782 LIBTOOL!$LIBTOOL$ac_delim
39783 PERLBIN!$PERLBIN$ac_delim
39784 OL_MKDEP!$OL_MKDEP$ac_delim
39785 OL_MKDEP_FLAGS!$OL_MKDEP_FLAGS$ac_delim
39786 LTSTATIC!$LTSTATIC$ac_delim
39787 MYSQL!$MYSQL$ac_delim
39788 LIBOBJS!$LIBOBJS$ac_delim
39789 LIBSRCS!$LIBSRCS$ac_delim
39790 PLAT!$PLAT$ac_delim
39791 WITH_SASL!$WITH_SASL$ac_delim
39792 WITH_TLS!$WITH_TLS$ac_delim
39793 WITH_MODULES_ENABLED!$WITH_MODULES_ENABLED$ac_delim
39794 WITH_ACI_ENABLED!$WITH_ACI_ENABLED$ac_delim
39795 BUILD_THREAD!$BUILD_THREAD$ac_delim
39796 BUILD_LIBS_DYNAMIC!$BUILD_LIBS_DYNAMIC$ac_delim
39797 BUILD_SLAPD!$BUILD_SLAPD$ac_delim
39798 BUILD_SLAPI!$BUILD_SLAPI$ac_delim
39799 SLAPD_SLAPI_DEPEND!$SLAPD_SLAPI_DEPEND$ac_delim
39800 BUILD_BDB!$BUILD_BDB$ac_delim
39801 BUILD_DNSSRV!$BUILD_DNSSRV$ac_delim
39802 BUILD_HDB!$BUILD_HDB$ac_delim
39803 BUILD_LDAP!$BUILD_LDAP$ac_delim
39804 BUILD_META!$BUILD_META$ac_delim
39805 BUILD_MONITOR!$BUILD_MONITOR$ac_delim
39806 BUILD_NDB!$BUILD_NDB$ac_delim
39807 BUILD_NULL!$BUILD_NULL$ac_delim
39808 BUILD_PASSWD!$BUILD_PASSWD$ac_delim
39809 BUILD_RELAY!$BUILD_RELAY$ac_delim
39810 BUILD_PERL!$BUILD_PERL$ac_delim
39811 BUILD_SHELL!$BUILD_SHELL$ac_delim
39812 BUILD_SOCK!$BUILD_SOCK$ac_delim
39813 BUILD_SQL!$BUILD_SQL$ac_delim
39814 BUILD_ACCESSLOG!$BUILD_ACCESSLOG$ac_delim
39815 BUILD_AUDITLOG!$BUILD_AUDITLOG$ac_delim
39816 BUILD_COLLECT!$BUILD_COLLECT$ac_delim
39817 BUILD_CONSTRAINT!$BUILD_CONSTRAINT$ac_delim
39818 BUILD_DDS!$BUILD_DDS$ac_delim
39819 BUILD_DENYOP!$BUILD_DENYOP$ac_delim
39820 BUILD_DYNGROUP!$BUILD_DYNGROUP$ac_delim
39821 BUILD_DYNLIST!$BUILD_DYNLIST$ac_delim
39822 BUILD_LASTMOD!$BUILD_LASTMOD$ac_delim
39823 BUILD_MEMBEROF!$BUILD_MEMBEROF$ac_delim
39824 BUILD_PPOLICY!$BUILD_PPOLICY$ac_delim
39825 BUILD_PROXYCACHE!$BUILD_PROXYCACHE$ac_delim
39826 BUILD_REFINT!$BUILD_REFINT$ac_delim
39827 BUILD_RETCODE!$BUILD_RETCODE$ac_delim
39828 BUILD_RWM!$BUILD_RWM$ac_delim
39829 BUILD_SEQMOD!$BUILD_SEQMOD$ac_delim
39830 BUILD_SYNCPROV!$BUILD_SYNCPROV$ac_delim
39831 BUILD_TRANSLUCENT!$BUILD_TRANSLUCENT$ac_delim
39832 BUILD_UNIQUE!$BUILD_UNIQUE$ac_delim
39833 BUILD_VALSORT!$BUILD_VALSORT$ac_delim
39834 LDAP_LIBS!$LDAP_LIBS$ac_delim
39835 SLAPD_LIBS!$SLAPD_LIBS$ac_delim
39836 BDB_LIBS!$BDB_LIBS$ac_delim
39837 SLAPD_NDB_LIBS!$SLAPD_NDB_LIBS$ac_delim
39838 SLAPD_NDB_INCS!$SLAPD_NDB_INCS$ac_delim
39839 LTHREAD_LIBS!$LTHREAD_LIBS$ac_delim
39840 LUTIL_LIBS!$LUTIL_LIBS$ac_delim
39841 WRAP_LIBS!$WRAP_LIBS$ac_delim
39842 SLAPD_MODULES_CPPFLAGS!$SLAPD_MODULES_CPPFLAGS$ac_delim
39843 SLAPD_MODULES_LDFLAGS!$SLAPD_MODULES_LDFLAGS$ac_delim
39844 SLAPD_NO_STATIC!$SLAPD_NO_STATIC$ac_delim
39845 SLAPD_STATIC_BACKENDS!$SLAPD_STATIC_BACKENDS$ac_delim
39846 SLAPD_DYNAMIC_BACKENDS!$SLAPD_DYNAMIC_BACKENDS$ac_delim
39847 SLAPD_STATIC_OVERLAYS!$SLAPD_STATIC_OVERLAYS$ac_delim
39848 SLAPD_DYNAMIC_OVERLAYS!$SLAPD_DYNAMIC_OVERLAYS$ac_delim
39849 PERL_CPPFLAGS!$PERL_CPPFLAGS$ac_delim
39850 SLAPD_PERL_LDFLAGS!$SLAPD_PERL_LDFLAGS$ac_delim
39851 MOD_PERL_LDFLAGS!$MOD_PERL_LDFLAGS$ac_delim
39852 KRB4_LIBS!$KRB4_LIBS$ac_delim
39853 KRB5_LIBS!$KRB5_LIBS$ac_delim
39854 SASL_LIBS!$SASL_LIBS$ac_delim
39855 GSSAPI_LIBS!$GSSAPI_LIBS$ac_delim
39856 TLS_LIBS!$TLS_LIBS$ac_delim
39857 MODULES_LIBS!$MODULES_LIBS$ac_delim
39858 SLAPI_LIBS!$SLAPI_LIBS$ac_delim
39859 LIBSLAPI!$LIBSLAPI$ac_delim
39860 LIBSLAPITOOLS!$LIBSLAPITOOLS$ac_delim
39861 AUTH_LIBS!$AUTH_LIBS$ac_delim
39862 ICU_LIBS!$ICU_LIBS$ac_delim
39863 SLAPD_SLP_LIBS!$SLAPD_SLP_LIBS$ac_delim
39864 SLAPD_GMP_LIBS!$SLAPD_GMP_LIBS$ac_delim
39865 SLAPD_SQL_LDFLAGS!$SLAPD_SQL_LDFLAGS$ac_delim
39866 SLAPD_SQL_LIBS!$SLAPD_SQL_LIBS$ac_delim
39867 SLAPD_SQL_INCLUDES!$SLAPD_SQL_INCLUDES$ac_delim
39868 LTLIBOBJS!$LTLIBOBJS$ac_delim
39869 _ACEOF
39870
39871   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then
39872     break
39873   elif $ac_last_try; then
39874     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
39875 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
39876    { (exit 1); exit 1; }; }
39877   else
39878     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
39879   fi
39880 done
39881
39882 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
39883 if test -n "$ac_eof"; then
39884   ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
39885   ac_eof=`expr $ac_eof + 1`
39886 fi
39887
39888 cat >>$CONFIG_STATUS <<_ACEOF
39889 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
39890 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
39891 _ACEOF
39892 sed '
39893 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
39894 s/^/s,@/; s/!/@,|#_!!_#|/
39895 :n
39896 t n
39897 s/'"$ac_delim"'$/,g/; t
39898 s/$/\\/; p
39899 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
39900 ' >>$CONFIG_STATUS <conf$$subs.sed
39901 rm -f conf$$subs.sed
39902 cat >>$CONFIG_STATUS <<_ACEOF
39903 :end
39904 s/|#_!!_#|//g
39905 CEOF$ac_eof
39906 _ACEOF
39907
39908
39909 # VPATH may cause trouble with some makes, so we remove $(srcdir),
39910 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
39911 # trailing colons and then remove the whole line if VPATH becomes empty
39912 # (actually we leave an empty line to preserve line numbers).
39913 if test "x$srcdir" = x.; then
39914   ac_vpsub='/^[  ]*VPATH[        ]*=/{
39915 s/:*\$(srcdir):*/:/
39916 s/:*\${srcdir}:*/:/
39917 s/:*@srcdir@:*/:/
39918 s/^\([^=]*=[     ]*\):*/\1/
39919 s/:*$//
39920 s/^[^=]*=[       ]*$//
39921 }'
39922 fi
39923
39924 cat >>$CONFIG_STATUS <<\_ACEOF
39925 fi # test -n "$CONFIG_FILES"
39926
39927
39928 for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
39929 do
39930   case $ac_tag in
39931   :[FHLC]) ac_mode=$ac_tag; continue;;
39932   esac
39933   case $ac_mode$ac_tag in
39934   :[FHL]*:*);;
39935   :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
39936 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
39937    { (exit 1); exit 1; }; };;
39938   :[FH]-) ac_tag=-:-;;
39939   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
39940   esac
39941   ac_save_IFS=$IFS
39942   IFS=:
39943   set x $ac_tag
39944   IFS=$ac_save_IFS
39945   shift
39946   ac_file=$1
39947   shift
39948
39949   case $ac_mode in
39950   :L) ac_source=$1;;
39951   :[FH])
39952     ac_file_inputs=
39953     for ac_f
39954     do
39955       case $ac_f in
39956       -) ac_f="$tmp/stdin";;
39957       *) # Look for the file first in the build tree, then in the source tree
39958          # (if the path is not absolute).  The absolute path cannot be DOS-style,
39959          # because $ac_f cannot contain `:'.
39960          test -f "$ac_f" ||
39961            case $ac_f in
39962            [\\/$]*) false;;
39963            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
39964            esac ||
39965            { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
39966 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
39967    { (exit 1); exit 1; }; };;
39968       esac
39969       ac_file_inputs="$ac_file_inputs $ac_f"
39970     done
39971
39972     # Let's still pretend it is `configure' which instantiates (i.e., don't
39973     # use $as_me), people would be surprised to read:
39974     #    /* config.h.  Generated by config.status.  */
39975     configure_input="Generated from "`IFS=:
39976           echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
39977     if test x"$ac_file" != x-; then
39978       configure_input="$ac_file.  $configure_input"
39979       { echo "$as_me:$LINENO: creating $ac_file" >&5
39980 echo "$as_me: creating $ac_file" >&6;}
39981     fi
39982
39983     case $ac_tag in
39984     *:-:* | *:-) cat >"$tmp/stdin";;
39985     esac
39986     ;;
39987   esac
39988
39989   ac_dir=`$as_dirname -- "$ac_file" ||
39990 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39991          X"$ac_file" : 'X\(//\)[^/]' \| \
39992          X"$ac_file" : 'X\(//\)$' \| \
39993          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
39994 echo X"$ac_file" |
39995     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39996             s//\1/
39997             q
39998           }
39999           /^X\(\/\/\)[^/].*/{
40000             s//\1/
40001             q
40002           }
40003           /^X\(\/\/\)$/{
40004             s//\1/
40005             q
40006           }
40007           /^X\(\/\).*/{
40008             s//\1/
40009             q
40010           }
40011           s/.*/./; q'`
40012   { as_dir="$ac_dir"
40013   case $as_dir in #(
40014   -*) as_dir=./$as_dir;;
40015   esac
40016   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
40017     as_dirs=
40018     while :; do
40019       case $as_dir in #(
40020       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
40021       *) as_qdir=$as_dir;;
40022       esac
40023       as_dirs="'$as_qdir' $as_dirs"
40024       as_dir=`$as_dirname -- "$as_dir" ||
40025 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40026          X"$as_dir" : 'X\(//\)[^/]' \| \
40027          X"$as_dir" : 'X\(//\)$' \| \
40028          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
40029 echo X"$as_dir" |
40030     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40031             s//\1/
40032             q
40033           }
40034           /^X\(\/\/\)[^/].*/{
40035             s//\1/
40036             q
40037           }
40038           /^X\(\/\/\)$/{
40039             s//\1/
40040             q
40041           }
40042           /^X\(\/\).*/{
40043             s//\1/
40044             q
40045           }
40046           s/.*/./; q'`
40047       test -d "$as_dir" && break
40048     done
40049     test -z "$as_dirs" || eval "mkdir $as_dirs"
40050   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
40051 echo "$as_me: error: cannot create directory $as_dir" >&2;}
40052    { (exit 1); exit 1; }; }; }
40053   ac_builddir=.
40054
40055 case "$ac_dir" in
40056 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
40057 *)
40058   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
40059   # A ".." for each directory in $ac_dir_suffix.
40060   ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
40061   case $ac_top_builddir_sub in
40062   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
40063   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
40064   esac ;;
40065 esac
40066 ac_abs_top_builddir=$ac_pwd
40067 ac_abs_builddir=$ac_pwd$ac_dir_suffix
40068 # for backward compatibility:
40069 ac_top_builddir=$ac_top_build_prefix
40070
40071 case $srcdir in
40072   .)  # We are building in place.
40073     ac_srcdir=.
40074     ac_top_srcdir=$ac_top_builddir_sub
40075     ac_abs_top_srcdir=$ac_pwd ;;
40076   [\\/]* | ?:[\\/]* )  # Absolute name.
40077     ac_srcdir=$srcdir$ac_dir_suffix;
40078     ac_top_srcdir=$srcdir
40079     ac_abs_top_srcdir=$srcdir ;;
40080   *) # Relative name.
40081     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
40082     ac_top_srcdir=$ac_top_build_prefix$srcdir
40083     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
40084 esac
40085 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
40086
40087
40088   case $ac_mode in
40089   :F)
40090   #
40091   # CONFIG_FILE
40092   #
40093
40094   case $INSTALL in
40095   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
40096   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
40097   esac
40098 _ACEOF
40099
40100 cat >>$CONFIG_STATUS <<\_ACEOF
40101 # If the template does not know about datarootdir, expand it.
40102 # FIXME: This hack should be removed a few years after 2.60.
40103 ac_datarootdir_hack=; ac_datarootdir_seen=
40104
40105 case `sed -n '/datarootdir/ {
40106   p
40107   q
40108 }
40109 /@datadir@/p
40110 /@docdir@/p
40111 /@infodir@/p
40112 /@localedir@/p
40113 /@mandir@/p
40114 ' $ac_file_inputs` in
40115 *datarootdir*) ac_datarootdir_seen=yes;;
40116 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
40117   { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
40118 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
40119 _ACEOF
40120 cat >>$CONFIG_STATUS <<_ACEOF
40121   ac_datarootdir_hack='
40122   s&@datadir@&$datadir&g
40123   s&@docdir@&$docdir&g
40124   s&@infodir@&$infodir&g
40125   s&@localedir@&$localedir&g
40126   s&@mandir@&$mandir&g
40127     s&\\\${datarootdir}&$datarootdir&g' ;;
40128 esac
40129 _ACEOF
40130
40131 # Neutralize VPATH when `$srcdir' = `.'.
40132 # Shell code in configure.ac might set extrasub.
40133 # FIXME: do we really want to maintain this feature?
40134 cat >>$CONFIG_STATUS <<_ACEOF
40135   sed "$ac_vpsub
40136 $extrasub
40137 _ACEOF
40138 cat >>$CONFIG_STATUS <<\_ACEOF
40139 :t
40140 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
40141 s&@configure_input@&$configure_input&;t t
40142 s&@top_builddir@&$ac_top_builddir_sub&;t t
40143 s&@srcdir@&$ac_srcdir&;t t
40144 s&@abs_srcdir@&$ac_abs_srcdir&;t t
40145 s&@top_srcdir@&$ac_top_srcdir&;t t
40146 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
40147 s&@builddir@&$ac_builddir&;t t
40148 s&@abs_builddir@&$ac_abs_builddir&;t t
40149 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
40150 s&@INSTALL@&$ac_INSTALL&;t t
40151 $ac_datarootdir_hack
40152 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
40153
40154 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
40155   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
40156   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
40157   { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
40158 which seems to be undefined.  Please make sure it is defined." >&5
40159 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
40160 which seems to be undefined.  Please make sure it is defined." >&2;}
40161
40162   rm -f "$tmp/stdin"
40163   case $ac_file in
40164   -) cat "$tmp/out"; rm -f "$tmp/out";;
40165   *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
40166   esac
40167  ;;
40168   :H)
40169   #
40170   # CONFIG_HEADER
40171   #
40172 _ACEOF
40173
40174 # Transform confdefs.h into a sed script `conftest.defines', that
40175 # substitutes the proper values into config.h.in to produce config.h.
40176 rm -f conftest.defines conftest.tail
40177 # First, append a space to every undef/define line, to ease matching.
40178 echo 's/$/ /' >conftest.defines
40179 # Then, protect against being on the right side of a sed subst, or in
40180 # an unquoted here document, in config.status.  If some macros were
40181 # called several times there might be several #defines for the same
40182 # symbol, which is useless.  But do not sort them, since the last
40183 # AC_DEFINE must be honored.
40184 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
40185 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
40186 # NAME is the cpp macro being defined, VALUE is the value it is being given.
40187 # PARAMS is the parameter list in the macro definition--in most cases, it's
40188 # just an empty string.
40189 ac_dA='s,^\\([   #]*\\)[^        ]*\\([  ]*'
40190 ac_dB='\\)[      (].*,\\1define\\2'
40191 ac_dC=' '
40192 ac_dD=' ,'
40193
40194 uniq confdefs.h |
40195   sed -n '
40196         t rset
40197         :rset
40198         s/^[     ]*#[    ]*define[       ][      ]*//
40199         t ok
40200         d
40201         :ok
40202         s/[\\&,]/\\&/g
40203         s/^\('"$ac_word_re"'\)\(([^()]*)\)[      ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
40204         s/^\('"$ac_word_re"'\)[  ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
40205   ' >>conftest.defines
40206
40207 # Remove the space that was appended to ease matching.
40208 # Then replace #undef with comments.  This is necessary, for
40209 # example, in the case of _POSIX_SOURCE, which is predefined and required
40210 # on some systems where configure will not decide to define it.
40211 # (The regexp can be short, since the line contains either #define or #undef.)
40212 echo 's/ $//
40213 s,^[     #]*u.*,/* & */,' >>conftest.defines
40214
40215 # Break up conftest.defines:
40216 ac_max_sed_lines=50
40217
40218 # First sed command is:  sed -f defines.sed $ac_file_inputs >"$tmp/out1"
40219 # Second one is:         sed -f defines.sed "$tmp/out1" >"$tmp/out2"
40220 # Third one will be:     sed -f defines.sed "$tmp/out2" >"$tmp/out1"
40221 # et cetera.
40222 ac_in='$ac_file_inputs'
40223 ac_out='"$tmp/out1"'
40224 ac_nxt='"$tmp/out2"'
40225
40226 while :
40227 do
40228   # Write a here document:
40229     cat >>$CONFIG_STATUS <<_ACEOF
40230     # First, check the format of the line:
40231     cat >"\$tmp/defines.sed" <<\\CEOF
40232 /^[      ]*#[    ]*undef[        ][      ]*$ac_word_re[  ]*\$/b def
40233 /^[      ]*#[    ]*define[       ][      ]*$ac_word_re[(         ]/b def
40234 b
40235 :def
40236 _ACEOF
40237   sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
40238   echo 'CEOF
40239     sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
40240   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
40241   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
40242   grep . conftest.tail >/dev/null || break
40243   rm -f conftest.defines
40244   mv conftest.tail conftest.defines
40245 done
40246 rm -f conftest.defines conftest.tail
40247
40248 echo "ac_result=$ac_in" >>$CONFIG_STATUS
40249 cat >>$CONFIG_STATUS <<\_ACEOF
40250   if test x"$ac_file" != x-; then
40251     echo "/* $configure_input  */" >"$tmp/config.h"
40252     cat "$ac_result" >>"$tmp/config.h"
40253     if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
40254       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
40255 echo "$as_me: $ac_file is unchanged" >&6;}
40256     else
40257       rm -f $ac_file
40258       mv "$tmp/config.h" $ac_file
40259     fi
40260   else
40261     echo "/* $configure_input  */"
40262     cat "$ac_result"
40263   fi
40264   rm -f "$tmp/out12"
40265 # Compute $ac_file's index in $config_headers.
40266 _am_stamp_count=1
40267 for _am_header in $config_headers :; do
40268   case $_am_header in
40269     $ac_file | $ac_file:* )
40270       break ;;
40271     * )
40272       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
40273   esac
40274 done
40275 echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
40276 $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40277          X$ac_file : 'X\(//\)[^/]' \| \
40278          X$ac_file : 'X\(//\)$' \| \
40279          X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
40280 echo X$ac_file |
40281     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40282             s//\1/
40283             q
40284           }
40285           /^X\(\/\/\)[^/].*/{
40286             s//\1/
40287             q
40288           }
40289           /^X\(\/\/\)$/{
40290             s//\1/
40291             q
40292           }
40293           /^X\(\/\).*/{
40294             s//\1/
40295             q
40296           }
40297           s/.*/./; q'`/stamp-h$_am_stamp_count
40298  ;;
40299
40300   :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
40301 echo "$as_me: executing $ac_file commands" >&6;}
40302  ;;
40303   esac
40304
40305
40306   case $ac_file$ac_mode in
40307     "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
40308   # Strip MF so we end up with the name of the file.
40309   mf=`echo "$mf" | sed -e 's/:.*$//'`
40310   # Check whether this is an Automake generated Makefile or not.
40311   # We used to match only the files named `Makefile.in', but
40312   # some people rename them; so instead we look at the file content.
40313   # Grep'ing the first line is not enough: some people post-process
40314   # each Makefile.in and add a new line on top of each file to say so.
40315   # So let's grep whole file.
40316   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
40317     dirpart=`$as_dirname -- "$mf" ||
40318 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40319          X"$mf" : 'X\(//\)[^/]' \| \
40320          X"$mf" : 'X\(//\)$' \| \
40321          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
40322 echo X"$mf" |
40323     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40324             s//\1/
40325             q
40326           }
40327           /^X\(\/\/\)[^/].*/{
40328             s//\1/
40329             q
40330           }
40331           /^X\(\/\/\)$/{
40332             s//\1/
40333             q
40334           }
40335           /^X\(\/\).*/{
40336             s//\1/
40337             q
40338           }
40339           s/.*/./; q'`
40340   else
40341     continue
40342   fi
40343   # Extract the definition of DEPDIR, am__include, and am__quote
40344   # from the Makefile without running `make'.
40345   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
40346   test -z "$DEPDIR" && continue
40347   am__include=`sed -n 's/^am__include = //p' < "$mf"`
40348   test -z "am__include" && continue
40349   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
40350   # When using ansi2knr, U may be empty or an underscore; expand it
40351   U=`sed -n 's/^U = //p' < "$mf"`
40352   # Find all dependency output files, they are included files with
40353   # $(DEPDIR) in their names.  We invoke sed twice because it is the
40354   # simplest approach to changing $(DEPDIR) to its actual value in the
40355   # expansion.
40356   for file in `sed -n "
40357     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
40358        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
40359     # Make sure the directory exists.
40360     test -f "$dirpart/$file" && continue
40361     fdir=`$as_dirname -- "$file" ||
40362 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40363          X"$file" : 'X\(//\)[^/]' \| \
40364          X"$file" : 'X\(//\)$' \| \
40365          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
40366 echo X"$file" |
40367     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40368             s//\1/
40369             q
40370           }
40371           /^X\(\/\/\)[^/].*/{
40372             s//\1/
40373             q
40374           }
40375           /^X\(\/\/\)$/{
40376             s//\1/
40377             q
40378           }
40379           /^X\(\/\).*/{
40380             s//\1/
40381             q
40382           }
40383           s/.*/./; q'`
40384     { as_dir=$dirpart/$fdir
40385   case $as_dir in #(
40386   -*) as_dir=./$as_dir;;
40387   esac
40388   test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
40389     as_dirs=
40390     while :; do
40391       case $as_dir in #(
40392       *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
40393       *) as_qdir=$as_dir;;
40394       esac
40395       as_dirs="'$as_qdir' $as_dirs"
40396       as_dir=`$as_dirname -- "$as_dir" ||
40397 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
40398          X"$as_dir" : 'X\(//\)[^/]' \| \
40399          X"$as_dir" : 'X\(//\)$' \| \
40400          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
40401 echo X"$as_dir" |
40402     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
40403             s//\1/
40404             q
40405           }
40406           /^X\(\/\/\)[^/].*/{
40407             s//\1/
40408             q
40409           }
40410           /^X\(\/\/\)$/{
40411             s//\1/
40412             q
40413           }
40414           /^X\(\/\).*/{
40415             s//\1/
40416             q
40417           }
40418           s/.*/./; q'`
40419       test -d "$as_dir" && break
40420     done
40421     test -z "$as_dirs" || eval "mkdir $as_dirs"
40422   } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
40423 echo "$as_me: error: cannot create directory $as_dir" >&2;}
40424    { (exit 1); exit 1; }; }; }
40425     # echo "creating $dirpart/$file"
40426     echo '# dummy' > "$dirpart/$file"
40427   done
40428 done
40429  ;;
40430     "default":C)
40431 chmod +x tests/run
40432 date > stamp-h
40433 BACKENDSC="servers/slapd/backends.c"
40434 echo "Making $BACKENDSC"
40435 rm -f $BACKENDSC
40436 cat > $BACKENDSC << ENDX
40437 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
40438  *
40439  * Copyright 1998-2008 The OpenLDAP Foundation.
40440  * All rights reserved.
40441  *
40442  * Redistribution and use in source and binary forms, with or without
40443  * modification, are permitted only as authorized by the OpenLDAP
40444  * Public License.
40445  *
40446  * A copy of this license is available in the file LICENSE in the
40447  * top-level directory of the distribution or, alternatively, at
40448  * <http://www.OpenLDAP.org/license.html>.
40449  */
40450 /* This file is automatically generated by configure; please do not edit. */
40451
40452 #include "portable.h"
40453 #include "slap.h"
40454
40455 ENDX
40456 if test "${STATIC_BACKENDS}"; then
40457         for b in config ${STATIC_BACKENDS}; do
40458                 bb=`echo "${b}" | sed -e 's/back-//'`
40459                 cat >> $BACKENDSC << ENDX
40460 extern BI_init ${bb}_back_initialize;
40461 ENDX
40462         done
40463
40464         cat >> $BACKENDSC << ENDX
40465
40466 BackendInfo slap_binfo[] = {
40467 ENDX
40468
40469         for b in config ${STATIC_BACKENDS}; do
40470                 bb=`echo "${b}" | sed -e 's/back-//'`
40471                 echo "    Add ${bb} ..."
40472                 cat >> $BACKENDSC << ENDX
40473         { "${bb}", ${bb}_back_initialize },
40474 ENDX
40475         done
40476
40477         cat >> $BACKENDSC << ENDX
40478         { NULL, NULL },
40479 };
40480
40481 /* end of generated file */
40482 ENDX
40483 fi
40484 OVERLAYSC="servers/slapd/overlays/statover.c"
40485 echo "Making $OVERLAYSC"
40486 rm -f $OVERLAYSC
40487 cat > $OVERLAYSC << ENDX
40488 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
40489  *
40490  * Copyright 1998-2008 The OpenLDAP Foundation.
40491  * All rights reserved.
40492  *
40493  * Redistribution and use in source and binary forms, with or without
40494  * modification, are permitted only as authorized by the OpenLDAP
40495  * Public License.
40496  *
40497  * A copy of this license is available in the file LICENSE in the
40498  * top-level directory of the distribution or, alternatively, at
40499  * <http://www.OpenLDAP.org/license.html>.
40500  */
40501 /* This file is automatically generated by configure; please do not edit. */
40502
40503 #include "portable.h"
40504 #include "slap.h"
40505
40506 ENDX
40507 if test "${STATIC_OVERLAYS}"; then
40508         for o in ${STATIC_OVERLAYS}; do
40509                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
40510                 cat >> $OVERLAYSC << ENDX
40511 extern OV_init ${oo}_initialize;
40512 ENDX
40513         done
40514 fi
40515
40516 cat >> $OVERLAYSC << ENDX
40517
40518 OverlayInit slap_oinfo[] = {
40519 ENDX
40520
40521 if test "${STATIC_OVERLAYS}"; then
40522         for o in ${STATIC_OVERLAYS}; do
40523                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
40524                 echo "    Add ${oo} ..."
40525                 cat >> $OVERLAYSC << ENDX
40526         { "${oo}", ${oo}_initialize },
40527 ENDX
40528         done
40529 fi
40530
40531         cat >> $OVERLAYSC << ENDX
40532         { NULL, NULL },
40533 };
40534
40535 /* end of generated file */
40536 ENDX
40537
40538 if test "${ol_cv_mkdep}" = no; then
40539         echo '(Do not "make depend"; we do not know how to build dependencies)'
40540 else
40541         echo 'Please run "make depend" to build dependencies'
40542 fi
40543  ;;
40544
40545   esac
40546 done # for ac_tag
40547
40548
40549 { (exit 0); exit 0; }
40550 _ACEOF
40551 chmod +x $CONFIG_STATUS
40552 ac_clean_files=$ac_clean_files_save
40553
40554
40555 # configure is writing to config.log, and then calls config.status.
40556 # config.status does its own redirection, appending to config.log.
40557 # Unfortunately, on DOS this fails, as config.log is still kept open
40558 # by configure, so config.status won't be able to write to it; its
40559 # output is simply discarded.  So we exec the FD to /dev/null,
40560 # effectively closing config.log, so it can be properly (re)opened and
40561 # appended to by config.status.  When coming back to configure, we
40562 # need to make the FD available again.
40563 if test "$no_create" != yes; then
40564   ac_cs_success=:
40565   ac_config_status_args=
40566   test "$silent" = yes &&
40567     ac_config_status_args="$ac_config_status_args --quiet"
40568   exec 5>/dev/null
40569   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
40570   exec 5>>config.log
40571   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
40572   # would make configure fail if this is the last instruction.
40573   $ac_cs_success || { (exit 1); exit 1; }
40574 fi
40575