]> git.sur5r.net Git - openldap/blob - configure
Regenerate for ITS#8303
[openldap] / configure
1 #! /bin/sh
2 # From configure.in Id: 97a7d8d69c5231a056a85cedd1c591b0c2e46daa .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.65.
5 #
6 # Copyright 1998-2016 The OpenLDAP Foundation. All rights reserved.
7 # Restrictions apply, see COPYRIGHT and LICENSE files.
8 #
9 #
10 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
11 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
12 # Inc.
13 #
14 #
15 # This configure script is free software; the Free Software Foundation
16 # gives unlimited permission to copy, distribute and modify it.
17 ## -------------------- ##
18 ## M4sh Initialization. ##
19 ## -------------------- ##
20
21 # Be more Bourne compatible
22 DUALCASE=1; export DUALCASE # for MKS sh
23 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24   emulate sh
25   NULLCMD=:
26   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
27   # is contrary to our usage.  Disable this feature.
28   alias -g '${1+"$@"}'='"$@"'
29   setopt NO_GLOB_SUBST
30 else
31   case `(set -o) 2>/dev/null` in #(
32   *posix*) :
33     set -o posix ;; #(
34   *) :
35      ;;
36 esac
37 fi
38
39
40 as_nl='
41 '
42 export as_nl
43 # Printing a long string crashes Solaris 7 /usr/bin/printf.
44 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
45 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
46 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
47 # Prefer a ksh shell builtin over an external printf program on Solaris,
48 # but without wasting forks for bash or zsh.
49 if test -z "$BASH_VERSION$ZSH_VERSION" \
50     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51   as_echo='print -r --'
52   as_echo_n='print -rn --'
53 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
54   as_echo='printf %s\n'
55   as_echo_n='printf %s'
56 else
57   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
58     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
59     as_echo_n='/usr/ucb/echo -n'
60   else
61     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
62     as_echo_n_body='eval
63       arg=$1;
64       case $arg in #(
65       *"$as_nl"*)
66         expr "X$arg" : "X\\(.*\\)$as_nl";
67         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
68       esac;
69       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
70     '
71     export as_echo_n_body
72     as_echo_n='sh -c $as_echo_n_body as_echo'
73   fi
74   export as_echo_body
75   as_echo='sh -c $as_echo_body as_echo'
76 fi
77
78 # The user is always right.
79 if test "${PATH_SEPARATOR+set}" != set; then
80   PATH_SEPARATOR=:
81   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
82     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
83       PATH_SEPARATOR=';'
84   }
85 fi
86
87
88 # IFS
89 # We need space, tab and new line, in precisely that order.  Quoting is
90 # there to prevent editors from complaining about space-tab.
91 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
92 # splitting by setting IFS to empty value.)
93 IFS=" ""        $as_nl"
94
95 # Find who we are.  Look in the path if we contain no directory separator.
96 case $0 in #((
97   *[\\/]* ) as_myself=$0 ;;
98   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
99 for as_dir in $PATH
100 do
101   IFS=$as_save_IFS
102   test -z "$as_dir" && as_dir=.
103     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104   done
105 IFS=$as_save_IFS
106
107      ;;
108 esac
109 # We did not find ourselves, most probably we were run as `sh COMMAND'
110 # in which case we are not to be found in the path.
111 if test "x$as_myself" = x; then
112   as_myself=$0
113 fi
114 if test ! -f "$as_myself"; then
115   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116   exit 1
117 fi
118
119 # Unset variables that we do not need and which cause bugs (e.g. in
120 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
121 # suppresses any "Segmentation fault" message there.  '((' could
122 # trigger a bug in pdksh 5.2.14.
123 for as_var in BASH_ENV ENV MAIL MAILPATH
124 do eval test x\${$as_var+set} = xset \
125   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
126 done
127 PS1='$ '
128 PS2='> '
129 PS4='+ '
130
131 # NLS nuisances.
132 LC_ALL=C
133 export LC_ALL
134 LANGUAGE=C
135 export LANGUAGE
136
137 # CDPATH.
138 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140 if test "x$CONFIG_SHELL" = x; then
141   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142   emulate sh
143   NULLCMD=:
144   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145   # is contrary to our usage.  Disable this feature.
146   alias -g '\${1+\"\$@\"}'='\"\$@\"'
147   setopt NO_GLOB_SUBST
148 else
149   case \`(set -o) 2>/dev/null\` in #(
150   *posix*) :
151     set -o posix ;; #(
152   *) :
153      ;;
154 esac
155 fi
156 "
157   as_required="as_fn_return () { (exit \$1); }
158 as_fn_success () { as_fn_return 0; }
159 as_fn_failure () { as_fn_return 1; }
160 as_fn_ret_success () { return 0; }
161 as_fn_ret_failure () { return 1; }
162
163 exitcode=0
164 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170 else
171   exitcode=1; echo positional parameters were not saved.
172 fi
173 test x\$exitcode = x0 || exit 1"
174   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178 test \$(( 1 + 1 )) = 2 || exit 1"
179   if (eval "$as_required") 2>/dev/null; then :
180   as_have_required=yes
181 else
182   as_have_required=no
183 fi
184   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186 else
187   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188 as_found=false
189 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190 do
191   IFS=$as_save_IFS
192   test -z "$as_dir" && as_dir=.
193   as_found=:
194   case $as_dir in #(
195          /*)
196            for as_base in sh bash ksh sh5; do
197              # Try only shells that exist, to save several forks.
198              as_shell=$as_dir/$as_base
199              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201   CONFIG_SHELL=$as_shell as_have_required=yes
202                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203   break 2
204 fi
205 fi
206            done;;
207        esac
208   as_found=false
209 done
210 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
211               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
212   CONFIG_SHELL=$SHELL as_have_required=yes
213 fi; }
214 IFS=$as_save_IFS
215
216
217       if test "x$CONFIG_SHELL" != x; then :
218   # We cannot yet assume a decent shell, so we have to provide a
219         # neutralization value for shells without unset; and this also
220         # works around shells that cannot unset nonexistent variables.
221         BASH_ENV=/dev/null
222         ENV=/dev/null
223         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224         export CONFIG_SHELL
225         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
226 fi
227
228     if test x$as_have_required = xno; then :
229   $as_echo "$0: This script requires a shell more modern than all"
230   $as_echo "$0: the shells that I found on your system."
231   if test x${ZSH_VERSION+set} = xset ; then
232     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
233     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
234   else
235     $as_echo "$0: Please tell bug-autoconf@gnu.org and
236 $0: <http://www.openldap.org/its/> about your system,
237 $0: including any error possibly output before this
238 $0: message. Then install a modern shell, or manually run
239 $0: the script under such a shell if you do have one."
240   fi
241   exit 1
242 fi
243 fi
244 fi
245 SHELL=${CONFIG_SHELL-/bin/sh}
246 export SHELL
247 # Unset more variables known to interfere with behavior of common tools.
248 CLICOLOR_FORCE= GREP_OPTIONS=
249 unset CLICOLOR_FORCE GREP_OPTIONS
250
251 ## --------------------- ##
252 ## M4sh Shell Functions. ##
253 ## --------------------- ##
254 # as_fn_unset VAR
255 # ---------------
256 # Portably unset VAR.
257 as_fn_unset ()
258 {
259   { eval $1=; unset $1;}
260 }
261 as_unset=as_fn_unset
262
263 # as_fn_set_status STATUS
264 # -----------------------
265 # Set $? to STATUS, without forking.
266 as_fn_set_status ()
267 {
268   return $1
269 } # as_fn_set_status
270
271 # as_fn_exit STATUS
272 # -----------------
273 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
274 as_fn_exit ()
275 {
276   set +e
277   as_fn_set_status $1
278   exit $1
279 } # as_fn_exit
280
281 # as_fn_mkdir_p
282 # -------------
283 # Create "$as_dir" as a directory, including parents if necessary.
284 as_fn_mkdir_p ()
285 {
286
287   case $as_dir in #(
288   -*) as_dir=./$as_dir;;
289   esac
290   test -d "$as_dir" || eval $as_mkdir_p || {
291     as_dirs=
292     while :; do
293       case $as_dir in #(
294       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
295       *) as_qdir=$as_dir;;
296       esac
297       as_dirs="'$as_qdir' $as_dirs"
298       as_dir=`$as_dirname -- "$as_dir" ||
299 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
300          X"$as_dir" : 'X\(//\)[^/]' \| \
301          X"$as_dir" : 'X\(//\)$' \| \
302          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
303 $as_echo X"$as_dir" |
304     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
305             s//\1/
306             q
307           }
308           /^X\(\/\/\)[^/].*/{
309             s//\1/
310             q
311           }
312           /^X\(\/\/\)$/{
313             s//\1/
314             q
315           }
316           /^X\(\/\).*/{
317             s//\1/
318             q
319           }
320           s/.*/./; q'`
321       test -d "$as_dir" && break
322     done
323     test -z "$as_dirs" || eval "mkdir $as_dirs"
324   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
325
326
327 } # as_fn_mkdir_p
328 # as_fn_append VAR VALUE
329 # ----------------------
330 # Append the text in VALUE to the end of the definition contained in VAR. Take
331 # advantage of any shell optimizations that allow amortized linear growth over
332 # repeated appends, instead of the typical quadratic growth present in naive
333 # implementations.
334 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
335   eval 'as_fn_append ()
336   {
337     eval $1+=\$2
338   }'
339 else
340   as_fn_append ()
341   {
342     eval $1=\$$1\$2
343   }
344 fi # as_fn_append
345
346 # as_fn_arith ARG...
347 # ------------------
348 # Perform arithmetic evaluation on the ARGs, and store the result in the
349 # global $as_val. Take advantage of shells that can avoid forks. The arguments
350 # must be portable across $(()) and expr.
351 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
352   eval 'as_fn_arith ()
353   {
354     as_val=$(( $* ))
355   }'
356 else
357   as_fn_arith ()
358   {
359     as_val=`expr "$@" || test $? -eq 1`
360   }
361 fi # as_fn_arith
362
363
364 # as_fn_error ERROR [LINENO LOG_FD]
365 # ---------------------------------
366 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
367 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
368 # script with status $?, using 1 if that was 0.
369 as_fn_error ()
370 {
371   as_status=$?; test $as_status -eq 0 && as_status=1
372   if test "$3"; then
373     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
374     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
375   fi
376   $as_echo "$as_me: error: $1" >&2
377   as_fn_exit $as_status
378 } # as_fn_error
379
380 if expr a : '\(a\)' >/dev/null 2>&1 &&
381    test "X`expr 00001 : '.*\(...\)'`" = X001; then
382   as_expr=expr
383 else
384   as_expr=false
385 fi
386
387 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
388   as_basename=basename
389 else
390   as_basename=false
391 fi
392
393 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
394   as_dirname=dirname
395 else
396   as_dirname=false
397 fi
398
399 as_me=`$as_basename -- "$0" ||
400 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
401          X"$0" : 'X\(//\)$' \| \
402          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
403 $as_echo X/"$0" |
404     sed '/^.*\/\([^/][^/]*\)\/*$/{
405             s//\1/
406             q
407           }
408           /^X\/\(\/\/\)$/{
409             s//\1/
410             q
411           }
412           /^X\/\(\/\).*/{
413             s//\1/
414             q
415           }
416           s/.*/./; q'`
417
418 # Avoid depending upon Character Ranges.
419 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
420 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
421 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
422 as_cr_digits='0123456789'
423 as_cr_alnum=$as_cr_Letters$as_cr_digits
424
425
426   as_lineno_1=$LINENO as_lineno_1a=$LINENO
427   as_lineno_2=$LINENO as_lineno_2a=$LINENO
428   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
429   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
430   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
431   sed -n '
432     p
433     /[$]LINENO/=
434   ' <$as_myself |
435     sed '
436       s/[$]LINENO.*/&-/
437       t lineno
438       b
439       :lineno
440       N
441       :loop
442       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
443       t loop
444       s/-\n.*//
445     ' >$as_me.lineno &&
446   chmod +x "$as_me.lineno" ||
447     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
448
449   # Don't try to exec as it changes $[0], causing all sort of problems
450   # (the dirname of $[0] is not the place where we might find the
451   # original and so on.  Autoconf is especially sensitive to this).
452   . "./$as_me.lineno"
453   # Exit status is that of the last command.
454   exit
455 }
456
457 ECHO_C= ECHO_N= ECHO_T=
458 case `echo -n x` in #(((((
459 -n*)
460   case `echo 'xy\c'` in
461   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
462   xy)  ECHO_C='\c';;
463   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
464        ECHO_T=' ';;
465   esac;;
466 *)
467   ECHO_N='-n';;
468 esac
469
470 rm -f conf$$ conf$$.exe conf$$.file
471 if test -d conf$$.dir; then
472   rm -f conf$$.dir/conf$$.file
473 else
474   rm -f conf$$.dir
475   mkdir conf$$.dir 2>/dev/null
476 fi
477 if (echo >conf$$.file) 2>/dev/null; then
478   if ln -s conf$$.file conf$$ 2>/dev/null; then
479     as_ln_s='ln -s'
480     # ... but there are two gotchas:
481     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
482     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
483     # In both cases, we have to default to `cp -p'.
484     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
485       as_ln_s='cp -p'
486   elif ln conf$$.file conf$$ 2>/dev/null; then
487     as_ln_s=ln
488   else
489     as_ln_s='cp -p'
490   fi
491 else
492   as_ln_s='cp -p'
493 fi
494 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
495 rmdir conf$$.dir 2>/dev/null
496
497 if mkdir -p . 2>/dev/null; then
498   as_mkdir_p='mkdir -p "$as_dir"'
499 else
500   test -d ./-p && rmdir ./-p
501   as_mkdir_p=false
502 fi
503
504 if test -x / >/dev/null 2>&1; then
505   as_test_x='test -x'
506 else
507   if ls -dL / >/dev/null 2>&1; then
508     as_ls_L_option=L
509   else
510     as_ls_L_option=
511   fi
512   as_test_x='
513     eval sh -c '\''
514       if test -d "$1"; then
515         test -d "$1/.";
516       else
517         case $1 in #(
518         -*)set "./$1";;
519         esac;
520         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
521         ???[sx]*):;;*)false;;esac;fi
522     '\'' sh
523   '
524 fi
525 as_executable_p=$as_test_x
526
527 # Sed expression to map a string onto a valid CPP name.
528 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
529
530 # Sed expression to map a string onto a valid variable name.
531 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
532
533
534
535 # Check that we are running under the correct shell.
536 SHELL=${CONFIG_SHELL-/bin/sh}
537
538 case X$ECHO in
539 X*--fallback-echo)
540   # Remove one level of quotation (which was required for Make).
541   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
542   ;;
543 esac
544
545 echo=${ECHO-echo}
546 if test "X$1" = X--no-reexec; then
547   # Discard the --no-reexec flag, and continue.
548   shift
549 elif test "X$1" = X--fallback-echo; then
550   # Avoid inline document here, it may be left over
551   :
552 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
553   # Yippee, $echo works!
554   :
555 else
556   # Restart under the correct shell.
557   exec $SHELL "$0" --no-reexec ${1+"$@"}
558 fi
559
560 if test "X$1" = X--fallback-echo; then
561   # used as fallback echo
562   shift
563   cat <<EOF
564 $*
565 EOF
566   exit 0
567 fi
568
569 # The HP-UX ksh and POSIX shell print the target directory to stdout
570 # if CDPATH is set.
571 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
572
573 if test -z "$ECHO"; then
574 if test "X${echo_test_string+set}" != Xset; then
575 # find a string as large as possible, as long as the shell can cope with it
576   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
577     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
578     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
579        echo_test_string=`eval $cmd` &&
580        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
581     then
582       break
583     fi
584   done
585 fi
586
587 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
588    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
589    test "X$echo_testing_string" = "X$echo_test_string"; then
590   :
591 else
592   # The Solaris, AIX, and Digital Unix default echo programs unquote
593   # backslashes.  This makes it impossible to quote backslashes using
594   #   echo "$something" | sed 's/\\/\\\\/g'
595   #
596   # So, first we look for a working echo in the user's PATH.
597
598   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
599   for dir in $PATH /usr/ucb; do
600     IFS="$lt_save_ifs"
601     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
602        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
603        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
604        test "X$echo_testing_string" = "X$echo_test_string"; then
605       echo="$dir/echo"
606       break
607     fi
608   done
609   IFS="$lt_save_ifs"
610
611   if test "X$echo" = Xecho; then
612     # We didn't find a better echo, so look for alternatives.
613     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
614        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
615        test "X$echo_testing_string" = "X$echo_test_string"; then
616       # This shell has a builtin print -r that does the trick.
617       echo='print -r'
618     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
619          test "X$CONFIG_SHELL" != X/bin/ksh; then
620       # If we have ksh, try running configure again with it.
621       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
622       export ORIGINAL_CONFIG_SHELL
623       CONFIG_SHELL=/bin/ksh
624       export CONFIG_SHELL
625       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
626     else
627       # Try using printf.
628       echo='printf %s\n'
629       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
630          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
631          test "X$echo_testing_string" = "X$echo_test_string"; then
632         # Cool, printf works
633         :
634       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
635            test "X$echo_testing_string" = 'X\t' &&
636            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
637            test "X$echo_testing_string" = "X$echo_test_string"; then
638         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
639         export CONFIG_SHELL
640         SHELL="$CONFIG_SHELL"
641         export SHELL
642         echo="$CONFIG_SHELL $0 --fallback-echo"
643       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
644            test "X$echo_testing_string" = 'X\t' &&
645            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
646            test "X$echo_testing_string" = "X$echo_test_string"; then
647         echo="$CONFIG_SHELL $0 --fallback-echo"
648       else
649         # maybe with a smaller string...
650         prev=:
651
652         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
653           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
654           then
655             break
656           fi
657           prev="$cmd"
658         done
659
660         if test "$prev" != 'sed 50q "$0"'; then
661           echo_test_string=`eval $prev`
662           export echo_test_string
663           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
664         else
665           # Oops.  We lost completely, so just stick with echo.
666           echo=echo
667         fi
668       fi
669     fi
670   fi
671 fi
672 fi
673
674 # Copy echo and quote the copy suitably for passing to libtool from
675 # the Makefile, instead of quoting the original, which is used later.
676 ECHO=$echo
677 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
678    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
679 fi
680
681
682
683
684 test -n "$DJDIR" || exec 7<&0 </dev/null
685 exec 6>&1
686
687 # Name of the host.
688 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
689 # so uname gets run too.
690 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
691
692 #
693 # Initializations.
694 #
695 ac_default_prefix=/usr/local
696 ac_clean_files=
697 ac_config_libobj_dir=.
698 LIBOBJS=
699 cross_compiling=no
700 subdirs=
701 MFLAGS=
702 MAKEFLAGS=
703
704 # Identity of this package.
705 PACKAGE_NAME=
706 PACKAGE_TARNAME=
707 PACKAGE_VERSION=
708 PACKAGE_STRING=
709 PACKAGE_BUGREPORT=
710 PACKAGE_URL=
711
712 ac_unique_file="OpenLDAP"
713 ac_unique_file="build/version.sh"
714 ac_default_prefix=/usr/local
715 # Factoring default headers for most tests.
716 ac_includes_default="\
717 #include <stdio.h>
718 #ifdef HAVE_SYS_TYPES_H
719 # include <sys/types.h>
720 #endif
721 #ifdef HAVE_SYS_STAT_H
722 # include <sys/stat.h>
723 #endif
724 #ifdef STDC_HEADERS
725 # include <stdlib.h>
726 # include <stddef.h>
727 #else
728 # ifdef HAVE_STDLIB_H
729 #  include <stdlib.h>
730 # endif
731 #endif
732 #ifdef HAVE_STRING_H
733 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
734 #  include <memory.h>
735 # endif
736 # include <string.h>
737 #endif
738 #ifdef HAVE_STRINGS_H
739 # include <strings.h>
740 #endif
741 #ifdef HAVE_INTTYPES_H
742 # include <inttypes.h>
743 #endif
744 #ifdef HAVE_STDINT_H
745 # include <stdint.h>
746 #endif
747 #ifdef HAVE_UNISTD_H
748 # include <unistd.h>
749 #endif"
750
751 ac_subst_vars='LTLIBOBJS
752 WT_LIBS
753 WT_INCS
754 SLAPD_SQL_INCLUDES
755 SLAPD_SQL_LIBS
756 SLAPD_SQL_LDFLAGS
757 SLAPD_GMP_LIBS
758 SLAPD_SLP_LIBS
759 ICU_LIBS
760 AUTH_LIBS
761 LIBSLAPI
762 SLAPI_LIBS
763 MODULES_LIBS
764 TLS_LIBS
765 SASL_LIBS
766 KRB5_LIBS
767 KRB4_LIBS
768 MOD_PERL_LDFLAGS
769 SLAPD_PERL_LDFLAGS
770 PERL_CPPFLAGS
771 SLAPD_DYNAMIC_OVERLAYS
772 SLAPD_STATIC_OVERLAYS
773 SLAPD_DYNAMIC_BACKENDS
774 SLAPD_STATIC_BACKENDS
775 SLAPD_NO_STATIC
776 SLAPD_MODULES_LDFLAGS
777 SLAPD_MODULES_CPPFLAGS
778 WRAP_LIBS
779 LUTIL_LIBS
780 LTHREAD_LIBS
781 SLAPD_NDB_INCS
782 SLAPD_NDB_LIBS
783 BDB_LIBS
784 SLAPD_LIBS
785 LDAP_LIBS
786 BUILD_VALSORT
787 BUILD_UNIQUE
788 BUILD_TRANSLUCENT
789 BUILD_SYNCPROV
790 BUILD_SSSVLV
791 BUILD_SEQMOD
792 BUILD_RWM
793 BUILD_RETCODE
794 BUILD_REFINT
795 BUILD_PROXYCACHE
796 BUILD_PPOLICY
797 BUILD_MEMBEROF
798 BUILD_LASTMOD
799 BUILD_DYNLIST
800 BUILD_DYNGROUP
801 BUILD_DEREF
802 BUILD_DENYOP
803 BUILD_DDS
804 BUILD_CONSTRAINT
805 BUILD_COLLECT
806 BUILD_AUDITLOG
807 BUILD_ACCESSLOG
808 BUILD_WT
809 BUILD_SQL
810 BUILD_SOCK
811 BUILD_SHELL
812 BUILD_PERL
813 BUILD_RELAY
814 BUILD_PASSWD
815 BUILD_NULL
816 BUILD_NDB
817 BUILD_MONITOR
818 BUILD_ASYNCMETA
819 BUILD_META
820 BUILD_MDB
821 BUILD_LDAP
822 BUILD_HDB
823 BUILD_DNSSRV
824 BUILD_BDB
825 SLAPD_SLAPI_DEPEND
826 BUILD_SLAPI
827 BUILD_SLAPD
828 BUILD_LIBS_DYNAMIC
829 BUILD_THREAD
830 WITH_ACI_ENABLED
831 WITH_MODULES_ENABLED
832 WITH_TLS
833 WITH_SASL
834 PLAT
835 LIBSRCS
836 LIBOBJS
837 PKGCONFIG
838 MYSQL
839 LTSTATIC
840 OL_MKDEP_FLAGS
841 OL_MKDEP
842 PERLBIN
843 LIBTOOL
844 CPP
845 OBJDUMP
846 AS
847 DLLTOOL
848 RANLIB
849 ECHO
850 LN_S
851 EGREP
852 GREP
853 am__fastdepCC_FALSE
854 am__fastdepCC_TRUE
855 CCDEPMODE
856 AMDEPBACKSLASH
857 AMDEP_FALSE
858 AMDEP_TRUE
859 am__quote
860 am__include
861 DEPDIR
862 OBJEXT
863 EXEEXT
864 ac_ct_CC
865 CPPFLAGS
866 LDFLAGS
867 CFLAGS
868 AR
869 CC
870 ldap_subdir
871 top_builddir
872 OPENLDAP_RELEASE_DATE
873 OPENLDAP_LIBVERSION
874 OPENLDAP_LIBRELEASE
875 am__untar
876 am__tar
877 AMTAR
878 am__leading_dot
879 SET_MAKE
880 AWK
881 mkdir_p
882 INSTALL_STRIP_PROGRAM
883 STRIP
884 install_sh
885 MAKEINFO
886 AUTOHEADER
887 AUTOMAKE
888 AUTOCONF
889 ACLOCAL
890 VERSION
891 PACKAGE
892 CYGPATH_W
893 INSTALL_DATA
894 INSTALL_SCRIPT
895 INSTALL_PROGRAM
896 target_os
897 target_vendor
898 target_cpu
899 target
900 host_os
901 host_vendor
902 host_cpu
903 host
904 build_os
905 build_vendor
906 build_cpu
907 build
908 target_alias
909 host_alias
910 build_alias
911 LIBS
912 ECHO_T
913 ECHO_N
914 ECHO_C
915 DEFS
916 mandir
917 localedir
918 libdir
919 psdir
920 pdfdir
921 dvidir
922 htmldir
923 infodir
924 docdir
925 oldincludedir
926 includedir
927 localstatedir
928 sharedstatedir
929 sysconfdir
930 datadir
931 datarootdir
932 libexecdir
933 sbindir
934 bindir
935 program_transform_name
936 prefix
937 exec_prefix
938 PACKAGE_URL
939 PACKAGE_BUGREPORT
940 PACKAGE_STRING
941 PACKAGE_VERSION
942 PACKAGE_TARNAME
943 PACKAGE_NAME
944 PATH_SEPARATOR
945 SHELL'
946 ac_subst_files=''
947 ac_user_opts='
948 enable_option_checking
949 with_subdir
950 enable_debug
951 enable_dynamic
952 enable_syslog
953 enable_proctitle
954 enable_ipv6
955 enable_local
956 with_cyrus_sasl
957 with_fetch
958 with_threads
959 with_tls
960 with_yielding_select
961 with_mp
962 with_odbc
963 enable_xxslapdoptions
964 enable_slapd
965 enable_dynacl
966 enable_aci
967 enable_cleartext
968 enable_crypt
969 enable_lmpasswd
970 enable_spasswd
971 enable_modules
972 enable_rewrite
973 enable_rlookups
974 enable_slapi
975 enable_slp
976 enable_wrappers
977 enable_xxslapbackends
978 enable_backends
979 enable_bdb
980 enable_dnssrv
981 enable_hdb
982 enable_ldap
983 enable_mdb
984 enable_meta
985 enable_asyncmeta
986 enable_monitor
987 enable_ndb
988 enable_null
989 enable_passwd
990 enable_perl
991 enable_relay
992 enable_shell
993 enable_sock
994 enable_sql
995 enable_wt
996 enable_xxslapoverlays
997 enable_overlays
998 enable_accesslog
999 enable_auditlog
1000 enable_collect
1001 enable_constraint
1002 enable_dds
1003 enable_deref
1004 enable_dyngroup
1005 enable_dynlist
1006 enable_memberof
1007 enable_ppolicy
1008 enable_proxycache
1009 enable_refint
1010 enable_retcode
1011 enable_rwm
1012 enable_seqmod
1013 enable_sssvlv
1014 enable_syncprov
1015 enable_translucent
1016 enable_unique
1017 enable_valsort
1018 enable_xxliboptions
1019 enable_static
1020 enable_shared
1021 enable_fast_install
1022 enable_dependency_tracking
1023 with_gnu_ld
1024 enable_libtool_lock
1025 with_pic
1026 with_tags
1027 with_xxinstall
1028 '
1029       ac_precious_vars='build_alias
1030 host_alias
1031 target_alias
1032 CC
1033 CFLAGS
1034 LDFLAGS
1035 LIBS
1036 CPPFLAGS
1037 CPP'
1038
1039
1040 # Initialize some variables set by options.
1041 ac_init_help=
1042 ac_init_version=false
1043 ac_unrecognized_opts=
1044 ac_unrecognized_sep=
1045 # The variables have the same names as the options, with
1046 # dashes changed to underlines.
1047 cache_file=/dev/null
1048 exec_prefix=NONE
1049 no_create=
1050 no_recursion=
1051 prefix=NONE
1052 program_prefix=NONE
1053 program_suffix=NONE
1054 program_transform_name=s,x,x,
1055 silent=
1056 site=
1057 srcdir=
1058 verbose=
1059 x_includes=NONE
1060 x_libraries=NONE
1061
1062 # Installation directory options.
1063 # These are left unexpanded so users can "make install exec_prefix=/foo"
1064 # and all the variables that are supposed to be based on exec_prefix
1065 # by default will actually change.
1066 # Use braces instead of parens because sh, perl, etc. also accept them.
1067 # (The list follows the same order as the GNU Coding Standards.)
1068 bindir='${exec_prefix}/bin'
1069 sbindir='${exec_prefix}/sbin'
1070 libexecdir='${exec_prefix}/libexec'
1071 datarootdir='${prefix}/share'
1072 datadir='${datarootdir}'
1073 sysconfdir='${prefix}/etc'
1074 sharedstatedir='${prefix}/com'
1075 localstatedir='${prefix}/var'
1076 includedir='${prefix}/include'
1077 oldincludedir='/usr/include'
1078 docdir='${datarootdir}/doc/${PACKAGE}'
1079 infodir='${datarootdir}/info'
1080 htmldir='${docdir}'
1081 dvidir='${docdir}'
1082 pdfdir='${docdir}'
1083 psdir='${docdir}'
1084 libdir='${exec_prefix}/lib'
1085 localedir='${datarootdir}/locale'
1086 mandir='${datarootdir}/man'
1087
1088 ac_prev=
1089 ac_dashdash=
1090 for ac_option
1091 do
1092   # If the previous option needs an argument, assign it.
1093   if test -n "$ac_prev"; then
1094     eval $ac_prev=\$ac_option
1095     ac_prev=
1096     continue
1097   fi
1098
1099   case $ac_option in
1100   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1101   *)    ac_optarg=yes ;;
1102   esac
1103
1104   # Accept the important Cygnus configure options, so we can diagnose typos.
1105
1106   case $ac_dashdash$ac_option in
1107   --)
1108     ac_dashdash=yes ;;
1109
1110   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1111     ac_prev=bindir ;;
1112   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1113     bindir=$ac_optarg ;;
1114
1115   -build | --build | --buil | --bui | --bu)
1116     ac_prev=build_alias ;;
1117   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1118     build_alias=$ac_optarg ;;
1119
1120   -cache-file | --cache-file | --cache-fil | --cache-fi \
1121   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1122     ac_prev=cache_file ;;
1123   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1124   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1125     cache_file=$ac_optarg ;;
1126
1127   --config-cache | -C)
1128     cache_file=config.cache ;;
1129
1130   -datadir | --datadir | --datadi | --datad)
1131     ac_prev=datadir ;;
1132   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1133     datadir=$ac_optarg ;;
1134
1135   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1136   | --dataroo | --dataro | --datar)
1137     ac_prev=datarootdir ;;
1138   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1139   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1140     datarootdir=$ac_optarg ;;
1141
1142   -disable-* | --disable-*)
1143     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1144     # Reject names that are not valid shell variable names.
1145     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1146       as_fn_error "invalid feature name: $ac_useropt"
1147     ac_useropt_orig=$ac_useropt
1148     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1149     case $ac_user_opts in
1150       *"
1151 "enable_$ac_useropt"
1152 "*) ;;
1153       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1154          ac_unrecognized_sep=', ';;
1155     esac
1156     eval enable_$ac_useropt=no ;;
1157
1158   -docdir | --docdir | --docdi | --doc | --do)
1159     ac_prev=docdir ;;
1160   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1161     docdir=$ac_optarg ;;
1162
1163   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1164     ac_prev=dvidir ;;
1165   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1166     dvidir=$ac_optarg ;;
1167
1168   -enable-* | --enable-*)
1169     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1170     # Reject names that are not valid shell variable names.
1171     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1172       as_fn_error "invalid feature name: $ac_useropt"
1173     ac_useropt_orig=$ac_useropt
1174     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1175     case $ac_user_opts in
1176       *"
1177 "enable_$ac_useropt"
1178 "*) ;;
1179       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1180          ac_unrecognized_sep=', ';;
1181     esac
1182     eval enable_$ac_useropt=\$ac_optarg ;;
1183
1184   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1185   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1186   | --exec | --exe | --ex)
1187     ac_prev=exec_prefix ;;
1188   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1189   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1190   | --exec=* | --exe=* | --ex=*)
1191     exec_prefix=$ac_optarg ;;
1192
1193   -gas | --gas | --ga | --g)
1194     # Obsolete; use --with-gas.
1195     with_gas=yes ;;
1196
1197   -help | --help | --hel | --he | -h)
1198     ac_init_help=long ;;
1199   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1200     ac_init_help=recursive ;;
1201   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1202     ac_init_help=short ;;
1203
1204   -host | --host | --hos | --ho)
1205     ac_prev=host_alias ;;
1206   -host=* | --host=* | --hos=* | --ho=*)
1207     host_alias=$ac_optarg ;;
1208
1209   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1210     ac_prev=htmldir ;;
1211   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1212   | --ht=*)
1213     htmldir=$ac_optarg ;;
1214
1215   -includedir | --includedir | --includedi | --included | --include \
1216   | --includ | --inclu | --incl | --inc)
1217     ac_prev=includedir ;;
1218   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1219   | --includ=* | --inclu=* | --incl=* | --inc=*)
1220     includedir=$ac_optarg ;;
1221
1222   -infodir | --infodir | --infodi | --infod | --info | --inf)
1223     ac_prev=infodir ;;
1224   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1225     infodir=$ac_optarg ;;
1226
1227   -libdir | --libdir | --libdi | --libd)
1228     ac_prev=libdir ;;
1229   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1230     libdir=$ac_optarg ;;
1231
1232   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1233   | --libexe | --libex | --libe)
1234     ac_prev=libexecdir ;;
1235   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1236   | --libexe=* | --libex=* | --libe=*)
1237     libexecdir=$ac_optarg ;;
1238
1239   -localedir | --localedir | --localedi | --localed | --locale)
1240     ac_prev=localedir ;;
1241   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1242     localedir=$ac_optarg ;;
1243
1244   -localstatedir | --localstatedir | --localstatedi | --localstated \
1245   | --localstate | --localstat | --localsta | --localst | --locals)
1246     ac_prev=localstatedir ;;
1247   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1248   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1249     localstatedir=$ac_optarg ;;
1250
1251   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1252     ac_prev=mandir ;;
1253   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1254     mandir=$ac_optarg ;;
1255
1256   -nfp | --nfp | --nf)
1257     # Obsolete; use --without-fp.
1258     with_fp=no ;;
1259
1260   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1261   | --no-cr | --no-c | -n)
1262     no_create=yes ;;
1263
1264   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1265   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1266     no_recursion=yes ;;
1267
1268   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1269   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1270   | --oldin | --oldi | --old | --ol | --o)
1271     ac_prev=oldincludedir ;;
1272   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1273   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1274   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1275     oldincludedir=$ac_optarg ;;
1276
1277   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1278     ac_prev=prefix ;;
1279   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1280     prefix=$ac_optarg ;;
1281
1282   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1283   | --program-pre | --program-pr | --program-p)
1284     ac_prev=program_prefix ;;
1285   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1286   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1287     program_prefix=$ac_optarg ;;
1288
1289   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1290   | --program-suf | --program-su | --program-s)
1291     ac_prev=program_suffix ;;
1292   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1293   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1294     program_suffix=$ac_optarg ;;
1295
1296   -program-transform-name | --program-transform-name \
1297   | --program-transform-nam | --program-transform-na \
1298   | --program-transform-n | --program-transform- \
1299   | --program-transform | --program-transfor \
1300   | --program-transfo | --program-transf \
1301   | --program-trans | --program-tran \
1302   | --progr-tra | --program-tr | --program-t)
1303     ac_prev=program_transform_name ;;
1304   -program-transform-name=* | --program-transform-name=* \
1305   | --program-transform-nam=* | --program-transform-na=* \
1306   | --program-transform-n=* | --program-transform-=* \
1307   | --program-transform=* | --program-transfor=* \
1308   | --program-transfo=* | --program-transf=* \
1309   | --program-trans=* | --program-tran=* \
1310   | --progr-tra=* | --program-tr=* | --program-t=*)
1311     program_transform_name=$ac_optarg ;;
1312
1313   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1314     ac_prev=pdfdir ;;
1315   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1316     pdfdir=$ac_optarg ;;
1317
1318   -psdir | --psdir | --psdi | --psd | --ps)
1319     ac_prev=psdir ;;
1320   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1321     psdir=$ac_optarg ;;
1322
1323   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1324   | -silent | --silent | --silen | --sile | --sil)
1325     silent=yes ;;
1326
1327   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1328     ac_prev=sbindir ;;
1329   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1330   | --sbi=* | --sb=*)
1331     sbindir=$ac_optarg ;;
1332
1333   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1334   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1335   | --sharedst | --shareds | --shared | --share | --shar \
1336   | --sha | --sh)
1337     ac_prev=sharedstatedir ;;
1338   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1339   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1340   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1341   | --sha=* | --sh=*)
1342     sharedstatedir=$ac_optarg ;;
1343
1344   -site | --site | --sit)
1345     ac_prev=site ;;
1346   -site=* | --site=* | --sit=*)
1347     site=$ac_optarg ;;
1348
1349   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1350     ac_prev=srcdir ;;
1351   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1352     srcdir=$ac_optarg ;;
1353
1354   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1355   | --syscon | --sysco | --sysc | --sys | --sy)
1356     ac_prev=sysconfdir ;;
1357   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1358   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1359     sysconfdir=$ac_optarg ;;
1360
1361   -target | --target | --targe | --targ | --tar | --ta | --t)
1362     ac_prev=target_alias ;;
1363   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1364     target_alias=$ac_optarg ;;
1365
1366   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1367     verbose=yes ;;
1368
1369   -version | --version | --versio | --versi | --vers | -V)
1370     ac_init_version=: ;;
1371
1372   -with-* | --with-*)
1373     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1374     # Reject names that are not valid shell variable names.
1375     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1376       as_fn_error "invalid package name: $ac_useropt"
1377     ac_useropt_orig=$ac_useropt
1378     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1379     case $ac_user_opts in
1380       *"
1381 "with_$ac_useropt"
1382 "*) ;;
1383       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1384          ac_unrecognized_sep=', ';;
1385     esac
1386     eval with_$ac_useropt=\$ac_optarg ;;
1387
1388   -without-* | --without-*)
1389     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1390     # Reject names that are not valid shell variable names.
1391     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1392       as_fn_error "invalid package name: $ac_useropt"
1393     ac_useropt_orig=$ac_useropt
1394     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1395     case $ac_user_opts in
1396       *"
1397 "with_$ac_useropt"
1398 "*) ;;
1399       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1400          ac_unrecognized_sep=', ';;
1401     esac
1402     eval with_$ac_useropt=no ;;
1403
1404   --x)
1405     # Obsolete; use --with-x.
1406     with_x=yes ;;
1407
1408   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1409   | --x-incl | --x-inc | --x-in | --x-i)
1410     ac_prev=x_includes ;;
1411   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1412   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1413     x_includes=$ac_optarg ;;
1414
1415   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1416   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1417     ac_prev=x_libraries ;;
1418   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1419   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1420     x_libraries=$ac_optarg ;;
1421
1422   -*) as_fn_error "unrecognized option: \`$ac_option'
1423 Try \`$0 --help' for more information."
1424     ;;
1425
1426   *=*)
1427     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1428     # Reject names that are not valid shell variable names.
1429     case $ac_envvar in #(
1430       '' | [0-9]* | *[!_$as_cr_alnum]* )
1431       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1432     esac
1433     eval $ac_envvar=\$ac_optarg
1434     export $ac_envvar ;;
1435
1436   *)
1437     # FIXME: should be removed in autoconf 3.0.
1438     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1439     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1440       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1441     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1442     ;;
1443
1444   esac
1445 done
1446
1447 if test -n "$ac_prev"; then
1448   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1449   as_fn_error "missing argument to $ac_option"
1450 fi
1451
1452 if test -n "$ac_unrecognized_opts"; then
1453   case $enable_option_checking in
1454     no) ;;
1455     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1456     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1457   esac
1458 fi
1459
1460 # Check all directory arguments for consistency.
1461 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1462                 datadir sysconfdir sharedstatedir localstatedir includedir \
1463                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1464                 libdir localedir mandir
1465 do
1466   eval ac_val=\$$ac_var
1467   # Remove trailing slashes.
1468   case $ac_val in
1469     */ )
1470       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1471       eval $ac_var=\$ac_val;;
1472   esac
1473   # Be sure to have absolute directory names.
1474   case $ac_val in
1475     [\\/$]* | ?:[\\/]* )  continue;;
1476     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1477   esac
1478   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1479 done
1480
1481 # There might be people who depend on the old broken behavior: `$host'
1482 # used to hold the argument of --host etc.
1483 # FIXME: To remove some day.
1484 build=$build_alias
1485 host=$host_alias
1486 target=$target_alias
1487
1488 # FIXME: To remove some day.
1489 if test "x$host_alias" != x; then
1490   if test "x$build_alias" = x; then
1491     cross_compiling=maybe
1492     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1493     If a cross compiler is detected then cross compile mode will be used." >&2
1494   elif test "x$build_alias" != "x$host_alias"; then
1495     cross_compiling=yes
1496   fi
1497 fi
1498
1499 ac_tool_prefix=
1500 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1501
1502 test "$silent" = yes && exec 6>/dev/null
1503
1504
1505 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1506 ac_ls_di=`ls -di .` &&
1507 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1508   as_fn_error "working directory cannot be determined"
1509 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1510   as_fn_error "pwd does not report name of working directory"
1511
1512
1513 # Find the source files, if location was not specified.
1514 if test -z "$srcdir"; then
1515   ac_srcdir_defaulted=yes
1516   # Try the directory containing this script, then the parent directory.
1517   ac_confdir=`$as_dirname -- "$as_myself" ||
1518 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1519          X"$as_myself" : 'X\(//\)[^/]' \| \
1520          X"$as_myself" : 'X\(//\)$' \| \
1521          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1522 $as_echo X"$as_myself" |
1523     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1524             s//\1/
1525             q
1526           }
1527           /^X\(\/\/\)[^/].*/{
1528             s//\1/
1529             q
1530           }
1531           /^X\(\/\/\)$/{
1532             s//\1/
1533             q
1534           }
1535           /^X\(\/\).*/{
1536             s//\1/
1537             q
1538           }
1539           s/.*/./; q'`
1540   srcdir=$ac_confdir
1541   if test ! -r "$srcdir/$ac_unique_file"; then
1542     srcdir=..
1543   fi
1544 else
1545   ac_srcdir_defaulted=no
1546 fi
1547 if test ! -r "$srcdir/$ac_unique_file"; then
1548   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1549   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1550 fi
1551 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1552 ac_abs_confdir=`(
1553         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1554         pwd)`
1555 # When building in place, set srcdir=.
1556 if test "$ac_abs_confdir" = "$ac_pwd"; then
1557   srcdir=.
1558 fi
1559 # Remove unnecessary trailing slashes from srcdir.
1560 # Double slashes in file names in object file debugging info
1561 # mess up M-x gdb in Emacs.
1562 case $srcdir in
1563 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1564 esac
1565 for ac_var in $ac_precious_vars; do
1566   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1567   eval ac_env_${ac_var}_value=\$${ac_var}
1568   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1569   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1570 done
1571
1572 #
1573 # Report the --help message.
1574 #
1575 if test "$ac_init_help" = "long"; then
1576   # Omit some internal or obsolete options to make the list less imposing.
1577   # This message is too long to be a string in the A/UX 3.1 sh.
1578   cat <<_ACEOF
1579 \`configure' configures this package to adapt to many kinds of systems.
1580
1581 Usage: $0 [OPTION]... [VAR=VALUE]...
1582
1583 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1584 VAR=VALUE.  See below for descriptions of some of the useful variables.
1585
1586 Defaults for the options are specified in brackets.
1587
1588 Configuration:
1589   -h, --help              display this help and exit
1590       --help=short        display options specific to this package
1591       --help=recursive    display the short help of all the included packages
1592   -V, --version           display version information and exit
1593   -q, --quiet, --silent   do not print \`checking...' messages
1594       --cache-file=FILE   cache test results in FILE [disabled]
1595   -C, --config-cache      alias for \`--cache-file=config.cache'
1596   -n, --no-create         do not create output files
1597       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1598
1599 Installation directories:
1600   --prefix=PREFIX         install architecture-independent files in PREFIX
1601                           [$ac_default_prefix]
1602   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1603                           [PREFIX]
1604
1605 By default, \`make install' will install all the files in
1606 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1607 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1608 for instance \`--prefix=\$HOME'.
1609
1610 For better control, use the options below.
1611
1612 Fine tuning of the installation directories:
1613   --bindir=DIR            user executables [EPREFIX/bin]
1614   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1615   --libexecdir=DIR        program executables [EPREFIX/libexec]
1616   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1617   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1618   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1619   --libdir=DIR            object code libraries [EPREFIX/lib]
1620   --includedir=DIR        C header files [PREFIX/include]
1621   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1622   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1623   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1624   --infodir=DIR           info documentation [DATAROOTDIR/info]
1625   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1626   --mandir=DIR            man documentation [DATAROOTDIR/man]
1627   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1628   --htmldir=DIR           html documentation [DOCDIR]
1629   --dvidir=DIR            dvi documentation [DOCDIR]
1630   --pdfdir=DIR            pdf documentation [DOCDIR]
1631   --psdir=DIR             ps documentation [DOCDIR]
1632 _ACEOF
1633
1634   cat <<\_ACEOF
1635
1636 Program names:
1637   --program-prefix=PREFIX            prepend PREFIX to installed program names
1638   --program-suffix=SUFFIX            append SUFFIX to installed program names
1639   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1640
1641 System types:
1642   --build=BUILD     configure for building on BUILD [guessed]
1643   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1644   --target=TARGET   configure for building compilers for TARGET [HOST]
1645 _ACEOF
1646 fi
1647
1648 if test -n "$ac_init_help"; then
1649
1650   cat <<\_ACEOF
1651
1652 Optional Features:
1653   --disable-option-checking  ignore unrecognized --enable/--with options
1654   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1655   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1656   --enable-debug          enable debugging no|yes|traditional [yes]
1657   --enable-dynamic        enable linking built binaries with dynamic libs [no]
1658   --enable-syslog         enable syslog support [auto]
1659   --enable-proctitle      enable proctitle support [yes]
1660   --enable-ipv6           enable IPv6 support [auto]
1661   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]
1662
1663 SLAPD (Standalone LDAP Daemon) Options:
1664   --enable-slapd          enable building slapd [yes]
1665     --enable-dynacl       enable run-time loadable ACL support (experimental) [no]
1666     --enable-aci          enable per-object ACIs (experimental) no|yes|mod [no]
1667     --enable-cleartext    enable cleartext passwords [yes]
1668     --enable-crypt        enable crypt(3) passwords [no]
1669     --enable-lmpasswd     enable LAN Manager passwords [no]
1670     --enable-spasswd      enable (Cyrus) SASL password verification [no]
1671     --enable-modules      enable dynamic module support [no]
1672     --enable-rewrite      enable DN rewriting in back-ldap and rwm overlay [auto]
1673     --enable-rlookups     enable reverse lookups of client hostnames [no]
1674     --enable-slapi        enable SLAPI support (experimental) [no]
1675     --enable-slp          enable SLPv2 support [no]
1676     --enable-wrappers     enable tcp wrapper support [no]
1677
1678 SLAPD Backend Options:
1679     --enable-backends     enable all available backends no|yes|mod
1680     --enable-bdb          enable Berkeley DB backend no|yes|mod [no]
1681     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]
1682     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]
1683     --enable-ldap         enable ldap backend no|yes|mod [no]
1684     --enable-mdb          enable mdb database backend no|yes|mod [yes]
1685     --enable-meta         enable metadirectory backend no|yes|mod [no]
1686     --enable-asyncmeta    enable asynchronous metadirectory backend no|yes|mod [no]
1687     --enable-monitor      enable monitor backend no|yes|mod [yes]
1688     --enable-ndb          enable MySQL NDB Cluster backend no|yes|mod [no]
1689     --enable-null         enable null backend no|yes|mod [no]
1690     --enable-passwd       enable passwd backend no|yes|mod [no]
1691     --enable-perl         enable perl backend no|yes|mod [no]
1692     --enable-relay        enable relay backend no|yes|mod [yes]
1693     --enable-shell        enable shell backend no|yes|mod [no]
1694     --enable-sock         enable sock backend no|yes|mod [no]
1695     --enable-sql          enable sql backend no|yes|mod [no]
1696     --enable-wt   enable WiredTiger backend no|yes|mod [no]
1697
1698 SLAPD Overlay Options:
1699     --enable-overlays     enable all available overlays no|yes|mod
1700     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [no]
1701     --enable-auditlog     Audit Logging overlay no|yes|mod [no]
1702     --enable-collect      Collect overlay no|yes|mod [no]
1703     --enable-constraint   Attribute Constraint overlay no|yes|mod [no]
1704     --enable-dds          Dynamic Directory Services overlay no|yes|mod [no]
1705     --enable-deref        Dereference overlay no|yes|mod [no]
1706     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1707     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1708     --enable-memberof     Reverse Group Membership overlay no|yes|mod [no]
1709     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1710     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1711     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1712     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1713     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1714     --enable-seqmod       Sequential Modify overlay no|yes|mod [no]
1715     --enable-sssvlv       ServerSideSort/VLV overlay no|yes|mod [no]
1716     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1717     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1718     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1719     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1720
1721 Library Generation & Linking Options
1722   --enable-static[=PKGS]  build static libraries [default=yes]
1723   --enable-shared[=PKGS]  build shared libraries [default=yes]
1724   --enable-fast-install[=PKGS]
1725                           optimize for fast installation [default=yes]
1726   --disable-dependency-tracking  speeds up one-time build
1727   --enable-dependency-tracking   do not reject slow dependency extractors
1728   --disable-libtool-lock  avoid locking (might break parallel builds)
1729
1730 Optional Packages:
1731   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1732   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1733   --with-subdir=DIR       change default subdirectory used for installs
1734   --with-cyrus-sasl       with Cyrus SASL support [auto]
1735   --with-fetch            with fetch(3) URL support [auto]
1736   --with-threads          with threads [auto]
1737   --with-tls              with TLS/SSL support auto|openssl|gnutls|moznss [auto]
1738   --with-yielding-select  with implicitly yielding select [auto]
1739   --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1740   --with-odbc             with specific ODBC support iodbc|unixodbc|odbc32|auto [auto]
1741   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1742   --with-pic              try to use only PIC/non-PIC objects [default=use
1743                           both]
1744   --with-tags[=TAGS]      include additional configurations [automatic]
1745
1746 See INSTALL file for further details.
1747
1748 Some influential environment variables:
1749   CC          C compiler command
1750   CFLAGS      C compiler flags
1751   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1752               nonstandard directory <lib dir>
1753   LIBS        libraries to pass to the linker, e.g. -l<library>
1754   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1755               you have headers in a nonstandard directory <include dir>
1756   CPP         C preprocessor
1757
1758 Use these variables to override the choices made by `configure' or to help
1759 it to find libraries and programs with nonstandard names/locations.
1760
1761 Report bugs to the package provider.
1762 _ACEOF
1763 ac_status=$?
1764 fi
1765
1766 if test "$ac_init_help" = "recursive"; then
1767   # If there are subdirs, report their specific --help.
1768   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1769     test -d "$ac_dir" ||
1770       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1771       continue
1772     ac_builddir=.
1773
1774 case "$ac_dir" in
1775 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1776 *)
1777   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1778   # A ".." for each directory in $ac_dir_suffix.
1779   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1780   case $ac_top_builddir_sub in
1781   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1782   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1783   esac ;;
1784 esac
1785 ac_abs_top_builddir=$ac_pwd
1786 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1787 # for backward compatibility:
1788 ac_top_builddir=$ac_top_build_prefix
1789
1790 case $srcdir in
1791   .)  # We are building in place.
1792     ac_srcdir=.
1793     ac_top_srcdir=$ac_top_builddir_sub
1794     ac_abs_top_srcdir=$ac_pwd ;;
1795   [\\/]* | ?:[\\/]* )  # Absolute name.
1796     ac_srcdir=$srcdir$ac_dir_suffix;
1797     ac_top_srcdir=$srcdir
1798     ac_abs_top_srcdir=$srcdir ;;
1799   *) # Relative name.
1800     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1801     ac_top_srcdir=$ac_top_build_prefix$srcdir
1802     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1803 esac
1804 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1805
1806     cd "$ac_dir" || { ac_status=$?; continue; }
1807     # Check for guested configure.
1808     if test -f "$ac_srcdir/configure.gnu"; then
1809       echo &&
1810       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1811     elif test -f "$ac_srcdir/configure"; then
1812       echo &&
1813       $SHELL "$ac_srcdir/configure" --help=recursive
1814     else
1815       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1816     fi || ac_status=$?
1817     cd "$ac_pwd" || { ac_status=$?; break; }
1818   done
1819 fi
1820
1821 test -n "$ac_init_help" && exit $ac_status
1822 if $ac_init_version; then
1823   cat <<\_ACEOF
1824 configure
1825 generated by GNU Autoconf 2.65
1826
1827 Copyright (C) 2009 Free Software Foundation, Inc.
1828 This configure script is free software; the Free Software Foundation
1829 gives unlimited permission to copy, distribute and modify it.
1830
1831 Copyright 1998-2016 The OpenLDAP Foundation. All rights reserved.
1832 Restrictions apply, see COPYRIGHT and LICENSE files.
1833 _ACEOF
1834   exit
1835 fi
1836
1837 ## ------------------------ ##
1838 ## Autoconf initialization. ##
1839 ## ------------------------ ##
1840
1841 # ac_fn_c_try_compile LINENO
1842 # --------------------------
1843 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1844 ac_fn_c_try_compile ()
1845 {
1846   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1847   rm -f conftest.$ac_objext
1848   if { { ac_try="$ac_compile"
1849 case "(($ac_try" in
1850   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1851   *) ac_try_echo=$ac_try;;
1852 esac
1853 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1854 $as_echo "$ac_try_echo"; } >&5
1855   (eval "$ac_compile") 2>conftest.err
1856   ac_status=$?
1857   if test -s conftest.err; then
1858     grep -v '^ *+' conftest.err >conftest.er1
1859     cat conftest.er1 >&5
1860     mv -f conftest.er1 conftest.err
1861   fi
1862   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1863   test $ac_status = 0; } && {
1864          test -z "$ac_c_werror_flag" ||
1865          test ! -s conftest.err
1866        } && test -s conftest.$ac_objext; then :
1867   ac_retval=0
1868 else
1869   $as_echo "$as_me: failed program was:" >&5
1870 sed 's/^/| /' conftest.$ac_ext >&5
1871
1872         ac_retval=1
1873 fi
1874   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1875   as_fn_set_status $ac_retval
1876
1877 } # ac_fn_c_try_compile
1878
1879 # ac_fn_c_try_link LINENO
1880 # -----------------------
1881 # Try to link conftest.$ac_ext, and return whether this succeeded.
1882 ac_fn_c_try_link ()
1883 {
1884   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1885   rm -f conftest.$ac_objext conftest$ac_exeext
1886   if { { ac_try="$ac_link"
1887 case "(($ac_try" in
1888   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1889   *) ac_try_echo=$ac_try;;
1890 esac
1891 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1892 $as_echo "$ac_try_echo"; } >&5
1893   (eval "$ac_link") 2>conftest.err
1894   ac_status=$?
1895   if test -s conftest.err; then
1896     grep -v '^ *+' conftest.err >conftest.er1
1897     cat conftest.er1 >&5
1898     mv -f conftest.er1 conftest.err
1899   fi
1900   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1901   test $ac_status = 0; } && {
1902          test -z "$ac_c_werror_flag" ||
1903          test ! -s conftest.err
1904        } && test -s conftest$ac_exeext && {
1905          test "$cross_compiling" = yes ||
1906          $as_test_x conftest$ac_exeext
1907        }; then :
1908   ac_retval=0
1909 else
1910   $as_echo "$as_me: failed program was:" >&5
1911 sed 's/^/| /' conftest.$ac_ext >&5
1912
1913         ac_retval=1
1914 fi
1915   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1916   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1917   # interfere with the next link command; also delete a directory that is
1918   # left behind by Apple's compiler.  We do this before executing the actions.
1919   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1920   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1921   as_fn_set_status $ac_retval
1922
1923 } # ac_fn_c_try_link
1924
1925 # ac_fn_c_try_cpp LINENO
1926 # ----------------------
1927 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1928 ac_fn_c_try_cpp ()
1929 {
1930   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1931   if { { ac_try="$ac_cpp conftest.$ac_ext"
1932 case "(($ac_try" in
1933   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1934   *) ac_try_echo=$ac_try;;
1935 esac
1936 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1937 $as_echo "$ac_try_echo"; } >&5
1938   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1939   ac_status=$?
1940   if test -s conftest.err; then
1941     grep -v '^ *+' conftest.err >conftest.er1
1942     cat conftest.er1 >&5
1943     mv -f conftest.er1 conftest.err
1944   fi
1945   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1946   test $ac_status = 0; } >/dev/null && {
1947          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1948          test ! -s conftest.err
1949        }; then :
1950   ac_retval=0
1951 else
1952   $as_echo "$as_me: failed program was:" >&5
1953 sed 's/^/| /' conftest.$ac_ext >&5
1954
1955     ac_retval=1
1956 fi
1957   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1958   as_fn_set_status $ac_retval
1959
1960 } # ac_fn_c_try_cpp
1961
1962 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1963 # -------------------------------------------------------
1964 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1965 # the include files in INCLUDES and setting the cache variable VAR
1966 # accordingly.
1967 ac_fn_c_check_header_mongrel ()
1968 {
1969   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1970   if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1971   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1972 $as_echo_n "checking for $2... " >&6; }
1973 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1974   $as_echo_n "(cached) " >&6
1975 fi
1976 eval ac_res=\$$3
1977                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1978 $as_echo "$ac_res" >&6; }
1979 else
1980   # Is the header compilable?
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1982 $as_echo_n "checking $2 usability... " >&6; }
1983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984 /* end confdefs.h.  */
1985 $4
1986 #include <$2>
1987 _ACEOF
1988 if ac_fn_c_try_compile "$LINENO"; then :
1989   ac_header_compiler=yes
1990 else
1991   ac_header_compiler=no
1992 fi
1993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1995 $as_echo "$ac_header_compiler" >&6; }
1996
1997 # Is the header present?
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1999 $as_echo_n "checking $2 presence... " >&6; }
2000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2001 /* end confdefs.h.  */
2002 #include <$2>
2003 _ACEOF
2004 if ac_fn_c_try_cpp "$LINENO"; then :
2005   ac_header_preproc=yes
2006 else
2007   ac_header_preproc=no
2008 fi
2009 rm -f conftest.err conftest.$ac_ext
2010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2011 $as_echo "$ac_header_preproc" >&6; }
2012
2013 # So?  What about this header?
2014 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2015   yes:no: )
2016     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2017 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2018     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2019 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2020     ;;
2021   no:yes:* )
2022     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2023 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2024     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2025 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2026     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2027 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2028     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2029 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2030     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2031 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2032 ( cat <<\_ASBOX
2033 ## --------------------------------------------- ##
2034 ## Report this to <http://www.openldap.org/its/> ##
2035 ## --------------------------------------------- ##
2036 _ASBOX
2037      ) | sed "s/^/$as_me: WARNING:     /" >&2
2038     ;;
2039 esac
2040   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2041 $as_echo_n "checking for $2... " >&6; }
2042 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2043   $as_echo_n "(cached) " >&6
2044 else
2045   eval "$3=\$ac_header_compiler"
2046 fi
2047 eval ac_res=\$$3
2048                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2049 $as_echo "$ac_res" >&6; }
2050 fi
2051   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2052
2053 } # ac_fn_c_check_header_mongrel
2054
2055 # ac_fn_c_try_run LINENO
2056 # ----------------------
2057 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2058 # that executables *can* be run.
2059 ac_fn_c_try_run ()
2060 {
2061   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2062   if { { ac_try="$ac_link"
2063 case "(($ac_try" in
2064   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2065   *) ac_try_echo=$ac_try;;
2066 esac
2067 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2068 $as_echo "$ac_try_echo"; } >&5
2069   (eval "$ac_link") 2>&5
2070   ac_status=$?
2071   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2072   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2073   { { case "(($ac_try" in
2074   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2075   *) ac_try_echo=$ac_try;;
2076 esac
2077 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2078 $as_echo "$ac_try_echo"; } >&5
2079   (eval "$ac_try") 2>&5
2080   ac_status=$?
2081   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2082   test $ac_status = 0; }; }; then :
2083   ac_retval=0
2084 else
2085   $as_echo "$as_me: program exited with status $ac_status" >&5
2086        $as_echo "$as_me: failed program was:" >&5
2087 sed 's/^/| /' conftest.$ac_ext >&5
2088
2089        ac_retval=$ac_status
2090 fi
2091   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2092   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2093   as_fn_set_status $ac_retval
2094
2095 } # ac_fn_c_try_run
2096
2097 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2098 # -------------------------------------------------------
2099 # Tests whether HEADER exists and can be compiled using the include files in
2100 # INCLUDES, setting the cache variable VAR accordingly.
2101 ac_fn_c_check_header_compile ()
2102 {
2103   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2104   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2105 $as_echo_n "checking for $2... " >&6; }
2106 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2107   $as_echo_n "(cached) " >&6
2108 else
2109   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110 /* end confdefs.h.  */
2111 $4
2112 #include <$2>
2113 _ACEOF
2114 if ac_fn_c_try_compile "$LINENO"; then :
2115   eval "$3=yes"
2116 else
2117   eval "$3=no"
2118 fi
2119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2120 fi
2121 eval ac_res=\$$3
2122                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2123 $as_echo "$ac_res" >&6; }
2124   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2125
2126 } # ac_fn_c_check_header_compile
2127
2128 # ac_fn_c_check_func LINENO FUNC VAR
2129 # ----------------------------------
2130 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2131 ac_fn_c_check_func ()
2132 {
2133   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2134   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2135 $as_echo_n "checking for $2... " >&6; }
2136 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2137   $as_echo_n "(cached) " >&6
2138 else
2139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140 /* end confdefs.h.  */
2141 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2142    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2143 #define $2 innocuous_$2
2144
2145 /* System header to define __stub macros and hopefully few prototypes,
2146     which can conflict with char $2 (); below.
2147     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2148     <limits.h> exists even on freestanding compilers.  */
2149
2150 #ifdef __STDC__
2151 # include <limits.h>
2152 #else
2153 # include <assert.h>
2154 #endif
2155
2156 #undef $2
2157
2158 /* Override any GCC internal prototype to avoid an error.
2159    Use char because int might match the return type of a GCC
2160    builtin and then its argument prototype would still apply.  */
2161 #ifdef __cplusplus
2162 extern "C"
2163 #endif
2164 char $2 ();
2165 /* The GNU C library defines this for functions which it implements
2166     to always fail with ENOSYS.  Some functions are actually named
2167     something starting with __ and the normal name is an alias.  */
2168 #if defined __stub_$2 || defined __stub___$2
2169 choke me
2170 #endif
2171
2172 int
2173 main ()
2174 {
2175 return $2 ();
2176   ;
2177   return 0;
2178 }
2179 _ACEOF
2180 if ac_fn_c_try_link "$LINENO"; then :
2181   eval "$3=yes"
2182 else
2183   eval "$3=no"
2184 fi
2185 rm -f core conftest.err conftest.$ac_objext \
2186     conftest$ac_exeext conftest.$ac_ext
2187 fi
2188 eval ac_res=\$$3
2189                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2190 $as_echo "$ac_res" >&6; }
2191   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2192
2193 } # ac_fn_c_check_func
2194
2195 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2196 # -------------------------------------------
2197 # Tests whether TYPE exists after having included INCLUDES, setting cache
2198 # variable VAR accordingly.
2199 ac_fn_c_check_type ()
2200 {
2201   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2202   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2203 $as_echo_n "checking for $2... " >&6; }
2204 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2205   $as_echo_n "(cached) " >&6
2206 else
2207   eval "$3=no"
2208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2209 /* end confdefs.h.  */
2210 $4
2211 int
2212 main ()
2213 {
2214 if (sizeof ($2))
2215          return 0;
2216   ;
2217   return 0;
2218 }
2219 _ACEOF
2220 if ac_fn_c_try_compile "$LINENO"; then :
2221   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2222 /* end confdefs.h.  */
2223 $4
2224 int
2225 main ()
2226 {
2227 if (sizeof (($2)))
2228             return 0;
2229   ;
2230   return 0;
2231 }
2232 _ACEOF
2233 if ac_fn_c_try_compile "$LINENO"; then :
2234
2235 else
2236   eval "$3=yes"
2237 fi
2238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2239 fi
2240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2241 fi
2242 eval ac_res=\$$3
2243                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2244 $as_echo "$ac_res" >&6; }
2245   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2246
2247 } # ac_fn_c_check_type
2248
2249 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2250 # ----------------------------------------------------
2251 # Tries to find if the field MEMBER exists in type AGGR, after including
2252 # INCLUDES, setting cache variable VAR accordingly.
2253 ac_fn_c_check_member ()
2254 {
2255   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2257 $as_echo_n "checking for $2.$3... " >&6; }
2258 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2259   $as_echo_n "(cached) " >&6
2260 else
2261   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262 /* end confdefs.h.  */
2263 $5
2264 int
2265 main ()
2266 {
2267 static $2 ac_aggr;
2268 if (ac_aggr.$3)
2269 return 0;
2270   ;
2271   return 0;
2272 }
2273 _ACEOF
2274 if ac_fn_c_try_compile "$LINENO"; then :
2275   eval "$4=yes"
2276 else
2277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278 /* end confdefs.h.  */
2279 $5
2280 int
2281 main ()
2282 {
2283 static $2 ac_aggr;
2284 if (sizeof ac_aggr.$3)
2285 return 0;
2286   ;
2287   return 0;
2288 }
2289 _ACEOF
2290 if ac_fn_c_try_compile "$LINENO"; then :
2291   eval "$4=yes"
2292 else
2293   eval "$4=no"
2294 fi
2295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296 fi
2297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2298 fi
2299 eval ac_res=\$$4
2300                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2301 $as_echo "$ac_res" >&6; }
2302   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2303
2304 } # ac_fn_c_check_member
2305
2306 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2307 # --------------------------------------------
2308 # Tries to find the compile-time value of EXPR in a program that includes
2309 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2310 # computed
2311 ac_fn_c_compute_int ()
2312 {
2313   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2314   if test "$cross_compiling" = yes; then
2315     # Depending upon the size, compute the lo and hi bounds.
2316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2317 /* end confdefs.h.  */
2318 $4
2319 int
2320 main ()
2321 {
2322 static int test_array [1 - 2 * !(($2) >= 0)];
2323 test_array [0] = 0
2324
2325   ;
2326   return 0;
2327 }
2328 _ACEOF
2329 if ac_fn_c_try_compile "$LINENO"; then :
2330   ac_lo=0 ac_mid=0
2331   while :; do
2332     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333 /* end confdefs.h.  */
2334 $4
2335 int
2336 main ()
2337 {
2338 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2339 test_array [0] = 0
2340
2341   ;
2342   return 0;
2343 }
2344 _ACEOF
2345 if ac_fn_c_try_compile "$LINENO"; then :
2346   ac_hi=$ac_mid; break
2347 else
2348   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2349                         if test $ac_lo -le $ac_mid; then
2350                           ac_lo= ac_hi=
2351                           break
2352                         fi
2353                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2354 fi
2355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2356   done
2357 else
2358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2359 /* end confdefs.h.  */
2360 $4
2361 int
2362 main ()
2363 {
2364 static int test_array [1 - 2 * !(($2) < 0)];
2365 test_array [0] = 0
2366
2367   ;
2368   return 0;
2369 }
2370 _ACEOF
2371 if ac_fn_c_try_compile "$LINENO"; then :
2372   ac_hi=-1 ac_mid=-1
2373   while :; do
2374     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2375 /* end confdefs.h.  */
2376 $4
2377 int
2378 main ()
2379 {
2380 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2381 test_array [0] = 0
2382
2383   ;
2384   return 0;
2385 }
2386 _ACEOF
2387 if ac_fn_c_try_compile "$LINENO"; then :
2388   ac_lo=$ac_mid; break
2389 else
2390   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2391                         if test $ac_mid -le $ac_hi; then
2392                           ac_lo= ac_hi=
2393                           break
2394                         fi
2395                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2396 fi
2397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2398   done
2399 else
2400   ac_lo= ac_hi=
2401 fi
2402 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403 fi
2404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405 # Binary search between lo and hi bounds.
2406 while test "x$ac_lo" != "x$ac_hi"; do
2407   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2408   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409 /* end confdefs.h.  */
2410 $4
2411 int
2412 main ()
2413 {
2414 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2415 test_array [0] = 0
2416
2417   ;
2418   return 0;
2419 }
2420 _ACEOF
2421 if ac_fn_c_try_compile "$LINENO"; then :
2422   ac_hi=$ac_mid
2423 else
2424   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2425 fi
2426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2427 done
2428 case $ac_lo in #((
2429 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2430 '') ac_retval=1 ;;
2431 esac
2432   else
2433     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434 /* end confdefs.h.  */
2435 $4
2436 static long int longval () { return $2; }
2437 static unsigned long int ulongval () { return $2; }
2438 #include <stdio.h>
2439 #include <stdlib.h>
2440 int
2441 main ()
2442 {
2443
2444   FILE *f = fopen ("conftest.val", "w");
2445   if (! f)
2446     return 1;
2447   if (($2) < 0)
2448     {
2449       long int i = longval ();
2450       if (i != ($2))
2451         return 1;
2452       fprintf (f, "%ld", i);
2453     }
2454   else
2455     {
2456       unsigned long int i = ulongval ();
2457       if (i != ($2))
2458         return 1;
2459       fprintf (f, "%lu", i);
2460     }
2461   /* Do not output a trailing newline, as this causes \r\n confusion
2462      on some platforms.  */
2463   return ferror (f) || fclose (f) != 0;
2464
2465   ;
2466   return 0;
2467 }
2468 _ACEOF
2469 if ac_fn_c_try_run "$LINENO"; then :
2470   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2471 else
2472   ac_retval=1
2473 fi
2474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2475   conftest.$ac_objext conftest.beam conftest.$ac_ext
2476 rm -f conftest.val
2477
2478   fi
2479   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2480   as_fn_set_status $ac_retval
2481
2482 } # ac_fn_c_compute_int
2483 cat >config.log <<_ACEOF
2484 This file contains any messages produced by compilers while
2485 running configure, to aid debugging if configure makes a mistake.
2486
2487 It was created by $as_me, which was
2488 generated by GNU Autoconf 2.65.  Invocation command line was
2489
2490   $ $0 $@
2491
2492 _ACEOF
2493 exec 5>>config.log
2494 {
2495 cat <<_ASUNAME
2496 ## --------- ##
2497 ## Platform. ##
2498 ## --------- ##
2499
2500 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2501 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2502 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2503 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2504 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2505
2506 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2507 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2508
2509 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2510 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2511 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2512 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2513 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2514 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2515 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2516
2517 _ASUNAME
2518
2519 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2520 for as_dir in $PATH
2521 do
2522   IFS=$as_save_IFS
2523   test -z "$as_dir" && as_dir=.
2524     $as_echo "PATH: $as_dir"
2525   done
2526 IFS=$as_save_IFS
2527
2528 } >&5
2529
2530 cat >&5 <<_ACEOF
2531
2532
2533 ## ----------- ##
2534 ## Core tests. ##
2535 ## ----------- ##
2536
2537 _ACEOF
2538
2539
2540 # Keep a trace of the command line.
2541 # Strip out --no-create and --no-recursion so they do not pile up.
2542 # Strip out --silent because we don't want to record it for future runs.
2543 # Also quote any args containing shell meta-characters.
2544 # Make two passes to allow for proper duplicate-argument suppression.
2545 ac_configure_args=
2546 ac_configure_args0=
2547 ac_configure_args1=
2548 ac_must_keep_next=false
2549 for ac_pass in 1 2
2550 do
2551   for ac_arg
2552   do
2553     case $ac_arg in
2554     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2555     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2556     | -silent | --silent | --silen | --sile | --sil)
2557       continue ;;
2558     *\'*)
2559       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2560     esac
2561     case $ac_pass in
2562     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2563     2)
2564       as_fn_append ac_configure_args1 " '$ac_arg'"
2565       if test $ac_must_keep_next = true; then
2566         ac_must_keep_next=false # Got value, back to normal.
2567       else
2568         case $ac_arg in
2569           *=* | --config-cache | -C | -disable-* | --disable-* \
2570           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2571           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2572           | -with-* | --with-* | -without-* | --without-* | --x)
2573             case "$ac_configure_args0 " in
2574               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2575             esac
2576             ;;
2577           -* ) ac_must_keep_next=true ;;
2578         esac
2579       fi
2580       as_fn_append ac_configure_args " '$ac_arg'"
2581       ;;
2582     esac
2583   done
2584 done
2585 { ac_configure_args0=; unset ac_configure_args0;}
2586 { ac_configure_args1=; unset ac_configure_args1;}
2587
2588 # When interrupted or exit'd, cleanup temporary files, and complete
2589 # config.log.  We remove comments because anyway the quotes in there
2590 # would cause problems or look ugly.
2591 # WARNING: Use '\'' to represent an apostrophe within the trap.
2592 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2593 trap 'exit_status=$?
2594   # Save into config.log some information that might help in debugging.
2595   {
2596     echo
2597
2598     cat <<\_ASBOX
2599 ## ---------------- ##
2600 ## Cache variables. ##
2601 ## ---------------- ##
2602 _ASBOX
2603     echo
2604     # The following way of writing the cache mishandles newlines in values,
2605 (
2606   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2607     eval ac_val=\$$ac_var
2608     case $ac_val in #(
2609     *${as_nl}*)
2610       case $ac_var in #(
2611       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2612 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2613       esac
2614       case $ac_var in #(
2615       _ | IFS | as_nl) ;; #(
2616       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2617       *) { eval $ac_var=; unset $ac_var;} ;;
2618       esac ;;
2619     esac
2620   done
2621   (set) 2>&1 |
2622     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2623     *${as_nl}ac_space=\ *)
2624       sed -n \
2625         "s/'\''/'\''\\\\'\'''\''/g;
2626           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2627       ;; #(
2628     *)
2629       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2630       ;;
2631     esac |
2632     sort
2633 )
2634     echo
2635
2636     cat <<\_ASBOX
2637 ## ----------------- ##
2638 ## Output variables. ##
2639 ## ----------------- ##
2640 _ASBOX
2641     echo
2642     for ac_var in $ac_subst_vars
2643     do
2644       eval ac_val=\$$ac_var
2645       case $ac_val in
2646       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2647       esac
2648       $as_echo "$ac_var='\''$ac_val'\''"
2649     done | sort
2650     echo
2651
2652     if test -n "$ac_subst_files"; then
2653       cat <<\_ASBOX
2654 ## ------------------- ##
2655 ## File substitutions. ##
2656 ## ------------------- ##
2657 _ASBOX
2658       echo
2659       for ac_var in $ac_subst_files
2660       do
2661         eval ac_val=\$$ac_var
2662         case $ac_val in
2663         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2664         esac
2665         $as_echo "$ac_var='\''$ac_val'\''"
2666       done | sort
2667       echo
2668     fi
2669
2670     if test -s confdefs.h; then
2671       cat <<\_ASBOX
2672 ## ----------- ##
2673 ## confdefs.h. ##
2674 ## ----------- ##
2675 _ASBOX
2676       echo
2677       cat confdefs.h
2678       echo
2679     fi
2680     test "$ac_signal" != 0 &&
2681       $as_echo "$as_me: caught signal $ac_signal"
2682     $as_echo "$as_me: exit $exit_status"
2683   } >&5
2684   rm -f core *.core core.conftest.* &&
2685     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2686     exit $exit_status
2687 ' 0
2688 for ac_signal in 1 2 13 15; do
2689   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2690 done
2691 ac_signal=0
2692
2693 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2694 rm -f -r conftest* confdefs.h
2695
2696 $as_echo "/* confdefs.h */" > confdefs.h
2697
2698 # Predefined preprocessor variables.
2699
2700 cat >>confdefs.h <<_ACEOF
2701 #define PACKAGE_NAME "$PACKAGE_NAME"
2702 _ACEOF
2703
2704 cat >>confdefs.h <<_ACEOF
2705 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2706 _ACEOF
2707
2708 cat >>confdefs.h <<_ACEOF
2709 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2710 _ACEOF
2711
2712 cat >>confdefs.h <<_ACEOF
2713 #define PACKAGE_STRING "$PACKAGE_STRING"
2714 _ACEOF
2715
2716 cat >>confdefs.h <<_ACEOF
2717 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2718 _ACEOF
2719
2720 cat >>confdefs.h <<_ACEOF
2721 #define PACKAGE_URL "$PACKAGE_URL"
2722 _ACEOF
2723
2724
2725 # Let the site file select an alternate cache file if it wants to.
2726 # Prefer an explicitly selected file to automatically selected ones.
2727 ac_site_file1=NONE
2728 ac_site_file2=NONE
2729 if test -n "$CONFIG_SITE"; then
2730   ac_site_file1=$CONFIG_SITE
2731 elif test "x$prefix" != xNONE; then
2732   ac_site_file1=$prefix/share/config.site
2733   ac_site_file2=$prefix/etc/config.site
2734 else
2735   ac_site_file1=$ac_default_prefix/share/config.site
2736   ac_site_file2=$ac_default_prefix/etc/config.site
2737 fi
2738 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2739 do
2740   test "x$ac_site_file" = xNONE && continue
2741   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2742     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2743 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2744     sed 's/^/| /' "$ac_site_file" >&5
2745     . "$ac_site_file"
2746   fi
2747 done
2748
2749
2750 # Check that the precious variables saved in the cache have kept the same
2751 # value.
2752 ac_cache_corrupted=false
2753 for ac_var in $ac_precious_vars; do
2754   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2755   eval ac_new_set=\$ac_env_${ac_var}_set
2756   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2757   eval ac_new_val=\$ac_env_${ac_var}_value
2758   case $ac_old_set,$ac_new_set in
2759     set,)
2760       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2761 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2762       ac_cache_corrupted=: ;;
2763     ,set)
2764       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2765 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2766       ac_cache_corrupted=: ;;
2767     ,);;
2768     *)
2769       if test "x$ac_old_val" != "x$ac_new_val"; then
2770         # differences in whitespace do not lead to failure.
2771         ac_old_val_w=`echo x $ac_old_val`
2772         ac_new_val_w=`echo x $ac_new_val`
2773         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2774           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2775 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2776           ac_cache_corrupted=:
2777         else
2778           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2779 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2780           eval $ac_var=\$ac_old_val
2781         fi
2782         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2783 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2784         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2785 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2786       fi;;
2787   esac
2788   # Pass precious variables to config.status.
2789   if test "$ac_new_set" = set; then
2790     case $ac_new_val in
2791     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2792     *) ac_arg=$ac_var=$ac_new_val ;;
2793     esac
2794     case " $ac_configure_args " in
2795       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2796       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2797     esac
2798   fi
2799 done
2800 if $ac_cache_corrupted; then
2801   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2802 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2803   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2804 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2805   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2806 fi
2807 ## -------------------- ##
2808 ## Main body of script. ##
2809 ## -------------------- ##
2810
2811 ac_ext=c
2812 ac_cpp='$CPP $CPPFLAGS'
2813 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2814 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2815 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844 ac_aux_dir=
2845 for ac_dir in build "$srcdir"/build; do
2846   for ac_t in install-sh install.sh shtool; do
2847     if test -f "$ac_dir/$ac_t"; then
2848       ac_aux_dir=$ac_dir
2849       ac_install_sh="$ac_aux_dir/$ac_t -c"
2850       break 2
2851     fi
2852   done
2853 done
2854 if test -z "$ac_aux_dir"; then
2855   as_fn_error "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5
2856 fi
2857
2858 # These three variables are undocumented and unsupported,
2859 # and are intended to be withdrawn in a future Autoconf release.
2860 # They can cause serious problems if a builder's source tree is in a directory
2861 # whose full name contains unusual characters.
2862 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2863 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2864 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2865
2866
2867 eval `$ac_aux_dir/version.sh`
2868 if test -z "$OL_STRING"; then
2869         as_fn_error "could not determine version" "$LINENO" 5
2870 fi
2871
2872 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
2873         ac_cv_shtool="$ac_aux_dir/shtool"
2874 else
2875         as_fn_error "no shtool found in $ac_aux_dir" "$LINENO" 5
2876 fi
2877
2878 SHTOOL="$ac_cv_shtool"
2879
2880 TB="" TN=""
2881 if test -t 1; then
2882         TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
2883         TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
2884 fi
2885
2886 OPENLDAP_REPO=""
2887 if test -d $ac_aux_dir/../.git; then
2888         OPENLDAP_REPO="(from Git clone) "
2889 elif test -d $ac_aux_dir/CVS; then
2890         OPENLDAP_REPO="(from CVS checkout) "
2891 fi
2892
2893 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_REPO}..."
2894
2895 # Make sure we can run config.sub.
2896 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2897   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2898
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2900 $as_echo_n "checking build system type... " >&6; }
2901 if test "${ac_cv_build+set}" = set; then :
2902   $as_echo_n "(cached) " >&6
2903 else
2904   ac_build_alias=$build_alias
2905 test "x$ac_build_alias" = x &&
2906   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2907 test "x$ac_build_alias" = x &&
2908   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
2909 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2910   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2911
2912 fi
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2914 $as_echo "$ac_cv_build" >&6; }
2915 case $ac_cv_build in
2916 *-*-*) ;;
2917 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
2918 esac
2919 build=$ac_cv_build
2920 ac_save_IFS=$IFS; IFS='-'
2921 set x $ac_cv_build
2922 shift
2923 build_cpu=$1
2924 build_vendor=$2
2925 shift; shift
2926 # Remember, the first character of IFS is used to create $*,
2927 # except with old shells:
2928 build_os=$*
2929 IFS=$ac_save_IFS
2930 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2931
2932
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2934 $as_echo_n "checking host system type... " >&6; }
2935 if test "${ac_cv_host+set}" = set; then :
2936   $as_echo_n "(cached) " >&6
2937 else
2938   if test "x$host_alias" = x; then
2939   ac_cv_host=$ac_cv_build
2940 else
2941   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2942     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2943 fi
2944
2945 fi
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2947 $as_echo "$ac_cv_host" >&6; }
2948 case $ac_cv_host in
2949 *-*-*) ;;
2950 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
2951 esac
2952 host=$ac_cv_host
2953 ac_save_IFS=$IFS; IFS='-'
2954 set x $ac_cv_host
2955 shift
2956 host_cpu=$1
2957 host_vendor=$2
2958 shift; shift
2959 # Remember, the first character of IFS is used to create $*,
2960 # except with old shells:
2961 host_os=$*
2962 IFS=$ac_save_IFS
2963 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2964
2965
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2967 $as_echo_n "checking target system type... " >&6; }
2968 if test "${ac_cv_target+set}" = set; then :
2969   $as_echo_n "(cached) " >&6
2970 else
2971   if test "x$target_alias" = x; then
2972   ac_cv_target=$ac_cv_host
2973 else
2974   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2975     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2976 fi
2977
2978 fi
2979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2980 $as_echo "$ac_cv_target" >&6; }
2981 case $ac_cv_target in
2982 *-*-*) ;;
2983 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
2984 esac
2985 target=$ac_cv_target
2986 ac_save_IFS=$IFS; IFS='-'
2987 set x $ac_cv_target
2988 shift
2989 target_cpu=$1
2990 target_vendor=$2
2991 shift; shift
2992 # Remember, the first character of IFS is used to create $*,
2993 # except with old shells:
2994 target_os=$*
2995 IFS=$ac_save_IFS
2996 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2997
2998
2999 # The aliases save the names the user supplied, while $host etc.
3000 # will get canonicalized.
3001 test -n "$target_alias" &&
3002   test "$program_prefix$program_suffix$program_transform_name" = \
3003     NONENONEs,x,x, &&
3004   program_prefix=${target_alias}-
3005
3006 am__api_version="1.9"
3007 # Find a good install program.  We prefer a C program (faster),
3008 # so one script is as good as another.  But avoid the broken or
3009 # incompatible versions:
3010 # SysV /etc/install, /usr/sbin/install
3011 # SunOS /usr/etc/install
3012 # IRIX /sbin/install
3013 # AIX /bin/install
3014 # AmigaOS /C/install, which installs bootblocks on floppy discs
3015 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3016 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3017 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3018 # OS/2's system install, which has a completely different semantic
3019 # ./install, which can be erroneously created by make from ./install.sh.
3020 # Reject install programs that cannot install multiple files.
3021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3022 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3023 if test -z "$INSTALL"; then
3024 if test "${ac_cv_path_install+set}" = set; then :
3025   $as_echo_n "(cached) " >&6
3026 else
3027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3028 for as_dir in $PATH
3029 do
3030   IFS=$as_save_IFS
3031   test -z "$as_dir" && as_dir=.
3032     # Account for people who put trailing slashes in PATH elements.
3033 case $as_dir/ in #((
3034   ./ | .// | /[cC]/* | \
3035   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3036   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3037   /usr/ucb/* ) ;;
3038   *)
3039     # OSF1 and SCO ODT 3.0 have their own names for install.
3040     # Don't use installbsd from OSF since it installs stuff as root
3041     # by default.
3042     for ac_prog in ginstall scoinst install; do
3043       for ac_exec_ext in '' $ac_executable_extensions; do
3044         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3045           if test $ac_prog = install &&
3046             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3047             # AIX install.  It has an incompatible calling convention.
3048             :
3049           elif test $ac_prog = install &&
3050             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3051             # program-specific install script used by HP pwplus--don't use.
3052             :
3053           else
3054             rm -rf conftest.one conftest.two conftest.dir
3055             echo one > conftest.one
3056             echo two > conftest.two
3057             mkdir conftest.dir
3058             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3059               test -s conftest.one && test -s conftest.two &&
3060               test -s conftest.dir/conftest.one &&
3061               test -s conftest.dir/conftest.two
3062             then
3063               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3064               break 3
3065             fi
3066           fi
3067         fi
3068       done
3069     done
3070     ;;
3071 esac
3072
3073   done
3074 IFS=$as_save_IFS
3075
3076 rm -rf conftest.one conftest.two conftest.dir
3077
3078 fi
3079   if test "${ac_cv_path_install+set}" = set; then
3080     INSTALL=$ac_cv_path_install
3081   else
3082     # As a last resort, use the slow shell script.  Don't cache a
3083     # value for INSTALL within a source directory, because that will
3084     # break other packages using the cache if that directory is
3085     # removed, or if the value is a relative name.
3086     INSTALL=$ac_install_sh
3087   fi
3088 fi
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3090 $as_echo "$INSTALL" >&6; }
3091
3092 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3093 # It thinks the first close brace ends the variable substitution.
3094 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3095
3096 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3097
3098 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3099
3100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3101 $as_echo_n "checking whether build environment is sane... " >&6; }
3102 # Just in case
3103 sleep 1
3104 echo timestamp > conftest.file
3105 # Do `set' in a subshell so we don't clobber the current shell's
3106 # arguments.  Must try -L first in case configure is actually a
3107 # symlink; some systems play weird games with the mod time of symlinks
3108 # (eg FreeBSD returns the mod time of the symlink's containing
3109 # directory).
3110 if (
3111    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
3112    if test "$*" = "X"; then
3113       # -L didn't work.
3114       set X `ls -t $srcdir/configure conftest.file`
3115    fi
3116    rm -f conftest.file
3117    if test "$*" != "X $srcdir/configure conftest.file" \
3118       && test "$*" != "X conftest.file $srcdir/configure"; then
3119
3120       # If neither matched, then we have a broken ls.  This can happen
3121       # if, for instance, CONFIG_SHELL is bash and it inherits a
3122       # broken ls alias from the environment.  This has actually
3123       # happened.  Such a system could not be considered "sane".
3124       as_fn_error "ls -t appears to fail.  Make sure there is not a broken
3125 alias in your environment" "$LINENO" 5
3126    fi
3127
3128    test "$2" = conftest.file
3129    )
3130 then
3131    # Ok.
3132    :
3133 else
3134    as_fn_error "newly created file is older than distributed files!
3135 Check your system clock" "$LINENO" 5
3136 fi
3137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3138 $as_echo "yes" >&6; }
3139 test "$program_prefix" != NONE &&
3140   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3141 # Use a double $ so make ignores it.
3142 test "$program_suffix" != NONE &&
3143   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3144 # Double any \ or $.
3145 # By default was `s,x,x', remove it if useless.
3146 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3147 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3148
3149 # expand $ac_aux_dir to an absolute path
3150 am_aux_dir=`cd $ac_aux_dir && pwd`
3151
3152 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3153 # Use eval to expand $SHELL
3154 if eval "$MISSING --run true"; then
3155   am_missing_run="$MISSING --run "
3156 else
3157   am_missing_run=
3158   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3159 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3160 fi
3161
3162 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
3163   # We used to keeping the `.' as first argument, in order to
3164   # allow $(mkdir_p) to be used without argument.  As in
3165   #   $(mkdir_p) $(somedir)
3166   # where $(somedir) is conditionally defined.  However this is wrong
3167   # for two reasons:
3168   #  1. if the package is installed by a user who cannot write `.'
3169   #     make install will fail,
3170   #  2. the above comment should most certainly read
3171   #     $(mkdir_p) $(DESTDIR)$(somedir)
3172   #     so it does not work when $(somedir) is undefined and
3173   #     $(DESTDIR) is not.
3174   #  To support the latter case, we have to write
3175   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
3176   #  so the `.' trick is pointless.
3177   mkdir_p='mkdir -p --'
3178 else
3179   # On NextStep and OpenStep, the `mkdir' command does not
3180   # recognize any option.  It will interpret all options as
3181   # directories to create, and then abort because `.' already
3182   # exists.
3183   for d in ./-p ./--version;
3184   do
3185     test -d $d && rmdir $d
3186   done
3187   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
3188   if test -f "$ac_aux_dir/mkinstalldirs"; then
3189     mkdir_p='$(mkinstalldirs)'
3190   else
3191     mkdir_p='$(install_sh) -d'
3192   fi
3193 fi
3194
3195 for ac_prog in gawk mawk nawk awk
3196 do
3197   # Extract the first word of "$ac_prog", so it can be a program name with args.
3198 set dummy $ac_prog; ac_word=$2
3199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3200 $as_echo_n "checking for $ac_word... " >&6; }
3201 if test "${ac_cv_prog_AWK+set}" = set; then :
3202   $as_echo_n "(cached) " >&6
3203 else
3204   if test -n "$AWK"; then
3205   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3206 else
3207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3208 for as_dir in $PATH
3209 do
3210   IFS=$as_save_IFS
3211   test -z "$as_dir" && as_dir=.
3212     for ac_exec_ext in '' $ac_executable_extensions; do
3213   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3214     ac_cv_prog_AWK="$ac_prog"
3215     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3216     break 2
3217   fi
3218 done
3219   done
3220 IFS=$as_save_IFS
3221
3222 fi
3223 fi
3224 AWK=$ac_cv_prog_AWK
3225 if test -n "$AWK"; then
3226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3227 $as_echo "$AWK" >&6; }
3228 else
3229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3230 $as_echo "no" >&6; }
3231 fi
3232
3233
3234   test -n "$AWK" && break
3235 done
3236
3237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3238 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3239 set x ${MAKE-make}
3240 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3241 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3242   $as_echo_n "(cached) " >&6
3243 else
3244   cat >conftest.make <<\_ACEOF
3245 SHELL = /bin/sh
3246 all:
3247         @echo '@@@%%%=$(MAKE)=@@@%%%'
3248 _ACEOF
3249 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3250 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3251   *@@@%%%=?*=@@@%%%*)
3252     eval ac_cv_prog_make_${ac_make}_set=yes;;
3253   *)
3254     eval ac_cv_prog_make_${ac_make}_set=no;;
3255 esac
3256 rm -f conftest.make
3257 fi
3258 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3260 $as_echo "yes" >&6; }
3261   SET_MAKE=
3262 else
3263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3264 $as_echo "no" >&6; }
3265   SET_MAKE="MAKE=${MAKE-make}"
3266 fi
3267
3268 rm -rf .tst 2>/dev/null
3269 mkdir .tst 2>/dev/null
3270 if test -d .tst; then
3271   am__leading_dot=.
3272 else
3273   am__leading_dot=_
3274 fi
3275 rmdir .tst 2>/dev/null
3276
3277 # test to see if srcdir already configured
3278 if test "`cd $srcdir && pwd`" != "`pwd`" &&
3279    test -f $srcdir/config.status; then
3280   as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3281 fi
3282
3283 # test whether we have cygpath
3284 if test -z "$CYGPATH_W"; then
3285   if (cygpath --version) >/dev/null 2>/dev/null; then
3286     CYGPATH_W='cygpath -w'
3287   else
3288     CYGPATH_W=echo
3289   fi
3290 fi
3291
3292
3293 # Define the identity of the package.
3294  PACKAGE=$OL_PACKAGE
3295  VERSION=$OL_VERSION
3296
3297
3298 # Some tools Automake needs.
3299
3300 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3301
3302
3303 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3304
3305
3306 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3307
3308
3309 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3310
3311
3312 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3313
3314 install_sh=${install_sh-"$am_aux_dir/install-sh"}
3315
3316 # Installed binaries are usually stripped using `strip' when the user
3317 # run `make install-strip'.  However `strip' might not be the right
3318 # tool to use in cross-compilation environments, therefore Automake
3319 # will honor the `STRIP' environment variable to overrule this program.
3320 if test "$cross_compiling" != no; then
3321   if test -n "$ac_tool_prefix"; then
3322   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3323 set dummy ${ac_tool_prefix}strip; ac_word=$2
3324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3325 $as_echo_n "checking for $ac_word... " >&6; }
3326 if test "${ac_cv_prog_STRIP+set}" = set; then :
3327   $as_echo_n "(cached) " >&6
3328 else
3329   if test -n "$STRIP"; then
3330   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3331 else
3332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3333 for as_dir in $PATH
3334 do
3335   IFS=$as_save_IFS
3336   test -z "$as_dir" && as_dir=.
3337     for ac_exec_ext in '' $ac_executable_extensions; do
3338   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3339     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3341     break 2
3342   fi
3343 done
3344   done
3345 IFS=$as_save_IFS
3346
3347 fi
3348 fi
3349 STRIP=$ac_cv_prog_STRIP
3350 if test -n "$STRIP"; then
3351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3352 $as_echo "$STRIP" >&6; }
3353 else
3354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3355 $as_echo "no" >&6; }
3356 fi
3357
3358
3359 fi
3360 if test -z "$ac_cv_prog_STRIP"; then
3361   ac_ct_STRIP=$STRIP
3362   # Extract the first word of "strip", so it can be a program name with args.
3363 set dummy strip; ac_word=$2
3364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3365 $as_echo_n "checking for $ac_word... " >&6; }
3366 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3367   $as_echo_n "(cached) " >&6
3368 else
3369   if test -n "$ac_ct_STRIP"; then
3370   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3371 else
3372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3373 for as_dir in $PATH
3374 do
3375   IFS=$as_save_IFS
3376   test -z "$as_dir" && as_dir=.
3377     for ac_exec_ext in '' $ac_executable_extensions; do
3378   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3379     ac_cv_prog_ac_ct_STRIP="strip"
3380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3381     break 2
3382   fi
3383 done
3384   done
3385 IFS=$as_save_IFS
3386
3387 fi
3388 fi
3389 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3390 if test -n "$ac_ct_STRIP"; then
3391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3392 $as_echo "$ac_ct_STRIP" >&6; }
3393 else
3394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3395 $as_echo "no" >&6; }
3396 fi
3397
3398   if test "x$ac_ct_STRIP" = x; then
3399     STRIP=":"
3400   else
3401     case $cross_compiling:$ac_tool_warned in
3402 yes:)
3403 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3404 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3405 ac_tool_warned=yes ;;
3406 esac
3407     STRIP=$ac_ct_STRIP
3408   fi
3409 else
3410   STRIP="$ac_cv_prog_STRIP"
3411 fi
3412
3413 fi
3414 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
3415
3416 # We need awk for the "check" target.  The system "awk" is bad on
3417 # some platforms.
3418 # Always define AMTAR for backward compatibility.
3419
3420 AMTAR=${AMTAR-"${am_missing_run}tar"}
3421
3422 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3423
3424
3425
3426
3427
3428 cat >>confdefs.h <<_ACEOF
3429 #define OPENLDAP_PACKAGE "$PACKAGE"
3430 _ACEOF
3431
3432
3433 cat >>confdefs.h <<_ACEOF
3434 #define OPENLDAP_VERSION "$VERSION"
3435 _ACEOF
3436
3437
3438
3439 cat >>confdefs.h <<_ACEOF
3440 #define LDAP_VENDOR_VERSION $OL_API_INC
3441 _ACEOF
3442
3443
3444 cat >>confdefs.h <<_ACEOF
3445 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
3446 _ACEOF
3447
3448
3449 cat >>confdefs.h <<_ACEOF
3450 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
3451 _ACEOF
3452
3453
3454 cat >>confdefs.h <<_ACEOF
3455 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
3456 _ACEOF
3457
3458
3459 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
3460
3461 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
3462
3463 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
3464
3465
3466
3467
3468
3469 ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
3470
3471 ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
3472
3473 ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
3474
3475
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking configure arguments" >&5
3477 $as_echo_n "checking configure arguments... " >&6; }
3478
3479
3480 top_builddir=`pwd`
3481
3482 ldap_subdir="/openldap"
3483
3484
3485 # Check whether --with-subdir was given.
3486 if test "${with_subdir+set}" = set; then :
3487   withval=$with_subdir; case "$withval" in
3488         no) ldap_subdir=""
3489                 ;;
3490         yes)
3491                 ;;
3492         /*|\\*)
3493                 ldap_subdir="$withval"
3494                 ;;
3495         *)
3496                 ldap_subdir="/$withval"
3497                 ;;
3498 esac
3499
3500 fi
3501
3502
3503 # OpenLDAP --enable-debug
3504
3505         # Check whether --enable-debug was given.
3506 if test "${enable_debug+set}" = set; then :
3507   enableval=$enable_debug;
3508         ol_arg=invalid
3509         for ol_val in no yes traditional ; do
3510                 if test "$enableval" = "$ol_val" ; then
3511                         ol_arg="$ol_val"
3512                 fi
3513         done
3514         if test "$ol_arg" = "invalid" ; then
3515                 as_fn_error "bad value $enableval for --enable-debug" "$LINENO" 5
3516         fi
3517         ol_enable_debug="$ol_arg"
3518
3519 else
3520         ol_enable_debug=yes
3521 fi
3522
3523 # end --enable-debug
3524 # OpenLDAP --enable-dynamic
3525
3526         # Check whether --enable-dynamic was given.
3527 if test "${enable_dynamic+set}" = set; then :
3528   enableval=$enable_dynamic;
3529         ol_arg=invalid
3530         for ol_val in auto yes no ; do
3531                 if test "$enableval" = "$ol_val" ; then
3532                         ol_arg="$ol_val"
3533                 fi
3534         done
3535         if test "$ol_arg" = "invalid" ; then
3536                 as_fn_error "bad value $enableval for --enable-dynamic" "$LINENO" 5
3537         fi
3538         ol_enable_dynamic="$ol_arg"
3539
3540 else
3541         ol_enable_dynamic=no
3542 fi
3543
3544 # end --enable-dynamic
3545 # OpenLDAP --enable-syslog
3546
3547         # Check whether --enable-syslog was given.
3548 if test "${enable_syslog+set}" = set; then :
3549   enableval=$enable_syslog;
3550         ol_arg=invalid
3551         for ol_val in auto yes no ; do
3552                 if test "$enableval" = "$ol_val" ; then
3553                         ol_arg="$ol_val"
3554                 fi
3555         done
3556         if test "$ol_arg" = "invalid" ; then
3557                 as_fn_error "bad value $enableval for --enable-syslog" "$LINENO" 5
3558         fi
3559         ol_enable_syslog="$ol_arg"
3560
3561 else
3562         ol_enable_syslog=auto
3563 fi
3564
3565 # end --enable-syslog
3566 # OpenLDAP --enable-proctitle
3567
3568         # Check whether --enable-proctitle was given.
3569 if test "${enable_proctitle+set}" = set; then :
3570   enableval=$enable_proctitle;
3571         ol_arg=invalid
3572         for ol_val in auto yes no ; do
3573                 if test "$enableval" = "$ol_val" ; then
3574                         ol_arg="$ol_val"
3575                 fi
3576         done
3577         if test "$ol_arg" = "invalid" ; then
3578                 as_fn_error "bad value $enableval for --enable-proctitle" "$LINENO" 5
3579         fi
3580         ol_enable_proctitle="$ol_arg"
3581
3582 else
3583         ol_enable_proctitle=yes
3584 fi
3585
3586 # end --enable-proctitle
3587 ol_enable_referrals=${ol_enable_referrals-no}
3588 # OpenLDAP --enable-ipv6
3589
3590         # Check whether --enable-ipv6 was given.
3591 if test "${enable_ipv6+set}" = set; then :
3592   enableval=$enable_ipv6;
3593         ol_arg=invalid
3594         for ol_val in auto yes no ; do
3595                 if test "$enableval" = "$ol_val" ; then
3596                         ol_arg="$ol_val"
3597                 fi
3598         done
3599         if test "$ol_arg" = "invalid" ; then
3600                 as_fn_error "bad value $enableval for --enable-ipv6" "$LINENO" 5
3601         fi
3602         ol_enable_ipv6="$ol_arg"
3603
3604 else
3605         ol_enable_ipv6=auto
3606 fi
3607
3608 # end --enable-ipv6
3609 # OpenLDAP --enable-local
3610
3611         # Check whether --enable-local was given.
3612 if test "${enable_local+set}" = set; then :
3613   enableval=$enable_local;
3614         ol_arg=invalid
3615         for ol_val in auto yes no ; do
3616                 if test "$enableval" = "$ol_val" ; then
3617                         ol_arg="$ol_val"
3618                 fi
3619         done
3620         if test "$ol_arg" = "invalid" ; then
3621                 as_fn_error "bad value $enableval for --enable-local" "$LINENO" 5
3622         fi
3623         ol_enable_local="$ol_arg"
3624
3625 else
3626         ol_enable_local=auto
3627 fi
3628
3629 # end --enable-local
3630
3631 # OpenLDAP --with-cyrus_sasl
3632
3633 # Check whether --with-cyrus_sasl was given.
3634 if test "${with_cyrus_sasl+set}" = set; then :
3635   withval=$with_cyrus_sasl;
3636         ol_arg=invalid
3637         for ol_val in auto yes no  ; do
3638                 if test "$withval" = "$ol_val" ; then
3639                         ol_arg="$ol_val"
3640                 fi
3641         done
3642         if test "$ol_arg" = "invalid" ; then
3643                 as_fn_error "bad value $withval for --with-cyrus_sasl" "$LINENO" 5
3644         fi
3645         ol_with_cyrus_sasl="$ol_arg"
3646
3647 else
3648         ol_with_cyrus_sasl="auto"
3649 fi
3650 # end --with-cyrus_sasl
3651
3652 # OpenLDAP --with-fetch
3653
3654 # Check whether --with-fetch was given.
3655 if test "${with_fetch+set}" = set; then :
3656   withval=$with_fetch;
3657         ol_arg=invalid
3658         for ol_val in auto yes no  ; do
3659                 if test "$withval" = "$ol_val" ; then
3660                         ol_arg="$ol_val"
3661                 fi
3662         done
3663         if test "$ol_arg" = "invalid" ; then
3664                 as_fn_error "bad value $withval for --with-fetch" "$LINENO" 5
3665         fi
3666         ol_with_fetch="$ol_arg"
3667
3668 else
3669         ol_with_fetch="auto"
3670 fi
3671 # end --with-fetch
3672
3673 # OpenLDAP --with-threads
3674
3675 # Check whether --with-threads was given.
3676 if test "${with_threads+set}" = set; then :
3677   withval=$with_threads;
3678         ol_arg=invalid
3679         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
3680                 if test "$withval" = "$ol_val" ; then
3681                         ol_arg="$ol_val"
3682                 fi
3683         done
3684         if test "$ol_arg" = "invalid" ; then
3685                 as_fn_error "bad value $withval for --with-threads" "$LINENO" 5
3686         fi
3687         ol_with_threads="$ol_arg"
3688
3689 else
3690         ol_with_threads="auto"
3691 fi
3692 # end --with-threads
3693
3694 # OpenLDAP --with-tls
3695
3696 # Check whether --with-tls was given.
3697 if test "${with_tls+set}" = set; then :
3698   withval=$with_tls;
3699         ol_arg=invalid
3700         for ol_val in auto openssl gnutls moznss yes no  ; do
3701                 if test "$withval" = "$ol_val" ; then
3702                         ol_arg="$ol_val"
3703                 fi
3704         done
3705         if test "$ol_arg" = "invalid" ; then
3706                 as_fn_error "bad value $withval for --with-tls" "$LINENO" 5
3707         fi
3708         ol_with_tls="$ol_arg"
3709
3710 else
3711         ol_with_tls="auto"
3712 fi
3713 # end --with-tls
3714
3715 # OpenLDAP --with-yielding_select
3716
3717 # Check whether --with-yielding_select was given.
3718 if test "${with_yielding_select+set}" = set; then :
3719   withval=$with_yielding_select;
3720         ol_arg=invalid
3721         for ol_val in auto yes no manual  ; do
3722                 if test "$withval" = "$ol_val" ; then
3723                         ol_arg="$ol_val"
3724                 fi
3725         done
3726         if test "$ol_arg" = "invalid" ; then
3727                 as_fn_error "bad value $withval for --with-yielding_select" "$LINENO" 5
3728         fi
3729         ol_with_yielding_select="$ol_arg"
3730
3731 else
3732         ol_with_yielding_select="auto"
3733 fi
3734 # end --with-yielding_select
3735
3736 # OpenLDAP --with-mp
3737
3738 # Check whether --with-mp was given.
3739 if test "${with_mp+set}" = set; then :
3740   withval=$with_mp;
3741         ol_arg=invalid
3742         for ol_val in auto longlong long bignum gmp yes no ; do
3743                 if test "$withval" = "$ol_val" ; then
3744                         ol_arg="$ol_val"
3745                 fi
3746         done
3747         if test "$ol_arg" = "invalid" ; then
3748                 as_fn_error "bad value $withval for --with-mp" "$LINENO" 5
3749         fi
3750         ol_with_mp="$ol_arg"
3751
3752 else
3753         ol_with_mp="auto"
3754 fi
3755 # end --with-mp
3756
3757 # OpenLDAP --with-odbc
3758
3759 # Check whether --with-odbc was given.
3760 if test "${with_odbc+set}" = set; then :
3761   withval=$with_odbc;
3762         ol_arg=invalid
3763         for ol_val in auto iodbc unixodbc odbc32  ; do
3764                 if test "$withval" = "$ol_val" ; then
3765                         ol_arg="$ol_val"
3766                 fi
3767         done
3768         if test "$ol_arg" = "invalid" ; then
3769                 as_fn_error "bad value $withval for --with-odbc" "$LINENO" 5
3770         fi
3771         ol_with_odbc="$ol_arg"
3772
3773 else
3774         ol_with_odbc="auto"
3775 fi
3776 # end --with-odbc
3777
3778
3779
3780 # Check whether --enable-xxslapdoptions was given.
3781 if test "${enable_xxslapdoptions+set}" = set; then :
3782   enableval=$enable_xxslapdoptions;
3783 fi
3784
3785 # OpenLDAP --enable-slapd
3786
3787         # Check whether --enable-slapd was given.
3788 if test "${enable_slapd+set}" = set; then :
3789   enableval=$enable_slapd;
3790         ol_arg=invalid
3791         for ol_val in auto yes no ; do
3792                 if test "$enableval" = "$ol_val" ; then
3793                         ol_arg="$ol_val"
3794                 fi
3795         done
3796         if test "$ol_arg" = "invalid" ; then
3797                 as_fn_error "bad value $enableval for --enable-slapd" "$LINENO" 5
3798         fi
3799         ol_enable_slapd="$ol_arg"
3800
3801 else
3802         ol_enable_slapd=yes
3803 fi
3804
3805 # end --enable-slapd
3806 # OpenLDAP --enable-dynacl
3807
3808         # Check whether --enable-dynacl was given.
3809 if test "${enable_dynacl+set}" = set; then :
3810   enableval=$enable_dynacl;
3811         ol_arg=invalid
3812         for ol_val in auto yes no ; do
3813                 if test "$enableval" = "$ol_val" ; then
3814                         ol_arg="$ol_val"
3815                 fi
3816         done
3817         if test "$ol_arg" = "invalid" ; then
3818                 as_fn_error "bad value $enableval for --enable-dynacl" "$LINENO" 5
3819         fi
3820         ol_enable_dynacl="$ol_arg"
3821
3822 else
3823         ol_enable_dynacl=no
3824 fi
3825
3826 # end --enable-dynacl
3827 # OpenLDAP --enable-aci
3828
3829         # Check whether --enable-aci was given.
3830 if test "${enable_aci+set}" = set; then :
3831   enableval=$enable_aci;
3832         ol_arg=invalid
3833         for ol_val in no yes mod ; do
3834                 if test "$enableval" = "$ol_val" ; then
3835                         ol_arg="$ol_val"
3836                 fi
3837         done
3838         if test "$ol_arg" = "invalid" ; then
3839                 as_fn_error "bad value $enableval for --enable-aci" "$LINENO" 5
3840         fi
3841         ol_enable_aci="$ol_arg"
3842
3843 else
3844         ol_enable_aci=no
3845 fi
3846
3847 # end --enable-aci
3848 # OpenLDAP --enable-cleartext
3849
3850         # Check whether --enable-cleartext was given.
3851 if test "${enable_cleartext+set}" = set; then :
3852   enableval=$enable_cleartext;
3853         ol_arg=invalid
3854         for ol_val in auto yes no ; do
3855                 if test "$enableval" = "$ol_val" ; then
3856                         ol_arg="$ol_val"
3857                 fi
3858         done
3859         if test "$ol_arg" = "invalid" ; then
3860                 as_fn_error "bad value $enableval for --enable-cleartext" "$LINENO" 5
3861         fi
3862         ol_enable_cleartext="$ol_arg"
3863
3864 else
3865         ol_enable_cleartext=yes
3866 fi
3867
3868 # end --enable-cleartext
3869 # OpenLDAP --enable-crypt
3870
3871         # Check whether --enable-crypt was given.
3872 if test "${enable_crypt+set}" = set; then :
3873   enableval=$enable_crypt;
3874         ol_arg=invalid
3875         for ol_val in auto yes no ; do
3876                 if test "$enableval" = "$ol_val" ; then
3877                         ol_arg="$ol_val"
3878                 fi
3879         done
3880         if test "$ol_arg" = "invalid" ; then
3881                 as_fn_error "bad value $enableval for --enable-crypt" "$LINENO" 5
3882         fi
3883         ol_enable_crypt="$ol_arg"
3884
3885 else
3886         ol_enable_crypt=no
3887 fi
3888
3889 # end --enable-crypt
3890 # OpenLDAP --enable-lmpasswd
3891
3892         # Check whether --enable-lmpasswd was given.
3893 if test "${enable_lmpasswd+set}" = set; then :
3894   enableval=$enable_lmpasswd;
3895         ol_arg=invalid
3896         for ol_val in auto yes no ; do
3897                 if test "$enableval" = "$ol_val" ; then
3898                         ol_arg="$ol_val"
3899                 fi
3900         done
3901         if test "$ol_arg" = "invalid" ; then
3902                 as_fn_error "bad value $enableval for --enable-lmpasswd" "$LINENO" 5
3903         fi
3904         ol_enable_lmpasswd="$ol_arg"
3905
3906 else
3907         ol_enable_lmpasswd=no
3908 fi
3909
3910 # end --enable-lmpasswd
3911 # OpenLDAP --enable-spasswd
3912
3913         # Check whether --enable-spasswd was given.
3914 if test "${enable_spasswd+set}" = set; then :
3915   enableval=$enable_spasswd;
3916         ol_arg=invalid
3917         for ol_val in auto yes no ; do
3918                 if test "$enableval" = "$ol_val" ; then
3919                         ol_arg="$ol_val"
3920                 fi
3921         done
3922         if test "$ol_arg" = "invalid" ; then
3923                 as_fn_error "bad value $enableval for --enable-spasswd" "$LINENO" 5
3924         fi
3925         ol_enable_spasswd="$ol_arg"
3926
3927 else
3928         ol_enable_spasswd=no
3929 fi
3930
3931 # end --enable-spasswd
3932 # OpenLDAP --enable-modules
3933
3934         # Check whether --enable-modules was given.
3935 if test "${enable_modules+set}" = set; then :
3936   enableval=$enable_modules;
3937         ol_arg=invalid
3938         for ol_val in auto yes no ; do
3939                 if test "$enableval" = "$ol_val" ; then
3940                         ol_arg="$ol_val"
3941                 fi
3942         done
3943         if test "$ol_arg" = "invalid" ; then
3944                 as_fn_error "bad value $enableval for --enable-modules" "$LINENO" 5
3945         fi
3946         ol_enable_modules="$ol_arg"
3947
3948 else
3949         ol_enable_modules=no
3950 fi
3951
3952 # end --enable-modules
3953 # OpenLDAP --enable-rewrite
3954
3955         # Check whether --enable-rewrite was given.
3956 if test "${enable_rewrite+set}" = set; then :
3957   enableval=$enable_rewrite;
3958         ol_arg=invalid
3959         for ol_val in auto yes no ; do
3960                 if test "$enableval" = "$ol_val" ; then
3961                         ol_arg="$ol_val"
3962                 fi
3963         done
3964         if test "$ol_arg" = "invalid" ; then
3965                 as_fn_error "bad value $enableval for --enable-rewrite" "$LINENO" 5
3966         fi
3967         ol_enable_rewrite="$ol_arg"
3968
3969 else
3970         ol_enable_rewrite=auto
3971 fi
3972
3973 # end --enable-rewrite
3974 # OpenLDAP --enable-rlookups
3975
3976         # Check whether --enable-rlookups was given.
3977 if test "${enable_rlookups+set}" = set; then :
3978   enableval=$enable_rlookups;
3979         ol_arg=invalid
3980         for ol_val in auto yes no ; do
3981                 if test "$enableval" = "$ol_val" ; then
3982                         ol_arg="$ol_val"
3983                 fi
3984         done
3985         if test "$ol_arg" = "invalid" ; then
3986                 as_fn_error "bad value $enableval for --enable-rlookups" "$LINENO" 5
3987         fi
3988         ol_enable_rlookups="$ol_arg"
3989
3990 else
3991         ol_enable_rlookups=no
3992 fi
3993
3994 # end --enable-rlookups
3995 # OpenLDAP --enable-slapi
3996
3997         # Check whether --enable-slapi was given.
3998 if test "${enable_slapi+set}" = set; then :
3999   enableval=$enable_slapi;
4000         ol_arg=invalid
4001         for ol_val in auto yes no ; do
4002                 if test "$enableval" = "$ol_val" ; then
4003                         ol_arg="$ol_val"
4004                 fi
4005         done
4006         if test "$ol_arg" = "invalid" ; then
4007                 as_fn_error "bad value $enableval for --enable-slapi" "$LINENO" 5
4008         fi
4009         ol_enable_slapi="$ol_arg"
4010
4011 else
4012         ol_enable_slapi=no
4013 fi
4014
4015 # end --enable-slapi
4016 # OpenLDAP --enable-slp
4017
4018         # Check whether --enable-slp was given.
4019 if test "${enable_slp+set}" = set; then :
4020   enableval=$enable_slp;
4021         ol_arg=invalid
4022         for ol_val in auto yes no ; do
4023                 if test "$enableval" = "$ol_val" ; then
4024                         ol_arg="$ol_val"
4025                 fi
4026         done
4027         if test "$ol_arg" = "invalid" ; then
4028                 as_fn_error "bad value $enableval for --enable-slp" "$LINENO" 5
4029         fi
4030         ol_enable_slp="$ol_arg"
4031
4032 else
4033         ol_enable_slp=no
4034 fi
4035
4036 # end --enable-slp
4037 # OpenLDAP --enable-wrappers
4038
4039         # Check whether --enable-wrappers was given.
4040 if test "${enable_wrappers+set}" = set; then :
4041   enableval=$enable_wrappers;
4042         ol_arg=invalid
4043         for ol_val in auto yes no ; do
4044                 if test "$enableval" = "$ol_val" ; then
4045                         ol_arg="$ol_val"
4046                 fi
4047         done
4048         if test "$ol_arg" = "invalid" ; then
4049                 as_fn_error "bad value $enableval for --enable-wrappers" "$LINENO" 5
4050         fi
4051         ol_enable_wrappers="$ol_arg"
4052
4053 else
4054         ol_enable_wrappers=no
4055 fi
4056
4057 # end --enable-wrappers
4058
4059 Backends="bdb \
4060         dnssrv \
4061         hdb \
4062         ldap \
4063         mdb \
4064         meta \
4065         asyncmeta \
4066         monitor \
4067         ndb \
4068         null \
4069         passwd \
4070         perl \
4071         relay \
4072         shell \
4073         sock \
4074         sql \
4075         wt"
4076
4077 # Check whether --enable-xxslapbackends was given.
4078 if test "${enable_xxslapbackends+set}" = set; then :
4079   enableval=$enable_xxslapbackends;
4080 fi
4081
4082
4083 # OpenLDAP --enable-backends
4084
4085         # Check whether --enable-backends was given.
4086 if test "${enable_backends+set}" = set; then :
4087   enableval=$enable_backends;
4088         ol_arg=invalid
4089         for ol_val in no yes mod ; do
4090                 if test "$enableval" = "$ol_val" ; then
4091                         ol_arg="$ol_val"
4092                 fi
4093         done
4094         if test "$ol_arg" = "invalid" ; then
4095                 as_fn_error "bad value $enableval for --enable-backends" "$LINENO" 5
4096         fi
4097         ol_enable_backends="$ol_arg"
4098
4099 fi
4100
4101 # end --enable-backends
4102 # OpenLDAP --enable-bdb
4103
4104         # Check whether --enable-bdb was given.
4105 if test "${enable_bdb+set}" = set; then :
4106   enableval=$enable_bdb;
4107         ol_arg=invalid
4108         for ol_val in no yes mod ; do
4109                 if test "$enableval" = "$ol_val" ; then
4110                         ol_arg="$ol_val"
4111                 fi
4112         done
4113         if test "$ol_arg" = "invalid" ; then
4114                 as_fn_error "bad value $enableval for --enable-bdb" "$LINENO" 5
4115         fi
4116         ol_enable_bdb="$ol_arg"
4117
4118 else
4119         ol_enable_bdb=${ol_enable_backends:-no}
4120 fi
4121
4122 # end --enable-bdb
4123 # OpenLDAP --enable-dnssrv
4124
4125         # Check whether --enable-dnssrv was given.
4126 if test "${enable_dnssrv+set}" = set; then :
4127   enableval=$enable_dnssrv;
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                 as_fn_error "bad value $enableval for --enable-dnssrv" "$LINENO" 5
4136         fi
4137         ol_enable_dnssrv="$ol_arg"
4138
4139 else
4140         ol_enable_dnssrv=${ol_enable_backends:-no}
4141 fi
4142
4143 # end --enable-dnssrv
4144 # OpenLDAP --enable-hdb
4145
4146         # Check whether --enable-hdb was given.
4147 if test "${enable_hdb+set}" = set; then :
4148   enableval=$enable_hdb;
4149         ol_arg=invalid
4150         for ol_val in no yes mod ; do
4151                 if test "$enableval" = "$ol_val" ; then
4152                         ol_arg="$ol_val"
4153                 fi
4154         done
4155         if test "$ol_arg" = "invalid" ; then
4156                 as_fn_error "bad value $enableval for --enable-hdb" "$LINENO" 5
4157         fi
4158         ol_enable_hdb="$ol_arg"
4159
4160 else
4161         ol_enable_hdb=${ol_enable_backends:-no}
4162 fi
4163
4164 # end --enable-hdb
4165 # OpenLDAP --enable-ldap
4166
4167         # Check whether --enable-ldap was given.
4168 if test "${enable_ldap+set}" = set; then :
4169   enableval=$enable_ldap;
4170         ol_arg=invalid
4171         for ol_val in no yes mod ; do
4172                 if test "$enableval" = "$ol_val" ; then
4173                         ol_arg="$ol_val"
4174                 fi
4175         done
4176         if test "$ol_arg" = "invalid" ; then
4177                 as_fn_error "bad value $enableval for --enable-ldap" "$LINENO" 5
4178         fi
4179         ol_enable_ldap="$ol_arg"
4180
4181 else
4182         ol_enable_ldap=${ol_enable_backends:-no}
4183 fi
4184
4185 # end --enable-ldap
4186 # OpenLDAP --enable-mdb
4187
4188         # Check whether --enable-mdb was given.
4189 if test "${enable_mdb+set}" = set; then :
4190   enableval=$enable_mdb;
4191         ol_arg=invalid
4192         for ol_val in no yes mod ; do
4193                 if test "$enableval" = "$ol_val" ; then
4194                         ol_arg="$ol_val"
4195                 fi
4196         done
4197         if test "$ol_arg" = "invalid" ; then
4198                 as_fn_error "bad value $enableval for --enable-mdb" "$LINENO" 5
4199         fi
4200         ol_enable_mdb="$ol_arg"
4201
4202 else
4203         ol_enable_mdb=${ol_enable_backends:-yes}
4204 fi
4205
4206 # end --enable-mdb
4207 # OpenLDAP --enable-meta
4208
4209         # Check whether --enable-meta was given.
4210 if test "${enable_meta+set}" = set; then :
4211   enableval=$enable_meta;
4212         ol_arg=invalid
4213         for ol_val in no yes mod ; do
4214                 if test "$enableval" = "$ol_val" ; then
4215                         ol_arg="$ol_val"
4216                 fi
4217         done
4218         if test "$ol_arg" = "invalid" ; then
4219                 as_fn_error "bad value $enableval for --enable-meta" "$LINENO" 5
4220         fi
4221         ol_enable_meta="$ol_arg"
4222
4223 else
4224         ol_enable_meta=${ol_enable_backends:-no}
4225 fi
4226
4227 # end --enable-meta
4228 # OpenLDAP --enable-asyncmeta
4229
4230         # Check whether --enable-asyncmeta was given.
4231 if test "${enable_asyncmeta+set}" = set; then :
4232   enableval=$enable_asyncmeta;
4233         ol_arg=invalid
4234         for ol_val in no yes mod ; do
4235                 if test "$enableval" = "$ol_val" ; then
4236                         ol_arg="$ol_val"
4237                 fi
4238         done
4239         if test "$ol_arg" = "invalid" ; then
4240                 as_fn_error "bad value $enableval for --enable-asyncmeta" "$LINENO" 5
4241         fi
4242         ol_enable_asyncmeta="$ol_arg"
4243
4244 else
4245         ol_enable_asyncmeta=${ol_enable_backends:-no}
4246 fi
4247
4248 # end --enable-asyncmeta
4249 # OpenLDAP --enable-monitor
4250
4251         # Check whether --enable-monitor was given.
4252 if test "${enable_monitor+set}" = set; then :
4253   enableval=$enable_monitor;
4254         ol_arg=invalid
4255         for ol_val in no yes mod ; do
4256                 if test "$enableval" = "$ol_val" ; then
4257                         ol_arg="$ol_val"
4258                 fi
4259         done
4260         if test "$ol_arg" = "invalid" ; then
4261                 as_fn_error "bad value $enableval for --enable-monitor" "$LINENO" 5
4262         fi
4263         ol_enable_monitor="$ol_arg"
4264
4265 else
4266         ol_enable_monitor=${ol_enable_backends:-yes}
4267 fi
4268
4269 # end --enable-monitor
4270 # OpenLDAP --enable-ndb
4271
4272         # Check whether --enable-ndb was given.
4273 if test "${enable_ndb+set}" = set; then :
4274   enableval=$enable_ndb;
4275         ol_arg=invalid
4276         for ol_val in no yes mod ; do
4277                 if test "$enableval" = "$ol_val" ; then
4278                         ol_arg="$ol_val"
4279                 fi
4280         done
4281         if test "$ol_arg" = "invalid" ; then
4282                 as_fn_error "bad value $enableval for --enable-ndb" "$LINENO" 5
4283         fi
4284         ol_enable_ndb="$ol_arg"
4285
4286 else
4287         ol_enable_ndb=${ol_enable_backends:-no}
4288 fi
4289
4290 # end --enable-ndb
4291 # OpenLDAP --enable-null
4292
4293         # Check whether --enable-null was given.
4294 if test "${enable_null+set}" = set; then :
4295   enableval=$enable_null;
4296         ol_arg=invalid
4297         for ol_val in no yes mod ; do
4298                 if test "$enableval" = "$ol_val" ; then
4299                         ol_arg="$ol_val"
4300                 fi
4301         done
4302         if test "$ol_arg" = "invalid" ; then
4303                 as_fn_error "bad value $enableval for --enable-null" "$LINENO" 5
4304         fi
4305         ol_enable_null="$ol_arg"
4306
4307 else
4308         ol_enable_null=${ol_enable_backends:-no}
4309 fi
4310
4311 # end --enable-null
4312 # OpenLDAP --enable-passwd
4313
4314         # Check whether --enable-passwd was given.
4315 if test "${enable_passwd+set}" = set; then :
4316   enableval=$enable_passwd;
4317         ol_arg=invalid
4318         for ol_val in no yes mod ; do
4319                 if test "$enableval" = "$ol_val" ; then
4320                         ol_arg="$ol_val"
4321                 fi
4322         done
4323         if test "$ol_arg" = "invalid" ; then
4324                 as_fn_error "bad value $enableval for --enable-passwd" "$LINENO" 5
4325         fi
4326         ol_enable_passwd="$ol_arg"
4327
4328 else
4329         ol_enable_passwd=${ol_enable_backends:-no}
4330 fi
4331
4332 # end --enable-passwd
4333 # OpenLDAP --enable-perl
4334
4335         # Check whether --enable-perl was given.
4336 if test "${enable_perl+set}" = set; then :
4337   enableval=$enable_perl;
4338         ol_arg=invalid
4339         for ol_val in no yes mod ; do
4340                 if test "$enableval" = "$ol_val" ; then
4341                         ol_arg="$ol_val"
4342                 fi
4343         done
4344         if test "$ol_arg" = "invalid" ; then
4345                 as_fn_error "bad value $enableval for --enable-perl" "$LINENO" 5
4346         fi
4347         ol_enable_perl="$ol_arg"
4348
4349 else
4350         ol_enable_perl=${ol_enable_backends:-no}
4351 fi
4352
4353 # end --enable-perl
4354 # OpenLDAP --enable-relay
4355
4356         # Check whether --enable-relay was given.
4357 if test "${enable_relay+set}" = set; then :
4358   enableval=$enable_relay;
4359         ol_arg=invalid
4360         for ol_val in no yes mod ; do
4361                 if test "$enableval" = "$ol_val" ; then
4362                         ol_arg="$ol_val"
4363                 fi
4364         done
4365         if test "$ol_arg" = "invalid" ; then
4366                 as_fn_error "bad value $enableval for --enable-relay" "$LINENO" 5
4367         fi
4368         ol_enable_relay="$ol_arg"
4369
4370 else
4371         ol_enable_relay=${ol_enable_backends:-yes}
4372 fi
4373
4374 # end --enable-relay
4375 # OpenLDAP --enable-shell
4376
4377         # Check whether --enable-shell was given.
4378 if test "${enable_shell+set}" = set; then :
4379   enableval=$enable_shell;
4380         ol_arg=invalid
4381         for ol_val in no yes mod ; do
4382                 if test "$enableval" = "$ol_val" ; then
4383                         ol_arg="$ol_val"
4384                 fi
4385         done
4386         if test "$ol_arg" = "invalid" ; then
4387                 as_fn_error "bad value $enableval for --enable-shell" "$LINENO" 5
4388         fi
4389         ol_enable_shell="$ol_arg"
4390
4391 else
4392         ol_enable_shell=${ol_enable_backends:-no}
4393 fi
4394
4395 # end --enable-shell
4396 # OpenLDAP --enable-sock
4397
4398         # Check whether --enable-sock was given.
4399 if test "${enable_sock+set}" = set; then :
4400   enableval=$enable_sock;
4401         ol_arg=invalid
4402         for ol_val in no yes mod ; do
4403                 if test "$enableval" = "$ol_val" ; then
4404                         ol_arg="$ol_val"
4405                 fi
4406         done
4407         if test "$ol_arg" = "invalid" ; then
4408                 as_fn_error "bad value $enableval for --enable-sock" "$LINENO" 5
4409         fi
4410         ol_enable_sock="$ol_arg"
4411
4412 else
4413         ol_enable_sock=${ol_enable_backends:-no}
4414 fi
4415
4416 # end --enable-sock
4417 # OpenLDAP --enable-sql
4418
4419         # Check whether --enable-sql was given.
4420 if test "${enable_sql+set}" = set; then :
4421   enableval=$enable_sql;
4422         ol_arg=invalid
4423         for ol_val in no yes mod ; do
4424                 if test "$enableval" = "$ol_val" ; then
4425                         ol_arg="$ol_val"
4426                 fi
4427         done
4428         if test "$ol_arg" = "invalid" ; then
4429                 as_fn_error "bad value $enableval for --enable-sql" "$LINENO" 5
4430         fi
4431         ol_enable_sql="$ol_arg"
4432
4433 else
4434         ol_enable_sql=${ol_enable_backends:-no}
4435 fi
4436
4437 # end --enable-sql
4438 # OpenLDAP --enable-wt
4439
4440         # Check whether --enable-wt was given.
4441 if test "${enable_wt+set}" = set; then :
4442   enableval=$enable_wt;
4443         ol_arg=invalid
4444         for ol_val in no yes mod ; do
4445                 if test "$enableval" = "$ol_val" ; then
4446                         ol_arg="$ol_val"
4447                 fi
4448         done
4449         if test "$ol_arg" = "invalid" ; then
4450                 as_fn_error "bad value $enableval for --enable-wt" "$LINENO" 5
4451         fi
4452         ol_enable_wt="$ol_arg"
4453
4454 else
4455         ol_enable_wt=${ol_enable_backends:-no}
4456 fi
4457
4458 # end --enable-wt
4459
4460 Overlays="accesslog \
4461         auditlog \
4462         collect \
4463         constraint \
4464         dds \
4465         deref \
4466         dyngroup \
4467         dynlist \
4468         memberof \
4469         ppolicy \
4470         proxycache \
4471         refint \
4472         retcode \
4473         rwm \
4474         seqmod \
4475         sssvlv \
4476         syncprov \
4477         translucent \
4478         unique \
4479         valsort"
4480
4481 # Check whether --enable-xxslapoverlays was given.
4482 if test "${enable_xxslapoverlays+set}" = set; then :
4483   enableval=$enable_xxslapoverlays;
4484 fi
4485
4486
4487 # OpenLDAP --enable-overlays
4488
4489         # Check whether --enable-overlays was given.
4490 if test "${enable_overlays+set}" = set; then :
4491   enableval=$enable_overlays;
4492         ol_arg=invalid
4493         for ol_val in no yes mod ; do
4494                 if test "$enableval" = "$ol_val" ; then
4495                         ol_arg="$ol_val"
4496                 fi
4497         done
4498         if test "$ol_arg" = "invalid" ; then
4499                 as_fn_error "bad value $enableval for --enable-overlays" "$LINENO" 5
4500         fi
4501         ol_enable_overlays="$ol_arg"
4502
4503 fi
4504
4505 # end --enable-overlays
4506 # OpenLDAP --enable-accesslog
4507
4508         # Check whether --enable-accesslog was given.
4509 if test "${enable_accesslog+set}" = set; then :
4510   enableval=$enable_accesslog;
4511         ol_arg=invalid
4512         for ol_val in no yes mod ; do
4513                 if test "$enableval" = "$ol_val" ; then
4514                         ol_arg="$ol_val"
4515                 fi
4516         done
4517         if test "$ol_arg" = "invalid" ; then
4518                 as_fn_error "bad value $enableval for --enable-accesslog" "$LINENO" 5
4519         fi
4520         ol_enable_accesslog="$ol_arg"
4521
4522 else
4523         ol_enable_accesslog=${ol_enable_overlays:-no}
4524 fi
4525
4526 # end --enable-accesslog
4527
4528 # OpenLDAP --enable-auditlog
4529
4530         # Check whether --enable-auditlog was given.
4531 if test "${enable_auditlog+set}" = set; then :
4532   enableval=$enable_auditlog;
4533         ol_arg=invalid
4534         for ol_val in no yes mod ; do
4535                 if test "$enableval" = "$ol_val" ; then
4536                         ol_arg="$ol_val"
4537                 fi
4538         done
4539         if test "$ol_arg" = "invalid" ; then
4540                 as_fn_error "bad value $enableval for --enable-auditlog" "$LINENO" 5
4541         fi
4542         ol_enable_auditlog="$ol_arg"
4543
4544 else
4545         ol_enable_auditlog=${ol_enable_overlays:-no}
4546 fi
4547
4548 # end --enable-auditlog
4549
4550 # OpenLDAP --enable-collect
4551
4552         # Check whether --enable-collect was given.
4553 if test "${enable_collect+set}" = set; then :
4554   enableval=$enable_collect;
4555         ol_arg=invalid
4556         for ol_val in no yes mod ; do
4557                 if test "$enableval" = "$ol_val" ; then
4558                         ol_arg="$ol_val"
4559                 fi
4560         done
4561         if test "$ol_arg" = "invalid" ; then
4562                 as_fn_error "bad value $enableval for --enable-collect" "$LINENO" 5
4563         fi
4564         ol_enable_collect="$ol_arg"
4565
4566 else
4567         ol_enable_collect=${ol_enable_overlays:-no}
4568 fi
4569
4570 # end --enable-collect
4571
4572 # OpenLDAP --enable-constraint
4573
4574         # Check whether --enable-constraint was given.
4575 if test "${enable_constraint+set}" = set; then :
4576   enableval=$enable_constraint;
4577         ol_arg=invalid
4578         for ol_val in no yes mod ; do
4579                 if test "$enableval" = "$ol_val" ; then
4580                         ol_arg="$ol_val"
4581                 fi
4582         done
4583         if test "$ol_arg" = "invalid" ; then
4584                 as_fn_error "bad value $enableval for --enable-constraint" "$LINENO" 5
4585         fi
4586         ol_enable_constraint="$ol_arg"
4587
4588 else
4589         ol_enable_constraint=${ol_enable_overlays:-no}
4590 fi
4591
4592 # end --enable-constraint
4593
4594 # OpenLDAP --enable-dds
4595
4596         # Check whether --enable-dds was given.
4597 if test "${enable_dds+set}" = set; then :
4598   enableval=$enable_dds;
4599         ol_arg=invalid
4600         for ol_val in no yes mod ; do
4601                 if test "$enableval" = "$ol_val" ; then
4602                         ol_arg="$ol_val"
4603                 fi
4604         done
4605         if test "$ol_arg" = "invalid" ; then
4606                 as_fn_error "bad value $enableval for --enable-dds" "$LINENO" 5
4607         fi
4608         ol_enable_dds="$ol_arg"
4609
4610 else
4611         ol_enable_dds=${ol_enable_overlays:-no}
4612 fi
4613
4614 # end --enable-dds
4615
4616 # OpenLDAP --enable-deref
4617
4618         # Check whether --enable-deref was given.
4619 if test "${enable_deref+set}" = set; then :
4620   enableval=$enable_deref;
4621         ol_arg=invalid
4622         for ol_val in no yes mod ; do
4623                 if test "$enableval" = "$ol_val" ; then
4624                         ol_arg="$ol_val"
4625                 fi
4626         done
4627         if test "$ol_arg" = "invalid" ; then
4628                 as_fn_error "bad value $enableval for --enable-deref" "$LINENO" 5
4629         fi
4630         ol_enable_deref="$ol_arg"
4631
4632 else
4633         ol_enable_deref=${ol_enable_overlays:-no}
4634 fi
4635
4636 # end --enable-deref
4637
4638 # OpenLDAP --enable-dyngroup
4639
4640         # Check whether --enable-dyngroup was given.
4641 if test "${enable_dyngroup+set}" = set; then :
4642   enableval=$enable_dyngroup;
4643         ol_arg=invalid
4644         for ol_val in no yes mod ; do
4645                 if test "$enableval" = "$ol_val" ; then
4646                         ol_arg="$ol_val"
4647                 fi
4648         done
4649         if test "$ol_arg" = "invalid" ; then
4650                 as_fn_error "bad value $enableval for --enable-dyngroup" "$LINENO" 5
4651         fi
4652         ol_enable_dyngroup="$ol_arg"
4653
4654 else
4655         ol_enable_dyngroup=${ol_enable_overlays:-no}
4656 fi
4657
4658 # end --enable-dyngroup
4659
4660 # OpenLDAP --enable-dynlist
4661
4662         # Check whether --enable-dynlist was given.
4663 if test "${enable_dynlist+set}" = set; then :
4664   enableval=$enable_dynlist;
4665         ol_arg=invalid
4666         for ol_val in no yes mod ; do
4667                 if test "$enableval" = "$ol_val" ; then
4668                         ol_arg="$ol_val"
4669                 fi
4670         done
4671         if test "$ol_arg" = "invalid" ; then
4672                 as_fn_error "bad value $enableval for --enable-dynlist" "$LINENO" 5
4673         fi
4674         ol_enable_dynlist="$ol_arg"
4675
4676 else
4677         ol_enable_dynlist=${ol_enable_overlays:-no}
4678 fi
4679
4680 # end --enable-dynlist
4681
4682 # OpenLDAP --enable-memberof
4683
4684         # Check whether --enable-memberof was given.
4685 if test "${enable_memberof+set}" = set; then :
4686   enableval=$enable_memberof;
4687         ol_arg=invalid
4688         for ol_val in no yes mod ; do
4689                 if test "$enableval" = "$ol_val" ; then
4690                         ol_arg="$ol_val"
4691                 fi
4692         done
4693         if test "$ol_arg" = "invalid" ; then
4694                 as_fn_error "bad value $enableval for --enable-memberof" "$LINENO" 5
4695         fi
4696         ol_enable_memberof="$ol_arg"
4697
4698 else
4699         ol_enable_memberof=${ol_enable_overlays:-no}
4700 fi
4701
4702 # end --enable-memberof
4703
4704 # OpenLDAP --enable-ppolicy
4705
4706         # Check whether --enable-ppolicy was given.
4707 if test "${enable_ppolicy+set}" = set; then :
4708   enableval=$enable_ppolicy;
4709         ol_arg=invalid
4710         for ol_val in no yes mod ; do
4711                 if test "$enableval" = "$ol_val" ; then
4712                         ol_arg="$ol_val"
4713                 fi
4714         done
4715         if test "$ol_arg" = "invalid" ; then
4716                 as_fn_error "bad value $enableval for --enable-ppolicy" "$LINENO" 5
4717         fi
4718         ol_enable_ppolicy="$ol_arg"
4719
4720 else
4721         ol_enable_ppolicy=${ol_enable_overlays:-no}
4722 fi
4723
4724 # end --enable-ppolicy
4725
4726 # OpenLDAP --enable-proxycache
4727
4728         # Check whether --enable-proxycache was given.
4729 if test "${enable_proxycache+set}" = set; then :
4730   enableval=$enable_proxycache;
4731         ol_arg=invalid
4732         for ol_val in no yes mod ; do
4733                 if test "$enableval" = "$ol_val" ; then
4734                         ol_arg="$ol_val"
4735                 fi
4736         done
4737         if test "$ol_arg" = "invalid" ; then
4738                 as_fn_error "bad value $enableval for --enable-proxycache" "$LINENO" 5
4739         fi
4740         ol_enable_proxycache="$ol_arg"
4741
4742 else
4743         ol_enable_proxycache=${ol_enable_overlays:-no}
4744 fi
4745
4746 # end --enable-proxycache
4747
4748 # OpenLDAP --enable-refint
4749
4750         # Check whether --enable-refint was given.
4751 if test "${enable_refint+set}" = set; then :
4752   enableval=$enable_refint;
4753         ol_arg=invalid
4754         for ol_val in no yes mod ; do
4755                 if test "$enableval" = "$ol_val" ; then
4756                         ol_arg="$ol_val"
4757                 fi
4758         done
4759         if test "$ol_arg" = "invalid" ; then
4760                 as_fn_error "bad value $enableval for --enable-refint" "$LINENO" 5
4761         fi
4762         ol_enable_refint="$ol_arg"
4763
4764 else
4765         ol_enable_refint=${ol_enable_overlays:-no}
4766 fi
4767
4768 # end --enable-refint
4769
4770 # OpenLDAP --enable-retcode
4771
4772         # Check whether --enable-retcode was given.
4773 if test "${enable_retcode+set}" = set; then :
4774   enableval=$enable_retcode;
4775         ol_arg=invalid
4776         for ol_val in no yes mod ; do
4777                 if test "$enableval" = "$ol_val" ; then
4778                         ol_arg="$ol_val"
4779                 fi
4780         done
4781         if test "$ol_arg" = "invalid" ; then
4782                 as_fn_error "bad value $enableval for --enable-retcode" "$LINENO" 5
4783         fi
4784         ol_enable_retcode="$ol_arg"
4785
4786 else
4787         ol_enable_retcode=${ol_enable_overlays:-no}
4788 fi
4789
4790 # end --enable-retcode
4791
4792 # OpenLDAP --enable-rwm
4793
4794         # Check whether --enable-rwm was given.
4795 if test "${enable_rwm+set}" = set; then :
4796   enableval=$enable_rwm;
4797         ol_arg=invalid
4798         for ol_val in no yes mod ; do
4799                 if test "$enableval" = "$ol_val" ; then
4800                         ol_arg="$ol_val"
4801                 fi
4802         done
4803         if test "$ol_arg" = "invalid" ; then
4804                 as_fn_error "bad value $enableval for --enable-rwm" "$LINENO" 5
4805         fi
4806         ol_enable_rwm="$ol_arg"
4807
4808 else
4809         ol_enable_rwm=${ol_enable_overlays:-no}
4810 fi
4811
4812 # end --enable-rwm
4813
4814 # OpenLDAP --enable-seqmod
4815
4816         # Check whether --enable-seqmod was given.
4817 if test "${enable_seqmod+set}" = set; then :
4818   enableval=$enable_seqmod;
4819         ol_arg=invalid
4820         for ol_val in no yes mod ; do
4821                 if test "$enableval" = "$ol_val" ; then
4822                         ol_arg="$ol_val"
4823                 fi
4824         done
4825         if test "$ol_arg" = "invalid" ; then
4826                 as_fn_error "bad value $enableval for --enable-seqmod" "$LINENO" 5
4827         fi
4828         ol_enable_seqmod="$ol_arg"
4829
4830 else
4831         ol_enable_seqmod=${ol_enable_overlays:-no}
4832 fi
4833
4834 # end --enable-seqmod
4835
4836 # OpenLDAP --enable-sssvlv
4837
4838         # Check whether --enable-sssvlv was given.
4839 if test "${enable_sssvlv+set}" = set; then :
4840   enableval=$enable_sssvlv;
4841         ol_arg=invalid
4842         for ol_val in no yes mod ; do
4843                 if test "$enableval" = "$ol_val" ; then
4844                         ol_arg="$ol_val"
4845                 fi
4846         done
4847         if test "$ol_arg" = "invalid" ; then
4848                 as_fn_error "bad value $enableval for --enable-sssvlv" "$LINENO" 5
4849         fi
4850         ol_enable_sssvlv="$ol_arg"
4851
4852 else
4853         ol_enable_sssvlv=${ol_enable_overlays:-no}
4854 fi
4855
4856 # end --enable-sssvlv
4857
4858 # OpenLDAP --enable-syncprov
4859
4860         # Check whether --enable-syncprov was given.
4861 if test "${enable_syncprov+set}" = set; then :
4862   enableval=$enable_syncprov;
4863         ol_arg=invalid
4864         for ol_val in no yes mod ; do
4865                 if test "$enableval" = "$ol_val" ; then
4866                         ol_arg="$ol_val"
4867                 fi
4868         done
4869         if test "$ol_arg" = "invalid" ; then
4870                 as_fn_error "bad value $enableval for --enable-syncprov" "$LINENO" 5
4871         fi
4872         ol_enable_syncprov="$ol_arg"
4873
4874 else
4875         ol_enable_syncprov=${ol_enable_overlays:-yes}
4876 fi
4877
4878 # end --enable-syncprov
4879
4880 # OpenLDAP --enable-translucent
4881
4882         # Check whether --enable-translucent was given.
4883 if test "${enable_translucent+set}" = set; then :
4884   enableval=$enable_translucent;
4885         ol_arg=invalid
4886         for ol_val in no yes mod ; do
4887                 if test "$enableval" = "$ol_val" ; then
4888                         ol_arg="$ol_val"
4889                 fi
4890         done
4891         if test "$ol_arg" = "invalid" ; then
4892                 as_fn_error "bad value $enableval for --enable-translucent" "$LINENO" 5
4893         fi
4894         ol_enable_translucent="$ol_arg"
4895
4896 else
4897         ol_enable_translucent=${ol_enable_overlays:-no}
4898 fi
4899
4900 # end --enable-translucent
4901
4902 # OpenLDAP --enable-unique
4903
4904         # Check whether --enable-unique was given.
4905 if test "${enable_unique+set}" = set; then :
4906   enableval=$enable_unique;
4907         ol_arg=invalid
4908         for ol_val in no yes mod ; do
4909                 if test "$enableval" = "$ol_val" ; then
4910                         ol_arg="$ol_val"
4911                 fi
4912         done
4913         if test "$ol_arg" = "invalid" ; then
4914                 as_fn_error "bad value $enableval for --enable-unique" "$LINENO" 5
4915         fi
4916         ol_enable_unique="$ol_arg"
4917
4918 else
4919         ol_enable_unique=${ol_enable_overlays:-no}
4920 fi
4921
4922 # end --enable-unique
4923
4924 # OpenLDAP --enable-valsort
4925
4926         # Check whether --enable-valsort was given.
4927 if test "${enable_valsort+set}" = set; then :
4928   enableval=$enable_valsort;
4929         ol_arg=invalid
4930         for ol_val in no yes mod ; do
4931                 if test "$enableval" = "$ol_val" ; then
4932                         ol_arg="$ol_val"
4933                 fi
4934         done
4935         if test "$ol_arg" = "invalid" ; then
4936                 as_fn_error "bad value $enableval for --enable-valsort" "$LINENO" 5
4937         fi
4938         ol_enable_valsort="$ol_arg"
4939
4940 else
4941         ol_enable_valsort=${ol_enable_overlays:-no}
4942 fi
4943
4944 # end --enable-valsort
4945
4946
4947 # Check whether --enable-xxliboptions was given.
4948 if test "${enable_xxliboptions+set}" = set; then :
4949   enableval=$enable_xxliboptions;
4950 fi
4951
4952 # Check whether --enable-static was given.
4953 if test "${enable_static+set}" = set; then :
4954   enableval=$enable_static; p=${PACKAGE-default}
4955     case $enableval in
4956     yes) enable_static=yes ;;
4957     no) enable_static=no ;;
4958     *)
4959      enable_static=no
4960       # Look at the argument we got.  We use all the common list separators.
4961       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4962       for pkg in $enableval; do
4963         IFS="$lt_save_ifs"
4964         if test "X$pkg" = "X$p"; then
4965           enable_static=yes
4966         fi
4967       done
4968       IFS="$lt_save_ifs"
4969       ;;
4970     esac
4971 else
4972   enable_static=yes
4973 fi
4974
4975
4976 # Check whether --enable-shared was given.
4977 if test "${enable_shared+set}" = set; then :
4978   enableval=$enable_shared; p=${PACKAGE-default}
4979     case $enableval in
4980     yes) enable_shared=yes ;;
4981     no) enable_shared=no ;;
4982     *)
4983       enable_shared=no
4984       # Look at the argument we got.  We use all the common list separators.
4985       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4986       for pkg in $enableval; do
4987         IFS="$lt_save_ifs"
4988         if test "X$pkg" = "X$p"; then
4989           enable_shared=yes
4990         fi
4991       done
4992       IFS="$lt_save_ifs"
4993       ;;
4994     esac
4995 else
4996   enable_shared=yes
4997 fi
4998
4999
5000
5001
5002 # validate options
5003 if test $ol_enable_slapd = no ; then
5004                 if test $ol_enable_slapi = yes ; then
5005                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
5006 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
5007         fi
5008         case "$ol_enable_backends" in yes | mod)
5009                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
5010 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
5011         esac
5012         for i in $Backends; do
5013                 eval "ol_tmp=\$ol_enable_$i"
5014                 if test $ol_tmp != no ; then
5015                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
5016 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
5017                         eval "ol_enable_$i=no"
5018                 fi
5019         done
5020         if test $ol_enable_modules = yes ; then
5021                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
5022 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
5023         fi
5024         if test $ol_enable_wrappers = yes ; then
5025                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
5026 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
5027         fi
5028         if test $ol_enable_rlookups = yes ; then
5029                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
5030 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
5031         fi
5032         if test $ol_enable_dynacl = yes ; then
5033                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
5034 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
5035         fi
5036         if test $ol_enable_aci != no ; then
5037                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
5038 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
5039         fi
5040         if test $ol_enable_rewrite = yes ; then
5041                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
5042 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
5043         fi
5044                 case "$ol_enable_overlays" in yes | mod)
5045                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
5046 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
5047         esac
5048         for i in $Overlays; do
5049                 eval "ol_tmp=\$ol_enable_$i"
5050                 if test $ol_tmp != no ; then
5051                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
5052 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
5053                         eval "ol_enable_$i=no"
5054                 fi
5055         done
5056
5057         # force settings to no
5058         ol_enable_slapi=no
5059
5060         ol_enable_backends=
5061         ol_enable_overlays=
5062         ol_enable_modules=no
5063         ol_enable_rlookups=no
5064         ol_enable_dynacl=no
5065         ol_enable_aci=no
5066         ol_enable_wrappers=no
5067
5068         ol_enable_rewrite=no
5069
5070 elif test $ol_enable_modules != yes &&
5071         test $ol_enable_bdb = no &&
5072         test $ol_enable_dnssrv = no &&
5073         test $ol_enable_hdb = no &&
5074         test $ol_enable_ldap = no &&
5075         test $ol_enable_mdb = no &&
5076         test $ol_enable_meta = no &&
5077         test $ol_enable_asyncmeta = no &&
5078         test $ol_enable_monitor = no &&
5079         test $ol_enable_ndb = no &&
5080         test $ol_enable_null = no &&
5081         test $ol_enable_passwd = no &&
5082         test $ol_enable_perl = no &&
5083         test $ol_enable_relay = no &&
5084         test $ol_enable_shell = no &&
5085         test $ol_enable_sock = no &&
5086         test $ol_enable_sql = no &&
5087         test $ol_enable_wt = no ; then
5088
5089         if test $ol_enable_slapd = yes ; then
5090                 as_fn_error "slapd requires a backend" "$LINENO" 5
5091         else
5092                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipping slapd, no backend specified" >&5
5093 $as_echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
5094                 ol_enable_slapd=no
5095         fi
5096 fi
5097
5098 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
5099         as_fn_error "--enable-meta requires --enable-ldap" "$LINENO" 5
5100 fi
5101
5102 if test $ol_enable_asyncmeta/$ol_enable_ldap = yes/no ; then
5103         as_fn_error "--enable-asyncmeta requires --enable-ldap" "$LINENO" 5
5104 fi
5105
5106 if test $ol_enable_lmpasswd = yes ; then
5107         if test $ol_with_tls = no ; then
5108                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
5109         fi
5110 fi
5111
5112 if test $ol_enable_spasswd = yes ; then
5113         if test $ol_with_cyrus_sasl = no ; then
5114                 as_fn_error "options require --with-cyrus-sasl" "$LINENO" 5
5115         fi
5116         ol_with_cyrus_sasl=yes
5117 fi
5118
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
5120 $as_echo "done" >&6; }
5121
5122 LDAP_LIBS=
5123 BDB_LIBS=
5124 SLAPD_NDB_LIBS=
5125 SLAPD_NDB_INCS=
5126 LTHREAD_LIBS=
5127 LUTIL_LIBS=
5128
5129 SLAPD_LIBS=
5130
5131 BUILD_SLAPD=no
5132
5133 BUILD_THREAD=no
5134
5135 BUILD_SLAPI=no
5136 SLAPD_SLAPI_DEPEND=
5137
5138 BUILD_BDB=no
5139 BUILD_DNSSRV=no
5140 BUILD_HDB=no
5141 BUILD_LDAP=no
5142 BUILD_MDB=no
5143 BUILD_META=no
5144 BUILD_ASYNCMETA=no
5145 BUILD_MONITOR=no
5146 BUILD_NDB=no
5147 BUILD_NULL=no
5148 BUILD_PASSWD=no
5149 BUILD_PERL=no
5150 BUILD_RELAY=no
5151 BUILD_SHELL=no
5152 BUILD_SOCK=no
5153 BUILD_SQL=no
5154 BUILD_WT=no
5155
5156 BUILD_ACCESSLOG=no
5157 BUILD_AUDITLOG=no
5158 BUILD_CONSTRAINT=no
5159 BUILD_DDS=no
5160 BUILD_DENYOP=no
5161 BUILD_DEREF=no
5162 BUILD_DYNGROUP=no
5163 BUILD_DYNLIST=no
5164 BUILD_LASTMOD=no
5165 BUILD_MEMBEROF=no
5166 BUILD_PPOLICY=no
5167 BUILD_PROXYCACHE=no
5168 BUILD_REFINT=no
5169 BUILD_RETCODE=no
5170 BUILD_RWM=no
5171 BUILD_SEQMOD=no
5172 BUILD_SSSVLV=no
5173 BUILD_SYNCPROV=no
5174 BUILD_TRANSLUCENT=no
5175 BUILD_UNIQUE=no
5176 BUILD_VALSORT=no
5177
5178 SLAPD_STATIC_OVERLAYS=
5179 SLAPD_DYNAMIC_OVERLAYS=
5180
5181 SLAPD_MODULES_LDFLAGS=
5182 SLAPD_MODULES_CPPFLAGS=
5183
5184 SLAPD_STATIC_BACKENDS=back-ldif
5185 SLAPD_DYNAMIC_BACKENDS=
5186
5187 SLAPD_PERL_LDFLAGS=
5188 MOD_PERL_LDFLAGS=
5189 PERL_CPPFLAGS=
5190
5191 SLAPD_SQL_LDFLAGS=
5192 SLAPD_SQL_LIBS=
5193 SLAPD_SQL_INCLUDES=
5194
5195 KRB4_LIBS=
5196 KRB5_LIBS=
5197 SASL_LIBS=
5198 TLS_LIBS=
5199 MODULES_LIBS=
5200 SLAPI_LIBS=
5201 LIBSLAPI=
5202 AUTH_LIBS=
5203 ICU_LIBS=
5204
5205 SLAPD_SLP_LIBS=
5206 SLAPD_GMP_LIBS=
5207
5208
5209
5210 $as_echo "#define HAVE_MKVERSION 1" >>confdefs.h
5211
5212
5213
5214
5215 ol_aix_threads=no
5216 case "$target" in
5217 *-*-aix*)       if test -z "$CC" ; then
5218                 case "$ol_with_threads" in
5219                 auto | yes |  posix) ol_aix_threads=yes ;;
5220                 esac
5221         fi
5222 ;;
5223 esac
5224
5225 if test $ol_aix_threads = yes ; then
5226         if test -z "${CC}" ; then
5227                 for ac_prog in cc_r xlc_r cc
5228 do
5229   # Extract the first word of "$ac_prog", so it can be a program name with args.
5230 set dummy $ac_prog; ac_word=$2
5231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5232 $as_echo_n "checking for $ac_word... " >&6; }
5233 if test "${ac_cv_prog_CC+set}" = set; then :
5234   $as_echo_n "(cached) " >&6
5235 else
5236   if test -n "$CC"; then
5237   ac_cv_prog_CC="$CC" # Let the user override the test.
5238 else
5239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5240 for as_dir in $PATH
5241 do
5242   IFS=$as_save_IFS
5243   test -z "$as_dir" && as_dir=.
5244     for ac_exec_ext in '' $ac_executable_extensions; do
5245   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5246     ac_cv_prog_CC="$ac_prog"
5247     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5248     break 2
5249   fi
5250 done
5251   done
5252 IFS=$as_save_IFS
5253
5254 fi
5255 fi
5256 CC=$ac_cv_prog_CC
5257 if test -n "$CC"; then
5258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5259 $as_echo "$CC" >&6; }
5260 else
5261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5262 $as_echo "no" >&6; }
5263 fi
5264
5265
5266   test -n "$CC" && break
5267 done
5268
5269
5270                 if test "$CC" = cc ; then
5271                                                 if test $ol_with_threads != auto ; then
5272                                 as_fn_error "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
5273                         else
5274                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
5275 $as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
5276                         fi
5277                         ol_with_threads=no
5278                 fi
5279         fi
5280
5281         case ${CC} in cc_r | xlc_r)
5282                 ol_with_threads=posix
5283                 ol_cv_pthread_create=yes
5284                 ;;
5285         esac
5286 fi
5287
5288 if test -z "${CC}"; then
5289         for ac_prog in cc gcc
5290 do
5291   # Extract the first word of "$ac_prog", so it can be a program name with args.
5292 set dummy $ac_prog; ac_word=$2
5293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5294 $as_echo_n "checking for $ac_word... " >&6; }
5295 if test "${ac_cv_prog_CC+set}" = set; then :
5296   $as_echo_n "(cached) " >&6
5297 else
5298   if test -n "$CC"; then
5299   ac_cv_prog_CC="$CC" # Let the user override the test.
5300 else
5301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5302 for as_dir in $PATH
5303 do
5304   IFS=$as_save_IFS
5305   test -z "$as_dir" && as_dir=.
5306     for ac_exec_ext in '' $ac_executable_extensions; do
5307   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5308     ac_cv_prog_CC="$ac_prog"
5309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5310     break 2
5311   fi
5312 done
5313   done
5314 IFS=$as_save_IFS
5315
5316 fi
5317 fi
5318 CC=$ac_cv_prog_CC
5319 if test -n "$CC"; then
5320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5321 $as_echo "$CC" >&6; }
5322 else
5323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5324 $as_echo "no" >&6; }
5325 fi
5326
5327
5328   test -n "$CC" && break
5329 done
5330 test -n "$CC" || CC="missing"
5331
5332
5333         if test "${CC}" = "missing" ; then
5334                 as_fn_error "Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." "$LINENO" 5
5335         fi
5336 fi
5337
5338 if test -z "${AR}"; then
5339         for ac_prog in ar gar
5340 do
5341   # Extract the first word of "$ac_prog", so it can be a program name with args.
5342 set dummy $ac_prog; ac_word=$2
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5344 $as_echo_n "checking for $ac_word... " >&6; }
5345 if test "${ac_cv_prog_AR+set}" = set; then :
5346   $as_echo_n "(cached) " >&6
5347 else
5348   if test -n "$AR"; then
5349   ac_cv_prog_AR="$AR" # Let the user override the test.
5350 else
5351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5352 for as_dir in $PATH
5353 do
5354   IFS=$as_save_IFS
5355   test -z "$as_dir" && as_dir=.
5356     for ac_exec_ext in '' $ac_executable_extensions; do
5357   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5358     ac_cv_prog_AR="$ac_prog"
5359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5360     break 2
5361   fi
5362 done
5363   done
5364 IFS=$as_save_IFS
5365
5366 fi
5367 fi
5368 AR=$ac_cv_prog_AR
5369 if test -n "$AR"; then
5370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5371 $as_echo "$AR" >&6; }
5372 else
5373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5374 $as_echo "no" >&6; }
5375 fi
5376
5377
5378   test -n "$AR" && break
5379 done
5380 test -n "$AR" || AR="missing"
5381
5382
5383         if test "${AR}" = "missing" ; then
5384                 as_fn_error "Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." "$LINENO" 5
5385         fi
5386 fi
5387
5388
5389
5390
5391
5392 # Check whether --enable-fast-install was given.
5393 if test "${enable_fast_install+set}" = set; then :
5394   enableval=$enable_fast_install; p=${PACKAGE-default}
5395     case $enableval in
5396     yes) enable_fast_install=yes ;;
5397     no) enable_fast_install=no ;;
5398     *)
5399       enable_fast_install=no
5400       # Look at the argument we got.  We use all the common list separators.
5401       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5402       for pkg in $enableval; do
5403         IFS="$lt_save_ifs"
5404         if test "X$pkg" = "X$p"; then
5405           enable_fast_install=yes
5406         fi
5407       done
5408       IFS="$lt_save_ifs"
5409       ;;
5410     esac
5411 else
5412   enable_fast_install=yes
5413 fi
5414
5415
5416 DEPDIR="${am__leading_dot}deps"
5417
5418 ac_config_commands="$ac_config_commands depfiles"
5419
5420
5421 am_make=${MAKE-make}
5422 cat > confinc << 'END'
5423 am__doit:
5424         @echo done
5425 .PHONY: am__doit
5426 END
5427 # If we don't find an include directive, just comment out the code.
5428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5429 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5430 am__include="#"
5431 am__quote=
5432 _am_result=none
5433 # First try GNU make style include.
5434 echo "include confinc" > confmf
5435 # We grep out `Entering directory' and `Leaving directory'
5436 # messages which can occur if `w' ends up in MAKEFLAGS.
5437 # In particular we don't look at `^make:' because GNU make might
5438 # be invoked under some other name (usually "gmake"), in which
5439 # case it prints its new name instead of `make'.
5440 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
5441    am__include=include
5442    am__quote=
5443    _am_result=GNU
5444 fi
5445 # Now try BSD make style include.
5446 if test "$am__include" = "#"; then
5447    echo '.include "confinc"' > confmf
5448    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
5449       am__include=.include
5450       am__quote="\""
5451       _am_result=BSD
5452    fi
5453 fi
5454
5455
5456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5457 $as_echo "$_am_result" >&6; }
5458 rm -f confinc confmf
5459
5460 # Check whether --enable-dependency-tracking was given.
5461 if test "${enable_dependency_tracking+set}" = set; then :
5462   enableval=$enable_dependency_tracking;
5463 fi
5464
5465 if test "x$enable_dependency_tracking" != xno; then
5466   am_depcomp="$ac_aux_dir/depcomp"
5467   AMDEPBACKSLASH='\'
5468 fi
5469
5470
5471 if test "x$enable_dependency_tracking" != xno; then
5472   AMDEP_TRUE=
5473   AMDEP_FALSE='#'
5474 else
5475   AMDEP_TRUE='#'
5476   AMDEP_FALSE=
5477 fi
5478
5479
5480
5481 ac_ext=c
5482 ac_cpp='$CPP $CPPFLAGS'
5483 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5484 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5485 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5486 if test -n "$ac_tool_prefix"; then
5487   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5488 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5490 $as_echo_n "checking for $ac_word... " >&6; }
5491 if test "${ac_cv_prog_CC+set}" = set; then :
5492   $as_echo_n "(cached) " >&6
5493 else
5494   if test -n "$CC"; then
5495   ac_cv_prog_CC="$CC" # Let the user override the test.
5496 else
5497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5498 for as_dir in $PATH
5499 do
5500   IFS=$as_save_IFS
5501   test -z "$as_dir" && as_dir=.
5502     for ac_exec_ext in '' $ac_executable_extensions; do
5503   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5504     ac_cv_prog_CC="${ac_tool_prefix}gcc"
5505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5506     break 2
5507   fi
5508 done
5509   done
5510 IFS=$as_save_IFS
5511
5512 fi
5513 fi
5514 CC=$ac_cv_prog_CC
5515 if test -n "$CC"; then
5516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5517 $as_echo "$CC" >&6; }
5518 else
5519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5520 $as_echo "no" >&6; }
5521 fi
5522
5523
5524 fi
5525 if test -z "$ac_cv_prog_CC"; then
5526   ac_ct_CC=$CC
5527   # Extract the first word of "gcc", so it can be a program name with args.
5528 set dummy gcc; ac_word=$2
5529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5530 $as_echo_n "checking for $ac_word... " >&6; }
5531 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5532   $as_echo_n "(cached) " >&6
5533 else
5534   if test -n "$ac_ct_CC"; then
5535   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5536 else
5537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5538 for as_dir in $PATH
5539 do
5540   IFS=$as_save_IFS
5541   test -z "$as_dir" && as_dir=.
5542     for ac_exec_ext in '' $ac_executable_extensions; do
5543   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5544     ac_cv_prog_ac_ct_CC="gcc"
5545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5546     break 2
5547   fi
5548 done
5549   done
5550 IFS=$as_save_IFS
5551
5552 fi
5553 fi
5554 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5555 if test -n "$ac_ct_CC"; then
5556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5557 $as_echo "$ac_ct_CC" >&6; }
5558 else
5559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5560 $as_echo "no" >&6; }
5561 fi
5562
5563   if test "x$ac_ct_CC" = x; then
5564     CC=""
5565   else
5566     case $cross_compiling:$ac_tool_warned in
5567 yes:)
5568 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5569 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5570 ac_tool_warned=yes ;;
5571 esac
5572     CC=$ac_ct_CC
5573   fi
5574 else
5575   CC="$ac_cv_prog_CC"
5576 fi
5577
5578 if test -z "$CC"; then
5579           if test -n "$ac_tool_prefix"; then
5580     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5581 set dummy ${ac_tool_prefix}cc; ac_word=$2
5582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5583 $as_echo_n "checking for $ac_word... " >&6; }
5584 if test "${ac_cv_prog_CC+set}" = set; then :
5585   $as_echo_n "(cached) " >&6
5586 else
5587   if test -n "$CC"; then
5588   ac_cv_prog_CC="$CC" # Let the user override the test.
5589 else
5590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5591 for as_dir in $PATH
5592 do
5593   IFS=$as_save_IFS
5594   test -z "$as_dir" && as_dir=.
5595     for ac_exec_ext in '' $ac_executable_extensions; do
5596   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5597     ac_cv_prog_CC="${ac_tool_prefix}cc"
5598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5599     break 2
5600   fi
5601 done
5602   done
5603 IFS=$as_save_IFS
5604
5605 fi
5606 fi
5607 CC=$ac_cv_prog_CC
5608 if test -n "$CC"; then
5609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5610 $as_echo "$CC" >&6; }
5611 else
5612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5613 $as_echo "no" >&6; }
5614 fi
5615
5616
5617   fi
5618 fi
5619 if test -z "$CC"; then
5620   # Extract the first word of "cc", so it can be a program name with args.
5621 set dummy cc; ac_word=$2
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5623 $as_echo_n "checking for $ac_word... " >&6; }
5624 if test "${ac_cv_prog_CC+set}" = set; then :
5625   $as_echo_n "(cached) " >&6
5626 else
5627   if test -n "$CC"; then
5628   ac_cv_prog_CC="$CC" # Let the user override the test.
5629 else
5630   ac_prog_rejected=no
5631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5632 for as_dir in $PATH
5633 do
5634   IFS=$as_save_IFS
5635   test -z "$as_dir" && as_dir=.
5636     for ac_exec_ext in '' $ac_executable_extensions; do
5637   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5638     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5639        ac_prog_rejected=yes
5640        continue
5641      fi
5642     ac_cv_prog_CC="cc"
5643     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5644     break 2
5645   fi
5646 done
5647   done
5648 IFS=$as_save_IFS
5649
5650 if test $ac_prog_rejected = yes; then
5651   # We found a bogon in the path, so make sure we never use it.
5652   set dummy $ac_cv_prog_CC
5653   shift
5654   if test $# != 0; then
5655     # We chose a different compiler from the bogus one.
5656     # However, it has the same basename, so the bogon will be chosen
5657     # first if we set CC to just the basename; use the full file name.
5658     shift
5659     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5660   fi
5661 fi
5662 fi
5663 fi
5664 CC=$ac_cv_prog_CC
5665 if test -n "$CC"; then
5666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5667 $as_echo "$CC" >&6; }
5668 else
5669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670 $as_echo "no" >&6; }
5671 fi
5672
5673
5674 fi
5675 if test -z "$CC"; then
5676   if test -n "$ac_tool_prefix"; then
5677   for ac_prog in cl.exe
5678   do
5679     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5680 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5682 $as_echo_n "checking for $ac_word... " >&6; }
5683 if test "${ac_cv_prog_CC+set}" = set; then :
5684   $as_echo_n "(cached) " >&6
5685 else
5686   if test -n "$CC"; then
5687   ac_cv_prog_CC="$CC" # Let the user override the test.
5688 else
5689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5690 for as_dir in $PATH
5691 do
5692   IFS=$as_save_IFS
5693   test -z "$as_dir" && as_dir=.
5694     for ac_exec_ext in '' $ac_executable_extensions; do
5695   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5696     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5698     break 2
5699   fi
5700 done
5701   done
5702 IFS=$as_save_IFS
5703
5704 fi
5705 fi
5706 CC=$ac_cv_prog_CC
5707 if test -n "$CC"; then
5708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5709 $as_echo "$CC" >&6; }
5710 else
5711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5712 $as_echo "no" >&6; }
5713 fi
5714
5715
5716     test -n "$CC" && break
5717   done
5718 fi
5719 if test -z "$CC"; then
5720   ac_ct_CC=$CC
5721   for ac_prog in cl.exe
5722 do
5723   # Extract the first word of "$ac_prog", so it can be a program name with args.
5724 set dummy $ac_prog; ac_word=$2
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5726 $as_echo_n "checking for $ac_word... " >&6; }
5727 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5728   $as_echo_n "(cached) " >&6
5729 else
5730   if test -n "$ac_ct_CC"; then
5731   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5732 else
5733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5734 for as_dir in $PATH
5735 do
5736   IFS=$as_save_IFS
5737   test -z "$as_dir" && as_dir=.
5738     for ac_exec_ext in '' $ac_executable_extensions; do
5739   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5740     ac_cv_prog_ac_ct_CC="$ac_prog"
5741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5742     break 2
5743   fi
5744 done
5745   done
5746 IFS=$as_save_IFS
5747
5748 fi
5749 fi
5750 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5751 if test -n "$ac_ct_CC"; then
5752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5753 $as_echo "$ac_ct_CC" >&6; }
5754 else
5755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5756 $as_echo "no" >&6; }
5757 fi
5758
5759
5760   test -n "$ac_ct_CC" && break
5761 done
5762
5763   if test "x$ac_ct_CC" = x; then
5764     CC=""
5765   else
5766     case $cross_compiling:$ac_tool_warned in
5767 yes:)
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5769 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5770 ac_tool_warned=yes ;;
5771 esac
5772     CC=$ac_ct_CC
5773   fi
5774 fi
5775
5776 fi
5777
5778
5779 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5780 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5781 as_fn_error "no acceptable C compiler found in \$PATH
5782 See \`config.log' for more details." "$LINENO" 5; }
5783
5784 # Provide some information about the compiler.
5785 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5786 set X $ac_compile
5787 ac_compiler=$2
5788 for ac_option in --version -v -V -qversion; do
5789   { { ac_try="$ac_compiler $ac_option >&5"
5790 case "(($ac_try" in
5791   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5792   *) ac_try_echo=$ac_try;;
5793 esac
5794 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5795 $as_echo "$ac_try_echo"; } >&5
5796   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5797   ac_status=$?
5798   if test -s conftest.err; then
5799     sed '10a\
5800 ... rest of stderr output deleted ...
5801          10q' conftest.err >conftest.er1
5802     cat conftest.er1 >&5
5803   fi
5804   rm -f conftest.er1 conftest.err
5805   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5806   test $ac_status = 0; }
5807 done
5808
5809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5810 /* end confdefs.h.  */
5811
5812 int
5813 main ()
5814 {
5815
5816   ;
5817   return 0;
5818 }
5819 _ACEOF
5820 ac_clean_files_save=$ac_clean_files
5821 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5822 # Try to create an executable without -o first, disregard a.out.
5823 # It will help us diagnose broken compilers, and finding out an intuition
5824 # of exeext.
5825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5826 $as_echo_n "checking whether the C compiler works... " >&6; }
5827 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5828
5829 # The possible output files:
5830 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5831
5832 ac_rmfiles=
5833 for ac_file in $ac_files
5834 do
5835   case $ac_file in
5836     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5837     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5838   esac
5839 done
5840 rm -f $ac_rmfiles
5841
5842 if { { ac_try="$ac_link_default"
5843 case "(($ac_try" in
5844   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5845   *) ac_try_echo=$ac_try;;
5846 esac
5847 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5848 $as_echo "$ac_try_echo"; } >&5
5849   (eval "$ac_link_default") 2>&5
5850   ac_status=$?
5851   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5852   test $ac_status = 0; }; then :
5853   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5854 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5855 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
5856 # so that the user can short-circuit this test for compilers unknown to
5857 # Autoconf.
5858 for ac_file in $ac_files ''
5859 do
5860   test -f "$ac_file" || continue
5861   case $ac_file in
5862     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5863         ;;
5864     [ab].out )
5865         # We found the default executable, but exeext='' is most
5866         # certainly right.
5867         break;;
5868     *.* )
5869         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5870         then :; else
5871            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5872         fi
5873         # We set ac_cv_exeext here because the later test for it is not
5874         # safe: cross compilers may not add the suffix if given an `-o'
5875         # argument, so we may need to know it at that point already.
5876         # Even if this section looks crufty: it has the advantage of
5877         # actually working.
5878         break;;
5879     * )
5880         break;;
5881   esac
5882 done
5883 test "$ac_cv_exeext" = no && ac_cv_exeext=
5884
5885 else
5886   ac_file=''
5887 fi
5888 if test -z "$ac_file"; then :
5889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5890 $as_echo "no" >&6; }
5891 $as_echo "$as_me: failed program was:" >&5
5892 sed 's/^/| /' conftest.$ac_ext >&5
5893
5894 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5895 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5896 { as_fn_set_status 77
5897 as_fn_error "C compiler cannot create executables
5898 See \`config.log' for more details." "$LINENO" 5; }; }
5899 else
5900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5901 $as_echo "yes" >&6; }
5902 fi
5903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5904 $as_echo_n "checking for C compiler default output file name... " >&6; }
5905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5906 $as_echo "$ac_file" >&6; }
5907 ac_exeext=$ac_cv_exeext
5908
5909 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5910 ac_clean_files=$ac_clean_files_save
5911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5912 $as_echo_n "checking for suffix of executables... " >&6; }
5913 if { { ac_try="$ac_link"
5914 case "(($ac_try" in
5915   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5916   *) ac_try_echo=$ac_try;;
5917 esac
5918 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5919 $as_echo "$ac_try_echo"; } >&5
5920   (eval "$ac_link") 2>&5
5921   ac_status=$?
5922   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5923   test $ac_status = 0; }; then :
5924   # If both `conftest.exe' and `conftest' are `present' (well, observable)
5925 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5926 # work properly (i.e., refer to `conftest.exe'), while it won't with
5927 # `rm'.
5928 for ac_file in conftest.exe conftest conftest.*; do
5929   test -f "$ac_file" || continue
5930   case $ac_file in
5931     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5932     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5933           break;;
5934     * ) break;;
5935   esac
5936 done
5937 else
5938   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5939 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5940 as_fn_error "cannot compute suffix of executables: cannot compile and link
5941 See \`config.log' for more details." "$LINENO" 5; }
5942 fi
5943 rm -f conftest conftest$ac_cv_exeext
5944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5945 $as_echo "$ac_cv_exeext" >&6; }
5946
5947 rm -f conftest.$ac_ext
5948 EXEEXT=$ac_cv_exeext
5949 ac_exeext=$EXEEXT
5950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5951 /* end confdefs.h.  */
5952 #include <stdio.h>
5953 int
5954 main ()
5955 {
5956 FILE *f = fopen ("conftest.out", "w");
5957  return ferror (f) || fclose (f) != 0;
5958
5959   ;
5960   return 0;
5961 }
5962 _ACEOF
5963 ac_clean_files="$ac_clean_files conftest.out"
5964 # Check that the compiler produces executables we can run.  If not, either
5965 # the compiler is broken, or we cross compile.
5966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5967 $as_echo_n "checking whether we are cross compiling... " >&6; }
5968 if test "$cross_compiling" != yes; then
5969   { { ac_try="$ac_link"
5970 case "(($ac_try" in
5971   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5972   *) ac_try_echo=$ac_try;;
5973 esac
5974 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5975 $as_echo "$ac_try_echo"; } >&5
5976   (eval "$ac_link") 2>&5
5977   ac_status=$?
5978   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5979   test $ac_status = 0; }
5980   if { ac_try='./conftest$ac_cv_exeext'
5981   { { case "(($ac_try" in
5982   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5983   *) ac_try_echo=$ac_try;;
5984 esac
5985 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5986 $as_echo "$ac_try_echo"; } >&5
5987   (eval "$ac_try") 2>&5
5988   ac_status=$?
5989   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5990   test $ac_status = 0; }; }; then
5991     cross_compiling=no
5992   else
5993     if test "$cross_compiling" = maybe; then
5994         cross_compiling=yes
5995     else
5996         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5997 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5998 as_fn_error "cannot run C compiled programs.
5999 If you meant to cross compile, use \`--host'.
6000 See \`config.log' for more details." "$LINENO" 5; }
6001     fi
6002   fi
6003 fi
6004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
6005 $as_echo "$cross_compiling" >&6; }
6006
6007 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
6008 ac_clean_files=$ac_clean_files_save
6009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
6010 $as_echo_n "checking for suffix of object files... " >&6; }
6011 if test "${ac_cv_objext+set}" = set; then :
6012   $as_echo_n "(cached) " >&6
6013 else
6014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6015 /* end confdefs.h.  */
6016
6017 int
6018 main ()
6019 {
6020
6021   ;
6022   return 0;
6023 }
6024 _ACEOF
6025 rm -f conftest.o conftest.obj
6026 if { { ac_try="$ac_compile"
6027 case "(($ac_try" in
6028   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6029   *) ac_try_echo=$ac_try;;
6030 esac
6031 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6032 $as_echo "$ac_try_echo"; } >&5
6033   (eval "$ac_compile") 2>&5
6034   ac_status=$?
6035   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6036   test $ac_status = 0; }; then :
6037   for ac_file in conftest.o conftest.obj conftest.*; do
6038   test -f "$ac_file" || continue;
6039   case $ac_file in
6040     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
6041     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
6042        break;;
6043   esac
6044 done
6045 else
6046   $as_echo "$as_me: failed program was:" >&5
6047 sed 's/^/| /' conftest.$ac_ext >&5
6048
6049 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6050 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6051 as_fn_error "cannot compute suffix of object files: cannot compile
6052 See \`config.log' for more details." "$LINENO" 5; }
6053 fi
6054 rm -f conftest.$ac_cv_objext conftest.$ac_ext
6055 fi
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
6057 $as_echo "$ac_cv_objext" >&6; }
6058 OBJEXT=$ac_cv_objext
6059 ac_objext=$OBJEXT
6060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6061 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6062 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
6063   $as_echo_n "(cached) " >&6
6064 else
6065   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6066 /* end confdefs.h.  */
6067
6068 int
6069 main ()
6070 {
6071 #ifndef __GNUC__
6072        choke me
6073 #endif
6074
6075   ;
6076   return 0;
6077 }
6078 _ACEOF
6079 if ac_fn_c_try_compile "$LINENO"; then :
6080   ac_compiler_gnu=yes
6081 else
6082   ac_compiler_gnu=no
6083 fi
6084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6085 ac_cv_c_compiler_gnu=$ac_compiler_gnu
6086
6087 fi
6088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6089 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
6090 if test $ac_compiler_gnu = yes; then
6091   GCC=yes
6092 else
6093   GCC=
6094 fi
6095 ac_test_CFLAGS=${CFLAGS+set}
6096 ac_save_CFLAGS=$CFLAGS
6097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6098 $as_echo_n "checking whether $CC accepts -g... " >&6; }
6099 if test "${ac_cv_prog_cc_g+set}" = set; then :
6100   $as_echo_n "(cached) " >&6
6101 else
6102   ac_save_c_werror_flag=$ac_c_werror_flag
6103    ac_c_werror_flag=yes
6104    ac_cv_prog_cc_g=no
6105    CFLAGS="-g"
6106    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6107 /* end confdefs.h.  */
6108
6109 int
6110 main ()
6111 {
6112
6113   ;
6114   return 0;
6115 }
6116 _ACEOF
6117 if ac_fn_c_try_compile "$LINENO"; then :
6118   ac_cv_prog_cc_g=yes
6119 else
6120   CFLAGS=""
6121       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6122 /* end confdefs.h.  */
6123
6124 int
6125 main ()
6126 {
6127
6128   ;
6129   return 0;
6130 }
6131 _ACEOF
6132 if ac_fn_c_try_compile "$LINENO"; then :
6133
6134 else
6135   ac_c_werror_flag=$ac_save_c_werror_flag
6136          CFLAGS="-g"
6137          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6138 /* end confdefs.h.  */
6139
6140 int
6141 main ()
6142 {
6143
6144   ;
6145   return 0;
6146 }
6147 _ACEOF
6148 if ac_fn_c_try_compile "$LINENO"; then :
6149   ac_cv_prog_cc_g=yes
6150 fi
6151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6152 fi
6153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6154 fi
6155 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6156    ac_c_werror_flag=$ac_save_c_werror_flag
6157 fi
6158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6159 $as_echo "$ac_cv_prog_cc_g" >&6; }
6160 if test "$ac_test_CFLAGS" = set; then
6161   CFLAGS=$ac_save_CFLAGS
6162 elif test $ac_cv_prog_cc_g = yes; then
6163   if test "$GCC" = yes; then
6164     CFLAGS="-g -O2"
6165   else
6166     CFLAGS="-g"
6167   fi
6168 else
6169   if test "$GCC" = yes; then
6170     CFLAGS="-O2"
6171   else
6172     CFLAGS=
6173   fi
6174 fi
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6176 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6177 if test "${ac_cv_prog_cc_c89+set}" = set; then :
6178   $as_echo_n "(cached) " >&6
6179 else
6180   ac_cv_prog_cc_c89=no
6181 ac_save_CC=$CC
6182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6183 /* end confdefs.h.  */
6184 #include <stdarg.h>
6185 #include <stdio.h>
6186 #include <sys/types.h>
6187 #include <sys/stat.h>
6188 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6189 struct buf { int x; };
6190 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6191 static char *e (p, i)
6192      char **p;
6193      int i;
6194 {
6195   return p[i];
6196 }
6197 static char *f (char * (*g) (char **, int), char **p, ...)
6198 {
6199   char *s;
6200   va_list v;
6201   va_start (v,p);
6202   s = g (p, va_arg (v,int));
6203   va_end (v);
6204   return s;
6205 }
6206
6207 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6208    function prototypes and stuff, but not '\xHH' hex character constants.
6209    These don't provoke an error unfortunately, instead are silently treated
6210    as 'x'.  The following induces an error, until -std is added to get
6211    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6212    array size at least.  It's necessary to write '\x00'==0 to get something
6213    that's true only with -std.  */
6214 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6215
6216 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6217    inside strings and character constants.  */
6218 #define FOO(x) 'x'
6219 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6220
6221 int test (int i, double x);
6222 struct s1 {int (*f) (int a);};
6223 struct s2 {int (*f) (double a);};
6224 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6225 int argc;
6226 char **argv;
6227 int
6228 main ()
6229 {
6230 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6231   ;
6232   return 0;
6233 }
6234 _ACEOF
6235 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6236         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6237 do
6238   CC="$ac_save_CC $ac_arg"
6239   if ac_fn_c_try_compile "$LINENO"; then :
6240   ac_cv_prog_cc_c89=$ac_arg
6241 fi
6242 rm -f core conftest.err conftest.$ac_objext
6243   test "x$ac_cv_prog_cc_c89" != "xno" && break
6244 done
6245 rm -f conftest.$ac_ext
6246 CC=$ac_save_CC
6247
6248 fi
6249 # AC_CACHE_VAL
6250 case "x$ac_cv_prog_cc_c89" in
6251   x)
6252     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6253 $as_echo "none needed" >&6; } ;;
6254   xno)
6255     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6256 $as_echo "unsupported" >&6; } ;;
6257   *)
6258     CC="$CC $ac_cv_prog_cc_c89"
6259     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6260 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6261 esac
6262 if test "x$ac_cv_prog_cc_c89" != xno; then :
6263
6264 fi
6265
6266 ac_ext=c
6267 ac_cpp='$CPP $CPPFLAGS'
6268 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6269 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6270 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6271
6272 depcc="$CC"   am_compiler_list=
6273
6274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6275 $as_echo_n "checking dependency style of $depcc... " >&6; }
6276 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
6277   $as_echo_n "(cached) " >&6
6278 else
6279   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6280   # We make a subdir and do the tests there.  Otherwise we can end up
6281   # making bogus files that we don't know about and never remove.  For
6282   # instance it was reported that on HP-UX the gcc test will end up
6283   # making a dummy file named `D' -- because `-MD' means `put the output
6284   # in D'.
6285   mkdir conftest.dir
6286   # Copy depcomp to subdir because otherwise we won't find it if we're
6287   # using a relative directory.
6288   cp "$am_depcomp" conftest.dir
6289   cd conftest.dir
6290   # We will build objects and dependencies in a subdirectory because
6291   # it helps to detect inapplicable dependency modes.  For instance
6292   # both Tru64's cc and ICC support -MD to output dependencies as a
6293   # side effect of compilation, but ICC will put the dependencies in
6294   # the current directory while Tru64 will put them in the object
6295   # directory.
6296   mkdir sub
6297
6298   am_cv_CC_dependencies_compiler_type=none
6299   if test "$am_compiler_list" = ""; then
6300      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6301   fi
6302   for depmode in $am_compiler_list; do
6303     # Setup a source with many dependencies, because some compilers
6304     # like to wrap large dependency lists on column 80 (with \), and
6305     # we should not choose a depcomp mode which is confused by this.
6306     #
6307     # We need to recreate these files for each test, as the compiler may
6308     # overwrite some of them when testing with obscure command lines.
6309     # This happens at least with the AIX C compiler.
6310     : > sub/conftest.c
6311     for i in 1 2 3 4 5 6; do
6312       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6313       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6314       # Solaris 8's {/usr,}/bin/sh.
6315       touch sub/conftst$i.h
6316     done
6317     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6318
6319     case $depmode in
6320     nosideeffect)
6321       # after this tag, mechanisms are not by side-effect, so they'll
6322       # only be used when explicitly requested
6323       if test "x$enable_dependency_tracking" = xyes; then
6324         continue
6325       else
6326         break
6327       fi
6328       ;;
6329     none) break ;;
6330     esac
6331     # We check with `-c' and `-o' for the sake of the "dashmstdout"
6332     # mode.  It turns out that the SunPro C++ compiler does not properly
6333     # handle `-M -o', and we need to detect this.
6334     if depmode=$depmode \
6335        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6336        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6337        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6338          >/dev/null 2>conftest.err &&
6339        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6340        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6341        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6342       # icc doesn't choke on unknown options, it will just issue warnings
6343       # or remarks (even with -Werror).  So we grep stderr for any message
6344       # that says an option was ignored or not supported.
6345       # When given -MP, icc 7.0 and 7.1 complain thusly:
6346       #   icc: Command line warning: ignoring option '-M'; no argument required
6347       # The diagnosis changed in icc 8.0:
6348       #   icc: Command line remark: option '-MP' not supported
6349       if (grep 'ignoring option' conftest.err ||
6350           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6351         am_cv_CC_dependencies_compiler_type=$depmode
6352         break
6353       fi
6354     fi
6355   done
6356
6357   cd ..
6358   rm -rf conftest.dir
6359 else
6360   am_cv_CC_dependencies_compiler_type=none
6361 fi
6362
6363 fi
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6365 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6366 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6367
6368
6369
6370 if
6371   test "x$enable_dependency_tracking" != xno \
6372   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6373   am__fastdepCC_TRUE=
6374   am__fastdepCC_FALSE='#'
6375 else
6376   am__fastdepCC_TRUE='#'
6377   am__fastdepCC_FALSE=
6378 fi
6379
6380
6381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6382 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6383 if test "${lt_cv_path_SED+set}" = set; then :
6384   $as_echo_n "(cached) " >&6
6385 else
6386   # Loop through the user's path and test for sed and gsed.
6387 # Then use that list of sed's as ones to test for truncation.
6388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6389 for as_dir in $PATH
6390 do
6391   IFS=$as_save_IFS
6392   test -z "$as_dir" && as_dir=.
6393   for lt_ac_prog in sed gsed; do
6394     for ac_exec_ext in '' $ac_executable_extensions; do
6395       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6396         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6397       fi
6398     done
6399   done
6400 done
6401 lt_ac_max=0
6402 lt_ac_count=0
6403 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6404 # along with /bin/sed that truncates output.
6405 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6406   test ! -f $lt_ac_sed && continue
6407   cat /dev/null > conftest.in
6408   lt_ac_count=0
6409   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6410   # Check for GNU sed and select it if it is found.
6411   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6412     lt_cv_path_SED=$lt_ac_sed
6413     break
6414   fi
6415   while true; do
6416     cat conftest.in conftest.in >conftest.tmp
6417     mv conftest.tmp conftest.in
6418     cp conftest.in conftest.nl
6419     echo >>conftest.nl
6420     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6421     cmp -s conftest.out conftest.nl || break
6422     # 10000 chars as input seems more than enough
6423     test $lt_ac_count -gt 10 && break
6424     lt_ac_count=`expr $lt_ac_count + 1`
6425     if test $lt_ac_count -gt $lt_ac_max; then
6426       lt_ac_max=$lt_ac_count
6427       lt_cv_path_SED=$lt_ac_sed
6428     fi
6429   done
6430 done
6431
6432 fi
6433
6434 SED=$lt_cv_path_SED
6435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
6436 $as_echo "$SED" >&6; }
6437
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6439 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6440 if test "${ac_cv_path_GREP+set}" = set; then :
6441   $as_echo_n "(cached) " >&6
6442 else
6443   if test -z "$GREP"; then
6444   ac_path_GREP_found=false
6445   # Loop through the user's path and test for each of PROGNAME-LIST
6446   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6447 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6448 do
6449   IFS=$as_save_IFS
6450   test -z "$as_dir" && as_dir=.
6451     for ac_prog in grep ggrep; do
6452     for ac_exec_ext in '' $ac_executable_extensions; do
6453       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6454       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6455 # Check for GNU ac_path_GREP and select it if it is found.
6456   # Check for GNU $ac_path_GREP
6457 case `"$ac_path_GREP" --version 2>&1` in
6458 *GNU*)
6459   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6460 *)
6461   ac_count=0
6462   $as_echo_n 0123456789 >"conftest.in"
6463   while :
6464   do
6465     cat "conftest.in" "conftest.in" >"conftest.tmp"
6466     mv "conftest.tmp" "conftest.in"
6467     cp "conftest.in" "conftest.nl"
6468     $as_echo 'GREP' >> "conftest.nl"
6469     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6470     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6471     as_fn_arith $ac_count + 1 && ac_count=$as_val
6472     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6473       # Best one so far, save it but keep looking for a better one
6474       ac_cv_path_GREP="$ac_path_GREP"
6475       ac_path_GREP_max=$ac_count
6476     fi
6477     # 10*(2^10) chars as input seems more than enough
6478     test $ac_count -gt 10 && break
6479   done
6480   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6481 esac
6482
6483       $ac_path_GREP_found && break 3
6484     done
6485   done
6486   done
6487 IFS=$as_save_IFS
6488   if test -z "$ac_cv_path_GREP"; then
6489     as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6490   fi
6491 else
6492   ac_cv_path_GREP=$GREP
6493 fi
6494
6495 fi
6496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6497 $as_echo "$ac_cv_path_GREP" >&6; }
6498  GREP="$ac_cv_path_GREP"
6499
6500
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6502 $as_echo_n "checking for egrep... " >&6; }
6503 if test "${ac_cv_path_EGREP+set}" = set; then :
6504   $as_echo_n "(cached) " >&6
6505 else
6506   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6507    then ac_cv_path_EGREP="$GREP -E"
6508    else
6509      if test -z "$EGREP"; then
6510   ac_path_EGREP_found=false
6511   # Loop through the user's path and test for each of PROGNAME-LIST
6512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6513 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6514 do
6515   IFS=$as_save_IFS
6516   test -z "$as_dir" && as_dir=.
6517     for ac_prog in egrep; do
6518     for ac_exec_ext in '' $ac_executable_extensions; do
6519       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6520       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6521 # Check for GNU ac_path_EGREP and select it if it is found.
6522   # Check for GNU $ac_path_EGREP
6523 case `"$ac_path_EGREP" --version 2>&1` in
6524 *GNU*)
6525   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6526 *)
6527   ac_count=0
6528   $as_echo_n 0123456789 >"conftest.in"
6529   while :
6530   do
6531     cat "conftest.in" "conftest.in" >"conftest.tmp"
6532     mv "conftest.tmp" "conftest.in"
6533     cp "conftest.in" "conftest.nl"
6534     $as_echo 'EGREP' >> "conftest.nl"
6535     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6536     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6537     as_fn_arith $ac_count + 1 && ac_count=$as_val
6538     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6539       # Best one so far, save it but keep looking for a better one
6540       ac_cv_path_EGREP="$ac_path_EGREP"
6541       ac_path_EGREP_max=$ac_count
6542     fi
6543     # 10*(2^10) chars as input seems more than enough
6544     test $ac_count -gt 10 && break
6545   done
6546   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6547 esac
6548
6549       $ac_path_EGREP_found && break 3
6550     done
6551   done
6552   done
6553 IFS=$as_save_IFS
6554   if test -z "$ac_cv_path_EGREP"; then
6555     as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6556   fi
6557 else
6558   ac_cv_path_EGREP=$EGREP
6559 fi
6560
6561    fi
6562 fi
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6564 $as_echo "$ac_cv_path_EGREP" >&6; }
6565  EGREP="$ac_cv_path_EGREP"
6566
6567
6568
6569 # Check whether --with-gnu-ld was given.
6570 if test "${with_gnu_ld+set}" = set; then :
6571   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6572 else
6573   with_gnu_ld=no
6574 fi
6575
6576 ac_prog=ld
6577 if test "$GCC" = yes; then
6578   # Check if gcc -print-prog-name=ld gives a path.
6579   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
6580 $as_echo_n "checking for ld used by $CC... " >&6; }
6581   case $host in
6582   *-*-mingw*)
6583     # gcc leaves a trailing carriage return which upsets mingw
6584     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6585   *)
6586     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6587   esac
6588   case $ac_prog in
6589     # Accept absolute paths.
6590     [\\/]* | ?:[\\/]*)
6591       re_direlt='/[^/][^/]*/\.\./'
6592       # Canonicalize the pathname of ld
6593       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
6594       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6595         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
6596       done
6597       test -z "$LD" && LD="$ac_prog"
6598       ;;
6599   "")
6600     # If it fails, then pretend we aren't using GCC.
6601     ac_prog=ld
6602     ;;
6603   *)
6604     # If it is relative, then search for the first ld in PATH.
6605     with_gnu_ld=unknown
6606     ;;
6607   esac
6608 elif test "$with_gnu_ld" = yes; then
6609   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6610 $as_echo_n "checking for GNU ld... " >&6; }
6611 else
6612   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6613 $as_echo_n "checking for non-GNU ld... " >&6; }
6614 fi
6615 if test "${lt_cv_path_LD+set}" = set; then :
6616   $as_echo_n "(cached) " >&6
6617 else
6618   if test -z "$LD"; then
6619   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6620   for ac_dir in $PATH; do
6621     IFS="$lt_save_ifs"
6622     test -z "$ac_dir" && ac_dir=.
6623     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6624       lt_cv_path_LD="$ac_dir/$ac_prog"
6625       # Check to see if the program is GNU ld.  I'd rather use --version,
6626       # but apparently some variants of GNU ld only accept -v.
6627       # Break only if it was the GNU/non-GNU ld that we prefer.
6628       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6629       *GNU* | *'with BFD'*)
6630         test "$with_gnu_ld" != no && break
6631         ;;
6632       *)
6633         test "$with_gnu_ld" != yes && break
6634         ;;
6635       esac
6636     fi
6637   done
6638   IFS="$lt_save_ifs"
6639 else
6640   lt_cv_path_LD="$LD" # Let the user override the test with a path.
6641 fi
6642 fi
6643
6644 LD="$lt_cv_path_LD"
6645 if test -n "$LD"; then
6646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6647 $as_echo "$LD" >&6; }
6648 else
6649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6650 $as_echo "no" >&6; }
6651 fi
6652 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6654 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6655 if test "${lt_cv_prog_gnu_ld+set}" = set; then :
6656   $as_echo_n "(cached) " >&6
6657 else
6658   # I'd rather use --version here, but apparently some GNU lds only accept -v.
6659 case `$LD -v 2>&1 </dev/null` in
6660 *GNU* | *'with BFD'*)
6661   lt_cv_prog_gnu_ld=yes
6662   ;;
6663 *)
6664   lt_cv_prog_gnu_ld=no
6665   ;;
6666 esac
6667 fi
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
6669 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
6670 with_gnu_ld=$lt_cv_prog_gnu_ld
6671
6672
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6674 $as_echo_n "checking for $LD option to reload object files... " >&6; }
6675 if test "${lt_cv_ld_reload_flag+set}" = set; then :
6676   $as_echo_n "(cached) " >&6
6677 else
6678   lt_cv_ld_reload_flag='-r'
6679 fi
6680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6681 $as_echo "$lt_cv_ld_reload_flag" >&6; }
6682 reload_flag=$lt_cv_ld_reload_flag
6683 case $reload_flag in
6684 "" | " "*) ;;
6685 *) reload_flag=" $reload_flag" ;;
6686 esac
6687 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6688 case $host_os in
6689   darwin*)
6690     if test "$GCC" = yes; then
6691       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
6692     else
6693       reload_cmds='$LD$reload_flag -o $output$reload_objs'
6694     fi
6695     ;;
6696 esac
6697
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5
6699 $as_echo_n "checking for BSD-compatible nm... " >&6; }
6700 if test "${lt_cv_path_NM+set}" = set; then :
6701   $as_echo_n "(cached) " >&6
6702 else
6703   if test -n "$NM"; then
6704   # Let the user override the test.
6705   lt_cv_path_NM="$NM"
6706 else
6707   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6708   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
6709     IFS="$lt_save_ifs"
6710     test -z "$ac_dir" && ac_dir=.
6711     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
6712     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6713       # Check to see if the nm accepts a BSD-compat flag.
6714       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
6715       #   nm: unknown option "B" ignored
6716       # Tru64's nm complains that /dev/null is an invalid object file
6717       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
6718       */dev/null* | *'Invalid file or object type'*)
6719         lt_cv_path_NM="$tmp_nm -B"
6720         break
6721         ;;
6722       *)
6723         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
6724         */dev/null*)
6725           lt_cv_path_NM="$tmp_nm -p"
6726           break
6727           ;;
6728         *)
6729           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6730           continue # so that we can try to find one that supports BSD flags
6731           ;;
6732         esac
6733       esac
6734     fi
6735   done
6736   IFS="$lt_save_ifs"
6737   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
6738 fi
6739 fi
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
6741 $as_echo "$lt_cv_path_NM" >&6; }
6742 NM="$lt_cv_path_NM"
6743
6744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6745 $as_echo_n "checking whether ln -s works... " >&6; }
6746 LN_S=$as_ln_s
6747 if test "$LN_S" = "ln -s"; then
6748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6749 $as_echo "yes" >&6; }
6750 else
6751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6752 $as_echo "no, using $LN_S" >&6; }
6753 fi
6754
6755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognise dependent libraries" >&5
6756 $as_echo_n "checking how to recognise dependent libraries... " >&6; }
6757 if test "${lt_cv_deplibs_check_method+set}" = set; then :
6758   $as_echo_n "(cached) " >&6
6759 else
6760   lt_cv_file_magic_cmd='$MAGIC_CMD'
6761 lt_cv_file_magic_test_file=
6762 lt_cv_deplibs_check_method='unknown'
6763 # Need to set the preceding variable on all platforms that support
6764 # interlibrary dependencies.
6765 # 'none' -- dependencies not supported.
6766 # `unknown' -- same as none, but documents that we really don't know.
6767 # 'pass_all' -- all dependencies passed with no checks.
6768 # 'test_compile' -- check by making test program.
6769 # 'file_magic [[regex]]' -- check by looking for files in library path
6770 # which responds to the $file_magic_cmd with a given extended regex.
6771 # If you have `file' or equivalent on your system and you're not sure
6772 # whether `pass_all' will *always* work, you probably want this one.
6773
6774 case $host_os in
6775 aix4* | aix5*)
6776   lt_cv_deplibs_check_method=pass_all
6777   ;;
6778
6779 beos*)
6780   lt_cv_deplibs_check_method=pass_all
6781   ;;
6782
6783 bsdi[45]*)
6784   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6785   lt_cv_file_magic_cmd='/usr/bin/file -L'
6786   lt_cv_file_magic_test_file=/shlib/libc.so
6787   ;;
6788
6789 cygwin*)
6790   # func_win32_libid is a shell function defined in ltmain.sh
6791   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6792   lt_cv_file_magic_cmd='func_win32_libid'
6793   ;;
6794
6795 mingw* | pw32*)
6796   # Base MSYS/MinGW do not provide the 'file' command needed by
6797   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
6798   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6799   lt_cv_file_magic_cmd='$OBJDUMP -f'
6800   ;;
6801
6802 darwin* | rhapsody*)
6803   lt_cv_deplibs_check_method=pass_all
6804   ;;
6805
6806 freebsd* | kfreebsd*-gnu | dragonfly*)
6807   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6808     case $host_cpu in
6809     i*86 )
6810       # Not sure whether the presence of OpenBSD here was a mistake.
6811       # Let's accept both of them until this is cleared up.
6812       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6813       lt_cv_file_magic_cmd=/usr/bin/file
6814       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6815       ;;
6816     esac
6817   else
6818     lt_cv_deplibs_check_method=pass_all
6819   fi
6820   ;;
6821
6822 gnu*)
6823   lt_cv_deplibs_check_method=pass_all
6824   ;;
6825
6826 hpux10.20* | hpux11*)
6827   lt_cv_file_magic_cmd=/usr/bin/file
6828   case $host_cpu in
6829   ia64*)
6830     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6831     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6832     ;;
6833   hppa*64*)
6834     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]'
6835     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6836     ;;
6837   *)
6838     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
6839     lt_cv_file_magic_test_file=/usr/lib/libc.sl
6840     ;;
6841   esac
6842   ;;
6843
6844 irix5* | irix6* | nonstopux*)
6845   case $LD in
6846   *-32|*"-32 ") libmagic=32-bit;;
6847   *-n32|*"-n32 ") libmagic=N32;;
6848   *-64|*"-64 ") libmagic=64-bit;;
6849   *) libmagic=never-match;;
6850   esac
6851   lt_cv_deplibs_check_method=pass_all
6852   ;;
6853
6854 # This must be Linux ELF.
6855 linux*)
6856   lt_cv_deplibs_check_method=pass_all
6857   ;;
6858
6859 netbsd*)
6860   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6861     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6862   else
6863     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6864   fi
6865   ;;
6866
6867 newos6*)
6868   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6869   lt_cv_file_magic_cmd=/usr/bin/file
6870   lt_cv_file_magic_test_file=/usr/lib/libnls.so
6871   ;;
6872
6873 nto-qnx*)
6874   lt_cv_deplibs_check_method=unknown
6875   ;;
6876
6877 openbsd*)
6878   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6879     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6880   else
6881     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6882   fi
6883   ;;
6884
6885 osf3* | osf4* | osf5*)
6886   lt_cv_deplibs_check_method=pass_all
6887   ;;
6888
6889 sco3.2v5*)
6890   lt_cv_deplibs_check_method=pass_all
6891   ;;
6892
6893 solaris*)
6894   lt_cv_deplibs_check_method=pass_all
6895   ;;
6896
6897 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6898   case $host_vendor in
6899   motorola)
6900     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]'
6901     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6902     ;;
6903   ncr)
6904     lt_cv_deplibs_check_method=pass_all
6905     ;;
6906   sequent)
6907     lt_cv_file_magic_cmd='/bin/file'
6908     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6909     ;;
6910   sni)
6911     lt_cv_file_magic_cmd='/bin/file'
6912     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6913     lt_cv_file_magic_test_file=/lib/libc.so
6914     ;;
6915   siemens)
6916     lt_cv_deplibs_check_method=pass_all
6917     ;;
6918   esac
6919   ;;
6920
6921 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
6922   lt_cv_deplibs_check_method=pass_all
6923   ;;
6924 esac
6925
6926 fi
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6928 $as_echo "$lt_cv_deplibs_check_method" >&6; }
6929 file_magic_cmd=$lt_cv_file_magic_cmd
6930 deplibs_check_method=$lt_cv_deplibs_check_method
6931 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6932
6933
6934
6935
6936 # If no C compiler was specified, use CC.
6937 LTCC=${LTCC-"$CC"}
6938
6939 # Allow CC to be a program name with arguments.
6940 compiler=$CC
6941
6942
6943 # Check whether --enable-libtool-lock was given.
6944 if test "${enable_libtool_lock+set}" = set; then :
6945   enableval=$enable_libtool_lock;
6946 fi
6947
6948 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6949
6950 # Some flags need to be propagated to the compiler or linker for good
6951 # libtool support.
6952 case $host in
6953 ia64-*-hpux*)
6954   # Find out which ABI we are using.
6955   echo 'int i;' > conftest.$ac_ext
6956   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6957   (eval $ac_compile) 2>&5
6958   ac_status=$?
6959   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6960   test $ac_status = 0; }; then
6961     case `/usr/bin/file conftest.$ac_objext` in
6962     *ELF-32*)
6963       HPUX_IA64_MODE="32"
6964       ;;
6965     *ELF-64*)
6966       HPUX_IA64_MODE="64"
6967       ;;
6968     esac
6969   fi
6970   rm -rf conftest*
6971   ;;
6972 *-*-irix6*)
6973   # Find out which ABI we are using.
6974   echo '#line 6974 "configure"' > conftest.$ac_ext
6975   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6976   (eval $ac_compile) 2>&5
6977   ac_status=$?
6978   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6979   test $ac_status = 0; }; then
6980    if test "$lt_cv_prog_gnu_ld" = yes; then
6981     case `/usr/bin/file conftest.$ac_objext` in
6982     *32-bit*)
6983       LD="${LD-ld} -melf32bsmip"
6984       ;;
6985     *N32*)
6986       LD="${LD-ld} -melf32bmipn32"
6987       ;;
6988     *64-bit*)
6989       LD="${LD-ld} -melf64bmip"
6990       ;;
6991     esac
6992    else
6993     case `/usr/bin/file conftest.$ac_objext` in
6994     *32-bit*)
6995       LD="${LD-ld} -32"
6996       ;;
6997     *N32*)
6998       LD="${LD-ld} -n32"
6999       ;;
7000     *64-bit*)
7001       LD="${LD-ld} -64"
7002       ;;
7003     esac
7004    fi
7005   fi
7006   rm -rf conftest*
7007   ;;
7008
7009 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
7010   # Find out which ABI we are using.
7011   echo 'int i;' > conftest.$ac_ext
7012   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7013   (eval $ac_compile) 2>&5
7014   ac_status=$?
7015   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7016   test $ac_status = 0; }; then
7017     case `/usr/bin/file conftest.o` in
7018     *32-bit*)
7019       case $host in
7020         x86_64-*linux*)
7021           LD="${LD-ld} -m elf_i386"
7022           ;;
7023         ppc64-*linux*|powerpc64-*linux*)
7024           LD="${LD-ld} -m elf32ppclinux"
7025           ;;
7026         s390x-*linux*)
7027           LD="${LD-ld} -m elf_s390"
7028           ;;
7029         sparc64-*linux*)
7030           LD="${LD-ld} -m elf32_sparc"
7031           ;;
7032       esac
7033       ;;
7034     *64-bit*)
7035       case $host in
7036         x86_64-*linux*)
7037           LD="${LD-ld} -m elf_x86_64"
7038           ;;
7039         ppc*-*linux*|powerpc*-*linux*)
7040           LD="${LD-ld} -m elf64ppc"
7041           ;;
7042         s390*-*linux*)
7043           LD="${LD-ld} -m elf64_s390"
7044           ;;
7045         sparc*-*linux*)
7046           LD="${LD-ld} -m elf64_sparc"
7047           ;;
7048       esac
7049       ;;
7050     esac
7051   fi
7052   rm -rf conftest*
7053   ;;
7054
7055 *-*-sco3.2v5*)
7056   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
7057   SAVE_CFLAGS="$CFLAGS"
7058   CFLAGS="$CFLAGS -belf"
7059   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
7060 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
7061 if test "${lt_cv_cc_needs_belf+set}" = set; then :
7062   $as_echo_n "(cached) " >&6
7063 else
7064   ac_ext=c
7065 ac_cpp='$CPP $CPPFLAGS'
7066 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7067 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7068 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7069
7070      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7071 /* end confdefs.h.  */
7072
7073 int
7074 main ()
7075 {
7076
7077   ;
7078   return 0;
7079 }
7080 _ACEOF
7081 if ac_fn_c_try_link "$LINENO"; then :
7082   lt_cv_cc_needs_belf=yes
7083 else
7084   lt_cv_cc_needs_belf=no
7085 fi
7086 rm -f core conftest.err conftest.$ac_objext \
7087     conftest$ac_exeext conftest.$ac_ext
7088      ac_ext=c
7089 ac_cpp='$CPP $CPPFLAGS'
7090 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7091 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7092 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7093
7094 fi
7095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7096 $as_echo "$lt_cv_cc_needs_belf" >&6; }
7097   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7098     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7099     CFLAGS="$SAVE_CFLAGS"
7100   fi
7101   ;;
7102 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
7103   if test -n "$ac_tool_prefix"; then
7104   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7105 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7107 $as_echo_n "checking for $ac_word... " >&6; }
7108 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7109   $as_echo_n "(cached) " >&6
7110 else
7111   if test -n "$DLLTOOL"; then
7112   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7113 else
7114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7115 for as_dir in $PATH
7116 do
7117   IFS=$as_save_IFS
7118   test -z "$as_dir" && as_dir=.
7119     for ac_exec_ext in '' $ac_executable_extensions; do
7120   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7121     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7122     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7123     break 2
7124   fi
7125 done
7126   done
7127 IFS=$as_save_IFS
7128
7129 fi
7130 fi
7131 DLLTOOL=$ac_cv_prog_DLLTOOL
7132 if test -n "$DLLTOOL"; then
7133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7134 $as_echo "$DLLTOOL" >&6; }
7135 else
7136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7137 $as_echo "no" >&6; }
7138 fi
7139
7140
7141 fi
7142 if test -z "$ac_cv_prog_DLLTOOL"; then
7143   ac_ct_DLLTOOL=$DLLTOOL
7144   # Extract the first word of "dlltool", so it can be a program name with args.
7145 set dummy dlltool; ac_word=$2
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7147 $as_echo_n "checking for $ac_word... " >&6; }
7148 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7149   $as_echo_n "(cached) " >&6
7150 else
7151   if test -n "$ac_ct_DLLTOOL"; then
7152   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7153 else
7154 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7155 for as_dir in $PATH
7156 do
7157   IFS=$as_save_IFS
7158   test -z "$as_dir" && as_dir=.
7159     for ac_exec_ext in '' $ac_executable_extensions; do
7160   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7161     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7163     break 2
7164   fi
7165 done
7166   done
7167 IFS=$as_save_IFS
7168
7169 fi
7170 fi
7171 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7172 if test -n "$ac_ct_DLLTOOL"; then
7173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7174 $as_echo "$ac_ct_DLLTOOL" >&6; }
7175 else
7176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7177 $as_echo "no" >&6; }
7178 fi
7179
7180   if test "x$ac_ct_DLLTOOL" = x; then
7181     DLLTOOL="false"
7182   else
7183     case $cross_compiling:$ac_tool_warned in
7184 yes:)
7185 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7186 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7187 ac_tool_warned=yes ;;
7188 esac
7189     DLLTOOL=$ac_ct_DLLTOOL
7190   fi
7191 else
7192   DLLTOOL="$ac_cv_prog_DLLTOOL"
7193 fi
7194
7195   if test -n "$ac_tool_prefix"; then
7196   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
7197 set dummy ${ac_tool_prefix}as; ac_word=$2
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7199 $as_echo_n "checking for $ac_word... " >&6; }
7200 if test "${ac_cv_prog_AS+set}" = set; then :
7201   $as_echo_n "(cached) " >&6
7202 else
7203   if test -n "$AS"; then
7204   ac_cv_prog_AS="$AS" # Let the user override the test.
7205 else
7206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7207 for as_dir in $PATH
7208 do
7209   IFS=$as_save_IFS
7210   test -z "$as_dir" && as_dir=.
7211     for ac_exec_ext in '' $ac_executable_extensions; do
7212   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7213     ac_cv_prog_AS="${ac_tool_prefix}as"
7214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7215     break 2
7216   fi
7217 done
7218   done
7219 IFS=$as_save_IFS
7220
7221 fi
7222 fi
7223 AS=$ac_cv_prog_AS
7224 if test -n "$AS"; then
7225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
7226 $as_echo "$AS" >&6; }
7227 else
7228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7229 $as_echo "no" >&6; }
7230 fi
7231
7232
7233 fi
7234 if test -z "$ac_cv_prog_AS"; then
7235   ac_ct_AS=$AS
7236   # Extract the first word of "as", so it can be a program name with args.
7237 set dummy as; ac_word=$2
7238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7239 $as_echo_n "checking for $ac_word... " >&6; }
7240 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
7241   $as_echo_n "(cached) " >&6
7242 else
7243   if test -n "$ac_ct_AS"; then
7244   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
7245 else
7246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7247 for as_dir in $PATH
7248 do
7249   IFS=$as_save_IFS
7250   test -z "$as_dir" && as_dir=.
7251     for ac_exec_ext in '' $ac_executable_extensions; do
7252   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7253     ac_cv_prog_ac_ct_AS="as"
7254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7255     break 2
7256   fi
7257 done
7258   done
7259 IFS=$as_save_IFS
7260
7261 fi
7262 fi
7263 ac_ct_AS=$ac_cv_prog_ac_ct_AS
7264 if test -n "$ac_ct_AS"; then
7265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
7266 $as_echo "$ac_ct_AS" >&6; }
7267 else
7268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7269 $as_echo "no" >&6; }
7270 fi
7271
7272   if test "x$ac_ct_AS" = x; then
7273     AS="false"
7274   else
7275     case $cross_compiling:$ac_tool_warned in
7276 yes:)
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7278 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7279 ac_tool_warned=yes ;;
7280 esac
7281     AS=$ac_ct_AS
7282   fi
7283 else
7284   AS="$ac_cv_prog_AS"
7285 fi
7286
7287   if test -n "$ac_tool_prefix"; then
7288   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7289 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7291 $as_echo_n "checking for $ac_word... " >&6; }
7292 if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
7293   $as_echo_n "(cached) " >&6
7294 else
7295   if test -n "$OBJDUMP"; then
7296   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7297 else
7298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7299 for as_dir in $PATH
7300 do
7301   IFS=$as_save_IFS
7302   test -z "$as_dir" && as_dir=.
7303     for ac_exec_ext in '' $ac_executable_extensions; do
7304   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7305     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7307     break 2
7308   fi
7309 done
7310   done
7311 IFS=$as_save_IFS
7312
7313 fi
7314 fi
7315 OBJDUMP=$ac_cv_prog_OBJDUMP
7316 if test -n "$OBJDUMP"; then
7317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7318 $as_echo "$OBJDUMP" >&6; }
7319 else
7320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7321 $as_echo "no" >&6; }
7322 fi
7323
7324
7325 fi
7326 if test -z "$ac_cv_prog_OBJDUMP"; then
7327   ac_ct_OBJDUMP=$OBJDUMP
7328   # Extract the first word of "objdump", so it can be a program name with args.
7329 set dummy objdump; ac_word=$2
7330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7331 $as_echo_n "checking for $ac_word... " >&6; }
7332 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
7333   $as_echo_n "(cached) " >&6
7334 else
7335   if test -n "$ac_ct_OBJDUMP"; then
7336   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7337 else
7338 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7339 for as_dir in $PATH
7340 do
7341   IFS=$as_save_IFS
7342   test -z "$as_dir" && as_dir=.
7343     for ac_exec_ext in '' $ac_executable_extensions; do
7344   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7345     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7346     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7347     break 2
7348   fi
7349 done
7350   done
7351 IFS=$as_save_IFS
7352
7353 fi
7354 fi
7355 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7356 if test -n "$ac_ct_OBJDUMP"; then
7357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7358 $as_echo "$ac_ct_OBJDUMP" >&6; }
7359 else
7360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7361 $as_echo "no" >&6; }
7362 fi
7363
7364   if test "x$ac_ct_OBJDUMP" = x; then
7365     OBJDUMP="false"
7366   else
7367     case $cross_compiling:$ac_tool_warned in
7368 yes:)
7369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7370 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7371 ac_tool_warned=yes ;;
7372 esac
7373     OBJDUMP=$ac_ct_OBJDUMP
7374   fi
7375 else
7376   OBJDUMP="$ac_cv_prog_OBJDUMP"
7377 fi
7378
7379   ;;
7380
7381 esac
7382
7383 need_locks="$enable_libtool_lock"
7384
7385
7386 ac_ext=c
7387 ac_cpp='$CPP $CPPFLAGS'
7388 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7389 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7390 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7392 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7393 # On Suns, sometimes $CPP names a directory.
7394 if test -n "$CPP" && test -d "$CPP"; then
7395   CPP=
7396 fi
7397 if test -z "$CPP"; then
7398   if test "${ac_cv_prog_CPP+set}" = set; then :
7399   $as_echo_n "(cached) " >&6
7400 else
7401       # Double quotes because CPP needs to be expanded
7402     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7403     do
7404       ac_preproc_ok=false
7405 for ac_c_preproc_warn_flag in '' yes
7406 do
7407   # Use a header file that comes with gcc, so configuring glibc
7408   # with a fresh cross-compiler works.
7409   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7410   # <limits.h> exists even on freestanding compilers.
7411   # On the NeXT, cc -E runs the code through the compiler's parser,
7412   # not just through cpp. "Syntax error" is here to catch this case.
7413   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7414 /* end confdefs.h.  */
7415 #ifdef __STDC__
7416 # include <limits.h>
7417 #else
7418 # include <assert.h>
7419 #endif
7420                      Syntax error
7421 _ACEOF
7422 if ac_fn_c_try_cpp "$LINENO"; then :
7423
7424 else
7425   # Broken: fails on valid input.
7426 continue
7427 fi
7428 rm -f conftest.err conftest.$ac_ext
7429
7430   # OK, works on sane cases.  Now check whether nonexistent headers
7431   # can be detected and how.
7432   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7433 /* end confdefs.h.  */
7434 #include <ac_nonexistent.h>
7435 _ACEOF
7436 if ac_fn_c_try_cpp "$LINENO"; then :
7437   # Broken: success on invalid input.
7438 continue
7439 else
7440   # Passes both tests.
7441 ac_preproc_ok=:
7442 break
7443 fi
7444 rm -f conftest.err conftest.$ac_ext
7445
7446 done
7447 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7448 rm -f conftest.err conftest.$ac_ext
7449 if $ac_preproc_ok; then :
7450   break
7451 fi
7452
7453     done
7454     ac_cv_prog_CPP=$CPP
7455
7456 fi
7457   CPP=$ac_cv_prog_CPP
7458 else
7459   ac_cv_prog_CPP=$CPP
7460 fi
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7462 $as_echo "$CPP" >&6; }
7463 ac_preproc_ok=false
7464 for ac_c_preproc_warn_flag in '' yes
7465 do
7466   # Use a header file that comes with gcc, so configuring glibc
7467   # with a fresh cross-compiler works.
7468   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7469   # <limits.h> exists even on freestanding compilers.
7470   # On the NeXT, cc -E runs the code through the compiler's parser,
7471   # not just through cpp. "Syntax error" is here to catch this case.
7472   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7473 /* end confdefs.h.  */
7474 #ifdef __STDC__
7475 # include <limits.h>
7476 #else
7477 # include <assert.h>
7478 #endif
7479                      Syntax error
7480 _ACEOF
7481 if ac_fn_c_try_cpp "$LINENO"; then :
7482
7483 else
7484   # Broken: fails on valid input.
7485 continue
7486 fi
7487 rm -f conftest.err conftest.$ac_ext
7488
7489   # OK, works on sane cases.  Now check whether nonexistent headers
7490   # can be detected and how.
7491   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7492 /* end confdefs.h.  */
7493 #include <ac_nonexistent.h>
7494 _ACEOF
7495 if ac_fn_c_try_cpp "$LINENO"; then :
7496   # Broken: success on invalid input.
7497 continue
7498 else
7499   # Passes both tests.
7500 ac_preproc_ok=:
7501 break
7502 fi
7503 rm -f conftest.err conftest.$ac_ext
7504
7505 done
7506 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7507 rm -f conftest.err conftest.$ac_ext
7508 if $ac_preproc_ok; then :
7509
7510 else
7511   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7512 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7513 as_fn_error "C preprocessor \"$CPP\" fails sanity check
7514 See \`config.log' for more details." "$LINENO" 5; }
7515 fi
7516
7517 ac_ext=c
7518 ac_cpp='$CPP $CPPFLAGS'
7519 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7520 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7521 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7522
7523
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7525 $as_echo_n "checking for ANSI C header files... " >&6; }
7526 if test "${ac_cv_header_stdc+set}" = set; then :
7527   $as_echo_n "(cached) " >&6
7528 else
7529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7530 /* end confdefs.h.  */
7531 #include <stdlib.h>
7532 #include <stdarg.h>
7533 #include <string.h>
7534 #include <float.h>
7535
7536 int
7537 main ()
7538 {
7539
7540   ;
7541   return 0;
7542 }
7543 _ACEOF
7544 if ac_fn_c_try_compile "$LINENO"; then :
7545   ac_cv_header_stdc=yes
7546 else
7547   ac_cv_header_stdc=no
7548 fi
7549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7550
7551 if test $ac_cv_header_stdc = yes; then
7552   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7554 /* end confdefs.h.  */
7555 #include <string.h>
7556
7557 _ACEOF
7558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7559   $EGREP "memchr" >/dev/null 2>&1; then :
7560
7561 else
7562   ac_cv_header_stdc=no
7563 fi
7564 rm -f conftest*
7565
7566 fi
7567
7568 if test $ac_cv_header_stdc = yes; then
7569   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7571 /* end confdefs.h.  */
7572 #include <stdlib.h>
7573
7574 _ACEOF
7575 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7576   $EGREP "free" >/dev/null 2>&1; then :
7577
7578 else
7579   ac_cv_header_stdc=no
7580 fi
7581 rm -f conftest*
7582
7583 fi
7584
7585 if test $ac_cv_header_stdc = yes; then
7586   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7587   if test "$cross_compiling" = yes; then :
7588   :
7589 else
7590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7591 /* end confdefs.h.  */
7592 #include <ctype.h>
7593 #include <stdlib.h>
7594 #if ((' ' & 0x0FF) == 0x020)
7595 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7596 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7597 #else
7598 # define ISLOWER(c) \
7599                    (('a' <= (c) && (c) <= 'i') \
7600                      || ('j' <= (c) && (c) <= 'r') \
7601                      || ('s' <= (c) && (c) <= 'z'))
7602 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7603 #endif
7604
7605 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7606 int
7607 main ()
7608 {
7609   int i;
7610   for (i = 0; i < 256; i++)
7611     if (XOR (islower (i), ISLOWER (i))
7612         || toupper (i) != TOUPPER (i))
7613       return 2;
7614   return 0;
7615 }
7616 _ACEOF
7617 if ac_fn_c_try_run "$LINENO"; then :
7618
7619 else
7620   ac_cv_header_stdc=no
7621 fi
7622 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7623   conftest.$ac_objext conftest.beam conftest.$ac_ext
7624 fi
7625
7626 fi
7627 fi
7628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7629 $as_echo "$ac_cv_header_stdc" >&6; }
7630 if test $ac_cv_header_stdc = yes; then
7631
7632 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7633
7634 fi
7635
7636 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7637 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7638                   inttypes.h stdint.h unistd.h
7639 do :
7640   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7641 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7642 "
7643 eval as_val=\$$as_ac_Header
7644    if test "x$as_val" = x""yes; then :
7645   cat >>confdefs.h <<_ACEOF
7646 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7647 _ACEOF
7648
7649 fi
7650
7651 done
7652
7653
7654 for ac_header in dlfcn.h
7655 do :
7656   ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
7657 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
7658   cat >>confdefs.h <<_ACEOF
7659 #define HAVE_DLFCN_H 1
7660 _ACEOF
7661
7662 fi
7663
7664 done
7665
7666
7667 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
7668
7669 # find the maximum length of command line arguments
7670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7671 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7672 if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
7673   $as_echo_n "(cached) " >&6
7674 else
7675     i=0
7676   teststring="ABCD"
7677
7678   case $build_os in
7679   msdosdjgpp*)
7680     # On DJGPP, this test can blow up pretty badly due to problems in libc
7681     # (any single argument exceeding 2000 bytes causes a buffer overrun
7682     # during glob expansion).  Even if it were fixed, the result of this
7683     # check would be larger than it should be.
7684     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7685     ;;
7686
7687   gnu*)
7688     # Under GNU Hurd, this test is not required because there is
7689     # no limit to the length of command line arguments.
7690     # Libtool will interpret -1 as no limit whatsoever
7691     lt_cv_sys_max_cmd_len=-1;
7692     ;;
7693
7694   cygwin* | mingw*)
7695     # On Win9x/ME, this test blows up -- it succeeds, but takes
7696     # about 5 minutes as the teststring grows exponentially.
7697     # Worse, since 9x/ME are not pre-emptively multitasking,
7698     # you end up with a "frozen" computer, even though with patience
7699     # the test eventually succeeds (with a max line length of 256k).
7700     # Instead, let's just punt: use the minimum linelength reported by
7701     # all of the supported platforms: 8192 (on NT/2K/XP).
7702     lt_cv_sys_max_cmd_len=8192;
7703     ;;
7704
7705   amigaos*)
7706     # On AmigaOS with pdksh, this test takes hours, literally.
7707     # So we just punt and use a minimum line length of 8192.
7708     lt_cv_sys_max_cmd_len=8192;
7709     ;;
7710
7711   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7712     # This has been around since 386BSD, at least.  Likely further.
7713     if test -x /sbin/sysctl; then
7714       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7715     elif test -x /usr/sbin/sysctl; then
7716       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7717     else
7718       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7719     fi
7720     # And add a safety zone
7721     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7722     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7723     ;;
7724   osf*)
7725     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7726     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7727     # nice to cause kernel panics so lets avoid the loop below.
7728     # First set a reasonable default.
7729     lt_cv_sys_max_cmd_len=16384
7730     #
7731     if test -x /sbin/sysconfig; then
7732       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7733         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7734       esac
7735     fi
7736     ;;
7737   *)
7738     # If test is not a shell built-in, we'll probably end up computing a
7739     # maximum length that is only half of the actual maximum length, but
7740     # we can't tell.
7741     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7742     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
7743                = "XX$teststring") >/dev/null 2>&1 &&
7744             new_result=`expr "X$teststring" : ".*" 2>&1` &&
7745             lt_cv_sys_max_cmd_len=$new_result &&
7746             test $i != 17 # 1/2 MB should be enough
7747     do
7748       i=`expr $i + 1`
7749       teststring=$teststring$teststring
7750     done
7751     teststring=
7752     # Add a significant safety factor because C++ compilers can tack on massive
7753     # amounts of additional arguments before passing them to the linker.
7754     # It appears as though 1/2 is a usable value.
7755     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7756     ;;
7757   esac
7758
7759 fi
7760
7761 if test -n $lt_cv_sys_max_cmd_len ; then
7762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7763 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7764 else
7765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7766 $as_echo "none" >&6; }
7767 fi
7768
7769
7770
7771
7772 # Check for command to grab the raw symbol name followed by C symbol from nm.
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7774 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
7775 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
7776   $as_echo_n "(cached) " >&6
7777 else
7778
7779 # These are sane defaults that work on at least a few old systems.
7780 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
7781
7782 # Character class describing NM global symbol codes.
7783 symcode='[BCDEGRST]'
7784
7785 # Regexp to match symbols that can be accessed directly from C.
7786 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7787
7788 # Transform an extracted symbol line into a proper C declaration
7789 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
7790
7791 # Transform an extracted symbol line into symbol name and symbol address
7792 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'"
7793
7794 # Define system-specific variables.
7795 case $host_os in
7796 aix*)
7797   symcode='[BCDT]'
7798   ;;
7799 cygwin* | mingw* | pw32*)
7800   symcode='[ABCDGISTW]'
7801   ;;
7802 hpux*) # Its linker distinguishes data from code symbols
7803   if test "$host_cpu" = ia64; then
7804     symcode='[ABCDEGRST]'
7805   fi
7806   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7807   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'"
7808   ;;
7809 linux*)
7810   if test "$host_cpu" = ia64; then
7811     symcode='[ABCDGIRSTW]'
7812     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7813     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'"
7814   fi
7815   ;;
7816 irix* | nonstopux*)
7817   symcode='[BCDEGRST]'
7818   ;;
7819 osf*)
7820   symcode='[BCDEGQRST]'
7821   ;;
7822 solaris* | sysv5*)
7823   symcode='[BDRT]'
7824   ;;
7825 sysv4)
7826   symcode='[DFNSTU]'
7827   ;;
7828 esac
7829
7830 # Handle CRLF in mingw tool chain
7831 opt_cr=
7832 case $build_os in
7833 mingw*)
7834   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7835   ;;
7836 esac
7837
7838 # If we're using GNU nm, then use its standard symbol codes.
7839 case `$NM -V 2>&1` in
7840 *GNU* | *'with BFD'*)
7841   symcode='[ABCDGIRSTW]' ;;
7842 esac
7843
7844 # Try without a prefix undercore, then with it.
7845 for ac_symprfx in "" "_"; do
7846
7847   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7848   symxfrm="\\1 $ac_symprfx\\2 \\2"
7849
7850   # Write the raw and C identifiers.
7851   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7852
7853   # Check to see that the pipe works correctly.
7854   pipe_works=no
7855
7856   rm -f conftest*
7857   cat > conftest.$ac_ext <<EOF
7858 #ifdef __cplusplus
7859 extern "C" {
7860 #endif
7861 char nm_test_var;
7862 void nm_test_func(){}
7863 #ifdef __cplusplus
7864 }
7865 #endif
7866 int main(){nm_test_var='a';nm_test_func();return(0);}
7867 EOF
7868
7869   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7870   (eval $ac_compile) 2>&5
7871   ac_status=$?
7872   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7873   test $ac_status = 0; }; then
7874     # Now try to grab the symbols.
7875     nlist=conftest.nm
7876     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
7877   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
7878   ac_status=$?
7879   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7880   test $ac_status = 0; } && test -s "$nlist"; then
7881       # Try sorting and uniquifying the output.
7882       if sort "$nlist" | uniq > "$nlist"T; then
7883         mv -f "$nlist"T "$nlist"
7884       else
7885         rm -f "$nlist"T
7886       fi
7887
7888       # Make sure that we snagged all the symbols we need.
7889       if grep ' nm_test_var$' "$nlist" >/dev/null; then
7890         if grep ' nm_test_func$' "$nlist" >/dev/null; then
7891           cat <<EOF > conftest.$ac_ext
7892 #ifdef __cplusplus
7893 extern "C" {
7894 #endif
7895
7896 EOF
7897           # Now generate the symbol file.
7898           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7899
7900           cat <<EOF >> conftest.$ac_ext
7901 #if defined (__STDC__) && __STDC__
7902 # define lt_ptr_t void *
7903 #else
7904 # define lt_ptr_t char *
7905 # define const
7906 #endif
7907
7908 /* The mapping between symbol names and symbols. */
7909 const struct {
7910   const char *name;
7911   lt_ptr_t address;
7912 }
7913 lt_preloaded_symbols[] =
7914 {
7915 EOF
7916           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7917           cat <<\EOF >> conftest.$ac_ext
7918   {0, (lt_ptr_t) 0}
7919 };
7920
7921 #ifdef __cplusplus
7922 }
7923 #endif
7924 EOF
7925           # Now try linking the two files.
7926           mv conftest.$ac_objext conftstm.$ac_objext
7927           lt_save_LIBS="$LIBS"
7928           lt_save_CFLAGS="$CFLAGS"
7929           LIBS="conftstm.$ac_objext"
7930           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7931           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7932   (eval $ac_link) 2>&5
7933   ac_status=$?
7934   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7935   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7936             pipe_works=yes
7937           fi
7938           LIBS="$lt_save_LIBS"
7939           CFLAGS="$lt_save_CFLAGS"
7940         else
7941           echo "cannot find nm_test_func in $nlist" >&5
7942         fi
7943       else
7944         echo "cannot find nm_test_var in $nlist" >&5
7945       fi
7946     else
7947       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7948     fi
7949   else
7950     echo "$progname: failed program was:" >&5
7951     cat conftest.$ac_ext >&5
7952   fi
7953   rm -f conftest* conftst*
7954
7955   # Do not use the global_symbol_pipe unless it works.
7956   if test "$pipe_works" = yes; then
7957     break
7958   else
7959     lt_cv_sys_global_symbol_pipe=
7960   fi
7961 done
7962
7963 fi
7964
7965 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7966   lt_cv_sys_global_symbol_to_cdecl=
7967 fi
7968 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7970 $as_echo "failed" >&6; }
7971 else
7972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7973 $as_echo "ok" >&6; }
7974 fi
7975
7976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
7977 $as_echo_n "checking for objdir... " >&6; }
7978 if test "${lt_cv_objdir+set}" = set; then :
7979   $as_echo_n "(cached) " >&6
7980 else
7981   rm -f .libs 2>/dev/null
7982 mkdir .libs 2>/dev/null
7983 if test -d .libs; then
7984   lt_cv_objdir=.libs
7985 else
7986   # MS-DOS does not allow filenames that begin with a dot.
7987   lt_cv_objdir=_libs
7988 fi
7989 rmdir .libs 2>/dev/null
7990 fi
7991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
7992 $as_echo "$lt_cv_objdir" >&6; }
7993 objdir=$lt_cv_objdir
7994
7995
7996
7997
7998
7999 case $host_os in
8000 aix3*)
8001   # AIX sometimes has problems with the GCC collect2 program.  For some
8002   # reason, if we set the COLLECT_NAMES environment variable, the problems
8003   # vanish in a puff of smoke.
8004   if test "X${COLLECT_NAMES+set}" != Xset; then
8005     COLLECT_NAMES=
8006     export COLLECT_NAMES
8007   fi
8008   ;;
8009 esac
8010
8011 # Sed substitution that helps us do robust quoting.  It backslashifies
8012 # metacharacters that are still active within double-quoted strings.
8013 Xsed='sed -e 1s/^X//'
8014 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
8015
8016 # Same as above, but do not quote variable references.
8017 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
8018
8019 # Sed substitution to delay expansion of an escaped shell variable in a
8020 # double_quote_subst'ed string.
8021 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
8022
8023 # Sed substitution to avoid accidental globbing in evaled expressions
8024 no_glob_subst='s/\*/\\\*/g'
8025
8026 # Constants:
8027 rm="rm -f"
8028
8029 # Global variables:
8030 default_ofile=libtool
8031 can_build_shared=yes
8032
8033 # All known linkers require a `.a' archive for static linking (except MSVC,
8034 # which needs '.lib').
8035 libext=a
8036 ltmain="$ac_aux_dir/ltmain.sh"
8037 ofile="$default_ofile"
8038 with_gnu_ld="$lt_cv_prog_gnu_ld"
8039
8040 if test -n "$ac_tool_prefix"; then
8041   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8042 set dummy ${ac_tool_prefix}ar; ac_word=$2
8043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8044 $as_echo_n "checking for $ac_word... " >&6; }
8045 if test "${ac_cv_prog_AR+set}" = set; then :
8046   $as_echo_n "(cached) " >&6
8047 else
8048   if test -n "$AR"; then
8049   ac_cv_prog_AR="$AR" # Let the user override the test.
8050 else
8051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8052 for as_dir in $PATH
8053 do
8054   IFS=$as_save_IFS
8055   test -z "$as_dir" && as_dir=.
8056     for ac_exec_ext in '' $ac_executable_extensions; do
8057   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8058     ac_cv_prog_AR="${ac_tool_prefix}ar"
8059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8060     break 2
8061   fi
8062 done
8063   done
8064 IFS=$as_save_IFS
8065
8066 fi
8067 fi
8068 AR=$ac_cv_prog_AR
8069 if test -n "$AR"; then
8070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8071 $as_echo "$AR" >&6; }
8072 else
8073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8074 $as_echo "no" >&6; }
8075 fi
8076
8077
8078 fi
8079 if test -z "$ac_cv_prog_AR"; then
8080   ac_ct_AR=$AR
8081   # Extract the first word of "ar", so it can be a program name with args.
8082 set dummy ar; ac_word=$2
8083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8084 $as_echo_n "checking for $ac_word... " >&6; }
8085 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8086   $as_echo_n "(cached) " >&6
8087 else
8088   if test -n "$ac_ct_AR"; then
8089   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8090 else
8091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8092 for as_dir in $PATH
8093 do
8094   IFS=$as_save_IFS
8095   test -z "$as_dir" && as_dir=.
8096     for ac_exec_ext in '' $ac_executable_extensions; do
8097   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8098     ac_cv_prog_ac_ct_AR="ar"
8099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8100     break 2
8101   fi
8102 done
8103   done
8104 IFS=$as_save_IFS
8105
8106 fi
8107 fi
8108 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8109 if test -n "$ac_ct_AR"; then
8110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8111 $as_echo "$ac_ct_AR" >&6; }
8112 else
8113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8114 $as_echo "no" >&6; }
8115 fi
8116
8117   if test "x$ac_ct_AR" = x; then
8118     AR="false"
8119   else
8120     case $cross_compiling:$ac_tool_warned in
8121 yes:)
8122 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8123 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8124 ac_tool_warned=yes ;;
8125 esac
8126     AR=$ac_ct_AR
8127   fi
8128 else
8129   AR="$ac_cv_prog_AR"
8130 fi
8131
8132 if test -n "$ac_tool_prefix"; then
8133   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8134 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8136 $as_echo_n "checking for $ac_word... " >&6; }
8137 if test "${ac_cv_prog_RANLIB+set}" = set; then :
8138   $as_echo_n "(cached) " >&6
8139 else
8140   if test -n "$RANLIB"; then
8141   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8142 else
8143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8144 for as_dir in $PATH
8145 do
8146   IFS=$as_save_IFS
8147   test -z "$as_dir" && as_dir=.
8148     for ac_exec_ext in '' $ac_executable_extensions; do
8149   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8150     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8152     break 2
8153   fi
8154 done
8155   done
8156 IFS=$as_save_IFS
8157
8158 fi
8159 fi
8160 RANLIB=$ac_cv_prog_RANLIB
8161 if test -n "$RANLIB"; then
8162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8163 $as_echo "$RANLIB" >&6; }
8164 else
8165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8166 $as_echo "no" >&6; }
8167 fi
8168
8169
8170 fi
8171 if test -z "$ac_cv_prog_RANLIB"; then
8172   ac_ct_RANLIB=$RANLIB
8173   # Extract the first word of "ranlib", so it can be a program name with args.
8174 set dummy ranlib; ac_word=$2
8175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8176 $as_echo_n "checking for $ac_word... " >&6; }
8177 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8178   $as_echo_n "(cached) " >&6
8179 else
8180   if test -n "$ac_ct_RANLIB"; then
8181   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8182 else
8183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8184 for as_dir in $PATH
8185 do
8186   IFS=$as_save_IFS
8187   test -z "$as_dir" && as_dir=.
8188     for ac_exec_ext in '' $ac_executable_extensions; do
8189   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8190     ac_cv_prog_ac_ct_RANLIB="ranlib"
8191     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8192     break 2
8193   fi
8194 done
8195   done
8196 IFS=$as_save_IFS
8197
8198 fi
8199 fi
8200 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8201 if test -n "$ac_ct_RANLIB"; then
8202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8203 $as_echo "$ac_ct_RANLIB" >&6; }
8204 else
8205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8206 $as_echo "no" >&6; }
8207 fi
8208
8209   if test "x$ac_ct_RANLIB" = x; then
8210     RANLIB=":"
8211   else
8212     case $cross_compiling:$ac_tool_warned in
8213 yes:)
8214 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8215 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8216 ac_tool_warned=yes ;;
8217 esac
8218     RANLIB=$ac_ct_RANLIB
8219   fi
8220 else
8221   RANLIB="$ac_cv_prog_RANLIB"
8222 fi
8223
8224 if test -n "$ac_tool_prefix"; then
8225   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8226 set dummy ${ac_tool_prefix}strip; ac_word=$2
8227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8228 $as_echo_n "checking for $ac_word... " >&6; }
8229 if test "${ac_cv_prog_STRIP+set}" = set; then :
8230   $as_echo_n "(cached) " >&6
8231 else
8232   if test -n "$STRIP"; then
8233   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8234 else
8235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8236 for as_dir in $PATH
8237 do
8238   IFS=$as_save_IFS
8239   test -z "$as_dir" && as_dir=.
8240     for ac_exec_ext in '' $ac_executable_extensions; do
8241   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8242     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8244     break 2
8245   fi
8246 done
8247   done
8248 IFS=$as_save_IFS
8249
8250 fi
8251 fi
8252 STRIP=$ac_cv_prog_STRIP
8253 if test -n "$STRIP"; then
8254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8255 $as_echo "$STRIP" >&6; }
8256 else
8257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258 $as_echo "no" >&6; }
8259 fi
8260
8261
8262 fi
8263 if test -z "$ac_cv_prog_STRIP"; then
8264   ac_ct_STRIP=$STRIP
8265   # Extract the first word of "strip", so it can be a program name with args.
8266 set dummy strip; ac_word=$2
8267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8268 $as_echo_n "checking for $ac_word... " >&6; }
8269 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
8270   $as_echo_n "(cached) " >&6
8271 else
8272   if test -n "$ac_ct_STRIP"; then
8273   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8274 else
8275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8276 for as_dir in $PATH
8277 do
8278   IFS=$as_save_IFS
8279   test -z "$as_dir" && as_dir=.
8280     for ac_exec_ext in '' $ac_executable_extensions; do
8281   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8282     ac_cv_prog_ac_ct_STRIP="strip"
8283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8284     break 2
8285   fi
8286 done
8287   done
8288 IFS=$as_save_IFS
8289
8290 fi
8291 fi
8292 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8293 if test -n "$ac_ct_STRIP"; then
8294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8295 $as_echo "$ac_ct_STRIP" >&6; }
8296 else
8297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8298 $as_echo "no" >&6; }
8299 fi
8300
8301   if test "x$ac_ct_STRIP" = x; then
8302     STRIP=":"
8303   else
8304     case $cross_compiling:$ac_tool_warned in
8305 yes:)
8306 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8307 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8308 ac_tool_warned=yes ;;
8309 esac
8310     STRIP=$ac_ct_STRIP
8311   fi
8312 else
8313   STRIP="$ac_cv_prog_STRIP"
8314 fi
8315
8316
8317 old_CC="$CC"
8318 old_CFLAGS="$CFLAGS"
8319
8320 # Set sane defaults for various variables
8321 test -z "$AR" && AR=ar
8322 test -z "$AR_FLAGS" && AR_FLAGS=cru
8323 test -z "$AS" && AS=as
8324 test -z "$CC" && CC=cc
8325 test -z "$LTCC" && LTCC=$CC
8326 test -z "$DLLTOOL" && DLLTOOL=dlltool
8327 test -z "$LD" && LD=ld
8328 test -z "$LN_S" && LN_S="ln -s"
8329 test -z "$MAGIC_CMD" && MAGIC_CMD=file
8330 test -z "$NM" && NM=nm
8331 test -z "$SED" && SED=sed
8332 test -z "$OBJDUMP" && OBJDUMP=objdump
8333 test -z "$RANLIB" && RANLIB=:
8334 test -z "$STRIP" && STRIP=:
8335 test -z "$ac_objext" && ac_objext=o
8336
8337 # Determine commands to create old-style static archives.
8338 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
8339 old_postinstall_cmds='chmod 644 $oldlib'
8340 old_postuninstall_cmds=
8341
8342 if test -n "$RANLIB"; then
8343   case $host_os in
8344   openbsd*)
8345     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
8346     ;;
8347   *)
8348     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
8349     ;;
8350   esac
8351   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
8352 fi
8353
8354 for cc_temp in $compiler""; do
8355   case $cc_temp in
8356     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8357     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8358     \-*) ;;
8359     *) break;;
8360   esac
8361 done
8362 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8363
8364
8365 # Only perform the check for file, if the check method requires it
8366 case $deplibs_check_method in
8367 file_magic*)
8368   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8369     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
8370 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8371 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8372   $as_echo_n "(cached) " >&6
8373 else
8374   case $MAGIC_CMD in
8375 [\\/*] |  ?:[\\/]*)
8376   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8377   ;;
8378 *)
8379   lt_save_MAGIC_CMD="$MAGIC_CMD"
8380   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8381   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8382   for ac_dir in $ac_dummy; do
8383     IFS="$lt_save_ifs"
8384     test -z "$ac_dir" && ac_dir=.
8385     if test -f $ac_dir/${ac_tool_prefix}file; then
8386       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8387       if test -n "$file_magic_test_file"; then
8388         case $deplibs_check_method in
8389         "file_magic "*)
8390           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8391           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8392           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8393             $EGREP "$file_magic_regex" > /dev/null; then
8394             :
8395           else
8396             cat <<EOF 1>&2
8397
8398 *** Warning: the command libtool uses to detect shared libraries,
8399 *** $file_magic_cmd, produces output that libtool cannot recognize.
8400 *** The result is that libtool may fail to recognize shared libraries
8401 *** as such.  This will affect the creation of libtool libraries that
8402 *** depend on shared libraries, but programs linked with such libtool
8403 *** libraries will work regardless of this problem.  Nevertheless, you
8404 *** may want to report the problem to your system manager and/or to
8405 *** bug-libtool@gnu.org
8406
8407 EOF
8408           fi ;;
8409         esac
8410       fi
8411       break
8412     fi
8413   done
8414   IFS="$lt_save_ifs"
8415   MAGIC_CMD="$lt_save_MAGIC_CMD"
8416   ;;
8417 esac
8418 fi
8419
8420 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8421 if test -n "$MAGIC_CMD"; then
8422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8423 $as_echo "$MAGIC_CMD" >&6; }
8424 else
8425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8426 $as_echo "no" >&6; }
8427 fi
8428
8429 if test -z "$lt_cv_path_MAGIC_CMD"; then
8430   if test -n "$ac_tool_prefix"; then
8431     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
8432 $as_echo_n "checking for file... " >&6; }
8433 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8434   $as_echo_n "(cached) " >&6
8435 else
8436   case $MAGIC_CMD in
8437 [\\/*] |  ?:[\\/]*)
8438   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8439   ;;
8440 *)
8441   lt_save_MAGIC_CMD="$MAGIC_CMD"
8442   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8443   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8444   for ac_dir in $ac_dummy; do
8445     IFS="$lt_save_ifs"
8446     test -z "$ac_dir" && ac_dir=.
8447     if test -f $ac_dir/file; then
8448       lt_cv_path_MAGIC_CMD="$ac_dir/file"
8449       if test -n "$file_magic_test_file"; then
8450         case $deplibs_check_method in
8451         "file_magic "*)
8452           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8453           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8454           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8455             $EGREP "$file_magic_regex" > /dev/null; then
8456             :
8457           else
8458             cat <<EOF 1>&2
8459
8460 *** Warning: the command libtool uses to detect shared libraries,
8461 *** $file_magic_cmd, produces output that libtool cannot recognize.
8462 *** The result is that libtool may fail to recognize shared libraries
8463 *** as such.  This will affect the creation of libtool libraries that
8464 *** depend on shared libraries, but programs linked with such libtool
8465 *** libraries will work regardless of this problem.  Nevertheless, you
8466 *** may want to report the problem to your system manager and/or to
8467 *** bug-libtool@gnu.org
8468
8469 EOF
8470           fi ;;
8471         esac
8472       fi
8473       break
8474     fi
8475   done
8476   IFS="$lt_save_ifs"
8477   MAGIC_CMD="$lt_save_MAGIC_CMD"
8478   ;;
8479 esac
8480 fi
8481
8482 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8483 if test -n "$MAGIC_CMD"; then
8484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8485 $as_echo "$MAGIC_CMD" >&6; }
8486 else
8487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8488 $as_echo "no" >&6; }
8489 fi
8490
8491   else
8492     MAGIC_CMD=:
8493   fi
8494 fi
8495
8496   fi
8497   ;;
8498 esac
8499
8500 enable_dlopen=yes
8501 enable_win32_dll=yes
8502
8503 # Check whether --enable-libtool-lock was given.
8504 if test "${enable_libtool_lock+set}" = set; then :
8505   enableval=$enable_libtool_lock;
8506 fi
8507
8508 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
8509
8510
8511 # Check whether --with-pic was given.
8512 if test "${with_pic+set}" = set; then :
8513   withval=$with_pic; pic_mode="$withval"
8514 else
8515   pic_mode=default
8516 fi
8517
8518 test -z "$pic_mode" && pic_mode=default
8519
8520 # Use C for the default configuration in the libtool script
8521 tagname=
8522 lt_save_CC="$CC"
8523 ac_ext=c
8524 ac_cpp='$CPP $CPPFLAGS'
8525 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8526 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8527 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8528
8529
8530 # Source file extension for C test sources.
8531 ac_ext=c
8532
8533 # Object file extension for compiled C test sources.
8534 objext=o
8535 objext=$objext
8536
8537 # Code to be used in simple compile tests
8538 lt_simple_compile_test_code="int some_variable = 0;\n"
8539
8540 # Code to be used in simple link tests
8541 lt_simple_link_test_code='int main(){return(0);}\n'
8542
8543
8544 # If no C compiler was specified, use CC.
8545 LTCC=${LTCC-"$CC"}
8546
8547 # Allow CC to be a program name with arguments.
8548 compiler=$CC
8549
8550
8551 # save warnings/boilerplate of simple test code
8552 ac_outfile=conftest.$ac_objext
8553 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
8554 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8555 _lt_compiler_boilerplate=`cat conftest.err`
8556 $rm conftest*
8557
8558 ac_outfile=conftest.$ac_objext
8559 printf "$lt_simple_link_test_code" >conftest.$ac_ext
8560 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8561 _lt_linker_boilerplate=`cat conftest.err`
8562 $rm conftest*
8563
8564
8565 #
8566 # Check for any special shared library compilation flags.
8567 #
8568 lt_prog_cc_shlib=
8569 if test "$GCC" = no; then
8570   case $host_os in
8571   sco3.2v5*)
8572     lt_prog_cc_shlib='-belf'
8573     ;;
8574   esac
8575 fi
8576 if test -n "$lt_prog_cc_shlib"; then
8577   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
8578 $as_echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
8579   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
8580   else
8581     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
8582 $as_echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
8583     lt_cv_prog_cc_can_build_shared=no
8584   fi
8585 fi
8586
8587
8588 #
8589 # Check to make sure the static flag actually works.
8590 #
8591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_prog_compiler_static works" >&5
8592 $as_echo_n "checking if $compiler static flag $lt_prog_compiler_static works... " >&6; }
8593 if test "${lt_prog_compiler_static_works+set}" = set; then :
8594   $as_echo_n "(cached) " >&6
8595 else
8596   lt_prog_compiler_static_works=no
8597    save_LDFLAGS="$LDFLAGS"
8598    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
8599    printf "$lt_simple_link_test_code" > conftest.$ac_ext
8600    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8601      # The linker can only warn and ignore the option if not recognized
8602      # So say no if there are warnings
8603      if test -s conftest.err; then
8604        # Append any errors to the config.log.
8605        cat conftest.err 1>&5
8606        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
8607        $SED '/^$/d' conftest.err >conftest.er2
8608        if diff conftest.exp conftest.er2 >/dev/null; then
8609          lt_prog_compiler_static_works=yes
8610        fi
8611      else
8612        lt_prog_compiler_static_works=yes
8613      fi
8614    fi
8615    $rm conftest*
8616    LDFLAGS="$save_LDFLAGS"
8617
8618 fi
8619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_static_works" >&5
8620 $as_echo "$lt_prog_compiler_static_works" >&6; }
8621
8622 if test x"$lt_prog_compiler_static_works" = xyes; then
8623     :
8624 else
8625     lt_prog_compiler_static=
8626 fi
8627
8628
8629
8630
8631 lt_prog_compiler_no_builtin_flag=
8632
8633 if test "$GCC" = yes; then
8634   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
8635
8636
8637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
8638 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
8639 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
8640   $as_echo_n "(cached) " >&6
8641 else
8642   lt_cv_prog_compiler_rtti_exceptions=no
8643   ac_outfile=conftest.$ac_objext
8644    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8645    lt_compiler_flag="-fno-rtti -fno-exceptions"
8646    # Insert the option either (1) after the last *FLAGS variable, or
8647    # (2) before a word containing "conftest.", or (3) at the end.
8648    # Note that $ac_compile itself does not contain backslashes and begins
8649    # with a dollar sign (not a hyphen), so the echo should work correctly.
8650    # The option is referenced via a variable to avoid confusing sed.
8651    lt_compile=`echo "$ac_compile" | $SED \
8652    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8653    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8654    -e 's:$: $lt_compiler_flag:'`
8655    (eval echo "\"\$as_me:8655: $lt_compile\"" >&5)
8656    (eval "$lt_compile" 2>conftest.err)
8657    ac_status=$?
8658    cat conftest.err >&5
8659    echo "$as_me:8659: \$? = $ac_status" >&5
8660    if (exit $ac_status) && test -s "$ac_outfile"; then
8661      # The compiler can only warn and ignore the option if not recognized
8662      # So say no if there are warnings other than the usual output.
8663      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8664      $SED '/^$/d' conftest.err >conftest.er2
8665      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8666        lt_cv_prog_compiler_rtti_exceptions=yes
8667      fi
8668    fi
8669    $rm conftest*
8670
8671 fi
8672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
8673 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
8674
8675 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
8676     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
8677 else
8678     :
8679 fi
8680
8681 fi
8682
8683 lt_prog_compiler_wl=
8684 lt_prog_compiler_pic=
8685 lt_prog_compiler_static=
8686
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8688 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8689
8690   if test "$GCC" = yes; then
8691     lt_prog_compiler_wl='-Wl,'
8692     lt_prog_compiler_static='-static'
8693
8694     case $host_os in
8695       aix*)
8696       # All AIX code is PIC.
8697       if test "$host_cpu" = ia64; then
8698         # AIX 5 now supports IA64 processor
8699         lt_prog_compiler_static='-Bstatic'
8700       fi
8701       ;;
8702
8703     amigaos*)
8704       # FIXME: we need at least 68020 code to build shared libraries, but
8705       # adding the `-m68020' flag to GCC prevents building anything better,
8706       # like `-m68040'.
8707       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
8708       ;;
8709
8710     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8711       # PIC is the default for these OSes.
8712       ;;
8713
8714     mingw* | pw32* | os2*)
8715       # This hack is so that the source file can tell whether it is being
8716       # built for inclusion in a dll (and should export symbols for example).
8717       lt_prog_compiler_pic='-DDLL_EXPORT'
8718       ;;
8719
8720     darwin* | rhapsody*)
8721       # PIC is the default on this platform
8722       # Common symbols not allowed in MH_DYLIB files
8723       lt_prog_compiler_pic='-fno-common'
8724       ;;
8725
8726     msdosdjgpp*)
8727       # Just because we use GCC doesn't mean we suddenly get shared libraries
8728       # on systems that don't support them.
8729       lt_prog_compiler_can_build_shared=no
8730       enable_shared=no
8731       ;;
8732
8733     sysv4*MP*)
8734       if test -d /usr/nec; then
8735         lt_prog_compiler_pic=-Kconform_pic
8736       fi
8737       ;;
8738
8739     hpux*)
8740       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8741       # not for PA HP-UX.
8742       case $host_cpu in
8743       hppa*64*|ia64*)
8744         # +Z the default
8745         ;;
8746       *)
8747         lt_prog_compiler_pic='-fPIC'
8748         ;;
8749       esac
8750       ;;
8751
8752     *)
8753       lt_prog_compiler_pic='-fPIC'
8754       ;;
8755     esac
8756   else
8757     # PORTME Check for flag to pass linker flags through the system compiler.
8758     case $host_os in
8759     aix*)
8760       lt_prog_compiler_wl='-Wl,'
8761       if test "$host_cpu" = ia64; then
8762         # AIX 5 now supports IA64 processor
8763         lt_prog_compiler_static='-Bstatic'
8764       else
8765         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
8766       fi
8767       ;;
8768       darwin*)
8769         # PIC is the default on this platform
8770         # Common symbols not allowed in MH_DYLIB files
8771        case $cc_basename in
8772          xlc*)
8773          lt_prog_compiler_pic='-qnocommon'
8774          lt_prog_compiler_wl='-Wl,'
8775          ;;
8776        esac
8777        ;;
8778
8779     mingw* | pw32* | os2*)
8780       # This hack is so that the source file can tell whether it is being
8781       # built for inclusion in a dll (and should export symbols for example).
8782       lt_prog_compiler_pic='-DDLL_EXPORT'
8783       ;;
8784
8785     hpux9* | hpux10* | hpux11*)
8786       lt_prog_compiler_wl='-Wl,'
8787       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8788       # not for PA HP-UX.
8789       case $host_cpu in
8790       hppa*64*|ia64*)
8791         # +Z the default
8792         ;;
8793       *)
8794         lt_prog_compiler_pic='+Z'
8795         ;;
8796       esac
8797       # Is there a better lt_prog_compiler_static that works with the bundled CC?
8798       lt_prog_compiler_static='${wl}-a ${wl}archive'
8799       ;;
8800
8801     irix5* | irix6* | nonstopux*)
8802       lt_prog_compiler_wl='-Wl,'
8803       # PIC (with -KPIC) is the default.
8804       lt_prog_compiler_static='-non_shared'
8805       ;;
8806
8807     newsos6)
8808       lt_prog_compiler_pic='-KPIC'
8809       lt_prog_compiler_static='-Bstatic'
8810       ;;
8811
8812     linux*)
8813       case $cc_basename in
8814       icc* | ecc*)
8815         lt_prog_compiler_wl='-Wl,'
8816         lt_prog_compiler_pic='-KPIC'
8817         lt_prog_compiler_static='-static'
8818         ;;
8819       pgcc* | pgf77* | pgf90* | pgf95*)
8820         # Portland Group compilers (*not* the Pentium gcc compiler,
8821         # which looks to be a dead project)
8822         lt_prog_compiler_wl='-Wl,'
8823         lt_prog_compiler_pic='-fpic'
8824         lt_prog_compiler_static='-Bstatic'
8825         ;;
8826       ccc*)
8827         lt_prog_compiler_wl='-Wl,'
8828         # All Alpha code is PIC.
8829         lt_prog_compiler_static='-non_shared'
8830         ;;
8831       esac
8832       ;;
8833
8834     osf3* | osf4* | osf5*)
8835       lt_prog_compiler_wl='-Wl,'
8836       # All OSF/1 code is PIC.
8837       lt_prog_compiler_static='-non_shared'
8838       ;;
8839
8840     sco3.2v5*)
8841       lt_prog_compiler_pic='-Kpic'
8842       lt_prog_compiler_static='-dn'
8843       ;;
8844
8845     solaris*)
8846       lt_prog_compiler_pic='-KPIC'
8847       lt_prog_compiler_static='-Bstatic'
8848       case $cc_basename in
8849       f77* | f90* | f95*)
8850         lt_prog_compiler_wl='-Qoption ld ';;
8851       *)
8852         lt_prog_compiler_wl='-Wl,';;
8853       esac
8854       ;;
8855
8856     sunos4*)
8857       lt_prog_compiler_wl='-Qoption ld '
8858       lt_prog_compiler_pic='-PIC'
8859       lt_prog_compiler_static='-Bstatic'
8860       ;;
8861
8862     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8863       lt_prog_compiler_wl='-Wl,'
8864       lt_prog_compiler_pic='-KPIC'
8865       lt_prog_compiler_static='-Bstatic'
8866       ;;
8867
8868     sysv4*MP*)
8869       if test -d /usr/nec ;then
8870         lt_prog_compiler_pic='-Kconform_pic'
8871         lt_prog_compiler_static='-Bstatic'
8872       fi
8873       ;;
8874
8875     unicos*)
8876       lt_prog_compiler_wl='-Wl,'
8877       lt_prog_compiler_can_build_shared=no
8878       ;;
8879
8880     uts4*)
8881       lt_prog_compiler_pic='-pic'
8882       lt_prog_compiler_static='-Bstatic'
8883       ;;
8884
8885     *)
8886       lt_prog_compiler_can_build_shared=no
8887       ;;
8888     esac
8889   fi
8890
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
8892 $as_echo "$lt_prog_compiler_pic" >&6; }
8893
8894 #
8895 # Check to make sure the PIC flag actually works.
8896 #
8897 if test -n "$lt_prog_compiler_pic"; then
8898
8899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8900 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
8901 if test "${lt_prog_compiler_pic_works+set}" = set; then :
8902   $as_echo_n "(cached) " >&6
8903 else
8904   lt_prog_compiler_pic_works=no
8905   ac_outfile=conftest.$ac_objext
8906    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8907    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8908    # Insert the option either (1) after the last *FLAGS variable, or
8909    # (2) before a word containing "conftest.", or (3) at the end.
8910    # Note that $ac_compile itself does not contain backslashes and begins
8911    # with a dollar sign (not a hyphen), so the echo should work correctly.
8912    # The option is referenced via a variable to avoid confusing sed.
8913    lt_compile=`echo "$ac_compile" | $SED \
8914    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8915    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8916    -e 's:$: $lt_compiler_flag:'`
8917    (eval echo "\"\$as_me:8917: $lt_compile\"" >&5)
8918    (eval "$lt_compile" 2>conftest.err)
8919    ac_status=$?
8920    cat conftest.err >&5
8921    echo "$as_me:8921: \$? = $ac_status" >&5
8922    if (exit $ac_status) && test -s "$ac_outfile"; then
8923      # The compiler can only warn and ignore the option if not recognized
8924      # So say no if there are warnings other than the usual output.
8925      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8926      $SED '/^$/d' conftest.err >conftest.er2
8927      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8928        lt_prog_compiler_pic_works=yes
8929      fi
8930    fi
8931    $rm conftest*
8932
8933 fi
8934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_works" >&5
8935 $as_echo "$lt_prog_compiler_pic_works" >&6; }
8936
8937 if test x"$lt_prog_compiler_pic_works" = xyes; then
8938     case $lt_prog_compiler_pic in
8939      "" | " "*) ;;
8940      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8941      esac
8942 else
8943     lt_prog_compiler_pic=
8944      lt_prog_compiler_can_build_shared=no
8945 fi
8946
8947 fi
8948 case $host_os in
8949   # For platforms which do not support PIC, -DPIC is meaningless:
8950   *djgpp*)
8951     lt_prog_compiler_pic=
8952     ;;
8953   *)
8954     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8955     ;;
8956 esac
8957
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8959 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8960 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8961   $as_echo_n "(cached) " >&6
8962 else
8963   lt_cv_prog_compiler_c_o=no
8964    $rm -r conftest 2>/dev/null
8965    mkdir conftest
8966    cd conftest
8967    mkdir out
8968    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8969
8970    lt_compiler_flag="-o out/conftest2.$ac_objext"
8971    # Insert the option either (1) after the last *FLAGS variable, or
8972    # (2) before a word containing "conftest.", or (3) at the end.
8973    # Note that $ac_compile itself does not contain backslashes and begins
8974    # with a dollar sign (not a hyphen), so the echo should work correctly.
8975    lt_compile=`echo "$ac_compile" | $SED \
8976    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8977    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8978    -e 's:$: $lt_compiler_flag:'`
8979    (eval echo "\"\$as_me:8979: $lt_compile\"" >&5)
8980    (eval "$lt_compile" 2>out/conftest.err)
8981    ac_status=$?
8982    cat out/conftest.err >&5
8983    echo "$as_me:8983: \$? = $ac_status" >&5
8984    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8985    then
8986      # The compiler can only warn and ignore the option if not recognized
8987      # So say no if there are warnings
8988      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
8989      $SED '/^$/d' out/conftest.err >out/conftest.er2
8990      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8991        lt_cv_prog_compiler_c_o=yes
8992      fi
8993    fi
8994    chmod u+w . 2>&5
8995    $rm conftest*
8996    # SGI C++ compiler will create directory out/ii_files/ for
8997    # template instantiation
8998    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
8999    $rm out/* && rmdir out
9000    cd ..
9001    rmdir conftest
9002    $rm conftest*
9003
9004 fi
9005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9006 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9007
9008
9009 hard_links="nottested"
9010 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
9011   # do not overwrite the value of need_locks provided by the user
9012   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
9013 $as_echo_n "checking if we can lock with hard links... " >&6; }
9014   hard_links=yes
9015   $rm conftest*
9016   ln conftest.a conftest.b 2>/dev/null && hard_links=no
9017   touch conftest.a
9018   ln conftest.a conftest.b 2>&5 || hard_links=no
9019   ln conftest.a conftest.b 2>/dev/null && hard_links=no
9020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
9021 $as_echo "$hard_links" >&6; }
9022   if test "$hard_links" = no; then
9023     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
9024 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
9025     need_locks=warn
9026   fi
9027 else
9028   need_locks=no
9029 fi
9030
9031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
9032 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
9033
9034   runpath_var=
9035   allow_undefined_flag=
9036   enable_shared_with_static_runtimes=no
9037   archive_cmds=
9038   archive_expsym_cmds=
9039   old_archive_From_new_cmds=
9040   old_archive_from_expsyms_cmds=
9041   export_dynamic_flag_spec=
9042   whole_archive_flag_spec=
9043   thread_safe_flag_spec=
9044   hardcode_libdir_flag_spec=
9045   hardcode_libdir_flag_spec_ld=
9046   hardcode_libdir_separator=
9047   hardcode_direct=no
9048   hardcode_minus_L=no
9049   hardcode_shlibpath_var=unsupported
9050   link_all_deplibs=unknown
9051   hardcode_automatic=no
9052   module_cmds=
9053   module_expsym_cmds=
9054   always_export_symbols=no
9055   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
9056   # include_expsyms should be a list of space-separated symbols to be *always*
9057   # included in the symbol list
9058   include_expsyms=
9059   # exclude_expsyms can be an extended regexp of symbols to exclude
9060   # it will be wrapped by ` (' and `)$', so one must not match beginning or
9061   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9062   # as well as any symbol that contains `d'.
9063   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
9064   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9065   # platforms (ab)use it in PIC code, but their linkers get confused if
9066   # the symbol is explicitly referenced.  Since portable code cannot
9067   # rely on this symbol name, it's probably fine to never include it in
9068   # preloaded symbol tables.
9069   extract_expsyms_cmds=
9070   # Just being paranoid about ensuring that cc_basename is set.
9071   for cc_temp in $compiler""; do
9072   case $cc_temp in
9073     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9074     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9075     \-*) ;;
9076     *) break;;
9077   esac
9078 done
9079 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
9080
9081   case $host_os in
9082   cygwin* | mingw* | pw32*)
9083     # FIXME: the MSVC++ port hasn't been tested in a loooong time
9084     # When not using gcc, we currently assume that we are using
9085     # Microsoft Visual C++.
9086     if test "$GCC" != yes; then
9087       with_gnu_ld=no
9088     fi
9089     ;;
9090   openbsd*)
9091     with_gnu_ld=no
9092     ;;
9093   esac
9094
9095   ld_shlibs=yes
9096   if test "$with_gnu_ld" = yes; then
9097     # If archive_cmds runs LD, not CC, wlarc should be empty
9098     wlarc='${wl}'
9099
9100     # Set some defaults for GNU ld with shared library support. These
9101     # are reset later if shared libraries are not supported. Putting them
9102     # here allows them to be overridden if necessary.
9103     runpath_var=LD_RUN_PATH
9104     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
9105     export_dynamic_flag_spec='${wl}--export-dynamic'
9106     # ancient GNU ld didn't support --whole-archive et. al.
9107     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
9108         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9109       else
9110         whole_archive_flag_spec=
9111     fi
9112     supports_anon_versioning=no
9113     case `$LD -v 2>/dev/null` in
9114       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9115       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9116       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9117       *\ 2.11.*) ;; # other 2.11 versions
9118       *) supports_anon_versioning=yes ;;
9119     esac
9120
9121     # See if GNU ld supports shared libraries.
9122     case $host_os in
9123     aix3* | aix4* | aix5*)
9124       # On AIX/PPC, the GNU linker is very broken
9125       if test "$host_cpu" != ia64; then
9126         ld_shlibs=no
9127         cat <<EOF 1>&2
9128
9129 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
9130 *** to be unable to reliably create shared libraries on AIX.
9131 *** Therefore, libtool is disabling shared libraries support.  If you
9132 *** really care for shared libraries, you may want to modify your PATH
9133 *** so that a non-GNU linker is found, and then restart.
9134
9135 EOF
9136       fi
9137       ;;
9138
9139     amigaos*)
9140       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)'
9141       hardcode_libdir_flag_spec='-L$libdir'
9142       hardcode_minus_L=yes
9143
9144       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9145       # that the semantics of dynamic libraries on AmigaOS, at least up
9146       # to version 4, is to share data among multiple programs linked
9147       # with the same dynamic library.  Since this doesn't match the
9148       # behavior of shared libraries on other platforms, we can't use
9149       # them.
9150       ld_shlibs=no
9151       ;;
9152
9153     beos*)
9154       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9155         allow_undefined_flag=unsupported
9156         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9157         # support --undefined.  This deserves some investigation.  FIXME
9158         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9159       else
9160         ld_shlibs=no
9161       fi
9162       ;;
9163
9164     cygwin* | mingw* | pw32*)
9165       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9166       # as there is no search path for DLLs.
9167       hardcode_libdir_flag_spec='-L$libdir'
9168       allow_undefined_flag=unsupported
9169       always_export_symbols=no
9170       enable_shared_with_static_runtimes=yes
9171       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
9172
9173       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
9174         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
9175         # If the export-symbols file already is a .def file (1st line
9176         # is EXPORTS), use it as is; otherwise, prepend...
9177         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9178           cp $export_symbols $output_objdir/$soname.def;
9179         else
9180           echo EXPORTS > $output_objdir/$soname.def;
9181           cat $export_symbols >> $output_objdir/$soname.def;
9182         fi~
9183         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
9184       else
9185         ld_shlibs=no
9186       fi
9187       ;;
9188
9189     linux*)
9190       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9191         tmp_addflag=
9192         case $cc_basename,$host_cpu in
9193         pgcc*)                          # Portland Group C compiler
9194           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'
9195           tmp_addflag=' $pic_flag'
9196           ;;
9197         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
9198           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'
9199           tmp_addflag=' $pic_flag -Mnomain' ;;
9200         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
9201           tmp_addflag=' -i_dynamic' ;;
9202         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
9203           tmp_addflag=' -i_dynamic -nofor_main' ;;
9204         ifc* | ifort*)                  # Intel Fortran compiler
9205           tmp_addflag=' -nofor_main' ;;
9206         esac
9207         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9208
9209         if test $supports_anon_versioning = yes; then
9210           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
9211   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9212   $echo "local: *; };" >> $output_objdir/$libname.ver~
9213           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9214         fi
9215       else
9216         ld_shlibs=no
9217       fi
9218       ;;
9219
9220     netbsd*)
9221       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9222         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9223         wlarc=
9224       else
9225         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9226         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9227       fi
9228       ;;
9229
9230     solaris* | sysv5*)
9231       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
9232         ld_shlibs=no
9233         cat <<EOF 1>&2
9234
9235 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
9236 *** create shared libraries on Solaris systems.  Therefore, libtool
9237 *** is disabling shared libraries support.  We urge you to upgrade GNU
9238 *** binutils to release 2.9.1 or newer.  Another option is to modify
9239 *** your PATH or compiler configuration so that the native linker is
9240 *** used, and then restart.
9241
9242 EOF
9243       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9244         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9245         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9246       else
9247         ld_shlibs=no
9248       fi
9249       ;;
9250
9251     sunos4*)
9252       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9253       wlarc=
9254       hardcode_direct=yes
9255       hardcode_shlibpath_var=no
9256       ;;
9257
9258     *)
9259       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9260         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9261         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9262       else
9263         ld_shlibs=no
9264       fi
9265       ;;
9266     esac
9267
9268     if test "$ld_shlibs" = no; then
9269       runpath_var=
9270       hardcode_libdir_flag_spec=
9271       export_dynamic_flag_spec=
9272       whole_archive_flag_spec=
9273     fi
9274   else
9275     # PORTME fill in a description of your system's linker (not GNU ld)
9276     case $host_os in
9277     aix3*)
9278       allow_undefined_flag=unsupported
9279       always_export_symbols=yes
9280       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'
9281       # Note: this linker hardcodes the directories in LIBPATH if there
9282       # are no directories specified by -L.
9283       hardcode_minus_L=yes
9284       if test "$GCC" = yes && test -z "$link_static_flag"; then
9285         # Neither direct hardcoding nor static linking is supported with a
9286         # broken collect2.
9287         hardcode_direct=unsupported
9288       fi
9289       ;;
9290
9291     aix4* | aix5*)
9292       if test "$host_cpu" = ia64; then
9293         # On IA64, the linker does run time linking by default, so we don't
9294         # have to do anything special.
9295         aix_use_runtimelinking=no
9296         exp_sym_flag='-Bexport'
9297         no_entry_flag=""
9298       else
9299         # If we're using GNU nm, then we don't want the "-C" option.
9300         # -C means demangle to AIX nm, but means don't demangle with GNU nm
9301         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
9302           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'
9303         else
9304           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'
9305         fi
9306         aix_use_runtimelinking=no
9307
9308         # Test if we are trying to use run time linking or normal
9309         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9310         # need to do runtime linking.
9311         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
9312           for ld_flag in $LDFLAGS; do
9313           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
9314             aix_use_runtimelinking=yes
9315             break
9316           fi
9317           done
9318         esac
9319
9320         exp_sym_flag='-bexport'
9321         no_entry_flag='-bnoentry'
9322       fi
9323
9324       # When large executables or shared objects are built, AIX ld can
9325       # have problems creating the table of contents.  If linking a library
9326       # or program results in "error TOC overflow" add -mminimal-toc to
9327       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9328       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9329
9330       archive_cmds=''
9331       hardcode_direct=yes
9332       hardcode_libdir_separator=':'
9333       link_all_deplibs=yes
9334
9335       if test "$GCC" = yes; then
9336         case $host_os in aix4.[012]|aix4.[012].*)
9337         # We only want to do this on AIX 4.2 and lower, the check
9338         # below for broken collect2 doesn't work under 4.3+
9339           collect2name=`${CC} -print-prog-name=collect2`
9340           if test -f "$collect2name" && \
9341            strings "$collect2name" | grep resolve_lib_name >/dev/null
9342           then
9343           # We have reworked collect2
9344           hardcode_direct=yes
9345           else
9346           # We have old collect2
9347           hardcode_direct=unsupported
9348           # It fails to find uninstalled libraries when the uninstalled
9349           # path is not listed in the libpath.  Setting hardcode_minus_L
9350           # to unsupported forces relinking
9351           hardcode_minus_L=yes
9352           hardcode_libdir_flag_spec='-L$libdir'
9353           hardcode_libdir_separator=
9354           fi
9355         esac
9356         shared_flag='-shared'
9357         if test "$aix_use_runtimelinking" = yes; then
9358           shared_flag="$shared_flag "'${wl}-G'
9359         fi
9360       else
9361         # not using gcc
9362         if test "$host_cpu" = ia64; then
9363         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9364         # chokes on -Wl,-G. The following line is correct:
9365           shared_flag='-G'
9366         else
9367         if test "$aix_use_runtimelinking" = yes; then
9368             shared_flag='${wl}-G'
9369           else
9370             shared_flag='${wl}-bM:SRE'
9371         fi
9372         fi
9373       fi
9374
9375       # It seems that -bexpall does not export symbols beginning with
9376       # underscore (_), so it is better to generate a list of symbols to export.
9377       always_export_symbols=yes
9378       if test "$aix_use_runtimelinking" = yes; then
9379         # Warning - without using the other runtime loading flags (-brtl),
9380         # -berok will link without error, but may produce a broken library.
9381         allow_undefined_flag='-berok'
9382        # Determine the default libpath from the value encoded in an empty executable.
9383        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9384 /* end confdefs.h.  */
9385
9386 int
9387 main ()
9388 {
9389
9390   ;
9391   return 0;
9392 }
9393 _ACEOF
9394 if ac_fn_c_try_link "$LINENO"; then :
9395
9396 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9397 }'`
9398 # Check for a 64-bit object if we didn't find anything.
9399 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; }
9400 }'`; fi
9401 fi
9402 rm -f core conftest.err conftest.$ac_objext \
9403     conftest$ac_exeext conftest.$ac_ext
9404 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9405
9406        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9407         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"
9408        else
9409         if test "$host_cpu" = ia64; then
9410           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
9411           allow_undefined_flag="-z nodefs"
9412           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"
9413         else
9414          # Determine the default libpath from the value encoded in an empty executable.
9415          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9416 /* end confdefs.h.  */
9417
9418 int
9419 main ()
9420 {
9421
9422   ;
9423   return 0;
9424 }
9425 _ACEOF
9426 if ac_fn_c_try_link "$LINENO"; then :
9427
9428 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9429 }'`
9430 # Check for a 64-bit object if we didn't find anything.
9431 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; }
9432 }'`; fi
9433 fi
9434 rm -f core conftest.err conftest.$ac_objext \
9435     conftest$ac_exeext conftest.$ac_ext
9436 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9437
9438          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9439           # Warning - without using the other run time loading flags,
9440           # -berok will link without error, but may produce a broken library.
9441           no_undefined_flag=' ${wl}-bernotok'
9442           allow_undefined_flag=' ${wl}-berok'
9443           # -bexpall does not export symbols beginning with underscore (_)
9444           always_export_symbols=yes
9445           # Exported symbols can be pulled into shared objects from archives
9446           whole_archive_flag_spec=' '
9447           archive_cmds_need_lc=yes
9448           # This is similar to how AIX traditionally builds its shared libraries.
9449           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'
9450         fi
9451       fi
9452       ;;
9453
9454     amigaos*)
9455       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)'
9456       hardcode_libdir_flag_spec='-L$libdir'
9457       hardcode_minus_L=yes
9458       # see comment about different semantics on the GNU ld section
9459       ld_shlibs=no
9460       ;;
9461
9462     bsdi[45]*)
9463       export_dynamic_flag_spec=-rdynamic
9464       ;;
9465
9466     cygwin* | mingw* | pw32*)
9467       # When not using gcc, we currently assume that we are using
9468       # Microsoft Visual C++.
9469       # hardcode_libdir_flag_spec is actually meaningless, as there is
9470       # no search path for DLLs.
9471       hardcode_libdir_flag_spec=' '
9472       allow_undefined_flag=unsupported
9473       # Tell ltmain to make .lib files, not .a files.
9474       libext=lib
9475       # Tell ltmain to make .dll files, not .so files.
9476       shrext_cmds=".dll"
9477       # FIXME: Setting linknames here is a bad hack.
9478       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
9479       # The linker will automatically build a .lib file if we build a DLL.
9480       old_archive_From_new_cmds='true'
9481       # FIXME: Should let the user specify the lib program.
9482       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
9483       fix_srcfile_path='`cygpath -w "$srcfile"`'
9484       enable_shared_with_static_runtimes=yes
9485       ;;
9486
9487     darwin* | rhapsody*)
9488       case $host_os in
9489         rhapsody* | darwin1.[012])
9490          allow_undefined_flag='${wl}-undefined ${wl}suppress'
9491          ;;
9492        *) # Darwin 1.3 on
9493          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
9494            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9495          else
9496            case ${MACOSX_DEPLOYMENT_TARGET} in
9497              10.[012])
9498                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9499                ;;
9500              10.*)
9501                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
9502                ;;
9503            esac
9504          fi
9505          ;;
9506       esac
9507       archive_cmds_need_lc=no
9508       hardcode_direct=no
9509       hardcode_automatic=yes
9510       hardcode_shlibpath_var=unsupported
9511       whole_archive_flag_spec=''
9512       link_all_deplibs=yes
9513     if test "$GCC" = yes ; then
9514         output_verbose_link_cmd='echo'
9515         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
9516       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9517       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9518       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}'
9519       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}'
9520     else
9521       case $cc_basename in
9522         xlc*)
9523          output_verbose_link_cmd='echo'
9524          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
9525          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9526           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9527          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}'
9528           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}'
9529           ;;
9530        *)
9531          ld_shlibs=no
9532           ;;
9533       esac
9534     fi
9535       ;;
9536
9537     dgux*)
9538       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9539       hardcode_libdir_flag_spec='-L$libdir'
9540       hardcode_shlibpath_var=no
9541       ;;
9542
9543     freebsd1*)
9544       ld_shlibs=no
9545       ;;
9546
9547     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9548     # support.  Future versions do this automatically, but an explicit c++rt0.o
9549     # does not break anything, and helps significantly (at the cost of a little
9550     # extra space).
9551     freebsd2.2*)
9552       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9553       hardcode_libdir_flag_spec='-R$libdir'
9554       hardcode_direct=yes
9555       hardcode_shlibpath_var=no
9556       ;;
9557
9558     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9559     freebsd2*)
9560       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9561       hardcode_direct=yes
9562       hardcode_minus_L=yes
9563       hardcode_shlibpath_var=no
9564       ;;
9565
9566     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9567     freebsd* | kfreebsd*-gnu | dragonfly*)
9568       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9569       hardcode_libdir_flag_spec='-R$libdir'
9570       hardcode_direct=yes
9571       hardcode_shlibpath_var=no
9572       ;;
9573
9574     hpux9*)
9575       if test "$GCC" = yes; then
9576         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'
9577       else
9578         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'
9579       fi
9580       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9581       hardcode_libdir_separator=:
9582       hardcode_direct=yes
9583
9584       # hardcode_minus_L: Not really in the search PATH,
9585       # but as the default location of the library.
9586       hardcode_minus_L=yes
9587       export_dynamic_flag_spec='${wl}-E'
9588       ;;
9589
9590     hpux10* | hpux11*)
9591       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9592         case $host_cpu in
9593         hppa*64*|ia64*)
9594           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9595           ;;
9596         *)
9597           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9598           ;;
9599         esac
9600       else
9601         case $host_cpu in
9602         hppa*64*|ia64*)
9603           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
9604           ;;
9605         *)
9606           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9607           ;;
9608         esac
9609       fi
9610       if test "$with_gnu_ld" = no; then
9611         case $host_cpu in
9612         hppa*64*)
9613           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9614           hardcode_libdir_flag_spec_ld='+b $libdir'
9615           hardcode_libdir_separator=:
9616           hardcode_direct=no
9617           hardcode_shlibpath_var=no
9618           ;;
9619         ia64*)
9620           hardcode_libdir_flag_spec='-L$libdir'
9621           hardcode_direct=no
9622           hardcode_shlibpath_var=no
9623
9624           # hardcode_minus_L: Not really in the search PATH,
9625           # but as the default location of the library.
9626           hardcode_minus_L=yes
9627           ;;
9628         *)
9629           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9630           hardcode_libdir_separator=:
9631           hardcode_direct=yes
9632           export_dynamic_flag_spec='${wl}-E'
9633
9634           # hardcode_minus_L: Not really in the search PATH,
9635           # but as the default location of the library.
9636           hardcode_minus_L=yes
9637           ;;
9638         esac
9639       fi
9640       ;;
9641
9642     irix5* | irix6* | nonstopux*)
9643       if test "$GCC" = yes; then
9644         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'
9645       else
9646         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'
9647         hardcode_libdir_flag_spec_ld='-rpath $libdir'
9648       fi
9649       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9650       hardcode_libdir_separator=:
9651       link_all_deplibs=yes
9652       ;;
9653
9654     netbsd*)
9655       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9656         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
9657       else
9658         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
9659       fi
9660       hardcode_libdir_flag_spec='-R$libdir'
9661       hardcode_direct=yes
9662       hardcode_shlibpath_var=no
9663       ;;
9664
9665     newsos6)
9666       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9667       hardcode_direct=yes
9668       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9669       hardcode_libdir_separator=:
9670       hardcode_shlibpath_var=no
9671       ;;
9672
9673     openbsd*)
9674       hardcode_direct=yes
9675       hardcode_shlibpath_var=no
9676       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9677         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9678         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9679         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9680         export_dynamic_flag_spec='${wl}-E'
9681       else
9682        case $host_os in
9683          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9684            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9685            hardcode_libdir_flag_spec='-R$libdir'
9686            ;;
9687          *)
9688            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9689            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9690            ;;
9691        esac
9692       fi
9693       ;;
9694
9695     os2*)
9696       hardcode_libdir_flag_spec='-L$libdir'
9697       hardcode_minus_L=yes
9698       allow_undefined_flag=unsupported
9699       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'
9700       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9701       ;;
9702
9703     osf3*)
9704       if test "$GCC" = yes; then
9705         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9706         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'
9707       else
9708         allow_undefined_flag=' -expect_unresolved \*'
9709         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'
9710       fi
9711       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9712       hardcode_libdir_separator=:
9713       ;;
9714
9715     osf4* | osf5*)      # as osf3* with the addition of -msym flag
9716       if test "$GCC" = yes; then
9717         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9718         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'
9719         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9720       else
9721         allow_undefined_flag=' -expect_unresolved \*'
9722         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'
9723         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
9724         $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'
9725
9726         # Both c and cxx compiler support -rpath directly
9727         hardcode_libdir_flag_spec='-rpath $libdir'
9728       fi
9729       hardcode_libdir_separator=:
9730       ;;
9731
9732     sco3.2v5*)
9733       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9734       hardcode_shlibpath_var=no
9735       export_dynamic_flag_spec='${wl}-Bexport'
9736       runpath_var=LD_RUN_PATH
9737       hardcode_runpath_var=yes
9738       ;;
9739
9740     solaris*)
9741       no_undefined_flag=' -z text'
9742       if test "$GCC" = yes; then
9743         wlarc='${wl}'
9744         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9745         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9746           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
9747       else
9748         wlarc=''
9749         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9750         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9751         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9752       fi
9753       hardcode_libdir_flag_spec='-R$libdir'
9754       hardcode_shlibpath_var=no
9755       case $host_os in
9756       solaris2.[0-5] | solaris2.[0-5].*) ;;
9757       *)
9758         # The compiler driver will combine linker options so we
9759         # cannot just pass the convience library names through
9760         # without $wl, iff we do not link with $LD.
9761         # Luckily, gcc supports the same syntax we need for Sun Studio.
9762         # Supported since Solaris 2.6 (maybe 2.5.1?)
9763         case $wlarc in
9764         '')
9765           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
9766         *)
9767           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' ;;
9768         esac ;;
9769       esac
9770       link_all_deplibs=yes
9771       ;;
9772
9773     sunos4*)
9774       if test "x$host_vendor" = xsequent; then
9775         # Use $CC to link under sequent, because it throws in some extra .o
9776         # files that make .init and .fini sections work.
9777         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9778       else
9779         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9780       fi
9781       hardcode_libdir_flag_spec='-L$libdir'
9782       hardcode_direct=yes
9783       hardcode_minus_L=yes
9784       hardcode_shlibpath_var=no
9785       ;;
9786
9787     sysv4)
9788       case $host_vendor in
9789         sni)
9790           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9791           hardcode_direct=yes # is this really true???
9792         ;;
9793         siemens)
9794           ## LD is ld it makes a PLAMLIB
9795           ## CC just makes a GrossModule.
9796           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9797           reload_cmds='$CC -r -o $output$reload_objs'
9798           hardcode_direct=no
9799         ;;
9800         motorola)
9801           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9802           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9803         ;;
9804       esac
9805       runpath_var='LD_RUN_PATH'
9806       hardcode_shlibpath_var=no
9807       ;;
9808
9809     sysv4.3*)
9810       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9811       hardcode_shlibpath_var=no
9812       export_dynamic_flag_spec='-Bexport'
9813       ;;
9814
9815     sysv4*MP*)
9816       if test -d /usr/nec; then
9817         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9818         hardcode_shlibpath_var=no
9819         runpath_var=LD_RUN_PATH
9820         hardcode_runpath_var=yes
9821         ld_shlibs=yes
9822       fi
9823       ;;
9824
9825     sysv4.2uw2*)
9826       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9827       hardcode_direct=yes
9828       hardcode_minus_L=no
9829       hardcode_shlibpath_var=no
9830       hardcode_runpath_var=yes
9831       runpath_var=LD_RUN_PATH
9832       ;;
9833
9834    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
9835       no_undefined_flag='${wl}-z ${wl}text'
9836       if test "$GCC" = yes; then
9837         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9838       else
9839         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9840       fi
9841       runpath_var='LD_RUN_PATH'
9842       hardcode_shlibpath_var=no
9843       ;;
9844
9845     sysv5*)
9846       no_undefined_flag=' -z text'
9847       # $CC -shared without GNU ld will not create a library from C++
9848       # object files and a static libstdc++, better avoid it by now
9849       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9850       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9851                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9852       hardcode_libdir_flag_spec=
9853       hardcode_shlibpath_var=no
9854       runpath_var='LD_RUN_PATH'
9855       ;;
9856
9857     uts4*)
9858       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9859       hardcode_libdir_flag_spec='-L$libdir'
9860       hardcode_shlibpath_var=no
9861       ;;
9862
9863     *)
9864       ld_shlibs=no
9865       ;;
9866     esac
9867   fi
9868
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
9870 $as_echo "$ld_shlibs" >&6; }
9871 test "$ld_shlibs" = no && can_build_shared=no
9872
9873 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9874 if test "$GCC" = yes; then
9875   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9876 fi
9877
9878 #
9879 # Do we need to explicitly link libc?
9880 #
9881 case "x$archive_cmds_need_lc" in
9882 x|xyes)
9883   # Assume -lc should be added
9884   archive_cmds_need_lc=yes
9885
9886   if test "$enable_shared" = yes && test "$GCC" = yes; then
9887     case $archive_cmds in
9888     *'~'*)
9889       # FIXME: we may have to deal with multi-command sequences.
9890       ;;
9891     '$CC '*)
9892       # Test whether the compiler implicitly links with -lc since on some
9893       # systems, -lgcc has to come before -lc. If gcc already passes -lc
9894       # to ld, don't add -lc before -lgcc.
9895       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
9896 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
9897       $rm conftest*
9898       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
9899
9900       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9901   (eval $ac_compile) 2>&5
9902   ac_status=$?
9903   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9904   test $ac_status = 0; } 2>conftest.err; then
9905         soname=conftest
9906         lib=conftest
9907         libobjs=conftest.$ac_objext
9908         deplibs=
9909         wl=$lt_prog_compiler_wl
9910         compiler_flags=-v
9911         linker_flags=-v
9912         verstring=
9913         output_objdir=.
9914         libname=conftest
9915         lt_save_allow_undefined_flag=$allow_undefined_flag
9916         allow_undefined_flag=
9917         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9918   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
9919   ac_status=$?
9920   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9921   test $ac_status = 0; }
9922         then
9923           archive_cmds_need_lc=no
9924         else
9925           archive_cmds_need_lc=yes
9926         fi
9927         allow_undefined_flag=$lt_save_allow_undefined_flag
9928       else
9929         cat conftest.err 1>&5
9930       fi
9931       $rm conftest*
9932       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
9933 $as_echo "$archive_cmds_need_lc" >&6; }
9934       ;;
9935     esac
9936   fi
9937   ;;
9938 esac
9939
9940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
9941 $as_echo_n "checking dynamic linker characteristics... " >&6; }
9942 library_names_spec=
9943 libname_spec='lib$name'
9944 soname_spec=
9945 shrext_cmds=".so"
9946 postinstall_cmds=
9947 postuninstall_cmds=
9948 finish_cmds=
9949 finish_eval=
9950 shlibpath_var=
9951 shlibpath_overrides_runpath=unknown
9952 version_type=none
9953 dynamic_linker="$host_os ld.so"
9954 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9955 if test "$GCC" = yes; then
9956   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9957   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9958     # if the path contains ";" then we assume it to be the separator
9959     # otherwise default to the standard path separator (i.e. ":") - it is
9960     # assumed that no part of a normal pathname contains ";" but that should
9961     # okay in the real world where ";" in dirpaths is itself problematic.
9962     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9963   else
9964     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9965   fi
9966 else
9967   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9968 fi
9969 need_lib_prefix=unknown
9970 hardcode_into_libs=no
9971
9972 # when you set need_version to no, make sure it does not cause -set_version
9973 # flags to be left without arguments
9974 need_version=unknown
9975
9976 case $host_os in
9977 aix3*)
9978   version_type=linux
9979   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9980   shlibpath_var=LIBPATH
9981
9982   # AIX 3 has no versioning support, so we append a major version to the name.
9983   soname_spec='${libname}${release}${shared_ext}$major'
9984   ;;
9985
9986 aix4* | aix5*)
9987   version_type=linux
9988   need_lib_prefix=no
9989   need_version=no
9990   hardcode_into_libs=yes
9991   if test "$host_cpu" = ia64; then
9992     # AIX 5 supports IA64
9993     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9994     shlibpath_var=LD_LIBRARY_PATH
9995   else
9996     # With GCC up to 2.95.x, collect2 would create an import file
9997     # for dependence libraries.  The import file would start with
9998     # the line `#! .'.  This would cause the generated library to
9999     # depend on `.', always an invalid library.  This was fixed in
10000     # development snapshots of GCC prior to 3.0.
10001     case $host_os in
10002       aix4 | aix4.[01] | aix4.[01].*)
10003       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
10004            echo ' yes '
10005            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
10006         :
10007       else
10008         can_build_shared=no
10009       fi
10010       ;;
10011     esac
10012     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
10013     # soname into executable. Probably we can add versioning support to
10014     # collect2, so additional links can be useful in future.
10015     if test "$aix_use_runtimelinking" = yes; then
10016       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
10017       # instead of lib<name>.a to let people know that these are not
10018       # typical AIX shared libraries.
10019       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10020     else
10021       # We preserve .a as extension for shared libraries through AIX4.2
10022       # and later when we are not doing run time linking.
10023       library_names_spec='${libname}${release}.a $libname.a'
10024       soname_spec='${libname}${release}${shared_ext}$major'
10025     fi
10026     shlibpath_var=LIBPATH
10027   fi
10028   ;;
10029
10030 amigaos*)
10031   library_names_spec='$libname.ixlibrary $libname.a'
10032   # Create ${libname}_ixlibrary.a entries in /sys/libs.
10033   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'
10034   ;;
10035
10036 beos*)
10037   library_names_spec='${libname}${shared_ext}'
10038   dynamic_linker="$host_os ld.so"
10039   shlibpath_var=LIBRARY_PATH
10040   ;;
10041
10042 bsdi[45]*)
10043   version_type=linux
10044   need_version=no
10045   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10046   soname_spec='${libname}${release}${shared_ext}$major'
10047   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
10048   shlibpath_var=LD_LIBRARY_PATH
10049   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
10050   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
10051   # the default ld.so.conf also contains /usr/contrib/lib and
10052   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
10053   # libtool to hard-code these into programs
10054   ;;
10055
10056 cygwin* | mingw* | pw32*)
10057   version_type=windows
10058   shrext_cmds=".dll"
10059   need_version=no
10060   need_lib_prefix=no
10061
10062   case $GCC,$host_os in
10063   yes,cygwin* | yes,mingw* | yes,pw32*)
10064     library_names_spec='$libname.dll.a'
10065     # DLL is installed to $(libdir)/../bin by postinstall_cmds
10066     postinstall_cmds='base_file=`basename \${file}`~
10067       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
10068       dldir=$destdir/`dirname \$dlpath`~
10069       test -d \$dldir || mkdir -p \$dldir~
10070       $install_prog $dir/$dlname \$dldir/$dlname~
10071       chmod a+x \$dldir/$dlname'
10072     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10073       dlpath=$dir/\$dldll~
10074        $rm \$dlpath'
10075     shlibpath_overrides_runpath=yes
10076
10077     case $host_os in
10078     cygwin*)
10079       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
10080       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10081       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
10082       ;;
10083     mingw*)
10084       # MinGW DLLs use traditional 'lib' prefix
10085       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10086       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
10087       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
10088         # It is most probably a Windows format PATH printed by
10089         # mingw gcc, but we are running on Cygwin. Gcc prints its search
10090         # path with ; separators, and with drive letters. We can handle the
10091         # drive letters (cygwin fileutils understands them), so leave them,
10092         # especially as we might pass files found there to a mingw objdump,
10093         # which wouldn't understand a cygwinified path. Ahh.
10094         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10095       else
10096         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
10097       fi
10098       ;;
10099     pw32*)
10100       # pw32 DLLs use 'pw' prefix rather than 'lib'
10101       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10102       ;;
10103     esac
10104     ;;
10105
10106   *)
10107     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10108     ;;
10109   esac
10110   dynamic_linker='Win32 ld.exe'
10111   # FIXME: first we should search . and the directory the executable is in
10112   shlibpath_var=PATH
10113   ;;
10114
10115 darwin* | rhapsody*)
10116   dynamic_linker="$host_os dyld"
10117   version_type=darwin
10118   need_lib_prefix=no
10119   need_version=no
10120   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
10121   soname_spec='${libname}${release}${major}$shared_ext'
10122   shlibpath_overrides_runpath=yes
10123   shlibpath_var=DYLD_LIBRARY_PATH
10124   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10125   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
10126   if test "$GCC" = yes; then
10127     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"`
10128   else
10129     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
10130   fi
10131   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10132   ;;
10133
10134 dgux*)
10135   version_type=linux
10136   need_lib_prefix=no
10137   need_version=no
10138   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10139   soname_spec='${libname}${release}${shared_ext}$major'
10140   shlibpath_var=LD_LIBRARY_PATH
10141   ;;
10142
10143 freebsd1*)
10144   dynamic_linker=no
10145   ;;
10146
10147 kfreebsd*-gnu)
10148   version_type=linux
10149   need_lib_prefix=no
10150   need_version=no
10151   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10152   soname_spec='${libname}${release}${shared_ext}$major'
10153   shlibpath_var=LD_LIBRARY_PATH
10154   shlibpath_overrides_runpath=no
10155   hardcode_into_libs=yes
10156   dynamic_linker='GNU ld.so'
10157   ;;
10158
10159 freebsd* | dragonfly*)
10160   # DragonFly does not have aout.  When/if they implement a new
10161   # versioning mechanism, adjust this.
10162   if test -x /usr/bin/objformat; then
10163     objformat=`/usr/bin/objformat`
10164   else
10165     case $host_os in
10166     freebsd[123]*) objformat=aout ;;
10167     *) objformat=elf ;;
10168     esac
10169   fi
10170   version_type=freebsd-$objformat
10171   case $version_type in
10172     freebsd-elf*)
10173       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10174       need_version=no
10175       need_lib_prefix=no
10176       ;;
10177     freebsd-*)
10178       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
10179       need_version=yes
10180       ;;
10181   esac
10182   shlibpath_var=LD_LIBRARY_PATH
10183   case $host_os in
10184   freebsd2*)
10185     shlibpath_overrides_runpath=yes
10186     ;;
10187   freebsd3.[01]* | freebsdelf3.[01]*)
10188     shlibpath_overrides_runpath=yes
10189     hardcode_into_libs=yes
10190     ;;
10191   *) # from 3.2 on
10192     shlibpath_overrides_runpath=no
10193     hardcode_into_libs=yes
10194     ;;
10195   esac
10196   ;;
10197
10198 gnu*)
10199   version_type=linux
10200   need_lib_prefix=no
10201   need_version=no
10202   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10203   soname_spec='${libname}${release}${shared_ext}$major'
10204   shlibpath_var=LD_LIBRARY_PATH
10205   hardcode_into_libs=yes
10206   ;;
10207
10208 hpux9* | hpux10* | hpux11*)
10209   # Give a soname corresponding to the major version so that dld.sl refuses to
10210   # link against other versions.
10211   version_type=sunos
10212   need_lib_prefix=no
10213   need_version=no
10214   case $host_cpu in
10215   ia64*)
10216     shrext_cmds='.so'
10217     hardcode_into_libs=yes
10218     dynamic_linker="$host_os dld.so"
10219     shlibpath_var=LD_LIBRARY_PATH
10220     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10221     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10222     soname_spec='${libname}${release}${shared_ext}$major'
10223     if test "X$HPUX_IA64_MODE" = X32; then
10224       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10225     else
10226       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10227     fi
10228     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10229     ;;
10230    hppa*64*)
10231      shrext_cmds='.sl'
10232      hardcode_into_libs=yes
10233      dynamic_linker="$host_os dld.sl"
10234      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10235      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10236      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10237      soname_spec='${libname}${release}${shared_ext}$major'
10238      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10239      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10240      ;;
10241    *)
10242     shrext_cmds='.sl'
10243     dynamic_linker="$host_os dld.sl"
10244     shlibpath_var=SHLIB_PATH
10245     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10246     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10247     soname_spec='${libname}${release}${shared_ext}$major'
10248     ;;
10249   esac
10250   # HP-UX runs *really* slowly unless shared libraries are mode 555.
10251   postinstall_cmds='chmod 555 $lib'
10252   ;;
10253
10254 irix5* | irix6* | nonstopux*)
10255   case $host_os in
10256     nonstopux*) version_type=nonstopux ;;
10257     *)
10258         if test "$lt_cv_prog_gnu_ld" = yes; then
10259                 version_type=linux
10260         else
10261                 version_type=irix
10262         fi ;;
10263   esac
10264   need_lib_prefix=no
10265   need_version=no
10266   soname_spec='${libname}${release}${shared_ext}$major'
10267   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
10268   case $host_os in
10269   irix5* | nonstopux*)
10270     libsuff= shlibsuff=
10271     ;;
10272   *)
10273     case $LD in # libtool.m4 will add one of these switches to LD
10274     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10275       libsuff= shlibsuff= libmagic=32-bit;;
10276     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10277       libsuff=32 shlibsuff=N32 libmagic=N32;;
10278     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10279       libsuff=64 shlibsuff=64 libmagic=64-bit;;
10280     *) libsuff= shlibsuff= libmagic=never-match;;
10281     esac
10282     ;;
10283   esac
10284   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10285   shlibpath_overrides_runpath=no
10286   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10287   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
10288   hardcode_into_libs=yes
10289   ;;
10290
10291 # No shared lib support for Linux oldld, aout, or coff.
10292 linux*oldld* | linux*aout* | linux*coff*)
10293   dynamic_linker=no
10294   ;;
10295
10296 # This must be Linux ELF.
10297 linux*)
10298   version_type=linux
10299   need_lib_prefix=no
10300   need_version=no
10301   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10302   soname_spec='${libname}${release}${shared_ext}$major'
10303   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10304   shlibpath_var=LD_LIBRARY_PATH
10305   shlibpath_overrides_runpath=no
10306   # This implies no fast_install, which is unacceptable.
10307   # Some rework will be needed to allow for fast_install
10308   # before this can be enabled.
10309   hardcode_into_libs=yes
10310
10311   # Append ld.so.conf contents to the search path
10312   if test -f /etc/ld.so.conf; then
10313     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' ' '`
10314     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10315   fi
10316
10317   # We used to test for /lib/ld.so.1 and disable shared libraries on
10318   # powerpc, because MkLinux only supported shared libraries with the
10319   # GNU dynamic linker.  Since this was broken with cross compilers,
10320   # most powerpc-linux boxes support dynamic linking these days and
10321   # people can always --disable-shared, the test was removed, and we
10322   # assume the GNU/Linux dynamic linker is in use.
10323   dynamic_linker='GNU/Linux ld.so'
10324   ;;
10325
10326 knetbsd*-gnu)
10327   version_type=linux
10328   need_lib_prefix=no
10329   need_version=no
10330   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10331   soname_spec='${libname}${release}${shared_ext}$major'
10332   shlibpath_var=LD_LIBRARY_PATH
10333   shlibpath_overrides_runpath=no
10334   hardcode_into_libs=yes
10335   dynamic_linker='GNU ld.so'
10336   ;;
10337
10338 netbsd*)
10339   version_type=sunos
10340   need_lib_prefix=no
10341   need_version=no
10342   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10343     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10344     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10345     dynamic_linker='NetBSD (a.out) ld.so'
10346   else
10347     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10348     soname_spec='${libname}${release}${shared_ext}$major'
10349     dynamic_linker='NetBSD ld.elf_so'
10350   fi
10351   shlibpath_var=LD_LIBRARY_PATH
10352   shlibpath_overrides_runpath=yes
10353   hardcode_into_libs=yes
10354   ;;
10355
10356 newsos6)
10357   version_type=linux
10358   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10359   shlibpath_var=LD_LIBRARY_PATH
10360   shlibpath_overrides_runpath=yes
10361   ;;
10362
10363 nto-qnx*)
10364   version_type=linux
10365   need_lib_prefix=no
10366   need_version=no
10367   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10368   soname_spec='${libname}${release}${shared_ext}$major'
10369   shlibpath_var=LD_LIBRARY_PATH
10370   shlibpath_overrides_runpath=yes
10371   ;;
10372
10373 openbsd*)
10374   version_type=sunos
10375   need_lib_prefix=no
10376   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10377   case $host_os in
10378     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10379     *)                         need_version=no  ;;
10380   esac
10381   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10382   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10383   shlibpath_var=LD_LIBRARY_PATH
10384   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10385     case $host_os in
10386       openbsd2.[89] | openbsd2.[89].*)
10387         shlibpath_overrides_runpath=no
10388         ;;
10389       *)
10390         shlibpath_overrides_runpath=yes
10391         ;;
10392       esac
10393   else
10394     shlibpath_overrides_runpath=yes
10395   fi
10396   ;;
10397
10398 os2*)
10399   libname_spec='$name'
10400   shrext_cmds=".dll"
10401   need_lib_prefix=no
10402   library_names_spec='$libname${shared_ext} $libname.a'
10403   dynamic_linker='OS/2 ld.exe'
10404   shlibpath_var=LIBPATH
10405   ;;
10406
10407 osf3* | osf4* | osf5*)
10408   version_type=osf
10409   need_lib_prefix=no
10410   need_version=no
10411   soname_spec='${libname}${release}${shared_ext}$major'
10412   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10413   shlibpath_var=LD_LIBRARY_PATH
10414   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10415   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
10416   ;;
10417
10418 sco3.2v5*)
10419   version_type=osf
10420   soname_spec='${libname}${release}${shared_ext}$major'
10421   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10422   shlibpath_var=LD_LIBRARY_PATH
10423   ;;
10424
10425 solaris*)
10426   version_type=linux
10427   need_lib_prefix=no
10428   need_version=no
10429   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10430   soname_spec='${libname}${release}${shared_ext}$major'
10431   shlibpath_var=LD_LIBRARY_PATH
10432   shlibpath_overrides_runpath=yes
10433   hardcode_into_libs=yes
10434   # ldd complains unless libraries are executable
10435   postinstall_cmds='chmod +x $lib'
10436   ;;
10437
10438 sunos4*)
10439   version_type=sunos
10440   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10441   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10442   shlibpath_var=LD_LIBRARY_PATH
10443   shlibpath_overrides_runpath=yes
10444   if test "$with_gnu_ld" = yes; then
10445     need_lib_prefix=no
10446   fi
10447   need_version=yes
10448   ;;
10449
10450 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10451   version_type=linux
10452   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10453   soname_spec='${libname}${release}${shared_ext}$major'
10454   shlibpath_var=LD_LIBRARY_PATH
10455   case $host_vendor in
10456     sni)
10457       shlibpath_overrides_runpath=no
10458       need_lib_prefix=no
10459       export_dynamic_flag_spec='${wl}-Blargedynsym'
10460       runpath_var=LD_RUN_PATH
10461       ;;
10462     siemens)
10463       need_lib_prefix=no
10464       ;;
10465     motorola)
10466       need_lib_prefix=no
10467       need_version=no
10468       shlibpath_overrides_runpath=no
10469       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10470       ;;
10471   esac
10472   ;;
10473
10474 sysv4*MP*)
10475   if test -d /usr/nec ;then
10476     version_type=linux
10477     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
10478     soname_spec='$libname${shared_ext}.$major'
10479     shlibpath_var=LD_LIBRARY_PATH
10480   fi
10481   ;;
10482
10483 uts4*)
10484   version_type=linux
10485   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10486   soname_spec='${libname}${release}${shared_ext}$major'
10487   shlibpath_var=LD_LIBRARY_PATH
10488   ;;
10489
10490 *)
10491   dynamic_linker=no
10492   ;;
10493 esac
10494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
10495 $as_echo "$dynamic_linker" >&6; }
10496 test "$dynamic_linker" = no && can_build_shared=no
10497
10498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
10499 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
10500 hardcode_action=
10501 if test -n "$hardcode_libdir_flag_spec" || \
10502    test -n "$runpath_var" || \
10503    test "X$hardcode_automatic" = "Xyes" ; then
10504
10505   # We can hardcode non-existant directories.
10506   if test "$hardcode_direct" != no &&
10507      # If the only mechanism to avoid hardcoding is shlibpath_var, we
10508      # have to relink, otherwise we might link with an installed library
10509      # when we should be linking with a yet-to-be-installed one
10510      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
10511      test "$hardcode_minus_L" != no; then
10512     # Linking always hardcodes the temporary library directory.
10513     hardcode_action=relink
10514   else
10515     # We can link without hardcoding, and we can hardcode nonexisting dirs.
10516     hardcode_action=immediate
10517   fi
10518 else
10519   # We cannot hardcode anything, or else we can only hardcode existing
10520   # directories.
10521   hardcode_action=unsupported
10522 fi
10523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
10524 $as_echo "$hardcode_action" >&6; }
10525
10526 if test "$hardcode_action" = relink; then
10527   # Fast installation is not supported
10528   enable_fast_install=no
10529 elif test "$shlibpath_overrides_runpath" = yes ||
10530      test "$enable_shared" = no; then
10531   # Fast installation is not necessary
10532   enable_fast_install=needless
10533 fi
10534
10535 striplib=
10536 old_striplib=
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
10538 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
10539 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
10540   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
10541   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
10542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10543 $as_echo "yes" >&6; }
10544 else
10545 # FIXME - insert some real tests, host_os isn't really good enough
10546   case $host_os in
10547    darwin*)
10548        if test -n "$STRIP" ; then
10549          striplib="$STRIP -x"
10550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10551 $as_echo "yes" >&6; }
10552        else
10553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10554 $as_echo "no" >&6; }
10555 fi
10556        ;;
10557    *)
10558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10559 $as_echo "no" >&6; }
10560     ;;
10561   esac
10562 fi
10563
10564 if test "x$enable_dlopen" != xyes; then
10565   enable_dlopen=unknown
10566   enable_dlopen_self=unknown
10567   enable_dlopen_self_static=unknown
10568 else
10569   lt_cv_dlopen=no
10570   lt_cv_dlopen_libs=
10571
10572   case $host_os in
10573   beos*)
10574     lt_cv_dlopen="load_add_on"
10575     lt_cv_dlopen_libs=
10576     lt_cv_dlopen_self=yes
10577     ;;
10578
10579   mingw* | pw32*)
10580     lt_cv_dlopen="LoadLibrary"
10581     lt_cv_dlopen_libs=
10582    ;;
10583
10584   cygwin*)
10585     lt_cv_dlopen="dlopen"
10586     lt_cv_dlopen_libs=
10587    ;;
10588
10589   darwin*)
10590   # if libdl is installed we need to link against it
10591     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10592 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10593 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10594   $as_echo_n "(cached) " >&6
10595 else
10596   ac_check_lib_save_LIBS=$LIBS
10597 LIBS="-ldl  $LIBS"
10598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10599 /* end confdefs.h.  */
10600
10601 /* Override any GCC internal prototype to avoid an error.
10602    Use char because int might match the return type of a GCC
10603    builtin and then its argument prototype would still apply.  */
10604 #ifdef __cplusplus
10605 extern "C"
10606 #endif
10607 char dlopen ();
10608 int
10609 main ()
10610 {
10611 return dlopen ();
10612   ;
10613   return 0;
10614 }
10615 _ACEOF
10616 if ac_fn_c_try_link "$LINENO"; then :
10617   ac_cv_lib_dl_dlopen=yes
10618 else
10619   ac_cv_lib_dl_dlopen=no
10620 fi
10621 rm -f core conftest.err conftest.$ac_objext \
10622     conftest$ac_exeext conftest.$ac_ext
10623 LIBS=$ac_check_lib_save_LIBS
10624 fi
10625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10626 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10627 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10628   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10629 else
10630
10631     lt_cv_dlopen="dyld"
10632     lt_cv_dlopen_libs=
10633     lt_cv_dlopen_self=yes
10634
10635 fi
10636
10637    ;;
10638
10639   *)
10640     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
10641 if test "x$ac_cv_func_shl_load" = x""yes; then :
10642   lt_cv_dlopen="shl_load"
10643 else
10644   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10645 $as_echo_n "checking for shl_load in -ldld... " >&6; }
10646 if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
10647   $as_echo_n "(cached) " >&6
10648 else
10649   ac_check_lib_save_LIBS=$LIBS
10650 LIBS="-ldld  $LIBS"
10651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10652 /* end confdefs.h.  */
10653
10654 /* Override any GCC internal prototype to avoid an error.
10655    Use char because int might match the return type of a GCC
10656    builtin and then its argument prototype would still apply.  */
10657 #ifdef __cplusplus
10658 extern "C"
10659 #endif
10660 char shl_load ();
10661 int
10662 main ()
10663 {
10664 return shl_load ();
10665   ;
10666   return 0;
10667 }
10668 _ACEOF
10669 if ac_fn_c_try_link "$LINENO"; then :
10670   ac_cv_lib_dld_shl_load=yes
10671 else
10672   ac_cv_lib_dld_shl_load=no
10673 fi
10674 rm -f core conftest.err conftest.$ac_objext \
10675     conftest$ac_exeext conftest.$ac_ext
10676 LIBS=$ac_check_lib_save_LIBS
10677 fi
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
10679 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
10680 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
10681   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
10682 else
10683   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
10684 if test "x$ac_cv_func_dlopen" = x""yes; then :
10685   lt_cv_dlopen="dlopen"
10686 else
10687   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10688 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10689 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10690   $as_echo_n "(cached) " >&6
10691 else
10692   ac_check_lib_save_LIBS=$LIBS
10693 LIBS="-ldl  $LIBS"
10694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10695 /* end confdefs.h.  */
10696
10697 /* Override any GCC internal prototype to avoid an error.
10698    Use char because int might match the return type of a GCC
10699    builtin and then its argument prototype would still apply.  */
10700 #ifdef __cplusplus
10701 extern "C"
10702 #endif
10703 char dlopen ();
10704 int
10705 main ()
10706 {
10707 return dlopen ();
10708   ;
10709   return 0;
10710 }
10711 _ACEOF
10712 if ac_fn_c_try_link "$LINENO"; then :
10713   ac_cv_lib_dl_dlopen=yes
10714 else
10715   ac_cv_lib_dl_dlopen=no
10716 fi
10717 rm -f core conftest.err conftest.$ac_objext \
10718     conftest$ac_exeext conftest.$ac_ext
10719 LIBS=$ac_check_lib_save_LIBS
10720 fi
10721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10722 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10723 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10724   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10725 else
10726   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
10727 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
10728 if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
10729   $as_echo_n "(cached) " >&6
10730 else
10731   ac_check_lib_save_LIBS=$LIBS
10732 LIBS="-lsvld  $LIBS"
10733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10734 /* end confdefs.h.  */
10735
10736 /* Override any GCC internal prototype to avoid an error.
10737    Use char because int might match the return type of a GCC
10738    builtin and then its argument prototype would still apply.  */
10739 #ifdef __cplusplus
10740 extern "C"
10741 #endif
10742 char dlopen ();
10743 int
10744 main ()
10745 {
10746 return dlopen ();
10747   ;
10748   return 0;
10749 }
10750 _ACEOF
10751 if ac_fn_c_try_link "$LINENO"; then :
10752   ac_cv_lib_svld_dlopen=yes
10753 else
10754   ac_cv_lib_svld_dlopen=no
10755 fi
10756 rm -f core conftest.err conftest.$ac_objext \
10757     conftest$ac_exeext conftest.$ac_ext
10758 LIBS=$ac_check_lib_save_LIBS
10759 fi
10760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
10761 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
10762 if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
10763   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10764 else
10765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
10766 $as_echo_n "checking for dld_link in -ldld... " >&6; }
10767 if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
10768   $as_echo_n "(cached) " >&6
10769 else
10770   ac_check_lib_save_LIBS=$LIBS
10771 LIBS="-ldld  $LIBS"
10772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10773 /* end confdefs.h.  */
10774
10775 /* Override any GCC internal prototype to avoid an error.
10776    Use char because int might match the return type of a GCC
10777    builtin and then its argument prototype would still apply.  */
10778 #ifdef __cplusplus
10779 extern "C"
10780 #endif
10781 char dld_link ();
10782 int
10783 main ()
10784 {
10785 return dld_link ();
10786   ;
10787   return 0;
10788 }
10789 _ACEOF
10790 if ac_fn_c_try_link "$LINENO"; then :
10791   ac_cv_lib_dld_dld_link=yes
10792 else
10793   ac_cv_lib_dld_dld_link=no
10794 fi
10795 rm -f core conftest.err conftest.$ac_objext \
10796     conftest$ac_exeext conftest.$ac_ext
10797 LIBS=$ac_check_lib_save_LIBS
10798 fi
10799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
10800 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
10801 if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
10802   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10803 fi
10804
10805
10806 fi
10807
10808
10809 fi
10810
10811
10812 fi
10813
10814
10815 fi
10816
10817
10818 fi
10819
10820     ;;
10821   esac
10822
10823   if test "x$lt_cv_dlopen" != xno; then
10824     enable_dlopen=yes
10825   else
10826     enable_dlopen=no
10827   fi
10828
10829   case $lt_cv_dlopen in
10830   dlopen)
10831     save_CPPFLAGS="$CPPFLAGS"
10832     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10833
10834     save_LDFLAGS="$LDFLAGS"
10835     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10836
10837     save_LIBS="$LIBS"
10838     LIBS="$lt_cv_dlopen_libs $LIBS"
10839
10840     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
10841 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
10842 if test "${lt_cv_dlopen_self+set}" = set; then :
10843   $as_echo_n "(cached) " >&6
10844 else
10845           if test "$cross_compiling" = yes; then :
10846   lt_cv_dlopen_self=cross
10847 else
10848   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10849   lt_status=$lt_dlunknown
10850   cat > conftest.$ac_ext <<EOF
10851 #line 10851 "configure"
10852 #include "confdefs.h"
10853
10854 #if HAVE_DLFCN_H
10855 #include <dlfcn.h>
10856 #endif
10857
10858 #include <stdio.h>
10859
10860 #ifdef RTLD_GLOBAL
10861 #  define LT_DLGLOBAL           RTLD_GLOBAL
10862 #else
10863 #  ifdef DL_GLOBAL
10864 #    define LT_DLGLOBAL         DL_GLOBAL
10865 #  else
10866 #    define LT_DLGLOBAL         0
10867 #  endif
10868 #endif
10869
10870 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10871    find out it does not work in some platform. */
10872 #ifndef LT_DLLAZY_OR_NOW
10873 #  ifdef RTLD_LAZY
10874 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10875 #  else
10876 #    ifdef DL_LAZY
10877 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10878 #    else
10879 #      ifdef RTLD_NOW
10880 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10881 #      else
10882 #        ifdef DL_NOW
10883 #          define LT_DLLAZY_OR_NOW      DL_NOW
10884 #        else
10885 #          define LT_DLLAZY_OR_NOW      0
10886 #        endif
10887 #      endif
10888 #    endif
10889 #  endif
10890 #endif
10891
10892 #ifdef __cplusplus
10893 extern "C" void exit (int);
10894 #endif
10895
10896 void fnord() { int i=42;}
10897 int main ()
10898 {
10899   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10900   int status = $lt_dlunknown;
10901
10902   if (self)
10903     {
10904       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10905       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10906       /* dlclose (self); */
10907     }
10908
10909     exit (status);
10910 }
10911 EOF
10912   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10913   (eval $ac_link) 2>&5
10914   ac_status=$?
10915   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10916   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10917     (./conftest; exit; ) >&5 2>/dev/null
10918     lt_status=$?
10919     case x$lt_status in
10920       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10921       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10922       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10923     esac
10924   else :
10925     # compilation failed
10926     lt_cv_dlopen_self=no
10927   fi
10928 fi
10929 rm -fr conftest*
10930
10931
10932 fi
10933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
10934 $as_echo "$lt_cv_dlopen_self" >&6; }
10935
10936     if test "x$lt_cv_dlopen_self" = xyes; then
10937       LDFLAGS="$LDFLAGS $link_static_flag"
10938       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
10939 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
10940 if test "${lt_cv_dlopen_self_static+set}" = set; then :
10941   $as_echo_n "(cached) " >&6
10942 else
10943           if test "$cross_compiling" = yes; then :
10944   lt_cv_dlopen_self_static=cross
10945 else
10946   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10947   lt_status=$lt_dlunknown
10948   cat > conftest.$ac_ext <<EOF
10949 #line 10949 "configure"
10950 #include "confdefs.h"
10951
10952 #if HAVE_DLFCN_H
10953 #include <dlfcn.h>
10954 #endif
10955
10956 #include <stdio.h>
10957
10958 #ifdef RTLD_GLOBAL
10959 #  define LT_DLGLOBAL           RTLD_GLOBAL
10960 #else
10961 #  ifdef DL_GLOBAL
10962 #    define LT_DLGLOBAL         DL_GLOBAL
10963 #  else
10964 #    define LT_DLGLOBAL         0
10965 #  endif
10966 #endif
10967
10968 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10969    find out it does not work in some platform. */
10970 #ifndef LT_DLLAZY_OR_NOW
10971 #  ifdef RTLD_LAZY
10972 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10973 #  else
10974 #    ifdef DL_LAZY
10975 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10976 #    else
10977 #      ifdef RTLD_NOW
10978 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10979 #      else
10980 #        ifdef DL_NOW
10981 #          define LT_DLLAZY_OR_NOW      DL_NOW
10982 #        else
10983 #          define LT_DLLAZY_OR_NOW      0
10984 #        endif
10985 #      endif
10986 #    endif
10987 #  endif
10988 #endif
10989
10990 #ifdef __cplusplus
10991 extern "C" void exit (int);
10992 #endif
10993
10994 void fnord() { int i=42;}
10995 int main ()
10996 {
10997   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10998   int status = $lt_dlunknown;
10999
11000   if (self)
11001     {
11002       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
11003       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11004       /* dlclose (self); */
11005     }
11006
11007     exit (status);
11008 }
11009 EOF
11010   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11011   (eval $ac_link) 2>&5
11012   ac_status=$?
11013   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11014   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
11015     (./conftest; exit; ) >&5 2>/dev/null
11016     lt_status=$?
11017     case x$lt_status in
11018       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
11019       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
11020       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
11021     esac
11022   else :
11023     # compilation failed
11024     lt_cv_dlopen_self_static=no
11025   fi
11026 fi
11027 rm -fr conftest*
11028
11029
11030 fi
11031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
11032 $as_echo "$lt_cv_dlopen_self_static" >&6; }
11033     fi
11034
11035     CPPFLAGS="$save_CPPFLAGS"
11036     LDFLAGS="$save_LDFLAGS"
11037     LIBS="$save_LIBS"
11038     ;;
11039   esac
11040
11041   case $lt_cv_dlopen_self in
11042   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
11043   *) enable_dlopen_self=unknown ;;
11044   esac
11045
11046   case $lt_cv_dlopen_self_static in
11047   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
11048   *) enable_dlopen_self_static=unknown ;;
11049   esac
11050 fi
11051
11052
11053 # Report which librarie types wil actually be built
11054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
11055 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
11056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
11057 $as_echo "$can_build_shared" >&6; }
11058
11059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
11060 $as_echo_n "checking whether to build shared libraries... " >&6; }
11061 test "$can_build_shared" = "no" && enable_shared=no
11062
11063 # On AIX, shared libraries and static libraries use the same namespace, and
11064 # are all built from PIC.
11065 case $host_os in
11066 aix3*)
11067   test "$enable_shared" = yes && enable_static=no
11068   if test -n "$RANLIB"; then
11069     archive_cmds="$archive_cmds~\$RANLIB \$lib"
11070     postinstall_cmds='$RANLIB $lib'
11071   fi
11072   ;;
11073
11074 aix4* | aix5*)
11075   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
11076     test "$enable_shared" = yes && enable_static=no
11077   fi
11078     ;;
11079 esac
11080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
11081 $as_echo "$enable_shared" >&6; }
11082
11083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
11084 $as_echo_n "checking whether to build static libraries... " >&6; }
11085 # Make sure either enable_shared or enable_static is yes.
11086 test "$enable_shared" = yes || enable_static=yes
11087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
11088 $as_echo "$enable_static" >&6; }
11089
11090 # The else clause should only fire when bootstrapping the
11091 # libtool distribution, otherwise you forgot to ship ltmain.sh
11092 # with your package, and you will get complaints that there are
11093 # no rules to generate ltmain.sh.
11094 if test -f "$ltmain"; then
11095   # See if we are running on zsh, and set the options which allow our commands through
11096   # without removal of \ escapes.
11097   if test -n "${ZSH_VERSION+set}" ; then
11098     setopt NO_GLOB_SUBST
11099   fi
11100   # Now quote all the things that may contain metacharacters while being
11101   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11102   # variables and quote the copies for generation of the libtool script.
11103   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11104     SED SHELL STRIP \
11105     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11106     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11107     deplibs_check_method reload_flag reload_cmds need_locks \
11108     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11109     lt_cv_sys_global_symbol_to_c_name_address \
11110     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11111     old_postinstall_cmds old_postuninstall_cmds \
11112     compiler \
11113     CC \
11114     LD \
11115     lt_prog_compiler_wl \
11116     lt_prog_compiler_pic \
11117     lt_prog_compiler_static \
11118     lt_prog_compiler_no_builtin_flag \
11119     export_dynamic_flag_spec \
11120     thread_safe_flag_spec \
11121     whole_archive_flag_spec \
11122     enable_shared_with_static_runtimes \
11123     old_archive_cmds \
11124     old_archive_from_new_cmds \
11125     predep_objects \
11126     postdep_objects \
11127     predeps \
11128     postdeps \
11129     compiler_lib_search_path \
11130     archive_cmds \
11131     archive_expsym_cmds \
11132     postinstall_cmds \
11133     postuninstall_cmds \
11134     old_archive_from_expsyms_cmds \
11135     allow_undefined_flag \
11136     no_undefined_flag \
11137     export_symbols_cmds \
11138     hardcode_libdir_flag_spec \
11139     hardcode_libdir_flag_spec_ld \
11140     hardcode_libdir_separator \
11141     hardcode_automatic \
11142     module_cmds \
11143     module_expsym_cmds \
11144     lt_cv_prog_compiler_c_o \
11145     exclude_expsyms \
11146     include_expsyms; do
11147
11148     case $var in
11149     old_archive_cmds | \
11150     old_archive_from_new_cmds | \
11151     archive_cmds | \
11152     archive_expsym_cmds | \
11153     module_cmds | \
11154     module_expsym_cmds | \
11155     old_archive_from_expsyms_cmds | \
11156     export_symbols_cmds | \
11157     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11158     postinstall_cmds | postuninstall_cmds | \
11159     old_postinstall_cmds | old_postuninstall_cmds | \
11160     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11161       # Double-quote double-evaled strings.
11162       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11163       ;;
11164     *)
11165       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11166       ;;
11167     esac
11168   done
11169
11170   case $lt_echo in
11171   *'\$0 --fallback-echo"')
11172     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11173     ;;
11174   esac
11175
11176 cfgfile="${ofile}T"
11177   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
11178   $rm -f "$cfgfile"
11179   { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
11180 $as_echo "$as_me: creating $ofile" >&6;}
11181
11182   cat <<__EOF__ >> "$cfgfile"
11183 #! $SHELL
11184
11185 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
11186 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
11187 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
11188 #
11189 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
11190 # Free Software Foundation, Inc.
11191 #
11192 # This file is part of GNU Libtool:
11193 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
11194 #
11195 # This program is free software; you can redistribute it and/or modify
11196 # it under the terms of the GNU General Public License as published by
11197 # the Free Software Foundation; either version 2 of the License, or
11198 # (at your option) any later version.
11199 #
11200 # This program is distributed in the hope that it will be useful, but
11201 # WITHOUT ANY WARRANTY; without even the implied warranty of
11202 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11203 # General Public License for more details.
11204 #
11205 # You should have received a copy of the GNU General Public License
11206 # along with this program; if not, write to the Free Software
11207 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
11208 #
11209 # As a special exception to the GNU General Public License, if you
11210 # distribute this file as part of a program that contains a
11211 # configuration script generated by Autoconf, you may include it under
11212 # the same distribution terms that you use for the rest of that program.
11213
11214 # A sed program that does not truncate output.
11215 SED=$lt_SED
11216
11217 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
11218 Xsed="$SED -e 1s/^X//"
11219
11220 # The HP-UX ksh and POSIX shell print the target directory to stdout
11221 # if CDPATH is set.
11222 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11223
11224 # The names of the tagged configurations supported by this script.
11225 available_tags=
11226
11227 # ### BEGIN LIBTOOL CONFIG
11228
11229 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11230
11231 # Shell to use when invoking shell scripts.
11232 SHELL=$lt_SHELL
11233
11234 # Whether or not to build shared libraries.
11235 build_libtool_libs=$enable_shared
11236
11237 # Whether or not to build static libraries.
11238 build_old_libs=$enable_static
11239
11240 # Whether or not to add -lc for building shared libraries.
11241 build_libtool_need_lc=$archive_cmds_need_lc
11242
11243 # Whether or not to disallow shared libs when runtime libs are static
11244 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
11245
11246 # Whether or not to optimize for fast installation.
11247 fast_install=$enable_fast_install
11248
11249 # The host system.
11250 host_alias=$host_alias
11251 host=$host
11252 host_os=$host_os
11253
11254 # The build system.
11255 build_alias=$build_alias
11256 build=$build
11257 build_os=$build_os
11258
11259 # An echo program that does not interpret backslashes.
11260 echo=$lt_echo
11261
11262 # The archiver.
11263 AR=$lt_AR
11264 AR_FLAGS=$lt_AR_FLAGS
11265
11266 # A C compiler.
11267 LTCC=$lt_LTCC
11268
11269 # A language-specific compiler.
11270 CC=$lt_compiler
11271
11272 # Is the compiler the GNU C compiler?
11273 with_gcc=$GCC
11274
11275 # An ERE matcher.
11276 EGREP=$lt_EGREP
11277
11278 # The linker used to build libraries.
11279 LD=$lt_LD
11280
11281 # Whether we need hard or soft links.
11282 LN_S=$lt_LN_S
11283
11284 # A BSD-compatible nm program.
11285 NM=$lt_NM
11286
11287 # A symbol stripping program
11288 STRIP=$lt_STRIP
11289
11290 # Used to examine libraries when file_magic_cmd begins "file"
11291 MAGIC_CMD=$MAGIC_CMD
11292
11293 # Used on cygwin: DLL creation program.
11294 DLLTOOL="$DLLTOOL"
11295
11296 # Used on cygwin: object dumper.
11297 OBJDUMP="$OBJDUMP"
11298
11299 # Used on cygwin: assembler.
11300 AS="$AS"
11301
11302 # The name of the directory that contains temporary libtool files.
11303 objdir=$objdir
11304
11305 # How to create reloadable object files.
11306 reload_flag=$lt_reload_flag
11307 reload_cmds=$lt_reload_cmds
11308
11309 # How to pass a linker flag through the compiler.
11310 wl=$lt_lt_prog_compiler_wl
11311
11312 # Object file suffix (normally "o").
11313 objext="$ac_objext"
11314
11315 # Old archive suffix (normally "a").
11316 libext="$libext"
11317
11318 # Shared library suffix (normally ".so").
11319 shrext_cmds='$shrext_cmds'
11320
11321 # Executable file suffix (normally "").
11322 exeext="$exeext"
11323
11324 # Additional compiler flags for building library objects.
11325 pic_flag=$lt_lt_prog_compiler_pic
11326 pic_mode=$pic_mode
11327
11328 # What is the maximum length of a command?
11329 max_cmd_len=$lt_cv_sys_max_cmd_len
11330
11331 # Does compiler simultaneously support -c and -o options?
11332 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
11333
11334 # Must we lock files when doing compilation?
11335 need_locks=$lt_need_locks
11336
11337 # Do we need the lib prefix for modules?
11338 need_lib_prefix=$need_lib_prefix
11339
11340 # Do we need a version for libraries?
11341 need_version=$need_version
11342
11343 # Whether dlopen is supported.
11344 dlopen_support=$enable_dlopen
11345
11346 # Whether dlopen of programs is supported.
11347 dlopen_self=$enable_dlopen_self
11348
11349 # Whether dlopen of statically linked programs is supported.
11350 dlopen_self_static=$enable_dlopen_self_static
11351
11352 # Compiler flag to prevent dynamic linking.
11353 link_static_flag=$lt_lt_prog_compiler_static
11354
11355 # Compiler flag to turn off builtin functions.
11356 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
11357
11358 # Compiler flag to allow reflexive dlopens.
11359 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
11360
11361 # Compiler flag to generate shared objects directly from archives.
11362 whole_archive_flag_spec=$lt_whole_archive_flag_spec
11363
11364 # Compiler flag to generate thread-safe objects.
11365 thread_safe_flag_spec=$lt_thread_safe_flag_spec
11366
11367 # Library versioning type.
11368 version_type=$version_type
11369
11370 # Format of library name prefix.
11371 libname_spec=$lt_libname_spec
11372
11373 # List of archive names.  First name is the real one, the rest are links.
11374 # The last name is the one that the linker finds with -lNAME.
11375 library_names_spec=$lt_library_names_spec
11376
11377 # The coded name of the library, if different from the real name.
11378 soname_spec=$lt_soname_spec
11379
11380 # Commands used to build and install an old-style archive.
11381 RANLIB=$lt_RANLIB
11382 old_archive_cmds=$lt_old_archive_cmds
11383 old_postinstall_cmds=$lt_old_postinstall_cmds
11384 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11385
11386 # Create an old-style archive from a shared archive.
11387 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
11388
11389 # Create a temporary old-style archive to link instead of a shared archive.
11390 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
11391
11392 # Commands used to build and install a shared archive.
11393 archive_cmds=$lt_archive_cmds
11394 archive_expsym_cmds=$lt_archive_expsym_cmds
11395 postinstall_cmds=$lt_postinstall_cmds
11396 postuninstall_cmds=$lt_postuninstall_cmds
11397
11398 # Commands used to build a loadable module (assumed same as above if empty)
11399 module_cmds=$lt_module_cmds
11400 module_expsym_cmds=$lt_module_expsym_cmds
11401
11402 # Commands to strip libraries.
11403 old_striplib=$lt_old_striplib
11404 striplib=$lt_striplib
11405
11406 # Dependencies to place before the objects being linked to create a
11407 # shared library.
11408 predep_objects=$lt_predep_objects
11409
11410 # Dependencies to place after the objects being linked to create a
11411 # shared library.
11412 postdep_objects=$lt_postdep_objects
11413
11414 # Dependencies to place before the objects being linked to create a
11415 # shared library.
11416 predeps=$lt_predeps
11417
11418 # Dependencies to place after the objects being linked to create a
11419 # shared library.
11420 postdeps=$lt_postdeps
11421
11422 # The library search path used internally by the compiler when linking
11423 # a shared library.
11424 compiler_lib_search_path=$lt_compiler_lib_search_path
11425
11426 # Method to check whether dependent libraries are shared objects.
11427 deplibs_check_method=$lt_deplibs_check_method
11428
11429 # Command to use when deplibs_check_method == file_magic.
11430 file_magic_cmd=$lt_file_magic_cmd
11431
11432 # Flag that allows shared libraries with undefined symbols to be built.
11433 allow_undefined_flag=$lt_allow_undefined_flag
11434
11435 # Flag that forces no undefined symbols.
11436 no_undefined_flag=$lt_no_undefined_flag
11437
11438 # Commands used to finish a libtool library installation in a directory.
11439 finish_cmds=$lt_finish_cmds
11440
11441 # Same as above, but a single script fragment to be evaled but not shown.
11442 finish_eval=$lt_finish_eval
11443
11444 # Take the output of nm and produce a listing of raw symbols and C names.
11445 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11446
11447 # Transform the output of nm in a proper C declaration
11448 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11449
11450 # Transform the output of nm in a C name address pair
11451 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11452
11453 # This is the shared library runtime path variable.
11454 runpath_var=$runpath_var
11455
11456 # This is the shared library path variable.
11457 shlibpath_var=$shlibpath_var
11458
11459 # Is shlibpath searched before the hard-coded library search path?
11460 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11461
11462 # How to hardcode a shared library path into an executable.
11463 hardcode_action=$hardcode_action
11464
11465 # Whether we should hardcode library paths into libraries.
11466 hardcode_into_libs=$hardcode_into_libs
11467
11468 # Flag to hardcode \$libdir into a binary during linking.
11469 # This must work even if \$libdir does not exist.
11470 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
11471
11472 # If ld is used when linking, flag to hardcode \$libdir into
11473 # a binary during linking. This must work even if \$libdir does
11474 # not exist.
11475 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
11476
11477 # Whether we need a single -rpath flag with a separated argument.
11478 hardcode_libdir_separator=$lt_hardcode_libdir_separator
11479
11480 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11481 # resulting binary.
11482 hardcode_direct=$hardcode_direct
11483
11484 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11485 # resulting binary.
11486 hardcode_minus_L=$hardcode_minus_L
11487
11488 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11489 # the resulting binary.
11490 hardcode_shlibpath_var=$hardcode_shlibpath_var
11491
11492 # Set to yes if building a shared library automatically hardcodes DIR into the library
11493 # and all subsequent libraries and executables linked against it.
11494 hardcode_automatic=$hardcode_automatic
11495
11496 # Variables whose values should be saved in libtool wrapper scripts and
11497 # restored at relink time.
11498 variables_saved_for_relink="$variables_saved_for_relink"
11499
11500 # Whether libtool must link a program against all its dependency libraries.
11501 link_all_deplibs=$link_all_deplibs
11502
11503 # Compile-time system search path for libraries
11504 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11505
11506 # Run-time system search path for libraries
11507 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11508
11509 # Fix the shell variable \$srcfile for the compiler.
11510 fix_srcfile_path="$fix_srcfile_path"
11511
11512 # Set to yes if exported symbols are required.
11513 always_export_symbols=$always_export_symbols
11514
11515 # The commands to list exported symbols.
11516 export_symbols_cmds=$lt_export_symbols_cmds
11517
11518 # The commands to extract the exported symbol list from a shared archive.
11519 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11520
11521 # Symbols that should not be listed in the preloaded symbols.
11522 exclude_expsyms=$lt_exclude_expsyms
11523
11524 # Symbols that must always be exported.
11525 include_expsyms=$lt_include_expsyms
11526
11527 # ### END LIBTOOL CONFIG
11528
11529 __EOF__
11530
11531
11532   case $host_os in
11533   aix3*)
11534     cat <<\EOF >> "$cfgfile"
11535
11536 # AIX sometimes has problems with the GCC collect2 program.  For some
11537 # reason, if we set the COLLECT_NAMES environment variable, the problems
11538 # vanish in a puff of smoke.
11539 if test "X${COLLECT_NAMES+set}" != Xset; then
11540   COLLECT_NAMES=
11541   export COLLECT_NAMES
11542 fi
11543 EOF
11544     ;;
11545   esac
11546
11547   # We use sed instead of cat because bash on DJGPP gets confused if
11548   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
11549   # text mode, it properly converts lines to CR/LF.  This bash problem
11550   # is reportedly fixed, but why not run on old versions too?
11551   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
11552
11553   mv -f "$cfgfile" "$ofile" || \
11554     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
11555   chmod +x "$ofile"
11556
11557 else
11558   # If there is no Makefile yet, we rely on a make rule to execute
11559   # `config.status --recheck' to rerun these tests and create the
11560   # libtool script then.
11561   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11562   if test -f "$ltmain_in"; then
11563     test -f Makefile && make "$ltmain"
11564   fi
11565 fi
11566
11567
11568 ac_ext=c
11569 ac_cpp='$CPP $CPPFLAGS'
11570 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11571 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11572 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11573
11574 CC="$lt_save_CC"
11575
11576
11577 # Check whether --with-tags was given.
11578 if test "${with_tags+set}" = set; then :
11579   withval=$with_tags; tagnames="$withval"
11580 fi
11581
11582
11583 if test -f "$ltmain" && test -n "$tagnames"; then
11584   if test ! -f "${ofile}"; then
11585     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist" >&5
11586 $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11587   fi
11588
11589   if test -z "$LTCC"; then
11590     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11591     if test -z "$LTCC"; then
11592       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11593 $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11594     else
11595       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11596 $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11597     fi
11598   fi
11599
11600   # Extract list of available tagged configurations in $ofile.
11601   # Note that this assumes the entire list is on one line.
11602   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11603
11604   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11605   for tagname in $tagnames; do
11606     IFS="$lt_save_ifs"
11607     # Check whether tagname contains only valid characters
11608     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11609     "") ;;
11610     *)  as_fn_error "invalid tag name: $tagname" "$LINENO" 5
11611         ;;
11612     esac
11613
11614     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11615     then
11616       as_fn_error "tag name \"$tagname\" already exists" "$LINENO" 5
11617     fi
11618
11619     # Update the list of available tags.
11620     if test -n "$tagname"; then
11621       echo appending configuration tag \"$tagname\" to $ofile
11622
11623       case $tagname in
11624       CXX)
11625         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11626             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11627             (test "X$CXX" != "Xg++"))) ; then
11628           :
11629         else
11630           tagname=""
11631         fi
11632         ;;
11633
11634       F77)
11635         if test -n "$F77" && test "X$F77" != "Xno"; then
11636           :
11637         else
11638           tagname=""
11639         fi
11640         ;;
11641
11642       GCJ)
11643         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11644           :
11645         else
11646           tagname=""
11647         fi
11648         ;;
11649
11650       RC)
11651
11652
11653 # Source file extension for RC test sources.
11654 ac_ext=rc
11655
11656 # Object file extension for compiled RC test sources.
11657 objext=o
11658 objext_RC=$objext
11659
11660 # Code to be used in simple compile tests
11661 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11662
11663 # Code to be used in simple link tests
11664 lt_simple_link_test_code="$lt_simple_compile_test_code"
11665
11666 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11667
11668 # If no C compiler was specified, use CC.
11669 LTCC=${LTCC-"$CC"}
11670
11671 # Allow CC to be a program name with arguments.
11672 compiler=$CC
11673
11674
11675 # save warnings/boilerplate of simple test code
11676 ac_outfile=conftest.$ac_objext
11677 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11678 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11679 _lt_compiler_boilerplate=`cat conftest.err`
11680 $rm conftest*
11681
11682 ac_outfile=conftest.$ac_objext
11683 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11684 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11685 _lt_linker_boilerplate=`cat conftest.err`
11686 $rm conftest*
11687
11688
11689 # Allow CC to be a program name with arguments.
11690 lt_save_CC="$CC"
11691 CC=${RC-"windres"}
11692 compiler=$CC
11693 compiler_RC=$CC
11694 for cc_temp in $compiler""; do
11695   case $cc_temp in
11696     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11697     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11698     \-*) ;;
11699     *) break;;
11700   esac
11701 done
11702 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11703
11704 lt_cv_prog_compiler_c_o_RC=yes
11705
11706 # The else clause should only fire when bootstrapping the
11707 # libtool distribution, otherwise you forgot to ship ltmain.sh
11708 # with your package, and you will get complaints that there are
11709 # no rules to generate ltmain.sh.
11710 if test -f "$ltmain"; then
11711   # See if we are running on zsh, and set the options which allow our commands through
11712   # without removal of \ escapes.
11713   if test -n "${ZSH_VERSION+set}" ; then
11714     setopt NO_GLOB_SUBST
11715   fi
11716   # Now quote all the things that may contain metacharacters while being
11717   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11718   # variables and quote the copies for generation of the libtool script.
11719   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11720     SED SHELL STRIP \
11721     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11722     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11723     deplibs_check_method reload_flag reload_cmds need_locks \
11724     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11725     lt_cv_sys_global_symbol_to_c_name_address \
11726     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11727     old_postinstall_cmds old_postuninstall_cmds \
11728     compiler_RC \
11729     CC_RC \
11730     LD_RC \
11731     lt_prog_compiler_wl_RC \
11732     lt_prog_compiler_pic_RC \
11733     lt_prog_compiler_static_RC \
11734     lt_prog_compiler_no_builtin_flag_RC \
11735     export_dynamic_flag_spec_RC \
11736     thread_safe_flag_spec_RC \
11737     whole_archive_flag_spec_RC \
11738     enable_shared_with_static_runtimes_RC \
11739     old_archive_cmds_RC \
11740     old_archive_from_new_cmds_RC \
11741     predep_objects_RC \
11742     postdep_objects_RC \
11743     predeps_RC \
11744     postdeps_RC \
11745     compiler_lib_search_path_RC \
11746     archive_cmds_RC \
11747     archive_expsym_cmds_RC \
11748     postinstall_cmds_RC \
11749     postuninstall_cmds_RC \
11750     old_archive_from_expsyms_cmds_RC \
11751     allow_undefined_flag_RC \
11752     no_undefined_flag_RC \
11753     export_symbols_cmds_RC \
11754     hardcode_libdir_flag_spec_RC \
11755     hardcode_libdir_flag_spec_ld_RC \
11756     hardcode_libdir_separator_RC \
11757     hardcode_automatic_RC \
11758     module_cmds_RC \
11759     module_expsym_cmds_RC \
11760     lt_cv_prog_compiler_c_o_RC \
11761     exclude_expsyms_RC \
11762     include_expsyms_RC; do
11763
11764     case $var in
11765     old_archive_cmds_RC | \
11766     old_archive_from_new_cmds_RC | \
11767     archive_cmds_RC | \
11768     archive_expsym_cmds_RC | \
11769     module_cmds_RC | \
11770     module_expsym_cmds_RC | \
11771     old_archive_from_expsyms_cmds_RC | \
11772     export_symbols_cmds_RC | \
11773     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11774     postinstall_cmds | postuninstall_cmds | \
11775     old_postinstall_cmds | old_postuninstall_cmds | \
11776     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11777       # Double-quote double-evaled strings.
11778       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11779       ;;
11780     *)
11781       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11782       ;;
11783     esac
11784   done
11785
11786   case $lt_echo in
11787   *'\$0 --fallback-echo"')
11788     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11789     ;;
11790   esac
11791
11792 cfgfile="$ofile"
11793
11794   cat <<__EOF__ >> "$cfgfile"
11795 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11796
11797 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11798
11799 # Shell to use when invoking shell scripts.
11800 SHELL=$lt_SHELL
11801
11802 # Whether or not to build shared libraries.
11803 build_libtool_libs=$enable_shared
11804
11805 # Whether or not to build static libraries.
11806 build_old_libs=$enable_static
11807
11808 # Whether or not to add -lc for building shared libraries.
11809 build_libtool_need_lc=$archive_cmds_need_lc_RC
11810
11811 # Whether or not to disallow shared libs when runtime libs are static
11812 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11813
11814 # Whether or not to optimize for fast installation.
11815 fast_install=$enable_fast_install
11816
11817 # The host system.
11818 host_alias=$host_alias
11819 host=$host
11820 host_os=$host_os
11821
11822 # The build system.
11823 build_alias=$build_alias
11824 build=$build
11825 build_os=$build_os
11826
11827 # An echo program that does not interpret backslashes.
11828 echo=$lt_echo
11829
11830 # The archiver.
11831 AR=$lt_AR
11832 AR_FLAGS=$lt_AR_FLAGS
11833
11834 # A C compiler.
11835 LTCC=$lt_LTCC
11836
11837 # A language-specific compiler.
11838 CC=$lt_compiler_RC
11839
11840 # Is the compiler the GNU C compiler?
11841 with_gcc=$GCC_RC
11842
11843 # An ERE matcher.
11844 EGREP=$lt_EGREP
11845
11846 # The linker used to build libraries.
11847 LD=$lt_LD_RC
11848
11849 # Whether we need hard or soft links.
11850 LN_S=$lt_LN_S
11851
11852 # A BSD-compatible nm program.
11853 NM=$lt_NM
11854
11855 # A symbol stripping program
11856 STRIP=$lt_STRIP
11857
11858 # Used to examine libraries when file_magic_cmd begins "file"
11859 MAGIC_CMD=$MAGIC_CMD
11860
11861 # Used on cygwin: DLL creation program.
11862 DLLTOOL="$DLLTOOL"
11863
11864 # Used on cygwin: object dumper.
11865 OBJDUMP="$OBJDUMP"
11866
11867 # Used on cygwin: assembler.
11868 AS="$AS"
11869
11870 # The name of the directory that contains temporary libtool files.
11871 objdir=$objdir
11872
11873 # How to create reloadable object files.
11874 reload_flag=$lt_reload_flag
11875 reload_cmds=$lt_reload_cmds
11876
11877 # How to pass a linker flag through the compiler.
11878 wl=$lt_lt_prog_compiler_wl_RC
11879
11880 # Object file suffix (normally "o").
11881 objext="$ac_objext"
11882
11883 # Old archive suffix (normally "a").
11884 libext="$libext"
11885
11886 # Shared library suffix (normally ".so").
11887 shrext_cmds='$shrext_cmds'
11888
11889 # Executable file suffix (normally "").
11890 exeext="$exeext"
11891
11892 # Additional compiler flags for building library objects.
11893 pic_flag=$lt_lt_prog_compiler_pic_RC
11894 pic_mode=$pic_mode
11895
11896 # What is the maximum length of a command?
11897 max_cmd_len=$lt_cv_sys_max_cmd_len
11898
11899 # Does compiler simultaneously support -c and -o options?
11900 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11901
11902 # Must we lock files when doing compilation?
11903 need_locks=$lt_need_locks
11904
11905 # Do we need the lib prefix for modules?
11906 need_lib_prefix=$need_lib_prefix
11907
11908 # Do we need a version for libraries?
11909 need_version=$need_version
11910
11911 # Whether dlopen is supported.
11912 dlopen_support=$enable_dlopen
11913
11914 # Whether dlopen of programs is supported.
11915 dlopen_self=$enable_dlopen_self
11916
11917 # Whether dlopen of statically linked programs is supported.
11918 dlopen_self_static=$enable_dlopen_self_static
11919
11920 # Compiler flag to prevent dynamic linking.
11921 link_static_flag=$lt_lt_prog_compiler_static_RC
11922
11923 # Compiler flag to turn off builtin functions.
11924 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11925
11926 # Compiler flag to allow reflexive dlopens.
11927 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11928
11929 # Compiler flag to generate shared objects directly from archives.
11930 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11931
11932 # Compiler flag to generate thread-safe objects.
11933 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11934
11935 # Library versioning type.
11936 version_type=$version_type
11937
11938 # Format of library name prefix.
11939 libname_spec=$lt_libname_spec
11940
11941 # List of archive names.  First name is the real one, the rest are links.
11942 # The last name is the one that the linker finds with -lNAME.
11943 library_names_spec=$lt_library_names_spec
11944
11945 # The coded name of the library, if different from the real name.
11946 soname_spec=$lt_soname_spec
11947
11948 # Commands used to build and install an old-style archive.
11949 RANLIB=$lt_RANLIB
11950 old_archive_cmds=$lt_old_archive_cmds_RC
11951 old_postinstall_cmds=$lt_old_postinstall_cmds
11952 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11953
11954 # Create an old-style archive from a shared archive.
11955 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11956
11957 # Create a temporary old-style archive to link instead of a shared archive.
11958 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11959
11960 # Commands used to build and install a shared archive.
11961 archive_cmds=$lt_archive_cmds_RC
11962 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11963 postinstall_cmds=$lt_postinstall_cmds
11964 postuninstall_cmds=$lt_postuninstall_cmds
11965
11966 # Commands used to build a loadable module (assumed same as above if empty)
11967 module_cmds=$lt_module_cmds_RC
11968 module_expsym_cmds=$lt_module_expsym_cmds_RC
11969
11970 # Commands to strip libraries.
11971 old_striplib=$lt_old_striplib
11972 striplib=$lt_striplib
11973
11974 # Dependencies to place before the objects being linked to create a
11975 # shared library.
11976 predep_objects=$lt_predep_objects_RC
11977
11978 # Dependencies to place after the objects being linked to create a
11979 # shared library.
11980 postdep_objects=$lt_postdep_objects_RC
11981
11982 # Dependencies to place before the objects being linked to create a
11983 # shared library.
11984 predeps=$lt_predeps_RC
11985
11986 # Dependencies to place after the objects being linked to create a
11987 # shared library.
11988 postdeps=$lt_postdeps_RC
11989
11990 # The library search path used internally by the compiler when linking
11991 # a shared library.
11992 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
11993
11994 # Method to check whether dependent libraries are shared objects.
11995 deplibs_check_method=$lt_deplibs_check_method
11996
11997 # Command to use when deplibs_check_method == file_magic.
11998 file_magic_cmd=$lt_file_magic_cmd
11999
12000 # Flag that allows shared libraries with undefined symbols to be built.
12001 allow_undefined_flag=$lt_allow_undefined_flag_RC
12002
12003 # Flag that forces no undefined symbols.
12004 no_undefined_flag=$lt_no_undefined_flag_RC
12005
12006 # Commands used to finish a libtool library installation in a directory.
12007 finish_cmds=$lt_finish_cmds
12008
12009 # Same as above, but a single script fragment to be evaled but not shown.
12010 finish_eval=$lt_finish_eval
12011
12012 # Take the output of nm and produce a listing of raw symbols and C names.
12013 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
12014
12015 # Transform the output of nm in a proper C declaration
12016 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
12017
12018 # Transform the output of nm in a C name address pair
12019 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
12020
12021 # This is the shared library runtime path variable.
12022 runpath_var=$runpath_var
12023
12024 # This is the shared library path variable.
12025 shlibpath_var=$shlibpath_var
12026
12027 # Is shlibpath searched before the hard-coded library search path?
12028 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
12029
12030 # How to hardcode a shared library path into an executable.
12031 hardcode_action=$hardcode_action_RC
12032
12033 # Whether we should hardcode library paths into libraries.
12034 hardcode_into_libs=$hardcode_into_libs
12035
12036 # Flag to hardcode \$libdir into a binary during linking.
12037 # This must work even if \$libdir does not exist.
12038 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
12039
12040 # If ld is used when linking, flag to hardcode \$libdir into
12041 # a binary during linking. This must work even if \$libdir does
12042 # not exist.
12043 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
12044
12045 # Whether we need a single -rpath flag with a separated argument.
12046 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
12047
12048 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
12049 # resulting binary.
12050 hardcode_direct=$hardcode_direct_RC
12051
12052 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
12053 # resulting binary.
12054 hardcode_minus_L=$hardcode_minus_L_RC
12055
12056 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
12057 # the resulting binary.
12058 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
12059
12060 # Set to yes if building a shared library automatically hardcodes DIR into the library
12061 # and all subsequent libraries and executables linked against it.
12062 hardcode_automatic=$hardcode_automatic_RC
12063
12064 # Variables whose values should be saved in libtool wrapper scripts and
12065 # restored at relink time.
12066 variables_saved_for_relink="$variables_saved_for_relink"
12067
12068 # Whether libtool must link a program against all its dependency libraries.
12069 link_all_deplibs=$link_all_deplibs_RC
12070
12071 # Compile-time system search path for libraries
12072 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
12073
12074 # Run-time system search path for libraries
12075 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
12076
12077 # Fix the shell variable \$srcfile for the compiler.
12078 fix_srcfile_path="$fix_srcfile_path_RC"
12079
12080 # Set to yes if exported symbols are required.
12081 always_export_symbols=$always_export_symbols_RC
12082
12083 # The commands to list exported symbols.
12084 export_symbols_cmds=$lt_export_symbols_cmds_RC
12085
12086 # The commands to extract the exported symbol list from a shared archive.
12087 extract_expsyms_cmds=$lt_extract_expsyms_cmds
12088
12089 # Symbols that should not be listed in the preloaded symbols.
12090 exclude_expsyms=$lt_exclude_expsyms_RC
12091
12092 # Symbols that must always be exported.
12093 include_expsyms=$lt_include_expsyms_RC
12094
12095 # ### END LIBTOOL TAG CONFIG: $tagname
12096
12097 __EOF__
12098
12099
12100 else
12101   # If there is no Makefile yet, we rely on a make rule to execute
12102   # `config.status --recheck' to rerun these tests and create the
12103   # libtool script then.
12104   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
12105   if test -f "$ltmain_in"; then
12106     test -f Makefile && make "$ltmain"
12107   fi
12108 fi
12109
12110
12111 ac_ext=c
12112 ac_cpp='$CPP $CPPFLAGS'
12113 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12114 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12115 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12116
12117 CC="$lt_save_CC"
12118
12119         ;;
12120
12121       *)
12122         as_fn_error "Unsupported tag name: $tagname" "$LINENO" 5
12123         ;;
12124       esac
12125
12126       # Append the new tag name to the list of available tags.
12127       if test -n "$tagname" ; then
12128       available_tags="$available_tags $tagname"
12129     fi
12130     fi
12131   done
12132   IFS="$lt_save_ifs"
12133
12134   # Now substitute the updated list of available tags.
12135   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
12136     mv "${ofile}T" "$ofile"
12137     chmod +x "$ofile"
12138   else
12139     rm -f "${ofile}T"
12140     as_fn_error "unable to update list of available tagged configurations." "$LINENO" 5
12141   fi
12142 fi
12143
12144
12145
12146 # This can be used to rebuild libtool when needed
12147 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
12148
12149 # Always use our own libtool.
12150 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
12151
12152 # Prevent multiple expansion
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163 ol_link_perl=no
12164 if test $ol_enable_perl != no ; then
12165         # Extract the first word of "perl", so it can be a program name with args.
12166 set dummy perl; ac_word=$2
12167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12168 $as_echo_n "checking for $ac_word... " >&6; }
12169 if test "${ac_cv_path_PERLBIN+set}" = set; then :
12170   $as_echo_n "(cached) " >&6
12171 else
12172   case $PERLBIN in
12173   [\\/]* | ?:[\\/]*)
12174   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
12175   ;;
12176   *)
12177   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12178 for as_dir in $PATH
12179 do
12180   IFS=$as_save_IFS
12181   test -z "$as_dir" && as_dir=.
12182     for ac_exec_ext in '' $ac_executable_extensions; do
12183   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12184     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
12185     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12186     break 2
12187   fi
12188 done
12189   done
12190 IFS=$as_save_IFS
12191
12192   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
12193   ;;
12194 esac
12195 fi
12196 PERLBIN=$ac_cv_path_PERLBIN
12197 if test -n "$PERLBIN"; then
12198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLBIN" >&5
12199 $as_echo "$PERLBIN" >&6; }
12200 else
12201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12202 $as_echo "no" >&6; }
12203 fi
12204
12205
12206
12207         if test "no$PERLBIN" = "no" ; then
12208                 if test $ol_enable_perl = yes ; then
12209                         as_fn_error "could not locate perl" "$LINENO" 5
12210                 fi
12211
12212         else
12213                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
12214                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
12215
12216                 if test x"$ol_enable_perl" = "xyes" ; then
12217                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
12218                 else
12219                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
12220                 fi
12221                                 ol_link_perl=yes
12222         fi
12223 fi
12224
12225 ac_ext=c
12226 ac_cpp='$CPP $CPPFLAGS'
12227 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12228 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12229 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
12231 $as_echo_n "checking how to run the C preprocessor... " >&6; }
12232 # On Suns, sometimes $CPP names a directory.
12233 if test -n "$CPP" && test -d "$CPP"; then
12234   CPP=
12235 fi
12236 if test -z "$CPP"; then
12237   if test "${ac_cv_prog_CPP+set}" = set; then :
12238   $as_echo_n "(cached) " >&6
12239 else
12240       # Double quotes because CPP needs to be expanded
12241     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
12242     do
12243       ac_preproc_ok=false
12244 for ac_c_preproc_warn_flag in '' yes
12245 do
12246   # Use a header file that comes with gcc, so configuring glibc
12247   # with a fresh cross-compiler works.
12248   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12249   # <limits.h> exists even on freestanding compilers.
12250   # On the NeXT, cc -E runs the code through the compiler's parser,
12251   # not just through cpp. "Syntax error" is here to catch this case.
12252   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12253 /* end confdefs.h.  */
12254 #ifdef __STDC__
12255 # include <limits.h>
12256 #else
12257 # include <assert.h>
12258 #endif
12259                      Syntax error
12260 _ACEOF
12261 if ac_fn_c_try_cpp "$LINENO"; then :
12262
12263 else
12264   # Broken: fails on valid input.
12265 continue
12266 fi
12267 rm -f conftest.err conftest.$ac_ext
12268
12269   # OK, works on sane cases.  Now check whether nonexistent headers
12270   # can be detected and how.
12271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12272 /* end confdefs.h.  */
12273 #include <ac_nonexistent.h>
12274 _ACEOF
12275 if ac_fn_c_try_cpp "$LINENO"; then :
12276   # Broken: success on invalid input.
12277 continue
12278 else
12279   # Passes both tests.
12280 ac_preproc_ok=:
12281 break
12282 fi
12283 rm -f conftest.err conftest.$ac_ext
12284
12285 done
12286 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12287 rm -f conftest.err conftest.$ac_ext
12288 if $ac_preproc_ok; then :
12289   break
12290 fi
12291
12292     done
12293     ac_cv_prog_CPP=$CPP
12294
12295 fi
12296   CPP=$ac_cv_prog_CPP
12297 else
12298   ac_cv_prog_CPP=$CPP
12299 fi
12300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
12301 $as_echo "$CPP" >&6; }
12302 ac_preproc_ok=false
12303 for ac_c_preproc_warn_flag in '' yes
12304 do
12305   # Use a header file that comes with gcc, so configuring glibc
12306   # with a fresh cross-compiler works.
12307   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12308   # <limits.h> exists even on freestanding compilers.
12309   # On the NeXT, cc -E runs the code through the compiler's parser,
12310   # not just through cpp. "Syntax error" is here to catch this case.
12311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12312 /* end confdefs.h.  */
12313 #ifdef __STDC__
12314 # include <limits.h>
12315 #else
12316 # include <assert.h>
12317 #endif
12318                      Syntax error
12319 _ACEOF
12320 if ac_fn_c_try_cpp "$LINENO"; then :
12321
12322 else
12323   # Broken: fails on valid input.
12324 continue
12325 fi
12326 rm -f conftest.err conftest.$ac_ext
12327
12328   # OK, works on sane cases.  Now check whether nonexistent headers
12329   # can be detected and how.
12330   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12331 /* end confdefs.h.  */
12332 #include <ac_nonexistent.h>
12333 _ACEOF
12334 if ac_fn_c_try_cpp "$LINENO"; then :
12335   # Broken: success on invalid input.
12336 continue
12337 else
12338   # Passes both tests.
12339 ac_preproc_ok=:
12340 break
12341 fi
12342 rm -f conftest.err conftest.$ac_ext
12343
12344 done
12345 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12346 rm -f conftest.err conftest.$ac_ext
12347 if $ac_preproc_ok; then :
12348
12349 else
12350   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12351 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12352 as_fn_error "C preprocessor \"$CPP\" fails sanity check
12353 See \`config.log' for more details." "$LINENO" 5; }
12354 fi
12355
12356 ac_ext=c
12357 ac_cpp='$CPP $CPPFLAGS'
12358 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12359 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12361
12362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using MS Visual C++" >&5
12363 $as_echo_n "checking whether we are using MS Visual C++... " >&6; }
12364 if test "${ol_cv_msvc+set}" = set; then :
12365   $as_echo_n "(cached) " >&6
12366 else
12367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12368 /* end confdefs.h.  */
12369
12370 #ifndef _MSC_VER
12371 #include <__FOO__/generate_error.h>
12372 #endif
12373
12374 _ACEOF
12375 if ac_fn_c_try_cpp "$LINENO"; then :
12376   ol_cv_msvc=yes
12377 else
12378   ol_cv_msvc=no
12379 fi
12380 rm -f conftest.err conftest.$ac_ext
12381 fi
12382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_msvc" >&5
12383 $as_echo "$ol_cv_msvc" >&6; }
12384
12385 case $host_os in
12386   *mingw32* ) ac_cv_mingw32=yes ;;
12387   *cygwin* ) ac_cv_cygwin=yes ;;
12388   *interix* ) ac_cv_interix=yes ;;
12389 esac
12390
12391
12392
12393
12394 cat >>confdefs.h <<_ACEOF
12395 #define EXEEXT "${EXEEXT}"
12396 _ACEOF
12397
12398
12399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for be_app in -lbe" >&5
12400 $as_echo_n "checking for be_app in -lbe... " >&6; }
12401 if test "${ac_cv_lib_be_be_app+set}" = set; then :
12402   $as_echo_n "(cached) " >&6
12403 else
12404   ac_check_lib_save_LIBS=$LIBS
12405 LIBS="-lbe -lroot -lnet $LIBS"
12406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12407 /* end confdefs.h.  */
12408
12409 /* Override any GCC internal prototype to avoid an error.
12410    Use char because int might match the return type of a GCC
12411    builtin and then its argument prototype would still apply.  */
12412 #ifdef __cplusplus
12413 extern "C"
12414 #endif
12415 char be_app ();
12416 int
12417 main ()
12418 {
12419 return be_app ();
12420   ;
12421   return 0;
12422 }
12423 _ACEOF
12424 if ac_fn_c_try_link "$LINENO"; then :
12425   ac_cv_lib_be_be_app=yes
12426 else
12427   ac_cv_lib_be_be_app=no
12428 fi
12429 rm -f core conftest.err conftest.$ac_objext \
12430     conftest$ac_exeext conftest.$ac_ext
12431 LIBS=$ac_check_lib_save_LIBS
12432 fi
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_be_be_app" >&5
12434 $as_echo "$ac_cv_lib_be_be_app" >&6; }
12435 if test "x$ac_cv_lib_be_be_app" = x""yes; then :
12436   LIBS="$LIBS -lbe -lroot -lnet"
12437 else
12438   :
12439 fi
12440
12441
12442 ac_ext=c
12443 ac_cpp='$CPP $CPPFLAGS'
12444 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12445 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12446 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12447 if test -n "$ac_tool_prefix"; then
12448   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
12449 set dummy ${ac_tool_prefix}gcc; ac_word=$2
12450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12451 $as_echo_n "checking for $ac_word... " >&6; }
12452 if test "${ac_cv_prog_CC+set}" = set; then :
12453   $as_echo_n "(cached) " >&6
12454 else
12455   if test -n "$CC"; then
12456   ac_cv_prog_CC="$CC" # Let the user override the test.
12457 else
12458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12459 for as_dir in $PATH
12460 do
12461   IFS=$as_save_IFS
12462   test -z "$as_dir" && as_dir=.
12463     for ac_exec_ext in '' $ac_executable_extensions; do
12464   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12465     ac_cv_prog_CC="${ac_tool_prefix}gcc"
12466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12467     break 2
12468   fi
12469 done
12470   done
12471 IFS=$as_save_IFS
12472
12473 fi
12474 fi
12475 CC=$ac_cv_prog_CC
12476 if test -n "$CC"; then
12477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12478 $as_echo "$CC" >&6; }
12479 else
12480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12481 $as_echo "no" >&6; }
12482 fi
12483
12484
12485 fi
12486 if test -z "$ac_cv_prog_CC"; then
12487   ac_ct_CC=$CC
12488   # Extract the first word of "gcc", so it can be a program name with args.
12489 set dummy gcc; ac_word=$2
12490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12491 $as_echo_n "checking for $ac_word... " >&6; }
12492 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
12493   $as_echo_n "(cached) " >&6
12494 else
12495   if test -n "$ac_ct_CC"; then
12496   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12497 else
12498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12499 for as_dir in $PATH
12500 do
12501   IFS=$as_save_IFS
12502   test -z "$as_dir" && as_dir=.
12503     for ac_exec_ext in '' $ac_executable_extensions; do
12504   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12505     ac_cv_prog_ac_ct_CC="gcc"
12506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12507     break 2
12508   fi
12509 done
12510   done
12511 IFS=$as_save_IFS
12512
12513 fi
12514 fi
12515 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12516 if test -n "$ac_ct_CC"; then
12517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12518 $as_echo "$ac_ct_CC" >&6; }
12519 else
12520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12521 $as_echo "no" >&6; }
12522 fi
12523
12524   if test "x$ac_ct_CC" = x; then
12525     CC=""
12526   else
12527     case $cross_compiling:$ac_tool_warned in
12528 yes:)
12529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12530 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12531 ac_tool_warned=yes ;;
12532 esac
12533     CC=$ac_ct_CC
12534   fi
12535 else
12536   CC="$ac_cv_prog_CC"
12537 fi
12538
12539 if test -z "$CC"; then
12540           if test -n "$ac_tool_prefix"; then
12541     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12542 set dummy ${ac_tool_prefix}cc; ac_word=$2
12543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12544 $as_echo_n "checking for $ac_word... " >&6; }
12545 if test "${ac_cv_prog_CC+set}" = set; then :
12546   $as_echo_n "(cached) " >&6
12547 else
12548   if test -n "$CC"; then
12549   ac_cv_prog_CC="$CC" # Let the user override the test.
12550 else
12551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12552 for as_dir in $PATH
12553 do
12554   IFS=$as_save_IFS
12555   test -z "$as_dir" && as_dir=.
12556     for ac_exec_ext in '' $ac_executable_extensions; do
12557   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12558     ac_cv_prog_CC="${ac_tool_prefix}cc"
12559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12560     break 2
12561   fi
12562 done
12563   done
12564 IFS=$as_save_IFS
12565
12566 fi
12567 fi
12568 CC=$ac_cv_prog_CC
12569 if test -n "$CC"; then
12570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12571 $as_echo "$CC" >&6; }
12572 else
12573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12574 $as_echo "no" >&6; }
12575 fi
12576
12577
12578   fi
12579 fi
12580 if test -z "$CC"; then
12581   # Extract the first word of "cc", so it can be a program name with args.
12582 set dummy cc; ac_word=$2
12583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12584 $as_echo_n "checking for $ac_word... " >&6; }
12585 if test "${ac_cv_prog_CC+set}" = set; then :
12586   $as_echo_n "(cached) " >&6
12587 else
12588   if test -n "$CC"; then
12589   ac_cv_prog_CC="$CC" # Let the user override the test.
12590 else
12591   ac_prog_rejected=no
12592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12593 for as_dir in $PATH
12594 do
12595   IFS=$as_save_IFS
12596   test -z "$as_dir" && as_dir=.
12597     for ac_exec_ext in '' $ac_executable_extensions; do
12598   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12599     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12600        ac_prog_rejected=yes
12601        continue
12602      fi
12603     ac_cv_prog_CC="cc"
12604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12605     break 2
12606   fi
12607 done
12608   done
12609 IFS=$as_save_IFS
12610
12611 if test $ac_prog_rejected = yes; then
12612   # We found a bogon in the path, so make sure we never use it.
12613   set dummy $ac_cv_prog_CC
12614   shift
12615   if test $# != 0; then
12616     # We chose a different compiler from the bogus one.
12617     # However, it has the same basename, so the bogon will be chosen
12618     # first if we set CC to just the basename; use the full file name.
12619     shift
12620     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12621   fi
12622 fi
12623 fi
12624 fi
12625 CC=$ac_cv_prog_CC
12626 if test -n "$CC"; then
12627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12628 $as_echo "$CC" >&6; }
12629 else
12630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12631 $as_echo "no" >&6; }
12632 fi
12633
12634
12635 fi
12636 if test -z "$CC"; then
12637   if test -n "$ac_tool_prefix"; then
12638   for ac_prog in cl.exe
12639   do
12640     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12641 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12643 $as_echo_n "checking for $ac_word... " >&6; }
12644 if test "${ac_cv_prog_CC+set}" = set; then :
12645   $as_echo_n "(cached) " >&6
12646 else
12647   if test -n "$CC"; then
12648   ac_cv_prog_CC="$CC" # Let the user override the test.
12649 else
12650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12651 for as_dir in $PATH
12652 do
12653   IFS=$as_save_IFS
12654   test -z "$as_dir" && as_dir=.
12655     for ac_exec_ext in '' $ac_executable_extensions; do
12656   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12657     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12658     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12659     break 2
12660   fi
12661 done
12662   done
12663 IFS=$as_save_IFS
12664
12665 fi
12666 fi
12667 CC=$ac_cv_prog_CC
12668 if test -n "$CC"; then
12669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12670 $as_echo "$CC" >&6; }
12671 else
12672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12673 $as_echo "no" >&6; }
12674 fi
12675
12676
12677     test -n "$CC" && break
12678   done
12679 fi
12680 if test -z "$CC"; then
12681   ac_ct_CC=$CC
12682   for ac_prog in cl.exe
12683 do
12684   # Extract the first word of "$ac_prog", so it can be a program name with args.
12685 set dummy $ac_prog; ac_word=$2
12686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12687 $as_echo_n "checking for $ac_word... " >&6; }
12688 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
12689   $as_echo_n "(cached) " >&6
12690 else
12691   if test -n "$ac_ct_CC"; then
12692   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12693 else
12694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12695 for as_dir in $PATH
12696 do
12697   IFS=$as_save_IFS
12698   test -z "$as_dir" && as_dir=.
12699     for ac_exec_ext in '' $ac_executable_extensions; do
12700   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12701     ac_cv_prog_ac_ct_CC="$ac_prog"
12702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12703     break 2
12704   fi
12705 done
12706   done
12707 IFS=$as_save_IFS
12708
12709 fi
12710 fi
12711 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12712 if test -n "$ac_ct_CC"; then
12713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12714 $as_echo "$ac_ct_CC" >&6; }
12715 else
12716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12717 $as_echo "no" >&6; }
12718 fi
12719
12720
12721   test -n "$ac_ct_CC" && break
12722 done
12723
12724   if test "x$ac_ct_CC" = x; then
12725     CC=""
12726   else
12727     case $cross_compiling:$ac_tool_warned in
12728 yes:)
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12730 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12731 ac_tool_warned=yes ;;
12732 esac
12733     CC=$ac_ct_CC
12734   fi
12735 fi
12736
12737 fi
12738
12739
12740 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12741 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12742 as_fn_error "no acceptable C compiler found in \$PATH
12743 See \`config.log' for more details." "$LINENO" 5; }
12744
12745 # Provide some information about the compiler.
12746 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
12747 set X $ac_compile
12748 ac_compiler=$2
12749 for ac_option in --version -v -V -qversion; do
12750   { { ac_try="$ac_compiler $ac_option >&5"
12751 case "(($ac_try" in
12752   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12753   *) ac_try_echo=$ac_try;;
12754 esac
12755 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12756 $as_echo "$ac_try_echo"; } >&5
12757   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
12758   ac_status=$?
12759   if test -s conftest.err; then
12760     sed '10a\
12761 ... rest of stderr output deleted ...
12762          10q' conftest.err >conftest.er1
12763     cat conftest.er1 >&5
12764   fi
12765   rm -f conftest.er1 conftest.err
12766   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12767   test $ac_status = 0; }
12768 done
12769
12770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
12771 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
12772 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
12773   $as_echo_n "(cached) " >&6
12774 else
12775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12776 /* end confdefs.h.  */
12777
12778 int
12779 main ()
12780 {
12781 #ifndef __GNUC__
12782        choke me
12783 #endif
12784
12785   ;
12786   return 0;
12787 }
12788 _ACEOF
12789 if ac_fn_c_try_compile "$LINENO"; then :
12790   ac_compiler_gnu=yes
12791 else
12792   ac_compiler_gnu=no
12793 fi
12794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12795 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12796
12797 fi
12798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
12799 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
12800 if test $ac_compiler_gnu = yes; then
12801   GCC=yes
12802 else
12803   GCC=
12804 fi
12805 ac_test_CFLAGS=${CFLAGS+set}
12806 ac_save_CFLAGS=$CFLAGS
12807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
12808 $as_echo_n "checking whether $CC accepts -g... " >&6; }
12809 if test "${ac_cv_prog_cc_g+set}" = set; then :
12810   $as_echo_n "(cached) " >&6
12811 else
12812   ac_save_c_werror_flag=$ac_c_werror_flag
12813    ac_c_werror_flag=yes
12814    ac_cv_prog_cc_g=no
12815    CFLAGS="-g"
12816    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12817 /* end confdefs.h.  */
12818
12819 int
12820 main ()
12821 {
12822
12823   ;
12824   return 0;
12825 }
12826 _ACEOF
12827 if ac_fn_c_try_compile "$LINENO"; then :
12828   ac_cv_prog_cc_g=yes
12829 else
12830   CFLAGS=""
12831       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12832 /* end confdefs.h.  */
12833
12834 int
12835 main ()
12836 {
12837
12838   ;
12839   return 0;
12840 }
12841 _ACEOF
12842 if ac_fn_c_try_compile "$LINENO"; then :
12843
12844 else
12845   ac_c_werror_flag=$ac_save_c_werror_flag
12846          CFLAGS="-g"
12847          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12848 /* end confdefs.h.  */
12849
12850 int
12851 main ()
12852 {
12853
12854   ;
12855   return 0;
12856 }
12857 _ACEOF
12858 if ac_fn_c_try_compile "$LINENO"; then :
12859   ac_cv_prog_cc_g=yes
12860 fi
12861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12862 fi
12863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12864 fi
12865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12866    ac_c_werror_flag=$ac_save_c_werror_flag
12867 fi
12868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
12869 $as_echo "$ac_cv_prog_cc_g" >&6; }
12870 if test "$ac_test_CFLAGS" = set; then
12871   CFLAGS=$ac_save_CFLAGS
12872 elif test $ac_cv_prog_cc_g = yes; then
12873   if test "$GCC" = yes; then
12874     CFLAGS="-g -O2"
12875   else
12876     CFLAGS="-g"
12877   fi
12878 else
12879   if test "$GCC" = yes; then
12880     CFLAGS="-O2"
12881   else
12882     CFLAGS=
12883   fi
12884 fi
12885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
12886 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
12887 if test "${ac_cv_prog_cc_c89+set}" = set; then :
12888   $as_echo_n "(cached) " >&6
12889 else
12890   ac_cv_prog_cc_c89=no
12891 ac_save_CC=$CC
12892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12893 /* end confdefs.h.  */
12894 #include <stdarg.h>
12895 #include <stdio.h>
12896 #include <sys/types.h>
12897 #include <sys/stat.h>
12898 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12899 struct buf { int x; };
12900 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12901 static char *e (p, i)
12902      char **p;
12903      int i;
12904 {
12905   return p[i];
12906 }
12907 static char *f (char * (*g) (char **, int), char **p, ...)
12908 {
12909   char *s;
12910   va_list v;
12911   va_start (v,p);
12912   s = g (p, va_arg (v,int));
12913   va_end (v);
12914   return s;
12915 }
12916
12917 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12918    function prototypes and stuff, but not '\xHH' hex character constants.
12919    These don't provoke an error unfortunately, instead are silently treated
12920    as 'x'.  The following induces an error, until -std is added to get
12921    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12922    array size at least.  It's necessary to write '\x00'==0 to get something
12923    that's true only with -std.  */
12924 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12925
12926 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
12927    inside strings and character constants.  */
12928 #define FOO(x) 'x'
12929 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
12930
12931 int test (int i, double x);
12932 struct s1 {int (*f) (int a);};
12933 struct s2 {int (*f) (double a);};
12934 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12935 int argc;
12936 char **argv;
12937 int
12938 main ()
12939 {
12940 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12941   ;
12942   return 0;
12943 }
12944 _ACEOF
12945 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
12946         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12947 do
12948   CC="$ac_save_CC $ac_arg"
12949   if ac_fn_c_try_compile "$LINENO"; then :
12950   ac_cv_prog_cc_c89=$ac_arg
12951 fi
12952 rm -f core conftest.err conftest.$ac_objext
12953   test "x$ac_cv_prog_cc_c89" != "xno" && break
12954 done
12955 rm -f conftest.$ac_ext
12956 CC=$ac_save_CC
12957
12958 fi
12959 # AC_CACHE_VAL
12960 case "x$ac_cv_prog_cc_c89" in
12961   x)
12962     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12963 $as_echo "none needed" >&6; } ;;
12964   xno)
12965     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12966 $as_echo "unsupported" >&6; } ;;
12967   *)
12968     CC="$CC $ac_cv_prog_cc_c89"
12969     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
12970 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
12971 esac
12972 if test "x$ac_cv_prog_cc_c89" != xno; then :
12973
12974 fi
12975
12976 ac_ext=c
12977 ac_cpp='$CPP $CPPFLAGS'
12978 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12979 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12980 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12981
12982 depcc="$CC"   am_compiler_list=
12983
12984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
12985 $as_echo_n "checking dependency style of $depcc... " >&6; }
12986 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
12987   $as_echo_n "(cached) " >&6
12988 else
12989   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12990   # We make a subdir and do the tests there.  Otherwise we can end up
12991   # making bogus files that we don't know about and never remove.  For
12992   # instance it was reported that on HP-UX the gcc test will end up
12993   # making a dummy file named `D' -- because `-MD' means `put the output
12994   # in D'.
12995   mkdir conftest.dir
12996   # Copy depcomp to subdir because otherwise we won't find it if we're
12997   # using a relative directory.
12998   cp "$am_depcomp" conftest.dir
12999   cd conftest.dir
13000   # We will build objects and dependencies in a subdirectory because
13001   # it helps to detect inapplicable dependency modes.  For instance
13002   # both Tru64's cc and ICC support -MD to output dependencies as a
13003   # side effect of compilation, but ICC will put the dependencies in
13004   # the current directory while Tru64 will put them in the object
13005   # directory.
13006   mkdir sub
13007
13008   am_cv_CC_dependencies_compiler_type=none
13009   if test "$am_compiler_list" = ""; then
13010      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
13011   fi
13012   for depmode in $am_compiler_list; do
13013     # Setup a source with many dependencies, because some compilers
13014     # like to wrap large dependency lists on column 80 (with \), and
13015     # we should not choose a depcomp mode which is confused by this.
13016     #
13017     # We need to recreate these files for each test, as the compiler may
13018     # overwrite some of them when testing with obscure command lines.
13019     # This happens at least with the AIX C compiler.
13020     : > sub/conftest.c
13021     for i in 1 2 3 4 5 6; do
13022       echo '#include "conftst'$i'.h"' >> sub/conftest.c
13023       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
13024       # Solaris 8's {/usr,}/bin/sh.
13025       touch sub/conftst$i.h
13026     done
13027     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
13028
13029     case $depmode in
13030     nosideeffect)
13031       # after this tag, mechanisms are not by side-effect, so they'll
13032       # only be used when explicitly requested
13033       if test "x$enable_dependency_tracking" = xyes; then
13034         continue
13035       else
13036         break
13037       fi
13038       ;;
13039     none) break ;;
13040     esac
13041     # We check with `-c' and `-o' for the sake of the "dashmstdout"
13042     # mode.  It turns out that the SunPro C++ compiler does not properly
13043     # handle `-M -o', and we need to detect this.
13044     if depmode=$depmode \
13045        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
13046        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
13047        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
13048          >/dev/null 2>conftest.err &&
13049        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
13050        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
13051        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
13052       # icc doesn't choke on unknown options, it will just issue warnings
13053       # or remarks (even with -Werror).  So we grep stderr for any message
13054       # that says an option was ignored or not supported.
13055       # When given -MP, icc 7.0 and 7.1 complain thusly:
13056       #   icc: Command line warning: ignoring option '-M'; no argument required
13057       # The diagnosis changed in icc 8.0:
13058       #   icc: Command line remark: option '-MP' not supported
13059       if (grep 'ignoring option' conftest.err ||
13060           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
13061         am_cv_CC_dependencies_compiler_type=$depmode
13062         break
13063       fi
13064     fi
13065   done
13066
13067   cd ..
13068   rm -rf conftest.dir
13069 else
13070   am_cv_CC_dependencies_compiler_type=none
13071 fi
13072
13073 fi
13074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
13075 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
13076 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
13077
13078
13079
13080 if
13081   test "x$enable_dependency_tracking" != xno \
13082   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
13083   am__fastdepCC_TRUE=
13084   am__fastdepCC_FALSE='#'
13085 else
13086   am__fastdepCC_TRUE='#'
13087   am__fastdepCC_FALSE=
13088 fi
13089
13090
13091 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
13092         as_fn_error "OpenLDAP requires compiler to support STDC constructs." "$LINENO" 5
13093 fi
13094
13095 # test for make depend flag
13096 OL_MKDEP=
13097 OL_MKDEP_FLAGS=
13098 if test -z "${MKDEP}"; then
13099         OL_MKDEP="${CC-cc}"
13100         if test -z "${MKDEP_FLAGS}"; then
13101                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${OL_MKDEP} depend flag" >&5
13102 $as_echo_n "checking for ${OL_MKDEP} depend flag... " >&6; }
13103 if test "${ol_cv_mkdep+set}" = set; then :
13104   $as_echo_n "(cached) " >&6
13105 else
13106
13107                         ol_cv_mkdep=no
13108                         for flag in "-M" "-xM"; do
13109                                 cat > conftest.c <<EOF
13110  noCode;
13111 EOF
13112                                 if { ac_try='$OL_MKDEP $flag conftest.c'
13113   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
13114   (eval $ac_try) 2>&5
13115   ac_status=$?
13116   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13117   test $ac_status = 0; }; } \
13118                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
13119                                 then
13120                                         if test ! -f conftest."${ac_object}" ; then
13121                                                 ol_cv_mkdep=$flag
13122                                                 OL_MKDEP_FLAGS="$flag"
13123                                                 break
13124                                         fi
13125                                 fi
13126                         done
13127                         rm -f conftest*
13128
13129 fi
13130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_mkdep" >&5
13131 $as_echo "$ol_cv_mkdep" >&6; }
13132                 test "$ol_cv_mkdep" = no && OL_MKDEP=":"
13133         else
13134                 cc_cv_mkdep=yes
13135                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13136         fi
13137 else
13138         cc_cv_mkdep=yes
13139         OL_MKDEP="${MKDEP}"
13140         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13141 fi
13142
13143
13144
13145 if test "${ol_cv_mkdep}" = no ; then
13146         # this will soon become an error
13147         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: do not know how to generate dependencies" >&5
13148 $as_echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
13149 fi
13150
13151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for afopen in -ls" >&5
13152 $as_echo_n "checking for afopen in -ls... " >&6; }
13153 if test "${ac_cv_lib_s_afopen+set}" = set; then :
13154   $as_echo_n "(cached) " >&6
13155 else
13156   ac_check_lib_save_LIBS=$LIBS
13157 LIBS="-ls  $LIBS"
13158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13159 /* end confdefs.h.  */
13160
13161 /* Override any GCC internal prototype to avoid an error.
13162    Use char because int might match the return type of a GCC
13163    builtin and then its argument prototype would still apply.  */
13164 #ifdef __cplusplus
13165 extern "C"
13166 #endif
13167 char afopen ();
13168 int
13169 main ()
13170 {
13171 return afopen ();
13172   ;
13173   return 0;
13174 }
13175 _ACEOF
13176 if ac_fn_c_try_link "$LINENO"; then :
13177   ac_cv_lib_s_afopen=yes
13178 else
13179   ac_cv_lib_s_afopen=no
13180 fi
13181 rm -f core conftest.err conftest.$ac_objext \
13182     conftest$ac_exeext conftest.$ac_ext
13183 LIBS=$ac_check_lib_save_LIBS
13184 fi
13185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_afopen" >&5
13186 $as_echo "$ac_cv_lib_s_afopen" >&6; }
13187 if test "x$ac_cv_lib_s_afopen" = x""yes; then :
13188
13189         AUTH_LIBS=-ls
13190
13191 $as_echo "#define HAVE_AIX_SECURITY 1" >>confdefs.h
13192
13193
13194 fi
13195
13196
13197 case "$target" in
13198 *-ibm-openedition)
13199         ac_cv_func_getopt=no
13200
13201 $as_echo "#define BOTH_STRINGS_H 1" >>confdefs.h
13202
13203         ;;
13204 esac
13205
13206 ol_link_modules=no
13207 WITH_MODULES_ENABLED=no
13208 if test $ol_enable_modules != no ; then
13209         for ac_header in ltdl.h
13210 do :
13211   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
13212 if test "x$ac_cv_header_ltdl_h" = x""yes; then :
13213   cat >>confdefs.h <<_ACEOF
13214 #define HAVE_LTDL_H 1
13215 _ACEOF
13216
13217 fi
13218
13219 done
13220
13221
13222         if test $ac_cv_header_ltdl_h = no ; then
13223                 as_fn_error "could not locate libtool ltdl.h" "$LINENO" 5
13224         fi
13225
13226         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
13227 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
13228 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
13229   $as_echo_n "(cached) " >&6
13230 else
13231   ac_check_lib_save_LIBS=$LIBS
13232 LIBS="-lltdl  $LIBS"
13233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13234 /* end confdefs.h.  */
13235
13236 /* Override any GCC internal prototype to avoid an error.
13237    Use char because int might match the return type of a GCC
13238    builtin and then its argument prototype would still apply.  */
13239 #ifdef __cplusplus
13240 extern "C"
13241 #endif
13242 char lt_dlinit ();
13243 int
13244 main ()
13245 {
13246 return lt_dlinit ();
13247   ;
13248   return 0;
13249 }
13250 _ACEOF
13251 if ac_fn_c_try_link "$LINENO"; then :
13252   ac_cv_lib_ltdl_lt_dlinit=yes
13253 else
13254   ac_cv_lib_ltdl_lt_dlinit=no
13255 fi
13256 rm -f core conftest.err conftest.$ac_objext \
13257     conftest$ac_exeext conftest.$ac_ext
13258 LIBS=$ac_check_lib_save_LIBS
13259 fi
13260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13261 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
13262 if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
13263
13264                 MODULES_LIBS=-lltdl
13265
13266 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
13267
13268
13269 fi
13270
13271
13272         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13273                 as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
13274         fi
13275         ol_link_modules=yes
13276         WITH_MODULES_ENABLED=yes
13277
13278 else
13279         for i in $Backends; do
13280                 eval "ol_tmp=\$ol_enable_$i"
13281                 if test $ol_tmp = mod ; then
13282                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i backend" >&5
13283 $as_echo "$as_me: WARNING: building static $i backend" >&2;}
13284                         eval "ol_enable_$i=yes"
13285                 fi
13286         done
13287         for i in $Overlays; do
13288                 eval "ol_tmp=\$ol_enable_$i"
13289                 if test $ol_tmp = mod ; then
13290                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i overlay" >&5
13291 $as_echo "$as_me: WARNING: building static $i overlay" >&2;}
13292                         eval "ol_enable_$i=yes"
13293                 fi
13294         done
13295 fi
13296
13297 # test for EBCDIC
13298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EBCDIC" >&5
13299 $as_echo_n "checking for EBCDIC... " >&6; }
13300 if test "${ol_cv_cpp_ebcdic+set}" = set; then :
13301   $as_echo_n "(cached) " >&6
13302 else
13303
13304         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13305 /* end confdefs.h.  */
13306
13307 #if !('M' == 0xd4)
13308 #include <__ASCII__/generate_error.h>
13309 #endif
13310
13311 _ACEOF
13312 if ac_fn_c_try_cpp "$LINENO"; then :
13313   ol_cv_cpp_ebcdic=yes
13314 else
13315   ol_cv_cpp_ebcdic=no
13316 fi
13317 rm -f conftest.err conftest.$ac_ext
13318 fi
13319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cpp_ebcdic" >&5
13320 $as_echo "$ol_cv_cpp_ebcdic" >&6; }
13321 if test $ol_cv_cpp_ebcdic = yes ; then
13322
13323 $as_echo "#define HAVE_EBCDIC 1" >>confdefs.h
13324
13325 fi
13326
13327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13328 $as_echo_n "checking for ANSI C header files... " >&6; }
13329 if test "${ol_cv_header_stdc+set}" = set; then :
13330   $as_echo_n "(cached) " >&6
13331 else
13332   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13333 /* end confdefs.h.  */
13334 #include <stdlib.h>
13335 #include <stdarg.h>
13336 #include <string.h>
13337 #include <float.h>
13338 _ACEOF
13339 if ac_fn_c_try_cpp "$LINENO"; then :
13340   ol_cv_header_stdc=yes
13341 else
13342   ol_cv_header_stdc=no
13343 fi
13344 rm -f conftest.err conftest.$ac_ext
13345
13346 if test $ol_cv_header_stdc = yes; then
13347   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13349 /* end confdefs.h.  */
13350 #include <string.h>
13351
13352 _ACEOF
13353 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13354   $EGREP "memchr" >/dev/null 2>&1; then :
13355
13356 else
13357   ol_cv_header_stdc=no
13358 fi
13359 rm -f conftest*
13360
13361 fi
13362
13363 if test $ol_cv_header_stdc = yes; then
13364   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13366 /* end confdefs.h.  */
13367 #include <stdlib.h>
13368
13369 _ACEOF
13370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13371   $EGREP "free" >/dev/null 2>&1; then :
13372
13373 else
13374   ol_cv_header_stdc=no
13375 fi
13376 rm -f conftest*
13377
13378 fi
13379
13380 if test $ol_cv_header_stdc = yes; then
13381   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13382 if test "$cross_compiling" = yes; then :
13383   :
13384 else
13385   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13386 /* end confdefs.h.  */
13387 #include <ctype.h>
13388 #ifndef HAVE_EBCDIC
13389 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13390 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13391 #else
13392 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13393                 || ('j' <= (c) && (c) <= 'r') \
13394                 || ('s' <= (c) && (c) <= 'z'))
13395 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13396 #endif
13397 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13398 int main () { int i; for (i = 0; i < 256; i++)
13399 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13400 exit (0); }
13401
13402 _ACEOF
13403 if ac_fn_c_try_run "$LINENO"; then :
13404
13405 else
13406   ol_cv_header_stdc=no
13407 fi
13408 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13409   conftest.$ac_objext conftest.beam conftest.$ac_ext
13410 fi
13411
13412 fi
13413 fi
13414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_stdc" >&5
13415 $as_echo "$ol_cv_header_stdc" >&6; }
13416 if test $ol_cv_header_stdc = yes; then
13417   $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13418
13419 fi
13420 ac_cv_header_stdc=disable
13421
13422
13423 if test $ol_cv_header_stdc != yes; then
13424         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate Standard C compliant headers" >&5
13425 $as_echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13426 fi
13427
13428 ac_header_dirent=no
13429 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13430   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
13432 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
13433 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
13434   $as_echo_n "(cached) " >&6
13435 else
13436   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13437 /* end confdefs.h.  */
13438 #include <sys/types.h>
13439 #include <$ac_hdr>
13440
13441 int
13442 main ()
13443 {
13444 if ((DIR *) 0)
13445 return 0;
13446   ;
13447   return 0;
13448 }
13449 _ACEOF
13450 if ac_fn_c_try_compile "$LINENO"; then :
13451   eval "$as_ac_Header=yes"
13452 else
13453   eval "$as_ac_Header=no"
13454 fi
13455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13456 fi
13457 eval ac_res=\$$as_ac_Header
13458                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13459 $as_echo "$ac_res" >&6; }
13460 eval as_val=\$$as_ac_Header
13461    if test "x$as_val" = x""yes; then :
13462   cat >>confdefs.h <<_ACEOF
13463 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13464 _ACEOF
13465
13466 ac_header_dirent=$ac_hdr; break
13467 fi
13468
13469 done
13470 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13471 if test $ac_header_dirent = dirent.h; then
13472   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13473 $as_echo_n "checking for library containing opendir... " >&6; }
13474 if test "${ac_cv_search_opendir+set}" = set; then :
13475   $as_echo_n "(cached) " >&6
13476 else
13477   ac_func_search_save_LIBS=$LIBS
13478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13479 /* end confdefs.h.  */
13480
13481 /* Override any GCC internal prototype to avoid an error.
13482    Use char because int might match the return type of a GCC
13483    builtin and then its argument prototype would still apply.  */
13484 #ifdef __cplusplus
13485 extern "C"
13486 #endif
13487 char opendir ();
13488 int
13489 main ()
13490 {
13491 return opendir ();
13492   ;
13493   return 0;
13494 }
13495 _ACEOF
13496 for ac_lib in '' dir; do
13497   if test -z "$ac_lib"; then
13498     ac_res="none required"
13499   else
13500     ac_res=-l$ac_lib
13501     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13502   fi
13503   if ac_fn_c_try_link "$LINENO"; then :
13504   ac_cv_search_opendir=$ac_res
13505 fi
13506 rm -f core conftest.err conftest.$ac_objext \
13507     conftest$ac_exeext
13508   if test "${ac_cv_search_opendir+set}" = set; then :
13509   break
13510 fi
13511 done
13512 if test "${ac_cv_search_opendir+set}" = set; then :
13513
13514 else
13515   ac_cv_search_opendir=no
13516 fi
13517 rm conftest.$ac_ext
13518 LIBS=$ac_func_search_save_LIBS
13519 fi
13520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13521 $as_echo "$ac_cv_search_opendir" >&6; }
13522 ac_res=$ac_cv_search_opendir
13523 if test "$ac_res" != no; then :
13524   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13525
13526 fi
13527
13528 else
13529   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13530 $as_echo_n "checking for library containing opendir... " >&6; }
13531 if test "${ac_cv_search_opendir+set}" = set; then :
13532   $as_echo_n "(cached) " >&6
13533 else
13534   ac_func_search_save_LIBS=$LIBS
13535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13536 /* end confdefs.h.  */
13537
13538 /* Override any GCC internal prototype to avoid an error.
13539    Use char because int might match the return type of a GCC
13540    builtin and then its argument prototype would still apply.  */
13541 #ifdef __cplusplus
13542 extern "C"
13543 #endif
13544 char opendir ();
13545 int
13546 main ()
13547 {
13548 return opendir ();
13549   ;
13550   return 0;
13551 }
13552 _ACEOF
13553 for ac_lib in '' x; do
13554   if test -z "$ac_lib"; then
13555     ac_res="none required"
13556   else
13557     ac_res=-l$ac_lib
13558     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13559   fi
13560   if ac_fn_c_try_link "$LINENO"; then :
13561   ac_cv_search_opendir=$ac_res
13562 fi
13563 rm -f core conftest.err conftest.$ac_objext \
13564     conftest$ac_exeext
13565   if test "${ac_cv_search_opendir+set}" = set; then :
13566   break
13567 fi
13568 done
13569 if test "${ac_cv_search_opendir+set}" = set; then :
13570
13571 else
13572   ac_cv_search_opendir=no
13573 fi
13574 rm conftest.$ac_ext
13575 LIBS=$ac_func_search_save_LIBS
13576 fi
13577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13578 $as_echo "$ac_cv_search_opendir" >&6; }
13579 ac_res=$ac_cv_search_opendir
13580 if test "$ac_res" != no; then :
13581   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13582
13583 fi
13584
13585 fi
13586
13587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
13588 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
13589 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
13590   $as_echo_n "(cached) " >&6
13591 else
13592   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13593 /* end confdefs.h.  */
13594 #include <sys/types.h>
13595 #include <sys/wait.h>
13596 #ifndef WEXITSTATUS
13597 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
13598 #endif
13599 #ifndef WIFEXITED
13600 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13601 #endif
13602
13603 int
13604 main ()
13605 {
13606   int s;
13607   wait (&s);
13608   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13609   ;
13610   return 0;
13611 }
13612 _ACEOF
13613 if ac_fn_c_try_compile "$LINENO"; then :
13614   ac_cv_header_sys_wait_h=yes
13615 else
13616   ac_cv_header_sys_wait_h=no
13617 fi
13618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13619 fi
13620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
13621 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
13622 if test $ac_cv_header_sys_wait_h = yes; then
13623
13624 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
13625
13626 fi
13627
13628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
13629 $as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
13630 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then :
13631   $as_echo_n "(cached) " >&6
13632 else
13633   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13634 /* end confdefs.h.  */
13635 #include <sys/types.h>
13636 #include <termios.h>
13637 #ifdef TIOCGWINSZ
13638   yes
13639 #endif
13640
13641 _ACEOF
13642 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13643   $EGREP "yes" >/dev/null 2>&1; then :
13644   ac_cv_sys_tiocgwinsz_in_termios_h=yes
13645 else
13646   ac_cv_sys_tiocgwinsz_in_termios_h=no
13647 fi
13648 rm -f conftest*
13649
13650 fi
13651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13652 $as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
13653
13654 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13655   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13656 $as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
13657 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then :
13658   $as_echo_n "(cached) " >&6
13659 else
13660   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13661 /* end confdefs.h.  */
13662 #include <sys/types.h>
13663 #include <sys/ioctl.h>
13664 #ifdef TIOCGWINSZ
13665   yes
13666 #endif
13667
13668 _ACEOF
13669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13670   $EGREP "yes" >/dev/null 2>&1; then :
13671   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13672 else
13673   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13674 fi
13675 rm -f conftest*
13676
13677 fi
13678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13679 $as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
13680
13681   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13682
13683 $as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
13684
13685   fi
13686 fi
13687
13688
13689 for ac_header in \
13690         arpa/inet.h             \
13691         arpa/nameser.h  \
13692         assert.h                \
13693         bits/types.h    \
13694         conio.h                 \
13695         crypt.h                 \
13696         direct.h                \
13697         errno.h                 \
13698         fcntl.h                 \
13699         filio.h                 \
13700         getopt.h                \
13701         grp.h                   \
13702         io.h                    \
13703         libutil.h               \
13704         limits.h                \
13705         locale.h                \
13706         malloc.h                \
13707         memory.h                \
13708         psap.h                  \
13709         pwd.h                   \
13710         process.h               \
13711         sgtty.h                 \
13712         shadow.h                \
13713         stddef.h                \
13714         string.h                \
13715         strings.h               \
13716         sysexits.h              \
13717         sys/file.h              \
13718         sys/filio.h             \
13719         sys/fstyp.h             \
13720         sys/errno.h             \
13721         sys/ioctl.h             \
13722         sys/param.h             \
13723         sys/privgrp.h   \
13724         sys/resource.h  \
13725         sys/select.h    \
13726         sys/socket.h    \
13727         sys/stat.h              \
13728         sys/syslog.h    \
13729         sys/time.h              \
13730         sys/types.h             \
13731         sys/uio.h               \
13732         sys/vmount.h    \
13733         syslog.h                \
13734         termios.h               \
13735         unistd.h                \
13736         utime.h                 \
13737
13738 do :
13739   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13740 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13741 eval as_val=\$$as_ac_Header
13742    if test "x$as_val" = x""yes; then :
13743   cat >>confdefs.h <<_ACEOF
13744 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13745 _ACEOF
13746
13747 fi
13748
13749 done
13750
13751
13752 if test "$ac_cv_mingw32" = yes \
13753         -o "$ac_cv_interix" = yes \
13754         -o "$ol_cv_msvc" = yes
13755 then
13756         for ac_header in winsock.h winsock2.h
13757 do :
13758   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13759 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13760 eval as_val=\$$as_ac_Header
13761    if test "x$as_val" = x""yes; then :
13762   cat >>confdefs.h <<_ACEOF
13763 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13764 _ACEOF
13765
13766 fi
13767
13768 done
13769
13770 fi
13771
13772 for ac_header in resolv.h
13773 do :
13774   ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default
13775 #include <netinet/in.h>
13776
13777 "
13778 if test "x$ac_cv_header_resolv_h" = x""yes; then :
13779   cat >>confdefs.h <<_ACEOF
13780 #define HAVE_RESOLV_H 1
13781 _ACEOF
13782
13783 fi
13784
13785 done
13786
13787
13788 for ac_header in netinet/tcp.h
13789 do :
13790   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13791 #include <netinet/in.h>
13792
13793 "
13794 if test "x$ac_cv_header_netinet_tcp_h" = x""yes; then :
13795   cat >>confdefs.h <<_ACEOF
13796 #define HAVE_NETINET_TCP_H 1
13797 _ACEOF
13798
13799 fi
13800
13801 done
13802
13803
13804 for ac_header in sys/ucred.h
13805 do :
13806   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13807 #ifdef HAVE_SYS_PARAM_H
13808 #include <sys/param.h>
13809 #endif
13810
13811 "
13812 if test "x$ac_cv_header_sys_ucred_h" = x""yes; then :
13813   cat >>confdefs.h <<_ACEOF
13814 #define HAVE_SYS_UCRED_H 1
13815 _ACEOF
13816
13817 fi
13818
13819 done
13820
13821
13822
13823 for ac_func in sigaction sigset
13824 do :
13825   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13826 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13827 eval as_val=\$$as_ac_var
13828    if test "x$as_val" = x""yes; then :
13829   cat >>confdefs.h <<_ACEOF
13830 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13831 _ACEOF
13832
13833 fi
13834 done
13835
13836
13837 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
13838         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset in -lV3" >&5
13839 $as_echo_n "checking for sigset in -lV3... " >&6; }
13840 if test "${ac_cv_lib_V3_sigset+set}" = set; then :
13841   $as_echo_n "(cached) " >&6
13842 else
13843   ac_check_lib_save_LIBS=$LIBS
13844 LIBS="-lV3  $LIBS"
13845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13846 /* end confdefs.h.  */
13847
13848 /* Override any GCC internal prototype to avoid an error.
13849    Use char because int might match the return type of a GCC
13850    builtin and then its argument prototype would still apply.  */
13851 #ifdef __cplusplus
13852 extern "C"
13853 #endif
13854 char sigset ();
13855 int
13856 main ()
13857 {
13858 return sigset ();
13859   ;
13860   return 0;
13861 }
13862 _ACEOF
13863 if ac_fn_c_try_link "$LINENO"; then :
13864   ac_cv_lib_V3_sigset=yes
13865 else
13866   ac_cv_lib_V3_sigset=no
13867 fi
13868 rm -f core conftest.err conftest.$ac_objext \
13869     conftest$ac_exeext conftest.$ac_ext
13870 LIBS=$ac_check_lib_save_LIBS
13871 fi
13872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_V3_sigset" >&5
13873 $as_echo "$ac_cv_lib_V3_sigset" >&6; }
13874 if test "x$ac_cv_lib_V3_sigset" = x""yes; then :
13875   cat >>confdefs.h <<_ACEOF
13876 #define HAVE_LIBV3 1
13877 _ACEOF
13878
13879   LIBS="-lV3 $LIBS"
13880
13881 fi
13882
13883 fi
13884
13885 if test $ol_cv_msvc = yes ; then
13886    ol_cv_winsock=yes
13887 fi
13888
13889 if test "$ac_cv_header_winsock_h" = yes; then
13890         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock" >&5
13891 $as_echo_n "checking for winsock... " >&6; }
13892 if test "${ol_cv_winsock+set}" = set; then :
13893   $as_echo_n "(cached) " >&6
13894 else
13895
13896         save_LIBS="$LIBS"
13897         for curlib in none ws2_32 wsock32; do
13898                 if test $curlib != none ; then
13899                 LIBS="$save_LIBS -l$curlib"
13900                 fi
13901                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13902 /* end confdefs.h.  */
13903 #include <winsock.h>
13904
13905 int
13906 main ()
13907 {
13908
13909                         socket(0,0,0);
13910                         select(0,NULL,NULL,NULL,NULL);
13911                         closesocket(0);
13912                         gethostname(NULL,0);
13913
13914   ;
13915   return 0;
13916 }
13917 _ACEOF
13918 if ac_fn_c_try_link "$LINENO"; then :
13919   ol_cv_winsock=$curlib
13920 else
13921   ol_cv_winsock=no
13922 fi
13923 rm -f core conftest.err conftest.$ac_objext \
13924     conftest$ac_exeext conftest.$ac_ext
13925
13926                 test "$ol_cv_winsock" != no && break
13927         done
13928         LIBS="$save_LIBS"
13929
13930 fi
13931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_winsock" >&5
13932 $as_echo "$ol_cv_winsock" >&6; }
13933
13934         if test $ol_cv_winsock != no ; then
13935
13936 $as_echo "#define HAVE_WINSOCK 1" >>confdefs.h
13937
13938         ac_cv_func_socket=yes
13939         ac_cv_func_select=yes
13940         ac_cv_func_closesocket=yes
13941         ac_cv_func_gethostname=yes
13942
13943                 if test $ol_cv_winsock != none -a $ol_cv_winsock != yes ; then
13944                 LIBS="$LIBS -l$ol_cv_winsock"
13945                 fi
13946
13947         if test $ol_cv_winsock = ws2_32 -o $ol_cv_winsock = yes ; then
13948
13949 $as_echo "#define HAVE_WINSOCK2 1" >>confdefs.h
13950
13951         fi
13952         fi
13953 fi
13954
13955
13956 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13957 if test "x$ac_cv_func_socket" = x""yes; then :
13958   :
13959 else
13960
13961         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
13962 $as_echo_n "checking for main in -lsocket... " >&6; }
13963 if test "${ac_cv_lib_socket_main+set}" = set; then :
13964   $as_echo_n "(cached) " >&6
13965 else
13966   ac_check_lib_save_LIBS=$LIBS
13967 LIBS="-lsocket  $LIBS"
13968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13969 /* end confdefs.h.  */
13970
13971
13972 int
13973 main ()
13974 {
13975 return main ();
13976   ;
13977   return 0;
13978 }
13979 _ACEOF
13980 if ac_fn_c_try_link "$LINENO"; then :
13981   ac_cv_lib_socket_main=yes
13982 else
13983   ac_cv_lib_socket_main=no
13984 fi
13985 rm -f core conftest.err conftest.$ac_objext \
13986     conftest$ac_exeext conftest.$ac_ext
13987 LIBS=$ac_check_lib_save_LIBS
13988 fi
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
13990 $as_echo "$ac_cv_lib_socket_main" >&6; }
13991 if test "x$ac_cv_lib_socket_main" = x""yes; then :
13992   cat >>confdefs.h <<_ACEOF
13993 #define HAVE_LIBSOCKET 1
13994 _ACEOF
13995
13996   LIBS="-lsocket $LIBS"
13997
13998 fi
13999
14000         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
14001 $as_echo_n "checking for socket in -lnet... " >&6; }
14002 if test "${ac_cv_lib_net_socket+set}" = set; then :
14003   $as_echo_n "(cached) " >&6
14004 else
14005   ac_check_lib_save_LIBS=$LIBS
14006 LIBS="-lnet  $LIBS"
14007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14008 /* end confdefs.h.  */
14009
14010 /* Override any GCC internal prototype to avoid an error.
14011    Use char because int might match the return type of a GCC
14012    builtin and then its argument prototype would still apply.  */
14013 #ifdef __cplusplus
14014 extern "C"
14015 #endif
14016 char socket ();
14017 int
14018 main ()
14019 {
14020 return socket ();
14021   ;
14022   return 0;
14023 }
14024 _ACEOF
14025 if ac_fn_c_try_link "$LINENO"; then :
14026   ac_cv_lib_net_socket=yes
14027 else
14028   ac_cv_lib_net_socket=no
14029 fi
14030 rm -f core conftest.err conftest.$ac_objext \
14031     conftest$ac_exeext conftest.$ac_ext
14032 LIBS=$ac_check_lib_save_LIBS
14033 fi
14034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
14035 $as_echo "$ac_cv_lib_net_socket" >&6; }
14036 if test "x$ac_cv_lib_net_socket" = x""yes; then :
14037   cat >>confdefs.h <<_ACEOF
14038 #define HAVE_LIBNET 1
14039 _ACEOF
14040
14041   LIBS="-lnet $LIBS"
14042
14043 fi
14044
14045         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl_s" >&5
14046 $as_echo_n "checking for main in -lnsl_s... " >&6; }
14047 if test "${ac_cv_lib_nsl_s_main+set}" = set; then :
14048   $as_echo_n "(cached) " >&6
14049 else
14050   ac_check_lib_save_LIBS=$LIBS
14051 LIBS="-lnsl_s  $LIBS"
14052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14053 /* end confdefs.h.  */
14054
14055
14056 int
14057 main ()
14058 {
14059 return main ();
14060   ;
14061   return 0;
14062 }
14063 _ACEOF
14064 if ac_fn_c_try_link "$LINENO"; then :
14065   ac_cv_lib_nsl_s_main=yes
14066 else
14067   ac_cv_lib_nsl_s_main=no
14068 fi
14069 rm -f core conftest.err conftest.$ac_objext \
14070     conftest$ac_exeext conftest.$ac_ext
14071 LIBS=$ac_check_lib_save_LIBS
14072 fi
14073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_s_main" >&5
14074 $as_echo "$ac_cv_lib_nsl_s_main" >&6; }
14075 if test "x$ac_cv_lib_nsl_s_main" = x""yes; then :
14076   cat >>confdefs.h <<_ACEOF
14077 #define HAVE_LIBNSL_S 1
14078 _ACEOF
14079
14080   LIBS="-lnsl_s $LIBS"
14081
14082 fi
14083
14084         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5
14085 $as_echo_n "checking for main in -lnsl... " >&6; }
14086 if test "${ac_cv_lib_nsl_main+set}" = set; then :
14087   $as_echo_n "(cached) " >&6
14088 else
14089   ac_check_lib_save_LIBS=$LIBS
14090 LIBS="-lnsl  $LIBS"
14091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14092 /* end confdefs.h.  */
14093
14094
14095 int
14096 main ()
14097 {
14098 return main ();
14099   ;
14100   return 0;
14101 }
14102 _ACEOF
14103 if ac_fn_c_try_link "$LINENO"; then :
14104   ac_cv_lib_nsl_main=yes
14105 else
14106   ac_cv_lib_nsl_main=no
14107 fi
14108 rm -f core conftest.err conftest.$ac_objext \
14109     conftest$ac_exeext conftest.$ac_ext
14110 LIBS=$ac_check_lib_save_LIBS
14111 fi
14112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5
14113 $as_echo "$ac_cv_lib_nsl_main" >&6; }
14114 if test "x$ac_cv_lib_nsl_main" = x""yes; then :
14115   cat >>confdefs.h <<_ACEOF
14116 #define HAVE_LIBNSL 1
14117 _ACEOF
14118
14119   LIBS="-lnsl $LIBS"
14120
14121 fi
14122
14123         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -linet" >&5
14124 $as_echo_n "checking for socket in -linet... " >&6; }
14125 if test "${ac_cv_lib_inet_socket+set}" = set; then :
14126   $as_echo_n "(cached) " >&6
14127 else
14128   ac_check_lib_save_LIBS=$LIBS
14129 LIBS="-linet  $LIBS"
14130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14131 /* end confdefs.h.  */
14132
14133 /* Override any GCC internal prototype to avoid an error.
14134    Use char because int might match the return type of a GCC
14135    builtin and then its argument prototype would still apply.  */
14136 #ifdef __cplusplus
14137 extern "C"
14138 #endif
14139 char socket ();
14140 int
14141 main ()
14142 {
14143 return socket ();
14144   ;
14145   return 0;
14146 }
14147 _ACEOF
14148 if ac_fn_c_try_link "$LINENO"; then :
14149   ac_cv_lib_inet_socket=yes
14150 else
14151   ac_cv_lib_inet_socket=no
14152 fi
14153 rm -f core conftest.err conftest.$ac_objext \
14154     conftest$ac_exeext conftest.$ac_ext
14155 LIBS=$ac_check_lib_save_LIBS
14156 fi
14157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_socket" >&5
14158 $as_echo "$ac_cv_lib_inet_socket" >&6; }
14159 if test "x$ac_cv_lib_inet_socket" = x""yes; then :
14160   cat >>confdefs.h <<_ACEOF
14161 #define HAVE_LIBINET 1
14162 _ACEOF
14163
14164   LIBS="-linet $LIBS"
14165
14166 fi
14167
14168         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgen" >&5
14169 $as_echo_n "checking for main in -lgen... " >&6; }
14170 if test "${ac_cv_lib_gen_main+set}" = set; then :
14171   $as_echo_n "(cached) " >&6
14172 else
14173   ac_check_lib_save_LIBS=$LIBS
14174 LIBS="-lgen  $LIBS"
14175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14176 /* end confdefs.h.  */
14177
14178
14179 int
14180 main ()
14181 {
14182 return main ();
14183   ;
14184   return 0;
14185 }
14186 _ACEOF
14187 if ac_fn_c_try_link "$LINENO"; then :
14188   ac_cv_lib_gen_main=yes
14189 else
14190   ac_cv_lib_gen_main=no
14191 fi
14192 rm -f core conftest.err conftest.$ac_objext \
14193     conftest$ac_exeext conftest.$ac_ext
14194 LIBS=$ac_check_lib_save_LIBS
14195 fi
14196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_main" >&5
14197 $as_echo "$ac_cv_lib_gen_main" >&6; }
14198 if test "x$ac_cv_lib_gen_main" = x""yes; then :
14199   cat >>confdefs.h <<_ACEOF
14200 #define HAVE_LIBGEN 1
14201 _ACEOF
14202
14203   LIBS="-lgen $LIBS"
14204
14205 fi
14206
14207
14208 fi
14209
14210
14211 ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
14212 if test "x$ac_cv_func_select" = x""yes; then :
14213   :
14214 else
14215   as_fn_error "select() required." "$LINENO" 5
14216 fi
14217
14218
14219 if test "${ac_cv_header_winsock_h}" != yes; then
14220                                 for ac_header in sys/select.h sys/socket.h
14221 do :
14222   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14223 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14224 eval as_val=\$$as_ac_Header
14225    if test "x$as_val" = x""yes; then :
14226   cat >>confdefs.h <<_ACEOF
14227 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14228 _ACEOF
14229
14230 fi
14231
14232 done
14233
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
14235 $as_echo_n "checking types of arguments for select... " >&6; }
14236 if test "${ac_cv_func_select_args+set}" = set; then :
14237   $as_echo_n "(cached) " >&6
14238 else
14239   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
14240  for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
14241   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
14242    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14243 /* end confdefs.h.  */
14244 $ac_includes_default
14245 #ifdef HAVE_SYS_SELECT_H
14246 # include <sys/select.h>
14247 #endif
14248 #ifdef HAVE_SYS_SOCKET_H
14249 # include <sys/socket.h>
14250 #endif
14251
14252 int
14253 main ()
14254 {
14255 extern int select ($ac_arg1,
14256                                             $ac_arg234, $ac_arg234, $ac_arg234,
14257                                             $ac_arg5);
14258   ;
14259   return 0;
14260 }
14261 _ACEOF
14262 if ac_fn_c_try_compile "$LINENO"; then :
14263   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
14264 fi
14265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14266   done
14267  done
14268 done
14269 # Provide a safe default value.
14270 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
14271
14272 fi
14273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
14274 $as_echo "$ac_cv_func_select_args" >&6; }
14275 ac_save_IFS=$IFS; IFS=','
14276 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
14277 IFS=$ac_save_IFS
14278 shift
14279
14280 cat >>confdefs.h <<_ACEOF
14281 #define SELECT_TYPE_ARG1 $1
14282 _ACEOF
14283
14284
14285 cat >>confdefs.h <<_ACEOF
14286 #define SELECT_TYPE_ARG234 ($2)
14287 _ACEOF
14288
14289
14290 cat >>confdefs.h <<_ACEOF
14291 #define SELECT_TYPE_ARG5 ($3)
14292 _ACEOF
14293
14294 rm -f conftest*
14295
14296 fi
14297
14298
14299 for ac_func in poll
14300 do :
14301   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14302 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14303 eval as_val=\$$as_ac_var
14304    if test "x$as_val" = x""yes; then :
14305   cat >>confdefs.h <<_ACEOF
14306 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14307 _ACEOF
14308
14309 fi
14310 done
14311
14312 if test $ac_cv_func_poll = yes; then
14313 for ac_header in poll.h sys/poll.h
14314 do :
14315   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14316 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14317 eval as_val=\$$as_ac_Header
14318    if test "x$as_val" = x""yes; then :
14319   cat >>confdefs.h <<_ACEOF
14320 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14321 _ACEOF
14322
14323 fi
14324
14325 done
14326
14327 fi
14328
14329 for ac_header in sys/epoll.h
14330 do :
14331   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14332 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14333 eval as_val=\$$as_ac_Header
14334    if test "x$as_val" = x""yes; then :
14335   cat >>confdefs.h <<_ACEOF
14336 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14337 _ACEOF
14338
14339 fi
14340
14341 done
14342
14343 if test "${ac_cv_header_sys_epoll_h}" = yes; then
14344         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll system call" >&5
14345 $as_echo_n "checking for epoll system call... " >&6; }
14346         if test "$cross_compiling" = yes; then :
14347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14348 $as_echo "no" >&6; }
14349 else
14350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14351 /* end confdefs.h.  */
14352 int main(int argc, char **argv)
14353 {
14354         int epfd = epoll_create(256);
14355         exit (epfd == -1 ? 1 : 0);
14356 }
14357 _ACEOF
14358 if ac_fn_c_try_run "$LINENO"; then :
14359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14360 $as_echo "yes" >&6; }
14361
14362 $as_echo "#define HAVE_EPOLL 1" >>confdefs.h
14363
14364 else
14365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14366 $as_echo "no" >&6; }
14367 fi
14368 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14369   conftest.$ac_objext conftest.beam conftest.$ac_ext
14370 fi
14371
14372 fi
14373
14374 for ac_header in sys/devpoll.h
14375 do :
14376   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14377 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14378 eval as_val=\$$as_ac_Header
14379    if test "x$as_val" = x""yes; then :
14380   cat >>confdefs.h <<_ACEOF
14381 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14382 _ACEOF
14383
14384 fi
14385
14386 done
14387
14388 if test "${ac_cv_header_sys_devpoll_h}" = yes \
14389                 -a "${ac_cv_header_poll_h}" = yes ; \
14390 then
14391         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/poll" >&5
14392 $as_echo_n "checking for /dev/poll... " >&6; }
14393         if test "$cross_compiling" = yes; then :
14394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14395 $as_echo "no" >&6; }
14396 else
14397   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14398 /* end confdefs.h.  */
14399 int main(int argc, char **argv)
14400 {
14401         int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
14402         exit (devpollfd == -1 ? 1 : 0);
14403 }
14404 _ACEOF
14405 if ac_fn_c_try_run "$LINENO"; then :
14406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14407 $as_echo "yes" >&6; }
14408
14409 $as_echo "#define HAVE_DEVPOLL 1" >>confdefs.h
14410
14411 else
14412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14413 $as_echo "no" >&6; }
14414 fi
14415 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14416   conftest.$ac_objext conftest.beam conftest.$ac_ext
14417 fi
14418
14419 fi
14420
14421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14422 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14423 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14424   $as_echo_n "(cached) " >&6
14425 else
14426
14427         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14428 /* end confdefs.h.  */
14429
14430 #include <stdio.h>
14431 #include <sys/types.h>
14432 #include <errno.h>
14433 #ifdef _WIN32
14434 #include <stdlib.h>
14435 #endif
14436 int
14437 main ()
14438 {
14439 char *c = (char *) *sys_errlist
14440   ;
14441   return 0;
14442 }
14443 _ACEOF
14444 if ac_fn_c_try_compile "$LINENO"; then :
14445   ol_cv_dcl_sys_errlist=yes
14446         ol_cv_have_sys_errlist=yes
14447 else
14448   ol_cv_dcl_sys_errlist=no
14449 fi
14450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14451 fi
14452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14453 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14454 #
14455 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14456 if test $ol_cv_dcl_sys_errlist = no ; then
14457
14458 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14459
14460
14461         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14462 $as_echo_n "checking existence of sys_errlist... " >&6; }
14463 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14464   $as_echo_n "(cached) " >&6
14465 else
14466
14467                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14468 /* end confdefs.h.  */
14469 #include <errno.h>
14470 int
14471 main ()
14472 {
14473 char *c = (char *) *sys_errlist
14474   ;
14475   return 0;
14476 }
14477 _ACEOF
14478 if ac_fn_c_try_link "$LINENO"; then :
14479   ol_cv_have_sys_errlist=yes
14480 else
14481   ol_cv_have_sys_errlist=no
14482 fi
14483 rm -f core conftest.err conftest.$ac_objext \
14484     conftest$ac_exeext conftest.$ac_ext
14485 fi
14486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14487 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14488 fi
14489 if test $ol_cv_have_sys_errlist = yes ; then
14490
14491 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14492
14493 fi
14494  for ac_func in strerror strerror_r
14495 do :
14496   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14497 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14498 eval as_val=\$$as_ac_var
14499    if test "x$as_val" = x""yes; then :
14500   cat >>confdefs.h <<_ACEOF
14501 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14502 _ACEOF
14503
14504 fi
14505 done
14506
14507 ol_cv_func_strerror_r=no
14508 if test "${ac_cv_func_strerror_r}" = yes ; then
14509         { $as_echo "$as_me:${as_lineno-$LINENO}: checking non-posix strerror_r" >&5
14510 $as_echo_n "checking non-posix strerror_r... " >&6; }
14511 if test "${ol_cv_nonposix_strerror_r+set}" = set; then :
14512   $as_echo_n "(cached) " >&6
14513 else
14514
14515         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14516 /* end confdefs.h.  */
14517 #include <string.h>
14518 _ACEOF
14519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14520   $EGREP "strerror_r" >/dev/null 2>&1; then :
14521   ol_decl_strerror_r=yes
14522 else
14523   ol_decl_strerror_r=no
14524 fi
14525 rm -f conftest*
14526
14527         if test $ol_decl_strerror_r = yes ; then
14528                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14529 /* end confdefs.h.  */
14530 #include <string.h>
14531 int
14532 main ()
14533 {
14534    /* from autoconf 2.59 */
14535                                 char buf[100];
14536                                 char x = *strerror_r (0, buf, sizeof buf);
14537                                 char *p = strerror_r (0, buf, sizeof buf);
14538
14539   ;
14540   return 0;
14541 }
14542 _ACEOF
14543 if ac_fn_c_try_compile "$LINENO"; then :
14544   ol_cv_nonposix_strerror_r=yes
14545 else
14546   ol_cv_nonposix_strerror_r=no
14547 fi
14548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14549         else
14550                 if test "$cross_compiling" = yes; then :
14551   ol_cv_nonposix_strerror=no
14552 else
14553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14554 /* end confdefs.h.  */
14555
14556                         main() {
14557                                 char buf[100];
14558                                 buf[0] = 0;
14559                                 strerror_r( 1, buf, sizeof buf );
14560                                 exit( buf[0] == 0 );
14561                         }
14562
14563 _ACEOF
14564 if ac_fn_c_try_run "$LINENO"; then :
14565   ol_cv_nonposix_strerror_r=yes
14566 else
14567   ol_cv_nonposix_strerror=no
14568 fi
14569 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14570   conftest.$ac_objext conftest.beam conftest.$ac_ext
14571 fi
14572
14573         fi
14574
14575 fi
14576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_nonposix_strerror_r" >&5
14577 $as_echo "$ol_cv_nonposix_strerror_r" >&6; }
14578 if test $ol_cv_nonposix_strerror_r = yes ; then
14579
14580 $as_echo "#define HAVE_NONPOSIX_STRERROR_R 1" >>confdefs.h
14581
14582 fi
14583
14584 elif test "${ac_cv_func_strerror}" = no ; then
14585         { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14586 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14587 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14588   $as_echo_n "(cached) " >&6
14589 else
14590
14591         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14592 /* end confdefs.h.  */
14593
14594 #include <stdio.h>
14595 #include <sys/types.h>
14596 #include <errno.h>
14597 #ifdef _WIN32
14598 #include <stdlib.h>
14599 #endif
14600 int
14601 main ()
14602 {
14603 char *c = (char *) *sys_errlist
14604   ;
14605   return 0;
14606 }
14607 _ACEOF
14608 if ac_fn_c_try_compile "$LINENO"; then :
14609   ol_cv_dcl_sys_errlist=yes
14610         ol_cv_have_sys_errlist=yes
14611 else
14612   ol_cv_dcl_sys_errlist=no
14613 fi
14614 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14615 fi
14616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14617 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14618 #
14619 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14620 if test $ol_cv_dcl_sys_errlist = no ; then
14621
14622 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14623
14624
14625         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14626 $as_echo_n "checking existence of sys_errlist... " >&6; }
14627 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14628   $as_echo_n "(cached) " >&6
14629 else
14630
14631                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14632 /* end confdefs.h.  */
14633 #include <errno.h>
14634 int
14635 main ()
14636 {
14637 char *c = (char *) *sys_errlist
14638   ;
14639   return 0;
14640 }
14641 _ACEOF
14642 if ac_fn_c_try_link "$LINENO"; then :
14643   ol_cv_have_sys_errlist=yes
14644 else
14645   ol_cv_have_sys_errlist=no
14646 fi
14647 rm -f core conftest.err conftest.$ac_objext \
14648     conftest$ac_exeext conftest.$ac_ext
14649 fi
14650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14651 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14652 fi
14653 if test $ol_cv_have_sys_errlist = yes ; then
14654
14655 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14656
14657 fi
14658
14659 fi
14660
14661
14662 for ac_header in regex.h
14663 do :
14664   ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default
14665 #ifdef HAVE_SYS_TYPES_H
14666 #include <sys/types.h>
14667 #endif
14668
14669 "
14670 if test "x$ac_cv_header_regex_h" = x""yes; then :
14671   cat >>confdefs.h <<_ACEOF
14672 #define HAVE_REGEX_H 1
14673 _ACEOF
14674
14675 fi
14676
14677 done
14678
14679
14680 if test "$ac_cv_header_regex_h" != yes ; then
14681         as_fn_error "POSIX regex.h required." "$LINENO" 5
14682 fi
14683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing regfree" >&5
14684 $as_echo_n "checking for library containing regfree... " >&6; }
14685 if test "${ac_cv_search_regfree+set}" = set; then :
14686   $as_echo_n "(cached) " >&6
14687 else
14688   ac_func_search_save_LIBS=$LIBS
14689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14690 /* end confdefs.h.  */
14691
14692 /* Override any GCC internal prototype to avoid an error.
14693    Use char because int might match the return type of a GCC
14694    builtin and then its argument prototype would still apply.  */
14695 #ifdef __cplusplus
14696 extern "C"
14697 #endif
14698 char regfree ();
14699 int
14700 main ()
14701 {
14702 return regfree ();
14703   ;
14704   return 0;
14705 }
14706 _ACEOF
14707 for ac_lib in '' regex gnuregex; do
14708   if test -z "$ac_lib"; then
14709     ac_res="none required"
14710   else
14711     ac_res=-l$ac_lib
14712     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14713   fi
14714   if ac_fn_c_try_link "$LINENO"; then :
14715   ac_cv_search_regfree=$ac_res
14716 fi
14717 rm -f core conftest.err conftest.$ac_objext \
14718     conftest$ac_exeext
14719   if test "${ac_cv_search_regfree+set}" = set; then :
14720   break
14721 fi
14722 done
14723 if test "${ac_cv_search_regfree+set}" = set; then :
14724
14725 else
14726   ac_cv_search_regfree=no
14727 fi
14728 rm conftest.$ac_ext
14729 LIBS=$ac_func_search_save_LIBS
14730 fi
14731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_regfree" >&5
14732 $as_echo "$ac_cv_search_regfree" >&6; }
14733 ac_res=$ac_cv_search_regfree
14734 if test "$ac_res" != no; then :
14735   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14736   :
14737 else
14738   as_fn_error "POSIX regex required." "$LINENO" 5
14739 fi
14740
14741
14742
14743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible POSIX regex" >&5
14744 $as_echo_n "checking for compatible POSIX regex... " >&6; }
14745 if test "${ol_cv_c_posix_regex+set}" = set; then :
14746   $as_echo_n "(cached) " >&6
14747 else
14748
14749         if test "$cross_compiling" = yes; then :
14750   ol_cv_c_posix_regex=cross
14751 else
14752   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14753 /* end confdefs.h.  */
14754
14755 #include <sys/types.h>
14756 #include <regex.h>
14757 static char *pattern, *string;
14758 main()
14759 {
14760         int rc;
14761         regex_t re;
14762
14763         pattern = "^A";
14764
14765         if(regcomp(&re, pattern, 0)) {
14766                 return -1;
14767         }
14768
14769         string = "ALL MATCH";
14770
14771         rc = regexec(&re, string, 0, (void*)0, 0);
14772
14773         regfree(&re);
14774
14775         return rc;
14776 }
14777 _ACEOF
14778 if ac_fn_c_try_run "$LINENO"; then :
14779   ol_cv_c_posix_regex=yes
14780 else
14781   ol_cv_c_posix_regex=no
14782 fi
14783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14784   conftest.$ac_objext conftest.beam conftest.$ac_ext
14785 fi
14786
14787 fi
14788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_posix_regex" >&5
14789 $as_echo "$ol_cv_c_posix_regex" >&6; }
14790
14791 if test "$ol_cv_c_posix_regex" = no ; then
14792         as_fn_error "broken POSIX regex!" "$LINENO" 5
14793 fi
14794
14795
14796 have_uuid=no
14797 for ac_header in sys/uuid.h
14798 do :
14799   ac_fn_c_check_header_mongrel "$LINENO" "sys/uuid.h" "ac_cv_header_sys_uuid_h" "$ac_includes_default"
14800 if test "x$ac_cv_header_sys_uuid_h" = x""yes; then :
14801   cat >>confdefs.h <<_ACEOF
14802 #define HAVE_SYS_UUID_H 1
14803 _ACEOF
14804
14805 fi
14806
14807 done
14808
14809 if test $ac_cv_header_sys_uuid_h = yes ; then
14810         save_LIBS="$LIBS"
14811         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_to_str" >&5
14812 $as_echo_n "checking for library containing uuid_to_str... " >&6; }
14813 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14814   $as_echo_n "(cached) " >&6
14815 else
14816   ac_func_search_save_LIBS=$LIBS
14817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14818 /* end confdefs.h.  */
14819
14820 /* Override any GCC internal prototype to avoid an error.
14821    Use char because int might match the return type of a GCC
14822    builtin and then its argument prototype would still apply.  */
14823 #ifdef __cplusplus
14824 extern "C"
14825 #endif
14826 char uuid_to_str ();
14827 int
14828 main ()
14829 {
14830 return uuid_to_str ();
14831   ;
14832   return 0;
14833 }
14834 _ACEOF
14835 for ac_lib in '' uuid; do
14836   if test -z "$ac_lib"; then
14837     ac_res="none required"
14838   else
14839     ac_res=-l$ac_lib
14840     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14841   fi
14842   if ac_fn_c_try_link "$LINENO"; then :
14843   ac_cv_search_uuid_to_str=$ac_res
14844 fi
14845 rm -f core conftest.err conftest.$ac_objext \
14846     conftest$ac_exeext
14847   if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14848   break
14849 fi
14850 done
14851 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14852
14853 else
14854   ac_cv_search_uuid_to_str=no
14855 fi
14856 rm conftest.$ac_ext
14857 LIBS=$ac_func_search_save_LIBS
14858 fi
14859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_to_str" >&5
14860 $as_echo "$ac_cv_search_uuid_to_str" >&6; }
14861 ac_res=$ac_cv_search_uuid_to_str
14862 if test "$ac_res" != no; then :
14863   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14864   have_uuid=yes
14865 else
14866   :
14867 fi
14868
14869         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_create" >&5
14870 $as_echo_n "checking for library containing uuid_create... " >&6; }
14871 if test "${ac_cv_search_uuid_create+set}" = set; then :
14872   $as_echo_n "(cached) " >&6
14873 else
14874   ac_func_search_save_LIBS=$LIBS
14875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14876 /* end confdefs.h.  */
14877
14878 /* Override any GCC internal prototype to avoid an error.
14879    Use char because int might match the return type of a GCC
14880    builtin and then its argument prototype would still apply.  */
14881 #ifdef __cplusplus
14882 extern "C"
14883 #endif
14884 char uuid_create ();
14885 int
14886 main ()
14887 {
14888 return uuid_create ();
14889   ;
14890   return 0;
14891 }
14892 _ACEOF
14893 for ac_lib in '' uuid; do
14894   if test -z "$ac_lib"; then
14895     ac_res="none required"
14896   else
14897     ac_res=-l$ac_lib
14898     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14899   fi
14900   if ac_fn_c_try_link "$LINENO"; then :
14901   ac_cv_search_uuid_create=$ac_res
14902 fi
14903 rm -f core conftest.err conftest.$ac_objext \
14904     conftest$ac_exeext
14905   if test "${ac_cv_search_uuid_create+set}" = set; then :
14906   break
14907 fi
14908 done
14909 if test "${ac_cv_search_uuid_create+set}" = set; then :
14910
14911 else
14912   ac_cv_search_uuid_create=no
14913 fi
14914 rm conftest.$ac_ext
14915 LIBS=$ac_func_search_save_LIBS
14916 fi
14917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_create" >&5
14918 $as_echo "$ac_cv_search_uuid_create" >&6; }
14919 ac_res=$ac_cv_search_uuid_create
14920 if test "$ac_res" != no; then :
14921   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14922   :
14923 else
14924   have_uuid=no
14925 fi
14926
14927         LIBS="$save_LIBS"
14928
14929         if test $have_uuid = yes ; then
14930
14931 $as_echo "#define HAVE_UUID_TO_STR 1" >>confdefs.h
14932
14933
14934                 test "$ac_cv_search_uuid_to_str" = "none required" || \
14935                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
14936         fi
14937 fi
14938
14939 if test $have_uuid = no ; then
14940         for ac_header in uuid/uuid.h
14941 do :
14942   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14943 if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then :
14944   cat >>confdefs.h <<_ACEOF
14945 #define HAVE_UUID_UUID_H 1
14946 _ACEOF
14947
14948 fi
14949
14950 done
14951
14952         if test $ac_cv_header_uuid_uuid_h = yes ; then
14953                 save_LIBS="$LIBS"
14954                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
14955 $as_echo_n "checking for library containing uuid_generate... " >&6; }
14956 if test "${ac_cv_search_uuid_generate+set}" = set; then :
14957   $as_echo_n "(cached) " >&6
14958 else
14959   ac_func_search_save_LIBS=$LIBS
14960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14961 /* end confdefs.h.  */
14962
14963 /* Override any GCC internal prototype to avoid an error.
14964    Use char because int might match the return type of a GCC
14965    builtin and then its argument prototype would still apply.  */
14966 #ifdef __cplusplus
14967 extern "C"
14968 #endif
14969 char uuid_generate ();
14970 int
14971 main ()
14972 {
14973 return uuid_generate ();
14974   ;
14975   return 0;
14976 }
14977 _ACEOF
14978 for ac_lib in '' uuid; do
14979   if test -z "$ac_lib"; then
14980     ac_res="none required"
14981   else
14982     ac_res=-l$ac_lib
14983     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14984   fi
14985   if ac_fn_c_try_link "$LINENO"; then :
14986   ac_cv_search_uuid_generate=$ac_res
14987 fi
14988 rm -f core conftest.err conftest.$ac_objext \
14989     conftest$ac_exeext
14990   if test "${ac_cv_search_uuid_generate+set}" = set; then :
14991   break
14992 fi
14993 done
14994 if test "${ac_cv_search_uuid_generate+set}" = set; then :
14995
14996 else
14997   ac_cv_search_uuid_generate=no
14998 fi
14999 rm conftest.$ac_ext
15000 LIBS=$ac_func_search_save_LIBS
15001 fi
15002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
15003 $as_echo "$ac_cv_search_uuid_generate" >&6; }
15004 ac_res=$ac_cv_search_uuid_generate
15005 if test "$ac_res" != no; then :
15006   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15007   have_uuid=yes
15008 else
15009   :
15010 fi
15011
15012                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_unparse_lower" >&5
15013 $as_echo_n "checking for library containing uuid_unparse_lower... " >&6; }
15014 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
15015   $as_echo_n "(cached) " >&6
15016 else
15017   ac_func_search_save_LIBS=$LIBS
15018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15019 /* end confdefs.h.  */
15020
15021 /* Override any GCC internal prototype to avoid an error.
15022    Use char because int might match the return type of a GCC
15023    builtin and then its argument prototype would still apply.  */
15024 #ifdef __cplusplus
15025 extern "C"
15026 #endif
15027 char uuid_unparse_lower ();
15028 int
15029 main ()
15030 {
15031 return uuid_unparse_lower ();
15032   ;
15033   return 0;
15034 }
15035 _ACEOF
15036 for ac_lib in '' uuid; do
15037   if test -z "$ac_lib"; then
15038     ac_res="none required"
15039   else
15040     ac_res=-l$ac_lib
15041     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15042   fi
15043   if ac_fn_c_try_link "$LINENO"; then :
15044   ac_cv_search_uuid_unparse_lower=$ac_res
15045 fi
15046 rm -f core conftest.err conftest.$ac_objext \
15047     conftest$ac_exeext
15048   if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
15049   break
15050 fi
15051 done
15052 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
15053
15054 else
15055   ac_cv_search_uuid_unparse_lower=no
15056 fi
15057 rm conftest.$ac_ext
15058 LIBS=$ac_func_search_save_LIBS
15059 fi
15060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_unparse_lower" >&5
15061 $as_echo "$ac_cv_search_uuid_unparse_lower" >&6; }
15062 ac_res=$ac_cv_search_uuid_unparse_lower
15063 if test "$ac_res" != no; then :
15064   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15065   :
15066 else
15067   have_uuid=no
15068 fi
15069
15070                 LIBS="$save_LIBS"
15071
15072                 if test $have_uuid = yes ; then
15073
15074 $as_echo "#define HAVE_UUID_GENERATE 1" >>confdefs.h
15075
15076
15077                         test "$ac_cv_search_uuid_generate" = "none required" || \
15078                                 SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_generate"
15079                 fi
15080         fi
15081 fi
15082
15083 if test $have_uuid = no ; then
15084         { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
15085 $as_echo_n "checking to see if -lrpcrt4 is needed for win32 UUID support... " >&6; }
15086         save_LIBS="$LIBS"
15087         LIBS="$LIBS -lrpcrt4"
15088         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15089 /* end confdefs.h.  */
15090
15091                 int __stdcall UuidCreate(void *);
15092                 int __stdcall UuidToStringA(void *,void **);
15093
15094 int
15095 main ()
15096 {
15097
15098                 UuidCreate(0);
15099                 UuidToStringA(0,0);
15100
15101   ;
15102   return 0;
15103 }
15104 _ACEOF
15105 if ac_fn_c_try_link "$LINENO"; then :
15106   need_rpcrt=yes
15107 else
15108   need_rpcrt=no
15109 fi
15110 rm -f core conftest.err conftest.$ac_objext \
15111     conftest$ac_exeext conftest.$ac_ext
15112         if test $need_rpcrt = yes; then
15113                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
15114         fi
15115         LIBS="$save_LIBS"
15116         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_rpcrt" >&5
15117 $as_echo "$need_rpcrt" >&6; }
15118 fi
15119
15120 ol_cv_lib_resolver=no
15121 if test $ol_cv_lib_resolver = no ; then
15122         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (default)" >&5
15123 $as_echo_n "checking for resolver link (default)... " >&6; }
15124 if test "${ol_cv_resolver_none+set}" = set; then :
15125   $as_echo_n "(cached) " >&6
15126 else
15127
15128         ol_RESOLVER_LIB=
15129         ol_LIBS=$LIBS
15130         LIBS="$ol_RESOLVER_LIB $LIBS"
15131
15132         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15133 /* end confdefs.h.  */
15134
15135 #ifdef HAVE_SYS_TYPES_H
15136 #       include <sys/types.h>
15137 #endif
15138 #include <netinet/in.h>
15139 #ifdef HAVE_ARPA_NAMESER_H
15140 #       include <arpa/nameser.h>
15141 #endif
15142 #ifdef HAVE_RESOLV_H
15143 #       include <resolv.h>
15144 #endif
15145
15146 int
15147 main ()
15148 {
15149 {
15150         int len, status;
15151         char *request = NULL;
15152         unsigned char reply[64*1024];
15153         unsigned char host[64*1024];
15154         unsigned char *p;
15155
15156 #ifdef NS_HFIXEDSZ
15157         /* Bind 8/9 interface */
15158         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15159 #else
15160         /* Bind 4 interface */
15161 # ifndef T_SRV
15162 #  define T_SRV 33
15163 # endif
15164         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15165 #endif
15166         p = reply;
15167 #ifdef NS_HFIXEDSZ
15168         /* Bind 8/9 interface */
15169         p += NS_HFIXEDSZ;
15170 #elif defined(HFIXEDSZ)
15171         /* Bind 4 interface w/ HFIXEDSZ */
15172         p += HFIXEDSZ;
15173 #else
15174         /* Bind 4 interface w/o HFIXEDSZ */
15175         p += sizeof(HEADER);
15176 #endif
15177         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15178 }
15179   ;
15180   return 0;
15181 }
15182 _ACEOF
15183 if ac_fn_c_try_link "$LINENO"; then :
15184   ol_cv_resolver_none=yes
15185 else
15186   ol_cv_resolver_none=no
15187 fi
15188 rm -f core conftest.err conftest.$ac_objext \
15189     conftest$ac_exeext conftest.$ac_ext
15190
15191         LIBS="$ol_LIBS"
15192
15193 fi
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_none" >&5
15195 $as_echo "$ol_cv_resolver_none" >&6; }
15196
15197         if test $ol_cv_resolver_none = yes ; then
15198                 ol_cv_lib_resolver=yes
15199         fi
15200 fi
15201
15202 if test $ol_cv_lib_resolver = no ; then
15203         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lresolv)" >&5
15204 $as_echo_n "checking for resolver link (-lresolv)... " >&6; }
15205 if test "${ol_cv_resolver_resolv+set}" = set; then :
15206   $as_echo_n "(cached) " >&6
15207 else
15208
15209         ol_RESOLVER_LIB=-lresolv
15210         ol_LIBS=$LIBS
15211         LIBS="$ol_RESOLVER_LIB $LIBS"
15212
15213         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15214 /* end confdefs.h.  */
15215
15216 #ifdef HAVE_SYS_TYPES_H
15217 #       include <sys/types.h>
15218 #endif
15219 #include <netinet/in.h>
15220 #ifdef HAVE_ARPA_NAMESER_H
15221 #       include <arpa/nameser.h>
15222 #endif
15223 #ifdef HAVE_RESOLV_H
15224 #       include <resolv.h>
15225 #endif
15226
15227 int
15228 main ()
15229 {
15230 {
15231         int len, status;
15232         char *request = NULL;
15233         unsigned char reply[64*1024];
15234         unsigned char host[64*1024];
15235         unsigned char *p;
15236
15237 #ifdef NS_HFIXEDSZ
15238         /* Bind 8/9 interface */
15239         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15240 #else
15241         /* Bind 4 interface */
15242 # ifndef T_SRV
15243 #  define T_SRV 33
15244 # endif
15245         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15246 #endif
15247         p = reply;
15248 #ifdef NS_HFIXEDSZ
15249         /* Bind 8/9 interface */
15250         p += NS_HFIXEDSZ;
15251 #elif defined(HFIXEDSZ)
15252         /* Bind 4 interface w/ HFIXEDSZ */
15253         p += HFIXEDSZ;
15254 #else
15255         /* Bind 4 interface w/o HFIXEDSZ */
15256         p += sizeof(HEADER);
15257 #endif
15258         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15259 }
15260   ;
15261   return 0;
15262 }
15263 _ACEOF
15264 if ac_fn_c_try_link "$LINENO"; then :
15265   ol_cv_resolver_resolv=yes
15266 else
15267   ol_cv_resolver_resolv=no
15268 fi
15269 rm -f core conftest.err conftest.$ac_objext \
15270     conftest$ac_exeext conftest.$ac_ext
15271
15272         LIBS="$ol_LIBS"
15273
15274 fi
15275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_resolv" >&5
15276 $as_echo "$ol_cv_resolver_resolv" >&6; }
15277
15278         if test $ol_cv_resolver_resolv = yes ; then
15279                 ol_cv_lib_resolver=-lresolv
15280         fi
15281 fi
15282
15283 if test $ol_cv_lib_resolver = no ; then
15284         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lbind)" >&5
15285 $as_echo_n "checking for resolver link (-lbind)... " >&6; }
15286 if test "${ol_cv_resolver_bind+set}" = set; then :
15287   $as_echo_n "(cached) " >&6
15288 else
15289
15290         ol_RESOLVER_LIB=-lbind
15291         ol_LIBS=$LIBS
15292         LIBS="$ol_RESOLVER_LIB $LIBS"
15293
15294         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15295 /* end confdefs.h.  */
15296
15297 #ifdef HAVE_SYS_TYPES_H
15298 #       include <sys/types.h>
15299 #endif
15300 #include <netinet/in.h>
15301 #ifdef HAVE_ARPA_NAMESER_H
15302 #       include <arpa/nameser.h>
15303 #endif
15304 #ifdef HAVE_RESOLV_H
15305 #       include <resolv.h>
15306 #endif
15307
15308 int
15309 main ()
15310 {
15311 {
15312         int len, status;
15313         char *request = NULL;
15314         unsigned char reply[64*1024];
15315         unsigned char host[64*1024];
15316         unsigned char *p;
15317
15318 #ifdef NS_HFIXEDSZ
15319         /* Bind 8/9 interface */
15320         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15321 #else
15322         /* Bind 4 interface */
15323 # ifndef T_SRV
15324 #  define T_SRV 33
15325 # endif
15326         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15327 #endif
15328         p = reply;
15329 #ifdef NS_HFIXEDSZ
15330         /* Bind 8/9 interface */
15331         p += NS_HFIXEDSZ;
15332 #elif defined(HFIXEDSZ)
15333         /* Bind 4 interface w/ HFIXEDSZ */
15334         p += HFIXEDSZ;
15335 #else
15336         /* Bind 4 interface w/o HFIXEDSZ */
15337         p += sizeof(HEADER);
15338 #endif
15339         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15340 }
15341   ;
15342   return 0;
15343 }
15344 _ACEOF
15345 if ac_fn_c_try_link "$LINENO"; then :
15346   ol_cv_resolver_bind=yes
15347 else
15348   ol_cv_resolver_bind=no
15349 fi
15350 rm -f core conftest.err conftest.$ac_objext \
15351     conftest$ac_exeext conftest.$ac_ext
15352
15353         LIBS="$ol_LIBS"
15354
15355 fi
15356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_bind" >&5
15357 $as_echo "$ol_cv_resolver_bind" >&6; }
15358
15359         if test $ol_cv_resolver_bind = yes ; then
15360                 ol_cv_lib_resolver=-lbind
15361         fi
15362 fi
15363
15364
15365
15366 ol_link_dnssrv=no
15367 if test "$ol_cv_lib_resolver" != no ; then
15368
15369 $as_echo "#define HAVE_RES_QUERY 1" >>confdefs.h
15370
15371
15372         if test "$ol_enable_dnssrv" != no ; then
15373                 ol_link_dnssrv=yes
15374         fi
15375
15376         if test "$ol_cv_lib_resolver" != yes ; then
15377                 LIBS="$ol_cv_lib_resolver $LIBS"
15378         fi
15379 fi
15380
15381 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
15382         if test "$ol_link_dnssrv" = no ; then
15383                 as_fn_error "DNSSRV requires res_query()" "$LINENO" 5
15384         fi
15385 else
15386         ol_enable_dnssrv=no
15387 fi
15388
15389 for ac_func in hstrerror
15390 do :
15391   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15392 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15393 eval as_val=\$$as_ac_var
15394    if test "x$as_val" = x""yes; then :
15395   cat >>confdefs.h <<_ACEOF
15396 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15397 _ACEOF
15398
15399 fi
15400 done
15401
15402
15403 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
15404 do :
15405   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15406 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15407 eval as_val=\$$as_ac_var
15408    if test "x$as_val" = x""yes; then :
15409   cat >>confdefs.h <<_ACEOF
15410 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15411 _ACEOF
15412
15413 fi
15414 done
15415
15416
15417 ol_link_ipv6=no
15418 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
15419         if test $ol_enable_ipv6 = yes ; then
15420                 as_fn_error "IPv6 support requires getaddrinfo() and inet_ntop()" "$LINENO" 5
15421         fi
15422 elif test $ol_enable_ipv6 != no ; then
15423         { $as_echo "$as_me:${as_lineno-$LINENO}: checking INET6_ADDRSTRLEN" >&5
15424 $as_echo_n "checking INET6_ADDRSTRLEN... " >&6; }
15425 if test "${ol_cv_inet6_addrstrlen+set}" = set; then :
15426   $as_echo_n "(cached) " >&6
15427 else
15428
15429                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15430 /* end confdefs.h.  */
15431
15432 #                       include <netinet/in.h>
15433 #                       ifdef INET6_ADDRSTRLEN
15434                                 __has_inet6_addrstrlen__;
15435 #                       endif
15436
15437 _ACEOF
15438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15439   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then :
15440   ol_cv_inet6_addrstrlen=yes
15441 else
15442   ol_cv_inet6_addrstrlen=no
15443 fi
15444 rm -f conftest*
15445
15446 fi
15447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_inet6_addrstrlen" >&5
15448 $as_echo "$ol_cv_inet6_addrstrlen" >&6; }
15449
15450
15451         { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr_storage" >&5
15452 $as_echo_n "checking struct sockaddr_storage... " >&6; }
15453 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then :
15454   $as_echo_n "(cached) " >&6
15455 else
15456
15457                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15458 /* end confdefs.h.  */
15459
15460 #include <sys/types.h>
15461 #include <sys/socket.h>
15462
15463 int
15464 main ()
15465 {
15466
15467                         struct sockaddr_storage ss;
15468
15469   ;
15470   return 0;
15471 }
15472 _ACEOF
15473 if ac_fn_c_try_compile "$LINENO"; then :
15474   ol_cv_struct_sockaddr_storage=yes
15475 else
15476   ol_cv_struct_sockaddr_storage=no
15477 fi
15478 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15479 fi
15480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_struct_sockaddr_storage" >&5
15481 $as_echo "$ol_cv_struct_sockaddr_storage" >&6; }
15482
15483         if test $ol_cv_inet6_addrstrlen = yes &&
15484            test $ol_cv_struct_sockaddr_storage = yes ; then
15485                 ol_link_ipv6=yes
15486         elif test $ol_enable_ipv6 = yes &&
15487              test $ol_cv_inet6_addrstrlen = no ; then
15488                 as_fn_error "IPv6 support requires INET6_ADDRSTRLEN" "$LINENO" 5
15489         elif test $ol_enable_ipv6 = yes &&
15490              test $ol_cv_struct_sockaddr_storage = no ; then
15491                 as_fn_error "IPv6 support requires struct sockaddr_storage" "$LINENO" 5
15492         fi
15493 fi
15494
15495 if test $ol_enable_local != no ; then
15496         for ac_header in sys/un.h
15497 do :
15498   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15499 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15500 eval as_val=\$$as_ac_Header
15501    if test "x$as_val" = x""yes; then :
15502   cat >>confdefs.h <<_ACEOF
15503 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15504 _ACEOF
15505
15506 fi
15507
15508 done
15509
15510
15511         if test $ol_enable_local = auto ; then
15512                 ol_enable_local=$ac_cv_header_sys_un_h
15513         elif test $ac_cv_header_sys_un_h = no ; then
15514                 as_fn_error "AF_LOCAL domain support requires sys/un.h" "$LINENO" 5
15515         fi
15516 fi
15517
15518
15519 if test $ol_with_tls = yes ; then
15520         ol_with_tls=auto
15521 fi
15522
15523 ol_link_tls=no
15524 if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
15525         for ac_header in openssl/ssl.h
15526 do :
15527   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
15528 if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then :
15529   cat >>confdefs.h <<_ACEOF
15530 #define HAVE_OPENSSL_SSL_H 1
15531 _ACEOF
15532
15533 fi
15534
15535 done
15536
15537
15538         if test $ac_cv_header_openssl_ssl_h = yes ; then
15539                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
15540 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
15541 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then :
15542   $as_echo_n "(cached) " >&6
15543 else
15544   ac_check_lib_save_LIBS=$LIBS
15545 LIBS="-lssl -lcrypto $LIBS"
15546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15547 /* end confdefs.h.  */
15548
15549 /* Override any GCC internal prototype to avoid an error.
15550    Use char because int might match the return type of a GCC
15551    builtin and then its argument prototype would still apply.  */
15552 #ifdef __cplusplus
15553 extern "C"
15554 #endif
15555 char SSL_library_init ();
15556 int
15557 main ()
15558 {
15559 return SSL_library_init ();
15560   ;
15561   return 0;
15562 }
15563 _ACEOF
15564 if ac_fn_c_try_link "$LINENO"; then :
15565   ac_cv_lib_ssl_SSL_library_init=yes
15566 else
15567   ac_cv_lib_ssl_SSL_library_init=no
15568 fi
15569 rm -f core conftest.err conftest.$ac_objext \
15570     conftest$ac_exeext conftest.$ac_ext
15571 LIBS=$ac_check_lib_save_LIBS
15572 fi
15573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
15574 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
15575 if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then :
15576   have_openssl=yes
15577                         need_rsaref=no
15578 else
15579   have_openssl=no
15580 fi
15581
15582
15583                 if test $have_openssl = no ; then
15584                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl3_accept in -lssl" >&5
15585 $as_echo_n "checking for ssl3_accept in -lssl... " >&6; }
15586 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then :
15587   $as_echo_n "(cached) " >&6
15588 else
15589   ac_check_lib_save_LIBS=$LIBS
15590 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
15591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15592 /* end confdefs.h.  */
15593
15594 /* Override any GCC internal prototype to avoid an error.
15595    Use char because int might match the return type of a GCC
15596    builtin and then its argument prototype would still apply.  */
15597 #ifdef __cplusplus
15598 extern "C"
15599 #endif
15600 char ssl3_accept ();
15601 int
15602 main ()
15603 {
15604 return ssl3_accept ();
15605   ;
15606   return 0;
15607 }
15608 _ACEOF
15609 if ac_fn_c_try_link "$LINENO"; then :
15610   ac_cv_lib_ssl_ssl3_accept=yes
15611 else
15612   ac_cv_lib_ssl_ssl3_accept=no
15613 fi
15614 rm -f core conftest.err conftest.$ac_objext \
15615     conftest$ac_exeext conftest.$ac_ext
15616 LIBS=$ac_check_lib_save_LIBS
15617 fi
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_ssl3_accept" >&5
15619 $as_echo "$ac_cv_lib_ssl_ssl3_accept" >&6; }
15620 if test "x$ac_cv_lib_ssl_ssl3_accept" = x""yes; then :
15621   have_openssl=yes
15622                                 need_rsaref=yes
15623 else
15624   have_openssl=no
15625 fi
15626
15627                 fi
15628
15629                 if test $have_openssl = yes ; then
15630                         ol_with_tls=openssl
15631                         ol_link_tls=yes
15632
15633
15634 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
15635
15636
15637                         if test $need_rsaref = yes; then
15638
15639 $as_echo "#define HAVE_RSAREF 1" >>confdefs.h
15640
15641
15642                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
15643                         else
15644                                 TLS_LIBS="-lssl -lcrypto"
15645                         fi
15646
15647                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version (CRL checking capability)" >&5
15648 $as_echo_n "checking OpenSSL library version (CRL checking capability)... " >&6; }
15649 if test "${ol_cv_ssl_crl_compat+set}" = set; then :
15650   $as_echo_n "(cached) " >&6
15651 else
15652
15653                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15654 /* end confdefs.h.  */
15655
15656 #ifdef HAVE_OPENSSL_SSL_H
15657 #include <openssl/ssl.h>
15658 #endif
15659
15660 /* Require 0.9.7d+ */
15661 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
15662         char *__ssl_compat = "0.9.7d";
15663 #endif
15664
15665 _ACEOF
15666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15667   $EGREP "__ssl_compat" >/dev/null 2>&1; then :
15668   ol_cv_ssl_crl_compat=yes
15669 else
15670   ol_cv_ssl_crl_compat=no
15671 fi
15672 rm -f conftest*
15673
15674 fi
15675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_ssl_crl_compat" >&5
15676 $as_echo "$ol_cv_ssl_crl_compat" >&6; }
15677
15678                         if test $ol_cv_ssl_crl_compat = yes ; then
15679
15680 $as_echo "#define HAVE_OPENSSL_CRL 1" >>confdefs.h
15681
15682                         fi
15683                 fi
15684         fi
15685 fi
15686
15687 if test $ol_link_tls = no ; then
15688         if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then
15689                 for ac_header in gnutls/gnutls.h
15690 do :
15691   ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
15692 if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then :
15693   cat >>confdefs.h <<_ACEOF
15694 #define HAVE_GNUTLS_GNUTLS_H 1
15695 _ACEOF
15696
15697 fi
15698
15699 done
15700
15701
15702                 if test $ac_cv_header_gnutls_gnutls_h = yes ; then
15703                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15704 /* end confdefs.h.  */
15705 #include <gnutls/gnutls.h>
15706 #if GNUTLS_VERSION_NUMBER < 0x020c00
15707 #error "GnuTLS 2.12.0 or newer required"
15708 #endif
15709 _ACEOF
15710 if ac_fn_c_try_cpp "$LINENO"; then :
15711
15712 else
15713   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15714 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15715 as_fn_error "GnuTLS is too old
15716 See \`config.log' for more details." "$LINENO" 5; }
15717 fi
15718 rm -f conftest.err conftest.$ac_ext
15719
15720                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
15721 $as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
15722 if test "${ac_cv_lib_gnutls_gnutls_init+set}" = set; then :
15723   $as_echo_n "(cached) " >&6
15724 else
15725   ac_check_lib_save_LIBS=$LIBS
15726 LIBS="-lgnutls  $LIBS"
15727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15728 /* end confdefs.h.  */
15729
15730 /* Override any GCC internal prototype to avoid an error.
15731    Use char because int might match the return type of a GCC
15732    builtin and then its argument prototype would still apply.  */
15733 #ifdef __cplusplus
15734 extern "C"
15735 #endif
15736 char gnutls_init ();
15737 int
15738 main ()
15739 {
15740 return gnutls_init ();
15741   ;
15742   return 0;
15743 }
15744 _ACEOF
15745 if ac_fn_c_try_link "$LINENO"; then :
15746   ac_cv_lib_gnutls_gnutls_init=yes
15747 else
15748   ac_cv_lib_gnutls_gnutls_init=no
15749 fi
15750 rm -f core conftest.err conftest.$ac_objext \
15751     conftest$ac_exeext conftest.$ac_ext
15752 LIBS=$ac_check_lib_save_LIBS
15753 fi
15754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_init" >&5
15755 $as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
15756 if test "x$ac_cv_lib_gnutls_gnutls_init" = x""yes; then :
15757   have_gnutls=yes
15758 else
15759   have_gnutls=no
15760 fi
15761
15762
15763                         if test $have_gnutls = yes ; then
15764                                 ol_with_tls=gnutls
15765                                 ol_link_tls=yes
15766
15767                                 TLS_LIBS="-lgnutls"
15768
15769
15770 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
15771
15772                         fi
15773                 fi
15774         fi
15775 fi
15776
15777 if test $ol_link_tls = no ; then
15778         if test $ol_with_tls = moznss || test $ol_with_tls = auto ; then
15779                 have_moznss=no
15780                 for ac_header in nssutil.h
15781 do :
15782   ac_fn_c_check_header_mongrel "$LINENO" "nssutil.h" "ac_cv_header_nssutil_h" "$ac_includes_default"
15783 if test "x$ac_cv_header_nssutil_h" = x""yes; then :
15784   cat >>confdefs.h <<_ACEOF
15785 #define HAVE_NSSUTIL_H 1
15786 _ACEOF
15787
15788 fi
15789
15790 done
15791
15792                 if test "$ac_cv_header_nssutil_h" = yes ; then
15793                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_Initialize in -lnss3" >&5
15794 $as_echo_n "checking for NSS_Initialize in -lnss3... " >&6; }
15795 if test "${ac_cv_lib_nss3_NSS_Initialize+set}" = set; then :
15796   $as_echo_n "(cached) " >&6
15797 else
15798   ac_check_lib_save_LIBS=$LIBS
15799 LIBS="-lnss3  $LIBS"
15800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15801 /* end confdefs.h.  */
15802
15803 /* Override any GCC internal prototype to avoid an error.
15804    Use char because int might match the return type of a GCC
15805    builtin and then its argument prototype would still apply.  */
15806 #ifdef __cplusplus
15807 extern "C"
15808 #endif
15809 char NSS_Initialize ();
15810 int
15811 main ()
15812 {
15813 return NSS_Initialize ();
15814   ;
15815   return 0;
15816 }
15817 _ACEOF
15818 if ac_fn_c_try_link "$LINENO"; then :
15819   ac_cv_lib_nss3_NSS_Initialize=yes
15820 else
15821   ac_cv_lib_nss3_NSS_Initialize=no
15822 fi
15823 rm -f core conftest.err conftest.$ac_objext \
15824     conftest$ac_exeext conftest.$ac_ext
15825 LIBS=$ac_check_lib_save_LIBS
15826 fi
15827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_NSS_Initialize" >&5
15828 $as_echo "$ac_cv_lib_nss3_NSS_Initialize" >&6; }
15829 if test "x$ac_cv_lib_nss3_NSS_Initialize" = x""yes; then :
15830    have_moznss=yes
15831 else
15832    have_moznss=no
15833 fi
15834
15835                 fi
15836
15837                 if test "$have_moznss" = yes ; then
15838                         ol_with_tls=moznss
15839                         ol_link_tls=yes
15840
15841 $as_echo "#define HAVE_MOZNSS 1" >>confdefs.h
15842
15843                         TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
15844                 else
15845                         if test $ol_with_tls = moznss ; then
15846                         as_fn_error "MozNSS not found - please specify the location to the NSPR and NSS header files in CPPFLAGS and the location to the NSPR and NSS libraries in LDFLAGS (if not in the system location)" "$LINENO" 5
15847                         fi
15848                 fi
15849         fi
15850 fi
15851
15852 WITH_TLS=no
15853 if test $ol_link_tls = yes ; then
15854
15855 $as_echo "#define HAVE_TLS 1" >>confdefs.h
15856
15857         WITH_TLS=yes
15858 elif test $ol_with_tls = auto ; then
15859         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate TLS/SSL package" >&5
15860 $as_echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
15861         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15862 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15863 elif test $ol_with_tls != no ; then
15864         as_fn_error "Could not locate TLS/SSL package" "$LINENO" 5
15865 else
15866         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15867 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15868 fi
15869
15870 if test $ol_enable_lmpasswd != no; then
15871         if test $ol_link_tls != yes ; then
15872                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
15873         fi
15874
15875
15876 $as_echo "#define SLAPD_LMHASH 1" >>confdefs.h
15877
15878 fi
15879
15880 ol_link_threads=no
15881
15882 case $ol_with_threads in auto | yes | nt)
15883
15884
15885         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
15886 if test "x$ac_cv_func__beginthread" = x""yes; then :
15887
15888 fi
15889
15890
15891         if test $ac_cv_func__beginthread = yes ; then
15892
15893 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
15894
15895                 ol_cv_nt_threads=yes
15896         fi
15897
15898
15899         if test "$ol_cv_nt_threads" = yes ; then
15900                 ol_link_threads=nt
15901                 ol_with_threads=found
15902                 ol_with_yielding_select=yes
15903
15904
15905 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
15906
15907
15908 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
15909
15910         fi
15911
15912         if test $ol_with_threads = nt ; then
15913                 as_fn_error "could not locate NT Threads" "$LINENO" 5
15914         fi
15915         ;;
15916 esac
15917
15918 case $ol_with_threads in auto | yes | posix)
15919
15920         for ac_header in pthread.h
15921 do :
15922   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15923 if test "x$ac_cv_header_pthread_h" = x""yes; then :
15924   cat >>confdefs.h <<_ACEOF
15925 #define HAVE_PTHREAD_H 1
15926 _ACEOF
15927
15928 fi
15929
15930 done
15931
15932
15933         if test $ac_cv_header_pthread_h = yes ; then
15934                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
15935 $as_echo_n "checking POSIX thread version... " >&6; }
15936 if test "${ol_cv_pthread_version+set}" = set; then :
15937   $as_echo_n "(cached) " >&6
15938 else
15939
15940         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15941 /* end confdefs.h.  */
15942
15943 #               include <pthread.h>
15944
15945 int
15946 main ()
15947 {
15948
15949                 int i = PTHREAD_CREATE_JOINABLE;
15950
15951   ;
15952   return 0;
15953 }
15954 _ACEOF
15955 if ac_fn_c_try_compile "$LINENO"; then :
15956
15957         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15958 /* end confdefs.h.  */
15959 #include <pthread.h>
15960
15961 _ACEOF
15962 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15963   $EGREP "pthread_detach" >/dev/null 2>&1; then :
15964   ol_cv_pthread_version=10
15965 else
15966   ol_cv_pthread_version=8
15967 fi
15968 rm -f conftest*
15969
15970 else
15971
15972         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15973 /* end confdefs.h.  */
15974
15975 #               include <pthread.h>
15976 #               ifdef PTHREAD_CREATE_UNDETACHED
15977                 draft7
15978 #               endif
15979
15980 _ACEOF
15981 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15982   $EGREP "draft7" >/dev/null 2>&1; then :
15983   ol_cv_pthread_version=7
15984 else
15985
15986         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15987 /* end confdefs.h.  */
15988 #include <pthread.h>
15989
15990 _ACEOF
15991 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15992   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
15993   ol_cv_pthread_version=6
15994 else
15995
15996         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15997 /* end confdefs.h.  */
15998
15999 #               include <pthread.h>
16000 #ifdef          PTHREAD_MUTEX_INITIALIZER
16001                 draft5
16002 #endif
16003
16004 _ACEOF
16005 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16006   $EGREP "draft5" >/dev/null 2>&1; then :
16007   ol_cv_pthread_version=5
16008 else
16009   ol_cv_pthread_version=4
16010 fi
16011 rm -f conftest*
16012
16013 fi
16014 rm -f conftest*
16015
16016 fi
16017 rm -f conftest*
16018
16019 fi
16020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16021
16022 fi
16023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
16024 $as_echo "$ol_cv_pthread_version" >&6; }
16025
16026
16027                 if test $ol_cv_pthread_version != 0 ; then
16028
16029 cat >>confdefs.h <<_ACEOF
16030 #define HAVE_PTHREADS $ol_cv_pthread_version
16031 _ACEOF
16032
16033                 else
16034                         as_fn_error "unknown pthread version" "$LINENO" 5
16035                 fi
16036
16037                 # consider threads found
16038                 ol_with_threads=found
16039
16040
16041         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
16042 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
16043 if test "${ol_cv_header_linux_threads+set}" = set; then :
16044   $as_echo_n "(cached) " >&6
16045 else
16046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16047 /* end confdefs.h.  */
16048 #include <pthread.h>
16049 _ACEOF
16050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16051   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
16052   ol_cv_header_linux_threads=yes
16053 else
16054   ol_cv_header_linux_threads=no
16055 fi
16056 rm -f conftest*
16057
16058
16059 fi
16060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
16061 $as_echo "$ol_cv_header_linux_threads" >&6; }
16062         if test $ol_cv_header_linux_threads = yes; then
16063
16064 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
16065
16066         fi
16067
16068
16069         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
16070 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
16071 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then :
16072   $as_echo_n "(cached) " >&6
16073 else
16074   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16075 /* end confdefs.h.  */
16076 #include <pthread.h>
16077 #ifdef _POSIX_THREAD_IS_GNU_PTH
16078         __gnu_pth__;
16079 #endif
16080
16081 _ACEOF
16082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16083   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
16084   ol_cv_header_gnu_pth_pthread_h=yes
16085 else
16086   ol_cv_header_gnu_pth_pthread_h=no
16087 fi
16088 rm -f conftest*
16089
16090
16091 fi
16092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
16093 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
16094
16095
16096                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
16097                         for ac_header in sched.h
16098 do :
16099   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
16100 if test "x$ac_cv_header_sched_h" = x""yes; then :
16101   cat >>confdefs.h <<_ACEOF
16102 #define HAVE_SCHED_H 1
16103 _ACEOF
16104
16105 fi
16106
16107 done
16108
16109                 fi
16110
16111
16112                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
16113 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
16114 if test "${ol_cv_pthread_create+set}" = set; then :
16115   $as_echo_n "(cached) " >&6
16116 else
16117
16118                         if test "$cross_compiling" = yes; then :
16119   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16120 /* end confdefs.h.  */
16121
16122 /* pthread test headers */
16123 #include <pthread.h>
16124 #if HAVE_PTHREADS < 7
16125 #include <errno.h>
16126 #endif
16127 #ifndef NULL
16128 #define NULL (void*)0
16129 #endif
16130
16131 static void *task(p)
16132         void *p;
16133 {
16134         return (void *) (p == NULL);
16135 }
16136
16137 int
16138 main ()
16139 {
16140
16141         /* pthread test function */
16142 #ifndef PTHREAD_CREATE_DETACHED
16143 #define PTHREAD_CREATE_DETACHED 1
16144 #endif
16145         pthread_t t;
16146         int status;
16147         int detach = PTHREAD_CREATE_DETACHED;
16148
16149 #if HAVE_PTHREADS > 4
16150         /* Final pthreads */
16151         pthread_attr_t attr;
16152
16153         status = pthread_attr_init(&attr);
16154         if( status ) return status;
16155
16156 #if HAVE_PTHREADS < 7
16157         status = pthread_attr_setdetachstate(&attr, &detach);
16158         if( status < 0 ) status = errno;
16159 #else
16160         status = pthread_attr_setdetachstate(&attr, detach);
16161 #endif
16162         if( status ) return status;
16163         status = pthread_create( &t, &attr, task, NULL );
16164 #if HAVE_PTHREADS < 7
16165         if( status < 0 ) status = errno;
16166 #endif
16167         if( status ) return status;
16168 #else
16169         /* Draft 4 pthreads */
16170         status = pthread_create( &t, pthread_attr_default, task, NULL );
16171         if( status ) return errno;
16172
16173         /* give thread a chance to complete */
16174         /* it should remain joinable and hence detachable */
16175         sleep( 1 );
16176
16177         status = pthread_detach( &t );
16178         if( status ) return errno;
16179 #endif
16180
16181 #ifdef HAVE_LINUX_THREADS
16182         pthread_kill_other_threads_np();
16183 #endif
16184
16185         return 0;
16186
16187   ;
16188   return 0;
16189 }
16190 _ACEOF
16191 if ac_fn_c_try_link "$LINENO"; then :
16192   ol_cv_pthread_create=yes
16193 else
16194   ol_cv_pthread_create=no
16195 fi
16196 rm -f core conftest.err conftest.$ac_objext \
16197     conftest$ac_exeext conftest.$ac_ext
16198 else
16199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16200 /* end confdefs.h.  */
16201
16202 /* pthread test headers */
16203 #include <pthread.h>
16204 #if HAVE_PTHREADS < 7
16205 #include <errno.h>
16206 #endif
16207 #ifndef NULL
16208 #define NULL (void*)0
16209 #endif
16210
16211 static void *task(p)
16212         void *p;
16213 {
16214         return (void *) (p == NULL);
16215 }
16216
16217
16218 int main(argc, argv)
16219         int argc;
16220         char **argv;
16221 {
16222
16223         /* pthread test function */
16224 #ifndef PTHREAD_CREATE_DETACHED
16225 #define PTHREAD_CREATE_DETACHED 1
16226 #endif
16227         pthread_t t;
16228         int status;
16229         int detach = PTHREAD_CREATE_DETACHED;
16230
16231 #if HAVE_PTHREADS > 4
16232         /* Final pthreads */
16233         pthread_attr_t attr;
16234
16235         status = pthread_attr_init(&attr);
16236         if( status ) return status;
16237
16238 #if HAVE_PTHREADS < 7
16239         status = pthread_attr_setdetachstate(&attr, &detach);
16240         if( status < 0 ) status = errno;
16241 #else
16242         status = pthread_attr_setdetachstate(&attr, detach);
16243 #endif
16244         if( status ) return status;
16245         status = pthread_create( &t, &attr, task, NULL );
16246 #if HAVE_PTHREADS < 7
16247         if( status < 0 ) status = errno;
16248 #endif
16249         if( status ) return status;
16250 #else
16251         /* Draft 4 pthreads */
16252         status = pthread_create( &t, pthread_attr_default, task, NULL );
16253         if( status ) return errno;
16254
16255         /* give thread a chance to complete */
16256         /* it should remain joinable and hence detachable */
16257         sleep( 1 );
16258
16259         status = pthread_detach( &t );
16260         if( status ) return errno;
16261 #endif
16262
16263 #ifdef HAVE_LINUX_THREADS
16264         pthread_kill_other_threads_np();
16265 #endif
16266
16267         return 0;
16268
16269 }
16270
16271 _ACEOF
16272 if ac_fn_c_try_run "$LINENO"; then :
16273   ol_cv_pthread_create=yes
16274 else
16275   ol_cv_pthread_create=no
16276 fi
16277 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16278   conftest.$ac_objext conftest.beam conftest.$ac_ext
16279 fi
16280
16281 fi
16282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
16283 $as_echo "$ol_cv_pthread_create" >&6; }
16284
16285                 if test $ol_cv_pthread_create != no ; then
16286                         ol_link_threads=posix
16287                         ol_link_pthreads=""
16288                 fi
16289
16290                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
16291 if test "$ol_link_threads" = no ; then
16292         # try -kthread
16293         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
16294 $as_echo_n "checking for pthread link with -kthread... " >&6; }
16295 if test "${ol_cv_pthread_kthread+set}" = set; then :
16296   $as_echo_n "(cached) " >&6
16297 else
16298
16299                 # save the flags
16300                 ol_LIBS="$LIBS"
16301                 LIBS="-kthread $LIBS"
16302
16303                 if test "$cross_compiling" = yes; then :
16304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16305 /* end confdefs.h.  */
16306
16307 /* pthread test headers */
16308 #include <pthread.h>
16309 #if HAVE_PTHREADS < 7
16310 #include <errno.h>
16311 #endif
16312 #ifndef NULL
16313 #define NULL (void*)0
16314 #endif
16315
16316 static void *task(p)
16317         void *p;
16318 {
16319         return (void *) (p == NULL);
16320 }
16321
16322 int
16323 main ()
16324 {
16325
16326         /* pthread test function */
16327 #ifndef PTHREAD_CREATE_DETACHED
16328 #define PTHREAD_CREATE_DETACHED 1
16329 #endif
16330         pthread_t t;
16331         int status;
16332         int detach = PTHREAD_CREATE_DETACHED;
16333
16334 #if HAVE_PTHREADS > 4
16335         /* Final pthreads */
16336         pthread_attr_t attr;
16337
16338         status = pthread_attr_init(&attr);
16339         if( status ) return status;
16340
16341 #if HAVE_PTHREADS < 7
16342         status = pthread_attr_setdetachstate(&attr, &detach);
16343         if( status < 0 ) status = errno;
16344 #else
16345         status = pthread_attr_setdetachstate(&attr, detach);
16346 #endif
16347         if( status ) return status;
16348         status = pthread_create( &t, &attr, task, NULL );
16349 #if HAVE_PTHREADS < 7
16350         if( status < 0 ) status = errno;
16351 #endif
16352         if( status ) return status;
16353 #else
16354         /* Draft 4 pthreads */
16355         status = pthread_create( &t, pthread_attr_default, task, NULL );
16356         if( status ) return errno;
16357
16358         /* give thread a chance to complete */
16359         /* it should remain joinable and hence detachable */
16360         sleep( 1 );
16361
16362         status = pthread_detach( &t );
16363         if( status ) return errno;
16364 #endif
16365
16366 #ifdef HAVE_LINUX_THREADS
16367         pthread_kill_other_threads_np();
16368 #endif
16369
16370         return 0;
16371
16372   ;
16373   return 0;
16374 }
16375 _ACEOF
16376 if ac_fn_c_try_link "$LINENO"; then :
16377   ol_cv_pthread_kthread=yes
16378 else
16379   ol_cv_pthread_kthread=no
16380 fi
16381 rm -f core conftest.err conftest.$ac_objext \
16382     conftest$ac_exeext conftest.$ac_ext
16383 else
16384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16385 /* end confdefs.h.  */
16386
16387 /* pthread test headers */
16388 #include <pthread.h>
16389 #if HAVE_PTHREADS < 7
16390 #include <errno.h>
16391 #endif
16392 #ifndef NULL
16393 #define NULL (void*)0
16394 #endif
16395
16396 static void *task(p)
16397         void *p;
16398 {
16399         return (void *) (p == NULL);
16400 }
16401
16402
16403 int main(argc, argv)
16404         int argc;
16405         char **argv;
16406 {
16407
16408         /* pthread test function */
16409 #ifndef PTHREAD_CREATE_DETACHED
16410 #define PTHREAD_CREATE_DETACHED 1
16411 #endif
16412         pthread_t t;
16413         int status;
16414         int detach = PTHREAD_CREATE_DETACHED;
16415
16416 #if HAVE_PTHREADS > 4
16417         /* Final pthreads */
16418         pthread_attr_t attr;
16419
16420         status = pthread_attr_init(&attr);
16421         if( status ) return status;
16422
16423 #if HAVE_PTHREADS < 7
16424         status = pthread_attr_setdetachstate(&attr, &detach);
16425         if( status < 0 ) status = errno;
16426 #else
16427         status = pthread_attr_setdetachstate(&attr, detach);
16428 #endif
16429         if( status ) return status;
16430         status = pthread_create( &t, &attr, task, NULL );
16431 #if HAVE_PTHREADS < 7
16432         if( status < 0 ) status = errno;
16433 #endif
16434         if( status ) return status;
16435 #else
16436         /* Draft 4 pthreads */
16437         status = pthread_create( &t, pthread_attr_default, task, NULL );
16438         if( status ) return errno;
16439
16440         /* give thread a chance to complete */
16441         /* it should remain joinable and hence detachable */
16442         sleep( 1 );
16443
16444         status = pthread_detach( &t );
16445         if( status ) return errno;
16446 #endif
16447
16448 #ifdef HAVE_LINUX_THREADS
16449         pthread_kill_other_threads_np();
16450 #endif
16451
16452         return 0;
16453
16454 }
16455
16456 _ACEOF
16457 if ac_fn_c_try_run "$LINENO"; then :
16458   ol_cv_pthread_kthread=yes
16459 else
16460   ol_cv_pthread_kthread=no
16461 fi
16462 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16463   conftest.$ac_objext conftest.beam conftest.$ac_ext
16464 fi
16465
16466
16467                 # restore the LIBS
16468                 LIBS="$ol_LIBS"
16469
16470 fi
16471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
16472 $as_echo "$ol_cv_pthread_kthread" >&6; }
16473
16474         if test $ol_cv_pthread_kthread = yes ; then
16475                 ol_link_pthreads="-kthread"
16476                 ol_link_threads=posix
16477         fi
16478 fi
16479
16480                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
16481 if test "$ol_link_threads" = no ; then
16482         # try -pthread
16483         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
16484 $as_echo_n "checking for pthread link with -pthread... " >&6; }
16485 if test "${ol_cv_pthread_pthread+set}" = set; then :
16486   $as_echo_n "(cached) " >&6
16487 else
16488
16489                 # save the flags
16490                 ol_LIBS="$LIBS"
16491                 LIBS="-pthread $LIBS"
16492
16493                 if test "$cross_compiling" = yes; then :
16494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16495 /* end confdefs.h.  */
16496
16497 /* pthread test headers */
16498 #include <pthread.h>
16499 #if HAVE_PTHREADS < 7
16500 #include <errno.h>
16501 #endif
16502 #ifndef NULL
16503 #define NULL (void*)0
16504 #endif
16505
16506 static void *task(p)
16507         void *p;
16508 {
16509         return (void *) (p == NULL);
16510 }
16511
16512 int
16513 main ()
16514 {
16515
16516         /* pthread test function */
16517 #ifndef PTHREAD_CREATE_DETACHED
16518 #define PTHREAD_CREATE_DETACHED 1
16519 #endif
16520         pthread_t t;
16521         int status;
16522         int detach = PTHREAD_CREATE_DETACHED;
16523
16524 #if HAVE_PTHREADS > 4
16525         /* Final pthreads */
16526         pthread_attr_t attr;
16527
16528         status = pthread_attr_init(&attr);
16529         if( status ) return status;
16530
16531 #if HAVE_PTHREADS < 7
16532         status = pthread_attr_setdetachstate(&attr, &detach);
16533         if( status < 0 ) status = errno;
16534 #else
16535         status = pthread_attr_setdetachstate(&attr, detach);
16536 #endif
16537         if( status ) return status;
16538         status = pthread_create( &t, &attr, task, NULL );
16539 #if HAVE_PTHREADS < 7
16540         if( status < 0 ) status = errno;
16541 #endif
16542         if( status ) return status;
16543 #else
16544         /* Draft 4 pthreads */
16545         status = pthread_create( &t, pthread_attr_default, task, NULL );
16546         if( status ) return errno;
16547
16548         /* give thread a chance to complete */
16549         /* it should remain joinable and hence detachable */
16550         sleep( 1 );
16551
16552         status = pthread_detach( &t );
16553         if( status ) return errno;
16554 #endif
16555
16556 #ifdef HAVE_LINUX_THREADS
16557         pthread_kill_other_threads_np();
16558 #endif
16559
16560         return 0;
16561
16562   ;
16563   return 0;
16564 }
16565 _ACEOF
16566 if ac_fn_c_try_link "$LINENO"; then :
16567   ol_cv_pthread_pthread=yes
16568 else
16569   ol_cv_pthread_pthread=no
16570 fi
16571 rm -f core conftest.err conftest.$ac_objext \
16572     conftest$ac_exeext conftest.$ac_ext
16573 else
16574   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16575 /* end confdefs.h.  */
16576
16577 /* pthread test headers */
16578 #include <pthread.h>
16579 #if HAVE_PTHREADS < 7
16580 #include <errno.h>
16581 #endif
16582 #ifndef NULL
16583 #define NULL (void*)0
16584 #endif
16585
16586 static void *task(p)
16587         void *p;
16588 {
16589         return (void *) (p == NULL);
16590 }
16591
16592
16593 int main(argc, argv)
16594         int argc;
16595         char **argv;
16596 {
16597
16598         /* pthread test function */
16599 #ifndef PTHREAD_CREATE_DETACHED
16600 #define PTHREAD_CREATE_DETACHED 1
16601 #endif
16602         pthread_t t;
16603         int status;
16604         int detach = PTHREAD_CREATE_DETACHED;
16605
16606 #if HAVE_PTHREADS > 4
16607         /* Final pthreads */
16608         pthread_attr_t attr;
16609
16610         status = pthread_attr_init(&attr);
16611         if( status ) return status;
16612
16613 #if HAVE_PTHREADS < 7
16614         status = pthread_attr_setdetachstate(&attr, &detach);
16615         if( status < 0 ) status = errno;
16616 #else
16617         status = pthread_attr_setdetachstate(&attr, detach);
16618 #endif
16619         if( status ) return status;
16620         status = pthread_create( &t, &attr, task, NULL );
16621 #if HAVE_PTHREADS < 7
16622         if( status < 0 ) status = errno;
16623 #endif
16624         if( status ) return status;
16625 #else
16626         /* Draft 4 pthreads */
16627         status = pthread_create( &t, pthread_attr_default, task, NULL );
16628         if( status ) return errno;
16629
16630         /* give thread a chance to complete */
16631         /* it should remain joinable and hence detachable */
16632         sleep( 1 );
16633
16634         status = pthread_detach( &t );
16635         if( status ) return errno;
16636 #endif
16637
16638 #ifdef HAVE_LINUX_THREADS
16639         pthread_kill_other_threads_np();
16640 #endif
16641
16642         return 0;
16643
16644 }
16645
16646 _ACEOF
16647 if ac_fn_c_try_run "$LINENO"; then :
16648   ol_cv_pthread_pthread=yes
16649 else
16650   ol_cv_pthread_pthread=no
16651 fi
16652 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16653   conftest.$ac_objext conftest.beam conftest.$ac_ext
16654 fi
16655
16656
16657                 # restore the LIBS
16658                 LIBS="$ol_LIBS"
16659
16660 fi
16661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
16662 $as_echo "$ol_cv_pthread_pthread" >&6; }
16663
16664         if test $ol_cv_pthread_pthread = yes ; then
16665                 ol_link_pthreads="-pthread"
16666                 ol_link_threads=posix
16667         fi
16668 fi
16669
16670                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
16671 if test "$ol_link_threads" = no ; then
16672         # try -pthreads
16673         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
16674 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
16675 if test "${ol_cv_pthread_pthreads+set}" = set; then :
16676   $as_echo_n "(cached) " >&6
16677 else
16678
16679                 # save the flags
16680                 ol_LIBS="$LIBS"
16681                 LIBS="-pthreads $LIBS"
16682
16683                 if test "$cross_compiling" = yes; then :
16684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16685 /* end confdefs.h.  */
16686
16687 /* pthread test headers */
16688 #include <pthread.h>
16689 #if HAVE_PTHREADS < 7
16690 #include <errno.h>
16691 #endif
16692 #ifndef NULL
16693 #define NULL (void*)0
16694 #endif
16695
16696 static void *task(p)
16697         void *p;
16698 {
16699         return (void *) (p == NULL);
16700 }
16701
16702 int
16703 main ()
16704 {
16705
16706         /* pthread test function */
16707 #ifndef PTHREAD_CREATE_DETACHED
16708 #define PTHREAD_CREATE_DETACHED 1
16709 #endif
16710         pthread_t t;
16711         int status;
16712         int detach = PTHREAD_CREATE_DETACHED;
16713
16714 #if HAVE_PTHREADS > 4
16715         /* Final pthreads */
16716         pthread_attr_t attr;
16717
16718         status = pthread_attr_init(&attr);
16719         if( status ) return status;
16720
16721 #if HAVE_PTHREADS < 7
16722         status = pthread_attr_setdetachstate(&attr, &detach);
16723         if( status < 0 ) status = errno;
16724 #else
16725         status = pthread_attr_setdetachstate(&attr, detach);
16726 #endif
16727         if( status ) return status;
16728         status = pthread_create( &t, &attr, task, NULL );
16729 #if HAVE_PTHREADS < 7
16730         if( status < 0 ) status = errno;
16731 #endif
16732         if( status ) return status;
16733 #else
16734         /* Draft 4 pthreads */
16735         status = pthread_create( &t, pthread_attr_default, task, NULL );
16736         if( status ) return errno;
16737
16738         /* give thread a chance to complete */
16739         /* it should remain joinable and hence detachable */
16740         sleep( 1 );
16741
16742         status = pthread_detach( &t );
16743         if( status ) return errno;
16744 #endif
16745
16746 #ifdef HAVE_LINUX_THREADS
16747         pthread_kill_other_threads_np();
16748 #endif
16749
16750         return 0;
16751
16752   ;
16753   return 0;
16754 }
16755 _ACEOF
16756 if ac_fn_c_try_link "$LINENO"; then :
16757   ol_cv_pthread_pthreads=yes
16758 else
16759   ol_cv_pthread_pthreads=no
16760 fi
16761 rm -f core conftest.err conftest.$ac_objext \
16762     conftest$ac_exeext conftest.$ac_ext
16763 else
16764   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16765 /* end confdefs.h.  */
16766
16767 /* pthread test headers */
16768 #include <pthread.h>
16769 #if HAVE_PTHREADS < 7
16770 #include <errno.h>
16771 #endif
16772 #ifndef NULL
16773 #define NULL (void*)0
16774 #endif
16775
16776 static void *task(p)
16777         void *p;
16778 {
16779         return (void *) (p == NULL);
16780 }
16781
16782
16783 int main(argc, argv)
16784         int argc;
16785         char **argv;
16786 {
16787
16788         /* pthread test function */
16789 #ifndef PTHREAD_CREATE_DETACHED
16790 #define PTHREAD_CREATE_DETACHED 1
16791 #endif
16792         pthread_t t;
16793         int status;
16794         int detach = PTHREAD_CREATE_DETACHED;
16795
16796 #if HAVE_PTHREADS > 4
16797         /* Final pthreads */
16798         pthread_attr_t attr;
16799
16800         status = pthread_attr_init(&attr);
16801         if( status ) return status;
16802
16803 #if HAVE_PTHREADS < 7
16804         status = pthread_attr_setdetachstate(&attr, &detach);
16805         if( status < 0 ) status = errno;
16806 #else
16807         status = pthread_attr_setdetachstate(&attr, detach);
16808 #endif
16809         if( status ) return status;
16810         status = pthread_create( &t, &attr, task, NULL );
16811 #if HAVE_PTHREADS < 7
16812         if( status < 0 ) status = errno;
16813 #endif
16814         if( status ) return status;
16815 #else
16816         /* Draft 4 pthreads */
16817         status = pthread_create( &t, pthread_attr_default, task, NULL );
16818         if( status ) return errno;
16819
16820         /* give thread a chance to complete */
16821         /* it should remain joinable and hence detachable */
16822         sleep( 1 );
16823
16824         status = pthread_detach( &t );
16825         if( status ) return errno;
16826 #endif
16827
16828 #ifdef HAVE_LINUX_THREADS
16829         pthread_kill_other_threads_np();
16830 #endif
16831
16832         return 0;
16833
16834 }
16835
16836 _ACEOF
16837 if ac_fn_c_try_run "$LINENO"; then :
16838   ol_cv_pthread_pthreads=yes
16839 else
16840   ol_cv_pthread_pthreads=no
16841 fi
16842 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16843   conftest.$ac_objext conftest.beam conftest.$ac_ext
16844 fi
16845
16846
16847                 # restore the LIBS
16848                 LIBS="$ol_LIBS"
16849
16850 fi
16851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
16852 $as_echo "$ol_cv_pthread_pthreads" >&6; }
16853
16854         if test $ol_cv_pthread_pthreads = yes ; then
16855                 ol_link_pthreads="-pthreads"
16856                 ol_link_threads=posix
16857         fi
16858 fi
16859
16860                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
16861 if test "$ol_link_threads" = no ; then
16862         # try -mthreads
16863         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
16864 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
16865 if test "${ol_cv_pthread_mthreads+set}" = set; then :
16866   $as_echo_n "(cached) " >&6
16867 else
16868
16869                 # save the flags
16870                 ol_LIBS="$LIBS"
16871                 LIBS="-mthreads $LIBS"
16872
16873                 if test "$cross_compiling" = yes; then :
16874   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16875 /* end confdefs.h.  */
16876
16877 /* pthread test headers */
16878 #include <pthread.h>
16879 #if HAVE_PTHREADS < 7
16880 #include <errno.h>
16881 #endif
16882 #ifndef NULL
16883 #define NULL (void*)0
16884 #endif
16885
16886 static void *task(p)
16887         void *p;
16888 {
16889         return (void *) (p == NULL);
16890 }
16891
16892 int
16893 main ()
16894 {
16895
16896         /* pthread test function */
16897 #ifndef PTHREAD_CREATE_DETACHED
16898 #define PTHREAD_CREATE_DETACHED 1
16899 #endif
16900         pthread_t t;
16901         int status;
16902         int detach = PTHREAD_CREATE_DETACHED;
16903
16904 #if HAVE_PTHREADS > 4
16905         /* Final pthreads */
16906         pthread_attr_t attr;
16907
16908         status = pthread_attr_init(&attr);
16909         if( status ) return status;
16910
16911 #if HAVE_PTHREADS < 7
16912         status = pthread_attr_setdetachstate(&attr, &detach);
16913         if( status < 0 ) status = errno;
16914 #else
16915         status = pthread_attr_setdetachstate(&attr, detach);
16916 #endif
16917         if( status ) return status;
16918         status = pthread_create( &t, &attr, task, NULL );
16919 #if HAVE_PTHREADS < 7
16920         if( status < 0 ) status = errno;
16921 #endif
16922         if( status ) return status;
16923 #else
16924         /* Draft 4 pthreads */
16925         status = pthread_create( &t, pthread_attr_default, task, NULL );
16926         if( status ) return errno;
16927
16928         /* give thread a chance to complete */
16929         /* it should remain joinable and hence detachable */
16930         sleep( 1 );
16931
16932         status = pthread_detach( &t );
16933         if( status ) return errno;
16934 #endif
16935
16936 #ifdef HAVE_LINUX_THREADS
16937         pthread_kill_other_threads_np();
16938 #endif
16939
16940         return 0;
16941
16942   ;
16943   return 0;
16944 }
16945 _ACEOF
16946 if ac_fn_c_try_link "$LINENO"; then :
16947   ol_cv_pthread_mthreads=yes
16948 else
16949   ol_cv_pthread_mthreads=no
16950 fi
16951 rm -f core conftest.err conftest.$ac_objext \
16952     conftest$ac_exeext conftest.$ac_ext
16953 else
16954   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16955 /* end confdefs.h.  */
16956
16957 /* pthread test headers */
16958 #include <pthread.h>
16959 #if HAVE_PTHREADS < 7
16960 #include <errno.h>
16961 #endif
16962 #ifndef NULL
16963 #define NULL (void*)0
16964 #endif
16965
16966 static void *task(p)
16967         void *p;
16968 {
16969         return (void *) (p == NULL);
16970 }
16971
16972
16973 int main(argc, argv)
16974         int argc;
16975         char **argv;
16976 {
16977
16978         /* pthread test function */
16979 #ifndef PTHREAD_CREATE_DETACHED
16980 #define PTHREAD_CREATE_DETACHED 1
16981 #endif
16982         pthread_t t;
16983         int status;
16984         int detach = PTHREAD_CREATE_DETACHED;
16985
16986 #if HAVE_PTHREADS > 4
16987         /* Final pthreads */
16988         pthread_attr_t attr;
16989
16990         status = pthread_attr_init(&attr);
16991         if( status ) return status;
16992
16993 #if HAVE_PTHREADS < 7
16994         status = pthread_attr_setdetachstate(&attr, &detach);
16995         if( status < 0 ) status = errno;
16996 #else
16997         status = pthread_attr_setdetachstate(&attr, detach);
16998 #endif
16999         if( status ) return status;
17000         status = pthread_create( &t, &attr, task, NULL );
17001 #if HAVE_PTHREADS < 7
17002         if( status < 0 ) status = errno;
17003 #endif
17004         if( status ) return status;
17005 #else
17006         /* Draft 4 pthreads */
17007         status = pthread_create( &t, pthread_attr_default, task, NULL );
17008         if( status ) return errno;
17009
17010         /* give thread a chance to complete */
17011         /* it should remain joinable and hence detachable */
17012         sleep( 1 );
17013
17014         status = pthread_detach( &t );
17015         if( status ) return errno;
17016 #endif
17017
17018 #ifdef HAVE_LINUX_THREADS
17019         pthread_kill_other_threads_np();
17020 #endif
17021
17022         return 0;
17023
17024 }
17025
17026 _ACEOF
17027 if ac_fn_c_try_run "$LINENO"; then :
17028   ol_cv_pthread_mthreads=yes
17029 else
17030   ol_cv_pthread_mthreads=no
17031 fi
17032 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17033   conftest.$ac_objext conftest.beam conftest.$ac_ext
17034 fi
17035
17036
17037                 # restore the LIBS
17038                 LIBS="$ol_LIBS"
17039
17040 fi
17041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
17042 $as_echo "$ol_cv_pthread_mthreads" >&6; }
17043
17044         if test $ol_cv_pthread_mthreads = yes ; then
17045                 ol_link_pthreads="-mthreads"
17046                 ol_link_threads=posix
17047         fi
17048 fi
17049
17050                 # Pthread try link: -thread (ol_cv_pthread_thread)
17051 if test "$ol_link_threads" = no ; then
17052         # try -thread
17053         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
17054 $as_echo_n "checking for pthread link with -thread... " >&6; }
17055 if test "${ol_cv_pthread_thread+set}" = set; then :
17056   $as_echo_n "(cached) " >&6
17057 else
17058
17059                 # save the flags
17060                 ol_LIBS="$LIBS"
17061                 LIBS="-thread $LIBS"
17062
17063                 if test "$cross_compiling" = yes; then :
17064   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17065 /* end confdefs.h.  */
17066
17067 /* pthread test headers */
17068 #include <pthread.h>
17069 #if HAVE_PTHREADS < 7
17070 #include <errno.h>
17071 #endif
17072 #ifndef NULL
17073 #define NULL (void*)0
17074 #endif
17075
17076 static void *task(p)
17077         void *p;
17078 {
17079         return (void *) (p == NULL);
17080 }
17081
17082 int
17083 main ()
17084 {
17085
17086         /* pthread test function */
17087 #ifndef PTHREAD_CREATE_DETACHED
17088 #define PTHREAD_CREATE_DETACHED 1
17089 #endif
17090         pthread_t t;
17091         int status;
17092         int detach = PTHREAD_CREATE_DETACHED;
17093
17094 #if HAVE_PTHREADS > 4
17095         /* Final pthreads */
17096         pthread_attr_t attr;
17097
17098         status = pthread_attr_init(&attr);
17099         if( status ) return status;
17100
17101 #if HAVE_PTHREADS < 7
17102         status = pthread_attr_setdetachstate(&attr, &detach);
17103         if( status < 0 ) status = errno;
17104 #else
17105         status = pthread_attr_setdetachstate(&attr, detach);
17106 #endif
17107         if( status ) return status;
17108         status = pthread_create( &t, &attr, task, NULL );
17109 #if HAVE_PTHREADS < 7
17110         if( status < 0 ) status = errno;
17111 #endif
17112         if( status ) return status;
17113 #else
17114         /* Draft 4 pthreads */
17115         status = pthread_create( &t, pthread_attr_default, task, NULL );
17116         if( status ) return errno;
17117
17118         /* give thread a chance to complete */
17119         /* it should remain joinable and hence detachable */
17120         sleep( 1 );
17121
17122         status = pthread_detach( &t );
17123         if( status ) return errno;
17124 #endif
17125
17126 #ifdef HAVE_LINUX_THREADS
17127         pthread_kill_other_threads_np();
17128 #endif
17129
17130         return 0;
17131
17132   ;
17133   return 0;
17134 }
17135 _ACEOF
17136 if ac_fn_c_try_link "$LINENO"; then :
17137   ol_cv_pthread_thread=yes
17138 else
17139   ol_cv_pthread_thread=no
17140 fi
17141 rm -f core conftest.err conftest.$ac_objext \
17142     conftest$ac_exeext conftest.$ac_ext
17143 else
17144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17145 /* end confdefs.h.  */
17146
17147 /* pthread test headers */
17148 #include <pthread.h>
17149 #if HAVE_PTHREADS < 7
17150 #include <errno.h>
17151 #endif
17152 #ifndef NULL
17153 #define NULL (void*)0
17154 #endif
17155
17156 static void *task(p)
17157         void *p;
17158 {
17159         return (void *) (p == NULL);
17160 }
17161
17162
17163 int main(argc, argv)
17164         int argc;
17165         char **argv;
17166 {
17167
17168         /* pthread test function */
17169 #ifndef PTHREAD_CREATE_DETACHED
17170 #define PTHREAD_CREATE_DETACHED 1
17171 #endif
17172         pthread_t t;
17173         int status;
17174         int detach = PTHREAD_CREATE_DETACHED;
17175
17176 #if HAVE_PTHREADS > 4
17177         /* Final pthreads */
17178         pthread_attr_t attr;
17179
17180         status = pthread_attr_init(&attr);
17181         if( status ) return status;
17182
17183 #if HAVE_PTHREADS < 7
17184         status = pthread_attr_setdetachstate(&attr, &detach);
17185         if( status < 0 ) status = errno;
17186 #else
17187         status = pthread_attr_setdetachstate(&attr, detach);
17188 #endif
17189         if( status ) return status;
17190         status = pthread_create( &t, &attr, task, NULL );
17191 #if HAVE_PTHREADS < 7
17192         if( status < 0 ) status = errno;
17193 #endif
17194         if( status ) return status;
17195 #else
17196         /* Draft 4 pthreads */
17197         status = pthread_create( &t, pthread_attr_default, task, NULL );
17198         if( status ) return errno;
17199
17200         /* give thread a chance to complete */
17201         /* it should remain joinable and hence detachable */
17202         sleep( 1 );
17203
17204         status = pthread_detach( &t );
17205         if( status ) return errno;
17206 #endif
17207
17208 #ifdef HAVE_LINUX_THREADS
17209         pthread_kill_other_threads_np();
17210 #endif
17211
17212         return 0;
17213
17214 }
17215
17216 _ACEOF
17217 if ac_fn_c_try_run "$LINENO"; then :
17218   ol_cv_pthread_thread=yes
17219 else
17220   ol_cv_pthread_thread=no
17221 fi
17222 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17223   conftest.$ac_objext conftest.beam conftest.$ac_ext
17224 fi
17225
17226
17227                 # restore the LIBS
17228                 LIBS="$ol_LIBS"
17229
17230 fi
17231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
17232 $as_echo "$ol_cv_pthread_thread" >&6; }
17233
17234         if test $ol_cv_pthread_thread = yes ; then
17235                 ol_link_pthreads="-thread"
17236                 ol_link_threads=posix
17237         fi
17238 fi
17239
17240
17241                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
17242 if test "$ol_link_threads" = no ; then
17243         # try -lpthread -lmach -lexc -lc_r
17244         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
17245 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
17246 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then :
17247   $as_echo_n "(cached) " >&6
17248 else
17249
17250                 # save the flags
17251                 ol_LIBS="$LIBS"
17252                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
17253
17254                 if test "$cross_compiling" = yes; then :
17255   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17256 /* end confdefs.h.  */
17257
17258 /* pthread test headers */
17259 #include <pthread.h>
17260 #if HAVE_PTHREADS < 7
17261 #include <errno.h>
17262 #endif
17263 #ifndef NULL
17264 #define NULL (void*)0
17265 #endif
17266
17267 static void *task(p)
17268         void *p;
17269 {
17270         return (void *) (p == NULL);
17271 }
17272
17273 int
17274 main ()
17275 {
17276
17277         /* pthread test function */
17278 #ifndef PTHREAD_CREATE_DETACHED
17279 #define PTHREAD_CREATE_DETACHED 1
17280 #endif
17281         pthread_t t;
17282         int status;
17283         int detach = PTHREAD_CREATE_DETACHED;
17284
17285 #if HAVE_PTHREADS > 4
17286         /* Final pthreads */
17287         pthread_attr_t attr;
17288
17289         status = pthread_attr_init(&attr);
17290         if( status ) return status;
17291
17292 #if HAVE_PTHREADS < 7
17293         status = pthread_attr_setdetachstate(&attr, &detach);
17294         if( status < 0 ) status = errno;
17295 #else
17296         status = pthread_attr_setdetachstate(&attr, detach);
17297 #endif
17298         if( status ) return status;
17299         status = pthread_create( &t, &attr, task, NULL );
17300 #if HAVE_PTHREADS < 7
17301         if( status < 0 ) status = errno;
17302 #endif
17303         if( status ) return status;
17304 #else
17305         /* Draft 4 pthreads */
17306         status = pthread_create( &t, pthread_attr_default, task, NULL );
17307         if( status ) return errno;
17308
17309         /* give thread a chance to complete */
17310         /* it should remain joinable and hence detachable */
17311         sleep( 1 );
17312
17313         status = pthread_detach( &t );
17314         if( status ) return errno;
17315 #endif
17316
17317 #ifdef HAVE_LINUX_THREADS
17318         pthread_kill_other_threads_np();
17319 #endif
17320
17321         return 0;
17322
17323   ;
17324   return 0;
17325 }
17326 _ACEOF
17327 if ac_fn_c_try_link "$LINENO"; then :
17328   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17329 else
17330   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17331 fi
17332 rm -f core conftest.err conftest.$ac_objext \
17333     conftest$ac_exeext conftest.$ac_ext
17334 else
17335   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17336 /* end confdefs.h.  */
17337
17338 /* pthread test headers */
17339 #include <pthread.h>
17340 #if HAVE_PTHREADS < 7
17341 #include <errno.h>
17342 #endif
17343 #ifndef NULL
17344 #define NULL (void*)0
17345 #endif
17346
17347 static void *task(p)
17348         void *p;
17349 {
17350         return (void *) (p == NULL);
17351 }
17352
17353
17354 int main(argc, argv)
17355         int argc;
17356         char **argv;
17357 {
17358
17359         /* pthread test function */
17360 #ifndef PTHREAD_CREATE_DETACHED
17361 #define PTHREAD_CREATE_DETACHED 1
17362 #endif
17363         pthread_t t;
17364         int status;
17365         int detach = PTHREAD_CREATE_DETACHED;
17366
17367 #if HAVE_PTHREADS > 4
17368         /* Final pthreads */
17369         pthread_attr_t attr;
17370
17371         status = pthread_attr_init(&attr);
17372         if( status ) return status;
17373
17374 #if HAVE_PTHREADS < 7
17375         status = pthread_attr_setdetachstate(&attr, &detach);
17376         if( status < 0 ) status = errno;
17377 #else
17378         status = pthread_attr_setdetachstate(&attr, detach);
17379 #endif
17380         if( status ) return status;
17381         status = pthread_create( &t, &attr, task, NULL );
17382 #if HAVE_PTHREADS < 7
17383         if( status < 0 ) status = errno;
17384 #endif
17385         if( status ) return status;
17386 #else
17387         /* Draft 4 pthreads */
17388         status = pthread_create( &t, pthread_attr_default, task, NULL );
17389         if( status ) return errno;
17390
17391         /* give thread a chance to complete */
17392         /* it should remain joinable and hence detachable */
17393         sleep( 1 );
17394
17395         status = pthread_detach( &t );
17396         if( status ) return errno;
17397 #endif
17398
17399 #ifdef HAVE_LINUX_THREADS
17400         pthread_kill_other_threads_np();
17401 #endif
17402
17403         return 0;
17404
17405 }
17406
17407 _ACEOF
17408 if ac_fn_c_try_run "$LINENO"; then :
17409   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17410 else
17411   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17412 fi
17413 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17414   conftest.$ac_objext conftest.beam conftest.$ac_ext
17415 fi
17416
17417
17418                 # restore the LIBS
17419                 LIBS="$ol_LIBS"
17420
17421 fi
17422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
17423 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
17424
17425         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
17426                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
17427                 ol_link_threads=posix
17428         fi
17429 fi
17430
17431                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
17432 if test "$ol_link_threads" = no ; then
17433         # try -lpthread -lmach -lexc
17434         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
17435 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
17436 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then :
17437   $as_echo_n "(cached) " >&6
17438 else
17439
17440                 # save the flags
17441                 ol_LIBS="$LIBS"
17442                 LIBS="-lpthread -lmach -lexc $LIBS"
17443
17444                 if test "$cross_compiling" = yes; then :
17445   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17446 /* end confdefs.h.  */
17447
17448 /* pthread test headers */
17449 #include <pthread.h>
17450 #if HAVE_PTHREADS < 7
17451 #include <errno.h>
17452 #endif
17453 #ifndef NULL
17454 #define NULL (void*)0
17455 #endif
17456
17457 static void *task(p)
17458         void *p;
17459 {
17460         return (void *) (p == NULL);
17461 }
17462
17463 int
17464 main ()
17465 {
17466
17467         /* pthread test function */
17468 #ifndef PTHREAD_CREATE_DETACHED
17469 #define PTHREAD_CREATE_DETACHED 1
17470 #endif
17471         pthread_t t;
17472         int status;
17473         int detach = PTHREAD_CREATE_DETACHED;
17474
17475 #if HAVE_PTHREADS > 4
17476         /* Final pthreads */
17477         pthread_attr_t attr;
17478
17479         status = pthread_attr_init(&attr);
17480         if( status ) return status;
17481
17482 #if HAVE_PTHREADS < 7
17483         status = pthread_attr_setdetachstate(&attr, &detach);
17484         if( status < 0 ) status = errno;
17485 #else
17486         status = pthread_attr_setdetachstate(&attr, detach);
17487 #endif
17488         if( status ) return status;
17489         status = pthread_create( &t, &attr, task, NULL );
17490 #if HAVE_PTHREADS < 7
17491         if( status < 0 ) status = errno;
17492 #endif
17493         if( status ) return status;
17494 #else
17495         /* Draft 4 pthreads */
17496         status = pthread_create( &t, pthread_attr_default, task, NULL );
17497         if( status ) return errno;
17498
17499         /* give thread a chance to complete */
17500         /* it should remain joinable and hence detachable */
17501         sleep( 1 );
17502
17503         status = pthread_detach( &t );
17504         if( status ) return errno;
17505 #endif
17506
17507 #ifdef HAVE_LINUX_THREADS
17508         pthread_kill_other_threads_np();
17509 #endif
17510
17511         return 0;
17512
17513   ;
17514   return 0;
17515 }
17516 _ACEOF
17517 if ac_fn_c_try_link "$LINENO"; then :
17518   ol_cv_pthread_lpthread_lmach_lexc=yes
17519 else
17520   ol_cv_pthread_lpthread_lmach_lexc=no
17521 fi
17522 rm -f core conftest.err conftest.$ac_objext \
17523     conftest$ac_exeext conftest.$ac_ext
17524 else
17525   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17526 /* end confdefs.h.  */
17527
17528 /* pthread test headers */
17529 #include <pthread.h>
17530 #if HAVE_PTHREADS < 7
17531 #include <errno.h>
17532 #endif
17533 #ifndef NULL
17534 #define NULL (void*)0
17535 #endif
17536
17537 static void *task(p)
17538         void *p;
17539 {
17540         return (void *) (p == NULL);
17541 }
17542
17543
17544 int main(argc, argv)
17545         int argc;
17546         char **argv;
17547 {
17548
17549         /* pthread test function */
17550 #ifndef PTHREAD_CREATE_DETACHED
17551 #define PTHREAD_CREATE_DETACHED 1
17552 #endif
17553         pthread_t t;
17554         int status;
17555         int detach = PTHREAD_CREATE_DETACHED;
17556
17557 #if HAVE_PTHREADS > 4
17558         /* Final pthreads */
17559         pthread_attr_t attr;
17560
17561         status = pthread_attr_init(&attr);
17562         if( status ) return status;
17563
17564 #if HAVE_PTHREADS < 7
17565         status = pthread_attr_setdetachstate(&attr, &detach);
17566         if( status < 0 ) status = errno;
17567 #else
17568         status = pthread_attr_setdetachstate(&attr, detach);
17569 #endif
17570         if( status ) return status;
17571         status = pthread_create( &t, &attr, task, NULL );
17572 #if HAVE_PTHREADS < 7
17573         if( status < 0 ) status = errno;
17574 #endif
17575         if( status ) return status;
17576 #else
17577         /* Draft 4 pthreads */
17578         status = pthread_create( &t, pthread_attr_default, task, NULL );
17579         if( status ) return errno;
17580
17581         /* give thread a chance to complete */
17582         /* it should remain joinable and hence detachable */
17583         sleep( 1 );
17584
17585         status = pthread_detach( &t );
17586         if( status ) return errno;
17587 #endif
17588
17589 #ifdef HAVE_LINUX_THREADS
17590         pthread_kill_other_threads_np();
17591 #endif
17592
17593         return 0;
17594
17595 }
17596
17597 _ACEOF
17598 if ac_fn_c_try_run "$LINENO"; then :
17599   ol_cv_pthread_lpthread_lmach_lexc=yes
17600 else
17601   ol_cv_pthread_lpthread_lmach_lexc=no
17602 fi
17603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17604   conftest.$ac_objext conftest.beam conftest.$ac_ext
17605 fi
17606
17607
17608                 # restore the LIBS
17609                 LIBS="$ol_LIBS"
17610
17611 fi
17612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
17613 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
17614
17615         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
17616                 ol_link_pthreads="-lpthread -lmach -lexc"
17617                 ol_link_threads=posix
17618         fi
17619 fi
17620
17621
17622                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
17623 if test "$ol_link_threads" = no ; then
17624         # try -lpthread -Wl,-woff,85
17625         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
17626 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
17627 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then :
17628   $as_echo_n "(cached) " >&6
17629 else
17630
17631                 # save the flags
17632                 ol_LIBS="$LIBS"
17633                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
17634
17635                 if test "$cross_compiling" = yes; then :
17636   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17637 /* end confdefs.h.  */
17638
17639 /* pthread test headers */
17640 #include <pthread.h>
17641 #if HAVE_PTHREADS < 7
17642 #include <errno.h>
17643 #endif
17644 #ifndef NULL
17645 #define NULL (void*)0
17646 #endif
17647
17648 static void *task(p)
17649         void *p;
17650 {
17651         return (void *) (p == NULL);
17652 }
17653
17654 int
17655 main ()
17656 {
17657
17658         /* pthread test function */
17659 #ifndef PTHREAD_CREATE_DETACHED
17660 #define PTHREAD_CREATE_DETACHED 1
17661 #endif
17662         pthread_t t;
17663         int status;
17664         int detach = PTHREAD_CREATE_DETACHED;
17665
17666 #if HAVE_PTHREADS > 4
17667         /* Final pthreads */
17668         pthread_attr_t attr;
17669
17670         status = pthread_attr_init(&attr);
17671         if( status ) return status;
17672
17673 #if HAVE_PTHREADS < 7
17674         status = pthread_attr_setdetachstate(&attr, &detach);
17675         if( status < 0 ) status = errno;
17676 #else
17677         status = pthread_attr_setdetachstate(&attr, detach);
17678 #endif
17679         if( status ) return status;
17680         status = pthread_create( &t, &attr, task, NULL );
17681 #if HAVE_PTHREADS < 7
17682         if( status < 0 ) status = errno;
17683 #endif
17684         if( status ) return status;
17685 #else
17686         /* Draft 4 pthreads */
17687         status = pthread_create( &t, pthread_attr_default, task, NULL );
17688         if( status ) return errno;
17689
17690         /* give thread a chance to complete */
17691         /* it should remain joinable and hence detachable */
17692         sleep( 1 );
17693
17694         status = pthread_detach( &t );
17695         if( status ) return errno;
17696 #endif
17697
17698 #ifdef HAVE_LINUX_THREADS
17699         pthread_kill_other_threads_np();
17700 #endif
17701
17702         return 0;
17703
17704   ;
17705   return 0;
17706 }
17707 _ACEOF
17708 if ac_fn_c_try_link "$LINENO"; then :
17709   ol_cv_pthread_lib_lpthread_woff=yes
17710 else
17711   ol_cv_pthread_lib_lpthread_woff=no
17712 fi
17713 rm -f core conftest.err conftest.$ac_objext \
17714     conftest$ac_exeext conftest.$ac_ext
17715 else
17716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17717 /* end confdefs.h.  */
17718
17719 /* pthread test headers */
17720 #include <pthread.h>
17721 #if HAVE_PTHREADS < 7
17722 #include <errno.h>
17723 #endif
17724 #ifndef NULL
17725 #define NULL (void*)0
17726 #endif
17727
17728 static void *task(p)
17729         void *p;
17730 {
17731         return (void *) (p == NULL);
17732 }
17733
17734
17735 int main(argc, argv)
17736         int argc;
17737         char **argv;
17738 {
17739
17740         /* pthread test function */
17741 #ifndef PTHREAD_CREATE_DETACHED
17742 #define PTHREAD_CREATE_DETACHED 1
17743 #endif
17744         pthread_t t;
17745         int status;
17746         int detach = PTHREAD_CREATE_DETACHED;
17747
17748 #if HAVE_PTHREADS > 4
17749         /* Final pthreads */
17750         pthread_attr_t attr;
17751
17752         status = pthread_attr_init(&attr);
17753         if( status ) return status;
17754
17755 #if HAVE_PTHREADS < 7
17756         status = pthread_attr_setdetachstate(&attr, &detach);
17757         if( status < 0 ) status = errno;
17758 #else
17759         status = pthread_attr_setdetachstate(&attr, detach);
17760 #endif
17761         if( status ) return status;
17762         status = pthread_create( &t, &attr, task, NULL );
17763 #if HAVE_PTHREADS < 7
17764         if( status < 0 ) status = errno;
17765 #endif
17766         if( status ) return status;
17767 #else
17768         /* Draft 4 pthreads */
17769         status = pthread_create( &t, pthread_attr_default, task, NULL );
17770         if( status ) return errno;
17771
17772         /* give thread a chance to complete */
17773         /* it should remain joinable and hence detachable */
17774         sleep( 1 );
17775
17776         status = pthread_detach( &t );
17777         if( status ) return errno;
17778 #endif
17779
17780 #ifdef HAVE_LINUX_THREADS
17781         pthread_kill_other_threads_np();
17782 #endif
17783
17784         return 0;
17785
17786 }
17787
17788 _ACEOF
17789 if ac_fn_c_try_run "$LINENO"; then :
17790   ol_cv_pthread_lib_lpthread_woff=yes
17791 else
17792   ol_cv_pthread_lib_lpthread_woff=no
17793 fi
17794 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17795   conftest.$ac_objext conftest.beam conftest.$ac_ext
17796 fi
17797
17798
17799                 # restore the LIBS
17800                 LIBS="$ol_LIBS"
17801
17802 fi
17803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
17804 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
17805
17806         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
17807                 ol_link_pthreads="-lpthread -Wl,-woff,85"
17808                 ol_link_threads=posix
17809         fi
17810 fi
17811
17812
17813                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
17814 if test "$ol_link_threads" = no ; then
17815         # try -lpthread
17816         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
17817 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
17818 if test "${ol_cv_pthread_lpthread+set}" = set; then :
17819   $as_echo_n "(cached) " >&6
17820 else
17821
17822                 # save the flags
17823                 ol_LIBS="$LIBS"
17824                 LIBS="-lpthread $LIBS"
17825
17826                 if test "$cross_compiling" = yes; then :
17827   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17828 /* end confdefs.h.  */
17829
17830 /* pthread test headers */
17831 #include <pthread.h>
17832 #if HAVE_PTHREADS < 7
17833 #include <errno.h>
17834 #endif
17835 #ifndef NULL
17836 #define NULL (void*)0
17837 #endif
17838
17839 static void *task(p)
17840         void *p;
17841 {
17842         return (void *) (p == NULL);
17843 }
17844
17845 int
17846 main ()
17847 {
17848
17849         /* pthread test function */
17850 #ifndef PTHREAD_CREATE_DETACHED
17851 #define PTHREAD_CREATE_DETACHED 1
17852 #endif
17853         pthread_t t;
17854         int status;
17855         int detach = PTHREAD_CREATE_DETACHED;
17856
17857 #if HAVE_PTHREADS > 4
17858         /* Final pthreads */
17859         pthread_attr_t attr;
17860
17861         status = pthread_attr_init(&attr);
17862         if( status ) return status;
17863
17864 #if HAVE_PTHREADS < 7
17865         status = pthread_attr_setdetachstate(&attr, &detach);
17866         if( status < 0 ) status = errno;
17867 #else
17868         status = pthread_attr_setdetachstate(&attr, detach);
17869 #endif
17870         if( status ) return status;
17871         status = pthread_create( &t, &attr, task, NULL );
17872 #if HAVE_PTHREADS < 7
17873         if( status < 0 ) status = errno;
17874 #endif
17875         if( status ) return status;
17876 #else
17877         /* Draft 4 pthreads */
17878         status = pthread_create( &t, pthread_attr_default, task, NULL );
17879         if( status ) return errno;
17880
17881         /* give thread a chance to complete */
17882         /* it should remain joinable and hence detachable */
17883         sleep( 1 );
17884
17885         status = pthread_detach( &t );
17886         if( status ) return errno;
17887 #endif
17888
17889 #ifdef HAVE_LINUX_THREADS
17890         pthread_kill_other_threads_np();
17891 #endif
17892
17893         return 0;
17894
17895   ;
17896   return 0;
17897 }
17898 _ACEOF
17899 if ac_fn_c_try_link "$LINENO"; then :
17900   ol_cv_pthread_lpthread=yes
17901 else
17902   ol_cv_pthread_lpthread=no
17903 fi
17904 rm -f core conftest.err conftest.$ac_objext \
17905     conftest$ac_exeext conftest.$ac_ext
17906 else
17907   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17908 /* end confdefs.h.  */
17909
17910 /* pthread test headers */
17911 #include <pthread.h>
17912 #if HAVE_PTHREADS < 7
17913 #include <errno.h>
17914 #endif
17915 #ifndef NULL
17916 #define NULL (void*)0
17917 #endif
17918
17919 static void *task(p)
17920         void *p;
17921 {
17922         return (void *) (p == NULL);
17923 }
17924
17925
17926 int main(argc, argv)
17927         int argc;
17928         char **argv;
17929 {
17930
17931         /* pthread test function */
17932 #ifndef PTHREAD_CREATE_DETACHED
17933 #define PTHREAD_CREATE_DETACHED 1
17934 #endif
17935         pthread_t t;
17936         int status;
17937         int detach = PTHREAD_CREATE_DETACHED;
17938
17939 #if HAVE_PTHREADS > 4
17940         /* Final pthreads */
17941         pthread_attr_t attr;
17942
17943         status = pthread_attr_init(&attr);
17944         if( status ) return status;
17945
17946 #if HAVE_PTHREADS < 7
17947         status = pthread_attr_setdetachstate(&attr, &detach);
17948         if( status < 0 ) status = errno;
17949 #else
17950         status = pthread_attr_setdetachstate(&attr, detach);
17951 #endif
17952         if( status ) return status;
17953         status = pthread_create( &t, &attr, task, NULL );
17954 #if HAVE_PTHREADS < 7
17955         if( status < 0 ) status = errno;
17956 #endif
17957         if( status ) return status;
17958 #else
17959         /* Draft 4 pthreads */
17960         status = pthread_create( &t, pthread_attr_default, task, NULL );
17961         if( status ) return errno;
17962
17963         /* give thread a chance to complete */
17964         /* it should remain joinable and hence detachable */
17965         sleep( 1 );
17966
17967         status = pthread_detach( &t );
17968         if( status ) return errno;
17969 #endif
17970
17971 #ifdef HAVE_LINUX_THREADS
17972         pthread_kill_other_threads_np();
17973 #endif
17974
17975         return 0;
17976
17977 }
17978
17979 _ACEOF
17980 if ac_fn_c_try_run "$LINENO"; then :
17981   ol_cv_pthread_lpthread=yes
17982 else
17983   ol_cv_pthread_lpthread=no
17984 fi
17985 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17986   conftest.$ac_objext conftest.beam conftest.$ac_ext
17987 fi
17988
17989
17990                 # restore the LIBS
17991                 LIBS="$ol_LIBS"
17992
17993 fi
17994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
17995 $as_echo "$ol_cv_pthread_lpthread" >&6; }
17996
17997         if test $ol_cv_pthread_lpthread = yes ; then
17998                 ol_link_pthreads="-lpthread"
17999                 ol_link_threads=posix
18000         fi
18001 fi
18002
18003                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
18004 if test "$ol_link_threads" = no ; then
18005         # try -lc_r
18006         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
18007 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
18008 if test "${ol_cv_pthread_lc_r+set}" = set; then :
18009   $as_echo_n "(cached) " >&6
18010 else
18011
18012                 # save the flags
18013                 ol_LIBS="$LIBS"
18014                 LIBS="-lc_r $LIBS"
18015
18016                 if test "$cross_compiling" = yes; then :
18017   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18018 /* end confdefs.h.  */
18019
18020 /* pthread test headers */
18021 #include <pthread.h>
18022 #if HAVE_PTHREADS < 7
18023 #include <errno.h>
18024 #endif
18025 #ifndef NULL
18026 #define NULL (void*)0
18027 #endif
18028
18029 static void *task(p)
18030         void *p;
18031 {
18032         return (void *) (p == NULL);
18033 }
18034
18035 int
18036 main ()
18037 {
18038
18039         /* pthread test function */
18040 #ifndef PTHREAD_CREATE_DETACHED
18041 #define PTHREAD_CREATE_DETACHED 1
18042 #endif
18043         pthread_t t;
18044         int status;
18045         int detach = PTHREAD_CREATE_DETACHED;
18046
18047 #if HAVE_PTHREADS > 4
18048         /* Final pthreads */
18049         pthread_attr_t attr;
18050
18051         status = pthread_attr_init(&attr);
18052         if( status ) return status;
18053
18054 #if HAVE_PTHREADS < 7
18055         status = pthread_attr_setdetachstate(&attr, &detach);
18056         if( status < 0 ) status = errno;
18057 #else
18058         status = pthread_attr_setdetachstate(&attr, detach);
18059 #endif
18060         if( status ) return status;
18061         status = pthread_create( &t, &attr, task, NULL );
18062 #if HAVE_PTHREADS < 7
18063         if( status < 0 ) status = errno;
18064 #endif
18065         if( status ) return status;
18066 #else
18067         /* Draft 4 pthreads */
18068         status = pthread_create( &t, pthread_attr_default, task, NULL );
18069         if( status ) return errno;
18070
18071         /* give thread a chance to complete */
18072         /* it should remain joinable and hence detachable */
18073         sleep( 1 );
18074
18075         status = pthread_detach( &t );
18076         if( status ) return errno;
18077 #endif
18078
18079 #ifdef HAVE_LINUX_THREADS
18080         pthread_kill_other_threads_np();
18081 #endif
18082
18083         return 0;
18084
18085   ;
18086   return 0;
18087 }
18088 _ACEOF
18089 if ac_fn_c_try_link "$LINENO"; then :
18090   ol_cv_pthread_lc_r=yes
18091 else
18092   ol_cv_pthread_lc_r=no
18093 fi
18094 rm -f core conftest.err conftest.$ac_objext \
18095     conftest$ac_exeext conftest.$ac_ext
18096 else
18097   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18098 /* end confdefs.h.  */
18099
18100 /* pthread test headers */
18101 #include <pthread.h>
18102 #if HAVE_PTHREADS < 7
18103 #include <errno.h>
18104 #endif
18105 #ifndef NULL
18106 #define NULL (void*)0
18107 #endif
18108
18109 static void *task(p)
18110         void *p;
18111 {
18112         return (void *) (p == NULL);
18113 }
18114
18115
18116 int main(argc, argv)
18117         int argc;
18118         char **argv;
18119 {
18120
18121         /* pthread test function */
18122 #ifndef PTHREAD_CREATE_DETACHED
18123 #define PTHREAD_CREATE_DETACHED 1
18124 #endif
18125         pthread_t t;
18126         int status;
18127         int detach = PTHREAD_CREATE_DETACHED;
18128
18129 #if HAVE_PTHREADS > 4
18130         /* Final pthreads */
18131         pthread_attr_t attr;
18132
18133         status = pthread_attr_init(&attr);
18134         if( status ) return status;
18135
18136 #if HAVE_PTHREADS < 7
18137         status = pthread_attr_setdetachstate(&attr, &detach);
18138         if( status < 0 ) status = errno;
18139 #else
18140         status = pthread_attr_setdetachstate(&attr, detach);
18141 #endif
18142         if( status ) return status;
18143         status = pthread_create( &t, &attr, task, NULL );
18144 #if HAVE_PTHREADS < 7
18145         if( status < 0 ) status = errno;
18146 #endif
18147         if( status ) return status;
18148 #else
18149         /* Draft 4 pthreads */
18150         status = pthread_create( &t, pthread_attr_default, task, NULL );
18151         if( status ) return errno;
18152
18153         /* give thread a chance to complete */
18154         /* it should remain joinable and hence detachable */
18155         sleep( 1 );
18156
18157         status = pthread_detach( &t );
18158         if( status ) return errno;
18159 #endif
18160
18161 #ifdef HAVE_LINUX_THREADS
18162         pthread_kill_other_threads_np();
18163 #endif
18164
18165         return 0;
18166
18167 }
18168
18169 _ACEOF
18170 if ac_fn_c_try_run "$LINENO"; then :
18171   ol_cv_pthread_lc_r=yes
18172 else
18173   ol_cv_pthread_lc_r=no
18174 fi
18175 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18176   conftest.$ac_objext conftest.beam conftest.$ac_ext
18177 fi
18178
18179
18180                 # restore the LIBS
18181                 LIBS="$ol_LIBS"
18182
18183 fi
18184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
18185 $as_echo "$ol_cv_pthread_lc_r" >&6; }
18186
18187         if test $ol_cv_pthread_lc_r = yes ; then
18188                 ol_link_pthreads="-lc_r"
18189                 ol_link_threads=posix
18190         fi
18191 fi
18192
18193
18194                 # Pthread try link: -threads (ol_cv_pthread_threads)
18195 if test "$ol_link_threads" = no ; then
18196         # try -threads
18197         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
18198 $as_echo_n "checking for pthread link with -threads... " >&6; }
18199 if test "${ol_cv_pthread_threads+set}" = set; then :
18200   $as_echo_n "(cached) " >&6
18201 else
18202
18203                 # save the flags
18204                 ol_LIBS="$LIBS"
18205                 LIBS="-threads $LIBS"
18206
18207                 if test "$cross_compiling" = yes; then :
18208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18209 /* end confdefs.h.  */
18210
18211 /* pthread test headers */
18212 #include <pthread.h>
18213 #if HAVE_PTHREADS < 7
18214 #include <errno.h>
18215 #endif
18216 #ifndef NULL
18217 #define NULL (void*)0
18218 #endif
18219
18220 static void *task(p)
18221         void *p;
18222 {
18223         return (void *) (p == NULL);
18224 }
18225
18226 int
18227 main ()
18228 {
18229
18230         /* pthread test function */
18231 #ifndef PTHREAD_CREATE_DETACHED
18232 #define PTHREAD_CREATE_DETACHED 1
18233 #endif
18234         pthread_t t;
18235         int status;
18236         int detach = PTHREAD_CREATE_DETACHED;
18237
18238 #if HAVE_PTHREADS > 4
18239         /* Final pthreads */
18240         pthread_attr_t attr;
18241
18242         status = pthread_attr_init(&attr);
18243         if( status ) return status;
18244
18245 #if HAVE_PTHREADS < 7
18246         status = pthread_attr_setdetachstate(&attr, &detach);
18247         if( status < 0 ) status = errno;
18248 #else
18249         status = pthread_attr_setdetachstate(&attr, detach);
18250 #endif
18251         if( status ) return status;
18252         status = pthread_create( &t, &attr, task, NULL );
18253 #if HAVE_PTHREADS < 7
18254         if( status < 0 ) status = errno;
18255 #endif
18256         if( status ) return status;
18257 #else
18258         /* Draft 4 pthreads */
18259         status = pthread_create( &t, pthread_attr_default, task, NULL );
18260         if( status ) return errno;
18261
18262         /* give thread a chance to complete */
18263         /* it should remain joinable and hence detachable */
18264         sleep( 1 );
18265
18266         status = pthread_detach( &t );
18267         if( status ) return errno;
18268 #endif
18269
18270 #ifdef HAVE_LINUX_THREADS
18271         pthread_kill_other_threads_np();
18272 #endif
18273
18274         return 0;
18275
18276   ;
18277   return 0;
18278 }
18279 _ACEOF
18280 if ac_fn_c_try_link "$LINENO"; then :
18281   ol_cv_pthread_threads=yes
18282 else
18283   ol_cv_pthread_threads=no
18284 fi
18285 rm -f core conftest.err conftest.$ac_objext \
18286     conftest$ac_exeext conftest.$ac_ext
18287 else
18288   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18289 /* end confdefs.h.  */
18290
18291 /* pthread test headers */
18292 #include <pthread.h>
18293 #if HAVE_PTHREADS < 7
18294 #include <errno.h>
18295 #endif
18296 #ifndef NULL
18297 #define NULL (void*)0
18298 #endif
18299
18300 static void *task(p)
18301         void *p;
18302 {
18303         return (void *) (p == NULL);
18304 }
18305
18306
18307 int main(argc, argv)
18308         int argc;
18309         char **argv;
18310 {
18311
18312         /* pthread test function */
18313 #ifndef PTHREAD_CREATE_DETACHED
18314 #define PTHREAD_CREATE_DETACHED 1
18315 #endif
18316         pthread_t t;
18317         int status;
18318         int detach = PTHREAD_CREATE_DETACHED;
18319
18320 #if HAVE_PTHREADS > 4
18321         /* Final pthreads */
18322         pthread_attr_t attr;
18323
18324         status = pthread_attr_init(&attr);
18325         if( status ) return status;
18326
18327 #if HAVE_PTHREADS < 7
18328         status = pthread_attr_setdetachstate(&attr, &detach);
18329         if( status < 0 ) status = errno;
18330 #else
18331         status = pthread_attr_setdetachstate(&attr, detach);
18332 #endif
18333         if( status ) return status;
18334         status = pthread_create( &t, &attr, task, NULL );
18335 #if HAVE_PTHREADS < 7
18336         if( status < 0 ) status = errno;
18337 #endif
18338         if( status ) return status;
18339 #else
18340         /* Draft 4 pthreads */
18341         status = pthread_create( &t, pthread_attr_default, task, NULL );
18342         if( status ) return errno;
18343
18344         /* give thread a chance to complete */
18345         /* it should remain joinable and hence detachable */
18346         sleep( 1 );
18347
18348         status = pthread_detach( &t );
18349         if( status ) return errno;
18350 #endif
18351
18352 #ifdef HAVE_LINUX_THREADS
18353         pthread_kill_other_threads_np();
18354 #endif
18355
18356         return 0;
18357
18358 }
18359
18360 _ACEOF
18361 if ac_fn_c_try_run "$LINENO"; then :
18362   ol_cv_pthread_threads=yes
18363 else
18364   ol_cv_pthread_threads=no
18365 fi
18366 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18367   conftest.$ac_objext conftest.beam conftest.$ac_ext
18368 fi
18369
18370
18371                 # restore the LIBS
18372                 LIBS="$ol_LIBS"
18373
18374 fi
18375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
18376 $as_echo "$ol_cv_pthread_threads" >&6; }
18377
18378         if test $ol_cv_pthread_threads = yes ; then
18379                 ol_link_pthreads="-threads"
18380                 ol_link_threads=posix
18381         fi
18382 fi
18383
18384
18385                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
18386 if test "$ol_link_threads" = no ; then
18387         # try -lpthreads -lmach -lexc -lc_r
18388         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
18389 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
18390 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then :
18391   $as_echo_n "(cached) " >&6
18392 else
18393
18394                 # save the flags
18395                 ol_LIBS="$LIBS"
18396                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
18397
18398                 if test "$cross_compiling" = yes; then :
18399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18400 /* end confdefs.h.  */
18401
18402 /* pthread test headers */
18403 #include <pthread.h>
18404 #if HAVE_PTHREADS < 7
18405 #include <errno.h>
18406 #endif
18407 #ifndef NULL
18408 #define NULL (void*)0
18409 #endif
18410
18411 static void *task(p)
18412         void *p;
18413 {
18414         return (void *) (p == NULL);
18415 }
18416
18417 int
18418 main ()
18419 {
18420
18421         /* pthread test function */
18422 #ifndef PTHREAD_CREATE_DETACHED
18423 #define PTHREAD_CREATE_DETACHED 1
18424 #endif
18425         pthread_t t;
18426         int status;
18427         int detach = PTHREAD_CREATE_DETACHED;
18428
18429 #if HAVE_PTHREADS > 4
18430         /* Final pthreads */
18431         pthread_attr_t attr;
18432
18433         status = pthread_attr_init(&attr);
18434         if( status ) return status;
18435
18436 #if HAVE_PTHREADS < 7
18437         status = pthread_attr_setdetachstate(&attr, &detach);
18438         if( status < 0 ) status = errno;
18439 #else
18440         status = pthread_attr_setdetachstate(&attr, detach);
18441 #endif
18442         if( status ) return status;
18443         status = pthread_create( &t, &attr, task, NULL );
18444 #if HAVE_PTHREADS < 7
18445         if( status < 0 ) status = errno;
18446 #endif
18447         if( status ) return status;
18448 #else
18449         /* Draft 4 pthreads */
18450         status = pthread_create( &t, pthread_attr_default, task, NULL );
18451         if( status ) return errno;
18452
18453         /* give thread a chance to complete */
18454         /* it should remain joinable and hence detachable */
18455         sleep( 1 );
18456
18457         status = pthread_detach( &t );
18458         if( status ) return errno;
18459 #endif
18460
18461 #ifdef HAVE_LINUX_THREADS
18462         pthread_kill_other_threads_np();
18463 #endif
18464
18465         return 0;
18466
18467   ;
18468   return 0;
18469 }
18470 _ACEOF
18471 if ac_fn_c_try_link "$LINENO"; then :
18472   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18473 else
18474   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18475 fi
18476 rm -f core conftest.err conftest.$ac_objext \
18477     conftest$ac_exeext conftest.$ac_ext
18478 else
18479   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18480 /* end confdefs.h.  */
18481
18482 /* pthread test headers */
18483 #include <pthread.h>
18484 #if HAVE_PTHREADS < 7
18485 #include <errno.h>
18486 #endif
18487 #ifndef NULL
18488 #define NULL (void*)0
18489 #endif
18490
18491 static void *task(p)
18492         void *p;
18493 {
18494         return (void *) (p == NULL);
18495 }
18496
18497
18498 int main(argc, argv)
18499         int argc;
18500         char **argv;
18501 {
18502
18503         /* pthread test function */
18504 #ifndef PTHREAD_CREATE_DETACHED
18505 #define PTHREAD_CREATE_DETACHED 1
18506 #endif
18507         pthread_t t;
18508         int status;
18509         int detach = PTHREAD_CREATE_DETACHED;
18510
18511 #if HAVE_PTHREADS > 4
18512         /* Final pthreads */
18513         pthread_attr_t attr;
18514
18515         status = pthread_attr_init(&attr);
18516         if( status ) return status;
18517
18518 #if HAVE_PTHREADS < 7
18519         status = pthread_attr_setdetachstate(&attr, &detach);
18520         if( status < 0 ) status = errno;
18521 #else
18522         status = pthread_attr_setdetachstate(&attr, detach);
18523 #endif
18524         if( status ) return status;
18525         status = pthread_create( &t, &attr, task, NULL );
18526 #if HAVE_PTHREADS < 7
18527         if( status < 0 ) status = errno;
18528 #endif
18529         if( status ) return status;
18530 #else
18531         /* Draft 4 pthreads */
18532         status = pthread_create( &t, pthread_attr_default, task, NULL );
18533         if( status ) return errno;
18534
18535         /* give thread a chance to complete */
18536         /* it should remain joinable and hence detachable */
18537         sleep( 1 );
18538
18539         status = pthread_detach( &t );
18540         if( status ) return errno;
18541 #endif
18542
18543 #ifdef HAVE_LINUX_THREADS
18544         pthread_kill_other_threads_np();
18545 #endif
18546
18547         return 0;
18548
18549 }
18550
18551 _ACEOF
18552 if ac_fn_c_try_run "$LINENO"; then :
18553   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18554 else
18555   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18556 fi
18557 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18558   conftest.$ac_objext conftest.beam conftest.$ac_ext
18559 fi
18560
18561
18562                 # restore the LIBS
18563                 LIBS="$ol_LIBS"
18564
18565 fi
18566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
18567 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
18568
18569         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
18570                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
18571                 ol_link_threads=posix
18572         fi
18573 fi
18574
18575                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
18576 if test "$ol_link_threads" = no ; then
18577         # try -lpthreads -lmach -lexc
18578         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
18579 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
18580 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then :
18581   $as_echo_n "(cached) " >&6
18582 else
18583
18584                 # save the flags
18585                 ol_LIBS="$LIBS"
18586                 LIBS="-lpthreads -lmach -lexc $LIBS"
18587
18588                 if test "$cross_compiling" = yes; then :
18589   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18590 /* end confdefs.h.  */
18591
18592 /* pthread test headers */
18593 #include <pthread.h>
18594 #if HAVE_PTHREADS < 7
18595 #include <errno.h>
18596 #endif
18597 #ifndef NULL
18598 #define NULL (void*)0
18599 #endif
18600
18601 static void *task(p)
18602         void *p;
18603 {
18604         return (void *) (p == NULL);
18605 }
18606
18607 int
18608 main ()
18609 {
18610
18611         /* pthread test function */
18612 #ifndef PTHREAD_CREATE_DETACHED
18613 #define PTHREAD_CREATE_DETACHED 1
18614 #endif
18615         pthread_t t;
18616         int status;
18617         int detach = PTHREAD_CREATE_DETACHED;
18618
18619 #if HAVE_PTHREADS > 4
18620         /* Final pthreads */
18621         pthread_attr_t attr;
18622
18623         status = pthread_attr_init(&attr);
18624         if( status ) return status;
18625
18626 #if HAVE_PTHREADS < 7
18627         status = pthread_attr_setdetachstate(&attr, &detach);
18628         if( status < 0 ) status = errno;
18629 #else
18630         status = pthread_attr_setdetachstate(&attr, detach);
18631 #endif
18632         if( status ) return status;
18633         status = pthread_create( &t, &attr, task, NULL );
18634 #if HAVE_PTHREADS < 7
18635         if( status < 0 ) status = errno;
18636 #endif
18637         if( status ) return status;
18638 #else
18639         /* Draft 4 pthreads */
18640         status = pthread_create( &t, pthread_attr_default, task, NULL );
18641         if( status ) return errno;
18642
18643         /* give thread a chance to complete */
18644         /* it should remain joinable and hence detachable */
18645         sleep( 1 );
18646
18647         status = pthread_detach( &t );
18648         if( status ) return errno;
18649 #endif
18650
18651 #ifdef HAVE_LINUX_THREADS
18652         pthread_kill_other_threads_np();
18653 #endif
18654
18655         return 0;
18656
18657   ;
18658   return 0;
18659 }
18660 _ACEOF
18661 if ac_fn_c_try_link "$LINENO"; then :
18662   ol_cv_pthread_lpthreads_lmach_lexc=yes
18663 else
18664   ol_cv_pthread_lpthreads_lmach_lexc=no
18665 fi
18666 rm -f core conftest.err conftest.$ac_objext \
18667     conftest$ac_exeext conftest.$ac_ext
18668 else
18669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18670 /* end confdefs.h.  */
18671
18672 /* pthread test headers */
18673 #include <pthread.h>
18674 #if HAVE_PTHREADS < 7
18675 #include <errno.h>
18676 #endif
18677 #ifndef NULL
18678 #define NULL (void*)0
18679 #endif
18680
18681 static void *task(p)
18682         void *p;
18683 {
18684         return (void *) (p == NULL);
18685 }
18686
18687
18688 int main(argc, argv)
18689         int argc;
18690         char **argv;
18691 {
18692
18693         /* pthread test function */
18694 #ifndef PTHREAD_CREATE_DETACHED
18695 #define PTHREAD_CREATE_DETACHED 1
18696 #endif
18697         pthread_t t;
18698         int status;
18699         int detach = PTHREAD_CREATE_DETACHED;
18700
18701 #if HAVE_PTHREADS > 4
18702         /* Final pthreads */
18703         pthread_attr_t attr;
18704
18705         status = pthread_attr_init(&attr);
18706         if( status ) return status;
18707
18708 #if HAVE_PTHREADS < 7
18709         status = pthread_attr_setdetachstate(&attr, &detach);
18710         if( status < 0 ) status = errno;
18711 #else
18712         status = pthread_attr_setdetachstate(&attr, detach);
18713 #endif
18714         if( status ) return status;
18715         status = pthread_create( &t, &attr, task, NULL );
18716 #if HAVE_PTHREADS < 7
18717         if( status < 0 ) status = errno;
18718 #endif
18719         if( status ) return status;
18720 #else
18721         /* Draft 4 pthreads */
18722         status = pthread_create( &t, pthread_attr_default, task, NULL );
18723         if( status ) return errno;
18724
18725         /* give thread a chance to complete */
18726         /* it should remain joinable and hence detachable */
18727         sleep( 1 );
18728
18729         status = pthread_detach( &t );
18730         if( status ) return errno;
18731 #endif
18732
18733 #ifdef HAVE_LINUX_THREADS
18734         pthread_kill_other_threads_np();
18735 #endif
18736
18737         return 0;
18738
18739 }
18740
18741 _ACEOF
18742 if ac_fn_c_try_run "$LINENO"; then :
18743   ol_cv_pthread_lpthreads_lmach_lexc=yes
18744 else
18745   ol_cv_pthread_lpthreads_lmach_lexc=no
18746 fi
18747 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18748   conftest.$ac_objext conftest.beam conftest.$ac_ext
18749 fi
18750
18751
18752                 # restore the LIBS
18753                 LIBS="$ol_LIBS"
18754
18755 fi
18756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
18757 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
18758
18759         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
18760                 ol_link_pthreads="-lpthreads -lmach -lexc"
18761                 ol_link_threads=posix
18762         fi
18763 fi
18764
18765                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
18766 if test "$ol_link_threads" = no ; then
18767         # try -lpthreads -lexc
18768         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
18769 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
18770 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then :
18771   $as_echo_n "(cached) " >&6
18772 else
18773
18774                 # save the flags
18775                 ol_LIBS="$LIBS"
18776                 LIBS="-lpthreads -lexc $LIBS"
18777
18778                 if test "$cross_compiling" = yes; then :
18779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18780 /* end confdefs.h.  */
18781
18782 /* pthread test headers */
18783 #include <pthread.h>
18784 #if HAVE_PTHREADS < 7
18785 #include <errno.h>
18786 #endif
18787 #ifndef NULL
18788 #define NULL (void*)0
18789 #endif
18790
18791 static void *task(p)
18792         void *p;
18793 {
18794         return (void *) (p == NULL);
18795 }
18796
18797 int
18798 main ()
18799 {
18800
18801         /* pthread test function */
18802 #ifndef PTHREAD_CREATE_DETACHED
18803 #define PTHREAD_CREATE_DETACHED 1
18804 #endif
18805         pthread_t t;
18806         int status;
18807         int detach = PTHREAD_CREATE_DETACHED;
18808
18809 #if HAVE_PTHREADS > 4
18810         /* Final pthreads */
18811         pthread_attr_t attr;
18812
18813         status = pthread_attr_init(&attr);
18814         if( status ) return status;
18815
18816 #if HAVE_PTHREADS < 7
18817         status = pthread_attr_setdetachstate(&attr, &detach);
18818         if( status < 0 ) status = errno;
18819 #else
18820         status = pthread_attr_setdetachstate(&attr, detach);
18821 #endif
18822         if( status ) return status;
18823         status = pthread_create( &t, &attr, task, NULL );
18824 #if HAVE_PTHREADS < 7
18825         if( status < 0 ) status = errno;
18826 #endif
18827         if( status ) return status;
18828 #else
18829         /* Draft 4 pthreads */
18830         status = pthread_create( &t, pthread_attr_default, task, NULL );
18831         if( status ) return errno;
18832
18833         /* give thread a chance to complete */
18834         /* it should remain joinable and hence detachable */
18835         sleep( 1 );
18836
18837         status = pthread_detach( &t );
18838         if( status ) return errno;
18839 #endif
18840
18841 #ifdef HAVE_LINUX_THREADS
18842         pthread_kill_other_threads_np();
18843 #endif
18844
18845         return 0;
18846
18847   ;
18848   return 0;
18849 }
18850 _ACEOF
18851 if ac_fn_c_try_link "$LINENO"; then :
18852   ol_cv_pthread_lpthreads_lexc=yes
18853 else
18854   ol_cv_pthread_lpthreads_lexc=no
18855 fi
18856 rm -f core conftest.err conftest.$ac_objext \
18857     conftest$ac_exeext conftest.$ac_ext
18858 else
18859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18860 /* end confdefs.h.  */
18861
18862 /* pthread test headers */
18863 #include <pthread.h>
18864 #if HAVE_PTHREADS < 7
18865 #include <errno.h>
18866 #endif
18867 #ifndef NULL
18868 #define NULL (void*)0
18869 #endif
18870
18871 static void *task(p)
18872         void *p;
18873 {
18874         return (void *) (p == NULL);
18875 }
18876
18877
18878 int main(argc, argv)
18879         int argc;
18880         char **argv;
18881 {
18882
18883         /* pthread test function */
18884 #ifndef PTHREAD_CREATE_DETACHED
18885 #define PTHREAD_CREATE_DETACHED 1
18886 #endif
18887         pthread_t t;
18888         int status;
18889         int detach = PTHREAD_CREATE_DETACHED;
18890
18891 #if HAVE_PTHREADS > 4
18892         /* Final pthreads */
18893         pthread_attr_t attr;
18894
18895         status = pthread_attr_init(&attr);
18896         if( status ) return status;
18897
18898 #if HAVE_PTHREADS < 7
18899         status = pthread_attr_setdetachstate(&attr, &detach);
18900         if( status < 0 ) status = errno;
18901 #else
18902         status = pthread_attr_setdetachstate(&attr, detach);
18903 #endif
18904         if( status ) return status;
18905         status = pthread_create( &t, &attr, task, NULL );
18906 #if HAVE_PTHREADS < 7
18907         if( status < 0 ) status = errno;
18908 #endif
18909         if( status ) return status;
18910 #else
18911         /* Draft 4 pthreads */
18912         status = pthread_create( &t, pthread_attr_default, task, NULL );
18913         if( status ) return errno;
18914
18915         /* give thread a chance to complete */
18916         /* it should remain joinable and hence detachable */
18917         sleep( 1 );
18918
18919         status = pthread_detach( &t );
18920         if( status ) return errno;
18921 #endif
18922
18923 #ifdef HAVE_LINUX_THREADS
18924         pthread_kill_other_threads_np();
18925 #endif
18926
18927         return 0;
18928
18929 }
18930
18931 _ACEOF
18932 if ac_fn_c_try_run "$LINENO"; then :
18933   ol_cv_pthread_lpthreads_lexc=yes
18934 else
18935   ol_cv_pthread_lpthreads_lexc=no
18936 fi
18937 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18938   conftest.$ac_objext conftest.beam conftest.$ac_ext
18939 fi
18940
18941
18942                 # restore the LIBS
18943                 LIBS="$ol_LIBS"
18944
18945 fi
18946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
18947 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
18948
18949         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
18950                 ol_link_pthreads="-lpthreads -lexc"
18951                 ol_link_threads=posix
18952         fi
18953 fi
18954
18955
18956                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
18957 if test "$ol_link_threads" = no ; then
18958         # try -lpthreads
18959         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
18960 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
18961 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then :
18962   $as_echo_n "(cached) " >&6
18963 else
18964
18965                 # save the flags
18966                 ol_LIBS="$LIBS"
18967                 LIBS="-lpthreads $LIBS"
18968
18969                 if test "$cross_compiling" = yes; then :
18970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18971 /* end confdefs.h.  */
18972
18973 /* pthread test headers */
18974 #include <pthread.h>
18975 #if HAVE_PTHREADS < 7
18976 #include <errno.h>
18977 #endif
18978 #ifndef NULL
18979 #define NULL (void*)0
18980 #endif
18981
18982 static void *task(p)
18983         void *p;
18984 {
18985         return (void *) (p == NULL);
18986 }
18987
18988 int
18989 main ()
18990 {
18991
18992         /* pthread test function */
18993 #ifndef PTHREAD_CREATE_DETACHED
18994 #define PTHREAD_CREATE_DETACHED 1
18995 #endif
18996         pthread_t t;
18997         int status;
18998         int detach = PTHREAD_CREATE_DETACHED;
18999
19000 #if HAVE_PTHREADS > 4
19001         /* Final pthreads */
19002         pthread_attr_t attr;
19003
19004         status = pthread_attr_init(&attr);
19005         if( status ) return status;
19006
19007 #if HAVE_PTHREADS < 7
19008         status = pthread_attr_setdetachstate(&attr, &detach);
19009         if( status < 0 ) status = errno;
19010 #else
19011         status = pthread_attr_setdetachstate(&attr, detach);
19012 #endif
19013         if( status ) return status;
19014         status = pthread_create( &t, &attr, task, NULL );
19015 #if HAVE_PTHREADS < 7
19016         if( status < 0 ) status = errno;
19017 #endif
19018         if( status ) return status;
19019 #else
19020         /* Draft 4 pthreads */
19021         status = pthread_create( &t, pthread_attr_default, task, NULL );
19022         if( status ) return errno;
19023
19024         /* give thread a chance to complete */
19025         /* it should remain joinable and hence detachable */
19026         sleep( 1 );
19027
19028         status = pthread_detach( &t );
19029         if( status ) return errno;
19030 #endif
19031
19032 #ifdef HAVE_LINUX_THREADS
19033         pthread_kill_other_threads_np();
19034 #endif
19035
19036         return 0;
19037
19038   ;
19039   return 0;
19040 }
19041 _ACEOF
19042 if ac_fn_c_try_link "$LINENO"; then :
19043   ol_cv_pthread_lib_lpthreads=yes
19044 else
19045   ol_cv_pthread_lib_lpthreads=no
19046 fi
19047 rm -f core conftest.err conftest.$ac_objext \
19048     conftest$ac_exeext conftest.$ac_ext
19049 else
19050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19051 /* end confdefs.h.  */
19052
19053 /* pthread test headers */
19054 #include <pthread.h>
19055 #if HAVE_PTHREADS < 7
19056 #include <errno.h>
19057 #endif
19058 #ifndef NULL
19059 #define NULL (void*)0
19060 #endif
19061
19062 static void *task(p)
19063         void *p;
19064 {
19065         return (void *) (p == NULL);
19066 }
19067
19068
19069 int main(argc, argv)
19070         int argc;
19071         char **argv;
19072 {
19073
19074         /* pthread test function */
19075 #ifndef PTHREAD_CREATE_DETACHED
19076 #define PTHREAD_CREATE_DETACHED 1
19077 #endif
19078         pthread_t t;
19079         int status;
19080         int detach = PTHREAD_CREATE_DETACHED;
19081
19082 #if HAVE_PTHREADS > 4
19083         /* Final pthreads */
19084         pthread_attr_t attr;
19085
19086         status = pthread_attr_init(&attr);
19087         if( status ) return status;
19088
19089 #if HAVE_PTHREADS < 7
19090         status = pthread_attr_setdetachstate(&attr, &detach);
19091         if( status < 0 ) status = errno;
19092 #else
19093         status = pthread_attr_setdetachstate(&attr, detach);
19094 #endif
19095         if( status ) return status;
19096         status = pthread_create( &t, &attr, task, NULL );
19097 #if HAVE_PTHREADS < 7
19098         if( status < 0 ) status = errno;
19099 #endif
19100         if( status ) return status;
19101 #else
19102         /* Draft 4 pthreads */
19103         status = pthread_create( &t, pthread_attr_default, task, NULL );
19104         if( status ) return errno;
19105
19106         /* give thread a chance to complete */
19107         /* it should remain joinable and hence detachable */
19108         sleep( 1 );
19109
19110         status = pthread_detach( &t );
19111         if( status ) return errno;
19112 #endif
19113
19114 #ifdef HAVE_LINUX_THREADS
19115         pthread_kill_other_threads_np();
19116 #endif
19117
19118         return 0;
19119
19120 }
19121
19122 _ACEOF
19123 if ac_fn_c_try_run "$LINENO"; then :
19124   ol_cv_pthread_lib_lpthreads=yes
19125 else
19126   ol_cv_pthread_lib_lpthreads=no
19127 fi
19128 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19129   conftest.$ac_objext conftest.beam conftest.$ac_ext
19130 fi
19131
19132
19133                 # restore the LIBS
19134                 LIBS="$ol_LIBS"
19135
19136 fi
19137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
19138 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
19139
19140         if test $ol_cv_pthread_lib_lpthreads = yes ; then
19141                 ol_link_pthreads="-lpthreads"
19142                 ol_link_threads=posix
19143         fi
19144 fi
19145
19146
19147                 if test $ol_link_threads != no ; then
19148                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
19149
19150                                                 save_CPPFLAGS="$CPPFLAGS"
19151                         save_LIBS="$LIBS"
19152                         LIBS="$LTHREAD_LIBS $LIBS"
19153
19154                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
19155 do :
19156   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19157 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19158 eval as_val=\$$as_ac_var
19159    if test "x$as_val" = x""yes; then :
19160   cat >>confdefs.h <<_ACEOF
19161 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19162 _ACEOF
19163
19164 fi
19165 done
19166
19167
19168                         if test $ac_cv_func_sched_yield = no &&
19169                            test $ac_cv_func_pthread_yield = no &&
19170                            test $ac_cv_func_thr_yield = no ; then
19171                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
19172 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
19173 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
19174   $as_echo_n "(cached) " >&6
19175 else
19176   ac_check_lib_save_LIBS=$LIBS
19177 LIBS="-lrt  $LIBS"
19178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19179 /* end confdefs.h.  */
19180
19181 /* Override any GCC internal prototype to avoid an error.
19182    Use char because int might match the return type of a GCC
19183    builtin and then its argument prototype would still apply.  */
19184 #ifdef __cplusplus
19185 extern "C"
19186 #endif
19187 char sched_yield ();
19188 int
19189 main ()
19190 {
19191 return sched_yield ();
19192   ;
19193   return 0;
19194 }
19195 _ACEOF
19196 if ac_fn_c_try_link "$LINENO"; then :
19197   ac_cv_lib_rt_sched_yield=yes
19198 else
19199   ac_cv_lib_rt_sched_yield=no
19200 fi
19201 rm -f core conftest.err conftest.$ac_objext \
19202     conftest$ac_exeext conftest.$ac_ext
19203 LIBS=$ac_check_lib_save_LIBS
19204 fi
19205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19206 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
19207 if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
19208   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
19209
19210 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
19211
19212                                         ac_cv_func_sched_yield=yes
19213 else
19214   ac_cv_func_sched_yield=no
19215 fi
19216
19217                         fi
19218                         if test $ac_cv_func_sched_yield = no &&
19219                            test $ac_cv_func_pthread_yield = no &&
19220                            test "$ac_cv_func_thr_yield" = no ; then
19221                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
19222 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
19223                         fi
19224
19225                                                 for ac_func in pthread_kill
19226 do :
19227   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
19228 if test "x$ac_cv_func_pthread_kill" = x""yes; then :
19229   cat >>confdefs.h <<_ACEOF
19230 #define HAVE_PTHREAD_KILL 1
19231 _ACEOF
19232
19233 fi
19234 done
19235
19236
19237                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
19238 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
19239 if test "${ol_cv_func_pthread_rwlock_destroy+set}" = set; then :
19240   $as_echo_n "(cached) " >&6
19241 else
19242
19243                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19244 /* end confdefs.h.  */
19245
19246 #include <pthread.h>
19247 pthread_rwlock_t rwlock;
19248
19249 int
19250 main ()
19251 {
19252 pthread_rwlock_destroy(&rwlock);
19253   ;
19254   return 0;
19255 }
19256 _ACEOF
19257 if ac_fn_c_try_link "$LINENO"; then :
19258   ol_cv_func_pthread_rwlock_destroy=yes
19259 else
19260   ol_cv_func_pthread_rwlock_destroy=no
19261 fi
19262 rm -f core conftest.err conftest.$ac_objext \
19263     conftest$ac_exeext conftest.$ac_ext
19264
19265 fi
19266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
19267 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
19268                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
19269
19270 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
19271
19272                         fi
19273
19274                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
19275 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
19276 if test "${ol_cv_func_pthread_detach+set}" = set; then :
19277   $as_echo_n "(cached) " >&6
19278 else
19279
19280                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19281 /* end confdefs.h.  */
19282
19283 #include <pthread.h>
19284 #ifndef NULL
19285 #define NULL (void*)0
19286 #endif
19287
19288 int
19289 main ()
19290 {
19291 pthread_detach(NULL);
19292   ;
19293   return 0;
19294 }
19295 _ACEOF
19296 if ac_fn_c_try_link "$LINENO"; then :
19297   ol_cv_func_pthread_detach=yes
19298 else
19299   ol_cv_func_pthread_detach=no
19300 fi
19301 rm -f core conftest.err conftest.$ac_objext \
19302     conftest$ac_exeext conftest.$ac_ext
19303
19304 fi
19305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
19306 $as_echo "$ol_cv_func_pthread_detach" >&6; }
19307
19308                         if test $ol_cv_func_pthread_detach = no ; then
19309                                 as_fn_error "could not locate pthread_detach()" "$LINENO" 5
19310                         fi
19311
19312
19313 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
19314
19315
19316                                                 for ac_func in \
19317                                 pthread_setconcurrency \
19318                                 pthread_getconcurrency \
19319                                 thr_setconcurrency \
19320                                 thr_getconcurrency \
19321
19322 do :
19323   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19324 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19325 eval as_val=\$$as_ac_var
19326    if test "x$as_val" = x""yes; then :
19327   cat >>confdefs.h <<_ACEOF
19328 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19329 _ACEOF
19330
19331 fi
19332 done
19333
19334
19335
19336         for ac_func in pthread_kill_other_threads_np
19337 do :
19338   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
19339 if test "x$ac_cv_func_pthread_kill_other_threads_np" = x""yes; then :
19340   cat >>confdefs.h <<_ACEOF
19341 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
19342 _ACEOF
19343
19344 fi
19345 done
19346
19347         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
19348 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
19349 if test "${ol_cv_sys_linux_threads+set}" = set; then :
19350   $as_echo_n "(cached) " >&6
19351 else
19352   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
19353 fi
19354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
19355 $as_echo "$ol_cv_sys_linux_threads" >&6; }
19356
19357
19358
19359
19360         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
19361 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
19362 if test "${ol_cv_linux_threads+set}" = set; then :
19363   $as_echo_n "(cached) " >&6
19364 else
19365
19366                 if test $ol_cv_header_linux_threads = yes &&
19367                    test $ol_cv_sys_linux_threads = yes; then
19368                         ol_cv_linux_threads=yes
19369                 elif test $ol_cv_header_linux_threads = no &&
19370                      test $ol_cv_sys_linux_threads = no; then
19371                         ol_cv_linux_threads=no
19372                 else
19373                         ol_cv_linux_threads=error
19374                 fi
19375
19376 fi
19377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
19378 $as_echo "$ol_cv_linux_threads" >&6; }
19379
19380
19381                         if test $ol_cv_linux_threads = error; then
19382                                 as_fn_error "LinuxThreads header/library mismatch" "$LINENO" 5;
19383                         fi
19384
19385                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
19386 $as_echo_n "checking if pthread_create() works... " >&6; }
19387 if test "${ol_cv_pthread_create_works+set}" = set; then :
19388   $as_echo_n "(cached) " >&6
19389 else
19390
19391                         if test "$cross_compiling" = yes; then :
19392                                 ol_cv_pthread_create_works=yes
19393 else
19394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19395 /* end confdefs.h.  */
19396
19397 /* pthread test headers */
19398 #include <pthread.h>
19399 #if HAVE_PTHREADS < 7
19400 #include <errno.h>
19401 #endif
19402 #ifndef NULL
19403 #define NULL (void*)0
19404 #endif
19405
19406 static void *task(p)
19407         void *p;
19408 {
19409         return (void *) (p == NULL);
19410 }
19411
19412
19413 int main(argc, argv)
19414         int argc;
19415         char **argv;
19416 {
19417
19418         /* pthread test function */
19419 #ifndef PTHREAD_CREATE_DETACHED
19420 #define PTHREAD_CREATE_DETACHED 1
19421 #endif
19422         pthread_t t;
19423         int status;
19424         int detach = PTHREAD_CREATE_DETACHED;
19425
19426 #if HAVE_PTHREADS > 4
19427         /* Final pthreads */
19428         pthread_attr_t attr;
19429
19430         status = pthread_attr_init(&attr);
19431         if( status ) return status;
19432
19433 #if HAVE_PTHREADS < 7
19434         status = pthread_attr_setdetachstate(&attr, &detach);
19435         if( status < 0 ) status = errno;
19436 #else
19437         status = pthread_attr_setdetachstate(&attr, detach);
19438 #endif
19439         if( status ) return status;
19440         status = pthread_create( &t, &attr, task, NULL );
19441 #if HAVE_PTHREADS < 7
19442         if( status < 0 ) status = errno;
19443 #endif
19444         if( status ) return status;
19445 #else
19446         /* Draft 4 pthreads */
19447         status = pthread_create( &t, pthread_attr_default, task, NULL );
19448         if( status ) return errno;
19449
19450         /* give thread a chance to complete */
19451         /* it should remain joinable and hence detachable */
19452         sleep( 1 );
19453
19454         status = pthread_detach( &t );
19455         if( status ) return errno;
19456 #endif
19457
19458 #ifdef HAVE_LINUX_THREADS
19459         pthread_kill_other_threads_np();
19460 #endif
19461
19462         return 0;
19463
19464 }
19465
19466 _ACEOF
19467 if ac_fn_c_try_run "$LINENO"; then :
19468   ol_cv_pthread_create_works=yes
19469 else
19470   ol_cv_pthread_create_works=no
19471 fi
19472 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19473   conftest.$ac_objext conftest.beam conftest.$ac_ext
19474 fi
19475
19476 fi
19477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
19478 $as_echo "$ol_cv_pthread_create_works" >&6; }
19479
19480                         if test $ol_cv_pthread_create_works = no ; then
19481                                 as_fn_error "pthread_create is not usable, check environment settings" "$LINENO" 5
19482                         fi
19483
19484                         ol_replace_broken_yield=no
19485
19486                         if test $ol_replace_broken_yield = yes ; then
19487
19488 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
19489
19490                         fi
19491
19492                                                 if test $ol_with_yielding_select = auto ; then
19493                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
19494 $as_echo_n "checking if select yields when using pthreads... " >&6; }
19495 if test "${ol_cv_pthread_select_yields+set}" = set; then :
19496   $as_echo_n "(cached) " >&6
19497 else
19498
19499                                 if test "$cross_compiling" = yes; then :
19500   ol_cv_pthread_select_yields=cross
19501 else
19502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19503 /* end confdefs.h.  */
19504
19505 #include <sys/types.h>
19506 #include <sys/time.h>
19507 #include <unistd.h>
19508 #include <pthread.h>
19509 #ifndef NULL
19510 #define NULL (void*) 0
19511 #endif
19512
19513 static int fildes[2];
19514
19515 static void *task(p)
19516         void *p;
19517 {
19518         int i;
19519         struct timeval tv;
19520
19521         fd_set rfds;
19522
19523         tv.tv_sec=10;
19524         tv.tv_usec=0;
19525
19526         FD_ZERO(&rfds);
19527         FD_SET(fildes[0], &rfds);
19528
19529         /* we're not interested in any fds */
19530         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
19531
19532         if(i < 0) {
19533                 perror("select");
19534                 exit(10);
19535         }
19536
19537         exit(0); /* if we exit here, the select blocked the whole process */
19538 }
19539
19540 int main(argc, argv)
19541         int argc;
19542         char **argv;
19543 {
19544         pthread_t t;
19545
19546         /* create a pipe to select */
19547         if(pipe(&fildes[0])) {
19548                 perror("select");
19549                 exit(1);
19550         }
19551
19552 #ifdef HAVE_PTHREAD_SETCONCURRENCY
19553         (void) pthread_setconcurrency(2);
19554 #else
19555 #ifdef HAVE_THR_SETCONCURRENCY
19556         /* Set Solaris LWP concurrency to 2 */
19557         thr_setconcurrency(2);
19558 #endif
19559 #endif
19560
19561 #if HAVE_PTHREADS < 6
19562         pthread_create(&t, pthread_attr_default, task, NULL);
19563 #else
19564         pthread_create(&t, NULL, task, NULL);
19565 #endif
19566
19567         /* make sure task runs first */
19568 #ifdef HAVE_THR_YIELD
19569         thr_yield();
19570 #elif defined( HAVE_SCHED_YIELD )
19571         sched_yield();
19572 #elif defined( HAVE_PTHREAD_YIELD )
19573         pthread_yield();
19574 #endif
19575
19576         exit(2);
19577 }
19578 _ACEOF
19579 if ac_fn_c_try_run "$LINENO"; then :
19580   ol_cv_pthread_select_yields=no
19581 else
19582   ol_cv_pthread_select_yields=yes
19583 fi
19584 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19585   conftest.$ac_objext conftest.beam conftest.$ac_ext
19586 fi
19587
19588 fi
19589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
19590 $as_echo "$ol_cv_pthread_select_yields" >&6; }
19591
19592                                 if test $ol_cv_pthread_select_yields = cross ; then
19593                                         as_fn_error "crossing compiling: use --with-yielding_select=yes|no|manual" "$LINENO" 5
19594                                 fi
19595
19596                                 if test $ol_cv_pthread_select_yields = yes ; then
19597                                         ol_with_yielding_select=yes
19598                                 fi
19599                         fi
19600
19601                                                 CPPFLAGS="$save_CPPFLAGS"
19602                         LIBS="$save_LIBS"
19603                 else
19604                         as_fn_error "could not locate usable POSIX Threads" "$LINENO" 5
19605                 fi
19606         fi
19607
19608         if test $ol_with_threads = posix ; then
19609                 as_fn_error "could not locate POSIX Threads" "$LINENO" 5
19610         fi
19611         ;;
19612 esac
19613
19614 case $ol_with_threads in auto | yes | mach)
19615
19616                 for ac_header in mach/cthreads.h cthreads.h
19617 do :
19618   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19619 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19620 eval as_val=\$$as_ac_Header
19621    if test "x$as_val" = x""yes; then :
19622   cat >>confdefs.h <<_ACEOF
19623 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19624 _ACEOF
19625
19626 fi
19627
19628 done
19629
19630         if test $ac_cv_header_mach_cthreads_h = yes ; then
19631                 ol_with_threads=found
19632
19633                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19634 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19635   ol_link_threads=yes
19636 fi
19637
19638
19639                 if test $ol_link_threads = no ; then
19640                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
19641 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
19642 if test "${ol_cv_cthread_all_load+set}" = set; then :
19643   $as_echo_n "(cached) " >&6
19644 else
19645
19646                                                                 save_LIBS="$LIBS"
19647                                 LIBS="-all_load $LIBS"
19648                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19649 /* end confdefs.h.  */
19650 #include <mach/cthreads.h>
19651 int
19652 main ()
19653 {
19654
19655                                         cthread_fork((void *)0, (void *)0);
19656
19657   ;
19658   return 0;
19659 }
19660 _ACEOF
19661 if ac_fn_c_try_link "$LINENO"; then :
19662   ol_cv_cthread_all_load=yes
19663 else
19664   ol_cv_cthread_all_load=no
19665 fi
19666 rm -f core conftest.err conftest.$ac_objext \
19667     conftest$ac_exeext conftest.$ac_ext
19668                                                                 LIBS="$save_LIBS"
19669
19670 fi
19671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
19672 $as_echo "$ol_cv_cthread_all_load" >&6; }
19673
19674                         if test $ol_cv_cthread_all_load = yes ; then
19675                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
19676                                 ol_link_threads=mach
19677                                 ol_with_threads=found
19678                         fi
19679                 fi
19680
19681         elif test $ac_cv_header_cthreads_h = yes ; then
19682
19683                 ol_with_threads=found
19684
19685                                 save_LIBS="$LIBS"
19686                 LIBS="$LIBS -lthreads"
19687                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19688 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19689   ol_link_threads=yes
19690 fi
19691
19692                 LIBS="$save_LIBS"
19693
19694                 if test $ol_link_threads = yes ; then
19695                         LTHREAD_LIBS="-lthreads"
19696                         ol_link_threads=mach
19697                         ol_with_threads=found
19698                 else
19699                         as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19700                 fi
19701
19702         elif test $ol_with_threads = mach ; then
19703                 as_fn_error "could not locate Mach CThreads" "$LINENO" 5
19704         fi
19705
19706         if test $ol_link_threads = mach ; then
19707
19708 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
19709
19710         elif test $ol_with_threads = found ; then
19711                 as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19712         fi
19713         ;;
19714 esac
19715
19716 case $ol_with_threads in auto | yes | pth)
19717
19718         for ac_header in pth.h
19719 do :
19720   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
19721 if test "x$ac_cv_header_pth_h" = x""yes; then :
19722   cat >>confdefs.h <<_ACEOF
19723 #define HAVE_PTH_H 1
19724 _ACEOF
19725
19726 fi
19727
19728 done
19729
19730
19731         if test $ac_cv_header_pth_h = yes ; then
19732                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
19733 $as_echo_n "checking for pth_version in -lpth... " >&6; }
19734 if test "${ac_cv_lib_pth_pth_version+set}" = set; then :
19735   $as_echo_n "(cached) " >&6
19736 else
19737   ac_check_lib_save_LIBS=$LIBS
19738 LIBS="-lpth  $LIBS"
19739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19740 /* end confdefs.h.  */
19741
19742 /* Override any GCC internal prototype to avoid an error.
19743    Use char because int might match the return type of a GCC
19744    builtin and then its argument prototype would still apply.  */
19745 #ifdef __cplusplus
19746 extern "C"
19747 #endif
19748 char pth_version ();
19749 int
19750 main ()
19751 {
19752 return pth_version ();
19753   ;
19754   return 0;
19755 }
19756 _ACEOF
19757 if ac_fn_c_try_link "$LINENO"; then :
19758   ac_cv_lib_pth_pth_version=yes
19759 else
19760   ac_cv_lib_pth_pth_version=no
19761 fi
19762 rm -f core conftest.err conftest.$ac_objext \
19763     conftest$ac_exeext conftest.$ac_ext
19764 LIBS=$ac_check_lib_save_LIBS
19765 fi
19766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
19767 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
19768 if test "x$ac_cv_lib_pth_pth_version" = x""yes; then :
19769   have_pth=yes
19770 else
19771   have_pth=no
19772 fi
19773
19774
19775                 if test $have_pth = yes ; then
19776
19777 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
19778
19779                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
19780                         ol_link_threads=pth
19781                         ol_with_threads=found
19782
19783                         if test $ol_with_yielding_select = auto ; then
19784                                 ol_with_yielding_select=yes
19785                         fi
19786                 fi
19787         fi
19788         ;;
19789 esac
19790
19791 case $ol_with_threads in auto | yes | lwp)
19792
19793                 for ac_header in thread.h synch.h
19794 do :
19795   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19796 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19797 eval as_val=\$$as_ac_Header
19798    if test "x$as_val" = x""yes; then :
19799   cat >>confdefs.h <<_ACEOF
19800 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19801 _ACEOF
19802
19803 fi
19804
19805 done
19806
19807         if test $ac_cv_header_thread_h = yes &&
19808            test $ac_cv_header_synch_h = yes ; then
19809                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
19810 $as_echo_n "checking for thr_create in -lthread... " >&6; }
19811 if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
19812   $as_echo_n "(cached) " >&6
19813 else
19814   ac_check_lib_save_LIBS=$LIBS
19815 LIBS="-lthread  $LIBS"
19816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19817 /* end confdefs.h.  */
19818
19819 /* Override any GCC internal prototype to avoid an error.
19820    Use char because int might match the return type of a GCC
19821    builtin and then its argument prototype would still apply.  */
19822 #ifdef __cplusplus
19823 extern "C"
19824 #endif
19825 char thr_create ();
19826 int
19827 main ()
19828 {
19829 return thr_create ();
19830   ;
19831   return 0;
19832 }
19833 _ACEOF
19834 if ac_fn_c_try_link "$LINENO"; then :
19835   ac_cv_lib_thread_thr_create=yes
19836 else
19837   ac_cv_lib_thread_thr_create=no
19838 fi
19839 rm -f core conftest.err conftest.$ac_objext \
19840     conftest$ac_exeext conftest.$ac_ext
19841 LIBS=$ac_check_lib_save_LIBS
19842 fi
19843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
19844 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
19845 if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
19846   have_thr=yes
19847 else
19848   have_thr=no
19849 fi
19850
19851
19852                 if test $have_thr = yes ; then
19853
19854 $as_echo "#define HAVE_THR 1" >>confdefs.h
19855
19856                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
19857                         ol_link_threads=thr
19858
19859                         if test $ol_with_yielding_select = auto ; then
19860                                 ol_with_yielding_select=yes
19861                         fi
19862
19863                                                 for ac_func in \
19864                                 thr_setconcurrency \
19865                                 thr_getconcurrency \
19866
19867 do :
19868   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19869 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19870 eval as_val=\$$as_ac_var
19871    if test "x$as_val" = x""yes; then :
19872   cat >>confdefs.h <<_ACEOF
19873 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19874 _ACEOF
19875
19876 fi
19877 done
19878
19879                 fi
19880         fi
19881         ;;
19882 esac
19883
19884 if test $ol_with_yielding_select = yes ; then
19885
19886 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
19887
19888 fi
19889
19890 if test $ol_with_threads = manual ; then
19891                 ol_link_threads=yes
19892
19893         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
19894 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
19895
19896         for ac_header in pthread.h sched.h
19897 do :
19898   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19899 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19900 eval as_val=\$$as_ac_Header
19901    if test "x$as_val" = x""yes; then :
19902   cat >>confdefs.h <<_ACEOF
19903 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19904 _ACEOF
19905
19906 fi
19907
19908 done
19909
19910         for ac_func in sched_yield pthread_yield
19911 do :
19912   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19913 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19914 eval as_val=\$$as_ac_var
19915    if test "x$as_val" = x""yes; then :
19916   cat >>confdefs.h <<_ACEOF
19917 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19918 _ACEOF
19919
19920 fi
19921 done
19922
19923
19924         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
19925 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
19926 if test "${ol_cv_header_linux_threads+set}" = set; then :
19927   $as_echo_n "(cached) " >&6
19928 else
19929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19930 /* end confdefs.h.  */
19931 #include <pthread.h>
19932 _ACEOF
19933 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19934   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
19935   ol_cv_header_linux_threads=yes
19936 else
19937   ol_cv_header_linux_threads=no
19938 fi
19939 rm -f conftest*
19940
19941
19942 fi
19943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
19944 $as_echo "$ol_cv_header_linux_threads" >&6; }
19945         if test $ol_cv_header_linux_threads = yes; then
19946
19947 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
19948
19949         fi
19950
19951
19952         for ac_header in mach/cthreads.h
19953 do :
19954   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
19955 if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
19956   cat >>confdefs.h <<_ACEOF
19957 #define HAVE_MACH_CTHREADS_H 1
19958 _ACEOF
19959
19960 fi
19961
19962 done
19963
19964         for ac_header in thread.h synch.h
19965 do :
19966   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19967 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19968 eval as_val=\$$as_ac_Header
19969    if test "x$as_val" = x""yes; then :
19970   cat >>confdefs.h <<_ACEOF
19971 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19972 _ACEOF
19973
19974 fi
19975
19976 done
19977
19978 fi
19979
19980 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
19981                         $as_echo "#define REENTRANT 1" >>confdefs.h
19982
19983         $as_echo "#define _REENTRANT 1" >>confdefs.h
19984
19985         $as_echo "#define THREAD_SAFE 1" >>confdefs.h
19986
19987         $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
19988
19989         $as_echo "#define THREADSAFE 1" >>confdefs.h
19990
19991         $as_echo "#define _THREADSAFE 1" >>confdefs.h
19992
19993         $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
19994
19995
19996                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
19997 $as_echo_n "checking for thread specific errno... " >&6; }
19998 if test "${ol_cv_errno_thread_specific+set}" = set; then :
19999   $as_echo_n "(cached) " >&6
20000 else
20001
20002                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20003 /* end confdefs.h.  */
20004 #include <errno.h>
20005 int
20006 main ()
20007 {
20008 errno = 0;
20009   ;
20010   return 0;
20011 }
20012 _ACEOF
20013 if ac_fn_c_try_link "$LINENO"; then :
20014   ol_cv_errno_thread_specific=yes
20015 else
20016   ol_cv_errno_thread_specific=no
20017 fi
20018 rm -f core conftest.err conftest.$ac_objext \
20019     conftest$ac_exeext conftest.$ac_ext
20020
20021 fi
20022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
20023 $as_echo "$ol_cv_errno_thread_specific" >&6; }
20024
20025                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
20026 $as_echo_n "checking for thread specific h_errno... " >&6; }
20027 if test "${ol_cv_h_errno_thread_specific+set}" = set; then :
20028   $as_echo_n "(cached) " >&6
20029 else
20030
20031                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20032 /* end confdefs.h.  */
20033 #include <netdb.h>
20034 int
20035 main ()
20036 {
20037 h_errno = 0;
20038   ;
20039   return 0;
20040 }
20041 _ACEOF
20042 if ac_fn_c_try_link "$LINENO"; then :
20043   ol_cv_h_errno_thread_specific=yes
20044 else
20045   ol_cv_h_errno_thread_specific=no
20046 fi
20047 rm -f core conftest.err conftest.$ac_objext \
20048     conftest$ac_exeext conftest.$ac_ext
20049
20050 fi
20051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
20052 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
20053
20054         if test $ol_cv_errno_thread_specific != yes ||
20055            test $ol_cv_h_errno_thread_specific != yes ; then
20056                 LIBS="$LTHREAD_LIBS $LIBS"
20057                 LTHREAD_LIBS=""
20058         fi
20059
20060 fi
20061
20062 if test $ol_link_threads = no ; then
20063         if test $ol_with_threads = yes ; then
20064                 as_fn_error "no suitable thread support" "$LINENO" 5
20065         fi
20066
20067         if test $ol_with_threads = auto ; then
20068                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
20069 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
20070                 ol_with_threads=no
20071         fi
20072
20073
20074 $as_echo "#define NO_THREADS 1" >>confdefs.h
20075
20076         LTHREAD_LIBS=""
20077         BUILD_THREAD=no
20078 else
20079         BUILD_THREAD=yes
20080 fi
20081
20082 if test $ol_link_threads != no ; then
20083
20084 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
20085
20086 fi
20087
20088 for ac_func in \
20089         ctime_r                 \
20090         gmtime_r localtime_r \
20091         gethostbyname_r gethostbyaddr_r \
20092
20093 do :
20094   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20095 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20096 eval as_val=\$$as_ac_var
20097    if test "x$as_val" = x""yes; then :
20098   cat >>confdefs.h <<_ACEOF
20099 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20100 _ACEOF
20101
20102 fi
20103 done
20104
20105
20106 if test "$ac_cv_func_ctime_r" = no ; then
20107         ol_cv_func_ctime_r_nargs=0
20108 else
20109         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of ctime_r" >&5
20110 $as_echo_n "checking number of arguments of ctime_r... " >&6; }
20111 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then :
20112   $as_echo_n "(cached) " >&6
20113 else
20114   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20115 /* end confdefs.h.  */
20116 #include <time.h>
20117 int
20118 main ()
20119 {
20120 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
20121   ;
20122   return 0;
20123 }
20124 _ACEOF
20125 if ac_fn_c_try_compile "$LINENO"; then :
20126   ol_cv_func_ctime_r_nargs3=yes
20127 else
20128   ol_cv_func_ctime_r_nargs3=no
20129 fi
20130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20131
20132         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20133 /* end confdefs.h.  */
20134 #include <time.h>
20135 int
20136 main ()
20137 {
20138 time_t ti; char *buffer; ctime_r(&ti,buffer);
20139   ;
20140   return 0;
20141 }
20142 _ACEOF
20143 if ac_fn_c_try_compile "$LINENO"; then :
20144   ol_cv_func_ctime_r_nargs2=yes
20145 else
20146   ol_cv_func_ctime_r_nargs2=no
20147 fi
20148 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20149
20150         if test $ol_cv_func_ctime_r_nargs3 = yes &&
20151            test $ol_cv_func_ctime_r_nargs2 = no ; then
20152
20153                 ol_cv_func_ctime_r_nargs=3
20154
20155         elif test $ol_cv_func_ctime_r_nargs3 = no &&
20156              test $ol_cv_func_ctime_r_nargs2 = yes ; then
20157
20158                 ol_cv_func_ctime_r_nargs=2
20159
20160         else
20161                 ol_cv_func_ctime_r_nargs=0
20162         fi
20163
20164 fi
20165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_ctime_r_nargs" >&5
20166 $as_echo "$ol_cv_func_ctime_r_nargs" >&6; }
20167
20168   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
20169
20170 cat >>confdefs.h <<_ACEOF
20171 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
20172 _ACEOF
20173
20174   fi
20175
20176 fi
20177
20178 if test "$ac_cv_func_gethostbyname_r" = yes ; then
20179         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyname_r" >&5
20180 $as_echo_n "checking number of arguments of gethostbyname_r... " >&6; }
20181 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then :
20182   $as_echo_n "(cached) " >&6
20183 else
20184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20185 /* end confdefs.h.  */
20186 #include <sys/types.h>
20187 #include <sys/socket.h>
20188 #include <netinet/in.h>
20189 #include <netdb.h>
20190 #define BUFSIZE (sizeof(struct hostent)+10)
20191 int
20192 main ()
20193 {
20194 struct hostent hent; char buffer[BUFSIZE];
20195                 int bufsize=BUFSIZE;int h_errno;
20196                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
20197                         buffer, bufsize, &h_errno);
20198   ;
20199   return 0;
20200 }
20201 _ACEOF
20202 if ac_fn_c_try_compile "$LINENO"; then :
20203   ol_cv_func_gethostbyname_r_nargs5=yes
20204 else
20205   ol_cv_func_gethostbyname_r_nargs5=no
20206 fi
20207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20208
20209         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20210 /* end confdefs.h.  */
20211 #include <sys/types.h>
20212 #include <sys/socket.h>
20213 #include <netinet/in.h>
20214 #include <netdb.h>
20215 #define BUFSIZE (sizeof(struct hostent)+10)
20216 int
20217 main ()
20218 {
20219 struct hostent hent;struct hostent *rhent;
20220                 char buffer[BUFSIZE];
20221                 int bufsize=BUFSIZE;int h_errno;
20222                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
20223                         &rhent, &h_errno);
20224   ;
20225   return 0;
20226 }
20227 _ACEOF
20228 if ac_fn_c_try_compile "$LINENO"; then :
20229   ol_cv_func_gethostbyname_r_nargs6=yes
20230 else
20231   ol_cv_func_gethostbyname_r_nargs6=no
20232 fi
20233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20234
20235         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
20236            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
20237
20238                 ol_cv_func_gethostbyname_r_nargs=5
20239
20240         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
20241              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
20242
20243                 ol_cv_func_gethostbyname_r_nargs=6
20244
20245         else
20246                 ol_cv_func_gethostbyname_r_nargs=0
20247         fi
20248
20249 fi
20250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyname_r_nargs" >&5
20251 $as_echo "$ol_cv_func_gethostbyname_r_nargs" >&6; }
20252   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
20253
20254 cat >>confdefs.h <<_ACEOF
20255 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
20256 _ACEOF
20257
20258   fi
20259
20260 else
20261         ol_cv_func_gethostbyname_r_nargs=0
20262 fi
20263
20264 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
20265         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyaddr_r" >&5
20266 $as_echo_n "checking number of arguments of gethostbyaddr_r... " >&6; }
20267 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then :
20268   $as_echo_n "(cached) " >&6
20269 else
20270   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20271 /* end confdefs.h.  */
20272 #include <sys/types.h>
20273 #include <sys/socket.h>
20274 #include <netinet/in.h>
20275 #include <netdb.h>
20276 #define BUFSIZE (sizeof(struct hostent)+10)
20277 int
20278 main ()
20279 {
20280 struct hostent hent; char buffer[BUFSIZE];
20281             struct in_addr add;
20282             size_t alen=sizeof(struct in_addr);
20283             int bufsize=BUFSIZE;int h_errno;
20284                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20285                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
20286   ;
20287   return 0;
20288 }
20289 _ACEOF
20290 if ac_fn_c_try_compile "$LINENO"; then :
20291   ol_cv_func_gethostbyaddr_r_nargs7=yes
20292 else
20293   ol_cv_func_gethostbyaddr_r_nargs7=no
20294 fi
20295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20296
20297         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20298 /* end confdefs.h.  */
20299 #include <sys/types.h>
20300 #include <sys/socket.h>
20301 #include <netinet/in.h>
20302 #include <netdb.h>
20303 #define BUFSIZE (sizeof(struct hostent)+10)
20304 int
20305 main ()
20306 {
20307 struct hostent hent;
20308                 struct hostent *rhent; char buffer[BUFSIZE];
20309                 struct in_addr add;
20310                 size_t alen=sizeof(struct in_addr);
20311                 int bufsize=BUFSIZE;int h_errno;
20312                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20313                         alen, AF_INET, &hent, buffer, bufsize,
20314                         &rhent, &h_errno);
20315   ;
20316   return 0;
20317 }
20318 _ACEOF
20319 if ac_fn_c_try_compile "$LINENO"; then :
20320   ol_cv_func_gethostbyaddr_r_nargs8=yes
20321 else
20322   ol_cv_func_gethostbyaddr_r_nargs8=no
20323 fi
20324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20325
20326         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
20327            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
20328
20329                 ol_cv_func_gethostbyaddr_r_nargs=7
20330
20331         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
20332              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
20333
20334                 ol_cv_func_gethostbyaddr_r_nargs=8
20335
20336         else
20337                 ol_cv_func_gethostbyaddr_r_nargs=0
20338         fi
20339
20340 fi
20341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
20342 $as_echo "$ol_cv_func_gethostbyaddr_r_nargs" >&6; }
20343   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
20344
20345 cat >>confdefs.h <<_ACEOF
20346 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
20347 _ACEOF
20348
20349   fi
20350
20351 else
20352         ol_cv_func_gethostbyaddr_r_nargs=0
20353 fi
20354
20355 ol_link_bdb=no
20356
20357 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
20358         ol_cv_berkeley_db=no
20359 for ac_header in db.h
20360 do :
20361   ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default"
20362 if test "x$ac_cv_header_db_h" = x""yes; then :
20363   cat >>confdefs.h <<_ACEOF
20364 #define HAVE_DB_H 1
20365 _ACEOF
20366
20367 fi
20368
20369 done
20370
20371 if test $ac_cv_header_db_h = yes; then
20372         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB major version in db.h" >&5
20373 $as_echo_n "checking for Berkeley DB major version in db.h... " >&6; }
20374 if test "${ol_cv_bdb_major+set}" = set; then :
20375   $as_echo_n "(cached) " >&6
20376 else
20377
20378         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20379 /* end confdefs.h.  */
20380
20381 #include <db.h>
20382 #ifndef DB_VERSION_MAJOR
20383 #       define DB_VERSION_MAJOR 1
20384 #endif
20385 __db_version DB_VERSION_MAJOR
20386
20387 _ACEOF
20388         set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
20389         ol_cv_bdb_major=${3}
20390
20391 fi
20392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_major" >&5
20393 $as_echo "$ol_cv_bdb_major" >&6; }
20394 case $ol_cv_bdb_major in [1-9]*) : ;; *)
20395         as_fn_error "Unknown Berkeley DB major version in db.h" "$LINENO" 5 ;;
20396 esac
20397
20398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB minor version in db.h" >&5
20399 $as_echo_n "checking for Berkeley DB minor version in db.h... " >&6; }
20400 if test "${ol_cv_bdb_minor+set}" = set; then :
20401   $as_echo_n "(cached) " >&6
20402 else
20403
20404         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20405 /* end confdefs.h.  */
20406
20407 #include <db.h>
20408 #ifndef DB_VERSION_MINOR
20409 #       define DB_VERSION_MINOR 0
20410 #endif
20411 __db_version DB_VERSION_MINOR
20412
20413 _ACEOF
20414         set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
20415         ol_cv_bdb_minor=${3}
20416
20417 fi
20418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_minor" >&5
20419 $as_echo "$ol_cv_bdb_minor" >&6; }
20420 case $ol_cv_bdb_minor in [0-9]*) : ;; *)
20421         as_fn_error "Unknown Berkeley DB minor version in db.h" "$LINENO" 5 ;;
20422 esac
20423
20424         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Berkeley DB version supported by BDB/HDB backends" >&5
20425 $as_echo_n "checking if Berkeley DB version supported by BDB/HDB backends... " >&6; }
20426 if test "${ol_cv_bdb_compat+set}" = set; then :
20427   $as_echo_n "(cached) " >&6
20428 else
20429
20430         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20431 /* end confdefs.h.  */
20432
20433 #include <db.h>
20434
20435  /* this check could be improved */
20436 #ifndef DB_VERSION_MAJOR
20437 #       define DB_VERSION_MAJOR 1
20438 #endif
20439 #ifndef DB_VERSION_MINOR
20440 #       define DB_VERSION_MINOR 0
20441 #endif
20442 #ifndef DB_VERSION_PATCH
20443 #       define DB_VERSION_PATCH 0
20444 #endif
20445
20446 #define DB_VERSION_FULL ((DB_VERSION_MAJOR<<16)|(DB_VERSION_MINOR<<8)|DB_VERSION_PATCH)
20447
20448 /* require 4.4 or later, but less than 6.0.20 */
20449 #if DB_VERSION_FULL >= 0x040400 && DB_VERSION_FULL < 0x060014
20450         __db_version_compat
20451 #endif
20452 #if DB_VERSION_FULL >= 0x060014
20453 #error "BerkeleyDB 6.0.20+ license is incompatible with LDAP"
20454 #endif
20455
20456 _ACEOF
20457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20458   $EGREP "__db_version_compat" >/dev/null 2>&1; then :
20459   ol_cv_bdb_compat=yes
20460 else
20461   ol_cv_bdb_compat=no
20462 fi
20463 rm -f conftest*
20464
20465 fi
20466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_compat" >&5
20467 $as_echo "$ol_cv_bdb_compat" >&6; }
20468
20469
20470         if test $ol_cv_bdb_compat != yes ; then
20471                 as_fn_error "BerkeleyDB version incompatible with BDB/HDB backends" "$LINENO" 5
20472         fi
20473
20474         ol_cv_lib_db=no
20475
20476 if test $ol_cv_bdb_major = 5 ; then
20477         if test $ol_cv_lib_db = no ; then
20478         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)" >&5
20479 $as_echo_n "checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)... " >&6; }
20480 if test "${ol_cv_db_db_5_dot_m+set}" = set; then :
20481   $as_echo_n "(cached) " >&6
20482 else
20483
20484         ol_DB_LIB=-ldb-5.$ol_cv_bdb_minor
20485         ol_LIBS=$LIBS
20486         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20487
20488         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20489 /* end confdefs.h.  */
20490
20491 #ifdef HAVE_DB_185_H
20492 # include <db_185.h>
20493 #else
20494 # include <db.h>
20495 #endif
20496
20497 #ifndef DB_VERSION_MAJOR
20498 # define DB_VERSION_MAJOR 1
20499 #endif
20500
20501 #ifndef NULL
20502 #define NULL ((void*)0)
20503 #endif
20504
20505 int
20506 main ()
20507 {
20508
20509 #if DB_VERSION_MAJOR > 2
20510         db_env_create( NULL, 0 );
20511 #elif DB_VERSION_MAJOR > 1
20512         db_appexit( NULL );
20513 #else
20514         (void) dbopen( NULL, 0, 0, 0, NULL);
20515 #endif
20516
20517   ;
20518   return 0;
20519 }
20520 _ACEOF
20521 if ac_fn_c_try_link "$LINENO"; then :
20522   ol_cv_db_db_5_dot_m=yes
20523 else
20524   ol_cv_db_db_5_dot_m=no
20525 fi
20526 rm -f core conftest.err conftest.$ac_objext \
20527     conftest$ac_exeext conftest.$ac_ext
20528
20529         LIBS="$ol_LIBS"
20530
20531 fi
20532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_dot_m" >&5
20533 $as_echo "$ol_cv_db_db_5_dot_m" >&6; }
20534
20535         if test $ol_cv_db_db_5_dot_m = yes ; then
20536                 ol_cv_lib_db=-ldb-5.$ol_cv_bdb_minor
20537         fi
20538 fi
20539
20540         if test $ol_cv_lib_db = no ; then
20541         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)" >&5
20542 $as_echo_n "checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)... " >&6; }
20543 if test "${ol_cv_db_db5m+set}" = set; then :
20544   $as_echo_n "(cached) " >&6
20545 else
20546
20547         ol_DB_LIB=-ldb5$ol_cv_bdb_minor
20548         ol_LIBS=$LIBS
20549         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20550
20551         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20552 /* end confdefs.h.  */
20553
20554 #ifdef HAVE_DB_185_H
20555 # include <db_185.h>
20556 #else
20557 # include <db.h>
20558 #endif
20559
20560 #ifndef DB_VERSION_MAJOR
20561 # define DB_VERSION_MAJOR 1
20562 #endif
20563
20564 #ifndef NULL
20565 #define NULL ((void*)0)
20566 #endif
20567
20568 int
20569 main ()
20570 {
20571
20572 #if DB_VERSION_MAJOR > 2
20573         db_env_create( NULL, 0 );
20574 #elif DB_VERSION_MAJOR > 1
20575         db_appexit( NULL );
20576 #else
20577         (void) dbopen( NULL, 0, 0, 0, NULL);
20578 #endif
20579
20580   ;
20581   return 0;
20582 }
20583 _ACEOF
20584 if ac_fn_c_try_link "$LINENO"; then :
20585   ol_cv_db_db5m=yes
20586 else
20587   ol_cv_db_db5m=no
20588 fi
20589 rm -f core conftest.err conftest.$ac_objext \
20590     conftest$ac_exeext conftest.$ac_ext
20591
20592         LIBS="$ol_LIBS"
20593
20594 fi
20595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5m" >&5
20596 $as_echo "$ol_cv_db_db5m" >&6; }
20597
20598         if test $ol_cv_db_db5m = yes ; then
20599                 ol_cv_lib_db=-ldb5$ol_cv_bdb_minor
20600         fi
20601 fi
20602
20603         if test $ol_cv_lib_db = no ; then
20604         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)" >&5
20605 $as_echo_n "checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)... " >&6; }
20606 if test "${ol_cv_db_db_5m+set}" = set; then :
20607   $as_echo_n "(cached) " >&6
20608 else
20609
20610         ol_DB_LIB=-ldb-5$ol_cv_bdb_minor
20611         ol_LIBS=$LIBS
20612         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20613
20614         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20615 /* end confdefs.h.  */
20616
20617 #ifdef HAVE_DB_185_H
20618 # include <db_185.h>
20619 #else
20620 # include <db.h>
20621 #endif
20622
20623 #ifndef DB_VERSION_MAJOR
20624 # define DB_VERSION_MAJOR 1
20625 #endif
20626
20627 #ifndef NULL
20628 #define NULL ((void*)0)
20629 #endif
20630
20631 int
20632 main ()
20633 {
20634
20635 #if DB_VERSION_MAJOR > 2
20636         db_env_create( NULL, 0 );
20637 #elif DB_VERSION_MAJOR > 1
20638         db_appexit( NULL );
20639 #else
20640         (void) dbopen( NULL, 0, 0, 0, NULL);
20641 #endif
20642
20643   ;
20644   return 0;
20645 }
20646 _ACEOF
20647 if ac_fn_c_try_link "$LINENO"; then :
20648   ol_cv_db_db_5m=yes
20649 else
20650   ol_cv_db_db_5m=no
20651 fi
20652 rm -f core conftest.err conftest.$ac_objext \
20653     conftest$ac_exeext conftest.$ac_ext
20654
20655         LIBS="$ol_LIBS"
20656
20657 fi
20658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5m" >&5
20659 $as_echo "$ol_cv_db_db_5m" >&6; }
20660
20661         if test $ol_cv_db_db_5m = yes ; then
20662                 ol_cv_lib_db=-ldb-5$ol_cv_bdb_minor
20663         fi
20664 fi
20665
20666         if test $ol_cv_lib_db = no ; then
20667         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)" >&5
20668 $as_echo_n "checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)... " >&6; }
20669 if test "${ol_cv_db_db_5_m+set}" = set; then :
20670   $as_echo_n "(cached) " >&6
20671 else
20672
20673         ol_DB_LIB=-ldb-5-$ol_cv_bdb_minor
20674         ol_LIBS=$LIBS
20675         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20676
20677         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20678 /* end confdefs.h.  */
20679
20680 #ifdef HAVE_DB_185_H
20681 # include <db_185.h>
20682 #else
20683 # include <db.h>
20684 #endif
20685
20686 #ifndef DB_VERSION_MAJOR
20687 # define DB_VERSION_MAJOR 1
20688 #endif
20689
20690 #ifndef NULL
20691 #define NULL ((void*)0)
20692 #endif
20693
20694 int
20695 main ()
20696 {
20697
20698 #if DB_VERSION_MAJOR > 2
20699         db_env_create( NULL, 0 );
20700 #elif DB_VERSION_MAJOR > 1
20701         db_appexit( NULL );
20702 #else
20703         (void) dbopen( NULL, 0, 0, 0, NULL);
20704 #endif
20705
20706   ;
20707   return 0;
20708 }
20709 _ACEOF
20710 if ac_fn_c_try_link "$LINENO"; then :
20711   ol_cv_db_db_5_m=yes
20712 else
20713   ol_cv_db_db_5_m=no
20714 fi
20715 rm -f core conftest.err conftest.$ac_objext \
20716     conftest$ac_exeext conftest.$ac_ext
20717
20718         LIBS="$ol_LIBS"
20719
20720 fi
20721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_m" >&5
20722 $as_echo "$ol_cv_db_db_5_m" >&6; }
20723
20724         if test $ol_cv_db_db_5_m = yes ; then
20725                 ol_cv_lib_db=-ldb-5-$ol_cv_bdb_minor
20726         fi
20727 fi
20728
20729         if test $ol_cv_lib_db = no ; then
20730         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5)" >&5
20731 $as_echo_n "checking for Berkeley DB link (-ldb-5)... " >&6; }
20732 if test "${ol_cv_db_db_5+set}" = set; then :
20733   $as_echo_n "(cached) " >&6
20734 else
20735
20736         ol_DB_LIB=-ldb-5
20737         ol_LIBS=$LIBS
20738         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20739
20740         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20741 /* end confdefs.h.  */
20742
20743 #ifdef HAVE_DB_185_H
20744 # include <db_185.h>
20745 #else
20746 # include <db.h>
20747 #endif
20748
20749 #ifndef DB_VERSION_MAJOR
20750 # define DB_VERSION_MAJOR 1
20751 #endif
20752
20753 #ifndef NULL
20754 #define NULL ((void*)0)
20755 #endif
20756
20757 int
20758 main ()
20759 {
20760
20761 #if DB_VERSION_MAJOR > 2
20762         db_env_create( NULL, 0 );
20763 #elif DB_VERSION_MAJOR > 1
20764         db_appexit( NULL );
20765 #else
20766         (void) dbopen( NULL, 0, 0, 0, NULL);
20767 #endif
20768
20769   ;
20770   return 0;
20771 }
20772 _ACEOF
20773 if ac_fn_c_try_link "$LINENO"; then :
20774   ol_cv_db_db_5=yes
20775 else
20776   ol_cv_db_db_5=no
20777 fi
20778 rm -f core conftest.err conftest.$ac_objext \
20779     conftest$ac_exeext conftest.$ac_ext
20780
20781         LIBS="$ol_LIBS"
20782
20783 fi
20784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5" >&5
20785 $as_echo "$ol_cv_db_db_5" >&6; }
20786
20787         if test $ol_cv_db_db_5 = yes ; then
20788                 ol_cv_lib_db=-ldb-5
20789         fi
20790 fi
20791
20792         if test $ol_cv_lib_db = no ; then
20793         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5)" >&5
20794 $as_echo_n "checking for Berkeley DB link (-ldb5)... " >&6; }
20795 if test "${ol_cv_db_db5+set}" = set; then :
20796   $as_echo_n "(cached) " >&6
20797 else
20798
20799         ol_DB_LIB=-ldb5
20800         ol_LIBS=$LIBS
20801         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20802
20803         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20804 /* end confdefs.h.  */
20805
20806 #ifdef HAVE_DB_185_H
20807 # include <db_185.h>
20808 #else
20809 # include <db.h>
20810 #endif
20811
20812 #ifndef DB_VERSION_MAJOR
20813 # define DB_VERSION_MAJOR 1
20814 #endif
20815
20816 #ifndef NULL
20817 #define NULL ((void*)0)
20818 #endif
20819
20820 int
20821 main ()
20822 {
20823
20824 #if DB_VERSION_MAJOR > 2
20825         db_env_create( NULL, 0 );
20826 #elif DB_VERSION_MAJOR > 1
20827         db_appexit( NULL );
20828 #else
20829         (void) dbopen( NULL, 0, 0, 0, NULL);
20830 #endif
20831
20832   ;
20833   return 0;
20834 }
20835 _ACEOF
20836 if ac_fn_c_try_link "$LINENO"; then :
20837   ol_cv_db_db5=yes
20838 else
20839   ol_cv_db_db5=no
20840 fi
20841 rm -f core conftest.err conftest.$ac_objext \
20842     conftest$ac_exeext conftest.$ac_ext
20843
20844         LIBS="$ol_LIBS"
20845
20846 fi
20847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5" >&5
20848 $as_echo "$ol_cv_db_db5" >&6; }
20849
20850         if test $ol_cv_db_db5 = yes ; then
20851                 ol_cv_lib_db=-ldb5
20852         fi
20853 fi
20854
20855 elif test $ol_cv_bdb_major = 4 ; then
20856         if test $ol_cv_lib_db = no ; then
20857         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)" >&5
20858 $as_echo_n "checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)... " >&6; }
20859 if test "${ol_cv_db_db_4_dot_m+set}" = set; then :
20860   $as_echo_n "(cached) " >&6
20861 else
20862
20863         ol_DB_LIB=-ldb-4.$ol_cv_bdb_minor
20864         ol_LIBS=$LIBS
20865         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20866
20867         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20868 /* end confdefs.h.  */
20869
20870 #ifdef HAVE_DB_185_H
20871 # include <db_185.h>
20872 #else
20873 # include <db.h>
20874 #endif
20875
20876 #ifndef DB_VERSION_MAJOR
20877 # define DB_VERSION_MAJOR 1
20878 #endif
20879
20880 #ifndef NULL
20881 #define NULL ((void*)0)
20882 #endif
20883
20884 int
20885 main ()
20886 {
20887
20888 #if DB_VERSION_MAJOR > 2
20889         db_env_create( NULL, 0 );
20890 #elif DB_VERSION_MAJOR > 1
20891         db_appexit( NULL );
20892 #else
20893         (void) dbopen( NULL, 0, 0, 0, NULL);
20894 #endif
20895
20896   ;
20897   return 0;
20898 }
20899 _ACEOF
20900 if ac_fn_c_try_link "$LINENO"; then :
20901   ol_cv_db_db_4_dot_m=yes
20902 else
20903   ol_cv_db_db_4_dot_m=no
20904 fi
20905 rm -f core conftest.err conftest.$ac_objext \
20906     conftest$ac_exeext conftest.$ac_ext
20907
20908         LIBS="$ol_LIBS"
20909
20910 fi
20911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_dot_m" >&5
20912 $as_echo "$ol_cv_db_db_4_dot_m" >&6; }
20913
20914         if test $ol_cv_db_db_4_dot_m = yes ; then
20915                 ol_cv_lib_db=-ldb-4.$ol_cv_bdb_minor
20916         fi
20917 fi
20918
20919         if test $ol_cv_lib_db = no ; then
20920         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)" >&5
20921 $as_echo_n "checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)... " >&6; }
20922 if test "${ol_cv_db_db4m+set}" = set; then :
20923   $as_echo_n "(cached) " >&6
20924 else
20925
20926         ol_DB_LIB=-ldb4$ol_cv_bdb_minor
20927         ol_LIBS=$LIBS
20928         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20929
20930         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20931 /* end confdefs.h.  */
20932
20933 #ifdef HAVE_DB_185_H
20934 # include <db_185.h>
20935 #else
20936 # include <db.h>
20937 #endif
20938
20939 #ifndef DB_VERSION_MAJOR
20940 # define DB_VERSION_MAJOR 1
20941 #endif
20942
20943 #ifndef NULL
20944 #define NULL ((void*)0)
20945 #endif
20946
20947 int
20948 main ()
20949 {
20950
20951 #if DB_VERSION_MAJOR > 2
20952         db_env_create( NULL, 0 );
20953 #elif DB_VERSION_MAJOR > 1
20954         db_appexit( NULL );
20955 #else
20956         (void) dbopen( NULL, 0, 0, 0, NULL);
20957 #endif
20958
20959   ;
20960   return 0;
20961 }
20962 _ACEOF
20963 if ac_fn_c_try_link "$LINENO"; then :
20964   ol_cv_db_db4m=yes
20965 else
20966   ol_cv_db_db4m=no
20967 fi
20968 rm -f core conftest.err conftest.$ac_objext \
20969     conftest$ac_exeext conftest.$ac_ext
20970
20971         LIBS="$ol_LIBS"
20972
20973 fi
20974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4m" >&5
20975 $as_echo "$ol_cv_db_db4m" >&6; }
20976
20977         if test $ol_cv_db_db4m = yes ; then
20978                 ol_cv_lib_db=-ldb4$ol_cv_bdb_minor
20979         fi
20980 fi
20981
20982         if test $ol_cv_lib_db = no ; then
20983         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)" >&5
20984 $as_echo_n "checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)... " >&6; }
20985 if test "${ol_cv_db_db_4m+set}" = set; then :
20986   $as_echo_n "(cached) " >&6
20987 else
20988
20989         ol_DB_LIB=-ldb-4$ol_cv_bdb_minor
20990         ol_LIBS=$LIBS
20991         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20992
20993         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20994 /* end confdefs.h.  */
20995
20996 #ifdef HAVE_DB_185_H
20997 # include <db_185.h>
20998 #else
20999 # include <db.h>
21000 #endif
21001
21002 #ifndef DB_VERSION_MAJOR
21003 # define DB_VERSION_MAJOR 1
21004 #endif
21005
21006 #ifndef NULL
21007 #define NULL ((void*)0)
21008 #endif
21009
21010 int
21011 main ()
21012 {
21013
21014 #if DB_VERSION_MAJOR > 2
21015         db_env_create( NULL, 0 );
21016 #elif DB_VERSION_MAJOR > 1
21017         db_appexit( NULL );
21018 #else
21019         (void) dbopen( NULL, 0, 0, 0, NULL);
21020 #endif
21021
21022   ;
21023   return 0;
21024 }
21025 _ACEOF
21026 if ac_fn_c_try_link "$LINENO"; then :
21027   ol_cv_db_db_4m=yes
21028 else
21029   ol_cv_db_db_4m=no
21030 fi
21031 rm -f core conftest.err conftest.$ac_objext \
21032     conftest$ac_exeext conftest.$ac_ext
21033
21034         LIBS="$ol_LIBS"
21035
21036 fi
21037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4m" >&5
21038 $as_echo "$ol_cv_db_db_4m" >&6; }
21039
21040         if test $ol_cv_db_db_4m = yes ; then
21041                 ol_cv_lib_db=-ldb-4$ol_cv_bdb_minor
21042         fi
21043 fi
21044
21045         if test $ol_cv_lib_db = no ; then
21046         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)" >&5
21047 $as_echo_n "checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)... " >&6; }
21048 if test "${ol_cv_db_db_4_m+set}" = set; then :
21049   $as_echo_n "(cached) " >&6
21050 else
21051
21052         ol_DB_LIB=-ldb-4-$ol_cv_bdb_minor
21053         ol_LIBS=$LIBS
21054         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21055
21056         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21057 /* end confdefs.h.  */
21058
21059 #ifdef HAVE_DB_185_H
21060 # include <db_185.h>
21061 #else
21062 # include <db.h>
21063 #endif
21064
21065 #ifndef DB_VERSION_MAJOR
21066 # define DB_VERSION_MAJOR 1
21067 #endif
21068
21069 #ifndef NULL
21070 #define NULL ((void*)0)
21071 #endif
21072
21073 int
21074 main ()
21075 {
21076
21077 #if DB_VERSION_MAJOR > 2
21078         db_env_create( NULL, 0 );
21079 #elif DB_VERSION_MAJOR > 1
21080         db_appexit( NULL );
21081 #else
21082         (void) dbopen( NULL, 0, 0, 0, NULL);
21083 #endif
21084
21085   ;
21086   return 0;
21087 }
21088 _ACEOF
21089 if ac_fn_c_try_link "$LINENO"; then :
21090   ol_cv_db_db_4_m=yes
21091 else
21092   ol_cv_db_db_4_m=no
21093 fi
21094 rm -f core conftest.err conftest.$ac_objext \
21095     conftest$ac_exeext conftest.$ac_ext
21096
21097         LIBS="$ol_LIBS"
21098
21099 fi
21100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_m" >&5
21101 $as_echo "$ol_cv_db_db_4_m" >&6; }
21102
21103         if test $ol_cv_db_db_4_m = yes ; then
21104                 ol_cv_lib_db=-ldb-4-$ol_cv_bdb_minor
21105         fi
21106 fi
21107
21108         if test $ol_cv_lib_db = no ; then
21109         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4)" >&5
21110 $as_echo_n "checking for Berkeley DB link (-ldb-4)... " >&6; }
21111 if test "${ol_cv_db_db_4+set}" = set; then :
21112   $as_echo_n "(cached) " >&6
21113 else
21114
21115         ol_DB_LIB=-ldb-4
21116         ol_LIBS=$LIBS
21117         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21118
21119         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21120 /* end confdefs.h.  */
21121
21122 #ifdef HAVE_DB_185_H
21123 # include <db_185.h>
21124 #else
21125 # include <db.h>
21126 #endif
21127
21128 #ifndef DB_VERSION_MAJOR
21129 # define DB_VERSION_MAJOR 1
21130 #endif
21131
21132 #ifndef NULL
21133 #define NULL ((void*)0)
21134 #endif
21135
21136 int
21137 main ()
21138 {
21139
21140 #if DB_VERSION_MAJOR > 2
21141         db_env_create( NULL, 0 );
21142 #elif DB_VERSION_MAJOR > 1
21143         db_appexit( NULL );
21144 #else
21145         (void) dbopen( NULL, 0, 0, 0, NULL);
21146 #endif
21147
21148   ;
21149   return 0;
21150 }
21151 _ACEOF
21152 if ac_fn_c_try_link "$LINENO"; then :
21153   ol_cv_db_db_4=yes
21154 else
21155   ol_cv_db_db_4=no
21156 fi
21157 rm -f core conftest.err conftest.$ac_objext \
21158     conftest$ac_exeext conftest.$ac_ext
21159
21160         LIBS="$ol_LIBS"
21161
21162 fi
21163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4" >&5
21164 $as_echo "$ol_cv_db_db_4" >&6; }
21165
21166         if test $ol_cv_db_db_4 = yes ; then
21167                 ol_cv_lib_db=-ldb-4
21168         fi
21169 fi
21170
21171         if test $ol_cv_lib_db = no ; then
21172         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4)" >&5
21173 $as_echo_n "checking for Berkeley DB link (-ldb4)... " >&6; }
21174 if test "${ol_cv_db_db4+set}" = set; then :
21175   $as_echo_n "(cached) " >&6
21176 else
21177
21178         ol_DB_LIB=-ldb4
21179         ol_LIBS=$LIBS
21180         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21181
21182         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21183 /* end confdefs.h.  */
21184
21185 #ifdef HAVE_DB_185_H
21186 # include <db_185.h>
21187 #else
21188 # include <db.h>
21189 #endif
21190
21191 #ifndef DB_VERSION_MAJOR
21192 # define DB_VERSION_MAJOR 1
21193 #endif
21194
21195 #ifndef NULL
21196 #define NULL ((void*)0)
21197 #endif
21198
21199 int
21200 main ()
21201 {
21202
21203 #if DB_VERSION_MAJOR > 2
21204         db_env_create( NULL, 0 );
21205 #elif DB_VERSION_MAJOR > 1
21206         db_appexit( NULL );
21207 #else
21208         (void) dbopen( NULL, 0, 0, 0, NULL);
21209 #endif
21210
21211   ;
21212   return 0;
21213 }
21214 _ACEOF
21215 if ac_fn_c_try_link "$LINENO"; then :
21216   ol_cv_db_db4=yes
21217 else
21218   ol_cv_db_db4=no
21219 fi
21220 rm -f core conftest.err conftest.$ac_objext \
21221     conftest$ac_exeext conftest.$ac_ext
21222
21223         LIBS="$ol_LIBS"
21224
21225 fi
21226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4" >&5
21227 $as_echo "$ol_cv_db_db4" >&6; }
21228
21229         if test $ol_cv_db_db4 = yes ; then
21230                 ol_cv_lib_db=-ldb4
21231         fi
21232 fi
21233
21234 fi
21235 if test $ol_cv_lib_db = no ; then
21236         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb)" >&5
21237 $as_echo_n "checking for Berkeley DB link (-ldb)... " >&6; }
21238 if test "${ol_cv_db_db+set}" = set; then :
21239   $as_echo_n "(cached) " >&6
21240 else
21241
21242         ol_DB_LIB=-ldb
21243         ol_LIBS=$LIBS
21244         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21245
21246         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21247 /* end confdefs.h.  */
21248
21249 #ifdef HAVE_DB_185_H
21250 # include <db_185.h>
21251 #else
21252 # include <db.h>
21253 #endif
21254
21255 #ifndef DB_VERSION_MAJOR
21256 # define DB_VERSION_MAJOR 1
21257 #endif
21258
21259 #ifndef NULL
21260 #define NULL ((void*)0)
21261 #endif
21262
21263 int
21264 main ()
21265 {
21266
21267 #if DB_VERSION_MAJOR > 2
21268         db_env_create( NULL, 0 );
21269 #elif DB_VERSION_MAJOR > 1
21270         db_appexit( NULL );
21271 #else
21272         (void) dbopen( NULL, 0, 0, 0, NULL);
21273 #endif
21274
21275   ;
21276   return 0;
21277 }
21278 _ACEOF
21279 if ac_fn_c_try_link "$LINENO"; then :
21280   ol_cv_db_db=yes
21281 else
21282   ol_cv_db_db=no
21283 fi
21284 rm -f core conftest.err conftest.$ac_objext \
21285     conftest$ac_exeext conftest.$ac_ext
21286
21287         LIBS="$ol_LIBS"
21288
21289 fi
21290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db" >&5
21291 $as_echo "$ol_cv_db_db" >&6; }
21292
21293         if test $ol_cv_db_db = yes ; then
21294                 ol_cv_lib_db=-ldb
21295         fi
21296 fi
21297
21298 if test $ol_cv_lib_db = no ; then
21299         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (default)" >&5
21300 $as_echo_n "checking for Berkeley DB link (default)... " >&6; }
21301 if test "${ol_cv_db_none+set}" = set; then :
21302   $as_echo_n "(cached) " >&6
21303 else
21304
21305         ol_DB_LIB=
21306         ol_LIBS=$LIBS
21307         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21308
21309         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21310 /* end confdefs.h.  */
21311
21312 #ifdef HAVE_DB_185_H
21313 # include <db_185.h>
21314 #else
21315 # include <db.h>
21316 #endif
21317
21318 #ifndef DB_VERSION_MAJOR
21319 # define DB_VERSION_MAJOR 1
21320 #endif
21321
21322 #ifndef NULL
21323 #define NULL ((void*)0)
21324 #endif
21325
21326 int
21327 main ()
21328 {
21329
21330 #if DB_VERSION_MAJOR > 2
21331         db_env_create( NULL, 0 );
21332 #elif DB_VERSION_MAJOR > 1
21333         db_appexit( NULL );
21334 #else
21335         (void) dbopen( NULL, 0, 0, 0, NULL);
21336 #endif
21337
21338   ;
21339   return 0;
21340 }
21341 _ACEOF
21342 if ac_fn_c_try_link "$LINENO"; then :
21343   ol_cv_db_none=yes
21344 else
21345   ol_cv_db_none=no
21346 fi
21347 rm -f core conftest.err conftest.$ac_objext \
21348     conftest$ac_exeext conftest.$ac_ext
21349
21350         LIBS="$ol_LIBS"
21351
21352 fi
21353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_none" >&5
21354 $as_echo "$ol_cv_db_none" >&6; }
21355
21356         if test $ol_cv_db_none = yes ; then
21357                 ol_cv_lib_db=yes
21358         fi
21359 fi
21360
21361
21362         if test "$ol_cv_lib_db" != no ; then
21363                 ol_cv_berkeley_db=yes
21364                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB library and header version match" >&5
21365 $as_echo_n "checking for Berkeley DB library and header version match... " >&6; }
21366 if test "${ol_cv_berkeley_db_version+set}" = set; then :
21367   $as_echo_n "(cached) " >&6
21368 else
21369
21370         ol_LIBS="$LIBS"
21371         LIBS="$LTHREAD_LIBS $LIBS"
21372         if test $ol_cv_lib_db != yes ; then
21373                 LIBS="$ol_cv_lib_db $LIBS"
21374         fi
21375
21376         if test "$cross_compiling" = yes; then :
21377   ol_cv_berkeley_db_version=cross
21378 else
21379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21380 /* end confdefs.h.  */
21381
21382 #ifdef HAVE_DB_185_H
21383         choke me;
21384 #else
21385 #include <db.h>
21386 #endif
21387 #ifndef DB_VERSION_MAJOR
21388 # define DB_VERSION_MAJOR 1
21389 #endif
21390 #ifndef NULL
21391 #define NULL ((void *)0)
21392 #endif
21393 main()
21394 {
21395 #if DB_VERSION_MAJOR > 1
21396         char *version;
21397         int major, minor, patch;
21398
21399         version = db_version( &major, &minor, &patch );
21400
21401         if( major != DB_VERSION_MAJOR ||
21402                 minor != DB_VERSION_MINOR ||
21403                 patch != DB_VERSION_PATCH )
21404         {
21405                 printf("Berkeley DB version mismatch\n"
21406                         "\theader: %s\n\tlibrary: %s\n",
21407                         DB_VERSION_STRING, version);
21408                 return 1;
21409         }
21410 #endif
21411
21412         return 0;
21413 }
21414 _ACEOF
21415 if ac_fn_c_try_run "$LINENO"; then :
21416   ol_cv_berkeley_db_version=yes
21417 else
21418   ol_cv_berkeley_db_version=no
21419 fi
21420 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21421   conftest.$ac_objext conftest.beam conftest.$ac_ext
21422 fi
21423
21424
21425         LIBS="$ol_LIBS"
21426
21427 fi
21428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_version" >&5
21429 $as_echo "$ol_cv_berkeley_db_version" >&6; }
21430
21431         if test $ol_cv_berkeley_db_version = no ; then
21432                 as_fn_error "Berkeley DB version mismatch" "$LINENO" 5
21433         fi
21434
21435                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB thread support" >&5
21436 $as_echo_n "checking for Berkeley DB thread support... " >&6; }
21437 if test "${ol_cv_berkeley_db_thread+set}" = set; then :
21438   $as_echo_n "(cached) " >&6
21439 else
21440
21441         ol_LIBS="$LIBS"
21442         LIBS="$LTHREAD_LIBS $LIBS"
21443         if test $ol_cv_lib_db != yes ; then
21444                 LIBS="$ol_cv_lib_db $LIBS"
21445         fi
21446
21447         if test "$cross_compiling" = yes; then :
21448   ol_cv_berkeley_db_thread=cross
21449 else
21450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21451 /* end confdefs.h.  */
21452
21453 #ifdef HAVE_DB_185_H
21454         choke me;
21455 #else
21456 #include <db.h>
21457 #endif
21458 #ifndef NULL
21459 #define NULL ((void *)0)
21460 #endif
21461 main()
21462 {
21463         int rc;
21464         u_int32_t flags = DB_CREATE |
21465 #ifdef DB_PRIVATE
21466                 DB_PRIVATE |
21467 #endif
21468                 DB_THREAD;
21469
21470 #if DB_VERSION_MAJOR > 2
21471         DB_ENV *env = NULL;
21472
21473         rc = db_env_create( &env, 0 );
21474
21475         flags |= DB_INIT_MPOOL;
21476 #ifdef DB_MPOOL_PRIVATE
21477         flags |= DB_MPOOL_PRIVATE;
21478 #endif
21479
21480         if( rc ) {
21481                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21482                 return rc;
21483         }
21484
21485 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
21486         rc = (env->open)( env, NULL, flags, 0 );
21487 #else
21488         rc = (env->open)( env, NULL, NULL, flags, 0 );
21489 #endif
21490
21491         if ( rc == 0 ) {
21492                 rc = env->close( env, 0 );
21493         }
21494
21495         if( rc ) {
21496                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21497                 return rc;
21498         }
21499
21500 #else
21501         DB_ENV env;
21502         memset( &env, '\0', sizeof(env) );
21503
21504         rc = db_appinit( NULL, NULL, &env, flags );
21505
21506         if( rc == 0 ) {
21507                 db_appexit( &env );
21508         }
21509
21510         unlink("__db_mpool.share");
21511         unlink("__db_lock.share");
21512 #endif
21513
21514         return rc;
21515 }
21516 _ACEOF
21517 if ac_fn_c_try_run "$LINENO"; then :
21518   ol_cv_berkeley_db_thread=yes
21519 else
21520   ol_cv_berkeley_db_thread=no
21521 fi
21522 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21523   conftest.$ac_objext conftest.beam conftest.$ac_ext
21524 fi
21525
21526
21527         LIBS="$ol_LIBS"
21528
21529 fi
21530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_thread" >&5
21531 $as_echo "$ol_cv_berkeley_db_thread" >&6; }
21532
21533         if test $ol_cv_berkeley_db_thread != no ; then
21534
21535 $as_echo "#define HAVE_BERKELEY_DB_THREAD 1" >>confdefs.h
21536
21537         fi
21538
21539         fi
21540 fi
21541
21542
21543         if test $ol_cv_berkeley_db = no ; then
21544                 as_fn_error "BDB/HDB: BerkeleyDB not available" "$LINENO" 5
21545         fi
21546
21547
21548 $as_echo "#define HAVE_BERKELEY_DB 1" >>confdefs.h
21549
21550
21551                         if test $ol_cv_lib_db != yes ; then
21552                 BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
21553         fi
21554
21555         SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
21556
21557         ol_link_bdb=yes
21558 fi
21559
21560
21561 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
21562         BUILD_LIBS_DYNAMIC=shared
21563
21564 $as_echo "#define LDAP_LIBS_DYNAMIC 1" >>confdefs.h
21565
21566         LTSTATIC=""
21567 else
21568         BUILD_LIBS_DYNAMIC=static
21569         LTSTATIC="-static"
21570 fi
21571
21572 if test $ol_enable_wrappers != no ; then
21573         for ac_header in tcpd.h
21574 do :
21575   ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
21576 if test "x$ac_cv_header_tcpd_h" = x""yes; then :
21577   cat >>confdefs.h <<_ACEOF
21578 #define HAVE_TCPD_H 1
21579 _ACEOF
21580
21581                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library" >&5
21582 $as_echo_n "checking for TCP wrappers library... " >&6; }
21583                 save_LIBS="$LIBS"
21584                 LIBS="$LIBS -lwrap"
21585                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21586 /* end confdefs.h.  */
21587
21588 #include <tcpd.h>
21589 int allow_severity = 0;
21590 int deny_severity  = 0;
21591
21592 struct request_info *req;
21593
21594 int
21595 main ()
21596 {
21597
21598 hosts_access(req)
21599
21600   ;
21601   return 0;
21602 }
21603 _ACEOF
21604 if ac_fn_c_try_link "$LINENO"; then :
21605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap" >&5
21606 $as_echo "-lwrap" >&6; }
21607                 have_wrappers=yes
21608                 LIBS="$save_LIBS"
21609 else
21610
21611                                 LIBS="$LIBS -lnsl"
21612                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21613 /* end confdefs.h.  */
21614
21615 #include <tcpd.h>
21616 int allow_severity = 0;
21617 int deny_severity  = 0;
21618
21619 struct request_info *req;
21620
21621 int
21622 main ()
21623 {
21624
21625 hosts_access(req)
21626
21627   ;
21628   return 0;
21629 }
21630 _ACEOF
21631 if ac_fn_c_try_link "$LINENO"; then :
21632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap -lnsl" >&5
21633 $as_echo "-lwrap -lnsl" >&6; }
21634                 have_wrappers=yes
21635                 LIBS="$save_LIBS -lnsl"
21636 else
21637
21638                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21639 $as_echo "no" >&6; }
21640                 have_wrappers=no
21641                 LIBS=$save_LIBS
21642 fi
21643 rm -f core conftest.err conftest.$ac_objext \
21644     conftest$ac_exeext conftest.$ac_ext
21645 fi
21646 rm -f core conftest.err conftest.$ac_objext \
21647     conftest$ac_exeext conftest.$ac_ext
21648 else
21649   have_wrappers=no
21650 fi
21651
21652 done
21653
21654
21655         if test $have_wrappers = yes ; then
21656
21657 $as_echo "#define HAVE_TCPD 1" >>confdefs.h
21658
21659                 WRAP_LIBS="-lwrap"
21660         elif test $ol_enable_wrappers = yes ; then
21661                 as_fn_error "could not find TCP wrappers, select apppropriate options or disable" "$LINENO" 5
21662         else
21663                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find TCP wrappers, support disabled" >&5
21664 $as_echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
21665                 WRAP_LIBS=""
21666         fi
21667 fi
21668
21669 if test $ol_enable_syslog != no ; then
21670         ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
21671 if test "x$ac_cv_func_openlog" = x""yes; then :
21672
21673 fi
21674
21675         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
21676                 { as_fn_set_status select appropriate options or disable
21677 as_fn_error "could not find syslog" "$LINENO" 5; }
21678         fi
21679         ol_enable_syslog=$ac_cv_func_openlog
21680 fi
21681
21682 ol_link_sql=no
21683 if test $ol_enable_sql != no ; then
21684         for ac_header in sql.h sqlext.h
21685 do :
21686   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21687 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21688 eval as_val=\$$as_ac_Header
21689    if test "x$as_val" = x""yes; then :
21690   cat >>confdefs.h <<_ACEOF
21691 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21692 _ACEOF
21693
21694 else
21695
21696                 as_fn_error "could not locate SQL headers" "$LINENO" 5
21697
21698 fi
21699
21700 done
21701
21702
21703         sql_LIBS="$LIBS"
21704         LIBS="$LTHREAD_LIBS $LIBS"
21705
21706         if test $ol_with_odbc = auto ; then
21707                 ol_with_odbc="iodbc unixodbc odbc32"
21708         fi
21709
21710         for odbc in $ol_with_odbc ; do
21711                 if test $ol_link_sql = no ; then
21712                         case $odbc in
21713                         iodbc)
21714                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -liodbc" >&5
21715 $as_echo_n "checking for SQLDriverConnect in -liodbc... " >&6; }
21716 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then :
21717   $as_echo_n "(cached) " >&6
21718 else
21719   ac_check_lib_save_LIBS=$LIBS
21720 LIBS="-liodbc  $LIBS"
21721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21722 /* end confdefs.h.  */
21723
21724 /* Override any GCC internal prototype to avoid an error.
21725    Use char because int might match the return type of a GCC
21726    builtin and then its argument prototype would still apply.  */
21727 #ifdef __cplusplus
21728 extern "C"
21729 #endif
21730 char SQLDriverConnect ();
21731 int
21732 main ()
21733 {
21734 return SQLDriverConnect ();
21735   ;
21736   return 0;
21737 }
21738 _ACEOF
21739 if ac_fn_c_try_link "$LINENO"; then :
21740   ac_cv_lib_iodbc_SQLDriverConnect=yes
21741 else
21742   ac_cv_lib_iodbc_SQLDriverConnect=no
21743 fi
21744 rm -f core conftest.err conftest.$ac_objext \
21745     conftest$ac_exeext conftest.$ac_ext
21746 LIBS=$ac_check_lib_save_LIBS
21747 fi
21748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
21749 $as_echo "$ac_cv_lib_iodbc_SQLDriverConnect" >&6; }
21750 if test "x$ac_cv_lib_iodbc_SQLDriverConnect" = x""yes; then :
21751   have_iodbc=yes
21752 else
21753   have_iodbc=no
21754 fi
21755
21756                                 if test $have_iodbc = yes ; then
21757                                         ol_link_sql="-liodbc"
21758                                 fi
21759                                 ;;
21760
21761                         unixodbc)
21762                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc" >&5
21763 $as_echo_n "checking for SQLDriverConnect in -lodbc... " >&6; }
21764 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then :
21765   $as_echo_n "(cached) " >&6
21766 else
21767   ac_check_lib_save_LIBS=$LIBS
21768 LIBS="-lodbc  $LIBS"
21769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21770 /* end confdefs.h.  */
21771
21772 /* Override any GCC internal prototype to avoid an error.
21773    Use char because int might match the return type of a GCC
21774    builtin and then its argument prototype would still apply.  */
21775 #ifdef __cplusplus
21776 extern "C"
21777 #endif
21778 char SQLDriverConnect ();
21779 int
21780 main ()
21781 {
21782 return SQLDriverConnect ();
21783   ;
21784   return 0;
21785 }
21786 _ACEOF
21787 if ac_fn_c_try_link "$LINENO"; then :
21788   ac_cv_lib_odbc_SQLDriverConnect=yes
21789 else
21790   ac_cv_lib_odbc_SQLDriverConnect=no
21791 fi
21792 rm -f core conftest.err conftest.$ac_objext \
21793     conftest$ac_exeext conftest.$ac_ext
21794 LIBS=$ac_check_lib_save_LIBS
21795 fi
21796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
21797 $as_echo "$ac_cv_lib_odbc_SQLDriverConnect" >&6; }
21798 if test "x$ac_cv_lib_odbc_SQLDriverConnect" = x""yes; then :
21799   have_odbc=yes
21800 else
21801   have_odbc=no
21802 fi
21803
21804                                 if test $have_odbc = yes ; then
21805                                         ol_link_sql="-lodbc"
21806                                 fi
21807                                 ;;
21808
21809                         odbc32)
21810                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32" >&5
21811 $as_echo_n "checking for SQLDriverConnect in -lodbc32... " >&6; }
21812 if test "${ac_cv_lib_odbc32_SQLDriverConnect+set}" = set; then :
21813   $as_echo_n "(cached) " >&6
21814 else
21815   ac_check_lib_save_LIBS=$LIBS
21816 LIBS="-lodbc32  $LIBS"
21817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21818 /* end confdefs.h.  */
21819
21820 /* Override any GCC internal prototype to avoid an error.
21821    Use char because int might match the return type of a GCC
21822    builtin and then its argument prototype would still apply.  */
21823 #ifdef __cplusplus
21824 extern "C"
21825 #endif
21826 char SQLDriverConnect ();
21827 int
21828 main ()
21829 {
21830 return SQLDriverConnect ();
21831   ;
21832   return 0;
21833 }
21834 _ACEOF
21835 if ac_fn_c_try_link "$LINENO"; then :
21836   ac_cv_lib_odbc32_SQLDriverConnect=yes
21837 else
21838   ac_cv_lib_odbc32_SQLDriverConnect=no
21839 fi
21840 rm -f core conftest.err conftest.$ac_objext \
21841     conftest$ac_exeext conftest.$ac_ext
21842 LIBS=$ac_check_lib_save_LIBS
21843 fi
21844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_SQLDriverConnect" >&5
21845 $as_echo "$ac_cv_lib_odbc32_SQLDriverConnect" >&6; }
21846 if test "x$ac_cv_lib_odbc32_SQLDriverConnect" = x""yes; then :
21847   have_odbc32=yes
21848 else
21849   have_odbc32=no
21850 fi
21851
21852
21853                                                                 if test $have_odbc32 = no ; then
21854                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32 with windows.h" >&5
21855 $as_echo_n "checking for SQLDriverConnect in -lodbc32 with windows.h... " >&6; }
21856                                         save_LIBS="$LIBS"
21857                                         LIBS="$LIBS -lodbc32"
21858                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21859 /* end confdefs.h.  */
21860 #include <windows.h>
21861                                         #include <sqlext.h>
21862
21863 int
21864 main ()
21865 {
21866
21867                                                 SQLDriverConnect(NULL,NULL,NULL,0,NULL,0,NULL,0);
21868
21869   ;
21870   return 0;
21871 }
21872 _ACEOF
21873 if ac_fn_c_try_link "$LINENO"; then :
21874   have_odbc32=yes
21875 else
21876   have_odbc32=no
21877 fi
21878 rm -f core conftest.err conftest.$ac_objext \
21879     conftest$ac_exeext conftest.$ac_ext
21880                                         LIBS="$save_LIBS"
21881                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_odbc32" >&5
21882 $as_echo "$have_odbc32" >&6; }
21883                                 fi
21884
21885                                 if test $have_odbc32 = yes ; then
21886                                         ol_link_sql="-lodbc32"
21887                                 fi
21888                                 ;;
21889
21890                         *)
21891                                 as_fn_error "unknown ODBC library" "$LINENO" 5
21892                                 ;;
21893                         esac
21894                 fi
21895         done
21896
21897         LIBS="$sql_LIBS"
21898
21899         if test $ol_link_sql != no ; then
21900                 SLAPD_SQL_LIBS="$ol_link_sql"
21901
21902         elif test $ol_enable_sql != auto ; then
21903                 as_fn_error "could not locate suitable ODBC library" "$LINENO" 5
21904         fi
21905 fi
21906
21907 ol_link_ndb=no
21908 if test $ol_enable_ndb != no ; then
21909         # Extract the first word of "mysql_config", so it can be a program name with args.
21910 set dummy mysql_config; ac_word=$2
21911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21912 $as_echo_n "checking for $ac_word... " >&6; }
21913 if test "${ac_cv_prog_MYSQL+set}" = set; then :
21914   $as_echo_n "(cached) " >&6
21915 else
21916   if test -n "$MYSQL"; then
21917   ac_cv_prog_MYSQL="$MYSQL" # Let the user override the test.
21918 else
21919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21920 for as_dir in $PATH
21921 do
21922   IFS=$as_save_IFS
21923   test -z "$as_dir" && as_dir=.
21924     for ac_exec_ext in '' $ac_executable_extensions; do
21925   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21926     ac_cv_prog_MYSQL="yes"
21927     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21928     break 2
21929   fi
21930 done
21931   done
21932 IFS=$as_save_IFS
21933
21934 fi
21935 fi
21936 MYSQL=$ac_cv_prog_MYSQL
21937 if test -n "$MYSQL"; then
21938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL" >&5
21939 $as_echo "$MYSQL" >&6; }
21940 else
21941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21942 $as_echo "no" >&6; }
21943 fi
21944
21945
21946         if test "$MYSQL" != yes ; then
21947                 as_fn_error "could not locate mysql_config" "$LINENO" 5
21948         fi
21949
21950         SQL_INC=`mysql_config --include`
21951         SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi"
21952
21953         save_CPPFLAGS="$CPPFLAGS"
21954         CPPFLAGS="$SLAPD_NDB_INCS"
21955         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NdbApi.hpp" >&5
21956 $as_echo_n "checking for NdbApi.hpp... " >&6; }
21957         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21958 /* end confdefs.h.  */
21959 #include <NdbApi.hpp>
21960 _ACEOF
21961 if ac_fn_c_try_cpp "$LINENO"; then :
21962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21963 $as_echo "yes" >&6; }
21964 else
21965   as_fn_error "could not locate NdbApi headers" "$LINENO" 5
21966
21967 fi
21968 rm -f conftest.err conftest.$ac_ext
21969         CPPFLAGS="$save_CPPFLAGS"
21970
21971         SQL_LIB=`mysql_config --libs_r`
21972         SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++"
21973
21974         save_LDFLAGS="$LDFLAGS"
21975         save_LIBS="$LIBS"
21976         LDFLAGS="$SQL_LIB"
21977         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ndb_init in -lndbclient" >&5
21978 $as_echo_n "checking for ndb_init in -lndbclient... " >&6; }
21979 if test "${ac_cv_lib_ndbclient_ndb_init+set}" = set; then :
21980   $as_echo_n "(cached) " >&6
21981 else
21982   ac_check_lib_save_LIBS=$LIBS
21983 LIBS="-lndbclient -lstdc++ $LIBS"
21984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21985 /* end confdefs.h.  */
21986
21987 /* Override any GCC internal prototype to avoid an error.
21988    Use char because int might match the return type of a GCC
21989    builtin and then its argument prototype would still apply.  */
21990 #ifdef __cplusplus
21991 extern "C"
21992 #endif
21993 char ndb_init ();
21994 int
21995 main ()
21996 {
21997 return ndb_init ();
21998   ;
21999   return 0;
22000 }
22001 _ACEOF
22002 if ac_fn_c_try_link "$LINENO"; then :
22003   ac_cv_lib_ndbclient_ndb_init=yes
22004 else
22005   ac_cv_lib_ndbclient_ndb_init=no
22006 fi
22007 rm -f core conftest.err conftest.$ac_objext \
22008     conftest$ac_exeext conftest.$ac_ext
22009 LIBS=$ac_check_lib_save_LIBS
22010 fi
22011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbclient_ndb_init" >&5
22012 $as_echo "$ac_cv_lib_ndbclient_ndb_init" >&6; }
22013 if test "x$ac_cv_lib_ndbclient_ndb_init" = x""yes; then :
22014   : ok
22015 else
22016
22017                 as_fn_error "could not locate ndbclient library" "$LINENO" 5
22018
22019 fi
22020
22021         LIBS="$save_LIBS"
22022         LDFLAGS="$save_LDFLAGS"
22023
22024         if test "$ol_enable_ndb" = yes ; then
22025                 SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
22026         fi
22027 fi
22028
22029 ol_link_wt=no
22030 if test $ol_enable_wt != no ; then
22031         # Extract the first word of "pkg-config", so it can be a program name with args.
22032 set dummy pkg-config; ac_word=$2
22033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22034 $as_echo_n "checking for $ac_word... " >&6; }
22035 if test "${ac_cv_prog_PKGCONFIG+set}" = set; then :
22036   $as_echo_n "(cached) " >&6
22037 else
22038   if test -n "$PKGCONFIG"; then
22039   ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
22040 else
22041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22042 for as_dir in $PATH
22043 do
22044   IFS=$as_save_IFS
22045   test -z "$as_dir" && as_dir=.
22046     for ac_exec_ext in '' $ac_executable_extensions; do
22047   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22048     ac_cv_prog_PKGCONFIG="yes"
22049     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22050     break 2
22051   fi
22052 done
22053   done
22054 IFS=$as_save_IFS
22055
22056 fi
22057 fi
22058 PKGCONFIG=$ac_cv_prog_PKGCONFIG
22059 if test -n "$PKGCONFIG"; then
22060   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
22061 $as_echo "$PKGCONFIG" >&6; }
22062 else
22063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22064 $as_echo "no" >&6; }
22065 fi
22066
22067
22068         if test "$PKGCONFIG" != yes ; then
22069                 as_fn_error "could not locate pkg-config" "$LINENO" 5
22070         fi
22071         WT_INCS=`pkg-config --cflags wiredtiger`
22072         WT_LIBS=`pkg-config --libs wiredtiger`
22073
22074         save_CFLAGS="$CFLAGS"
22075         save_LDFLAGS="$LDFLAGS"
22076         CFLAGS="$WT_INCS"
22077         CPPFLAGS="$WT_INCS"
22078         LDFLAGS="$WT_LIBS"
22079         for ac_header in wiredtiger.h
22080 do :
22081   ac_fn_c_check_header_mongrel "$LINENO" "wiredtiger.h" "ac_cv_header_wiredtiger_h" "$ac_includes_default"
22082 if test "x$ac_cv_header_wiredtiger_h" = x""yes; then :
22083   cat >>confdefs.h <<_ACEOF
22084 #define HAVE_WIREDTIGER_H 1
22085 _ACEOF
22086
22087 fi
22088
22089 done
22090
22091         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wiredtiger_version in -lwiredtiger" >&5
22092 $as_echo_n "checking for wiredtiger_version in -lwiredtiger... " >&6; }
22093 if test "${ac_cv_lib_wiredtiger_wiredtiger_version+set}" = set; then :
22094   $as_echo_n "(cached) " >&6
22095 else
22096   ac_check_lib_save_LIBS=$LIBS
22097 LIBS="-lwiredtiger  $LIBS"
22098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22099 /* end confdefs.h.  */
22100
22101 /* Override any GCC internal prototype to avoid an error.
22102    Use char because int might match the return type of a GCC
22103    builtin and then its argument prototype would still apply.  */
22104 #ifdef __cplusplus
22105 extern "C"
22106 #endif
22107 char wiredtiger_version ();
22108 int
22109 main ()
22110 {
22111 return wiredtiger_version ();
22112   ;
22113   return 0;
22114 }
22115 _ACEOF
22116 if ac_fn_c_try_link "$LINENO"; then :
22117   ac_cv_lib_wiredtiger_wiredtiger_version=yes
22118 else
22119   ac_cv_lib_wiredtiger_wiredtiger_version=no
22120 fi
22121 rm -f core conftest.err conftest.$ac_objext \
22122     conftest$ac_exeext conftest.$ac_ext
22123 LIBS=$ac_check_lib_save_LIBS
22124 fi
22125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wiredtiger_wiredtiger_version" >&5
22126 $as_echo "$ac_cv_lib_wiredtiger_wiredtiger_version" >&6; }
22127 if test "x$ac_cv_lib_wiredtiger_wiredtiger_version" = x""yes; then :
22128   : ok
22129 else
22130
22131                 as_fn_error "could not locate wiredtiger library" "$LINENO" 5
22132
22133 fi
22134
22135         CFLAGS="$save_CFLAGS"
22136         CPPFLAGS="$save_CPPFLAGS"
22137         LDFLAGS="$save_LDFLAGS"
22138         SLAPD_LIBS="$SLAPD_LIBS \$(WT_LIBS)"
22139         ol_link_wt=yes
22140 fi
22141
22142 ol_icu=no
22143 for ac_header in unicode/utypes.h
22144 do :
22145   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22146 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22147 eval as_val=\$$as_ac_Header
22148    if test "x$as_val" = x""yes; then :
22149   cat >>confdefs.h <<_ACEOF
22150 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22151 _ACEOF
22152
22153 fi
22154
22155 done
22156
22157 if test $ac_cv_header_unicode_utypes_h = yes ; then
22158                 OL_ICULIBS="-licuuc -licudata"
22159
22160         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU libraries" >&5
22161 $as_echo_n "checking for ICU libraries... " >&6; }
22162 if test "${ol_cv_lib_icu+set}" = set; then :
22163   $as_echo_n "(cached) " >&6
22164 else
22165
22166                 ol_LIBS="$LIBS"
22167                 LIBS="$OL_ICULIBS $LIBS"
22168                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22169 /* end confdefs.h.  */
22170
22171 #include <unicode/utypes.h>
22172
22173 int
22174 main ()
22175 {
22176
22177 (void) u_errorName(0);
22178
22179   ;
22180   return 0;
22181 }
22182 _ACEOF
22183 if ac_fn_c_try_link "$LINENO"; then :
22184   ol_cv_lib_icu=yes
22185 else
22186   ol_cv_lib_icu=no
22187 fi
22188 rm -f core conftest.err conftest.$ac_objext \
22189     conftest$ac_exeext conftest.$ac_ext
22190                 LIBS="$ol_LIBS"
22191
22192 fi
22193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_icu" >&5
22194 $as_echo "$ol_cv_lib_icu" >&6; }
22195
22196         if test $ol_cv_lib_icu != no ; then
22197                 ol_icu="$OL_ICULIBS"
22198
22199 $as_echo "#define HAVE_ICU 1" >>confdefs.h
22200
22201         fi
22202 fi
22203
22204 if test "$ol_icu" = no ; then
22205         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ICU not available" >&5
22206 $as_echo "$as_me: WARNING: ICU not available" >&2;}
22207 else
22208         ICU_LIBS="$ol_icu"
22209 fi
22210 WITH_SASL=no
22211 ol_link_sasl=no
22212 ol_link_spasswd=no
22213 if test $ol_with_cyrus_sasl != no ; then
22214         for ac_header in sasl/sasl.h sasl.h
22215 do :
22216   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22217 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22218 eval as_val=\$$as_ac_Header
22219    if test "x$as_val" = x""yes; then :
22220   cat >>confdefs.h <<_ACEOF
22221 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22222 _ACEOF
22223
22224 fi
22225
22226 done
22227
22228
22229         if test $ac_cv_header_sasl_sasl_h = yes ||
22230            test $ac_cv_header_sasl_h = yes; then
22231                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
22232 $as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
22233 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then :
22234   $as_echo_n "(cached) " >&6
22235 else
22236   ac_check_lib_save_LIBS=$LIBS
22237 LIBS="-lsasl2  $LIBS"
22238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22239 /* end confdefs.h.  */
22240
22241 /* Override any GCC internal prototype to avoid an error.
22242    Use char because int might match the return type of a GCC
22243    builtin and then its argument prototype would still apply.  */
22244 #ifdef __cplusplus
22245 extern "C"
22246 #endif
22247 char sasl_client_init ();
22248 int
22249 main ()
22250 {
22251 return sasl_client_init ();
22252   ;
22253   return 0;
22254 }
22255 _ACEOF
22256 if ac_fn_c_try_link "$LINENO"; then :
22257   ac_cv_lib_sasl2_sasl_client_init=yes
22258 else
22259   ac_cv_lib_sasl2_sasl_client_init=no
22260 fi
22261 rm -f core conftest.err conftest.$ac_objext \
22262     conftest$ac_exeext conftest.$ac_ext
22263 LIBS=$ac_check_lib_save_LIBS
22264 fi
22265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
22266 $as_echo "$ac_cv_lib_sasl2_sasl_client_init" >&6; }
22267 if test "x$ac_cv_lib_sasl2_sasl_client_init" = x""yes; then :
22268   ol_link_sasl="-lsasl2"
22269 else
22270   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl" >&5
22271 $as_echo_n "checking for sasl_client_init in -lsasl... " >&6; }
22272 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then :
22273   $as_echo_n "(cached) " >&6
22274 else
22275   ac_check_lib_save_LIBS=$LIBS
22276 LIBS="-lsasl  $LIBS"
22277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22278 /* end confdefs.h.  */
22279
22280 /* Override any GCC internal prototype to avoid an error.
22281    Use char because int might match the return type of a GCC
22282    builtin and then its argument prototype would still apply.  */
22283 #ifdef __cplusplus
22284 extern "C"
22285 #endif
22286 char sasl_client_init ();
22287 int
22288 main ()
22289 {
22290 return sasl_client_init ();
22291   ;
22292   return 0;
22293 }
22294 _ACEOF
22295 if ac_fn_c_try_link "$LINENO"; then :
22296   ac_cv_lib_sasl_sasl_client_init=yes
22297 else
22298   ac_cv_lib_sasl_sasl_client_init=no
22299 fi
22300 rm -f core conftest.err conftest.$ac_objext \
22301     conftest$ac_exeext conftest.$ac_ext
22302 LIBS=$ac_check_lib_save_LIBS
22303 fi
22304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl_sasl_client_init" >&5
22305 $as_echo "$ac_cv_lib_sasl_sasl_client_init" >&6; }
22306 if test "x$ac_cv_lib_sasl_sasl_client_init" = x""yes; then :
22307   ol_link_sasl="-lsasl"
22308 fi
22309
22310 fi
22311
22312         fi
22313
22314         if test $ol_link_sasl = no ; then
22315                 if test $ol_with_cyrus_sasl != auto ; then
22316                         as_fn_error "Could not locate Cyrus SASL" "$LINENO" 5
22317                 else
22318                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate Cyrus SASL" >&5
22319 $as_echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
22320                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22321 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22322                         if test $ol_link_tls = no ; then
22323                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22324 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22325                         fi
22326                 fi
22327         else
22328                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Cyrus SASL library version" >&5
22329 $as_echo_n "checking Cyrus SASL library version... " >&6; }
22330 if test "${ol_cv_sasl_compat+set}" = set; then :
22331   $as_echo_n "(cached) " >&6
22332 else
22333
22334         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22335 /* end confdefs.h.  */
22336
22337 #ifdef HAVE_SASL_SASL_H
22338 #include <sasl/sasl.h>
22339 #else
22340 #include <sasl.h>
22341 #endif
22342
22343 /* Require 2.1.15+ */
22344 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22345         char *__sasl_compat = "2.2+ or better okay (we guess)";
22346 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22347         && SASL_VERSION_STEP >=15
22348         char *__sasl_compat = "2.1.15+ or better okay";
22349 #endif
22350
22351 _ACEOF
22352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22353   $EGREP "__sasl_compat" >/dev/null 2>&1; then :
22354   ol_cv_sasl_compat=yes
22355 else
22356   ol_cv_sasl_compat=no
22357 fi
22358 rm -f conftest*
22359
22360 fi
22361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sasl_compat" >&5
22362 $as_echo "$ol_cv_sasl_compat" >&6; }
22363
22364                 if test $ol_cv_sasl_compat = no ; then
22365                         ol_link_sasl=no
22366                         as_fn_error "Cyrus SASL library located but is incompatible" "$LINENO" 5
22367                 fi
22368
22369
22370 $as_echo "#define HAVE_CYRUS_SASL 1" >>confdefs.h
22371
22372                 SASL_LIBS="$ol_link_sasl"
22373                 if test $ol_enable_spasswd != no ; then
22374                         ol_link_spasswd=yes
22375                 fi
22376
22377                 ac_save_LIBS="$LIBS"
22378                 LIBS="$LIBS $ol_link_sasl"
22379                 ac_fn_c_check_func "$LINENO" "sasl_version" "ac_cv_func_sasl_version"
22380 if test "x$ac_cv_func_sasl_version" = x""yes; then :
22381
22382 $as_echo "#define HAVE_SASL_VERSION 1" >>confdefs.h
22383
22384 fi
22385
22386                 LIBS="$ac_save_LIBS"
22387
22388                 WITH_SASL=yes
22389         fi
22390
22391 else
22392         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22393 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22394         if test $ol_link_tls = no ; then
22395                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22396 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22397         fi
22398 fi
22399
22400 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
22401         dev=no
22402         if test -r /dev/urandom ; then
22403                 dev="/dev/urandom";
22404         elif test -r /idev/urandom ; then
22405                 dev="/idev/urandom";
22406         elif test -r /dev/srandom ; then
22407                 dev="/dev/srandom";
22408         elif test -r /dev/random ; then
22409                 dev="/dev/random";
22410         elif test -r /idev/random ; then
22411                 dev="/idev/random";
22412         fi
22413
22414         if test $dev != no ; then
22415
22416 cat >>confdefs.h <<_ACEOF
22417 #define URANDOM_DEVICE "$dev"
22418 _ACEOF
22419
22420         fi
22421 fi
22422
22423 ol_link_fetch=no
22424 if test $ol_with_fetch != no ; then
22425         ol_LIBS=$LIBS
22426 LIBS="-lfetch -lcom_err $LIBS"
22427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking fetch(3) library" >&5
22428 $as_echo_n "checking fetch(3) library... " >&6; }
22429 if test "${ol_cv_lib_fetch+set}" = set; then :
22430   $as_echo_n "(cached) " >&6
22431 else
22432
22433         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22434 /* end confdefs.h.  */
22435
22436 #ifdef HAVE_SYS_PARAM_H
22437 #include <sys/param.h>
22438 #endif
22439 #include <stdio.h>
22440 #include <fetch.h>
22441 int
22442 main ()
22443 {
22444 struct url *u = fetchParseURL("file:///");
22445   ;
22446   return 0;
22447 }
22448 _ACEOF
22449 if ac_fn_c_try_link "$LINENO"; then :
22450   ol_cv_lib_fetch=yes
22451 else
22452   ol_cv_lib_fetch=no
22453 fi
22454 rm -f core conftest.err conftest.$ac_objext \
22455     conftest$ac_exeext conftest.$ac_ext
22456 fi
22457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_fetch" >&5
22458 $as_echo "$ol_cv_lib_fetch" >&6; }
22459 LIBS=$ol_LIBS
22460 if test $ol_cv_lib_fetch != no ; then
22461         ol_link_fetch="-lfetch -lcom_err"
22462
22463 $as_echo "#define HAVE_FETCH 1" >>confdefs.h
22464
22465 fi
22466
22467
22468         if test $ol_cv_lib_fetch != no ; then
22469                 LIBS="$LIBS $ol_link_fetch"
22470                 ol_link_fetch=freebsd
22471
22472         elif test $ol_with_fetch != auto ; then
22473                 as_fn_error "no suitable API for --with-fetch=$ol_with_fetch" "$LINENO" 5
22474         fi
22475 fi
22476
22477 if test $ol_enable_crypt != no ; then
22478         save_LIBS="$LIBS"
22479         LIBS="$TLS_LIBS $LIBS"
22480
22481         ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
22482 if test "x$ac_cv_func_crypt" = x""yes; then :
22483   have_crypt=yes
22484 else
22485
22486                 LIBS="$save_LIBS"
22487                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
22488 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
22489 if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
22490   $as_echo_n "(cached) " >&6
22491 else
22492   ac_check_lib_save_LIBS=$LIBS
22493 LIBS="-lcrypt  $LIBS"
22494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22495 /* end confdefs.h.  */
22496
22497 /* Override any GCC internal prototype to avoid an error.
22498    Use char because int might match the return type of a GCC
22499    builtin and then its argument prototype would still apply.  */
22500 #ifdef __cplusplus
22501 extern "C"
22502 #endif
22503 char crypt ();
22504 int
22505 main ()
22506 {
22507 return crypt ();
22508   ;
22509   return 0;
22510 }
22511 _ACEOF
22512 if ac_fn_c_try_link "$LINENO"; then :
22513   ac_cv_lib_crypt_crypt=yes
22514 else
22515   ac_cv_lib_crypt_crypt=no
22516 fi
22517 rm -f core conftest.err conftest.$ac_objext \
22518     conftest$ac_exeext conftest.$ac_ext
22519 LIBS=$ac_check_lib_save_LIBS
22520 fi
22521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
22522 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
22523 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
22524   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22525                         have_crypt=yes
22526 else
22527   have_crypt=no
22528 fi
22529
22530 fi
22531
22532
22533         LIBS="$save_LIBS"
22534
22535         if test $have_crypt = yes ; then
22536
22537 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
22538
22539         else
22540                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find crypt" >&5
22541 $as_echo "$as_me: WARNING: could not find crypt" >&2;}
22542                 if test $ol_enable_crypt = yes ; then
22543                         as_fn_error "could not find crypt, select appropriate options or disable" "$LINENO" 5
22544                 fi
22545
22546                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling crypt support" >&5
22547 $as_echo "$as_me: WARNING: disabling crypt support" >&2;}
22548                 ol_enable_crypt=no
22549         fi
22550 fi
22551
22552 if test $ol_enable_proctitle != no ; then
22553         ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
22554 if test "x$ac_cv_func_setproctitle" = x""yes; then :
22555   have_setproctitle=yes
22556 else
22557
22558                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5
22559 $as_echo_n "checking for setproctitle in -lutil... " >&6; }
22560 if test "${ac_cv_lib_util_setproctitle+set}" = set; then :
22561   $as_echo_n "(cached) " >&6
22562 else
22563   ac_check_lib_save_LIBS=$LIBS
22564 LIBS="-lutil  $LIBS"
22565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22566 /* end confdefs.h.  */
22567
22568 /* Override any GCC internal prototype to avoid an error.
22569    Use char because int might match the return type of a GCC
22570    builtin and then its argument prototype would still apply.  */
22571 #ifdef __cplusplus
22572 extern "C"
22573 #endif
22574 char setproctitle ();
22575 int
22576 main ()
22577 {
22578 return setproctitle ();
22579   ;
22580   return 0;
22581 }
22582 _ACEOF
22583 if ac_fn_c_try_link "$LINENO"; then :
22584   ac_cv_lib_util_setproctitle=yes
22585 else
22586   ac_cv_lib_util_setproctitle=no
22587 fi
22588 rm -f core conftest.err conftest.$ac_objext \
22589     conftest$ac_exeext conftest.$ac_ext
22590 LIBS=$ac_check_lib_save_LIBS
22591 fi
22592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_setproctitle" >&5
22593 $as_echo "$ac_cv_lib_util_setproctitle" >&6; }
22594 if test "x$ac_cv_lib_util_setproctitle" = x""yes; then :
22595   have_setproctitle=yes
22596                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22597 else
22598   have_setproctitle=no
22599                         case " $LIBOBJS " in
22600   *" setproctitle.$ac_objext "* ) ;;
22601   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
22602  ;;
22603 esac
22604
22605                         LIBSRCS="$LIBSRCS setproctitle.c"
22606 fi
22607
22608 fi
22609
22610
22611         if test $have_setproctitle = yes ; then
22612
22613 $as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h
22614
22615         fi
22616 fi
22617
22618 if test $ol_enable_slp != no ; then
22619         for ac_header in slp.h
22620 do :
22621   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22622 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22623 eval as_val=\$$as_ac_Header
22624    if test "x$as_val" = x""yes; then :
22625   cat >>confdefs.h <<_ACEOF
22626 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22627 _ACEOF
22628
22629 fi
22630
22631 done
22632
22633
22634         if test $ac_cv_header_slp_h = yes ; then
22635                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLPOpen in -lslp" >&5
22636 $as_echo_n "checking for SLPOpen in -lslp... " >&6; }
22637 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then :
22638   $as_echo_n "(cached) " >&6
22639 else
22640   ac_check_lib_save_LIBS=$LIBS
22641 LIBS="-lslp  $LIBS"
22642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22643 /* end confdefs.h.  */
22644
22645 /* Override any GCC internal prototype to avoid an error.
22646    Use char because int might match the return type of a GCC
22647    builtin and then its argument prototype would still apply.  */
22648 #ifdef __cplusplus
22649 extern "C"
22650 #endif
22651 char SLPOpen ();
22652 int
22653 main ()
22654 {
22655 return SLPOpen ();
22656   ;
22657   return 0;
22658 }
22659 _ACEOF
22660 if ac_fn_c_try_link "$LINENO"; then :
22661   ac_cv_lib_slp_SLPOpen=yes
22662 else
22663   ac_cv_lib_slp_SLPOpen=no
22664 fi
22665 rm -f core conftest.err conftest.$ac_objext \
22666     conftest$ac_exeext conftest.$ac_ext
22667 LIBS=$ac_check_lib_save_LIBS
22668 fi
22669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slp_SLPOpen" >&5
22670 $as_echo "$ac_cv_lib_slp_SLPOpen" >&6; }
22671 if test "x$ac_cv_lib_slp_SLPOpen" = x""yes; then :
22672   have_slp=yes
22673 else
22674   have_slp=no
22675 fi
22676
22677                 if test $have_slp = yes ; then
22678
22679 $as_echo "#define HAVE_SLP 1" >>confdefs.h
22680
22681                         SLAPD_SLP_LIBS=-lslp
22682                 fi
22683
22684         elif test $ol_enable_slp = yes ; then
22685                 as_fn_error "SLP not found" "$LINENO" 5
22686         fi
22687 fi
22688
22689
22690 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
22691 if test "x$ac_cv_type_mode_t" = x""yes; then :
22692
22693 else
22694
22695 cat >>confdefs.h <<_ACEOF
22696 #define mode_t int
22697 _ACEOF
22698
22699 fi
22700
22701 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
22702 if test "x$ac_cv_type_off_t" = x""yes; then :
22703
22704 else
22705
22706 cat >>confdefs.h <<_ACEOF
22707 #define off_t long
22708 _ACEOF
22709
22710 fi
22711
22712 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
22713 if test "x$ac_cv_type_pid_t" = x""yes; then :
22714
22715 else
22716
22717 cat >>confdefs.h <<_ACEOF
22718 #define pid_t int
22719 _ACEOF
22720
22721 fi
22722
22723 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
22724 if test "x$ac_cv_type_ssize_t" = x""yes; then :
22725
22726 else
22727
22728 cat >>confdefs.h <<_ACEOF
22729 #define ssize_t signed int
22730 _ACEOF
22731
22732 fi
22733
22734 ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
22735 if test "x$ac_cv_type_caddr_t" = x""yes; then :
22736
22737 else
22738
22739 cat >>confdefs.h <<_ACEOF
22740 #define caddr_t char *
22741 _ACEOF
22742
22743 fi
22744
22745 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
22746 if test "x$ac_cv_type_size_t" = x""yes; then :
22747
22748 else
22749
22750 cat >>confdefs.h <<_ACEOF
22751 #define size_t unsigned
22752 _ACEOF
22753
22754 fi
22755
22756
22757 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
22758 if test "x$ac_cv_type_long_long" = x""yes; then :
22759
22760 cat >>confdefs.h <<_ACEOF
22761 #define HAVE_LONG_LONG 1
22762 _ACEOF
22763
22764
22765 fi
22766
22767 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
22768 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
22769
22770 cat >>confdefs.h <<_ACEOF
22771 #define HAVE_PTRDIFF_T 1
22772 _ACEOF
22773
22774
22775 fi
22776
22777
22778
22779 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default
22780 #ifdef HAVE_SYS_SOCKET_H
22781 #include <sys/socket.h>
22782 #endif
22783 "
22784 if test "x$ac_cv_type_socklen_t" = x""yes; then :
22785
22786 fi
22787
22788
22789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the type of arg 3 to accept()" >&5
22790 $as_echo_n "checking the type of arg 3 to accept()... " >&6; }
22791 if test "${ol_cv_type_ber_socklen_t+set}" = set; then :
22792   $as_echo_n "(cached) " >&6
22793 else
22794
22795         set socklen_t int unsigned "unsigned long" long size_t
22796         test "$ac_cv_type_socklen_t" = yes || shift
22797         ol_cv_type_ber_socklen_t=$1 guessing="guessing "
22798         for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
22799                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22800 /* end confdefs.h.  */
22801 $ac_includes_default
22802 #ifdef HAVE_SYS_SOCKET_H
22803 #include <sys/socket.h>
22804 #endif
22805 extern int accept(int s, $addrtype *ap, $lentype *lp);
22806
22807 int
22808 main ()
22809 {
22810
22811 accept(0, (struct sockaddr *) 0, ($lentype *) 0);
22812
22813   ;
22814   return 0;
22815 }
22816 _ACEOF
22817 if ac_fn_c_try_compile "$LINENO"; then :
22818   ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
22819 fi
22820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22821         done ; done
22822 fi
22823
22824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
22825 $as_echo "$guessing$ol_cv_type_ber_socklen_t *" >&6; }
22826
22827 cat >>confdefs.h <<_ACEOF
22828 #define ber_socklen_t $ol_cv_type_ber_socklen_t
22829 _ACEOF
22830
22831
22832 if test "$ac_cv_type_socklen_t" != yes; then
22833
22834 cat >>confdefs.h <<_ACEOF
22835 #define socklen_t $ol_cv_type_ber_socklen_t
22836 _ACEOF
22837
22838 fi
22839
22840
22841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
22842 $as_echo_n "checking return type of signal handlers... " >&6; }
22843 if test "${ac_cv_type_signal+set}" = set; then :
22844   $as_echo_n "(cached) " >&6
22845 else
22846   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22847 /* end confdefs.h.  */
22848 #include <sys/types.h>
22849 #include <signal.h>
22850
22851 int
22852 main ()
22853 {
22854 return *(signal (0, 0)) (0) == 1;
22855   ;
22856   return 0;
22857 }
22858 _ACEOF
22859 if ac_fn_c_try_compile "$LINENO"; then :
22860   ac_cv_type_signal=int
22861 else
22862   ac_cv_type_signal=void
22863 fi
22864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22865 fi
22866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
22867 $as_echo "$ac_cv_type_signal" >&6; }
22868
22869 cat >>confdefs.h <<_ACEOF
22870 #define RETSIGTYPE $ac_cv_type_signal
22871 _ACEOF
22872
22873
22874
22875 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default
22876 #include <signal.h>
22877
22878 "
22879 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
22880
22881 else
22882
22883 cat >>confdefs.h <<_ACEOF
22884 #define sig_atomic_t int
22885 _ACEOF
22886
22887 fi
22888
22889
22890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
22891 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
22892 if test "${ac_cv_type_uid_t+set}" = set; then :
22893   $as_echo_n "(cached) " >&6
22894 else
22895   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22896 /* end confdefs.h.  */
22897 #include <sys/types.h>
22898
22899 _ACEOF
22900 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22901   $EGREP "uid_t" >/dev/null 2>&1; then :
22902   ac_cv_type_uid_t=yes
22903 else
22904   ac_cv_type_uid_t=no
22905 fi
22906 rm -f conftest*
22907
22908 fi
22909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
22910 $as_echo "$ac_cv_type_uid_t" >&6; }
22911 if test $ac_cv_type_uid_t = no; then
22912
22913 $as_echo "#define uid_t int" >>confdefs.h
22914
22915
22916 $as_echo "#define gid_t int" >>confdefs.h
22917
22918 fi
22919
22920
22921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
22922 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
22923 if test "${ac_cv_header_time+set}" = set; then :
22924   $as_echo_n "(cached) " >&6
22925 else
22926   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22927 /* end confdefs.h.  */
22928 #include <sys/types.h>
22929 #include <sys/time.h>
22930 #include <time.h>
22931
22932 int
22933 main ()
22934 {
22935 if ((struct tm *) 0)
22936 return 0;
22937   ;
22938   return 0;
22939 }
22940 _ACEOF
22941 if ac_fn_c_try_compile "$LINENO"; then :
22942   ac_cv_header_time=yes
22943 else
22944   ac_cv_header_time=no
22945 fi
22946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22947 fi
22948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
22949 $as_echo "$ac_cv_header_time" >&6; }
22950 if test $ac_cv_header_time = yes; then
22951
22952 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
22953
22954 fi
22955
22956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
22957 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
22958 if test "${ac_cv_struct_tm+set}" = set; then :
22959   $as_echo_n "(cached) " >&6
22960 else
22961   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22962 /* end confdefs.h.  */
22963 #include <sys/types.h>
22964 #include <time.h>
22965
22966 int
22967 main ()
22968 {
22969 struct tm tm;
22970                                      int *p = &tm.tm_sec;
22971                                      return !p;
22972   ;
22973   return 0;
22974 }
22975 _ACEOF
22976 if ac_fn_c_try_compile "$LINENO"; then :
22977   ac_cv_struct_tm=time.h
22978 else
22979   ac_cv_struct_tm=sys/time.h
22980 fi
22981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22982 fi
22983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
22984 $as_echo "$ac_cv_struct_tm" >&6; }
22985 if test $ac_cv_struct_tm = sys/time.h; then
22986
22987 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
22988
22989 fi
22990
22991 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
22992 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
22993
22994 cat >>confdefs.h <<_ACEOF
22995 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
22996 _ACEOF
22997
22998
22999 fi
23000
23001 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "$ac_includes_default
23002 #include <pwd.h>
23003 "
23004 if test "x$ac_cv_member_struct_passwd_pw_gecos" = x""yes; then :
23005
23006 cat >>confdefs.h <<_ACEOF
23007 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
23008 _ACEOF
23009
23010
23011 fi
23012
23013 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "$ac_includes_default
23014 #include <pwd.h>
23015 "
23016 if test "x$ac_cv_member_struct_passwd_pw_passwd" = x""yes; then :
23017
23018 cat >>confdefs.h <<_ACEOF
23019 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
23020 _ACEOF
23021
23022
23023 fi
23024
23025
23026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if toupper() requires islower()" >&5
23027 $as_echo_n "checking if toupper() requires islower()... " >&6; }
23028 if test "${ol_cv_c_upper_lower+set}" = set; then :
23029   $as_echo_n "(cached) " >&6
23030 else
23031
23032         if test "$cross_compiling" = yes; then :
23033   ol_cv_c_upper_lower=safe
23034 else
23035   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23036 /* end confdefs.h.  */
23037
23038 #include <ctype.h>
23039 main()
23040 {
23041         if ('C' == toupper('C'))
23042                 exit(0);
23043         else
23044                 exit(1);
23045 }
23046 _ACEOF
23047 if ac_fn_c_try_run "$LINENO"; then :
23048   ol_cv_c_upper_lower=no
23049 else
23050   ol_cv_c_upper_lower=yes
23051 fi
23052 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23053   conftest.$ac_objext conftest.beam conftest.$ac_ext
23054 fi
23055
23056 fi
23057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_upper_lower" >&5
23058 $as_echo "$ol_cv_c_upper_lower" >&6; }
23059 if test $ol_cv_c_upper_lower != no ; then
23060
23061 $as_echo "#define C_UPPER_LOWER 1" >>confdefs.h
23062
23063 fi
23064
23065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
23066 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
23067 if test "${ac_cv_c_const+set}" = set; then :
23068   $as_echo_n "(cached) " >&6
23069 else
23070   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23071 /* end confdefs.h.  */
23072
23073 int
23074 main ()
23075 {
23076 /* FIXME: Include the comments suggested by Paul. */
23077 #ifndef __cplusplus
23078   /* Ultrix mips cc rejects this.  */
23079   typedef int charset[2];
23080   const charset cs;
23081   /* SunOS 4.1.1 cc rejects this.  */
23082   char const *const *pcpcc;
23083   char **ppc;
23084   /* NEC SVR4.0.2 mips cc rejects this.  */
23085   struct point {int x, y;};
23086   static struct point const zero = {0,0};
23087   /* AIX XL C 1.02.0.0 rejects this.
23088      It does not let you subtract one const X* pointer from another in
23089      an arm of an if-expression whose if-part is not a constant
23090      expression */
23091   const char *g = "string";
23092   pcpcc = &g + (g ? g-g : 0);
23093   /* HPUX 7.0 cc rejects these. */
23094   ++pcpcc;
23095   ppc = (char**) pcpcc;
23096   pcpcc = (char const *const *) ppc;
23097   { /* SCO 3.2v4 cc rejects this.  */
23098     char *t;
23099     char const *s = 0 ? (char *) 0 : (char const *) 0;
23100
23101     *t++ = 0;
23102     if (s) return 0;
23103   }
23104   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23105     int x[] = {25, 17};
23106     const int *foo = &x[0];
23107     ++foo;
23108   }
23109   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23110     typedef const int *iptr;
23111     iptr p = 0;
23112     ++p;
23113   }
23114   { /* AIX XL C 1.02.0.0 rejects this saying
23115        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23116     struct s { int j; const int *ap[3]; };
23117     struct s *b; b->j = 5;
23118   }
23119   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23120     const int foo = 10;
23121     if (!foo) return 0;
23122   }
23123   return !cs[0] && !zero.x;
23124 #endif
23125
23126   ;
23127   return 0;
23128 }
23129 _ACEOF
23130 if ac_fn_c_try_compile "$LINENO"; then :
23131   ac_cv_c_const=yes
23132 else
23133   ac_cv_c_const=no
23134 fi
23135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23136 fi
23137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
23138 $as_echo "$ac_cv_c_const" >&6; }
23139 if test $ac_cv_c_const = no; then
23140
23141 $as_echo "#define const /**/" >>confdefs.h
23142
23143 fi
23144
23145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler understands volatile" >&5
23146 $as_echo_n "checking if compiler understands volatile... " >&6; }
23147 if test "${ol_cv_c_volatile+set}" = set; then :
23148   $as_echo_n "(cached) " >&6
23149 else
23150   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23151 /* end confdefs.h.  */
23152 int x, y, z;
23153 int
23154 main ()
23155 {
23156 volatile int a; int * volatile b = x ? &y : &z;
23157       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23158       *b = 0;
23159   ;
23160   return 0;
23161 }
23162 _ACEOF
23163 if ac_fn_c_try_compile "$LINENO"; then :
23164   ol_cv_c_volatile=yes
23165 else
23166   ol_cv_c_volatile=no
23167 fi
23168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23169 fi
23170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_volatile" >&5
23171 $as_echo "$ol_cv_c_volatile" >&6; }
23172   if test $ol_cv_c_volatile = yes; then
23173     :
23174   else
23175
23176 $as_echo "#define volatile /**/" >>confdefs.h
23177
23178   fi
23179
23180
23181 if test $cross_compiling = yes ; then
23182         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Crossing compiling... all bets are off!" >&5
23183 $as_echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
23184
23185 $as_echo "#define CROSS_COMPILING 1" >>confdefs.h
23186
23187 else
23188          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
23189 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
23190 if test "${ac_cv_c_bigendian+set}" = set; then :
23191   $as_echo_n "(cached) " >&6
23192 else
23193   ac_cv_c_bigendian=unknown
23194     # See if we're dealing with a universal compiler.
23195     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23196 /* end confdefs.h.  */
23197 #ifndef __APPLE_CC__
23198                not a universal capable compiler
23199              #endif
23200              typedef int dummy;
23201
23202 _ACEOF
23203 if ac_fn_c_try_compile "$LINENO"; then :
23204
23205         # Check for potential -arch flags.  It is not universal unless
23206         # there are at least two -arch flags with different values.
23207         ac_arch=
23208         ac_prev=
23209         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
23210          if test -n "$ac_prev"; then
23211            case $ac_word in
23212              i?86 | x86_64 | ppc | ppc64)
23213                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
23214                  ac_arch=$ac_word
23215                else
23216                  ac_cv_c_bigendian=universal
23217                  break
23218                fi
23219                ;;
23220            esac
23221            ac_prev=
23222          elif test "x$ac_word" = "x-arch"; then
23223            ac_prev=arch
23224          fi
23225        done
23226 fi
23227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23228     if test $ac_cv_c_bigendian = unknown; then
23229       # See if sys/param.h defines the BYTE_ORDER macro.
23230       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23231 /* end confdefs.h.  */
23232 #include <sys/types.h>
23233              #include <sys/param.h>
23234
23235 int
23236 main ()
23237 {
23238 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23239                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23240                      && LITTLE_ENDIAN)
23241               bogus endian macros
23242              #endif
23243
23244   ;
23245   return 0;
23246 }
23247 _ACEOF
23248 if ac_fn_c_try_compile "$LINENO"; then :
23249   # It does; now see whether it defined to BIG_ENDIAN or not.
23250          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23251 /* end confdefs.h.  */
23252 #include <sys/types.h>
23253                 #include <sys/param.h>
23254
23255 int
23256 main ()
23257 {
23258 #if BYTE_ORDER != BIG_ENDIAN
23259                  not big endian
23260                 #endif
23261
23262   ;
23263   return 0;
23264 }
23265 _ACEOF
23266 if ac_fn_c_try_compile "$LINENO"; then :
23267   ac_cv_c_bigendian=yes
23268 else
23269   ac_cv_c_bigendian=no
23270 fi
23271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23272 fi
23273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23274     fi
23275     if test $ac_cv_c_bigendian = unknown; then
23276       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23277       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23278 /* end confdefs.h.  */
23279 #include <limits.h>
23280
23281 int
23282 main ()
23283 {
23284 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23285               bogus endian macros
23286              #endif
23287
23288   ;
23289   return 0;
23290 }
23291 _ACEOF
23292 if ac_fn_c_try_compile "$LINENO"; then :
23293   # It does; now see whether it defined to _BIG_ENDIAN or not.
23294          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23295 /* end confdefs.h.  */
23296 #include <limits.h>
23297
23298 int
23299 main ()
23300 {
23301 #ifndef _BIG_ENDIAN
23302                  not big endian
23303                 #endif
23304
23305   ;
23306   return 0;
23307 }
23308 _ACEOF
23309 if ac_fn_c_try_compile "$LINENO"; then :
23310   ac_cv_c_bigendian=yes
23311 else
23312   ac_cv_c_bigendian=no
23313 fi
23314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23315 fi
23316 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23317     fi
23318     if test $ac_cv_c_bigendian = unknown; then
23319       # Compile a test program.
23320       if test "$cross_compiling" = yes; then :
23321   # Try to guess by grepping values from an object file.
23322          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23323 /* end confdefs.h.  */
23324 short int ascii_mm[] =
23325                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23326                 short int ascii_ii[] =
23327                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23328                 int use_ascii (int i) {
23329                   return ascii_mm[i] + ascii_ii[i];
23330                 }
23331                 short int ebcdic_ii[] =
23332                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23333                 short int ebcdic_mm[] =
23334                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23335                 int use_ebcdic (int i) {
23336                   return ebcdic_mm[i] + ebcdic_ii[i];
23337                 }
23338                 extern int foo;
23339
23340 int
23341 main ()
23342 {
23343 return use_ascii (foo) == use_ebcdic (foo);
23344   ;
23345   return 0;
23346 }
23347 _ACEOF
23348 if ac_fn_c_try_compile "$LINENO"; then :
23349   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
23350               ac_cv_c_bigendian=yes
23351             fi
23352             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23353               if test "$ac_cv_c_bigendian" = unknown; then
23354                 ac_cv_c_bigendian=no
23355               else
23356                 # finding both strings is unlikely to happen, but who knows?
23357                 ac_cv_c_bigendian=unknown
23358               fi
23359             fi
23360 fi
23361 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23362 else
23363   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23364 /* end confdefs.h.  */
23365 $ac_includes_default
23366 int
23367 main ()
23368 {
23369
23370              /* Are we little or big endian?  From Harbison&Steele.  */
23371              union
23372              {
23373                long int l;
23374                char c[sizeof (long int)];
23375              } u;
23376              u.l = 1;
23377              return u.c[sizeof (long int) - 1] == 1;
23378
23379   ;
23380   return 0;
23381 }
23382 _ACEOF
23383 if ac_fn_c_try_run "$LINENO"; then :
23384   ac_cv_c_bigendian=no
23385 else
23386   ac_cv_c_bigendian=yes
23387 fi
23388 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23389   conftest.$ac_objext conftest.beam conftest.$ac_ext
23390 fi
23391
23392     fi
23393 fi
23394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
23395 $as_echo "$ac_cv_c_bigendian" >&6; }
23396  case $ac_cv_c_bigendian in #(
23397    yes)
23398      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
23399 ;; #(
23400    no)
23401       ;; #(
23402    universal)
23403
23404 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
23405
23406      ;; #(
23407    *)
23408      as_fn_error "unknown endianness
23409  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
23410  esac
23411
23412 fi
23413
23414 # The cast to long int works around a bug in the HP C Compiler
23415 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23416 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23417 # This bug is HP SR number 8606223364.
23418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23419 $as_echo_n "checking size of short... " >&6; }
23420 if test "${ac_cv_sizeof_short+set}" = set; then :
23421   $as_echo_n "(cached) " >&6
23422 else
23423   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23424
23425 else
23426   if test "$ac_cv_type_short" = yes; then
23427      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23428 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23429 { as_fn_set_status 77
23430 as_fn_error "cannot compute sizeof (short)
23431 See \`config.log' for more details." "$LINENO" 5; }; }
23432    else
23433      ac_cv_sizeof_short=0
23434    fi
23435 fi
23436
23437 fi
23438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23439 $as_echo "$ac_cv_sizeof_short" >&6; }
23440
23441
23442
23443 cat >>confdefs.h <<_ACEOF
23444 #define SIZEOF_SHORT $ac_cv_sizeof_short
23445 _ACEOF
23446
23447
23448 # The cast to long int works around a bug in the HP C Compiler
23449 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23450 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23451 # This bug is HP SR number 8606223364.
23452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23453 $as_echo_n "checking size of int... " >&6; }
23454 if test "${ac_cv_sizeof_int+set}" = set; then :
23455   $as_echo_n "(cached) " >&6
23456 else
23457   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23458
23459 else
23460   if test "$ac_cv_type_int" = yes; then
23461      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23462 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23463 { as_fn_set_status 77
23464 as_fn_error "cannot compute sizeof (int)
23465 See \`config.log' for more details." "$LINENO" 5; }; }
23466    else
23467      ac_cv_sizeof_int=0
23468    fi
23469 fi
23470
23471 fi
23472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23473 $as_echo "$ac_cv_sizeof_int" >&6; }
23474
23475
23476
23477 cat >>confdefs.h <<_ACEOF
23478 #define SIZEOF_INT $ac_cv_sizeof_int
23479 _ACEOF
23480
23481
23482 # The cast to long int works around a bug in the HP C Compiler
23483 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23484 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23485 # This bug is HP SR number 8606223364.
23486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23487 $as_echo_n "checking size of long... " >&6; }
23488 if test "${ac_cv_sizeof_long+set}" = set; then :
23489   $as_echo_n "(cached) " >&6
23490 else
23491   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23492
23493 else
23494   if test "$ac_cv_type_long" = yes; then
23495      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23496 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23497 { as_fn_set_status 77
23498 as_fn_error "cannot compute sizeof (long)
23499 See \`config.log' for more details." "$LINENO" 5; }; }
23500    else
23501      ac_cv_sizeof_long=0
23502    fi
23503 fi
23504
23505 fi
23506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23507 $as_echo "$ac_cv_sizeof_long" >&6; }
23508
23509
23510
23511 cat >>confdefs.h <<_ACEOF
23512 #define SIZEOF_LONG $ac_cv_sizeof_long
23513 _ACEOF
23514
23515
23516 # The cast to long int works around a bug in the HP C Compiler
23517 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23518 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23519 # This bug is HP SR number 8606223364.
23520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
23521 $as_echo_n "checking size of long long... " >&6; }
23522 if test "${ac_cv_sizeof_long_long+set}" = set; then :
23523   $as_echo_n "(cached) " >&6
23524 else
23525   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
23526
23527 else
23528   if test "$ac_cv_type_long_long" = yes; then
23529      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23530 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23531 { as_fn_set_status 77
23532 as_fn_error "cannot compute sizeof (long long)
23533 See \`config.log' for more details." "$LINENO" 5; }; }
23534    else
23535      ac_cv_sizeof_long_long=0
23536    fi
23537 fi
23538
23539 fi
23540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
23541 $as_echo "$ac_cv_sizeof_long_long" >&6; }
23542
23543
23544
23545 cat >>confdefs.h <<_ACEOF
23546 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
23547 _ACEOF
23548
23549
23550 # The cast to long int works around a bug in the HP C Compiler
23551 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23552 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23553 # This bug is HP SR number 8606223364.
23554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
23555 $as_echo_n "checking size of wchar_t... " >&6; }
23556 if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
23557   $as_echo_n "(cached) " >&6
23558 else
23559   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "$ac_includes_default"; then :
23560
23561 else
23562   if test "$ac_cv_type_wchar_t" = yes; then
23563      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23564 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23565 { as_fn_set_status 77
23566 as_fn_error "cannot compute sizeof (wchar_t)
23567 See \`config.log' for more details." "$LINENO" 5; }; }
23568    else
23569      ac_cv_sizeof_wchar_t=0
23570    fi
23571 fi
23572
23573 fi
23574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
23575 $as_echo "$ac_cv_sizeof_wchar_t" >&6; }
23576
23577
23578
23579 cat >>confdefs.h <<_ACEOF
23580 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23581 _ACEOF
23582
23583
23584
23585 if test "$ac_cv_sizeof_int" -lt 4 ; then
23586         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
23587 $as_echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
23588
23589
23590 $as_echo "#define LBER_INT_T long" >>confdefs.h
23591
23592 else
23593
23594 $as_echo "#define LBER_INT_T int" >>confdefs.h
23595
23596 fi
23597
23598
23599 $as_echo "#define LBER_LEN_T long" >>confdefs.h
23600
23601
23602 $as_echo "#define LBER_SOCKET_T int" >>confdefs.h
23603
23604
23605 $as_echo "#define LBER_TAG_T long" >>confdefs.h
23606
23607
23608 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
23609         if test $ac_cv_sizeof_long_long -gt 4 ; then
23610                 ol_with_mp=longlong
23611
23612 $as_echo "#define USE_MP_LONG_LONG 1" >>confdefs.h
23613
23614         elif test $ol_with_mp = longlong ; then
23615                 as_fn_error "long long unusable for multiple precision" "$LINENO" 5
23616         fi
23617 fi
23618 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
23619         if test $ac_cv_sizeof_long -gt 4 ; then
23620                 ol_with_mp=long
23621
23622 $as_echo "#define USE_MP_LONG 1" >>confdefs.h
23623
23624         elif test $ol_with_mp = long ; then
23625                 as_fn_error "long unusable for multiple precision" "$LINENO" 5
23626         fi
23627 fi
23628 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
23629         for ac_header in openssl/bn.h
23630 do :
23631   ac_fn_c_check_header_mongrel "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default"
23632 if test "x$ac_cv_header_openssl_bn_h" = x""yes; then :
23633   cat >>confdefs.h <<_ACEOF
23634 #define HAVE_OPENSSL_BN_H 1
23635 _ACEOF
23636
23637 fi
23638
23639 done
23640
23641         for ac_header in openssl/crypto.h
23642 do :
23643   ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
23644 if test "x$ac_cv_header_openssl_crypto_h" = x""yes; then :
23645   cat >>confdefs.h <<_ACEOF
23646 #define HAVE_OPENSSL_CRYPTO_H 1
23647 _ACEOF
23648
23649 fi
23650
23651 done
23652
23653         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
23654                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
23655                 test "$ol_with_tls" = "found" ; then
23656                 ol_with_mp=bignum
23657
23658 $as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h
23659
23660         elif test $ol_with_mp = bignum ; then
23661                 as_fn_error "bignum not available" "$LINENO" 5
23662         fi
23663 fi
23664 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
23665         for ac_header in gmp.h
23666 do :
23667   ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
23668 if test "x$ac_cv_header_gmp_h" = x""yes; then :
23669   cat >>confdefs.h <<_ACEOF
23670 #define HAVE_GMP_H 1
23671 _ACEOF
23672
23673 fi
23674
23675 done
23676
23677         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_add_ui in -lgmp" >&5
23678 $as_echo_n "checking for __gmpz_add_ui in -lgmp... " >&6; }
23679 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then :
23680   $as_echo_n "(cached) " >&6
23681 else
23682   ac_check_lib_save_LIBS=$LIBS
23683 LIBS="-lgmp  $LIBS"
23684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23685 /* end confdefs.h.  */
23686
23687 /* Override any GCC internal prototype to avoid an error.
23688    Use char because int might match the return type of a GCC
23689    builtin and then its argument prototype would still apply.  */
23690 #ifdef __cplusplus
23691 extern "C"
23692 #endif
23693 char __gmpz_add_ui ();
23694 int
23695 main ()
23696 {
23697 return __gmpz_add_ui ();
23698   ;
23699   return 0;
23700 }
23701 _ACEOF
23702 if ac_fn_c_try_link "$LINENO"; then :
23703   ac_cv_lib_gmp___gmpz_add_ui=yes
23704 else
23705   ac_cv_lib_gmp___gmpz_add_ui=no
23706 fi
23707 rm -f core conftest.err conftest.$ac_objext \
23708     conftest$ac_exeext conftest.$ac_ext
23709 LIBS=$ac_check_lib_save_LIBS
23710 fi
23711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
23712 $as_echo "$ac_cv_lib_gmp___gmpz_add_ui" >&6; }
23713 if test "x$ac_cv_lib_gmp___gmpz_add_ui" = x""yes; then :
23714   cat >>confdefs.h <<_ACEOF
23715 #define HAVE_LIBGMP 1
23716 _ACEOF
23717
23718   LIBS="-lgmp $LIBS"
23719
23720 fi
23721
23722         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
23723
23724 $as_echo "#define USE_MP_GMP 1" >>confdefs.h
23725
23726                 ol_with_mp=gmp
23727         elif test $ol_with_mp = gmp ; then
23728                 as_fn_error "gmp not available" "$LINENO" 5
23729         fi
23730 fi
23731 if test $ol_with_mp = auto ; then
23732         ol_with_mp=no
23733 fi
23734
23735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
23736 $as_echo_n "checking for working memcmp... " >&6; }
23737 if test "${ac_cv_func_memcmp_working+set}" = set; then :
23738   $as_echo_n "(cached) " >&6
23739 else
23740   if test "$cross_compiling" = yes; then :
23741   ac_cv_func_memcmp_working=no
23742 else
23743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23744 /* end confdefs.h.  */
23745 $ac_includes_default
23746 int
23747 main ()
23748 {
23749
23750   /* Some versions of memcmp are not 8-bit clean.  */
23751   char c0 = '\100', c1 = '\200', c2 = '\201';
23752   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
23753     return 1;
23754
23755   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
23756      or more and with at least one buffer not starting on a 4-byte boundary.
23757      William Lewis provided this test program.   */
23758   {
23759     char foo[21];
23760     char bar[21];
23761     int i;
23762     for (i = 0; i < 4; i++)
23763       {
23764         char *a = foo + i;
23765         char *b = bar + i;
23766         strcpy (a, "--------01111111");
23767         strcpy (b, "--------10000000");
23768         if (memcmp (a, b, 16) >= 0)
23769           return 1;
23770       }
23771     return 0;
23772   }
23773
23774   ;
23775   return 0;
23776 }
23777 _ACEOF
23778 if ac_fn_c_try_run "$LINENO"; then :
23779   ac_cv_func_memcmp_working=yes
23780 else
23781   ac_cv_func_memcmp_working=no
23782 fi
23783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23784   conftest.$ac_objext conftest.beam conftest.$ac_ext
23785 fi
23786
23787 fi
23788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
23789 $as_echo "$ac_cv_func_memcmp_working" >&6; }
23790 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
23791   *" memcmp.$ac_objext "* ) ;;
23792   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
23793  ;;
23794 esac
23795
23796
23797
23798 if test $ac_cv_func_memcmp_working = no ; then
23799
23800 $as_echo "#define NEED_MEMCMP_REPLACEMENT 1" >>confdefs.h
23801
23802 fi
23803
23804 for ac_func in strftime
23805 do :
23806   ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23807 if test "x$ac_cv_func_strftime" = x""yes; then :
23808   cat >>confdefs.h <<_ACEOF
23809 #define HAVE_STRFTIME 1
23810 _ACEOF
23811
23812 else
23813   # strftime is in -lintl on SCO UNIX.
23814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
23815 $as_echo_n "checking for strftime in -lintl... " >&6; }
23816 if test "${ac_cv_lib_intl_strftime+set}" = set; then :
23817   $as_echo_n "(cached) " >&6
23818 else
23819   ac_check_lib_save_LIBS=$LIBS
23820 LIBS="-lintl  $LIBS"
23821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23822 /* end confdefs.h.  */
23823
23824 /* Override any GCC internal prototype to avoid an error.
23825    Use char because int might match the return type of a GCC
23826    builtin and then its argument prototype would still apply.  */
23827 #ifdef __cplusplus
23828 extern "C"
23829 #endif
23830 char strftime ();
23831 int
23832 main ()
23833 {
23834 return strftime ();
23835   ;
23836   return 0;
23837 }
23838 _ACEOF
23839 if ac_fn_c_try_link "$LINENO"; then :
23840   ac_cv_lib_intl_strftime=yes
23841 else
23842   ac_cv_lib_intl_strftime=no
23843 fi
23844 rm -f core conftest.err conftest.$ac_objext \
23845     conftest$ac_exeext conftest.$ac_ext
23846 LIBS=$ac_check_lib_save_LIBS
23847 fi
23848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
23849 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
23850 if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
23851   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
23852
23853 LIBS="-lintl $LIBS"
23854 fi
23855
23856 fi
23857 done
23858
23859
23860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton()" >&5
23861 $as_echo_n "checking for inet_aton()... " >&6; }
23862 if test "${ol_cv_func_inet_aton+set}" = set; then :
23863   $as_echo_n "(cached) " >&6
23864 else
23865   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23866 /* end confdefs.h.  */
23867
23868 #ifdef HAVE_SYS_TYPES_H
23869 #       include <sys/types.h>
23870 #endif
23871 #ifdef HAVE_SYS_SOCKET_H
23872 #       include <sys/socket.h>
23873 #       ifdef HAVE_SYS_SELECT_H
23874 #               include <sys/select.h>
23875 #       endif
23876 #       include <netinet/in.h>
23877 #       ifdef HAVE_ARPA_INET_H
23878 #               include <arpa/inet.h>
23879 #       endif
23880 #endif
23881
23882 int
23883 main ()
23884 {
23885 struct in_addr in;
23886 int rc = inet_aton( "255.255.255.255", &in );
23887   ;
23888   return 0;
23889 }
23890 _ACEOF
23891 if ac_fn_c_try_link "$LINENO"; then :
23892   ol_cv_func_inet_aton=yes
23893 else
23894   ol_cv_func_inet_aton=no
23895 fi
23896 rm -f core conftest.err conftest.$ac_objext \
23897     conftest$ac_exeext conftest.$ac_ext
23898 fi
23899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_inet_aton" >&5
23900 $as_echo "$ol_cv_func_inet_aton" >&6; }
23901   if test $ol_cv_func_inet_aton != no; then
23902
23903 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
23904
23905   fi
23906
23907
23908 ac_fn_c_check_func "$LINENO" "_spawnlp" "ac_cv_func__spawnlp"
23909 if test "x$ac_cv_func__spawnlp" = x""yes; then :
23910
23911 $as_echo "#define HAVE_SPAWNLP 1" >>confdefs.h
23912
23913 fi
23914
23915
23916 ac_fn_c_check_func "$LINENO" "_snprintf" "ac_cv_func__snprintf"
23917 if test "x$ac_cv_func__snprintf" = x""yes; then :
23918   ac_cv_func_snprintf=yes
23919
23920 $as_echo "#define snprintf _snprintf" >>confdefs.h
23921
23922
23923 fi
23924
23925
23926 for ac_func in vsnprintf _vsnprintf
23927 do :
23928   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23929 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23930 eval as_val=\$$as_ac_var
23931    if test "x$as_val" = x""yes; then :
23932   cat >>confdefs.h <<_ACEOF
23933 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23934 _ACEOF
23935
23936 fi
23937 done
23938
23939
23940 if test $ac_cv_func_vsnprintf = no -a $ac_cv_func__vsnprintf = yes ; then
23941         ac_cv_func_vsnprintf=yes
23942
23943 $as_echo "#define vsnprintf _vsnprintf" >>confdefs.h
23944
23945 fi
23946
23947 for ac_func in vprintf
23948 do :
23949   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
23950 if test "x$ac_cv_func_vprintf" = x""yes; then :
23951   cat >>confdefs.h <<_ACEOF
23952 #define HAVE_VPRINTF 1
23953 _ACEOF
23954
23955 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
23956 if test "x$ac_cv_func__doprnt" = x""yes; then :
23957
23958 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
23959
23960 fi
23961
23962 fi
23963 done
23964
23965
23966
23967 if test $ac_cv_func_vprintf = yes ; then
23968                 for ac_func in snprintf vsnprintf
23969 do :
23970   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23971 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23972 eval as_val=\$$as_ac_var
23973    if test "x$as_val" = x""yes; then :
23974   cat >>confdefs.h <<_ACEOF
23975 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23976 _ACEOF
23977
23978 fi
23979 done
23980
23981 fi
23982
23983 for ac_func in \
23984         bcopy                   \
23985         closesocket             \
23986         chroot                  \
23987         endgrent                \
23988         endpwent                \
23989         fcntl                   \
23990         flock                   \
23991         fstat                   \
23992         getdtablesize           \
23993         geteuid                 \
23994         getgrgid                \
23995         gethostname             \
23996         getpassphrase           \
23997         getpwuid                \
23998         getpwnam                \
23999         getspnam                \
24000         gettimeofday            \
24001         initgroups              \
24002         inet_ntoa_b             \
24003         ioctl                   \
24004         lockf                   \
24005         memcpy                  \
24006         memmove                 \
24007         memrchr                 \
24008         mkstemp                 \
24009         mktemp                  \
24010         pipe                    \
24011         read                    \
24012         recv                    \
24013         recvfrom                \
24014         setpwfile               \
24015         setgid                  \
24016         setegid                 \
24017         setsid                  \
24018         setuid                  \
24019         seteuid                 \
24020         signal                  \
24021         strdup                  \
24022         strpbrk                 \
24023         strrchr                 \
24024         strsep                  \
24025         strstr                  \
24026         strtol                  \
24027         strtoul                 \
24028         strtoq                  \
24029         strtouq                 \
24030         strtoll                 \
24031         strtoull                \
24032         strspn                  \
24033         sysconf                 \
24034         waitpid                 \
24035         wait4                   \
24036         write                   \
24037         send                    \
24038         sendmsg                 \
24039         sendto                  \
24040
24041 do :
24042   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24043 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24044 eval as_val=\$$as_ac_var
24045    if test "x$as_val" = x""yes; then :
24046   cat >>confdefs.h <<_ACEOF
24047 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24048 _ACEOF
24049
24050 fi
24051 done
24052
24053
24054 for ac_func in getopt getpeereid
24055 do :
24056   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24057 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24058 eval as_val=\$$as_ac_var
24059    if test "x$as_val" = x""yes; then :
24060   cat >>confdefs.h <<_ACEOF
24061 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24062 _ACEOF
24063
24064 else
24065   case " $LIBOBJS " in
24066   *" $ac_func.$ac_objext "* ) ;;
24067   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
24068  ;;
24069 esac
24070
24071 fi
24072 done
24073
24074
24075
24076 if test "$ac_cv_func_getopt" != yes; then
24077         LIBSRCS="$LIBSRCS getopt.c"
24078 fi
24079
24080 if test "$ac_cv_func_getpeereid" != yes; then
24081         for ac_func in getpeerucred
24082 do :
24083   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24084 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24085 eval as_val=\$$as_ac_var
24086    if test "x$as_val" = x""yes; then :
24087   cat >>confdefs.h <<_ACEOF
24088 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24089 _ACEOF
24090
24091 fi
24092 done
24093
24094         if test "$ac_cv_func_getpeerucred" != yes ; then
24095                 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrightslen" "ac_cv_member_struct_msghdr_msg_accrightslen" "$ac_includes_default
24096 #ifdef HAVE_SYS_SOCKET_H
24097 #include <sys/socket.h>
24098 #endif
24099 "
24100 if test "x$ac_cv_member_struct_msghdr_msg_accrightslen" = x""yes; then :
24101
24102 cat >>confdefs.h <<_ACEOF
24103 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
24104 _ACEOF
24105
24106
24107 fi
24108
24109                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
24110                         ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "$ac_includes_default
24111 #ifdef HAVE_SYS_SOCKET_H
24112 #include <sys/socket.h>
24113 #endif
24114 "
24115 if test "x$ac_cv_member_struct_msghdr_msg_control" = x""yes; then :
24116
24117 cat >>confdefs.h <<_ACEOF
24118 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
24119 _ACEOF
24120
24121
24122 fi
24123
24124                 fi
24125                 ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default"
24126 if test "x$ac_cv_member_struct_stat_st_fstype" = x""yes; then :
24127
24128 cat >>confdefs.h <<_ACEOF
24129 #define HAVE_STRUCT_STAT_ST_FSTYPE 1
24130 _ACEOF
24131
24132
24133 fi
24134 ac_fn_c_check_member "$LINENO" "struct stat" "st_vfstype" "ac_cv_member_struct_stat_st_vfstype" "$ac_includes_default"
24135 if test "x$ac_cv_member_struct_stat_st_vfstype" = x""yes; then :
24136
24137 cat >>confdefs.h <<_ACEOF
24138 #define HAVE_STRUCT_STAT_ST_VFSTYPE 1
24139 _ACEOF
24140
24141
24142 fi
24143
24144                 if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
24145                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24146 /* end confdefs.h.  */
24147 struct stat st; char *ptr=st.st_fstype;
24148 _ACEOF
24149 if ac_fn_c_try_compile "$LINENO"; then :
24150
24151 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1" >>confdefs.h
24152
24153 else
24154
24155 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1" >>confdefs.h
24156
24157 fi
24158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24159                 fi
24160         fi
24161         LIBSRCS="$LIBSRCS getpeereid.c"
24162 fi
24163
24164 if test "$ac_cv_func_snprintf" != yes ||
24165    test "$ac_cv_func_vsnprintf" != yes; then
24166         if test "$ac_cv_func_snprintf" != yes; then
24167
24168 $as_echo "#define snprintf ber_pvt_snprintf" >>confdefs.h
24169
24170         fi
24171         if test "$ac_cv_func_vsnprintf" != yes; then
24172
24173 $as_echo "#define vsnprintf ber_pvt_vsnprintf" >>confdefs.h
24174
24175         fi
24176 fi
24177
24178
24179 if test "$ol_enable_slapi" != no ; then
24180                         for ac_header in ltdl.h
24181 do :
24182   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
24183 if test "x$ac_cv_header_ltdl_h" = x""yes; then :
24184   cat >>confdefs.h <<_ACEOF
24185 #define HAVE_LTDL_H 1
24186 _ACEOF
24187
24188 fi
24189
24190 done
24191
24192
24193         if test $ac_cv_header_ltdl_h != yes ; then
24194                 as_fn_error "could not locate <ltdl.h>" "$LINENO" 5
24195         fi
24196         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
24197 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
24198 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
24199   $as_echo_n "(cached) " >&6
24200 else
24201   ac_check_lib_save_LIBS=$LIBS
24202 LIBS="-lltdl  $LIBS"
24203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24204 /* end confdefs.h.  */
24205
24206 /* Override any GCC internal prototype to avoid an error.
24207    Use char because int might match the return type of a GCC
24208    builtin and then its argument prototype would still apply.  */
24209 #ifdef __cplusplus
24210 extern "C"
24211 #endif
24212 char lt_dlinit ();
24213 int
24214 main ()
24215 {
24216 return lt_dlinit ();
24217   ;
24218   return 0;
24219 }
24220 _ACEOF
24221 if ac_fn_c_try_link "$LINENO"; then :
24222   ac_cv_lib_ltdl_lt_dlinit=yes
24223 else
24224   ac_cv_lib_ltdl_lt_dlinit=no
24225 fi
24226 rm -f core conftest.err conftest.$ac_objext \
24227     conftest$ac_exeext conftest.$ac_ext
24228 LIBS=$ac_check_lib_save_LIBS
24229 fi
24230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
24231 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
24232 if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
24233
24234                 SLAPI_LIBS=-lltdl
24235                 LIBSLAPI=slapi/libslapi.la
24236
24237 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
24238
24239
24240 else
24241   as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
24242 fi
24243
24244
24245
24246 $as_echo "#define LDAP_SLAPI 1" >>confdefs.h
24247
24248 fi
24249
24250 if test "$ol_enable_debug" != no ; then
24251         if test "$ol_enable_debug" = traditional; then
24252
24253 $as_echo "#define OLD_DEBUG 1" >>confdefs.h
24254
24255         fi
24256
24257 $as_echo "#define LDAP_DEBUG 1" >>confdefs.h
24258
24259 fi
24260 if test "$ol_enable_syslog" = yes ; then
24261
24262 $as_echo "#define LDAP_SYSLOG 1" >>confdefs.h
24263
24264 fi
24265 if test "$ol_enable_proctitle" != no ; then
24266
24267 $as_echo "#define LDAP_PROCTITLE 1" >>confdefs.h
24268
24269 fi
24270 if test "$ol_enable_referrals" != no ; then
24271
24272 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION" >>confdefs.h
24273
24274 fi
24275 if test "$ol_enable_local" != no; then
24276
24277 $as_echo "#define LDAP_PF_LOCAL 1" >>confdefs.h
24278
24279 fi
24280 if test "$ol_link_ipv6" != no; then
24281
24282 $as_echo "#define LDAP_PF_INET6 1" >>confdefs.h
24283
24284 fi
24285 if test "$ol_enable_cleartext" != no ; then
24286
24287 $as_echo "#define SLAPD_CLEARTEXT 1" >>confdefs.h
24288
24289 fi
24290 if test "$ol_enable_crypt" != no ; then
24291
24292 $as_echo "#define SLAPD_CRYPT 1" >>confdefs.h
24293
24294 fi
24295 if test "$ol_link_spasswd" != no ; then
24296
24297 $as_echo "#define SLAPD_SPASSWD 1" >>confdefs.h
24298
24299 fi
24300 if test "$ol_enable_rlookups" != no ; then
24301
24302 $as_echo "#define SLAPD_RLOOKUPS 1" >>confdefs.h
24303
24304 fi
24305 if test "$ol_enable_aci" != no ; then
24306         if test $ol_enable_dynacl = no ; then
24307                 ol_enable_dynacl=yes
24308                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ACIs need dynacl" >&5
24309 $as_echo "$as_me: WARNING: ACIs need dynacl" >&2;}
24310         fi
24311         if test "$ol_enable_aci" = mod ; then
24312                 MFLAG=SLAPD_MOD_DYNAMIC
24313                                 as_fn_error "ACI build as dynamic module not supported (yet)" "$LINENO" 5
24314         else
24315                 MFLAG=SLAPD_MOD_STATIC
24316         fi
24317         WITH_ACI_ENABLED=$ol_enable_aci
24318
24319 cat >>confdefs.h <<_ACEOF
24320 #define SLAPD_ACI_ENABLED $MFLAG
24321 _ACEOF
24322
24323 else
24324         WITH_ACI_ENABLED=no
24325 fi
24326 if test "$ol_enable_dynacl" != no ; then
24327
24328 $as_echo "#define SLAP_DYNACL 1" >>confdefs.h
24329
24330 fi
24331
24332 if test "$ol_link_modules" != no ; then
24333
24334 $as_echo "#define SLAPD_MODULES 1" >>confdefs.h
24335
24336         BUILD_SLAPD=yes
24337         SLAPD_MODULES_LDFLAGS="-dlopen self"
24338 fi
24339
24340
24341 $as_echo "#define SLAPD_MOD_STATIC 1" >>confdefs.h
24342
24343
24344 $as_echo "#define SLAPD_MOD_DYNAMIC 2" >>confdefs.h
24345
24346
24347 if test "$ol_enable_monitor" != no ; then
24348         BUILD_SLAPD=yes
24349         BUILD_MONITOR=$ol_enable_monitor
24350         if test "$ol_enable_monitor" = mod ; then
24351                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24352                 MFLAG=SLAPD_MOD_DYNAMIC
24353         else
24354                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24355                 MFLAG=SLAPD_MOD_STATIC
24356         fi
24357
24358 cat >>confdefs.h <<_ACEOF
24359 #define SLAPD_MONITOR $MFLAG
24360 _ACEOF
24361
24362 fi
24363
24364 if test "$ol_enable_bdb" != no ; then
24365         BUILD_SLAPD=yes
24366         BUILD_BDB=$ol_enable_bdb
24367         if test "$ol_enable_bdb" = mod ; then
24368                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24369                 MFLAG=SLAPD_MOD_DYNAMIC
24370         else
24371                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24372                 MFLAG=SLAPD_MOD_STATIC
24373         fi
24374
24375 cat >>confdefs.h <<_ACEOF
24376 #define SLAPD_BDB $MFLAG
24377 _ACEOF
24378
24379 fi
24380
24381 if test "$ol_enable_dnssrv" != no ; then
24382         BUILD_SLAPD=yes
24383         BUILD_DNSSRV=$ol_enable_dnssrv
24384         if test "$ol_enable_dnssrv" = mod ; then
24385                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24386                 MFLAG=SLAPD_MOD_DYNAMIC
24387         else
24388                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24389                 MFLAG=SLAPD_MOD_STATIC
24390         fi
24391
24392 cat >>confdefs.h <<_ACEOF
24393 #define SLAPD_DNSSRV $MFLAG
24394 _ACEOF
24395
24396 fi
24397
24398 if test "$ol_enable_hdb" != no ; then
24399         BUILD_SLAPD=yes
24400         BUILD_HDB=$ol_enable_hdb
24401         if test "$ol_enable_hdb" = mod ; then
24402                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24403                 MFLAG=SLAPD_MOD_DYNAMIC
24404         else
24405                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24406                 MFLAG=SLAPD_MOD_STATIC
24407         fi
24408
24409 cat >>confdefs.h <<_ACEOF
24410 #define SLAPD_HDB $MFLAG
24411 _ACEOF
24412
24413 fi
24414
24415 if test "$ol_enable_ldap" != no ; then
24416         BUILD_SLAPD=yes
24417         BUILD_LDAP=$ol_enable_ldap
24418         if test "$ol_enable_ldap" = mod ; then
24419                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24420                 MFLAG=SLAPD_MOD_DYNAMIC
24421         else
24422                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24423                 MFLAG=SLAPD_MOD_STATIC
24424         fi
24425
24426 cat >>confdefs.h <<_ACEOF
24427 #define SLAPD_LDAP $MFLAG
24428 _ACEOF
24429
24430 fi
24431
24432 if test "$ol_enable_mdb" != no ; then
24433         BUILD_SLAPD=yes
24434         BUILD_MDB=$ol_enable_mdb
24435         if test "$ol_enable_mdb" = mod ; then
24436                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-mdb"
24437                 MFLAG=SLAPD_MOD_DYNAMIC
24438         else
24439                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-mdb"
24440                 MFLAG=SLAPD_MOD_STATIC
24441         fi
24442
24443 cat >>confdefs.h <<_ACEOF
24444 #define SLAPD_MDB $MFLAG
24445 _ACEOF
24446
24447 fi
24448
24449 if test "$ol_enable_meta" != no ; then
24450         BUILD_SLAPD=yes
24451         BUILD_META=$ol_enable_meta
24452         BUILD_REWRITE=yes
24453         if test "$ol_enable_meta" = mod ; then
24454                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24455                 MFLAG=SLAPD_MOD_DYNAMIC
24456         else
24457                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24458                 MFLAG=SLAPD_MOD_STATIC
24459         fi
24460
24461 cat >>confdefs.h <<_ACEOF
24462 #define SLAPD_META $MFLAG
24463 _ACEOF
24464
24465 fi
24466
24467 if test "$ol_enable_asyncmeta" != no ; then
24468         BUILD_SLAPD=yes
24469         BUILD_ASYNCMETA=$ol_enable_asyncmeta
24470         BUILD_REWRITE=yes
24471         if test "$ol_enable_asyncmeta" = mod ; then
24472                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-asyncmeta"
24473                 MFLAG=SLAPD_MOD_DYNAMIC
24474         else
24475                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-asyncmeta"
24476                 MFLAG=SLAPD_MOD_STATIC
24477         fi
24478
24479 cat >>confdefs.h <<_ACEOF
24480 #define SLAPD_ASYNCMETA $MFLAG
24481 _ACEOF
24482
24483 fi
24484
24485 if test "$ol_enable_ndb" != no ; then
24486         BUILD_SLAPD=yes
24487         BUILD_NDB=$ol_enable_ndb
24488         if test "$ol_enable_ndb" = mod ; then
24489                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ndb"
24490                 MFLAG=SLAPD_MOD_DYNAMIC
24491         else
24492                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ndb"
24493                 MFLAG=SLAPD_MOD_STATIC
24494         fi
24495
24496 cat >>confdefs.h <<_ACEOF
24497 #define SLAPD_NDB $MFLAG
24498 _ACEOF
24499
24500 fi
24501
24502 if test "$ol_enable_null" != no ; then
24503         BUILD_SLAPD=yes
24504         BUILD_NULL=$ol_enable_null
24505         if test "$ol_enable_null" = mod ; then
24506                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24507                 MFLAG=SLAPD_MOD_DYNAMIC
24508         else
24509                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24510                 MFLAG=SLAPD_MOD_STATIC
24511         fi
24512
24513 cat >>confdefs.h <<_ACEOF
24514 #define SLAPD_NULL $MFLAG
24515 _ACEOF
24516
24517 fi
24518
24519 if test "$ol_enable_passwd" != no ; then
24520         BUILD_SLAPD=yes
24521         BUILD_PASSWD=$ol_enable_passwd
24522         if test "$ol_enable_passwd" = mod ; then
24523                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24524                 MFLAG=SLAPD_MOD_DYNAMIC
24525         else
24526                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24527                 MFLAG=SLAPD_MOD_STATIC
24528         fi
24529
24530 cat >>confdefs.h <<_ACEOF
24531 #define SLAPD_PASSWD $MFLAG
24532 _ACEOF
24533
24534 fi
24535
24536 if test "$ol_link_perl" != no ; then
24537         BUILD_SLAPD=yes
24538         BUILD_PERL=$ol_enable_perl
24539         if test "$ol_enable_perl" = mod ; then
24540                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24541                 MFLAG=SLAPD_MOD_DYNAMIC
24542         else
24543                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24544                 MFLAG=SLAPD_MOD_STATIC
24545         fi
24546
24547 cat >>confdefs.h <<_ACEOF
24548 #define SLAPD_PERL $MFLAG
24549 _ACEOF
24550
24551 fi
24552
24553 if test "$ol_enable_relay" != no ; then
24554         BUILD_SLAPD=yes
24555         BUILD_RELAY=$ol_enable_relay
24556         if test "$ol_enable_relay" = mod ; then
24557                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
24558                 MFLAG=SLAPD_MOD_DYNAMIC
24559         else
24560                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
24561                 MFLAG=SLAPD_MOD_STATIC
24562         fi
24563
24564 cat >>confdefs.h <<_ACEOF
24565 #define SLAPD_RELAY $MFLAG
24566 _ACEOF
24567
24568 fi
24569
24570 if test "$ol_enable_shell" != no ; then
24571         if test "$ol_link_threads" != no ; then
24572                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use of --without-threads is recommended with back-shell" >&5
24573 $as_echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
24574         fi
24575         BUILD_SLAPD=yes
24576         BUILD_SHELL=$ol_enable_shell
24577         if test "$ol_enable_shell" = mod ; then
24578                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24579                 MFLAG=SLAPD_MOD_DYNAMIC
24580         else
24581                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24582                 MFLAG=SLAPD_MOD_STATIC
24583         fi
24584
24585 cat >>confdefs.h <<_ACEOF
24586 #define SLAPD_SHELL $MFLAG
24587 _ACEOF
24588
24589 fi
24590
24591 if test "$ol_enable_sock" != no ; then
24592         BUILD_SLAPD=yes
24593         BUILD_SOCK=$ol_enable_sock
24594         if test "$ol_enable_sock" = mod ; then
24595                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sock"
24596                 MFLAG=SLAPD_MOD_DYNAMIC
24597         else
24598                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sock"
24599                 MFLAG=SLAPD_MOD_STATIC
24600         fi
24601
24602 cat >>confdefs.h <<_ACEOF
24603 #define SLAPD_SOCK $MFLAG
24604 _ACEOF
24605
24606 fi
24607
24608 if test "$ol_link_sql" != no ; then
24609         BUILD_SLAPD=yes
24610         BUILD_SQL=$ol_enable_sql
24611         if test "$ol_enable_sql" = mod; then
24612                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24613                 MFLAG=SLAPD_MOD_DYNAMIC
24614         else
24615                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24616                 MFLAG=SLAPD_MOD_STATIC
24617         fi
24618
24619 cat >>confdefs.h <<_ACEOF
24620 #define SLAPD_SQL $MFLAG
24621 _ACEOF
24622
24623 fi
24624
24625 if test "$ol_link_wt" != no ; then
24626         BUILD_SLAPD=yes
24627         BUILD_WT=$ol_enable_wt
24628         if test "$ol_enable_wt" = mod; then
24629                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-wt"
24630                 MFLAG=SLAPD_MOD_DYNAMIC
24631         else
24632                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-wt"
24633                 MFLAG=SLAPD_MOD_STATIC
24634         fi
24635
24636 cat >>confdefs.h <<_ACEOF
24637 #define SLAPD_WT $MFLAG
24638 _ACEOF
24639
24640 fi
24641
24642 if test "$ol_enable_accesslog" != no ; then
24643         BUILD_ACCESSLOG=$ol_enable_accesslog
24644         if test "$ol_enable_accesslog" = mod ; then
24645                 MFLAG=SLAPD_MOD_DYNAMIC
24646                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
24647         else
24648                 MFLAG=SLAPD_MOD_STATIC
24649                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
24650         fi
24651
24652 cat >>confdefs.h <<_ACEOF
24653 #define SLAPD_OVER_ACCESSLOG $MFLAG
24654 _ACEOF
24655
24656 fi
24657
24658 if test "$ol_enable_auditlog" != no ; then
24659         BUILD_AUDITLOG=$ol_enable_auditlog
24660         if test "$ol_enable_auditlog" = mod ; then
24661                 MFLAG=SLAPD_MOD_DYNAMIC
24662                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
24663         else
24664                 MFLAG=SLAPD_MOD_STATIC
24665                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
24666         fi
24667
24668 cat >>confdefs.h <<_ACEOF
24669 #define SLAPD_OVER_AUDITLOG $MFLAG
24670 _ACEOF
24671
24672 fi
24673
24674 if test "$ol_enable_collect" != no ; then
24675         BUILD_COLLECT=$ol_enable_collect
24676         if test "$ol_enable_collect" = mod ; then
24677                 MFLAG=SLAPD_MOD_DYNAMIC
24678                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS collect.la"
24679         else
24680                 MFLAG=SLAPD_MOD_STATIC
24681                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS collect.o"
24682         fi
24683
24684 cat >>confdefs.h <<_ACEOF
24685 #define SLAPD_OVER_COLLECT $MFLAG
24686 _ACEOF
24687
24688 fi
24689
24690 if test "$ol_enable_constraint" != no ; then
24691         BUILD_CONSTRAINT=$ol_enable_constraint
24692         if test "$ol_enable_constraint" = mod ; then
24693                 MFLAG=SLAPD_MOD_DYNAMIC
24694                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la"
24695         else
24696                 MFLAG=SLAPD_MOD_STATIC
24697                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o"
24698         fi
24699
24700 cat >>confdefs.h <<_ACEOF
24701 #define SLAPD_OVER_CONSTRAINT $MFLAG
24702 _ACEOF
24703
24704 fi
24705
24706 if test "$ol_enable_dds" != no ; then
24707         BUILD_DDS=$ol_enable_dds
24708         if test "$ol_enable_dds" = mod ; then
24709                 MFLAG=SLAPD_MOD_DYNAMIC
24710                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
24711         else
24712                 MFLAG=SLAPD_MOD_STATIC
24713                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
24714         fi
24715
24716 cat >>confdefs.h <<_ACEOF
24717 #define SLAPD_OVER_DDS $MFLAG
24718 _ACEOF
24719
24720 fi
24721
24722 if test "$ol_enable_deref" != no ; then
24723         BUILD_DEREF=$ol_enable_deref
24724         if test "$ol_enable_deref" = mod ; then
24725                 MFLAG=SLAPD_MOD_DYNAMIC
24726                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS deref.la"
24727         else
24728                 MFLAG=SLAPD_MOD_STATIC
24729                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS deref.o"
24730         fi
24731
24732 cat >>confdefs.h <<_ACEOF
24733 #define SLAPD_OVER_DEREF $MFLAG
24734 _ACEOF
24735
24736 fi
24737
24738 if test "$ol_enable_dyngroup" != no ; then
24739         BUILD_DYNGROUP=$ol_enable_dyngroup
24740         if test "$ol_enable_dyngroup" = mod ; then
24741                 MFLAG=SLAPD_MOD_DYNAMIC
24742                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24743         else
24744                 MFLAG=SLAPD_MOD_STATIC
24745                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
24746         fi
24747
24748 cat >>confdefs.h <<_ACEOF
24749 #define SLAPD_OVER_DYNGROUP $MFLAG
24750 _ACEOF
24751
24752 fi
24753
24754 if test "$ol_enable_dynlist" != no ; then
24755         BUILD_DYNLIST=$ol_enable_dynlist
24756         if test "$ol_enable_dynlist" = mod ; then
24757                 MFLAG=SLAPD_MOD_DYNAMIC
24758                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
24759         else
24760                 MFLAG=SLAPD_MOD_STATIC
24761                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
24762         fi
24763
24764 cat >>confdefs.h <<_ACEOF
24765 #define SLAPD_OVER_DYNLIST $MFLAG
24766 _ACEOF
24767
24768 fi
24769
24770 if test "$ol_enable_memberof" != no ; then
24771         BUILD_MEMBEROF=$ol_enable_memberof
24772         if test "$ol_enable_memberof" = mod ; then
24773                 MFLAG=SLAPD_MOD_DYNAMIC
24774                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la"
24775         else
24776                 MFLAG=SLAPD_MOD_STATIC
24777                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o"
24778         fi
24779
24780 cat >>confdefs.h <<_ACEOF
24781 #define SLAPD_OVER_MEMBEROF $MFLAG
24782 _ACEOF
24783
24784 fi
24785
24786 if test "$ol_enable_ppolicy" != no ; then
24787         BUILD_PPOLICY=$ol_enable_ppolicy
24788         if test "$ol_enable_ppolicy" = mod ; then
24789                 MFLAG=SLAPD_MOD_DYNAMIC
24790                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24791         else
24792                 MFLAG=SLAPD_MOD_STATIC
24793                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
24794         fi
24795
24796 cat >>confdefs.h <<_ACEOF
24797 #define SLAPD_OVER_PPOLICY $MFLAG
24798 _ACEOF
24799
24800 fi
24801
24802 if test "$ol_enable_proxycache" != no ; then
24803         BUILD_PROXYCACHE=$ol_enable_proxycache
24804         if test "$ol_enable_proxycache" = mod ; then
24805                 MFLAG=SLAPD_MOD_DYNAMIC
24806                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24807         else
24808                 MFLAG=SLAPD_MOD_STATIC
24809                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
24810         fi
24811
24812 cat >>confdefs.h <<_ACEOF
24813 #define SLAPD_OVER_PROXYCACHE $MFLAG
24814 _ACEOF
24815
24816 fi
24817
24818 if test "$ol_enable_refint" != no ; then
24819         BUILD_REFINT=$ol_enable_refint
24820         if test "$ol_enable_refint" = mod ; then
24821                 MFLAG=SLAPD_MOD_DYNAMIC
24822                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24823         else
24824                 MFLAG=SLAPD_MOD_STATIC
24825                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
24826         fi
24827
24828 cat >>confdefs.h <<_ACEOF
24829 #define SLAPD_OVER_REFINT $MFLAG
24830 _ACEOF
24831
24832 fi
24833
24834 if test "$ol_enable_retcode" != no ; then
24835         BUILD_RETCODE=$ol_enable_retcode
24836         if test "$ol_enable_retcode" = mod ; then
24837                 MFLAG=SLAPD_MOD_DYNAMIC
24838                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
24839         else
24840                 MFLAG=SLAPD_MOD_STATIC
24841                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
24842         fi
24843
24844 cat >>confdefs.h <<_ACEOF
24845 #define SLAPD_OVER_RETCODE $MFLAG
24846 _ACEOF
24847
24848 fi
24849
24850 if test "$ol_enable_rwm" != no ; then
24851         BUILD_REWRITE=yes
24852         BUILD_RWM=$ol_enable_rwm
24853         if test "$ol_enable_rwm" = mod ; then
24854                 MFLAG=SLAPD_MOD_DYNAMIC
24855                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24856         else
24857                 MFLAG=SLAPD_MOD_STATIC
24858                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
24859         fi
24860
24861 cat >>confdefs.h <<_ACEOF
24862 #define SLAPD_OVER_RWM $MFLAG
24863 _ACEOF
24864
24865 fi
24866
24867 if test "$ol_enable_seqmod" != no ; then
24868         BUILD_SEQMOD=$ol_enable_seqmod
24869         if test "$ol_enable_seqmod" = mod ; then
24870                 MFLAG=SLAPD_MOD_DYNAMIC
24871                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
24872         else
24873                 MFLAG=SLAPD_MOD_STATIC
24874                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
24875         fi
24876
24877 cat >>confdefs.h <<_ACEOF
24878 #define SLAPD_OVER_SEQMOD $MFLAG
24879 _ACEOF
24880
24881 fi
24882
24883 if test "$ol_enable_sssvlv" != no ; then
24884         BUILD_SSSVLV=$ol_enable_sssvlv
24885         if test "$ol_enable_sssvlv" = mod ; then
24886                 MFLAG=SLAPD_MOD_DYNAMIC
24887                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS sssvlv.la"
24888         else
24889                 MFLAG=SLAPD_MOD_STATIC
24890                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS sssvlv.o"
24891         fi
24892
24893 cat >>confdefs.h <<_ACEOF
24894 #define SLAPD_OVER_SSSVLV $MFLAG
24895 _ACEOF
24896
24897 fi
24898
24899 if test "$ol_enable_syncprov" != no ; then
24900         BUILD_SYNCPROV=$ol_enable_syncprov
24901         if test "$ol_enable_syncprov" = mod ; then
24902                 MFLAG=SLAPD_MOD_DYNAMIC
24903                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
24904         else
24905                 MFLAG=SLAPD_MOD_STATIC
24906                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
24907         fi
24908
24909 cat >>confdefs.h <<_ACEOF
24910 #define SLAPD_OVER_SYNCPROV $MFLAG
24911 _ACEOF
24912
24913 fi
24914
24915 if test "$ol_enable_translucent" != no ; then
24916         BUILD_TRANSLUCENT=$ol_enable_translucent
24917         if test "$ol_enable_translucent" = mod ; then
24918                 MFLAG=SLAPD_MOD_DYNAMIC
24919                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
24920         else
24921                 MFLAG=SLAPD_MOD_STATIC
24922                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
24923         fi
24924
24925 cat >>confdefs.h <<_ACEOF
24926 #define SLAPD_OVER_TRANSLUCENT $MFLAG
24927 _ACEOF
24928
24929 fi
24930
24931 if test "$ol_enable_unique" != no ; then
24932         BUILD_UNIQUE=$ol_enable_unique
24933         if test "$ol_enable_unique" = mod ; then
24934                 MFLAG=SLAPD_MOD_DYNAMIC
24935                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24936         else
24937                 MFLAG=SLAPD_MOD_STATIC
24938                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
24939         fi
24940
24941 cat >>confdefs.h <<_ACEOF
24942 #define SLAPD_OVER_UNIQUE $MFLAG
24943 _ACEOF
24944
24945 fi
24946
24947 if test "$ol_enable_valsort" != no ; then
24948         BUILD_VALSORT=$ol_enable_valsort
24949         if test "$ol_enable_valsort" = mod ; then
24950                 MFLAG=SLAPD_MOD_DYNAMIC
24951                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
24952         else
24953                 MFLAG=SLAPD_MOD_STATIC
24954                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
24955         fi
24956
24957 cat >>confdefs.h <<_ACEOF
24958 #define SLAPD_OVER_VALSORT $MFLAG
24959 _ACEOF
24960
24961 fi
24962
24963 if test "$ol_enable_rewrite" != no ; then
24964
24965 $as_echo "#define ENABLE_REWRITE 1" >>confdefs.h
24966
24967         BUILD_REWRITE=yes
24968 fi
24969
24970 if test "$ol_enable_slapi" != no ; then
24971
24972 $as_echo "#define ENABLE_SLAPI 1" >>confdefs.h
24973
24974         BUILD_SLAPI=yes
24975         SLAPD_SLAPI_DEPEND=libslapi.a
24976 fi
24977
24978
24979
24980 if test "$ac_cv_mingw32" = yes -o $ol_cv_msvc = yes ; then
24981         PLAT=NT
24982         SLAPD_MODULES_LDFLAGS=
24983 else
24984         PLAT=UNIX
24985 fi
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082 # Check whether --with-xxinstall was given.
25083 if test "${with_xxinstall+set}" = set; then :
25084   withval=$with_xxinstall;
25085 fi
25086
25087
25088
25089 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-mdb/Makefile:build/top.mk:servers/slapd/back-mdb/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-asyncmeta/Makefile:build/top.mk:servers/slapd/back-asyncmeta/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/back-wt/Makefile:build/top.mk:servers/slapd/back-wt/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"
25090
25091
25092 ac_config_commands="$ac_config_commands default"
25093
25094
25095
25096 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25097 # Let make expand exec_prefix.
25098 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25099
25100 DEFS=-DHAVE_CONFIG_H
25101
25102 ac_libobjs=
25103 ac_ltlibobjs=
25104 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25105   # 1. Remove the extension, and $U if already installed.
25106   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25107   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
25108   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
25109   #    will be set to the directory where LIBOBJS objects are built.
25110   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25111   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
25112 done
25113 LIBOBJS=$ac_libobjs
25114
25115 LTLIBOBJS=$ac_ltlibobjs
25116
25117
25118 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
25119   as_fn_error "conditional \"AMDEP\" was never defined.
25120 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25121 fi
25122 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
25123   as_fn_error "conditional \"am__fastdepCC\" was never defined.
25124 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25125 fi
25126 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
25127   as_fn_error "conditional \"am__fastdepCC\" was never defined.
25128 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25129 fi
25130
25131
25132 : ${CONFIG_STATUS=./config.status}
25133 ac_write_fail=0
25134 ac_clean_files_save=$ac_clean_files
25135 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25136 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25137 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25138 as_write_fail=0
25139 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
25140 #! $SHELL
25141 # Generated by $as_me.
25142 # Run this file to recreate the current configuration.
25143 # Compiler output produced by configure, useful for debugging
25144 # configure, is in config.log if it exists.
25145
25146 debug=false
25147 ac_cs_recheck=false
25148 ac_cs_silent=false
25149
25150 SHELL=\${CONFIG_SHELL-$SHELL}
25151 export SHELL
25152 _ASEOF
25153 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25154 ## -------------------- ##
25155 ## M4sh Initialization. ##
25156 ## -------------------- ##
25157
25158 # Be more Bourne compatible
25159 DUALCASE=1; export DUALCASE # for MKS sh
25160 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
25161   emulate sh
25162   NULLCMD=:
25163   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25164   # is contrary to our usage.  Disable this feature.
25165   alias -g '${1+"$@"}'='"$@"'
25166   setopt NO_GLOB_SUBST
25167 else
25168   case `(set -o) 2>/dev/null` in #(
25169   *posix*) :
25170     set -o posix ;; #(
25171   *) :
25172      ;;
25173 esac
25174 fi
25175
25176
25177 as_nl='
25178 '
25179 export as_nl
25180 # Printing a long string crashes Solaris 7 /usr/bin/printf.
25181 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25182 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
25183 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
25184 # Prefer a ksh shell builtin over an external printf program on Solaris,
25185 # but without wasting forks for bash or zsh.
25186 if test -z "$BASH_VERSION$ZSH_VERSION" \
25187     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
25188   as_echo='print -r --'
25189   as_echo_n='print -rn --'
25190 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
25191   as_echo='printf %s\n'
25192   as_echo_n='printf %s'
25193 else
25194   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
25195     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
25196     as_echo_n='/usr/ucb/echo -n'
25197   else
25198     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
25199     as_echo_n_body='eval
25200       arg=$1;
25201       case $arg in #(
25202       *"$as_nl"*)
25203         expr "X$arg" : "X\\(.*\\)$as_nl";
25204         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
25205       esac;
25206       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
25207     '
25208     export as_echo_n_body
25209     as_echo_n='sh -c $as_echo_n_body as_echo'
25210   fi
25211   export as_echo_body
25212   as_echo='sh -c $as_echo_body as_echo'
25213 fi
25214
25215 # The user is always right.
25216 if test "${PATH_SEPARATOR+set}" != set; then
25217   PATH_SEPARATOR=:
25218   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25219     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25220       PATH_SEPARATOR=';'
25221   }
25222 fi
25223
25224
25225 # IFS
25226 # We need space, tab and new line, in precisely that order.  Quoting is
25227 # there to prevent editors from complaining about space-tab.
25228 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
25229 # splitting by setting IFS to empty value.)
25230 IFS=" ""        $as_nl"
25231
25232 # Find who we are.  Look in the path if we contain no directory separator.
25233 case $0 in #((
25234   *[\\/]* ) as_myself=$0 ;;
25235   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25236 for as_dir in $PATH
25237 do
25238   IFS=$as_save_IFS
25239   test -z "$as_dir" && as_dir=.
25240     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25241   done
25242 IFS=$as_save_IFS
25243
25244      ;;
25245 esac
25246 # We did not find ourselves, most probably we were run as `sh COMMAND'
25247 # in which case we are not to be found in the path.
25248 if test "x$as_myself" = x; then
25249   as_myself=$0
25250 fi
25251 if test ! -f "$as_myself"; then
25252   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25253   exit 1
25254 fi
25255
25256 # Unset variables that we do not need and which cause bugs (e.g. in
25257 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
25258 # suppresses any "Segmentation fault" message there.  '((' could
25259 # trigger a bug in pdksh 5.2.14.
25260 for as_var in BASH_ENV ENV MAIL MAILPATH
25261 do eval test x\${$as_var+set} = xset \
25262   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25263 done
25264 PS1='$ '
25265 PS2='> '
25266 PS4='+ '
25267
25268 # NLS nuisances.
25269 LC_ALL=C
25270 export LC_ALL
25271 LANGUAGE=C
25272 export LANGUAGE
25273
25274 # CDPATH.
25275 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25276
25277
25278 # as_fn_error ERROR [LINENO LOG_FD]
25279 # ---------------------------------
25280 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25281 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
25282 # script with status $?, using 1 if that was 0.
25283 as_fn_error ()
25284 {
25285   as_status=$?; test $as_status -eq 0 && as_status=1
25286   if test "$3"; then
25287     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25288     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
25289   fi
25290   $as_echo "$as_me: error: $1" >&2
25291   as_fn_exit $as_status
25292 } # as_fn_error
25293
25294
25295 # as_fn_set_status STATUS
25296 # -----------------------
25297 # Set $? to STATUS, without forking.
25298 as_fn_set_status ()
25299 {
25300   return $1
25301 } # as_fn_set_status
25302
25303 # as_fn_exit STATUS
25304 # -----------------
25305 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25306 as_fn_exit ()
25307 {
25308   set +e
25309   as_fn_set_status $1
25310   exit $1
25311 } # as_fn_exit
25312
25313 # as_fn_unset VAR
25314 # ---------------
25315 # Portably unset VAR.
25316 as_fn_unset ()
25317 {
25318   { eval $1=; unset $1;}
25319 }
25320 as_unset=as_fn_unset
25321 # as_fn_append VAR VALUE
25322 # ----------------------
25323 # Append the text in VALUE to the end of the definition contained in VAR. Take
25324 # advantage of any shell optimizations that allow amortized linear growth over
25325 # repeated appends, instead of the typical quadratic growth present in naive
25326 # implementations.
25327 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25328   eval 'as_fn_append ()
25329   {
25330     eval $1+=\$2
25331   }'
25332 else
25333   as_fn_append ()
25334   {
25335     eval $1=\$$1\$2
25336   }
25337 fi # as_fn_append
25338
25339 # as_fn_arith ARG...
25340 # ------------------
25341 # Perform arithmetic evaluation on the ARGs, and store the result in the
25342 # global $as_val. Take advantage of shells that can avoid forks. The arguments
25343 # must be portable across $(()) and expr.
25344 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25345   eval 'as_fn_arith ()
25346   {
25347     as_val=$(( $* ))
25348   }'
25349 else
25350   as_fn_arith ()
25351   {
25352     as_val=`expr "$@" || test $? -eq 1`
25353   }
25354 fi # as_fn_arith
25355
25356
25357 if expr a : '\(a\)' >/dev/null 2>&1 &&
25358    test "X`expr 00001 : '.*\(...\)'`" = X001; then
25359   as_expr=expr
25360 else
25361   as_expr=false
25362 fi
25363
25364 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25365   as_basename=basename
25366 else
25367   as_basename=false
25368 fi
25369
25370 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25371   as_dirname=dirname
25372 else
25373   as_dirname=false
25374 fi
25375
25376 as_me=`$as_basename -- "$0" ||
25377 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25378          X"$0" : 'X\(//\)$' \| \
25379          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25380 $as_echo X/"$0" |
25381     sed '/^.*\/\([^/][^/]*\)\/*$/{
25382             s//\1/
25383             q
25384           }
25385           /^X\/\(\/\/\)$/{
25386             s//\1/
25387             q
25388           }
25389           /^X\/\(\/\).*/{
25390             s//\1/
25391             q
25392           }
25393           s/.*/./; q'`
25394
25395 # Avoid depending upon Character Ranges.
25396 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25397 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25398 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25399 as_cr_digits='0123456789'
25400 as_cr_alnum=$as_cr_Letters$as_cr_digits
25401
25402 ECHO_C= ECHO_N= ECHO_T=
25403 case `echo -n x` in #(((((
25404 -n*)
25405   case `echo 'xy\c'` in
25406   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
25407   xy)  ECHO_C='\c';;
25408   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
25409        ECHO_T=' ';;
25410   esac;;
25411 *)
25412   ECHO_N='-n';;
25413 esac
25414
25415 rm -f conf$$ conf$$.exe conf$$.file
25416 if test -d conf$$.dir; then
25417   rm -f conf$$.dir/conf$$.file
25418 else
25419   rm -f conf$$.dir
25420   mkdir conf$$.dir 2>/dev/null
25421 fi
25422 if (echo >conf$$.file) 2>/dev/null; then
25423   if ln -s conf$$.file conf$$ 2>/dev/null; then
25424     as_ln_s='ln -s'
25425     # ... but there are two gotchas:
25426     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25427     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25428     # In both cases, we have to default to `cp -p'.
25429     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25430       as_ln_s='cp -p'
25431   elif ln conf$$.file conf$$ 2>/dev/null; then
25432     as_ln_s=ln
25433   else
25434     as_ln_s='cp -p'
25435   fi
25436 else
25437   as_ln_s='cp -p'
25438 fi
25439 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25440 rmdir conf$$.dir 2>/dev/null
25441
25442
25443 # as_fn_mkdir_p
25444 # -------------
25445 # Create "$as_dir" as a directory, including parents if necessary.
25446 as_fn_mkdir_p ()
25447 {
25448
25449   case $as_dir in #(
25450   -*) as_dir=./$as_dir;;
25451   esac
25452   test -d "$as_dir" || eval $as_mkdir_p || {
25453     as_dirs=
25454     while :; do
25455       case $as_dir in #(
25456       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25457       *) as_qdir=$as_dir;;
25458       esac
25459       as_dirs="'$as_qdir' $as_dirs"
25460       as_dir=`$as_dirname -- "$as_dir" ||
25461 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25462          X"$as_dir" : 'X\(//\)[^/]' \| \
25463          X"$as_dir" : 'X\(//\)$' \| \
25464          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25465 $as_echo X"$as_dir" |
25466     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25467             s//\1/
25468             q
25469           }
25470           /^X\(\/\/\)[^/].*/{
25471             s//\1/
25472             q
25473           }
25474           /^X\(\/\/\)$/{
25475             s//\1/
25476             q
25477           }
25478           /^X\(\/\).*/{
25479             s//\1/
25480             q
25481           }
25482           s/.*/./; q'`
25483       test -d "$as_dir" && break
25484     done
25485     test -z "$as_dirs" || eval "mkdir $as_dirs"
25486   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
25487
25488
25489 } # as_fn_mkdir_p
25490 if mkdir -p . 2>/dev/null; then
25491   as_mkdir_p='mkdir -p "$as_dir"'
25492 else
25493   test -d ./-p && rmdir ./-p
25494   as_mkdir_p=false
25495 fi
25496
25497 if test -x / >/dev/null 2>&1; then
25498   as_test_x='test -x'
25499 else
25500   if ls -dL / >/dev/null 2>&1; then
25501     as_ls_L_option=L
25502   else
25503     as_ls_L_option=
25504   fi
25505   as_test_x='
25506     eval sh -c '\''
25507       if test -d "$1"; then
25508         test -d "$1/.";
25509       else
25510         case $1 in #(
25511         -*)set "./$1";;
25512         esac;
25513         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
25514         ???[sx]*):;;*)false;;esac;fi
25515     '\'' sh
25516   '
25517 fi
25518 as_executable_p=$as_test_x
25519
25520 # Sed expression to map a string onto a valid CPP name.
25521 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25522
25523 # Sed expression to map a string onto a valid variable name.
25524 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25525
25526
25527 exec 6>&1
25528 ## ----------------------------------- ##
25529 ## Main body of $CONFIG_STATUS script. ##
25530 ## ----------------------------------- ##
25531 _ASEOF
25532 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25533
25534 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25535 # Save the log message, to keep $0 and so on meaningful, and to
25536 # report actual input values of CONFIG_FILES etc. instead of their
25537 # values after options handling.
25538 ac_log="
25539 This file was extended by $as_me, which was
25540 generated by GNU Autoconf 2.65.  Invocation command line was
25541
25542   CONFIG_FILES    = $CONFIG_FILES
25543   CONFIG_HEADERS  = $CONFIG_HEADERS
25544   CONFIG_LINKS    = $CONFIG_LINKS
25545   CONFIG_COMMANDS = $CONFIG_COMMANDS
25546   $ $0 $@
25547
25548 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25549 "
25550
25551 _ACEOF
25552
25553 case $ac_config_files in *"
25554 "*) set x $ac_config_files; shift; ac_config_files=$*;;
25555 esac
25556
25557 case $ac_config_headers in *"
25558 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25559 esac
25560
25561
25562 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25563 # Files that config.status was made for.
25564 config_files="$ac_config_files"
25565 config_headers="$ac_config_headers"
25566 config_commands="$ac_config_commands"
25567
25568 _ACEOF
25569
25570 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25571 ac_cs_usage="\
25572 \`$as_me' instantiates files and other configuration actions
25573 from templates according to the current configuration.  Unless the files
25574 and actions are specified as TAGs, all are instantiated by default.
25575
25576 Usage: $0 [OPTION]... [TAG]...
25577
25578   -h, --help       print this help, then exit
25579   -V, --version    print version number and configuration settings, then exit
25580       --config     print configuration, then exit
25581   -q, --quiet, --silent
25582                    do not print progress messages
25583   -d, --debug      don't remove temporary files
25584       --recheck    update $as_me by reconfiguring in the same conditions
25585       --file=FILE[:TEMPLATE]
25586                    instantiate the configuration file FILE
25587       --header=FILE[:TEMPLATE]
25588                    instantiate the configuration header FILE
25589
25590 Configuration files:
25591 $config_files
25592
25593 Configuration headers:
25594 $config_headers
25595
25596 Configuration commands:
25597 $config_commands
25598
25599 Report bugs to <<http://www.openldap.org/its/>>."
25600
25601 _ACEOF
25602 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25603 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
25604 ac_cs_version="\\
25605 config.status
25606 configured by $0, generated by GNU Autoconf 2.65,
25607   with options \\"\$ac_cs_config\\"
25608
25609 Copyright (C) 2009 Free Software Foundation, Inc.
25610 This config.status script is free software; the Free Software Foundation
25611 gives unlimited permission to copy, distribute and modify it."
25612
25613 ac_pwd='$ac_pwd'
25614 srcdir='$srcdir'
25615 INSTALL='$INSTALL'
25616 AWK='$AWK'
25617 test -n "\$AWK" || AWK=awk
25618 _ACEOF
25619
25620 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25621 # The default lists apply if the user does not specify any file.
25622 ac_need_defaults=:
25623 while test $# != 0
25624 do
25625   case $1 in
25626   --*=*)
25627     ac_option=`expr "X$1" : 'X\([^=]*\)='`
25628     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25629     ac_shift=:
25630     ;;
25631   *)
25632     ac_option=$1
25633     ac_optarg=$2
25634     ac_shift=shift
25635     ;;
25636   esac
25637
25638   case $ac_option in
25639   # Handling of the options.
25640   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25641     ac_cs_recheck=: ;;
25642   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25643     $as_echo "$ac_cs_version"; exit ;;
25644   --config | --confi | --conf | --con | --co | --c )
25645     $as_echo "$ac_cs_config"; exit ;;
25646   --debug | --debu | --deb | --de | --d | -d )
25647     debug=: ;;
25648   --file | --fil | --fi | --f )
25649     $ac_shift
25650     case $ac_optarg in
25651     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25652     esac
25653     as_fn_append CONFIG_FILES " '$ac_optarg'"
25654     ac_need_defaults=false;;
25655   --header | --heade | --head | --hea )
25656     $ac_shift
25657     case $ac_optarg in
25658     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25659     esac
25660     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25661     ac_need_defaults=false;;
25662   --he | --h)
25663     # Conflict between --help and --header
25664     as_fn_error "ambiguous option: \`$1'
25665 Try \`$0 --help' for more information.";;
25666   --help | --hel | -h )
25667     $as_echo "$ac_cs_usage"; exit ;;
25668   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25669   | -silent | --silent | --silen | --sile | --sil | --si | --s)
25670     ac_cs_silent=: ;;
25671
25672   # This is an error.
25673   -*) as_fn_error "unrecognized option: \`$1'
25674 Try \`$0 --help' for more information." ;;
25675
25676   *) as_fn_append ac_config_targets " $1"
25677      ac_need_defaults=false ;;
25678
25679   esac
25680   shift
25681 done
25682
25683 ac_configure_extra_args=
25684
25685 if $ac_cs_silent; then
25686   exec 6>/dev/null
25687   ac_configure_extra_args="$ac_configure_extra_args --silent"
25688 fi
25689
25690 _ACEOF
25691 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25692 if \$ac_cs_recheck; then
25693   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25694   shift
25695   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25696   CONFIG_SHELL='$SHELL'
25697   export CONFIG_SHELL
25698   exec "\$@"
25699 fi
25700
25701 _ACEOF
25702 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25703 exec 5>>config.log
25704 {
25705   echo
25706   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25707 ## Running $as_me. ##
25708 _ASBOX
25709   $as_echo "$ac_log"
25710 } >&5
25711
25712 _ACEOF
25713 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25714 #
25715 # INIT-COMMANDS
25716 #
25717 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25718
25719 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25720 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
25721
25722
25723 _ACEOF
25724
25725 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25726
25727 # Handling of arguments.
25728 for ac_config_target in $ac_config_targets
25729 do
25730   case $ac_config_target in
25731     "include/portable.h") CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
25732     "include/ldap_features.h") CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
25733     "include/lber_types.h") CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
25734     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25735     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
25736     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
25737     "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
25738     "doc/man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
25739     "doc/man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
25740     "doc/man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
25741     "doc/man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
25742     "clients/Makefile") CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
25743     "clients/tools/Makefile") CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
25744     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
25745     "libraries/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
25746     "libraries/liblber/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25747     "libraries/libldap/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25748     "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" ;;
25749     "libraries/liblunicode/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25750     "libraries/liblutil/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25751     "libraries/librewrite/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25752     "servers/Makefile") CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
25753     "servers/slapd/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
25754     "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" ;;
25755     "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" ;;
25756     "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" ;;
25757     "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" ;;
25758     "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" ;;
25759     "servers/slapd/back-mdb/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-mdb/Makefile:build/top.mk:servers/slapd/back-mdb/Makefile.in:build/mod.mk" ;;
25760     "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" ;;
25761     "servers/slapd/back-asyncmeta/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-asyncmeta/Makefile:build/top.mk:servers/slapd/back-asyncmeta/Makefile.in:build/mod.mk" ;;
25762     "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" ;;
25763     "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" ;;
25764     "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" ;;
25765     "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" ;;
25766     "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" ;;
25767     "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" ;;
25768     "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" ;;
25769     "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" ;;
25770     "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" ;;
25771     "servers/slapd/back-wt/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-wt/Makefile:build/top.mk:servers/slapd/back-wt/Makefile.in:build/mod.mk" ;;
25772     "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" ;;
25773     "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" ;;
25774     "servers/slapd/overlays/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
25775     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
25776     "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;;
25777     "tests/progs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
25778     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25779
25780   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25781   esac
25782 done
25783
25784
25785 # If the user did not use the arguments to specify the items to instantiate,
25786 # then the envvar interface is used.  Set only those that are not.
25787 # We use the long form for the default assignment because of an extremely
25788 # bizarre bug on SunOS 4.1.3.
25789 if $ac_need_defaults; then
25790   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25791   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25792   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25793 fi
25794
25795 # Have a temporary directory for convenience.  Make it in the build tree
25796 # simply because there is no reason against having it here, and in addition,
25797 # creating and moving files from /tmp can sometimes cause problems.
25798 # Hook for its removal unless debugging.
25799 # Note that there is a small window in which the directory will not be cleaned:
25800 # after its creation but before its name has been assigned to `$tmp'.
25801 $debug ||
25802 {
25803   tmp=
25804   trap 'exit_status=$?
25805   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25806 ' 0
25807   trap 'as_fn_exit 1' 1 2 13 15
25808 }
25809 # Create a (secure) tmp directory for tmp files.
25810
25811 {
25812   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25813   test -n "$tmp" && test -d "$tmp"
25814 }  ||
25815 {
25816   tmp=./conf$$-$RANDOM
25817   (umask 077 && mkdir "$tmp")
25818 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25819
25820 # Set up the scripts for CONFIG_FILES section.
25821 # No need to generate them if there are no CONFIG_FILES.
25822 # This happens for instance with `./config.status config.h'.
25823 if test -n "$CONFIG_FILES"; then
25824
25825
25826 ac_cr=`echo X | tr X '\015'`
25827 # On cygwin, bash can eat \r inside `` if the user requested igncr.
25828 # But we know of no other shell where ac_cr would be empty at this
25829 # point, so we can use a bashism as a fallback.
25830 if test "x$ac_cr" = x; then
25831   eval ac_cr=\$\'\\r\'
25832 fi
25833 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25834 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25835   ac_cs_awk_cr='\r'
25836 else
25837   ac_cs_awk_cr=$ac_cr
25838 fi
25839
25840 echo 'BEGIN {' >"$tmp/subs1.awk" &&
25841 _ACEOF
25842
25843
25844 {
25845   echo "cat >conf$$subs.awk <<_ACEOF" &&
25846   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25847   echo "_ACEOF"
25848 } >conf$$subs.sh ||
25849   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25850 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25851 ac_delim='%!_!# '
25852 for ac_last_try in false false false false false :; do
25853   . ./conf$$subs.sh ||
25854     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25855
25856   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25857   if test $ac_delim_n = $ac_delim_num; then
25858     break
25859   elif $ac_last_try; then
25860     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25861   else
25862     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25863   fi
25864 done
25865 rm -f conf$$subs.sh
25866
25867 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25868 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
25869 _ACEOF
25870 sed -n '
25871 h
25872 s/^/S["/; s/!.*/"]=/
25873 p
25874 g
25875 s/^[^!]*!//
25876 :repl
25877 t repl
25878 s/'"$ac_delim"'$//
25879 t delim
25880 :nl
25881 h
25882 s/\(.\{148\}\)..*/\1/
25883 t more1
25884 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25885 p
25886 n
25887 b repl
25888 :more1
25889 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25890 p
25891 g
25892 s/.\{148\}//
25893 t nl
25894 :delim
25895 h
25896 s/\(.\{148\}\)..*/\1/
25897 t more2
25898 s/["\\]/\\&/g; s/^/"/; s/$/"/
25899 p
25900 b
25901 :more2
25902 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25903 p
25904 g
25905 s/.\{148\}//
25906 t delim
25907 ' <conf$$subs.awk | sed '
25908 /^[^""]/{
25909   N
25910   s/\n//
25911 }
25912 ' >>$CONFIG_STATUS || ac_write_fail=1
25913 rm -f conf$$subs.awk
25914 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25915 _ACAWK
25916 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
25917   for (key in S) S_is_set[key] = 1
25918   FS = "\a"
25919
25920 }
25921 {
25922   line = $ 0
25923   nfields = split(line, field, "@")
25924   substed = 0
25925   len = length(field[1])
25926   for (i = 2; i < nfields; i++) {
25927     key = field[i]
25928     keylen = length(key)
25929     if (S_is_set[key]) {
25930       value = S[key]
25931       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25932       len += length(value) + length(field[++i])
25933       substed = 1
25934     } else
25935       len += 1 + keylen
25936   }
25937
25938   print line
25939 }
25940
25941 _ACAWK
25942 _ACEOF
25943 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25944 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25945   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25946 else
25947   cat
25948 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25949   || as_fn_error "could not setup config files machinery" "$LINENO" 5
25950 _ACEOF
25951
25952 # VPATH may cause trouble with some makes, so we remove $(srcdir),
25953 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25954 # trailing colons and then remove the whole line if VPATH becomes empty
25955 # (actually we leave an empty line to preserve line numbers).
25956 if test "x$srcdir" = x.; then
25957   ac_vpsub='/^[  ]*VPATH[        ]*=/{
25958 s/:*\$(srcdir):*/:/
25959 s/:*\${srcdir}:*/:/
25960 s/:*@srcdir@:*/:/
25961 s/^\([^=]*=[     ]*\):*/\1/
25962 s/:*$//
25963 s/^[^=]*=[       ]*$//
25964 }'
25965 fi
25966
25967 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25968 fi # test -n "$CONFIG_FILES"
25969
25970 # Set up the scripts for CONFIG_HEADERS section.
25971 # No need to generate them if there are no CONFIG_HEADERS.
25972 # This happens for instance with `./config.status Makefile'.
25973 if test -n "$CONFIG_HEADERS"; then
25974 cat >"$tmp/defines.awk" <<\_ACAWK ||
25975 BEGIN {
25976 _ACEOF
25977
25978 # Transform confdefs.h into an awk script `defines.awk', embedded as
25979 # here-document in config.status, that substitutes the proper values into
25980 # config.h.in to produce config.h.
25981
25982 # Create a delimiter string that does not exist in confdefs.h, to ease
25983 # handling of long lines.
25984 ac_delim='%!_!# '
25985 for ac_last_try in false false :; do
25986   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
25987   if test -z "$ac_t"; then
25988     break
25989   elif $ac_last_try; then
25990     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
25991   else
25992     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25993   fi
25994 done
25995
25996 # For the awk script, D is an array of macro values keyed by name,
25997 # likewise P contains macro parameters if any.  Preserve backslash
25998 # newline sequences.
25999
26000 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26001 sed -n '
26002 s/.\{148\}/&'"$ac_delim"'/g
26003 t rset
26004 :rset
26005 s/^[     ]*#[    ]*define[       ][      ]*/ /
26006 t def
26007 d
26008 :def
26009 s/\\$//
26010 t bsnl
26011 s/["\\]/\\&/g
26012 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
26013 D["\1"]=" \3"/p
26014 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
26015 d
26016 :bsnl
26017 s/["\\]/\\&/g
26018 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
26019 D["\1"]=" \3\\\\\\n"\\/p
26020 t cont
26021 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26022 t cont
26023 d
26024 :cont
26025 n
26026 s/.\{148\}/&'"$ac_delim"'/g
26027 t clear
26028 :clear
26029 s/\\$//
26030 t bsnlc
26031 s/["\\]/\\&/g; s/^/"/; s/$/"/p
26032 d
26033 :bsnlc
26034 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26035 b cont
26036 ' <confdefs.h | sed '
26037 s/'"$ac_delim"'/"\\\
26038 "/g' >>$CONFIG_STATUS || ac_write_fail=1
26039
26040 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26041   for (key in D) D_is_set[key] = 1
26042   FS = "\a"
26043 }
26044 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26045   line = \$ 0
26046   split(line, arg, " ")
26047   if (arg[1] == "#") {
26048     defundef = arg[2]
26049     mac1 = arg[3]
26050   } else {
26051     defundef = substr(arg[1], 2)
26052     mac1 = arg[2]
26053   }
26054   split(mac1, mac2, "(") #)
26055   macro = mac2[1]
26056   prefix = substr(line, 1, index(line, defundef) - 1)
26057   if (D_is_set[macro]) {
26058     # Preserve the white space surrounding the "#".
26059     print prefix "define", macro P[macro] D[macro]
26060     next
26061   } else {
26062     # Replace #undef with comments.  This is necessary, for example,
26063     # in the case of _POSIX_SOURCE, which is predefined and required
26064     # on some systems where configure will not decide to define it.
26065     if (defundef == "undef") {
26066       print "/*", prefix defundef, macro, "*/"
26067       next
26068     }
26069   }
26070 }
26071 { print }
26072 _ACAWK
26073 _ACEOF
26074 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26075   as_fn_error "could not setup config headers machinery" "$LINENO" 5
26076 fi # test -n "$CONFIG_HEADERS"
26077
26078
26079 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
26080 shift
26081 for ac_tag
26082 do
26083   case $ac_tag in
26084   :[FHLC]) ac_mode=$ac_tag; continue;;
26085   esac
26086   case $ac_mode$ac_tag in
26087   :[FHL]*:*);;
26088   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
26089   :[FH]-) ac_tag=-:-;;
26090   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26091   esac
26092   ac_save_IFS=$IFS
26093   IFS=:
26094   set x $ac_tag
26095   IFS=$ac_save_IFS
26096   shift
26097   ac_file=$1
26098   shift
26099
26100   case $ac_mode in
26101   :L) ac_source=$1;;
26102   :[FH])
26103     ac_file_inputs=
26104     for ac_f
26105     do
26106       case $ac_f in
26107       -) ac_f="$tmp/stdin";;
26108       *) # Look for the file first in the build tree, then in the source tree
26109          # (if the path is not absolute).  The absolute path cannot be DOS-style,
26110          # because $ac_f cannot contain `:'.
26111          test -f "$ac_f" ||
26112            case $ac_f in
26113            [\\/$]*) false;;
26114            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26115            esac ||
26116            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26117       esac
26118       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26119       as_fn_append ac_file_inputs " '$ac_f'"
26120     done
26121
26122     # Let's still pretend it is `configure' which instantiates (i.e., don't
26123     # use $as_me), people would be surprised to read:
26124     #    /* config.h.  Generated by config.status.  */
26125     configure_input='Generated from '`
26126           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26127         `' by configure.'
26128     if test x"$ac_file" != x-; then
26129       configure_input="$ac_file.  $configure_input"
26130       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26131 $as_echo "$as_me: creating $ac_file" >&6;}
26132     fi
26133     # Neutralize special characters interpreted by sed in replacement strings.
26134     case $configure_input in #(
26135     *\&* | *\|* | *\\* )
26136        ac_sed_conf_input=`$as_echo "$configure_input" |
26137        sed 's/[\\\\&|]/\\\\&/g'`;; #(
26138     *) ac_sed_conf_input=$configure_input;;
26139     esac
26140
26141     case $ac_tag in
26142     *:-:* | *:-) cat >"$tmp/stdin" \
26143       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
26144     esac
26145     ;;
26146   esac
26147
26148   ac_dir=`$as_dirname -- "$ac_file" ||
26149 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26150          X"$ac_file" : 'X\(//\)[^/]' \| \
26151          X"$ac_file" : 'X\(//\)$' \| \
26152          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26153 $as_echo X"$ac_file" |
26154     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26155             s//\1/
26156             q
26157           }
26158           /^X\(\/\/\)[^/].*/{
26159             s//\1/
26160             q
26161           }
26162           /^X\(\/\/\)$/{
26163             s//\1/
26164             q
26165           }
26166           /^X\(\/\).*/{
26167             s//\1/
26168             q
26169           }
26170           s/.*/./; q'`
26171   as_dir="$ac_dir"; as_fn_mkdir_p
26172   ac_builddir=.
26173
26174 case "$ac_dir" in
26175 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26176 *)
26177   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
26178   # A ".." for each directory in $ac_dir_suffix.
26179   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26180   case $ac_top_builddir_sub in
26181   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26182   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26183   esac ;;
26184 esac
26185 ac_abs_top_builddir=$ac_pwd
26186 ac_abs_builddir=$ac_pwd$ac_dir_suffix
26187 # for backward compatibility:
26188 ac_top_builddir=$ac_top_build_prefix
26189
26190 case $srcdir in
26191   .)  # We are building in place.
26192     ac_srcdir=.
26193     ac_top_srcdir=$ac_top_builddir_sub
26194     ac_abs_top_srcdir=$ac_pwd ;;
26195   [\\/]* | ?:[\\/]* )  # Absolute name.
26196     ac_srcdir=$srcdir$ac_dir_suffix;
26197     ac_top_srcdir=$srcdir
26198     ac_abs_top_srcdir=$srcdir ;;
26199   *) # Relative name.
26200     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26201     ac_top_srcdir=$ac_top_build_prefix$srcdir
26202     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
26203 esac
26204 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
26205
26206
26207   case $ac_mode in
26208   :F)
26209   #
26210   # CONFIG_FILE
26211   #
26212
26213   case $INSTALL in
26214   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26215   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
26216   esac
26217 _ACEOF
26218
26219 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26220 # If the template does not know about datarootdir, expand it.
26221 # FIXME: This hack should be removed a few years after 2.60.
26222 ac_datarootdir_hack=; ac_datarootdir_seen=
26223 ac_sed_dataroot='
26224 /datarootdir/ {
26225   p
26226   q
26227 }
26228 /@datadir@/p
26229 /@docdir@/p
26230 /@infodir@/p
26231 /@localedir@/p
26232 /@mandir@/p'
26233 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26234 *datarootdir*) ac_datarootdir_seen=yes;;
26235 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26236   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26237 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26238 _ACEOF
26239 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26240   ac_datarootdir_hack='
26241   s&@datadir@&$datadir&g
26242   s&@docdir@&$docdir&g
26243   s&@infodir@&$infodir&g
26244   s&@localedir@&$localedir&g
26245   s&@mandir@&$mandir&g
26246   s&\\\${datarootdir}&$datarootdir&g' ;;
26247 esac
26248 _ACEOF
26249
26250 # Neutralize VPATH when `$srcdir' = `.'.
26251 # Shell code in configure.ac might set extrasub.
26252 # FIXME: do we really want to maintain this feature?
26253 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26254 ac_sed_extra="$ac_vpsub
26255 $extrasub
26256 _ACEOF
26257 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26258 :t
26259 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26260 s|@configure_input@|$ac_sed_conf_input|;t t
26261 s&@top_builddir@&$ac_top_builddir_sub&;t t
26262 s&@top_build_prefix@&$ac_top_build_prefix&;t t
26263 s&@srcdir@&$ac_srcdir&;t t
26264 s&@abs_srcdir@&$ac_abs_srcdir&;t t
26265 s&@top_srcdir@&$ac_top_srcdir&;t t
26266 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26267 s&@builddir@&$ac_builddir&;t t
26268 s&@abs_builddir@&$ac_abs_builddir&;t t
26269 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26270 s&@INSTALL@&$ac_INSTALL&;t t
26271 $ac_datarootdir_hack
26272 "
26273 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
26274   || as_fn_error "could not create $ac_file" "$LINENO" 5
26275
26276 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26277   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26278   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26279   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26280 which seems to be undefined.  Please make sure it is defined." >&5
26281 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26282 which seems to be undefined.  Please make sure it is defined." >&2;}
26283
26284   rm -f "$tmp/stdin"
26285   case $ac_file in
26286   -) cat "$tmp/out" && rm -f "$tmp/out";;
26287   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
26288   esac \
26289   || as_fn_error "could not create $ac_file" "$LINENO" 5
26290  ;;
26291   :H)
26292   #
26293   # CONFIG_HEADER
26294   #
26295   if test x"$ac_file" != x-; then
26296     {
26297       $as_echo "/* $configure_input  */" \
26298       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
26299     } >"$tmp/config.h" \
26300       || as_fn_error "could not create $ac_file" "$LINENO" 5
26301     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
26302       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26303 $as_echo "$as_me: $ac_file is unchanged" >&6;}
26304     else
26305       rm -f "$ac_file"
26306       mv "$tmp/config.h" "$ac_file" \
26307         || as_fn_error "could not create $ac_file" "$LINENO" 5
26308     fi
26309   else
26310     $as_echo "/* $configure_input  */" \
26311       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
26312       || as_fn_error "could not create -" "$LINENO" 5
26313   fi
26314 # Compute "$ac_file"'s index in $config_headers.
26315 _am_stamp_count=1
26316 for _am_header in $config_headers :; do
26317   case $_am_header in
26318     "$ac_file" | "$ac_file":* )
26319       break ;;
26320     * )
26321       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26322   esac
26323 done
26324 echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
26325 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26326          X"$ac_file" : 'X\(//\)[^/]' \| \
26327          X"$ac_file" : 'X\(//\)$' \| \
26328          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26329 $as_echo X"$ac_file" |
26330     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26331             s//\1/
26332             q
26333           }
26334           /^X\(\/\/\)[^/].*/{
26335             s//\1/
26336             q
26337           }
26338           /^X\(\/\/\)$/{
26339             s//\1/
26340             q
26341           }
26342           /^X\(\/\).*/{
26343             s//\1/
26344             q
26345           }
26346           s/.*/./; q'`/stamp-h$_am_stamp_count
26347  ;;
26348
26349   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26350 $as_echo "$as_me: executing $ac_file commands" >&6;}
26351  ;;
26352   esac
26353
26354
26355   case $ac_file$ac_mode in
26356     "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
26357   # Strip MF so we end up with the name of the file.
26358   mf=`echo "$mf" | sed -e 's/:.*$//'`
26359   # Check whether this is an Automake generated Makefile or not.
26360   # We used to match only the files named `Makefile.in', but
26361   # some people rename them; so instead we look at the file content.
26362   # Grep'ing the first line is not enough: some people post-process
26363   # each Makefile.in and add a new line on top of each file to say so.
26364   # So let's grep whole file.
26365   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
26366     dirpart=`$as_dirname -- "$mf" ||
26367 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26368          X"$mf" : 'X\(//\)[^/]' \| \
26369          X"$mf" : 'X\(//\)$' \| \
26370          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
26371 $as_echo X"$mf" |
26372     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26373             s//\1/
26374             q
26375           }
26376           /^X\(\/\/\)[^/].*/{
26377             s//\1/
26378             q
26379           }
26380           /^X\(\/\/\)$/{
26381             s//\1/
26382             q
26383           }
26384           /^X\(\/\).*/{
26385             s//\1/
26386             q
26387           }
26388           s/.*/./; q'`
26389   else
26390     continue
26391   fi
26392   # Extract the definition of DEPDIR, am__include, and am__quote
26393   # from the Makefile without running `make'.
26394   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
26395   test -z "$DEPDIR" && continue
26396   am__include=`sed -n 's/^am__include = //p' < "$mf"`
26397   test -z "am__include" && continue
26398   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
26399   # When using ansi2knr, U may be empty or an underscore; expand it
26400   U=`sed -n 's/^U = //p' < "$mf"`
26401   # Find all dependency output files, they are included files with
26402   # $(DEPDIR) in their names.  We invoke sed twice because it is the
26403   # simplest approach to changing $(DEPDIR) to its actual value in the
26404   # expansion.
26405   for file in `sed -n "
26406     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
26407        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
26408     # Make sure the directory exists.
26409     test -f "$dirpart/$file" && continue
26410     fdir=`$as_dirname -- "$file" ||
26411 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26412          X"$file" : 'X\(//\)[^/]' \| \
26413          X"$file" : 'X\(//\)$' \| \
26414          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
26415 $as_echo X"$file" |
26416     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26417             s//\1/
26418             q
26419           }
26420           /^X\(\/\/\)[^/].*/{
26421             s//\1/
26422             q
26423           }
26424           /^X\(\/\/\)$/{
26425             s//\1/
26426             q
26427           }
26428           /^X\(\/\).*/{
26429             s//\1/
26430             q
26431           }
26432           s/.*/./; q'`
26433     as_dir=$dirpart/$fdir; as_fn_mkdir_p
26434     # echo "creating $dirpart/$file"
26435     echo '# dummy' > "$dirpart/$file"
26436   done
26437 done
26438  ;;
26439     "default":C)
26440 chmod +x tests/run
26441 date > stamp-h
26442 BACKENDSC="servers/slapd/backends.c"
26443 echo "Making $BACKENDSC"
26444 rm -f $BACKENDSC
26445 cat > $BACKENDSC << ENDX
26446 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26447  *
26448  * Copyright 1998-2016 The OpenLDAP Foundation.
26449  * All rights reserved.
26450  *
26451  * Redistribution and use in source and binary forms, with or without
26452  * modification, are permitted only as authorized by the OpenLDAP
26453  * Public License.
26454  *
26455  * A copy of this license is available in the file LICENSE in the
26456  * top-level directory of the distribution or, alternatively, at
26457  * <http://www.OpenLDAP.org/license.html>.
26458  */
26459 /* This file is automatically generated by configure; please do not edit. */
26460
26461 #include "portable.h"
26462 #include "slap.h"
26463
26464 ENDX
26465 if test "${STATIC_BACKENDS}"; then
26466         for b in config ${STATIC_BACKENDS}; do
26467                 bb=`echo "${b}" | sed -e 's/back-//'`
26468                 cat >> $BACKENDSC << ENDX
26469 extern BI_init ${bb}_back_initialize;
26470 ENDX
26471         done
26472
26473         cat >> $BACKENDSC << ENDX
26474
26475 BackendInfo slap_binfo[] = {
26476 ENDX
26477
26478         for b in config ${STATIC_BACKENDS}; do
26479                 bb=`echo "${b}" | sed -e 's/back-//'`
26480                 echo "    Add ${bb} ..."
26481                 cat >> $BACKENDSC << ENDX
26482         { "${bb}", ${bb}_back_initialize },
26483 ENDX
26484         done
26485
26486         cat >> $BACKENDSC << ENDX
26487         { NULL, NULL },
26488 };
26489
26490 /* end of generated file */
26491 ENDX
26492 fi
26493 OVERLAYSC="servers/slapd/overlays/statover.c"
26494 echo "Making $OVERLAYSC"
26495 rm -f $OVERLAYSC
26496 cat > $OVERLAYSC << ENDX
26497 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26498  *
26499  * Copyright 1998-2016 The OpenLDAP Foundation.
26500  * All rights reserved.
26501  *
26502  * Redistribution and use in source and binary forms, with or without
26503  * modification, are permitted only as authorized by the OpenLDAP
26504  * Public License.
26505  *
26506  * A copy of this license is available in the file LICENSE in the
26507  * top-level directory of the distribution or, alternatively, at
26508  * <http://www.OpenLDAP.org/license.html>.
26509  */
26510 /* This file is automatically generated by configure; please do not edit. */
26511
26512 #include "portable.h"
26513 #include "slap.h"
26514
26515 ENDX
26516 if test "${STATIC_OVERLAYS}"; then
26517         for o in ${STATIC_OVERLAYS}; do
26518                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26519                 cat >> $OVERLAYSC << ENDX
26520 extern OV_init ${oo}_initialize;
26521 ENDX
26522         done
26523 fi
26524
26525 cat >> $OVERLAYSC << ENDX
26526
26527 OverlayInit slap_oinfo[] = {
26528 ENDX
26529
26530 if test "${STATIC_OVERLAYS}"; then
26531         for o in ${STATIC_OVERLAYS}; do
26532                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26533                 echo "    Add ${oo} ..."
26534                 cat >> $OVERLAYSC << ENDX
26535         { "${oo}", ${oo}_initialize },
26536 ENDX
26537         done
26538 fi
26539
26540         cat >> $OVERLAYSC << ENDX
26541         { NULL, NULL },
26542 };
26543
26544 /* end of generated file */
26545 ENDX
26546
26547 if test "${ol_cv_mkdep}" = no; then
26548         echo '(Do not "make depend"; we do not know how to build dependencies)'
26549 else
26550         echo 'Please run "make depend" to build dependencies'
26551 fi
26552  ;;
26553
26554   esac
26555 done # for ac_tag
26556
26557
26558 as_fn_exit 0
26559 _ACEOF
26560 ac_clean_files=$ac_clean_files_save
26561
26562 test $ac_write_fail = 0 ||
26563   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
26564
26565
26566 # configure is writing to config.log, and then calls config.status.
26567 # config.status does its own redirection, appending to config.log.
26568 # Unfortunately, on DOS this fails, as config.log is still kept open
26569 # by configure, so config.status won't be able to write to it; its
26570 # output is simply discarded.  So we exec the FD to /dev/null,
26571 # effectively closing config.log, so it can be properly (re)opened and
26572 # appended to by config.status.  When coming back to configure, we
26573 # need to make the FD available again.
26574 if test "$no_create" != yes; then
26575   ac_cs_success=:
26576   ac_config_status_args=
26577   test "$silent" = yes &&
26578     ac_config_status_args="$ac_config_status_args --quiet"
26579   exec 5>/dev/null
26580   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26581   exec 5>>config.log
26582   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26583   # would make configure fail if this is the last instruction.
26584   $ac_cs_success || as_fn_exit $?
26585 fi
26586 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26587   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26588 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26589 fi
26590