]> git.sur5r.net Git - openldap/blob - configure
ITS#8798 Unify slapd-* tools setup
[openldap] / configure
1 #! /bin/sh
2 # From configure.in Id: 46e5e8cc8f0216bd3fa077597f237c3dbabd3a75 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.65.
5 #
6 # Copyright 1998-2017 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_AUTOCA
807 BUILD_AUDITLOG
808 BUILD_ACCESSLOG
809 BUILD_WT
810 BUILD_SQL
811 BUILD_SOCK
812 BUILD_SHELL
813 BUILD_PERL
814 BUILD_RELAY
815 BUILD_PASSWD
816 BUILD_NULL
817 BUILD_NDB
818 BUILD_MONITOR
819 BUILD_ASYNCMETA
820 BUILD_META
821 BUILD_MDB
822 BUILD_LDAP
823 BUILD_HDB
824 BUILD_DNSSRV
825 BUILD_BDB
826 SLAPD_SLAPI_DEPEND
827 BUILD_SLAPI
828 BUILD_SLAPD
829 BUILD_LIBS_DYNAMIC
830 BUILD_THREAD
831 WITH_ACI_ENABLED
832 WITH_MODULES_ENABLED
833 WITH_TLS
834 WITH_SASL
835 PLAT
836 LIBSRCS
837 LIBOBJS
838 PKGCONFIG
839 MYSQL
840 LTSTATIC
841 OL_MKDEP_FLAGS
842 OL_MKDEP
843 PERLBIN
844 LIBTOOL
845 CPP
846 OBJDUMP
847 AS
848 DLLTOOL
849 RANLIB
850 ECHO
851 LN_S
852 EGREP
853 GREP
854 am__fastdepCC_FALSE
855 am__fastdepCC_TRUE
856 CCDEPMODE
857 AMDEPBACKSLASH
858 AMDEP_FALSE
859 AMDEP_TRUE
860 am__quote
861 am__include
862 DEPDIR
863 OBJEXT
864 EXEEXT
865 ac_ct_CC
866 CPPFLAGS
867 LDFLAGS
868 CFLAGS
869 AR
870 CC
871 ldap_subdir
872 top_builddir
873 OPENLDAP_RELEASE_DATE
874 OPENLDAP_LIBVERSION
875 OPENLDAP_LIBRELEASE
876 am__untar
877 am__tar
878 AMTAR
879 am__leading_dot
880 SET_MAKE
881 AWK
882 mkdir_p
883 INSTALL_STRIP_PROGRAM
884 STRIP
885 install_sh
886 MAKEINFO
887 AUTOHEADER
888 AUTOMAKE
889 AUTOCONF
890 ACLOCAL
891 VERSION
892 PACKAGE
893 CYGPATH_W
894 INSTALL_DATA
895 INSTALL_SCRIPT
896 INSTALL_PROGRAM
897 target_os
898 target_vendor
899 target_cpu
900 target
901 host_os
902 host_vendor
903 host_cpu
904 host
905 build_os
906 build_vendor
907 build_cpu
908 build
909 target_alias
910 host_alias
911 build_alias
912 LIBS
913 ECHO_T
914 ECHO_N
915 ECHO_C
916 DEFS
917 mandir
918 localedir
919 libdir
920 psdir
921 pdfdir
922 dvidir
923 htmldir
924 infodir
925 docdir
926 oldincludedir
927 includedir
928 localstatedir
929 sharedstatedir
930 sysconfdir
931 datadir
932 datarootdir
933 libexecdir
934 sbindir
935 bindir
936 program_transform_name
937 prefix
938 exec_prefix
939 PACKAGE_URL
940 PACKAGE_BUGREPORT
941 PACKAGE_STRING
942 PACKAGE_VERSION
943 PACKAGE_TARNAME
944 PACKAGE_NAME
945 PATH_SEPARATOR
946 SHELL'
947 ac_subst_files=''
948 ac_user_opts='
949 enable_option_checking
950 with_subdir
951 enable_debug
952 enable_dynamic
953 enable_syslog
954 enable_proctitle
955 enable_ipv6
956 enable_local
957 with_cyrus_sasl
958 with_fetch
959 with_threads
960 with_tls
961 with_yielding_select
962 with_mp
963 with_odbc
964 enable_xxslapdoptions
965 enable_slapd
966 enable_dynacl
967 enable_aci
968 enable_cleartext
969 enable_crypt
970 enable_lmpasswd
971 enable_spasswd
972 enable_modules
973 enable_rewrite
974 enable_rlookups
975 enable_slapi
976 enable_slp
977 enable_wrappers
978 enable_xxslapbackends
979 enable_backends
980 enable_bdb
981 enable_dnssrv
982 enable_hdb
983 enable_ldap
984 enable_mdb
985 enable_meta
986 enable_asyncmeta
987 enable_monitor
988 enable_ndb
989 enable_null
990 enable_passwd
991 enable_perl
992 enable_relay
993 enable_shell
994 enable_sock
995 enable_sql
996 enable_wt
997 enable_xxslapoverlays
998 enable_overlays
999 enable_accesslog
1000 enable_auditlog
1001 enable_autoca
1002 enable_collect
1003 enable_constraint
1004 enable_dds
1005 enable_deref
1006 enable_dyngroup
1007 enable_dynlist
1008 enable_memberof
1009 enable_ppolicy
1010 enable_proxycache
1011 enable_refint
1012 enable_retcode
1013 enable_rwm
1014 enable_seqmod
1015 enable_sssvlv
1016 enable_syncprov
1017 enable_translucent
1018 enable_unique
1019 enable_valsort
1020 enable_xxliboptions
1021 enable_static
1022 enable_shared
1023 enable_fast_install
1024 enable_dependency_tracking
1025 with_gnu_ld
1026 enable_libtool_lock
1027 with_pic
1028 with_tags
1029 with_xxinstall
1030 '
1031       ac_precious_vars='build_alias
1032 host_alias
1033 target_alias
1034 CC
1035 CFLAGS
1036 LDFLAGS
1037 LIBS
1038 CPPFLAGS
1039 CPP'
1040
1041
1042 # Initialize some variables set by options.
1043 ac_init_help=
1044 ac_init_version=false
1045 ac_unrecognized_opts=
1046 ac_unrecognized_sep=
1047 # The variables have the same names as the options, with
1048 # dashes changed to underlines.
1049 cache_file=/dev/null
1050 exec_prefix=NONE
1051 no_create=
1052 no_recursion=
1053 prefix=NONE
1054 program_prefix=NONE
1055 program_suffix=NONE
1056 program_transform_name=s,x,x,
1057 silent=
1058 site=
1059 srcdir=
1060 verbose=
1061 x_includes=NONE
1062 x_libraries=NONE
1063
1064 # Installation directory options.
1065 # These are left unexpanded so users can "make install exec_prefix=/foo"
1066 # and all the variables that are supposed to be based on exec_prefix
1067 # by default will actually change.
1068 # Use braces instead of parens because sh, perl, etc. also accept them.
1069 # (The list follows the same order as the GNU Coding Standards.)
1070 bindir='${exec_prefix}/bin'
1071 sbindir='${exec_prefix}/sbin'
1072 libexecdir='${exec_prefix}/libexec'
1073 datarootdir='${prefix}/share'
1074 datadir='${datarootdir}'
1075 sysconfdir='${prefix}/etc'
1076 sharedstatedir='${prefix}/com'
1077 localstatedir='${prefix}/var'
1078 includedir='${prefix}/include'
1079 oldincludedir='/usr/include'
1080 docdir='${datarootdir}/doc/${PACKAGE}'
1081 infodir='${datarootdir}/info'
1082 htmldir='${docdir}'
1083 dvidir='${docdir}'
1084 pdfdir='${docdir}'
1085 psdir='${docdir}'
1086 libdir='${exec_prefix}/lib'
1087 localedir='${datarootdir}/locale'
1088 mandir='${datarootdir}/man'
1089
1090 ac_prev=
1091 ac_dashdash=
1092 for ac_option
1093 do
1094   # If the previous option needs an argument, assign it.
1095   if test -n "$ac_prev"; then
1096     eval $ac_prev=\$ac_option
1097     ac_prev=
1098     continue
1099   fi
1100
1101   case $ac_option in
1102   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1103   *)    ac_optarg=yes ;;
1104   esac
1105
1106   # Accept the important Cygnus configure options, so we can diagnose typos.
1107
1108   case $ac_dashdash$ac_option in
1109   --)
1110     ac_dashdash=yes ;;
1111
1112   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1113     ac_prev=bindir ;;
1114   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1115     bindir=$ac_optarg ;;
1116
1117   -build | --build | --buil | --bui | --bu)
1118     ac_prev=build_alias ;;
1119   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1120     build_alias=$ac_optarg ;;
1121
1122   -cache-file | --cache-file | --cache-fil | --cache-fi \
1123   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1124     ac_prev=cache_file ;;
1125   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1126   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1127     cache_file=$ac_optarg ;;
1128
1129   --config-cache | -C)
1130     cache_file=config.cache ;;
1131
1132   -datadir | --datadir | --datadi | --datad)
1133     ac_prev=datadir ;;
1134   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1135     datadir=$ac_optarg ;;
1136
1137   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1138   | --dataroo | --dataro | --datar)
1139     ac_prev=datarootdir ;;
1140   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1141   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1142     datarootdir=$ac_optarg ;;
1143
1144   -disable-* | --disable-*)
1145     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1146     # Reject names that are not valid shell variable names.
1147     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1148       as_fn_error "invalid feature name: $ac_useropt"
1149     ac_useropt_orig=$ac_useropt
1150     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1151     case $ac_user_opts in
1152       *"
1153 "enable_$ac_useropt"
1154 "*) ;;
1155       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1156          ac_unrecognized_sep=', ';;
1157     esac
1158     eval enable_$ac_useropt=no ;;
1159
1160   -docdir | --docdir | --docdi | --doc | --do)
1161     ac_prev=docdir ;;
1162   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1163     docdir=$ac_optarg ;;
1164
1165   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1166     ac_prev=dvidir ;;
1167   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1168     dvidir=$ac_optarg ;;
1169
1170   -enable-* | --enable-*)
1171     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1172     # Reject names that are not valid shell variable names.
1173     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1174       as_fn_error "invalid feature name: $ac_useropt"
1175     ac_useropt_orig=$ac_useropt
1176     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1177     case $ac_user_opts in
1178       *"
1179 "enable_$ac_useropt"
1180 "*) ;;
1181       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1182          ac_unrecognized_sep=', ';;
1183     esac
1184     eval enable_$ac_useropt=\$ac_optarg ;;
1185
1186   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1187   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1188   | --exec | --exe | --ex)
1189     ac_prev=exec_prefix ;;
1190   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1191   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1192   | --exec=* | --exe=* | --ex=*)
1193     exec_prefix=$ac_optarg ;;
1194
1195   -gas | --gas | --ga | --g)
1196     # Obsolete; use --with-gas.
1197     with_gas=yes ;;
1198
1199   -help | --help | --hel | --he | -h)
1200     ac_init_help=long ;;
1201   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1202     ac_init_help=recursive ;;
1203   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1204     ac_init_help=short ;;
1205
1206   -host | --host | --hos | --ho)
1207     ac_prev=host_alias ;;
1208   -host=* | --host=* | --hos=* | --ho=*)
1209     host_alias=$ac_optarg ;;
1210
1211   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1212     ac_prev=htmldir ;;
1213   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1214   | --ht=*)
1215     htmldir=$ac_optarg ;;
1216
1217   -includedir | --includedir | --includedi | --included | --include \
1218   | --includ | --inclu | --incl | --inc)
1219     ac_prev=includedir ;;
1220   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1221   | --includ=* | --inclu=* | --incl=* | --inc=*)
1222     includedir=$ac_optarg ;;
1223
1224   -infodir | --infodir | --infodi | --infod | --info | --inf)
1225     ac_prev=infodir ;;
1226   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1227     infodir=$ac_optarg ;;
1228
1229   -libdir | --libdir | --libdi | --libd)
1230     ac_prev=libdir ;;
1231   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1232     libdir=$ac_optarg ;;
1233
1234   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1235   | --libexe | --libex | --libe)
1236     ac_prev=libexecdir ;;
1237   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1238   | --libexe=* | --libex=* | --libe=*)
1239     libexecdir=$ac_optarg ;;
1240
1241   -localedir | --localedir | --localedi | --localed | --locale)
1242     ac_prev=localedir ;;
1243   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1244     localedir=$ac_optarg ;;
1245
1246   -localstatedir | --localstatedir | --localstatedi | --localstated \
1247   | --localstate | --localstat | --localsta | --localst | --locals)
1248     ac_prev=localstatedir ;;
1249   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1250   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1251     localstatedir=$ac_optarg ;;
1252
1253   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1254     ac_prev=mandir ;;
1255   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1256     mandir=$ac_optarg ;;
1257
1258   -nfp | --nfp | --nf)
1259     # Obsolete; use --without-fp.
1260     with_fp=no ;;
1261
1262   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1263   | --no-cr | --no-c | -n)
1264     no_create=yes ;;
1265
1266   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1267   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1268     no_recursion=yes ;;
1269
1270   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1271   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1272   | --oldin | --oldi | --old | --ol | --o)
1273     ac_prev=oldincludedir ;;
1274   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1275   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1276   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1277     oldincludedir=$ac_optarg ;;
1278
1279   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1280     ac_prev=prefix ;;
1281   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1282     prefix=$ac_optarg ;;
1283
1284   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1285   | --program-pre | --program-pr | --program-p)
1286     ac_prev=program_prefix ;;
1287   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1288   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1289     program_prefix=$ac_optarg ;;
1290
1291   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1292   | --program-suf | --program-su | --program-s)
1293     ac_prev=program_suffix ;;
1294   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1295   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1296     program_suffix=$ac_optarg ;;
1297
1298   -program-transform-name | --program-transform-name \
1299   | --program-transform-nam | --program-transform-na \
1300   | --program-transform-n | --program-transform- \
1301   | --program-transform | --program-transfor \
1302   | --program-transfo | --program-transf \
1303   | --program-trans | --program-tran \
1304   | --progr-tra | --program-tr | --program-t)
1305     ac_prev=program_transform_name ;;
1306   -program-transform-name=* | --program-transform-name=* \
1307   | --program-transform-nam=* | --program-transform-na=* \
1308   | --program-transform-n=* | --program-transform-=* \
1309   | --program-transform=* | --program-transfor=* \
1310   | --program-transfo=* | --program-transf=* \
1311   | --program-trans=* | --program-tran=* \
1312   | --progr-tra=* | --program-tr=* | --program-t=*)
1313     program_transform_name=$ac_optarg ;;
1314
1315   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1316     ac_prev=pdfdir ;;
1317   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1318     pdfdir=$ac_optarg ;;
1319
1320   -psdir | --psdir | --psdi | --psd | --ps)
1321     ac_prev=psdir ;;
1322   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1323     psdir=$ac_optarg ;;
1324
1325   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1326   | -silent | --silent | --silen | --sile | --sil)
1327     silent=yes ;;
1328
1329   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1330     ac_prev=sbindir ;;
1331   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1332   | --sbi=* | --sb=*)
1333     sbindir=$ac_optarg ;;
1334
1335   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1336   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1337   | --sharedst | --shareds | --shared | --share | --shar \
1338   | --sha | --sh)
1339     ac_prev=sharedstatedir ;;
1340   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1341   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1342   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1343   | --sha=* | --sh=*)
1344     sharedstatedir=$ac_optarg ;;
1345
1346   -site | --site | --sit)
1347     ac_prev=site ;;
1348   -site=* | --site=* | --sit=*)
1349     site=$ac_optarg ;;
1350
1351   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1352     ac_prev=srcdir ;;
1353   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1354     srcdir=$ac_optarg ;;
1355
1356   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1357   | --syscon | --sysco | --sysc | --sys | --sy)
1358     ac_prev=sysconfdir ;;
1359   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1360   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1361     sysconfdir=$ac_optarg ;;
1362
1363   -target | --target | --targe | --targ | --tar | --ta | --t)
1364     ac_prev=target_alias ;;
1365   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1366     target_alias=$ac_optarg ;;
1367
1368   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1369     verbose=yes ;;
1370
1371   -version | --version | --versio | --versi | --vers | -V)
1372     ac_init_version=: ;;
1373
1374   -with-* | --with-*)
1375     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1376     # Reject names that are not valid shell variable names.
1377     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1378       as_fn_error "invalid package name: $ac_useropt"
1379     ac_useropt_orig=$ac_useropt
1380     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1381     case $ac_user_opts in
1382       *"
1383 "with_$ac_useropt"
1384 "*) ;;
1385       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1386          ac_unrecognized_sep=', ';;
1387     esac
1388     eval with_$ac_useropt=\$ac_optarg ;;
1389
1390   -without-* | --without-*)
1391     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1392     # Reject names that are not valid shell variable names.
1393     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1394       as_fn_error "invalid package name: $ac_useropt"
1395     ac_useropt_orig=$ac_useropt
1396     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1397     case $ac_user_opts in
1398       *"
1399 "with_$ac_useropt"
1400 "*) ;;
1401       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1402          ac_unrecognized_sep=', ';;
1403     esac
1404     eval with_$ac_useropt=no ;;
1405
1406   --x)
1407     # Obsolete; use --with-x.
1408     with_x=yes ;;
1409
1410   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1411   | --x-incl | --x-inc | --x-in | --x-i)
1412     ac_prev=x_includes ;;
1413   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1414   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1415     x_includes=$ac_optarg ;;
1416
1417   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1418   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1419     ac_prev=x_libraries ;;
1420   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1421   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1422     x_libraries=$ac_optarg ;;
1423
1424   -*) as_fn_error "unrecognized option: \`$ac_option'
1425 Try \`$0 --help' for more information."
1426     ;;
1427
1428   *=*)
1429     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1430     # Reject names that are not valid shell variable names.
1431     case $ac_envvar in #(
1432       '' | [0-9]* | *[!_$as_cr_alnum]* )
1433       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1434     esac
1435     eval $ac_envvar=\$ac_optarg
1436     export $ac_envvar ;;
1437
1438   *)
1439     # FIXME: should be removed in autoconf 3.0.
1440     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1441     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1442       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1443     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1444     ;;
1445
1446   esac
1447 done
1448
1449 if test -n "$ac_prev"; then
1450   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1451   as_fn_error "missing argument to $ac_option"
1452 fi
1453
1454 if test -n "$ac_unrecognized_opts"; then
1455   case $enable_option_checking in
1456     no) ;;
1457     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1458     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1459   esac
1460 fi
1461
1462 # Check all directory arguments for consistency.
1463 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1464                 datadir sysconfdir sharedstatedir localstatedir includedir \
1465                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1466                 libdir localedir mandir
1467 do
1468   eval ac_val=\$$ac_var
1469   # Remove trailing slashes.
1470   case $ac_val in
1471     */ )
1472       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1473       eval $ac_var=\$ac_val;;
1474   esac
1475   # Be sure to have absolute directory names.
1476   case $ac_val in
1477     [\\/$]* | ?:[\\/]* )  continue;;
1478     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1479   esac
1480   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1481 done
1482
1483 # There might be people who depend on the old broken behavior: `$host'
1484 # used to hold the argument of --host etc.
1485 # FIXME: To remove some day.
1486 build=$build_alias
1487 host=$host_alias
1488 target=$target_alias
1489
1490 # FIXME: To remove some day.
1491 if test "x$host_alias" != x; then
1492   if test "x$build_alias" = x; then
1493     cross_compiling=maybe
1494     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1495     If a cross compiler is detected then cross compile mode will be used." >&2
1496   elif test "x$build_alias" != "x$host_alias"; then
1497     cross_compiling=yes
1498   fi
1499 fi
1500
1501 ac_tool_prefix=
1502 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1503
1504 test "$silent" = yes && exec 6>/dev/null
1505
1506
1507 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1508 ac_ls_di=`ls -di .` &&
1509 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1510   as_fn_error "working directory cannot be determined"
1511 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1512   as_fn_error "pwd does not report name of working directory"
1513
1514
1515 # Find the source files, if location was not specified.
1516 if test -z "$srcdir"; then
1517   ac_srcdir_defaulted=yes
1518   # Try the directory containing this script, then the parent directory.
1519   ac_confdir=`$as_dirname -- "$as_myself" ||
1520 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1521          X"$as_myself" : 'X\(//\)[^/]' \| \
1522          X"$as_myself" : 'X\(//\)$' \| \
1523          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1524 $as_echo X"$as_myself" |
1525     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1526             s//\1/
1527             q
1528           }
1529           /^X\(\/\/\)[^/].*/{
1530             s//\1/
1531             q
1532           }
1533           /^X\(\/\/\)$/{
1534             s//\1/
1535             q
1536           }
1537           /^X\(\/\).*/{
1538             s//\1/
1539             q
1540           }
1541           s/.*/./; q'`
1542   srcdir=$ac_confdir
1543   if test ! -r "$srcdir/$ac_unique_file"; then
1544     srcdir=..
1545   fi
1546 else
1547   ac_srcdir_defaulted=no
1548 fi
1549 if test ! -r "$srcdir/$ac_unique_file"; then
1550   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1551   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1552 fi
1553 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1554 ac_abs_confdir=`(
1555         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1556         pwd)`
1557 # When building in place, set srcdir=.
1558 if test "$ac_abs_confdir" = "$ac_pwd"; then
1559   srcdir=.
1560 fi
1561 # Remove unnecessary trailing slashes from srcdir.
1562 # Double slashes in file names in object file debugging info
1563 # mess up M-x gdb in Emacs.
1564 case $srcdir in
1565 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1566 esac
1567 for ac_var in $ac_precious_vars; do
1568   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1569   eval ac_env_${ac_var}_value=\$${ac_var}
1570   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1571   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1572 done
1573
1574 #
1575 # Report the --help message.
1576 #
1577 if test "$ac_init_help" = "long"; then
1578   # Omit some internal or obsolete options to make the list less imposing.
1579   # This message is too long to be a string in the A/UX 3.1 sh.
1580   cat <<_ACEOF
1581 \`configure' configures this package to adapt to many kinds of systems.
1582
1583 Usage: $0 [OPTION]... [VAR=VALUE]...
1584
1585 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1586 VAR=VALUE.  See below for descriptions of some of the useful variables.
1587
1588 Defaults for the options are specified in brackets.
1589
1590 Configuration:
1591   -h, --help              display this help and exit
1592       --help=short        display options specific to this package
1593       --help=recursive    display the short help of all the included packages
1594   -V, --version           display version information and exit
1595   -q, --quiet, --silent   do not print \`checking...' messages
1596       --cache-file=FILE   cache test results in FILE [disabled]
1597   -C, --config-cache      alias for \`--cache-file=config.cache'
1598   -n, --no-create         do not create output files
1599       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1600
1601 Installation directories:
1602   --prefix=PREFIX         install architecture-independent files in PREFIX
1603                           [$ac_default_prefix]
1604   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1605                           [PREFIX]
1606
1607 By default, \`make install' will install all the files in
1608 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1609 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1610 for instance \`--prefix=\$HOME'.
1611
1612 For better control, use the options below.
1613
1614 Fine tuning of the installation directories:
1615   --bindir=DIR            user executables [EPREFIX/bin]
1616   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1617   --libexecdir=DIR        program executables [EPREFIX/libexec]
1618   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1619   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1620   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1621   --libdir=DIR            object code libraries [EPREFIX/lib]
1622   --includedir=DIR        C header files [PREFIX/include]
1623   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1624   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1625   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1626   --infodir=DIR           info documentation [DATAROOTDIR/info]
1627   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1628   --mandir=DIR            man documentation [DATAROOTDIR/man]
1629   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1630   --htmldir=DIR           html documentation [DOCDIR]
1631   --dvidir=DIR            dvi documentation [DOCDIR]
1632   --pdfdir=DIR            pdf documentation [DOCDIR]
1633   --psdir=DIR             ps documentation [DOCDIR]
1634 _ACEOF
1635
1636   cat <<\_ACEOF
1637
1638 Program names:
1639   --program-prefix=PREFIX            prepend PREFIX to installed program names
1640   --program-suffix=SUFFIX            append SUFFIX to installed program names
1641   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1642
1643 System types:
1644   --build=BUILD     configure for building on BUILD [guessed]
1645   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1646   --target=TARGET   configure for building compilers for TARGET [HOST]
1647 _ACEOF
1648 fi
1649
1650 if test -n "$ac_init_help"; then
1651
1652   cat <<\_ACEOF
1653
1654 Optional Features:
1655   --disable-option-checking  ignore unrecognized --enable/--with options
1656   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1657   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1658   --enable-debug          enable debugging no|yes|traditional [yes]
1659   --enable-dynamic        enable linking built binaries with dynamic libs [no]
1660   --enable-syslog         enable syslog support [auto]
1661   --enable-proctitle      enable proctitle support [yes]
1662   --enable-ipv6           enable IPv6 support [auto]
1663   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]
1664
1665 SLAPD (Standalone LDAP Daemon) Options:
1666   --enable-slapd          enable building slapd [yes]
1667     --enable-dynacl       enable run-time loadable ACL support (experimental) [no]
1668     --enable-aci          enable per-object ACIs (experimental) no|yes|mod [no]
1669     --enable-cleartext    enable cleartext passwords [yes]
1670     --enable-crypt        enable crypt(3) passwords [no]
1671     --enable-lmpasswd     enable LAN Manager passwords [no]
1672     --enable-spasswd      enable (Cyrus) SASL password verification [no]
1673     --enable-modules      enable dynamic module support [no]
1674     --enable-rewrite      enable DN rewriting in back-ldap and rwm overlay [auto]
1675     --enable-rlookups     enable reverse lookups of client hostnames [no]
1676     --enable-slapi        enable SLAPI support (experimental) [no]
1677     --enable-slp          enable SLPv2 support [no]
1678     --enable-wrappers     enable tcp wrapper support [no]
1679
1680 SLAPD Backend Options:
1681     --enable-backends     enable all available backends no|yes|mod
1682     --enable-bdb          enable Berkeley DB backend no|yes|mod [no]
1683     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]
1684     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]
1685     --enable-ldap         enable ldap backend no|yes|mod [no]
1686     --enable-mdb          enable mdb database backend no|yes|mod [yes]
1687     --enable-meta         enable metadirectory backend no|yes|mod [no]
1688     --enable-asyncmeta    enable asynchronous metadirectory backend no|yes|mod [no]
1689     --enable-monitor      enable monitor backend no|yes|mod [yes]
1690     --enable-ndb          enable MySQL NDB Cluster backend no|yes|mod [no]
1691     --enable-null         enable null backend no|yes|mod [no]
1692     --enable-passwd       enable passwd backend no|yes|mod [no]
1693     --enable-perl         enable perl backend no|yes|mod [no]
1694     --enable-relay        enable relay backend no|yes|mod [yes]
1695     --enable-shell        enable shell backend no|yes|mod [no]
1696     --enable-sock         enable sock backend no|yes|mod [no]
1697     --enable-sql          enable sql backend no|yes|mod [no]
1698     --enable-wt   enable WiredTiger backend no|yes|mod [no]
1699
1700 SLAPD Overlay Options:
1701     --enable-overlays     enable all available overlays no|yes|mod
1702     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [no]
1703     --enable-auditlog     Audit Logging overlay no|yes|mod [no]
1704     --enable-autoca       Automatic Certificate Authority overlay no|yes|mod [no]
1705     --enable-collect      Collect overlay no|yes|mod [no]
1706     --enable-constraint   Attribute Constraint overlay no|yes|mod [no]
1707     --enable-dds          Dynamic Directory Services overlay no|yes|mod [no]
1708     --enable-deref        Dereference overlay no|yes|mod [no]
1709     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1710     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1711     --enable-memberof     Reverse Group Membership overlay no|yes|mod [no]
1712     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1713     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1714     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1715     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1716     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1717     --enable-seqmod       Sequential Modify overlay no|yes|mod [no]
1718     --enable-sssvlv       ServerSideSort/VLV overlay no|yes|mod [no]
1719     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1720     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1721     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1722     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1723
1724 Library Generation & Linking Options
1725   --enable-static[=PKGS]  build static libraries [default=yes]
1726   --enable-shared[=PKGS]  build shared libraries [default=yes]
1727   --enable-fast-install[=PKGS]
1728                           optimize for fast installation [default=yes]
1729   --disable-dependency-tracking  speeds up one-time build
1730   --enable-dependency-tracking   do not reject slow dependency extractors
1731   --disable-libtool-lock  avoid locking (might break parallel builds)
1732
1733 Optional Packages:
1734   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1735   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1736   --with-subdir=DIR       change default subdirectory used for installs
1737   --with-cyrus-sasl       with Cyrus SASL support [auto]
1738   --with-fetch            with fetch(3) URL support [auto]
1739   --with-threads          with threads [auto]
1740   --with-tls              with TLS/SSL support auto|openssl|gnutls|moznss [auto]
1741   --with-yielding-select  with implicitly yielding select [auto]
1742   --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1743   --with-odbc             with specific ODBC support iodbc|unixodbc|odbc32|auto [auto]
1744   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1745   --with-pic              try to use only PIC/non-PIC objects [default=use
1746                           both]
1747   --with-tags[=TAGS]      include additional configurations [automatic]
1748
1749 See INSTALL file for further details.
1750
1751 Some influential environment variables:
1752   CC          C compiler command
1753   CFLAGS      C compiler flags
1754   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1755               nonstandard directory <lib dir>
1756   LIBS        libraries to pass to the linker, e.g. -l<library>
1757   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1758               you have headers in a nonstandard directory <include dir>
1759   CPP         C preprocessor
1760
1761 Use these variables to override the choices made by `configure' or to help
1762 it to find libraries and programs with nonstandard names/locations.
1763
1764 Report bugs to the package provider.
1765 _ACEOF
1766 ac_status=$?
1767 fi
1768
1769 if test "$ac_init_help" = "recursive"; then
1770   # If there are subdirs, report their specific --help.
1771   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1772     test -d "$ac_dir" ||
1773       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1774       continue
1775     ac_builddir=.
1776
1777 case "$ac_dir" in
1778 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1779 *)
1780   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1781   # A ".." for each directory in $ac_dir_suffix.
1782   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1783   case $ac_top_builddir_sub in
1784   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1785   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1786   esac ;;
1787 esac
1788 ac_abs_top_builddir=$ac_pwd
1789 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1790 # for backward compatibility:
1791 ac_top_builddir=$ac_top_build_prefix
1792
1793 case $srcdir in
1794   .)  # We are building in place.
1795     ac_srcdir=.
1796     ac_top_srcdir=$ac_top_builddir_sub
1797     ac_abs_top_srcdir=$ac_pwd ;;
1798   [\\/]* | ?:[\\/]* )  # Absolute name.
1799     ac_srcdir=$srcdir$ac_dir_suffix;
1800     ac_top_srcdir=$srcdir
1801     ac_abs_top_srcdir=$srcdir ;;
1802   *) # Relative name.
1803     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1804     ac_top_srcdir=$ac_top_build_prefix$srcdir
1805     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1806 esac
1807 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1808
1809     cd "$ac_dir" || { ac_status=$?; continue; }
1810     # Check for guested configure.
1811     if test -f "$ac_srcdir/configure.gnu"; then
1812       echo &&
1813       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1814     elif test -f "$ac_srcdir/configure"; then
1815       echo &&
1816       $SHELL "$ac_srcdir/configure" --help=recursive
1817     else
1818       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1819     fi || ac_status=$?
1820     cd "$ac_pwd" || { ac_status=$?; break; }
1821   done
1822 fi
1823
1824 test -n "$ac_init_help" && exit $ac_status
1825 if $ac_init_version; then
1826   cat <<\_ACEOF
1827 configure
1828 generated by GNU Autoconf 2.65
1829
1830 Copyright (C) 2009 Free Software Foundation, Inc.
1831 This configure script is free software; the Free Software Foundation
1832 gives unlimited permission to copy, distribute and modify it.
1833
1834 Copyright 1998-2017 The OpenLDAP Foundation. All rights reserved.
1835 Restrictions apply, see COPYRIGHT and LICENSE files.
1836 _ACEOF
1837   exit
1838 fi
1839
1840 ## ------------------------ ##
1841 ## Autoconf initialization. ##
1842 ## ------------------------ ##
1843
1844 # ac_fn_c_try_compile LINENO
1845 # --------------------------
1846 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1847 ac_fn_c_try_compile ()
1848 {
1849   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850   rm -f conftest.$ac_objext
1851   if { { ac_try="$ac_compile"
1852 case "(($ac_try" in
1853   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1854   *) ac_try_echo=$ac_try;;
1855 esac
1856 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1857 $as_echo "$ac_try_echo"; } >&5
1858   (eval "$ac_compile") 2>conftest.err
1859   ac_status=$?
1860   if test -s conftest.err; then
1861     grep -v '^ *+' conftest.err >conftest.er1
1862     cat conftest.er1 >&5
1863     mv -f conftest.er1 conftest.err
1864   fi
1865   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866   test $ac_status = 0; } && {
1867          test -z "$ac_c_werror_flag" ||
1868          test ! -s conftest.err
1869        } && test -s conftest.$ac_objext; then :
1870   ac_retval=0
1871 else
1872   $as_echo "$as_me: failed program was:" >&5
1873 sed 's/^/| /' conftest.$ac_ext >&5
1874
1875         ac_retval=1
1876 fi
1877   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1878   as_fn_set_status $ac_retval
1879
1880 } # ac_fn_c_try_compile
1881
1882 # ac_fn_c_try_link LINENO
1883 # -----------------------
1884 # Try to link conftest.$ac_ext, and return whether this succeeded.
1885 ac_fn_c_try_link ()
1886 {
1887   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1888   rm -f conftest.$ac_objext conftest$ac_exeext
1889   if { { ac_try="$ac_link"
1890 case "(($ac_try" in
1891   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1892   *) ac_try_echo=$ac_try;;
1893 esac
1894 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1895 $as_echo "$ac_try_echo"; } >&5
1896   (eval "$ac_link") 2>conftest.err
1897   ac_status=$?
1898   if test -s conftest.err; then
1899     grep -v '^ *+' conftest.err >conftest.er1
1900     cat conftest.er1 >&5
1901     mv -f conftest.er1 conftest.err
1902   fi
1903   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1904   test $ac_status = 0; } && {
1905          test -z "$ac_c_werror_flag" ||
1906          test ! -s conftest.err
1907        } && test -s conftest$ac_exeext && {
1908          test "$cross_compiling" = yes ||
1909          $as_test_x conftest$ac_exeext
1910        }; then :
1911   ac_retval=0
1912 else
1913   $as_echo "$as_me: failed program was:" >&5
1914 sed 's/^/| /' conftest.$ac_ext >&5
1915
1916         ac_retval=1
1917 fi
1918   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1919   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1920   # interfere with the next link command; also delete a directory that is
1921   # left behind by Apple's compiler.  We do this before executing the actions.
1922   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1923   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1924   as_fn_set_status $ac_retval
1925
1926 } # ac_fn_c_try_link
1927
1928 # ac_fn_c_try_cpp LINENO
1929 # ----------------------
1930 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1931 ac_fn_c_try_cpp ()
1932 {
1933   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1934   if { { ac_try="$ac_cpp conftest.$ac_ext"
1935 case "(($ac_try" in
1936   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1937   *) ac_try_echo=$ac_try;;
1938 esac
1939 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1940 $as_echo "$ac_try_echo"; } >&5
1941   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1942   ac_status=$?
1943   if test -s conftest.err; then
1944     grep -v '^ *+' conftest.err >conftest.er1
1945     cat conftest.er1 >&5
1946     mv -f conftest.er1 conftest.err
1947   fi
1948   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1949   test $ac_status = 0; } >/dev/null && {
1950          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1951          test ! -s conftest.err
1952        }; then :
1953   ac_retval=0
1954 else
1955   $as_echo "$as_me: failed program was:" >&5
1956 sed 's/^/| /' conftest.$ac_ext >&5
1957
1958     ac_retval=1
1959 fi
1960   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1961   as_fn_set_status $ac_retval
1962
1963 } # ac_fn_c_try_cpp
1964
1965 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1966 # -------------------------------------------------------
1967 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1968 # the include files in INCLUDES and setting the cache variable VAR
1969 # accordingly.
1970 ac_fn_c_check_header_mongrel ()
1971 {
1972   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1973   if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1974   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1975 $as_echo_n "checking for $2... " >&6; }
1976 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1977   $as_echo_n "(cached) " >&6
1978 fi
1979 eval ac_res=\$$3
1980                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981 $as_echo "$ac_res" >&6; }
1982 else
1983   # Is the header compilable?
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1985 $as_echo_n "checking $2 usability... " >&6; }
1986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987 /* end confdefs.h.  */
1988 $4
1989 #include <$2>
1990 _ACEOF
1991 if ac_fn_c_try_compile "$LINENO"; then :
1992   ac_header_compiler=yes
1993 else
1994   ac_header_compiler=no
1995 fi
1996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1998 $as_echo "$ac_header_compiler" >&6; }
1999
2000 # Is the header present?
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2002 $as_echo_n "checking $2 presence... " >&6; }
2003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2004 /* end confdefs.h.  */
2005 #include <$2>
2006 _ACEOF
2007 if ac_fn_c_try_cpp "$LINENO"; then :
2008   ac_header_preproc=yes
2009 else
2010   ac_header_preproc=no
2011 fi
2012 rm -f conftest.err conftest.$ac_ext
2013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2014 $as_echo "$ac_header_preproc" >&6; }
2015
2016 # So?  What about this header?
2017 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2018   yes:no: )
2019     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2020 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2021     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2022 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2023     ;;
2024   no:yes:* )
2025     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2026 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2027     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2028 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2029     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2030 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2031     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2032 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2033     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2034 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2035 ( cat <<\_ASBOX
2036 ## --------------------------------------------- ##
2037 ## Report this to <http://www.openldap.org/its/> ##
2038 ## --------------------------------------------- ##
2039 _ASBOX
2040      ) | sed "s/^/$as_me: WARNING:     /" >&2
2041     ;;
2042 esac
2043   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2044 $as_echo_n "checking for $2... " >&6; }
2045 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2046   $as_echo_n "(cached) " >&6
2047 else
2048   eval "$3=\$ac_header_compiler"
2049 fi
2050 eval ac_res=\$$3
2051                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2052 $as_echo "$ac_res" >&6; }
2053 fi
2054   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2055
2056 } # ac_fn_c_check_header_mongrel
2057
2058 # ac_fn_c_try_run LINENO
2059 # ----------------------
2060 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2061 # that executables *can* be run.
2062 ac_fn_c_try_run ()
2063 {
2064   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2065   if { { ac_try="$ac_link"
2066 case "(($ac_try" in
2067   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2068   *) ac_try_echo=$ac_try;;
2069 esac
2070 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2071 $as_echo "$ac_try_echo"; } >&5
2072   (eval "$ac_link") 2>&5
2073   ac_status=$?
2074   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2075   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2076   { { case "(($ac_try" in
2077   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2078   *) ac_try_echo=$ac_try;;
2079 esac
2080 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2081 $as_echo "$ac_try_echo"; } >&5
2082   (eval "$ac_try") 2>&5
2083   ac_status=$?
2084   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2085   test $ac_status = 0; }; }; then :
2086   ac_retval=0
2087 else
2088   $as_echo "$as_me: program exited with status $ac_status" >&5
2089        $as_echo "$as_me: failed program was:" >&5
2090 sed 's/^/| /' conftest.$ac_ext >&5
2091
2092        ac_retval=$ac_status
2093 fi
2094   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2095   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2096   as_fn_set_status $ac_retval
2097
2098 } # ac_fn_c_try_run
2099
2100 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2101 # -------------------------------------------------------
2102 # Tests whether HEADER exists and can be compiled using the include files in
2103 # INCLUDES, setting the cache variable VAR accordingly.
2104 ac_fn_c_check_header_compile ()
2105 {
2106   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2108 $as_echo_n "checking for $2... " >&6; }
2109 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2110   $as_echo_n "(cached) " >&6
2111 else
2112   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113 /* end confdefs.h.  */
2114 $4
2115 #include <$2>
2116 _ACEOF
2117 if ac_fn_c_try_compile "$LINENO"; then :
2118   eval "$3=yes"
2119 else
2120   eval "$3=no"
2121 fi
2122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123 fi
2124 eval ac_res=\$$3
2125                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2126 $as_echo "$ac_res" >&6; }
2127   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2128
2129 } # ac_fn_c_check_header_compile
2130
2131 # ac_fn_c_check_func LINENO FUNC VAR
2132 # ----------------------------------
2133 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2134 ac_fn_c_check_func ()
2135 {
2136   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2137   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2138 $as_echo_n "checking for $2... " >&6; }
2139 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2140   $as_echo_n "(cached) " >&6
2141 else
2142   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2143 /* end confdefs.h.  */
2144 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2145    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2146 #define $2 innocuous_$2
2147
2148 /* System header to define __stub macros and hopefully few prototypes,
2149     which can conflict with char $2 (); below.
2150     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2151     <limits.h> exists even on freestanding compilers.  */
2152
2153 #ifdef __STDC__
2154 # include <limits.h>
2155 #else
2156 # include <assert.h>
2157 #endif
2158
2159 #undef $2
2160
2161 /* Override any GCC internal prototype to avoid an error.
2162    Use char because int might match the return type of a GCC
2163    builtin and then its argument prototype would still apply.  */
2164 #ifdef __cplusplus
2165 extern "C"
2166 #endif
2167 char $2 ();
2168 /* The GNU C library defines this for functions which it implements
2169     to always fail with ENOSYS.  Some functions are actually named
2170     something starting with __ and the normal name is an alias.  */
2171 #if defined __stub_$2 || defined __stub___$2
2172 choke me
2173 #endif
2174
2175 int
2176 main ()
2177 {
2178 return $2 ();
2179   ;
2180   return 0;
2181 }
2182 _ACEOF
2183 if ac_fn_c_try_link "$LINENO"; then :
2184   eval "$3=yes"
2185 else
2186   eval "$3=no"
2187 fi
2188 rm -f core conftest.err conftest.$ac_objext \
2189     conftest$ac_exeext conftest.$ac_ext
2190 fi
2191 eval ac_res=\$$3
2192                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2193 $as_echo "$ac_res" >&6; }
2194   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2195
2196 } # ac_fn_c_check_func
2197
2198 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2199 # -------------------------------------------
2200 # Tests whether TYPE exists after having included INCLUDES, setting cache
2201 # variable VAR accordingly.
2202 ac_fn_c_check_type ()
2203 {
2204   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2205   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2206 $as_echo_n "checking for $2... " >&6; }
2207 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2208   $as_echo_n "(cached) " >&6
2209 else
2210   eval "$3=no"
2211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2212 /* end confdefs.h.  */
2213 $4
2214 int
2215 main ()
2216 {
2217 if (sizeof ($2))
2218          return 0;
2219   ;
2220   return 0;
2221 }
2222 _ACEOF
2223 if ac_fn_c_try_compile "$LINENO"; then :
2224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225 /* end confdefs.h.  */
2226 $4
2227 int
2228 main ()
2229 {
2230 if (sizeof (($2)))
2231             return 0;
2232   ;
2233   return 0;
2234 }
2235 _ACEOF
2236 if ac_fn_c_try_compile "$LINENO"; then :
2237
2238 else
2239   eval "$3=yes"
2240 fi
2241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2242 fi
2243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2244 fi
2245 eval ac_res=\$$3
2246                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2247 $as_echo "$ac_res" >&6; }
2248   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2249
2250 } # ac_fn_c_check_type
2251
2252 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2253 # ----------------------------------------------------
2254 # Tries to find if the field MEMBER exists in type AGGR, after including
2255 # INCLUDES, setting cache variable VAR accordingly.
2256 ac_fn_c_check_member ()
2257 {
2258   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2260 $as_echo_n "checking for $2.$3... " >&6; }
2261 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2262   $as_echo_n "(cached) " >&6
2263 else
2264   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265 /* end confdefs.h.  */
2266 $5
2267 int
2268 main ()
2269 {
2270 static $2 ac_aggr;
2271 if (ac_aggr.$3)
2272 return 0;
2273   ;
2274   return 0;
2275 }
2276 _ACEOF
2277 if ac_fn_c_try_compile "$LINENO"; then :
2278   eval "$4=yes"
2279 else
2280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281 /* end confdefs.h.  */
2282 $5
2283 int
2284 main ()
2285 {
2286 static $2 ac_aggr;
2287 if (sizeof ac_aggr.$3)
2288 return 0;
2289   ;
2290   return 0;
2291 }
2292 _ACEOF
2293 if ac_fn_c_try_compile "$LINENO"; then :
2294   eval "$4=yes"
2295 else
2296   eval "$4=no"
2297 fi
2298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2299 fi
2300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301 fi
2302 eval ac_res=\$$4
2303                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2304 $as_echo "$ac_res" >&6; }
2305   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2306
2307 } # ac_fn_c_check_member
2308
2309 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2310 # --------------------------------------------
2311 # Tries to find the compile-time value of EXPR in a program that includes
2312 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2313 # computed
2314 ac_fn_c_compute_int ()
2315 {
2316   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2317   if test "$cross_compiling" = yes; then
2318     # Depending upon the size, compute the lo and hi bounds.
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320 /* end confdefs.h.  */
2321 $4
2322 int
2323 main ()
2324 {
2325 static int test_array [1 - 2 * !(($2) >= 0)];
2326 test_array [0] = 0
2327
2328   ;
2329   return 0;
2330 }
2331 _ACEOF
2332 if ac_fn_c_try_compile "$LINENO"; then :
2333   ac_lo=0 ac_mid=0
2334   while :; do
2335     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2336 /* end confdefs.h.  */
2337 $4
2338 int
2339 main ()
2340 {
2341 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2342 test_array [0] = 0
2343
2344   ;
2345   return 0;
2346 }
2347 _ACEOF
2348 if ac_fn_c_try_compile "$LINENO"; then :
2349   ac_hi=$ac_mid; break
2350 else
2351   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2352                         if test $ac_lo -le $ac_mid; then
2353                           ac_lo= ac_hi=
2354                           break
2355                         fi
2356                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2357 fi
2358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2359   done
2360 else
2361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2362 /* end confdefs.h.  */
2363 $4
2364 int
2365 main ()
2366 {
2367 static int test_array [1 - 2 * !(($2) < 0)];
2368 test_array [0] = 0
2369
2370   ;
2371   return 0;
2372 }
2373 _ACEOF
2374 if ac_fn_c_try_compile "$LINENO"; then :
2375   ac_hi=-1 ac_mid=-1
2376   while :; do
2377     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2378 /* end confdefs.h.  */
2379 $4
2380 int
2381 main ()
2382 {
2383 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2384 test_array [0] = 0
2385
2386   ;
2387   return 0;
2388 }
2389 _ACEOF
2390 if ac_fn_c_try_compile "$LINENO"; then :
2391   ac_lo=$ac_mid; break
2392 else
2393   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2394                         if test $ac_mid -le $ac_hi; then
2395                           ac_lo= ac_hi=
2396                           break
2397                         fi
2398                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2399 fi
2400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401   done
2402 else
2403   ac_lo= ac_hi=
2404 fi
2405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2406 fi
2407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2408 # Binary search between lo and hi bounds.
2409 while test "x$ac_lo" != "x$ac_hi"; do
2410   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2412 /* end confdefs.h.  */
2413 $4
2414 int
2415 main ()
2416 {
2417 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2418 test_array [0] = 0
2419
2420   ;
2421   return 0;
2422 }
2423 _ACEOF
2424 if ac_fn_c_try_compile "$LINENO"; then :
2425   ac_hi=$ac_mid
2426 else
2427   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2428 fi
2429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2430 done
2431 case $ac_lo in #((
2432 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2433 '') ac_retval=1 ;;
2434 esac
2435   else
2436     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2437 /* end confdefs.h.  */
2438 $4
2439 static long int longval () { return $2; }
2440 static unsigned long int ulongval () { return $2; }
2441 #include <stdio.h>
2442 #include <stdlib.h>
2443 int
2444 main ()
2445 {
2446
2447   FILE *f = fopen ("conftest.val", "w");
2448   if (! f)
2449     return 1;
2450   if (($2) < 0)
2451     {
2452       long int i = longval ();
2453       if (i != ($2))
2454         return 1;
2455       fprintf (f, "%ld", i);
2456     }
2457   else
2458     {
2459       unsigned long int i = ulongval ();
2460       if (i != ($2))
2461         return 1;
2462       fprintf (f, "%lu", i);
2463     }
2464   /* Do not output a trailing newline, as this causes \r\n confusion
2465      on some platforms.  */
2466   return ferror (f) || fclose (f) != 0;
2467
2468   ;
2469   return 0;
2470 }
2471 _ACEOF
2472 if ac_fn_c_try_run "$LINENO"; then :
2473   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2474 else
2475   ac_retval=1
2476 fi
2477 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2478   conftest.$ac_objext conftest.beam conftest.$ac_ext
2479 rm -f conftest.val
2480
2481   fi
2482   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2483   as_fn_set_status $ac_retval
2484
2485 } # ac_fn_c_compute_int
2486 cat >config.log <<_ACEOF
2487 This file contains any messages produced by compilers while
2488 running configure, to aid debugging if configure makes a mistake.
2489
2490 It was created by $as_me, which was
2491 generated by GNU Autoconf 2.65.  Invocation command line was
2492
2493   $ $0 $@
2494
2495 _ACEOF
2496 exec 5>>config.log
2497 {
2498 cat <<_ASUNAME
2499 ## --------- ##
2500 ## Platform. ##
2501 ## --------- ##
2502
2503 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2504 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2505 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2506 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2507 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2508
2509 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2510 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2511
2512 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2513 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2514 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2515 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2516 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2517 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2518 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2519
2520 _ASUNAME
2521
2522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2523 for as_dir in $PATH
2524 do
2525   IFS=$as_save_IFS
2526   test -z "$as_dir" && as_dir=.
2527     $as_echo "PATH: $as_dir"
2528   done
2529 IFS=$as_save_IFS
2530
2531 } >&5
2532
2533 cat >&5 <<_ACEOF
2534
2535
2536 ## ----------- ##
2537 ## Core tests. ##
2538 ## ----------- ##
2539
2540 _ACEOF
2541
2542
2543 # Keep a trace of the command line.
2544 # Strip out --no-create and --no-recursion so they do not pile up.
2545 # Strip out --silent because we don't want to record it for future runs.
2546 # Also quote any args containing shell meta-characters.
2547 # Make two passes to allow for proper duplicate-argument suppression.
2548 ac_configure_args=
2549 ac_configure_args0=
2550 ac_configure_args1=
2551 ac_must_keep_next=false
2552 for ac_pass in 1 2
2553 do
2554   for ac_arg
2555   do
2556     case $ac_arg in
2557     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2558     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2559     | -silent | --silent | --silen | --sile | --sil)
2560       continue ;;
2561     *\'*)
2562       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2563     esac
2564     case $ac_pass in
2565     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2566     2)
2567       as_fn_append ac_configure_args1 " '$ac_arg'"
2568       if test $ac_must_keep_next = true; then
2569         ac_must_keep_next=false # Got value, back to normal.
2570       else
2571         case $ac_arg in
2572           *=* | --config-cache | -C | -disable-* | --disable-* \
2573           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2574           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2575           | -with-* | --with-* | -without-* | --without-* | --x)
2576             case "$ac_configure_args0 " in
2577               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2578             esac
2579             ;;
2580           -* ) ac_must_keep_next=true ;;
2581         esac
2582       fi
2583       as_fn_append ac_configure_args " '$ac_arg'"
2584       ;;
2585     esac
2586   done
2587 done
2588 { ac_configure_args0=; unset ac_configure_args0;}
2589 { ac_configure_args1=; unset ac_configure_args1;}
2590
2591 # When interrupted or exit'd, cleanup temporary files, and complete
2592 # config.log.  We remove comments because anyway the quotes in there
2593 # would cause problems or look ugly.
2594 # WARNING: Use '\'' to represent an apostrophe within the trap.
2595 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2596 trap 'exit_status=$?
2597   # Save into config.log some information that might help in debugging.
2598   {
2599     echo
2600
2601     cat <<\_ASBOX
2602 ## ---------------- ##
2603 ## Cache variables. ##
2604 ## ---------------- ##
2605 _ASBOX
2606     echo
2607     # The following way of writing the cache mishandles newlines in values,
2608 (
2609   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2610     eval ac_val=\$$ac_var
2611     case $ac_val in #(
2612     *${as_nl}*)
2613       case $ac_var in #(
2614       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2615 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2616       esac
2617       case $ac_var in #(
2618       _ | IFS | as_nl) ;; #(
2619       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2620       *) { eval $ac_var=; unset $ac_var;} ;;
2621       esac ;;
2622     esac
2623   done
2624   (set) 2>&1 |
2625     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2626     *${as_nl}ac_space=\ *)
2627       sed -n \
2628         "s/'\''/'\''\\\\'\'''\''/g;
2629           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2630       ;; #(
2631     *)
2632       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2633       ;;
2634     esac |
2635     sort
2636 )
2637     echo
2638
2639     cat <<\_ASBOX
2640 ## ----------------- ##
2641 ## Output variables. ##
2642 ## ----------------- ##
2643 _ASBOX
2644     echo
2645     for ac_var in $ac_subst_vars
2646     do
2647       eval ac_val=\$$ac_var
2648       case $ac_val in
2649       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2650       esac
2651       $as_echo "$ac_var='\''$ac_val'\''"
2652     done | sort
2653     echo
2654
2655     if test -n "$ac_subst_files"; then
2656       cat <<\_ASBOX
2657 ## ------------------- ##
2658 ## File substitutions. ##
2659 ## ------------------- ##
2660 _ASBOX
2661       echo
2662       for ac_var in $ac_subst_files
2663       do
2664         eval ac_val=\$$ac_var
2665         case $ac_val in
2666         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2667         esac
2668         $as_echo "$ac_var='\''$ac_val'\''"
2669       done | sort
2670       echo
2671     fi
2672
2673     if test -s confdefs.h; then
2674       cat <<\_ASBOX
2675 ## ----------- ##
2676 ## confdefs.h. ##
2677 ## ----------- ##
2678 _ASBOX
2679       echo
2680       cat confdefs.h
2681       echo
2682     fi
2683     test "$ac_signal" != 0 &&
2684       $as_echo "$as_me: caught signal $ac_signal"
2685     $as_echo "$as_me: exit $exit_status"
2686   } >&5
2687   rm -f core *.core core.conftest.* &&
2688     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2689     exit $exit_status
2690 ' 0
2691 for ac_signal in 1 2 13 15; do
2692   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2693 done
2694 ac_signal=0
2695
2696 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2697 rm -f -r conftest* confdefs.h
2698
2699 $as_echo "/* confdefs.h */" > confdefs.h
2700
2701 # Predefined preprocessor variables.
2702
2703 cat >>confdefs.h <<_ACEOF
2704 #define PACKAGE_NAME "$PACKAGE_NAME"
2705 _ACEOF
2706
2707 cat >>confdefs.h <<_ACEOF
2708 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2709 _ACEOF
2710
2711 cat >>confdefs.h <<_ACEOF
2712 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2713 _ACEOF
2714
2715 cat >>confdefs.h <<_ACEOF
2716 #define PACKAGE_STRING "$PACKAGE_STRING"
2717 _ACEOF
2718
2719 cat >>confdefs.h <<_ACEOF
2720 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2721 _ACEOF
2722
2723 cat >>confdefs.h <<_ACEOF
2724 #define PACKAGE_URL "$PACKAGE_URL"
2725 _ACEOF
2726
2727
2728 # Let the site file select an alternate cache file if it wants to.
2729 # Prefer an explicitly selected file to automatically selected ones.
2730 ac_site_file1=NONE
2731 ac_site_file2=NONE
2732 if test -n "$CONFIG_SITE"; then
2733   ac_site_file1=$CONFIG_SITE
2734 elif test "x$prefix" != xNONE; then
2735   ac_site_file1=$prefix/share/config.site
2736   ac_site_file2=$prefix/etc/config.site
2737 else
2738   ac_site_file1=$ac_default_prefix/share/config.site
2739   ac_site_file2=$ac_default_prefix/etc/config.site
2740 fi
2741 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2742 do
2743   test "x$ac_site_file" = xNONE && continue
2744   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2745     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2746 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2747     sed 's/^/| /' "$ac_site_file" >&5
2748     . "$ac_site_file"
2749   fi
2750 done
2751
2752
2753 # Check that the precious variables saved in the cache have kept the same
2754 # value.
2755 ac_cache_corrupted=false
2756 for ac_var in $ac_precious_vars; do
2757   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2758   eval ac_new_set=\$ac_env_${ac_var}_set
2759   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2760   eval ac_new_val=\$ac_env_${ac_var}_value
2761   case $ac_old_set,$ac_new_set in
2762     set,)
2763       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2764 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2765       ac_cache_corrupted=: ;;
2766     ,set)
2767       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2768 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2769       ac_cache_corrupted=: ;;
2770     ,);;
2771     *)
2772       if test "x$ac_old_val" != "x$ac_new_val"; then
2773         # differences in whitespace do not lead to failure.
2774         ac_old_val_w=`echo x $ac_old_val`
2775         ac_new_val_w=`echo x $ac_new_val`
2776         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2777           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2778 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2779           ac_cache_corrupted=:
2780         else
2781           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2782 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2783           eval $ac_var=\$ac_old_val
2784         fi
2785         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2786 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2787         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2788 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2789       fi;;
2790   esac
2791   # Pass precious variables to config.status.
2792   if test "$ac_new_set" = set; then
2793     case $ac_new_val in
2794     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2795     *) ac_arg=$ac_var=$ac_new_val ;;
2796     esac
2797     case " $ac_configure_args " in
2798       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2799       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2800     esac
2801   fi
2802 done
2803 if $ac_cache_corrupted; then
2804   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2805 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2806   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2807 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2808   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2809 fi
2810 ## -------------------- ##
2811 ## Main body of script. ##
2812 ## -------------------- ##
2813
2814 ac_ext=c
2815 ac_cpp='$CPP $CPPFLAGS'
2816 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2817 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2818 ac_compiler_gnu=$ac_cv_c_compiler_gnu
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
2845
2846
2847 ac_aux_dir=
2848 for ac_dir in build "$srcdir"/build; do
2849   for ac_t in install-sh install.sh shtool; do
2850     if test -f "$ac_dir/$ac_t"; then
2851       ac_aux_dir=$ac_dir
2852       ac_install_sh="$ac_aux_dir/$ac_t -c"
2853       break 2
2854     fi
2855   done
2856 done
2857 if test -z "$ac_aux_dir"; then
2858   as_fn_error "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5
2859 fi
2860
2861 # These three variables are undocumented and unsupported,
2862 # and are intended to be withdrawn in a future Autoconf release.
2863 # They can cause serious problems if a builder's source tree is in a directory
2864 # whose full name contains unusual characters.
2865 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2866 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2867 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2868
2869
2870 eval `$ac_aux_dir/version.sh`
2871 if test -z "$OL_STRING"; then
2872         as_fn_error "could not determine version" "$LINENO" 5
2873 fi
2874
2875 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
2876         ac_cv_shtool="$ac_aux_dir/shtool"
2877 else
2878         as_fn_error "no shtool found in $ac_aux_dir" "$LINENO" 5
2879 fi
2880
2881 SHTOOL="$ac_cv_shtool"
2882
2883 TB="" TN=""
2884 if test -t 1; then
2885         TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
2886         TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
2887 fi
2888
2889 OPENLDAP_REPO=""
2890 if test -d $ac_aux_dir/../.git; then
2891         OPENLDAP_REPO="(from Git clone) "
2892 elif test -d $ac_aux_dir/CVS; then
2893         OPENLDAP_REPO="(from CVS checkout) "
2894 fi
2895
2896 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_REPO}..."
2897
2898 # Make sure we can run config.sub.
2899 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2900   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2901
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2903 $as_echo_n "checking build system type... " >&6; }
2904 if test "${ac_cv_build+set}" = set; then :
2905   $as_echo_n "(cached) " >&6
2906 else
2907   ac_build_alias=$build_alias
2908 test "x$ac_build_alias" = x &&
2909   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2910 test "x$ac_build_alias" = x &&
2911   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
2912 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2913   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2914
2915 fi
2916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2917 $as_echo "$ac_cv_build" >&6; }
2918 case $ac_cv_build in
2919 *-*-*) ;;
2920 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
2921 esac
2922 build=$ac_cv_build
2923 ac_save_IFS=$IFS; IFS='-'
2924 set x $ac_cv_build
2925 shift
2926 build_cpu=$1
2927 build_vendor=$2
2928 shift; shift
2929 # Remember, the first character of IFS is used to create $*,
2930 # except with old shells:
2931 build_os=$*
2932 IFS=$ac_save_IFS
2933 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2934
2935
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2937 $as_echo_n "checking host system type... " >&6; }
2938 if test "${ac_cv_host+set}" = set; then :
2939   $as_echo_n "(cached) " >&6
2940 else
2941   if test "x$host_alias" = x; then
2942   ac_cv_host=$ac_cv_build
2943 else
2944   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2945     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2946 fi
2947
2948 fi
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2950 $as_echo "$ac_cv_host" >&6; }
2951 case $ac_cv_host in
2952 *-*-*) ;;
2953 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
2954 esac
2955 host=$ac_cv_host
2956 ac_save_IFS=$IFS; IFS='-'
2957 set x $ac_cv_host
2958 shift
2959 host_cpu=$1
2960 host_vendor=$2
2961 shift; shift
2962 # Remember, the first character of IFS is used to create $*,
2963 # except with old shells:
2964 host_os=$*
2965 IFS=$ac_save_IFS
2966 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2967
2968
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2970 $as_echo_n "checking target system type... " >&6; }
2971 if test "${ac_cv_target+set}" = set; then :
2972   $as_echo_n "(cached) " >&6
2973 else
2974   if test "x$target_alias" = x; then
2975   ac_cv_target=$ac_cv_host
2976 else
2977   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2978     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2979 fi
2980
2981 fi
2982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2983 $as_echo "$ac_cv_target" >&6; }
2984 case $ac_cv_target in
2985 *-*-*) ;;
2986 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
2987 esac
2988 target=$ac_cv_target
2989 ac_save_IFS=$IFS; IFS='-'
2990 set x $ac_cv_target
2991 shift
2992 target_cpu=$1
2993 target_vendor=$2
2994 shift; shift
2995 # Remember, the first character of IFS is used to create $*,
2996 # except with old shells:
2997 target_os=$*
2998 IFS=$ac_save_IFS
2999 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
3000
3001
3002 # The aliases save the names the user supplied, while $host etc.
3003 # will get canonicalized.
3004 test -n "$target_alias" &&
3005   test "$program_prefix$program_suffix$program_transform_name" = \
3006     NONENONEs,x,x, &&
3007   program_prefix=${target_alias}-
3008
3009 am__api_version="1.9"
3010 # Find a good install program.  We prefer a C program (faster),
3011 # so one script is as good as another.  But avoid the broken or
3012 # incompatible versions:
3013 # SysV /etc/install, /usr/sbin/install
3014 # SunOS /usr/etc/install
3015 # IRIX /sbin/install
3016 # AIX /bin/install
3017 # AmigaOS /C/install, which installs bootblocks on floppy discs
3018 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3019 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3020 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3021 # OS/2's system install, which has a completely different semantic
3022 # ./install, which can be erroneously created by make from ./install.sh.
3023 # Reject install programs that cannot install multiple files.
3024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3025 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3026 if test -z "$INSTALL"; then
3027 if test "${ac_cv_path_install+set}" = set; then :
3028   $as_echo_n "(cached) " >&6
3029 else
3030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3031 for as_dir in $PATH
3032 do
3033   IFS=$as_save_IFS
3034   test -z "$as_dir" && as_dir=.
3035     # Account for people who put trailing slashes in PATH elements.
3036 case $as_dir/ in #((
3037   ./ | .// | /[cC]/* | \
3038   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3039   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3040   /usr/ucb/* ) ;;
3041   *)
3042     # OSF1 and SCO ODT 3.0 have their own names for install.
3043     # Don't use installbsd from OSF since it installs stuff as root
3044     # by default.
3045     for ac_prog in ginstall scoinst install; do
3046       for ac_exec_ext in '' $ac_executable_extensions; do
3047         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3048           if test $ac_prog = install &&
3049             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3050             # AIX install.  It has an incompatible calling convention.
3051             :
3052           elif test $ac_prog = install &&
3053             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3054             # program-specific install script used by HP pwplus--don't use.
3055             :
3056           else
3057             rm -rf conftest.one conftest.two conftest.dir
3058             echo one > conftest.one
3059             echo two > conftest.two
3060             mkdir conftest.dir
3061             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3062               test -s conftest.one && test -s conftest.two &&
3063               test -s conftest.dir/conftest.one &&
3064               test -s conftest.dir/conftest.two
3065             then
3066               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3067               break 3
3068             fi
3069           fi
3070         fi
3071       done
3072     done
3073     ;;
3074 esac
3075
3076   done
3077 IFS=$as_save_IFS
3078
3079 rm -rf conftest.one conftest.two conftest.dir
3080
3081 fi
3082   if test "${ac_cv_path_install+set}" = set; then
3083     INSTALL=$ac_cv_path_install
3084   else
3085     # As a last resort, use the slow shell script.  Don't cache a
3086     # value for INSTALL within a source directory, because that will
3087     # break other packages using the cache if that directory is
3088     # removed, or if the value is a relative name.
3089     INSTALL=$ac_install_sh
3090   fi
3091 fi
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3093 $as_echo "$INSTALL" >&6; }
3094
3095 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3096 # It thinks the first close brace ends the variable substitution.
3097 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3098
3099 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3100
3101 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3102
3103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3104 $as_echo_n "checking whether build environment is sane... " >&6; }
3105 # Just in case
3106 sleep 1
3107 echo timestamp > conftest.file
3108 # Do `set' in a subshell so we don't clobber the current shell's
3109 # arguments.  Must try -L first in case configure is actually a
3110 # symlink; some systems play weird games with the mod time of symlinks
3111 # (eg FreeBSD returns the mod time of the symlink's containing
3112 # directory).
3113 if (
3114    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
3115    if test "$*" = "X"; then
3116       # -L didn't work.
3117       set X `ls -t $srcdir/configure conftest.file`
3118    fi
3119    rm -f conftest.file
3120    if test "$*" != "X $srcdir/configure conftest.file" \
3121       && test "$*" != "X conftest.file $srcdir/configure"; then
3122
3123       # If neither matched, then we have a broken ls.  This can happen
3124       # if, for instance, CONFIG_SHELL is bash and it inherits a
3125       # broken ls alias from the environment.  This has actually
3126       # happened.  Such a system could not be considered "sane".
3127       as_fn_error "ls -t appears to fail.  Make sure there is not a broken
3128 alias in your environment" "$LINENO" 5
3129    fi
3130
3131    test "$2" = conftest.file
3132    )
3133 then
3134    # Ok.
3135    :
3136 else
3137    as_fn_error "newly created file is older than distributed files!
3138 Check your system clock" "$LINENO" 5
3139 fi
3140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3141 $as_echo "yes" >&6; }
3142 test "$program_prefix" != NONE &&
3143   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3144 # Use a double $ so make ignores it.
3145 test "$program_suffix" != NONE &&
3146   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3147 # Double any \ or $.
3148 # By default was `s,x,x', remove it if useless.
3149 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3150 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3151
3152 # expand $ac_aux_dir to an absolute path
3153 am_aux_dir=`cd $ac_aux_dir && pwd`
3154
3155 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3156 # Use eval to expand $SHELL
3157 if eval "$MISSING --run true"; then
3158   am_missing_run="$MISSING --run "
3159 else
3160   am_missing_run=
3161   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3162 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3163 fi
3164
3165 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
3166   # We used to keeping the `.' as first argument, in order to
3167   # allow $(mkdir_p) to be used without argument.  As in
3168   #   $(mkdir_p) $(somedir)
3169   # where $(somedir) is conditionally defined.  However this is wrong
3170   # for two reasons:
3171   #  1. if the package is installed by a user who cannot write `.'
3172   #     make install will fail,
3173   #  2. the above comment should most certainly read
3174   #     $(mkdir_p) $(DESTDIR)$(somedir)
3175   #     so it does not work when $(somedir) is undefined and
3176   #     $(DESTDIR) is not.
3177   #  To support the latter case, we have to write
3178   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
3179   #  so the `.' trick is pointless.
3180   mkdir_p='mkdir -p --'
3181 else
3182   # On NextStep and OpenStep, the `mkdir' command does not
3183   # recognize any option.  It will interpret all options as
3184   # directories to create, and then abort because `.' already
3185   # exists.
3186   for d in ./-p ./--version;
3187   do
3188     test -d $d && rmdir $d
3189   done
3190   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
3191   if test -f "$ac_aux_dir/mkinstalldirs"; then
3192     mkdir_p='$(mkinstalldirs)'
3193   else
3194     mkdir_p='$(install_sh) -d'
3195   fi
3196 fi
3197
3198 for ac_prog in gawk mawk nawk awk
3199 do
3200   # Extract the first word of "$ac_prog", so it can be a program name with args.
3201 set dummy $ac_prog; ac_word=$2
3202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3203 $as_echo_n "checking for $ac_word... " >&6; }
3204 if test "${ac_cv_prog_AWK+set}" = set; then :
3205   $as_echo_n "(cached) " >&6
3206 else
3207   if test -n "$AWK"; then
3208   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3209 else
3210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3211 for as_dir in $PATH
3212 do
3213   IFS=$as_save_IFS
3214   test -z "$as_dir" && as_dir=.
3215     for ac_exec_ext in '' $ac_executable_extensions; do
3216   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3217     ac_cv_prog_AWK="$ac_prog"
3218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3219     break 2
3220   fi
3221 done
3222   done
3223 IFS=$as_save_IFS
3224
3225 fi
3226 fi
3227 AWK=$ac_cv_prog_AWK
3228 if test -n "$AWK"; then
3229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3230 $as_echo "$AWK" >&6; }
3231 else
3232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3233 $as_echo "no" >&6; }
3234 fi
3235
3236
3237   test -n "$AWK" && break
3238 done
3239
3240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3241 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3242 set x ${MAKE-make}
3243 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3244 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3245   $as_echo_n "(cached) " >&6
3246 else
3247   cat >conftest.make <<\_ACEOF
3248 SHELL = /bin/sh
3249 all:
3250         @echo '@@@%%%=$(MAKE)=@@@%%%'
3251 _ACEOF
3252 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3253 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3254   *@@@%%%=?*=@@@%%%*)
3255     eval ac_cv_prog_make_${ac_make}_set=yes;;
3256   *)
3257     eval ac_cv_prog_make_${ac_make}_set=no;;
3258 esac
3259 rm -f conftest.make
3260 fi
3261 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3263 $as_echo "yes" >&6; }
3264   SET_MAKE=
3265 else
3266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3267 $as_echo "no" >&6; }
3268   SET_MAKE="MAKE=${MAKE-make}"
3269 fi
3270
3271 rm -rf .tst 2>/dev/null
3272 mkdir .tst 2>/dev/null
3273 if test -d .tst; then
3274   am__leading_dot=.
3275 else
3276   am__leading_dot=_
3277 fi
3278 rmdir .tst 2>/dev/null
3279
3280 # test to see if srcdir already configured
3281 if test "`cd $srcdir && pwd`" != "`pwd`" &&
3282    test -f $srcdir/config.status; then
3283   as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3284 fi
3285
3286 # test whether we have cygpath
3287 if test -z "$CYGPATH_W"; then
3288   if (cygpath --version) >/dev/null 2>/dev/null; then
3289     CYGPATH_W='cygpath -w'
3290   else
3291     CYGPATH_W=echo
3292   fi
3293 fi
3294
3295
3296 # Define the identity of the package.
3297  PACKAGE=$OL_PACKAGE
3298  VERSION=$OL_VERSION
3299
3300
3301 # Some tools Automake needs.
3302
3303 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3304
3305
3306 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3307
3308
3309 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3310
3311
3312 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3313
3314
3315 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3316
3317 install_sh=${install_sh-"$am_aux_dir/install-sh"}
3318
3319 # Installed binaries are usually stripped using `strip' when the user
3320 # run `make install-strip'.  However `strip' might not be the right
3321 # tool to use in cross-compilation environments, therefore Automake
3322 # will honor the `STRIP' environment variable to overrule this program.
3323 if test "$cross_compiling" != no; then
3324   if test -n "$ac_tool_prefix"; then
3325   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3326 set dummy ${ac_tool_prefix}strip; ac_word=$2
3327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3328 $as_echo_n "checking for $ac_word... " >&6; }
3329 if test "${ac_cv_prog_STRIP+set}" = set; then :
3330   $as_echo_n "(cached) " >&6
3331 else
3332   if test -n "$STRIP"; then
3333   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3334 else
3335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3336 for as_dir in $PATH
3337 do
3338   IFS=$as_save_IFS
3339   test -z "$as_dir" && as_dir=.
3340     for ac_exec_ext in '' $ac_executable_extensions; do
3341   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3342     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3344     break 2
3345   fi
3346 done
3347   done
3348 IFS=$as_save_IFS
3349
3350 fi
3351 fi
3352 STRIP=$ac_cv_prog_STRIP
3353 if test -n "$STRIP"; then
3354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3355 $as_echo "$STRIP" >&6; }
3356 else
3357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3358 $as_echo "no" >&6; }
3359 fi
3360
3361
3362 fi
3363 if test -z "$ac_cv_prog_STRIP"; then
3364   ac_ct_STRIP=$STRIP
3365   # Extract the first word of "strip", so it can be a program name with args.
3366 set dummy strip; ac_word=$2
3367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3368 $as_echo_n "checking for $ac_word... " >&6; }
3369 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3370   $as_echo_n "(cached) " >&6
3371 else
3372   if test -n "$ac_ct_STRIP"; then
3373   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3374 else
3375 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3376 for as_dir in $PATH
3377 do
3378   IFS=$as_save_IFS
3379   test -z "$as_dir" && as_dir=.
3380     for ac_exec_ext in '' $ac_executable_extensions; do
3381   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3382     ac_cv_prog_ac_ct_STRIP="strip"
3383     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3384     break 2
3385   fi
3386 done
3387   done
3388 IFS=$as_save_IFS
3389
3390 fi
3391 fi
3392 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3393 if test -n "$ac_ct_STRIP"; then
3394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3395 $as_echo "$ac_ct_STRIP" >&6; }
3396 else
3397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3398 $as_echo "no" >&6; }
3399 fi
3400
3401   if test "x$ac_ct_STRIP" = x; then
3402     STRIP=":"
3403   else
3404     case $cross_compiling:$ac_tool_warned in
3405 yes:)
3406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3407 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3408 ac_tool_warned=yes ;;
3409 esac
3410     STRIP=$ac_ct_STRIP
3411   fi
3412 else
3413   STRIP="$ac_cv_prog_STRIP"
3414 fi
3415
3416 fi
3417 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
3418
3419 # We need awk for the "check" target.  The system "awk" is bad on
3420 # some platforms.
3421 # Always define AMTAR for backward compatibility.
3422
3423 AMTAR=${AMTAR-"${am_missing_run}tar"}
3424
3425 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3426
3427
3428
3429
3430
3431 cat >>confdefs.h <<_ACEOF
3432 #define OPENLDAP_PACKAGE "$PACKAGE"
3433 _ACEOF
3434
3435
3436 cat >>confdefs.h <<_ACEOF
3437 #define OPENLDAP_VERSION "$VERSION"
3438 _ACEOF
3439
3440
3441
3442 cat >>confdefs.h <<_ACEOF
3443 #define LDAP_VENDOR_VERSION $OL_API_INC
3444 _ACEOF
3445
3446
3447 cat >>confdefs.h <<_ACEOF
3448 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
3449 _ACEOF
3450
3451
3452 cat >>confdefs.h <<_ACEOF
3453 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
3454 _ACEOF
3455
3456
3457 cat >>confdefs.h <<_ACEOF
3458 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
3459 _ACEOF
3460
3461
3462 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
3463
3464 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
3465
3466 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
3467
3468
3469
3470
3471
3472 ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
3473
3474 ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
3475
3476 ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
3477
3478
3479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking configure arguments" >&5
3480 $as_echo_n "checking configure arguments... " >&6; }
3481
3482
3483 top_builddir=`pwd`
3484
3485 ldap_subdir="/openldap"
3486
3487
3488 # Check whether --with-subdir was given.
3489 if test "${with_subdir+set}" = set; then :
3490   withval=$with_subdir; case "$withval" in
3491         no) ldap_subdir=""
3492                 ;;
3493         yes)
3494                 ;;
3495         /*|\\*)
3496                 ldap_subdir="$withval"
3497                 ;;
3498         *)
3499                 ldap_subdir="/$withval"
3500                 ;;
3501 esac
3502
3503 fi
3504
3505
3506 # OpenLDAP --enable-debug
3507
3508         # Check whether --enable-debug was given.
3509 if test "${enable_debug+set}" = set; then :
3510   enableval=$enable_debug;
3511         ol_arg=invalid
3512         for ol_val in no yes traditional ; do
3513                 if test "$enableval" = "$ol_val" ; then
3514                         ol_arg="$ol_val"
3515                 fi
3516         done
3517         if test "$ol_arg" = "invalid" ; then
3518                 as_fn_error "bad value $enableval for --enable-debug" "$LINENO" 5
3519         fi
3520         ol_enable_debug="$ol_arg"
3521
3522 else
3523         ol_enable_debug=yes
3524 fi
3525
3526 # end --enable-debug
3527 # OpenLDAP --enable-dynamic
3528
3529         # Check whether --enable-dynamic was given.
3530 if test "${enable_dynamic+set}" = set; then :
3531   enableval=$enable_dynamic;
3532         ol_arg=invalid
3533         for ol_val in auto yes no ; do
3534                 if test "$enableval" = "$ol_val" ; then
3535                         ol_arg="$ol_val"
3536                 fi
3537         done
3538         if test "$ol_arg" = "invalid" ; then
3539                 as_fn_error "bad value $enableval for --enable-dynamic" "$LINENO" 5
3540         fi
3541         ol_enable_dynamic="$ol_arg"
3542
3543 else
3544         ol_enable_dynamic=no
3545 fi
3546
3547 # end --enable-dynamic
3548 # OpenLDAP --enable-syslog
3549
3550         # Check whether --enable-syslog was given.
3551 if test "${enable_syslog+set}" = set; then :
3552   enableval=$enable_syslog;
3553         ol_arg=invalid
3554         for ol_val in auto yes no ; do
3555                 if test "$enableval" = "$ol_val" ; then
3556                         ol_arg="$ol_val"
3557                 fi
3558         done
3559         if test "$ol_arg" = "invalid" ; then
3560                 as_fn_error "bad value $enableval for --enable-syslog" "$LINENO" 5
3561         fi
3562         ol_enable_syslog="$ol_arg"
3563
3564 else
3565         ol_enable_syslog=auto
3566 fi
3567
3568 # end --enable-syslog
3569 # OpenLDAP --enable-proctitle
3570
3571         # Check whether --enable-proctitle was given.
3572 if test "${enable_proctitle+set}" = set; then :
3573   enableval=$enable_proctitle;
3574         ol_arg=invalid
3575         for ol_val in auto yes no ; do
3576                 if test "$enableval" = "$ol_val" ; then
3577                         ol_arg="$ol_val"
3578                 fi
3579         done
3580         if test "$ol_arg" = "invalid" ; then
3581                 as_fn_error "bad value $enableval for --enable-proctitle" "$LINENO" 5
3582         fi
3583         ol_enable_proctitle="$ol_arg"
3584
3585 else
3586         ol_enable_proctitle=yes
3587 fi
3588
3589 # end --enable-proctitle
3590 ol_enable_referrals=${ol_enable_referrals-no}
3591 # OpenLDAP --enable-ipv6
3592
3593         # Check whether --enable-ipv6 was given.
3594 if test "${enable_ipv6+set}" = set; then :
3595   enableval=$enable_ipv6;
3596         ol_arg=invalid
3597         for ol_val in auto yes no ; do
3598                 if test "$enableval" = "$ol_val" ; then
3599                         ol_arg="$ol_val"
3600                 fi
3601         done
3602         if test "$ol_arg" = "invalid" ; then
3603                 as_fn_error "bad value $enableval for --enable-ipv6" "$LINENO" 5
3604         fi
3605         ol_enable_ipv6="$ol_arg"
3606
3607 else
3608         ol_enable_ipv6=auto
3609 fi
3610
3611 # end --enable-ipv6
3612 # OpenLDAP --enable-local
3613
3614         # Check whether --enable-local was given.
3615 if test "${enable_local+set}" = set; then :
3616   enableval=$enable_local;
3617         ol_arg=invalid
3618         for ol_val in auto yes no ; do
3619                 if test "$enableval" = "$ol_val" ; then
3620                         ol_arg="$ol_val"
3621                 fi
3622         done
3623         if test "$ol_arg" = "invalid" ; then
3624                 as_fn_error "bad value $enableval for --enable-local" "$LINENO" 5
3625         fi
3626         ol_enable_local="$ol_arg"
3627
3628 else
3629         ol_enable_local=auto
3630 fi
3631
3632 # end --enable-local
3633
3634 # OpenLDAP --with-cyrus_sasl
3635
3636 # Check whether --with-cyrus_sasl was given.
3637 if test "${with_cyrus_sasl+set}" = set; then :
3638   withval=$with_cyrus_sasl;
3639         ol_arg=invalid
3640         for ol_val in auto yes no  ; do
3641                 if test "$withval" = "$ol_val" ; then
3642                         ol_arg="$ol_val"
3643                 fi
3644         done
3645         if test "$ol_arg" = "invalid" ; then
3646                 as_fn_error "bad value $withval for --with-cyrus_sasl" "$LINENO" 5
3647         fi
3648         ol_with_cyrus_sasl="$ol_arg"
3649
3650 else
3651         ol_with_cyrus_sasl="auto"
3652 fi
3653 # end --with-cyrus_sasl
3654
3655 # OpenLDAP --with-fetch
3656
3657 # Check whether --with-fetch was given.
3658 if test "${with_fetch+set}" = set; then :
3659   withval=$with_fetch;
3660         ol_arg=invalid
3661         for ol_val in auto yes no  ; do
3662                 if test "$withval" = "$ol_val" ; then
3663                         ol_arg="$ol_val"
3664                 fi
3665         done
3666         if test "$ol_arg" = "invalid" ; then
3667                 as_fn_error "bad value $withval for --with-fetch" "$LINENO" 5
3668         fi
3669         ol_with_fetch="$ol_arg"
3670
3671 else
3672         ol_with_fetch="auto"
3673 fi
3674 # end --with-fetch
3675
3676 # OpenLDAP --with-threads
3677
3678 # Check whether --with-threads was given.
3679 if test "${with_threads+set}" = set; then :
3680   withval=$with_threads;
3681         ol_arg=invalid
3682         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
3683                 if test "$withval" = "$ol_val" ; then
3684                         ol_arg="$ol_val"
3685                 fi
3686         done
3687         if test "$ol_arg" = "invalid" ; then
3688                 as_fn_error "bad value $withval for --with-threads" "$LINENO" 5
3689         fi
3690         ol_with_threads="$ol_arg"
3691
3692 else
3693         ol_with_threads="auto"
3694 fi
3695 # end --with-threads
3696
3697 # OpenLDAP --with-tls
3698
3699 # Check whether --with-tls was given.
3700 if test "${with_tls+set}" = set; then :
3701   withval=$with_tls;
3702         ol_arg=invalid
3703         for ol_val in auto openssl gnutls moznss yes no  ; do
3704                 if test "$withval" = "$ol_val" ; then
3705                         ol_arg="$ol_val"
3706                 fi
3707         done
3708         if test "$ol_arg" = "invalid" ; then
3709                 as_fn_error "bad value $withval for --with-tls" "$LINENO" 5
3710         fi
3711         ol_with_tls="$ol_arg"
3712
3713 else
3714         ol_with_tls="auto"
3715 fi
3716 # end --with-tls
3717
3718 # OpenLDAP --with-yielding_select
3719
3720 # Check whether --with-yielding_select was given.
3721 if test "${with_yielding_select+set}" = set; then :
3722   withval=$with_yielding_select;
3723         ol_arg=invalid
3724         for ol_val in auto yes no manual  ; do
3725                 if test "$withval" = "$ol_val" ; then
3726                         ol_arg="$ol_val"
3727                 fi
3728         done
3729         if test "$ol_arg" = "invalid" ; then
3730                 as_fn_error "bad value $withval for --with-yielding_select" "$LINENO" 5
3731         fi
3732         ol_with_yielding_select="$ol_arg"
3733
3734 else
3735         ol_with_yielding_select="auto"
3736 fi
3737 # end --with-yielding_select
3738
3739 # OpenLDAP --with-mp
3740
3741 # Check whether --with-mp was given.
3742 if test "${with_mp+set}" = set; then :
3743   withval=$with_mp;
3744         ol_arg=invalid
3745         for ol_val in auto longlong long bignum gmp yes no ; do
3746                 if test "$withval" = "$ol_val" ; then
3747                         ol_arg="$ol_val"
3748                 fi
3749         done
3750         if test "$ol_arg" = "invalid" ; then
3751                 as_fn_error "bad value $withval for --with-mp" "$LINENO" 5
3752         fi
3753         ol_with_mp="$ol_arg"
3754
3755 else
3756         ol_with_mp="auto"
3757 fi
3758 # end --with-mp
3759
3760 # OpenLDAP --with-odbc
3761
3762 # Check whether --with-odbc was given.
3763 if test "${with_odbc+set}" = set; then :
3764   withval=$with_odbc;
3765         ol_arg=invalid
3766         for ol_val in auto iodbc unixodbc odbc32  ; do
3767                 if test "$withval" = "$ol_val" ; then
3768                         ol_arg="$ol_val"
3769                 fi
3770         done
3771         if test "$ol_arg" = "invalid" ; then
3772                 as_fn_error "bad value $withval for --with-odbc" "$LINENO" 5
3773         fi
3774         ol_with_odbc="$ol_arg"
3775
3776 else
3777         ol_with_odbc="auto"
3778 fi
3779 # end --with-odbc
3780
3781
3782
3783 # Check whether --enable-xxslapdoptions was given.
3784 if test "${enable_xxslapdoptions+set}" = set; then :
3785   enableval=$enable_xxslapdoptions;
3786 fi
3787
3788 # OpenLDAP --enable-slapd
3789
3790         # Check whether --enable-slapd was given.
3791 if test "${enable_slapd+set}" = set; then :
3792   enableval=$enable_slapd;
3793         ol_arg=invalid
3794         for ol_val in auto yes no ; do
3795                 if test "$enableval" = "$ol_val" ; then
3796                         ol_arg="$ol_val"
3797                 fi
3798         done
3799         if test "$ol_arg" = "invalid" ; then
3800                 as_fn_error "bad value $enableval for --enable-slapd" "$LINENO" 5
3801         fi
3802         ol_enable_slapd="$ol_arg"
3803
3804 else
3805         ol_enable_slapd=yes
3806 fi
3807
3808 # end --enable-slapd
3809 # OpenLDAP --enable-dynacl
3810
3811         # Check whether --enable-dynacl was given.
3812 if test "${enable_dynacl+set}" = set; then :
3813   enableval=$enable_dynacl;
3814         ol_arg=invalid
3815         for ol_val in auto yes no ; do
3816                 if test "$enableval" = "$ol_val" ; then
3817                         ol_arg="$ol_val"
3818                 fi
3819         done
3820         if test "$ol_arg" = "invalid" ; then
3821                 as_fn_error "bad value $enableval for --enable-dynacl" "$LINENO" 5
3822         fi
3823         ol_enable_dynacl="$ol_arg"
3824
3825 else
3826         ol_enable_dynacl=no
3827 fi
3828
3829 # end --enable-dynacl
3830 # OpenLDAP --enable-aci
3831
3832         # Check whether --enable-aci was given.
3833 if test "${enable_aci+set}" = set; then :
3834   enableval=$enable_aci;
3835         ol_arg=invalid
3836         for ol_val in no yes mod ; do
3837                 if test "$enableval" = "$ol_val" ; then
3838                         ol_arg="$ol_val"
3839                 fi
3840         done
3841         if test "$ol_arg" = "invalid" ; then
3842                 as_fn_error "bad value $enableval for --enable-aci" "$LINENO" 5
3843         fi
3844         ol_enable_aci="$ol_arg"
3845
3846 else
3847         ol_enable_aci=no
3848 fi
3849
3850 # end --enable-aci
3851 # OpenLDAP --enable-cleartext
3852
3853         # Check whether --enable-cleartext was given.
3854 if test "${enable_cleartext+set}" = set; then :
3855   enableval=$enable_cleartext;
3856         ol_arg=invalid
3857         for ol_val in auto yes no ; do
3858                 if test "$enableval" = "$ol_val" ; then
3859                         ol_arg="$ol_val"
3860                 fi
3861         done
3862         if test "$ol_arg" = "invalid" ; then
3863                 as_fn_error "bad value $enableval for --enable-cleartext" "$LINENO" 5
3864         fi
3865         ol_enable_cleartext="$ol_arg"
3866
3867 else
3868         ol_enable_cleartext=yes
3869 fi
3870
3871 # end --enable-cleartext
3872 # OpenLDAP --enable-crypt
3873
3874         # Check whether --enable-crypt was given.
3875 if test "${enable_crypt+set}" = set; then :
3876   enableval=$enable_crypt;
3877         ol_arg=invalid
3878         for ol_val in auto yes no ; do
3879                 if test "$enableval" = "$ol_val" ; then
3880                         ol_arg="$ol_val"
3881                 fi
3882         done
3883         if test "$ol_arg" = "invalid" ; then
3884                 as_fn_error "bad value $enableval for --enable-crypt" "$LINENO" 5
3885         fi
3886         ol_enable_crypt="$ol_arg"
3887
3888 else
3889         ol_enable_crypt=no
3890 fi
3891
3892 # end --enable-crypt
3893 # OpenLDAP --enable-lmpasswd
3894
3895         # Check whether --enable-lmpasswd was given.
3896 if test "${enable_lmpasswd+set}" = set; then :
3897   enableval=$enable_lmpasswd;
3898         ol_arg=invalid
3899         for ol_val in auto yes no ; do
3900                 if test "$enableval" = "$ol_val" ; then
3901                         ol_arg="$ol_val"
3902                 fi
3903         done
3904         if test "$ol_arg" = "invalid" ; then
3905                 as_fn_error "bad value $enableval for --enable-lmpasswd" "$LINENO" 5
3906         fi
3907         ol_enable_lmpasswd="$ol_arg"
3908
3909 else
3910         ol_enable_lmpasswd=no
3911 fi
3912
3913 # end --enable-lmpasswd
3914 # OpenLDAP --enable-spasswd
3915
3916         # Check whether --enable-spasswd was given.
3917 if test "${enable_spasswd+set}" = set; then :
3918   enableval=$enable_spasswd;
3919         ol_arg=invalid
3920         for ol_val in auto yes no ; do
3921                 if test "$enableval" = "$ol_val" ; then
3922                         ol_arg="$ol_val"
3923                 fi
3924         done
3925         if test "$ol_arg" = "invalid" ; then
3926                 as_fn_error "bad value $enableval for --enable-spasswd" "$LINENO" 5
3927         fi
3928         ol_enable_spasswd="$ol_arg"
3929
3930 else
3931         ol_enable_spasswd=no
3932 fi
3933
3934 # end --enable-spasswd
3935 # OpenLDAP --enable-modules
3936
3937         # Check whether --enable-modules was given.
3938 if test "${enable_modules+set}" = set; then :
3939   enableval=$enable_modules;
3940         ol_arg=invalid
3941         for ol_val in auto yes no ; do
3942                 if test "$enableval" = "$ol_val" ; then
3943                         ol_arg="$ol_val"
3944                 fi
3945         done
3946         if test "$ol_arg" = "invalid" ; then
3947                 as_fn_error "bad value $enableval for --enable-modules" "$LINENO" 5
3948         fi
3949         ol_enable_modules="$ol_arg"
3950
3951 else
3952         ol_enable_modules=no
3953 fi
3954
3955 # end --enable-modules
3956 # OpenLDAP --enable-rewrite
3957
3958         # Check whether --enable-rewrite was given.
3959 if test "${enable_rewrite+set}" = set; then :
3960   enableval=$enable_rewrite;
3961         ol_arg=invalid
3962         for ol_val in auto yes no ; do
3963                 if test "$enableval" = "$ol_val" ; then
3964                         ol_arg="$ol_val"
3965                 fi
3966         done
3967         if test "$ol_arg" = "invalid" ; then
3968                 as_fn_error "bad value $enableval for --enable-rewrite" "$LINENO" 5
3969         fi
3970         ol_enable_rewrite="$ol_arg"
3971
3972 else
3973         ol_enable_rewrite=auto
3974 fi
3975
3976 # end --enable-rewrite
3977 # OpenLDAP --enable-rlookups
3978
3979         # Check whether --enable-rlookups was given.
3980 if test "${enable_rlookups+set}" = set; then :
3981   enableval=$enable_rlookups;
3982         ol_arg=invalid
3983         for ol_val in auto yes no ; do
3984                 if test "$enableval" = "$ol_val" ; then
3985                         ol_arg="$ol_val"
3986                 fi
3987         done
3988         if test "$ol_arg" = "invalid" ; then
3989                 as_fn_error "bad value $enableval for --enable-rlookups" "$LINENO" 5
3990         fi
3991         ol_enable_rlookups="$ol_arg"
3992
3993 else
3994         ol_enable_rlookups=no
3995 fi
3996
3997 # end --enable-rlookups
3998 # OpenLDAP --enable-slapi
3999
4000         # Check whether --enable-slapi was given.
4001 if test "${enable_slapi+set}" = set; then :
4002   enableval=$enable_slapi;
4003         ol_arg=invalid
4004         for ol_val in auto yes no ; do
4005                 if test "$enableval" = "$ol_val" ; then
4006                         ol_arg="$ol_val"
4007                 fi
4008         done
4009         if test "$ol_arg" = "invalid" ; then
4010                 as_fn_error "bad value $enableval for --enable-slapi" "$LINENO" 5
4011         fi
4012         ol_enable_slapi="$ol_arg"
4013
4014 else
4015         ol_enable_slapi=no
4016 fi
4017
4018 # end --enable-slapi
4019 # OpenLDAP --enable-slp
4020
4021         # Check whether --enable-slp was given.
4022 if test "${enable_slp+set}" = set; then :
4023   enableval=$enable_slp;
4024         ol_arg=invalid
4025         for ol_val in auto yes no ; do
4026                 if test "$enableval" = "$ol_val" ; then
4027                         ol_arg="$ol_val"
4028                 fi
4029         done
4030         if test "$ol_arg" = "invalid" ; then
4031                 as_fn_error "bad value $enableval for --enable-slp" "$LINENO" 5
4032         fi
4033         ol_enable_slp="$ol_arg"
4034
4035 else
4036         ol_enable_slp=no
4037 fi
4038
4039 # end --enable-slp
4040 # OpenLDAP --enable-wrappers
4041
4042         # Check whether --enable-wrappers was given.
4043 if test "${enable_wrappers+set}" = set; then :
4044   enableval=$enable_wrappers;
4045         ol_arg=invalid
4046         for ol_val in auto yes no ; do
4047                 if test "$enableval" = "$ol_val" ; then
4048                         ol_arg="$ol_val"
4049                 fi
4050         done
4051         if test "$ol_arg" = "invalid" ; then
4052                 as_fn_error "bad value $enableval for --enable-wrappers" "$LINENO" 5
4053         fi
4054         ol_enable_wrappers="$ol_arg"
4055
4056 else
4057         ol_enable_wrappers=no
4058 fi
4059
4060 # end --enable-wrappers
4061
4062 Backends="bdb \
4063         dnssrv \
4064         hdb \
4065         ldap \
4066         mdb \
4067         meta \
4068         asyncmeta \
4069         monitor \
4070         ndb \
4071         null \
4072         passwd \
4073         perl \
4074         relay \
4075         shell \
4076         sock \
4077         sql \
4078         wt"
4079
4080 # Check whether --enable-xxslapbackends was given.
4081 if test "${enable_xxslapbackends+set}" = set; then :
4082   enableval=$enable_xxslapbackends;
4083 fi
4084
4085
4086 # OpenLDAP --enable-backends
4087
4088         # Check whether --enable-backends was given.
4089 if test "${enable_backends+set}" = set; then :
4090   enableval=$enable_backends;
4091         ol_arg=invalid
4092         for ol_val in no yes mod ; do
4093                 if test "$enableval" = "$ol_val" ; then
4094                         ol_arg="$ol_val"
4095                 fi
4096         done
4097         if test "$ol_arg" = "invalid" ; then
4098                 as_fn_error "bad value $enableval for --enable-backends" "$LINENO" 5
4099         fi
4100         ol_enable_backends="$ol_arg"
4101
4102 fi
4103
4104 # end --enable-backends
4105 # OpenLDAP --enable-bdb
4106
4107         # Check whether --enable-bdb was given.
4108 if test "${enable_bdb+set}" = set; then :
4109   enableval=$enable_bdb;
4110         ol_arg=invalid
4111         for ol_val in no yes mod ; do
4112                 if test "$enableval" = "$ol_val" ; then
4113                         ol_arg="$ol_val"
4114                 fi
4115         done
4116         if test "$ol_arg" = "invalid" ; then
4117                 as_fn_error "bad value $enableval for --enable-bdb" "$LINENO" 5
4118         fi
4119         ol_enable_bdb="$ol_arg"
4120
4121 else
4122         ol_enable_bdb=${ol_enable_backends:-no}
4123 fi
4124
4125 # end --enable-bdb
4126 # OpenLDAP --enable-dnssrv
4127
4128         # Check whether --enable-dnssrv was given.
4129 if test "${enable_dnssrv+set}" = set; then :
4130   enableval=$enable_dnssrv;
4131         ol_arg=invalid
4132         for ol_val in no yes mod ; do
4133                 if test "$enableval" = "$ol_val" ; then
4134                         ol_arg="$ol_val"
4135                 fi
4136         done
4137         if test "$ol_arg" = "invalid" ; then
4138                 as_fn_error "bad value $enableval for --enable-dnssrv" "$LINENO" 5
4139         fi
4140         ol_enable_dnssrv="$ol_arg"
4141
4142 else
4143         ol_enable_dnssrv=${ol_enable_backends:-no}
4144 fi
4145
4146 # end --enable-dnssrv
4147 # OpenLDAP --enable-hdb
4148
4149         # Check whether --enable-hdb was given.
4150 if test "${enable_hdb+set}" = set; then :
4151   enableval=$enable_hdb;
4152         ol_arg=invalid
4153         for ol_val in no yes mod ; do
4154                 if test "$enableval" = "$ol_val" ; then
4155                         ol_arg="$ol_val"
4156                 fi
4157         done
4158         if test "$ol_arg" = "invalid" ; then
4159                 as_fn_error "bad value $enableval for --enable-hdb" "$LINENO" 5
4160         fi
4161         ol_enable_hdb="$ol_arg"
4162
4163 else
4164         ol_enable_hdb=${ol_enable_backends:-no}
4165 fi
4166
4167 # end --enable-hdb
4168 # OpenLDAP --enable-ldap
4169
4170         # Check whether --enable-ldap was given.
4171 if test "${enable_ldap+set}" = set; then :
4172   enableval=$enable_ldap;
4173         ol_arg=invalid
4174         for ol_val in no yes mod ; do
4175                 if test "$enableval" = "$ol_val" ; then
4176                         ol_arg="$ol_val"
4177                 fi
4178         done
4179         if test "$ol_arg" = "invalid" ; then
4180                 as_fn_error "bad value $enableval for --enable-ldap" "$LINENO" 5
4181         fi
4182         ol_enable_ldap="$ol_arg"
4183
4184 else
4185         ol_enable_ldap=${ol_enable_backends:-no}
4186 fi
4187
4188 # end --enable-ldap
4189 # OpenLDAP --enable-mdb
4190
4191         # Check whether --enable-mdb was given.
4192 if test "${enable_mdb+set}" = set; then :
4193   enableval=$enable_mdb;
4194         ol_arg=invalid
4195         for ol_val in no yes mod ; do
4196                 if test "$enableval" = "$ol_val" ; then
4197                         ol_arg="$ol_val"
4198                 fi
4199         done
4200         if test "$ol_arg" = "invalid" ; then
4201                 as_fn_error "bad value $enableval for --enable-mdb" "$LINENO" 5
4202         fi
4203         ol_enable_mdb="$ol_arg"
4204
4205 else
4206         ol_enable_mdb=${ol_enable_backends:-yes}
4207 fi
4208
4209 # end --enable-mdb
4210 # OpenLDAP --enable-meta
4211
4212         # Check whether --enable-meta was given.
4213 if test "${enable_meta+set}" = set; then :
4214   enableval=$enable_meta;
4215         ol_arg=invalid
4216         for ol_val in no yes mod ; do
4217                 if test "$enableval" = "$ol_val" ; then
4218                         ol_arg="$ol_val"
4219                 fi
4220         done
4221         if test "$ol_arg" = "invalid" ; then
4222                 as_fn_error "bad value $enableval for --enable-meta" "$LINENO" 5
4223         fi
4224         ol_enable_meta="$ol_arg"
4225
4226 else
4227         ol_enable_meta=${ol_enable_backends:-no}
4228 fi
4229
4230 # end --enable-meta
4231 # OpenLDAP --enable-asyncmeta
4232
4233         # Check whether --enable-asyncmeta was given.
4234 if test "${enable_asyncmeta+set}" = set; then :
4235   enableval=$enable_asyncmeta;
4236         ol_arg=invalid
4237         for ol_val in no yes mod ; do
4238                 if test "$enableval" = "$ol_val" ; then
4239                         ol_arg="$ol_val"
4240                 fi
4241         done
4242         if test "$ol_arg" = "invalid" ; then
4243                 as_fn_error "bad value $enableval for --enable-asyncmeta" "$LINENO" 5
4244         fi
4245         ol_enable_asyncmeta="$ol_arg"
4246
4247 else
4248         ol_enable_asyncmeta=${ol_enable_backends:-no}
4249 fi
4250
4251 # end --enable-asyncmeta
4252 # OpenLDAP --enable-monitor
4253
4254         # Check whether --enable-monitor was given.
4255 if test "${enable_monitor+set}" = set; then :
4256   enableval=$enable_monitor;
4257         ol_arg=invalid
4258         for ol_val in no yes mod ; do
4259                 if test "$enableval" = "$ol_val" ; then
4260                         ol_arg="$ol_val"
4261                 fi
4262         done
4263         if test "$ol_arg" = "invalid" ; then
4264                 as_fn_error "bad value $enableval for --enable-monitor" "$LINENO" 5
4265         fi
4266         ol_enable_monitor="$ol_arg"
4267
4268 else
4269         ol_enable_monitor=${ol_enable_backends:-yes}
4270 fi
4271
4272 # end --enable-monitor
4273 # OpenLDAP --enable-ndb
4274
4275         # Check whether --enable-ndb was given.
4276 if test "${enable_ndb+set}" = set; then :
4277   enableval=$enable_ndb;
4278         ol_arg=invalid
4279         for ol_val in no yes mod ; do
4280                 if test "$enableval" = "$ol_val" ; then
4281                         ol_arg="$ol_val"
4282                 fi
4283         done
4284         if test "$ol_arg" = "invalid" ; then
4285                 as_fn_error "bad value $enableval for --enable-ndb" "$LINENO" 5
4286         fi
4287         ol_enable_ndb="$ol_arg"
4288
4289 else
4290         ol_enable_ndb=${ol_enable_backends:-no}
4291 fi
4292
4293 # end --enable-ndb
4294 # OpenLDAP --enable-null
4295
4296         # Check whether --enable-null was given.
4297 if test "${enable_null+set}" = set; then :
4298   enableval=$enable_null;
4299         ol_arg=invalid
4300         for ol_val in no yes mod ; do
4301                 if test "$enableval" = "$ol_val" ; then
4302                         ol_arg="$ol_val"
4303                 fi
4304         done
4305         if test "$ol_arg" = "invalid" ; then
4306                 as_fn_error "bad value $enableval for --enable-null" "$LINENO" 5
4307         fi
4308         ol_enable_null="$ol_arg"
4309
4310 else
4311         ol_enable_null=${ol_enable_backends:-no}
4312 fi
4313
4314 # end --enable-null
4315 # OpenLDAP --enable-passwd
4316
4317         # Check whether --enable-passwd was given.
4318 if test "${enable_passwd+set}" = set; then :
4319   enableval=$enable_passwd;
4320         ol_arg=invalid
4321         for ol_val in no yes mod ; do
4322                 if test "$enableval" = "$ol_val" ; then
4323                         ol_arg="$ol_val"
4324                 fi
4325         done
4326         if test "$ol_arg" = "invalid" ; then
4327                 as_fn_error "bad value $enableval for --enable-passwd" "$LINENO" 5
4328         fi
4329         ol_enable_passwd="$ol_arg"
4330
4331 else
4332         ol_enable_passwd=${ol_enable_backends:-no}
4333 fi
4334
4335 # end --enable-passwd
4336 # OpenLDAP --enable-perl
4337
4338         # Check whether --enable-perl was given.
4339 if test "${enable_perl+set}" = set; then :
4340   enableval=$enable_perl;
4341         ol_arg=invalid
4342         for ol_val in no yes mod ; do
4343                 if test "$enableval" = "$ol_val" ; then
4344                         ol_arg="$ol_val"
4345                 fi
4346         done
4347         if test "$ol_arg" = "invalid" ; then
4348                 as_fn_error "bad value $enableval for --enable-perl" "$LINENO" 5
4349         fi
4350         ol_enable_perl="$ol_arg"
4351
4352 else
4353         ol_enable_perl=${ol_enable_backends:-no}
4354 fi
4355
4356 # end --enable-perl
4357 # OpenLDAP --enable-relay
4358
4359         # Check whether --enable-relay was given.
4360 if test "${enable_relay+set}" = set; then :
4361   enableval=$enable_relay;
4362         ol_arg=invalid
4363         for ol_val in no yes mod ; do
4364                 if test "$enableval" = "$ol_val" ; then
4365                         ol_arg="$ol_val"
4366                 fi
4367         done
4368         if test "$ol_arg" = "invalid" ; then
4369                 as_fn_error "bad value $enableval for --enable-relay" "$LINENO" 5
4370         fi
4371         ol_enable_relay="$ol_arg"
4372
4373 else
4374         ol_enable_relay=${ol_enable_backends:-yes}
4375 fi
4376
4377 # end --enable-relay
4378 # OpenLDAP --enable-shell
4379
4380         # Check whether --enable-shell was given.
4381 if test "${enable_shell+set}" = set; then :
4382   enableval=$enable_shell;
4383         ol_arg=invalid
4384         for ol_val in no yes mod ; do
4385                 if test "$enableval" = "$ol_val" ; then
4386                         ol_arg="$ol_val"
4387                 fi
4388         done
4389         if test "$ol_arg" = "invalid" ; then
4390                 as_fn_error "bad value $enableval for --enable-shell" "$LINENO" 5
4391         fi
4392         ol_enable_shell="$ol_arg"
4393
4394 else
4395         ol_enable_shell=${ol_enable_backends:-no}
4396 fi
4397
4398 # end --enable-shell
4399 # OpenLDAP --enable-sock
4400
4401         # Check whether --enable-sock was given.
4402 if test "${enable_sock+set}" = set; then :
4403   enableval=$enable_sock;
4404         ol_arg=invalid
4405         for ol_val in no yes mod ; do
4406                 if test "$enableval" = "$ol_val" ; then
4407                         ol_arg="$ol_val"
4408                 fi
4409         done
4410         if test "$ol_arg" = "invalid" ; then
4411                 as_fn_error "bad value $enableval for --enable-sock" "$LINENO" 5
4412         fi
4413         ol_enable_sock="$ol_arg"
4414
4415 else
4416         ol_enable_sock=${ol_enable_backends:-no}
4417 fi
4418
4419 # end --enable-sock
4420 # OpenLDAP --enable-sql
4421
4422         # Check whether --enable-sql was given.
4423 if test "${enable_sql+set}" = set; then :
4424   enableval=$enable_sql;
4425         ol_arg=invalid
4426         for ol_val in no yes mod ; do
4427                 if test "$enableval" = "$ol_val" ; then
4428                         ol_arg="$ol_val"
4429                 fi
4430         done
4431         if test "$ol_arg" = "invalid" ; then
4432                 as_fn_error "bad value $enableval for --enable-sql" "$LINENO" 5
4433         fi
4434         ol_enable_sql="$ol_arg"
4435
4436 else
4437         ol_enable_sql=${ol_enable_backends:-no}
4438 fi
4439
4440 # end --enable-sql
4441 # OpenLDAP --enable-wt
4442
4443         # Check whether --enable-wt was given.
4444 if test "${enable_wt+set}" = set; then :
4445   enableval=$enable_wt;
4446         ol_arg=invalid
4447         for ol_val in no yes mod ; do
4448                 if test "$enableval" = "$ol_val" ; then
4449                         ol_arg="$ol_val"
4450                 fi
4451         done
4452         if test "$ol_arg" = "invalid" ; then
4453                 as_fn_error "bad value $enableval for --enable-wt" "$LINENO" 5
4454         fi
4455         ol_enable_wt="$ol_arg"
4456
4457 else
4458         ol_enable_wt=${ol_enable_backends:-no}
4459 fi
4460
4461 # end --enable-wt
4462
4463 Overlays="accesslog \
4464         auditlog \
4465         autoca \
4466         collect \
4467         constraint \
4468         dds \
4469         deref \
4470         dyngroup \
4471         dynlist \
4472         memberof \
4473         ppolicy \
4474         proxycache \
4475         refint \
4476         retcode \
4477         rwm \
4478         seqmod \
4479         sssvlv \
4480         syncprov \
4481         translucent \
4482         unique \
4483         valsort"
4484
4485 # Check whether --enable-xxslapoverlays was given.
4486 if test "${enable_xxslapoverlays+set}" = set; then :
4487   enableval=$enable_xxslapoverlays;
4488 fi
4489
4490
4491 # OpenLDAP --enable-overlays
4492
4493         # Check whether --enable-overlays was given.
4494 if test "${enable_overlays+set}" = set; then :
4495   enableval=$enable_overlays;
4496         ol_arg=invalid
4497         for ol_val in no yes mod ; do
4498                 if test "$enableval" = "$ol_val" ; then
4499                         ol_arg="$ol_val"
4500                 fi
4501         done
4502         if test "$ol_arg" = "invalid" ; then
4503                 as_fn_error "bad value $enableval for --enable-overlays" "$LINENO" 5
4504         fi
4505         ol_enable_overlays="$ol_arg"
4506
4507 fi
4508
4509 # end --enable-overlays
4510 # OpenLDAP --enable-accesslog
4511
4512         # Check whether --enable-accesslog was given.
4513 if test "${enable_accesslog+set}" = set; then :
4514   enableval=$enable_accesslog;
4515         ol_arg=invalid
4516         for ol_val in no yes mod ; do
4517                 if test "$enableval" = "$ol_val" ; then
4518                         ol_arg="$ol_val"
4519                 fi
4520         done
4521         if test "$ol_arg" = "invalid" ; then
4522                 as_fn_error "bad value $enableval for --enable-accesslog" "$LINENO" 5
4523         fi
4524         ol_enable_accesslog="$ol_arg"
4525
4526 else
4527         ol_enable_accesslog=${ol_enable_overlays:-no}
4528 fi
4529
4530 # end --enable-accesslog
4531
4532 # OpenLDAP --enable-auditlog
4533
4534         # Check whether --enable-auditlog was given.
4535 if test "${enable_auditlog+set}" = set; then :
4536   enableval=$enable_auditlog;
4537         ol_arg=invalid
4538         for ol_val in no yes mod ; do
4539                 if test "$enableval" = "$ol_val" ; then
4540                         ol_arg="$ol_val"
4541                 fi
4542         done
4543         if test "$ol_arg" = "invalid" ; then
4544                 as_fn_error "bad value $enableval for --enable-auditlog" "$LINENO" 5
4545         fi
4546         ol_enable_auditlog="$ol_arg"
4547
4548 else
4549         ol_enable_auditlog=${ol_enable_overlays:-no}
4550 fi
4551
4552 # end --enable-auditlog
4553
4554 # OpenLDAP --enable-autoca
4555
4556         # Check whether --enable-autoca was given.
4557 if test "${enable_autoca+set}" = set; then :
4558   enableval=$enable_autoca;
4559         ol_arg=invalid
4560         for ol_val in no yes mod ; do
4561                 if test "$enableval" = "$ol_val" ; then
4562                         ol_arg="$ol_val"
4563                 fi
4564         done
4565         if test "$ol_arg" = "invalid" ; then
4566                 as_fn_error "bad value $enableval for --enable-autoca" "$LINENO" 5
4567         fi
4568         ol_enable_autoca="$ol_arg"
4569
4570 else
4571         ol_enable_autoca=${ol_enable_overlays:-no}
4572 fi
4573
4574 # end --enable-autoca
4575
4576 # OpenLDAP --enable-collect
4577
4578         # Check whether --enable-collect was given.
4579 if test "${enable_collect+set}" = set; then :
4580   enableval=$enable_collect;
4581         ol_arg=invalid
4582         for ol_val in no yes mod ; do
4583                 if test "$enableval" = "$ol_val" ; then
4584                         ol_arg="$ol_val"
4585                 fi
4586         done
4587         if test "$ol_arg" = "invalid" ; then
4588                 as_fn_error "bad value $enableval for --enable-collect" "$LINENO" 5
4589         fi
4590         ol_enable_collect="$ol_arg"
4591
4592 else
4593         ol_enable_collect=${ol_enable_overlays:-no}
4594 fi
4595
4596 # end --enable-collect
4597
4598 # OpenLDAP --enable-constraint
4599
4600         # Check whether --enable-constraint was given.
4601 if test "${enable_constraint+set}" = set; then :
4602   enableval=$enable_constraint;
4603         ol_arg=invalid
4604         for ol_val in no yes mod ; do
4605                 if test "$enableval" = "$ol_val" ; then
4606                         ol_arg="$ol_val"
4607                 fi
4608         done
4609         if test "$ol_arg" = "invalid" ; then
4610                 as_fn_error "bad value $enableval for --enable-constraint" "$LINENO" 5
4611         fi
4612         ol_enable_constraint="$ol_arg"
4613
4614 else
4615         ol_enable_constraint=${ol_enable_overlays:-no}
4616 fi
4617
4618 # end --enable-constraint
4619
4620 # OpenLDAP --enable-dds
4621
4622         # Check whether --enable-dds was given.
4623 if test "${enable_dds+set}" = set; then :
4624   enableval=$enable_dds;
4625         ol_arg=invalid
4626         for ol_val in no yes mod ; do
4627                 if test "$enableval" = "$ol_val" ; then
4628                         ol_arg="$ol_val"
4629                 fi
4630         done
4631         if test "$ol_arg" = "invalid" ; then
4632                 as_fn_error "bad value $enableval for --enable-dds" "$LINENO" 5
4633         fi
4634         ol_enable_dds="$ol_arg"
4635
4636 else
4637         ol_enable_dds=${ol_enable_overlays:-no}
4638 fi
4639
4640 # end --enable-dds
4641
4642 # OpenLDAP --enable-deref
4643
4644         # Check whether --enable-deref was given.
4645 if test "${enable_deref+set}" = set; then :
4646   enableval=$enable_deref;
4647         ol_arg=invalid
4648         for ol_val in no yes mod ; do
4649                 if test "$enableval" = "$ol_val" ; then
4650                         ol_arg="$ol_val"
4651                 fi
4652         done
4653         if test "$ol_arg" = "invalid" ; then
4654                 as_fn_error "bad value $enableval for --enable-deref" "$LINENO" 5
4655         fi
4656         ol_enable_deref="$ol_arg"
4657
4658 else
4659         ol_enable_deref=${ol_enable_overlays:-no}
4660 fi
4661
4662 # end --enable-deref
4663
4664 # OpenLDAP --enable-dyngroup
4665
4666         # Check whether --enable-dyngroup was given.
4667 if test "${enable_dyngroup+set}" = set; then :
4668   enableval=$enable_dyngroup;
4669         ol_arg=invalid
4670         for ol_val in no yes mod ; do
4671                 if test "$enableval" = "$ol_val" ; then
4672                         ol_arg="$ol_val"
4673                 fi
4674         done
4675         if test "$ol_arg" = "invalid" ; then
4676                 as_fn_error "bad value $enableval for --enable-dyngroup" "$LINENO" 5
4677         fi
4678         ol_enable_dyngroup="$ol_arg"
4679
4680 else
4681         ol_enable_dyngroup=${ol_enable_overlays:-no}
4682 fi
4683
4684 # end --enable-dyngroup
4685
4686 # OpenLDAP --enable-dynlist
4687
4688         # Check whether --enable-dynlist was given.
4689 if test "${enable_dynlist+set}" = set; then :
4690   enableval=$enable_dynlist;
4691         ol_arg=invalid
4692         for ol_val in no yes mod ; do
4693                 if test "$enableval" = "$ol_val" ; then
4694                         ol_arg="$ol_val"
4695                 fi
4696         done
4697         if test "$ol_arg" = "invalid" ; then
4698                 as_fn_error "bad value $enableval for --enable-dynlist" "$LINENO" 5
4699         fi
4700         ol_enable_dynlist="$ol_arg"
4701
4702 else
4703         ol_enable_dynlist=${ol_enable_overlays:-no}
4704 fi
4705
4706 # end --enable-dynlist
4707
4708 # OpenLDAP --enable-memberof
4709
4710         # Check whether --enable-memberof was given.
4711 if test "${enable_memberof+set}" = set; then :
4712   enableval=$enable_memberof;
4713         ol_arg=invalid
4714         for ol_val in no yes mod ; do
4715                 if test "$enableval" = "$ol_val" ; then
4716                         ol_arg="$ol_val"
4717                 fi
4718         done
4719         if test "$ol_arg" = "invalid" ; then
4720                 as_fn_error "bad value $enableval for --enable-memberof" "$LINENO" 5
4721         fi
4722         ol_enable_memberof="$ol_arg"
4723
4724 else
4725         ol_enable_memberof=${ol_enable_overlays:-no}
4726 fi
4727
4728 # end --enable-memberof
4729
4730 # OpenLDAP --enable-ppolicy
4731
4732         # Check whether --enable-ppolicy was given.
4733 if test "${enable_ppolicy+set}" = set; then :
4734   enableval=$enable_ppolicy;
4735         ol_arg=invalid
4736         for ol_val in no yes mod ; do
4737                 if test "$enableval" = "$ol_val" ; then
4738                         ol_arg="$ol_val"
4739                 fi
4740         done
4741         if test "$ol_arg" = "invalid" ; then
4742                 as_fn_error "bad value $enableval for --enable-ppolicy" "$LINENO" 5
4743         fi
4744         ol_enable_ppolicy="$ol_arg"
4745
4746 else
4747         ol_enable_ppolicy=${ol_enable_overlays:-no}
4748 fi
4749
4750 # end --enable-ppolicy
4751
4752 # OpenLDAP --enable-proxycache
4753
4754         # Check whether --enable-proxycache was given.
4755 if test "${enable_proxycache+set}" = set; then :
4756   enableval=$enable_proxycache;
4757         ol_arg=invalid
4758         for ol_val in no yes mod ; do
4759                 if test "$enableval" = "$ol_val" ; then
4760                         ol_arg="$ol_val"
4761                 fi
4762         done
4763         if test "$ol_arg" = "invalid" ; then
4764                 as_fn_error "bad value $enableval for --enable-proxycache" "$LINENO" 5
4765         fi
4766         ol_enable_proxycache="$ol_arg"
4767
4768 else
4769         ol_enable_proxycache=${ol_enable_overlays:-no}
4770 fi
4771
4772 # end --enable-proxycache
4773
4774 # OpenLDAP --enable-refint
4775
4776         # Check whether --enable-refint was given.
4777 if test "${enable_refint+set}" = set; then :
4778   enableval=$enable_refint;
4779         ol_arg=invalid
4780         for ol_val in no yes mod ; do
4781                 if test "$enableval" = "$ol_val" ; then
4782                         ol_arg="$ol_val"
4783                 fi
4784         done
4785         if test "$ol_arg" = "invalid" ; then
4786                 as_fn_error "bad value $enableval for --enable-refint" "$LINENO" 5
4787         fi
4788         ol_enable_refint="$ol_arg"
4789
4790 else
4791         ol_enable_refint=${ol_enable_overlays:-no}
4792 fi
4793
4794 # end --enable-refint
4795
4796 # OpenLDAP --enable-retcode
4797
4798         # Check whether --enable-retcode was given.
4799 if test "${enable_retcode+set}" = set; then :
4800   enableval=$enable_retcode;
4801         ol_arg=invalid
4802         for ol_val in no yes mod ; do
4803                 if test "$enableval" = "$ol_val" ; then
4804                         ol_arg="$ol_val"
4805                 fi
4806         done
4807         if test "$ol_arg" = "invalid" ; then
4808                 as_fn_error "bad value $enableval for --enable-retcode" "$LINENO" 5
4809         fi
4810         ol_enable_retcode="$ol_arg"
4811
4812 else
4813         ol_enable_retcode=${ol_enable_overlays:-no}
4814 fi
4815
4816 # end --enable-retcode
4817
4818 # OpenLDAP --enable-rwm
4819
4820         # Check whether --enable-rwm was given.
4821 if test "${enable_rwm+set}" = set; then :
4822   enableval=$enable_rwm;
4823         ol_arg=invalid
4824         for ol_val in no yes mod ; do
4825                 if test "$enableval" = "$ol_val" ; then
4826                         ol_arg="$ol_val"
4827                 fi
4828         done
4829         if test "$ol_arg" = "invalid" ; then
4830                 as_fn_error "bad value $enableval for --enable-rwm" "$LINENO" 5
4831         fi
4832         ol_enable_rwm="$ol_arg"
4833
4834 else
4835         ol_enable_rwm=${ol_enable_overlays:-no}
4836 fi
4837
4838 # end --enable-rwm
4839
4840 # OpenLDAP --enable-seqmod
4841
4842         # Check whether --enable-seqmod was given.
4843 if test "${enable_seqmod+set}" = set; then :
4844   enableval=$enable_seqmod;
4845         ol_arg=invalid
4846         for ol_val in no yes mod ; do
4847                 if test "$enableval" = "$ol_val" ; then
4848                         ol_arg="$ol_val"
4849                 fi
4850         done
4851         if test "$ol_arg" = "invalid" ; then
4852                 as_fn_error "bad value $enableval for --enable-seqmod" "$LINENO" 5
4853         fi
4854         ol_enable_seqmod="$ol_arg"
4855
4856 else
4857         ol_enable_seqmod=${ol_enable_overlays:-no}
4858 fi
4859
4860 # end --enable-seqmod
4861
4862 # OpenLDAP --enable-sssvlv
4863
4864         # Check whether --enable-sssvlv was given.
4865 if test "${enable_sssvlv+set}" = set; then :
4866   enableval=$enable_sssvlv;
4867         ol_arg=invalid
4868         for ol_val in no yes mod ; do
4869                 if test "$enableval" = "$ol_val" ; then
4870                         ol_arg="$ol_val"
4871                 fi
4872         done
4873         if test "$ol_arg" = "invalid" ; then
4874                 as_fn_error "bad value $enableval for --enable-sssvlv" "$LINENO" 5
4875         fi
4876         ol_enable_sssvlv="$ol_arg"
4877
4878 else
4879         ol_enable_sssvlv=${ol_enable_overlays:-no}
4880 fi
4881
4882 # end --enable-sssvlv
4883
4884 # OpenLDAP --enable-syncprov
4885
4886         # Check whether --enable-syncprov was given.
4887 if test "${enable_syncprov+set}" = set; then :
4888   enableval=$enable_syncprov;
4889         ol_arg=invalid
4890         for ol_val in no yes mod ; do
4891                 if test "$enableval" = "$ol_val" ; then
4892                         ol_arg="$ol_val"
4893                 fi
4894         done
4895         if test "$ol_arg" = "invalid" ; then
4896                 as_fn_error "bad value $enableval for --enable-syncprov" "$LINENO" 5
4897         fi
4898         ol_enable_syncprov="$ol_arg"
4899
4900 else
4901         ol_enable_syncprov=${ol_enable_overlays:-yes}
4902 fi
4903
4904 # end --enable-syncprov
4905
4906 # OpenLDAP --enable-translucent
4907
4908         # Check whether --enable-translucent was given.
4909 if test "${enable_translucent+set}" = set; then :
4910   enableval=$enable_translucent;
4911         ol_arg=invalid
4912         for ol_val in no yes mod ; do
4913                 if test "$enableval" = "$ol_val" ; then
4914                         ol_arg="$ol_val"
4915                 fi
4916         done
4917         if test "$ol_arg" = "invalid" ; then
4918                 as_fn_error "bad value $enableval for --enable-translucent" "$LINENO" 5
4919         fi
4920         ol_enable_translucent="$ol_arg"
4921
4922 else
4923         ol_enable_translucent=${ol_enable_overlays:-no}
4924 fi
4925
4926 # end --enable-translucent
4927
4928 # OpenLDAP --enable-unique
4929
4930         # Check whether --enable-unique was given.
4931 if test "${enable_unique+set}" = set; then :
4932   enableval=$enable_unique;
4933         ol_arg=invalid
4934         for ol_val in no yes mod ; do
4935                 if test "$enableval" = "$ol_val" ; then
4936                         ol_arg="$ol_val"
4937                 fi
4938         done
4939         if test "$ol_arg" = "invalid" ; then
4940                 as_fn_error "bad value $enableval for --enable-unique" "$LINENO" 5
4941         fi
4942         ol_enable_unique="$ol_arg"
4943
4944 else
4945         ol_enable_unique=${ol_enable_overlays:-no}
4946 fi
4947
4948 # end --enable-unique
4949
4950 # OpenLDAP --enable-valsort
4951
4952         # Check whether --enable-valsort was given.
4953 if test "${enable_valsort+set}" = set; then :
4954   enableval=$enable_valsort;
4955         ol_arg=invalid
4956         for ol_val in no yes mod ; do
4957                 if test "$enableval" = "$ol_val" ; then
4958                         ol_arg="$ol_val"
4959                 fi
4960         done
4961         if test "$ol_arg" = "invalid" ; then
4962                 as_fn_error "bad value $enableval for --enable-valsort" "$LINENO" 5
4963         fi
4964         ol_enable_valsort="$ol_arg"
4965
4966 else
4967         ol_enable_valsort=${ol_enable_overlays:-no}
4968 fi
4969
4970 # end --enable-valsort
4971
4972
4973 # Check whether --enable-xxliboptions was given.
4974 if test "${enable_xxliboptions+set}" = set; then :
4975   enableval=$enable_xxliboptions;
4976 fi
4977
4978 # Check whether --enable-static was given.
4979 if test "${enable_static+set}" = set; then :
4980   enableval=$enable_static; p=${PACKAGE-default}
4981     case $enableval in
4982     yes) enable_static=yes ;;
4983     no) enable_static=no ;;
4984     *)
4985      enable_static=no
4986       # Look at the argument we got.  We use all the common list separators.
4987       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4988       for pkg in $enableval; do
4989         IFS="$lt_save_ifs"
4990         if test "X$pkg" = "X$p"; then
4991           enable_static=yes
4992         fi
4993       done
4994       IFS="$lt_save_ifs"
4995       ;;
4996     esac
4997 else
4998   enable_static=yes
4999 fi
5000
5001
5002 # Check whether --enable-shared was given.
5003 if test "${enable_shared+set}" = set; then :
5004   enableval=$enable_shared; p=${PACKAGE-default}
5005     case $enableval in
5006     yes) enable_shared=yes ;;
5007     no) enable_shared=no ;;
5008     *)
5009       enable_shared=no
5010       # Look at the argument we got.  We use all the common list separators.
5011       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5012       for pkg in $enableval; do
5013         IFS="$lt_save_ifs"
5014         if test "X$pkg" = "X$p"; then
5015           enable_shared=yes
5016         fi
5017       done
5018       IFS="$lt_save_ifs"
5019       ;;
5020     esac
5021 else
5022   enable_shared=yes
5023 fi
5024
5025
5026
5027
5028 # validate options
5029 if test $ol_enable_slapd = no ; then
5030                 if test $ol_enable_slapi = yes ; then
5031                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
5032 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
5033         fi
5034         case "$ol_enable_backends" in yes | mod)
5035                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
5036 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
5037         esac
5038         for i in $Backends; do
5039                 eval "ol_tmp=\$ol_enable_$i"
5040                 if test $ol_tmp != no ; then
5041                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
5042 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
5043                         eval "ol_enable_$i=no"
5044                 fi
5045         done
5046         if test $ol_enable_modules = yes ; then
5047                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
5048 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
5049         fi
5050         if test $ol_enable_wrappers = yes ; then
5051                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
5052 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
5053         fi
5054         if test $ol_enable_rlookups = yes ; then
5055                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
5056 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
5057         fi
5058         if test $ol_enable_dynacl = yes ; then
5059                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
5060 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
5061         fi
5062         if test $ol_enable_aci != no ; then
5063                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
5064 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
5065         fi
5066         if test $ol_enable_rewrite = yes ; then
5067                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
5068 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
5069         fi
5070                 case "$ol_enable_overlays" in yes | mod)
5071                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
5072 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
5073         esac
5074         for i in $Overlays; do
5075                 eval "ol_tmp=\$ol_enable_$i"
5076                 if test $ol_tmp != no ; then
5077                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
5078 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
5079                         eval "ol_enable_$i=no"
5080                 fi
5081         done
5082
5083         # force settings to no
5084         ol_enable_slapi=no
5085
5086         ol_enable_backends=
5087         ol_enable_overlays=
5088         ol_enable_modules=no
5089         ol_enable_rlookups=no
5090         ol_enable_dynacl=no
5091         ol_enable_aci=no
5092         ol_enable_wrappers=no
5093
5094         ol_enable_rewrite=no
5095
5096 elif test $ol_enable_modules != yes &&
5097         test $ol_enable_bdb = no &&
5098         test $ol_enable_dnssrv = no &&
5099         test $ol_enable_hdb = no &&
5100         test $ol_enable_ldap = no &&
5101         test $ol_enable_mdb = no &&
5102         test $ol_enable_meta = no &&
5103         test $ol_enable_asyncmeta = no &&
5104         test $ol_enable_monitor = no &&
5105         test $ol_enable_ndb = no &&
5106         test $ol_enable_null = no &&
5107         test $ol_enable_passwd = no &&
5108         test $ol_enable_perl = no &&
5109         test $ol_enable_relay = no &&
5110         test $ol_enable_shell = no &&
5111         test $ol_enable_sock = no &&
5112         test $ol_enable_sql = no &&
5113         test $ol_enable_wt = no ; then
5114
5115         if test $ol_enable_slapd = yes ; then
5116                 as_fn_error "slapd requires a backend" "$LINENO" 5
5117         else
5118                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipping slapd, no backend specified" >&5
5119 $as_echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
5120                 ol_enable_slapd=no
5121         fi
5122 fi
5123
5124 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
5125         as_fn_error "--enable-meta requires --enable-ldap" "$LINENO" 5
5126 fi
5127
5128 if test $ol_enable_asyncmeta/$ol_enable_ldap = yes/no ; then
5129         as_fn_error "--enable-asyncmeta requires --enable-ldap" "$LINENO" 5
5130 fi
5131
5132 if test $ol_enable_lmpasswd = yes ; then
5133         if test $ol_with_tls = no ; then
5134                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
5135         fi
5136 fi
5137
5138 if test $ol_enable_spasswd = yes ; then
5139         if test $ol_with_cyrus_sasl = no ; then
5140                 as_fn_error "options require --with-cyrus-sasl" "$LINENO" 5
5141         fi
5142         ol_with_cyrus_sasl=yes
5143 fi
5144
5145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
5146 $as_echo "done" >&6; }
5147
5148 LDAP_LIBS=
5149 BDB_LIBS=
5150 SLAPD_NDB_LIBS=
5151 SLAPD_NDB_INCS=
5152 LTHREAD_LIBS=
5153 LUTIL_LIBS=
5154
5155 SLAPD_LIBS=
5156
5157 BUILD_SLAPD=no
5158
5159 BUILD_THREAD=no
5160
5161 BUILD_SLAPI=no
5162 SLAPD_SLAPI_DEPEND=
5163
5164 BUILD_BDB=no
5165 BUILD_DNSSRV=no
5166 BUILD_HDB=no
5167 BUILD_LDAP=no
5168 BUILD_MDB=no
5169 BUILD_META=no
5170 BUILD_ASYNCMETA=no
5171 BUILD_MONITOR=no
5172 BUILD_NDB=no
5173 BUILD_NULL=no
5174 BUILD_PASSWD=no
5175 BUILD_PERL=no
5176 BUILD_RELAY=no
5177 BUILD_SHELL=no
5178 BUILD_SOCK=no
5179 BUILD_SQL=no
5180 BUILD_WT=no
5181
5182 BUILD_ACCESSLOG=no
5183 BUILD_AUDITLOG=no
5184 BUILD_AUTOCA=no
5185 BUILD_CONSTRAINT=no
5186 BUILD_DDS=no
5187 BUILD_DENYOP=no
5188 BUILD_DEREF=no
5189 BUILD_DYNGROUP=no
5190 BUILD_DYNLIST=no
5191 BUILD_LASTMOD=no
5192 BUILD_MEMBEROF=no
5193 BUILD_PPOLICY=no
5194 BUILD_PROXYCACHE=no
5195 BUILD_REFINT=no
5196 BUILD_RETCODE=no
5197 BUILD_RWM=no
5198 BUILD_SEQMOD=no
5199 BUILD_SSSVLV=no
5200 BUILD_SYNCPROV=no
5201 BUILD_TRANSLUCENT=no
5202 BUILD_UNIQUE=no
5203 BUILD_VALSORT=no
5204
5205 SLAPD_STATIC_OVERLAYS=
5206 SLAPD_DYNAMIC_OVERLAYS=
5207
5208 SLAPD_MODULES_LDFLAGS=
5209 SLAPD_MODULES_CPPFLAGS=
5210
5211 SLAPD_STATIC_BACKENDS=back-ldif
5212 SLAPD_DYNAMIC_BACKENDS=
5213
5214 SLAPD_PERL_LDFLAGS=
5215 MOD_PERL_LDFLAGS=
5216 PERL_CPPFLAGS=
5217
5218 SLAPD_SQL_LDFLAGS=
5219 SLAPD_SQL_LIBS=
5220 SLAPD_SQL_INCLUDES=
5221
5222 KRB4_LIBS=
5223 KRB5_LIBS=
5224 SASL_LIBS=
5225 TLS_LIBS=
5226 MODULES_LIBS=
5227 SLAPI_LIBS=
5228 LIBSLAPI=
5229 AUTH_LIBS=
5230 ICU_LIBS=
5231
5232 SLAPD_SLP_LIBS=
5233 SLAPD_GMP_LIBS=
5234
5235
5236
5237 $as_echo "#define HAVE_MKVERSION 1" >>confdefs.h
5238
5239
5240
5241
5242 ol_aix_threads=no
5243 case "$target" in
5244 *-*-aix*)       if test -z "$CC" ; then
5245                 case "$ol_with_threads" in
5246                 auto | yes |  posix) ol_aix_threads=yes ;;
5247                 esac
5248         fi
5249 ;;
5250 esac
5251
5252 if test $ol_aix_threads = yes ; then
5253         if test -z "${CC}" ; then
5254                 for ac_prog in cc_r xlc_r cc
5255 do
5256   # Extract the first word of "$ac_prog", so it can be a program name with args.
5257 set dummy $ac_prog; ac_word=$2
5258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259 $as_echo_n "checking for $ac_word... " >&6; }
5260 if test "${ac_cv_prog_CC+set}" = set; then :
5261   $as_echo_n "(cached) " >&6
5262 else
5263   if test -n "$CC"; then
5264   ac_cv_prog_CC="$CC" # Let the user override the test.
5265 else
5266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5267 for as_dir in $PATH
5268 do
5269   IFS=$as_save_IFS
5270   test -z "$as_dir" && as_dir=.
5271     for ac_exec_ext in '' $ac_executable_extensions; do
5272   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5273     ac_cv_prog_CC="$ac_prog"
5274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5275     break 2
5276   fi
5277 done
5278   done
5279 IFS=$as_save_IFS
5280
5281 fi
5282 fi
5283 CC=$ac_cv_prog_CC
5284 if test -n "$CC"; then
5285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5286 $as_echo "$CC" >&6; }
5287 else
5288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5289 $as_echo "no" >&6; }
5290 fi
5291
5292
5293   test -n "$CC" && break
5294 done
5295
5296
5297                 if test "$CC" = cc ; then
5298                                                 if test $ol_with_threads != auto ; then
5299                                 as_fn_error "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
5300                         else
5301                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
5302 $as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
5303                         fi
5304                         ol_with_threads=no
5305                 fi
5306         fi
5307
5308         case ${CC} in cc_r | xlc_r)
5309                 ol_with_threads=posix
5310                 ol_cv_pthread_create=yes
5311                 ;;
5312         esac
5313 fi
5314
5315 if test -z "${CC}"; then
5316         for ac_prog in cc gcc
5317 do
5318   # Extract the first word of "$ac_prog", so it can be a program name with args.
5319 set dummy $ac_prog; ac_word=$2
5320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5321 $as_echo_n "checking for $ac_word... " >&6; }
5322 if test "${ac_cv_prog_CC+set}" = set; then :
5323   $as_echo_n "(cached) " >&6
5324 else
5325   if test -n "$CC"; then
5326   ac_cv_prog_CC="$CC" # Let the user override the test.
5327 else
5328 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5329 for as_dir in $PATH
5330 do
5331   IFS=$as_save_IFS
5332   test -z "$as_dir" && as_dir=.
5333     for ac_exec_ext in '' $ac_executable_extensions; do
5334   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5335     ac_cv_prog_CC="$ac_prog"
5336     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5337     break 2
5338   fi
5339 done
5340   done
5341 IFS=$as_save_IFS
5342
5343 fi
5344 fi
5345 CC=$ac_cv_prog_CC
5346 if test -n "$CC"; then
5347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5348 $as_echo "$CC" >&6; }
5349 else
5350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351 $as_echo "no" >&6; }
5352 fi
5353
5354
5355   test -n "$CC" && break
5356 done
5357 test -n "$CC" || CC="missing"
5358
5359
5360         if test "${CC}" = "missing" ; then
5361                 as_fn_error "Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." "$LINENO" 5
5362         fi
5363 fi
5364
5365 if test -z "${AR}"; then
5366         for ac_prog in ar gar
5367 do
5368   # Extract the first word of "$ac_prog", so it can be a program name with args.
5369 set dummy $ac_prog; ac_word=$2
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5371 $as_echo_n "checking for $ac_word... " >&6; }
5372 if test "${ac_cv_prog_AR+set}" = set; then :
5373   $as_echo_n "(cached) " >&6
5374 else
5375   if test -n "$AR"; then
5376   ac_cv_prog_AR="$AR" # Let the user override the test.
5377 else
5378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5379 for as_dir in $PATH
5380 do
5381   IFS=$as_save_IFS
5382   test -z "$as_dir" && as_dir=.
5383     for ac_exec_ext in '' $ac_executable_extensions; do
5384   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5385     ac_cv_prog_AR="$ac_prog"
5386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5387     break 2
5388   fi
5389 done
5390   done
5391 IFS=$as_save_IFS
5392
5393 fi
5394 fi
5395 AR=$ac_cv_prog_AR
5396 if test -n "$AR"; then
5397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5398 $as_echo "$AR" >&6; }
5399 else
5400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5401 $as_echo "no" >&6; }
5402 fi
5403
5404
5405   test -n "$AR" && break
5406 done
5407 test -n "$AR" || AR="missing"
5408
5409
5410         if test "${AR}" = "missing" ; then
5411                 as_fn_error "Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." "$LINENO" 5
5412         fi
5413 fi
5414
5415
5416
5417
5418
5419 # Check whether --enable-fast-install was given.
5420 if test "${enable_fast_install+set}" = set; then :
5421   enableval=$enable_fast_install; p=${PACKAGE-default}
5422     case $enableval in
5423     yes) enable_fast_install=yes ;;
5424     no) enable_fast_install=no ;;
5425     *)
5426       enable_fast_install=no
5427       # Look at the argument we got.  We use all the common list separators.
5428       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5429       for pkg in $enableval; do
5430         IFS="$lt_save_ifs"
5431         if test "X$pkg" = "X$p"; then
5432           enable_fast_install=yes
5433         fi
5434       done
5435       IFS="$lt_save_ifs"
5436       ;;
5437     esac
5438 else
5439   enable_fast_install=yes
5440 fi
5441
5442
5443 DEPDIR="${am__leading_dot}deps"
5444
5445 ac_config_commands="$ac_config_commands depfiles"
5446
5447
5448 am_make=${MAKE-make}
5449 cat > confinc << 'END'
5450 am__doit:
5451         @echo done
5452 .PHONY: am__doit
5453 END
5454 # If we don't find an include directive, just comment out the code.
5455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5456 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5457 am__include="#"
5458 am__quote=
5459 _am_result=none
5460 # First try GNU make style include.
5461 echo "include confinc" > confmf
5462 # We grep out `Entering directory' and `Leaving directory'
5463 # messages which can occur if `w' ends up in MAKEFLAGS.
5464 # In particular we don't look at `^make:' because GNU make might
5465 # be invoked under some other name (usually "gmake"), in which
5466 # case it prints its new name instead of `make'.
5467 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
5468    am__include=include
5469    am__quote=
5470    _am_result=GNU
5471 fi
5472 # Now try BSD make style include.
5473 if test "$am__include" = "#"; then
5474    echo '.include "confinc"' > confmf
5475    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
5476       am__include=.include
5477       am__quote="\""
5478       _am_result=BSD
5479    fi
5480 fi
5481
5482
5483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5484 $as_echo "$_am_result" >&6; }
5485 rm -f confinc confmf
5486
5487 # Check whether --enable-dependency-tracking was given.
5488 if test "${enable_dependency_tracking+set}" = set; then :
5489   enableval=$enable_dependency_tracking;
5490 fi
5491
5492 if test "x$enable_dependency_tracking" != xno; then
5493   am_depcomp="$ac_aux_dir/depcomp"
5494   AMDEPBACKSLASH='\'
5495 fi
5496
5497
5498 if test "x$enable_dependency_tracking" != xno; then
5499   AMDEP_TRUE=
5500   AMDEP_FALSE='#'
5501 else
5502   AMDEP_TRUE='#'
5503   AMDEP_FALSE=
5504 fi
5505
5506
5507
5508 ac_ext=c
5509 ac_cpp='$CPP $CPPFLAGS'
5510 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5511 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5512 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5513 if test -n "$ac_tool_prefix"; then
5514   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5515 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5517 $as_echo_n "checking for $ac_word... " >&6; }
5518 if test "${ac_cv_prog_CC+set}" = set; then :
5519   $as_echo_n "(cached) " >&6
5520 else
5521   if test -n "$CC"; then
5522   ac_cv_prog_CC="$CC" # Let the user override the test.
5523 else
5524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5525 for as_dir in $PATH
5526 do
5527   IFS=$as_save_IFS
5528   test -z "$as_dir" && as_dir=.
5529     for ac_exec_ext in '' $ac_executable_extensions; do
5530   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5531     ac_cv_prog_CC="${ac_tool_prefix}gcc"
5532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5533     break 2
5534   fi
5535 done
5536   done
5537 IFS=$as_save_IFS
5538
5539 fi
5540 fi
5541 CC=$ac_cv_prog_CC
5542 if test -n "$CC"; then
5543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5544 $as_echo "$CC" >&6; }
5545 else
5546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5547 $as_echo "no" >&6; }
5548 fi
5549
5550
5551 fi
5552 if test -z "$ac_cv_prog_CC"; then
5553   ac_ct_CC=$CC
5554   # Extract the first word of "gcc", so it can be a program name with args.
5555 set dummy gcc; ac_word=$2
5556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5557 $as_echo_n "checking for $ac_word... " >&6; }
5558 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5559   $as_echo_n "(cached) " >&6
5560 else
5561   if test -n "$ac_ct_CC"; then
5562   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5563 else
5564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5565 for as_dir in $PATH
5566 do
5567   IFS=$as_save_IFS
5568   test -z "$as_dir" && as_dir=.
5569     for ac_exec_ext in '' $ac_executable_extensions; do
5570   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5571     ac_cv_prog_ac_ct_CC="gcc"
5572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5573     break 2
5574   fi
5575 done
5576   done
5577 IFS=$as_save_IFS
5578
5579 fi
5580 fi
5581 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5582 if test -n "$ac_ct_CC"; then
5583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5584 $as_echo "$ac_ct_CC" >&6; }
5585 else
5586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5587 $as_echo "no" >&6; }
5588 fi
5589
5590   if test "x$ac_ct_CC" = x; then
5591     CC=""
5592   else
5593     case $cross_compiling:$ac_tool_warned in
5594 yes:)
5595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5596 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5597 ac_tool_warned=yes ;;
5598 esac
5599     CC=$ac_ct_CC
5600   fi
5601 else
5602   CC="$ac_cv_prog_CC"
5603 fi
5604
5605 if test -z "$CC"; then
5606           if test -n "$ac_tool_prefix"; then
5607     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5608 set dummy ${ac_tool_prefix}cc; ac_word=$2
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5610 $as_echo_n "checking for $ac_word... " >&6; }
5611 if test "${ac_cv_prog_CC+set}" = set; then :
5612   $as_echo_n "(cached) " >&6
5613 else
5614   if test -n "$CC"; then
5615   ac_cv_prog_CC="$CC" # Let the user override the test.
5616 else
5617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5618 for as_dir in $PATH
5619 do
5620   IFS=$as_save_IFS
5621   test -z "$as_dir" && as_dir=.
5622     for ac_exec_ext in '' $ac_executable_extensions; do
5623   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5624     ac_cv_prog_CC="${ac_tool_prefix}cc"
5625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5626     break 2
5627   fi
5628 done
5629   done
5630 IFS=$as_save_IFS
5631
5632 fi
5633 fi
5634 CC=$ac_cv_prog_CC
5635 if test -n "$CC"; then
5636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5637 $as_echo "$CC" >&6; }
5638 else
5639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5640 $as_echo "no" >&6; }
5641 fi
5642
5643
5644   fi
5645 fi
5646 if test -z "$CC"; then
5647   # Extract the first word of "cc", so it can be a program name with args.
5648 set dummy cc; ac_word=$2
5649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5650 $as_echo_n "checking for $ac_word... " >&6; }
5651 if test "${ac_cv_prog_CC+set}" = set; then :
5652   $as_echo_n "(cached) " >&6
5653 else
5654   if test -n "$CC"; then
5655   ac_cv_prog_CC="$CC" # Let the user override the test.
5656 else
5657   ac_prog_rejected=no
5658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5659 for as_dir in $PATH
5660 do
5661   IFS=$as_save_IFS
5662   test -z "$as_dir" && as_dir=.
5663     for ac_exec_ext in '' $ac_executable_extensions; do
5664   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5665     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5666        ac_prog_rejected=yes
5667        continue
5668      fi
5669     ac_cv_prog_CC="cc"
5670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5671     break 2
5672   fi
5673 done
5674   done
5675 IFS=$as_save_IFS
5676
5677 if test $ac_prog_rejected = yes; then
5678   # We found a bogon in the path, so make sure we never use it.
5679   set dummy $ac_cv_prog_CC
5680   shift
5681   if test $# != 0; then
5682     # We chose a different compiler from the bogus one.
5683     # However, it has the same basename, so the bogon will be chosen
5684     # first if we set CC to just the basename; use the full file name.
5685     shift
5686     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5687   fi
5688 fi
5689 fi
5690 fi
5691 CC=$ac_cv_prog_CC
5692 if test -n "$CC"; then
5693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5694 $as_echo "$CC" >&6; }
5695 else
5696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697 $as_echo "no" >&6; }
5698 fi
5699
5700
5701 fi
5702 if test -z "$CC"; then
5703   if test -n "$ac_tool_prefix"; then
5704   for ac_prog in cl.exe
5705   do
5706     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5707 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5709 $as_echo_n "checking for $ac_word... " >&6; }
5710 if test "${ac_cv_prog_CC+set}" = set; then :
5711   $as_echo_n "(cached) " >&6
5712 else
5713   if test -n "$CC"; then
5714   ac_cv_prog_CC="$CC" # Let the user override the test.
5715 else
5716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5717 for as_dir in $PATH
5718 do
5719   IFS=$as_save_IFS
5720   test -z "$as_dir" && as_dir=.
5721     for ac_exec_ext in '' $ac_executable_extensions; do
5722   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5723     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5725     break 2
5726   fi
5727 done
5728   done
5729 IFS=$as_save_IFS
5730
5731 fi
5732 fi
5733 CC=$ac_cv_prog_CC
5734 if test -n "$CC"; then
5735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5736 $as_echo "$CC" >&6; }
5737 else
5738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5739 $as_echo "no" >&6; }
5740 fi
5741
5742
5743     test -n "$CC" && break
5744   done
5745 fi
5746 if test -z "$CC"; then
5747   ac_ct_CC=$CC
5748   for ac_prog in cl.exe
5749 do
5750   # Extract the first word of "$ac_prog", so it can be a program name with args.
5751 set dummy $ac_prog; ac_word=$2
5752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5753 $as_echo_n "checking for $ac_word... " >&6; }
5754 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5755   $as_echo_n "(cached) " >&6
5756 else
5757   if test -n "$ac_ct_CC"; then
5758   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5759 else
5760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5761 for as_dir in $PATH
5762 do
5763   IFS=$as_save_IFS
5764   test -z "$as_dir" && as_dir=.
5765     for ac_exec_ext in '' $ac_executable_extensions; do
5766   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5767     ac_cv_prog_ac_ct_CC="$ac_prog"
5768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5769     break 2
5770   fi
5771 done
5772   done
5773 IFS=$as_save_IFS
5774
5775 fi
5776 fi
5777 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5778 if test -n "$ac_ct_CC"; then
5779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5780 $as_echo "$ac_ct_CC" >&6; }
5781 else
5782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5783 $as_echo "no" >&6; }
5784 fi
5785
5786
5787   test -n "$ac_ct_CC" && break
5788 done
5789
5790   if test "x$ac_ct_CC" = x; then
5791     CC=""
5792   else
5793     case $cross_compiling:$ac_tool_warned in
5794 yes:)
5795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5796 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5797 ac_tool_warned=yes ;;
5798 esac
5799     CC=$ac_ct_CC
5800   fi
5801 fi
5802
5803 fi
5804
5805
5806 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5807 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5808 as_fn_error "no acceptable C compiler found in \$PATH
5809 See \`config.log' for more details." "$LINENO" 5; }
5810
5811 # Provide some information about the compiler.
5812 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5813 set X $ac_compile
5814 ac_compiler=$2
5815 for ac_option in --version -v -V -qversion; do
5816   { { ac_try="$ac_compiler $ac_option >&5"
5817 case "(($ac_try" in
5818   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5819   *) ac_try_echo=$ac_try;;
5820 esac
5821 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5822 $as_echo "$ac_try_echo"; } >&5
5823   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5824   ac_status=$?
5825   if test -s conftest.err; then
5826     sed '10a\
5827 ... rest of stderr output deleted ...
5828          10q' conftest.err >conftest.er1
5829     cat conftest.er1 >&5
5830   fi
5831   rm -f conftest.er1 conftest.err
5832   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5833   test $ac_status = 0; }
5834 done
5835
5836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5837 /* end confdefs.h.  */
5838
5839 int
5840 main ()
5841 {
5842
5843   ;
5844   return 0;
5845 }
5846 _ACEOF
5847 ac_clean_files_save=$ac_clean_files
5848 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5849 # Try to create an executable without -o first, disregard a.out.
5850 # It will help us diagnose broken compilers, and finding out an intuition
5851 # of exeext.
5852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5853 $as_echo_n "checking whether the C compiler works... " >&6; }
5854 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5855
5856 # The possible output files:
5857 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5858
5859 ac_rmfiles=
5860 for ac_file in $ac_files
5861 do
5862   case $ac_file in
5863     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5864     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5865   esac
5866 done
5867 rm -f $ac_rmfiles
5868
5869 if { { ac_try="$ac_link_default"
5870 case "(($ac_try" in
5871   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5872   *) ac_try_echo=$ac_try;;
5873 esac
5874 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5875 $as_echo "$ac_try_echo"; } >&5
5876   (eval "$ac_link_default") 2>&5
5877   ac_status=$?
5878   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5879   test $ac_status = 0; }; then :
5880   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5881 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5882 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
5883 # so that the user can short-circuit this test for compilers unknown to
5884 # Autoconf.
5885 for ac_file in $ac_files ''
5886 do
5887   test -f "$ac_file" || continue
5888   case $ac_file in
5889     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5890         ;;
5891     [ab].out )
5892         # We found the default executable, but exeext='' is most
5893         # certainly right.
5894         break;;
5895     *.* )
5896         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5897         then :; else
5898            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5899         fi
5900         # We set ac_cv_exeext here because the later test for it is not
5901         # safe: cross compilers may not add the suffix if given an `-o'
5902         # argument, so we may need to know it at that point already.
5903         # Even if this section looks crufty: it has the advantage of
5904         # actually working.
5905         break;;
5906     * )
5907         break;;
5908   esac
5909 done
5910 test "$ac_cv_exeext" = no && ac_cv_exeext=
5911
5912 else
5913   ac_file=''
5914 fi
5915 if test -z "$ac_file"; then :
5916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5917 $as_echo "no" >&6; }
5918 $as_echo "$as_me: failed program was:" >&5
5919 sed 's/^/| /' conftest.$ac_ext >&5
5920
5921 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5922 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5923 { as_fn_set_status 77
5924 as_fn_error "C compiler cannot create executables
5925 See \`config.log' for more details." "$LINENO" 5; }; }
5926 else
5927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5928 $as_echo "yes" >&6; }
5929 fi
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5931 $as_echo_n "checking for C compiler default output file name... " >&6; }
5932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5933 $as_echo "$ac_file" >&6; }
5934 ac_exeext=$ac_cv_exeext
5935
5936 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5937 ac_clean_files=$ac_clean_files_save
5938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5939 $as_echo_n "checking for suffix of executables... " >&6; }
5940 if { { ac_try="$ac_link"
5941 case "(($ac_try" in
5942   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5943   *) ac_try_echo=$ac_try;;
5944 esac
5945 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5946 $as_echo "$ac_try_echo"; } >&5
5947   (eval "$ac_link") 2>&5
5948   ac_status=$?
5949   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5950   test $ac_status = 0; }; then :
5951   # If both `conftest.exe' and `conftest' are `present' (well, observable)
5952 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5953 # work properly (i.e., refer to `conftest.exe'), while it won't with
5954 # `rm'.
5955 for ac_file in conftest.exe conftest conftest.*; do
5956   test -f "$ac_file" || continue
5957   case $ac_file in
5958     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5959     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5960           break;;
5961     * ) break;;
5962   esac
5963 done
5964 else
5965   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5966 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5967 as_fn_error "cannot compute suffix of executables: cannot compile and link
5968 See \`config.log' for more details." "$LINENO" 5; }
5969 fi
5970 rm -f conftest conftest$ac_cv_exeext
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5972 $as_echo "$ac_cv_exeext" >&6; }
5973
5974 rm -f conftest.$ac_ext
5975 EXEEXT=$ac_cv_exeext
5976 ac_exeext=$EXEEXT
5977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5978 /* end confdefs.h.  */
5979 #include <stdio.h>
5980 int
5981 main ()
5982 {
5983 FILE *f = fopen ("conftest.out", "w");
5984  return ferror (f) || fclose (f) != 0;
5985
5986   ;
5987   return 0;
5988 }
5989 _ACEOF
5990 ac_clean_files="$ac_clean_files conftest.out"
5991 # Check that the compiler produces executables we can run.  If not, either
5992 # the compiler is broken, or we cross compile.
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5994 $as_echo_n "checking whether we are cross compiling... " >&6; }
5995 if test "$cross_compiling" != yes; then
5996   { { ac_try="$ac_link"
5997 case "(($ac_try" in
5998   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5999   *) ac_try_echo=$ac_try;;
6000 esac
6001 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6002 $as_echo "$ac_try_echo"; } >&5
6003   (eval "$ac_link") 2>&5
6004   ac_status=$?
6005   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6006   test $ac_status = 0; }
6007   if { ac_try='./conftest$ac_cv_exeext'
6008   { { case "(($ac_try" in
6009   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6010   *) ac_try_echo=$ac_try;;
6011 esac
6012 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6013 $as_echo "$ac_try_echo"; } >&5
6014   (eval "$ac_try") 2>&5
6015   ac_status=$?
6016   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6017   test $ac_status = 0; }; }; then
6018     cross_compiling=no
6019   else
6020     if test "$cross_compiling" = maybe; then
6021         cross_compiling=yes
6022     else
6023         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6024 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6025 as_fn_error "cannot run C compiled programs.
6026 If you meant to cross compile, use \`--host'.
6027 See \`config.log' for more details." "$LINENO" 5; }
6028     fi
6029   fi
6030 fi
6031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
6032 $as_echo "$cross_compiling" >&6; }
6033
6034 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
6035 ac_clean_files=$ac_clean_files_save
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
6037 $as_echo_n "checking for suffix of object files... " >&6; }
6038 if test "${ac_cv_objext+set}" = set; then :
6039   $as_echo_n "(cached) " >&6
6040 else
6041   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6042 /* end confdefs.h.  */
6043
6044 int
6045 main ()
6046 {
6047
6048   ;
6049   return 0;
6050 }
6051 _ACEOF
6052 rm -f conftest.o conftest.obj
6053 if { { ac_try="$ac_compile"
6054 case "(($ac_try" in
6055   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6056   *) ac_try_echo=$ac_try;;
6057 esac
6058 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6059 $as_echo "$ac_try_echo"; } >&5
6060   (eval "$ac_compile") 2>&5
6061   ac_status=$?
6062   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6063   test $ac_status = 0; }; then :
6064   for ac_file in conftest.o conftest.obj conftest.*; do
6065   test -f "$ac_file" || continue;
6066   case $ac_file in
6067     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
6068     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
6069        break;;
6070   esac
6071 done
6072 else
6073   $as_echo "$as_me: failed program was:" >&5
6074 sed 's/^/| /' conftest.$ac_ext >&5
6075
6076 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6077 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6078 as_fn_error "cannot compute suffix of object files: cannot compile
6079 See \`config.log' for more details." "$LINENO" 5; }
6080 fi
6081 rm -f conftest.$ac_cv_objext conftest.$ac_ext
6082 fi
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
6084 $as_echo "$ac_cv_objext" >&6; }
6085 OBJEXT=$ac_cv_objext
6086 ac_objext=$OBJEXT
6087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6088 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6089 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
6090   $as_echo_n "(cached) " >&6
6091 else
6092   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6093 /* end confdefs.h.  */
6094
6095 int
6096 main ()
6097 {
6098 #ifndef __GNUC__
6099        choke me
6100 #endif
6101
6102   ;
6103   return 0;
6104 }
6105 _ACEOF
6106 if ac_fn_c_try_compile "$LINENO"; then :
6107   ac_compiler_gnu=yes
6108 else
6109   ac_compiler_gnu=no
6110 fi
6111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6112 ac_cv_c_compiler_gnu=$ac_compiler_gnu
6113
6114 fi
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6116 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
6117 if test $ac_compiler_gnu = yes; then
6118   GCC=yes
6119 else
6120   GCC=
6121 fi
6122 ac_test_CFLAGS=${CFLAGS+set}
6123 ac_save_CFLAGS=$CFLAGS
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6125 $as_echo_n "checking whether $CC accepts -g... " >&6; }
6126 if test "${ac_cv_prog_cc_g+set}" = set; then :
6127   $as_echo_n "(cached) " >&6
6128 else
6129   ac_save_c_werror_flag=$ac_c_werror_flag
6130    ac_c_werror_flag=yes
6131    ac_cv_prog_cc_g=no
6132    CFLAGS="-g"
6133    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6134 /* end confdefs.h.  */
6135
6136 int
6137 main ()
6138 {
6139
6140   ;
6141   return 0;
6142 }
6143 _ACEOF
6144 if ac_fn_c_try_compile "$LINENO"; then :
6145   ac_cv_prog_cc_g=yes
6146 else
6147   CFLAGS=""
6148       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6149 /* end confdefs.h.  */
6150
6151 int
6152 main ()
6153 {
6154
6155   ;
6156   return 0;
6157 }
6158 _ACEOF
6159 if ac_fn_c_try_compile "$LINENO"; then :
6160
6161 else
6162   ac_c_werror_flag=$ac_save_c_werror_flag
6163          CFLAGS="-g"
6164          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6165 /* end confdefs.h.  */
6166
6167 int
6168 main ()
6169 {
6170
6171   ;
6172   return 0;
6173 }
6174 _ACEOF
6175 if ac_fn_c_try_compile "$LINENO"; then :
6176   ac_cv_prog_cc_g=yes
6177 fi
6178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6179 fi
6180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6181 fi
6182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6183    ac_c_werror_flag=$ac_save_c_werror_flag
6184 fi
6185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6186 $as_echo "$ac_cv_prog_cc_g" >&6; }
6187 if test "$ac_test_CFLAGS" = set; then
6188   CFLAGS=$ac_save_CFLAGS
6189 elif test $ac_cv_prog_cc_g = yes; then
6190   if test "$GCC" = yes; then
6191     CFLAGS="-g -O2"
6192   else
6193     CFLAGS="-g"
6194   fi
6195 else
6196   if test "$GCC" = yes; then
6197     CFLAGS="-O2"
6198   else
6199     CFLAGS=
6200   fi
6201 fi
6202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6203 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6204 if test "${ac_cv_prog_cc_c89+set}" = set; then :
6205   $as_echo_n "(cached) " >&6
6206 else
6207   ac_cv_prog_cc_c89=no
6208 ac_save_CC=$CC
6209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6210 /* end confdefs.h.  */
6211 #include <stdarg.h>
6212 #include <stdio.h>
6213 #include <sys/types.h>
6214 #include <sys/stat.h>
6215 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6216 struct buf { int x; };
6217 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6218 static char *e (p, i)
6219      char **p;
6220      int i;
6221 {
6222   return p[i];
6223 }
6224 static char *f (char * (*g) (char **, int), char **p, ...)
6225 {
6226   char *s;
6227   va_list v;
6228   va_start (v,p);
6229   s = g (p, va_arg (v,int));
6230   va_end (v);
6231   return s;
6232 }
6233
6234 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6235    function prototypes and stuff, but not '\xHH' hex character constants.
6236    These don't provoke an error unfortunately, instead are silently treated
6237    as 'x'.  The following induces an error, until -std is added to get
6238    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6239    array size at least.  It's necessary to write '\x00'==0 to get something
6240    that's true only with -std.  */
6241 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6242
6243 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6244    inside strings and character constants.  */
6245 #define FOO(x) 'x'
6246 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6247
6248 int test (int i, double x);
6249 struct s1 {int (*f) (int a);};
6250 struct s2 {int (*f) (double a);};
6251 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6252 int argc;
6253 char **argv;
6254 int
6255 main ()
6256 {
6257 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6258   ;
6259   return 0;
6260 }
6261 _ACEOF
6262 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6263         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6264 do
6265   CC="$ac_save_CC $ac_arg"
6266   if ac_fn_c_try_compile "$LINENO"; then :
6267   ac_cv_prog_cc_c89=$ac_arg
6268 fi
6269 rm -f core conftest.err conftest.$ac_objext
6270   test "x$ac_cv_prog_cc_c89" != "xno" && break
6271 done
6272 rm -f conftest.$ac_ext
6273 CC=$ac_save_CC
6274
6275 fi
6276 # AC_CACHE_VAL
6277 case "x$ac_cv_prog_cc_c89" in
6278   x)
6279     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6280 $as_echo "none needed" >&6; } ;;
6281   xno)
6282     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6283 $as_echo "unsupported" >&6; } ;;
6284   *)
6285     CC="$CC $ac_cv_prog_cc_c89"
6286     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6287 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6288 esac
6289 if test "x$ac_cv_prog_cc_c89" != xno; then :
6290
6291 fi
6292
6293 ac_ext=c
6294 ac_cpp='$CPP $CPPFLAGS'
6295 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6296 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6297 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6298
6299 depcc="$CC"   am_compiler_list=
6300
6301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6302 $as_echo_n "checking dependency style of $depcc... " >&6; }
6303 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
6304   $as_echo_n "(cached) " >&6
6305 else
6306   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6307   # We make a subdir and do the tests there.  Otherwise we can end up
6308   # making bogus files that we don't know about and never remove.  For
6309   # instance it was reported that on HP-UX the gcc test will end up
6310   # making a dummy file named `D' -- because `-MD' means `put the output
6311   # in D'.
6312   mkdir conftest.dir
6313   # Copy depcomp to subdir because otherwise we won't find it if we're
6314   # using a relative directory.
6315   cp "$am_depcomp" conftest.dir
6316   cd conftest.dir
6317   # We will build objects and dependencies in a subdirectory because
6318   # it helps to detect inapplicable dependency modes.  For instance
6319   # both Tru64's cc and ICC support -MD to output dependencies as a
6320   # side effect of compilation, but ICC will put the dependencies in
6321   # the current directory while Tru64 will put them in the object
6322   # directory.
6323   mkdir sub
6324
6325   am_cv_CC_dependencies_compiler_type=none
6326   if test "$am_compiler_list" = ""; then
6327      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6328   fi
6329   for depmode in $am_compiler_list; do
6330     # Setup a source with many dependencies, because some compilers
6331     # like to wrap large dependency lists on column 80 (with \), and
6332     # we should not choose a depcomp mode which is confused by this.
6333     #
6334     # We need to recreate these files for each test, as the compiler may
6335     # overwrite some of them when testing with obscure command lines.
6336     # This happens at least with the AIX C compiler.
6337     : > sub/conftest.c
6338     for i in 1 2 3 4 5 6; do
6339       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6340       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6341       # Solaris 8's {/usr,}/bin/sh.
6342       touch sub/conftst$i.h
6343     done
6344     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6345
6346     case $depmode in
6347     nosideeffect)
6348       # after this tag, mechanisms are not by side-effect, so they'll
6349       # only be used when explicitly requested
6350       if test "x$enable_dependency_tracking" = xyes; then
6351         continue
6352       else
6353         break
6354       fi
6355       ;;
6356     none) break ;;
6357     esac
6358     # We check with `-c' and `-o' for the sake of the "dashmstdout"
6359     # mode.  It turns out that the SunPro C++ compiler does not properly
6360     # handle `-M -o', and we need to detect this.
6361     if depmode=$depmode \
6362        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6363        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6364        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6365          >/dev/null 2>conftest.err &&
6366        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6367        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6368        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6369       # icc doesn't choke on unknown options, it will just issue warnings
6370       # or remarks (even with -Werror).  So we grep stderr for any message
6371       # that says an option was ignored or not supported.
6372       # When given -MP, icc 7.0 and 7.1 complain thusly:
6373       #   icc: Command line warning: ignoring option '-M'; no argument required
6374       # The diagnosis changed in icc 8.0:
6375       #   icc: Command line remark: option '-MP' not supported
6376       if (grep 'ignoring option' conftest.err ||
6377           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6378         am_cv_CC_dependencies_compiler_type=$depmode
6379         break
6380       fi
6381     fi
6382   done
6383
6384   cd ..
6385   rm -rf conftest.dir
6386 else
6387   am_cv_CC_dependencies_compiler_type=none
6388 fi
6389
6390 fi
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6392 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6393 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6394
6395
6396
6397 if
6398   test "x$enable_dependency_tracking" != xno \
6399   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6400   am__fastdepCC_TRUE=
6401   am__fastdepCC_FALSE='#'
6402 else
6403   am__fastdepCC_TRUE='#'
6404   am__fastdepCC_FALSE=
6405 fi
6406
6407
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6409 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6410 if test "${lt_cv_path_SED+set}" = set; then :
6411   $as_echo_n "(cached) " >&6
6412 else
6413   # Loop through the user's path and test for sed and gsed.
6414 # Then use that list of sed's as ones to test for truncation.
6415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6416 for as_dir in $PATH
6417 do
6418   IFS=$as_save_IFS
6419   test -z "$as_dir" && as_dir=.
6420   for lt_ac_prog in sed gsed; do
6421     for ac_exec_ext in '' $ac_executable_extensions; do
6422       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6423         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6424       fi
6425     done
6426   done
6427 done
6428 lt_ac_max=0
6429 lt_ac_count=0
6430 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6431 # along with /bin/sed that truncates output.
6432 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6433   test ! -f $lt_ac_sed && continue
6434   cat /dev/null > conftest.in
6435   lt_ac_count=0
6436   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6437   # Check for GNU sed and select it if it is found.
6438   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6439     lt_cv_path_SED=$lt_ac_sed
6440     break
6441   fi
6442   while true; do
6443     cat conftest.in conftest.in >conftest.tmp
6444     mv conftest.tmp conftest.in
6445     cp conftest.in conftest.nl
6446     echo >>conftest.nl
6447     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6448     cmp -s conftest.out conftest.nl || break
6449     # 10000 chars as input seems more than enough
6450     test $lt_ac_count -gt 10 && break
6451     lt_ac_count=`expr $lt_ac_count + 1`
6452     if test $lt_ac_count -gt $lt_ac_max; then
6453       lt_ac_max=$lt_ac_count
6454       lt_cv_path_SED=$lt_ac_sed
6455     fi
6456   done
6457 done
6458
6459 fi
6460
6461 SED=$lt_cv_path_SED
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
6463 $as_echo "$SED" >&6; }
6464
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6466 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6467 if test "${ac_cv_path_GREP+set}" = set; then :
6468   $as_echo_n "(cached) " >&6
6469 else
6470   if test -z "$GREP"; then
6471   ac_path_GREP_found=false
6472   # Loop through the user's path and test for each of PROGNAME-LIST
6473   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6474 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6475 do
6476   IFS=$as_save_IFS
6477   test -z "$as_dir" && as_dir=.
6478     for ac_prog in grep ggrep; do
6479     for ac_exec_ext in '' $ac_executable_extensions; do
6480       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6481       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6482 # Check for GNU ac_path_GREP and select it if it is found.
6483   # Check for GNU $ac_path_GREP
6484 case `"$ac_path_GREP" --version 2>&1` in
6485 *GNU*)
6486   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6487 *)
6488   ac_count=0
6489   $as_echo_n 0123456789 >"conftest.in"
6490   while :
6491   do
6492     cat "conftest.in" "conftest.in" >"conftest.tmp"
6493     mv "conftest.tmp" "conftest.in"
6494     cp "conftest.in" "conftest.nl"
6495     $as_echo 'GREP' >> "conftest.nl"
6496     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6497     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6498     as_fn_arith $ac_count + 1 && ac_count=$as_val
6499     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6500       # Best one so far, save it but keep looking for a better one
6501       ac_cv_path_GREP="$ac_path_GREP"
6502       ac_path_GREP_max=$ac_count
6503     fi
6504     # 10*(2^10) chars as input seems more than enough
6505     test $ac_count -gt 10 && break
6506   done
6507   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6508 esac
6509
6510       $ac_path_GREP_found && break 3
6511     done
6512   done
6513   done
6514 IFS=$as_save_IFS
6515   if test -z "$ac_cv_path_GREP"; then
6516     as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6517   fi
6518 else
6519   ac_cv_path_GREP=$GREP
6520 fi
6521
6522 fi
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6524 $as_echo "$ac_cv_path_GREP" >&6; }
6525  GREP="$ac_cv_path_GREP"
6526
6527
6528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6529 $as_echo_n "checking for egrep... " >&6; }
6530 if test "${ac_cv_path_EGREP+set}" = set; then :
6531   $as_echo_n "(cached) " >&6
6532 else
6533   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6534    then ac_cv_path_EGREP="$GREP -E"
6535    else
6536      if test -z "$EGREP"; then
6537   ac_path_EGREP_found=false
6538   # Loop through the user's path and test for each of PROGNAME-LIST
6539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6540 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6541 do
6542   IFS=$as_save_IFS
6543   test -z "$as_dir" && as_dir=.
6544     for ac_prog in egrep; do
6545     for ac_exec_ext in '' $ac_executable_extensions; do
6546       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6547       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6548 # Check for GNU ac_path_EGREP and select it if it is found.
6549   # Check for GNU $ac_path_EGREP
6550 case `"$ac_path_EGREP" --version 2>&1` in
6551 *GNU*)
6552   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6553 *)
6554   ac_count=0
6555   $as_echo_n 0123456789 >"conftest.in"
6556   while :
6557   do
6558     cat "conftest.in" "conftest.in" >"conftest.tmp"
6559     mv "conftest.tmp" "conftest.in"
6560     cp "conftest.in" "conftest.nl"
6561     $as_echo 'EGREP' >> "conftest.nl"
6562     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6563     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6564     as_fn_arith $ac_count + 1 && ac_count=$as_val
6565     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6566       # Best one so far, save it but keep looking for a better one
6567       ac_cv_path_EGREP="$ac_path_EGREP"
6568       ac_path_EGREP_max=$ac_count
6569     fi
6570     # 10*(2^10) chars as input seems more than enough
6571     test $ac_count -gt 10 && break
6572   done
6573   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6574 esac
6575
6576       $ac_path_EGREP_found && break 3
6577     done
6578   done
6579   done
6580 IFS=$as_save_IFS
6581   if test -z "$ac_cv_path_EGREP"; then
6582     as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6583   fi
6584 else
6585   ac_cv_path_EGREP=$EGREP
6586 fi
6587
6588    fi
6589 fi
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6591 $as_echo "$ac_cv_path_EGREP" >&6; }
6592  EGREP="$ac_cv_path_EGREP"
6593
6594
6595
6596 # Check whether --with-gnu-ld was given.
6597 if test "${with_gnu_ld+set}" = set; then :
6598   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6599 else
6600   with_gnu_ld=no
6601 fi
6602
6603 ac_prog=ld
6604 if test "$GCC" = yes; then
6605   # Check if gcc -print-prog-name=ld gives a path.
6606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
6607 $as_echo_n "checking for ld used by $CC... " >&6; }
6608   case $host in
6609   *-*-mingw*)
6610     # gcc leaves a trailing carriage return which upsets mingw
6611     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6612   *)
6613     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6614   esac
6615   case $ac_prog in
6616     # Accept absolute paths.
6617     [\\/]* | ?:[\\/]*)
6618       re_direlt='/[^/][^/]*/\.\./'
6619       # Canonicalize the pathname of ld
6620       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
6621       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6622         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
6623       done
6624       test -z "$LD" && LD="$ac_prog"
6625       ;;
6626   "")
6627     # If it fails, then pretend we aren't using GCC.
6628     ac_prog=ld
6629     ;;
6630   *)
6631     # If it is relative, then search for the first ld in PATH.
6632     with_gnu_ld=unknown
6633     ;;
6634   esac
6635 elif test "$with_gnu_ld" = yes; then
6636   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6637 $as_echo_n "checking for GNU ld... " >&6; }
6638 else
6639   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6640 $as_echo_n "checking for non-GNU ld... " >&6; }
6641 fi
6642 if test "${lt_cv_path_LD+set}" = set; then :
6643   $as_echo_n "(cached) " >&6
6644 else
6645   if test -z "$LD"; then
6646   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6647   for ac_dir in $PATH; do
6648     IFS="$lt_save_ifs"
6649     test -z "$ac_dir" && ac_dir=.
6650     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6651       lt_cv_path_LD="$ac_dir/$ac_prog"
6652       # Check to see if the program is GNU ld.  I'd rather use --version,
6653       # but apparently some variants of GNU ld only accept -v.
6654       # Break only if it was the GNU/non-GNU ld that we prefer.
6655       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6656       *GNU* | *'with BFD'*)
6657         test "$with_gnu_ld" != no && break
6658         ;;
6659       *)
6660         test "$with_gnu_ld" != yes && break
6661         ;;
6662       esac
6663     fi
6664   done
6665   IFS="$lt_save_ifs"
6666 else
6667   lt_cv_path_LD="$LD" # Let the user override the test with a path.
6668 fi
6669 fi
6670
6671 LD="$lt_cv_path_LD"
6672 if test -n "$LD"; then
6673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6674 $as_echo "$LD" >&6; }
6675 else
6676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677 $as_echo "no" >&6; }
6678 fi
6679 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
6680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6681 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6682 if test "${lt_cv_prog_gnu_ld+set}" = set; then :
6683   $as_echo_n "(cached) " >&6
6684 else
6685   # I'd rather use --version here, but apparently some GNU lds only accept -v.
6686 case `$LD -v 2>&1 </dev/null` in
6687 *GNU* | *'with BFD'*)
6688   lt_cv_prog_gnu_ld=yes
6689   ;;
6690 *)
6691   lt_cv_prog_gnu_ld=no
6692   ;;
6693 esac
6694 fi
6695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
6696 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
6697 with_gnu_ld=$lt_cv_prog_gnu_ld
6698
6699
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6701 $as_echo_n "checking for $LD option to reload object files... " >&6; }
6702 if test "${lt_cv_ld_reload_flag+set}" = set; then :
6703   $as_echo_n "(cached) " >&6
6704 else
6705   lt_cv_ld_reload_flag='-r'
6706 fi
6707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6708 $as_echo "$lt_cv_ld_reload_flag" >&6; }
6709 reload_flag=$lt_cv_ld_reload_flag
6710 case $reload_flag in
6711 "" | " "*) ;;
6712 *) reload_flag=" $reload_flag" ;;
6713 esac
6714 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6715 case $host_os in
6716   darwin*)
6717     if test "$GCC" = yes; then
6718       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
6719     else
6720       reload_cmds='$LD$reload_flag -o $output$reload_objs'
6721     fi
6722     ;;
6723 esac
6724
6725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5
6726 $as_echo_n "checking for BSD-compatible nm... " >&6; }
6727 if test "${lt_cv_path_NM+set}" = set; then :
6728   $as_echo_n "(cached) " >&6
6729 else
6730   if test -n "$NM"; then
6731   # Let the user override the test.
6732   lt_cv_path_NM="$NM"
6733 else
6734   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6735   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
6736     IFS="$lt_save_ifs"
6737     test -z "$ac_dir" && ac_dir=.
6738     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
6739     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6740       # Check to see if the nm accepts a BSD-compat flag.
6741       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
6742       #   nm: unknown option "B" ignored
6743       # Tru64's nm complains that /dev/null is an invalid object file
6744       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
6745       */dev/null* | *'Invalid file or object type'*)
6746         lt_cv_path_NM="$tmp_nm -B"
6747         break
6748         ;;
6749       *)
6750         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
6751         */dev/null*)
6752           lt_cv_path_NM="$tmp_nm -p"
6753           break
6754           ;;
6755         *)
6756           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6757           continue # so that we can try to find one that supports BSD flags
6758           ;;
6759         esac
6760       esac
6761     fi
6762   done
6763   IFS="$lt_save_ifs"
6764   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
6765 fi
6766 fi
6767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
6768 $as_echo "$lt_cv_path_NM" >&6; }
6769 NM="$lt_cv_path_NM"
6770
6771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6772 $as_echo_n "checking whether ln -s works... " >&6; }
6773 LN_S=$as_ln_s
6774 if test "$LN_S" = "ln -s"; then
6775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6776 $as_echo "yes" >&6; }
6777 else
6778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6779 $as_echo "no, using $LN_S" >&6; }
6780 fi
6781
6782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognise dependent libraries" >&5
6783 $as_echo_n "checking how to recognise dependent libraries... " >&6; }
6784 if test "${lt_cv_deplibs_check_method+set}" = set; then :
6785   $as_echo_n "(cached) " >&6
6786 else
6787   lt_cv_file_magic_cmd='$MAGIC_CMD'
6788 lt_cv_file_magic_test_file=
6789 lt_cv_deplibs_check_method='unknown'
6790 # Need to set the preceding variable on all platforms that support
6791 # interlibrary dependencies.
6792 # 'none' -- dependencies not supported.
6793 # `unknown' -- same as none, but documents that we really don't know.
6794 # 'pass_all' -- all dependencies passed with no checks.
6795 # 'test_compile' -- check by making test program.
6796 # 'file_magic [[regex]]' -- check by looking for files in library path
6797 # which responds to the $file_magic_cmd with a given extended regex.
6798 # If you have `file' or equivalent on your system and you're not sure
6799 # whether `pass_all' will *always* work, you probably want this one.
6800
6801 case $host_os in
6802 aix4* | aix5*)
6803   lt_cv_deplibs_check_method=pass_all
6804   ;;
6805
6806 beos*)
6807   lt_cv_deplibs_check_method=pass_all
6808   ;;
6809
6810 bsdi[45]*)
6811   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6812   lt_cv_file_magic_cmd='/usr/bin/file -L'
6813   lt_cv_file_magic_test_file=/shlib/libc.so
6814   ;;
6815
6816 cygwin*)
6817   # func_win32_libid is a shell function defined in ltmain.sh
6818   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6819   lt_cv_file_magic_cmd='func_win32_libid'
6820   ;;
6821
6822 mingw* | pw32*)
6823   # Base MSYS/MinGW do not provide the 'file' command needed by
6824   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
6825   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6826   lt_cv_file_magic_cmd='$OBJDUMP -f'
6827   ;;
6828
6829 darwin* | rhapsody*)
6830   lt_cv_deplibs_check_method=pass_all
6831   ;;
6832
6833 freebsd* | kfreebsd*-gnu | dragonfly*)
6834   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6835     case $host_cpu in
6836     i*86 )
6837       # Not sure whether the presence of OpenBSD here was a mistake.
6838       # Let's accept both of them until this is cleared up.
6839       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6840       lt_cv_file_magic_cmd=/usr/bin/file
6841       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6842       ;;
6843     esac
6844   else
6845     lt_cv_deplibs_check_method=pass_all
6846   fi
6847   ;;
6848
6849 gnu*)
6850   lt_cv_deplibs_check_method=pass_all
6851   ;;
6852
6853 hpux10.20* | hpux11*)
6854   lt_cv_file_magic_cmd=/usr/bin/file
6855   case $host_cpu in
6856   ia64*)
6857     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6858     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6859     ;;
6860   hppa*64*)
6861     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]'
6862     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6863     ;;
6864   *)
6865     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
6866     lt_cv_file_magic_test_file=/usr/lib/libc.sl
6867     ;;
6868   esac
6869   ;;
6870
6871 irix5* | irix6* | nonstopux*)
6872   case $LD in
6873   *-32|*"-32 ") libmagic=32-bit;;
6874   *-n32|*"-n32 ") libmagic=N32;;
6875   *-64|*"-64 ") libmagic=64-bit;;
6876   *) libmagic=never-match;;
6877   esac
6878   lt_cv_deplibs_check_method=pass_all
6879   ;;
6880
6881 # This must be Linux ELF.
6882 linux*)
6883   lt_cv_deplibs_check_method=pass_all
6884   ;;
6885
6886 netbsd*)
6887   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6888     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6889   else
6890     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6891   fi
6892   ;;
6893
6894 newos6*)
6895   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6896   lt_cv_file_magic_cmd=/usr/bin/file
6897   lt_cv_file_magic_test_file=/usr/lib/libnls.so
6898   ;;
6899
6900 nto-qnx*)
6901   lt_cv_deplibs_check_method=unknown
6902   ;;
6903
6904 openbsd*)
6905   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6906     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6907   else
6908     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6909   fi
6910   ;;
6911
6912 osf3* | osf4* | osf5*)
6913   lt_cv_deplibs_check_method=pass_all
6914   ;;
6915
6916 sco3.2v5*)
6917   lt_cv_deplibs_check_method=pass_all
6918   ;;
6919
6920 solaris*)
6921   lt_cv_deplibs_check_method=pass_all
6922   ;;
6923
6924 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6925   case $host_vendor in
6926   motorola)
6927     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]'
6928     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6929     ;;
6930   ncr)
6931     lt_cv_deplibs_check_method=pass_all
6932     ;;
6933   sequent)
6934     lt_cv_file_magic_cmd='/bin/file'
6935     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6936     ;;
6937   sni)
6938     lt_cv_file_magic_cmd='/bin/file'
6939     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6940     lt_cv_file_magic_test_file=/lib/libc.so
6941     ;;
6942   siemens)
6943     lt_cv_deplibs_check_method=pass_all
6944     ;;
6945   esac
6946   ;;
6947
6948 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
6949   lt_cv_deplibs_check_method=pass_all
6950   ;;
6951 esac
6952
6953 fi
6954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6955 $as_echo "$lt_cv_deplibs_check_method" >&6; }
6956 file_magic_cmd=$lt_cv_file_magic_cmd
6957 deplibs_check_method=$lt_cv_deplibs_check_method
6958 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6959
6960
6961
6962
6963 # If no C compiler was specified, use CC.
6964 LTCC=${LTCC-"$CC"}
6965
6966 # Allow CC to be a program name with arguments.
6967 compiler=$CC
6968
6969
6970 # Check whether --enable-libtool-lock was given.
6971 if test "${enable_libtool_lock+set}" = set; then :
6972   enableval=$enable_libtool_lock;
6973 fi
6974
6975 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6976
6977 # Some flags need to be propagated to the compiler or linker for good
6978 # libtool support.
6979 case $host in
6980 ia64-*-hpux*)
6981   # Find out which ABI we are using.
6982   echo 'int i;' > conftest.$ac_ext
6983   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6984   (eval $ac_compile) 2>&5
6985   ac_status=$?
6986   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6987   test $ac_status = 0; }; then
6988     case `/usr/bin/file conftest.$ac_objext` in
6989     *ELF-32*)
6990       HPUX_IA64_MODE="32"
6991       ;;
6992     *ELF-64*)
6993       HPUX_IA64_MODE="64"
6994       ;;
6995     esac
6996   fi
6997   rm -rf conftest*
6998   ;;
6999 *-*-irix6*)
7000   # Find out which ABI we are using.
7001   echo '#line 7001 "configure"' > conftest.$ac_ext
7002   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7003   (eval $ac_compile) 2>&5
7004   ac_status=$?
7005   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7006   test $ac_status = 0; }; then
7007    if test "$lt_cv_prog_gnu_ld" = yes; then
7008     case `/usr/bin/file conftest.$ac_objext` in
7009     *32-bit*)
7010       LD="${LD-ld} -melf32bsmip"
7011       ;;
7012     *N32*)
7013       LD="${LD-ld} -melf32bmipn32"
7014       ;;
7015     *64-bit*)
7016       LD="${LD-ld} -melf64bmip"
7017       ;;
7018     esac
7019    else
7020     case `/usr/bin/file conftest.$ac_objext` in
7021     *32-bit*)
7022       LD="${LD-ld} -32"
7023       ;;
7024     *N32*)
7025       LD="${LD-ld} -n32"
7026       ;;
7027     *64-bit*)
7028       LD="${LD-ld} -64"
7029       ;;
7030     esac
7031    fi
7032   fi
7033   rm -rf conftest*
7034   ;;
7035
7036 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
7037   # Find out which ABI we are using.
7038   echo 'int i;' > conftest.$ac_ext
7039   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7040   (eval $ac_compile) 2>&5
7041   ac_status=$?
7042   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7043   test $ac_status = 0; }; then
7044     case `/usr/bin/file conftest.o` in
7045     *32-bit*)
7046       case $host in
7047         x86_64-*linux*)
7048           LD="${LD-ld} -m elf_i386"
7049           ;;
7050         ppc64-*linux*|powerpc64-*linux*)
7051           LD="${LD-ld} -m elf32ppclinux"
7052           ;;
7053         s390x-*linux*)
7054           LD="${LD-ld} -m elf_s390"
7055           ;;
7056         sparc64-*linux*)
7057           LD="${LD-ld} -m elf32_sparc"
7058           ;;
7059       esac
7060       ;;
7061     *64-bit*)
7062       case $host in
7063         x86_64-*linux*)
7064           LD="${LD-ld} -m elf_x86_64"
7065           ;;
7066         ppc*-*linux*|powerpc*-*linux*)
7067           LD="${LD-ld} -m elf64ppc"
7068           ;;
7069         s390*-*linux*)
7070           LD="${LD-ld} -m elf64_s390"
7071           ;;
7072         sparc*-*linux*)
7073           LD="${LD-ld} -m elf64_sparc"
7074           ;;
7075       esac
7076       ;;
7077     esac
7078   fi
7079   rm -rf conftest*
7080   ;;
7081
7082 *-*-sco3.2v5*)
7083   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
7084   SAVE_CFLAGS="$CFLAGS"
7085   CFLAGS="$CFLAGS -belf"
7086   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
7087 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
7088 if test "${lt_cv_cc_needs_belf+set}" = set; then :
7089   $as_echo_n "(cached) " >&6
7090 else
7091   ac_ext=c
7092 ac_cpp='$CPP $CPPFLAGS'
7093 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7094 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7095 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7096
7097      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7098 /* end confdefs.h.  */
7099
7100 int
7101 main ()
7102 {
7103
7104   ;
7105   return 0;
7106 }
7107 _ACEOF
7108 if ac_fn_c_try_link "$LINENO"; then :
7109   lt_cv_cc_needs_belf=yes
7110 else
7111   lt_cv_cc_needs_belf=no
7112 fi
7113 rm -f core conftest.err conftest.$ac_objext \
7114     conftest$ac_exeext conftest.$ac_ext
7115      ac_ext=c
7116 ac_cpp='$CPP $CPPFLAGS'
7117 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7118 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7119 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7120
7121 fi
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7123 $as_echo "$lt_cv_cc_needs_belf" >&6; }
7124   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7125     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7126     CFLAGS="$SAVE_CFLAGS"
7127   fi
7128   ;;
7129 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
7130   if test -n "$ac_tool_prefix"; then
7131   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7132 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7134 $as_echo_n "checking for $ac_word... " >&6; }
7135 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7136   $as_echo_n "(cached) " >&6
7137 else
7138   if test -n "$DLLTOOL"; then
7139   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7140 else
7141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7142 for as_dir in $PATH
7143 do
7144   IFS=$as_save_IFS
7145   test -z "$as_dir" && as_dir=.
7146     for ac_exec_ext in '' $ac_executable_extensions; do
7147   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7148     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7150     break 2
7151   fi
7152 done
7153   done
7154 IFS=$as_save_IFS
7155
7156 fi
7157 fi
7158 DLLTOOL=$ac_cv_prog_DLLTOOL
7159 if test -n "$DLLTOOL"; then
7160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7161 $as_echo "$DLLTOOL" >&6; }
7162 else
7163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7164 $as_echo "no" >&6; }
7165 fi
7166
7167
7168 fi
7169 if test -z "$ac_cv_prog_DLLTOOL"; then
7170   ac_ct_DLLTOOL=$DLLTOOL
7171   # Extract the first word of "dlltool", so it can be a program name with args.
7172 set dummy dlltool; ac_word=$2
7173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7174 $as_echo_n "checking for $ac_word... " >&6; }
7175 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7176   $as_echo_n "(cached) " >&6
7177 else
7178   if test -n "$ac_ct_DLLTOOL"; then
7179   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7180 else
7181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7182 for as_dir in $PATH
7183 do
7184   IFS=$as_save_IFS
7185   test -z "$as_dir" && as_dir=.
7186     for ac_exec_ext in '' $ac_executable_extensions; do
7187   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7188     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7190     break 2
7191   fi
7192 done
7193   done
7194 IFS=$as_save_IFS
7195
7196 fi
7197 fi
7198 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7199 if test -n "$ac_ct_DLLTOOL"; then
7200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7201 $as_echo "$ac_ct_DLLTOOL" >&6; }
7202 else
7203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7204 $as_echo "no" >&6; }
7205 fi
7206
7207   if test "x$ac_ct_DLLTOOL" = x; then
7208     DLLTOOL="false"
7209   else
7210     case $cross_compiling:$ac_tool_warned in
7211 yes:)
7212 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7213 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7214 ac_tool_warned=yes ;;
7215 esac
7216     DLLTOOL=$ac_ct_DLLTOOL
7217   fi
7218 else
7219   DLLTOOL="$ac_cv_prog_DLLTOOL"
7220 fi
7221
7222   if test -n "$ac_tool_prefix"; then
7223   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
7224 set dummy ${ac_tool_prefix}as; ac_word=$2
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7226 $as_echo_n "checking for $ac_word... " >&6; }
7227 if test "${ac_cv_prog_AS+set}" = set; then :
7228   $as_echo_n "(cached) " >&6
7229 else
7230   if test -n "$AS"; then
7231   ac_cv_prog_AS="$AS" # Let the user override the test.
7232 else
7233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7234 for as_dir in $PATH
7235 do
7236   IFS=$as_save_IFS
7237   test -z "$as_dir" && as_dir=.
7238     for ac_exec_ext in '' $ac_executable_extensions; do
7239   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7240     ac_cv_prog_AS="${ac_tool_prefix}as"
7241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7242     break 2
7243   fi
7244 done
7245   done
7246 IFS=$as_save_IFS
7247
7248 fi
7249 fi
7250 AS=$ac_cv_prog_AS
7251 if test -n "$AS"; then
7252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
7253 $as_echo "$AS" >&6; }
7254 else
7255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7256 $as_echo "no" >&6; }
7257 fi
7258
7259
7260 fi
7261 if test -z "$ac_cv_prog_AS"; then
7262   ac_ct_AS=$AS
7263   # Extract the first word of "as", so it can be a program name with args.
7264 set dummy as; ac_word=$2
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7266 $as_echo_n "checking for $ac_word... " >&6; }
7267 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
7268   $as_echo_n "(cached) " >&6
7269 else
7270   if test -n "$ac_ct_AS"; then
7271   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
7272 else
7273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7274 for as_dir in $PATH
7275 do
7276   IFS=$as_save_IFS
7277   test -z "$as_dir" && as_dir=.
7278     for ac_exec_ext in '' $ac_executable_extensions; do
7279   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7280     ac_cv_prog_ac_ct_AS="as"
7281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7282     break 2
7283   fi
7284 done
7285   done
7286 IFS=$as_save_IFS
7287
7288 fi
7289 fi
7290 ac_ct_AS=$ac_cv_prog_ac_ct_AS
7291 if test -n "$ac_ct_AS"; then
7292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
7293 $as_echo "$ac_ct_AS" >&6; }
7294 else
7295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7296 $as_echo "no" >&6; }
7297 fi
7298
7299   if test "x$ac_ct_AS" = x; then
7300     AS="false"
7301   else
7302     case $cross_compiling:$ac_tool_warned in
7303 yes:)
7304 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7305 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7306 ac_tool_warned=yes ;;
7307 esac
7308     AS=$ac_ct_AS
7309   fi
7310 else
7311   AS="$ac_cv_prog_AS"
7312 fi
7313
7314   if test -n "$ac_tool_prefix"; then
7315   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7316 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7318 $as_echo_n "checking for $ac_word... " >&6; }
7319 if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
7320   $as_echo_n "(cached) " >&6
7321 else
7322   if test -n "$OBJDUMP"; then
7323   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7324 else
7325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7326 for as_dir in $PATH
7327 do
7328   IFS=$as_save_IFS
7329   test -z "$as_dir" && as_dir=.
7330     for ac_exec_ext in '' $ac_executable_extensions; do
7331   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7332     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7334     break 2
7335   fi
7336 done
7337   done
7338 IFS=$as_save_IFS
7339
7340 fi
7341 fi
7342 OBJDUMP=$ac_cv_prog_OBJDUMP
7343 if test -n "$OBJDUMP"; then
7344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7345 $as_echo "$OBJDUMP" >&6; }
7346 else
7347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7348 $as_echo "no" >&6; }
7349 fi
7350
7351
7352 fi
7353 if test -z "$ac_cv_prog_OBJDUMP"; then
7354   ac_ct_OBJDUMP=$OBJDUMP
7355   # Extract the first word of "objdump", so it can be a program name with args.
7356 set dummy objdump; ac_word=$2
7357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7358 $as_echo_n "checking for $ac_word... " >&6; }
7359 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
7360   $as_echo_n "(cached) " >&6
7361 else
7362   if test -n "$ac_ct_OBJDUMP"; then
7363   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7364 else
7365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7366 for as_dir in $PATH
7367 do
7368   IFS=$as_save_IFS
7369   test -z "$as_dir" && as_dir=.
7370     for ac_exec_ext in '' $ac_executable_extensions; do
7371   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7372     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7374     break 2
7375   fi
7376 done
7377   done
7378 IFS=$as_save_IFS
7379
7380 fi
7381 fi
7382 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7383 if test -n "$ac_ct_OBJDUMP"; then
7384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7385 $as_echo "$ac_ct_OBJDUMP" >&6; }
7386 else
7387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388 $as_echo "no" >&6; }
7389 fi
7390
7391   if test "x$ac_ct_OBJDUMP" = x; then
7392     OBJDUMP="false"
7393   else
7394     case $cross_compiling:$ac_tool_warned in
7395 yes:)
7396 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7397 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7398 ac_tool_warned=yes ;;
7399 esac
7400     OBJDUMP=$ac_ct_OBJDUMP
7401   fi
7402 else
7403   OBJDUMP="$ac_cv_prog_OBJDUMP"
7404 fi
7405
7406   ;;
7407
7408 esac
7409
7410 need_locks="$enable_libtool_lock"
7411
7412
7413 ac_ext=c
7414 ac_cpp='$CPP $CPPFLAGS'
7415 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7416 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7417 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7419 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7420 # On Suns, sometimes $CPP names a directory.
7421 if test -n "$CPP" && test -d "$CPP"; then
7422   CPP=
7423 fi
7424 if test -z "$CPP"; then
7425   if test "${ac_cv_prog_CPP+set}" = set; then :
7426   $as_echo_n "(cached) " >&6
7427 else
7428       # Double quotes because CPP needs to be expanded
7429     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7430     do
7431       ac_preproc_ok=false
7432 for ac_c_preproc_warn_flag in '' yes
7433 do
7434   # Use a header file that comes with gcc, so configuring glibc
7435   # with a fresh cross-compiler works.
7436   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7437   # <limits.h> exists even on freestanding compilers.
7438   # On the NeXT, cc -E runs the code through the compiler's parser,
7439   # not just through cpp. "Syntax error" is here to catch this case.
7440   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7441 /* end confdefs.h.  */
7442 #ifdef __STDC__
7443 # include <limits.h>
7444 #else
7445 # include <assert.h>
7446 #endif
7447                      Syntax error
7448 _ACEOF
7449 if ac_fn_c_try_cpp "$LINENO"; then :
7450
7451 else
7452   # Broken: fails on valid input.
7453 continue
7454 fi
7455 rm -f conftest.err conftest.$ac_ext
7456
7457   # OK, works on sane cases.  Now check whether nonexistent headers
7458   # can be detected and how.
7459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7460 /* end confdefs.h.  */
7461 #include <ac_nonexistent.h>
7462 _ACEOF
7463 if ac_fn_c_try_cpp "$LINENO"; then :
7464   # Broken: success on invalid input.
7465 continue
7466 else
7467   # Passes both tests.
7468 ac_preproc_ok=:
7469 break
7470 fi
7471 rm -f conftest.err conftest.$ac_ext
7472
7473 done
7474 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7475 rm -f conftest.err conftest.$ac_ext
7476 if $ac_preproc_ok; then :
7477   break
7478 fi
7479
7480     done
7481     ac_cv_prog_CPP=$CPP
7482
7483 fi
7484   CPP=$ac_cv_prog_CPP
7485 else
7486   ac_cv_prog_CPP=$CPP
7487 fi
7488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7489 $as_echo "$CPP" >&6; }
7490 ac_preproc_ok=false
7491 for ac_c_preproc_warn_flag in '' yes
7492 do
7493   # Use a header file that comes with gcc, so configuring glibc
7494   # with a fresh cross-compiler works.
7495   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7496   # <limits.h> exists even on freestanding compilers.
7497   # On the NeXT, cc -E runs the code through the compiler's parser,
7498   # not just through cpp. "Syntax error" is here to catch this case.
7499   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7500 /* end confdefs.h.  */
7501 #ifdef __STDC__
7502 # include <limits.h>
7503 #else
7504 # include <assert.h>
7505 #endif
7506                      Syntax error
7507 _ACEOF
7508 if ac_fn_c_try_cpp "$LINENO"; then :
7509
7510 else
7511   # Broken: fails on valid input.
7512 continue
7513 fi
7514 rm -f conftest.err conftest.$ac_ext
7515
7516   # OK, works on sane cases.  Now check whether nonexistent headers
7517   # can be detected and how.
7518   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7519 /* end confdefs.h.  */
7520 #include <ac_nonexistent.h>
7521 _ACEOF
7522 if ac_fn_c_try_cpp "$LINENO"; then :
7523   # Broken: success on invalid input.
7524 continue
7525 else
7526   # Passes both tests.
7527 ac_preproc_ok=:
7528 break
7529 fi
7530 rm -f conftest.err conftest.$ac_ext
7531
7532 done
7533 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7534 rm -f conftest.err conftest.$ac_ext
7535 if $ac_preproc_ok; then :
7536
7537 else
7538   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7539 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7540 as_fn_error "C preprocessor \"$CPP\" fails sanity check
7541 See \`config.log' for more details." "$LINENO" 5; }
7542 fi
7543
7544 ac_ext=c
7545 ac_cpp='$CPP $CPPFLAGS'
7546 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7547 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7548 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7549
7550
7551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7552 $as_echo_n "checking for ANSI C header files... " >&6; }
7553 if test "${ac_cv_header_stdc+set}" = set; then :
7554   $as_echo_n "(cached) " >&6
7555 else
7556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7557 /* end confdefs.h.  */
7558 #include <stdlib.h>
7559 #include <stdarg.h>
7560 #include <string.h>
7561 #include <float.h>
7562
7563 int
7564 main ()
7565 {
7566
7567   ;
7568   return 0;
7569 }
7570 _ACEOF
7571 if ac_fn_c_try_compile "$LINENO"; then :
7572   ac_cv_header_stdc=yes
7573 else
7574   ac_cv_header_stdc=no
7575 fi
7576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7577
7578 if test $ac_cv_header_stdc = yes; then
7579   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7581 /* end confdefs.h.  */
7582 #include <string.h>
7583
7584 _ACEOF
7585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7586   $EGREP "memchr" >/dev/null 2>&1; then :
7587
7588 else
7589   ac_cv_header_stdc=no
7590 fi
7591 rm -f conftest*
7592
7593 fi
7594
7595 if test $ac_cv_header_stdc = yes; then
7596   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7598 /* end confdefs.h.  */
7599 #include <stdlib.h>
7600
7601 _ACEOF
7602 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7603   $EGREP "free" >/dev/null 2>&1; then :
7604
7605 else
7606   ac_cv_header_stdc=no
7607 fi
7608 rm -f conftest*
7609
7610 fi
7611
7612 if test $ac_cv_header_stdc = yes; then
7613   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7614   if test "$cross_compiling" = yes; then :
7615   :
7616 else
7617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7618 /* end confdefs.h.  */
7619 #include <ctype.h>
7620 #include <stdlib.h>
7621 #if ((' ' & 0x0FF) == 0x020)
7622 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7623 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7624 #else
7625 # define ISLOWER(c) \
7626                    (('a' <= (c) && (c) <= 'i') \
7627                      || ('j' <= (c) && (c) <= 'r') \
7628                      || ('s' <= (c) && (c) <= 'z'))
7629 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7630 #endif
7631
7632 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7633 int
7634 main ()
7635 {
7636   int i;
7637   for (i = 0; i < 256; i++)
7638     if (XOR (islower (i), ISLOWER (i))
7639         || toupper (i) != TOUPPER (i))
7640       return 2;
7641   return 0;
7642 }
7643 _ACEOF
7644 if ac_fn_c_try_run "$LINENO"; then :
7645
7646 else
7647   ac_cv_header_stdc=no
7648 fi
7649 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7650   conftest.$ac_objext conftest.beam conftest.$ac_ext
7651 fi
7652
7653 fi
7654 fi
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7656 $as_echo "$ac_cv_header_stdc" >&6; }
7657 if test $ac_cv_header_stdc = yes; then
7658
7659 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7660
7661 fi
7662
7663 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7664 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7665                   inttypes.h stdint.h unistd.h
7666 do :
7667   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7668 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7669 "
7670 eval as_val=\$$as_ac_Header
7671    if test "x$as_val" = x""yes; then :
7672   cat >>confdefs.h <<_ACEOF
7673 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7674 _ACEOF
7675
7676 fi
7677
7678 done
7679
7680
7681 for ac_header in dlfcn.h
7682 do :
7683   ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
7684 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
7685   cat >>confdefs.h <<_ACEOF
7686 #define HAVE_DLFCN_H 1
7687 _ACEOF
7688
7689 fi
7690
7691 done
7692
7693
7694 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
7695
7696 # find the maximum length of command line arguments
7697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7698 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7699 if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
7700   $as_echo_n "(cached) " >&6
7701 else
7702     i=0
7703   teststring="ABCD"
7704
7705   case $build_os in
7706   msdosdjgpp*)
7707     # On DJGPP, this test can blow up pretty badly due to problems in libc
7708     # (any single argument exceeding 2000 bytes causes a buffer overrun
7709     # during glob expansion).  Even if it were fixed, the result of this
7710     # check would be larger than it should be.
7711     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7712     ;;
7713
7714   gnu*)
7715     # Under GNU Hurd, this test is not required because there is
7716     # no limit to the length of command line arguments.
7717     # Libtool will interpret -1 as no limit whatsoever
7718     lt_cv_sys_max_cmd_len=-1;
7719     ;;
7720
7721   cygwin* | mingw*)
7722     # On Win9x/ME, this test blows up -- it succeeds, but takes
7723     # about 5 minutes as the teststring grows exponentially.
7724     # Worse, since 9x/ME are not pre-emptively multitasking,
7725     # you end up with a "frozen" computer, even though with patience
7726     # the test eventually succeeds (with a max line length of 256k).
7727     # Instead, let's just punt: use the minimum linelength reported by
7728     # all of the supported platforms: 8192 (on NT/2K/XP).
7729     lt_cv_sys_max_cmd_len=8192;
7730     ;;
7731
7732   amigaos*)
7733     # On AmigaOS with pdksh, this test takes hours, literally.
7734     # So we just punt and use a minimum line length of 8192.
7735     lt_cv_sys_max_cmd_len=8192;
7736     ;;
7737
7738   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7739     # This has been around since 386BSD, at least.  Likely further.
7740     if test -x /sbin/sysctl; then
7741       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7742     elif test -x /usr/sbin/sysctl; then
7743       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7744     else
7745       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7746     fi
7747     # And add a safety zone
7748     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7749     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7750     ;;
7751   osf*)
7752     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7753     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7754     # nice to cause kernel panics so lets avoid the loop below.
7755     # First set a reasonable default.
7756     lt_cv_sys_max_cmd_len=16384
7757     #
7758     if test -x /sbin/sysconfig; then
7759       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7760         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7761       esac
7762     fi
7763     ;;
7764   *)
7765     # If test is not a shell built-in, we'll probably end up computing a
7766     # maximum length that is only half of the actual maximum length, but
7767     # we can't tell.
7768     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7769     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
7770                = "XX$teststring") >/dev/null 2>&1 &&
7771             new_result=`expr "X$teststring" : ".*" 2>&1` &&
7772             lt_cv_sys_max_cmd_len=$new_result &&
7773             test $i != 17 # 1/2 MB should be enough
7774     do
7775       i=`expr $i + 1`
7776       teststring=$teststring$teststring
7777     done
7778     teststring=
7779     # Add a significant safety factor because C++ compilers can tack on massive
7780     # amounts of additional arguments before passing them to the linker.
7781     # It appears as though 1/2 is a usable value.
7782     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7783     ;;
7784   esac
7785
7786 fi
7787
7788 if test -n $lt_cv_sys_max_cmd_len ; then
7789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7790 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7791 else
7792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7793 $as_echo "none" >&6; }
7794 fi
7795
7796
7797
7798
7799 # Check for command to grab the raw symbol name followed by C symbol from nm.
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7801 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
7802 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
7803   $as_echo_n "(cached) " >&6
7804 else
7805
7806 # These are sane defaults that work on at least a few old systems.
7807 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
7808
7809 # Character class describing NM global symbol codes.
7810 symcode='[BCDEGRST]'
7811
7812 # Regexp to match symbols that can be accessed directly from C.
7813 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7814
7815 # Transform an extracted symbol line into a proper C declaration
7816 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
7817
7818 # Transform an extracted symbol line into symbol name and symbol address
7819 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'"
7820
7821 # Define system-specific variables.
7822 case $host_os in
7823 aix*)
7824   symcode='[BCDT]'
7825   ;;
7826 cygwin* | mingw* | pw32*)
7827   symcode='[ABCDGISTW]'
7828   ;;
7829 hpux*) # Its linker distinguishes data from code symbols
7830   if test "$host_cpu" = ia64; then
7831     symcode='[ABCDEGRST]'
7832   fi
7833   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7834   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'"
7835   ;;
7836 linux*)
7837   if test "$host_cpu" = ia64; then
7838     symcode='[ABCDGIRSTW]'
7839     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7840     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'"
7841   fi
7842   ;;
7843 irix* | nonstopux*)
7844   symcode='[BCDEGRST]'
7845   ;;
7846 osf*)
7847   symcode='[BCDEGQRST]'
7848   ;;
7849 solaris* | sysv5*)
7850   symcode='[BDRT]'
7851   ;;
7852 sysv4)
7853   symcode='[DFNSTU]'
7854   ;;
7855 esac
7856
7857 # Handle CRLF in mingw tool chain
7858 opt_cr=
7859 case $build_os in
7860 mingw*)
7861   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7862   ;;
7863 esac
7864
7865 # If we're using GNU nm, then use its standard symbol codes.
7866 case `$NM -V 2>&1` in
7867 *GNU* | *'with BFD'*)
7868   symcode='[ABCDGIRSTW]' ;;
7869 esac
7870
7871 # Try without a prefix undercore, then with it.
7872 for ac_symprfx in "" "_"; do
7873
7874   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7875   symxfrm="\\1 $ac_symprfx\\2 \\2"
7876
7877   # Write the raw and C identifiers.
7878   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7879
7880   # Check to see that the pipe works correctly.
7881   pipe_works=no
7882
7883   rm -f conftest*
7884   cat > conftest.$ac_ext <<EOF
7885 #ifdef __cplusplus
7886 extern "C" {
7887 #endif
7888 char nm_test_var;
7889 void nm_test_func(){}
7890 #ifdef __cplusplus
7891 }
7892 #endif
7893 int main(){nm_test_var='a';nm_test_func();return(0);}
7894 EOF
7895
7896   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7897   (eval $ac_compile) 2>&5
7898   ac_status=$?
7899   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7900   test $ac_status = 0; }; then
7901     # Now try to grab the symbols.
7902     nlist=conftest.nm
7903     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
7904   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
7905   ac_status=$?
7906   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7907   test $ac_status = 0; } && test -s "$nlist"; then
7908       # Try sorting and uniquifying the output.
7909       if sort "$nlist" | uniq > "$nlist"T; then
7910         mv -f "$nlist"T "$nlist"
7911       else
7912         rm -f "$nlist"T
7913       fi
7914
7915       # Make sure that we snagged all the symbols we need.
7916       if grep ' nm_test_var$' "$nlist" >/dev/null; then
7917         if grep ' nm_test_func$' "$nlist" >/dev/null; then
7918           cat <<EOF > conftest.$ac_ext
7919 #ifdef __cplusplus
7920 extern "C" {
7921 #endif
7922
7923 EOF
7924           # Now generate the symbol file.
7925           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7926
7927           cat <<EOF >> conftest.$ac_ext
7928 #if defined (__STDC__) && __STDC__
7929 # define lt_ptr_t void *
7930 #else
7931 # define lt_ptr_t char *
7932 # define const
7933 #endif
7934
7935 /* The mapping between symbol names and symbols. */
7936 const struct {
7937   const char *name;
7938   lt_ptr_t address;
7939 }
7940 lt_preloaded_symbols[] =
7941 {
7942 EOF
7943           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7944           cat <<\EOF >> conftest.$ac_ext
7945   {0, (lt_ptr_t) 0}
7946 };
7947
7948 #ifdef __cplusplus
7949 }
7950 #endif
7951 EOF
7952           # Now try linking the two files.
7953           mv conftest.$ac_objext conftstm.$ac_objext
7954           lt_save_LIBS="$LIBS"
7955           lt_save_CFLAGS="$CFLAGS"
7956           LIBS="conftstm.$ac_objext"
7957           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7958           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7959   (eval $ac_link) 2>&5
7960   ac_status=$?
7961   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7962   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7963             pipe_works=yes
7964           fi
7965           LIBS="$lt_save_LIBS"
7966           CFLAGS="$lt_save_CFLAGS"
7967         else
7968           echo "cannot find nm_test_func in $nlist" >&5
7969         fi
7970       else
7971         echo "cannot find nm_test_var in $nlist" >&5
7972       fi
7973     else
7974       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7975     fi
7976   else
7977     echo "$progname: failed program was:" >&5
7978     cat conftest.$ac_ext >&5
7979   fi
7980   rm -f conftest* conftst*
7981
7982   # Do not use the global_symbol_pipe unless it works.
7983   if test "$pipe_works" = yes; then
7984     break
7985   else
7986     lt_cv_sys_global_symbol_pipe=
7987   fi
7988 done
7989
7990 fi
7991
7992 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7993   lt_cv_sys_global_symbol_to_cdecl=
7994 fi
7995 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7997 $as_echo "failed" >&6; }
7998 else
7999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8000 $as_echo "ok" >&6; }
8001 fi
8002
8003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
8004 $as_echo_n "checking for objdir... " >&6; }
8005 if test "${lt_cv_objdir+set}" = set; then :
8006   $as_echo_n "(cached) " >&6
8007 else
8008   rm -f .libs 2>/dev/null
8009 mkdir .libs 2>/dev/null
8010 if test -d .libs; then
8011   lt_cv_objdir=.libs
8012 else
8013   # MS-DOS does not allow filenames that begin with a dot.
8014   lt_cv_objdir=_libs
8015 fi
8016 rmdir .libs 2>/dev/null
8017 fi
8018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
8019 $as_echo "$lt_cv_objdir" >&6; }
8020 objdir=$lt_cv_objdir
8021
8022
8023
8024
8025
8026 case $host_os in
8027 aix3*)
8028   # AIX sometimes has problems with the GCC collect2 program.  For some
8029   # reason, if we set the COLLECT_NAMES environment variable, the problems
8030   # vanish in a puff of smoke.
8031   if test "X${COLLECT_NAMES+set}" != Xset; then
8032     COLLECT_NAMES=
8033     export COLLECT_NAMES
8034   fi
8035   ;;
8036 esac
8037
8038 # Sed substitution that helps us do robust quoting.  It backslashifies
8039 # metacharacters that are still active within double-quoted strings.
8040 Xsed='sed -e 1s/^X//'
8041 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
8042
8043 # Same as above, but do not quote variable references.
8044 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
8045
8046 # Sed substitution to delay expansion of an escaped shell variable in a
8047 # double_quote_subst'ed string.
8048 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
8049
8050 # Sed substitution to avoid accidental globbing in evaled expressions
8051 no_glob_subst='s/\*/\\\*/g'
8052
8053 # Constants:
8054 rm="rm -f"
8055
8056 # Global variables:
8057 default_ofile=libtool
8058 can_build_shared=yes
8059
8060 # All known linkers require a `.a' archive for static linking (except MSVC,
8061 # which needs '.lib').
8062 libext=a
8063 ltmain="$ac_aux_dir/ltmain.sh"
8064 ofile="$default_ofile"
8065 with_gnu_ld="$lt_cv_prog_gnu_ld"
8066
8067 if test -n "$ac_tool_prefix"; then
8068   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8069 set dummy ${ac_tool_prefix}ar; ac_word=$2
8070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8071 $as_echo_n "checking for $ac_word... " >&6; }
8072 if test "${ac_cv_prog_AR+set}" = set; then :
8073   $as_echo_n "(cached) " >&6
8074 else
8075   if test -n "$AR"; then
8076   ac_cv_prog_AR="$AR" # Let the user override the test.
8077 else
8078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8079 for as_dir in $PATH
8080 do
8081   IFS=$as_save_IFS
8082   test -z "$as_dir" && as_dir=.
8083     for ac_exec_ext in '' $ac_executable_extensions; do
8084   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8085     ac_cv_prog_AR="${ac_tool_prefix}ar"
8086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8087     break 2
8088   fi
8089 done
8090   done
8091 IFS=$as_save_IFS
8092
8093 fi
8094 fi
8095 AR=$ac_cv_prog_AR
8096 if test -n "$AR"; then
8097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8098 $as_echo "$AR" >&6; }
8099 else
8100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8101 $as_echo "no" >&6; }
8102 fi
8103
8104
8105 fi
8106 if test -z "$ac_cv_prog_AR"; then
8107   ac_ct_AR=$AR
8108   # Extract the first word of "ar", so it can be a program name with args.
8109 set dummy ar; ac_word=$2
8110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8111 $as_echo_n "checking for $ac_word... " >&6; }
8112 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8113   $as_echo_n "(cached) " >&6
8114 else
8115   if test -n "$ac_ct_AR"; then
8116   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8117 else
8118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8119 for as_dir in $PATH
8120 do
8121   IFS=$as_save_IFS
8122   test -z "$as_dir" && as_dir=.
8123     for ac_exec_ext in '' $ac_executable_extensions; do
8124   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8125     ac_cv_prog_ac_ct_AR="ar"
8126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8127     break 2
8128   fi
8129 done
8130   done
8131 IFS=$as_save_IFS
8132
8133 fi
8134 fi
8135 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8136 if test -n "$ac_ct_AR"; then
8137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8138 $as_echo "$ac_ct_AR" >&6; }
8139 else
8140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8141 $as_echo "no" >&6; }
8142 fi
8143
8144   if test "x$ac_ct_AR" = x; then
8145     AR="false"
8146   else
8147     case $cross_compiling:$ac_tool_warned in
8148 yes:)
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8150 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8151 ac_tool_warned=yes ;;
8152 esac
8153     AR=$ac_ct_AR
8154   fi
8155 else
8156   AR="$ac_cv_prog_AR"
8157 fi
8158
8159 if test -n "$ac_tool_prefix"; then
8160   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8161 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8163 $as_echo_n "checking for $ac_word... " >&6; }
8164 if test "${ac_cv_prog_RANLIB+set}" = set; then :
8165   $as_echo_n "(cached) " >&6
8166 else
8167   if test -n "$RANLIB"; then
8168   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8169 else
8170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8171 for as_dir in $PATH
8172 do
8173   IFS=$as_save_IFS
8174   test -z "$as_dir" && as_dir=.
8175     for ac_exec_ext in '' $ac_executable_extensions; do
8176   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8177     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8178     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8179     break 2
8180   fi
8181 done
8182   done
8183 IFS=$as_save_IFS
8184
8185 fi
8186 fi
8187 RANLIB=$ac_cv_prog_RANLIB
8188 if test -n "$RANLIB"; then
8189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8190 $as_echo "$RANLIB" >&6; }
8191 else
8192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8193 $as_echo "no" >&6; }
8194 fi
8195
8196
8197 fi
8198 if test -z "$ac_cv_prog_RANLIB"; then
8199   ac_ct_RANLIB=$RANLIB
8200   # Extract the first word of "ranlib", so it can be a program name with args.
8201 set dummy ranlib; ac_word=$2
8202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8203 $as_echo_n "checking for $ac_word... " >&6; }
8204 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8205   $as_echo_n "(cached) " >&6
8206 else
8207   if test -n "$ac_ct_RANLIB"; then
8208   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8209 else
8210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8211 for as_dir in $PATH
8212 do
8213   IFS=$as_save_IFS
8214   test -z "$as_dir" && as_dir=.
8215     for ac_exec_ext in '' $ac_executable_extensions; do
8216   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8217     ac_cv_prog_ac_ct_RANLIB="ranlib"
8218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8219     break 2
8220   fi
8221 done
8222   done
8223 IFS=$as_save_IFS
8224
8225 fi
8226 fi
8227 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8228 if test -n "$ac_ct_RANLIB"; then
8229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8230 $as_echo "$ac_ct_RANLIB" >&6; }
8231 else
8232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8233 $as_echo "no" >&6; }
8234 fi
8235
8236   if test "x$ac_ct_RANLIB" = x; then
8237     RANLIB=":"
8238   else
8239     case $cross_compiling:$ac_tool_warned in
8240 yes:)
8241 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8242 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8243 ac_tool_warned=yes ;;
8244 esac
8245     RANLIB=$ac_ct_RANLIB
8246   fi
8247 else
8248   RANLIB="$ac_cv_prog_RANLIB"
8249 fi
8250
8251 if test -n "$ac_tool_prefix"; then
8252   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8253 set dummy ${ac_tool_prefix}strip; ac_word=$2
8254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8255 $as_echo_n "checking for $ac_word... " >&6; }
8256 if test "${ac_cv_prog_STRIP+set}" = set; then :
8257   $as_echo_n "(cached) " >&6
8258 else
8259   if test -n "$STRIP"; then
8260   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8261 else
8262 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8263 for as_dir in $PATH
8264 do
8265   IFS=$as_save_IFS
8266   test -z "$as_dir" && as_dir=.
8267     for ac_exec_ext in '' $ac_executable_extensions; do
8268   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8269     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8270     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8271     break 2
8272   fi
8273 done
8274   done
8275 IFS=$as_save_IFS
8276
8277 fi
8278 fi
8279 STRIP=$ac_cv_prog_STRIP
8280 if test -n "$STRIP"; then
8281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8282 $as_echo "$STRIP" >&6; }
8283 else
8284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8285 $as_echo "no" >&6; }
8286 fi
8287
8288
8289 fi
8290 if test -z "$ac_cv_prog_STRIP"; then
8291   ac_ct_STRIP=$STRIP
8292   # Extract the first word of "strip", so it can be a program name with args.
8293 set dummy strip; ac_word=$2
8294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8295 $as_echo_n "checking for $ac_word... " >&6; }
8296 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
8297   $as_echo_n "(cached) " >&6
8298 else
8299   if test -n "$ac_ct_STRIP"; then
8300   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8301 else
8302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8303 for as_dir in $PATH
8304 do
8305   IFS=$as_save_IFS
8306   test -z "$as_dir" && as_dir=.
8307     for ac_exec_ext in '' $ac_executable_extensions; do
8308   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8309     ac_cv_prog_ac_ct_STRIP="strip"
8310     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8311     break 2
8312   fi
8313 done
8314   done
8315 IFS=$as_save_IFS
8316
8317 fi
8318 fi
8319 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8320 if test -n "$ac_ct_STRIP"; then
8321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8322 $as_echo "$ac_ct_STRIP" >&6; }
8323 else
8324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8325 $as_echo "no" >&6; }
8326 fi
8327
8328   if test "x$ac_ct_STRIP" = x; then
8329     STRIP=":"
8330   else
8331     case $cross_compiling:$ac_tool_warned in
8332 yes:)
8333 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8334 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8335 ac_tool_warned=yes ;;
8336 esac
8337     STRIP=$ac_ct_STRIP
8338   fi
8339 else
8340   STRIP="$ac_cv_prog_STRIP"
8341 fi
8342
8343
8344 old_CC="$CC"
8345 old_CFLAGS="$CFLAGS"
8346
8347 # Set sane defaults for various variables
8348 test -z "$AR" && AR=ar
8349 test -z "$AR_FLAGS" && AR_FLAGS=cru
8350 test -z "$AS" && AS=as
8351 test -z "$CC" && CC=cc
8352 test -z "$LTCC" && LTCC=$CC
8353 test -z "$DLLTOOL" && DLLTOOL=dlltool
8354 test -z "$LD" && LD=ld
8355 test -z "$LN_S" && LN_S="ln -s"
8356 test -z "$MAGIC_CMD" && MAGIC_CMD=file
8357 test -z "$NM" && NM=nm
8358 test -z "$SED" && SED=sed
8359 test -z "$OBJDUMP" && OBJDUMP=objdump
8360 test -z "$RANLIB" && RANLIB=:
8361 test -z "$STRIP" && STRIP=:
8362 test -z "$ac_objext" && ac_objext=o
8363
8364 # Determine commands to create old-style static archives.
8365 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
8366 old_postinstall_cmds='chmod 644 $oldlib'
8367 old_postuninstall_cmds=
8368
8369 if test -n "$RANLIB"; then
8370   case $host_os in
8371   openbsd*)
8372     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
8373     ;;
8374   *)
8375     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
8376     ;;
8377   esac
8378   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
8379 fi
8380
8381 for cc_temp in $compiler""; do
8382   case $cc_temp in
8383     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8384     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8385     \-*) ;;
8386     *) break;;
8387   esac
8388 done
8389 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8390
8391
8392 # Only perform the check for file, if the check method requires it
8393 case $deplibs_check_method in
8394 file_magic*)
8395   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8396     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
8397 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8398 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8399   $as_echo_n "(cached) " >&6
8400 else
8401   case $MAGIC_CMD in
8402 [\\/*] |  ?:[\\/]*)
8403   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8404   ;;
8405 *)
8406   lt_save_MAGIC_CMD="$MAGIC_CMD"
8407   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8408   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8409   for ac_dir in $ac_dummy; do
8410     IFS="$lt_save_ifs"
8411     test -z "$ac_dir" && ac_dir=.
8412     if test -f $ac_dir/${ac_tool_prefix}file; then
8413       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8414       if test -n "$file_magic_test_file"; then
8415         case $deplibs_check_method in
8416         "file_magic "*)
8417           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8418           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8419           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8420             $EGREP "$file_magic_regex" > /dev/null; then
8421             :
8422           else
8423             cat <<EOF 1>&2
8424
8425 *** Warning: the command libtool uses to detect shared libraries,
8426 *** $file_magic_cmd, produces output that libtool cannot recognize.
8427 *** The result is that libtool may fail to recognize shared libraries
8428 *** as such.  This will affect the creation of libtool libraries that
8429 *** depend on shared libraries, but programs linked with such libtool
8430 *** libraries will work regardless of this problem.  Nevertheless, you
8431 *** may want to report the problem to your system manager and/or to
8432 *** bug-libtool@gnu.org
8433
8434 EOF
8435           fi ;;
8436         esac
8437       fi
8438       break
8439     fi
8440   done
8441   IFS="$lt_save_ifs"
8442   MAGIC_CMD="$lt_save_MAGIC_CMD"
8443   ;;
8444 esac
8445 fi
8446
8447 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8448 if test -n "$MAGIC_CMD"; then
8449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8450 $as_echo "$MAGIC_CMD" >&6; }
8451 else
8452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8453 $as_echo "no" >&6; }
8454 fi
8455
8456 if test -z "$lt_cv_path_MAGIC_CMD"; then
8457   if test -n "$ac_tool_prefix"; then
8458     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
8459 $as_echo_n "checking for file... " >&6; }
8460 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8461   $as_echo_n "(cached) " >&6
8462 else
8463   case $MAGIC_CMD in
8464 [\\/*] |  ?:[\\/]*)
8465   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8466   ;;
8467 *)
8468   lt_save_MAGIC_CMD="$MAGIC_CMD"
8469   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8470   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8471   for ac_dir in $ac_dummy; do
8472     IFS="$lt_save_ifs"
8473     test -z "$ac_dir" && ac_dir=.
8474     if test -f $ac_dir/file; then
8475       lt_cv_path_MAGIC_CMD="$ac_dir/file"
8476       if test -n "$file_magic_test_file"; then
8477         case $deplibs_check_method in
8478         "file_magic "*)
8479           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8480           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8481           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8482             $EGREP "$file_magic_regex" > /dev/null; then
8483             :
8484           else
8485             cat <<EOF 1>&2
8486
8487 *** Warning: the command libtool uses to detect shared libraries,
8488 *** $file_magic_cmd, produces output that libtool cannot recognize.
8489 *** The result is that libtool may fail to recognize shared libraries
8490 *** as such.  This will affect the creation of libtool libraries that
8491 *** depend on shared libraries, but programs linked with such libtool
8492 *** libraries will work regardless of this problem.  Nevertheless, you
8493 *** may want to report the problem to your system manager and/or to
8494 *** bug-libtool@gnu.org
8495
8496 EOF
8497           fi ;;
8498         esac
8499       fi
8500       break
8501     fi
8502   done
8503   IFS="$lt_save_ifs"
8504   MAGIC_CMD="$lt_save_MAGIC_CMD"
8505   ;;
8506 esac
8507 fi
8508
8509 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8510 if test -n "$MAGIC_CMD"; then
8511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8512 $as_echo "$MAGIC_CMD" >&6; }
8513 else
8514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8515 $as_echo "no" >&6; }
8516 fi
8517
8518   else
8519     MAGIC_CMD=:
8520   fi
8521 fi
8522
8523   fi
8524   ;;
8525 esac
8526
8527 enable_dlopen=yes
8528 enable_win32_dll=yes
8529
8530 # Check whether --enable-libtool-lock was given.
8531 if test "${enable_libtool_lock+set}" = set; then :
8532   enableval=$enable_libtool_lock;
8533 fi
8534
8535 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
8536
8537
8538 # Check whether --with-pic was given.
8539 if test "${with_pic+set}" = set; then :
8540   withval=$with_pic; pic_mode="$withval"
8541 else
8542   pic_mode=default
8543 fi
8544
8545 test -z "$pic_mode" && pic_mode=default
8546
8547 # Use C for the default configuration in the libtool script
8548 tagname=
8549 lt_save_CC="$CC"
8550 ac_ext=c
8551 ac_cpp='$CPP $CPPFLAGS'
8552 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8553 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8554 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8555
8556
8557 # Source file extension for C test sources.
8558 ac_ext=c
8559
8560 # Object file extension for compiled C test sources.
8561 objext=o
8562 objext=$objext
8563
8564 # Code to be used in simple compile tests
8565 lt_simple_compile_test_code="int some_variable = 0;\n"
8566
8567 # Code to be used in simple link tests
8568 lt_simple_link_test_code='int main(){return(0);}\n'
8569
8570
8571 # If no C compiler was specified, use CC.
8572 LTCC=${LTCC-"$CC"}
8573
8574 # Allow CC to be a program name with arguments.
8575 compiler=$CC
8576
8577
8578 # save warnings/boilerplate of simple test code
8579 ac_outfile=conftest.$ac_objext
8580 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
8581 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8582 _lt_compiler_boilerplate=`cat conftest.err`
8583 $rm conftest*
8584
8585 ac_outfile=conftest.$ac_objext
8586 printf "$lt_simple_link_test_code" >conftest.$ac_ext
8587 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8588 _lt_linker_boilerplate=`cat conftest.err`
8589 $rm conftest*
8590
8591
8592 #
8593 # Check for any special shared library compilation flags.
8594 #
8595 lt_prog_cc_shlib=
8596 if test "$GCC" = no; then
8597   case $host_os in
8598   sco3.2v5*)
8599     lt_prog_cc_shlib='-belf'
8600     ;;
8601   esac
8602 fi
8603 if test -n "$lt_prog_cc_shlib"; then
8604   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
8605 $as_echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
8606   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
8607   else
8608     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
8609 $as_echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
8610     lt_cv_prog_cc_can_build_shared=no
8611   fi
8612 fi
8613
8614
8615 #
8616 # Check to make sure the static flag actually works.
8617 #
8618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_prog_compiler_static works" >&5
8619 $as_echo_n "checking if $compiler static flag $lt_prog_compiler_static works... " >&6; }
8620 if test "${lt_prog_compiler_static_works+set}" = set; then :
8621   $as_echo_n "(cached) " >&6
8622 else
8623   lt_prog_compiler_static_works=no
8624    save_LDFLAGS="$LDFLAGS"
8625    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
8626    printf "$lt_simple_link_test_code" > conftest.$ac_ext
8627    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8628      # The linker can only warn and ignore the option if not recognized
8629      # So say no if there are warnings
8630      if test -s conftest.err; then
8631        # Append any errors to the config.log.
8632        cat conftest.err 1>&5
8633        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
8634        $SED '/^$/d' conftest.err >conftest.er2
8635        if diff conftest.exp conftest.er2 >/dev/null; then
8636          lt_prog_compiler_static_works=yes
8637        fi
8638      else
8639        lt_prog_compiler_static_works=yes
8640      fi
8641    fi
8642    $rm conftest*
8643    LDFLAGS="$save_LDFLAGS"
8644
8645 fi
8646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_static_works" >&5
8647 $as_echo "$lt_prog_compiler_static_works" >&6; }
8648
8649 if test x"$lt_prog_compiler_static_works" = xyes; then
8650     :
8651 else
8652     lt_prog_compiler_static=
8653 fi
8654
8655
8656
8657
8658 lt_prog_compiler_no_builtin_flag=
8659
8660 if test "$GCC" = yes; then
8661   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
8662
8663
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
8665 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
8666 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
8667   $as_echo_n "(cached) " >&6
8668 else
8669   lt_cv_prog_compiler_rtti_exceptions=no
8670   ac_outfile=conftest.$ac_objext
8671    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8672    lt_compiler_flag="-fno-rtti -fno-exceptions"
8673    # Insert the option either (1) after the last *FLAGS variable, or
8674    # (2) before a word containing "conftest.", or (3) at the end.
8675    # Note that $ac_compile itself does not contain backslashes and begins
8676    # with a dollar sign (not a hyphen), so the echo should work correctly.
8677    # The option is referenced via a variable to avoid confusing sed.
8678    lt_compile=`echo "$ac_compile" | $SED \
8679    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8680    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8681    -e 's:$: $lt_compiler_flag:'`
8682    (eval echo "\"\$as_me:8682: $lt_compile\"" >&5)
8683    (eval "$lt_compile" 2>conftest.err)
8684    ac_status=$?
8685    cat conftest.err >&5
8686    echo "$as_me:8686: \$? = $ac_status" >&5
8687    if (exit $ac_status) && test -s "$ac_outfile"; then
8688      # The compiler can only warn and ignore the option if not recognized
8689      # So say no if there are warnings other than the usual output.
8690      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8691      $SED '/^$/d' conftest.err >conftest.er2
8692      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8693        lt_cv_prog_compiler_rtti_exceptions=yes
8694      fi
8695    fi
8696    $rm conftest*
8697
8698 fi
8699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
8700 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
8701
8702 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
8703     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
8704 else
8705     :
8706 fi
8707
8708 fi
8709
8710 lt_prog_compiler_wl=
8711 lt_prog_compiler_pic=
8712 lt_prog_compiler_static=
8713
8714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8715 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8716
8717   if test "$GCC" = yes; then
8718     lt_prog_compiler_wl='-Wl,'
8719     lt_prog_compiler_static='-static'
8720
8721     case $host_os in
8722       aix*)
8723       # All AIX code is PIC.
8724       if test "$host_cpu" = ia64; then
8725         # AIX 5 now supports IA64 processor
8726         lt_prog_compiler_static='-Bstatic'
8727       fi
8728       ;;
8729
8730     amigaos*)
8731       # FIXME: we need at least 68020 code to build shared libraries, but
8732       # adding the `-m68020' flag to GCC prevents building anything better,
8733       # like `-m68040'.
8734       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
8735       ;;
8736
8737     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8738       # PIC is the default for these OSes.
8739       ;;
8740
8741     mingw* | pw32* | os2*)
8742       # This hack is so that the source file can tell whether it is being
8743       # built for inclusion in a dll (and should export symbols for example).
8744       lt_prog_compiler_pic='-DDLL_EXPORT'
8745       ;;
8746
8747     darwin* | rhapsody*)
8748       # PIC is the default on this platform
8749       # Common symbols not allowed in MH_DYLIB files
8750       lt_prog_compiler_pic='-fno-common'
8751       ;;
8752
8753     msdosdjgpp*)
8754       # Just because we use GCC doesn't mean we suddenly get shared libraries
8755       # on systems that don't support them.
8756       lt_prog_compiler_can_build_shared=no
8757       enable_shared=no
8758       ;;
8759
8760     sysv4*MP*)
8761       if test -d /usr/nec; then
8762         lt_prog_compiler_pic=-Kconform_pic
8763       fi
8764       ;;
8765
8766     hpux*)
8767       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8768       # not for PA HP-UX.
8769       case $host_cpu in
8770       hppa*64*|ia64*)
8771         # +Z the default
8772         ;;
8773       *)
8774         lt_prog_compiler_pic='-fPIC'
8775         ;;
8776       esac
8777       ;;
8778
8779     *)
8780       lt_prog_compiler_pic='-fPIC'
8781       ;;
8782     esac
8783   else
8784     # PORTME Check for flag to pass linker flags through the system compiler.
8785     case $host_os in
8786     aix*)
8787       lt_prog_compiler_wl='-Wl,'
8788       if test "$host_cpu" = ia64; then
8789         # AIX 5 now supports IA64 processor
8790         lt_prog_compiler_static='-Bstatic'
8791       else
8792         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
8793       fi
8794       ;;
8795       darwin*)
8796         # PIC is the default on this platform
8797         # Common symbols not allowed in MH_DYLIB files
8798        case $cc_basename in
8799          xlc*)
8800          lt_prog_compiler_pic='-qnocommon'
8801          lt_prog_compiler_wl='-Wl,'
8802          ;;
8803        esac
8804        ;;
8805
8806     mingw* | pw32* | os2*)
8807       # This hack is so that the source file can tell whether it is being
8808       # built for inclusion in a dll (and should export symbols for example).
8809       lt_prog_compiler_pic='-DDLL_EXPORT'
8810       ;;
8811
8812     hpux9* | hpux10* | hpux11*)
8813       lt_prog_compiler_wl='-Wl,'
8814       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8815       # not for PA HP-UX.
8816       case $host_cpu in
8817       hppa*64*|ia64*)
8818         # +Z the default
8819         ;;
8820       *)
8821         lt_prog_compiler_pic='+Z'
8822         ;;
8823       esac
8824       # Is there a better lt_prog_compiler_static that works with the bundled CC?
8825       lt_prog_compiler_static='${wl}-a ${wl}archive'
8826       ;;
8827
8828     irix5* | irix6* | nonstopux*)
8829       lt_prog_compiler_wl='-Wl,'
8830       # PIC (with -KPIC) is the default.
8831       lt_prog_compiler_static='-non_shared'
8832       ;;
8833
8834     newsos6)
8835       lt_prog_compiler_pic='-KPIC'
8836       lt_prog_compiler_static='-Bstatic'
8837       ;;
8838
8839     linux*)
8840       case $cc_basename in
8841       icc* | ecc*)
8842         lt_prog_compiler_wl='-Wl,'
8843         lt_prog_compiler_pic='-KPIC'
8844         lt_prog_compiler_static='-static'
8845         ;;
8846       pgcc* | pgf77* | pgf90* | pgf95*)
8847         # Portland Group compilers (*not* the Pentium gcc compiler,
8848         # which looks to be a dead project)
8849         lt_prog_compiler_wl='-Wl,'
8850         lt_prog_compiler_pic='-fpic'
8851         lt_prog_compiler_static='-Bstatic'
8852         ;;
8853       ccc*)
8854         lt_prog_compiler_wl='-Wl,'
8855         # All Alpha code is PIC.
8856         lt_prog_compiler_static='-non_shared'
8857         ;;
8858       esac
8859       ;;
8860
8861     osf3* | osf4* | osf5*)
8862       lt_prog_compiler_wl='-Wl,'
8863       # All OSF/1 code is PIC.
8864       lt_prog_compiler_static='-non_shared'
8865       ;;
8866
8867     sco3.2v5*)
8868       lt_prog_compiler_pic='-Kpic'
8869       lt_prog_compiler_static='-dn'
8870       ;;
8871
8872     solaris*)
8873       lt_prog_compiler_pic='-KPIC'
8874       lt_prog_compiler_static='-Bstatic'
8875       case $cc_basename in
8876       f77* | f90* | f95*)
8877         lt_prog_compiler_wl='-Qoption ld ';;
8878       *)
8879         lt_prog_compiler_wl='-Wl,';;
8880       esac
8881       ;;
8882
8883     sunos4*)
8884       lt_prog_compiler_wl='-Qoption ld '
8885       lt_prog_compiler_pic='-PIC'
8886       lt_prog_compiler_static='-Bstatic'
8887       ;;
8888
8889     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8890       lt_prog_compiler_wl='-Wl,'
8891       lt_prog_compiler_pic='-KPIC'
8892       lt_prog_compiler_static='-Bstatic'
8893       ;;
8894
8895     sysv4*MP*)
8896       if test -d /usr/nec ;then
8897         lt_prog_compiler_pic='-Kconform_pic'
8898         lt_prog_compiler_static='-Bstatic'
8899       fi
8900       ;;
8901
8902     unicos*)
8903       lt_prog_compiler_wl='-Wl,'
8904       lt_prog_compiler_can_build_shared=no
8905       ;;
8906
8907     uts4*)
8908       lt_prog_compiler_pic='-pic'
8909       lt_prog_compiler_static='-Bstatic'
8910       ;;
8911
8912     *)
8913       lt_prog_compiler_can_build_shared=no
8914       ;;
8915     esac
8916   fi
8917
8918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
8919 $as_echo "$lt_prog_compiler_pic" >&6; }
8920
8921 #
8922 # Check to make sure the PIC flag actually works.
8923 #
8924 if test -n "$lt_prog_compiler_pic"; then
8925
8926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8927 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
8928 if test "${lt_prog_compiler_pic_works+set}" = set; then :
8929   $as_echo_n "(cached) " >&6
8930 else
8931   lt_prog_compiler_pic_works=no
8932   ac_outfile=conftest.$ac_objext
8933    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8934    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8935    # Insert the option either (1) after the last *FLAGS variable, or
8936    # (2) before a word containing "conftest.", or (3) at the end.
8937    # Note that $ac_compile itself does not contain backslashes and begins
8938    # with a dollar sign (not a hyphen), so the echo should work correctly.
8939    # The option is referenced via a variable to avoid confusing sed.
8940    lt_compile=`echo "$ac_compile" | $SED \
8941    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8942    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8943    -e 's:$: $lt_compiler_flag:'`
8944    (eval echo "\"\$as_me:8944: $lt_compile\"" >&5)
8945    (eval "$lt_compile" 2>conftest.err)
8946    ac_status=$?
8947    cat conftest.err >&5
8948    echo "$as_me:8948: \$? = $ac_status" >&5
8949    if (exit $ac_status) && test -s "$ac_outfile"; then
8950      # The compiler can only warn and ignore the option if not recognized
8951      # So say no if there are warnings other than the usual output.
8952      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8953      $SED '/^$/d' conftest.err >conftest.er2
8954      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8955        lt_prog_compiler_pic_works=yes
8956      fi
8957    fi
8958    $rm conftest*
8959
8960 fi
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_works" >&5
8962 $as_echo "$lt_prog_compiler_pic_works" >&6; }
8963
8964 if test x"$lt_prog_compiler_pic_works" = xyes; then
8965     case $lt_prog_compiler_pic in
8966      "" | " "*) ;;
8967      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8968      esac
8969 else
8970     lt_prog_compiler_pic=
8971      lt_prog_compiler_can_build_shared=no
8972 fi
8973
8974 fi
8975 case $host_os in
8976   # For platforms which do not support PIC, -DPIC is meaningless:
8977   *djgpp*)
8978     lt_prog_compiler_pic=
8979     ;;
8980   *)
8981     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8982     ;;
8983 esac
8984
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8986 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8987 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8988   $as_echo_n "(cached) " >&6
8989 else
8990   lt_cv_prog_compiler_c_o=no
8991    $rm -r conftest 2>/dev/null
8992    mkdir conftest
8993    cd conftest
8994    mkdir out
8995    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8996
8997    lt_compiler_flag="-o out/conftest2.$ac_objext"
8998    # Insert the option either (1) after the last *FLAGS variable, or
8999    # (2) before a word containing "conftest.", or (3) at the end.
9000    # Note that $ac_compile itself does not contain backslashes and begins
9001    # with a dollar sign (not a hyphen), so the echo should work correctly.
9002    lt_compile=`echo "$ac_compile" | $SED \
9003    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9004    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9005    -e 's:$: $lt_compiler_flag:'`
9006    (eval echo "\"\$as_me:9006: $lt_compile\"" >&5)
9007    (eval "$lt_compile" 2>out/conftest.err)
9008    ac_status=$?
9009    cat out/conftest.err >&5
9010    echo "$as_me:9010: \$? = $ac_status" >&5
9011    if (exit $ac_status) && test -s out/conftest2.$ac_objext
9012    then
9013      # The compiler can only warn and ignore the option if not recognized
9014      # So say no if there are warnings
9015      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
9016      $SED '/^$/d' out/conftest.err >out/conftest.er2
9017      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9018        lt_cv_prog_compiler_c_o=yes
9019      fi
9020    fi
9021    chmod u+w . 2>&5
9022    $rm conftest*
9023    # SGI C++ compiler will create directory out/ii_files/ for
9024    # template instantiation
9025    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
9026    $rm out/* && rmdir out
9027    cd ..
9028    rmdir conftest
9029    $rm conftest*
9030
9031 fi
9032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9033 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9034
9035
9036 hard_links="nottested"
9037 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
9038   # do not overwrite the value of need_locks provided by the user
9039   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
9040 $as_echo_n "checking if we can lock with hard links... " >&6; }
9041   hard_links=yes
9042   $rm conftest*
9043   ln conftest.a conftest.b 2>/dev/null && hard_links=no
9044   touch conftest.a
9045   ln conftest.a conftest.b 2>&5 || hard_links=no
9046   ln conftest.a conftest.b 2>/dev/null && hard_links=no
9047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
9048 $as_echo "$hard_links" >&6; }
9049   if test "$hard_links" = no; then
9050     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
9051 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
9052     need_locks=warn
9053   fi
9054 else
9055   need_locks=no
9056 fi
9057
9058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
9059 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
9060
9061   runpath_var=
9062   allow_undefined_flag=
9063   enable_shared_with_static_runtimes=no
9064   archive_cmds=
9065   archive_expsym_cmds=
9066   old_archive_From_new_cmds=
9067   old_archive_from_expsyms_cmds=
9068   export_dynamic_flag_spec=
9069   whole_archive_flag_spec=
9070   thread_safe_flag_spec=
9071   hardcode_libdir_flag_spec=
9072   hardcode_libdir_flag_spec_ld=
9073   hardcode_libdir_separator=
9074   hardcode_direct=no
9075   hardcode_minus_L=no
9076   hardcode_shlibpath_var=unsupported
9077   link_all_deplibs=unknown
9078   hardcode_automatic=no
9079   module_cmds=
9080   module_expsym_cmds=
9081   always_export_symbols=no
9082   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
9083   # include_expsyms should be a list of space-separated symbols to be *always*
9084   # included in the symbol list
9085   include_expsyms=
9086   # exclude_expsyms can be an extended regexp of symbols to exclude
9087   # it will be wrapped by ` (' and `)$', so one must not match beginning or
9088   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9089   # as well as any symbol that contains `d'.
9090   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
9091   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9092   # platforms (ab)use it in PIC code, but their linkers get confused if
9093   # the symbol is explicitly referenced.  Since portable code cannot
9094   # rely on this symbol name, it's probably fine to never include it in
9095   # preloaded symbol tables.
9096   extract_expsyms_cmds=
9097   # Just being paranoid about ensuring that cc_basename is set.
9098   for cc_temp in $compiler""; do
9099   case $cc_temp in
9100     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9101     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9102     \-*) ;;
9103     *) break;;
9104   esac
9105 done
9106 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
9107
9108   case $host_os in
9109   cygwin* | mingw* | pw32*)
9110     # FIXME: the MSVC++ port hasn't been tested in a loooong time
9111     # When not using gcc, we currently assume that we are using
9112     # Microsoft Visual C++.
9113     if test "$GCC" != yes; then
9114       with_gnu_ld=no
9115     fi
9116     ;;
9117   openbsd*)
9118     with_gnu_ld=no
9119     ;;
9120   esac
9121
9122   ld_shlibs=yes
9123   if test "$with_gnu_ld" = yes; then
9124     # If archive_cmds runs LD, not CC, wlarc should be empty
9125     wlarc='${wl}'
9126
9127     # Set some defaults for GNU ld with shared library support. These
9128     # are reset later if shared libraries are not supported. Putting them
9129     # here allows them to be overridden if necessary.
9130     runpath_var=LD_RUN_PATH
9131     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
9132     export_dynamic_flag_spec='${wl}--export-dynamic'
9133     # ancient GNU ld didn't support --whole-archive et. al.
9134     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
9135         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9136       else
9137         whole_archive_flag_spec=
9138     fi
9139     supports_anon_versioning=no
9140     case `$LD -v 2>/dev/null` in
9141       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9142       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9143       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9144       *\ 2.11.*) ;; # other 2.11 versions
9145       *) supports_anon_versioning=yes ;;
9146     esac
9147
9148     # See if GNU ld supports shared libraries.
9149     case $host_os in
9150     aix3* | aix4* | aix5*)
9151       # On AIX/PPC, the GNU linker is very broken
9152       if test "$host_cpu" != ia64; then
9153         ld_shlibs=no
9154         cat <<EOF 1>&2
9155
9156 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
9157 *** to be unable to reliably create shared libraries on AIX.
9158 *** Therefore, libtool is disabling shared libraries support.  If you
9159 *** really care for shared libraries, you may want to modify your PATH
9160 *** so that a non-GNU linker is found, and then restart.
9161
9162 EOF
9163       fi
9164       ;;
9165
9166     amigaos*)
9167       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)'
9168       hardcode_libdir_flag_spec='-L$libdir'
9169       hardcode_minus_L=yes
9170
9171       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9172       # that the semantics of dynamic libraries on AmigaOS, at least up
9173       # to version 4, is to share data among multiple programs linked
9174       # with the same dynamic library.  Since this doesn't match the
9175       # behavior of shared libraries on other platforms, we can't use
9176       # them.
9177       ld_shlibs=no
9178       ;;
9179
9180     beos*)
9181       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9182         allow_undefined_flag=unsupported
9183         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9184         # support --undefined.  This deserves some investigation.  FIXME
9185         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9186       else
9187         ld_shlibs=no
9188       fi
9189       ;;
9190
9191     cygwin* | mingw* | pw32*)
9192       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9193       # as there is no search path for DLLs.
9194       hardcode_libdir_flag_spec='-L$libdir'
9195       allow_undefined_flag=unsupported
9196       always_export_symbols=no
9197       enable_shared_with_static_runtimes=yes
9198       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
9199
9200       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
9201         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
9202         # If the export-symbols file already is a .def file (1st line
9203         # is EXPORTS), use it as is; otherwise, prepend...
9204         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9205           cp $export_symbols $output_objdir/$soname.def;
9206         else
9207           echo EXPORTS > $output_objdir/$soname.def;
9208           cat $export_symbols >> $output_objdir/$soname.def;
9209         fi~
9210         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
9211       else
9212         ld_shlibs=no
9213       fi
9214       ;;
9215
9216     linux*)
9217       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9218         tmp_addflag=
9219         case $cc_basename,$host_cpu in
9220         pgcc*)                          # Portland Group C compiler
9221           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'
9222           tmp_addflag=' $pic_flag'
9223           ;;
9224         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
9225           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'
9226           tmp_addflag=' $pic_flag -Mnomain' ;;
9227         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
9228           tmp_addflag=' -i_dynamic' ;;
9229         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
9230           tmp_addflag=' -i_dynamic -nofor_main' ;;
9231         ifc* | ifort*)                  # Intel Fortran compiler
9232           tmp_addflag=' -nofor_main' ;;
9233         esac
9234         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9235
9236         if test $supports_anon_versioning = yes; then
9237           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
9238   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9239   $echo "local: *; };" >> $output_objdir/$libname.ver~
9240           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9241         fi
9242       else
9243         ld_shlibs=no
9244       fi
9245       ;;
9246
9247     netbsd*)
9248       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9249         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9250         wlarc=
9251       else
9252         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9253         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9254       fi
9255       ;;
9256
9257     solaris* | sysv5*)
9258       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
9259         ld_shlibs=no
9260         cat <<EOF 1>&2
9261
9262 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
9263 *** create shared libraries on Solaris systems.  Therefore, libtool
9264 *** is disabling shared libraries support.  We urge you to upgrade GNU
9265 *** binutils to release 2.9.1 or newer.  Another option is to modify
9266 *** your PATH or compiler configuration so that the native linker is
9267 *** used, and then restart.
9268
9269 EOF
9270       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9271         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9272         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9273       else
9274         ld_shlibs=no
9275       fi
9276       ;;
9277
9278     sunos4*)
9279       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9280       wlarc=
9281       hardcode_direct=yes
9282       hardcode_shlibpath_var=no
9283       ;;
9284
9285     *)
9286       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9287         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9288         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9289       else
9290         ld_shlibs=no
9291       fi
9292       ;;
9293     esac
9294
9295     if test "$ld_shlibs" = no; then
9296       runpath_var=
9297       hardcode_libdir_flag_spec=
9298       export_dynamic_flag_spec=
9299       whole_archive_flag_spec=
9300     fi
9301   else
9302     # PORTME fill in a description of your system's linker (not GNU ld)
9303     case $host_os in
9304     aix3*)
9305       allow_undefined_flag=unsupported
9306       always_export_symbols=yes
9307       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'
9308       # Note: this linker hardcodes the directories in LIBPATH if there
9309       # are no directories specified by -L.
9310       hardcode_minus_L=yes
9311       if test "$GCC" = yes && test -z "$link_static_flag"; then
9312         # Neither direct hardcoding nor static linking is supported with a
9313         # broken collect2.
9314         hardcode_direct=unsupported
9315       fi
9316       ;;
9317
9318     aix4* | aix5*)
9319       if test "$host_cpu" = ia64; then
9320         # On IA64, the linker does run time linking by default, so we don't
9321         # have to do anything special.
9322         aix_use_runtimelinking=no
9323         exp_sym_flag='-Bexport'
9324         no_entry_flag=""
9325       else
9326         # If we're using GNU nm, then we don't want the "-C" option.
9327         # -C means demangle to AIX nm, but means don't demangle with GNU nm
9328         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
9329           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'
9330         else
9331           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'
9332         fi
9333         aix_use_runtimelinking=no
9334
9335         # Test if we are trying to use run time linking or normal
9336         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9337         # need to do runtime linking.
9338         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
9339           for ld_flag in $LDFLAGS; do
9340           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
9341             aix_use_runtimelinking=yes
9342             break
9343           fi
9344           done
9345         esac
9346
9347         exp_sym_flag='-bexport'
9348         no_entry_flag='-bnoentry'
9349       fi
9350
9351       # When large executables or shared objects are built, AIX ld can
9352       # have problems creating the table of contents.  If linking a library
9353       # or program results in "error TOC overflow" add -mminimal-toc to
9354       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9355       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9356
9357       archive_cmds=''
9358       hardcode_direct=yes
9359       hardcode_libdir_separator=':'
9360       link_all_deplibs=yes
9361
9362       if test "$GCC" = yes; then
9363         case $host_os in aix4.[012]|aix4.[012].*)
9364         # We only want to do this on AIX 4.2 and lower, the check
9365         # below for broken collect2 doesn't work under 4.3+
9366           collect2name=`${CC} -print-prog-name=collect2`
9367           if test -f "$collect2name" && \
9368            strings "$collect2name" | grep resolve_lib_name >/dev/null
9369           then
9370           # We have reworked collect2
9371           hardcode_direct=yes
9372           else
9373           # We have old collect2
9374           hardcode_direct=unsupported
9375           # It fails to find uninstalled libraries when the uninstalled
9376           # path is not listed in the libpath.  Setting hardcode_minus_L
9377           # to unsupported forces relinking
9378           hardcode_minus_L=yes
9379           hardcode_libdir_flag_spec='-L$libdir'
9380           hardcode_libdir_separator=
9381           fi
9382         esac
9383         shared_flag='-shared'
9384         if test "$aix_use_runtimelinking" = yes; then
9385           shared_flag="$shared_flag "'${wl}-G'
9386         fi
9387       else
9388         # not using gcc
9389         if test "$host_cpu" = ia64; then
9390         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9391         # chokes on -Wl,-G. The following line is correct:
9392           shared_flag='-G'
9393         else
9394         if test "$aix_use_runtimelinking" = yes; then
9395             shared_flag='${wl}-G'
9396           else
9397             shared_flag='${wl}-bM:SRE'
9398         fi
9399         fi
9400       fi
9401
9402       # It seems that -bexpall does not export symbols beginning with
9403       # underscore (_), so it is better to generate a list of symbols to export.
9404       always_export_symbols=yes
9405       if test "$aix_use_runtimelinking" = yes; then
9406         # Warning - without using the other runtime loading flags (-brtl),
9407         # -berok will link without error, but may produce a broken library.
9408         allow_undefined_flag='-berok'
9409        # Determine the default libpath from the value encoded in an empty executable.
9410        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9411 /* end confdefs.h.  */
9412
9413 int
9414 main ()
9415 {
9416
9417   ;
9418   return 0;
9419 }
9420 _ACEOF
9421 if ac_fn_c_try_link "$LINENO"; then :
9422
9423 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9424 }'`
9425 # Check for a 64-bit object if we didn't find anything.
9426 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; }
9427 }'`; fi
9428 fi
9429 rm -f core conftest.err conftest.$ac_objext \
9430     conftest$ac_exeext conftest.$ac_ext
9431 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9432
9433        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9434         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"
9435        else
9436         if test "$host_cpu" = ia64; then
9437           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
9438           allow_undefined_flag="-z nodefs"
9439           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"
9440         else
9441          # Determine the default libpath from the value encoded in an empty executable.
9442          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9443 /* end confdefs.h.  */
9444
9445 int
9446 main ()
9447 {
9448
9449   ;
9450   return 0;
9451 }
9452 _ACEOF
9453 if ac_fn_c_try_link "$LINENO"; then :
9454
9455 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9456 }'`
9457 # Check for a 64-bit object if we didn't find anything.
9458 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; }
9459 }'`; fi
9460 fi
9461 rm -f core conftest.err conftest.$ac_objext \
9462     conftest$ac_exeext conftest.$ac_ext
9463 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9464
9465          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9466           # Warning - without using the other run time loading flags,
9467           # -berok will link without error, but may produce a broken library.
9468           no_undefined_flag=' ${wl}-bernotok'
9469           allow_undefined_flag=' ${wl}-berok'
9470           # -bexpall does not export symbols beginning with underscore (_)
9471           always_export_symbols=yes
9472           # Exported symbols can be pulled into shared objects from archives
9473           whole_archive_flag_spec=' '
9474           archive_cmds_need_lc=yes
9475           # This is similar to how AIX traditionally builds its shared libraries.
9476           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'
9477         fi
9478       fi
9479       ;;
9480
9481     amigaos*)
9482       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)'
9483       hardcode_libdir_flag_spec='-L$libdir'
9484       hardcode_minus_L=yes
9485       # see comment about different semantics on the GNU ld section
9486       ld_shlibs=no
9487       ;;
9488
9489     bsdi[45]*)
9490       export_dynamic_flag_spec=-rdynamic
9491       ;;
9492
9493     cygwin* | mingw* | pw32*)
9494       # When not using gcc, we currently assume that we are using
9495       # Microsoft Visual C++.
9496       # hardcode_libdir_flag_spec is actually meaningless, as there is
9497       # no search path for DLLs.
9498       hardcode_libdir_flag_spec=' '
9499       allow_undefined_flag=unsupported
9500       # Tell ltmain to make .lib files, not .a files.
9501       libext=lib
9502       # Tell ltmain to make .dll files, not .so files.
9503       shrext_cmds=".dll"
9504       # FIXME: Setting linknames here is a bad hack.
9505       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
9506       # The linker will automatically build a .lib file if we build a DLL.
9507       old_archive_From_new_cmds='true'
9508       # FIXME: Should let the user specify the lib program.
9509       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
9510       fix_srcfile_path='`cygpath -w "$srcfile"`'
9511       enable_shared_with_static_runtimes=yes
9512       ;;
9513
9514     darwin* | rhapsody*)
9515       case $host_os in
9516         rhapsody* | darwin1.[012])
9517          allow_undefined_flag='${wl}-undefined ${wl}suppress'
9518          ;;
9519        *) # Darwin 1.3 on
9520          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
9521            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9522          else
9523            case ${MACOSX_DEPLOYMENT_TARGET} in
9524              10.[012])
9525                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9526                ;;
9527              10.*)
9528                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
9529                ;;
9530            esac
9531          fi
9532          ;;
9533       esac
9534       archive_cmds_need_lc=no
9535       hardcode_direct=no
9536       hardcode_automatic=yes
9537       hardcode_shlibpath_var=unsupported
9538       whole_archive_flag_spec=''
9539       link_all_deplibs=yes
9540     if test "$GCC" = yes ; then
9541         output_verbose_link_cmd='echo'
9542         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
9543       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9544       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9545       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}'
9546       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}'
9547     else
9548       case $cc_basename in
9549         xlc*)
9550          output_verbose_link_cmd='echo'
9551          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
9552          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9553           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9554          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}'
9555           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}'
9556           ;;
9557        *)
9558          ld_shlibs=no
9559           ;;
9560       esac
9561     fi
9562       ;;
9563
9564     dgux*)
9565       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9566       hardcode_libdir_flag_spec='-L$libdir'
9567       hardcode_shlibpath_var=no
9568       ;;
9569
9570     freebsd1*)
9571       ld_shlibs=no
9572       ;;
9573
9574     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9575     # support.  Future versions do this automatically, but an explicit c++rt0.o
9576     # does not break anything, and helps significantly (at the cost of a little
9577     # extra space).
9578     freebsd2.2*)
9579       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9580       hardcode_libdir_flag_spec='-R$libdir'
9581       hardcode_direct=yes
9582       hardcode_shlibpath_var=no
9583       ;;
9584
9585     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9586     freebsd2*)
9587       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9588       hardcode_direct=yes
9589       hardcode_minus_L=yes
9590       hardcode_shlibpath_var=no
9591       ;;
9592
9593     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9594     freebsd* | kfreebsd*-gnu | dragonfly*)
9595       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9596       hardcode_libdir_flag_spec='-R$libdir'
9597       hardcode_direct=yes
9598       hardcode_shlibpath_var=no
9599       ;;
9600
9601     hpux9*)
9602       if test "$GCC" = yes; then
9603         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'
9604       else
9605         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'
9606       fi
9607       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9608       hardcode_libdir_separator=:
9609       hardcode_direct=yes
9610
9611       # hardcode_minus_L: Not really in the search PATH,
9612       # but as the default location of the library.
9613       hardcode_minus_L=yes
9614       export_dynamic_flag_spec='${wl}-E'
9615       ;;
9616
9617     hpux10* | hpux11*)
9618       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9619         case $host_cpu in
9620         hppa*64*|ia64*)
9621           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9622           ;;
9623         *)
9624           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9625           ;;
9626         esac
9627       else
9628         case $host_cpu in
9629         hppa*64*|ia64*)
9630           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
9631           ;;
9632         *)
9633           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9634           ;;
9635         esac
9636       fi
9637       if test "$with_gnu_ld" = no; then
9638         case $host_cpu in
9639         hppa*64*)
9640           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9641           hardcode_libdir_flag_spec_ld='+b $libdir'
9642           hardcode_libdir_separator=:
9643           hardcode_direct=no
9644           hardcode_shlibpath_var=no
9645           ;;
9646         ia64*)
9647           hardcode_libdir_flag_spec='-L$libdir'
9648           hardcode_direct=no
9649           hardcode_shlibpath_var=no
9650
9651           # hardcode_minus_L: Not really in the search PATH,
9652           # but as the default location of the library.
9653           hardcode_minus_L=yes
9654           ;;
9655         *)
9656           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9657           hardcode_libdir_separator=:
9658           hardcode_direct=yes
9659           export_dynamic_flag_spec='${wl}-E'
9660
9661           # hardcode_minus_L: Not really in the search PATH,
9662           # but as the default location of the library.
9663           hardcode_minus_L=yes
9664           ;;
9665         esac
9666       fi
9667       ;;
9668
9669     irix5* | irix6* | nonstopux*)
9670       if test "$GCC" = yes; then
9671         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'
9672       else
9673         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'
9674         hardcode_libdir_flag_spec_ld='-rpath $libdir'
9675       fi
9676       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9677       hardcode_libdir_separator=:
9678       link_all_deplibs=yes
9679       ;;
9680
9681     netbsd*)
9682       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9683         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
9684       else
9685         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
9686       fi
9687       hardcode_libdir_flag_spec='-R$libdir'
9688       hardcode_direct=yes
9689       hardcode_shlibpath_var=no
9690       ;;
9691
9692     newsos6)
9693       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9694       hardcode_direct=yes
9695       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9696       hardcode_libdir_separator=:
9697       hardcode_shlibpath_var=no
9698       ;;
9699
9700     openbsd*)
9701       hardcode_direct=yes
9702       hardcode_shlibpath_var=no
9703       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9704         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9705         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9706         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9707         export_dynamic_flag_spec='${wl}-E'
9708       else
9709        case $host_os in
9710          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9711            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9712            hardcode_libdir_flag_spec='-R$libdir'
9713            ;;
9714          *)
9715            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9716            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9717            ;;
9718        esac
9719       fi
9720       ;;
9721
9722     os2*)
9723       hardcode_libdir_flag_spec='-L$libdir'
9724       hardcode_minus_L=yes
9725       allow_undefined_flag=unsupported
9726       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'
9727       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9728       ;;
9729
9730     osf3*)
9731       if test "$GCC" = yes; then
9732         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9733         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'
9734       else
9735         allow_undefined_flag=' -expect_unresolved \*'
9736         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'
9737       fi
9738       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9739       hardcode_libdir_separator=:
9740       ;;
9741
9742     osf4* | osf5*)      # as osf3* with the addition of -msym flag
9743       if test "$GCC" = yes; then
9744         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9745         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'
9746         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9747       else
9748         allow_undefined_flag=' -expect_unresolved \*'
9749         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'
9750         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
9751         $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'
9752
9753         # Both c and cxx compiler support -rpath directly
9754         hardcode_libdir_flag_spec='-rpath $libdir'
9755       fi
9756       hardcode_libdir_separator=:
9757       ;;
9758
9759     sco3.2v5*)
9760       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9761       hardcode_shlibpath_var=no
9762       export_dynamic_flag_spec='${wl}-Bexport'
9763       runpath_var=LD_RUN_PATH
9764       hardcode_runpath_var=yes
9765       ;;
9766
9767     solaris*)
9768       no_undefined_flag=' -z text'
9769       if test "$GCC" = yes; then
9770         wlarc='${wl}'
9771         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9772         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9773           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
9774       else
9775         wlarc=''
9776         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9777         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9778         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9779       fi
9780       hardcode_libdir_flag_spec='-R$libdir'
9781       hardcode_shlibpath_var=no
9782       case $host_os in
9783       solaris2.[0-5] | solaris2.[0-5].*) ;;
9784       *)
9785         # The compiler driver will combine linker options so we
9786         # cannot just pass the convience library names through
9787         # without $wl, iff we do not link with $LD.
9788         # Luckily, gcc supports the same syntax we need for Sun Studio.
9789         # Supported since Solaris 2.6 (maybe 2.5.1?)
9790         case $wlarc in
9791         '')
9792           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
9793         *)
9794           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' ;;
9795         esac ;;
9796       esac
9797       link_all_deplibs=yes
9798       ;;
9799
9800     sunos4*)
9801       if test "x$host_vendor" = xsequent; then
9802         # Use $CC to link under sequent, because it throws in some extra .o
9803         # files that make .init and .fini sections work.
9804         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9805       else
9806         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9807       fi
9808       hardcode_libdir_flag_spec='-L$libdir'
9809       hardcode_direct=yes
9810       hardcode_minus_L=yes
9811       hardcode_shlibpath_var=no
9812       ;;
9813
9814     sysv4)
9815       case $host_vendor in
9816         sni)
9817           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9818           hardcode_direct=yes # is this really true???
9819         ;;
9820         siemens)
9821           ## LD is ld it makes a PLAMLIB
9822           ## CC just makes a GrossModule.
9823           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9824           reload_cmds='$CC -r -o $output$reload_objs'
9825           hardcode_direct=no
9826         ;;
9827         motorola)
9828           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9829           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9830         ;;
9831       esac
9832       runpath_var='LD_RUN_PATH'
9833       hardcode_shlibpath_var=no
9834       ;;
9835
9836     sysv4.3*)
9837       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9838       hardcode_shlibpath_var=no
9839       export_dynamic_flag_spec='-Bexport'
9840       ;;
9841
9842     sysv4*MP*)
9843       if test -d /usr/nec; then
9844         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9845         hardcode_shlibpath_var=no
9846         runpath_var=LD_RUN_PATH
9847         hardcode_runpath_var=yes
9848         ld_shlibs=yes
9849       fi
9850       ;;
9851
9852     sysv4.2uw2*)
9853       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9854       hardcode_direct=yes
9855       hardcode_minus_L=no
9856       hardcode_shlibpath_var=no
9857       hardcode_runpath_var=yes
9858       runpath_var=LD_RUN_PATH
9859       ;;
9860
9861    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
9862       no_undefined_flag='${wl}-z ${wl}text'
9863       if test "$GCC" = yes; then
9864         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9865       else
9866         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9867       fi
9868       runpath_var='LD_RUN_PATH'
9869       hardcode_shlibpath_var=no
9870       ;;
9871
9872     sysv5*)
9873       no_undefined_flag=' -z text'
9874       # $CC -shared without GNU ld will not create a library from C++
9875       # object files and a static libstdc++, better avoid it by now
9876       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9877       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9878                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9879       hardcode_libdir_flag_spec=
9880       hardcode_shlibpath_var=no
9881       runpath_var='LD_RUN_PATH'
9882       ;;
9883
9884     uts4*)
9885       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9886       hardcode_libdir_flag_spec='-L$libdir'
9887       hardcode_shlibpath_var=no
9888       ;;
9889
9890     *)
9891       ld_shlibs=no
9892       ;;
9893     esac
9894   fi
9895
9896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
9897 $as_echo "$ld_shlibs" >&6; }
9898 test "$ld_shlibs" = no && can_build_shared=no
9899
9900 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9901 if test "$GCC" = yes; then
9902   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9903 fi
9904
9905 #
9906 # Do we need to explicitly link libc?
9907 #
9908 case "x$archive_cmds_need_lc" in
9909 x|xyes)
9910   # Assume -lc should be added
9911   archive_cmds_need_lc=yes
9912
9913   if test "$enable_shared" = yes && test "$GCC" = yes; then
9914     case $archive_cmds in
9915     *'~'*)
9916       # FIXME: we may have to deal with multi-command sequences.
9917       ;;
9918     '$CC '*)
9919       # Test whether the compiler implicitly links with -lc since on some
9920       # systems, -lgcc has to come before -lc. If gcc already passes -lc
9921       # to ld, don't add -lc before -lgcc.
9922       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
9923 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
9924       $rm conftest*
9925       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
9926
9927       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9928   (eval $ac_compile) 2>&5
9929   ac_status=$?
9930   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9931   test $ac_status = 0; } 2>conftest.err; then
9932         soname=conftest
9933         lib=conftest
9934         libobjs=conftest.$ac_objext
9935         deplibs=
9936         wl=$lt_prog_compiler_wl
9937         compiler_flags=-v
9938         linker_flags=-v
9939         verstring=
9940         output_objdir=.
9941         libname=conftest
9942         lt_save_allow_undefined_flag=$allow_undefined_flag
9943         allow_undefined_flag=
9944         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9945   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
9946   ac_status=$?
9947   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9948   test $ac_status = 0; }
9949         then
9950           archive_cmds_need_lc=no
9951         else
9952           archive_cmds_need_lc=yes
9953         fi
9954         allow_undefined_flag=$lt_save_allow_undefined_flag
9955       else
9956         cat conftest.err 1>&5
9957       fi
9958       $rm conftest*
9959       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
9960 $as_echo "$archive_cmds_need_lc" >&6; }
9961       ;;
9962     esac
9963   fi
9964   ;;
9965 esac
9966
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
9968 $as_echo_n "checking dynamic linker characteristics... " >&6; }
9969 library_names_spec=
9970 libname_spec='lib$name'
9971 soname_spec=
9972 shrext_cmds=".so"
9973 postinstall_cmds=
9974 postuninstall_cmds=
9975 finish_cmds=
9976 finish_eval=
9977 shlibpath_var=
9978 shlibpath_overrides_runpath=unknown
9979 version_type=none
9980 dynamic_linker="$host_os ld.so"
9981 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9982 if test "$GCC" = yes; then
9983   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9984   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9985     # if the path contains ";" then we assume it to be the separator
9986     # otherwise default to the standard path separator (i.e. ":") - it is
9987     # assumed that no part of a normal pathname contains ";" but that should
9988     # okay in the real world where ";" in dirpaths is itself problematic.
9989     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9990   else
9991     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9992   fi
9993 else
9994   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9995 fi
9996 need_lib_prefix=unknown
9997 hardcode_into_libs=no
9998
9999 # when you set need_version to no, make sure it does not cause -set_version
10000 # flags to be left without arguments
10001 need_version=unknown
10002
10003 case $host_os in
10004 aix3*)
10005   version_type=linux
10006   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
10007   shlibpath_var=LIBPATH
10008
10009   # AIX 3 has no versioning support, so we append a major version to the name.
10010   soname_spec='${libname}${release}${shared_ext}$major'
10011   ;;
10012
10013 aix4* | aix5*)
10014   version_type=linux
10015   need_lib_prefix=no
10016   need_version=no
10017   hardcode_into_libs=yes
10018   if test "$host_cpu" = ia64; then
10019     # AIX 5 supports IA64
10020     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
10021     shlibpath_var=LD_LIBRARY_PATH
10022   else
10023     # With GCC up to 2.95.x, collect2 would create an import file
10024     # for dependence libraries.  The import file would start with
10025     # the line `#! .'.  This would cause the generated library to
10026     # depend on `.', always an invalid library.  This was fixed in
10027     # development snapshots of GCC prior to 3.0.
10028     case $host_os in
10029       aix4 | aix4.[01] | aix4.[01].*)
10030       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
10031            echo ' yes '
10032            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
10033         :
10034       else
10035         can_build_shared=no
10036       fi
10037       ;;
10038     esac
10039     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
10040     # soname into executable. Probably we can add versioning support to
10041     # collect2, so additional links can be useful in future.
10042     if test "$aix_use_runtimelinking" = yes; then
10043       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
10044       # instead of lib<name>.a to let people know that these are not
10045       # typical AIX shared libraries.
10046       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10047     else
10048       # We preserve .a as extension for shared libraries through AIX4.2
10049       # and later when we are not doing run time linking.
10050       library_names_spec='${libname}${release}.a $libname.a'
10051       soname_spec='${libname}${release}${shared_ext}$major'
10052     fi
10053     shlibpath_var=LIBPATH
10054   fi
10055   ;;
10056
10057 amigaos*)
10058   library_names_spec='$libname.ixlibrary $libname.a'
10059   # Create ${libname}_ixlibrary.a entries in /sys/libs.
10060   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'
10061   ;;
10062
10063 beos*)
10064   library_names_spec='${libname}${shared_ext}'
10065   dynamic_linker="$host_os ld.so"
10066   shlibpath_var=LIBRARY_PATH
10067   ;;
10068
10069 bsdi[45]*)
10070   version_type=linux
10071   need_version=no
10072   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10073   soname_spec='${libname}${release}${shared_ext}$major'
10074   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
10075   shlibpath_var=LD_LIBRARY_PATH
10076   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
10077   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
10078   # the default ld.so.conf also contains /usr/contrib/lib and
10079   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
10080   # libtool to hard-code these into programs
10081   ;;
10082
10083 cygwin* | mingw* | pw32*)
10084   version_type=windows
10085   shrext_cmds=".dll"
10086   need_version=no
10087   need_lib_prefix=no
10088
10089   case $GCC,$host_os in
10090   yes,cygwin* | yes,mingw* | yes,pw32*)
10091     library_names_spec='$libname.dll.a'
10092     # DLL is installed to $(libdir)/../bin by postinstall_cmds
10093     postinstall_cmds='base_file=`basename \${file}`~
10094       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
10095       dldir=$destdir/`dirname \$dlpath`~
10096       test -d \$dldir || mkdir -p \$dldir~
10097       $install_prog $dir/$dlname \$dldir/$dlname~
10098       chmod a+x \$dldir/$dlname'
10099     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10100       dlpath=$dir/\$dldll~
10101        $rm \$dlpath'
10102     shlibpath_overrides_runpath=yes
10103
10104     case $host_os in
10105     cygwin*)
10106       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
10107       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10108       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
10109       ;;
10110     mingw*)
10111       # MinGW DLLs use traditional 'lib' prefix
10112       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10113       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
10114       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
10115         # It is most probably a Windows format PATH printed by
10116         # mingw gcc, but we are running on Cygwin. Gcc prints its search
10117         # path with ; separators, and with drive letters. We can handle the
10118         # drive letters (cygwin fileutils understands them), so leave them,
10119         # especially as we might pass files found there to a mingw objdump,
10120         # which wouldn't understand a cygwinified path. Ahh.
10121         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10122       else
10123         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
10124       fi
10125       ;;
10126     pw32*)
10127       # pw32 DLLs use 'pw' prefix rather than 'lib'
10128       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10129       ;;
10130     esac
10131     ;;
10132
10133   *)
10134     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10135     ;;
10136   esac
10137   dynamic_linker='Win32 ld.exe'
10138   # FIXME: first we should search . and the directory the executable is in
10139   shlibpath_var=PATH
10140   ;;
10141
10142 darwin* | rhapsody*)
10143   dynamic_linker="$host_os dyld"
10144   version_type=darwin
10145   need_lib_prefix=no
10146   need_version=no
10147   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
10148   soname_spec='${libname}${release}${major}$shared_ext'
10149   shlibpath_overrides_runpath=yes
10150   shlibpath_var=DYLD_LIBRARY_PATH
10151   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10152   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
10153   if test "$GCC" = yes; then
10154     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"`
10155   else
10156     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
10157   fi
10158   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10159   ;;
10160
10161 dgux*)
10162   version_type=linux
10163   need_lib_prefix=no
10164   need_version=no
10165   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10166   soname_spec='${libname}${release}${shared_ext}$major'
10167   shlibpath_var=LD_LIBRARY_PATH
10168   ;;
10169
10170 freebsd1*)
10171   dynamic_linker=no
10172   ;;
10173
10174 kfreebsd*-gnu)
10175   version_type=linux
10176   need_lib_prefix=no
10177   need_version=no
10178   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10179   soname_spec='${libname}${release}${shared_ext}$major'
10180   shlibpath_var=LD_LIBRARY_PATH
10181   shlibpath_overrides_runpath=no
10182   hardcode_into_libs=yes
10183   dynamic_linker='GNU ld.so'
10184   ;;
10185
10186 freebsd* | dragonfly*)
10187   # DragonFly does not have aout.  When/if they implement a new
10188   # versioning mechanism, adjust this.
10189   if test -x /usr/bin/objformat; then
10190     objformat=`/usr/bin/objformat`
10191   else
10192     case $host_os in
10193     freebsd[123]*) objformat=aout ;;
10194     *) objformat=elf ;;
10195     esac
10196   fi
10197   version_type=freebsd-$objformat
10198   case $version_type in
10199     freebsd-elf*)
10200       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10201       need_version=no
10202       need_lib_prefix=no
10203       ;;
10204     freebsd-*)
10205       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
10206       need_version=yes
10207       ;;
10208   esac
10209   shlibpath_var=LD_LIBRARY_PATH
10210   case $host_os in
10211   freebsd2*)
10212     shlibpath_overrides_runpath=yes
10213     ;;
10214   freebsd3.[01]* | freebsdelf3.[01]*)
10215     shlibpath_overrides_runpath=yes
10216     hardcode_into_libs=yes
10217     ;;
10218   *) # from 3.2 on
10219     shlibpath_overrides_runpath=no
10220     hardcode_into_libs=yes
10221     ;;
10222   esac
10223   ;;
10224
10225 gnu*)
10226   version_type=linux
10227   need_lib_prefix=no
10228   need_version=no
10229   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10230   soname_spec='${libname}${release}${shared_ext}$major'
10231   shlibpath_var=LD_LIBRARY_PATH
10232   hardcode_into_libs=yes
10233   ;;
10234
10235 hpux9* | hpux10* | hpux11*)
10236   # Give a soname corresponding to the major version so that dld.sl refuses to
10237   # link against other versions.
10238   version_type=sunos
10239   need_lib_prefix=no
10240   need_version=no
10241   case $host_cpu in
10242   ia64*)
10243     shrext_cmds='.so'
10244     hardcode_into_libs=yes
10245     dynamic_linker="$host_os dld.so"
10246     shlibpath_var=LD_LIBRARY_PATH
10247     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10248     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10249     soname_spec='${libname}${release}${shared_ext}$major'
10250     if test "X$HPUX_IA64_MODE" = X32; then
10251       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10252     else
10253       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10254     fi
10255     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10256     ;;
10257    hppa*64*)
10258      shrext_cmds='.sl'
10259      hardcode_into_libs=yes
10260      dynamic_linker="$host_os dld.sl"
10261      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10262      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10263      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10264      soname_spec='${libname}${release}${shared_ext}$major'
10265      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10266      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10267      ;;
10268    *)
10269     shrext_cmds='.sl'
10270     dynamic_linker="$host_os dld.sl"
10271     shlibpath_var=SHLIB_PATH
10272     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10273     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10274     soname_spec='${libname}${release}${shared_ext}$major'
10275     ;;
10276   esac
10277   # HP-UX runs *really* slowly unless shared libraries are mode 555.
10278   postinstall_cmds='chmod 555 $lib'
10279   ;;
10280
10281 irix5* | irix6* | nonstopux*)
10282   case $host_os in
10283     nonstopux*) version_type=nonstopux ;;
10284     *)
10285         if test "$lt_cv_prog_gnu_ld" = yes; then
10286                 version_type=linux
10287         else
10288                 version_type=irix
10289         fi ;;
10290   esac
10291   need_lib_prefix=no
10292   need_version=no
10293   soname_spec='${libname}${release}${shared_ext}$major'
10294   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
10295   case $host_os in
10296   irix5* | nonstopux*)
10297     libsuff= shlibsuff=
10298     ;;
10299   *)
10300     case $LD in # libtool.m4 will add one of these switches to LD
10301     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10302       libsuff= shlibsuff= libmagic=32-bit;;
10303     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10304       libsuff=32 shlibsuff=N32 libmagic=N32;;
10305     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10306       libsuff=64 shlibsuff=64 libmagic=64-bit;;
10307     *) libsuff= shlibsuff= libmagic=never-match;;
10308     esac
10309     ;;
10310   esac
10311   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10312   shlibpath_overrides_runpath=no
10313   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10314   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
10315   hardcode_into_libs=yes
10316   ;;
10317
10318 # No shared lib support for Linux oldld, aout, or coff.
10319 linux*oldld* | linux*aout* | linux*coff*)
10320   dynamic_linker=no
10321   ;;
10322
10323 # This must be Linux ELF.
10324 linux*)
10325   version_type=linux
10326   need_lib_prefix=no
10327   need_version=no
10328   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10329   soname_spec='${libname}${release}${shared_ext}$major'
10330   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10331   shlibpath_var=LD_LIBRARY_PATH
10332   shlibpath_overrides_runpath=no
10333   # This implies no fast_install, which is unacceptable.
10334   # Some rework will be needed to allow for fast_install
10335   # before this can be enabled.
10336   hardcode_into_libs=yes
10337
10338   # Append ld.so.conf contents to the search path
10339   if test -f /etc/ld.so.conf; then
10340     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' ' '`
10341     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10342   fi
10343
10344   # We used to test for /lib/ld.so.1 and disable shared libraries on
10345   # powerpc, because MkLinux only supported shared libraries with the
10346   # GNU dynamic linker.  Since this was broken with cross compilers,
10347   # most powerpc-linux boxes support dynamic linking these days and
10348   # people can always --disable-shared, the test was removed, and we
10349   # assume the GNU/Linux dynamic linker is in use.
10350   dynamic_linker='GNU/Linux ld.so'
10351   ;;
10352
10353 knetbsd*-gnu)
10354   version_type=linux
10355   need_lib_prefix=no
10356   need_version=no
10357   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10358   soname_spec='${libname}${release}${shared_ext}$major'
10359   shlibpath_var=LD_LIBRARY_PATH
10360   shlibpath_overrides_runpath=no
10361   hardcode_into_libs=yes
10362   dynamic_linker='GNU ld.so'
10363   ;;
10364
10365 netbsd*)
10366   version_type=sunos
10367   need_lib_prefix=no
10368   need_version=no
10369   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10370     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10371     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10372     dynamic_linker='NetBSD (a.out) ld.so'
10373   else
10374     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10375     soname_spec='${libname}${release}${shared_ext}$major'
10376     dynamic_linker='NetBSD ld.elf_so'
10377   fi
10378   shlibpath_var=LD_LIBRARY_PATH
10379   shlibpath_overrides_runpath=yes
10380   hardcode_into_libs=yes
10381   ;;
10382
10383 newsos6)
10384   version_type=linux
10385   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10386   shlibpath_var=LD_LIBRARY_PATH
10387   shlibpath_overrides_runpath=yes
10388   ;;
10389
10390 nto-qnx*)
10391   version_type=linux
10392   need_lib_prefix=no
10393   need_version=no
10394   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10395   soname_spec='${libname}${release}${shared_ext}$major'
10396   shlibpath_var=LD_LIBRARY_PATH
10397   shlibpath_overrides_runpath=yes
10398   ;;
10399
10400 openbsd*)
10401   version_type=sunos
10402   need_lib_prefix=no
10403   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10404   case $host_os in
10405     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10406     *)                         need_version=no  ;;
10407   esac
10408   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10409   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10410   shlibpath_var=LD_LIBRARY_PATH
10411   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10412     case $host_os in
10413       openbsd2.[89] | openbsd2.[89].*)
10414         shlibpath_overrides_runpath=no
10415         ;;
10416       *)
10417         shlibpath_overrides_runpath=yes
10418         ;;
10419       esac
10420   else
10421     shlibpath_overrides_runpath=yes
10422   fi
10423   ;;
10424
10425 os2*)
10426   libname_spec='$name'
10427   shrext_cmds=".dll"
10428   need_lib_prefix=no
10429   library_names_spec='$libname${shared_ext} $libname.a'
10430   dynamic_linker='OS/2 ld.exe'
10431   shlibpath_var=LIBPATH
10432   ;;
10433
10434 osf3* | osf4* | osf5*)
10435   version_type=osf
10436   need_lib_prefix=no
10437   need_version=no
10438   soname_spec='${libname}${release}${shared_ext}$major'
10439   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10440   shlibpath_var=LD_LIBRARY_PATH
10441   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10442   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
10443   ;;
10444
10445 sco3.2v5*)
10446   version_type=osf
10447   soname_spec='${libname}${release}${shared_ext}$major'
10448   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10449   shlibpath_var=LD_LIBRARY_PATH
10450   ;;
10451
10452 solaris*)
10453   version_type=linux
10454   need_lib_prefix=no
10455   need_version=no
10456   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10457   soname_spec='${libname}${release}${shared_ext}$major'
10458   shlibpath_var=LD_LIBRARY_PATH
10459   shlibpath_overrides_runpath=yes
10460   hardcode_into_libs=yes
10461   # ldd complains unless libraries are executable
10462   postinstall_cmds='chmod +x $lib'
10463   ;;
10464
10465 sunos4*)
10466   version_type=sunos
10467   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10468   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10469   shlibpath_var=LD_LIBRARY_PATH
10470   shlibpath_overrides_runpath=yes
10471   if test "$with_gnu_ld" = yes; then
10472     need_lib_prefix=no
10473   fi
10474   need_version=yes
10475   ;;
10476
10477 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10478   version_type=linux
10479   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10480   soname_spec='${libname}${release}${shared_ext}$major'
10481   shlibpath_var=LD_LIBRARY_PATH
10482   case $host_vendor in
10483     sni)
10484       shlibpath_overrides_runpath=no
10485       need_lib_prefix=no
10486       export_dynamic_flag_spec='${wl}-Blargedynsym'
10487       runpath_var=LD_RUN_PATH
10488       ;;
10489     siemens)
10490       need_lib_prefix=no
10491       ;;
10492     motorola)
10493       need_lib_prefix=no
10494       need_version=no
10495       shlibpath_overrides_runpath=no
10496       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10497       ;;
10498   esac
10499   ;;
10500
10501 sysv4*MP*)
10502   if test -d /usr/nec ;then
10503     version_type=linux
10504     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
10505     soname_spec='$libname${shared_ext}.$major'
10506     shlibpath_var=LD_LIBRARY_PATH
10507   fi
10508   ;;
10509
10510 uts4*)
10511   version_type=linux
10512   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10513   soname_spec='${libname}${release}${shared_ext}$major'
10514   shlibpath_var=LD_LIBRARY_PATH
10515   ;;
10516
10517 *)
10518   dynamic_linker=no
10519   ;;
10520 esac
10521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
10522 $as_echo "$dynamic_linker" >&6; }
10523 test "$dynamic_linker" = no && can_build_shared=no
10524
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
10526 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
10527 hardcode_action=
10528 if test -n "$hardcode_libdir_flag_spec" || \
10529    test -n "$runpath_var" || \
10530    test "X$hardcode_automatic" = "Xyes" ; then
10531
10532   # We can hardcode non-existant directories.
10533   if test "$hardcode_direct" != no &&
10534      # If the only mechanism to avoid hardcoding is shlibpath_var, we
10535      # have to relink, otherwise we might link with an installed library
10536      # when we should be linking with a yet-to-be-installed one
10537      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
10538      test "$hardcode_minus_L" != no; then
10539     # Linking always hardcodes the temporary library directory.
10540     hardcode_action=relink
10541   else
10542     # We can link without hardcoding, and we can hardcode nonexisting dirs.
10543     hardcode_action=immediate
10544   fi
10545 else
10546   # We cannot hardcode anything, or else we can only hardcode existing
10547   # directories.
10548   hardcode_action=unsupported
10549 fi
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
10551 $as_echo "$hardcode_action" >&6; }
10552
10553 if test "$hardcode_action" = relink; then
10554   # Fast installation is not supported
10555   enable_fast_install=no
10556 elif test "$shlibpath_overrides_runpath" = yes ||
10557      test "$enable_shared" = no; then
10558   # Fast installation is not necessary
10559   enable_fast_install=needless
10560 fi
10561
10562 striplib=
10563 old_striplib=
10564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
10565 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
10566 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
10567   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
10568   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
10569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10570 $as_echo "yes" >&6; }
10571 else
10572 # FIXME - insert some real tests, host_os isn't really good enough
10573   case $host_os in
10574    darwin*)
10575        if test -n "$STRIP" ; then
10576          striplib="$STRIP -x"
10577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10578 $as_echo "yes" >&6; }
10579        else
10580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10581 $as_echo "no" >&6; }
10582 fi
10583        ;;
10584    *)
10585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10586 $as_echo "no" >&6; }
10587     ;;
10588   esac
10589 fi
10590
10591 if test "x$enable_dlopen" != xyes; then
10592   enable_dlopen=unknown
10593   enable_dlopen_self=unknown
10594   enable_dlopen_self_static=unknown
10595 else
10596   lt_cv_dlopen=no
10597   lt_cv_dlopen_libs=
10598
10599   case $host_os in
10600   beos*)
10601     lt_cv_dlopen="load_add_on"
10602     lt_cv_dlopen_libs=
10603     lt_cv_dlopen_self=yes
10604     ;;
10605
10606   mingw* | pw32*)
10607     lt_cv_dlopen="LoadLibrary"
10608     lt_cv_dlopen_libs=
10609    ;;
10610
10611   cygwin*)
10612     lt_cv_dlopen="dlopen"
10613     lt_cv_dlopen_libs=
10614    ;;
10615
10616   darwin*)
10617   # if libdl is installed we need to link against it
10618     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10619 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10620 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10621   $as_echo_n "(cached) " >&6
10622 else
10623   ac_check_lib_save_LIBS=$LIBS
10624 LIBS="-ldl  $LIBS"
10625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10626 /* end confdefs.h.  */
10627
10628 /* Override any GCC internal prototype to avoid an error.
10629    Use char because int might match the return type of a GCC
10630    builtin and then its argument prototype would still apply.  */
10631 #ifdef __cplusplus
10632 extern "C"
10633 #endif
10634 char dlopen ();
10635 int
10636 main ()
10637 {
10638 return dlopen ();
10639   ;
10640   return 0;
10641 }
10642 _ACEOF
10643 if ac_fn_c_try_link "$LINENO"; then :
10644   ac_cv_lib_dl_dlopen=yes
10645 else
10646   ac_cv_lib_dl_dlopen=no
10647 fi
10648 rm -f core conftest.err conftest.$ac_objext \
10649     conftest$ac_exeext conftest.$ac_ext
10650 LIBS=$ac_check_lib_save_LIBS
10651 fi
10652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10653 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10654 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10655   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10656 else
10657
10658     lt_cv_dlopen="dyld"
10659     lt_cv_dlopen_libs=
10660     lt_cv_dlopen_self=yes
10661
10662 fi
10663
10664    ;;
10665
10666   *)
10667     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
10668 if test "x$ac_cv_func_shl_load" = x""yes; then :
10669   lt_cv_dlopen="shl_load"
10670 else
10671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10672 $as_echo_n "checking for shl_load in -ldld... " >&6; }
10673 if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
10674   $as_echo_n "(cached) " >&6
10675 else
10676   ac_check_lib_save_LIBS=$LIBS
10677 LIBS="-ldld  $LIBS"
10678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10679 /* end confdefs.h.  */
10680
10681 /* Override any GCC internal prototype to avoid an error.
10682    Use char because int might match the return type of a GCC
10683    builtin and then its argument prototype would still apply.  */
10684 #ifdef __cplusplus
10685 extern "C"
10686 #endif
10687 char shl_load ();
10688 int
10689 main ()
10690 {
10691 return shl_load ();
10692   ;
10693   return 0;
10694 }
10695 _ACEOF
10696 if ac_fn_c_try_link "$LINENO"; then :
10697   ac_cv_lib_dld_shl_load=yes
10698 else
10699   ac_cv_lib_dld_shl_load=no
10700 fi
10701 rm -f core conftest.err conftest.$ac_objext \
10702     conftest$ac_exeext conftest.$ac_ext
10703 LIBS=$ac_check_lib_save_LIBS
10704 fi
10705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
10706 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
10707 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
10708   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
10709 else
10710   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
10711 if test "x$ac_cv_func_dlopen" = x""yes; then :
10712   lt_cv_dlopen="dlopen"
10713 else
10714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10715 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10716 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10717   $as_echo_n "(cached) " >&6
10718 else
10719   ac_check_lib_save_LIBS=$LIBS
10720 LIBS="-ldl  $LIBS"
10721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10722 /* end confdefs.h.  */
10723
10724 /* Override any GCC internal prototype to avoid an error.
10725    Use char because int might match the return type of a GCC
10726    builtin and then its argument prototype would still apply.  */
10727 #ifdef __cplusplus
10728 extern "C"
10729 #endif
10730 char dlopen ();
10731 int
10732 main ()
10733 {
10734 return dlopen ();
10735   ;
10736   return 0;
10737 }
10738 _ACEOF
10739 if ac_fn_c_try_link "$LINENO"; then :
10740   ac_cv_lib_dl_dlopen=yes
10741 else
10742   ac_cv_lib_dl_dlopen=no
10743 fi
10744 rm -f core conftest.err conftest.$ac_objext \
10745     conftest$ac_exeext conftest.$ac_ext
10746 LIBS=$ac_check_lib_save_LIBS
10747 fi
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10749 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10750 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10751   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10752 else
10753   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
10754 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
10755 if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
10756   $as_echo_n "(cached) " >&6
10757 else
10758   ac_check_lib_save_LIBS=$LIBS
10759 LIBS="-lsvld  $LIBS"
10760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10761 /* end confdefs.h.  */
10762
10763 /* Override any GCC internal prototype to avoid an error.
10764    Use char because int might match the return type of a GCC
10765    builtin and then its argument prototype would still apply.  */
10766 #ifdef __cplusplus
10767 extern "C"
10768 #endif
10769 char dlopen ();
10770 int
10771 main ()
10772 {
10773 return dlopen ();
10774   ;
10775   return 0;
10776 }
10777 _ACEOF
10778 if ac_fn_c_try_link "$LINENO"; then :
10779   ac_cv_lib_svld_dlopen=yes
10780 else
10781   ac_cv_lib_svld_dlopen=no
10782 fi
10783 rm -f core conftest.err conftest.$ac_objext \
10784     conftest$ac_exeext conftest.$ac_ext
10785 LIBS=$ac_check_lib_save_LIBS
10786 fi
10787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
10788 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
10789 if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
10790   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10791 else
10792   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
10793 $as_echo_n "checking for dld_link in -ldld... " >&6; }
10794 if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
10795   $as_echo_n "(cached) " >&6
10796 else
10797   ac_check_lib_save_LIBS=$LIBS
10798 LIBS="-ldld  $LIBS"
10799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10800 /* end confdefs.h.  */
10801
10802 /* Override any GCC internal prototype to avoid an error.
10803    Use char because int might match the return type of a GCC
10804    builtin and then its argument prototype would still apply.  */
10805 #ifdef __cplusplus
10806 extern "C"
10807 #endif
10808 char dld_link ();
10809 int
10810 main ()
10811 {
10812 return dld_link ();
10813   ;
10814   return 0;
10815 }
10816 _ACEOF
10817 if ac_fn_c_try_link "$LINENO"; then :
10818   ac_cv_lib_dld_dld_link=yes
10819 else
10820   ac_cv_lib_dld_dld_link=no
10821 fi
10822 rm -f core conftest.err conftest.$ac_objext \
10823     conftest$ac_exeext conftest.$ac_ext
10824 LIBS=$ac_check_lib_save_LIBS
10825 fi
10826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
10827 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
10828 if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
10829   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10830 fi
10831
10832
10833 fi
10834
10835
10836 fi
10837
10838
10839 fi
10840
10841
10842 fi
10843
10844
10845 fi
10846
10847     ;;
10848   esac
10849
10850   if test "x$lt_cv_dlopen" != xno; then
10851     enable_dlopen=yes
10852   else
10853     enable_dlopen=no
10854   fi
10855
10856   case $lt_cv_dlopen in
10857   dlopen)
10858     save_CPPFLAGS="$CPPFLAGS"
10859     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10860
10861     save_LDFLAGS="$LDFLAGS"
10862     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10863
10864     save_LIBS="$LIBS"
10865     LIBS="$lt_cv_dlopen_libs $LIBS"
10866
10867     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
10868 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
10869 if test "${lt_cv_dlopen_self+set}" = set; then :
10870   $as_echo_n "(cached) " >&6
10871 else
10872           if test "$cross_compiling" = yes; then :
10873   lt_cv_dlopen_self=cross
10874 else
10875   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10876   lt_status=$lt_dlunknown
10877   cat > conftest.$ac_ext <<EOF
10878 #line 10878 "configure"
10879 #include "confdefs.h"
10880
10881 #if HAVE_DLFCN_H
10882 #include <dlfcn.h>
10883 #endif
10884
10885 #include <stdio.h>
10886
10887 #ifdef RTLD_GLOBAL
10888 #  define LT_DLGLOBAL           RTLD_GLOBAL
10889 #else
10890 #  ifdef DL_GLOBAL
10891 #    define LT_DLGLOBAL         DL_GLOBAL
10892 #  else
10893 #    define LT_DLGLOBAL         0
10894 #  endif
10895 #endif
10896
10897 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10898    find out it does not work in some platform. */
10899 #ifndef LT_DLLAZY_OR_NOW
10900 #  ifdef RTLD_LAZY
10901 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10902 #  else
10903 #    ifdef DL_LAZY
10904 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10905 #    else
10906 #      ifdef RTLD_NOW
10907 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10908 #      else
10909 #        ifdef DL_NOW
10910 #          define LT_DLLAZY_OR_NOW      DL_NOW
10911 #        else
10912 #          define LT_DLLAZY_OR_NOW      0
10913 #        endif
10914 #      endif
10915 #    endif
10916 #  endif
10917 #endif
10918
10919 #ifdef __cplusplus
10920 extern "C" void exit (int);
10921 #endif
10922
10923 void fnord() { int i=42;}
10924 int main ()
10925 {
10926   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10927   int status = $lt_dlunknown;
10928
10929   if (self)
10930     {
10931       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10932       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10933       /* dlclose (self); */
10934     }
10935
10936     exit (status);
10937 }
10938 EOF
10939   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10940   (eval $ac_link) 2>&5
10941   ac_status=$?
10942   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10943   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10944     (./conftest; exit; ) >&5 2>/dev/null
10945     lt_status=$?
10946     case x$lt_status in
10947       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10948       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10949       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10950     esac
10951   else :
10952     # compilation failed
10953     lt_cv_dlopen_self=no
10954   fi
10955 fi
10956 rm -fr conftest*
10957
10958
10959 fi
10960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
10961 $as_echo "$lt_cv_dlopen_self" >&6; }
10962
10963     if test "x$lt_cv_dlopen_self" = xyes; then
10964       LDFLAGS="$LDFLAGS $link_static_flag"
10965       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
10966 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
10967 if test "${lt_cv_dlopen_self_static+set}" = set; then :
10968   $as_echo_n "(cached) " >&6
10969 else
10970           if test "$cross_compiling" = yes; then :
10971   lt_cv_dlopen_self_static=cross
10972 else
10973   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10974   lt_status=$lt_dlunknown
10975   cat > conftest.$ac_ext <<EOF
10976 #line 10976 "configure"
10977 #include "confdefs.h"
10978
10979 #if HAVE_DLFCN_H
10980 #include <dlfcn.h>
10981 #endif
10982
10983 #include <stdio.h>
10984
10985 #ifdef RTLD_GLOBAL
10986 #  define LT_DLGLOBAL           RTLD_GLOBAL
10987 #else
10988 #  ifdef DL_GLOBAL
10989 #    define LT_DLGLOBAL         DL_GLOBAL
10990 #  else
10991 #    define LT_DLGLOBAL         0
10992 #  endif
10993 #endif
10994
10995 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10996    find out it does not work in some platform. */
10997 #ifndef LT_DLLAZY_OR_NOW
10998 #  ifdef RTLD_LAZY
10999 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
11000 #  else
11001 #    ifdef DL_LAZY
11002 #      define LT_DLLAZY_OR_NOW          DL_LAZY
11003 #    else
11004 #      ifdef RTLD_NOW
11005 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
11006 #      else
11007 #        ifdef DL_NOW
11008 #          define LT_DLLAZY_OR_NOW      DL_NOW
11009 #        else
11010 #          define LT_DLLAZY_OR_NOW      0
11011 #        endif
11012 #      endif
11013 #    endif
11014 #  endif
11015 #endif
11016
11017 #ifdef __cplusplus
11018 extern "C" void exit (int);
11019 #endif
11020
11021 void fnord() { int i=42;}
11022 int main ()
11023 {
11024   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11025   int status = $lt_dlunknown;
11026
11027   if (self)
11028     {
11029       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
11030       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11031       /* dlclose (self); */
11032     }
11033
11034     exit (status);
11035 }
11036 EOF
11037   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11038   (eval $ac_link) 2>&5
11039   ac_status=$?
11040   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11041   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
11042     (./conftest; exit; ) >&5 2>/dev/null
11043     lt_status=$?
11044     case x$lt_status in
11045       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
11046       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
11047       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
11048     esac
11049   else :
11050     # compilation failed
11051     lt_cv_dlopen_self_static=no
11052   fi
11053 fi
11054 rm -fr conftest*
11055
11056
11057 fi
11058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
11059 $as_echo "$lt_cv_dlopen_self_static" >&6; }
11060     fi
11061
11062     CPPFLAGS="$save_CPPFLAGS"
11063     LDFLAGS="$save_LDFLAGS"
11064     LIBS="$save_LIBS"
11065     ;;
11066   esac
11067
11068   case $lt_cv_dlopen_self in
11069   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
11070   *) enable_dlopen_self=unknown ;;
11071   esac
11072
11073   case $lt_cv_dlopen_self_static in
11074   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
11075   *) enable_dlopen_self_static=unknown ;;
11076   esac
11077 fi
11078
11079
11080 # Report which librarie types wil actually be built
11081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
11082 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
11083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
11084 $as_echo "$can_build_shared" >&6; }
11085
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
11087 $as_echo_n "checking whether to build shared libraries... " >&6; }
11088 test "$can_build_shared" = "no" && enable_shared=no
11089
11090 # On AIX, shared libraries and static libraries use the same namespace, and
11091 # are all built from PIC.
11092 case $host_os in
11093 aix3*)
11094   test "$enable_shared" = yes && enable_static=no
11095   if test -n "$RANLIB"; then
11096     archive_cmds="$archive_cmds~\$RANLIB \$lib"
11097     postinstall_cmds='$RANLIB $lib'
11098   fi
11099   ;;
11100
11101 aix4* | aix5*)
11102   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
11103     test "$enable_shared" = yes && enable_static=no
11104   fi
11105     ;;
11106 esac
11107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
11108 $as_echo "$enable_shared" >&6; }
11109
11110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
11111 $as_echo_n "checking whether to build static libraries... " >&6; }
11112 # Make sure either enable_shared or enable_static is yes.
11113 test "$enable_shared" = yes || enable_static=yes
11114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
11115 $as_echo "$enable_static" >&6; }
11116
11117 # The else clause should only fire when bootstrapping the
11118 # libtool distribution, otherwise you forgot to ship ltmain.sh
11119 # with your package, and you will get complaints that there are
11120 # no rules to generate ltmain.sh.
11121 if test -f "$ltmain"; then
11122   # See if we are running on zsh, and set the options which allow our commands through
11123   # without removal of \ escapes.
11124   if test -n "${ZSH_VERSION+set}" ; then
11125     setopt NO_GLOB_SUBST
11126   fi
11127   # Now quote all the things that may contain metacharacters while being
11128   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11129   # variables and quote the copies for generation of the libtool script.
11130   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11131     SED SHELL STRIP \
11132     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11133     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11134     deplibs_check_method reload_flag reload_cmds need_locks \
11135     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11136     lt_cv_sys_global_symbol_to_c_name_address \
11137     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11138     old_postinstall_cmds old_postuninstall_cmds \
11139     compiler \
11140     CC \
11141     LD \
11142     lt_prog_compiler_wl \
11143     lt_prog_compiler_pic \
11144     lt_prog_compiler_static \
11145     lt_prog_compiler_no_builtin_flag \
11146     export_dynamic_flag_spec \
11147     thread_safe_flag_spec \
11148     whole_archive_flag_spec \
11149     enable_shared_with_static_runtimes \
11150     old_archive_cmds \
11151     old_archive_from_new_cmds \
11152     predep_objects \
11153     postdep_objects \
11154     predeps \
11155     postdeps \
11156     compiler_lib_search_path \
11157     archive_cmds \
11158     archive_expsym_cmds \
11159     postinstall_cmds \
11160     postuninstall_cmds \
11161     old_archive_from_expsyms_cmds \
11162     allow_undefined_flag \
11163     no_undefined_flag \
11164     export_symbols_cmds \
11165     hardcode_libdir_flag_spec \
11166     hardcode_libdir_flag_spec_ld \
11167     hardcode_libdir_separator \
11168     hardcode_automatic \
11169     module_cmds \
11170     module_expsym_cmds \
11171     lt_cv_prog_compiler_c_o \
11172     exclude_expsyms \
11173     include_expsyms; do
11174
11175     case $var in
11176     old_archive_cmds | \
11177     old_archive_from_new_cmds | \
11178     archive_cmds | \
11179     archive_expsym_cmds | \
11180     module_cmds | \
11181     module_expsym_cmds | \
11182     old_archive_from_expsyms_cmds | \
11183     export_symbols_cmds | \
11184     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11185     postinstall_cmds | postuninstall_cmds | \
11186     old_postinstall_cmds | old_postuninstall_cmds | \
11187     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11188       # Double-quote double-evaled strings.
11189       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11190       ;;
11191     *)
11192       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11193       ;;
11194     esac
11195   done
11196
11197   case $lt_echo in
11198   *'\$0 --fallback-echo"')
11199     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11200     ;;
11201   esac
11202
11203 cfgfile="${ofile}T"
11204   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
11205   $rm -f "$cfgfile"
11206   { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
11207 $as_echo "$as_me: creating $ofile" >&6;}
11208
11209   cat <<__EOF__ >> "$cfgfile"
11210 #! $SHELL
11211
11212 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
11213 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
11214 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
11215 #
11216 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
11217 # Free Software Foundation, Inc.
11218 #
11219 # This file is part of GNU Libtool:
11220 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
11221 #
11222 # This program is free software; you can redistribute it and/or modify
11223 # it under the terms of the GNU General Public License as published by
11224 # the Free Software Foundation; either version 2 of the License, or
11225 # (at your option) any later version.
11226 #
11227 # This program is distributed in the hope that it will be useful, but
11228 # WITHOUT ANY WARRANTY; without even the implied warranty of
11229 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11230 # General Public License for more details.
11231 #
11232 # You should have received a copy of the GNU General Public License
11233 # along with this program; if not, write to the Free Software
11234 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
11235 #
11236 # As a special exception to the GNU General Public License, if you
11237 # distribute this file as part of a program that contains a
11238 # configuration script generated by Autoconf, you may include it under
11239 # the same distribution terms that you use for the rest of that program.
11240
11241 # A sed program that does not truncate output.
11242 SED=$lt_SED
11243
11244 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
11245 Xsed="$SED -e 1s/^X//"
11246
11247 # The HP-UX ksh and POSIX shell print the target directory to stdout
11248 # if CDPATH is set.
11249 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11250
11251 # The names of the tagged configurations supported by this script.
11252 available_tags=
11253
11254 # ### BEGIN LIBTOOL CONFIG
11255
11256 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11257
11258 # Shell to use when invoking shell scripts.
11259 SHELL=$lt_SHELL
11260
11261 # Whether or not to build shared libraries.
11262 build_libtool_libs=$enable_shared
11263
11264 # Whether or not to build static libraries.
11265 build_old_libs=$enable_static
11266
11267 # Whether or not to add -lc for building shared libraries.
11268 build_libtool_need_lc=$archive_cmds_need_lc
11269
11270 # Whether or not to disallow shared libs when runtime libs are static
11271 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
11272
11273 # Whether or not to optimize for fast installation.
11274 fast_install=$enable_fast_install
11275
11276 # The host system.
11277 host_alias=$host_alias
11278 host=$host
11279 host_os=$host_os
11280
11281 # The build system.
11282 build_alias=$build_alias
11283 build=$build
11284 build_os=$build_os
11285
11286 # An echo program that does not interpret backslashes.
11287 echo=$lt_echo
11288
11289 # The archiver.
11290 AR=$lt_AR
11291 AR_FLAGS=$lt_AR_FLAGS
11292
11293 # A C compiler.
11294 LTCC=$lt_LTCC
11295
11296 # A language-specific compiler.
11297 CC=$lt_compiler
11298
11299 # Is the compiler the GNU C compiler?
11300 with_gcc=$GCC
11301
11302 # An ERE matcher.
11303 EGREP=$lt_EGREP
11304
11305 # The linker used to build libraries.
11306 LD=$lt_LD
11307
11308 # Whether we need hard or soft links.
11309 LN_S=$lt_LN_S
11310
11311 # A BSD-compatible nm program.
11312 NM=$lt_NM
11313
11314 # A symbol stripping program
11315 STRIP=$lt_STRIP
11316
11317 # Used to examine libraries when file_magic_cmd begins "file"
11318 MAGIC_CMD=$MAGIC_CMD
11319
11320 # Used on cygwin: DLL creation program.
11321 DLLTOOL="$DLLTOOL"
11322
11323 # Used on cygwin: object dumper.
11324 OBJDUMP="$OBJDUMP"
11325
11326 # Used on cygwin: assembler.
11327 AS="$AS"
11328
11329 # The name of the directory that contains temporary libtool files.
11330 objdir=$objdir
11331
11332 # How to create reloadable object files.
11333 reload_flag=$lt_reload_flag
11334 reload_cmds=$lt_reload_cmds
11335
11336 # How to pass a linker flag through the compiler.
11337 wl=$lt_lt_prog_compiler_wl
11338
11339 # Object file suffix (normally "o").
11340 objext="$ac_objext"
11341
11342 # Old archive suffix (normally "a").
11343 libext="$libext"
11344
11345 # Shared library suffix (normally ".so").
11346 shrext_cmds='$shrext_cmds'
11347
11348 # Executable file suffix (normally "").
11349 exeext="$exeext"
11350
11351 # Additional compiler flags for building library objects.
11352 pic_flag=$lt_lt_prog_compiler_pic
11353 pic_mode=$pic_mode
11354
11355 # What is the maximum length of a command?
11356 max_cmd_len=$lt_cv_sys_max_cmd_len
11357
11358 # Does compiler simultaneously support -c and -o options?
11359 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
11360
11361 # Must we lock files when doing compilation?
11362 need_locks=$lt_need_locks
11363
11364 # Do we need the lib prefix for modules?
11365 need_lib_prefix=$need_lib_prefix
11366
11367 # Do we need a version for libraries?
11368 need_version=$need_version
11369
11370 # Whether dlopen is supported.
11371 dlopen_support=$enable_dlopen
11372
11373 # Whether dlopen of programs is supported.
11374 dlopen_self=$enable_dlopen_self
11375
11376 # Whether dlopen of statically linked programs is supported.
11377 dlopen_self_static=$enable_dlopen_self_static
11378
11379 # Compiler flag to prevent dynamic linking.
11380 link_static_flag=$lt_lt_prog_compiler_static
11381
11382 # Compiler flag to turn off builtin functions.
11383 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
11384
11385 # Compiler flag to allow reflexive dlopens.
11386 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
11387
11388 # Compiler flag to generate shared objects directly from archives.
11389 whole_archive_flag_spec=$lt_whole_archive_flag_spec
11390
11391 # Compiler flag to generate thread-safe objects.
11392 thread_safe_flag_spec=$lt_thread_safe_flag_spec
11393
11394 # Library versioning type.
11395 version_type=$version_type
11396
11397 # Format of library name prefix.
11398 libname_spec=$lt_libname_spec
11399
11400 # List of archive names.  First name is the real one, the rest are links.
11401 # The last name is the one that the linker finds with -lNAME.
11402 library_names_spec=$lt_library_names_spec
11403
11404 # The coded name of the library, if different from the real name.
11405 soname_spec=$lt_soname_spec
11406
11407 # Commands used to build and install an old-style archive.
11408 RANLIB=$lt_RANLIB
11409 old_archive_cmds=$lt_old_archive_cmds
11410 old_postinstall_cmds=$lt_old_postinstall_cmds
11411 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11412
11413 # Create an old-style archive from a shared archive.
11414 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
11415
11416 # Create a temporary old-style archive to link instead of a shared archive.
11417 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
11418
11419 # Commands used to build and install a shared archive.
11420 archive_cmds=$lt_archive_cmds
11421 archive_expsym_cmds=$lt_archive_expsym_cmds
11422 postinstall_cmds=$lt_postinstall_cmds
11423 postuninstall_cmds=$lt_postuninstall_cmds
11424
11425 # Commands used to build a loadable module (assumed same as above if empty)
11426 module_cmds=$lt_module_cmds
11427 module_expsym_cmds=$lt_module_expsym_cmds
11428
11429 # Commands to strip libraries.
11430 old_striplib=$lt_old_striplib
11431 striplib=$lt_striplib
11432
11433 # Dependencies to place before the objects being linked to create a
11434 # shared library.
11435 predep_objects=$lt_predep_objects
11436
11437 # Dependencies to place after the objects being linked to create a
11438 # shared library.
11439 postdep_objects=$lt_postdep_objects
11440
11441 # Dependencies to place before the objects being linked to create a
11442 # shared library.
11443 predeps=$lt_predeps
11444
11445 # Dependencies to place after the objects being linked to create a
11446 # shared library.
11447 postdeps=$lt_postdeps
11448
11449 # The library search path used internally by the compiler when linking
11450 # a shared library.
11451 compiler_lib_search_path=$lt_compiler_lib_search_path
11452
11453 # Method to check whether dependent libraries are shared objects.
11454 deplibs_check_method=$lt_deplibs_check_method
11455
11456 # Command to use when deplibs_check_method == file_magic.
11457 file_magic_cmd=$lt_file_magic_cmd
11458
11459 # Flag that allows shared libraries with undefined symbols to be built.
11460 allow_undefined_flag=$lt_allow_undefined_flag
11461
11462 # Flag that forces no undefined symbols.
11463 no_undefined_flag=$lt_no_undefined_flag
11464
11465 # Commands used to finish a libtool library installation in a directory.
11466 finish_cmds=$lt_finish_cmds
11467
11468 # Same as above, but a single script fragment to be evaled but not shown.
11469 finish_eval=$lt_finish_eval
11470
11471 # Take the output of nm and produce a listing of raw symbols and C names.
11472 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11473
11474 # Transform the output of nm in a proper C declaration
11475 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11476
11477 # Transform the output of nm in a C name address pair
11478 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11479
11480 # This is the shared library runtime path variable.
11481 runpath_var=$runpath_var
11482
11483 # This is the shared library path variable.
11484 shlibpath_var=$shlibpath_var
11485
11486 # Is shlibpath searched before the hard-coded library search path?
11487 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11488
11489 # How to hardcode a shared library path into an executable.
11490 hardcode_action=$hardcode_action
11491
11492 # Whether we should hardcode library paths into libraries.
11493 hardcode_into_libs=$hardcode_into_libs
11494
11495 # Flag to hardcode \$libdir into a binary during linking.
11496 # This must work even if \$libdir does not exist.
11497 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
11498
11499 # If ld is used when linking, flag to hardcode \$libdir into
11500 # a binary during linking. This must work even if \$libdir does
11501 # not exist.
11502 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
11503
11504 # Whether we need a single -rpath flag with a separated argument.
11505 hardcode_libdir_separator=$lt_hardcode_libdir_separator
11506
11507 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11508 # resulting binary.
11509 hardcode_direct=$hardcode_direct
11510
11511 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11512 # resulting binary.
11513 hardcode_minus_L=$hardcode_minus_L
11514
11515 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11516 # the resulting binary.
11517 hardcode_shlibpath_var=$hardcode_shlibpath_var
11518
11519 # Set to yes if building a shared library automatically hardcodes DIR into the library
11520 # and all subsequent libraries and executables linked against it.
11521 hardcode_automatic=$hardcode_automatic
11522
11523 # Variables whose values should be saved in libtool wrapper scripts and
11524 # restored at relink time.
11525 variables_saved_for_relink="$variables_saved_for_relink"
11526
11527 # Whether libtool must link a program against all its dependency libraries.
11528 link_all_deplibs=$link_all_deplibs
11529
11530 # Compile-time system search path for libraries
11531 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11532
11533 # Run-time system search path for libraries
11534 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11535
11536 # Fix the shell variable \$srcfile for the compiler.
11537 fix_srcfile_path="$fix_srcfile_path"
11538
11539 # Set to yes if exported symbols are required.
11540 always_export_symbols=$always_export_symbols
11541
11542 # The commands to list exported symbols.
11543 export_symbols_cmds=$lt_export_symbols_cmds
11544
11545 # The commands to extract the exported symbol list from a shared archive.
11546 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11547
11548 # Symbols that should not be listed in the preloaded symbols.
11549 exclude_expsyms=$lt_exclude_expsyms
11550
11551 # Symbols that must always be exported.
11552 include_expsyms=$lt_include_expsyms
11553
11554 # ### END LIBTOOL CONFIG
11555
11556 __EOF__
11557
11558
11559   case $host_os in
11560   aix3*)
11561     cat <<\EOF >> "$cfgfile"
11562
11563 # AIX sometimes has problems with the GCC collect2 program.  For some
11564 # reason, if we set the COLLECT_NAMES environment variable, the problems
11565 # vanish in a puff of smoke.
11566 if test "X${COLLECT_NAMES+set}" != Xset; then
11567   COLLECT_NAMES=
11568   export COLLECT_NAMES
11569 fi
11570 EOF
11571     ;;
11572   esac
11573
11574   # We use sed instead of cat because bash on DJGPP gets confused if
11575   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
11576   # text mode, it properly converts lines to CR/LF.  This bash problem
11577   # is reportedly fixed, but why not run on old versions too?
11578   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
11579
11580   mv -f "$cfgfile" "$ofile" || \
11581     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
11582   chmod +x "$ofile"
11583
11584 else
11585   # If there is no Makefile yet, we rely on a make rule to execute
11586   # `config.status --recheck' to rerun these tests and create the
11587   # libtool script then.
11588   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11589   if test -f "$ltmain_in"; then
11590     test -f Makefile && make "$ltmain"
11591   fi
11592 fi
11593
11594
11595 ac_ext=c
11596 ac_cpp='$CPP $CPPFLAGS'
11597 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11598 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11599 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11600
11601 CC="$lt_save_CC"
11602
11603
11604 # Check whether --with-tags was given.
11605 if test "${with_tags+set}" = set; then :
11606   withval=$with_tags; tagnames="$withval"
11607 fi
11608
11609
11610 if test -f "$ltmain" && test -n "$tagnames"; then
11611   if test ! -f "${ofile}"; then
11612     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist" >&5
11613 $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11614   fi
11615
11616   if test -z "$LTCC"; then
11617     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11618     if test -z "$LTCC"; then
11619       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11620 $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11621     else
11622       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11623 $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11624     fi
11625   fi
11626
11627   # Extract list of available tagged configurations in $ofile.
11628   # Note that this assumes the entire list is on one line.
11629   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11630
11631   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11632   for tagname in $tagnames; do
11633     IFS="$lt_save_ifs"
11634     # Check whether tagname contains only valid characters
11635     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11636     "") ;;
11637     *)  as_fn_error "invalid tag name: $tagname" "$LINENO" 5
11638         ;;
11639     esac
11640
11641     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11642     then
11643       as_fn_error "tag name \"$tagname\" already exists" "$LINENO" 5
11644     fi
11645
11646     # Update the list of available tags.
11647     if test -n "$tagname"; then
11648       echo appending configuration tag \"$tagname\" to $ofile
11649
11650       case $tagname in
11651       CXX)
11652         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11653             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11654             (test "X$CXX" != "Xg++"))) ; then
11655           :
11656         else
11657           tagname=""
11658         fi
11659         ;;
11660
11661       F77)
11662         if test -n "$F77" && test "X$F77" != "Xno"; then
11663           :
11664         else
11665           tagname=""
11666         fi
11667         ;;
11668
11669       GCJ)
11670         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11671           :
11672         else
11673           tagname=""
11674         fi
11675         ;;
11676
11677       RC)
11678
11679
11680 # Source file extension for RC test sources.
11681 ac_ext=rc
11682
11683 # Object file extension for compiled RC test sources.
11684 objext=o
11685 objext_RC=$objext
11686
11687 # Code to be used in simple compile tests
11688 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11689
11690 # Code to be used in simple link tests
11691 lt_simple_link_test_code="$lt_simple_compile_test_code"
11692
11693 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11694
11695 # If no C compiler was specified, use CC.
11696 LTCC=${LTCC-"$CC"}
11697
11698 # Allow CC to be a program name with arguments.
11699 compiler=$CC
11700
11701
11702 # save warnings/boilerplate of simple test code
11703 ac_outfile=conftest.$ac_objext
11704 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11705 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11706 _lt_compiler_boilerplate=`cat conftest.err`
11707 $rm conftest*
11708
11709 ac_outfile=conftest.$ac_objext
11710 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11711 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11712 _lt_linker_boilerplate=`cat conftest.err`
11713 $rm conftest*
11714
11715
11716 # Allow CC to be a program name with arguments.
11717 lt_save_CC="$CC"
11718 CC=${RC-"windres"}
11719 compiler=$CC
11720 compiler_RC=$CC
11721 for cc_temp in $compiler""; do
11722   case $cc_temp in
11723     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11724     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11725     \-*) ;;
11726     *) break;;
11727   esac
11728 done
11729 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11730
11731 lt_cv_prog_compiler_c_o_RC=yes
11732
11733 # The else clause should only fire when bootstrapping the
11734 # libtool distribution, otherwise you forgot to ship ltmain.sh
11735 # with your package, and you will get complaints that there are
11736 # no rules to generate ltmain.sh.
11737 if test -f "$ltmain"; then
11738   # See if we are running on zsh, and set the options which allow our commands through
11739   # without removal of \ escapes.
11740   if test -n "${ZSH_VERSION+set}" ; then
11741     setopt NO_GLOB_SUBST
11742   fi
11743   # Now quote all the things that may contain metacharacters while being
11744   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11745   # variables and quote the copies for generation of the libtool script.
11746   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11747     SED SHELL STRIP \
11748     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11749     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11750     deplibs_check_method reload_flag reload_cmds need_locks \
11751     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11752     lt_cv_sys_global_symbol_to_c_name_address \
11753     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11754     old_postinstall_cmds old_postuninstall_cmds \
11755     compiler_RC \
11756     CC_RC \
11757     LD_RC \
11758     lt_prog_compiler_wl_RC \
11759     lt_prog_compiler_pic_RC \
11760     lt_prog_compiler_static_RC \
11761     lt_prog_compiler_no_builtin_flag_RC \
11762     export_dynamic_flag_spec_RC \
11763     thread_safe_flag_spec_RC \
11764     whole_archive_flag_spec_RC \
11765     enable_shared_with_static_runtimes_RC \
11766     old_archive_cmds_RC \
11767     old_archive_from_new_cmds_RC \
11768     predep_objects_RC \
11769     postdep_objects_RC \
11770     predeps_RC \
11771     postdeps_RC \
11772     compiler_lib_search_path_RC \
11773     archive_cmds_RC \
11774     archive_expsym_cmds_RC \
11775     postinstall_cmds_RC \
11776     postuninstall_cmds_RC \
11777     old_archive_from_expsyms_cmds_RC \
11778     allow_undefined_flag_RC \
11779     no_undefined_flag_RC \
11780     export_symbols_cmds_RC \
11781     hardcode_libdir_flag_spec_RC \
11782     hardcode_libdir_flag_spec_ld_RC \
11783     hardcode_libdir_separator_RC \
11784     hardcode_automatic_RC \
11785     module_cmds_RC \
11786     module_expsym_cmds_RC \
11787     lt_cv_prog_compiler_c_o_RC \
11788     exclude_expsyms_RC \
11789     include_expsyms_RC; do
11790
11791     case $var in
11792     old_archive_cmds_RC | \
11793     old_archive_from_new_cmds_RC | \
11794     archive_cmds_RC | \
11795     archive_expsym_cmds_RC | \
11796     module_cmds_RC | \
11797     module_expsym_cmds_RC | \
11798     old_archive_from_expsyms_cmds_RC | \
11799     export_symbols_cmds_RC | \
11800     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11801     postinstall_cmds | postuninstall_cmds | \
11802     old_postinstall_cmds | old_postuninstall_cmds | \
11803     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11804       # Double-quote double-evaled strings.
11805       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11806       ;;
11807     *)
11808       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11809       ;;
11810     esac
11811   done
11812
11813   case $lt_echo in
11814   *'\$0 --fallback-echo"')
11815     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11816     ;;
11817   esac
11818
11819 cfgfile="$ofile"
11820
11821   cat <<__EOF__ >> "$cfgfile"
11822 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11823
11824 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11825
11826 # Shell to use when invoking shell scripts.
11827 SHELL=$lt_SHELL
11828
11829 # Whether or not to build shared libraries.
11830 build_libtool_libs=$enable_shared
11831
11832 # Whether or not to build static libraries.
11833 build_old_libs=$enable_static
11834
11835 # Whether or not to add -lc for building shared libraries.
11836 build_libtool_need_lc=$archive_cmds_need_lc_RC
11837
11838 # Whether or not to disallow shared libs when runtime libs are static
11839 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11840
11841 # Whether or not to optimize for fast installation.
11842 fast_install=$enable_fast_install
11843
11844 # The host system.
11845 host_alias=$host_alias
11846 host=$host
11847 host_os=$host_os
11848
11849 # The build system.
11850 build_alias=$build_alias
11851 build=$build
11852 build_os=$build_os
11853
11854 # An echo program that does not interpret backslashes.
11855 echo=$lt_echo
11856
11857 # The archiver.
11858 AR=$lt_AR
11859 AR_FLAGS=$lt_AR_FLAGS
11860
11861 # A C compiler.
11862 LTCC=$lt_LTCC
11863
11864 # A language-specific compiler.
11865 CC=$lt_compiler_RC
11866
11867 # Is the compiler the GNU C compiler?
11868 with_gcc=$GCC_RC
11869
11870 # An ERE matcher.
11871 EGREP=$lt_EGREP
11872
11873 # The linker used to build libraries.
11874 LD=$lt_LD_RC
11875
11876 # Whether we need hard or soft links.
11877 LN_S=$lt_LN_S
11878
11879 # A BSD-compatible nm program.
11880 NM=$lt_NM
11881
11882 # A symbol stripping program
11883 STRIP=$lt_STRIP
11884
11885 # Used to examine libraries when file_magic_cmd begins "file"
11886 MAGIC_CMD=$MAGIC_CMD
11887
11888 # Used on cygwin: DLL creation program.
11889 DLLTOOL="$DLLTOOL"
11890
11891 # Used on cygwin: object dumper.
11892 OBJDUMP="$OBJDUMP"
11893
11894 # Used on cygwin: assembler.
11895 AS="$AS"
11896
11897 # The name of the directory that contains temporary libtool files.
11898 objdir=$objdir
11899
11900 # How to create reloadable object files.
11901 reload_flag=$lt_reload_flag
11902 reload_cmds=$lt_reload_cmds
11903
11904 # How to pass a linker flag through the compiler.
11905 wl=$lt_lt_prog_compiler_wl_RC
11906
11907 # Object file suffix (normally "o").
11908 objext="$ac_objext"
11909
11910 # Old archive suffix (normally "a").
11911 libext="$libext"
11912
11913 # Shared library suffix (normally ".so").
11914 shrext_cmds='$shrext_cmds'
11915
11916 # Executable file suffix (normally "").
11917 exeext="$exeext"
11918
11919 # Additional compiler flags for building library objects.
11920 pic_flag=$lt_lt_prog_compiler_pic_RC
11921 pic_mode=$pic_mode
11922
11923 # What is the maximum length of a command?
11924 max_cmd_len=$lt_cv_sys_max_cmd_len
11925
11926 # Does compiler simultaneously support -c and -o options?
11927 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11928
11929 # Must we lock files when doing compilation?
11930 need_locks=$lt_need_locks
11931
11932 # Do we need the lib prefix for modules?
11933 need_lib_prefix=$need_lib_prefix
11934
11935 # Do we need a version for libraries?
11936 need_version=$need_version
11937
11938 # Whether dlopen is supported.
11939 dlopen_support=$enable_dlopen
11940
11941 # Whether dlopen of programs is supported.
11942 dlopen_self=$enable_dlopen_self
11943
11944 # Whether dlopen of statically linked programs is supported.
11945 dlopen_self_static=$enable_dlopen_self_static
11946
11947 # Compiler flag to prevent dynamic linking.
11948 link_static_flag=$lt_lt_prog_compiler_static_RC
11949
11950 # Compiler flag to turn off builtin functions.
11951 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11952
11953 # Compiler flag to allow reflexive dlopens.
11954 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11955
11956 # Compiler flag to generate shared objects directly from archives.
11957 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11958
11959 # Compiler flag to generate thread-safe objects.
11960 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11961
11962 # Library versioning type.
11963 version_type=$version_type
11964
11965 # Format of library name prefix.
11966 libname_spec=$lt_libname_spec
11967
11968 # List of archive names.  First name is the real one, the rest are links.
11969 # The last name is the one that the linker finds with -lNAME.
11970 library_names_spec=$lt_library_names_spec
11971
11972 # The coded name of the library, if different from the real name.
11973 soname_spec=$lt_soname_spec
11974
11975 # Commands used to build and install an old-style archive.
11976 RANLIB=$lt_RANLIB
11977 old_archive_cmds=$lt_old_archive_cmds_RC
11978 old_postinstall_cmds=$lt_old_postinstall_cmds
11979 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11980
11981 # Create an old-style archive from a shared archive.
11982 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11983
11984 # Create a temporary old-style archive to link instead of a shared archive.
11985 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11986
11987 # Commands used to build and install a shared archive.
11988 archive_cmds=$lt_archive_cmds_RC
11989 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11990 postinstall_cmds=$lt_postinstall_cmds
11991 postuninstall_cmds=$lt_postuninstall_cmds
11992
11993 # Commands used to build a loadable module (assumed same as above if empty)
11994 module_cmds=$lt_module_cmds_RC
11995 module_expsym_cmds=$lt_module_expsym_cmds_RC
11996
11997 # Commands to strip libraries.
11998 old_striplib=$lt_old_striplib
11999 striplib=$lt_striplib
12000
12001 # Dependencies to place before the objects being linked to create a
12002 # shared library.
12003 predep_objects=$lt_predep_objects_RC
12004
12005 # Dependencies to place after the objects being linked to create a
12006 # shared library.
12007 postdep_objects=$lt_postdep_objects_RC
12008
12009 # Dependencies to place before the objects being linked to create a
12010 # shared library.
12011 predeps=$lt_predeps_RC
12012
12013 # Dependencies to place after the objects being linked to create a
12014 # shared library.
12015 postdeps=$lt_postdeps_RC
12016
12017 # The library search path used internally by the compiler when linking
12018 # a shared library.
12019 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
12020
12021 # Method to check whether dependent libraries are shared objects.
12022 deplibs_check_method=$lt_deplibs_check_method
12023
12024 # Command to use when deplibs_check_method == file_magic.
12025 file_magic_cmd=$lt_file_magic_cmd
12026
12027 # Flag that allows shared libraries with undefined symbols to be built.
12028 allow_undefined_flag=$lt_allow_undefined_flag_RC
12029
12030 # Flag that forces no undefined symbols.
12031 no_undefined_flag=$lt_no_undefined_flag_RC
12032
12033 # Commands used to finish a libtool library installation in a directory.
12034 finish_cmds=$lt_finish_cmds
12035
12036 # Same as above, but a single script fragment to be evaled but not shown.
12037 finish_eval=$lt_finish_eval
12038
12039 # Take the output of nm and produce a listing of raw symbols and C names.
12040 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
12041
12042 # Transform the output of nm in a proper C declaration
12043 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
12044
12045 # Transform the output of nm in a C name address pair
12046 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
12047
12048 # This is the shared library runtime path variable.
12049 runpath_var=$runpath_var
12050
12051 # This is the shared library path variable.
12052 shlibpath_var=$shlibpath_var
12053
12054 # Is shlibpath searched before the hard-coded library search path?
12055 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
12056
12057 # How to hardcode a shared library path into an executable.
12058 hardcode_action=$hardcode_action_RC
12059
12060 # Whether we should hardcode library paths into libraries.
12061 hardcode_into_libs=$hardcode_into_libs
12062
12063 # Flag to hardcode \$libdir into a binary during linking.
12064 # This must work even if \$libdir does not exist.
12065 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
12066
12067 # If ld is used when linking, flag to hardcode \$libdir into
12068 # a binary during linking. This must work even if \$libdir does
12069 # not exist.
12070 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
12071
12072 # Whether we need a single -rpath flag with a separated argument.
12073 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
12074
12075 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
12076 # resulting binary.
12077 hardcode_direct=$hardcode_direct_RC
12078
12079 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
12080 # resulting binary.
12081 hardcode_minus_L=$hardcode_minus_L_RC
12082
12083 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
12084 # the resulting binary.
12085 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
12086
12087 # Set to yes if building a shared library automatically hardcodes DIR into the library
12088 # and all subsequent libraries and executables linked against it.
12089 hardcode_automatic=$hardcode_automatic_RC
12090
12091 # Variables whose values should be saved in libtool wrapper scripts and
12092 # restored at relink time.
12093 variables_saved_for_relink="$variables_saved_for_relink"
12094
12095 # Whether libtool must link a program against all its dependency libraries.
12096 link_all_deplibs=$link_all_deplibs_RC
12097
12098 # Compile-time system search path for libraries
12099 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
12100
12101 # Run-time system search path for libraries
12102 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
12103
12104 # Fix the shell variable \$srcfile for the compiler.
12105 fix_srcfile_path="$fix_srcfile_path_RC"
12106
12107 # Set to yes if exported symbols are required.
12108 always_export_symbols=$always_export_symbols_RC
12109
12110 # The commands to list exported symbols.
12111 export_symbols_cmds=$lt_export_symbols_cmds_RC
12112
12113 # The commands to extract the exported symbol list from a shared archive.
12114 extract_expsyms_cmds=$lt_extract_expsyms_cmds
12115
12116 # Symbols that should not be listed in the preloaded symbols.
12117 exclude_expsyms=$lt_exclude_expsyms_RC
12118
12119 # Symbols that must always be exported.
12120 include_expsyms=$lt_include_expsyms_RC
12121
12122 # ### END LIBTOOL TAG CONFIG: $tagname
12123
12124 __EOF__
12125
12126
12127 else
12128   # If there is no Makefile yet, we rely on a make rule to execute
12129   # `config.status --recheck' to rerun these tests and create the
12130   # libtool script then.
12131   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
12132   if test -f "$ltmain_in"; then
12133     test -f Makefile && make "$ltmain"
12134   fi
12135 fi
12136
12137
12138 ac_ext=c
12139 ac_cpp='$CPP $CPPFLAGS'
12140 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12141 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12142 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12143
12144 CC="$lt_save_CC"
12145
12146         ;;
12147
12148       *)
12149         as_fn_error "Unsupported tag name: $tagname" "$LINENO" 5
12150         ;;
12151       esac
12152
12153       # Append the new tag name to the list of available tags.
12154       if test -n "$tagname" ; then
12155       available_tags="$available_tags $tagname"
12156     fi
12157     fi
12158   done
12159   IFS="$lt_save_ifs"
12160
12161   # Now substitute the updated list of available tags.
12162   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
12163     mv "${ofile}T" "$ofile"
12164     chmod +x "$ofile"
12165   else
12166     rm -f "${ofile}T"
12167     as_fn_error "unable to update list of available tagged configurations." "$LINENO" 5
12168   fi
12169 fi
12170
12171
12172
12173 # This can be used to rebuild libtool when needed
12174 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
12175
12176 # Always use our own libtool.
12177 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
12178
12179 # Prevent multiple expansion
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190 ol_link_perl=no
12191 if test $ol_enable_perl != no ; then
12192         # Extract the first word of "perl", so it can be a program name with args.
12193 set dummy perl; ac_word=$2
12194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12195 $as_echo_n "checking for $ac_word... " >&6; }
12196 if test "${ac_cv_path_PERLBIN+set}" = set; then :
12197   $as_echo_n "(cached) " >&6
12198 else
12199   case $PERLBIN in
12200   [\\/]* | ?:[\\/]*)
12201   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
12202   ;;
12203   *)
12204   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12205 for as_dir in $PATH
12206 do
12207   IFS=$as_save_IFS
12208   test -z "$as_dir" && as_dir=.
12209     for ac_exec_ext in '' $ac_executable_extensions; do
12210   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12211     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
12212     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12213     break 2
12214   fi
12215 done
12216   done
12217 IFS=$as_save_IFS
12218
12219   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
12220   ;;
12221 esac
12222 fi
12223 PERLBIN=$ac_cv_path_PERLBIN
12224 if test -n "$PERLBIN"; then
12225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLBIN" >&5
12226 $as_echo "$PERLBIN" >&6; }
12227 else
12228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12229 $as_echo "no" >&6; }
12230 fi
12231
12232
12233
12234         if test "no$PERLBIN" = "no" ; then
12235                 if test $ol_enable_perl = yes ; then
12236                         as_fn_error "could not locate perl" "$LINENO" 5
12237                 fi
12238
12239         else
12240                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
12241                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
12242
12243                 if test x"$ol_enable_perl" = "xyes" ; then
12244                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
12245                 else
12246                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
12247                 fi
12248                                 ol_link_perl=yes
12249         fi
12250 fi
12251
12252 ac_ext=c
12253 ac_cpp='$CPP $CPPFLAGS'
12254 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12255 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12256 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
12258 $as_echo_n "checking how to run the C preprocessor... " >&6; }
12259 # On Suns, sometimes $CPP names a directory.
12260 if test -n "$CPP" && test -d "$CPP"; then
12261   CPP=
12262 fi
12263 if test -z "$CPP"; then
12264   if test "${ac_cv_prog_CPP+set}" = set; then :
12265   $as_echo_n "(cached) " >&6
12266 else
12267       # Double quotes because CPP needs to be expanded
12268     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
12269     do
12270       ac_preproc_ok=false
12271 for ac_c_preproc_warn_flag in '' yes
12272 do
12273   # Use a header file that comes with gcc, so configuring glibc
12274   # with a fresh cross-compiler works.
12275   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12276   # <limits.h> exists even on freestanding compilers.
12277   # On the NeXT, cc -E runs the code through the compiler's parser,
12278   # not just through cpp. "Syntax error" is here to catch this case.
12279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12280 /* end confdefs.h.  */
12281 #ifdef __STDC__
12282 # include <limits.h>
12283 #else
12284 # include <assert.h>
12285 #endif
12286                      Syntax error
12287 _ACEOF
12288 if ac_fn_c_try_cpp "$LINENO"; then :
12289
12290 else
12291   # Broken: fails on valid input.
12292 continue
12293 fi
12294 rm -f conftest.err conftest.$ac_ext
12295
12296   # OK, works on sane cases.  Now check whether nonexistent headers
12297   # can be detected and how.
12298   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12299 /* end confdefs.h.  */
12300 #include <ac_nonexistent.h>
12301 _ACEOF
12302 if ac_fn_c_try_cpp "$LINENO"; then :
12303   # Broken: success on invalid input.
12304 continue
12305 else
12306   # Passes both tests.
12307 ac_preproc_ok=:
12308 break
12309 fi
12310 rm -f conftest.err conftest.$ac_ext
12311
12312 done
12313 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12314 rm -f conftest.err conftest.$ac_ext
12315 if $ac_preproc_ok; then :
12316   break
12317 fi
12318
12319     done
12320     ac_cv_prog_CPP=$CPP
12321
12322 fi
12323   CPP=$ac_cv_prog_CPP
12324 else
12325   ac_cv_prog_CPP=$CPP
12326 fi
12327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
12328 $as_echo "$CPP" >&6; }
12329 ac_preproc_ok=false
12330 for ac_c_preproc_warn_flag in '' yes
12331 do
12332   # Use a header file that comes with gcc, so configuring glibc
12333   # with a fresh cross-compiler works.
12334   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12335   # <limits.h> exists even on freestanding compilers.
12336   # On the NeXT, cc -E runs the code through the compiler's parser,
12337   # not just through cpp. "Syntax error" is here to catch this case.
12338   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12339 /* end confdefs.h.  */
12340 #ifdef __STDC__
12341 # include <limits.h>
12342 #else
12343 # include <assert.h>
12344 #endif
12345                      Syntax error
12346 _ACEOF
12347 if ac_fn_c_try_cpp "$LINENO"; then :
12348
12349 else
12350   # Broken: fails on valid input.
12351 continue
12352 fi
12353 rm -f conftest.err conftest.$ac_ext
12354
12355   # OK, works on sane cases.  Now check whether nonexistent headers
12356   # can be detected and how.
12357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12358 /* end confdefs.h.  */
12359 #include <ac_nonexistent.h>
12360 _ACEOF
12361 if ac_fn_c_try_cpp "$LINENO"; then :
12362   # Broken: success on invalid input.
12363 continue
12364 else
12365   # Passes both tests.
12366 ac_preproc_ok=:
12367 break
12368 fi
12369 rm -f conftest.err conftest.$ac_ext
12370
12371 done
12372 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12373 rm -f conftest.err conftest.$ac_ext
12374 if $ac_preproc_ok; then :
12375
12376 else
12377   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12378 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12379 as_fn_error "C preprocessor \"$CPP\" fails sanity check
12380 See \`config.log' for more details." "$LINENO" 5; }
12381 fi
12382
12383 ac_ext=c
12384 ac_cpp='$CPP $CPPFLAGS'
12385 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12386 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12387 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12388
12389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using MS Visual C++" >&5
12390 $as_echo_n "checking whether we are using MS Visual C++... " >&6; }
12391 if test "${ol_cv_msvc+set}" = set; then :
12392   $as_echo_n "(cached) " >&6
12393 else
12394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12395 /* end confdefs.h.  */
12396
12397 #ifndef _MSC_VER
12398 #include <__FOO__/generate_error.h>
12399 #endif
12400
12401 _ACEOF
12402 if ac_fn_c_try_cpp "$LINENO"; then :
12403   ol_cv_msvc=yes
12404 else
12405   ol_cv_msvc=no
12406 fi
12407 rm -f conftest.err conftest.$ac_ext
12408 fi
12409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_msvc" >&5
12410 $as_echo "$ol_cv_msvc" >&6; }
12411
12412 case $host_os in
12413   *mingw32* ) ac_cv_mingw32=yes ;;
12414   *cygwin* ) ac_cv_cygwin=yes ;;
12415   *interix* ) ac_cv_interix=yes ;;
12416 esac
12417
12418
12419
12420
12421 cat >>confdefs.h <<_ACEOF
12422 #define EXEEXT "${EXEEXT}"
12423 _ACEOF
12424
12425
12426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for be_app in -lbe" >&5
12427 $as_echo_n "checking for be_app in -lbe... " >&6; }
12428 if test "${ac_cv_lib_be_be_app+set}" = set; then :
12429   $as_echo_n "(cached) " >&6
12430 else
12431   ac_check_lib_save_LIBS=$LIBS
12432 LIBS="-lbe -lroot -lnet $LIBS"
12433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12434 /* end confdefs.h.  */
12435
12436 /* Override any GCC internal prototype to avoid an error.
12437    Use char because int might match the return type of a GCC
12438    builtin and then its argument prototype would still apply.  */
12439 #ifdef __cplusplus
12440 extern "C"
12441 #endif
12442 char be_app ();
12443 int
12444 main ()
12445 {
12446 return be_app ();
12447   ;
12448   return 0;
12449 }
12450 _ACEOF
12451 if ac_fn_c_try_link "$LINENO"; then :
12452   ac_cv_lib_be_be_app=yes
12453 else
12454   ac_cv_lib_be_be_app=no
12455 fi
12456 rm -f core conftest.err conftest.$ac_objext \
12457     conftest$ac_exeext conftest.$ac_ext
12458 LIBS=$ac_check_lib_save_LIBS
12459 fi
12460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_be_be_app" >&5
12461 $as_echo "$ac_cv_lib_be_be_app" >&6; }
12462 if test "x$ac_cv_lib_be_be_app" = x""yes; then :
12463   LIBS="$LIBS -lbe -lroot -lnet"
12464 else
12465   :
12466 fi
12467
12468
12469 ac_ext=c
12470 ac_cpp='$CPP $CPPFLAGS'
12471 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12472 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12473 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12474 if test -n "$ac_tool_prefix"; then
12475   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
12476 set dummy ${ac_tool_prefix}gcc; ac_word=$2
12477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12478 $as_echo_n "checking for $ac_word... " >&6; }
12479 if test "${ac_cv_prog_CC+set}" = set; then :
12480   $as_echo_n "(cached) " >&6
12481 else
12482   if test -n "$CC"; then
12483   ac_cv_prog_CC="$CC" # Let the user override the test.
12484 else
12485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12486 for as_dir in $PATH
12487 do
12488   IFS=$as_save_IFS
12489   test -z "$as_dir" && as_dir=.
12490     for ac_exec_ext in '' $ac_executable_extensions; do
12491   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12492     ac_cv_prog_CC="${ac_tool_prefix}gcc"
12493     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12494     break 2
12495   fi
12496 done
12497   done
12498 IFS=$as_save_IFS
12499
12500 fi
12501 fi
12502 CC=$ac_cv_prog_CC
12503 if test -n "$CC"; then
12504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12505 $as_echo "$CC" >&6; }
12506 else
12507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12508 $as_echo "no" >&6; }
12509 fi
12510
12511
12512 fi
12513 if test -z "$ac_cv_prog_CC"; then
12514   ac_ct_CC=$CC
12515   # Extract the first word of "gcc", so it can be a program name with args.
12516 set dummy gcc; ac_word=$2
12517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12518 $as_echo_n "checking for $ac_word... " >&6; }
12519 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
12520   $as_echo_n "(cached) " >&6
12521 else
12522   if test -n "$ac_ct_CC"; then
12523   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12524 else
12525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12526 for as_dir in $PATH
12527 do
12528   IFS=$as_save_IFS
12529   test -z "$as_dir" && as_dir=.
12530     for ac_exec_ext in '' $ac_executable_extensions; do
12531   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12532     ac_cv_prog_ac_ct_CC="gcc"
12533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12534     break 2
12535   fi
12536 done
12537   done
12538 IFS=$as_save_IFS
12539
12540 fi
12541 fi
12542 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12543 if test -n "$ac_ct_CC"; then
12544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12545 $as_echo "$ac_ct_CC" >&6; }
12546 else
12547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12548 $as_echo "no" >&6; }
12549 fi
12550
12551   if test "x$ac_ct_CC" = x; then
12552     CC=""
12553   else
12554     case $cross_compiling:$ac_tool_warned in
12555 yes:)
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12557 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12558 ac_tool_warned=yes ;;
12559 esac
12560     CC=$ac_ct_CC
12561   fi
12562 else
12563   CC="$ac_cv_prog_CC"
12564 fi
12565
12566 if test -z "$CC"; then
12567           if test -n "$ac_tool_prefix"; then
12568     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12569 set dummy ${ac_tool_prefix}cc; ac_word=$2
12570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12571 $as_echo_n "checking for $ac_word... " >&6; }
12572 if test "${ac_cv_prog_CC+set}" = set; then :
12573   $as_echo_n "(cached) " >&6
12574 else
12575   if test -n "$CC"; then
12576   ac_cv_prog_CC="$CC" # Let the user override the test.
12577 else
12578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579 for as_dir in $PATH
12580 do
12581   IFS=$as_save_IFS
12582   test -z "$as_dir" && as_dir=.
12583     for ac_exec_ext in '' $ac_executable_extensions; do
12584   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12585     ac_cv_prog_CC="${ac_tool_prefix}cc"
12586     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587     break 2
12588   fi
12589 done
12590   done
12591 IFS=$as_save_IFS
12592
12593 fi
12594 fi
12595 CC=$ac_cv_prog_CC
12596 if test -n "$CC"; then
12597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12598 $as_echo "$CC" >&6; }
12599 else
12600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12601 $as_echo "no" >&6; }
12602 fi
12603
12604
12605   fi
12606 fi
12607 if test -z "$CC"; then
12608   # Extract the first word of "cc", so it can be a program name with args.
12609 set dummy cc; ac_word=$2
12610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12611 $as_echo_n "checking for $ac_word... " >&6; }
12612 if test "${ac_cv_prog_CC+set}" = set; then :
12613   $as_echo_n "(cached) " >&6
12614 else
12615   if test -n "$CC"; then
12616   ac_cv_prog_CC="$CC" # Let the user override the test.
12617 else
12618   ac_prog_rejected=no
12619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12620 for as_dir in $PATH
12621 do
12622   IFS=$as_save_IFS
12623   test -z "$as_dir" && as_dir=.
12624     for ac_exec_ext in '' $ac_executable_extensions; do
12625   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12626     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12627        ac_prog_rejected=yes
12628        continue
12629      fi
12630     ac_cv_prog_CC="cc"
12631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12632     break 2
12633   fi
12634 done
12635   done
12636 IFS=$as_save_IFS
12637
12638 if test $ac_prog_rejected = yes; then
12639   # We found a bogon in the path, so make sure we never use it.
12640   set dummy $ac_cv_prog_CC
12641   shift
12642   if test $# != 0; then
12643     # We chose a different compiler from the bogus one.
12644     # However, it has the same basename, so the bogon will be chosen
12645     # first if we set CC to just the basename; use the full file name.
12646     shift
12647     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12648   fi
12649 fi
12650 fi
12651 fi
12652 CC=$ac_cv_prog_CC
12653 if test -n "$CC"; then
12654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12655 $as_echo "$CC" >&6; }
12656 else
12657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12658 $as_echo "no" >&6; }
12659 fi
12660
12661
12662 fi
12663 if test -z "$CC"; then
12664   if test -n "$ac_tool_prefix"; then
12665   for ac_prog in cl.exe
12666   do
12667     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12668 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12670 $as_echo_n "checking for $ac_word... " >&6; }
12671 if test "${ac_cv_prog_CC+set}" = set; then :
12672   $as_echo_n "(cached) " >&6
12673 else
12674   if test -n "$CC"; then
12675   ac_cv_prog_CC="$CC" # Let the user override the test.
12676 else
12677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12678 for as_dir in $PATH
12679 do
12680   IFS=$as_save_IFS
12681   test -z "$as_dir" && as_dir=.
12682     for ac_exec_ext in '' $ac_executable_extensions; do
12683   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12684     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12686     break 2
12687   fi
12688 done
12689   done
12690 IFS=$as_save_IFS
12691
12692 fi
12693 fi
12694 CC=$ac_cv_prog_CC
12695 if test -n "$CC"; then
12696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12697 $as_echo "$CC" >&6; }
12698 else
12699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12700 $as_echo "no" >&6; }
12701 fi
12702
12703
12704     test -n "$CC" && break
12705   done
12706 fi
12707 if test -z "$CC"; then
12708   ac_ct_CC=$CC
12709   for ac_prog in cl.exe
12710 do
12711   # Extract the first word of "$ac_prog", so it can be a program name with args.
12712 set dummy $ac_prog; ac_word=$2
12713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12714 $as_echo_n "checking for $ac_word... " >&6; }
12715 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
12716   $as_echo_n "(cached) " >&6
12717 else
12718   if test -n "$ac_ct_CC"; then
12719   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12720 else
12721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12722 for as_dir in $PATH
12723 do
12724   IFS=$as_save_IFS
12725   test -z "$as_dir" && as_dir=.
12726     for ac_exec_ext in '' $ac_executable_extensions; do
12727   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12728     ac_cv_prog_ac_ct_CC="$ac_prog"
12729     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12730     break 2
12731   fi
12732 done
12733   done
12734 IFS=$as_save_IFS
12735
12736 fi
12737 fi
12738 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12739 if test -n "$ac_ct_CC"; then
12740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12741 $as_echo "$ac_ct_CC" >&6; }
12742 else
12743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12744 $as_echo "no" >&6; }
12745 fi
12746
12747
12748   test -n "$ac_ct_CC" && break
12749 done
12750
12751   if test "x$ac_ct_CC" = x; then
12752     CC=""
12753   else
12754     case $cross_compiling:$ac_tool_warned in
12755 yes:)
12756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12757 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12758 ac_tool_warned=yes ;;
12759 esac
12760     CC=$ac_ct_CC
12761   fi
12762 fi
12763
12764 fi
12765
12766
12767 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12768 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12769 as_fn_error "no acceptable C compiler found in \$PATH
12770 See \`config.log' for more details." "$LINENO" 5; }
12771
12772 # Provide some information about the compiler.
12773 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
12774 set X $ac_compile
12775 ac_compiler=$2
12776 for ac_option in --version -v -V -qversion; do
12777   { { ac_try="$ac_compiler $ac_option >&5"
12778 case "(($ac_try" in
12779   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12780   *) ac_try_echo=$ac_try;;
12781 esac
12782 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12783 $as_echo "$ac_try_echo"; } >&5
12784   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
12785   ac_status=$?
12786   if test -s conftest.err; then
12787     sed '10a\
12788 ... rest of stderr output deleted ...
12789          10q' conftest.err >conftest.er1
12790     cat conftest.er1 >&5
12791   fi
12792   rm -f conftest.er1 conftest.err
12793   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12794   test $ac_status = 0; }
12795 done
12796
12797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
12798 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
12799 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
12800   $as_echo_n "(cached) " >&6
12801 else
12802   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12803 /* end confdefs.h.  */
12804
12805 int
12806 main ()
12807 {
12808 #ifndef __GNUC__
12809        choke me
12810 #endif
12811
12812   ;
12813   return 0;
12814 }
12815 _ACEOF
12816 if ac_fn_c_try_compile "$LINENO"; then :
12817   ac_compiler_gnu=yes
12818 else
12819   ac_compiler_gnu=no
12820 fi
12821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12822 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12823
12824 fi
12825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
12826 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
12827 if test $ac_compiler_gnu = yes; then
12828   GCC=yes
12829 else
12830   GCC=
12831 fi
12832 ac_test_CFLAGS=${CFLAGS+set}
12833 ac_save_CFLAGS=$CFLAGS
12834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
12835 $as_echo_n "checking whether $CC accepts -g... " >&6; }
12836 if test "${ac_cv_prog_cc_g+set}" = set; then :
12837   $as_echo_n "(cached) " >&6
12838 else
12839   ac_save_c_werror_flag=$ac_c_werror_flag
12840    ac_c_werror_flag=yes
12841    ac_cv_prog_cc_g=no
12842    CFLAGS="-g"
12843    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12844 /* end confdefs.h.  */
12845
12846 int
12847 main ()
12848 {
12849
12850   ;
12851   return 0;
12852 }
12853 _ACEOF
12854 if ac_fn_c_try_compile "$LINENO"; then :
12855   ac_cv_prog_cc_g=yes
12856 else
12857   CFLAGS=""
12858       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12859 /* end confdefs.h.  */
12860
12861 int
12862 main ()
12863 {
12864
12865   ;
12866   return 0;
12867 }
12868 _ACEOF
12869 if ac_fn_c_try_compile "$LINENO"; then :
12870
12871 else
12872   ac_c_werror_flag=$ac_save_c_werror_flag
12873          CFLAGS="-g"
12874          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12875 /* end confdefs.h.  */
12876
12877 int
12878 main ()
12879 {
12880
12881   ;
12882   return 0;
12883 }
12884 _ACEOF
12885 if ac_fn_c_try_compile "$LINENO"; then :
12886   ac_cv_prog_cc_g=yes
12887 fi
12888 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12889 fi
12890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12891 fi
12892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12893    ac_c_werror_flag=$ac_save_c_werror_flag
12894 fi
12895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
12896 $as_echo "$ac_cv_prog_cc_g" >&6; }
12897 if test "$ac_test_CFLAGS" = set; then
12898   CFLAGS=$ac_save_CFLAGS
12899 elif test $ac_cv_prog_cc_g = yes; then
12900   if test "$GCC" = yes; then
12901     CFLAGS="-g -O2"
12902   else
12903     CFLAGS="-g"
12904   fi
12905 else
12906   if test "$GCC" = yes; then
12907     CFLAGS="-O2"
12908   else
12909     CFLAGS=
12910   fi
12911 fi
12912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
12913 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
12914 if test "${ac_cv_prog_cc_c89+set}" = set; then :
12915   $as_echo_n "(cached) " >&6
12916 else
12917   ac_cv_prog_cc_c89=no
12918 ac_save_CC=$CC
12919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12920 /* end confdefs.h.  */
12921 #include <stdarg.h>
12922 #include <stdio.h>
12923 #include <sys/types.h>
12924 #include <sys/stat.h>
12925 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12926 struct buf { int x; };
12927 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12928 static char *e (p, i)
12929      char **p;
12930      int i;
12931 {
12932   return p[i];
12933 }
12934 static char *f (char * (*g) (char **, int), char **p, ...)
12935 {
12936   char *s;
12937   va_list v;
12938   va_start (v,p);
12939   s = g (p, va_arg (v,int));
12940   va_end (v);
12941   return s;
12942 }
12943
12944 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12945    function prototypes and stuff, but not '\xHH' hex character constants.
12946    These don't provoke an error unfortunately, instead are silently treated
12947    as 'x'.  The following induces an error, until -std is added to get
12948    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12949    array size at least.  It's necessary to write '\x00'==0 to get something
12950    that's true only with -std.  */
12951 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12952
12953 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
12954    inside strings and character constants.  */
12955 #define FOO(x) 'x'
12956 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
12957
12958 int test (int i, double x);
12959 struct s1 {int (*f) (int a);};
12960 struct s2 {int (*f) (double a);};
12961 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12962 int argc;
12963 char **argv;
12964 int
12965 main ()
12966 {
12967 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12968   ;
12969   return 0;
12970 }
12971 _ACEOF
12972 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
12973         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12974 do
12975   CC="$ac_save_CC $ac_arg"
12976   if ac_fn_c_try_compile "$LINENO"; then :
12977   ac_cv_prog_cc_c89=$ac_arg
12978 fi
12979 rm -f core conftest.err conftest.$ac_objext
12980   test "x$ac_cv_prog_cc_c89" != "xno" && break
12981 done
12982 rm -f conftest.$ac_ext
12983 CC=$ac_save_CC
12984
12985 fi
12986 # AC_CACHE_VAL
12987 case "x$ac_cv_prog_cc_c89" in
12988   x)
12989     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12990 $as_echo "none needed" >&6; } ;;
12991   xno)
12992     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12993 $as_echo "unsupported" >&6; } ;;
12994   *)
12995     CC="$CC $ac_cv_prog_cc_c89"
12996     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
12997 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
12998 esac
12999 if test "x$ac_cv_prog_cc_c89" != xno; then :
13000
13001 fi
13002
13003 ac_ext=c
13004 ac_cpp='$CPP $CPPFLAGS'
13005 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13006 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13007 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13008
13009 depcc="$CC"   am_compiler_list=
13010
13011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
13012 $as_echo_n "checking dependency style of $depcc... " >&6; }
13013 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
13014   $as_echo_n "(cached) " >&6
13015 else
13016   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
13017   # We make a subdir and do the tests there.  Otherwise we can end up
13018   # making bogus files that we don't know about and never remove.  For
13019   # instance it was reported that on HP-UX the gcc test will end up
13020   # making a dummy file named `D' -- because `-MD' means `put the output
13021   # in D'.
13022   mkdir conftest.dir
13023   # Copy depcomp to subdir because otherwise we won't find it if we're
13024   # using a relative directory.
13025   cp "$am_depcomp" conftest.dir
13026   cd conftest.dir
13027   # We will build objects and dependencies in a subdirectory because
13028   # it helps to detect inapplicable dependency modes.  For instance
13029   # both Tru64's cc and ICC support -MD to output dependencies as a
13030   # side effect of compilation, but ICC will put the dependencies in
13031   # the current directory while Tru64 will put them in the object
13032   # directory.
13033   mkdir sub
13034
13035   am_cv_CC_dependencies_compiler_type=none
13036   if test "$am_compiler_list" = ""; then
13037      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
13038   fi
13039   for depmode in $am_compiler_list; do
13040     # Setup a source with many dependencies, because some compilers
13041     # like to wrap large dependency lists on column 80 (with \), and
13042     # we should not choose a depcomp mode which is confused by this.
13043     #
13044     # We need to recreate these files for each test, as the compiler may
13045     # overwrite some of them when testing with obscure command lines.
13046     # This happens at least with the AIX C compiler.
13047     : > sub/conftest.c
13048     for i in 1 2 3 4 5 6; do
13049       echo '#include "conftst'$i'.h"' >> sub/conftest.c
13050       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
13051       # Solaris 8's {/usr,}/bin/sh.
13052       touch sub/conftst$i.h
13053     done
13054     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
13055
13056     case $depmode in
13057     nosideeffect)
13058       # after this tag, mechanisms are not by side-effect, so they'll
13059       # only be used when explicitly requested
13060       if test "x$enable_dependency_tracking" = xyes; then
13061         continue
13062       else
13063         break
13064       fi
13065       ;;
13066     none) break ;;
13067     esac
13068     # We check with `-c' and `-o' for the sake of the "dashmstdout"
13069     # mode.  It turns out that the SunPro C++ compiler does not properly
13070     # handle `-M -o', and we need to detect this.
13071     if depmode=$depmode \
13072        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
13073        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
13074        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
13075          >/dev/null 2>conftest.err &&
13076        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
13077        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
13078        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
13079       # icc doesn't choke on unknown options, it will just issue warnings
13080       # or remarks (even with -Werror).  So we grep stderr for any message
13081       # that says an option was ignored or not supported.
13082       # When given -MP, icc 7.0 and 7.1 complain thusly:
13083       #   icc: Command line warning: ignoring option '-M'; no argument required
13084       # The diagnosis changed in icc 8.0:
13085       #   icc: Command line remark: option '-MP' not supported
13086       if (grep 'ignoring option' conftest.err ||
13087           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
13088         am_cv_CC_dependencies_compiler_type=$depmode
13089         break
13090       fi
13091     fi
13092   done
13093
13094   cd ..
13095   rm -rf conftest.dir
13096 else
13097   am_cv_CC_dependencies_compiler_type=none
13098 fi
13099
13100 fi
13101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
13102 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
13103 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
13104
13105
13106
13107 if
13108   test "x$enable_dependency_tracking" != xno \
13109   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
13110   am__fastdepCC_TRUE=
13111   am__fastdepCC_FALSE='#'
13112 else
13113   am__fastdepCC_TRUE='#'
13114   am__fastdepCC_FALSE=
13115 fi
13116
13117
13118 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
13119         as_fn_error "OpenLDAP requires compiler to support STDC constructs." "$LINENO" 5
13120 fi
13121
13122 # test for make depend flag
13123 OL_MKDEP=
13124 OL_MKDEP_FLAGS=
13125 if test -z "${MKDEP}"; then
13126         OL_MKDEP="${CC-cc}"
13127         if test -z "${MKDEP_FLAGS}"; then
13128                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${OL_MKDEP} depend flag" >&5
13129 $as_echo_n "checking for ${OL_MKDEP} depend flag... " >&6; }
13130 if test "${ol_cv_mkdep+set}" = set; then :
13131   $as_echo_n "(cached) " >&6
13132 else
13133
13134                         ol_cv_mkdep=no
13135                         for flag in "-M" "-xM"; do
13136                                 cat > conftest.c <<EOF
13137  noCode;
13138 EOF
13139                                 if { ac_try='$OL_MKDEP $flag conftest.c'
13140   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
13141   (eval $ac_try) 2>&5
13142   ac_status=$?
13143   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13144   test $ac_status = 0; }; } \
13145                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
13146                                 then
13147                                         if test ! -f conftest."${ac_object}" ; then
13148                                                 ol_cv_mkdep=$flag
13149                                                 OL_MKDEP_FLAGS="$flag"
13150                                                 break
13151                                         fi
13152                                 fi
13153                         done
13154                         rm -f conftest*
13155
13156 fi
13157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_mkdep" >&5
13158 $as_echo "$ol_cv_mkdep" >&6; }
13159                 test "$ol_cv_mkdep" = no && OL_MKDEP=":"
13160         else
13161                 cc_cv_mkdep=yes
13162                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13163         fi
13164 else
13165         cc_cv_mkdep=yes
13166         OL_MKDEP="${MKDEP}"
13167         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13168 fi
13169
13170
13171
13172 if test "${ol_cv_mkdep}" = no ; then
13173         # this will soon become an error
13174         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: do not know how to generate dependencies" >&5
13175 $as_echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
13176 fi
13177
13178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for afopen in -ls" >&5
13179 $as_echo_n "checking for afopen in -ls... " >&6; }
13180 if test "${ac_cv_lib_s_afopen+set}" = set; then :
13181   $as_echo_n "(cached) " >&6
13182 else
13183   ac_check_lib_save_LIBS=$LIBS
13184 LIBS="-ls  $LIBS"
13185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13186 /* end confdefs.h.  */
13187
13188 /* Override any GCC internal prototype to avoid an error.
13189    Use char because int might match the return type of a GCC
13190    builtin and then its argument prototype would still apply.  */
13191 #ifdef __cplusplus
13192 extern "C"
13193 #endif
13194 char afopen ();
13195 int
13196 main ()
13197 {
13198 return afopen ();
13199   ;
13200   return 0;
13201 }
13202 _ACEOF
13203 if ac_fn_c_try_link "$LINENO"; then :
13204   ac_cv_lib_s_afopen=yes
13205 else
13206   ac_cv_lib_s_afopen=no
13207 fi
13208 rm -f core conftest.err conftest.$ac_objext \
13209     conftest$ac_exeext conftest.$ac_ext
13210 LIBS=$ac_check_lib_save_LIBS
13211 fi
13212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_afopen" >&5
13213 $as_echo "$ac_cv_lib_s_afopen" >&6; }
13214 if test "x$ac_cv_lib_s_afopen" = x""yes; then :
13215
13216         AUTH_LIBS=-ls
13217
13218 $as_echo "#define HAVE_AIX_SECURITY 1" >>confdefs.h
13219
13220
13221 fi
13222
13223
13224 case "$target" in
13225 *-ibm-openedition)
13226         ac_cv_func_getopt=no
13227
13228 $as_echo "#define BOTH_STRINGS_H 1" >>confdefs.h
13229
13230         ;;
13231 esac
13232
13233 ol_link_modules=no
13234 WITH_MODULES_ENABLED=no
13235 if test $ol_enable_modules != no ; then
13236         for ac_header in ltdl.h
13237 do :
13238   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
13239 if test "x$ac_cv_header_ltdl_h" = x""yes; then :
13240   cat >>confdefs.h <<_ACEOF
13241 #define HAVE_LTDL_H 1
13242 _ACEOF
13243
13244 fi
13245
13246 done
13247
13248
13249         if test $ac_cv_header_ltdl_h = no ; then
13250                 as_fn_error "could not locate libtool ltdl.h" "$LINENO" 5
13251         fi
13252
13253         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
13254 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
13255 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
13256   $as_echo_n "(cached) " >&6
13257 else
13258   ac_check_lib_save_LIBS=$LIBS
13259 LIBS="-lltdl  $LIBS"
13260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13261 /* end confdefs.h.  */
13262
13263 /* Override any GCC internal prototype to avoid an error.
13264    Use char because int might match the return type of a GCC
13265    builtin and then its argument prototype would still apply.  */
13266 #ifdef __cplusplus
13267 extern "C"
13268 #endif
13269 char lt_dlinit ();
13270 int
13271 main ()
13272 {
13273 return lt_dlinit ();
13274   ;
13275   return 0;
13276 }
13277 _ACEOF
13278 if ac_fn_c_try_link "$LINENO"; then :
13279   ac_cv_lib_ltdl_lt_dlinit=yes
13280 else
13281   ac_cv_lib_ltdl_lt_dlinit=no
13282 fi
13283 rm -f core conftest.err conftest.$ac_objext \
13284     conftest$ac_exeext conftest.$ac_ext
13285 LIBS=$ac_check_lib_save_LIBS
13286 fi
13287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13288 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
13289 if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
13290
13291                 MODULES_LIBS=-lltdl
13292
13293 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
13294
13295
13296 fi
13297
13298
13299         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13300                 as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
13301         fi
13302         ol_link_modules=yes
13303         WITH_MODULES_ENABLED=yes
13304
13305 else
13306         for i in $Backends; do
13307                 eval "ol_tmp=\$ol_enable_$i"
13308                 if test $ol_tmp = mod ; then
13309                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i backend" >&5
13310 $as_echo "$as_me: WARNING: building static $i backend" >&2;}
13311                         eval "ol_enable_$i=yes"
13312                 fi
13313         done
13314         for i in $Overlays; do
13315                 eval "ol_tmp=\$ol_enable_$i"
13316                 if test $ol_tmp = mod ; then
13317                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i overlay" >&5
13318 $as_echo "$as_me: WARNING: building static $i overlay" >&2;}
13319                         eval "ol_enable_$i=yes"
13320                 fi
13321         done
13322 fi
13323
13324 # test for EBCDIC
13325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EBCDIC" >&5
13326 $as_echo_n "checking for EBCDIC... " >&6; }
13327 if test "${ol_cv_cpp_ebcdic+set}" = set; then :
13328   $as_echo_n "(cached) " >&6
13329 else
13330
13331         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13332 /* end confdefs.h.  */
13333
13334 #if !('M' == 0xd4)
13335 #include <__ASCII__/generate_error.h>
13336 #endif
13337
13338 _ACEOF
13339 if ac_fn_c_try_cpp "$LINENO"; then :
13340   ol_cv_cpp_ebcdic=yes
13341 else
13342   ol_cv_cpp_ebcdic=no
13343 fi
13344 rm -f conftest.err conftest.$ac_ext
13345 fi
13346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cpp_ebcdic" >&5
13347 $as_echo "$ol_cv_cpp_ebcdic" >&6; }
13348 if test $ol_cv_cpp_ebcdic = yes ; then
13349
13350 $as_echo "#define HAVE_EBCDIC 1" >>confdefs.h
13351
13352 fi
13353
13354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13355 $as_echo_n "checking for ANSI C header files... " >&6; }
13356 if test "${ol_cv_header_stdc+set}" = set; then :
13357   $as_echo_n "(cached) " >&6
13358 else
13359   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13360 /* end confdefs.h.  */
13361 #include <stdlib.h>
13362 #include <stdarg.h>
13363 #include <string.h>
13364 #include <float.h>
13365 _ACEOF
13366 if ac_fn_c_try_cpp "$LINENO"; then :
13367   ol_cv_header_stdc=yes
13368 else
13369   ol_cv_header_stdc=no
13370 fi
13371 rm -f conftest.err conftest.$ac_ext
13372
13373 if test $ol_cv_header_stdc = yes; then
13374   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13376 /* end confdefs.h.  */
13377 #include <string.h>
13378
13379 _ACEOF
13380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13381   $EGREP "memchr" >/dev/null 2>&1; then :
13382
13383 else
13384   ol_cv_header_stdc=no
13385 fi
13386 rm -f conftest*
13387
13388 fi
13389
13390 if test $ol_cv_header_stdc = yes; then
13391   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13393 /* end confdefs.h.  */
13394 #include <stdlib.h>
13395
13396 _ACEOF
13397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13398   $EGREP "free" >/dev/null 2>&1; then :
13399
13400 else
13401   ol_cv_header_stdc=no
13402 fi
13403 rm -f conftest*
13404
13405 fi
13406
13407 if test $ol_cv_header_stdc = yes; then
13408   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13409 if test "$cross_compiling" = yes; then :
13410   :
13411 else
13412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13413 /* end confdefs.h.  */
13414 #include <ctype.h>
13415 #ifndef HAVE_EBCDIC
13416 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13417 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13418 #else
13419 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13420                 || ('j' <= (c) && (c) <= 'r') \
13421                 || ('s' <= (c) && (c) <= 'z'))
13422 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13423 #endif
13424 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13425 int main () { int i; for (i = 0; i < 256; i++)
13426 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13427 exit (0); }
13428
13429 _ACEOF
13430 if ac_fn_c_try_run "$LINENO"; then :
13431
13432 else
13433   ol_cv_header_stdc=no
13434 fi
13435 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13436   conftest.$ac_objext conftest.beam conftest.$ac_ext
13437 fi
13438
13439 fi
13440 fi
13441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_stdc" >&5
13442 $as_echo "$ol_cv_header_stdc" >&6; }
13443 if test $ol_cv_header_stdc = yes; then
13444   $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13445
13446 fi
13447 ac_cv_header_stdc=disable
13448
13449
13450 if test $ol_cv_header_stdc != yes; then
13451         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate Standard C compliant headers" >&5
13452 $as_echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13453 fi
13454
13455 ac_header_dirent=no
13456 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13457   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
13459 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
13460 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
13461   $as_echo_n "(cached) " >&6
13462 else
13463   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13464 /* end confdefs.h.  */
13465 #include <sys/types.h>
13466 #include <$ac_hdr>
13467
13468 int
13469 main ()
13470 {
13471 if ((DIR *) 0)
13472 return 0;
13473   ;
13474   return 0;
13475 }
13476 _ACEOF
13477 if ac_fn_c_try_compile "$LINENO"; then :
13478   eval "$as_ac_Header=yes"
13479 else
13480   eval "$as_ac_Header=no"
13481 fi
13482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13483 fi
13484 eval ac_res=\$$as_ac_Header
13485                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13486 $as_echo "$ac_res" >&6; }
13487 eval as_val=\$$as_ac_Header
13488    if test "x$as_val" = x""yes; then :
13489   cat >>confdefs.h <<_ACEOF
13490 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13491 _ACEOF
13492
13493 ac_header_dirent=$ac_hdr; break
13494 fi
13495
13496 done
13497 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13498 if test $ac_header_dirent = dirent.h; then
13499   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13500 $as_echo_n "checking for library containing opendir... " >&6; }
13501 if test "${ac_cv_search_opendir+set}" = set; then :
13502   $as_echo_n "(cached) " >&6
13503 else
13504   ac_func_search_save_LIBS=$LIBS
13505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13506 /* end confdefs.h.  */
13507
13508 /* Override any GCC internal prototype to avoid an error.
13509    Use char because int might match the return type of a GCC
13510    builtin and then its argument prototype would still apply.  */
13511 #ifdef __cplusplus
13512 extern "C"
13513 #endif
13514 char opendir ();
13515 int
13516 main ()
13517 {
13518 return opendir ();
13519   ;
13520   return 0;
13521 }
13522 _ACEOF
13523 for ac_lib in '' dir; do
13524   if test -z "$ac_lib"; then
13525     ac_res="none required"
13526   else
13527     ac_res=-l$ac_lib
13528     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13529   fi
13530   if ac_fn_c_try_link "$LINENO"; then :
13531   ac_cv_search_opendir=$ac_res
13532 fi
13533 rm -f core conftest.err conftest.$ac_objext \
13534     conftest$ac_exeext
13535   if test "${ac_cv_search_opendir+set}" = set; then :
13536   break
13537 fi
13538 done
13539 if test "${ac_cv_search_opendir+set}" = set; then :
13540
13541 else
13542   ac_cv_search_opendir=no
13543 fi
13544 rm conftest.$ac_ext
13545 LIBS=$ac_func_search_save_LIBS
13546 fi
13547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13548 $as_echo "$ac_cv_search_opendir" >&6; }
13549 ac_res=$ac_cv_search_opendir
13550 if test "$ac_res" != no; then :
13551   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13552
13553 fi
13554
13555 else
13556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13557 $as_echo_n "checking for library containing opendir... " >&6; }
13558 if test "${ac_cv_search_opendir+set}" = set; then :
13559   $as_echo_n "(cached) " >&6
13560 else
13561   ac_func_search_save_LIBS=$LIBS
13562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13563 /* end confdefs.h.  */
13564
13565 /* Override any GCC internal prototype to avoid an error.
13566    Use char because int might match the return type of a GCC
13567    builtin and then its argument prototype would still apply.  */
13568 #ifdef __cplusplus
13569 extern "C"
13570 #endif
13571 char opendir ();
13572 int
13573 main ()
13574 {
13575 return opendir ();
13576   ;
13577   return 0;
13578 }
13579 _ACEOF
13580 for ac_lib in '' x; do
13581   if test -z "$ac_lib"; then
13582     ac_res="none required"
13583   else
13584     ac_res=-l$ac_lib
13585     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13586   fi
13587   if ac_fn_c_try_link "$LINENO"; then :
13588   ac_cv_search_opendir=$ac_res
13589 fi
13590 rm -f core conftest.err conftest.$ac_objext \
13591     conftest$ac_exeext
13592   if test "${ac_cv_search_opendir+set}" = set; then :
13593   break
13594 fi
13595 done
13596 if test "${ac_cv_search_opendir+set}" = set; then :
13597
13598 else
13599   ac_cv_search_opendir=no
13600 fi
13601 rm conftest.$ac_ext
13602 LIBS=$ac_func_search_save_LIBS
13603 fi
13604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13605 $as_echo "$ac_cv_search_opendir" >&6; }
13606 ac_res=$ac_cv_search_opendir
13607 if test "$ac_res" != no; then :
13608   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13609
13610 fi
13611
13612 fi
13613
13614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
13615 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
13616 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
13617   $as_echo_n "(cached) " >&6
13618 else
13619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13620 /* end confdefs.h.  */
13621 #include <sys/types.h>
13622 #include <sys/wait.h>
13623 #ifndef WEXITSTATUS
13624 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
13625 #endif
13626 #ifndef WIFEXITED
13627 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13628 #endif
13629
13630 int
13631 main ()
13632 {
13633   int s;
13634   wait (&s);
13635   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13636   ;
13637   return 0;
13638 }
13639 _ACEOF
13640 if ac_fn_c_try_compile "$LINENO"; then :
13641   ac_cv_header_sys_wait_h=yes
13642 else
13643   ac_cv_header_sys_wait_h=no
13644 fi
13645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13646 fi
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
13648 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
13649 if test $ac_cv_header_sys_wait_h = yes; then
13650
13651 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
13652
13653 fi
13654
13655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
13656 $as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
13657 if test "${ac_cv_sys_tiocgwinsz_in_termios_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 <termios.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_termios_h=yes
13672 else
13673   ac_cv_sys_tiocgwinsz_in_termios_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_termios_h" >&5
13679 $as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
13680
13681 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13682   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13683 $as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
13684 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then :
13685   $as_echo_n "(cached) " >&6
13686 else
13687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13688 /* end confdefs.h.  */
13689 #include <sys/types.h>
13690 #include <sys/ioctl.h>
13691 #ifdef TIOCGWINSZ
13692   yes
13693 #endif
13694
13695 _ACEOF
13696 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13697   $EGREP "yes" >/dev/null 2>&1; then :
13698   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13699 else
13700   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13701 fi
13702 rm -f conftest*
13703
13704 fi
13705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13706 $as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
13707
13708   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13709
13710 $as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
13711
13712   fi
13713 fi
13714
13715
13716 for ac_header in \
13717         arpa/inet.h             \
13718         arpa/nameser.h  \
13719         assert.h                \
13720         bits/types.h    \
13721         conio.h                 \
13722         crypt.h                 \
13723         direct.h                \
13724         errno.h                 \
13725         fcntl.h                 \
13726         filio.h                 \
13727         getopt.h                \
13728         grp.h                   \
13729         io.h                    \
13730         libutil.h               \
13731         limits.h                \
13732         locale.h                \
13733         malloc.h                \
13734         memory.h                \
13735         psap.h                  \
13736         pwd.h                   \
13737         process.h               \
13738         sgtty.h                 \
13739         shadow.h                \
13740         stddef.h                \
13741         string.h                \
13742         strings.h               \
13743         sysexits.h              \
13744         sys/file.h              \
13745         sys/filio.h             \
13746         sys/fstyp.h             \
13747         sys/errno.h             \
13748         sys/ioctl.h             \
13749         sys/param.h             \
13750         sys/privgrp.h   \
13751         sys/resource.h  \
13752         sys/select.h    \
13753         sys/socket.h    \
13754         sys/stat.h              \
13755         sys/syslog.h    \
13756         sys/time.h              \
13757         sys/types.h             \
13758         sys/uio.h               \
13759         sys/vmount.h    \
13760         syslog.h                \
13761         termios.h               \
13762         unistd.h                \
13763         utime.h                 \
13764
13765 do :
13766   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13767 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13768 eval as_val=\$$as_ac_Header
13769    if test "x$as_val" = x""yes; then :
13770   cat >>confdefs.h <<_ACEOF
13771 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13772 _ACEOF
13773
13774 fi
13775
13776 done
13777
13778
13779 if test "$ac_cv_mingw32" = yes \
13780         -o "$ac_cv_interix" = yes \
13781         -o "$ol_cv_msvc" = yes
13782 then
13783         for ac_header in winsock.h winsock2.h
13784 do :
13785   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13786 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13787 eval as_val=\$$as_ac_Header
13788    if test "x$as_val" = x""yes; then :
13789   cat >>confdefs.h <<_ACEOF
13790 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13791 _ACEOF
13792
13793 fi
13794
13795 done
13796
13797 fi
13798
13799 for ac_header in resolv.h
13800 do :
13801   ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default
13802 #include <netinet/in.h>
13803
13804 "
13805 if test "x$ac_cv_header_resolv_h" = x""yes; then :
13806   cat >>confdefs.h <<_ACEOF
13807 #define HAVE_RESOLV_H 1
13808 _ACEOF
13809
13810 fi
13811
13812 done
13813
13814
13815 for ac_header in netinet/tcp.h
13816 do :
13817   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13818 #include <netinet/in.h>
13819
13820 "
13821 if test "x$ac_cv_header_netinet_tcp_h" = x""yes; then :
13822   cat >>confdefs.h <<_ACEOF
13823 #define HAVE_NETINET_TCP_H 1
13824 _ACEOF
13825
13826 fi
13827
13828 done
13829
13830
13831 for ac_header in sys/ucred.h
13832 do :
13833   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13834 #ifdef HAVE_SYS_PARAM_H
13835 #include <sys/param.h>
13836 #endif
13837
13838 "
13839 if test "x$ac_cv_header_sys_ucred_h" = x""yes; then :
13840   cat >>confdefs.h <<_ACEOF
13841 #define HAVE_SYS_UCRED_H 1
13842 _ACEOF
13843
13844 fi
13845
13846 done
13847
13848
13849
13850 for ac_func in sigaction sigset
13851 do :
13852   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13853 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13854 eval as_val=\$$as_ac_var
13855    if test "x$as_val" = x""yes; then :
13856   cat >>confdefs.h <<_ACEOF
13857 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13858 _ACEOF
13859
13860 fi
13861 done
13862
13863
13864 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
13865         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset in -lV3" >&5
13866 $as_echo_n "checking for sigset in -lV3... " >&6; }
13867 if test "${ac_cv_lib_V3_sigset+set}" = set; then :
13868   $as_echo_n "(cached) " >&6
13869 else
13870   ac_check_lib_save_LIBS=$LIBS
13871 LIBS="-lV3  $LIBS"
13872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13873 /* end confdefs.h.  */
13874
13875 /* Override any GCC internal prototype to avoid an error.
13876    Use char because int might match the return type of a GCC
13877    builtin and then its argument prototype would still apply.  */
13878 #ifdef __cplusplus
13879 extern "C"
13880 #endif
13881 char sigset ();
13882 int
13883 main ()
13884 {
13885 return sigset ();
13886   ;
13887   return 0;
13888 }
13889 _ACEOF
13890 if ac_fn_c_try_link "$LINENO"; then :
13891   ac_cv_lib_V3_sigset=yes
13892 else
13893   ac_cv_lib_V3_sigset=no
13894 fi
13895 rm -f core conftest.err conftest.$ac_objext \
13896     conftest$ac_exeext conftest.$ac_ext
13897 LIBS=$ac_check_lib_save_LIBS
13898 fi
13899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_V3_sigset" >&5
13900 $as_echo "$ac_cv_lib_V3_sigset" >&6; }
13901 if test "x$ac_cv_lib_V3_sigset" = x""yes; then :
13902   cat >>confdefs.h <<_ACEOF
13903 #define HAVE_LIBV3 1
13904 _ACEOF
13905
13906   LIBS="-lV3 $LIBS"
13907
13908 fi
13909
13910 fi
13911
13912 if test $ol_cv_msvc = yes ; then
13913    ol_cv_winsock=yes
13914 fi
13915
13916 if test "$ac_cv_header_winsock_h" = yes; then
13917         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock" >&5
13918 $as_echo_n "checking for winsock... " >&6; }
13919 if test "${ol_cv_winsock+set}" = set; then :
13920   $as_echo_n "(cached) " >&6
13921 else
13922
13923         save_LIBS="$LIBS"
13924         for curlib in none ws2_32 wsock32; do
13925                 if test $curlib != none ; then
13926                 LIBS="$save_LIBS -l$curlib"
13927                 fi
13928                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13929 /* end confdefs.h.  */
13930 #include <winsock.h>
13931
13932 int
13933 main ()
13934 {
13935
13936                         socket(0,0,0);
13937                         select(0,NULL,NULL,NULL,NULL);
13938                         closesocket(0);
13939                         gethostname(NULL,0);
13940
13941   ;
13942   return 0;
13943 }
13944 _ACEOF
13945 if ac_fn_c_try_link "$LINENO"; then :
13946   ol_cv_winsock=$curlib
13947 else
13948   ol_cv_winsock=no
13949 fi
13950 rm -f core conftest.err conftest.$ac_objext \
13951     conftest$ac_exeext conftest.$ac_ext
13952
13953                 test "$ol_cv_winsock" != no && break
13954         done
13955         LIBS="$save_LIBS"
13956
13957 fi
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_winsock" >&5
13959 $as_echo "$ol_cv_winsock" >&6; }
13960
13961         if test $ol_cv_winsock != no ; then
13962
13963 $as_echo "#define HAVE_WINSOCK 1" >>confdefs.h
13964
13965         ac_cv_func_socket=yes
13966         ac_cv_func_select=yes
13967         ac_cv_func_closesocket=yes
13968         ac_cv_func_gethostname=yes
13969
13970                 if test $ol_cv_winsock != none -a $ol_cv_winsock != yes ; then
13971                 LIBS="$LIBS -l$ol_cv_winsock"
13972                 fi
13973
13974         if test $ol_cv_winsock = ws2_32 -o $ol_cv_winsock = yes ; then
13975
13976 $as_echo "#define HAVE_WINSOCK2 1" >>confdefs.h
13977
13978         fi
13979         fi
13980 fi
13981
13982
13983 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13984 if test "x$ac_cv_func_socket" = x""yes; then :
13985   :
13986 else
13987
13988         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
13989 $as_echo_n "checking for main in -lsocket... " >&6; }
13990 if test "${ac_cv_lib_socket_main+set}" = set; then :
13991   $as_echo_n "(cached) " >&6
13992 else
13993   ac_check_lib_save_LIBS=$LIBS
13994 LIBS="-lsocket  $LIBS"
13995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13996 /* end confdefs.h.  */
13997
13998
13999 int
14000 main ()
14001 {
14002 return main ();
14003   ;
14004   return 0;
14005 }
14006 _ACEOF
14007 if ac_fn_c_try_link "$LINENO"; then :
14008   ac_cv_lib_socket_main=yes
14009 else
14010   ac_cv_lib_socket_main=no
14011 fi
14012 rm -f core conftest.err conftest.$ac_objext \
14013     conftest$ac_exeext conftest.$ac_ext
14014 LIBS=$ac_check_lib_save_LIBS
14015 fi
14016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
14017 $as_echo "$ac_cv_lib_socket_main" >&6; }
14018 if test "x$ac_cv_lib_socket_main" = x""yes; then :
14019   cat >>confdefs.h <<_ACEOF
14020 #define HAVE_LIBSOCKET 1
14021 _ACEOF
14022
14023   LIBS="-lsocket $LIBS"
14024
14025 fi
14026
14027         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
14028 $as_echo_n "checking for socket in -lnet... " >&6; }
14029 if test "${ac_cv_lib_net_socket+set}" = set; then :
14030   $as_echo_n "(cached) " >&6
14031 else
14032   ac_check_lib_save_LIBS=$LIBS
14033 LIBS="-lnet  $LIBS"
14034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14035 /* end confdefs.h.  */
14036
14037 /* Override any GCC internal prototype to avoid an error.
14038    Use char because int might match the return type of a GCC
14039    builtin and then its argument prototype would still apply.  */
14040 #ifdef __cplusplus
14041 extern "C"
14042 #endif
14043 char socket ();
14044 int
14045 main ()
14046 {
14047 return socket ();
14048   ;
14049   return 0;
14050 }
14051 _ACEOF
14052 if ac_fn_c_try_link "$LINENO"; then :
14053   ac_cv_lib_net_socket=yes
14054 else
14055   ac_cv_lib_net_socket=no
14056 fi
14057 rm -f core conftest.err conftest.$ac_objext \
14058     conftest$ac_exeext conftest.$ac_ext
14059 LIBS=$ac_check_lib_save_LIBS
14060 fi
14061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
14062 $as_echo "$ac_cv_lib_net_socket" >&6; }
14063 if test "x$ac_cv_lib_net_socket" = x""yes; then :
14064   cat >>confdefs.h <<_ACEOF
14065 #define HAVE_LIBNET 1
14066 _ACEOF
14067
14068   LIBS="-lnet $LIBS"
14069
14070 fi
14071
14072         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl_s" >&5
14073 $as_echo_n "checking for main in -lnsl_s... " >&6; }
14074 if test "${ac_cv_lib_nsl_s_main+set}" = set; then :
14075   $as_echo_n "(cached) " >&6
14076 else
14077   ac_check_lib_save_LIBS=$LIBS
14078 LIBS="-lnsl_s  $LIBS"
14079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14080 /* end confdefs.h.  */
14081
14082
14083 int
14084 main ()
14085 {
14086 return main ();
14087   ;
14088   return 0;
14089 }
14090 _ACEOF
14091 if ac_fn_c_try_link "$LINENO"; then :
14092   ac_cv_lib_nsl_s_main=yes
14093 else
14094   ac_cv_lib_nsl_s_main=no
14095 fi
14096 rm -f core conftest.err conftest.$ac_objext \
14097     conftest$ac_exeext conftest.$ac_ext
14098 LIBS=$ac_check_lib_save_LIBS
14099 fi
14100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_s_main" >&5
14101 $as_echo "$ac_cv_lib_nsl_s_main" >&6; }
14102 if test "x$ac_cv_lib_nsl_s_main" = x""yes; then :
14103   cat >>confdefs.h <<_ACEOF
14104 #define HAVE_LIBNSL_S 1
14105 _ACEOF
14106
14107   LIBS="-lnsl_s $LIBS"
14108
14109 fi
14110
14111         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5
14112 $as_echo_n "checking for main in -lnsl... " >&6; }
14113 if test "${ac_cv_lib_nsl_main+set}" = set; then :
14114   $as_echo_n "(cached) " >&6
14115 else
14116   ac_check_lib_save_LIBS=$LIBS
14117 LIBS="-lnsl  $LIBS"
14118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14119 /* end confdefs.h.  */
14120
14121
14122 int
14123 main ()
14124 {
14125 return main ();
14126   ;
14127   return 0;
14128 }
14129 _ACEOF
14130 if ac_fn_c_try_link "$LINENO"; then :
14131   ac_cv_lib_nsl_main=yes
14132 else
14133   ac_cv_lib_nsl_main=no
14134 fi
14135 rm -f core conftest.err conftest.$ac_objext \
14136     conftest$ac_exeext conftest.$ac_ext
14137 LIBS=$ac_check_lib_save_LIBS
14138 fi
14139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5
14140 $as_echo "$ac_cv_lib_nsl_main" >&6; }
14141 if test "x$ac_cv_lib_nsl_main" = x""yes; then :
14142   cat >>confdefs.h <<_ACEOF
14143 #define HAVE_LIBNSL 1
14144 _ACEOF
14145
14146   LIBS="-lnsl $LIBS"
14147
14148 fi
14149
14150         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -linet" >&5
14151 $as_echo_n "checking for socket in -linet... " >&6; }
14152 if test "${ac_cv_lib_inet_socket+set}" = set; then :
14153   $as_echo_n "(cached) " >&6
14154 else
14155   ac_check_lib_save_LIBS=$LIBS
14156 LIBS="-linet  $LIBS"
14157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14158 /* end confdefs.h.  */
14159
14160 /* Override any GCC internal prototype to avoid an error.
14161    Use char because int might match the return type of a GCC
14162    builtin and then its argument prototype would still apply.  */
14163 #ifdef __cplusplus
14164 extern "C"
14165 #endif
14166 char socket ();
14167 int
14168 main ()
14169 {
14170 return socket ();
14171   ;
14172   return 0;
14173 }
14174 _ACEOF
14175 if ac_fn_c_try_link "$LINENO"; then :
14176   ac_cv_lib_inet_socket=yes
14177 else
14178   ac_cv_lib_inet_socket=no
14179 fi
14180 rm -f core conftest.err conftest.$ac_objext \
14181     conftest$ac_exeext conftest.$ac_ext
14182 LIBS=$ac_check_lib_save_LIBS
14183 fi
14184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_socket" >&5
14185 $as_echo "$ac_cv_lib_inet_socket" >&6; }
14186 if test "x$ac_cv_lib_inet_socket" = x""yes; then :
14187   cat >>confdefs.h <<_ACEOF
14188 #define HAVE_LIBINET 1
14189 _ACEOF
14190
14191   LIBS="-linet $LIBS"
14192
14193 fi
14194
14195         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgen" >&5
14196 $as_echo_n "checking for main in -lgen... " >&6; }
14197 if test "${ac_cv_lib_gen_main+set}" = set; then :
14198   $as_echo_n "(cached) " >&6
14199 else
14200   ac_check_lib_save_LIBS=$LIBS
14201 LIBS="-lgen  $LIBS"
14202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14203 /* end confdefs.h.  */
14204
14205
14206 int
14207 main ()
14208 {
14209 return main ();
14210   ;
14211   return 0;
14212 }
14213 _ACEOF
14214 if ac_fn_c_try_link "$LINENO"; then :
14215   ac_cv_lib_gen_main=yes
14216 else
14217   ac_cv_lib_gen_main=no
14218 fi
14219 rm -f core conftest.err conftest.$ac_objext \
14220     conftest$ac_exeext conftest.$ac_ext
14221 LIBS=$ac_check_lib_save_LIBS
14222 fi
14223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_main" >&5
14224 $as_echo "$ac_cv_lib_gen_main" >&6; }
14225 if test "x$ac_cv_lib_gen_main" = x""yes; then :
14226   cat >>confdefs.h <<_ACEOF
14227 #define HAVE_LIBGEN 1
14228 _ACEOF
14229
14230   LIBS="-lgen $LIBS"
14231
14232 fi
14233
14234
14235 fi
14236
14237
14238 ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
14239 if test "x$ac_cv_func_select" = x""yes; then :
14240   :
14241 else
14242   as_fn_error "select() required." "$LINENO" 5
14243 fi
14244
14245
14246 if test "${ac_cv_header_winsock_h}" != yes; then
14247                                 for ac_header in sys/select.h sys/socket.h
14248 do :
14249   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14250 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14251 eval as_val=\$$as_ac_Header
14252    if test "x$as_val" = x""yes; then :
14253   cat >>confdefs.h <<_ACEOF
14254 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14255 _ACEOF
14256
14257 fi
14258
14259 done
14260
14261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
14262 $as_echo_n "checking types of arguments for select... " >&6; }
14263 if test "${ac_cv_func_select_args+set}" = set; then :
14264   $as_echo_n "(cached) " >&6
14265 else
14266   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
14267  for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
14268   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
14269    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14270 /* end confdefs.h.  */
14271 $ac_includes_default
14272 #ifdef HAVE_SYS_SELECT_H
14273 # include <sys/select.h>
14274 #endif
14275 #ifdef HAVE_SYS_SOCKET_H
14276 # include <sys/socket.h>
14277 #endif
14278
14279 int
14280 main ()
14281 {
14282 extern int select ($ac_arg1,
14283                                             $ac_arg234, $ac_arg234, $ac_arg234,
14284                                             $ac_arg5);
14285   ;
14286   return 0;
14287 }
14288 _ACEOF
14289 if ac_fn_c_try_compile "$LINENO"; then :
14290   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
14291 fi
14292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14293   done
14294  done
14295 done
14296 # Provide a safe default value.
14297 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
14298
14299 fi
14300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
14301 $as_echo "$ac_cv_func_select_args" >&6; }
14302 ac_save_IFS=$IFS; IFS=','
14303 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
14304 IFS=$ac_save_IFS
14305 shift
14306
14307 cat >>confdefs.h <<_ACEOF
14308 #define SELECT_TYPE_ARG1 $1
14309 _ACEOF
14310
14311
14312 cat >>confdefs.h <<_ACEOF
14313 #define SELECT_TYPE_ARG234 ($2)
14314 _ACEOF
14315
14316
14317 cat >>confdefs.h <<_ACEOF
14318 #define SELECT_TYPE_ARG5 ($3)
14319 _ACEOF
14320
14321 rm -f conftest*
14322
14323 fi
14324
14325
14326 for ac_func in poll
14327 do :
14328   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14329 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14330 eval as_val=\$$as_ac_var
14331    if test "x$as_val" = x""yes; then :
14332   cat >>confdefs.h <<_ACEOF
14333 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14334 _ACEOF
14335
14336 fi
14337 done
14338
14339 if test $ac_cv_func_poll = yes; then
14340 for ac_header in poll.h sys/poll.h
14341 do :
14342   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14343 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14344 eval as_val=\$$as_ac_Header
14345    if test "x$as_val" = x""yes; then :
14346   cat >>confdefs.h <<_ACEOF
14347 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14348 _ACEOF
14349
14350 fi
14351
14352 done
14353
14354 fi
14355
14356 for ac_header in sys/epoll.h
14357 do :
14358   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14359 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14360 eval as_val=\$$as_ac_Header
14361    if test "x$as_val" = x""yes; then :
14362   cat >>confdefs.h <<_ACEOF
14363 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14364 _ACEOF
14365
14366 fi
14367
14368 done
14369
14370 if test "${ac_cv_header_sys_epoll_h}" = yes; then
14371         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll system call" >&5
14372 $as_echo_n "checking for epoll system call... " >&6; }
14373         if test "$cross_compiling" = yes; then :
14374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14375 $as_echo "no" >&6; }
14376 else
14377   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14378 /* end confdefs.h.  */
14379 int main(int argc, char **argv)
14380 {
14381         int epfd = epoll_create(256);
14382         exit (epfd == -1 ? 1 : 0);
14383 }
14384 _ACEOF
14385 if ac_fn_c_try_run "$LINENO"; then :
14386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14387 $as_echo "yes" >&6; }
14388
14389 $as_echo "#define HAVE_EPOLL 1" >>confdefs.h
14390
14391 else
14392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14393 $as_echo "no" >&6; }
14394 fi
14395 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14396   conftest.$ac_objext conftest.beam conftest.$ac_ext
14397 fi
14398
14399 fi
14400
14401 for ac_header in sys/event.h
14402 do :
14403   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14404 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14405 eval as_val=\$$as_ac_Header
14406    if test "x$as_val" = x""yes; then :
14407   cat >>confdefs.h <<_ACEOF
14408 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14409 _ACEOF
14410
14411 fi
14412
14413 done
14414
14415 if test "${ac_cv_header_sys_event_h}" = yes; then
14416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue system call" >&5
14417 $as_echo_n "checking for kqueue system call... " >&6; }
14418 if test "$cross_compiling" = yes; then :
14419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14420 $as_echo "no" >&6; }
14421 else
14422   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14423 /* end confdefs.h.  */
14424 int main(int argc, char **argv)
14425 {
14426         int kqfd = kqueue();
14427         exit (kqfd == -1 ? 1 : 0);
14428 }
14429 _ACEOF
14430 if ac_fn_c_try_run "$LINENO"; then :
14431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14432 $as_echo "yes" >&6; }
14433
14434 $as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
14435
14436 else
14437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14438 $as_echo "no" >&6; }
14439 fi
14440 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14441   conftest.$ac_objext conftest.beam conftest.$ac_ext
14442 fi
14443
14444 fi
14445
14446 for ac_header in sys/devpoll.h
14447 do :
14448   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14449 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14450 eval as_val=\$$as_ac_Header
14451    if test "x$as_val" = x""yes; then :
14452   cat >>confdefs.h <<_ACEOF
14453 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14454 _ACEOF
14455
14456 fi
14457
14458 done
14459
14460 if test "${ac_cv_header_sys_devpoll_h}" = yes \
14461                 -a "${ac_cv_header_poll_h}" = yes ; \
14462 then
14463         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/poll" >&5
14464 $as_echo_n "checking for /dev/poll... " >&6; }
14465         if test "$cross_compiling" = yes; then :
14466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14467 $as_echo "no" >&6; }
14468 else
14469   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14470 /* end confdefs.h.  */
14471 int main(int argc, char **argv)
14472 {
14473         int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
14474         exit (devpollfd == -1 ? 1 : 0);
14475 }
14476 _ACEOF
14477 if ac_fn_c_try_run "$LINENO"; then :
14478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14479 $as_echo "yes" >&6; }
14480
14481 $as_echo "#define HAVE_DEVPOLL 1" >>confdefs.h
14482
14483 else
14484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14485 $as_echo "no" >&6; }
14486 fi
14487 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14488   conftest.$ac_objext conftest.beam conftest.$ac_ext
14489 fi
14490
14491 fi
14492
14493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14494 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14495 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14496   $as_echo_n "(cached) " >&6
14497 else
14498
14499         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14500 /* end confdefs.h.  */
14501
14502 #include <stdio.h>
14503 #include <sys/types.h>
14504 #include <errno.h>
14505 #ifdef _WIN32
14506 #include <stdlib.h>
14507 #endif
14508 int
14509 main ()
14510 {
14511 char *c = (char *) *sys_errlist
14512   ;
14513   return 0;
14514 }
14515 _ACEOF
14516 if ac_fn_c_try_compile "$LINENO"; then :
14517   ol_cv_dcl_sys_errlist=yes
14518         ol_cv_have_sys_errlist=yes
14519 else
14520   ol_cv_dcl_sys_errlist=no
14521 fi
14522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14523 fi
14524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14525 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14526 #
14527 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14528 if test $ol_cv_dcl_sys_errlist = no ; then
14529
14530 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14531
14532
14533         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14534 $as_echo_n "checking existence of sys_errlist... " >&6; }
14535 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14536   $as_echo_n "(cached) " >&6
14537 else
14538
14539                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14540 /* end confdefs.h.  */
14541 #include <errno.h>
14542 int
14543 main ()
14544 {
14545 char *c = (char *) *sys_errlist
14546   ;
14547   return 0;
14548 }
14549 _ACEOF
14550 if ac_fn_c_try_link "$LINENO"; then :
14551   ol_cv_have_sys_errlist=yes
14552 else
14553   ol_cv_have_sys_errlist=no
14554 fi
14555 rm -f core conftest.err conftest.$ac_objext \
14556     conftest$ac_exeext conftest.$ac_ext
14557 fi
14558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14559 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14560 fi
14561 if test $ol_cv_have_sys_errlist = yes ; then
14562
14563 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14564
14565 fi
14566  for ac_func in strerror strerror_r
14567 do :
14568   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14569 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14570 eval as_val=\$$as_ac_var
14571    if test "x$as_val" = x""yes; then :
14572   cat >>confdefs.h <<_ACEOF
14573 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14574 _ACEOF
14575
14576 fi
14577 done
14578
14579 ol_cv_func_strerror_r=no
14580 if test "${ac_cv_func_strerror_r}" = yes ; then
14581         { $as_echo "$as_me:${as_lineno-$LINENO}: checking non-posix strerror_r" >&5
14582 $as_echo_n "checking non-posix strerror_r... " >&6; }
14583 if test "${ol_cv_nonposix_strerror_r+set}" = set; then :
14584   $as_echo_n "(cached) " >&6
14585 else
14586
14587         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14588 /* end confdefs.h.  */
14589 #include <string.h>
14590 _ACEOF
14591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14592   $EGREP "strerror_r" >/dev/null 2>&1; then :
14593   ol_decl_strerror_r=yes
14594 else
14595   ol_decl_strerror_r=no
14596 fi
14597 rm -f conftest*
14598
14599         if test $ol_decl_strerror_r = yes ; then
14600                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14601 /* end confdefs.h.  */
14602 #include <string.h>
14603 int
14604 main ()
14605 {
14606    /* from autoconf 2.59 */
14607                                 char buf[100];
14608                                 char x = *strerror_r (0, buf, sizeof buf);
14609                                 char *p = strerror_r (0, buf, sizeof buf);
14610
14611   ;
14612   return 0;
14613 }
14614 _ACEOF
14615 if ac_fn_c_try_compile "$LINENO"; then :
14616   ol_cv_nonposix_strerror_r=yes
14617 else
14618   ol_cv_nonposix_strerror_r=no
14619 fi
14620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14621         else
14622                 if test "$cross_compiling" = yes; then :
14623   ol_cv_nonposix_strerror=no
14624 else
14625   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14626 /* end confdefs.h.  */
14627
14628                         main() {
14629                                 char buf[100];
14630                                 buf[0] = 0;
14631                                 strerror_r( 1, buf, sizeof buf );
14632                                 exit( buf[0] == 0 );
14633                         }
14634
14635 _ACEOF
14636 if ac_fn_c_try_run "$LINENO"; then :
14637   ol_cv_nonposix_strerror_r=yes
14638 else
14639   ol_cv_nonposix_strerror=no
14640 fi
14641 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14642   conftest.$ac_objext conftest.beam conftest.$ac_ext
14643 fi
14644
14645         fi
14646
14647 fi
14648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_nonposix_strerror_r" >&5
14649 $as_echo "$ol_cv_nonposix_strerror_r" >&6; }
14650 if test $ol_cv_nonposix_strerror_r = yes ; then
14651
14652 $as_echo "#define HAVE_NONPOSIX_STRERROR_R 1" >>confdefs.h
14653
14654 fi
14655
14656 elif test "${ac_cv_func_strerror}" = no ; then
14657         { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14658 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14659 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14660   $as_echo_n "(cached) " >&6
14661 else
14662
14663         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14664 /* end confdefs.h.  */
14665
14666 #include <stdio.h>
14667 #include <sys/types.h>
14668 #include <errno.h>
14669 #ifdef _WIN32
14670 #include <stdlib.h>
14671 #endif
14672 int
14673 main ()
14674 {
14675 char *c = (char *) *sys_errlist
14676   ;
14677   return 0;
14678 }
14679 _ACEOF
14680 if ac_fn_c_try_compile "$LINENO"; then :
14681   ol_cv_dcl_sys_errlist=yes
14682         ol_cv_have_sys_errlist=yes
14683 else
14684   ol_cv_dcl_sys_errlist=no
14685 fi
14686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14687 fi
14688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14689 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14690 #
14691 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14692 if test $ol_cv_dcl_sys_errlist = no ; then
14693
14694 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14695
14696
14697         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14698 $as_echo_n "checking existence of sys_errlist... " >&6; }
14699 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14700   $as_echo_n "(cached) " >&6
14701 else
14702
14703                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14704 /* end confdefs.h.  */
14705 #include <errno.h>
14706 int
14707 main ()
14708 {
14709 char *c = (char *) *sys_errlist
14710   ;
14711   return 0;
14712 }
14713 _ACEOF
14714 if ac_fn_c_try_link "$LINENO"; then :
14715   ol_cv_have_sys_errlist=yes
14716 else
14717   ol_cv_have_sys_errlist=no
14718 fi
14719 rm -f core conftest.err conftest.$ac_objext \
14720     conftest$ac_exeext conftest.$ac_ext
14721 fi
14722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14723 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14724 fi
14725 if test $ol_cv_have_sys_errlist = yes ; then
14726
14727 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14728
14729 fi
14730
14731 fi
14732
14733
14734 for ac_header in regex.h
14735 do :
14736   ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default
14737 #ifdef HAVE_SYS_TYPES_H
14738 #include <sys/types.h>
14739 #endif
14740
14741 "
14742 if test "x$ac_cv_header_regex_h" = x""yes; then :
14743   cat >>confdefs.h <<_ACEOF
14744 #define HAVE_REGEX_H 1
14745 _ACEOF
14746
14747 fi
14748
14749 done
14750
14751
14752 if test "$ac_cv_header_regex_h" != yes ; then
14753         as_fn_error "POSIX regex.h required." "$LINENO" 5
14754 fi
14755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing regfree" >&5
14756 $as_echo_n "checking for library containing regfree... " >&6; }
14757 if test "${ac_cv_search_regfree+set}" = set; then :
14758   $as_echo_n "(cached) " >&6
14759 else
14760   ac_func_search_save_LIBS=$LIBS
14761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14762 /* end confdefs.h.  */
14763
14764 /* Override any GCC internal prototype to avoid an error.
14765    Use char because int might match the return type of a GCC
14766    builtin and then its argument prototype would still apply.  */
14767 #ifdef __cplusplus
14768 extern "C"
14769 #endif
14770 char regfree ();
14771 int
14772 main ()
14773 {
14774 return regfree ();
14775   ;
14776   return 0;
14777 }
14778 _ACEOF
14779 for ac_lib in '' regex gnuregex; do
14780   if test -z "$ac_lib"; then
14781     ac_res="none required"
14782   else
14783     ac_res=-l$ac_lib
14784     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14785   fi
14786   if ac_fn_c_try_link "$LINENO"; then :
14787   ac_cv_search_regfree=$ac_res
14788 fi
14789 rm -f core conftest.err conftest.$ac_objext \
14790     conftest$ac_exeext
14791   if test "${ac_cv_search_regfree+set}" = set; then :
14792   break
14793 fi
14794 done
14795 if test "${ac_cv_search_regfree+set}" = set; then :
14796
14797 else
14798   ac_cv_search_regfree=no
14799 fi
14800 rm conftest.$ac_ext
14801 LIBS=$ac_func_search_save_LIBS
14802 fi
14803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_regfree" >&5
14804 $as_echo "$ac_cv_search_regfree" >&6; }
14805 ac_res=$ac_cv_search_regfree
14806 if test "$ac_res" != no; then :
14807   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14808   :
14809 else
14810   as_fn_error "POSIX regex required." "$LINENO" 5
14811 fi
14812
14813
14814
14815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible POSIX regex" >&5
14816 $as_echo_n "checking for compatible POSIX regex... " >&6; }
14817 if test "${ol_cv_c_posix_regex+set}" = set; then :
14818   $as_echo_n "(cached) " >&6
14819 else
14820
14821         if test "$cross_compiling" = yes; then :
14822   ol_cv_c_posix_regex=cross
14823 else
14824   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14825 /* end confdefs.h.  */
14826
14827 #include <sys/types.h>
14828 #include <regex.h>
14829 static char *pattern, *string;
14830 main()
14831 {
14832         int rc;
14833         regex_t re;
14834
14835         pattern = "^A";
14836
14837         if(regcomp(&re, pattern, 0)) {
14838                 return -1;
14839         }
14840
14841         string = "ALL MATCH";
14842
14843         rc = regexec(&re, string, 0, (void*)0, 0);
14844
14845         regfree(&re);
14846
14847         return rc;
14848 }
14849 _ACEOF
14850 if ac_fn_c_try_run "$LINENO"; then :
14851   ol_cv_c_posix_regex=yes
14852 else
14853   ol_cv_c_posix_regex=no
14854 fi
14855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14856   conftest.$ac_objext conftest.beam conftest.$ac_ext
14857 fi
14858
14859 fi
14860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_posix_regex" >&5
14861 $as_echo "$ol_cv_c_posix_regex" >&6; }
14862
14863 if test "$ol_cv_c_posix_regex" = no ; then
14864         as_fn_error "broken POSIX regex!" "$LINENO" 5
14865 fi
14866
14867
14868 have_uuid=no
14869 for ac_header in sys/uuid.h
14870 do :
14871   ac_fn_c_check_header_mongrel "$LINENO" "sys/uuid.h" "ac_cv_header_sys_uuid_h" "$ac_includes_default"
14872 if test "x$ac_cv_header_sys_uuid_h" = x""yes; then :
14873   cat >>confdefs.h <<_ACEOF
14874 #define HAVE_SYS_UUID_H 1
14875 _ACEOF
14876
14877 fi
14878
14879 done
14880
14881 if test $ac_cv_header_sys_uuid_h = yes ; then
14882         save_LIBS="$LIBS"
14883         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_to_str" >&5
14884 $as_echo_n "checking for library containing uuid_to_str... " >&6; }
14885 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14886   $as_echo_n "(cached) " >&6
14887 else
14888   ac_func_search_save_LIBS=$LIBS
14889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14890 /* end confdefs.h.  */
14891
14892 /* Override any GCC internal prototype to avoid an error.
14893    Use char because int might match the return type of a GCC
14894    builtin and then its argument prototype would still apply.  */
14895 #ifdef __cplusplus
14896 extern "C"
14897 #endif
14898 char uuid_to_str ();
14899 int
14900 main ()
14901 {
14902 return uuid_to_str ();
14903   ;
14904   return 0;
14905 }
14906 _ACEOF
14907 for ac_lib in '' uuid; do
14908   if test -z "$ac_lib"; then
14909     ac_res="none required"
14910   else
14911     ac_res=-l$ac_lib
14912     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14913   fi
14914   if ac_fn_c_try_link "$LINENO"; then :
14915   ac_cv_search_uuid_to_str=$ac_res
14916 fi
14917 rm -f core conftest.err conftest.$ac_objext \
14918     conftest$ac_exeext
14919   if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14920   break
14921 fi
14922 done
14923 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14924
14925 else
14926   ac_cv_search_uuid_to_str=no
14927 fi
14928 rm conftest.$ac_ext
14929 LIBS=$ac_func_search_save_LIBS
14930 fi
14931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_to_str" >&5
14932 $as_echo "$ac_cv_search_uuid_to_str" >&6; }
14933 ac_res=$ac_cv_search_uuid_to_str
14934 if test "$ac_res" != no; then :
14935   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14936   have_uuid=yes
14937 else
14938   :
14939 fi
14940
14941         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_create" >&5
14942 $as_echo_n "checking for library containing uuid_create... " >&6; }
14943 if test "${ac_cv_search_uuid_create+set}" = set; then :
14944   $as_echo_n "(cached) " >&6
14945 else
14946   ac_func_search_save_LIBS=$LIBS
14947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14948 /* end confdefs.h.  */
14949
14950 /* Override any GCC internal prototype to avoid an error.
14951    Use char because int might match the return type of a GCC
14952    builtin and then its argument prototype would still apply.  */
14953 #ifdef __cplusplus
14954 extern "C"
14955 #endif
14956 char uuid_create ();
14957 int
14958 main ()
14959 {
14960 return uuid_create ();
14961   ;
14962   return 0;
14963 }
14964 _ACEOF
14965 for ac_lib in '' uuid; do
14966   if test -z "$ac_lib"; then
14967     ac_res="none required"
14968   else
14969     ac_res=-l$ac_lib
14970     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14971   fi
14972   if ac_fn_c_try_link "$LINENO"; then :
14973   ac_cv_search_uuid_create=$ac_res
14974 fi
14975 rm -f core conftest.err conftest.$ac_objext \
14976     conftest$ac_exeext
14977   if test "${ac_cv_search_uuid_create+set}" = set; then :
14978   break
14979 fi
14980 done
14981 if test "${ac_cv_search_uuid_create+set}" = set; then :
14982
14983 else
14984   ac_cv_search_uuid_create=no
14985 fi
14986 rm conftest.$ac_ext
14987 LIBS=$ac_func_search_save_LIBS
14988 fi
14989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_create" >&5
14990 $as_echo "$ac_cv_search_uuid_create" >&6; }
14991 ac_res=$ac_cv_search_uuid_create
14992 if test "$ac_res" != no; then :
14993   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14994   :
14995 else
14996   have_uuid=no
14997 fi
14998
14999         LIBS="$save_LIBS"
15000
15001         if test $have_uuid = yes ; then
15002
15003 $as_echo "#define HAVE_UUID_TO_STR 1" >>confdefs.h
15004
15005
15006                 test "$ac_cv_search_uuid_to_str" = "none required" || \
15007                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
15008         fi
15009 fi
15010
15011 if test $have_uuid = no ; then
15012         for ac_header in uuid/uuid.h
15013 do :
15014   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
15015 if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then :
15016   cat >>confdefs.h <<_ACEOF
15017 #define HAVE_UUID_UUID_H 1
15018 _ACEOF
15019
15020 fi
15021
15022 done
15023
15024         if test $ac_cv_header_uuid_uuid_h = yes ; then
15025                 save_LIBS="$LIBS"
15026                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
15027 $as_echo_n "checking for library containing uuid_generate... " >&6; }
15028 if test "${ac_cv_search_uuid_generate+set}" = set; then :
15029   $as_echo_n "(cached) " >&6
15030 else
15031   ac_func_search_save_LIBS=$LIBS
15032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15033 /* end confdefs.h.  */
15034
15035 /* Override any GCC internal prototype to avoid an error.
15036    Use char because int might match the return type of a GCC
15037    builtin and then its argument prototype would still apply.  */
15038 #ifdef __cplusplus
15039 extern "C"
15040 #endif
15041 char uuid_generate ();
15042 int
15043 main ()
15044 {
15045 return uuid_generate ();
15046   ;
15047   return 0;
15048 }
15049 _ACEOF
15050 for ac_lib in '' uuid; do
15051   if test -z "$ac_lib"; then
15052     ac_res="none required"
15053   else
15054     ac_res=-l$ac_lib
15055     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15056   fi
15057   if ac_fn_c_try_link "$LINENO"; then :
15058   ac_cv_search_uuid_generate=$ac_res
15059 fi
15060 rm -f core conftest.err conftest.$ac_objext \
15061     conftest$ac_exeext
15062   if test "${ac_cv_search_uuid_generate+set}" = set; then :
15063   break
15064 fi
15065 done
15066 if test "${ac_cv_search_uuid_generate+set}" = set; then :
15067
15068 else
15069   ac_cv_search_uuid_generate=no
15070 fi
15071 rm conftest.$ac_ext
15072 LIBS=$ac_func_search_save_LIBS
15073 fi
15074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
15075 $as_echo "$ac_cv_search_uuid_generate" >&6; }
15076 ac_res=$ac_cv_search_uuid_generate
15077 if test "$ac_res" != no; then :
15078   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15079   have_uuid=yes
15080 else
15081   :
15082 fi
15083
15084                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_unparse_lower" >&5
15085 $as_echo_n "checking for library containing uuid_unparse_lower... " >&6; }
15086 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
15087   $as_echo_n "(cached) " >&6
15088 else
15089   ac_func_search_save_LIBS=$LIBS
15090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15091 /* end confdefs.h.  */
15092
15093 /* Override any GCC internal prototype to avoid an error.
15094    Use char because int might match the return type of a GCC
15095    builtin and then its argument prototype would still apply.  */
15096 #ifdef __cplusplus
15097 extern "C"
15098 #endif
15099 char uuid_unparse_lower ();
15100 int
15101 main ()
15102 {
15103 return uuid_unparse_lower ();
15104   ;
15105   return 0;
15106 }
15107 _ACEOF
15108 for ac_lib in '' uuid; do
15109   if test -z "$ac_lib"; then
15110     ac_res="none required"
15111   else
15112     ac_res=-l$ac_lib
15113     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15114   fi
15115   if ac_fn_c_try_link "$LINENO"; then :
15116   ac_cv_search_uuid_unparse_lower=$ac_res
15117 fi
15118 rm -f core conftest.err conftest.$ac_objext \
15119     conftest$ac_exeext
15120   if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
15121   break
15122 fi
15123 done
15124 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
15125
15126 else
15127   ac_cv_search_uuid_unparse_lower=no
15128 fi
15129 rm conftest.$ac_ext
15130 LIBS=$ac_func_search_save_LIBS
15131 fi
15132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_unparse_lower" >&5
15133 $as_echo "$ac_cv_search_uuid_unparse_lower" >&6; }
15134 ac_res=$ac_cv_search_uuid_unparse_lower
15135 if test "$ac_res" != no; then :
15136   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15137   :
15138 else
15139   have_uuid=no
15140 fi
15141
15142                 LIBS="$save_LIBS"
15143
15144                 if test $have_uuid = yes ; then
15145
15146 $as_echo "#define HAVE_UUID_GENERATE 1" >>confdefs.h
15147
15148
15149                         test "$ac_cv_search_uuid_generate" = "none required" || \
15150                                 SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_generate"
15151                 fi
15152         fi
15153 fi
15154
15155 if test $have_uuid = no ; then
15156         { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
15157 $as_echo_n "checking to see if -lrpcrt4 is needed for win32 UUID support... " >&6; }
15158         save_LIBS="$LIBS"
15159         LIBS="$LIBS -lrpcrt4"
15160         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15161 /* end confdefs.h.  */
15162
15163                 int __stdcall UuidCreate(void *);
15164                 int __stdcall UuidToStringA(void *,void **);
15165
15166 int
15167 main ()
15168 {
15169
15170                 UuidCreate(0);
15171                 UuidToStringA(0,0);
15172
15173   ;
15174   return 0;
15175 }
15176 _ACEOF
15177 if ac_fn_c_try_link "$LINENO"; then :
15178   need_rpcrt=yes
15179 else
15180   need_rpcrt=no
15181 fi
15182 rm -f core conftest.err conftest.$ac_objext \
15183     conftest$ac_exeext conftest.$ac_ext
15184         if test $need_rpcrt = yes; then
15185                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
15186         fi
15187         LIBS="$save_LIBS"
15188         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_rpcrt" >&5
15189 $as_echo "$need_rpcrt" >&6; }
15190 fi
15191
15192 ol_cv_lib_resolver=no
15193 if test $ol_cv_lib_resolver = no ; then
15194         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (default)" >&5
15195 $as_echo_n "checking for resolver link (default)... " >&6; }
15196 if test "${ol_cv_resolver_none+set}" = set; then :
15197   $as_echo_n "(cached) " >&6
15198 else
15199
15200         ol_RESOLVER_LIB=
15201         ol_LIBS=$LIBS
15202         LIBS="$ol_RESOLVER_LIB $LIBS"
15203
15204         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15205 /* end confdefs.h.  */
15206
15207 #ifdef HAVE_SYS_TYPES_H
15208 #       include <sys/types.h>
15209 #endif
15210 #include <netinet/in.h>
15211 #ifdef HAVE_ARPA_NAMESER_H
15212 #       include <arpa/nameser.h>
15213 #endif
15214 #ifdef HAVE_RESOLV_H
15215 #       include <resolv.h>
15216 #endif
15217
15218 int
15219 main ()
15220 {
15221 {
15222         int len, status;
15223         char *request = NULL;
15224         unsigned char reply[64*1024];
15225         unsigned char host[64*1024];
15226         unsigned char *p;
15227
15228 #ifdef NS_HFIXEDSZ
15229         /* Bind 8/9 interface */
15230         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15231 #else
15232         /* Bind 4 interface */
15233 # ifndef T_SRV
15234 #  define T_SRV 33
15235 # endif
15236         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15237 #endif
15238         p = reply;
15239 #ifdef NS_HFIXEDSZ
15240         /* Bind 8/9 interface */
15241         p += NS_HFIXEDSZ;
15242 #elif defined(HFIXEDSZ)
15243         /* Bind 4 interface w/ HFIXEDSZ */
15244         p += HFIXEDSZ;
15245 #else
15246         /* Bind 4 interface w/o HFIXEDSZ */
15247         p += sizeof(HEADER);
15248 #endif
15249         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15250 }
15251   ;
15252   return 0;
15253 }
15254 _ACEOF
15255 if ac_fn_c_try_link "$LINENO"; then :
15256   ol_cv_resolver_none=yes
15257 else
15258   ol_cv_resolver_none=no
15259 fi
15260 rm -f core conftest.err conftest.$ac_objext \
15261     conftest$ac_exeext conftest.$ac_ext
15262
15263         LIBS="$ol_LIBS"
15264
15265 fi
15266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_none" >&5
15267 $as_echo "$ol_cv_resolver_none" >&6; }
15268
15269         if test $ol_cv_resolver_none = yes ; then
15270                 ol_cv_lib_resolver=yes
15271         fi
15272 fi
15273
15274 if test $ol_cv_lib_resolver = no ; then
15275         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lresolv)" >&5
15276 $as_echo_n "checking for resolver link (-lresolv)... " >&6; }
15277 if test "${ol_cv_resolver_resolv+set}" = set; then :
15278   $as_echo_n "(cached) " >&6
15279 else
15280
15281         ol_RESOLVER_LIB=-lresolv
15282         ol_LIBS=$LIBS
15283         LIBS="$ol_RESOLVER_LIB $LIBS"
15284
15285         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15286 /* end confdefs.h.  */
15287
15288 #ifdef HAVE_SYS_TYPES_H
15289 #       include <sys/types.h>
15290 #endif
15291 #include <netinet/in.h>
15292 #ifdef HAVE_ARPA_NAMESER_H
15293 #       include <arpa/nameser.h>
15294 #endif
15295 #ifdef HAVE_RESOLV_H
15296 #       include <resolv.h>
15297 #endif
15298
15299 int
15300 main ()
15301 {
15302 {
15303         int len, status;
15304         char *request = NULL;
15305         unsigned char reply[64*1024];
15306         unsigned char host[64*1024];
15307         unsigned char *p;
15308
15309 #ifdef NS_HFIXEDSZ
15310         /* Bind 8/9 interface */
15311         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15312 #else
15313         /* Bind 4 interface */
15314 # ifndef T_SRV
15315 #  define T_SRV 33
15316 # endif
15317         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15318 #endif
15319         p = reply;
15320 #ifdef NS_HFIXEDSZ
15321         /* Bind 8/9 interface */
15322         p += NS_HFIXEDSZ;
15323 #elif defined(HFIXEDSZ)
15324         /* Bind 4 interface w/ HFIXEDSZ */
15325         p += HFIXEDSZ;
15326 #else
15327         /* Bind 4 interface w/o HFIXEDSZ */
15328         p += sizeof(HEADER);
15329 #endif
15330         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15331 }
15332   ;
15333   return 0;
15334 }
15335 _ACEOF
15336 if ac_fn_c_try_link "$LINENO"; then :
15337   ol_cv_resolver_resolv=yes
15338 else
15339   ol_cv_resolver_resolv=no
15340 fi
15341 rm -f core conftest.err conftest.$ac_objext \
15342     conftest$ac_exeext conftest.$ac_ext
15343
15344         LIBS="$ol_LIBS"
15345
15346 fi
15347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_resolv" >&5
15348 $as_echo "$ol_cv_resolver_resolv" >&6; }
15349
15350         if test $ol_cv_resolver_resolv = yes ; then
15351                 ol_cv_lib_resolver=-lresolv
15352         fi
15353 fi
15354
15355 if test $ol_cv_lib_resolver = no ; then
15356         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lbind)" >&5
15357 $as_echo_n "checking for resolver link (-lbind)... " >&6; }
15358 if test "${ol_cv_resolver_bind+set}" = set; then :
15359   $as_echo_n "(cached) " >&6
15360 else
15361
15362         ol_RESOLVER_LIB=-lbind
15363         ol_LIBS=$LIBS
15364         LIBS="$ol_RESOLVER_LIB $LIBS"
15365
15366         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15367 /* end confdefs.h.  */
15368
15369 #ifdef HAVE_SYS_TYPES_H
15370 #       include <sys/types.h>
15371 #endif
15372 #include <netinet/in.h>
15373 #ifdef HAVE_ARPA_NAMESER_H
15374 #       include <arpa/nameser.h>
15375 #endif
15376 #ifdef HAVE_RESOLV_H
15377 #       include <resolv.h>
15378 #endif
15379
15380 int
15381 main ()
15382 {
15383 {
15384         int len, status;
15385         char *request = NULL;
15386         unsigned char reply[64*1024];
15387         unsigned char host[64*1024];
15388         unsigned char *p;
15389
15390 #ifdef NS_HFIXEDSZ
15391         /* Bind 8/9 interface */
15392         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15393 #else
15394         /* Bind 4 interface */
15395 # ifndef T_SRV
15396 #  define T_SRV 33
15397 # endif
15398         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15399 #endif
15400         p = reply;
15401 #ifdef NS_HFIXEDSZ
15402         /* Bind 8/9 interface */
15403         p += NS_HFIXEDSZ;
15404 #elif defined(HFIXEDSZ)
15405         /* Bind 4 interface w/ HFIXEDSZ */
15406         p += HFIXEDSZ;
15407 #else
15408         /* Bind 4 interface w/o HFIXEDSZ */
15409         p += sizeof(HEADER);
15410 #endif
15411         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15412 }
15413   ;
15414   return 0;
15415 }
15416 _ACEOF
15417 if ac_fn_c_try_link "$LINENO"; then :
15418   ol_cv_resolver_bind=yes
15419 else
15420   ol_cv_resolver_bind=no
15421 fi
15422 rm -f core conftest.err conftest.$ac_objext \
15423     conftest$ac_exeext conftest.$ac_ext
15424
15425         LIBS="$ol_LIBS"
15426
15427 fi
15428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_bind" >&5
15429 $as_echo "$ol_cv_resolver_bind" >&6; }
15430
15431         if test $ol_cv_resolver_bind = yes ; then
15432                 ol_cv_lib_resolver=-lbind
15433         fi
15434 fi
15435
15436
15437
15438 ol_link_dnssrv=no
15439 if test "$ol_cv_lib_resolver" != no ; then
15440
15441 $as_echo "#define HAVE_RES_QUERY 1" >>confdefs.h
15442
15443
15444         if test "$ol_enable_dnssrv" != no ; then
15445                 ol_link_dnssrv=yes
15446         fi
15447
15448         if test "$ol_cv_lib_resolver" != yes ; then
15449                 LIBS="$ol_cv_lib_resolver $LIBS"
15450         fi
15451 fi
15452
15453 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
15454         if test "$ol_link_dnssrv" = no ; then
15455                 as_fn_error "DNSSRV requires res_query()" "$LINENO" 5
15456         fi
15457 else
15458         ol_enable_dnssrv=no
15459 fi
15460
15461 for ac_func in hstrerror
15462 do :
15463   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15464 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15465 eval as_val=\$$as_ac_var
15466    if test "x$as_val" = x""yes; then :
15467   cat >>confdefs.h <<_ACEOF
15468 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15469 _ACEOF
15470
15471 fi
15472 done
15473
15474
15475 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
15476 do :
15477   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15478 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15479 eval as_val=\$$as_ac_var
15480    if test "x$as_val" = x""yes; then :
15481   cat >>confdefs.h <<_ACEOF
15482 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15483 _ACEOF
15484
15485 fi
15486 done
15487
15488
15489 ol_link_ipv6=no
15490 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
15491         if test $ol_enable_ipv6 = yes ; then
15492                 as_fn_error "IPv6 support requires getaddrinfo() and inet_ntop()" "$LINENO" 5
15493         fi
15494 elif test $ol_enable_ipv6 != no ; then
15495         { $as_echo "$as_me:${as_lineno-$LINENO}: checking INET6_ADDRSTRLEN" >&5
15496 $as_echo_n "checking INET6_ADDRSTRLEN... " >&6; }
15497 if test "${ol_cv_inet6_addrstrlen+set}" = set; then :
15498   $as_echo_n "(cached) " >&6
15499 else
15500
15501                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15502 /* end confdefs.h.  */
15503
15504 #                       include <netinet/in.h>
15505 #                       ifdef INET6_ADDRSTRLEN
15506                                 __has_inet6_addrstrlen__;
15507 #                       endif
15508
15509 _ACEOF
15510 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15511   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then :
15512   ol_cv_inet6_addrstrlen=yes
15513 else
15514   ol_cv_inet6_addrstrlen=no
15515 fi
15516 rm -f conftest*
15517
15518 fi
15519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_inet6_addrstrlen" >&5
15520 $as_echo "$ol_cv_inet6_addrstrlen" >&6; }
15521
15522
15523         { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr_storage" >&5
15524 $as_echo_n "checking struct sockaddr_storage... " >&6; }
15525 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then :
15526   $as_echo_n "(cached) " >&6
15527 else
15528
15529                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15530 /* end confdefs.h.  */
15531
15532 #include <sys/types.h>
15533 #include <sys/socket.h>
15534
15535 int
15536 main ()
15537 {
15538
15539                         struct sockaddr_storage ss;
15540
15541   ;
15542   return 0;
15543 }
15544 _ACEOF
15545 if ac_fn_c_try_compile "$LINENO"; then :
15546   ol_cv_struct_sockaddr_storage=yes
15547 else
15548   ol_cv_struct_sockaddr_storage=no
15549 fi
15550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15551 fi
15552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_struct_sockaddr_storage" >&5
15553 $as_echo "$ol_cv_struct_sockaddr_storage" >&6; }
15554
15555         if test $ol_cv_inet6_addrstrlen = yes &&
15556            test $ol_cv_struct_sockaddr_storage = yes ; then
15557                 ol_link_ipv6=yes
15558         elif test $ol_enable_ipv6 = yes &&
15559              test $ol_cv_inet6_addrstrlen = no ; then
15560                 as_fn_error "IPv6 support requires INET6_ADDRSTRLEN" "$LINENO" 5
15561         elif test $ol_enable_ipv6 = yes &&
15562              test $ol_cv_struct_sockaddr_storage = no ; then
15563                 as_fn_error "IPv6 support requires struct sockaddr_storage" "$LINENO" 5
15564         fi
15565 fi
15566
15567 if test $ol_enable_local != no ; then
15568         for ac_header in sys/un.h
15569 do :
15570   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15571 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15572 eval as_val=\$$as_ac_Header
15573    if test "x$as_val" = x""yes; then :
15574   cat >>confdefs.h <<_ACEOF
15575 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15576 _ACEOF
15577
15578 fi
15579
15580 done
15581
15582
15583         if test $ol_enable_local = auto ; then
15584                 ol_enable_local=$ac_cv_header_sys_un_h
15585         elif test $ac_cv_header_sys_un_h = no ; then
15586                 as_fn_error "AF_LOCAL domain support requires sys/un.h" "$LINENO" 5
15587         fi
15588 fi
15589
15590
15591 if test $ol_with_tls = yes ; then
15592         ol_with_tls=auto
15593 fi
15594
15595 ol_link_tls=no
15596 if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
15597         for ac_header in openssl/ssl.h
15598 do :
15599   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
15600 if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then :
15601   cat >>confdefs.h <<_ACEOF
15602 #define HAVE_OPENSSL_SSL_H 1
15603 _ACEOF
15604
15605 fi
15606
15607 done
15608
15609
15610         if test $ac_cv_header_openssl_ssl_h = yes ; then
15611                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_msg_callback in -lssl" >&5
15612 $as_echo_n "checking for SSL_CTX_set_msg_callback in -lssl... " >&6; }
15613 if test "${ac_cv_lib_ssl_SSL_CTX_set_msg_callback+set}" = set; then :
15614   $as_echo_n "(cached) " >&6
15615 else
15616   ac_check_lib_save_LIBS=$LIBS
15617 LIBS="-lssl -lcrypto $LIBS"
15618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15619 /* end confdefs.h.  */
15620
15621 /* Override any GCC internal prototype to avoid an error.
15622    Use char because int might match the return type of a GCC
15623    builtin and then its argument prototype would still apply.  */
15624 #ifdef __cplusplus
15625 extern "C"
15626 #endif
15627 char SSL_CTX_set_msg_callback ();
15628 int
15629 main ()
15630 {
15631 return SSL_CTX_set_msg_callback ();
15632   ;
15633   return 0;
15634 }
15635 _ACEOF
15636 if ac_fn_c_try_link "$LINENO"; then :
15637   ac_cv_lib_ssl_SSL_CTX_set_msg_callback=yes
15638 else
15639   ac_cv_lib_ssl_SSL_CTX_set_msg_callback=no
15640 fi
15641 rm -f core conftest.err conftest.$ac_objext \
15642     conftest$ac_exeext conftest.$ac_ext
15643 LIBS=$ac_check_lib_save_LIBS
15644 fi
15645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_set_msg_callback" >&5
15646 $as_echo "$ac_cv_lib_ssl_SSL_CTX_set_msg_callback" >&6; }
15647 if test "x$ac_cv_lib_ssl_SSL_CTX_set_msg_callback" = x""yes; then :
15648   have_openssl=yes
15649                         need_rsaref=no
15650 else
15651   have_openssl=no
15652 fi
15653
15654
15655                 if test $have_openssl = no ; then
15656                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl3_accept in -lssl" >&5
15657 $as_echo_n "checking for ssl3_accept in -lssl... " >&6; }
15658 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then :
15659   $as_echo_n "(cached) " >&6
15660 else
15661   ac_check_lib_save_LIBS=$LIBS
15662 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
15663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15664 /* end confdefs.h.  */
15665
15666 /* Override any GCC internal prototype to avoid an error.
15667    Use char because int might match the return type of a GCC
15668    builtin and then its argument prototype would still apply.  */
15669 #ifdef __cplusplus
15670 extern "C"
15671 #endif
15672 char ssl3_accept ();
15673 int
15674 main ()
15675 {
15676 return ssl3_accept ();
15677   ;
15678   return 0;
15679 }
15680 _ACEOF
15681 if ac_fn_c_try_link "$LINENO"; then :
15682   ac_cv_lib_ssl_ssl3_accept=yes
15683 else
15684   ac_cv_lib_ssl_ssl3_accept=no
15685 fi
15686 rm -f core conftest.err conftest.$ac_objext \
15687     conftest$ac_exeext conftest.$ac_ext
15688 LIBS=$ac_check_lib_save_LIBS
15689 fi
15690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_ssl3_accept" >&5
15691 $as_echo "$ac_cv_lib_ssl_ssl3_accept" >&6; }
15692 if test "x$ac_cv_lib_ssl_ssl3_accept" = x""yes; then :
15693   have_openssl=yes
15694                                 need_rsaref=yes
15695 else
15696   have_openssl=no
15697 fi
15698
15699                 fi
15700
15701                 if test $have_openssl = yes ; then
15702                         ol_with_tls=openssl
15703                         ol_link_tls=yes
15704
15705
15706 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
15707
15708
15709                         if test $need_rsaref = yes; then
15710
15711 $as_echo "#define HAVE_RSAREF 1" >>confdefs.h
15712
15713
15714                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
15715                         else
15716                                 TLS_LIBS="-lssl -lcrypto"
15717                         fi
15718
15719                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version (CRL checking capability)" >&5
15720 $as_echo_n "checking OpenSSL library version (CRL checking capability)... " >&6; }
15721 if test "${ol_cv_ssl_crl_compat+set}" = set; then :
15722   $as_echo_n "(cached) " >&6
15723 else
15724
15725                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15726 /* end confdefs.h.  */
15727
15728 #ifdef HAVE_OPENSSL_SSL_H
15729 #include <openssl/ssl.h>
15730 #endif
15731
15732 /* Require 0.9.7d+ */
15733 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
15734         char *__ssl_compat = "0.9.7d";
15735 #endif
15736
15737 _ACEOF
15738 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15739   $EGREP "__ssl_compat" >/dev/null 2>&1; then :
15740   ol_cv_ssl_crl_compat=yes
15741 else
15742   ol_cv_ssl_crl_compat=no
15743 fi
15744 rm -f conftest*
15745
15746 fi
15747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_ssl_crl_compat" >&5
15748 $as_echo "$ol_cv_ssl_crl_compat" >&6; }
15749
15750                         if test $ol_cv_ssl_crl_compat = yes ; then
15751
15752 $as_echo "#define HAVE_OPENSSL_CRL 1" >>confdefs.h
15753
15754                         fi
15755                 fi
15756         fi
15757 fi
15758
15759 if test $ol_link_tls = no ; then
15760         if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then
15761                 for ac_header in gnutls/gnutls.h
15762 do :
15763   ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
15764 if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then :
15765   cat >>confdefs.h <<_ACEOF
15766 #define HAVE_GNUTLS_GNUTLS_H 1
15767 _ACEOF
15768
15769 fi
15770
15771 done
15772
15773
15774                 if test $ac_cv_header_gnutls_gnutls_h = yes ; then
15775                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15776 /* end confdefs.h.  */
15777 #include <gnutls/gnutls.h>
15778 #if GNUTLS_VERSION_NUMBER < 0x020c00
15779 #error "GnuTLS 2.12.0 or newer required"
15780 #endif
15781 _ACEOF
15782 if ac_fn_c_try_cpp "$LINENO"; then :
15783
15784 else
15785   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15786 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15787 as_fn_error "GnuTLS is too old
15788 See \`config.log' for more details." "$LINENO" 5; }
15789 fi
15790 rm -f conftest.err conftest.$ac_ext
15791
15792                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
15793 $as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
15794 if test "${ac_cv_lib_gnutls_gnutls_init+set}" = set; then :
15795   $as_echo_n "(cached) " >&6
15796 else
15797   ac_check_lib_save_LIBS=$LIBS
15798 LIBS="-lgnutls  $LIBS"
15799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15800 /* end confdefs.h.  */
15801
15802 /* Override any GCC internal prototype to avoid an error.
15803    Use char because int might match the return type of a GCC
15804    builtin and then its argument prototype would still apply.  */
15805 #ifdef __cplusplus
15806 extern "C"
15807 #endif
15808 char gnutls_init ();
15809 int
15810 main ()
15811 {
15812 return gnutls_init ();
15813   ;
15814   return 0;
15815 }
15816 _ACEOF
15817 if ac_fn_c_try_link "$LINENO"; then :
15818   ac_cv_lib_gnutls_gnutls_init=yes
15819 else
15820   ac_cv_lib_gnutls_gnutls_init=no
15821 fi
15822 rm -f core conftest.err conftest.$ac_objext \
15823     conftest$ac_exeext conftest.$ac_ext
15824 LIBS=$ac_check_lib_save_LIBS
15825 fi
15826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_init" >&5
15827 $as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
15828 if test "x$ac_cv_lib_gnutls_gnutls_init" = x""yes; then :
15829   have_gnutls=yes
15830 else
15831   have_gnutls=no
15832 fi
15833
15834
15835                         if test $have_gnutls = yes ; then
15836                                 ol_with_tls=gnutls
15837                                 ol_link_tls=yes
15838
15839                                 TLS_LIBS="-lgnutls"
15840
15841
15842 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
15843
15844                         fi
15845                 fi
15846         fi
15847 fi
15848
15849 if test $ol_link_tls = no ; then
15850         if test $ol_with_tls = moznss || test $ol_with_tls = auto ; then
15851                 have_moznss=no
15852                 for ac_header in nssutil.h
15853 do :
15854   ac_fn_c_check_header_mongrel "$LINENO" "nssutil.h" "ac_cv_header_nssutil_h" "$ac_includes_default"
15855 if test "x$ac_cv_header_nssutil_h" = x""yes; then :
15856   cat >>confdefs.h <<_ACEOF
15857 #define HAVE_NSSUTIL_H 1
15858 _ACEOF
15859
15860 fi
15861
15862 done
15863
15864                 if test "$ac_cv_header_nssutil_h" = yes ; then
15865                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_Initialize in -lnss3" >&5
15866 $as_echo_n "checking for NSS_Initialize in -lnss3... " >&6; }
15867 if test "${ac_cv_lib_nss3_NSS_Initialize+set}" = set; then :
15868   $as_echo_n "(cached) " >&6
15869 else
15870   ac_check_lib_save_LIBS=$LIBS
15871 LIBS="-lnss3  $LIBS"
15872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15873 /* end confdefs.h.  */
15874
15875 /* Override any GCC internal prototype to avoid an error.
15876    Use char because int might match the return type of a GCC
15877    builtin and then its argument prototype would still apply.  */
15878 #ifdef __cplusplus
15879 extern "C"
15880 #endif
15881 char NSS_Initialize ();
15882 int
15883 main ()
15884 {
15885 return NSS_Initialize ();
15886   ;
15887   return 0;
15888 }
15889 _ACEOF
15890 if ac_fn_c_try_link "$LINENO"; then :
15891   ac_cv_lib_nss3_NSS_Initialize=yes
15892 else
15893   ac_cv_lib_nss3_NSS_Initialize=no
15894 fi
15895 rm -f core conftest.err conftest.$ac_objext \
15896     conftest$ac_exeext conftest.$ac_ext
15897 LIBS=$ac_check_lib_save_LIBS
15898 fi
15899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_NSS_Initialize" >&5
15900 $as_echo "$ac_cv_lib_nss3_NSS_Initialize" >&6; }
15901 if test "x$ac_cv_lib_nss3_NSS_Initialize" = x""yes; then :
15902    have_moznss=yes
15903 else
15904    have_moznss=no
15905 fi
15906
15907                 fi
15908
15909                 if test "$have_moznss" = yes ; then
15910                         ol_with_tls=moznss
15911                         ol_link_tls=yes
15912
15913 $as_echo "#define HAVE_MOZNSS 1" >>confdefs.h
15914
15915                         TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
15916                 else
15917                         if test $ol_with_tls = moznss ; then
15918                         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
15919                         fi
15920                 fi
15921         fi
15922 fi
15923
15924 WITH_TLS=no
15925 if test $ol_link_tls = yes ; then
15926
15927 $as_echo "#define HAVE_TLS 1" >>confdefs.h
15928
15929         WITH_TLS=yes
15930 elif test $ol_with_tls = auto ; then
15931         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate TLS/SSL package" >&5
15932 $as_echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
15933         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15934 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15935 elif test $ol_with_tls != no ; then
15936         as_fn_error "Could not locate TLS/SSL package" "$LINENO" 5
15937 else
15938         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15939 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15940 fi
15941
15942 if test $ol_enable_lmpasswd != no; then
15943         if test $ol_link_tls != yes ; then
15944                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
15945         fi
15946
15947
15948 $as_echo "#define SLAPD_LMHASH 1" >>confdefs.h
15949
15950 fi
15951
15952 ol_link_threads=no
15953
15954 case $ol_with_threads in auto | yes | nt)
15955
15956
15957         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
15958 if test "x$ac_cv_func__beginthread" = x""yes; then :
15959
15960 fi
15961
15962
15963         if test $ac_cv_func__beginthread = yes ; then
15964
15965 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
15966
15967                 ol_cv_nt_threads=yes
15968         fi
15969
15970
15971         if test "$ol_cv_nt_threads" = yes ; then
15972                 ol_link_threads=nt
15973                 ol_with_threads=found
15974                 ol_with_yielding_select=yes
15975
15976
15977 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
15978
15979
15980 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
15981
15982         fi
15983
15984         if test $ol_with_threads = nt ; then
15985                 as_fn_error "could not locate NT Threads" "$LINENO" 5
15986         fi
15987         ;;
15988 esac
15989
15990 case $ol_with_threads in auto | yes | posix)
15991
15992         for ac_header in pthread.h
15993 do :
15994   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15995 if test "x$ac_cv_header_pthread_h" = x""yes; then :
15996   cat >>confdefs.h <<_ACEOF
15997 #define HAVE_PTHREAD_H 1
15998 _ACEOF
15999
16000 fi
16001
16002 done
16003
16004
16005         if test $ac_cv_header_pthread_h = yes ; then
16006                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
16007 $as_echo_n "checking POSIX thread version... " >&6; }
16008 if test "${ol_cv_pthread_version+set}" = set; then :
16009   $as_echo_n "(cached) " >&6
16010 else
16011
16012         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16013 /* end confdefs.h.  */
16014
16015 #               include <pthread.h>
16016
16017 int
16018 main ()
16019 {
16020
16021                 int i = PTHREAD_CREATE_JOINABLE;
16022
16023   ;
16024   return 0;
16025 }
16026 _ACEOF
16027 if ac_fn_c_try_compile "$LINENO"; then :
16028
16029         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16030 /* end confdefs.h.  */
16031 #include <pthread.h>
16032
16033 _ACEOF
16034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16035   $EGREP "pthread_detach" >/dev/null 2>&1; then :
16036   ol_cv_pthread_version=10
16037 else
16038   ol_cv_pthread_version=8
16039 fi
16040 rm -f conftest*
16041
16042 else
16043
16044         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16045 /* end confdefs.h.  */
16046
16047 #               include <pthread.h>
16048 #               ifdef PTHREAD_CREATE_UNDETACHED
16049                 draft7
16050 #               endif
16051
16052 _ACEOF
16053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16054   $EGREP "draft7" >/dev/null 2>&1; then :
16055   ol_cv_pthread_version=7
16056 else
16057
16058         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16059 /* end confdefs.h.  */
16060 #include <pthread.h>
16061
16062 _ACEOF
16063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16064   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
16065   ol_cv_pthread_version=6
16066 else
16067
16068         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16069 /* end confdefs.h.  */
16070
16071 #               include <pthread.h>
16072 #ifdef          PTHREAD_MUTEX_INITIALIZER
16073                 draft5
16074 #endif
16075
16076 _ACEOF
16077 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16078   $EGREP "draft5" >/dev/null 2>&1; then :
16079   ol_cv_pthread_version=5
16080 else
16081   ol_cv_pthread_version=4
16082 fi
16083 rm -f conftest*
16084
16085 fi
16086 rm -f conftest*
16087
16088 fi
16089 rm -f conftest*
16090
16091 fi
16092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16093
16094 fi
16095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
16096 $as_echo "$ol_cv_pthread_version" >&6; }
16097
16098
16099                 if test $ol_cv_pthread_version != 0 ; then
16100
16101 cat >>confdefs.h <<_ACEOF
16102 #define HAVE_PTHREADS $ol_cv_pthread_version
16103 _ACEOF
16104
16105                 else
16106                         as_fn_error "unknown pthread version" "$LINENO" 5
16107                 fi
16108
16109                 # consider threads found
16110                 ol_with_threads=found
16111
16112
16113         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
16114 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
16115 if test "${ol_cv_header_linux_threads+set}" = set; then :
16116   $as_echo_n "(cached) " >&6
16117 else
16118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16119 /* end confdefs.h.  */
16120 #include <pthread.h>
16121 _ACEOF
16122 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16123   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
16124   ol_cv_header_linux_threads=yes
16125 else
16126   ol_cv_header_linux_threads=no
16127 fi
16128 rm -f conftest*
16129
16130
16131 fi
16132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
16133 $as_echo "$ol_cv_header_linux_threads" >&6; }
16134         if test $ol_cv_header_linux_threads = yes; then
16135
16136 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
16137
16138         fi
16139
16140
16141         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
16142 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
16143 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then :
16144   $as_echo_n "(cached) " >&6
16145 else
16146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16147 /* end confdefs.h.  */
16148 #include <pthread.h>
16149 #ifdef _POSIX_THREAD_IS_GNU_PTH
16150         __gnu_pth__;
16151 #endif
16152
16153 _ACEOF
16154 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16155   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
16156   ol_cv_header_gnu_pth_pthread_h=yes
16157 else
16158   ol_cv_header_gnu_pth_pthread_h=no
16159 fi
16160 rm -f conftest*
16161
16162
16163 fi
16164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
16165 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
16166
16167
16168                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
16169                         for ac_header in sched.h
16170 do :
16171   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
16172 if test "x$ac_cv_header_sched_h" = x""yes; then :
16173   cat >>confdefs.h <<_ACEOF
16174 #define HAVE_SCHED_H 1
16175 _ACEOF
16176
16177 fi
16178
16179 done
16180
16181                 fi
16182
16183
16184                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
16185 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
16186 if test "${ol_cv_pthread_create+set}" = set; then :
16187   $as_echo_n "(cached) " >&6
16188 else
16189
16190                         if test "$cross_compiling" = yes; then :
16191   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16192 /* end confdefs.h.  */
16193
16194 /* pthread test headers */
16195 #include <pthread.h>
16196 #if HAVE_PTHREADS < 7
16197 #include <errno.h>
16198 #endif
16199 #ifndef NULL
16200 #define NULL (void*)0
16201 #endif
16202
16203 static void *task(p)
16204         void *p;
16205 {
16206         return (void *) (p == NULL);
16207 }
16208
16209 int
16210 main ()
16211 {
16212
16213         /* pthread test function */
16214 #ifndef PTHREAD_CREATE_DETACHED
16215 #define PTHREAD_CREATE_DETACHED 1
16216 #endif
16217         pthread_t t;
16218         int status;
16219         int detach = PTHREAD_CREATE_DETACHED;
16220
16221 #if HAVE_PTHREADS > 4
16222         /* Final pthreads */
16223         pthread_attr_t attr;
16224
16225         status = pthread_attr_init(&attr);
16226         if( status ) return status;
16227
16228 #if HAVE_PTHREADS < 7
16229         status = pthread_attr_setdetachstate(&attr, &detach);
16230         if( status < 0 ) status = errno;
16231 #else
16232         status = pthread_attr_setdetachstate(&attr, detach);
16233 #endif
16234         if( status ) return status;
16235         status = pthread_create( &t, &attr, task, NULL );
16236 #if HAVE_PTHREADS < 7
16237         if( status < 0 ) status = errno;
16238 #endif
16239         if( status ) return status;
16240 #else
16241         /* Draft 4 pthreads */
16242         status = pthread_create( &t, pthread_attr_default, task, NULL );
16243         if( status ) return errno;
16244
16245         /* give thread a chance to complete */
16246         /* it should remain joinable and hence detachable */
16247         sleep( 1 );
16248
16249         status = pthread_detach( &t );
16250         if( status ) return errno;
16251 #endif
16252
16253 #ifdef HAVE_LINUX_THREADS
16254         pthread_kill_other_threads_np();
16255 #endif
16256
16257         return 0;
16258
16259   ;
16260   return 0;
16261 }
16262 _ACEOF
16263 if ac_fn_c_try_link "$LINENO"; then :
16264   ol_cv_pthread_create=yes
16265 else
16266   ol_cv_pthread_create=no
16267 fi
16268 rm -f core conftest.err conftest.$ac_objext \
16269     conftest$ac_exeext conftest.$ac_ext
16270 else
16271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16272 /* end confdefs.h.  */
16273
16274 /* pthread test headers */
16275 #include <pthread.h>
16276 #if HAVE_PTHREADS < 7
16277 #include <errno.h>
16278 #endif
16279 #ifndef NULL
16280 #define NULL (void*)0
16281 #endif
16282
16283 static void *task(p)
16284         void *p;
16285 {
16286         return (void *) (p == NULL);
16287 }
16288
16289
16290 int main(argc, argv)
16291         int argc;
16292         char **argv;
16293 {
16294
16295         /* pthread test function */
16296 #ifndef PTHREAD_CREATE_DETACHED
16297 #define PTHREAD_CREATE_DETACHED 1
16298 #endif
16299         pthread_t t;
16300         int status;
16301         int detach = PTHREAD_CREATE_DETACHED;
16302
16303 #if HAVE_PTHREADS > 4
16304         /* Final pthreads */
16305         pthread_attr_t attr;
16306
16307         status = pthread_attr_init(&attr);
16308         if( status ) return status;
16309
16310 #if HAVE_PTHREADS < 7
16311         status = pthread_attr_setdetachstate(&attr, &detach);
16312         if( status < 0 ) status = errno;
16313 #else
16314         status = pthread_attr_setdetachstate(&attr, detach);
16315 #endif
16316         if( status ) return status;
16317         status = pthread_create( &t, &attr, task, NULL );
16318 #if HAVE_PTHREADS < 7
16319         if( status < 0 ) status = errno;
16320 #endif
16321         if( status ) return status;
16322 #else
16323         /* Draft 4 pthreads */
16324         status = pthread_create( &t, pthread_attr_default, task, NULL );
16325         if( status ) return errno;
16326
16327         /* give thread a chance to complete */
16328         /* it should remain joinable and hence detachable */
16329         sleep( 1 );
16330
16331         status = pthread_detach( &t );
16332         if( status ) return errno;
16333 #endif
16334
16335 #ifdef HAVE_LINUX_THREADS
16336         pthread_kill_other_threads_np();
16337 #endif
16338
16339         return 0;
16340
16341 }
16342
16343 _ACEOF
16344 if ac_fn_c_try_run "$LINENO"; then :
16345   ol_cv_pthread_create=yes
16346 else
16347   ol_cv_pthread_create=no
16348 fi
16349 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16350   conftest.$ac_objext conftest.beam conftest.$ac_ext
16351 fi
16352
16353 fi
16354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
16355 $as_echo "$ol_cv_pthread_create" >&6; }
16356
16357                 if test $ol_cv_pthread_create != no ; then
16358                         ol_link_threads=posix
16359                         ol_link_pthreads=""
16360                 fi
16361
16362                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
16363 if test "$ol_link_threads" = no ; then
16364         # try -kthread
16365         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
16366 $as_echo_n "checking for pthread link with -kthread... " >&6; }
16367 if test "${ol_cv_pthread_kthread+set}" = set; then :
16368   $as_echo_n "(cached) " >&6
16369 else
16370
16371                 # save the flags
16372                 ol_LIBS="$LIBS"
16373                 LIBS="-kthread $LIBS"
16374
16375                 if test "$cross_compiling" = yes; then :
16376   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16377 /* end confdefs.h.  */
16378
16379 /* pthread test headers */
16380 #include <pthread.h>
16381 #if HAVE_PTHREADS < 7
16382 #include <errno.h>
16383 #endif
16384 #ifndef NULL
16385 #define NULL (void*)0
16386 #endif
16387
16388 static void *task(p)
16389         void *p;
16390 {
16391         return (void *) (p == NULL);
16392 }
16393
16394 int
16395 main ()
16396 {
16397
16398         /* pthread test function */
16399 #ifndef PTHREAD_CREATE_DETACHED
16400 #define PTHREAD_CREATE_DETACHED 1
16401 #endif
16402         pthread_t t;
16403         int status;
16404         int detach = PTHREAD_CREATE_DETACHED;
16405
16406 #if HAVE_PTHREADS > 4
16407         /* Final pthreads */
16408         pthread_attr_t attr;
16409
16410         status = pthread_attr_init(&attr);
16411         if( status ) return status;
16412
16413 #if HAVE_PTHREADS < 7
16414         status = pthread_attr_setdetachstate(&attr, &detach);
16415         if( status < 0 ) status = errno;
16416 #else
16417         status = pthread_attr_setdetachstate(&attr, detach);
16418 #endif
16419         if( status ) return status;
16420         status = pthread_create( &t, &attr, task, NULL );
16421 #if HAVE_PTHREADS < 7
16422         if( status < 0 ) status = errno;
16423 #endif
16424         if( status ) return status;
16425 #else
16426         /* Draft 4 pthreads */
16427         status = pthread_create( &t, pthread_attr_default, task, NULL );
16428         if( status ) return errno;
16429
16430         /* give thread a chance to complete */
16431         /* it should remain joinable and hence detachable */
16432         sleep( 1 );
16433
16434         status = pthread_detach( &t );
16435         if( status ) return errno;
16436 #endif
16437
16438 #ifdef HAVE_LINUX_THREADS
16439         pthread_kill_other_threads_np();
16440 #endif
16441
16442         return 0;
16443
16444   ;
16445   return 0;
16446 }
16447 _ACEOF
16448 if ac_fn_c_try_link "$LINENO"; then :
16449   ol_cv_pthread_kthread=yes
16450 else
16451   ol_cv_pthread_kthread=no
16452 fi
16453 rm -f core conftest.err conftest.$ac_objext \
16454     conftest$ac_exeext conftest.$ac_ext
16455 else
16456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16457 /* end confdefs.h.  */
16458
16459 /* pthread test headers */
16460 #include <pthread.h>
16461 #if HAVE_PTHREADS < 7
16462 #include <errno.h>
16463 #endif
16464 #ifndef NULL
16465 #define NULL (void*)0
16466 #endif
16467
16468 static void *task(p)
16469         void *p;
16470 {
16471         return (void *) (p == NULL);
16472 }
16473
16474
16475 int main(argc, argv)
16476         int argc;
16477         char **argv;
16478 {
16479
16480         /* pthread test function */
16481 #ifndef PTHREAD_CREATE_DETACHED
16482 #define PTHREAD_CREATE_DETACHED 1
16483 #endif
16484         pthread_t t;
16485         int status;
16486         int detach = PTHREAD_CREATE_DETACHED;
16487
16488 #if HAVE_PTHREADS > 4
16489         /* Final pthreads */
16490         pthread_attr_t attr;
16491
16492         status = pthread_attr_init(&attr);
16493         if( status ) return status;
16494
16495 #if HAVE_PTHREADS < 7
16496         status = pthread_attr_setdetachstate(&attr, &detach);
16497         if( status < 0 ) status = errno;
16498 #else
16499         status = pthread_attr_setdetachstate(&attr, detach);
16500 #endif
16501         if( status ) return status;
16502         status = pthread_create( &t, &attr, task, NULL );
16503 #if HAVE_PTHREADS < 7
16504         if( status < 0 ) status = errno;
16505 #endif
16506         if( status ) return status;
16507 #else
16508         /* Draft 4 pthreads */
16509         status = pthread_create( &t, pthread_attr_default, task, NULL );
16510         if( status ) return errno;
16511
16512         /* give thread a chance to complete */
16513         /* it should remain joinable and hence detachable */
16514         sleep( 1 );
16515
16516         status = pthread_detach( &t );
16517         if( status ) return errno;
16518 #endif
16519
16520 #ifdef HAVE_LINUX_THREADS
16521         pthread_kill_other_threads_np();
16522 #endif
16523
16524         return 0;
16525
16526 }
16527
16528 _ACEOF
16529 if ac_fn_c_try_run "$LINENO"; then :
16530   ol_cv_pthread_kthread=yes
16531 else
16532   ol_cv_pthread_kthread=no
16533 fi
16534 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16535   conftest.$ac_objext conftest.beam conftest.$ac_ext
16536 fi
16537
16538
16539                 # restore the LIBS
16540                 LIBS="$ol_LIBS"
16541
16542 fi
16543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
16544 $as_echo "$ol_cv_pthread_kthread" >&6; }
16545
16546         if test $ol_cv_pthread_kthread = yes ; then
16547                 ol_link_pthreads="-kthread"
16548                 ol_link_threads=posix
16549         fi
16550 fi
16551
16552                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
16553 if test "$ol_link_threads" = no ; then
16554         # try -pthread
16555         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
16556 $as_echo_n "checking for pthread link with -pthread... " >&6; }
16557 if test "${ol_cv_pthread_pthread+set}" = set; then :
16558   $as_echo_n "(cached) " >&6
16559 else
16560
16561                 # save the flags
16562                 ol_LIBS="$LIBS"
16563                 LIBS="-pthread $LIBS"
16564
16565                 if test "$cross_compiling" = yes; then :
16566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16567 /* end confdefs.h.  */
16568
16569 /* pthread test headers */
16570 #include <pthread.h>
16571 #if HAVE_PTHREADS < 7
16572 #include <errno.h>
16573 #endif
16574 #ifndef NULL
16575 #define NULL (void*)0
16576 #endif
16577
16578 static void *task(p)
16579         void *p;
16580 {
16581         return (void *) (p == NULL);
16582 }
16583
16584 int
16585 main ()
16586 {
16587
16588         /* pthread test function */
16589 #ifndef PTHREAD_CREATE_DETACHED
16590 #define PTHREAD_CREATE_DETACHED 1
16591 #endif
16592         pthread_t t;
16593         int status;
16594         int detach = PTHREAD_CREATE_DETACHED;
16595
16596 #if HAVE_PTHREADS > 4
16597         /* Final pthreads */
16598         pthread_attr_t attr;
16599
16600         status = pthread_attr_init(&attr);
16601         if( status ) return status;
16602
16603 #if HAVE_PTHREADS < 7
16604         status = pthread_attr_setdetachstate(&attr, &detach);
16605         if( status < 0 ) status = errno;
16606 #else
16607         status = pthread_attr_setdetachstate(&attr, detach);
16608 #endif
16609         if( status ) return status;
16610         status = pthread_create( &t, &attr, task, NULL );
16611 #if HAVE_PTHREADS < 7
16612         if( status < 0 ) status = errno;
16613 #endif
16614         if( status ) return status;
16615 #else
16616         /* Draft 4 pthreads */
16617         status = pthread_create( &t, pthread_attr_default, task, NULL );
16618         if( status ) return errno;
16619
16620         /* give thread a chance to complete */
16621         /* it should remain joinable and hence detachable */
16622         sleep( 1 );
16623
16624         status = pthread_detach( &t );
16625         if( status ) return errno;
16626 #endif
16627
16628 #ifdef HAVE_LINUX_THREADS
16629         pthread_kill_other_threads_np();
16630 #endif
16631
16632         return 0;
16633
16634   ;
16635   return 0;
16636 }
16637 _ACEOF
16638 if ac_fn_c_try_link "$LINENO"; then :
16639   ol_cv_pthread_pthread=yes
16640 else
16641   ol_cv_pthread_pthread=no
16642 fi
16643 rm -f core conftest.err conftest.$ac_objext \
16644     conftest$ac_exeext conftest.$ac_ext
16645 else
16646   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16647 /* end confdefs.h.  */
16648
16649 /* pthread test headers */
16650 #include <pthread.h>
16651 #if HAVE_PTHREADS < 7
16652 #include <errno.h>
16653 #endif
16654 #ifndef NULL
16655 #define NULL (void*)0
16656 #endif
16657
16658 static void *task(p)
16659         void *p;
16660 {
16661         return (void *) (p == NULL);
16662 }
16663
16664
16665 int main(argc, argv)
16666         int argc;
16667         char **argv;
16668 {
16669
16670         /* pthread test function */
16671 #ifndef PTHREAD_CREATE_DETACHED
16672 #define PTHREAD_CREATE_DETACHED 1
16673 #endif
16674         pthread_t t;
16675         int status;
16676         int detach = PTHREAD_CREATE_DETACHED;
16677
16678 #if HAVE_PTHREADS > 4
16679         /* Final pthreads */
16680         pthread_attr_t attr;
16681
16682         status = pthread_attr_init(&attr);
16683         if( status ) return status;
16684
16685 #if HAVE_PTHREADS < 7
16686         status = pthread_attr_setdetachstate(&attr, &detach);
16687         if( status < 0 ) status = errno;
16688 #else
16689         status = pthread_attr_setdetachstate(&attr, detach);
16690 #endif
16691         if( status ) return status;
16692         status = pthread_create( &t, &attr, task, NULL );
16693 #if HAVE_PTHREADS < 7
16694         if( status < 0 ) status = errno;
16695 #endif
16696         if( status ) return status;
16697 #else
16698         /* Draft 4 pthreads */
16699         status = pthread_create( &t, pthread_attr_default, task, NULL );
16700         if( status ) return errno;
16701
16702         /* give thread a chance to complete */
16703         /* it should remain joinable and hence detachable */
16704         sleep( 1 );
16705
16706         status = pthread_detach( &t );
16707         if( status ) return errno;
16708 #endif
16709
16710 #ifdef HAVE_LINUX_THREADS
16711         pthread_kill_other_threads_np();
16712 #endif
16713
16714         return 0;
16715
16716 }
16717
16718 _ACEOF
16719 if ac_fn_c_try_run "$LINENO"; then :
16720   ol_cv_pthread_pthread=yes
16721 else
16722   ol_cv_pthread_pthread=no
16723 fi
16724 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16725   conftest.$ac_objext conftest.beam conftest.$ac_ext
16726 fi
16727
16728
16729                 # restore the LIBS
16730                 LIBS="$ol_LIBS"
16731
16732 fi
16733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
16734 $as_echo "$ol_cv_pthread_pthread" >&6; }
16735
16736         if test $ol_cv_pthread_pthread = yes ; then
16737                 ol_link_pthreads="-pthread"
16738                 ol_link_threads=posix
16739         fi
16740 fi
16741
16742                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
16743 if test "$ol_link_threads" = no ; then
16744         # try -pthreads
16745         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
16746 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
16747 if test "${ol_cv_pthread_pthreads+set}" = set; then :
16748   $as_echo_n "(cached) " >&6
16749 else
16750
16751                 # save the flags
16752                 ol_LIBS="$LIBS"
16753                 LIBS="-pthreads $LIBS"
16754
16755                 if test "$cross_compiling" = yes; then :
16756   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16757 /* end confdefs.h.  */
16758
16759 /* pthread test headers */
16760 #include <pthread.h>
16761 #if HAVE_PTHREADS < 7
16762 #include <errno.h>
16763 #endif
16764 #ifndef NULL
16765 #define NULL (void*)0
16766 #endif
16767
16768 static void *task(p)
16769         void *p;
16770 {
16771         return (void *) (p == NULL);
16772 }
16773
16774 int
16775 main ()
16776 {
16777
16778         /* pthread test function */
16779 #ifndef PTHREAD_CREATE_DETACHED
16780 #define PTHREAD_CREATE_DETACHED 1
16781 #endif
16782         pthread_t t;
16783         int status;
16784         int detach = PTHREAD_CREATE_DETACHED;
16785
16786 #if HAVE_PTHREADS > 4
16787         /* Final pthreads */
16788         pthread_attr_t attr;
16789
16790         status = pthread_attr_init(&attr);
16791         if( status ) return status;
16792
16793 #if HAVE_PTHREADS < 7
16794         status = pthread_attr_setdetachstate(&attr, &detach);
16795         if( status < 0 ) status = errno;
16796 #else
16797         status = pthread_attr_setdetachstate(&attr, detach);
16798 #endif
16799         if( status ) return status;
16800         status = pthread_create( &t, &attr, task, NULL );
16801 #if HAVE_PTHREADS < 7
16802         if( status < 0 ) status = errno;
16803 #endif
16804         if( status ) return status;
16805 #else
16806         /* Draft 4 pthreads */
16807         status = pthread_create( &t, pthread_attr_default, task, NULL );
16808         if( status ) return errno;
16809
16810         /* give thread a chance to complete */
16811         /* it should remain joinable and hence detachable */
16812         sleep( 1 );
16813
16814         status = pthread_detach( &t );
16815         if( status ) return errno;
16816 #endif
16817
16818 #ifdef HAVE_LINUX_THREADS
16819         pthread_kill_other_threads_np();
16820 #endif
16821
16822         return 0;
16823
16824   ;
16825   return 0;
16826 }
16827 _ACEOF
16828 if ac_fn_c_try_link "$LINENO"; then :
16829   ol_cv_pthread_pthreads=yes
16830 else
16831   ol_cv_pthread_pthreads=no
16832 fi
16833 rm -f core conftest.err conftest.$ac_objext \
16834     conftest$ac_exeext conftest.$ac_ext
16835 else
16836   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16837 /* end confdefs.h.  */
16838
16839 /* pthread test headers */
16840 #include <pthread.h>
16841 #if HAVE_PTHREADS < 7
16842 #include <errno.h>
16843 #endif
16844 #ifndef NULL
16845 #define NULL (void*)0
16846 #endif
16847
16848 static void *task(p)
16849         void *p;
16850 {
16851         return (void *) (p == NULL);
16852 }
16853
16854
16855 int main(argc, argv)
16856         int argc;
16857         char **argv;
16858 {
16859
16860         /* pthread test function */
16861 #ifndef PTHREAD_CREATE_DETACHED
16862 #define PTHREAD_CREATE_DETACHED 1
16863 #endif
16864         pthread_t t;
16865         int status;
16866         int detach = PTHREAD_CREATE_DETACHED;
16867
16868 #if HAVE_PTHREADS > 4
16869         /* Final pthreads */
16870         pthread_attr_t attr;
16871
16872         status = pthread_attr_init(&attr);
16873         if( status ) return status;
16874
16875 #if HAVE_PTHREADS < 7
16876         status = pthread_attr_setdetachstate(&attr, &detach);
16877         if( status < 0 ) status = errno;
16878 #else
16879         status = pthread_attr_setdetachstate(&attr, detach);
16880 #endif
16881         if( status ) return status;
16882         status = pthread_create( &t, &attr, task, NULL );
16883 #if HAVE_PTHREADS < 7
16884         if( status < 0 ) status = errno;
16885 #endif
16886         if( status ) return status;
16887 #else
16888         /* Draft 4 pthreads */
16889         status = pthread_create( &t, pthread_attr_default, task, NULL );
16890         if( status ) return errno;
16891
16892         /* give thread a chance to complete */
16893         /* it should remain joinable and hence detachable */
16894         sleep( 1 );
16895
16896         status = pthread_detach( &t );
16897         if( status ) return errno;
16898 #endif
16899
16900 #ifdef HAVE_LINUX_THREADS
16901         pthread_kill_other_threads_np();
16902 #endif
16903
16904         return 0;
16905
16906 }
16907
16908 _ACEOF
16909 if ac_fn_c_try_run "$LINENO"; then :
16910   ol_cv_pthread_pthreads=yes
16911 else
16912   ol_cv_pthread_pthreads=no
16913 fi
16914 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16915   conftest.$ac_objext conftest.beam conftest.$ac_ext
16916 fi
16917
16918
16919                 # restore the LIBS
16920                 LIBS="$ol_LIBS"
16921
16922 fi
16923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
16924 $as_echo "$ol_cv_pthread_pthreads" >&6; }
16925
16926         if test $ol_cv_pthread_pthreads = yes ; then
16927                 ol_link_pthreads="-pthreads"
16928                 ol_link_threads=posix
16929         fi
16930 fi
16931
16932                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
16933 if test "$ol_link_threads" = no ; then
16934         # try -mthreads
16935         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
16936 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
16937 if test "${ol_cv_pthread_mthreads+set}" = set; then :
16938   $as_echo_n "(cached) " >&6
16939 else
16940
16941                 # save the flags
16942                 ol_LIBS="$LIBS"
16943                 LIBS="-mthreads $LIBS"
16944
16945                 if test "$cross_compiling" = yes; then :
16946   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16947 /* end confdefs.h.  */
16948
16949 /* pthread test headers */
16950 #include <pthread.h>
16951 #if HAVE_PTHREADS < 7
16952 #include <errno.h>
16953 #endif
16954 #ifndef NULL
16955 #define NULL (void*)0
16956 #endif
16957
16958 static void *task(p)
16959         void *p;
16960 {
16961         return (void *) (p == NULL);
16962 }
16963
16964 int
16965 main ()
16966 {
16967
16968         /* pthread test function */
16969 #ifndef PTHREAD_CREATE_DETACHED
16970 #define PTHREAD_CREATE_DETACHED 1
16971 #endif
16972         pthread_t t;
16973         int status;
16974         int detach = PTHREAD_CREATE_DETACHED;
16975
16976 #if HAVE_PTHREADS > 4
16977         /* Final pthreads */
16978         pthread_attr_t attr;
16979
16980         status = pthread_attr_init(&attr);
16981         if( status ) return status;
16982
16983 #if HAVE_PTHREADS < 7
16984         status = pthread_attr_setdetachstate(&attr, &detach);
16985         if( status < 0 ) status = errno;
16986 #else
16987         status = pthread_attr_setdetachstate(&attr, detach);
16988 #endif
16989         if( status ) return status;
16990         status = pthread_create( &t, &attr, task, NULL );
16991 #if HAVE_PTHREADS < 7
16992         if( status < 0 ) status = errno;
16993 #endif
16994         if( status ) return status;
16995 #else
16996         /* Draft 4 pthreads */
16997         status = pthread_create( &t, pthread_attr_default, task, NULL );
16998         if( status ) return errno;
16999
17000         /* give thread a chance to complete */
17001         /* it should remain joinable and hence detachable */
17002         sleep( 1 );
17003
17004         status = pthread_detach( &t );
17005         if( status ) return errno;
17006 #endif
17007
17008 #ifdef HAVE_LINUX_THREADS
17009         pthread_kill_other_threads_np();
17010 #endif
17011
17012         return 0;
17013
17014   ;
17015   return 0;
17016 }
17017 _ACEOF
17018 if ac_fn_c_try_link "$LINENO"; then :
17019   ol_cv_pthread_mthreads=yes
17020 else
17021   ol_cv_pthread_mthreads=no
17022 fi
17023 rm -f core conftest.err conftest.$ac_objext \
17024     conftest$ac_exeext conftest.$ac_ext
17025 else
17026   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17027 /* end confdefs.h.  */
17028
17029 /* pthread test headers */
17030 #include <pthread.h>
17031 #if HAVE_PTHREADS < 7
17032 #include <errno.h>
17033 #endif
17034 #ifndef NULL
17035 #define NULL (void*)0
17036 #endif
17037
17038 static void *task(p)
17039         void *p;
17040 {
17041         return (void *) (p == NULL);
17042 }
17043
17044
17045 int main(argc, argv)
17046         int argc;
17047         char **argv;
17048 {
17049
17050         /* pthread test function */
17051 #ifndef PTHREAD_CREATE_DETACHED
17052 #define PTHREAD_CREATE_DETACHED 1
17053 #endif
17054         pthread_t t;
17055         int status;
17056         int detach = PTHREAD_CREATE_DETACHED;
17057
17058 #if HAVE_PTHREADS > 4
17059         /* Final pthreads */
17060         pthread_attr_t attr;
17061
17062         status = pthread_attr_init(&attr);
17063         if( status ) return status;
17064
17065 #if HAVE_PTHREADS < 7
17066         status = pthread_attr_setdetachstate(&attr, &detach);
17067         if( status < 0 ) status = errno;
17068 #else
17069         status = pthread_attr_setdetachstate(&attr, detach);
17070 #endif
17071         if( status ) return status;
17072         status = pthread_create( &t, &attr, task, NULL );
17073 #if HAVE_PTHREADS < 7
17074         if( status < 0 ) status = errno;
17075 #endif
17076         if( status ) return status;
17077 #else
17078         /* Draft 4 pthreads */
17079         status = pthread_create( &t, pthread_attr_default, task, NULL );
17080         if( status ) return errno;
17081
17082         /* give thread a chance to complete */
17083         /* it should remain joinable and hence detachable */
17084         sleep( 1 );
17085
17086         status = pthread_detach( &t );
17087         if( status ) return errno;
17088 #endif
17089
17090 #ifdef HAVE_LINUX_THREADS
17091         pthread_kill_other_threads_np();
17092 #endif
17093
17094         return 0;
17095
17096 }
17097
17098 _ACEOF
17099 if ac_fn_c_try_run "$LINENO"; then :
17100   ol_cv_pthread_mthreads=yes
17101 else
17102   ol_cv_pthread_mthreads=no
17103 fi
17104 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17105   conftest.$ac_objext conftest.beam conftest.$ac_ext
17106 fi
17107
17108
17109                 # restore the LIBS
17110                 LIBS="$ol_LIBS"
17111
17112 fi
17113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
17114 $as_echo "$ol_cv_pthread_mthreads" >&6; }
17115
17116         if test $ol_cv_pthread_mthreads = yes ; then
17117                 ol_link_pthreads="-mthreads"
17118                 ol_link_threads=posix
17119         fi
17120 fi
17121
17122                 # Pthread try link: -thread (ol_cv_pthread_thread)
17123 if test "$ol_link_threads" = no ; then
17124         # try -thread
17125         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
17126 $as_echo_n "checking for pthread link with -thread... " >&6; }
17127 if test "${ol_cv_pthread_thread+set}" = set; then :
17128   $as_echo_n "(cached) " >&6
17129 else
17130
17131                 # save the flags
17132                 ol_LIBS="$LIBS"
17133                 LIBS="-thread $LIBS"
17134
17135                 if test "$cross_compiling" = yes; then :
17136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17137 /* end confdefs.h.  */
17138
17139 /* pthread test headers */
17140 #include <pthread.h>
17141 #if HAVE_PTHREADS < 7
17142 #include <errno.h>
17143 #endif
17144 #ifndef NULL
17145 #define NULL (void*)0
17146 #endif
17147
17148 static void *task(p)
17149         void *p;
17150 {
17151         return (void *) (p == NULL);
17152 }
17153
17154 int
17155 main ()
17156 {
17157
17158         /* pthread test function */
17159 #ifndef PTHREAD_CREATE_DETACHED
17160 #define PTHREAD_CREATE_DETACHED 1
17161 #endif
17162         pthread_t t;
17163         int status;
17164         int detach = PTHREAD_CREATE_DETACHED;
17165
17166 #if HAVE_PTHREADS > 4
17167         /* Final pthreads */
17168         pthread_attr_t attr;
17169
17170         status = pthread_attr_init(&attr);
17171         if( status ) return status;
17172
17173 #if HAVE_PTHREADS < 7
17174         status = pthread_attr_setdetachstate(&attr, &detach);
17175         if( status < 0 ) status = errno;
17176 #else
17177         status = pthread_attr_setdetachstate(&attr, detach);
17178 #endif
17179         if( status ) return status;
17180         status = pthread_create( &t, &attr, task, NULL );
17181 #if HAVE_PTHREADS < 7
17182         if( status < 0 ) status = errno;
17183 #endif
17184         if( status ) return status;
17185 #else
17186         /* Draft 4 pthreads */
17187         status = pthread_create( &t, pthread_attr_default, task, NULL );
17188         if( status ) return errno;
17189
17190         /* give thread a chance to complete */
17191         /* it should remain joinable and hence detachable */
17192         sleep( 1 );
17193
17194         status = pthread_detach( &t );
17195         if( status ) return errno;
17196 #endif
17197
17198 #ifdef HAVE_LINUX_THREADS
17199         pthread_kill_other_threads_np();
17200 #endif
17201
17202         return 0;
17203
17204   ;
17205   return 0;
17206 }
17207 _ACEOF
17208 if ac_fn_c_try_link "$LINENO"; then :
17209   ol_cv_pthread_thread=yes
17210 else
17211   ol_cv_pthread_thread=no
17212 fi
17213 rm -f core conftest.err conftest.$ac_objext \
17214     conftest$ac_exeext conftest.$ac_ext
17215 else
17216   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17217 /* end confdefs.h.  */
17218
17219 /* pthread test headers */
17220 #include <pthread.h>
17221 #if HAVE_PTHREADS < 7
17222 #include <errno.h>
17223 #endif
17224 #ifndef NULL
17225 #define NULL (void*)0
17226 #endif
17227
17228 static void *task(p)
17229         void *p;
17230 {
17231         return (void *) (p == NULL);
17232 }
17233
17234
17235 int main(argc, argv)
17236         int argc;
17237         char **argv;
17238 {
17239
17240         /* pthread test function */
17241 #ifndef PTHREAD_CREATE_DETACHED
17242 #define PTHREAD_CREATE_DETACHED 1
17243 #endif
17244         pthread_t t;
17245         int status;
17246         int detach = PTHREAD_CREATE_DETACHED;
17247
17248 #if HAVE_PTHREADS > 4
17249         /* Final pthreads */
17250         pthread_attr_t attr;
17251
17252         status = pthread_attr_init(&attr);
17253         if( status ) return status;
17254
17255 #if HAVE_PTHREADS < 7
17256         status = pthread_attr_setdetachstate(&attr, &detach);
17257         if( status < 0 ) status = errno;
17258 #else
17259         status = pthread_attr_setdetachstate(&attr, detach);
17260 #endif
17261         if( status ) return status;
17262         status = pthread_create( &t, &attr, task, NULL );
17263 #if HAVE_PTHREADS < 7
17264         if( status < 0 ) status = errno;
17265 #endif
17266         if( status ) return status;
17267 #else
17268         /* Draft 4 pthreads */
17269         status = pthread_create( &t, pthread_attr_default, task, NULL );
17270         if( status ) return errno;
17271
17272         /* give thread a chance to complete */
17273         /* it should remain joinable and hence detachable */
17274         sleep( 1 );
17275
17276         status = pthread_detach( &t );
17277         if( status ) return errno;
17278 #endif
17279
17280 #ifdef HAVE_LINUX_THREADS
17281         pthread_kill_other_threads_np();
17282 #endif
17283
17284         return 0;
17285
17286 }
17287
17288 _ACEOF
17289 if ac_fn_c_try_run "$LINENO"; then :
17290   ol_cv_pthread_thread=yes
17291 else
17292   ol_cv_pthread_thread=no
17293 fi
17294 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17295   conftest.$ac_objext conftest.beam conftest.$ac_ext
17296 fi
17297
17298
17299                 # restore the LIBS
17300                 LIBS="$ol_LIBS"
17301
17302 fi
17303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
17304 $as_echo "$ol_cv_pthread_thread" >&6; }
17305
17306         if test $ol_cv_pthread_thread = yes ; then
17307                 ol_link_pthreads="-thread"
17308                 ol_link_threads=posix
17309         fi
17310 fi
17311
17312
17313                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
17314 if test "$ol_link_threads" = no ; then
17315         # try -lpthread -lmach -lexc -lc_r
17316         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
17317 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
17318 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then :
17319   $as_echo_n "(cached) " >&6
17320 else
17321
17322                 # save the flags
17323                 ol_LIBS="$LIBS"
17324                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
17325
17326                 if test "$cross_compiling" = yes; then :
17327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17328 /* end confdefs.h.  */
17329
17330 /* pthread test headers */
17331 #include <pthread.h>
17332 #if HAVE_PTHREADS < 7
17333 #include <errno.h>
17334 #endif
17335 #ifndef NULL
17336 #define NULL (void*)0
17337 #endif
17338
17339 static void *task(p)
17340         void *p;
17341 {
17342         return (void *) (p == NULL);
17343 }
17344
17345 int
17346 main ()
17347 {
17348
17349         /* pthread test function */
17350 #ifndef PTHREAD_CREATE_DETACHED
17351 #define PTHREAD_CREATE_DETACHED 1
17352 #endif
17353         pthread_t t;
17354         int status;
17355         int detach = PTHREAD_CREATE_DETACHED;
17356
17357 #if HAVE_PTHREADS > 4
17358         /* Final pthreads */
17359         pthread_attr_t attr;
17360
17361         status = pthread_attr_init(&attr);
17362         if( status ) return status;
17363
17364 #if HAVE_PTHREADS < 7
17365         status = pthread_attr_setdetachstate(&attr, &detach);
17366         if( status < 0 ) status = errno;
17367 #else
17368         status = pthread_attr_setdetachstate(&attr, detach);
17369 #endif
17370         if( status ) return status;
17371         status = pthread_create( &t, &attr, task, NULL );
17372 #if HAVE_PTHREADS < 7
17373         if( status < 0 ) status = errno;
17374 #endif
17375         if( status ) return status;
17376 #else
17377         /* Draft 4 pthreads */
17378         status = pthread_create( &t, pthread_attr_default, task, NULL );
17379         if( status ) return errno;
17380
17381         /* give thread a chance to complete */
17382         /* it should remain joinable and hence detachable */
17383         sleep( 1 );
17384
17385         status = pthread_detach( &t );
17386         if( status ) return errno;
17387 #endif
17388
17389 #ifdef HAVE_LINUX_THREADS
17390         pthread_kill_other_threads_np();
17391 #endif
17392
17393         return 0;
17394
17395   ;
17396   return 0;
17397 }
17398 _ACEOF
17399 if ac_fn_c_try_link "$LINENO"; then :
17400   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17401 else
17402   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17403 fi
17404 rm -f core conftest.err conftest.$ac_objext \
17405     conftest$ac_exeext conftest.$ac_ext
17406 else
17407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17408 /* end confdefs.h.  */
17409
17410 /* pthread test headers */
17411 #include <pthread.h>
17412 #if HAVE_PTHREADS < 7
17413 #include <errno.h>
17414 #endif
17415 #ifndef NULL
17416 #define NULL (void*)0
17417 #endif
17418
17419 static void *task(p)
17420         void *p;
17421 {
17422         return (void *) (p == NULL);
17423 }
17424
17425
17426 int main(argc, argv)
17427         int argc;
17428         char **argv;
17429 {
17430
17431         /* pthread test function */
17432 #ifndef PTHREAD_CREATE_DETACHED
17433 #define PTHREAD_CREATE_DETACHED 1
17434 #endif
17435         pthread_t t;
17436         int status;
17437         int detach = PTHREAD_CREATE_DETACHED;
17438
17439 #if HAVE_PTHREADS > 4
17440         /* Final pthreads */
17441         pthread_attr_t attr;
17442
17443         status = pthread_attr_init(&attr);
17444         if( status ) return status;
17445
17446 #if HAVE_PTHREADS < 7
17447         status = pthread_attr_setdetachstate(&attr, &detach);
17448         if( status < 0 ) status = errno;
17449 #else
17450         status = pthread_attr_setdetachstate(&attr, detach);
17451 #endif
17452         if( status ) return status;
17453         status = pthread_create( &t, &attr, task, NULL );
17454 #if HAVE_PTHREADS < 7
17455         if( status < 0 ) status = errno;
17456 #endif
17457         if( status ) return status;
17458 #else
17459         /* Draft 4 pthreads */
17460         status = pthread_create( &t, pthread_attr_default, task, NULL );
17461         if( status ) return errno;
17462
17463         /* give thread a chance to complete */
17464         /* it should remain joinable and hence detachable */
17465         sleep( 1 );
17466
17467         status = pthread_detach( &t );
17468         if( status ) return errno;
17469 #endif
17470
17471 #ifdef HAVE_LINUX_THREADS
17472         pthread_kill_other_threads_np();
17473 #endif
17474
17475         return 0;
17476
17477 }
17478
17479 _ACEOF
17480 if ac_fn_c_try_run "$LINENO"; then :
17481   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17482 else
17483   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17484 fi
17485 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17486   conftest.$ac_objext conftest.beam conftest.$ac_ext
17487 fi
17488
17489
17490                 # restore the LIBS
17491                 LIBS="$ol_LIBS"
17492
17493 fi
17494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
17495 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
17496
17497         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
17498                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
17499                 ol_link_threads=posix
17500         fi
17501 fi
17502
17503                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
17504 if test "$ol_link_threads" = no ; then
17505         # try -lpthread -lmach -lexc
17506         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
17507 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
17508 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then :
17509   $as_echo_n "(cached) " >&6
17510 else
17511
17512                 # save the flags
17513                 ol_LIBS="$LIBS"
17514                 LIBS="-lpthread -lmach -lexc $LIBS"
17515
17516                 if test "$cross_compiling" = yes; then :
17517   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17518 /* end confdefs.h.  */
17519
17520 /* pthread test headers */
17521 #include <pthread.h>
17522 #if HAVE_PTHREADS < 7
17523 #include <errno.h>
17524 #endif
17525 #ifndef NULL
17526 #define NULL (void*)0
17527 #endif
17528
17529 static void *task(p)
17530         void *p;
17531 {
17532         return (void *) (p == NULL);
17533 }
17534
17535 int
17536 main ()
17537 {
17538
17539         /* pthread test function */
17540 #ifndef PTHREAD_CREATE_DETACHED
17541 #define PTHREAD_CREATE_DETACHED 1
17542 #endif
17543         pthread_t t;
17544         int status;
17545         int detach = PTHREAD_CREATE_DETACHED;
17546
17547 #if HAVE_PTHREADS > 4
17548         /* Final pthreads */
17549         pthread_attr_t attr;
17550
17551         status = pthread_attr_init(&attr);
17552         if( status ) return status;
17553
17554 #if HAVE_PTHREADS < 7
17555         status = pthread_attr_setdetachstate(&attr, &detach);
17556         if( status < 0 ) status = errno;
17557 #else
17558         status = pthread_attr_setdetachstate(&attr, detach);
17559 #endif
17560         if( status ) return status;
17561         status = pthread_create( &t, &attr, task, NULL );
17562 #if HAVE_PTHREADS < 7
17563         if( status < 0 ) status = errno;
17564 #endif
17565         if( status ) return status;
17566 #else
17567         /* Draft 4 pthreads */
17568         status = pthread_create( &t, pthread_attr_default, task, NULL );
17569         if( status ) return errno;
17570
17571         /* give thread a chance to complete */
17572         /* it should remain joinable and hence detachable */
17573         sleep( 1 );
17574
17575         status = pthread_detach( &t );
17576         if( status ) return errno;
17577 #endif
17578
17579 #ifdef HAVE_LINUX_THREADS
17580         pthread_kill_other_threads_np();
17581 #endif
17582
17583         return 0;
17584
17585   ;
17586   return 0;
17587 }
17588 _ACEOF
17589 if ac_fn_c_try_link "$LINENO"; then :
17590   ol_cv_pthread_lpthread_lmach_lexc=yes
17591 else
17592   ol_cv_pthread_lpthread_lmach_lexc=no
17593 fi
17594 rm -f core conftest.err conftest.$ac_objext \
17595     conftest$ac_exeext conftest.$ac_ext
17596 else
17597   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17598 /* end confdefs.h.  */
17599
17600 /* pthread test headers */
17601 #include <pthread.h>
17602 #if HAVE_PTHREADS < 7
17603 #include <errno.h>
17604 #endif
17605 #ifndef NULL
17606 #define NULL (void*)0
17607 #endif
17608
17609 static void *task(p)
17610         void *p;
17611 {
17612         return (void *) (p == NULL);
17613 }
17614
17615
17616 int main(argc, argv)
17617         int argc;
17618         char **argv;
17619 {
17620
17621         /* pthread test function */
17622 #ifndef PTHREAD_CREATE_DETACHED
17623 #define PTHREAD_CREATE_DETACHED 1
17624 #endif
17625         pthread_t t;
17626         int status;
17627         int detach = PTHREAD_CREATE_DETACHED;
17628
17629 #if HAVE_PTHREADS > 4
17630         /* Final pthreads */
17631         pthread_attr_t attr;
17632
17633         status = pthread_attr_init(&attr);
17634         if( status ) return status;
17635
17636 #if HAVE_PTHREADS < 7
17637         status = pthread_attr_setdetachstate(&attr, &detach);
17638         if( status < 0 ) status = errno;
17639 #else
17640         status = pthread_attr_setdetachstate(&attr, detach);
17641 #endif
17642         if( status ) return status;
17643         status = pthread_create( &t, &attr, task, NULL );
17644 #if HAVE_PTHREADS < 7
17645         if( status < 0 ) status = errno;
17646 #endif
17647         if( status ) return status;
17648 #else
17649         /* Draft 4 pthreads */
17650         status = pthread_create( &t, pthread_attr_default, task, NULL );
17651         if( status ) return errno;
17652
17653         /* give thread a chance to complete */
17654         /* it should remain joinable and hence detachable */
17655         sleep( 1 );
17656
17657         status = pthread_detach( &t );
17658         if( status ) return errno;
17659 #endif
17660
17661 #ifdef HAVE_LINUX_THREADS
17662         pthread_kill_other_threads_np();
17663 #endif
17664
17665         return 0;
17666
17667 }
17668
17669 _ACEOF
17670 if ac_fn_c_try_run "$LINENO"; then :
17671   ol_cv_pthread_lpthread_lmach_lexc=yes
17672 else
17673   ol_cv_pthread_lpthread_lmach_lexc=no
17674 fi
17675 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17676   conftest.$ac_objext conftest.beam conftest.$ac_ext
17677 fi
17678
17679
17680                 # restore the LIBS
17681                 LIBS="$ol_LIBS"
17682
17683 fi
17684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
17685 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
17686
17687         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
17688                 ol_link_pthreads="-lpthread -lmach -lexc"
17689                 ol_link_threads=posix
17690         fi
17691 fi
17692
17693
17694                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
17695 if test "$ol_link_threads" = no ; then
17696         # try -lpthread -Wl,-woff,85
17697         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
17698 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
17699 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then :
17700   $as_echo_n "(cached) " >&6
17701 else
17702
17703                 # save the flags
17704                 ol_LIBS="$LIBS"
17705                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
17706
17707                 if test "$cross_compiling" = yes; then :
17708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17709 /* end confdefs.h.  */
17710
17711 /* pthread test headers */
17712 #include <pthread.h>
17713 #if HAVE_PTHREADS < 7
17714 #include <errno.h>
17715 #endif
17716 #ifndef NULL
17717 #define NULL (void*)0
17718 #endif
17719
17720 static void *task(p)
17721         void *p;
17722 {
17723         return (void *) (p == NULL);
17724 }
17725
17726 int
17727 main ()
17728 {
17729
17730         /* pthread test function */
17731 #ifndef PTHREAD_CREATE_DETACHED
17732 #define PTHREAD_CREATE_DETACHED 1
17733 #endif
17734         pthread_t t;
17735         int status;
17736         int detach = PTHREAD_CREATE_DETACHED;
17737
17738 #if HAVE_PTHREADS > 4
17739         /* Final pthreads */
17740         pthread_attr_t attr;
17741
17742         status = pthread_attr_init(&attr);
17743         if( status ) return status;
17744
17745 #if HAVE_PTHREADS < 7
17746         status = pthread_attr_setdetachstate(&attr, &detach);
17747         if( status < 0 ) status = errno;
17748 #else
17749         status = pthread_attr_setdetachstate(&attr, detach);
17750 #endif
17751         if( status ) return status;
17752         status = pthread_create( &t, &attr, task, NULL );
17753 #if HAVE_PTHREADS < 7
17754         if( status < 0 ) status = errno;
17755 #endif
17756         if( status ) return status;
17757 #else
17758         /* Draft 4 pthreads */
17759         status = pthread_create( &t, pthread_attr_default, task, NULL );
17760         if( status ) return errno;
17761
17762         /* give thread a chance to complete */
17763         /* it should remain joinable and hence detachable */
17764         sleep( 1 );
17765
17766         status = pthread_detach( &t );
17767         if( status ) return errno;
17768 #endif
17769
17770 #ifdef HAVE_LINUX_THREADS
17771         pthread_kill_other_threads_np();
17772 #endif
17773
17774         return 0;
17775
17776   ;
17777   return 0;
17778 }
17779 _ACEOF
17780 if ac_fn_c_try_link "$LINENO"; then :
17781   ol_cv_pthread_lib_lpthread_woff=yes
17782 else
17783   ol_cv_pthread_lib_lpthread_woff=no
17784 fi
17785 rm -f core conftest.err conftest.$ac_objext \
17786     conftest$ac_exeext conftest.$ac_ext
17787 else
17788   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17789 /* end confdefs.h.  */
17790
17791 /* pthread test headers */
17792 #include <pthread.h>
17793 #if HAVE_PTHREADS < 7
17794 #include <errno.h>
17795 #endif
17796 #ifndef NULL
17797 #define NULL (void*)0
17798 #endif
17799
17800 static void *task(p)
17801         void *p;
17802 {
17803         return (void *) (p == NULL);
17804 }
17805
17806
17807 int main(argc, argv)
17808         int argc;
17809         char **argv;
17810 {
17811
17812         /* pthread test function */
17813 #ifndef PTHREAD_CREATE_DETACHED
17814 #define PTHREAD_CREATE_DETACHED 1
17815 #endif
17816         pthread_t t;
17817         int status;
17818         int detach = PTHREAD_CREATE_DETACHED;
17819
17820 #if HAVE_PTHREADS > 4
17821         /* Final pthreads */
17822         pthread_attr_t attr;
17823
17824         status = pthread_attr_init(&attr);
17825         if( status ) return status;
17826
17827 #if HAVE_PTHREADS < 7
17828         status = pthread_attr_setdetachstate(&attr, &detach);
17829         if( status < 0 ) status = errno;
17830 #else
17831         status = pthread_attr_setdetachstate(&attr, detach);
17832 #endif
17833         if( status ) return status;
17834         status = pthread_create( &t, &attr, task, NULL );
17835 #if HAVE_PTHREADS < 7
17836         if( status < 0 ) status = errno;
17837 #endif
17838         if( status ) return status;
17839 #else
17840         /* Draft 4 pthreads */
17841         status = pthread_create( &t, pthread_attr_default, task, NULL );
17842         if( status ) return errno;
17843
17844         /* give thread a chance to complete */
17845         /* it should remain joinable and hence detachable */
17846         sleep( 1 );
17847
17848         status = pthread_detach( &t );
17849         if( status ) return errno;
17850 #endif
17851
17852 #ifdef HAVE_LINUX_THREADS
17853         pthread_kill_other_threads_np();
17854 #endif
17855
17856         return 0;
17857
17858 }
17859
17860 _ACEOF
17861 if ac_fn_c_try_run "$LINENO"; then :
17862   ol_cv_pthread_lib_lpthread_woff=yes
17863 else
17864   ol_cv_pthread_lib_lpthread_woff=no
17865 fi
17866 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17867   conftest.$ac_objext conftest.beam conftest.$ac_ext
17868 fi
17869
17870
17871                 # restore the LIBS
17872                 LIBS="$ol_LIBS"
17873
17874 fi
17875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
17876 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
17877
17878         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
17879                 ol_link_pthreads="-lpthread -Wl,-woff,85"
17880                 ol_link_threads=posix
17881         fi
17882 fi
17883
17884
17885                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
17886 if test "$ol_link_threads" = no ; then
17887         # try -lpthread
17888         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
17889 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
17890 if test "${ol_cv_pthread_lpthread+set}" = set; then :
17891   $as_echo_n "(cached) " >&6
17892 else
17893
17894                 # save the flags
17895                 ol_LIBS="$LIBS"
17896                 LIBS="-lpthread $LIBS"
17897
17898                 if test "$cross_compiling" = yes; then :
17899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17900 /* end confdefs.h.  */
17901
17902 /* pthread test headers */
17903 #include <pthread.h>
17904 #if HAVE_PTHREADS < 7
17905 #include <errno.h>
17906 #endif
17907 #ifndef NULL
17908 #define NULL (void*)0
17909 #endif
17910
17911 static void *task(p)
17912         void *p;
17913 {
17914         return (void *) (p == NULL);
17915 }
17916
17917 int
17918 main ()
17919 {
17920
17921         /* pthread test function */
17922 #ifndef PTHREAD_CREATE_DETACHED
17923 #define PTHREAD_CREATE_DETACHED 1
17924 #endif
17925         pthread_t t;
17926         int status;
17927         int detach = PTHREAD_CREATE_DETACHED;
17928
17929 #if HAVE_PTHREADS > 4
17930         /* Final pthreads */
17931         pthread_attr_t attr;
17932
17933         status = pthread_attr_init(&attr);
17934         if( status ) return status;
17935
17936 #if HAVE_PTHREADS < 7
17937         status = pthread_attr_setdetachstate(&attr, &detach);
17938         if( status < 0 ) status = errno;
17939 #else
17940         status = pthread_attr_setdetachstate(&attr, detach);
17941 #endif
17942         if( status ) return status;
17943         status = pthread_create( &t, &attr, task, NULL );
17944 #if HAVE_PTHREADS < 7
17945         if( status < 0 ) status = errno;
17946 #endif
17947         if( status ) return status;
17948 #else
17949         /* Draft 4 pthreads */
17950         status = pthread_create( &t, pthread_attr_default, task, NULL );
17951         if( status ) return errno;
17952
17953         /* give thread a chance to complete */
17954         /* it should remain joinable and hence detachable */
17955         sleep( 1 );
17956
17957         status = pthread_detach( &t );
17958         if( status ) return errno;
17959 #endif
17960
17961 #ifdef HAVE_LINUX_THREADS
17962         pthread_kill_other_threads_np();
17963 #endif
17964
17965         return 0;
17966
17967   ;
17968   return 0;
17969 }
17970 _ACEOF
17971 if ac_fn_c_try_link "$LINENO"; then :
17972   ol_cv_pthread_lpthread=yes
17973 else
17974   ol_cv_pthread_lpthread=no
17975 fi
17976 rm -f core conftest.err conftest.$ac_objext \
17977     conftest$ac_exeext conftest.$ac_ext
17978 else
17979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17980 /* end confdefs.h.  */
17981
17982 /* pthread test headers */
17983 #include <pthread.h>
17984 #if HAVE_PTHREADS < 7
17985 #include <errno.h>
17986 #endif
17987 #ifndef NULL
17988 #define NULL (void*)0
17989 #endif
17990
17991 static void *task(p)
17992         void *p;
17993 {
17994         return (void *) (p == NULL);
17995 }
17996
17997
17998 int main(argc, argv)
17999         int argc;
18000         char **argv;
18001 {
18002
18003         /* pthread test function */
18004 #ifndef PTHREAD_CREATE_DETACHED
18005 #define PTHREAD_CREATE_DETACHED 1
18006 #endif
18007         pthread_t t;
18008         int status;
18009         int detach = PTHREAD_CREATE_DETACHED;
18010
18011 #if HAVE_PTHREADS > 4
18012         /* Final pthreads */
18013         pthread_attr_t attr;
18014
18015         status = pthread_attr_init(&attr);
18016         if( status ) return status;
18017
18018 #if HAVE_PTHREADS < 7
18019         status = pthread_attr_setdetachstate(&attr, &detach);
18020         if( status < 0 ) status = errno;
18021 #else
18022         status = pthread_attr_setdetachstate(&attr, detach);
18023 #endif
18024         if( status ) return status;
18025         status = pthread_create( &t, &attr, task, NULL );
18026 #if HAVE_PTHREADS < 7
18027         if( status < 0 ) status = errno;
18028 #endif
18029         if( status ) return status;
18030 #else
18031         /* Draft 4 pthreads */
18032         status = pthread_create( &t, pthread_attr_default, task, NULL );
18033         if( status ) return errno;
18034
18035         /* give thread a chance to complete */
18036         /* it should remain joinable and hence detachable */
18037         sleep( 1 );
18038
18039         status = pthread_detach( &t );
18040         if( status ) return errno;
18041 #endif
18042
18043 #ifdef HAVE_LINUX_THREADS
18044         pthread_kill_other_threads_np();
18045 #endif
18046
18047         return 0;
18048
18049 }
18050
18051 _ACEOF
18052 if ac_fn_c_try_run "$LINENO"; then :
18053   ol_cv_pthread_lpthread=yes
18054 else
18055   ol_cv_pthread_lpthread=no
18056 fi
18057 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18058   conftest.$ac_objext conftest.beam conftest.$ac_ext
18059 fi
18060
18061
18062                 # restore the LIBS
18063                 LIBS="$ol_LIBS"
18064
18065 fi
18066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
18067 $as_echo "$ol_cv_pthread_lpthread" >&6; }
18068
18069         if test $ol_cv_pthread_lpthread = yes ; then
18070                 ol_link_pthreads="-lpthread"
18071                 ol_link_threads=posix
18072         fi
18073 fi
18074
18075                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
18076 if test "$ol_link_threads" = no ; then
18077         # try -lc_r
18078         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
18079 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
18080 if test "${ol_cv_pthread_lc_r+set}" = set; then :
18081   $as_echo_n "(cached) " >&6
18082 else
18083
18084                 # save the flags
18085                 ol_LIBS="$LIBS"
18086                 LIBS="-lc_r $LIBS"
18087
18088                 if test "$cross_compiling" = yes; then :
18089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18090 /* end confdefs.h.  */
18091
18092 /* pthread test headers */
18093 #include <pthread.h>
18094 #if HAVE_PTHREADS < 7
18095 #include <errno.h>
18096 #endif
18097 #ifndef NULL
18098 #define NULL (void*)0
18099 #endif
18100
18101 static void *task(p)
18102         void *p;
18103 {
18104         return (void *) (p == NULL);
18105 }
18106
18107 int
18108 main ()
18109 {
18110
18111         /* pthread test function */
18112 #ifndef PTHREAD_CREATE_DETACHED
18113 #define PTHREAD_CREATE_DETACHED 1
18114 #endif
18115         pthread_t t;
18116         int status;
18117         int detach = PTHREAD_CREATE_DETACHED;
18118
18119 #if HAVE_PTHREADS > 4
18120         /* Final pthreads */
18121         pthread_attr_t attr;
18122
18123         status = pthread_attr_init(&attr);
18124         if( status ) return status;
18125
18126 #if HAVE_PTHREADS < 7
18127         status = pthread_attr_setdetachstate(&attr, &detach);
18128         if( status < 0 ) status = errno;
18129 #else
18130         status = pthread_attr_setdetachstate(&attr, detach);
18131 #endif
18132         if( status ) return status;
18133         status = pthread_create( &t, &attr, task, NULL );
18134 #if HAVE_PTHREADS < 7
18135         if( status < 0 ) status = errno;
18136 #endif
18137         if( status ) return status;
18138 #else
18139         /* Draft 4 pthreads */
18140         status = pthread_create( &t, pthread_attr_default, task, NULL );
18141         if( status ) return errno;
18142
18143         /* give thread a chance to complete */
18144         /* it should remain joinable and hence detachable */
18145         sleep( 1 );
18146
18147         status = pthread_detach( &t );
18148         if( status ) return errno;
18149 #endif
18150
18151 #ifdef HAVE_LINUX_THREADS
18152         pthread_kill_other_threads_np();
18153 #endif
18154
18155         return 0;
18156
18157   ;
18158   return 0;
18159 }
18160 _ACEOF
18161 if ac_fn_c_try_link "$LINENO"; then :
18162   ol_cv_pthread_lc_r=yes
18163 else
18164   ol_cv_pthread_lc_r=no
18165 fi
18166 rm -f core conftest.err conftest.$ac_objext \
18167     conftest$ac_exeext conftest.$ac_ext
18168 else
18169   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18170 /* end confdefs.h.  */
18171
18172 /* pthread test headers */
18173 #include <pthread.h>
18174 #if HAVE_PTHREADS < 7
18175 #include <errno.h>
18176 #endif
18177 #ifndef NULL
18178 #define NULL (void*)0
18179 #endif
18180
18181 static void *task(p)
18182         void *p;
18183 {
18184         return (void *) (p == NULL);
18185 }
18186
18187
18188 int main(argc, argv)
18189         int argc;
18190         char **argv;
18191 {
18192
18193         /* pthread test function */
18194 #ifndef PTHREAD_CREATE_DETACHED
18195 #define PTHREAD_CREATE_DETACHED 1
18196 #endif
18197         pthread_t t;
18198         int status;
18199         int detach = PTHREAD_CREATE_DETACHED;
18200
18201 #if HAVE_PTHREADS > 4
18202         /* Final pthreads */
18203         pthread_attr_t attr;
18204
18205         status = pthread_attr_init(&attr);
18206         if( status ) return status;
18207
18208 #if HAVE_PTHREADS < 7
18209         status = pthread_attr_setdetachstate(&attr, &detach);
18210         if( status < 0 ) status = errno;
18211 #else
18212         status = pthread_attr_setdetachstate(&attr, detach);
18213 #endif
18214         if( status ) return status;
18215         status = pthread_create( &t, &attr, task, NULL );
18216 #if HAVE_PTHREADS < 7
18217         if( status < 0 ) status = errno;
18218 #endif
18219         if( status ) return status;
18220 #else
18221         /* Draft 4 pthreads */
18222         status = pthread_create( &t, pthread_attr_default, task, NULL );
18223         if( status ) return errno;
18224
18225         /* give thread a chance to complete */
18226         /* it should remain joinable and hence detachable */
18227         sleep( 1 );
18228
18229         status = pthread_detach( &t );
18230         if( status ) return errno;
18231 #endif
18232
18233 #ifdef HAVE_LINUX_THREADS
18234         pthread_kill_other_threads_np();
18235 #endif
18236
18237         return 0;
18238
18239 }
18240
18241 _ACEOF
18242 if ac_fn_c_try_run "$LINENO"; then :
18243   ol_cv_pthread_lc_r=yes
18244 else
18245   ol_cv_pthread_lc_r=no
18246 fi
18247 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18248   conftest.$ac_objext conftest.beam conftest.$ac_ext
18249 fi
18250
18251
18252                 # restore the LIBS
18253                 LIBS="$ol_LIBS"
18254
18255 fi
18256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
18257 $as_echo "$ol_cv_pthread_lc_r" >&6; }
18258
18259         if test $ol_cv_pthread_lc_r = yes ; then
18260                 ol_link_pthreads="-lc_r"
18261                 ol_link_threads=posix
18262         fi
18263 fi
18264
18265
18266                 # Pthread try link: -threads (ol_cv_pthread_threads)
18267 if test "$ol_link_threads" = no ; then
18268         # try -threads
18269         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
18270 $as_echo_n "checking for pthread link with -threads... " >&6; }
18271 if test "${ol_cv_pthread_threads+set}" = set; then :
18272   $as_echo_n "(cached) " >&6
18273 else
18274
18275                 # save the flags
18276                 ol_LIBS="$LIBS"
18277                 LIBS="-threads $LIBS"
18278
18279                 if test "$cross_compiling" = yes; then :
18280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18281 /* end confdefs.h.  */
18282
18283 /* pthread test headers */
18284 #include <pthread.h>
18285 #if HAVE_PTHREADS < 7
18286 #include <errno.h>
18287 #endif
18288 #ifndef NULL
18289 #define NULL (void*)0
18290 #endif
18291
18292 static void *task(p)
18293         void *p;
18294 {
18295         return (void *) (p == NULL);
18296 }
18297
18298 int
18299 main ()
18300 {
18301
18302         /* pthread test function */
18303 #ifndef PTHREAD_CREATE_DETACHED
18304 #define PTHREAD_CREATE_DETACHED 1
18305 #endif
18306         pthread_t t;
18307         int status;
18308         int detach = PTHREAD_CREATE_DETACHED;
18309
18310 #if HAVE_PTHREADS > 4
18311         /* Final pthreads */
18312         pthread_attr_t attr;
18313
18314         status = pthread_attr_init(&attr);
18315         if( status ) return status;
18316
18317 #if HAVE_PTHREADS < 7
18318         status = pthread_attr_setdetachstate(&attr, &detach);
18319         if( status < 0 ) status = errno;
18320 #else
18321         status = pthread_attr_setdetachstate(&attr, detach);
18322 #endif
18323         if( status ) return status;
18324         status = pthread_create( &t, &attr, task, NULL );
18325 #if HAVE_PTHREADS < 7
18326         if( status < 0 ) status = errno;
18327 #endif
18328         if( status ) return status;
18329 #else
18330         /* Draft 4 pthreads */
18331         status = pthread_create( &t, pthread_attr_default, task, NULL );
18332         if( status ) return errno;
18333
18334         /* give thread a chance to complete */
18335         /* it should remain joinable and hence detachable */
18336         sleep( 1 );
18337
18338         status = pthread_detach( &t );
18339         if( status ) return errno;
18340 #endif
18341
18342 #ifdef HAVE_LINUX_THREADS
18343         pthread_kill_other_threads_np();
18344 #endif
18345
18346         return 0;
18347
18348   ;
18349   return 0;
18350 }
18351 _ACEOF
18352 if ac_fn_c_try_link "$LINENO"; then :
18353   ol_cv_pthread_threads=yes
18354 else
18355   ol_cv_pthread_threads=no
18356 fi
18357 rm -f core conftest.err conftest.$ac_objext \
18358     conftest$ac_exeext conftest.$ac_ext
18359 else
18360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18361 /* end confdefs.h.  */
18362
18363 /* pthread test headers */
18364 #include <pthread.h>
18365 #if HAVE_PTHREADS < 7
18366 #include <errno.h>
18367 #endif
18368 #ifndef NULL
18369 #define NULL (void*)0
18370 #endif
18371
18372 static void *task(p)
18373         void *p;
18374 {
18375         return (void *) (p == NULL);
18376 }
18377
18378
18379 int main(argc, argv)
18380         int argc;
18381         char **argv;
18382 {
18383
18384         /* pthread test function */
18385 #ifndef PTHREAD_CREATE_DETACHED
18386 #define PTHREAD_CREATE_DETACHED 1
18387 #endif
18388         pthread_t t;
18389         int status;
18390         int detach = PTHREAD_CREATE_DETACHED;
18391
18392 #if HAVE_PTHREADS > 4
18393         /* Final pthreads */
18394         pthread_attr_t attr;
18395
18396         status = pthread_attr_init(&attr);
18397         if( status ) return status;
18398
18399 #if HAVE_PTHREADS < 7
18400         status = pthread_attr_setdetachstate(&attr, &detach);
18401         if( status < 0 ) status = errno;
18402 #else
18403         status = pthread_attr_setdetachstate(&attr, detach);
18404 #endif
18405         if( status ) return status;
18406         status = pthread_create( &t, &attr, task, NULL );
18407 #if HAVE_PTHREADS < 7
18408         if( status < 0 ) status = errno;
18409 #endif
18410         if( status ) return status;
18411 #else
18412         /* Draft 4 pthreads */
18413         status = pthread_create( &t, pthread_attr_default, task, NULL );
18414         if( status ) return errno;
18415
18416         /* give thread a chance to complete */
18417         /* it should remain joinable and hence detachable */
18418         sleep( 1 );
18419
18420         status = pthread_detach( &t );
18421         if( status ) return errno;
18422 #endif
18423
18424 #ifdef HAVE_LINUX_THREADS
18425         pthread_kill_other_threads_np();
18426 #endif
18427
18428         return 0;
18429
18430 }
18431
18432 _ACEOF
18433 if ac_fn_c_try_run "$LINENO"; then :
18434   ol_cv_pthread_threads=yes
18435 else
18436   ol_cv_pthread_threads=no
18437 fi
18438 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18439   conftest.$ac_objext conftest.beam conftest.$ac_ext
18440 fi
18441
18442
18443                 # restore the LIBS
18444                 LIBS="$ol_LIBS"
18445
18446 fi
18447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
18448 $as_echo "$ol_cv_pthread_threads" >&6; }
18449
18450         if test $ol_cv_pthread_threads = yes ; then
18451                 ol_link_pthreads="-threads"
18452                 ol_link_threads=posix
18453         fi
18454 fi
18455
18456
18457                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
18458 if test "$ol_link_threads" = no ; then
18459         # try -lpthreads -lmach -lexc -lc_r
18460         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
18461 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
18462 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then :
18463   $as_echo_n "(cached) " >&6
18464 else
18465
18466                 # save the flags
18467                 ol_LIBS="$LIBS"
18468                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
18469
18470                 if test "$cross_compiling" = yes; then :
18471   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18472 /* end confdefs.h.  */
18473
18474 /* pthread test headers */
18475 #include <pthread.h>
18476 #if HAVE_PTHREADS < 7
18477 #include <errno.h>
18478 #endif
18479 #ifndef NULL
18480 #define NULL (void*)0
18481 #endif
18482
18483 static void *task(p)
18484         void *p;
18485 {
18486         return (void *) (p == NULL);
18487 }
18488
18489 int
18490 main ()
18491 {
18492
18493         /* pthread test function */
18494 #ifndef PTHREAD_CREATE_DETACHED
18495 #define PTHREAD_CREATE_DETACHED 1
18496 #endif
18497         pthread_t t;
18498         int status;
18499         int detach = PTHREAD_CREATE_DETACHED;
18500
18501 #if HAVE_PTHREADS > 4
18502         /* Final pthreads */
18503         pthread_attr_t attr;
18504
18505         status = pthread_attr_init(&attr);
18506         if( status ) return status;
18507
18508 #if HAVE_PTHREADS < 7
18509         status = pthread_attr_setdetachstate(&attr, &detach);
18510         if( status < 0 ) status = errno;
18511 #else
18512         status = pthread_attr_setdetachstate(&attr, detach);
18513 #endif
18514         if( status ) return status;
18515         status = pthread_create( &t, &attr, task, NULL );
18516 #if HAVE_PTHREADS < 7
18517         if( status < 0 ) status = errno;
18518 #endif
18519         if( status ) return status;
18520 #else
18521         /* Draft 4 pthreads */
18522         status = pthread_create( &t, pthread_attr_default, task, NULL );
18523         if( status ) return errno;
18524
18525         /* give thread a chance to complete */
18526         /* it should remain joinable and hence detachable */
18527         sleep( 1 );
18528
18529         status = pthread_detach( &t );
18530         if( status ) return errno;
18531 #endif
18532
18533 #ifdef HAVE_LINUX_THREADS
18534         pthread_kill_other_threads_np();
18535 #endif
18536
18537         return 0;
18538
18539   ;
18540   return 0;
18541 }
18542 _ACEOF
18543 if ac_fn_c_try_link "$LINENO"; then :
18544   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18545 else
18546   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18547 fi
18548 rm -f core conftest.err conftest.$ac_objext \
18549     conftest$ac_exeext conftest.$ac_ext
18550 else
18551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18552 /* end confdefs.h.  */
18553
18554 /* pthread test headers */
18555 #include <pthread.h>
18556 #if HAVE_PTHREADS < 7
18557 #include <errno.h>
18558 #endif
18559 #ifndef NULL
18560 #define NULL (void*)0
18561 #endif
18562
18563 static void *task(p)
18564         void *p;
18565 {
18566         return (void *) (p == NULL);
18567 }
18568
18569
18570 int main(argc, argv)
18571         int argc;
18572         char **argv;
18573 {
18574
18575         /* pthread test function */
18576 #ifndef PTHREAD_CREATE_DETACHED
18577 #define PTHREAD_CREATE_DETACHED 1
18578 #endif
18579         pthread_t t;
18580         int status;
18581         int detach = PTHREAD_CREATE_DETACHED;
18582
18583 #if HAVE_PTHREADS > 4
18584         /* Final pthreads */
18585         pthread_attr_t attr;
18586
18587         status = pthread_attr_init(&attr);
18588         if( status ) return status;
18589
18590 #if HAVE_PTHREADS < 7
18591         status = pthread_attr_setdetachstate(&attr, &detach);
18592         if( status < 0 ) status = errno;
18593 #else
18594         status = pthread_attr_setdetachstate(&attr, detach);
18595 #endif
18596         if( status ) return status;
18597         status = pthread_create( &t, &attr, task, NULL );
18598 #if HAVE_PTHREADS < 7
18599         if( status < 0 ) status = errno;
18600 #endif
18601         if( status ) return status;
18602 #else
18603         /* Draft 4 pthreads */
18604         status = pthread_create( &t, pthread_attr_default, task, NULL );
18605         if( status ) return errno;
18606
18607         /* give thread a chance to complete */
18608         /* it should remain joinable and hence detachable */
18609         sleep( 1 );
18610
18611         status = pthread_detach( &t );
18612         if( status ) return errno;
18613 #endif
18614
18615 #ifdef HAVE_LINUX_THREADS
18616         pthread_kill_other_threads_np();
18617 #endif
18618
18619         return 0;
18620
18621 }
18622
18623 _ACEOF
18624 if ac_fn_c_try_run "$LINENO"; then :
18625   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18626 else
18627   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18628 fi
18629 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18630   conftest.$ac_objext conftest.beam conftest.$ac_ext
18631 fi
18632
18633
18634                 # restore the LIBS
18635                 LIBS="$ol_LIBS"
18636
18637 fi
18638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
18639 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
18640
18641         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
18642                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
18643                 ol_link_threads=posix
18644         fi
18645 fi
18646
18647                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
18648 if test "$ol_link_threads" = no ; then
18649         # try -lpthreads -lmach -lexc
18650         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
18651 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
18652 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then :
18653   $as_echo_n "(cached) " >&6
18654 else
18655
18656                 # save the flags
18657                 ol_LIBS="$LIBS"
18658                 LIBS="-lpthreads -lmach -lexc $LIBS"
18659
18660                 if test "$cross_compiling" = yes; then :
18661   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18662 /* end confdefs.h.  */
18663
18664 /* pthread test headers */
18665 #include <pthread.h>
18666 #if HAVE_PTHREADS < 7
18667 #include <errno.h>
18668 #endif
18669 #ifndef NULL
18670 #define NULL (void*)0
18671 #endif
18672
18673 static void *task(p)
18674         void *p;
18675 {
18676         return (void *) (p == NULL);
18677 }
18678
18679 int
18680 main ()
18681 {
18682
18683         /* pthread test function */
18684 #ifndef PTHREAD_CREATE_DETACHED
18685 #define PTHREAD_CREATE_DETACHED 1
18686 #endif
18687         pthread_t t;
18688         int status;
18689         int detach = PTHREAD_CREATE_DETACHED;
18690
18691 #if HAVE_PTHREADS > 4
18692         /* Final pthreads */
18693         pthread_attr_t attr;
18694
18695         status = pthread_attr_init(&attr);
18696         if( status ) return status;
18697
18698 #if HAVE_PTHREADS < 7
18699         status = pthread_attr_setdetachstate(&attr, &detach);
18700         if( status < 0 ) status = errno;
18701 #else
18702         status = pthread_attr_setdetachstate(&attr, detach);
18703 #endif
18704         if( status ) return status;
18705         status = pthread_create( &t, &attr, task, NULL );
18706 #if HAVE_PTHREADS < 7
18707         if( status < 0 ) status = errno;
18708 #endif
18709         if( status ) return status;
18710 #else
18711         /* Draft 4 pthreads */
18712         status = pthread_create( &t, pthread_attr_default, task, NULL );
18713         if( status ) return errno;
18714
18715         /* give thread a chance to complete */
18716         /* it should remain joinable and hence detachable */
18717         sleep( 1 );
18718
18719         status = pthread_detach( &t );
18720         if( status ) return errno;
18721 #endif
18722
18723 #ifdef HAVE_LINUX_THREADS
18724         pthread_kill_other_threads_np();
18725 #endif
18726
18727         return 0;
18728
18729   ;
18730   return 0;
18731 }
18732 _ACEOF
18733 if ac_fn_c_try_link "$LINENO"; then :
18734   ol_cv_pthread_lpthreads_lmach_lexc=yes
18735 else
18736   ol_cv_pthread_lpthreads_lmach_lexc=no
18737 fi
18738 rm -f core conftest.err conftest.$ac_objext \
18739     conftest$ac_exeext conftest.$ac_ext
18740 else
18741   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18742 /* end confdefs.h.  */
18743
18744 /* pthread test headers */
18745 #include <pthread.h>
18746 #if HAVE_PTHREADS < 7
18747 #include <errno.h>
18748 #endif
18749 #ifndef NULL
18750 #define NULL (void*)0
18751 #endif
18752
18753 static void *task(p)
18754         void *p;
18755 {
18756         return (void *) (p == NULL);
18757 }
18758
18759
18760 int main(argc, argv)
18761         int argc;
18762         char **argv;
18763 {
18764
18765         /* pthread test function */
18766 #ifndef PTHREAD_CREATE_DETACHED
18767 #define PTHREAD_CREATE_DETACHED 1
18768 #endif
18769         pthread_t t;
18770         int status;
18771         int detach = PTHREAD_CREATE_DETACHED;
18772
18773 #if HAVE_PTHREADS > 4
18774         /* Final pthreads */
18775         pthread_attr_t attr;
18776
18777         status = pthread_attr_init(&attr);
18778         if( status ) return status;
18779
18780 #if HAVE_PTHREADS < 7
18781         status = pthread_attr_setdetachstate(&attr, &detach);
18782         if( status < 0 ) status = errno;
18783 #else
18784         status = pthread_attr_setdetachstate(&attr, detach);
18785 #endif
18786         if( status ) return status;
18787         status = pthread_create( &t, &attr, task, NULL );
18788 #if HAVE_PTHREADS < 7
18789         if( status < 0 ) status = errno;
18790 #endif
18791         if( status ) return status;
18792 #else
18793         /* Draft 4 pthreads */
18794         status = pthread_create( &t, pthread_attr_default, task, NULL );
18795         if( status ) return errno;
18796
18797         /* give thread a chance to complete */
18798         /* it should remain joinable and hence detachable */
18799         sleep( 1 );
18800
18801         status = pthread_detach( &t );
18802         if( status ) return errno;
18803 #endif
18804
18805 #ifdef HAVE_LINUX_THREADS
18806         pthread_kill_other_threads_np();
18807 #endif
18808
18809         return 0;
18810
18811 }
18812
18813 _ACEOF
18814 if ac_fn_c_try_run "$LINENO"; then :
18815   ol_cv_pthread_lpthreads_lmach_lexc=yes
18816 else
18817   ol_cv_pthread_lpthreads_lmach_lexc=no
18818 fi
18819 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18820   conftest.$ac_objext conftest.beam conftest.$ac_ext
18821 fi
18822
18823
18824                 # restore the LIBS
18825                 LIBS="$ol_LIBS"
18826
18827 fi
18828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
18829 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
18830
18831         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
18832                 ol_link_pthreads="-lpthreads -lmach -lexc"
18833                 ol_link_threads=posix
18834         fi
18835 fi
18836
18837                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
18838 if test "$ol_link_threads" = no ; then
18839         # try -lpthreads -lexc
18840         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
18841 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
18842 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then :
18843   $as_echo_n "(cached) " >&6
18844 else
18845
18846                 # save the flags
18847                 ol_LIBS="$LIBS"
18848                 LIBS="-lpthreads -lexc $LIBS"
18849
18850                 if test "$cross_compiling" = yes; then :
18851   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18852 /* end confdefs.h.  */
18853
18854 /* pthread test headers */
18855 #include <pthread.h>
18856 #if HAVE_PTHREADS < 7
18857 #include <errno.h>
18858 #endif
18859 #ifndef NULL
18860 #define NULL (void*)0
18861 #endif
18862
18863 static void *task(p)
18864         void *p;
18865 {
18866         return (void *) (p == NULL);
18867 }
18868
18869 int
18870 main ()
18871 {
18872
18873         /* pthread test function */
18874 #ifndef PTHREAD_CREATE_DETACHED
18875 #define PTHREAD_CREATE_DETACHED 1
18876 #endif
18877         pthread_t t;
18878         int status;
18879         int detach = PTHREAD_CREATE_DETACHED;
18880
18881 #if HAVE_PTHREADS > 4
18882         /* Final pthreads */
18883         pthread_attr_t attr;
18884
18885         status = pthread_attr_init(&attr);
18886         if( status ) return status;
18887
18888 #if HAVE_PTHREADS < 7
18889         status = pthread_attr_setdetachstate(&attr, &detach);
18890         if( status < 0 ) status = errno;
18891 #else
18892         status = pthread_attr_setdetachstate(&attr, detach);
18893 #endif
18894         if( status ) return status;
18895         status = pthread_create( &t, &attr, task, NULL );
18896 #if HAVE_PTHREADS < 7
18897         if( status < 0 ) status = errno;
18898 #endif
18899         if( status ) return status;
18900 #else
18901         /* Draft 4 pthreads */
18902         status = pthread_create( &t, pthread_attr_default, task, NULL );
18903         if( status ) return errno;
18904
18905         /* give thread a chance to complete */
18906         /* it should remain joinable and hence detachable */
18907         sleep( 1 );
18908
18909         status = pthread_detach( &t );
18910         if( status ) return errno;
18911 #endif
18912
18913 #ifdef HAVE_LINUX_THREADS
18914         pthread_kill_other_threads_np();
18915 #endif
18916
18917         return 0;
18918
18919   ;
18920   return 0;
18921 }
18922 _ACEOF
18923 if ac_fn_c_try_link "$LINENO"; then :
18924   ol_cv_pthread_lpthreads_lexc=yes
18925 else
18926   ol_cv_pthread_lpthreads_lexc=no
18927 fi
18928 rm -f core conftest.err conftest.$ac_objext \
18929     conftest$ac_exeext conftest.$ac_ext
18930 else
18931   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18932 /* end confdefs.h.  */
18933
18934 /* pthread test headers */
18935 #include <pthread.h>
18936 #if HAVE_PTHREADS < 7
18937 #include <errno.h>
18938 #endif
18939 #ifndef NULL
18940 #define NULL (void*)0
18941 #endif
18942
18943 static void *task(p)
18944         void *p;
18945 {
18946         return (void *) (p == NULL);
18947 }
18948
18949
18950 int main(argc, argv)
18951         int argc;
18952         char **argv;
18953 {
18954
18955         /* pthread test function */
18956 #ifndef PTHREAD_CREATE_DETACHED
18957 #define PTHREAD_CREATE_DETACHED 1
18958 #endif
18959         pthread_t t;
18960         int status;
18961         int detach = PTHREAD_CREATE_DETACHED;
18962
18963 #if HAVE_PTHREADS > 4
18964         /* Final pthreads */
18965         pthread_attr_t attr;
18966
18967         status = pthread_attr_init(&attr);
18968         if( status ) return status;
18969
18970 #if HAVE_PTHREADS < 7
18971         status = pthread_attr_setdetachstate(&attr, &detach);
18972         if( status < 0 ) status = errno;
18973 #else
18974         status = pthread_attr_setdetachstate(&attr, detach);
18975 #endif
18976         if( status ) return status;
18977         status = pthread_create( &t, &attr, task, NULL );
18978 #if HAVE_PTHREADS < 7
18979         if( status < 0 ) status = errno;
18980 #endif
18981         if( status ) return status;
18982 #else
18983         /* Draft 4 pthreads */
18984         status = pthread_create( &t, pthread_attr_default, task, NULL );
18985         if( status ) return errno;
18986
18987         /* give thread a chance to complete */
18988         /* it should remain joinable and hence detachable */
18989         sleep( 1 );
18990
18991         status = pthread_detach( &t );
18992         if( status ) return errno;
18993 #endif
18994
18995 #ifdef HAVE_LINUX_THREADS
18996         pthread_kill_other_threads_np();
18997 #endif
18998
18999         return 0;
19000
19001 }
19002
19003 _ACEOF
19004 if ac_fn_c_try_run "$LINENO"; then :
19005   ol_cv_pthread_lpthreads_lexc=yes
19006 else
19007   ol_cv_pthread_lpthreads_lexc=no
19008 fi
19009 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19010   conftest.$ac_objext conftest.beam conftest.$ac_ext
19011 fi
19012
19013
19014                 # restore the LIBS
19015                 LIBS="$ol_LIBS"
19016
19017 fi
19018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
19019 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
19020
19021         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
19022                 ol_link_pthreads="-lpthreads -lexc"
19023                 ol_link_threads=posix
19024         fi
19025 fi
19026
19027
19028                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
19029 if test "$ol_link_threads" = no ; then
19030         # try -lpthreads
19031         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
19032 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
19033 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then :
19034   $as_echo_n "(cached) " >&6
19035 else
19036
19037                 # save the flags
19038                 ol_LIBS="$LIBS"
19039                 LIBS="-lpthreads $LIBS"
19040
19041                 if test "$cross_compiling" = yes; then :
19042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19043 /* end confdefs.h.  */
19044
19045 /* pthread test headers */
19046 #include <pthread.h>
19047 #if HAVE_PTHREADS < 7
19048 #include <errno.h>
19049 #endif
19050 #ifndef NULL
19051 #define NULL (void*)0
19052 #endif
19053
19054 static void *task(p)
19055         void *p;
19056 {
19057         return (void *) (p == NULL);
19058 }
19059
19060 int
19061 main ()
19062 {
19063
19064         /* pthread test function */
19065 #ifndef PTHREAD_CREATE_DETACHED
19066 #define PTHREAD_CREATE_DETACHED 1
19067 #endif
19068         pthread_t t;
19069         int status;
19070         int detach = PTHREAD_CREATE_DETACHED;
19071
19072 #if HAVE_PTHREADS > 4
19073         /* Final pthreads */
19074         pthread_attr_t attr;
19075
19076         status = pthread_attr_init(&attr);
19077         if( status ) return status;
19078
19079 #if HAVE_PTHREADS < 7
19080         status = pthread_attr_setdetachstate(&attr, &detach);
19081         if( status < 0 ) status = errno;
19082 #else
19083         status = pthread_attr_setdetachstate(&attr, detach);
19084 #endif
19085         if( status ) return status;
19086         status = pthread_create( &t, &attr, task, NULL );
19087 #if HAVE_PTHREADS < 7
19088         if( status < 0 ) status = errno;
19089 #endif
19090         if( status ) return status;
19091 #else
19092         /* Draft 4 pthreads */
19093         status = pthread_create( &t, pthread_attr_default, task, NULL );
19094         if( status ) return errno;
19095
19096         /* give thread a chance to complete */
19097         /* it should remain joinable and hence detachable */
19098         sleep( 1 );
19099
19100         status = pthread_detach( &t );
19101         if( status ) return errno;
19102 #endif
19103
19104 #ifdef HAVE_LINUX_THREADS
19105         pthread_kill_other_threads_np();
19106 #endif
19107
19108         return 0;
19109
19110   ;
19111   return 0;
19112 }
19113 _ACEOF
19114 if ac_fn_c_try_link "$LINENO"; then :
19115   ol_cv_pthread_lib_lpthreads=yes
19116 else
19117   ol_cv_pthread_lib_lpthreads=no
19118 fi
19119 rm -f core conftest.err conftest.$ac_objext \
19120     conftest$ac_exeext conftest.$ac_ext
19121 else
19122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19123 /* end confdefs.h.  */
19124
19125 /* pthread test headers */
19126 #include <pthread.h>
19127 #if HAVE_PTHREADS < 7
19128 #include <errno.h>
19129 #endif
19130 #ifndef NULL
19131 #define NULL (void*)0
19132 #endif
19133
19134 static void *task(p)
19135         void *p;
19136 {
19137         return (void *) (p == NULL);
19138 }
19139
19140
19141 int main(argc, argv)
19142         int argc;
19143         char **argv;
19144 {
19145
19146         /* pthread test function */
19147 #ifndef PTHREAD_CREATE_DETACHED
19148 #define PTHREAD_CREATE_DETACHED 1
19149 #endif
19150         pthread_t t;
19151         int status;
19152         int detach = PTHREAD_CREATE_DETACHED;
19153
19154 #if HAVE_PTHREADS > 4
19155         /* Final pthreads */
19156         pthread_attr_t attr;
19157
19158         status = pthread_attr_init(&attr);
19159         if( status ) return status;
19160
19161 #if HAVE_PTHREADS < 7
19162         status = pthread_attr_setdetachstate(&attr, &detach);
19163         if( status < 0 ) status = errno;
19164 #else
19165         status = pthread_attr_setdetachstate(&attr, detach);
19166 #endif
19167         if( status ) return status;
19168         status = pthread_create( &t, &attr, task, NULL );
19169 #if HAVE_PTHREADS < 7
19170         if( status < 0 ) status = errno;
19171 #endif
19172         if( status ) return status;
19173 #else
19174         /* Draft 4 pthreads */
19175         status = pthread_create( &t, pthread_attr_default, task, NULL );
19176         if( status ) return errno;
19177
19178         /* give thread a chance to complete */
19179         /* it should remain joinable and hence detachable */
19180         sleep( 1 );
19181
19182         status = pthread_detach( &t );
19183         if( status ) return errno;
19184 #endif
19185
19186 #ifdef HAVE_LINUX_THREADS
19187         pthread_kill_other_threads_np();
19188 #endif
19189
19190         return 0;
19191
19192 }
19193
19194 _ACEOF
19195 if ac_fn_c_try_run "$LINENO"; then :
19196   ol_cv_pthread_lib_lpthreads=yes
19197 else
19198   ol_cv_pthread_lib_lpthreads=no
19199 fi
19200 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19201   conftest.$ac_objext conftest.beam conftest.$ac_ext
19202 fi
19203
19204
19205                 # restore the LIBS
19206                 LIBS="$ol_LIBS"
19207
19208 fi
19209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
19210 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
19211
19212         if test $ol_cv_pthread_lib_lpthreads = yes ; then
19213                 ol_link_pthreads="-lpthreads"
19214                 ol_link_threads=posix
19215         fi
19216 fi
19217
19218
19219                 if test $ol_link_threads != no ; then
19220                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
19221
19222                                                 save_CPPFLAGS="$CPPFLAGS"
19223                         save_LIBS="$LIBS"
19224                         LIBS="$LTHREAD_LIBS $LIBS"
19225
19226                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
19227 do :
19228   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19229 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19230 eval as_val=\$$as_ac_var
19231    if test "x$as_val" = x""yes; then :
19232   cat >>confdefs.h <<_ACEOF
19233 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19234 _ACEOF
19235
19236 fi
19237 done
19238
19239
19240                         if test $ac_cv_func_sched_yield = no &&
19241                            test $ac_cv_func_pthread_yield = no &&
19242                            test $ac_cv_func_thr_yield = no ; then
19243                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
19244 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
19245 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
19246   $as_echo_n "(cached) " >&6
19247 else
19248   ac_check_lib_save_LIBS=$LIBS
19249 LIBS="-lrt  $LIBS"
19250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19251 /* end confdefs.h.  */
19252
19253 /* Override any GCC internal prototype to avoid an error.
19254    Use char because int might match the return type of a GCC
19255    builtin and then its argument prototype would still apply.  */
19256 #ifdef __cplusplus
19257 extern "C"
19258 #endif
19259 char sched_yield ();
19260 int
19261 main ()
19262 {
19263 return sched_yield ();
19264   ;
19265   return 0;
19266 }
19267 _ACEOF
19268 if ac_fn_c_try_link "$LINENO"; then :
19269   ac_cv_lib_rt_sched_yield=yes
19270 else
19271   ac_cv_lib_rt_sched_yield=no
19272 fi
19273 rm -f core conftest.err conftest.$ac_objext \
19274     conftest$ac_exeext conftest.$ac_ext
19275 LIBS=$ac_check_lib_save_LIBS
19276 fi
19277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19278 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
19279 if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
19280   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
19281
19282 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
19283
19284                                         ac_cv_func_sched_yield=yes
19285 else
19286   ac_cv_func_sched_yield=no
19287 fi
19288
19289                         fi
19290                         if test $ac_cv_func_sched_yield = no &&
19291                            test $ac_cv_func_pthread_yield = no &&
19292                            test "$ac_cv_func_thr_yield" = no ; then
19293                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
19294 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
19295                         fi
19296
19297                                                 for ac_func in pthread_kill
19298 do :
19299   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
19300 if test "x$ac_cv_func_pthread_kill" = x""yes; then :
19301   cat >>confdefs.h <<_ACEOF
19302 #define HAVE_PTHREAD_KILL 1
19303 _ACEOF
19304
19305 fi
19306 done
19307
19308
19309                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
19310 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
19311 if test "${ol_cv_func_pthread_rwlock_destroy+set}" = set; then :
19312   $as_echo_n "(cached) " >&6
19313 else
19314
19315                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19316 /* end confdefs.h.  */
19317
19318 #include <pthread.h>
19319 pthread_rwlock_t rwlock;
19320
19321 int
19322 main ()
19323 {
19324 pthread_rwlock_destroy(&rwlock);
19325   ;
19326   return 0;
19327 }
19328 _ACEOF
19329 if ac_fn_c_try_link "$LINENO"; then :
19330   ol_cv_func_pthread_rwlock_destroy=yes
19331 else
19332   ol_cv_func_pthread_rwlock_destroy=no
19333 fi
19334 rm -f core conftest.err conftest.$ac_objext \
19335     conftest$ac_exeext conftest.$ac_ext
19336
19337 fi
19338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
19339 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
19340                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
19341
19342 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
19343
19344                         fi
19345
19346                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
19347 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
19348 if test "${ol_cv_func_pthread_detach+set}" = set; then :
19349   $as_echo_n "(cached) " >&6
19350 else
19351
19352                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19353 /* end confdefs.h.  */
19354
19355 #include <pthread.h>
19356 #ifndef NULL
19357 #define NULL (void*)0
19358 #endif
19359
19360 int
19361 main ()
19362 {
19363 pthread_detach(NULL);
19364   ;
19365   return 0;
19366 }
19367 _ACEOF
19368 if ac_fn_c_try_link "$LINENO"; then :
19369   ol_cv_func_pthread_detach=yes
19370 else
19371   ol_cv_func_pthread_detach=no
19372 fi
19373 rm -f core conftest.err conftest.$ac_objext \
19374     conftest$ac_exeext conftest.$ac_ext
19375
19376 fi
19377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
19378 $as_echo "$ol_cv_func_pthread_detach" >&6; }
19379
19380                         if test $ol_cv_func_pthread_detach = no ; then
19381                                 as_fn_error "could not locate pthread_detach()" "$LINENO" 5
19382                         fi
19383
19384
19385 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
19386
19387
19388                                                 for ac_func in \
19389                                 pthread_setconcurrency \
19390                                 pthread_getconcurrency \
19391                                 thr_setconcurrency \
19392                                 thr_getconcurrency \
19393
19394 do :
19395   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19396 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19397 eval as_val=\$$as_ac_var
19398    if test "x$as_val" = x""yes; then :
19399   cat >>confdefs.h <<_ACEOF
19400 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19401 _ACEOF
19402
19403 fi
19404 done
19405
19406
19407
19408         for ac_func in pthread_kill_other_threads_np
19409 do :
19410   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
19411 if test "x$ac_cv_func_pthread_kill_other_threads_np" = x""yes; then :
19412   cat >>confdefs.h <<_ACEOF
19413 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
19414 _ACEOF
19415
19416 fi
19417 done
19418
19419         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
19420 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
19421 if test "${ol_cv_sys_linux_threads+set}" = set; then :
19422   $as_echo_n "(cached) " >&6
19423 else
19424   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
19425 fi
19426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
19427 $as_echo "$ol_cv_sys_linux_threads" >&6; }
19428
19429
19430
19431
19432         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
19433 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
19434 if test "${ol_cv_linux_threads+set}" = set; then :
19435   $as_echo_n "(cached) " >&6
19436 else
19437
19438                 if test $ol_cv_header_linux_threads = yes &&
19439                    test $ol_cv_sys_linux_threads = yes; then
19440                         ol_cv_linux_threads=yes
19441                 elif test $ol_cv_header_linux_threads = no &&
19442                      test $ol_cv_sys_linux_threads = no; then
19443                         ol_cv_linux_threads=no
19444                 else
19445                         ol_cv_linux_threads=error
19446                 fi
19447
19448 fi
19449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
19450 $as_echo "$ol_cv_linux_threads" >&6; }
19451
19452
19453                         if test $ol_cv_linux_threads = error; then
19454                                 as_fn_error "LinuxThreads header/library mismatch" "$LINENO" 5;
19455                         fi
19456
19457                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
19458 $as_echo_n "checking if pthread_create() works... " >&6; }
19459 if test "${ol_cv_pthread_create_works+set}" = set; then :
19460   $as_echo_n "(cached) " >&6
19461 else
19462
19463                         if test "$cross_compiling" = yes; then :
19464                                 ol_cv_pthread_create_works=yes
19465 else
19466   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19467 /* end confdefs.h.  */
19468
19469 /* pthread test headers */
19470 #include <pthread.h>
19471 #if HAVE_PTHREADS < 7
19472 #include <errno.h>
19473 #endif
19474 #ifndef NULL
19475 #define NULL (void*)0
19476 #endif
19477
19478 static void *task(p)
19479         void *p;
19480 {
19481         return (void *) (p == NULL);
19482 }
19483
19484
19485 int main(argc, argv)
19486         int argc;
19487         char **argv;
19488 {
19489
19490         /* pthread test function */
19491 #ifndef PTHREAD_CREATE_DETACHED
19492 #define PTHREAD_CREATE_DETACHED 1
19493 #endif
19494         pthread_t t;
19495         int status;
19496         int detach = PTHREAD_CREATE_DETACHED;
19497
19498 #if HAVE_PTHREADS > 4
19499         /* Final pthreads */
19500         pthread_attr_t attr;
19501
19502         status = pthread_attr_init(&attr);
19503         if( status ) return status;
19504
19505 #if HAVE_PTHREADS < 7
19506         status = pthread_attr_setdetachstate(&attr, &detach);
19507         if( status < 0 ) status = errno;
19508 #else
19509         status = pthread_attr_setdetachstate(&attr, detach);
19510 #endif
19511         if( status ) return status;
19512         status = pthread_create( &t, &attr, task, NULL );
19513 #if HAVE_PTHREADS < 7
19514         if( status < 0 ) status = errno;
19515 #endif
19516         if( status ) return status;
19517 #else
19518         /* Draft 4 pthreads */
19519         status = pthread_create( &t, pthread_attr_default, task, NULL );
19520         if( status ) return errno;
19521
19522         /* give thread a chance to complete */
19523         /* it should remain joinable and hence detachable */
19524         sleep( 1 );
19525
19526         status = pthread_detach( &t );
19527         if( status ) return errno;
19528 #endif
19529
19530 #ifdef HAVE_LINUX_THREADS
19531         pthread_kill_other_threads_np();
19532 #endif
19533
19534         return 0;
19535
19536 }
19537
19538 _ACEOF
19539 if ac_fn_c_try_run "$LINENO"; then :
19540   ol_cv_pthread_create_works=yes
19541 else
19542   ol_cv_pthread_create_works=no
19543 fi
19544 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19545   conftest.$ac_objext conftest.beam conftest.$ac_ext
19546 fi
19547
19548 fi
19549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
19550 $as_echo "$ol_cv_pthread_create_works" >&6; }
19551
19552                         if test $ol_cv_pthread_create_works = no ; then
19553                                 as_fn_error "pthread_create is not usable, check environment settings" "$LINENO" 5
19554                         fi
19555
19556                         ol_replace_broken_yield=no
19557
19558                         if test $ol_replace_broken_yield = yes ; then
19559
19560 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
19561
19562                         fi
19563
19564                                                 if test $ol_with_yielding_select = auto ; then
19565                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
19566 $as_echo_n "checking if select yields when using pthreads... " >&6; }
19567 if test "${ol_cv_pthread_select_yields+set}" = set; then :
19568   $as_echo_n "(cached) " >&6
19569 else
19570
19571                                 if test "$cross_compiling" = yes; then :
19572   ol_cv_pthread_select_yields=cross
19573 else
19574   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19575 /* end confdefs.h.  */
19576
19577 #include <sys/types.h>
19578 #include <sys/time.h>
19579 #include <unistd.h>
19580 #include <pthread.h>
19581 #ifndef NULL
19582 #define NULL (void*) 0
19583 #endif
19584
19585 static int fildes[2];
19586
19587 static void *task(p)
19588         void *p;
19589 {
19590         int i;
19591         struct timeval tv;
19592
19593         fd_set rfds;
19594
19595         tv.tv_sec=10;
19596         tv.tv_usec=0;
19597
19598         FD_ZERO(&rfds);
19599         FD_SET(fildes[0], &rfds);
19600
19601         /* we're not interested in any fds */
19602         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
19603
19604         if(i < 0) {
19605                 perror("select");
19606                 exit(10);
19607         }
19608
19609         exit(0); /* if we exit here, the select blocked the whole process */
19610 }
19611
19612 int main(argc, argv)
19613         int argc;
19614         char **argv;
19615 {
19616         pthread_t t;
19617
19618         /* create a pipe to select */
19619         if(pipe(&fildes[0])) {
19620                 perror("select");
19621                 exit(1);
19622         }
19623
19624 #ifdef HAVE_PTHREAD_SETCONCURRENCY
19625         (void) pthread_setconcurrency(2);
19626 #else
19627 #ifdef HAVE_THR_SETCONCURRENCY
19628         /* Set Solaris LWP concurrency to 2 */
19629         thr_setconcurrency(2);
19630 #endif
19631 #endif
19632
19633 #if HAVE_PTHREADS < 6
19634         pthread_create(&t, pthread_attr_default, task, NULL);
19635 #else
19636         pthread_create(&t, NULL, task, NULL);
19637 #endif
19638
19639         /* make sure task runs first */
19640 #ifdef HAVE_THR_YIELD
19641         thr_yield();
19642 #elif defined( HAVE_SCHED_YIELD )
19643         sched_yield();
19644 #elif defined( HAVE_PTHREAD_YIELD )
19645         pthread_yield();
19646 #endif
19647
19648         exit(2);
19649 }
19650 _ACEOF
19651 if ac_fn_c_try_run "$LINENO"; then :
19652   ol_cv_pthread_select_yields=no
19653 else
19654   ol_cv_pthread_select_yields=yes
19655 fi
19656 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19657   conftest.$ac_objext conftest.beam conftest.$ac_ext
19658 fi
19659
19660 fi
19661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
19662 $as_echo "$ol_cv_pthread_select_yields" >&6; }
19663
19664                                 if test $ol_cv_pthread_select_yields = cross ; then
19665                                         as_fn_error "crossing compiling: use --with-yielding_select=yes|no|manual" "$LINENO" 5
19666                                 fi
19667
19668                                 if test $ol_cv_pthread_select_yields = yes ; then
19669                                         ol_with_yielding_select=yes
19670                                 fi
19671                         fi
19672
19673                                                 CPPFLAGS="$save_CPPFLAGS"
19674                         LIBS="$save_LIBS"
19675                 else
19676                         as_fn_error "could not locate usable POSIX Threads" "$LINENO" 5
19677                 fi
19678         fi
19679
19680         if test $ol_with_threads = posix ; then
19681                 as_fn_error "could not locate POSIX Threads" "$LINENO" 5
19682         fi
19683         ;;
19684 esac
19685
19686 case $ol_with_threads in auto | yes | mach)
19687
19688                 for ac_header in mach/cthreads.h cthreads.h
19689 do :
19690   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19691 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19692 eval as_val=\$$as_ac_Header
19693    if test "x$as_val" = x""yes; then :
19694   cat >>confdefs.h <<_ACEOF
19695 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19696 _ACEOF
19697
19698 fi
19699
19700 done
19701
19702         if test $ac_cv_header_mach_cthreads_h = yes ; then
19703                 ol_with_threads=found
19704
19705                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19706 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19707   ol_link_threads=yes
19708 fi
19709
19710
19711                 if test $ol_link_threads = no ; then
19712                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
19713 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
19714 if test "${ol_cv_cthread_all_load+set}" = set; then :
19715   $as_echo_n "(cached) " >&6
19716 else
19717
19718                                                                 save_LIBS="$LIBS"
19719                                 LIBS="-all_load $LIBS"
19720                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19721 /* end confdefs.h.  */
19722 #include <mach/cthreads.h>
19723 int
19724 main ()
19725 {
19726
19727                                         cthread_fork((void *)0, (void *)0);
19728
19729   ;
19730   return 0;
19731 }
19732 _ACEOF
19733 if ac_fn_c_try_link "$LINENO"; then :
19734   ol_cv_cthread_all_load=yes
19735 else
19736   ol_cv_cthread_all_load=no
19737 fi
19738 rm -f core conftest.err conftest.$ac_objext \
19739     conftest$ac_exeext conftest.$ac_ext
19740                                                                 LIBS="$save_LIBS"
19741
19742 fi
19743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
19744 $as_echo "$ol_cv_cthread_all_load" >&6; }
19745
19746                         if test $ol_cv_cthread_all_load = yes ; then
19747                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
19748                                 ol_link_threads=mach
19749                                 ol_with_threads=found
19750                         fi
19751                 fi
19752
19753         elif test $ac_cv_header_cthreads_h = yes ; then
19754
19755                 ol_with_threads=found
19756
19757                                 save_LIBS="$LIBS"
19758                 LIBS="$LIBS -lthreads"
19759                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19760 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19761   ol_link_threads=yes
19762 fi
19763
19764                 LIBS="$save_LIBS"
19765
19766                 if test $ol_link_threads = yes ; then
19767                         LTHREAD_LIBS="-lthreads"
19768                         ol_link_threads=mach
19769                         ol_with_threads=found
19770                 else
19771                         as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19772                 fi
19773
19774         elif test $ol_with_threads = mach ; then
19775                 as_fn_error "could not locate Mach CThreads" "$LINENO" 5
19776         fi
19777
19778         if test $ol_link_threads = mach ; then
19779
19780 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
19781
19782         elif test $ol_with_threads = found ; then
19783                 as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19784         fi
19785         ;;
19786 esac
19787
19788 case $ol_with_threads in auto | yes | pth)
19789
19790         for ac_header in pth.h
19791 do :
19792   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
19793 if test "x$ac_cv_header_pth_h" = x""yes; then :
19794   cat >>confdefs.h <<_ACEOF
19795 #define HAVE_PTH_H 1
19796 _ACEOF
19797
19798 fi
19799
19800 done
19801
19802
19803         if test $ac_cv_header_pth_h = yes ; then
19804                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
19805 $as_echo_n "checking for pth_version in -lpth... " >&6; }
19806 if test "${ac_cv_lib_pth_pth_version+set}" = set; then :
19807   $as_echo_n "(cached) " >&6
19808 else
19809   ac_check_lib_save_LIBS=$LIBS
19810 LIBS="-lpth  $LIBS"
19811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19812 /* end confdefs.h.  */
19813
19814 /* Override any GCC internal prototype to avoid an error.
19815    Use char because int might match the return type of a GCC
19816    builtin and then its argument prototype would still apply.  */
19817 #ifdef __cplusplus
19818 extern "C"
19819 #endif
19820 char pth_version ();
19821 int
19822 main ()
19823 {
19824 return pth_version ();
19825   ;
19826   return 0;
19827 }
19828 _ACEOF
19829 if ac_fn_c_try_link "$LINENO"; then :
19830   ac_cv_lib_pth_pth_version=yes
19831 else
19832   ac_cv_lib_pth_pth_version=no
19833 fi
19834 rm -f core conftest.err conftest.$ac_objext \
19835     conftest$ac_exeext conftest.$ac_ext
19836 LIBS=$ac_check_lib_save_LIBS
19837 fi
19838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
19839 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
19840 if test "x$ac_cv_lib_pth_pth_version" = x""yes; then :
19841   have_pth=yes
19842 else
19843   have_pth=no
19844 fi
19845
19846
19847                 if test $have_pth = yes ; then
19848
19849 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
19850
19851                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
19852                         ol_link_threads=pth
19853                         ol_with_threads=found
19854
19855                         if test $ol_with_yielding_select = auto ; then
19856                                 ol_with_yielding_select=yes
19857                         fi
19858                 fi
19859         fi
19860         ;;
19861 esac
19862
19863 case $ol_with_threads in auto | yes | lwp)
19864
19865                 for ac_header in thread.h synch.h
19866 do :
19867   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19868 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19869 eval as_val=\$$as_ac_Header
19870    if test "x$as_val" = x""yes; then :
19871   cat >>confdefs.h <<_ACEOF
19872 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19873 _ACEOF
19874
19875 fi
19876
19877 done
19878
19879         if test $ac_cv_header_thread_h = yes &&
19880            test $ac_cv_header_synch_h = yes ; then
19881                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
19882 $as_echo_n "checking for thr_create in -lthread... " >&6; }
19883 if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
19884   $as_echo_n "(cached) " >&6
19885 else
19886   ac_check_lib_save_LIBS=$LIBS
19887 LIBS="-lthread  $LIBS"
19888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19889 /* end confdefs.h.  */
19890
19891 /* Override any GCC internal prototype to avoid an error.
19892    Use char because int might match the return type of a GCC
19893    builtin and then its argument prototype would still apply.  */
19894 #ifdef __cplusplus
19895 extern "C"
19896 #endif
19897 char thr_create ();
19898 int
19899 main ()
19900 {
19901 return thr_create ();
19902   ;
19903   return 0;
19904 }
19905 _ACEOF
19906 if ac_fn_c_try_link "$LINENO"; then :
19907   ac_cv_lib_thread_thr_create=yes
19908 else
19909   ac_cv_lib_thread_thr_create=no
19910 fi
19911 rm -f core conftest.err conftest.$ac_objext \
19912     conftest$ac_exeext conftest.$ac_ext
19913 LIBS=$ac_check_lib_save_LIBS
19914 fi
19915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
19916 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
19917 if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
19918   have_thr=yes
19919 else
19920   have_thr=no
19921 fi
19922
19923
19924                 if test $have_thr = yes ; then
19925
19926 $as_echo "#define HAVE_THR 1" >>confdefs.h
19927
19928                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
19929                         ol_link_threads=thr
19930
19931                         if test $ol_with_yielding_select = auto ; then
19932                                 ol_with_yielding_select=yes
19933                         fi
19934
19935                                                 for ac_func in \
19936                                 thr_setconcurrency \
19937                                 thr_getconcurrency \
19938
19939 do :
19940   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19941 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19942 eval as_val=\$$as_ac_var
19943    if test "x$as_val" = x""yes; then :
19944   cat >>confdefs.h <<_ACEOF
19945 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19946 _ACEOF
19947
19948 fi
19949 done
19950
19951                 fi
19952         fi
19953         ;;
19954 esac
19955
19956 if test $ol_with_yielding_select = yes ; then
19957
19958 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
19959
19960 fi
19961
19962 if test $ol_with_threads = manual ; then
19963                 ol_link_threads=yes
19964
19965         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
19966 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
19967
19968         for ac_header in pthread.h sched.h
19969 do :
19970   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19971 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19972 eval as_val=\$$as_ac_Header
19973    if test "x$as_val" = x""yes; then :
19974   cat >>confdefs.h <<_ACEOF
19975 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19976 _ACEOF
19977
19978 fi
19979
19980 done
19981
19982         for ac_func in sched_yield pthread_yield
19983 do :
19984   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19985 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19986 eval as_val=\$$as_ac_var
19987    if test "x$as_val" = x""yes; then :
19988   cat >>confdefs.h <<_ACEOF
19989 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19990 _ACEOF
19991
19992 fi
19993 done
19994
19995
19996         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
19997 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
19998 if test "${ol_cv_header_linux_threads+set}" = set; then :
19999   $as_echo_n "(cached) " >&6
20000 else
20001   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20002 /* end confdefs.h.  */
20003 #include <pthread.h>
20004 _ACEOF
20005 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20006   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
20007   ol_cv_header_linux_threads=yes
20008 else
20009   ol_cv_header_linux_threads=no
20010 fi
20011 rm -f conftest*
20012
20013
20014 fi
20015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
20016 $as_echo "$ol_cv_header_linux_threads" >&6; }
20017         if test $ol_cv_header_linux_threads = yes; then
20018
20019 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
20020
20021         fi
20022
20023
20024         for ac_header in mach/cthreads.h
20025 do :
20026   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
20027 if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
20028   cat >>confdefs.h <<_ACEOF
20029 #define HAVE_MACH_CTHREADS_H 1
20030 _ACEOF
20031
20032 fi
20033
20034 done
20035
20036         for ac_header in thread.h synch.h
20037 do :
20038   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20039 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20040 eval as_val=\$$as_ac_Header
20041    if test "x$as_val" = x""yes; then :
20042   cat >>confdefs.h <<_ACEOF
20043 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20044 _ACEOF
20045
20046 fi
20047
20048 done
20049
20050 fi
20051
20052 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
20053                         $as_echo "#define REENTRANT 1" >>confdefs.h
20054
20055         $as_echo "#define _REENTRANT 1" >>confdefs.h
20056
20057         $as_echo "#define THREAD_SAFE 1" >>confdefs.h
20058
20059         $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
20060
20061         $as_echo "#define THREADSAFE 1" >>confdefs.h
20062
20063         $as_echo "#define _THREADSAFE 1" >>confdefs.h
20064
20065         $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
20066
20067
20068                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
20069 $as_echo_n "checking for thread specific errno... " >&6; }
20070 if test "${ol_cv_errno_thread_specific+set}" = set; then :
20071   $as_echo_n "(cached) " >&6
20072 else
20073
20074                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20075 /* end confdefs.h.  */
20076 #include <errno.h>
20077 int
20078 main ()
20079 {
20080 errno = 0;
20081   ;
20082   return 0;
20083 }
20084 _ACEOF
20085 if ac_fn_c_try_link "$LINENO"; then :
20086   ol_cv_errno_thread_specific=yes
20087 else
20088   ol_cv_errno_thread_specific=no
20089 fi
20090 rm -f core conftest.err conftest.$ac_objext \
20091     conftest$ac_exeext conftest.$ac_ext
20092
20093 fi
20094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
20095 $as_echo "$ol_cv_errno_thread_specific" >&6; }
20096
20097                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
20098 $as_echo_n "checking for thread specific h_errno... " >&6; }
20099 if test "${ol_cv_h_errno_thread_specific+set}" = set; then :
20100   $as_echo_n "(cached) " >&6
20101 else
20102
20103                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20104 /* end confdefs.h.  */
20105 #include <netdb.h>
20106 int
20107 main ()
20108 {
20109 h_errno = 0;
20110   ;
20111   return 0;
20112 }
20113 _ACEOF
20114 if ac_fn_c_try_link "$LINENO"; then :
20115   ol_cv_h_errno_thread_specific=yes
20116 else
20117   ol_cv_h_errno_thread_specific=no
20118 fi
20119 rm -f core conftest.err conftest.$ac_objext \
20120     conftest$ac_exeext conftest.$ac_ext
20121
20122 fi
20123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
20124 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
20125
20126         if test $ol_cv_errno_thread_specific != yes ||
20127            test $ol_cv_h_errno_thread_specific != yes ; then
20128                 LIBS="$LTHREAD_LIBS $LIBS"
20129                 LTHREAD_LIBS=""
20130         fi
20131
20132 fi
20133
20134 if test $ol_link_threads = no ; then
20135         if test $ol_with_threads = yes ; then
20136                 as_fn_error "no suitable thread support" "$LINENO" 5
20137         fi
20138
20139         if test $ol_with_threads = auto ; then
20140                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
20141 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
20142                 ol_with_threads=no
20143         fi
20144
20145
20146 $as_echo "#define NO_THREADS 1" >>confdefs.h
20147
20148         LTHREAD_LIBS=""
20149         BUILD_THREAD=no
20150 else
20151         BUILD_THREAD=yes
20152 fi
20153
20154 if test $ol_link_threads != no ; then
20155
20156 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
20157
20158 fi
20159
20160 for ac_func in \
20161         ctime_r                 \
20162         gmtime_r localtime_r \
20163         gethostbyname_r gethostbyaddr_r \
20164
20165 do :
20166   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20167 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20168 eval as_val=\$$as_ac_var
20169    if test "x$as_val" = x""yes; then :
20170   cat >>confdefs.h <<_ACEOF
20171 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20172 _ACEOF
20173
20174 fi
20175 done
20176
20177
20178 if test "$ac_cv_func_ctime_r" = no ; then
20179         ol_cv_func_ctime_r_nargs=0
20180 else
20181         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of ctime_r" >&5
20182 $as_echo_n "checking number of arguments of ctime_r... " >&6; }
20183 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then :
20184   $as_echo_n "(cached) " >&6
20185 else
20186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20187 /* end confdefs.h.  */
20188 #include <time.h>
20189 int
20190 main ()
20191 {
20192 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
20193   ;
20194   return 0;
20195 }
20196 _ACEOF
20197 if ac_fn_c_try_compile "$LINENO"; then :
20198   ol_cv_func_ctime_r_nargs3=yes
20199 else
20200   ol_cv_func_ctime_r_nargs3=no
20201 fi
20202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20203
20204         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20205 /* end confdefs.h.  */
20206 #include <time.h>
20207 int
20208 main ()
20209 {
20210 time_t ti; char *buffer; ctime_r(&ti,buffer);
20211   ;
20212   return 0;
20213 }
20214 _ACEOF
20215 if ac_fn_c_try_compile "$LINENO"; then :
20216   ol_cv_func_ctime_r_nargs2=yes
20217 else
20218   ol_cv_func_ctime_r_nargs2=no
20219 fi
20220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20221
20222         if test $ol_cv_func_ctime_r_nargs3 = yes &&
20223            test $ol_cv_func_ctime_r_nargs2 = no ; then
20224
20225                 ol_cv_func_ctime_r_nargs=3
20226
20227         elif test $ol_cv_func_ctime_r_nargs3 = no &&
20228              test $ol_cv_func_ctime_r_nargs2 = yes ; then
20229
20230                 ol_cv_func_ctime_r_nargs=2
20231
20232         else
20233                 ol_cv_func_ctime_r_nargs=0
20234         fi
20235
20236 fi
20237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_ctime_r_nargs" >&5
20238 $as_echo "$ol_cv_func_ctime_r_nargs" >&6; }
20239
20240   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
20241
20242 cat >>confdefs.h <<_ACEOF
20243 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
20244 _ACEOF
20245
20246   fi
20247
20248 fi
20249
20250 if test "$ac_cv_func_gethostbyname_r" = yes ; then
20251         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyname_r" >&5
20252 $as_echo_n "checking number of arguments of gethostbyname_r... " >&6; }
20253 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then :
20254   $as_echo_n "(cached) " >&6
20255 else
20256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20257 /* end confdefs.h.  */
20258 #include <sys/types.h>
20259 #include <sys/socket.h>
20260 #include <netinet/in.h>
20261 #include <netdb.h>
20262 #define BUFSIZE (sizeof(struct hostent)+10)
20263 int
20264 main ()
20265 {
20266 struct hostent hent; char buffer[BUFSIZE];
20267                 int bufsize=BUFSIZE;int h_errno;
20268                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
20269                         buffer, bufsize, &h_errno);
20270   ;
20271   return 0;
20272 }
20273 _ACEOF
20274 if ac_fn_c_try_compile "$LINENO"; then :
20275   ol_cv_func_gethostbyname_r_nargs5=yes
20276 else
20277   ol_cv_func_gethostbyname_r_nargs5=no
20278 fi
20279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20280
20281         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20282 /* end confdefs.h.  */
20283 #include <sys/types.h>
20284 #include <sys/socket.h>
20285 #include <netinet/in.h>
20286 #include <netdb.h>
20287 #define BUFSIZE (sizeof(struct hostent)+10)
20288 int
20289 main ()
20290 {
20291 struct hostent hent;struct hostent *rhent;
20292                 char buffer[BUFSIZE];
20293                 int bufsize=BUFSIZE;int h_errno;
20294                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
20295                         &rhent, &h_errno);
20296   ;
20297   return 0;
20298 }
20299 _ACEOF
20300 if ac_fn_c_try_compile "$LINENO"; then :
20301   ol_cv_func_gethostbyname_r_nargs6=yes
20302 else
20303   ol_cv_func_gethostbyname_r_nargs6=no
20304 fi
20305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20306
20307         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
20308            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
20309
20310                 ol_cv_func_gethostbyname_r_nargs=5
20311
20312         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
20313              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
20314
20315                 ol_cv_func_gethostbyname_r_nargs=6
20316
20317         else
20318                 ol_cv_func_gethostbyname_r_nargs=0
20319         fi
20320
20321 fi
20322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyname_r_nargs" >&5
20323 $as_echo "$ol_cv_func_gethostbyname_r_nargs" >&6; }
20324   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
20325
20326 cat >>confdefs.h <<_ACEOF
20327 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
20328 _ACEOF
20329
20330   fi
20331
20332 else
20333         ol_cv_func_gethostbyname_r_nargs=0
20334 fi
20335
20336 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
20337         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyaddr_r" >&5
20338 $as_echo_n "checking number of arguments of gethostbyaddr_r... " >&6; }
20339 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then :
20340   $as_echo_n "(cached) " >&6
20341 else
20342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20343 /* end confdefs.h.  */
20344 #include <sys/types.h>
20345 #include <sys/socket.h>
20346 #include <netinet/in.h>
20347 #include <netdb.h>
20348 #define BUFSIZE (sizeof(struct hostent)+10)
20349 int
20350 main ()
20351 {
20352 struct hostent hent; char buffer[BUFSIZE];
20353             struct in_addr add;
20354             size_t alen=sizeof(struct in_addr);
20355             int bufsize=BUFSIZE;int h_errno;
20356                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20357                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
20358   ;
20359   return 0;
20360 }
20361 _ACEOF
20362 if ac_fn_c_try_compile "$LINENO"; then :
20363   ol_cv_func_gethostbyaddr_r_nargs7=yes
20364 else
20365   ol_cv_func_gethostbyaddr_r_nargs7=no
20366 fi
20367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20368
20369         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20370 /* end confdefs.h.  */
20371 #include <sys/types.h>
20372 #include <sys/socket.h>
20373 #include <netinet/in.h>
20374 #include <netdb.h>
20375 #define BUFSIZE (sizeof(struct hostent)+10)
20376 int
20377 main ()
20378 {
20379 struct hostent hent;
20380                 struct hostent *rhent; char buffer[BUFSIZE];
20381                 struct in_addr add;
20382                 size_t alen=sizeof(struct in_addr);
20383                 int bufsize=BUFSIZE;int h_errno;
20384                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20385                         alen, AF_INET, &hent, buffer, bufsize,
20386                         &rhent, &h_errno);
20387   ;
20388   return 0;
20389 }
20390 _ACEOF
20391 if ac_fn_c_try_compile "$LINENO"; then :
20392   ol_cv_func_gethostbyaddr_r_nargs8=yes
20393 else
20394   ol_cv_func_gethostbyaddr_r_nargs8=no
20395 fi
20396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20397
20398         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
20399            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
20400
20401                 ol_cv_func_gethostbyaddr_r_nargs=7
20402
20403         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
20404              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
20405
20406                 ol_cv_func_gethostbyaddr_r_nargs=8
20407
20408         else
20409                 ol_cv_func_gethostbyaddr_r_nargs=0
20410         fi
20411
20412 fi
20413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
20414 $as_echo "$ol_cv_func_gethostbyaddr_r_nargs" >&6; }
20415   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
20416
20417 cat >>confdefs.h <<_ACEOF
20418 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
20419 _ACEOF
20420
20421   fi
20422
20423 else
20424         ol_cv_func_gethostbyaddr_r_nargs=0
20425 fi
20426
20427 ol_link_bdb=no
20428
20429 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
20430         ol_cv_berkeley_db=no
20431 for ac_header in db.h
20432 do :
20433   ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default"
20434 if test "x$ac_cv_header_db_h" = x""yes; then :
20435   cat >>confdefs.h <<_ACEOF
20436 #define HAVE_DB_H 1
20437 _ACEOF
20438
20439 fi
20440
20441 done
20442
20443 if test $ac_cv_header_db_h = yes; then
20444         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB major version in db.h" >&5
20445 $as_echo_n "checking for Berkeley DB major version in db.h... " >&6; }
20446 if test "${ol_cv_bdb_major+set}" = set; then :
20447   $as_echo_n "(cached) " >&6
20448 else
20449
20450         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20451 /* end confdefs.h.  */
20452
20453 #include <db.h>
20454 #ifndef DB_VERSION_MAJOR
20455 #       define DB_VERSION_MAJOR 1
20456 #endif
20457 __db_version DB_VERSION_MAJOR
20458
20459 _ACEOF
20460         set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
20461         ol_cv_bdb_major=${3}
20462
20463 fi
20464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_major" >&5
20465 $as_echo "$ol_cv_bdb_major" >&6; }
20466 case $ol_cv_bdb_major in [1-9]*) : ;; *)
20467         as_fn_error "Unknown Berkeley DB major version in db.h" "$LINENO" 5 ;;
20468 esac
20469
20470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB minor version in db.h" >&5
20471 $as_echo_n "checking for Berkeley DB minor version in db.h... " >&6; }
20472 if test "${ol_cv_bdb_minor+set}" = set; then :
20473   $as_echo_n "(cached) " >&6
20474 else
20475
20476         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20477 /* end confdefs.h.  */
20478
20479 #include <db.h>
20480 #ifndef DB_VERSION_MINOR
20481 #       define DB_VERSION_MINOR 0
20482 #endif
20483 __db_version DB_VERSION_MINOR
20484
20485 _ACEOF
20486         set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
20487         ol_cv_bdb_minor=${3}
20488
20489 fi
20490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_minor" >&5
20491 $as_echo "$ol_cv_bdb_minor" >&6; }
20492 case $ol_cv_bdb_minor in [0-9]*) : ;; *)
20493         as_fn_error "Unknown Berkeley DB minor version in db.h" "$LINENO" 5 ;;
20494 esac
20495
20496         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Berkeley DB version supported by BDB/HDB backends" >&5
20497 $as_echo_n "checking if Berkeley DB version supported by BDB/HDB backends... " >&6; }
20498 if test "${ol_cv_bdb_compat+set}" = set; then :
20499   $as_echo_n "(cached) " >&6
20500 else
20501
20502         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20503 /* end confdefs.h.  */
20504
20505 #include <db.h>
20506
20507  /* this check could be improved */
20508 #ifndef DB_VERSION_MAJOR
20509 #       define DB_VERSION_MAJOR 1
20510 #endif
20511 #ifndef DB_VERSION_MINOR
20512 #       define DB_VERSION_MINOR 0
20513 #endif
20514 #ifndef DB_VERSION_PATCH
20515 #       define DB_VERSION_PATCH 0
20516 #endif
20517
20518 #define DB_VERSION_FULL ((DB_VERSION_MAJOR<<16)|(DB_VERSION_MINOR<<8)|DB_VERSION_PATCH)
20519
20520 /* require 4.4 or later, but less than 6.0.20 */
20521 #if DB_VERSION_FULL >= 0x040400 && DB_VERSION_FULL < 0x060014
20522         __db_version_compat
20523 #endif
20524 #if DB_VERSION_FULL >= 0x060014
20525 #error "BerkeleyDB 6.0.20+ license is incompatible with LDAP"
20526 #endif
20527
20528 _ACEOF
20529 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20530   $EGREP "__db_version_compat" >/dev/null 2>&1; then :
20531   ol_cv_bdb_compat=yes
20532 else
20533   ol_cv_bdb_compat=no
20534 fi
20535 rm -f conftest*
20536
20537 fi
20538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_compat" >&5
20539 $as_echo "$ol_cv_bdb_compat" >&6; }
20540
20541
20542         if test $ol_cv_bdb_compat != yes ; then
20543                 as_fn_error "BerkeleyDB version incompatible with BDB/HDB backends" "$LINENO" 5
20544         fi
20545
20546         ol_cv_lib_db=no
20547
20548 if test $ol_cv_bdb_major = 5 ; then
20549         if test $ol_cv_lib_db = no ; then
20550         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)" >&5
20551 $as_echo_n "checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)... " >&6; }
20552 if test "${ol_cv_db_db_5_dot_m+set}" = set; then :
20553   $as_echo_n "(cached) " >&6
20554 else
20555
20556         ol_DB_LIB=-ldb-5.$ol_cv_bdb_minor
20557         ol_LIBS=$LIBS
20558         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20559
20560         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20561 /* end confdefs.h.  */
20562
20563 #ifdef HAVE_DB_185_H
20564 # include <db_185.h>
20565 #else
20566 # include <db.h>
20567 #endif
20568
20569 #ifndef DB_VERSION_MAJOR
20570 # define DB_VERSION_MAJOR 1
20571 #endif
20572
20573 #ifndef NULL
20574 #define NULL ((void*)0)
20575 #endif
20576
20577 int
20578 main ()
20579 {
20580
20581 #if DB_VERSION_MAJOR > 2
20582         db_env_create( NULL, 0 );
20583 #elif DB_VERSION_MAJOR > 1
20584         db_appexit( NULL );
20585 #else
20586         (void) dbopen( NULL, 0, 0, 0, NULL);
20587 #endif
20588
20589   ;
20590   return 0;
20591 }
20592 _ACEOF
20593 if ac_fn_c_try_link "$LINENO"; then :
20594   ol_cv_db_db_5_dot_m=yes
20595 else
20596   ol_cv_db_db_5_dot_m=no
20597 fi
20598 rm -f core conftest.err conftest.$ac_objext \
20599     conftest$ac_exeext conftest.$ac_ext
20600
20601         LIBS="$ol_LIBS"
20602
20603 fi
20604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_dot_m" >&5
20605 $as_echo "$ol_cv_db_db_5_dot_m" >&6; }
20606
20607         if test $ol_cv_db_db_5_dot_m = yes ; then
20608                 ol_cv_lib_db=-ldb-5.$ol_cv_bdb_minor
20609         fi
20610 fi
20611
20612         if test $ol_cv_lib_db = no ; then
20613         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)" >&5
20614 $as_echo_n "checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)... " >&6; }
20615 if test "${ol_cv_db_db5m+set}" = set; then :
20616   $as_echo_n "(cached) " >&6
20617 else
20618
20619         ol_DB_LIB=-ldb5$ol_cv_bdb_minor
20620         ol_LIBS=$LIBS
20621         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20622
20623         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20624 /* end confdefs.h.  */
20625
20626 #ifdef HAVE_DB_185_H
20627 # include <db_185.h>
20628 #else
20629 # include <db.h>
20630 #endif
20631
20632 #ifndef DB_VERSION_MAJOR
20633 # define DB_VERSION_MAJOR 1
20634 #endif
20635
20636 #ifndef NULL
20637 #define NULL ((void*)0)
20638 #endif
20639
20640 int
20641 main ()
20642 {
20643
20644 #if DB_VERSION_MAJOR > 2
20645         db_env_create( NULL, 0 );
20646 #elif DB_VERSION_MAJOR > 1
20647         db_appexit( NULL );
20648 #else
20649         (void) dbopen( NULL, 0, 0, 0, NULL);
20650 #endif
20651
20652   ;
20653   return 0;
20654 }
20655 _ACEOF
20656 if ac_fn_c_try_link "$LINENO"; then :
20657   ol_cv_db_db5m=yes
20658 else
20659   ol_cv_db_db5m=no
20660 fi
20661 rm -f core conftest.err conftest.$ac_objext \
20662     conftest$ac_exeext conftest.$ac_ext
20663
20664         LIBS="$ol_LIBS"
20665
20666 fi
20667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5m" >&5
20668 $as_echo "$ol_cv_db_db5m" >&6; }
20669
20670         if test $ol_cv_db_db5m = yes ; then
20671                 ol_cv_lib_db=-ldb5$ol_cv_bdb_minor
20672         fi
20673 fi
20674
20675         if test $ol_cv_lib_db = no ; then
20676         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)" >&5
20677 $as_echo_n "checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)... " >&6; }
20678 if test "${ol_cv_db_db_5m+set}" = set; then :
20679   $as_echo_n "(cached) " >&6
20680 else
20681
20682         ol_DB_LIB=-ldb-5$ol_cv_bdb_minor
20683         ol_LIBS=$LIBS
20684         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20685
20686         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20687 /* end confdefs.h.  */
20688
20689 #ifdef HAVE_DB_185_H
20690 # include <db_185.h>
20691 #else
20692 # include <db.h>
20693 #endif
20694
20695 #ifndef DB_VERSION_MAJOR
20696 # define DB_VERSION_MAJOR 1
20697 #endif
20698
20699 #ifndef NULL
20700 #define NULL ((void*)0)
20701 #endif
20702
20703 int
20704 main ()
20705 {
20706
20707 #if DB_VERSION_MAJOR > 2
20708         db_env_create( NULL, 0 );
20709 #elif DB_VERSION_MAJOR > 1
20710         db_appexit( NULL );
20711 #else
20712         (void) dbopen( NULL, 0, 0, 0, NULL);
20713 #endif
20714
20715   ;
20716   return 0;
20717 }
20718 _ACEOF
20719 if ac_fn_c_try_link "$LINENO"; then :
20720   ol_cv_db_db_5m=yes
20721 else
20722   ol_cv_db_db_5m=no
20723 fi
20724 rm -f core conftest.err conftest.$ac_objext \
20725     conftest$ac_exeext conftest.$ac_ext
20726
20727         LIBS="$ol_LIBS"
20728
20729 fi
20730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5m" >&5
20731 $as_echo "$ol_cv_db_db_5m" >&6; }
20732
20733         if test $ol_cv_db_db_5m = yes ; then
20734                 ol_cv_lib_db=-ldb-5$ol_cv_bdb_minor
20735         fi
20736 fi
20737
20738         if test $ol_cv_lib_db = no ; then
20739         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)" >&5
20740 $as_echo_n "checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)... " >&6; }
20741 if test "${ol_cv_db_db_5_m+set}" = set; then :
20742   $as_echo_n "(cached) " >&6
20743 else
20744
20745         ol_DB_LIB=-ldb-5-$ol_cv_bdb_minor
20746         ol_LIBS=$LIBS
20747         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20748
20749         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20750 /* end confdefs.h.  */
20751
20752 #ifdef HAVE_DB_185_H
20753 # include <db_185.h>
20754 #else
20755 # include <db.h>
20756 #endif
20757
20758 #ifndef DB_VERSION_MAJOR
20759 # define DB_VERSION_MAJOR 1
20760 #endif
20761
20762 #ifndef NULL
20763 #define NULL ((void*)0)
20764 #endif
20765
20766 int
20767 main ()
20768 {
20769
20770 #if DB_VERSION_MAJOR > 2
20771         db_env_create( NULL, 0 );
20772 #elif DB_VERSION_MAJOR > 1
20773         db_appexit( NULL );
20774 #else
20775         (void) dbopen( NULL, 0, 0, 0, NULL);
20776 #endif
20777
20778   ;
20779   return 0;
20780 }
20781 _ACEOF
20782 if ac_fn_c_try_link "$LINENO"; then :
20783   ol_cv_db_db_5_m=yes
20784 else
20785   ol_cv_db_db_5_m=no
20786 fi
20787 rm -f core conftest.err conftest.$ac_objext \
20788     conftest$ac_exeext conftest.$ac_ext
20789
20790         LIBS="$ol_LIBS"
20791
20792 fi
20793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_m" >&5
20794 $as_echo "$ol_cv_db_db_5_m" >&6; }
20795
20796         if test $ol_cv_db_db_5_m = yes ; then
20797                 ol_cv_lib_db=-ldb-5-$ol_cv_bdb_minor
20798         fi
20799 fi
20800
20801         if test $ol_cv_lib_db = no ; then
20802         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5)" >&5
20803 $as_echo_n "checking for Berkeley DB link (-ldb-5)... " >&6; }
20804 if test "${ol_cv_db_db_5+set}" = set; then :
20805   $as_echo_n "(cached) " >&6
20806 else
20807
20808         ol_DB_LIB=-ldb-5
20809         ol_LIBS=$LIBS
20810         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20811
20812         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20813 /* end confdefs.h.  */
20814
20815 #ifdef HAVE_DB_185_H
20816 # include <db_185.h>
20817 #else
20818 # include <db.h>
20819 #endif
20820
20821 #ifndef DB_VERSION_MAJOR
20822 # define DB_VERSION_MAJOR 1
20823 #endif
20824
20825 #ifndef NULL
20826 #define NULL ((void*)0)
20827 #endif
20828
20829 int
20830 main ()
20831 {
20832
20833 #if DB_VERSION_MAJOR > 2
20834         db_env_create( NULL, 0 );
20835 #elif DB_VERSION_MAJOR > 1
20836         db_appexit( NULL );
20837 #else
20838         (void) dbopen( NULL, 0, 0, 0, NULL);
20839 #endif
20840
20841   ;
20842   return 0;
20843 }
20844 _ACEOF
20845 if ac_fn_c_try_link "$LINENO"; then :
20846   ol_cv_db_db_5=yes
20847 else
20848   ol_cv_db_db_5=no
20849 fi
20850 rm -f core conftest.err conftest.$ac_objext \
20851     conftest$ac_exeext conftest.$ac_ext
20852
20853         LIBS="$ol_LIBS"
20854
20855 fi
20856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5" >&5
20857 $as_echo "$ol_cv_db_db_5" >&6; }
20858
20859         if test $ol_cv_db_db_5 = yes ; then
20860                 ol_cv_lib_db=-ldb-5
20861         fi
20862 fi
20863
20864         if test $ol_cv_lib_db = no ; then
20865         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5)" >&5
20866 $as_echo_n "checking for Berkeley DB link (-ldb5)... " >&6; }
20867 if test "${ol_cv_db_db5+set}" = set; then :
20868   $as_echo_n "(cached) " >&6
20869 else
20870
20871         ol_DB_LIB=-ldb5
20872         ol_LIBS=$LIBS
20873         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20874
20875         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20876 /* end confdefs.h.  */
20877
20878 #ifdef HAVE_DB_185_H
20879 # include <db_185.h>
20880 #else
20881 # include <db.h>
20882 #endif
20883
20884 #ifndef DB_VERSION_MAJOR
20885 # define DB_VERSION_MAJOR 1
20886 #endif
20887
20888 #ifndef NULL
20889 #define NULL ((void*)0)
20890 #endif
20891
20892 int
20893 main ()
20894 {
20895
20896 #if DB_VERSION_MAJOR > 2
20897         db_env_create( NULL, 0 );
20898 #elif DB_VERSION_MAJOR > 1
20899         db_appexit( NULL );
20900 #else
20901         (void) dbopen( NULL, 0, 0, 0, NULL);
20902 #endif
20903
20904   ;
20905   return 0;
20906 }
20907 _ACEOF
20908 if ac_fn_c_try_link "$LINENO"; then :
20909   ol_cv_db_db5=yes
20910 else
20911   ol_cv_db_db5=no
20912 fi
20913 rm -f core conftest.err conftest.$ac_objext \
20914     conftest$ac_exeext conftest.$ac_ext
20915
20916         LIBS="$ol_LIBS"
20917
20918 fi
20919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5" >&5
20920 $as_echo "$ol_cv_db_db5" >&6; }
20921
20922         if test $ol_cv_db_db5 = yes ; then
20923                 ol_cv_lib_db=-ldb5
20924         fi
20925 fi
20926
20927 elif test $ol_cv_bdb_major = 4 ; then
20928         if test $ol_cv_lib_db = no ; then
20929         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)" >&5
20930 $as_echo_n "checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)... " >&6; }
20931 if test "${ol_cv_db_db_4_dot_m+set}" = set; then :
20932   $as_echo_n "(cached) " >&6
20933 else
20934
20935         ol_DB_LIB=-ldb-4.$ol_cv_bdb_minor
20936         ol_LIBS=$LIBS
20937         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20938
20939         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20940 /* end confdefs.h.  */
20941
20942 #ifdef HAVE_DB_185_H
20943 # include <db_185.h>
20944 #else
20945 # include <db.h>
20946 #endif
20947
20948 #ifndef DB_VERSION_MAJOR
20949 # define DB_VERSION_MAJOR 1
20950 #endif
20951
20952 #ifndef NULL
20953 #define NULL ((void*)0)
20954 #endif
20955
20956 int
20957 main ()
20958 {
20959
20960 #if DB_VERSION_MAJOR > 2
20961         db_env_create( NULL, 0 );
20962 #elif DB_VERSION_MAJOR > 1
20963         db_appexit( NULL );
20964 #else
20965         (void) dbopen( NULL, 0, 0, 0, NULL);
20966 #endif
20967
20968   ;
20969   return 0;
20970 }
20971 _ACEOF
20972 if ac_fn_c_try_link "$LINENO"; then :
20973   ol_cv_db_db_4_dot_m=yes
20974 else
20975   ol_cv_db_db_4_dot_m=no
20976 fi
20977 rm -f core conftest.err conftest.$ac_objext \
20978     conftest$ac_exeext conftest.$ac_ext
20979
20980         LIBS="$ol_LIBS"
20981
20982 fi
20983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_dot_m" >&5
20984 $as_echo "$ol_cv_db_db_4_dot_m" >&6; }
20985
20986         if test $ol_cv_db_db_4_dot_m = yes ; then
20987                 ol_cv_lib_db=-ldb-4.$ol_cv_bdb_minor
20988         fi
20989 fi
20990
20991         if test $ol_cv_lib_db = no ; then
20992         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)" >&5
20993 $as_echo_n "checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)... " >&6; }
20994 if test "${ol_cv_db_db4m+set}" = set; then :
20995   $as_echo_n "(cached) " >&6
20996 else
20997
20998         ol_DB_LIB=-ldb4$ol_cv_bdb_minor
20999         ol_LIBS=$LIBS
21000         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21001
21002         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21003 /* end confdefs.h.  */
21004
21005 #ifdef HAVE_DB_185_H
21006 # include <db_185.h>
21007 #else
21008 # include <db.h>
21009 #endif
21010
21011 #ifndef DB_VERSION_MAJOR
21012 # define DB_VERSION_MAJOR 1
21013 #endif
21014
21015 #ifndef NULL
21016 #define NULL ((void*)0)
21017 #endif
21018
21019 int
21020 main ()
21021 {
21022
21023 #if DB_VERSION_MAJOR > 2
21024         db_env_create( NULL, 0 );
21025 #elif DB_VERSION_MAJOR > 1
21026         db_appexit( NULL );
21027 #else
21028         (void) dbopen( NULL, 0, 0, 0, NULL);
21029 #endif
21030
21031   ;
21032   return 0;
21033 }
21034 _ACEOF
21035 if ac_fn_c_try_link "$LINENO"; then :
21036   ol_cv_db_db4m=yes
21037 else
21038   ol_cv_db_db4m=no
21039 fi
21040 rm -f core conftest.err conftest.$ac_objext \
21041     conftest$ac_exeext conftest.$ac_ext
21042
21043         LIBS="$ol_LIBS"
21044
21045 fi
21046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4m" >&5
21047 $as_echo "$ol_cv_db_db4m" >&6; }
21048
21049         if test $ol_cv_db_db4m = yes ; then
21050                 ol_cv_lib_db=-ldb4$ol_cv_bdb_minor
21051         fi
21052 fi
21053
21054         if test $ol_cv_lib_db = no ; then
21055         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)" >&5
21056 $as_echo_n "checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)... " >&6; }
21057 if test "${ol_cv_db_db_4m+set}" = set; then :
21058   $as_echo_n "(cached) " >&6
21059 else
21060
21061         ol_DB_LIB=-ldb-4$ol_cv_bdb_minor
21062         ol_LIBS=$LIBS
21063         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21064
21065         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21066 /* end confdefs.h.  */
21067
21068 #ifdef HAVE_DB_185_H
21069 # include <db_185.h>
21070 #else
21071 # include <db.h>
21072 #endif
21073
21074 #ifndef DB_VERSION_MAJOR
21075 # define DB_VERSION_MAJOR 1
21076 #endif
21077
21078 #ifndef NULL
21079 #define NULL ((void*)0)
21080 #endif
21081
21082 int
21083 main ()
21084 {
21085
21086 #if DB_VERSION_MAJOR > 2
21087         db_env_create( NULL, 0 );
21088 #elif DB_VERSION_MAJOR > 1
21089         db_appexit( NULL );
21090 #else
21091         (void) dbopen( NULL, 0, 0, 0, NULL);
21092 #endif
21093
21094   ;
21095   return 0;
21096 }
21097 _ACEOF
21098 if ac_fn_c_try_link "$LINENO"; then :
21099   ol_cv_db_db_4m=yes
21100 else
21101   ol_cv_db_db_4m=no
21102 fi
21103 rm -f core conftest.err conftest.$ac_objext \
21104     conftest$ac_exeext conftest.$ac_ext
21105
21106         LIBS="$ol_LIBS"
21107
21108 fi
21109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4m" >&5
21110 $as_echo "$ol_cv_db_db_4m" >&6; }
21111
21112         if test $ol_cv_db_db_4m = yes ; then
21113                 ol_cv_lib_db=-ldb-4$ol_cv_bdb_minor
21114         fi
21115 fi
21116
21117         if test $ol_cv_lib_db = no ; then
21118         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)" >&5
21119 $as_echo_n "checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)... " >&6; }
21120 if test "${ol_cv_db_db_4_m+set}" = set; then :
21121   $as_echo_n "(cached) " >&6
21122 else
21123
21124         ol_DB_LIB=-ldb-4-$ol_cv_bdb_minor
21125         ol_LIBS=$LIBS
21126         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21127
21128         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21129 /* end confdefs.h.  */
21130
21131 #ifdef HAVE_DB_185_H
21132 # include <db_185.h>
21133 #else
21134 # include <db.h>
21135 #endif
21136
21137 #ifndef DB_VERSION_MAJOR
21138 # define DB_VERSION_MAJOR 1
21139 #endif
21140
21141 #ifndef NULL
21142 #define NULL ((void*)0)
21143 #endif
21144
21145 int
21146 main ()
21147 {
21148
21149 #if DB_VERSION_MAJOR > 2
21150         db_env_create( NULL, 0 );
21151 #elif DB_VERSION_MAJOR > 1
21152         db_appexit( NULL );
21153 #else
21154         (void) dbopen( NULL, 0, 0, 0, NULL);
21155 #endif
21156
21157   ;
21158   return 0;
21159 }
21160 _ACEOF
21161 if ac_fn_c_try_link "$LINENO"; then :
21162   ol_cv_db_db_4_m=yes
21163 else
21164   ol_cv_db_db_4_m=no
21165 fi
21166 rm -f core conftest.err conftest.$ac_objext \
21167     conftest$ac_exeext conftest.$ac_ext
21168
21169         LIBS="$ol_LIBS"
21170
21171 fi
21172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_m" >&5
21173 $as_echo "$ol_cv_db_db_4_m" >&6; }
21174
21175         if test $ol_cv_db_db_4_m = yes ; then
21176                 ol_cv_lib_db=-ldb-4-$ol_cv_bdb_minor
21177         fi
21178 fi
21179
21180         if test $ol_cv_lib_db = no ; then
21181         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4)" >&5
21182 $as_echo_n "checking for Berkeley DB link (-ldb-4)... " >&6; }
21183 if test "${ol_cv_db_db_4+set}" = set; then :
21184   $as_echo_n "(cached) " >&6
21185 else
21186
21187         ol_DB_LIB=-ldb-4
21188         ol_LIBS=$LIBS
21189         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21190
21191         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21192 /* end confdefs.h.  */
21193
21194 #ifdef HAVE_DB_185_H
21195 # include <db_185.h>
21196 #else
21197 # include <db.h>
21198 #endif
21199
21200 #ifndef DB_VERSION_MAJOR
21201 # define DB_VERSION_MAJOR 1
21202 #endif
21203
21204 #ifndef NULL
21205 #define NULL ((void*)0)
21206 #endif
21207
21208 int
21209 main ()
21210 {
21211
21212 #if DB_VERSION_MAJOR > 2
21213         db_env_create( NULL, 0 );
21214 #elif DB_VERSION_MAJOR > 1
21215         db_appexit( NULL );
21216 #else
21217         (void) dbopen( NULL, 0, 0, 0, NULL);
21218 #endif
21219
21220   ;
21221   return 0;
21222 }
21223 _ACEOF
21224 if ac_fn_c_try_link "$LINENO"; then :
21225   ol_cv_db_db_4=yes
21226 else
21227   ol_cv_db_db_4=no
21228 fi
21229 rm -f core conftest.err conftest.$ac_objext \
21230     conftest$ac_exeext conftest.$ac_ext
21231
21232         LIBS="$ol_LIBS"
21233
21234 fi
21235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4" >&5
21236 $as_echo "$ol_cv_db_db_4" >&6; }
21237
21238         if test $ol_cv_db_db_4 = yes ; then
21239                 ol_cv_lib_db=-ldb-4
21240         fi
21241 fi
21242
21243         if test $ol_cv_lib_db = no ; then
21244         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4)" >&5
21245 $as_echo_n "checking for Berkeley DB link (-ldb4)... " >&6; }
21246 if test "${ol_cv_db_db4+set}" = set; then :
21247   $as_echo_n "(cached) " >&6
21248 else
21249
21250         ol_DB_LIB=-ldb4
21251         ol_LIBS=$LIBS
21252         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21253
21254         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21255 /* end confdefs.h.  */
21256
21257 #ifdef HAVE_DB_185_H
21258 # include <db_185.h>
21259 #else
21260 # include <db.h>
21261 #endif
21262
21263 #ifndef DB_VERSION_MAJOR
21264 # define DB_VERSION_MAJOR 1
21265 #endif
21266
21267 #ifndef NULL
21268 #define NULL ((void*)0)
21269 #endif
21270
21271 int
21272 main ()
21273 {
21274
21275 #if DB_VERSION_MAJOR > 2
21276         db_env_create( NULL, 0 );
21277 #elif DB_VERSION_MAJOR > 1
21278         db_appexit( NULL );
21279 #else
21280         (void) dbopen( NULL, 0, 0, 0, NULL);
21281 #endif
21282
21283   ;
21284   return 0;
21285 }
21286 _ACEOF
21287 if ac_fn_c_try_link "$LINENO"; then :
21288   ol_cv_db_db4=yes
21289 else
21290   ol_cv_db_db4=no
21291 fi
21292 rm -f core conftest.err conftest.$ac_objext \
21293     conftest$ac_exeext conftest.$ac_ext
21294
21295         LIBS="$ol_LIBS"
21296
21297 fi
21298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4" >&5
21299 $as_echo "$ol_cv_db_db4" >&6; }
21300
21301         if test $ol_cv_db_db4 = yes ; then
21302                 ol_cv_lib_db=-ldb4
21303         fi
21304 fi
21305
21306 fi
21307 if test $ol_cv_lib_db = no ; then
21308         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb)" >&5
21309 $as_echo_n "checking for Berkeley DB link (-ldb)... " >&6; }
21310 if test "${ol_cv_db_db+set}" = set; then :
21311   $as_echo_n "(cached) " >&6
21312 else
21313
21314         ol_DB_LIB=-ldb
21315         ol_LIBS=$LIBS
21316         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21317
21318         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21319 /* end confdefs.h.  */
21320
21321 #ifdef HAVE_DB_185_H
21322 # include <db_185.h>
21323 #else
21324 # include <db.h>
21325 #endif
21326
21327 #ifndef DB_VERSION_MAJOR
21328 # define DB_VERSION_MAJOR 1
21329 #endif
21330
21331 #ifndef NULL
21332 #define NULL ((void*)0)
21333 #endif
21334
21335 int
21336 main ()
21337 {
21338
21339 #if DB_VERSION_MAJOR > 2
21340         db_env_create( NULL, 0 );
21341 #elif DB_VERSION_MAJOR > 1
21342         db_appexit( NULL );
21343 #else
21344         (void) dbopen( NULL, 0, 0, 0, NULL);
21345 #endif
21346
21347   ;
21348   return 0;
21349 }
21350 _ACEOF
21351 if ac_fn_c_try_link "$LINENO"; then :
21352   ol_cv_db_db=yes
21353 else
21354   ol_cv_db_db=no
21355 fi
21356 rm -f core conftest.err conftest.$ac_objext \
21357     conftest$ac_exeext conftest.$ac_ext
21358
21359         LIBS="$ol_LIBS"
21360
21361 fi
21362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db" >&5
21363 $as_echo "$ol_cv_db_db" >&6; }
21364
21365         if test $ol_cv_db_db = yes ; then
21366                 ol_cv_lib_db=-ldb
21367         fi
21368 fi
21369
21370 if test $ol_cv_lib_db = no ; then
21371         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (default)" >&5
21372 $as_echo_n "checking for Berkeley DB link (default)... " >&6; }
21373 if test "${ol_cv_db_none+set}" = set; then :
21374   $as_echo_n "(cached) " >&6
21375 else
21376
21377         ol_DB_LIB=
21378         ol_LIBS=$LIBS
21379         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21380
21381         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21382 /* end confdefs.h.  */
21383
21384 #ifdef HAVE_DB_185_H
21385 # include <db_185.h>
21386 #else
21387 # include <db.h>
21388 #endif
21389
21390 #ifndef DB_VERSION_MAJOR
21391 # define DB_VERSION_MAJOR 1
21392 #endif
21393
21394 #ifndef NULL
21395 #define NULL ((void*)0)
21396 #endif
21397
21398 int
21399 main ()
21400 {
21401
21402 #if DB_VERSION_MAJOR > 2
21403         db_env_create( NULL, 0 );
21404 #elif DB_VERSION_MAJOR > 1
21405         db_appexit( NULL );
21406 #else
21407         (void) dbopen( NULL, 0, 0, 0, NULL);
21408 #endif
21409
21410   ;
21411   return 0;
21412 }
21413 _ACEOF
21414 if ac_fn_c_try_link "$LINENO"; then :
21415   ol_cv_db_none=yes
21416 else
21417   ol_cv_db_none=no
21418 fi
21419 rm -f core conftest.err conftest.$ac_objext \
21420     conftest$ac_exeext conftest.$ac_ext
21421
21422         LIBS="$ol_LIBS"
21423
21424 fi
21425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_none" >&5
21426 $as_echo "$ol_cv_db_none" >&6; }
21427
21428         if test $ol_cv_db_none = yes ; then
21429                 ol_cv_lib_db=yes
21430         fi
21431 fi
21432
21433
21434         if test "$ol_cv_lib_db" != no ; then
21435                 ol_cv_berkeley_db=yes
21436                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB library and header version match" >&5
21437 $as_echo_n "checking for Berkeley DB library and header version match... " >&6; }
21438 if test "${ol_cv_berkeley_db_version+set}" = set; then :
21439   $as_echo_n "(cached) " >&6
21440 else
21441
21442         ol_LIBS="$LIBS"
21443         LIBS="$LTHREAD_LIBS $LIBS"
21444         if test $ol_cv_lib_db != yes ; then
21445                 LIBS="$ol_cv_lib_db $LIBS"
21446         fi
21447
21448         if test "$cross_compiling" = yes; then :
21449   ol_cv_berkeley_db_version=cross
21450 else
21451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21452 /* end confdefs.h.  */
21453
21454 #ifdef HAVE_DB_185_H
21455         choke me;
21456 #else
21457 #include <db.h>
21458 #endif
21459 #ifndef DB_VERSION_MAJOR
21460 # define DB_VERSION_MAJOR 1
21461 #endif
21462 #ifndef NULL
21463 #define NULL ((void *)0)
21464 #endif
21465 main()
21466 {
21467 #if DB_VERSION_MAJOR > 1
21468         char *version;
21469         int major, minor, patch;
21470
21471         version = db_version( &major, &minor, &patch );
21472
21473         if( major != DB_VERSION_MAJOR ||
21474                 minor != DB_VERSION_MINOR ||
21475                 patch != DB_VERSION_PATCH )
21476         {
21477                 printf("Berkeley DB version mismatch\n"
21478                         "\theader: %s\n\tlibrary: %s\n",
21479                         DB_VERSION_STRING, version);
21480                 return 1;
21481         }
21482 #endif
21483
21484         return 0;
21485 }
21486 _ACEOF
21487 if ac_fn_c_try_run "$LINENO"; then :
21488   ol_cv_berkeley_db_version=yes
21489 else
21490   ol_cv_berkeley_db_version=no
21491 fi
21492 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21493   conftest.$ac_objext conftest.beam conftest.$ac_ext
21494 fi
21495
21496
21497         LIBS="$ol_LIBS"
21498
21499 fi
21500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_version" >&5
21501 $as_echo "$ol_cv_berkeley_db_version" >&6; }
21502
21503         if test $ol_cv_berkeley_db_version = no ; then
21504                 as_fn_error "Berkeley DB version mismatch" "$LINENO" 5
21505         fi
21506
21507                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB thread support" >&5
21508 $as_echo_n "checking for Berkeley DB thread support... " >&6; }
21509 if test "${ol_cv_berkeley_db_thread+set}" = set; then :
21510   $as_echo_n "(cached) " >&6
21511 else
21512
21513         ol_LIBS="$LIBS"
21514         LIBS="$LTHREAD_LIBS $LIBS"
21515         if test $ol_cv_lib_db != yes ; then
21516                 LIBS="$ol_cv_lib_db $LIBS"
21517         fi
21518
21519         if test "$cross_compiling" = yes; then :
21520   ol_cv_berkeley_db_thread=cross
21521 else
21522   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21523 /* end confdefs.h.  */
21524
21525 #ifdef HAVE_DB_185_H
21526         choke me;
21527 #else
21528 #include <db.h>
21529 #endif
21530 #ifndef NULL
21531 #define NULL ((void *)0)
21532 #endif
21533 main()
21534 {
21535         int rc;
21536         u_int32_t flags = DB_CREATE |
21537 #ifdef DB_PRIVATE
21538                 DB_PRIVATE |
21539 #endif
21540                 DB_THREAD;
21541
21542 #if DB_VERSION_MAJOR > 2
21543         DB_ENV *env = NULL;
21544
21545         rc = db_env_create( &env, 0 );
21546
21547         flags |= DB_INIT_MPOOL;
21548 #ifdef DB_MPOOL_PRIVATE
21549         flags |= DB_MPOOL_PRIVATE;
21550 #endif
21551
21552         if( rc ) {
21553                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21554                 return rc;
21555         }
21556
21557 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
21558         rc = (env->open)( env, NULL, flags, 0 );
21559 #else
21560         rc = (env->open)( env, NULL, NULL, flags, 0 );
21561 #endif
21562
21563         if ( rc == 0 ) {
21564                 rc = env->close( env, 0 );
21565         }
21566
21567         if( rc ) {
21568                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21569                 return rc;
21570         }
21571
21572 #else
21573         DB_ENV env;
21574         memset( &env, '\0', sizeof(env) );
21575
21576         rc = db_appinit( NULL, NULL, &env, flags );
21577
21578         if( rc == 0 ) {
21579                 db_appexit( &env );
21580         }
21581
21582         unlink("__db_mpool.share");
21583         unlink("__db_lock.share");
21584 #endif
21585
21586         return rc;
21587 }
21588 _ACEOF
21589 if ac_fn_c_try_run "$LINENO"; then :
21590   ol_cv_berkeley_db_thread=yes
21591 else
21592   ol_cv_berkeley_db_thread=no
21593 fi
21594 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21595   conftest.$ac_objext conftest.beam conftest.$ac_ext
21596 fi
21597
21598
21599         LIBS="$ol_LIBS"
21600
21601 fi
21602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_thread" >&5
21603 $as_echo "$ol_cv_berkeley_db_thread" >&6; }
21604
21605         if test $ol_cv_berkeley_db_thread != no ; then
21606
21607 $as_echo "#define HAVE_BERKELEY_DB_THREAD 1" >>confdefs.h
21608
21609         fi
21610
21611         fi
21612 fi
21613
21614
21615         if test $ol_cv_berkeley_db = no ; then
21616                 as_fn_error "BDB/HDB: BerkeleyDB not available" "$LINENO" 5
21617         fi
21618
21619
21620 $as_echo "#define HAVE_BERKELEY_DB 1" >>confdefs.h
21621
21622
21623                         if test $ol_cv_lib_db != yes ; then
21624                 BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
21625         fi
21626
21627         SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
21628
21629         ol_link_bdb=yes
21630 fi
21631
21632
21633 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
21634         BUILD_LIBS_DYNAMIC=shared
21635
21636 $as_echo "#define LDAP_LIBS_DYNAMIC 1" >>confdefs.h
21637
21638         LTSTATIC=""
21639 else
21640         BUILD_LIBS_DYNAMIC=static
21641         LTSTATIC="-static"
21642 fi
21643
21644 if test $ol_enable_wrappers != no ; then
21645         for ac_header in tcpd.h
21646 do :
21647   ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
21648 if test "x$ac_cv_header_tcpd_h" = x""yes; then :
21649   cat >>confdefs.h <<_ACEOF
21650 #define HAVE_TCPD_H 1
21651 _ACEOF
21652
21653                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library" >&5
21654 $as_echo_n "checking for TCP wrappers library... " >&6; }
21655                 save_LIBS="$LIBS"
21656                 LIBS="$LIBS -lwrap"
21657                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21658 /* end confdefs.h.  */
21659
21660 #include <tcpd.h>
21661 int allow_severity = 0;
21662 int deny_severity  = 0;
21663
21664 struct request_info *req;
21665
21666 int
21667 main ()
21668 {
21669
21670 hosts_access(req)
21671
21672   ;
21673   return 0;
21674 }
21675 _ACEOF
21676 if ac_fn_c_try_link "$LINENO"; then :
21677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap" >&5
21678 $as_echo "-lwrap" >&6; }
21679                 have_wrappers=yes
21680                 LIBS="$save_LIBS"
21681 else
21682
21683                                 LIBS="$LIBS -lnsl"
21684                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21685 /* end confdefs.h.  */
21686
21687 #include <tcpd.h>
21688 int allow_severity = 0;
21689 int deny_severity  = 0;
21690
21691 struct request_info *req;
21692
21693 int
21694 main ()
21695 {
21696
21697 hosts_access(req)
21698
21699   ;
21700   return 0;
21701 }
21702 _ACEOF
21703 if ac_fn_c_try_link "$LINENO"; then :
21704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap -lnsl" >&5
21705 $as_echo "-lwrap -lnsl" >&6; }
21706                 have_wrappers=yes
21707                 LIBS="$save_LIBS -lnsl"
21708 else
21709
21710                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21711 $as_echo "no" >&6; }
21712                 have_wrappers=no
21713                 LIBS=$save_LIBS
21714 fi
21715 rm -f core conftest.err conftest.$ac_objext \
21716     conftest$ac_exeext conftest.$ac_ext
21717 fi
21718 rm -f core conftest.err conftest.$ac_objext \
21719     conftest$ac_exeext conftest.$ac_ext
21720 else
21721   have_wrappers=no
21722 fi
21723
21724 done
21725
21726
21727         if test $have_wrappers = yes ; then
21728
21729 $as_echo "#define HAVE_TCPD 1" >>confdefs.h
21730
21731                 WRAP_LIBS="-lwrap"
21732         elif test $ol_enable_wrappers = yes ; then
21733                 as_fn_error "could not find TCP wrappers, select appropriate options or disable" "$LINENO" 5
21734         else
21735                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find TCP wrappers, support disabled" >&5
21736 $as_echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
21737                 WRAP_LIBS=""
21738         fi
21739 fi
21740
21741 if test $ol_enable_syslog != no ; then
21742         ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
21743 if test "x$ac_cv_func_openlog" = x""yes; then :
21744
21745 fi
21746
21747         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
21748                 { as_fn_set_status select appropriate options or disable
21749 as_fn_error "could not find syslog" "$LINENO" 5; }
21750         fi
21751         ol_enable_syslog=$ac_cv_func_openlog
21752 fi
21753
21754 ol_link_sql=no
21755 if test $ol_enable_sql != no ; then
21756         for ac_header in sql.h sqlext.h
21757 do :
21758   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21759 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21760 eval as_val=\$$as_ac_Header
21761    if test "x$as_val" = x""yes; then :
21762   cat >>confdefs.h <<_ACEOF
21763 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21764 _ACEOF
21765
21766 else
21767
21768                 as_fn_error "could not locate SQL headers" "$LINENO" 5
21769
21770 fi
21771
21772 done
21773
21774
21775         sql_LIBS="$LIBS"
21776         LIBS="$LTHREAD_LIBS $LIBS"
21777
21778         if test $ol_with_odbc = auto ; then
21779                 ol_with_odbc="iodbc unixodbc odbc32"
21780         fi
21781
21782         for odbc in $ol_with_odbc ; do
21783                 if test $ol_link_sql = no ; then
21784                         case $odbc in
21785                         iodbc)
21786                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -liodbc" >&5
21787 $as_echo_n "checking for SQLDriverConnect in -liodbc... " >&6; }
21788 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then :
21789   $as_echo_n "(cached) " >&6
21790 else
21791   ac_check_lib_save_LIBS=$LIBS
21792 LIBS="-liodbc  $LIBS"
21793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21794 /* end confdefs.h.  */
21795
21796 /* Override any GCC internal prototype to avoid an error.
21797    Use char because int might match the return type of a GCC
21798    builtin and then its argument prototype would still apply.  */
21799 #ifdef __cplusplus
21800 extern "C"
21801 #endif
21802 char SQLDriverConnect ();
21803 int
21804 main ()
21805 {
21806 return SQLDriverConnect ();
21807   ;
21808   return 0;
21809 }
21810 _ACEOF
21811 if ac_fn_c_try_link "$LINENO"; then :
21812   ac_cv_lib_iodbc_SQLDriverConnect=yes
21813 else
21814   ac_cv_lib_iodbc_SQLDriverConnect=no
21815 fi
21816 rm -f core conftest.err conftest.$ac_objext \
21817     conftest$ac_exeext conftest.$ac_ext
21818 LIBS=$ac_check_lib_save_LIBS
21819 fi
21820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
21821 $as_echo "$ac_cv_lib_iodbc_SQLDriverConnect" >&6; }
21822 if test "x$ac_cv_lib_iodbc_SQLDriverConnect" = x""yes; then :
21823   have_iodbc=yes
21824 else
21825   have_iodbc=no
21826 fi
21827
21828                                 if test $have_iodbc = yes ; then
21829                                         ol_link_sql="-liodbc"
21830                                 fi
21831                                 ;;
21832
21833                         unixodbc)
21834                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc" >&5
21835 $as_echo_n "checking for SQLDriverConnect in -lodbc... " >&6; }
21836 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then :
21837   $as_echo_n "(cached) " >&6
21838 else
21839   ac_check_lib_save_LIBS=$LIBS
21840 LIBS="-lodbc  $LIBS"
21841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21842 /* end confdefs.h.  */
21843
21844 /* Override any GCC internal prototype to avoid an error.
21845    Use char because int might match the return type of a GCC
21846    builtin and then its argument prototype would still apply.  */
21847 #ifdef __cplusplus
21848 extern "C"
21849 #endif
21850 char SQLDriverConnect ();
21851 int
21852 main ()
21853 {
21854 return SQLDriverConnect ();
21855   ;
21856   return 0;
21857 }
21858 _ACEOF
21859 if ac_fn_c_try_link "$LINENO"; then :
21860   ac_cv_lib_odbc_SQLDriverConnect=yes
21861 else
21862   ac_cv_lib_odbc_SQLDriverConnect=no
21863 fi
21864 rm -f core conftest.err conftest.$ac_objext \
21865     conftest$ac_exeext conftest.$ac_ext
21866 LIBS=$ac_check_lib_save_LIBS
21867 fi
21868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
21869 $as_echo "$ac_cv_lib_odbc_SQLDriverConnect" >&6; }
21870 if test "x$ac_cv_lib_odbc_SQLDriverConnect" = x""yes; then :
21871   have_odbc=yes
21872 else
21873   have_odbc=no
21874 fi
21875
21876                                 if test $have_odbc = yes ; then
21877                                         ol_link_sql="-lodbc"
21878                                 fi
21879                                 ;;
21880
21881                         odbc32)
21882                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32" >&5
21883 $as_echo_n "checking for SQLDriverConnect in -lodbc32... " >&6; }
21884 if test "${ac_cv_lib_odbc32_SQLDriverConnect+set}" = set; then :
21885   $as_echo_n "(cached) " >&6
21886 else
21887   ac_check_lib_save_LIBS=$LIBS
21888 LIBS="-lodbc32  $LIBS"
21889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21890 /* end confdefs.h.  */
21891
21892 /* Override any GCC internal prototype to avoid an error.
21893    Use char because int might match the return type of a GCC
21894    builtin and then its argument prototype would still apply.  */
21895 #ifdef __cplusplus
21896 extern "C"
21897 #endif
21898 char SQLDriverConnect ();
21899 int
21900 main ()
21901 {
21902 return SQLDriverConnect ();
21903   ;
21904   return 0;
21905 }
21906 _ACEOF
21907 if ac_fn_c_try_link "$LINENO"; then :
21908   ac_cv_lib_odbc32_SQLDriverConnect=yes
21909 else
21910   ac_cv_lib_odbc32_SQLDriverConnect=no
21911 fi
21912 rm -f core conftest.err conftest.$ac_objext \
21913     conftest$ac_exeext conftest.$ac_ext
21914 LIBS=$ac_check_lib_save_LIBS
21915 fi
21916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_SQLDriverConnect" >&5
21917 $as_echo "$ac_cv_lib_odbc32_SQLDriverConnect" >&6; }
21918 if test "x$ac_cv_lib_odbc32_SQLDriverConnect" = x""yes; then :
21919   have_odbc32=yes
21920 else
21921   have_odbc32=no
21922 fi
21923
21924
21925                                                                 if test $have_odbc32 = no ; then
21926                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32 with windows.h" >&5
21927 $as_echo_n "checking for SQLDriverConnect in -lodbc32 with windows.h... " >&6; }
21928                                         save_LIBS="$LIBS"
21929                                         LIBS="$LIBS -lodbc32"
21930                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21931 /* end confdefs.h.  */
21932 #include <windows.h>
21933                                         #include <sqlext.h>
21934
21935 int
21936 main ()
21937 {
21938
21939                                                 SQLDriverConnect(NULL,NULL,NULL,0,NULL,0,NULL,0);
21940
21941   ;
21942   return 0;
21943 }
21944 _ACEOF
21945 if ac_fn_c_try_link "$LINENO"; then :
21946   have_odbc32=yes
21947 else
21948   have_odbc32=no
21949 fi
21950 rm -f core conftest.err conftest.$ac_objext \
21951     conftest$ac_exeext conftest.$ac_ext
21952                                         LIBS="$save_LIBS"
21953                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_odbc32" >&5
21954 $as_echo "$have_odbc32" >&6; }
21955                                 fi
21956
21957                                 if test $have_odbc32 = yes ; then
21958                                         ol_link_sql="-lodbc32"
21959                                 fi
21960                                 ;;
21961
21962                         *)
21963                                 as_fn_error "unknown ODBC library" "$LINENO" 5
21964                                 ;;
21965                         esac
21966                 fi
21967         done
21968
21969         LIBS="$sql_LIBS"
21970
21971         if test $ol_link_sql != no ; then
21972                 SLAPD_SQL_LIBS="$ol_link_sql"
21973
21974         elif test $ol_enable_sql != auto ; then
21975                 as_fn_error "could not locate suitable ODBC library" "$LINENO" 5
21976         fi
21977 fi
21978
21979 ol_link_ndb=no
21980 if test $ol_enable_ndb != no ; then
21981         # Extract the first word of "mysql_config", so it can be a program name with args.
21982 set dummy mysql_config; ac_word=$2
21983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21984 $as_echo_n "checking for $ac_word... " >&6; }
21985 if test "${ac_cv_prog_MYSQL+set}" = set; then :
21986   $as_echo_n "(cached) " >&6
21987 else
21988   if test -n "$MYSQL"; then
21989   ac_cv_prog_MYSQL="$MYSQL" # Let the user override the test.
21990 else
21991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21992 for as_dir in $PATH
21993 do
21994   IFS=$as_save_IFS
21995   test -z "$as_dir" && as_dir=.
21996     for ac_exec_ext in '' $ac_executable_extensions; do
21997   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21998     ac_cv_prog_MYSQL="yes"
21999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22000     break 2
22001   fi
22002 done
22003   done
22004 IFS=$as_save_IFS
22005
22006 fi
22007 fi
22008 MYSQL=$ac_cv_prog_MYSQL
22009 if test -n "$MYSQL"; then
22010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL" >&5
22011 $as_echo "$MYSQL" >&6; }
22012 else
22013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22014 $as_echo "no" >&6; }
22015 fi
22016
22017
22018         if test "$MYSQL" != yes ; then
22019                 as_fn_error "could not locate mysql_config" "$LINENO" 5
22020         fi
22021
22022         SQL_INC=`mysql_config --include`
22023         SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi"
22024
22025         save_CPPFLAGS="$CPPFLAGS"
22026         CPPFLAGS="$SLAPD_NDB_INCS"
22027         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NdbApi.hpp" >&5
22028 $as_echo_n "checking for NdbApi.hpp... " >&6; }
22029         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22030 /* end confdefs.h.  */
22031 #include <NdbApi.hpp>
22032 _ACEOF
22033 if ac_fn_c_try_cpp "$LINENO"; then :
22034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22035 $as_echo "yes" >&6; }
22036 else
22037   as_fn_error "could not locate NdbApi headers" "$LINENO" 5
22038
22039 fi
22040 rm -f conftest.err conftest.$ac_ext
22041         CPPFLAGS="$save_CPPFLAGS"
22042
22043         SQL_LIB=`mysql_config --libs_r`
22044         SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++"
22045
22046         save_LDFLAGS="$LDFLAGS"
22047         save_LIBS="$LIBS"
22048         LDFLAGS="$SQL_LIB"
22049         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ndb_init in -lndbclient" >&5
22050 $as_echo_n "checking for ndb_init in -lndbclient... " >&6; }
22051 if test "${ac_cv_lib_ndbclient_ndb_init+set}" = set; then :
22052   $as_echo_n "(cached) " >&6
22053 else
22054   ac_check_lib_save_LIBS=$LIBS
22055 LIBS="-lndbclient -lstdc++ $LIBS"
22056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22057 /* end confdefs.h.  */
22058
22059 /* Override any GCC internal prototype to avoid an error.
22060    Use char because int might match the return type of a GCC
22061    builtin and then its argument prototype would still apply.  */
22062 #ifdef __cplusplus
22063 extern "C"
22064 #endif
22065 char ndb_init ();
22066 int
22067 main ()
22068 {
22069 return ndb_init ();
22070   ;
22071   return 0;
22072 }
22073 _ACEOF
22074 if ac_fn_c_try_link "$LINENO"; then :
22075   ac_cv_lib_ndbclient_ndb_init=yes
22076 else
22077   ac_cv_lib_ndbclient_ndb_init=no
22078 fi
22079 rm -f core conftest.err conftest.$ac_objext \
22080     conftest$ac_exeext conftest.$ac_ext
22081 LIBS=$ac_check_lib_save_LIBS
22082 fi
22083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbclient_ndb_init" >&5
22084 $as_echo "$ac_cv_lib_ndbclient_ndb_init" >&6; }
22085 if test "x$ac_cv_lib_ndbclient_ndb_init" = x""yes; then :
22086   : ok
22087 else
22088
22089                 as_fn_error "could not locate ndbclient library" "$LINENO" 5
22090
22091 fi
22092
22093         LIBS="$save_LIBS"
22094         LDFLAGS="$save_LDFLAGS"
22095
22096         if test "$ol_enable_ndb" = yes ; then
22097                 SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
22098         fi
22099 fi
22100
22101 ol_link_wt=no
22102 if test $ol_enable_wt != no ; then
22103         # Extract the first word of "pkg-config", so it can be a program name with args.
22104 set dummy pkg-config; ac_word=$2
22105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22106 $as_echo_n "checking for $ac_word... " >&6; }
22107 if test "${ac_cv_prog_PKGCONFIG+set}" = set; then :
22108   $as_echo_n "(cached) " >&6
22109 else
22110   if test -n "$PKGCONFIG"; then
22111   ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
22112 else
22113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22114 for as_dir in $PATH
22115 do
22116   IFS=$as_save_IFS
22117   test -z "$as_dir" && as_dir=.
22118     for ac_exec_ext in '' $ac_executable_extensions; do
22119   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22120     ac_cv_prog_PKGCONFIG="yes"
22121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22122     break 2
22123   fi
22124 done
22125   done
22126 IFS=$as_save_IFS
22127
22128 fi
22129 fi
22130 PKGCONFIG=$ac_cv_prog_PKGCONFIG
22131 if test -n "$PKGCONFIG"; then
22132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
22133 $as_echo "$PKGCONFIG" >&6; }
22134 else
22135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22136 $as_echo "no" >&6; }
22137 fi
22138
22139
22140         if test "$PKGCONFIG" != yes ; then
22141                 as_fn_error "could not locate pkg-config" "$LINENO" 5
22142         fi
22143         WT_INCS=`pkg-config --cflags wiredtiger`
22144         WT_LIBS=`pkg-config --libs wiredtiger`
22145
22146         save_CFLAGS="$CFLAGS"
22147         save_LDFLAGS="$LDFLAGS"
22148         CFLAGS="$WT_INCS"
22149         CPPFLAGS="$WT_INCS"
22150         LDFLAGS="$WT_LIBS"
22151         for ac_header in wiredtiger.h
22152 do :
22153   ac_fn_c_check_header_mongrel "$LINENO" "wiredtiger.h" "ac_cv_header_wiredtiger_h" "$ac_includes_default"
22154 if test "x$ac_cv_header_wiredtiger_h" = x""yes; then :
22155   cat >>confdefs.h <<_ACEOF
22156 #define HAVE_WIREDTIGER_H 1
22157 _ACEOF
22158
22159 fi
22160
22161 done
22162
22163         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wiredtiger_version in -lwiredtiger" >&5
22164 $as_echo_n "checking for wiredtiger_version in -lwiredtiger... " >&6; }
22165 if test "${ac_cv_lib_wiredtiger_wiredtiger_version+set}" = set; then :
22166   $as_echo_n "(cached) " >&6
22167 else
22168   ac_check_lib_save_LIBS=$LIBS
22169 LIBS="-lwiredtiger  $LIBS"
22170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22171 /* end confdefs.h.  */
22172
22173 /* Override any GCC internal prototype to avoid an error.
22174    Use char because int might match the return type of a GCC
22175    builtin and then its argument prototype would still apply.  */
22176 #ifdef __cplusplus
22177 extern "C"
22178 #endif
22179 char wiredtiger_version ();
22180 int
22181 main ()
22182 {
22183 return wiredtiger_version ();
22184   ;
22185   return 0;
22186 }
22187 _ACEOF
22188 if ac_fn_c_try_link "$LINENO"; then :
22189   ac_cv_lib_wiredtiger_wiredtiger_version=yes
22190 else
22191   ac_cv_lib_wiredtiger_wiredtiger_version=no
22192 fi
22193 rm -f core conftest.err conftest.$ac_objext \
22194     conftest$ac_exeext conftest.$ac_ext
22195 LIBS=$ac_check_lib_save_LIBS
22196 fi
22197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wiredtiger_wiredtiger_version" >&5
22198 $as_echo "$ac_cv_lib_wiredtiger_wiredtiger_version" >&6; }
22199 if test "x$ac_cv_lib_wiredtiger_wiredtiger_version" = x""yes; then :
22200   : ok
22201 else
22202
22203                 as_fn_error "could not locate wiredtiger library" "$LINENO" 5
22204
22205 fi
22206
22207         CFLAGS="$save_CFLAGS"
22208         CPPFLAGS="$save_CPPFLAGS"
22209         LDFLAGS="$save_LDFLAGS"
22210         SLAPD_LIBS="$SLAPD_LIBS \$(WT_LIBS)"
22211         ol_link_wt=yes
22212 fi
22213
22214 ol_icu=no
22215 for ac_header in unicode/utypes.h
22216 do :
22217   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22218 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22219 eval as_val=\$$as_ac_Header
22220    if test "x$as_val" = x""yes; then :
22221   cat >>confdefs.h <<_ACEOF
22222 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22223 _ACEOF
22224
22225 fi
22226
22227 done
22228
22229 if test $ac_cv_header_unicode_utypes_h = yes ; then
22230                 OL_ICULIBS="-licuuc -licudata"
22231
22232         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU libraries" >&5
22233 $as_echo_n "checking for ICU libraries... " >&6; }
22234 if test "${ol_cv_lib_icu+set}" = set; then :
22235   $as_echo_n "(cached) " >&6
22236 else
22237
22238                 ol_LIBS="$LIBS"
22239                 LIBS="$OL_ICULIBS $LIBS"
22240                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22241 /* end confdefs.h.  */
22242
22243 #include <unicode/utypes.h>
22244
22245 int
22246 main ()
22247 {
22248
22249 (void) u_errorName(0);
22250
22251   ;
22252   return 0;
22253 }
22254 _ACEOF
22255 if ac_fn_c_try_link "$LINENO"; then :
22256   ol_cv_lib_icu=yes
22257 else
22258   ol_cv_lib_icu=no
22259 fi
22260 rm -f core conftest.err conftest.$ac_objext \
22261     conftest$ac_exeext conftest.$ac_ext
22262                 LIBS="$ol_LIBS"
22263
22264 fi
22265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_icu" >&5
22266 $as_echo "$ol_cv_lib_icu" >&6; }
22267
22268         if test $ol_cv_lib_icu != no ; then
22269                 ol_icu="$OL_ICULIBS"
22270
22271 $as_echo "#define HAVE_ICU 1" >>confdefs.h
22272
22273         fi
22274 fi
22275
22276 if test "$ol_icu" = no ; then
22277         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ICU not available" >&5
22278 $as_echo "$as_me: WARNING: ICU not available" >&2;}
22279 else
22280         ICU_LIBS="$ol_icu"
22281 fi
22282 WITH_SASL=no
22283 ol_link_sasl=no
22284 ol_link_spasswd=no
22285 if test $ol_with_cyrus_sasl != no ; then
22286         for ac_header in sasl/sasl.h sasl.h
22287 do :
22288   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22289 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22290 eval as_val=\$$as_ac_Header
22291    if test "x$as_val" = x""yes; then :
22292   cat >>confdefs.h <<_ACEOF
22293 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22294 _ACEOF
22295
22296 fi
22297
22298 done
22299
22300
22301         if test $ac_cv_header_sasl_sasl_h = yes ||
22302            test $ac_cv_header_sasl_h = yes; then
22303                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
22304 $as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
22305 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then :
22306   $as_echo_n "(cached) " >&6
22307 else
22308   ac_check_lib_save_LIBS=$LIBS
22309 LIBS="-lsasl2  $LIBS"
22310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22311 /* end confdefs.h.  */
22312
22313 /* Override any GCC internal prototype to avoid an error.
22314    Use char because int might match the return type of a GCC
22315    builtin and then its argument prototype would still apply.  */
22316 #ifdef __cplusplus
22317 extern "C"
22318 #endif
22319 char sasl_client_init ();
22320 int
22321 main ()
22322 {
22323 return sasl_client_init ();
22324   ;
22325   return 0;
22326 }
22327 _ACEOF
22328 if ac_fn_c_try_link "$LINENO"; then :
22329   ac_cv_lib_sasl2_sasl_client_init=yes
22330 else
22331   ac_cv_lib_sasl2_sasl_client_init=no
22332 fi
22333 rm -f core conftest.err conftest.$ac_objext \
22334     conftest$ac_exeext conftest.$ac_ext
22335 LIBS=$ac_check_lib_save_LIBS
22336 fi
22337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
22338 $as_echo "$ac_cv_lib_sasl2_sasl_client_init" >&6; }
22339 if test "x$ac_cv_lib_sasl2_sasl_client_init" = x""yes; then :
22340   ol_link_sasl="-lsasl2"
22341 else
22342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl" >&5
22343 $as_echo_n "checking for sasl_client_init in -lsasl... " >&6; }
22344 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then :
22345   $as_echo_n "(cached) " >&6
22346 else
22347   ac_check_lib_save_LIBS=$LIBS
22348 LIBS="-lsasl  $LIBS"
22349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22350 /* end confdefs.h.  */
22351
22352 /* Override any GCC internal prototype to avoid an error.
22353    Use char because int might match the return type of a GCC
22354    builtin and then its argument prototype would still apply.  */
22355 #ifdef __cplusplus
22356 extern "C"
22357 #endif
22358 char sasl_client_init ();
22359 int
22360 main ()
22361 {
22362 return sasl_client_init ();
22363   ;
22364   return 0;
22365 }
22366 _ACEOF
22367 if ac_fn_c_try_link "$LINENO"; then :
22368   ac_cv_lib_sasl_sasl_client_init=yes
22369 else
22370   ac_cv_lib_sasl_sasl_client_init=no
22371 fi
22372 rm -f core conftest.err conftest.$ac_objext \
22373     conftest$ac_exeext conftest.$ac_ext
22374 LIBS=$ac_check_lib_save_LIBS
22375 fi
22376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl_sasl_client_init" >&5
22377 $as_echo "$ac_cv_lib_sasl_sasl_client_init" >&6; }
22378 if test "x$ac_cv_lib_sasl_sasl_client_init" = x""yes; then :
22379   ol_link_sasl="-lsasl"
22380 fi
22381
22382 fi
22383
22384         fi
22385
22386         if test $ol_link_sasl = no ; then
22387                 if test $ol_with_cyrus_sasl != auto ; then
22388                         as_fn_error "Could not locate Cyrus SASL" "$LINENO" 5
22389                 else
22390                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate Cyrus SASL" >&5
22391 $as_echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
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         else
22400                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Cyrus SASL library version" >&5
22401 $as_echo_n "checking Cyrus SASL library version... " >&6; }
22402 if test "${ol_cv_sasl_compat+set}" = set; then :
22403   $as_echo_n "(cached) " >&6
22404 else
22405
22406         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22407 /* end confdefs.h.  */
22408
22409 #ifdef HAVE_SASL_SASL_H
22410 #include <sasl/sasl.h>
22411 #else
22412 #include <sasl.h>
22413 #endif
22414
22415 /* Require 2.1.15+ */
22416 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22417         char *__sasl_compat = "2.2+ or better okay (we guess)";
22418 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22419         && SASL_VERSION_STEP >=15
22420         char *__sasl_compat = "2.1.15+ or better okay";
22421 #endif
22422
22423 _ACEOF
22424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22425   $EGREP "__sasl_compat" >/dev/null 2>&1; then :
22426   ol_cv_sasl_compat=yes
22427 else
22428   ol_cv_sasl_compat=no
22429 fi
22430 rm -f conftest*
22431
22432 fi
22433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sasl_compat" >&5
22434 $as_echo "$ol_cv_sasl_compat" >&6; }
22435
22436                 if test $ol_cv_sasl_compat = no ; then
22437                         ol_link_sasl=no
22438                         as_fn_error "Cyrus SASL library located but is incompatible" "$LINENO" 5
22439                 fi
22440
22441
22442 $as_echo "#define HAVE_CYRUS_SASL 1" >>confdefs.h
22443
22444                 SASL_LIBS="$ol_link_sasl"
22445                 if test $ol_enable_spasswd != no ; then
22446                         ol_link_spasswd=yes
22447                 fi
22448
22449                 ac_save_LIBS="$LIBS"
22450                 LIBS="$LIBS $ol_link_sasl"
22451                 ac_fn_c_check_func "$LINENO" "sasl_version" "ac_cv_func_sasl_version"
22452 if test "x$ac_cv_func_sasl_version" = x""yes; then :
22453
22454 $as_echo "#define HAVE_SASL_VERSION 1" >>confdefs.h
22455
22456 fi
22457
22458                 LIBS="$ac_save_LIBS"
22459
22460                 WITH_SASL=yes
22461         fi
22462
22463 else
22464         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22465 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22466         if test $ol_link_tls = no ; then
22467                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22468 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22469         fi
22470 fi
22471
22472 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
22473         dev=no
22474         if test -r /dev/urandom ; then
22475                 dev="/dev/urandom";
22476         elif test -r /idev/urandom ; then
22477                 dev="/idev/urandom";
22478         elif test -r /dev/srandom ; then
22479                 dev="/dev/srandom";
22480         elif test -r /dev/random ; then
22481                 dev="/dev/random";
22482         elif test -r /idev/random ; then
22483                 dev="/idev/random";
22484         fi
22485
22486         if test $dev != no ; then
22487
22488 cat >>confdefs.h <<_ACEOF
22489 #define URANDOM_DEVICE "$dev"
22490 _ACEOF
22491
22492         fi
22493 fi
22494
22495 ol_link_fetch=no
22496 if test $ol_with_fetch != no ; then
22497         ol_LIBS=$LIBS
22498 LIBS="-lfetch -lcom_err $LIBS"
22499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking fetch(3) library" >&5
22500 $as_echo_n "checking fetch(3) library... " >&6; }
22501 if test "${ol_cv_lib_fetch+set}" = set; then :
22502   $as_echo_n "(cached) " >&6
22503 else
22504
22505         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22506 /* end confdefs.h.  */
22507
22508 #ifdef HAVE_SYS_PARAM_H
22509 #include <sys/param.h>
22510 #endif
22511 #include <stdio.h>
22512 #include <fetch.h>
22513 int
22514 main ()
22515 {
22516 struct url *u = fetchParseURL("file:///");
22517   ;
22518   return 0;
22519 }
22520 _ACEOF
22521 if ac_fn_c_try_link "$LINENO"; then :
22522   ol_cv_lib_fetch=yes
22523 else
22524   ol_cv_lib_fetch=no
22525 fi
22526 rm -f core conftest.err conftest.$ac_objext \
22527     conftest$ac_exeext conftest.$ac_ext
22528 fi
22529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_fetch" >&5
22530 $as_echo "$ol_cv_lib_fetch" >&6; }
22531 LIBS=$ol_LIBS
22532 if test $ol_cv_lib_fetch != no ; then
22533         ol_link_fetch="-lfetch -lcom_err"
22534
22535 $as_echo "#define HAVE_FETCH 1" >>confdefs.h
22536
22537 fi
22538
22539
22540         if test $ol_cv_lib_fetch != no ; then
22541                 LIBS="$LIBS $ol_link_fetch"
22542                 ol_link_fetch=freebsd
22543
22544         elif test $ol_with_fetch != auto ; then
22545                 as_fn_error "no suitable API for --with-fetch=$ol_with_fetch" "$LINENO" 5
22546         fi
22547 fi
22548
22549 if test $ol_enable_crypt != no ; then
22550         save_LIBS="$LIBS"
22551         LIBS="$TLS_LIBS $LIBS"
22552
22553         ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
22554 if test "x$ac_cv_func_crypt" = x""yes; then :
22555   have_crypt=yes
22556 else
22557
22558                 LIBS="$save_LIBS"
22559                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
22560 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
22561 if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
22562   $as_echo_n "(cached) " >&6
22563 else
22564   ac_check_lib_save_LIBS=$LIBS
22565 LIBS="-lcrypt  $LIBS"
22566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22567 /* end confdefs.h.  */
22568
22569 /* Override any GCC internal prototype to avoid an error.
22570    Use char because int might match the return type of a GCC
22571    builtin and then its argument prototype would still apply.  */
22572 #ifdef __cplusplus
22573 extern "C"
22574 #endif
22575 char crypt ();
22576 int
22577 main ()
22578 {
22579 return crypt ();
22580   ;
22581   return 0;
22582 }
22583 _ACEOF
22584 if ac_fn_c_try_link "$LINENO"; then :
22585   ac_cv_lib_crypt_crypt=yes
22586 else
22587   ac_cv_lib_crypt_crypt=no
22588 fi
22589 rm -f core conftest.err conftest.$ac_objext \
22590     conftest$ac_exeext conftest.$ac_ext
22591 LIBS=$ac_check_lib_save_LIBS
22592 fi
22593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
22594 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
22595 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
22596   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22597                         have_crypt=yes
22598 else
22599   have_crypt=no
22600 fi
22601
22602 fi
22603
22604
22605         LIBS="$TLS_LIBS $LIBS"
22606         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt_r in -lcrypt" >&5
22607 $as_echo_n "checking for crypt_r in -lcrypt... " >&6; }
22608 if test "${ac_cv_lib_crypt_crypt_r+set}" = set; then :
22609   $as_echo_n "(cached) " >&6
22610 else
22611   ac_check_lib_save_LIBS=$LIBS
22612 LIBS="-lcrypt  $LIBS"
22613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22614 /* end confdefs.h.  */
22615
22616 /* Override any GCC internal prototype to avoid an error.
22617    Use char because int might match the return type of a GCC
22618    builtin and then its argument prototype would still apply.  */
22619 #ifdef __cplusplus
22620 extern "C"
22621 #endif
22622 char crypt_r ();
22623 int
22624 main ()
22625 {
22626 return crypt_r ();
22627   ;
22628   return 0;
22629 }
22630 _ACEOF
22631 if ac_fn_c_try_link "$LINENO"; then :
22632   ac_cv_lib_crypt_crypt_r=yes
22633 else
22634   ac_cv_lib_crypt_crypt_r=no
22635 fi
22636 rm -f core conftest.err conftest.$ac_objext \
22637     conftest$ac_exeext conftest.$ac_ext
22638 LIBS=$ac_check_lib_save_LIBS
22639 fi
22640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt_r" >&5
22641 $as_echo "$ac_cv_lib_crypt_crypt_r" >&6; }
22642 if test "x$ac_cv_lib_crypt_crypt_r" = x""yes; then :
22643   have_crypt_r=yes
22644 else
22645   have_crypt_r=no
22646 fi
22647
22648
22649         LIBS="$save_LIBS"
22650
22651         if test $have_crypt = yes ; then
22652
22653 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
22654
22655                 if test $have_crypt_r = yes ; then
22656
22657 $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
22658
22659                 fi
22660         else
22661                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find crypt" >&5
22662 $as_echo "$as_me: WARNING: could not find crypt" >&2;}
22663                 if test $ol_enable_crypt = yes ; then
22664                         as_fn_error "could not find crypt, select appropriate options or disable" "$LINENO" 5
22665                 fi
22666
22667                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling crypt support" >&5
22668 $as_echo "$as_me: WARNING: disabling crypt support" >&2;}
22669                 ol_enable_crypt=no
22670         fi
22671 fi
22672
22673 if test $ol_enable_proctitle != no ; then
22674         ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
22675 if test "x$ac_cv_func_setproctitle" = x""yes; then :
22676   have_setproctitle=yes
22677 else
22678
22679                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5
22680 $as_echo_n "checking for setproctitle in -lutil... " >&6; }
22681 if test "${ac_cv_lib_util_setproctitle+set}" = set; then :
22682   $as_echo_n "(cached) " >&6
22683 else
22684   ac_check_lib_save_LIBS=$LIBS
22685 LIBS="-lutil  $LIBS"
22686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22687 /* end confdefs.h.  */
22688
22689 /* Override any GCC internal prototype to avoid an error.
22690    Use char because int might match the return type of a GCC
22691    builtin and then its argument prototype would still apply.  */
22692 #ifdef __cplusplus
22693 extern "C"
22694 #endif
22695 char setproctitle ();
22696 int
22697 main ()
22698 {
22699 return setproctitle ();
22700   ;
22701   return 0;
22702 }
22703 _ACEOF
22704 if ac_fn_c_try_link "$LINENO"; then :
22705   ac_cv_lib_util_setproctitle=yes
22706 else
22707   ac_cv_lib_util_setproctitle=no
22708 fi
22709 rm -f core conftest.err conftest.$ac_objext \
22710     conftest$ac_exeext conftest.$ac_ext
22711 LIBS=$ac_check_lib_save_LIBS
22712 fi
22713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_setproctitle" >&5
22714 $as_echo "$ac_cv_lib_util_setproctitle" >&6; }
22715 if test "x$ac_cv_lib_util_setproctitle" = x""yes; then :
22716   have_setproctitle=yes
22717                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22718 else
22719   have_setproctitle=no
22720                         case " $LIBOBJS " in
22721   *" setproctitle.$ac_objext "* ) ;;
22722   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
22723  ;;
22724 esac
22725
22726                         LIBSRCS="$LIBSRCS setproctitle.c"
22727 fi
22728
22729 fi
22730
22731
22732         if test $have_setproctitle = yes ; then
22733
22734 $as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h
22735
22736         fi
22737 fi
22738
22739 if test $ol_enable_slp != no ; then
22740         for ac_header in slp.h
22741 do :
22742   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22743 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22744 eval as_val=\$$as_ac_Header
22745    if test "x$as_val" = x""yes; then :
22746   cat >>confdefs.h <<_ACEOF
22747 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22748 _ACEOF
22749
22750 fi
22751
22752 done
22753
22754
22755         if test $ac_cv_header_slp_h = yes ; then
22756                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLPOpen in -lslp" >&5
22757 $as_echo_n "checking for SLPOpen in -lslp... " >&6; }
22758 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then :
22759   $as_echo_n "(cached) " >&6
22760 else
22761   ac_check_lib_save_LIBS=$LIBS
22762 LIBS="-lslp  $LIBS"
22763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22764 /* end confdefs.h.  */
22765
22766 /* Override any GCC internal prototype to avoid an error.
22767    Use char because int might match the return type of a GCC
22768    builtin and then its argument prototype would still apply.  */
22769 #ifdef __cplusplus
22770 extern "C"
22771 #endif
22772 char SLPOpen ();
22773 int
22774 main ()
22775 {
22776 return SLPOpen ();
22777   ;
22778   return 0;
22779 }
22780 _ACEOF
22781 if ac_fn_c_try_link "$LINENO"; then :
22782   ac_cv_lib_slp_SLPOpen=yes
22783 else
22784   ac_cv_lib_slp_SLPOpen=no
22785 fi
22786 rm -f core conftest.err conftest.$ac_objext \
22787     conftest$ac_exeext conftest.$ac_ext
22788 LIBS=$ac_check_lib_save_LIBS
22789 fi
22790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slp_SLPOpen" >&5
22791 $as_echo "$ac_cv_lib_slp_SLPOpen" >&6; }
22792 if test "x$ac_cv_lib_slp_SLPOpen" = x""yes; then :
22793   have_slp=yes
22794 else
22795   have_slp=no
22796 fi
22797
22798                 if test $have_slp = yes ; then
22799
22800 $as_echo "#define HAVE_SLP 1" >>confdefs.h
22801
22802                         SLAPD_SLP_LIBS=-lslp
22803                 fi
22804
22805         elif test $ol_enable_slp = yes ; then
22806                 as_fn_error "SLP not found" "$LINENO" 5
22807         fi
22808 fi
22809
22810
22811 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
22812 if test "x$ac_cv_type_mode_t" = x""yes; then :
22813
22814 else
22815
22816 cat >>confdefs.h <<_ACEOF
22817 #define mode_t int
22818 _ACEOF
22819
22820 fi
22821
22822 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
22823 if test "x$ac_cv_type_off_t" = x""yes; then :
22824
22825 else
22826
22827 cat >>confdefs.h <<_ACEOF
22828 #define off_t long
22829 _ACEOF
22830
22831 fi
22832
22833 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
22834 if test "x$ac_cv_type_pid_t" = x""yes; then :
22835
22836 else
22837
22838 cat >>confdefs.h <<_ACEOF
22839 #define pid_t int
22840 _ACEOF
22841
22842 fi
22843
22844 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
22845 if test "x$ac_cv_type_ssize_t" = x""yes; then :
22846
22847 else
22848
22849 cat >>confdefs.h <<_ACEOF
22850 #define ssize_t signed int
22851 _ACEOF
22852
22853 fi
22854
22855 ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
22856 if test "x$ac_cv_type_caddr_t" = x""yes; then :
22857
22858 else
22859
22860 cat >>confdefs.h <<_ACEOF
22861 #define caddr_t char *
22862 _ACEOF
22863
22864 fi
22865
22866 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
22867 if test "x$ac_cv_type_size_t" = x""yes; then :
22868
22869 else
22870
22871 cat >>confdefs.h <<_ACEOF
22872 #define size_t unsigned
22873 _ACEOF
22874
22875 fi
22876
22877
22878 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
22879 if test "x$ac_cv_type_long_long" = x""yes; then :
22880
22881 cat >>confdefs.h <<_ACEOF
22882 #define HAVE_LONG_LONG 1
22883 _ACEOF
22884
22885
22886 fi
22887
22888 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
22889 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
22890
22891 cat >>confdefs.h <<_ACEOF
22892 #define HAVE_PTRDIFF_T 1
22893 _ACEOF
22894
22895
22896 fi
22897
22898
22899
22900 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default
22901 #ifdef HAVE_SYS_SOCKET_H
22902 #include <sys/socket.h>
22903 #endif
22904 "
22905 if test "x$ac_cv_type_socklen_t" = x""yes; then :
22906
22907 fi
22908
22909
22910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the type of arg 3 to accept()" >&5
22911 $as_echo_n "checking the type of arg 3 to accept()... " >&6; }
22912 if test "${ol_cv_type_ber_socklen_t+set}" = set; then :
22913   $as_echo_n "(cached) " >&6
22914 else
22915
22916         set socklen_t int unsigned "unsigned long" long size_t
22917         test "$ac_cv_type_socklen_t" = yes || shift
22918         ol_cv_type_ber_socklen_t=$1 guessing="guessing "
22919         for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
22920                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22921 /* end confdefs.h.  */
22922 $ac_includes_default
22923 #ifdef HAVE_SYS_SOCKET_H
22924 #include <sys/socket.h>
22925 #endif
22926 extern int accept(int s, $addrtype *ap, $lentype *lp);
22927
22928 int
22929 main ()
22930 {
22931
22932 accept(0, (struct sockaddr *) 0, ($lentype *) 0);
22933
22934   ;
22935   return 0;
22936 }
22937 _ACEOF
22938 if ac_fn_c_try_compile "$LINENO"; then :
22939   ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
22940 fi
22941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22942         done ; done
22943 fi
22944
22945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
22946 $as_echo "$guessing$ol_cv_type_ber_socklen_t *" >&6; }
22947
22948 cat >>confdefs.h <<_ACEOF
22949 #define ber_socklen_t $ol_cv_type_ber_socklen_t
22950 _ACEOF
22951
22952
22953 if test "$ac_cv_type_socklen_t" != yes; then
22954
22955 cat >>confdefs.h <<_ACEOF
22956 #define socklen_t $ol_cv_type_ber_socklen_t
22957 _ACEOF
22958
22959 fi
22960
22961
22962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
22963 $as_echo_n "checking return type of signal handlers... " >&6; }
22964 if test "${ac_cv_type_signal+set}" = set; then :
22965   $as_echo_n "(cached) " >&6
22966 else
22967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22968 /* end confdefs.h.  */
22969 #include <sys/types.h>
22970 #include <signal.h>
22971
22972 int
22973 main ()
22974 {
22975 return *(signal (0, 0)) (0) == 1;
22976   ;
22977   return 0;
22978 }
22979 _ACEOF
22980 if ac_fn_c_try_compile "$LINENO"; then :
22981   ac_cv_type_signal=int
22982 else
22983   ac_cv_type_signal=void
22984 fi
22985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22986 fi
22987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
22988 $as_echo "$ac_cv_type_signal" >&6; }
22989
22990 cat >>confdefs.h <<_ACEOF
22991 #define RETSIGTYPE $ac_cv_type_signal
22992 _ACEOF
22993
22994
22995
22996 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default
22997 #include <signal.h>
22998
22999 "
23000 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
23001
23002 else
23003
23004 cat >>confdefs.h <<_ACEOF
23005 #define sig_atomic_t int
23006 _ACEOF
23007
23008 fi
23009
23010
23011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
23012 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
23013 if test "${ac_cv_type_uid_t+set}" = set; then :
23014   $as_echo_n "(cached) " >&6
23015 else
23016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23017 /* end confdefs.h.  */
23018 #include <sys/types.h>
23019
23020 _ACEOF
23021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23022   $EGREP "uid_t" >/dev/null 2>&1; then :
23023   ac_cv_type_uid_t=yes
23024 else
23025   ac_cv_type_uid_t=no
23026 fi
23027 rm -f conftest*
23028
23029 fi
23030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
23031 $as_echo "$ac_cv_type_uid_t" >&6; }
23032 if test $ac_cv_type_uid_t = no; then
23033
23034 $as_echo "#define uid_t int" >>confdefs.h
23035
23036
23037 $as_echo "#define gid_t int" >>confdefs.h
23038
23039 fi
23040
23041
23042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
23043 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
23044 if test "${ac_cv_header_time+set}" = set; then :
23045   $as_echo_n "(cached) " >&6
23046 else
23047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23048 /* end confdefs.h.  */
23049 #include <sys/types.h>
23050 #include <sys/time.h>
23051 #include <time.h>
23052
23053 int
23054 main ()
23055 {
23056 if ((struct tm *) 0)
23057 return 0;
23058   ;
23059   return 0;
23060 }
23061 _ACEOF
23062 if ac_fn_c_try_compile "$LINENO"; then :
23063   ac_cv_header_time=yes
23064 else
23065   ac_cv_header_time=no
23066 fi
23067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23068 fi
23069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
23070 $as_echo "$ac_cv_header_time" >&6; }
23071 if test $ac_cv_header_time = yes; then
23072
23073 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
23074
23075 fi
23076
23077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
23078 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
23079 if test "${ac_cv_struct_tm+set}" = set; then :
23080   $as_echo_n "(cached) " >&6
23081 else
23082   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23083 /* end confdefs.h.  */
23084 #include <sys/types.h>
23085 #include <time.h>
23086
23087 int
23088 main ()
23089 {
23090 struct tm tm;
23091                                      int *p = &tm.tm_sec;
23092                                      return !p;
23093   ;
23094   return 0;
23095 }
23096 _ACEOF
23097 if ac_fn_c_try_compile "$LINENO"; then :
23098   ac_cv_struct_tm=time.h
23099 else
23100   ac_cv_struct_tm=sys/time.h
23101 fi
23102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23103 fi
23104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
23105 $as_echo "$ac_cv_struct_tm" >&6; }
23106 if test $ac_cv_struct_tm = sys/time.h; then
23107
23108 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
23109
23110 fi
23111
23112 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
23113 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
23114
23115 cat >>confdefs.h <<_ACEOF
23116 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
23117 _ACEOF
23118
23119
23120 fi
23121
23122 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "$ac_includes_default
23123 #include <pwd.h>
23124 "
23125 if test "x$ac_cv_member_struct_passwd_pw_gecos" = x""yes; then :
23126
23127 cat >>confdefs.h <<_ACEOF
23128 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
23129 _ACEOF
23130
23131
23132 fi
23133
23134 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "$ac_includes_default
23135 #include <pwd.h>
23136 "
23137 if test "x$ac_cv_member_struct_passwd_pw_passwd" = x""yes; then :
23138
23139 cat >>confdefs.h <<_ACEOF
23140 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
23141 _ACEOF
23142
23143
23144 fi
23145
23146
23147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if toupper() requires islower()" >&5
23148 $as_echo_n "checking if toupper() requires islower()... " >&6; }
23149 if test "${ol_cv_c_upper_lower+set}" = set; then :
23150   $as_echo_n "(cached) " >&6
23151 else
23152
23153         if test "$cross_compiling" = yes; then :
23154   ol_cv_c_upper_lower=safe
23155 else
23156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23157 /* end confdefs.h.  */
23158
23159 #include <ctype.h>
23160 main()
23161 {
23162         if ('C' == toupper('C'))
23163                 exit(0);
23164         else
23165                 exit(1);
23166 }
23167 _ACEOF
23168 if ac_fn_c_try_run "$LINENO"; then :
23169   ol_cv_c_upper_lower=no
23170 else
23171   ol_cv_c_upper_lower=yes
23172 fi
23173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23174   conftest.$ac_objext conftest.beam conftest.$ac_ext
23175 fi
23176
23177 fi
23178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_upper_lower" >&5
23179 $as_echo "$ol_cv_c_upper_lower" >&6; }
23180 if test $ol_cv_c_upper_lower != no ; then
23181
23182 $as_echo "#define C_UPPER_LOWER 1" >>confdefs.h
23183
23184 fi
23185
23186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
23187 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
23188 if test "${ac_cv_c_const+set}" = set; then :
23189   $as_echo_n "(cached) " >&6
23190 else
23191   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23192 /* end confdefs.h.  */
23193
23194 int
23195 main ()
23196 {
23197 /* FIXME: Include the comments suggested by Paul. */
23198 #ifndef __cplusplus
23199   /* Ultrix mips cc rejects this.  */
23200   typedef int charset[2];
23201   const charset cs;
23202   /* SunOS 4.1.1 cc rejects this.  */
23203   char const *const *pcpcc;
23204   char **ppc;
23205   /* NEC SVR4.0.2 mips cc rejects this.  */
23206   struct point {int x, y;};
23207   static struct point const zero = {0,0};
23208   /* AIX XL C 1.02.0.0 rejects this.
23209      It does not let you subtract one const X* pointer from another in
23210      an arm of an if-expression whose if-part is not a constant
23211      expression */
23212   const char *g = "string";
23213   pcpcc = &g + (g ? g-g : 0);
23214   /* HPUX 7.0 cc rejects these. */
23215   ++pcpcc;
23216   ppc = (char**) pcpcc;
23217   pcpcc = (char const *const *) ppc;
23218   { /* SCO 3.2v4 cc rejects this.  */
23219     char *t;
23220     char const *s = 0 ? (char *) 0 : (char const *) 0;
23221
23222     *t++ = 0;
23223     if (s) return 0;
23224   }
23225   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23226     int x[] = {25, 17};
23227     const int *foo = &x[0];
23228     ++foo;
23229   }
23230   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23231     typedef const int *iptr;
23232     iptr p = 0;
23233     ++p;
23234   }
23235   { /* AIX XL C 1.02.0.0 rejects this saying
23236        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23237     struct s { int j; const int *ap[3]; };
23238     struct s *b; b->j = 5;
23239   }
23240   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23241     const int foo = 10;
23242     if (!foo) return 0;
23243   }
23244   return !cs[0] && !zero.x;
23245 #endif
23246
23247   ;
23248   return 0;
23249 }
23250 _ACEOF
23251 if ac_fn_c_try_compile "$LINENO"; then :
23252   ac_cv_c_const=yes
23253 else
23254   ac_cv_c_const=no
23255 fi
23256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23257 fi
23258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
23259 $as_echo "$ac_cv_c_const" >&6; }
23260 if test $ac_cv_c_const = no; then
23261
23262 $as_echo "#define const /**/" >>confdefs.h
23263
23264 fi
23265
23266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler understands volatile" >&5
23267 $as_echo_n "checking if compiler understands volatile... " >&6; }
23268 if test "${ol_cv_c_volatile+set}" = set; then :
23269   $as_echo_n "(cached) " >&6
23270 else
23271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23272 /* end confdefs.h.  */
23273 int x, y, z;
23274 int
23275 main ()
23276 {
23277 volatile int a; int * volatile b = x ? &y : &z;
23278       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23279       *b = 0;
23280   ;
23281   return 0;
23282 }
23283 _ACEOF
23284 if ac_fn_c_try_compile "$LINENO"; then :
23285   ol_cv_c_volatile=yes
23286 else
23287   ol_cv_c_volatile=no
23288 fi
23289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23290 fi
23291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_volatile" >&5
23292 $as_echo "$ol_cv_c_volatile" >&6; }
23293   if test $ol_cv_c_volatile = yes; then
23294     :
23295   else
23296
23297 $as_echo "#define volatile /**/" >>confdefs.h
23298
23299   fi
23300
23301
23302 if test $cross_compiling = yes ; then
23303         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Crossing compiling... all bets are off!" >&5
23304 $as_echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
23305
23306 $as_echo "#define CROSS_COMPILING 1" >>confdefs.h
23307
23308 else
23309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
23310 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
23311 if test "${ac_cv_c_bigendian+set}" = set; then :
23312   $as_echo_n "(cached) " >&6
23313 else
23314   ac_cv_c_bigendian=unknown
23315     # See if we're dealing with a universal compiler.
23316     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23317 /* end confdefs.h.  */
23318 #ifndef __APPLE_CC__
23319                not a universal capable compiler
23320              #endif
23321              typedef int dummy;
23322
23323 _ACEOF
23324 if ac_fn_c_try_compile "$LINENO"; then :
23325
23326         # Check for potential -arch flags.  It is not universal unless
23327         # there are at least two -arch flags with different values.
23328         ac_arch=
23329         ac_prev=
23330         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
23331          if test -n "$ac_prev"; then
23332            case $ac_word in
23333              i?86 | x86_64 | ppc | ppc64)
23334                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
23335                  ac_arch=$ac_word
23336                else
23337                  ac_cv_c_bigendian=universal
23338                  break
23339                fi
23340                ;;
23341            esac
23342            ac_prev=
23343          elif test "x$ac_word" = "x-arch"; then
23344            ac_prev=arch
23345          fi
23346        done
23347 fi
23348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23349     if test $ac_cv_c_bigendian = unknown; then
23350       # See if sys/param.h defines the BYTE_ORDER macro.
23351       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23352 /* end confdefs.h.  */
23353 #include <sys/types.h>
23354              #include <sys/param.h>
23355
23356 int
23357 main ()
23358 {
23359 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23360                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23361                      && LITTLE_ENDIAN)
23362               bogus endian macros
23363              #endif
23364
23365   ;
23366   return 0;
23367 }
23368 _ACEOF
23369 if ac_fn_c_try_compile "$LINENO"; then :
23370   # It does; now see whether it defined to BIG_ENDIAN or not.
23371          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23372 /* end confdefs.h.  */
23373 #include <sys/types.h>
23374                 #include <sys/param.h>
23375
23376 int
23377 main ()
23378 {
23379 #if BYTE_ORDER != BIG_ENDIAN
23380                  not big endian
23381                 #endif
23382
23383   ;
23384   return 0;
23385 }
23386 _ACEOF
23387 if ac_fn_c_try_compile "$LINENO"; then :
23388   ac_cv_c_bigendian=yes
23389 else
23390   ac_cv_c_bigendian=no
23391 fi
23392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23393 fi
23394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23395     fi
23396     if test $ac_cv_c_bigendian = unknown; then
23397       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23398       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23399 /* end confdefs.h.  */
23400 #include <limits.h>
23401
23402 int
23403 main ()
23404 {
23405 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23406               bogus endian macros
23407              #endif
23408
23409   ;
23410   return 0;
23411 }
23412 _ACEOF
23413 if ac_fn_c_try_compile "$LINENO"; then :
23414   # It does; now see whether it defined to _BIG_ENDIAN or not.
23415          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23416 /* end confdefs.h.  */
23417 #include <limits.h>
23418
23419 int
23420 main ()
23421 {
23422 #ifndef _BIG_ENDIAN
23423                  not big endian
23424                 #endif
23425
23426   ;
23427   return 0;
23428 }
23429 _ACEOF
23430 if ac_fn_c_try_compile "$LINENO"; then :
23431   ac_cv_c_bigendian=yes
23432 else
23433   ac_cv_c_bigendian=no
23434 fi
23435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23436 fi
23437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23438     fi
23439     if test $ac_cv_c_bigendian = unknown; then
23440       # Compile a test program.
23441       if test "$cross_compiling" = yes; then :
23442   # Try to guess by grepping values from an object file.
23443          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23444 /* end confdefs.h.  */
23445 short int ascii_mm[] =
23446                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23447                 short int ascii_ii[] =
23448                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23449                 int use_ascii (int i) {
23450                   return ascii_mm[i] + ascii_ii[i];
23451                 }
23452                 short int ebcdic_ii[] =
23453                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23454                 short int ebcdic_mm[] =
23455                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23456                 int use_ebcdic (int i) {
23457                   return ebcdic_mm[i] + ebcdic_ii[i];
23458                 }
23459                 extern int foo;
23460
23461 int
23462 main ()
23463 {
23464 return use_ascii (foo) == use_ebcdic (foo);
23465   ;
23466   return 0;
23467 }
23468 _ACEOF
23469 if ac_fn_c_try_compile "$LINENO"; then :
23470   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
23471               ac_cv_c_bigendian=yes
23472             fi
23473             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23474               if test "$ac_cv_c_bigendian" = unknown; then
23475                 ac_cv_c_bigendian=no
23476               else
23477                 # finding both strings is unlikely to happen, but who knows?
23478                 ac_cv_c_bigendian=unknown
23479               fi
23480             fi
23481 fi
23482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23483 else
23484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23485 /* end confdefs.h.  */
23486 $ac_includes_default
23487 int
23488 main ()
23489 {
23490
23491              /* Are we little or big endian?  From Harbison&Steele.  */
23492              union
23493              {
23494                long int l;
23495                char c[sizeof (long int)];
23496              } u;
23497              u.l = 1;
23498              return u.c[sizeof (long int) - 1] == 1;
23499
23500   ;
23501   return 0;
23502 }
23503 _ACEOF
23504 if ac_fn_c_try_run "$LINENO"; then :
23505   ac_cv_c_bigendian=no
23506 else
23507   ac_cv_c_bigendian=yes
23508 fi
23509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23510   conftest.$ac_objext conftest.beam conftest.$ac_ext
23511 fi
23512
23513     fi
23514 fi
23515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
23516 $as_echo "$ac_cv_c_bigendian" >&6; }
23517  case $ac_cv_c_bigendian in #(
23518    yes)
23519      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
23520 ;; #(
23521    no)
23522       ;; #(
23523    universal)
23524
23525 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
23526
23527      ;; #(
23528    *)
23529      as_fn_error "unknown endianness
23530  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
23531  esac
23532
23533 fi
23534
23535 # The cast to long int works around a bug in the HP C Compiler
23536 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23537 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23538 # This bug is HP SR number 8606223364.
23539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23540 $as_echo_n "checking size of short... " >&6; }
23541 if test "${ac_cv_sizeof_short+set}" = set; then :
23542   $as_echo_n "(cached) " >&6
23543 else
23544   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23545
23546 else
23547   if test "$ac_cv_type_short" = yes; then
23548      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23549 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23550 { as_fn_set_status 77
23551 as_fn_error "cannot compute sizeof (short)
23552 See \`config.log' for more details." "$LINENO" 5; }; }
23553    else
23554      ac_cv_sizeof_short=0
23555    fi
23556 fi
23557
23558 fi
23559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23560 $as_echo "$ac_cv_sizeof_short" >&6; }
23561
23562
23563
23564 cat >>confdefs.h <<_ACEOF
23565 #define SIZEOF_SHORT $ac_cv_sizeof_short
23566 _ACEOF
23567
23568
23569 # The cast to long int works around a bug in the HP C Compiler
23570 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23571 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23572 # This bug is HP SR number 8606223364.
23573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23574 $as_echo_n "checking size of int... " >&6; }
23575 if test "${ac_cv_sizeof_int+set}" = set; then :
23576   $as_echo_n "(cached) " >&6
23577 else
23578   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23579
23580 else
23581   if test "$ac_cv_type_int" = yes; then
23582      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23583 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23584 { as_fn_set_status 77
23585 as_fn_error "cannot compute sizeof (int)
23586 See \`config.log' for more details." "$LINENO" 5; }; }
23587    else
23588      ac_cv_sizeof_int=0
23589    fi
23590 fi
23591
23592 fi
23593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23594 $as_echo "$ac_cv_sizeof_int" >&6; }
23595
23596
23597
23598 cat >>confdefs.h <<_ACEOF
23599 #define SIZEOF_INT $ac_cv_sizeof_int
23600 _ACEOF
23601
23602
23603 # The cast to long int works around a bug in the HP C Compiler
23604 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23605 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23606 # This bug is HP SR number 8606223364.
23607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23608 $as_echo_n "checking size of long... " >&6; }
23609 if test "${ac_cv_sizeof_long+set}" = set; then :
23610   $as_echo_n "(cached) " >&6
23611 else
23612   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23613
23614 else
23615   if test "$ac_cv_type_long" = yes; then
23616      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23617 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23618 { as_fn_set_status 77
23619 as_fn_error "cannot compute sizeof (long)
23620 See \`config.log' for more details." "$LINENO" 5; }; }
23621    else
23622      ac_cv_sizeof_long=0
23623    fi
23624 fi
23625
23626 fi
23627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23628 $as_echo "$ac_cv_sizeof_long" >&6; }
23629
23630
23631
23632 cat >>confdefs.h <<_ACEOF
23633 #define SIZEOF_LONG $ac_cv_sizeof_long
23634 _ACEOF
23635
23636
23637 # The cast to long int works around a bug in the HP C Compiler
23638 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23639 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23640 # This bug is HP SR number 8606223364.
23641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
23642 $as_echo_n "checking size of long long... " >&6; }
23643 if test "${ac_cv_sizeof_long_long+set}" = set; then :
23644   $as_echo_n "(cached) " >&6
23645 else
23646   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
23647
23648 else
23649   if test "$ac_cv_type_long_long" = yes; then
23650      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23651 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23652 { as_fn_set_status 77
23653 as_fn_error "cannot compute sizeof (long long)
23654 See \`config.log' for more details." "$LINENO" 5; }; }
23655    else
23656      ac_cv_sizeof_long_long=0
23657    fi
23658 fi
23659
23660 fi
23661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
23662 $as_echo "$ac_cv_sizeof_long_long" >&6; }
23663
23664
23665
23666 cat >>confdefs.h <<_ACEOF
23667 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
23668 _ACEOF
23669
23670
23671 # The cast to long int works around a bug in the HP C Compiler
23672 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23673 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23674 # This bug is HP SR number 8606223364.
23675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
23676 $as_echo_n "checking size of wchar_t... " >&6; }
23677 if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
23678   $as_echo_n "(cached) " >&6
23679 else
23680   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "$ac_includes_default"; then :
23681
23682 else
23683   if test "$ac_cv_type_wchar_t" = yes; then
23684      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23685 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23686 { as_fn_set_status 77
23687 as_fn_error "cannot compute sizeof (wchar_t)
23688 See \`config.log' for more details." "$LINENO" 5; }; }
23689    else
23690      ac_cv_sizeof_wchar_t=0
23691    fi
23692 fi
23693
23694 fi
23695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
23696 $as_echo "$ac_cv_sizeof_wchar_t" >&6; }
23697
23698
23699
23700 cat >>confdefs.h <<_ACEOF
23701 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23702 _ACEOF
23703
23704
23705
23706 if test "$ac_cv_sizeof_int" -lt 4 ; then
23707         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
23708 $as_echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
23709
23710
23711 $as_echo "#define LBER_INT_T long" >>confdefs.h
23712
23713 else
23714
23715 $as_echo "#define LBER_INT_T int" >>confdefs.h
23716
23717 fi
23718
23719
23720 $as_echo "#define LBER_LEN_T long" >>confdefs.h
23721
23722
23723 $as_echo "#define LBER_SOCKET_T int" >>confdefs.h
23724
23725
23726 $as_echo "#define LBER_TAG_T long" >>confdefs.h
23727
23728
23729 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
23730         if test $ac_cv_sizeof_long_long -gt 4 ; then
23731                 ol_with_mp=longlong
23732
23733 $as_echo "#define USE_MP_LONG_LONG 1" >>confdefs.h
23734
23735         elif test $ol_with_mp = longlong ; then
23736                 as_fn_error "long long unusable for multiple precision" "$LINENO" 5
23737         fi
23738 fi
23739 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
23740         if test $ac_cv_sizeof_long -gt 4 ; then
23741                 ol_with_mp=long
23742
23743 $as_echo "#define USE_MP_LONG 1" >>confdefs.h
23744
23745         elif test $ol_with_mp = long ; then
23746                 as_fn_error "long unusable for multiple precision" "$LINENO" 5
23747         fi
23748 fi
23749 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
23750         for ac_header in openssl/bn.h
23751 do :
23752   ac_fn_c_check_header_mongrel "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default"
23753 if test "x$ac_cv_header_openssl_bn_h" = x""yes; then :
23754   cat >>confdefs.h <<_ACEOF
23755 #define HAVE_OPENSSL_BN_H 1
23756 _ACEOF
23757
23758 fi
23759
23760 done
23761
23762         for ac_header in openssl/crypto.h
23763 do :
23764   ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
23765 if test "x$ac_cv_header_openssl_crypto_h" = x""yes; then :
23766   cat >>confdefs.h <<_ACEOF
23767 #define HAVE_OPENSSL_CRYPTO_H 1
23768 _ACEOF
23769
23770 fi
23771
23772 done
23773
23774         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
23775                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
23776                 test "$ol_with_tls" = "found" ; then
23777                 ol_with_mp=bignum
23778
23779 $as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h
23780
23781         elif test $ol_with_mp = bignum ; then
23782                 as_fn_error "bignum not available" "$LINENO" 5
23783         fi
23784 fi
23785 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
23786         for ac_header in gmp.h
23787 do :
23788   ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
23789 if test "x$ac_cv_header_gmp_h" = x""yes; then :
23790   cat >>confdefs.h <<_ACEOF
23791 #define HAVE_GMP_H 1
23792 _ACEOF
23793
23794 fi
23795
23796 done
23797
23798         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_add_ui in -lgmp" >&5
23799 $as_echo_n "checking for __gmpz_add_ui in -lgmp... " >&6; }
23800 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then :
23801   $as_echo_n "(cached) " >&6
23802 else
23803   ac_check_lib_save_LIBS=$LIBS
23804 LIBS="-lgmp  $LIBS"
23805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23806 /* end confdefs.h.  */
23807
23808 /* Override any GCC internal prototype to avoid an error.
23809    Use char because int might match the return type of a GCC
23810    builtin and then its argument prototype would still apply.  */
23811 #ifdef __cplusplus
23812 extern "C"
23813 #endif
23814 char __gmpz_add_ui ();
23815 int
23816 main ()
23817 {
23818 return __gmpz_add_ui ();
23819   ;
23820   return 0;
23821 }
23822 _ACEOF
23823 if ac_fn_c_try_link "$LINENO"; then :
23824   ac_cv_lib_gmp___gmpz_add_ui=yes
23825 else
23826   ac_cv_lib_gmp___gmpz_add_ui=no
23827 fi
23828 rm -f core conftest.err conftest.$ac_objext \
23829     conftest$ac_exeext conftest.$ac_ext
23830 LIBS=$ac_check_lib_save_LIBS
23831 fi
23832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
23833 $as_echo "$ac_cv_lib_gmp___gmpz_add_ui" >&6; }
23834 if test "x$ac_cv_lib_gmp___gmpz_add_ui" = x""yes; then :
23835   cat >>confdefs.h <<_ACEOF
23836 #define HAVE_LIBGMP 1
23837 _ACEOF
23838
23839   LIBS="-lgmp $LIBS"
23840
23841 fi
23842
23843         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
23844
23845 $as_echo "#define USE_MP_GMP 1" >>confdefs.h
23846
23847                 ol_with_mp=gmp
23848         elif test $ol_with_mp = gmp ; then
23849                 as_fn_error "gmp not available" "$LINENO" 5
23850         fi
23851 fi
23852 if test $ol_with_mp = auto ; then
23853         ol_with_mp=no
23854 fi
23855
23856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
23857 $as_echo_n "checking for working memcmp... " >&6; }
23858 if test "${ac_cv_func_memcmp_working+set}" = set; then :
23859   $as_echo_n "(cached) " >&6
23860 else
23861   if test "$cross_compiling" = yes; then :
23862   ac_cv_func_memcmp_working=no
23863 else
23864   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23865 /* end confdefs.h.  */
23866 $ac_includes_default
23867 int
23868 main ()
23869 {
23870
23871   /* Some versions of memcmp are not 8-bit clean.  */
23872   char c0 = '\100', c1 = '\200', c2 = '\201';
23873   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
23874     return 1;
23875
23876   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
23877      or more and with at least one buffer not starting on a 4-byte boundary.
23878      William Lewis provided this test program.   */
23879   {
23880     char foo[21];
23881     char bar[21];
23882     int i;
23883     for (i = 0; i < 4; i++)
23884       {
23885         char *a = foo + i;
23886         char *b = bar + i;
23887         strcpy (a, "--------01111111");
23888         strcpy (b, "--------10000000");
23889         if (memcmp (a, b, 16) >= 0)
23890           return 1;
23891       }
23892     return 0;
23893   }
23894
23895   ;
23896   return 0;
23897 }
23898 _ACEOF
23899 if ac_fn_c_try_run "$LINENO"; then :
23900   ac_cv_func_memcmp_working=yes
23901 else
23902   ac_cv_func_memcmp_working=no
23903 fi
23904 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23905   conftest.$ac_objext conftest.beam conftest.$ac_ext
23906 fi
23907
23908 fi
23909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
23910 $as_echo "$ac_cv_func_memcmp_working" >&6; }
23911 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
23912   *" memcmp.$ac_objext "* ) ;;
23913   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
23914  ;;
23915 esac
23916
23917
23918
23919 if test $ac_cv_func_memcmp_working = no ; then
23920
23921 $as_echo "#define NEED_MEMCMP_REPLACEMENT 1" >>confdefs.h
23922
23923 fi
23924
23925 for ac_func in strftime
23926 do :
23927   ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23928 if test "x$ac_cv_func_strftime" = x""yes; then :
23929   cat >>confdefs.h <<_ACEOF
23930 #define HAVE_STRFTIME 1
23931 _ACEOF
23932
23933 else
23934   # strftime is in -lintl on SCO UNIX.
23935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
23936 $as_echo_n "checking for strftime in -lintl... " >&6; }
23937 if test "${ac_cv_lib_intl_strftime+set}" = set; then :
23938   $as_echo_n "(cached) " >&6
23939 else
23940   ac_check_lib_save_LIBS=$LIBS
23941 LIBS="-lintl  $LIBS"
23942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23943 /* end confdefs.h.  */
23944
23945 /* Override any GCC internal prototype to avoid an error.
23946    Use char because int might match the return type of a GCC
23947    builtin and then its argument prototype would still apply.  */
23948 #ifdef __cplusplus
23949 extern "C"
23950 #endif
23951 char strftime ();
23952 int
23953 main ()
23954 {
23955 return strftime ();
23956   ;
23957   return 0;
23958 }
23959 _ACEOF
23960 if ac_fn_c_try_link "$LINENO"; then :
23961   ac_cv_lib_intl_strftime=yes
23962 else
23963   ac_cv_lib_intl_strftime=no
23964 fi
23965 rm -f core conftest.err conftest.$ac_objext \
23966     conftest$ac_exeext conftest.$ac_ext
23967 LIBS=$ac_check_lib_save_LIBS
23968 fi
23969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
23970 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
23971 if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
23972   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
23973
23974 LIBS="-lintl $LIBS"
23975 fi
23976
23977 fi
23978 done
23979
23980
23981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton()" >&5
23982 $as_echo_n "checking for inet_aton()... " >&6; }
23983 if test "${ol_cv_func_inet_aton+set}" = set; then :
23984   $as_echo_n "(cached) " >&6
23985 else
23986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23987 /* end confdefs.h.  */
23988
23989 #ifdef HAVE_SYS_TYPES_H
23990 #       include <sys/types.h>
23991 #endif
23992 #ifdef HAVE_SYS_SOCKET_H
23993 #       include <sys/socket.h>
23994 #       ifdef HAVE_SYS_SELECT_H
23995 #               include <sys/select.h>
23996 #       endif
23997 #       include <netinet/in.h>
23998 #       ifdef HAVE_ARPA_INET_H
23999 #               include <arpa/inet.h>
24000 #       endif
24001 #endif
24002
24003 int
24004 main ()
24005 {
24006 struct in_addr in;
24007 int rc = inet_aton( "255.255.255.255", &in );
24008   ;
24009   return 0;
24010 }
24011 _ACEOF
24012 if ac_fn_c_try_link "$LINENO"; then :
24013   ol_cv_func_inet_aton=yes
24014 else
24015   ol_cv_func_inet_aton=no
24016 fi
24017 rm -f core conftest.err conftest.$ac_objext \
24018     conftest$ac_exeext conftest.$ac_ext
24019 fi
24020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_inet_aton" >&5
24021 $as_echo "$ol_cv_func_inet_aton" >&6; }
24022   if test $ol_cv_func_inet_aton != no; then
24023
24024 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
24025
24026   fi
24027
24028
24029 ac_fn_c_check_func "$LINENO" "_spawnlp" "ac_cv_func__spawnlp"
24030 if test "x$ac_cv_func__spawnlp" = x""yes; then :
24031
24032 $as_echo "#define HAVE_SPAWNLP 1" >>confdefs.h
24033
24034 fi
24035
24036
24037 ac_fn_c_check_func "$LINENO" "_snprintf" "ac_cv_func__snprintf"
24038 if test "x$ac_cv_func__snprintf" = x""yes; then :
24039   ac_cv_func_snprintf=yes
24040
24041 $as_echo "#define snprintf _snprintf" >>confdefs.h
24042
24043
24044 fi
24045
24046
24047 for ac_func in vsnprintf _vsnprintf
24048 do :
24049   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24050 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24051 eval as_val=\$$as_ac_var
24052    if test "x$as_val" = x""yes; then :
24053   cat >>confdefs.h <<_ACEOF
24054 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24055 _ACEOF
24056
24057 fi
24058 done
24059
24060
24061 if test $ac_cv_func_vsnprintf = no -a $ac_cv_func__vsnprintf = yes ; then
24062         ac_cv_func_vsnprintf=yes
24063
24064 $as_echo "#define vsnprintf _vsnprintf" >>confdefs.h
24065
24066 fi
24067
24068 for ac_func in vprintf
24069 do :
24070   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
24071 if test "x$ac_cv_func_vprintf" = x""yes; then :
24072   cat >>confdefs.h <<_ACEOF
24073 #define HAVE_VPRINTF 1
24074 _ACEOF
24075
24076 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
24077 if test "x$ac_cv_func__doprnt" = x""yes; then :
24078
24079 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
24080
24081 fi
24082
24083 fi
24084 done
24085
24086
24087
24088 if test $ac_cv_func_vprintf = yes ; then
24089                 for ac_func in snprintf vsnprintf
24090 do :
24091   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24092 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24093 eval as_val=\$$as_ac_var
24094    if test "x$as_val" = x""yes; then :
24095   cat >>confdefs.h <<_ACEOF
24096 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24097 _ACEOF
24098
24099 fi
24100 done
24101
24102 fi
24103
24104 for ac_func in \
24105         bcopy                   \
24106         closesocket             \
24107         chroot                  \
24108         endgrent                \
24109         endpwent                \
24110         fcntl                   \
24111         flock                   \
24112         fstat                   \
24113         getdtablesize           \
24114         geteuid                 \
24115         getgrgid                \
24116         gethostname             \
24117         getpassphrase           \
24118         getpwuid                \
24119         getpwnam                \
24120         getspnam                \
24121         gettimeofday            \
24122         initgroups              \
24123         inet_ntoa_b             \
24124         ioctl                   \
24125         lockf                   \
24126         memcpy                  \
24127         memmove                 \
24128         memrchr                 \
24129         mkstemp                 \
24130         mktemp                  \
24131         pipe                    \
24132         read                    \
24133         recv                    \
24134         recvfrom                \
24135         setpwfile               \
24136         setgid                  \
24137         setegid                 \
24138         setsid                  \
24139         setuid                  \
24140         seteuid                 \
24141         signal                  \
24142         strdup                  \
24143         strpbrk                 \
24144         strrchr                 \
24145         strsep                  \
24146         strstr                  \
24147         strtol                  \
24148         strtoul                 \
24149         strtoq                  \
24150         strtouq                 \
24151         strtoll                 \
24152         strtoull                \
24153         strspn                  \
24154         sysconf                 \
24155         waitpid                 \
24156         wait4                   \
24157         write                   \
24158         send                    \
24159         sendmsg                 \
24160         sendto                  \
24161
24162 do :
24163   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24164 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24165 eval as_val=\$$as_ac_var
24166    if test "x$as_val" = x""yes; then :
24167   cat >>confdefs.h <<_ACEOF
24168 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24169 _ACEOF
24170
24171 fi
24172 done
24173
24174
24175 for ac_func in getopt getpeereid
24176 do :
24177   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24178 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24179 eval as_val=\$$as_ac_var
24180    if test "x$as_val" = x""yes; then :
24181   cat >>confdefs.h <<_ACEOF
24182 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24183 _ACEOF
24184
24185 else
24186   case " $LIBOBJS " in
24187   *" $ac_func.$ac_objext "* ) ;;
24188   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
24189  ;;
24190 esac
24191
24192 fi
24193 done
24194
24195
24196
24197 if test "$ac_cv_func_getopt" != yes; then
24198         LIBSRCS="$LIBSRCS getopt.c"
24199 fi
24200
24201 if test "$ac_cv_func_getpeereid" != yes; then
24202         for ac_func in getpeerucred
24203 do :
24204   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24205 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24206 eval as_val=\$$as_ac_var
24207    if test "x$as_val" = x""yes; then :
24208   cat >>confdefs.h <<_ACEOF
24209 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24210 _ACEOF
24211
24212 fi
24213 done
24214
24215         if test "$ac_cv_func_getpeerucred" != yes ; then
24216                 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrightslen" "ac_cv_member_struct_msghdr_msg_accrightslen" "$ac_includes_default
24217 #ifdef HAVE_SYS_SOCKET_H
24218 #include <sys/socket.h>
24219 #endif
24220 "
24221 if test "x$ac_cv_member_struct_msghdr_msg_accrightslen" = x""yes; then :
24222
24223 cat >>confdefs.h <<_ACEOF
24224 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
24225 _ACEOF
24226
24227
24228 fi
24229
24230                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
24231                         ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "$ac_includes_default
24232 #ifdef HAVE_SYS_SOCKET_H
24233 #include <sys/socket.h>
24234 #endif
24235 "
24236 if test "x$ac_cv_member_struct_msghdr_msg_control" = x""yes; then :
24237
24238 cat >>confdefs.h <<_ACEOF
24239 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
24240 _ACEOF
24241
24242
24243 fi
24244
24245                 fi
24246                 ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default"
24247 if test "x$ac_cv_member_struct_stat_st_fstype" = x""yes; then :
24248
24249 cat >>confdefs.h <<_ACEOF
24250 #define HAVE_STRUCT_STAT_ST_FSTYPE 1
24251 _ACEOF
24252
24253
24254 fi
24255 ac_fn_c_check_member "$LINENO" "struct stat" "st_vfstype" "ac_cv_member_struct_stat_st_vfstype" "$ac_includes_default"
24256 if test "x$ac_cv_member_struct_stat_st_vfstype" = x""yes; then :
24257
24258 cat >>confdefs.h <<_ACEOF
24259 #define HAVE_STRUCT_STAT_ST_VFSTYPE 1
24260 _ACEOF
24261
24262
24263 fi
24264
24265                 if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
24266                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24267 /* end confdefs.h.  */
24268 struct stat st; char *ptr=st.st_fstype;
24269 _ACEOF
24270 if ac_fn_c_try_compile "$LINENO"; then :
24271
24272 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1" >>confdefs.h
24273
24274 else
24275
24276 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1" >>confdefs.h
24277
24278 fi
24279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24280                 fi
24281         fi
24282         LIBSRCS="$LIBSRCS getpeereid.c"
24283 fi
24284
24285 if test "$ac_cv_func_snprintf" != yes ||
24286    test "$ac_cv_func_vsnprintf" != yes; then
24287         if test "$ac_cv_func_snprintf" != yes; then
24288
24289 $as_echo "#define snprintf ber_pvt_snprintf" >>confdefs.h
24290
24291         fi
24292         if test "$ac_cv_func_vsnprintf" != yes; then
24293
24294 $as_echo "#define vsnprintf ber_pvt_vsnprintf" >>confdefs.h
24295
24296         fi
24297 fi
24298
24299
24300 if test "$ol_enable_slapi" != no ; then
24301                         for ac_header in ltdl.h
24302 do :
24303   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
24304 if test "x$ac_cv_header_ltdl_h" = x""yes; then :
24305   cat >>confdefs.h <<_ACEOF
24306 #define HAVE_LTDL_H 1
24307 _ACEOF
24308
24309 fi
24310
24311 done
24312
24313
24314         if test $ac_cv_header_ltdl_h != yes ; then
24315                 as_fn_error "could not locate <ltdl.h>" "$LINENO" 5
24316         fi
24317         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
24318 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
24319 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
24320   $as_echo_n "(cached) " >&6
24321 else
24322   ac_check_lib_save_LIBS=$LIBS
24323 LIBS="-lltdl  $LIBS"
24324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24325 /* end confdefs.h.  */
24326
24327 /* Override any GCC internal prototype to avoid an error.
24328    Use char because int might match the return type of a GCC
24329    builtin and then its argument prototype would still apply.  */
24330 #ifdef __cplusplus
24331 extern "C"
24332 #endif
24333 char lt_dlinit ();
24334 int
24335 main ()
24336 {
24337 return lt_dlinit ();
24338   ;
24339   return 0;
24340 }
24341 _ACEOF
24342 if ac_fn_c_try_link "$LINENO"; then :
24343   ac_cv_lib_ltdl_lt_dlinit=yes
24344 else
24345   ac_cv_lib_ltdl_lt_dlinit=no
24346 fi
24347 rm -f core conftest.err conftest.$ac_objext \
24348     conftest$ac_exeext conftest.$ac_ext
24349 LIBS=$ac_check_lib_save_LIBS
24350 fi
24351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
24352 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
24353 if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
24354
24355                 SLAPI_LIBS=-lltdl
24356                 LIBSLAPI=slapi/libslapi.la
24357
24358 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
24359
24360
24361 else
24362   as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
24363 fi
24364
24365
24366
24367 $as_echo "#define LDAP_SLAPI 1" >>confdefs.h
24368
24369 fi
24370
24371 if test "$ol_enable_debug" != no ; then
24372         if test "$ol_enable_debug" = traditional; then
24373
24374 $as_echo "#define OLD_DEBUG 1" >>confdefs.h
24375
24376         fi
24377
24378 $as_echo "#define LDAP_DEBUG 1" >>confdefs.h
24379
24380 fi
24381 if test "$ol_enable_syslog" = yes ; then
24382
24383 $as_echo "#define LDAP_SYSLOG 1" >>confdefs.h
24384
24385 fi
24386 if test "$ol_enable_proctitle" != no ; then
24387
24388 $as_echo "#define LDAP_PROCTITLE 1" >>confdefs.h
24389
24390 fi
24391 if test "$ol_enable_referrals" != no ; then
24392
24393 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION" >>confdefs.h
24394
24395 fi
24396 if test "$ol_enable_local" != no; then
24397
24398 $as_echo "#define LDAP_PF_LOCAL 1" >>confdefs.h
24399
24400 fi
24401 if test "$ol_link_ipv6" != no; then
24402
24403 $as_echo "#define LDAP_PF_INET6 1" >>confdefs.h
24404
24405 fi
24406 if test "$ol_enable_cleartext" != no ; then
24407
24408 $as_echo "#define SLAPD_CLEARTEXT 1" >>confdefs.h
24409
24410 fi
24411 if test "$ol_enable_crypt" != no ; then
24412
24413 $as_echo "#define SLAPD_CRYPT 1" >>confdefs.h
24414
24415 fi
24416 if test "$ol_link_spasswd" != no ; then
24417
24418 $as_echo "#define SLAPD_SPASSWD 1" >>confdefs.h
24419
24420 fi
24421 if test "$ol_enable_rlookups" != no ; then
24422
24423 $as_echo "#define SLAPD_RLOOKUPS 1" >>confdefs.h
24424
24425 fi
24426 if test "$ol_enable_aci" != no ; then
24427         if test $ol_enable_dynacl = no ; then
24428                 ol_enable_dynacl=yes
24429                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ACIs need dynacl" >&5
24430 $as_echo "$as_me: WARNING: ACIs need dynacl" >&2;}
24431         fi
24432         if test "$ol_enable_aci" = mod ; then
24433                 MFLAG=SLAPD_MOD_DYNAMIC
24434                                 as_fn_error "ACI build as dynamic module not supported (yet)" "$LINENO" 5
24435         else
24436                 MFLAG=SLAPD_MOD_STATIC
24437         fi
24438         WITH_ACI_ENABLED=$ol_enable_aci
24439
24440 cat >>confdefs.h <<_ACEOF
24441 #define SLAPD_ACI_ENABLED $MFLAG
24442 _ACEOF
24443
24444 else
24445         WITH_ACI_ENABLED=no
24446 fi
24447 if test "$ol_enable_dynacl" != no ; then
24448
24449 $as_echo "#define SLAP_DYNACL 1" >>confdefs.h
24450
24451 fi
24452
24453 if test "$ol_link_modules" != no ; then
24454
24455 $as_echo "#define SLAPD_MODULES 1" >>confdefs.h
24456
24457         BUILD_SLAPD=yes
24458         SLAPD_MODULES_LDFLAGS="-dlopen self"
24459 fi
24460
24461
24462 $as_echo "#define SLAPD_MOD_STATIC 1" >>confdefs.h
24463
24464
24465 $as_echo "#define SLAPD_MOD_DYNAMIC 2" >>confdefs.h
24466
24467
24468 if test "$ol_enable_monitor" != no ; then
24469         BUILD_SLAPD=yes
24470         BUILD_MONITOR=$ol_enable_monitor
24471         if test "$ol_enable_monitor" = mod ; then
24472                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24473                 MFLAG=SLAPD_MOD_DYNAMIC
24474         else
24475                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24476                 MFLAG=SLAPD_MOD_STATIC
24477         fi
24478
24479 cat >>confdefs.h <<_ACEOF
24480 #define SLAPD_MONITOR $MFLAG
24481 _ACEOF
24482
24483 fi
24484
24485 if test "$ol_enable_bdb" != no ; then
24486         BUILD_SLAPD=yes
24487         BUILD_BDB=$ol_enable_bdb
24488         if test "$ol_enable_bdb" = mod ; then
24489                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24490                 MFLAG=SLAPD_MOD_DYNAMIC
24491         else
24492                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24493                 MFLAG=SLAPD_MOD_STATIC
24494         fi
24495
24496 cat >>confdefs.h <<_ACEOF
24497 #define SLAPD_BDB $MFLAG
24498 _ACEOF
24499
24500 fi
24501
24502 if test "$ol_enable_dnssrv" != no ; then
24503         BUILD_SLAPD=yes
24504         BUILD_DNSSRV=$ol_enable_dnssrv
24505         if test "$ol_enable_dnssrv" = mod ; then
24506                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24507                 MFLAG=SLAPD_MOD_DYNAMIC
24508         else
24509                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24510                 MFLAG=SLAPD_MOD_STATIC
24511         fi
24512
24513 cat >>confdefs.h <<_ACEOF
24514 #define SLAPD_DNSSRV $MFLAG
24515 _ACEOF
24516
24517 fi
24518
24519 if test "$ol_enable_hdb" != no ; then
24520         BUILD_SLAPD=yes
24521         BUILD_HDB=$ol_enable_hdb
24522         if test "$ol_enable_hdb" = mod ; then
24523                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24524                 MFLAG=SLAPD_MOD_DYNAMIC
24525         else
24526                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24527                 MFLAG=SLAPD_MOD_STATIC
24528         fi
24529
24530 cat >>confdefs.h <<_ACEOF
24531 #define SLAPD_HDB $MFLAG
24532 _ACEOF
24533
24534 fi
24535
24536 if test "$ol_enable_ldap" != no ; then
24537         BUILD_SLAPD=yes
24538         BUILD_LDAP=$ol_enable_ldap
24539         if test "$ol_enable_ldap" = mod ; then
24540                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24541                 MFLAG=SLAPD_MOD_DYNAMIC
24542         else
24543                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24544                 MFLAG=SLAPD_MOD_STATIC
24545         fi
24546
24547 cat >>confdefs.h <<_ACEOF
24548 #define SLAPD_LDAP $MFLAG
24549 _ACEOF
24550
24551 fi
24552
24553 if test "$ol_enable_mdb" != no ; then
24554         BUILD_SLAPD=yes
24555         BUILD_MDB=$ol_enable_mdb
24556         if test "$ol_enable_mdb" = mod ; then
24557                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-mdb"
24558                 MFLAG=SLAPD_MOD_DYNAMIC
24559         else
24560                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-mdb"
24561                 MFLAG=SLAPD_MOD_STATIC
24562         fi
24563
24564 cat >>confdefs.h <<_ACEOF
24565 #define SLAPD_MDB $MFLAG
24566 _ACEOF
24567
24568 fi
24569
24570 if test "$ol_enable_meta" != no ; then
24571         BUILD_SLAPD=yes
24572         BUILD_META=$ol_enable_meta
24573         BUILD_REWRITE=yes
24574         if test "$ol_enable_meta" = mod ; then
24575                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24576                 MFLAG=SLAPD_MOD_DYNAMIC
24577         else
24578                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24579                 MFLAG=SLAPD_MOD_STATIC
24580         fi
24581
24582 cat >>confdefs.h <<_ACEOF
24583 #define SLAPD_META $MFLAG
24584 _ACEOF
24585
24586 fi
24587
24588 if test "$ol_enable_asyncmeta" != no ; then
24589         BUILD_SLAPD=yes
24590         BUILD_ASYNCMETA=$ol_enable_asyncmeta
24591         BUILD_REWRITE=yes
24592         if test "$ol_enable_asyncmeta" = mod ; then
24593                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-asyncmeta"
24594                 MFLAG=SLAPD_MOD_DYNAMIC
24595         else
24596                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-asyncmeta"
24597                 MFLAG=SLAPD_MOD_STATIC
24598         fi
24599
24600 cat >>confdefs.h <<_ACEOF
24601 #define SLAPD_ASYNCMETA $MFLAG
24602 _ACEOF
24603
24604 fi
24605
24606 if test "$ol_enable_ndb" != no ; then
24607         BUILD_SLAPD=yes
24608         BUILD_NDB=$ol_enable_ndb
24609         if test "$ol_enable_ndb" = mod ; then
24610                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ndb"
24611                 MFLAG=SLAPD_MOD_DYNAMIC
24612         else
24613                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ndb"
24614                 MFLAG=SLAPD_MOD_STATIC
24615         fi
24616
24617 cat >>confdefs.h <<_ACEOF
24618 #define SLAPD_NDB $MFLAG
24619 _ACEOF
24620
24621 fi
24622
24623 if test "$ol_enable_null" != no ; then
24624         BUILD_SLAPD=yes
24625         BUILD_NULL=$ol_enable_null
24626         if test "$ol_enable_null" = mod ; then
24627                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24628                 MFLAG=SLAPD_MOD_DYNAMIC
24629         else
24630                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24631                 MFLAG=SLAPD_MOD_STATIC
24632         fi
24633
24634 cat >>confdefs.h <<_ACEOF
24635 #define SLAPD_NULL $MFLAG
24636 _ACEOF
24637
24638 fi
24639
24640 if test "$ol_enable_passwd" != no ; then
24641         BUILD_SLAPD=yes
24642         BUILD_PASSWD=$ol_enable_passwd
24643         if test "$ol_enable_passwd" = mod ; then
24644                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24645                 MFLAG=SLAPD_MOD_DYNAMIC
24646         else
24647                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24648                 MFLAG=SLAPD_MOD_STATIC
24649         fi
24650
24651 cat >>confdefs.h <<_ACEOF
24652 #define SLAPD_PASSWD $MFLAG
24653 _ACEOF
24654
24655 fi
24656
24657 if test "$ol_link_perl" != no ; then
24658         BUILD_SLAPD=yes
24659         BUILD_PERL=$ol_enable_perl
24660         if test "$ol_enable_perl" = mod ; then
24661                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24662                 MFLAG=SLAPD_MOD_DYNAMIC
24663         else
24664                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24665                 MFLAG=SLAPD_MOD_STATIC
24666         fi
24667
24668 cat >>confdefs.h <<_ACEOF
24669 #define SLAPD_PERL $MFLAG
24670 _ACEOF
24671
24672 fi
24673
24674 if test "$ol_enable_relay" != no ; then
24675         BUILD_SLAPD=yes
24676         BUILD_RELAY=$ol_enable_relay
24677         if test "$ol_enable_relay" = mod ; then
24678                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
24679                 MFLAG=SLAPD_MOD_DYNAMIC
24680         else
24681                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
24682                 MFLAG=SLAPD_MOD_STATIC
24683         fi
24684
24685 cat >>confdefs.h <<_ACEOF
24686 #define SLAPD_RELAY $MFLAG
24687 _ACEOF
24688
24689 fi
24690
24691 if test "$ol_enable_shell" != no ; then
24692         if test "$ol_link_threads" != no ; then
24693                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use of --without-threads is recommended with back-shell" >&5
24694 $as_echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
24695         fi
24696         BUILD_SLAPD=yes
24697         BUILD_SHELL=$ol_enable_shell
24698         if test "$ol_enable_shell" = mod ; then
24699                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24700                 MFLAG=SLAPD_MOD_DYNAMIC
24701         else
24702                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24703                 MFLAG=SLAPD_MOD_STATIC
24704         fi
24705
24706 cat >>confdefs.h <<_ACEOF
24707 #define SLAPD_SHELL $MFLAG
24708 _ACEOF
24709
24710 fi
24711
24712 if test "$ol_enable_sock" != no ; then
24713         BUILD_SLAPD=yes
24714         BUILD_SOCK=$ol_enable_sock
24715         if test "$ol_enable_sock" = mod ; then
24716                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sock"
24717                 MFLAG=SLAPD_MOD_DYNAMIC
24718         else
24719                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sock"
24720                 MFLAG=SLAPD_MOD_STATIC
24721         fi
24722
24723 cat >>confdefs.h <<_ACEOF
24724 #define SLAPD_SOCK $MFLAG
24725 _ACEOF
24726
24727 fi
24728
24729 if test "$ol_link_sql" != no ; then
24730         BUILD_SLAPD=yes
24731         BUILD_SQL=$ol_enable_sql
24732         if test "$ol_enable_sql" = mod; then
24733                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24734                 MFLAG=SLAPD_MOD_DYNAMIC
24735         else
24736                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24737                 MFLAG=SLAPD_MOD_STATIC
24738         fi
24739
24740 cat >>confdefs.h <<_ACEOF
24741 #define SLAPD_SQL $MFLAG
24742 _ACEOF
24743
24744 fi
24745
24746 if test "$ol_link_wt" != no ; then
24747         BUILD_SLAPD=yes
24748         BUILD_WT=$ol_enable_wt
24749         if test "$ol_enable_wt" = mod; then
24750                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-wt"
24751                 MFLAG=SLAPD_MOD_DYNAMIC
24752         else
24753                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-wt"
24754                 MFLAG=SLAPD_MOD_STATIC
24755         fi
24756
24757 cat >>confdefs.h <<_ACEOF
24758 #define SLAPD_WT $MFLAG
24759 _ACEOF
24760
24761 fi
24762
24763 if test "$ol_enable_accesslog" != no ; then
24764         BUILD_ACCESSLOG=$ol_enable_accesslog
24765         if test "$ol_enable_accesslog" = mod ; then
24766                 MFLAG=SLAPD_MOD_DYNAMIC
24767                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
24768         else
24769                 MFLAG=SLAPD_MOD_STATIC
24770                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
24771         fi
24772
24773 cat >>confdefs.h <<_ACEOF
24774 #define SLAPD_OVER_ACCESSLOG $MFLAG
24775 _ACEOF
24776
24777 fi
24778
24779 if test "$ol_enable_auditlog" != no ; then
24780         BUILD_AUDITLOG=$ol_enable_auditlog
24781         if test "$ol_enable_auditlog" = mod ; then
24782                 MFLAG=SLAPD_MOD_DYNAMIC
24783                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
24784         else
24785                 MFLAG=SLAPD_MOD_STATIC
24786                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
24787         fi
24788
24789 cat >>confdefs.h <<_ACEOF
24790 #define SLAPD_OVER_AUDITLOG $MFLAG
24791 _ACEOF
24792
24793 fi
24794
24795 if test "$ol_enable_autoca" != no ; then
24796         BUILD_AUTOCA=$ol_enable_autoca
24797         if test "$ol_enable_autoca" = mod ; then
24798                 MFLAG=SLAPD_MOD_DYNAMIC
24799                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS autoca.la"
24800         else
24801                 MFLAG=SLAPD_MOD_STATIC
24802                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS autoca.o"
24803         fi
24804
24805 cat >>confdefs.h <<_ACEOF
24806 #define SLAPD_OVER_AUTOCA $MFLAG
24807 _ACEOF
24808
24809 fi
24810
24811 if test "$ol_enable_collect" != no ; then
24812         BUILD_COLLECT=$ol_enable_collect
24813         if test "$ol_enable_collect" = mod ; then
24814                 MFLAG=SLAPD_MOD_DYNAMIC
24815                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS collect.la"
24816         else
24817                 MFLAG=SLAPD_MOD_STATIC
24818                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS collect.o"
24819         fi
24820
24821 cat >>confdefs.h <<_ACEOF
24822 #define SLAPD_OVER_COLLECT $MFLAG
24823 _ACEOF
24824
24825 fi
24826
24827 if test "$ol_enable_constraint" != no ; then
24828         BUILD_CONSTRAINT=$ol_enable_constraint
24829         if test "$ol_enable_constraint" = mod ; then
24830                 MFLAG=SLAPD_MOD_DYNAMIC
24831                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la"
24832         else
24833                 MFLAG=SLAPD_MOD_STATIC
24834                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o"
24835         fi
24836
24837 cat >>confdefs.h <<_ACEOF
24838 #define SLAPD_OVER_CONSTRAINT $MFLAG
24839 _ACEOF
24840
24841 fi
24842
24843 if test "$ol_enable_dds" != no ; then
24844         BUILD_DDS=$ol_enable_dds
24845         if test "$ol_enable_dds" = mod ; then
24846                 MFLAG=SLAPD_MOD_DYNAMIC
24847                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
24848         else
24849                 MFLAG=SLAPD_MOD_STATIC
24850                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
24851         fi
24852
24853 cat >>confdefs.h <<_ACEOF
24854 #define SLAPD_OVER_DDS $MFLAG
24855 _ACEOF
24856
24857 fi
24858
24859 if test "$ol_enable_deref" != no ; then
24860         BUILD_DEREF=$ol_enable_deref
24861         if test "$ol_enable_deref" = mod ; then
24862                 MFLAG=SLAPD_MOD_DYNAMIC
24863                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS deref.la"
24864         else
24865                 MFLAG=SLAPD_MOD_STATIC
24866                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS deref.o"
24867         fi
24868
24869 cat >>confdefs.h <<_ACEOF
24870 #define SLAPD_OVER_DEREF $MFLAG
24871 _ACEOF
24872
24873 fi
24874
24875 if test "$ol_enable_dyngroup" != no ; then
24876         BUILD_DYNGROUP=$ol_enable_dyngroup
24877         if test "$ol_enable_dyngroup" = mod ; then
24878                 MFLAG=SLAPD_MOD_DYNAMIC
24879                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24880         else
24881                 MFLAG=SLAPD_MOD_STATIC
24882                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
24883         fi
24884
24885 cat >>confdefs.h <<_ACEOF
24886 #define SLAPD_OVER_DYNGROUP $MFLAG
24887 _ACEOF
24888
24889 fi
24890
24891 if test "$ol_enable_dynlist" != no ; then
24892         BUILD_DYNLIST=$ol_enable_dynlist
24893         if test "$ol_enable_dynlist" = mod ; then
24894                 MFLAG=SLAPD_MOD_DYNAMIC
24895                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
24896         else
24897                 MFLAG=SLAPD_MOD_STATIC
24898                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
24899         fi
24900
24901 cat >>confdefs.h <<_ACEOF
24902 #define SLAPD_OVER_DYNLIST $MFLAG
24903 _ACEOF
24904
24905 fi
24906
24907 if test "$ol_enable_memberof" != no ; then
24908         BUILD_MEMBEROF=$ol_enable_memberof
24909         if test "$ol_enable_memberof" = mod ; then
24910                 MFLAG=SLAPD_MOD_DYNAMIC
24911                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la"
24912         else
24913                 MFLAG=SLAPD_MOD_STATIC
24914                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o"
24915         fi
24916
24917 cat >>confdefs.h <<_ACEOF
24918 #define SLAPD_OVER_MEMBEROF $MFLAG
24919 _ACEOF
24920
24921 fi
24922
24923 if test "$ol_enable_ppolicy" != no ; then
24924         BUILD_PPOLICY=$ol_enable_ppolicy
24925         if test "$ol_enable_ppolicy" = mod ; then
24926                 MFLAG=SLAPD_MOD_DYNAMIC
24927                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24928         else
24929                 MFLAG=SLAPD_MOD_STATIC
24930                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
24931         fi
24932
24933 cat >>confdefs.h <<_ACEOF
24934 #define SLAPD_OVER_PPOLICY $MFLAG
24935 _ACEOF
24936
24937 fi
24938
24939 if test "$ol_enable_proxycache" != no ; then
24940         BUILD_PROXYCACHE=$ol_enable_proxycache
24941         if test "$ol_enable_proxycache" = mod ; then
24942                 MFLAG=SLAPD_MOD_DYNAMIC
24943                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24944         else
24945                 MFLAG=SLAPD_MOD_STATIC
24946                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
24947         fi
24948
24949 cat >>confdefs.h <<_ACEOF
24950 #define SLAPD_OVER_PROXYCACHE $MFLAG
24951 _ACEOF
24952
24953 fi
24954
24955 if test "$ol_enable_refint" != no ; then
24956         BUILD_REFINT=$ol_enable_refint
24957         if test "$ol_enable_refint" = mod ; then
24958                 MFLAG=SLAPD_MOD_DYNAMIC
24959                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24960         else
24961                 MFLAG=SLAPD_MOD_STATIC
24962                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
24963         fi
24964
24965 cat >>confdefs.h <<_ACEOF
24966 #define SLAPD_OVER_REFINT $MFLAG
24967 _ACEOF
24968
24969 fi
24970
24971 if test "$ol_enable_retcode" != no ; then
24972         BUILD_RETCODE=$ol_enable_retcode
24973         if test "$ol_enable_retcode" = mod ; then
24974                 MFLAG=SLAPD_MOD_DYNAMIC
24975                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
24976         else
24977                 MFLAG=SLAPD_MOD_STATIC
24978                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
24979         fi
24980
24981 cat >>confdefs.h <<_ACEOF
24982 #define SLAPD_OVER_RETCODE $MFLAG
24983 _ACEOF
24984
24985 fi
24986
24987 if test "$ol_enable_rwm" != no ; then
24988         BUILD_REWRITE=yes
24989         BUILD_RWM=$ol_enable_rwm
24990         if test "$ol_enable_rwm" = mod ; then
24991                 MFLAG=SLAPD_MOD_DYNAMIC
24992                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24993         else
24994                 MFLAG=SLAPD_MOD_STATIC
24995                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
24996         fi
24997
24998 cat >>confdefs.h <<_ACEOF
24999 #define SLAPD_OVER_RWM $MFLAG
25000 _ACEOF
25001
25002 fi
25003
25004 if test "$ol_enable_seqmod" != no ; then
25005         BUILD_SEQMOD=$ol_enable_seqmod
25006         if test "$ol_enable_seqmod" = mod ; then
25007                 MFLAG=SLAPD_MOD_DYNAMIC
25008                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
25009         else
25010                 MFLAG=SLAPD_MOD_STATIC
25011                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
25012         fi
25013
25014 cat >>confdefs.h <<_ACEOF
25015 #define SLAPD_OVER_SEQMOD $MFLAG
25016 _ACEOF
25017
25018 fi
25019
25020 if test "$ol_enable_sssvlv" != no ; then
25021         BUILD_SSSVLV=$ol_enable_sssvlv
25022         if test "$ol_enable_sssvlv" = mod ; then
25023                 MFLAG=SLAPD_MOD_DYNAMIC
25024                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS sssvlv.la"
25025         else
25026                 MFLAG=SLAPD_MOD_STATIC
25027                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS sssvlv.o"
25028         fi
25029
25030 cat >>confdefs.h <<_ACEOF
25031 #define SLAPD_OVER_SSSVLV $MFLAG
25032 _ACEOF
25033
25034 fi
25035
25036 if test "$ol_enable_syncprov" != no ; then
25037         BUILD_SYNCPROV=$ol_enable_syncprov
25038         if test "$ol_enable_syncprov" = mod ; then
25039                 MFLAG=SLAPD_MOD_DYNAMIC
25040                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25041         else
25042                 MFLAG=SLAPD_MOD_STATIC
25043                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
25044         fi
25045
25046 cat >>confdefs.h <<_ACEOF
25047 #define SLAPD_OVER_SYNCPROV $MFLAG
25048 _ACEOF
25049
25050 fi
25051
25052 if test "$ol_enable_translucent" != no ; then
25053         BUILD_TRANSLUCENT=$ol_enable_translucent
25054         if test "$ol_enable_translucent" = mod ; then
25055                 MFLAG=SLAPD_MOD_DYNAMIC
25056                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
25057         else
25058                 MFLAG=SLAPD_MOD_STATIC
25059                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
25060         fi
25061
25062 cat >>confdefs.h <<_ACEOF
25063 #define SLAPD_OVER_TRANSLUCENT $MFLAG
25064 _ACEOF
25065
25066 fi
25067
25068 if test "$ol_enable_unique" != no ; then
25069         BUILD_UNIQUE=$ol_enable_unique
25070         if test "$ol_enable_unique" = mod ; then
25071                 MFLAG=SLAPD_MOD_DYNAMIC
25072                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25073         else
25074                 MFLAG=SLAPD_MOD_STATIC
25075                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
25076         fi
25077
25078 cat >>confdefs.h <<_ACEOF
25079 #define SLAPD_OVER_UNIQUE $MFLAG
25080 _ACEOF
25081
25082 fi
25083
25084 if test "$ol_enable_valsort" != no ; then
25085         BUILD_VALSORT=$ol_enable_valsort
25086         if test "$ol_enable_valsort" = mod ; then
25087                 MFLAG=SLAPD_MOD_DYNAMIC
25088                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
25089         else
25090                 MFLAG=SLAPD_MOD_STATIC
25091                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
25092         fi
25093
25094 cat >>confdefs.h <<_ACEOF
25095 #define SLAPD_OVER_VALSORT $MFLAG
25096 _ACEOF
25097
25098 fi
25099
25100 if test "$ol_enable_rewrite" != no ; then
25101
25102 $as_echo "#define ENABLE_REWRITE 1" >>confdefs.h
25103
25104         BUILD_REWRITE=yes
25105 fi
25106
25107 if test "$ol_enable_slapi" != no ; then
25108
25109 $as_echo "#define ENABLE_SLAPI 1" >>confdefs.h
25110
25111         BUILD_SLAPI=yes
25112         SLAPD_SLAPI_DEPEND=libslapi.a
25113 fi
25114
25115
25116
25117 if test "$ac_cv_mingw32" = yes -o $ol_cv_msvc = yes ; then
25118         PLAT=NT
25119         SLAPD_MODULES_LDFLAGS=
25120 else
25121         PLAT=UNIX
25122 fi
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220 # Check whether --with-xxinstall was given.
25221 if test "${with_xxinstall+set}" = set; then :
25222   withval=$with_xxinstall;
25223 fi
25224
25225
25226
25227 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"
25228
25229
25230 ac_config_commands="$ac_config_commands default"
25231
25232
25233
25234 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25235 # Let make expand exec_prefix.
25236 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25237
25238 DEFS=-DHAVE_CONFIG_H
25239
25240 ac_libobjs=
25241 ac_ltlibobjs=
25242 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25243   # 1. Remove the extension, and $U if already installed.
25244   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25245   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
25246   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
25247   #    will be set to the directory where LIBOBJS objects are built.
25248   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25249   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
25250 done
25251 LIBOBJS=$ac_libobjs
25252
25253 LTLIBOBJS=$ac_ltlibobjs
25254
25255
25256 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
25257   as_fn_error "conditional \"AMDEP\" was never defined.
25258 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25259 fi
25260 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
25261   as_fn_error "conditional \"am__fastdepCC\" was never defined.
25262 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25263 fi
25264 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
25265   as_fn_error "conditional \"am__fastdepCC\" was never defined.
25266 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25267 fi
25268
25269
25270 : ${CONFIG_STATUS=./config.status}
25271 ac_write_fail=0
25272 ac_clean_files_save=$ac_clean_files
25273 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25274 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25275 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25276 as_write_fail=0
25277 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
25278 #! $SHELL
25279 # Generated by $as_me.
25280 # Run this file to recreate the current configuration.
25281 # Compiler output produced by configure, useful for debugging
25282 # configure, is in config.log if it exists.
25283
25284 debug=false
25285 ac_cs_recheck=false
25286 ac_cs_silent=false
25287
25288 SHELL=\${CONFIG_SHELL-$SHELL}
25289 export SHELL
25290 _ASEOF
25291 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25292 ## -------------------- ##
25293 ## M4sh Initialization. ##
25294 ## -------------------- ##
25295
25296 # Be more Bourne compatible
25297 DUALCASE=1; export DUALCASE # for MKS sh
25298 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
25299   emulate sh
25300   NULLCMD=:
25301   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25302   # is contrary to our usage.  Disable this feature.
25303   alias -g '${1+"$@"}'='"$@"'
25304   setopt NO_GLOB_SUBST
25305 else
25306   case `(set -o) 2>/dev/null` in #(
25307   *posix*) :
25308     set -o posix ;; #(
25309   *) :
25310      ;;
25311 esac
25312 fi
25313
25314
25315 as_nl='
25316 '
25317 export as_nl
25318 # Printing a long string crashes Solaris 7 /usr/bin/printf.
25319 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25320 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
25321 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
25322 # Prefer a ksh shell builtin over an external printf program on Solaris,
25323 # but without wasting forks for bash or zsh.
25324 if test -z "$BASH_VERSION$ZSH_VERSION" \
25325     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
25326   as_echo='print -r --'
25327   as_echo_n='print -rn --'
25328 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
25329   as_echo='printf %s\n'
25330   as_echo_n='printf %s'
25331 else
25332   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
25333     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
25334     as_echo_n='/usr/ucb/echo -n'
25335   else
25336     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
25337     as_echo_n_body='eval
25338       arg=$1;
25339       case $arg in #(
25340       *"$as_nl"*)
25341         expr "X$arg" : "X\\(.*\\)$as_nl";
25342         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
25343       esac;
25344       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
25345     '
25346     export as_echo_n_body
25347     as_echo_n='sh -c $as_echo_n_body as_echo'
25348   fi
25349   export as_echo_body
25350   as_echo='sh -c $as_echo_body as_echo'
25351 fi
25352
25353 # The user is always right.
25354 if test "${PATH_SEPARATOR+set}" != set; then
25355   PATH_SEPARATOR=:
25356   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25357     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25358       PATH_SEPARATOR=';'
25359   }
25360 fi
25361
25362
25363 # IFS
25364 # We need space, tab and new line, in precisely that order.  Quoting is
25365 # there to prevent editors from complaining about space-tab.
25366 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
25367 # splitting by setting IFS to empty value.)
25368 IFS=" ""        $as_nl"
25369
25370 # Find who we are.  Look in the path if we contain no directory separator.
25371 case $0 in #((
25372   *[\\/]* ) as_myself=$0 ;;
25373   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25374 for as_dir in $PATH
25375 do
25376   IFS=$as_save_IFS
25377   test -z "$as_dir" && as_dir=.
25378     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25379   done
25380 IFS=$as_save_IFS
25381
25382      ;;
25383 esac
25384 # We did not find ourselves, most probably we were run as `sh COMMAND'
25385 # in which case we are not to be found in the path.
25386 if test "x$as_myself" = x; then
25387   as_myself=$0
25388 fi
25389 if test ! -f "$as_myself"; then
25390   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25391   exit 1
25392 fi
25393
25394 # Unset variables that we do not need and which cause bugs (e.g. in
25395 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
25396 # suppresses any "Segmentation fault" message there.  '((' could
25397 # trigger a bug in pdksh 5.2.14.
25398 for as_var in BASH_ENV ENV MAIL MAILPATH
25399 do eval test x\${$as_var+set} = xset \
25400   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25401 done
25402 PS1='$ '
25403 PS2='> '
25404 PS4='+ '
25405
25406 # NLS nuisances.
25407 LC_ALL=C
25408 export LC_ALL
25409 LANGUAGE=C
25410 export LANGUAGE
25411
25412 # CDPATH.
25413 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25414
25415
25416 # as_fn_error ERROR [LINENO LOG_FD]
25417 # ---------------------------------
25418 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25419 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
25420 # script with status $?, using 1 if that was 0.
25421 as_fn_error ()
25422 {
25423   as_status=$?; test $as_status -eq 0 && as_status=1
25424   if test "$3"; then
25425     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25426     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
25427   fi
25428   $as_echo "$as_me: error: $1" >&2
25429   as_fn_exit $as_status
25430 } # as_fn_error
25431
25432
25433 # as_fn_set_status STATUS
25434 # -----------------------
25435 # Set $? to STATUS, without forking.
25436 as_fn_set_status ()
25437 {
25438   return $1
25439 } # as_fn_set_status
25440
25441 # as_fn_exit STATUS
25442 # -----------------
25443 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25444 as_fn_exit ()
25445 {
25446   set +e
25447   as_fn_set_status $1
25448   exit $1
25449 } # as_fn_exit
25450
25451 # as_fn_unset VAR
25452 # ---------------
25453 # Portably unset VAR.
25454 as_fn_unset ()
25455 {
25456   { eval $1=; unset $1;}
25457 }
25458 as_unset=as_fn_unset
25459 # as_fn_append VAR VALUE
25460 # ----------------------
25461 # Append the text in VALUE to the end of the definition contained in VAR. Take
25462 # advantage of any shell optimizations that allow amortized linear growth over
25463 # repeated appends, instead of the typical quadratic growth present in naive
25464 # implementations.
25465 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25466   eval 'as_fn_append ()
25467   {
25468     eval $1+=\$2
25469   }'
25470 else
25471   as_fn_append ()
25472   {
25473     eval $1=\$$1\$2
25474   }
25475 fi # as_fn_append
25476
25477 # as_fn_arith ARG...
25478 # ------------------
25479 # Perform arithmetic evaluation on the ARGs, and store the result in the
25480 # global $as_val. Take advantage of shells that can avoid forks. The arguments
25481 # must be portable across $(()) and expr.
25482 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25483   eval 'as_fn_arith ()
25484   {
25485     as_val=$(( $* ))
25486   }'
25487 else
25488   as_fn_arith ()
25489   {
25490     as_val=`expr "$@" || test $? -eq 1`
25491   }
25492 fi # as_fn_arith
25493
25494
25495 if expr a : '\(a\)' >/dev/null 2>&1 &&
25496    test "X`expr 00001 : '.*\(...\)'`" = X001; then
25497   as_expr=expr
25498 else
25499   as_expr=false
25500 fi
25501
25502 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25503   as_basename=basename
25504 else
25505   as_basename=false
25506 fi
25507
25508 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25509   as_dirname=dirname
25510 else
25511   as_dirname=false
25512 fi
25513
25514 as_me=`$as_basename -- "$0" ||
25515 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25516          X"$0" : 'X\(//\)$' \| \
25517          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25518 $as_echo X/"$0" |
25519     sed '/^.*\/\([^/][^/]*\)\/*$/{
25520             s//\1/
25521             q
25522           }
25523           /^X\/\(\/\/\)$/{
25524             s//\1/
25525             q
25526           }
25527           /^X\/\(\/\).*/{
25528             s//\1/
25529             q
25530           }
25531           s/.*/./; q'`
25532
25533 # Avoid depending upon Character Ranges.
25534 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25535 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25536 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25537 as_cr_digits='0123456789'
25538 as_cr_alnum=$as_cr_Letters$as_cr_digits
25539
25540 ECHO_C= ECHO_N= ECHO_T=
25541 case `echo -n x` in #(((((
25542 -n*)
25543   case `echo 'xy\c'` in
25544   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
25545   xy)  ECHO_C='\c';;
25546   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
25547        ECHO_T=' ';;
25548   esac;;
25549 *)
25550   ECHO_N='-n';;
25551 esac
25552
25553 rm -f conf$$ conf$$.exe conf$$.file
25554 if test -d conf$$.dir; then
25555   rm -f conf$$.dir/conf$$.file
25556 else
25557   rm -f conf$$.dir
25558   mkdir conf$$.dir 2>/dev/null
25559 fi
25560 if (echo >conf$$.file) 2>/dev/null; then
25561   if ln -s conf$$.file conf$$ 2>/dev/null; then
25562     as_ln_s='ln -s'
25563     # ... but there are two gotchas:
25564     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25565     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25566     # In both cases, we have to default to `cp -p'.
25567     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25568       as_ln_s='cp -p'
25569   elif ln conf$$.file conf$$ 2>/dev/null; then
25570     as_ln_s=ln
25571   else
25572     as_ln_s='cp -p'
25573   fi
25574 else
25575   as_ln_s='cp -p'
25576 fi
25577 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25578 rmdir conf$$.dir 2>/dev/null
25579
25580
25581 # as_fn_mkdir_p
25582 # -------------
25583 # Create "$as_dir" as a directory, including parents if necessary.
25584 as_fn_mkdir_p ()
25585 {
25586
25587   case $as_dir in #(
25588   -*) as_dir=./$as_dir;;
25589   esac
25590   test -d "$as_dir" || eval $as_mkdir_p || {
25591     as_dirs=
25592     while :; do
25593       case $as_dir in #(
25594       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25595       *) as_qdir=$as_dir;;
25596       esac
25597       as_dirs="'$as_qdir' $as_dirs"
25598       as_dir=`$as_dirname -- "$as_dir" ||
25599 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25600          X"$as_dir" : 'X\(//\)[^/]' \| \
25601          X"$as_dir" : 'X\(//\)$' \| \
25602          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25603 $as_echo X"$as_dir" |
25604     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25605             s//\1/
25606             q
25607           }
25608           /^X\(\/\/\)[^/].*/{
25609             s//\1/
25610             q
25611           }
25612           /^X\(\/\/\)$/{
25613             s//\1/
25614             q
25615           }
25616           /^X\(\/\).*/{
25617             s//\1/
25618             q
25619           }
25620           s/.*/./; q'`
25621       test -d "$as_dir" && break
25622     done
25623     test -z "$as_dirs" || eval "mkdir $as_dirs"
25624   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
25625
25626
25627 } # as_fn_mkdir_p
25628 if mkdir -p . 2>/dev/null; then
25629   as_mkdir_p='mkdir -p "$as_dir"'
25630 else
25631   test -d ./-p && rmdir ./-p
25632   as_mkdir_p=false
25633 fi
25634
25635 if test -x / >/dev/null 2>&1; then
25636   as_test_x='test -x'
25637 else
25638   if ls -dL / >/dev/null 2>&1; then
25639     as_ls_L_option=L
25640   else
25641     as_ls_L_option=
25642   fi
25643   as_test_x='
25644     eval sh -c '\''
25645       if test -d "$1"; then
25646         test -d "$1/.";
25647       else
25648         case $1 in #(
25649         -*)set "./$1";;
25650         esac;
25651         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
25652         ???[sx]*):;;*)false;;esac;fi
25653     '\'' sh
25654   '
25655 fi
25656 as_executable_p=$as_test_x
25657
25658 # Sed expression to map a string onto a valid CPP name.
25659 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25660
25661 # Sed expression to map a string onto a valid variable name.
25662 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25663
25664
25665 exec 6>&1
25666 ## ----------------------------------- ##
25667 ## Main body of $CONFIG_STATUS script. ##
25668 ## ----------------------------------- ##
25669 _ASEOF
25670 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25671
25672 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25673 # Save the log message, to keep $0 and so on meaningful, and to
25674 # report actual input values of CONFIG_FILES etc. instead of their
25675 # values after options handling.
25676 ac_log="
25677 This file was extended by $as_me, which was
25678 generated by GNU Autoconf 2.65.  Invocation command line was
25679
25680   CONFIG_FILES    = $CONFIG_FILES
25681   CONFIG_HEADERS  = $CONFIG_HEADERS
25682   CONFIG_LINKS    = $CONFIG_LINKS
25683   CONFIG_COMMANDS = $CONFIG_COMMANDS
25684   $ $0 $@
25685
25686 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25687 "
25688
25689 _ACEOF
25690
25691 case $ac_config_files in *"
25692 "*) set x $ac_config_files; shift; ac_config_files=$*;;
25693 esac
25694
25695 case $ac_config_headers in *"
25696 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25697 esac
25698
25699
25700 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25701 # Files that config.status was made for.
25702 config_files="$ac_config_files"
25703 config_headers="$ac_config_headers"
25704 config_commands="$ac_config_commands"
25705
25706 _ACEOF
25707
25708 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25709 ac_cs_usage="\
25710 \`$as_me' instantiates files and other configuration actions
25711 from templates according to the current configuration.  Unless the files
25712 and actions are specified as TAGs, all are instantiated by default.
25713
25714 Usage: $0 [OPTION]... [TAG]...
25715
25716   -h, --help       print this help, then exit
25717   -V, --version    print version number and configuration settings, then exit
25718       --config     print configuration, then exit
25719   -q, --quiet, --silent
25720                    do not print progress messages
25721   -d, --debug      don't remove temporary files
25722       --recheck    update $as_me by reconfiguring in the same conditions
25723       --file=FILE[:TEMPLATE]
25724                    instantiate the configuration file FILE
25725       --header=FILE[:TEMPLATE]
25726                    instantiate the configuration header FILE
25727
25728 Configuration files:
25729 $config_files
25730
25731 Configuration headers:
25732 $config_headers
25733
25734 Configuration commands:
25735 $config_commands
25736
25737 Report bugs to <<http://www.openldap.org/its/>>."
25738
25739 _ACEOF
25740 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25741 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
25742 ac_cs_version="\\
25743 config.status
25744 configured by $0, generated by GNU Autoconf 2.65,
25745   with options \\"\$ac_cs_config\\"
25746
25747 Copyright (C) 2009 Free Software Foundation, Inc.
25748 This config.status script is free software; the Free Software Foundation
25749 gives unlimited permission to copy, distribute and modify it."
25750
25751 ac_pwd='$ac_pwd'
25752 srcdir='$srcdir'
25753 INSTALL='$INSTALL'
25754 AWK='$AWK'
25755 test -n "\$AWK" || AWK=awk
25756 _ACEOF
25757
25758 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25759 # The default lists apply if the user does not specify any file.
25760 ac_need_defaults=:
25761 while test $# != 0
25762 do
25763   case $1 in
25764   --*=*)
25765     ac_option=`expr "X$1" : 'X\([^=]*\)='`
25766     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25767     ac_shift=:
25768     ;;
25769   *)
25770     ac_option=$1
25771     ac_optarg=$2
25772     ac_shift=shift
25773     ;;
25774   esac
25775
25776   case $ac_option in
25777   # Handling of the options.
25778   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25779     ac_cs_recheck=: ;;
25780   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25781     $as_echo "$ac_cs_version"; exit ;;
25782   --config | --confi | --conf | --con | --co | --c )
25783     $as_echo "$ac_cs_config"; exit ;;
25784   --debug | --debu | --deb | --de | --d | -d )
25785     debug=: ;;
25786   --file | --fil | --fi | --f )
25787     $ac_shift
25788     case $ac_optarg in
25789     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25790     esac
25791     as_fn_append CONFIG_FILES " '$ac_optarg'"
25792     ac_need_defaults=false;;
25793   --header | --heade | --head | --hea )
25794     $ac_shift
25795     case $ac_optarg in
25796     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25797     esac
25798     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25799     ac_need_defaults=false;;
25800   --he | --h)
25801     # Conflict between --help and --header
25802     as_fn_error "ambiguous option: \`$1'
25803 Try \`$0 --help' for more information.";;
25804   --help | --hel | -h )
25805     $as_echo "$ac_cs_usage"; exit ;;
25806   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25807   | -silent | --silent | --silen | --sile | --sil | --si | --s)
25808     ac_cs_silent=: ;;
25809
25810   # This is an error.
25811   -*) as_fn_error "unrecognized option: \`$1'
25812 Try \`$0 --help' for more information." ;;
25813
25814   *) as_fn_append ac_config_targets " $1"
25815      ac_need_defaults=false ;;
25816
25817   esac
25818   shift
25819 done
25820
25821 ac_configure_extra_args=
25822
25823 if $ac_cs_silent; then
25824   exec 6>/dev/null
25825   ac_configure_extra_args="$ac_configure_extra_args --silent"
25826 fi
25827
25828 _ACEOF
25829 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25830 if \$ac_cs_recheck; then
25831   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25832   shift
25833   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25834   CONFIG_SHELL='$SHELL'
25835   export CONFIG_SHELL
25836   exec "\$@"
25837 fi
25838
25839 _ACEOF
25840 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25841 exec 5>>config.log
25842 {
25843   echo
25844   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25845 ## Running $as_me. ##
25846 _ASBOX
25847   $as_echo "$ac_log"
25848 } >&5
25849
25850 _ACEOF
25851 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25852 #
25853 # INIT-COMMANDS
25854 #
25855 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25856
25857 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25858 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
25859
25860
25861 _ACEOF
25862
25863 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25864
25865 # Handling of arguments.
25866 for ac_config_target in $ac_config_targets
25867 do
25868   case $ac_config_target in
25869     "include/portable.h") CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
25870     "include/ldap_features.h") CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
25871     "include/lber_types.h") CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
25872     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25873     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
25874     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
25875     "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
25876     "doc/man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
25877     "doc/man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
25878     "doc/man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
25879     "doc/man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
25880     "clients/Makefile") CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
25881     "clients/tools/Makefile") CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
25882     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
25883     "libraries/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
25884     "libraries/liblber/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25885     "libraries/libldap/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25886     "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" ;;
25887     "libraries/liblunicode/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25888     "libraries/liblutil/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25889     "libraries/librewrite/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25890     "servers/Makefile") CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
25891     "servers/slapd/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
25892     "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" ;;
25893     "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" ;;
25894     "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" ;;
25895     "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" ;;
25896     "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" ;;
25897     "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" ;;
25898     "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" ;;
25899     "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" ;;
25900     "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" ;;
25901     "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" ;;
25902     "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" ;;
25903     "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" ;;
25904     "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" ;;
25905     "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" ;;
25906     "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" ;;
25907     "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" ;;
25908     "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" ;;
25909     "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" ;;
25910     "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" ;;
25911     "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" ;;
25912     "servers/slapd/overlays/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
25913     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
25914     "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;;
25915     "tests/progs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
25916     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25917
25918   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25919   esac
25920 done
25921
25922
25923 # If the user did not use the arguments to specify the items to instantiate,
25924 # then the envvar interface is used.  Set only those that are not.
25925 # We use the long form for the default assignment because of an extremely
25926 # bizarre bug on SunOS 4.1.3.
25927 if $ac_need_defaults; then
25928   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25929   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25930   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25931 fi
25932
25933 # Have a temporary directory for convenience.  Make it in the build tree
25934 # simply because there is no reason against having it here, and in addition,
25935 # creating and moving files from /tmp can sometimes cause problems.
25936 # Hook for its removal unless debugging.
25937 # Note that there is a small window in which the directory will not be cleaned:
25938 # after its creation but before its name has been assigned to `$tmp'.
25939 $debug ||
25940 {
25941   tmp=
25942   trap 'exit_status=$?
25943   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25944 ' 0
25945   trap 'as_fn_exit 1' 1 2 13 15
25946 }
25947 # Create a (secure) tmp directory for tmp files.
25948
25949 {
25950   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25951   test -n "$tmp" && test -d "$tmp"
25952 }  ||
25953 {
25954   tmp=./conf$$-$RANDOM
25955   (umask 077 && mkdir "$tmp")
25956 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25957
25958 # Set up the scripts for CONFIG_FILES section.
25959 # No need to generate them if there are no CONFIG_FILES.
25960 # This happens for instance with `./config.status config.h'.
25961 if test -n "$CONFIG_FILES"; then
25962
25963
25964 ac_cr=`echo X | tr X '\015'`
25965 # On cygwin, bash can eat \r inside `` if the user requested igncr.
25966 # But we know of no other shell where ac_cr would be empty at this
25967 # point, so we can use a bashism as a fallback.
25968 if test "x$ac_cr" = x; then
25969   eval ac_cr=\$\'\\r\'
25970 fi
25971 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25972 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25973   ac_cs_awk_cr='\r'
25974 else
25975   ac_cs_awk_cr=$ac_cr
25976 fi
25977
25978 echo 'BEGIN {' >"$tmp/subs1.awk" &&
25979 _ACEOF
25980
25981
25982 {
25983   echo "cat >conf$$subs.awk <<_ACEOF" &&
25984   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25985   echo "_ACEOF"
25986 } >conf$$subs.sh ||
25987   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25988 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25989 ac_delim='%!_!# '
25990 for ac_last_try in false false false false false :; do
25991   . ./conf$$subs.sh ||
25992     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25993
25994   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25995   if test $ac_delim_n = $ac_delim_num; then
25996     break
25997   elif $ac_last_try; then
25998     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25999   else
26000     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26001   fi
26002 done
26003 rm -f conf$$subs.sh
26004
26005 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26006 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
26007 _ACEOF
26008 sed -n '
26009 h
26010 s/^/S["/; s/!.*/"]=/
26011 p
26012 g
26013 s/^[^!]*!//
26014 :repl
26015 t repl
26016 s/'"$ac_delim"'$//
26017 t delim
26018 :nl
26019 h
26020 s/\(.\{148\}\)..*/\1/
26021 t more1
26022 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26023 p
26024 n
26025 b repl
26026 :more1
26027 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26028 p
26029 g
26030 s/.\{148\}//
26031 t nl
26032 :delim
26033 h
26034 s/\(.\{148\}\)..*/\1/
26035 t more2
26036 s/["\\]/\\&/g; s/^/"/; s/$/"/
26037 p
26038 b
26039 :more2
26040 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26041 p
26042 g
26043 s/.\{148\}//
26044 t delim
26045 ' <conf$$subs.awk | sed '
26046 /^[^""]/{
26047   N
26048   s/\n//
26049 }
26050 ' >>$CONFIG_STATUS || ac_write_fail=1
26051 rm -f conf$$subs.awk
26052 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26053 _ACAWK
26054 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
26055   for (key in S) S_is_set[key] = 1
26056   FS = "\a"
26057
26058 }
26059 {
26060   line = $ 0
26061   nfields = split(line, field, "@")
26062   substed = 0
26063   len = length(field[1])
26064   for (i = 2; i < nfields; i++) {
26065     key = field[i]
26066     keylen = length(key)
26067     if (S_is_set[key]) {
26068       value = S[key]
26069       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26070       len += length(value) + length(field[++i])
26071       substed = 1
26072     } else
26073       len += 1 + keylen
26074   }
26075
26076   print line
26077 }
26078
26079 _ACAWK
26080 _ACEOF
26081 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26082 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26083   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26084 else
26085   cat
26086 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
26087   || as_fn_error "could not setup config files machinery" "$LINENO" 5
26088 _ACEOF
26089
26090 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26091 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26092 # trailing colons and then remove the whole line if VPATH becomes empty
26093 # (actually we leave an empty line to preserve line numbers).
26094 if test "x$srcdir" = x.; then
26095   ac_vpsub='/^[  ]*VPATH[        ]*=/{
26096 s/:*\$(srcdir):*/:/
26097 s/:*\${srcdir}:*/:/
26098 s/:*@srcdir@:*/:/
26099 s/^\([^=]*=[     ]*\):*/\1/
26100 s/:*$//
26101 s/^[^=]*=[       ]*$//
26102 }'
26103 fi
26104
26105 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26106 fi # test -n "$CONFIG_FILES"
26107
26108 # Set up the scripts for CONFIG_HEADERS section.
26109 # No need to generate them if there are no CONFIG_HEADERS.
26110 # This happens for instance with `./config.status Makefile'.
26111 if test -n "$CONFIG_HEADERS"; then
26112 cat >"$tmp/defines.awk" <<\_ACAWK ||
26113 BEGIN {
26114 _ACEOF
26115
26116 # Transform confdefs.h into an awk script `defines.awk', embedded as
26117 # here-document in config.status, that substitutes the proper values into
26118 # config.h.in to produce config.h.
26119
26120 # Create a delimiter string that does not exist in confdefs.h, to ease
26121 # handling of long lines.
26122 ac_delim='%!_!# '
26123 for ac_last_try in false false :; do
26124   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
26125   if test -z "$ac_t"; then
26126     break
26127   elif $ac_last_try; then
26128     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
26129   else
26130     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26131   fi
26132 done
26133
26134 # For the awk script, D is an array of macro values keyed by name,
26135 # likewise P contains macro parameters if any.  Preserve backslash
26136 # newline sequences.
26137
26138 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26139 sed -n '
26140 s/.\{148\}/&'"$ac_delim"'/g
26141 t rset
26142 :rset
26143 s/^[     ]*#[    ]*define[       ][      ]*/ /
26144 t def
26145 d
26146 :def
26147 s/\\$//
26148 t bsnl
26149 s/["\\]/\\&/g
26150 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
26151 D["\1"]=" \3"/p
26152 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
26153 d
26154 :bsnl
26155 s/["\\]/\\&/g
26156 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
26157 D["\1"]=" \3\\\\\\n"\\/p
26158 t cont
26159 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26160 t cont
26161 d
26162 :cont
26163 n
26164 s/.\{148\}/&'"$ac_delim"'/g
26165 t clear
26166 :clear
26167 s/\\$//
26168 t bsnlc
26169 s/["\\]/\\&/g; s/^/"/; s/$/"/p
26170 d
26171 :bsnlc
26172 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26173 b cont
26174 ' <confdefs.h | sed '
26175 s/'"$ac_delim"'/"\\\
26176 "/g' >>$CONFIG_STATUS || ac_write_fail=1
26177
26178 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26179   for (key in D) D_is_set[key] = 1
26180   FS = "\a"
26181 }
26182 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26183   line = \$ 0
26184   split(line, arg, " ")
26185   if (arg[1] == "#") {
26186     defundef = arg[2]
26187     mac1 = arg[3]
26188   } else {
26189     defundef = substr(arg[1], 2)
26190     mac1 = arg[2]
26191   }
26192   split(mac1, mac2, "(") #)
26193   macro = mac2[1]
26194   prefix = substr(line, 1, index(line, defundef) - 1)
26195   if (D_is_set[macro]) {
26196     # Preserve the white space surrounding the "#".
26197     print prefix "define", macro P[macro] D[macro]
26198     next
26199   } else {
26200     # Replace #undef with comments.  This is necessary, for example,
26201     # in the case of _POSIX_SOURCE, which is predefined and required
26202     # on some systems where configure will not decide to define it.
26203     if (defundef == "undef") {
26204       print "/*", prefix defundef, macro, "*/"
26205       next
26206     }
26207   }
26208 }
26209 { print }
26210 _ACAWK
26211 _ACEOF
26212 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26213   as_fn_error "could not setup config headers machinery" "$LINENO" 5
26214 fi # test -n "$CONFIG_HEADERS"
26215
26216
26217 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
26218 shift
26219 for ac_tag
26220 do
26221   case $ac_tag in
26222   :[FHLC]) ac_mode=$ac_tag; continue;;
26223   esac
26224   case $ac_mode$ac_tag in
26225   :[FHL]*:*);;
26226   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
26227   :[FH]-) ac_tag=-:-;;
26228   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26229   esac
26230   ac_save_IFS=$IFS
26231   IFS=:
26232   set x $ac_tag
26233   IFS=$ac_save_IFS
26234   shift
26235   ac_file=$1
26236   shift
26237
26238   case $ac_mode in
26239   :L) ac_source=$1;;
26240   :[FH])
26241     ac_file_inputs=
26242     for ac_f
26243     do
26244       case $ac_f in
26245       -) ac_f="$tmp/stdin";;
26246       *) # Look for the file first in the build tree, then in the source tree
26247          # (if the path is not absolute).  The absolute path cannot be DOS-style,
26248          # because $ac_f cannot contain `:'.
26249          test -f "$ac_f" ||
26250            case $ac_f in
26251            [\\/$]*) false;;
26252            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26253            esac ||
26254            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26255       esac
26256       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26257       as_fn_append ac_file_inputs " '$ac_f'"
26258     done
26259
26260     # Let's still pretend it is `configure' which instantiates (i.e., don't
26261     # use $as_me), people would be surprised to read:
26262     #    /* config.h.  Generated by config.status.  */
26263     configure_input='Generated from '`
26264           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26265         `' by configure.'
26266     if test x"$ac_file" != x-; then
26267       configure_input="$ac_file.  $configure_input"
26268       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26269 $as_echo "$as_me: creating $ac_file" >&6;}
26270     fi
26271     # Neutralize special characters interpreted by sed in replacement strings.
26272     case $configure_input in #(
26273     *\&* | *\|* | *\\* )
26274        ac_sed_conf_input=`$as_echo "$configure_input" |
26275        sed 's/[\\\\&|]/\\\\&/g'`;; #(
26276     *) ac_sed_conf_input=$configure_input;;
26277     esac
26278
26279     case $ac_tag in
26280     *:-:* | *:-) cat >"$tmp/stdin" \
26281       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
26282     esac
26283     ;;
26284   esac
26285
26286   ac_dir=`$as_dirname -- "$ac_file" ||
26287 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26288          X"$ac_file" : 'X\(//\)[^/]' \| \
26289          X"$ac_file" : 'X\(//\)$' \| \
26290          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26291 $as_echo X"$ac_file" |
26292     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26293             s//\1/
26294             q
26295           }
26296           /^X\(\/\/\)[^/].*/{
26297             s//\1/
26298             q
26299           }
26300           /^X\(\/\/\)$/{
26301             s//\1/
26302             q
26303           }
26304           /^X\(\/\).*/{
26305             s//\1/
26306             q
26307           }
26308           s/.*/./; q'`
26309   as_dir="$ac_dir"; as_fn_mkdir_p
26310   ac_builddir=.
26311
26312 case "$ac_dir" in
26313 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26314 *)
26315   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
26316   # A ".." for each directory in $ac_dir_suffix.
26317   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26318   case $ac_top_builddir_sub in
26319   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26320   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26321   esac ;;
26322 esac
26323 ac_abs_top_builddir=$ac_pwd
26324 ac_abs_builddir=$ac_pwd$ac_dir_suffix
26325 # for backward compatibility:
26326 ac_top_builddir=$ac_top_build_prefix
26327
26328 case $srcdir in
26329   .)  # We are building in place.
26330     ac_srcdir=.
26331     ac_top_srcdir=$ac_top_builddir_sub
26332     ac_abs_top_srcdir=$ac_pwd ;;
26333   [\\/]* | ?:[\\/]* )  # Absolute name.
26334     ac_srcdir=$srcdir$ac_dir_suffix;
26335     ac_top_srcdir=$srcdir
26336     ac_abs_top_srcdir=$srcdir ;;
26337   *) # Relative name.
26338     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26339     ac_top_srcdir=$ac_top_build_prefix$srcdir
26340     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
26341 esac
26342 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
26343
26344
26345   case $ac_mode in
26346   :F)
26347   #
26348   # CONFIG_FILE
26349   #
26350
26351   case $INSTALL in
26352   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26353   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
26354   esac
26355 _ACEOF
26356
26357 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26358 # If the template does not know about datarootdir, expand it.
26359 # FIXME: This hack should be removed a few years after 2.60.
26360 ac_datarootdir_hack=; ac_datarootdir_seen=
26361 ac_sed_dataroot='
26362 /datarootdir/ {
26363   p
26364   q
26365 }
26366 /@datadir@/p
26367 /@docdir@/p
26368 /@infodir@/p
26369 /@localedir@/p
26370 /@mandir@/p'
26371 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26372 *datarootdir*) ac_datarootdir_seen=yes;;
26373 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26374   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26375 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26376 _ACEOF
26377 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26378   ac_datarootdir_hack='
26379   s&@datadir@&$datadir&g
26380   s&@docdir@&$docdir&g
26381   s&@infodir@&$infodir&g
26382   s&@localedir@&$localedir&g
26383   s&@mandir@&$mandir&g
26384   s&\\\${datarootdir}&$datarootdir&g' ;;
26385 esac
26386 _ACEOF
26387
26388 # Neutralize VPATH when `$srcdir' = `.'.
26389 # Shell code in configure.ac might set extrasub.
26390 # FIXME: do we really want to maintain this feature?
26391 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26392 ac_sed_extra="$ac_vpsub
26393 $extrasub
26394 _ACEOF
26395 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26396 :t
26397 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26398 s|@configure_input@|$ac_sed_conf_input|;t t
26399 s&@top_builddir@&$ac_top_builddir_sub&;t t
26400 s&@top_build_prefix@&$ac_top_build_prefix&;t t
26401 s&@srcdir@&$ac_srcdir&;t t
26402 s&@abs_srcdir@&$ac_abs_srcdir&;t t
26403 s&@top_srcdir@&$ac_top_srcdir&;t t
26404 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26405 s&@builddir@&$ac_builddir&;t t
26406 s&@abs_builddir@&$ac_abs_builddir&;t t
26407 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26408 s&@INSTALL@&$ac_INSTALL&;t t
26409 $ac_datarootdir_hack
26410 "
26411 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
26412   || as_fn_error "could not create $ac_file" "$LINENO" 5
26413
26414 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26415   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26416   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26417   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26418 which seems to be undefined.  Please make sure it is defined." >&5
26419 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26420 which seems to be undefined.  Please make sure it is defined." >&2;}
26421
26422   rm -f "$tmp/stdin"
26423   case $ac_file in
26424   -) cat "$tmp/out" && rm -f "$tmp/out";;
26425   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
26426   esac \
26427   || as_fn_error "could not create $ac_file" "$LINENO" 5
26428  ;;
26429   :H)
26430   #
26431   # CONFIG_HEADER
26432   #
26433   if test x"$ac_file" != x-; then
26434     {
26435       $as_echo "/* $configure_input  */" \
26436       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
26437     } >"$tmp/config.h" \
26438       || as_fn_error "could not create $ac_file" "$LINENO" 5
26439     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
26440       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26441 $as_echo "$as_me: $ac_file is unchanged" >&6;}
26442     else
26443       rm -f "$ac_file"
26444       mv "$tmp/config.h" "$ac_file" \
26445         || as_fn_error "could not create $ac_file" "$LINENO" 5
26446     fi
26447   else
26448     $as_echo "/* $configure_input  */" \
26449       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
26450       || as_fn_error "could not create -" "$LINENO" 5
26451   fi
26452 # Compute "$ac_file"'s index in $config_headers.
26453 _am_stamp_count=1
26454 for _am_header in $config_headers :; do
26455   case $_am_header in
26456     "$ac_file" | "$ac_file":* )
26457       break ;;
26458     * )
26459       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26460   esac
26461 done
26462 echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
26463 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26464          X"$ac_file" : 'X\(//\)[^/]' \| \
26465          X"$ac_file" : 'X\(//\)$' \| \
26466          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26467 $as_echo X"$ac_file" |
26468     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26469             s//\1/
26470             q
26471           }
26472           /^X\(\/\/\)[^/].*/{
26473             s//\1/
26474             q
26475           }
26476           /^X\(\/\/\)$/{
26477             s//\1/
26478             q
26479           }
26480           /^X\(\/\).*/{
26481             s//\1/
26482             q
26483           }
26484           s/.*/./; q'`/stamp-h$_am_stamp_count
26485  ;;
26486
26487   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26488 $as_echo "$as_me: executing $ac_file commands" >&6;}
26489  ;;
26490   esac
26491
26492
26493   case $ac_file$ac_mode in
26494     "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
26495   # Strip MF so we end up with the name of the file.
26496   mf=`echo "$mf" | sed -e 's/:.*$//'`
26497   # Check whether this is an Automake generated Makefile or not.
26498   # We used to match only the files named `Makefile.in', but
26499   # some people rename them; so instead we look at the file content.
26500   # Grep'ing the first line is not enough: some people post-process
26501   # each Makefile.in and add a new line on top of each file to say so.
26502   # So let's grep whole file.
26503   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
26504     dirpart=`$as_dirname -- "$mf" ||
26505 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26506          X"$mf" : 'X\(//\)[^/]' \| \
26507          X"$mf" : 'X\(//\)$' \| \
26508          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
26509 $as_echo X"$mf" |
26510     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26511             s//\1/
26512             q
26513           }
26514           /^X\(\/\/\)[^/].*/{
26515             s//\1/
26516             q
26517           }
26518           /^X\(\/\/\)$/{
26519             s//\1/
26520             q
26521           }
26522           /^X\(\/\).*/{
26523             s//\1/
26524             q
26525           }
26526           s/.*/./; q'`
26527   else
26528     continue
26529   fi
26530   # Extract the definition of DEPDIR, am__include, and am__quote
26531   # from the Makefile without running `make'.
26532   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
26533   test -z "$DEPDIR" && continue
26534   am__include=`sed -n 's/^am__include = //p' < "$mf"`
26535   test -z "am__include" && continue
26536   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
26537   # When using ansi2knr, U may be empty or an underscore; expand it
26538   U=`sed -n 's/^U = //p' < "$mf"`
26539   # Find all dependency output files, they are included files with
26540   # $(DEPDIR) in their names.  We invoke sed twice because it is the
26541   # simplest approach to changing $(DEPDIR) to its actual value in the
26542   # expansion.
26543   for file in `sed -n "
26544     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
26545        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
26546     # Make sure the directory exists.
26547     test -f "$dirpart/$file" && continue
26548     fdir=`$as_dirname -- "$file" ||
26549 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26550          X"$file" : 'X\(//\)[^/]' \| \
26551          X"$file" : 'X\(//\)$' \| \
26552          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
26553 $as_echo X"$file" |
26554     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26555             s//\1/
26556             q
26557           }
26558           /^X\(\/\/\)[^/].*/{
26559             s//\1/
26560             q
26561           }
26562           /^X\(\/\/\)$/{
26563             s//\1/
26564             q
26565           }
26566           /^X\(\/\).*/{
26567             s//\1/
26568             q
26569           }
26570           s/.*/./; q'`
26571     as_dir=$dirpart/$fdir; as_fn_mkdir_p
26572     # echo "creating $dirpart/$file"
26573     echo '# dummy' > "$dirpart/$file"
26574   done
26575 done
26576  ;;
26577     "default":C)
26578 chmod +x tests/run
26579 date > stamp-h
26580 BACKENDSC="servers/slapd/backends.c"
26581 echo "Making $BACKENDSC"
26582 rm -f $BACKENDSC
26583 cat > $BACKENDSC << ENDX
26584 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26585  *
26586  * Copyright 1998-2017 The OpenLDAP Foundation.
26587  * All rights reserved.
26588  *
26589  * Redistribution and use in source and binary forms, with or without
26590  * modification, are permitted only as authorized by the OpenLDAP
26591  * Public License.
26592  *
26593  * A copy of this license is available in the file LICENSE in the
26594  * top-level directory of the distribution or, alternatively, at
26595  * <http://www.OpenLDAP.org/license.html>.
26596  */
26597 /* This file is automatically generated by configure; please do not edit. */
26598
26599 #include "portable.h"
26600 #include "slap.h"
26601
26602 ENDX
26603 if test "${STATIC_BACKENDS}"; then
26604         for b in config ${STATIC_BACKENDS}; do
26605                 bb=`echo "${b}" | sed -e 's/back-//'`
26606                 cat >> $BACKENDSC << ENDX
26607 extern BI_init ${bb}_back_initialize;
26608 ENDX
26609         done
26610
26611         cat >> $BACKENDSC << ENDX
26612
26613 BackendInfo slap_binfo[] = {
26614 ENDX
26615
26616         for b in config ${STATIC_BACKENDS}; do
26617                 bb=`echo "${b}" | sed -e 's/back-//'`
26618                 echo "    Add ${bb} ..."
26619                 cat >> $BACKENDSC << ENDX
26620         { "${bb}", ${bb}_back_initialize },
26621 ENDX
26622         done
26623
26624         cat >> $BACKENDSC << ENDX
26625         { NULL, NULL },
26626 };
26627
26628 /* end of generated file */
26629 ENDX
26630 fi
26631 OVERLAYSC="servers/slapd/overlays/statover.c"
26632 echo "Making $OVERLAYSC"
26633 rm -f $OVERLAYSC
26634 cat > $OVERLAYSC << ENDX
26635 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26636  *
26637  * Copyright 1998-2017 The OpenLDAP Foundation.
26638  * All rights reserved.
26639  *
26640  * Redistribution and use in source and binary forms, with or without
26641  * modification, are permitted only as authorized by the OpenLDAP
26642  * Public License.
26643  *
26644  * A copy of this license is available in the file LICENSE in the
26645  * top-level directory of the distribution or, alternatively, at
26646  * <http://www.OpenLDAP.org/license.html>.
26647  */
26648 /* This file is automatically generated by configure; please do not edit. */
26649
26650 #include "portable.h"
26651 #include "slap.h"
26652
26653 ENDX
26654 if test "${STATIC_OVERLAYS}"; then
26655         for o in ${STATIC_OVERLAYS}; do
26656                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26657                 cat >> $OVERLAYSC << ENDX
26658 extern OV_init ${oo}_initialize;
26659 ENDX
26660         done
26661 fi
26662
26663 cat >> $OVERLAYSC << ENDX
26664
26665 OverlayInit slap_oinfo[] = {
26666 ENDX
26667
26668 if test "${STATIC_OVERLAYS}"; then
26669         for o in ${STATIC_OVERLAYS}; do
26670                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26671                 echo "    Add ${oo} ..."
26672                 cat >> $OVERLAYSC << ENDX
26673         { "${oo}", ${oo}_initialize },
26674 ENDX
26675         done
26676 fi
26677
26678         cat >> $OVERLAYSC << ENDX
26679         { NULL, NULL },
26680 };
26681
26682 /* end of generated file */
26683 ENDX
26684
26685 if test "${ol_cv_mkdep}" = no; then
26686         echo '(Do not "make depend"; we do not know how to build dependencies)'
26687 else
26688         echo 'Please run "make depend" to build dependencies'
26689 fi
26690  ;;
26691
26692   esac
26693 done # for ac_tag
26694
26695
26696 as_fn_exit 0
26697 _ACEOF
26698 ac_clean_files=$ac_clean_files_save
26699
26700 test $ac_write_fail = 0 ||
26701   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
26702
26703
26704 # configure is writing to config.log, and then calls config.status.
26705 # config.status does its own redirection, appending to config.log.
26706 # Unfortunately, on DOS this fails, as config.log is still kept open
26707 # by configure, so config.status won't be able to write to it; its
26708 # output is simply discarded.  So we exec the FD to /dev/null,
26709 # effectively closing config.log, so it can be properly (re)opened and
26710 # appended to by config.status.  When coming back to configure, we
26711 # need to make the FD available again.
26712 if test "$no_create" != yes; then
26713   ac_cs_success=:
26714   ac_config_status_args=
26715   test "$silent" = yes &&
26716     ac_config_status_args="$ac_config_status_args --quiet"
26717   exec 5>/dev/null
26718   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26719   exec 5>>config.log
26720   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26721   # would make configure fail if this is the last instruction.
26722   $ac_cs_success || as_fn_exit $?
26723 fi
26724 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26725   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26726 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26727 fi
26728