]> git.sur5r.net Git - openldap/blob - configure
ITS#8692 let back-sock generate increment: line in case of LDAP_MOD_INCREMENT (see...
[openldap] / configure
1 #! /bin/sh
2 # From configure.in Id: 41cd0a5df892091d70e4deae4b86a9d022f4302b .
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/devpoll.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_devpoll_h}" = yes \
14416                 -a "${ac_cv_header_poll_h}" = yes ; \
14417 then
14418         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/poll" >&5
14419 $as_echo_n "checking for /dev/poll... " >&6; }
14420         if test "$cross_compiling" = yes; then :
14421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14422 $as_echo "no" >&6; }
14423 else
14424   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14425 /* end confdefs.h.  */
14426 int main(int argc, char **argv)
14427 {
14428         int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
14429         exit (devpollfd == -1 ? 1 : 0);
14430 }
14431 _ACEOF
14432 if ac_fn_c_try_run "$LINENO"; then :
14433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14434 $as_echo "yes" >&6; }
14435
14436 $as_echo "#define HAVE_DEVPOLL 1" >>confdefs.h
14437
14438 else
14439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14440 $as_echo "no" >&6; }
14441 fi
14442 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14443   conftest.$ac_objext conftest.beam conftest.$ac_ext
14444 fi
14445
14446 fi
14447
14448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14449 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14450 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14451   $as_echo_n "(cached) " >&6
14452 else
14453
14454         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14455 /* end confdefs.h.  */
14456
14457 #include <stdio.h>
14458 #include <sys/types.h>
14459 #include <errno.h>
14460 #ifdef _WIN32
14461 #include <stdlib.h>
14462 #endif
14463 int
14464 main ()
14465 {
14466 char *c = (char *) *sys_errlist
14467   ;
14468   return 0;
14469 }
14470 _ACEOF
14471 if ac_fn_c_try_compile "$LINENO"; then :
14472   ol_cv_dcl_sys_errlist=yes
14473         ol_cv_have_sys_errlist=yes
14474 else
14475   ol_cv_dcl_sys_errlist=no
14476 fi
14477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14478 fi
14479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14480 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14481 #
14482 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14483 if test $ol_cv_dcl_sys_errlist = no ; then
14484
14485 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14486
14487
14488         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14489 $as_echo_n "checking existence of sys_errlist... " >&6; }
14490 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14491   $as_echo_n "(cached) " >&6
14492 else
14493
14494                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14495 /* end confdefs.h.  */
14496 #include <errno.h>
14497 int
14498 main ()
14499 {
14500 char *c = (char *) *sys_errlist
14501   ;
14502   return 0;
14503 }
14504 _ACEOF
14505 if ac_fn_c_try_link "$LINENO"; then :
14506   ol_cv_have_sys_errlist=yes
14507 else
14508   ol_cv_have_sys_errlist=no
14509 fi
14510 rm -f core conftest.err conftest.$ac_objext \
14511     conftest$ac_exeext conftest.$ac_ext
14512 fi
14513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14514 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14515 fi
14516 if test $ol_cv_have_sys_errlist = yes ; then
14517
14518 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14519
14520 fi
14521  for ac_func in strerror strerror_r
14522 do :
14523   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14524 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14525 eval as_val=\$$as_ac_var
14526    if test "x$as_val" = x""yes; then :
14527   cat >>confdefs.h <<_ACEOF
14528 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14529 _ACEOF
14530
14531 fi
14532 done
14533
14534 ol_cv_func_strerror_r=no
14535 if test "${ac_cv_func_strerror_r}" = yes ; then
14536         { $as_echo "$as_me:${as_lineno-$LINENO}: checking non-posix strerror_r" >&5
14537 $as_echo_n "checking non-posix strerror_r... " >&6; }
14538 if test "${ol_cv_nonposix_strerror_r+set}" = set; then :
14539   $as_echo_n "(cached) " >&6
14540 else
14541
14542         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14543 /* end confdefs.h.  */
14544 #include <string.h>
14545 _ACEOF
14546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14547   $EGREP "strerror_r" >/dev/null 2>&1; then :
14548   ol_decl_strerror_r=yes
14549 else
14550   ol_decl_strerror_r=no
14551 fi
14552 rm -f conftest*
14553
14554         if test $ol_decl_strerror_r = yes ; then
14555                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14556 /* end confdefs.h.  */
14557 #include <string.h>
14558 int
14559 main ()
14560 {
14561    /* from autoconf 2.59 */
14562                                 char buf[100];
14563                                 char x = *strerror_r (0, buf, sizeof buf);
14564                                 char *p = strerror_r (0, buf, sizeof buf);
14565
14566   ;
14567   return 0;
14568 }
14569 _ACEOF
14570 if ac_fn_c_try_compile "$LINENO"; then :
14571   ol_cv_nonposix_strerror_r=yes
14572 else
14573   ol_cv_nonposix_strerror_r=no
14574 fi
14575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14576         else
14577                 if test "$cross_compiling" = yes; then :
14578   ol_cv_nonposix_strerror=no
14579 else
14580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14581 /* end confdefs.h.  */
14582
14583                         main() {
14584                                 char buf[100];
14585                                 buf[0] = 0;
14586                                 strerror_r( 1, buf, sizeof buf );
14587                                 exit( buf[0] == 0 );
14588                         }
14589
14590 _ACEOF
14591 if ac_fn_c_try_run "$LINENO"; then :
14592   ol_cv_nonposix_strerror_r=yes
14593 else
14594   ol_cv_nonposix_strerror=no
14595 fi
14596 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14597   conftest.$ac_objext conftest.beam conftest.$ac_ext
14598 fi
14599
14600         fi
14601
14602 fi
14603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_nonposix_strerror_r" >&5
14604 $as_echo "$ol_cv_nonposix_strerror_r" >&6; }
14605 if test $ol_cv_nonposix_strerror_r = yes ; then
14606
14607 $as_echo "#define HAVE_NONPOSIX_STRERROR_R 1" >>confdefs.h
14608
14609 fi
14610
14611 elif test "${ac_cv_func_strerror}" = no ; then
14612         { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14613 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14614 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14615   $as_echo_n "(cached) " >&6
14616 else
14617
14618         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14619 /* end confdefs.h.  */
14620
14621 #include <stdio.h>
14622 #include <sys/types.h>
14623 #include <errno.h>
14624 #ifdef _WIN32
14625 #include <stdlib.h>
14626 #endif
14627 int
14628 main ()
14629 {
14630 char *c = (char *) *sys_errlist
14631   ;
14632   return 0;
14633 }
14634 _ACEOF
14635 if ac_fn_c_try_compile "$LINENO"; then :
14636   ol_cv_dcl_sys_errlist=yes
14637         ol_cv_have_sys_errlist=yes
14638 else
14639   ol_cv_dcl_sys_errlist=no
14640 fi
14641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14642 fi
14643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14644 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14645 #
14646 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14647 if test $ol_cv_dcl_sys_errlist = no ; then
14648
14649 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14650
14651
14652         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14653 $as_echo_n "checking existence of sys_errlist... " >&6; }
14654 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14655   $as_echo_n "(cached) " >&6
14656 else
14657
14658                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14659 /* end confdefs.h.  */
14660 #include <errno.h>
14661 int
14662 main ()
14663 {
14664 char *c = (char *) *sys_errlist
14665   ;
14666   return 0;
14667 }
14668 _ACEOF
14669 if ac_fn_c_try_link "$LINENO"; then :
14670   ol_cv_have_sys_errlist=yes
14671 else
14672   ol_cv_have_sys_errlist=no
14673 fi
14674 rm -f core conftest.err conftest.$ac_objext \
14675     conftest$ac_exeext conftest.$ac_ext
14676 fi
14677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14678 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14679 fi
14680 if test $ol_cv_have_sys_errlist = yes ; then
14681
14682 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14683
14684 fi
14685
14686 fi
14687
14688
14689 for ac_header in regex.h
14690 do :
14691   ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default
14692 #ifdef HAVE_SYS_TYPES_H
14693 #include <sys/types.h>
14694 #endif
14695
14696 "
14697 if test "x$ac_cv_header_regex_h" = x""yes; then :
14698   cat >>confdefs.h <<_ACEOF
14699 #define HAVE_REGEX_H 1
14700 _ACEOF
14701
14702 fi
14703
14704 done
14705
14706
14707 if test "$ac_cv_header_regex_h" != yes ; then
14708         as_fn_error "POSIX regex.h required." "$LINENO" 5
14709 fi
14710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing regfree" >&5
14711 $as_echo_n "checking for library containing regfree... " >&6; }
14712 if test "${ac_cv_search_regfree+set}" = set; then :
14713   $as_echo_n "(cached) " >&6
14714 else
14715   ac_func_search_save_LIBS=$LIBS
14716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14717 /* end confdefs.h.  */
14718
14719 /* Override any GCC internal prototype to avoid an error.
14720    Use char because int might match the return type of a GCC
14721    builtin and then its argument prototype would still apply.  */
14722 #ifdef __cplusplus
14723 extern "C"
14724 #endif
14725 char regfree ();
14726 int
14727 main ()
14728 {
14729 return regfree ();
14730   ;
14731   return 0;
14732 }
14733 _ACEOF
14734 for ac_lib in '' regex gnuregex; do
14735   if test -z "$ac_lib"; then
14736     ac_res="none required"
14737   else
14738     ac_res=-l$ac_lib
14739     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14740   fi
14741   if ac_fn_c_try_link "$LINENO"; then :
14742   ac_cv_search_regfree=$ac_res
14743 fi
14744 rm -f core conftest.err conftest.$ac_objext \
14745     conftest$ac_exeext
14746   if test "${ac_cv_search_regfree+set}" = set; then :
14747   break
14748 fi
14749 done
14750 if test "${ac_cv_search_regfree+set}" = set; then :
14751
14752 else
14753   ac_cv_search_regfree=no
14754 fi
14755 rm conftest.$ac_ext
14756 LIBS=$ac_func_search_save_LIBS
14757 fi
14758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_regfree" >&5
14759 $as_echo "$ac_cv_search_regfree" >&6; }
14760 ac_res=$ac_cv_search_regfree
14761 if test "$ac_res" != no; then :
14762   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14763   :
14764 else
14765   as_fn_error "POSIX regex required." "$LINENO" 5
14766 fi
14767
14768
14769
14770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible POSIX regex" >&5
14771 $as_echo_n "checking for compatible POSIX regex... " >&6; }
14772 if test "${ol_cv_c_posix_regex+set}" = set; then :
14773   $as_echo_n "(cached) " >&6
14774 else
14775
14776         if test "$cross_compiling" = yes; then :
14777   ol_cv_c_posix_regex=cross
14778 else
14779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14780 /* end confdefs.h.  */
14781
14782 #include <sys/types.h>
14783 #include <regex.h>
14784 static char *pattern, *string;
14785 main()
14786 {
14787         int rc;
14788         regex_t re;
14789
14790         pattern = "^A";
14791
14792         if(regcomp(&re, pattern, 0)) {
14793                 return -1;
14794         }
14795
14796         string = "ALL MATCH";
14797
14798         rc = regexec(&re, string, 0, (void*)0, 0);
14799
14800         regfree(&re);
14801
14802         return rc;
14803 }
14804 _ACEOF
14805 if ac_fn_c_try_run "$LINENO"; then :
14806   ol_cv_c_posix_regex=yes
14807 else
14808   ol_cv_c_posix_regex=no
14809 fi
14810 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14811   conftest.$ac_objext conftest.beam conftest.$ac_ext
14812 fi
14813
14814 fi
14815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_posix_regex" >&5
14816 $as_echo "$ol_cv_c_posix_regex" >&6; }
14817
14818 if test "$ol_cv_c_posix_regex" = no ; then
14819         as_fn_error "broken POSIX regex!" "$LINENO" 5
14820 fi
14821
14822
14823 have_uuid=no
14824 for ac_header in sys/uuid.h
14825 do :
14826   ac_fn_c_check_header_mongrel "$LINENO" "sys/uuid.h" "ac_cv_header_sys_uuid_h" "$ac_includes_default"
14827 if test "x$ac_cv_header_sys_uuid_h" = x""yes; then :
14828   cat >>confdefs.h <<_ACEOF
14829 #define HAVE_SYS_UUID_H 1
14830 _ACEOF
14831
14832 fi
14833
14834 done
14835
14836 if test $ac_cv_header_sys_uuid_h = yes ; then
14837         save_LIBS="$LIBS"
14838         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_to_str" >&5
14839 $as_echo_n "checking for library containing uuid_to_str... " >&6; }
14840 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14841   $as_echo_n "(cached) " >&6
14842 else
14843   ac_func_search_save_LIBS=$LIBS
14844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14845 /* end confdefs.h.  */
14846
14847 /* Override any GCC internal prototype to avoid an error.
14848    Use char because int might match the return type of a GCC
14849    builtin and then its argument prototype would still apply.  */
14850 #ifdef __cplusplus
14851 extern "C"
14852 #endif
14853 char uuid_to_str ();
14854 int
14855 main ()
14856 {
14857 return uuid_to_str ();
14858   ;
14859   return 0;
14860 }
14861 _ACEOF
14862 for ac_lib in '' uuid; do
14863   if test -z "$ac_lib"; then
14864     ac_res="none required"
14865   else
14866     ac_res=-l$ac_lib
14867     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14868   fi
14869   if ac_fn_c_try_link "$LINENO"; then :
14870   ac_cv_search_uuid_to_str=$ac_res
14871 fi
14872 rm -f core conftest.err conftest.$ac_objext \
14873     conftest$ac_exeext
14874   if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14875   break
14876 fi
14877 done
14878 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14879
14880 else
14881   ac_cv_search_uuid_to_str=no
14882 fi
14883 rm conftest.$ac_ext
14884 LIBS=$ac_func_search_save_LIBS
14885 fi
14886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_to_str" >&5
14887 $as_echo "$ac_cv_search_uuid_to_str" >&6; }
14888 ac_res=$ac_cv_search_uuid_to_str
14889 if test "$ac_res" != no; then :
14890   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14891   have_uuid=yes
14892 else
14893   :
14894 fi
14895
14896         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_create" >&5
14897 $as_echo_n "checking for library containing uuid_create... " >&6; }
14898 if test "${ac_cv_search_uuid_create+set}" = set; then :
14899   $as_echo_n "(cached) " >&6
14900 else
14901   ac_func_search_save_LIBS=$LIBS
14902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14903 /* end confdefs.h.  */
14904
14905 /* Override any GCC internal prototype to avoid an error.
14906    Use char because int might match the return type of a GCC
14907    builtin and then its argument prototype would still apply.  */
14908 #ifdef __cplusplus
14909 extern "C"
14910 #endif
14911 char uuid_create ();
14912 int
14913 main ()
14914 {
14915 return uuid_create ();
14916   ;
14917   return 0;
14918 }
14919 _ACEOF
14920 for ac_lib in '' uuid; do
14921   if test -z "$ac_lib"; then
14922     ac_res="none required"
14923   else
14924     ac_res=-l$ac_lib
14925     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14926   fi
14927   if ac_fn_c_try_link "$LINENO"; then :
14928   ac_cv_search_uuid_create=$ac_res
14929 fi
14930 rm -f core conftest.err conftest.$ac_objext \
14931     conftest$ac_exeext
14932   if test "${ac_cv_search_uuid_create+set}" = set; then :
14933   break
14934 fi
14935 done
14936 if test "${ac_cv_search_uuid_create+set}" = set; then :
14937
14938 else
14939   ac_cv_search_uuid_create=no
14940 fi
14941 rm conftest.$ac_ext
14942 LIBS=$ac_func_search_save_LIBS
14943 fi
14944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_create" >&5
14945 $as_echo "$ac_cv_search_uuid_create" >&6; }
14946 ac_res=$ac_cv_search_uuid_create
14947 if test "$ac_res" != no; then :
14948   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14949   :
14950 else
14951   have_uuid=no
14952 fi
14953
14954         LIBS="$save_LIBS"
14955
14956         if test $have_uuid = yes ; then
14957
14958 $as_echo "#define HAVE_UUID_TO_STR 1" >>confdefs.h
14959
14960
14961                 test "$ac_cv_search_uuid_to_str" = "none required" || \
14962                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
14963         fi
14964 fi
14965
14966 if test $have_uuid = no ; then
14967         for ac_header in uuid/uuid.h
14968 do :
14969   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14970 if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then :
14971   cat >>confdefs.h <<_ACEOF
14972 #define HAVE_UUID_UUID_H 1
14973 _ACEOF
14974
14975 fi
14976
14977 done
14978
14979         if test $ac_cv_header_uuid_uuid_h = yes ; then
14980                 save_LIBS="$LIBS"
14981                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
14982 $as_echo_n "checking for library containing uuid_generate... " >&6; }
14983 if test "${ac_cv_search_uuid_generate+set}" = set; then :
14984   $as_echo_n "(cached) " >&6
14985 else
14986   ac_func_search_save_LIBS=$LIBS
14987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14988 /* end confdefs.h.  */
14989
14990 /* Override any GCC internal prototype to avoid an error.
14991    Use char because int might match the return type of a GCC
14992    builtin and then its argument prototype would still apply.  */
14993 #ifdef __cplusplus
14994 extern "C"
14995 #endif
14996 char uuid_generate ();
14997 int
14998 main ()
14999 {
15000 return uuid_generate ();
15001   ;
15002   return 0;
15003 }
15004 _ACEOF
15005 for ac_lib in '' uuid; do
15006   if test -z "$ac_lib"; then
15007     ac_res="none required"
15008   else
15009     ac_res=-l$ac_lib
15010     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15011   fi
15012   if ac_fn_c_try_link "$LINENO"; then :
15013   ac_cv_search_uuid_generate=$ac_res
15014 fi
15015 rm -f core conftest.err conftest.$ac_objext \
15016     conftest$ac_exeext
15017   if test "${ac_cv_search_uuid_generate+set}" = set; then :
15018   break
15019 fi
15020 done
15021 if test "${ac_cv_search_uuid_generate+set}" = set; then :
15022
15023 else
15024   ac_cv_search_uuid_generate=no
15025 fi
15026 rm conftest.$ac_ext
15027 LIBS=$ac_func_search_save_LIBS
15028 fi
15029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
15030 $as_echo "$ac_cv_search_uuid_generate" >&6; }
15031 ac_res=$ac_cv_search_uuid_generate
15032 if test "$ac_res" != no; then :
15033   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15034   have_uuid=yes
15035 else
15036   :
15037 fi
15038
15039                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_unparse_lower" >&5
15040 $as_echo_n "checking for library containing uuid_unparse_lower... " >&6; }
15041 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
15042   $as_echo_n "(cached) " >&6
15043 else
15044   ac_func_search_save_LIBS=$LIBS
15045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15046 /* end confdefs.h.  */
15047
15048 /* Override any GCC internal prototype to avoid an error.
15049    Use char because int might match the return type of a GCC
15050    builtin and then its argument prototype would still apply.  */
15051 #ifdef __cplusplus
15052 extern "C"
15053 #endif
15054 char uuid_unparse_lower ();
15055 int
15056 main ()
15057 {
15058 return uuid_unparse_lower ();
15059   ;
15060   return 0;
15061 }
15062 _ACEOF
15063 for ac_lib in '' uuid; do
15064   if test -z "$ac_lib"; then
15065     ac_res="none required"
15066   else
15067     ac_res=-l$ac_lib
15068     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15069   fi
15070   if ac_fn_c_try_link "$LINENO"; then :
15071   ac_cv_search_uuid_unparse_lower=$ac_res
15072 fi
15073 rm -f core conftest.err conftest.$ac_objext \
15074     conftest$ac_exeext
15075   if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
15076   break
15077 fi
15078 done
15079 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
15080
15081 else
15082   ac_cv_search_uuid_unparse_lower=no
15083 fi
15084 rm conftest.$ac_ext
15085 LIBS=$ac_func_search_save_LIBS
15086 fi
15087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_unparse_lower" >&5
15088 $as_echo "$ac_cv_search_uuid_unparse_lower" >&6; }
15089 ac_res=$ac_cv_search_uuid_unparse_lower
15090 if test "$ac_res" != no; then :
15091   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15092   :
15093 else
15094   have_uuid=no
15095 fi
15096
15097                 LIBS="$save_LIBS"
15098
15099                 if test $have_uuid = yes ; then
15100
15101 $as_echo "#define HAVE_UUID_GENERATE 1" >>confdefs.h
15102
15103
15104                         test "$ac_cv_search_uuid_generate" = "none required" || \
15105                                 SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_generate"
15106                 fi
15107         fi
15108 fi
15109
15110 if test $have_uuid = no ; then
15111         { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
15112 $as_echo_n "checking to see if -lrpcrt4 is needed for win32 UUID support... " >&6; }
15113         save_LIBS="$LIBS"
15114         LIBS="$LIBS -lrpcrt4"
15115         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15116 /* end confdefs.h.  */
15117
15118                 int __stdcall UuidCreate(void *);
15119                 int __stdcall UuidToStringA(void *,void **);
15120
15121 int
15122 main ()
15123 {
15124
15125                 UuidCreate(0);
15126                 UuidToStringA(0,0);
15127
15128   ;
15129   return 0;
15130 }
15131 _ACEOF
15132 if ac_fn_c_try_link "$LINENO"; then :
15133   need_rpcrt=yes
15134 else
15135   need_rpcrt=no
15136 fi
15137 rm -f core conftest.err conftest.$ac_objext \
15138     conftest$ac_exeext conftest.$ac_ext
15139         if test $need_rpcrt = yes; then
15140                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
15141         fi
15142         LIBS="$save_LIBS"
15143         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_rpcrt" >&5
15144 $as_echo "$need_rpcrt" >&6; }
15145 fi
15146
15147 ol_cv_lib_resolver=no
15148 if test $ol_cv_lib_resolver = no ; then
15149         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (default)" >&5
15150 $as_echo_n "checking for resolver link (default)... " >&6; }
15151 if test "${ol_cv_resolver_none+set}" = set; then :
15152   $as_echo_n "(cached) " >&6
15153 else
15154
15155         ol_RESOLVER_LIB=
15156         ol_LIBS=$LIBS
15157         LIBS="$ol_RESOLVER_LIB $LIBS"
15158
15159         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15160 /* end confdefs.h.  */
15161
15162 #ifdef HAVE_SYS_TYPES_H
15163 #       include <sys/types.h>
15164 #endif
15165 #include <netinet/in.h>
15166 #ifdef HAVE_ARPA_NAMESER_H
15167 #       include <arpa/nameser.h>
15168 #endif
15169 #ifdef HAVE_RESOLV_H
15170 #       include <resolv.h>
15171 #endif
15172
15173 int
15174 main ()
15175 {
15176 {
15177         int len, status;
15178         char *request = NULL;
15179         unsigned char reply[64*1024];
15180         unsigned char host[64*1024];
15181         unsigned char *p;
15182
15183 #ifdef NS_HFIXEDSZ
15184         /* Bind 8/9 interface */
15185         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15186 #else
15187         /* Bind 4 interface */
15188 # ifndef T_SRV
15189 #  define T_SRV 33
15190 # endif
15191         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15192 #endif
15193         p = reply;
15194 #ifdef NS_HFIXEDSZ
15195         /* Bind 8/9 interface */
15196         p += NS_HFIXEDSZ;
15197 #elif defined(HFIXEDSZ)
15198         /* Bind 4 interface w/ HFIXEDSZ */
15199         p += HFIXEDSZ;
15200 #else
15201         /* Bind 4 interface w/o HFIXEDSZ */
15202         p += sizeof(HEADER);
15203 #endif
15204         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15205 }
15206   ;
15207   return 0;
15208 }
15209 _ACEOF
15210 if ac_fn_c_try_link "$LINENO"; then :
15211   ol_cv_resolver_none=yes
15212 else
15213   ol_cv_resolver_none=no
15214 fi
15215 rm -f core conftest.err conftest.$ac_objext \
15216     conftest$ac_exeext conftest.$ac_ext
15217
15218         LIBS="$ol_LIBS"
15219
15220 fi
15221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_none" >&5
15222 $as_echo "$ol_cv_resolver_none" >&6; }
15223
15224         if test $ol_cv_resolver_none = yes ; then
15225                 ol_cv_lib_resolver=yes
15226         fi
15227 fi
15228
15229 if test $ol_cv_lib_resolver = no ; then
15230         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lresolv)" >&5
15231 $as_echo_n "checking for resolver link (-lresolv)... " >&6; }
15232 if test "${ol_cv_resolver_resolv+set}" = set; then :
15233   $as_echo_n "(cached) " >&6
15234 else
15235
15236         ol_RESOLVER_LIB=-lresolv
15237         ol_LIBS=$LIBS
15238         LIBS="$ol_RESOLVER_LIB $LIBS"
15239
15240         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15241 /* end confdefs.h.  */
15242
15243 #ifdef HAVE_SYS_TYPES_H
15244 #       include <sys/types.h>
15245 #endif
15246 #include <netinet/in.h>
15247 #ifdef HAVE_ARPA_NAMESER_H
15248 #       include <arpa/nameser.h>
15249 #endif
15250 #ifdef HAVE_RESOLV_H
15251 #       include <resolv.h>
15252 #endif
15253
15254 int
15255 main ()
15256 {
15257 {
15258         int len, status;
15259         char *request = NULL;
15260         unsigned char reply[64*1024];
15261         unsigned char host[64*1024];
15262         unsigned char *p;
15263
15264 #ifdef NS_HFIXEDSZ
15265         /* Bind 8/9 interface */
15266         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15267 #else
15268         /* Bind 4 interface */
15269 # ifndef T_SRV
15270 #  define T_SRV 33
15271 # endif
15272         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15273 #endif
15274         p = reply;
15275 #ifdef NS_HFIXEDSZ
15276         /* Bind 8/9 interface */
15277         p += NS_HFIXEDSZ;
15278 #elif defined(HFIXEDSZ)
15279         /* Bind 4 interface w/ HFIXEDSZ */
15280         p += HFIXEDSZ;
15281 #else
15282         /* Bind 4 interface w/o HFIXEDSZ */
15283         p += sizeof(HEADER);
15284 #endif
15285         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15286 }
15287   ;
15288   return 0;
15289 }
15290 _ACEOF
15291 if ac_fn_c_try_link "$LINENO"; then :
15292   ol_cv_resolver_resolv=yes
15293 else
15294   ol_cv_resolver_resolv=no
15295 fi
15296 rm -f core conftest.err conftest.$ac_objext \
15297     conftest$ac_exeext conftest.$ac_ext
15298
15299         LIBS="$ol_LIBS"
15300
15301 fi
15302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_resolv" >&5
15303 $as_echo "$ol_cv_resolver_resolv" >&6; }
15304
15305         if test $ol_cv_resolver_resolv = yes ; then
15306                 ol_cv_lib_resolver=-lresolv
15307         fi
15308 fi
15309
15310 if test $ol_cv_lib_resolver = no ; then
15311         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lbind)" >&5
15312 $as_echo_n "checking for resolver link (-lbind)... " >&6; }
15313 if test "${ol_cv_resolver_bind+set}" = set; then :
15314   $as_echo_n "(cached) " >&6
15315 else
15316
15317         ol_RESOLVER_LIB=-lbind
15318         ol_LIBS=$LIBS
15319         LIBS="$ol_RESOLVER_LIB $LIBS"
15320
15321         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15322 /* end confdefs.h.  */
15323
15324 #ifdef HAVE_SYS_TYPES_H
15325 #       include <sys/types.h>
15326 #endif
15327 #include <netinet/in.h>
15328 #ifdef HAVE_ARPA_NAMESER_H
15329 #       include <arpa/nameser.h>
15330 #endif
15331 #ifdef HAVE_RESOLV_H
15332 #       include <resolv.h>
15333 #endif
15334
15335 int
15336 main ()
15337 {
15338 {
15339         int len, status;
15340         char *request = NULL;
15341         unsigned char reply[64*1024];
15342         unsigned char host[64*1024];
15343         unsigned char *p;
15344
15345 #ifdef NS_HFIXEDSZ
15346         /* Bind 8/9 interface */
15347         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15348 #else
15349         /* Bind 4 interface */
15350 # ifndef T_SRV
15351 #  define T_SRV 33
15352 # endif
15353         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15354 #endif
15355         p = reply;
15356 #ifdef NS_HFIXEDSZ
15357         /* Bind 8/9 interface */
15358         p += NS_HFIXEDSZ;
15359 #elif defined(HFIXEDSZ)
15360         /* Bind 4 interface w/ HFIXEDSZ */
15361         p += HFIXEDSZ;
15362 #else
15363         /* Bind 4 interface w/o HFIXEDSZ */
15364         p += sizeof(HEADER);
15365 #endif
15366         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15367 }
15368   ;
15369   return 0;
15370 }
15371 _ACEOF
15372 if ac_fn_c_try_link "$LINENO"; then :
15373   ol_cv_resolver_bind=yes
15374 else
15375   ol_cv_resolver_bind=no
15376 fi
15377 rm -f core conftest.err conftest.$ac_objext \
15378     conftest$ac_exeext conftest.$ac_ext
15379
15380         LIBS="$ol_LIBS"
15381
15382 fi
15383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_bind" >&5
15384 $as_echo "$ol_cv_resolver_bind" >&6; }
15385
15386         if test $ol_cv_resolver_bind = yes ; then
15387                 ol_cv_lib_resolver=-lbind
15388         fi
15389 fi
15390
15391
15392
15393 ol_link_dnssrv=no
15394 if test "$ol_cv_lib_resolver" != no ; then
15395
15396 $as_echo "#define HAVE_RES_QUERY 1" >>confdefs.h
15397
15398
15399         if test "$ol_enable_dnssrv" != no ; then
15400                 ol_link_dnssrv=yes
15401         fi
15402
15403         if test "$ol_cv_lib_resolver" != yes ; then
15404                 LIBS="$ol_cv_lib_resolver $LIBS"
15405         fi
15406 fi
15407
15408 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
15409         if test "$ol_link_dnssrv" = no ; then
15410                 as_fn_error "DNSSRV requires res_query()" "$LINENO" 5
15411         fi
15412 else
15413         ol_enable_dnssrv=no
15414 fi
15415
15416 for ac_func in hstrerror
15417 do :
15418   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15419 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15420 eval as_val=\$$as_ac_var
15421    if test "x$as_val" = x""yes; then :
15422   cat >>confdefs.h <<_ACEOF
15423 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15424 _ACEOF
15425
15426 fi
15427 done
15428
15429
15430 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
15431 do :
15432   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15433 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15434 eval as_val=\$$as_ac_var
15435    if test "x$as_val" = x""yes; then :
15436   cat >>confdefs.h <<_ACEOF
15437 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15438 _ACEOF
15439
15440 fi
15441 done
15442
15443
15444 ol_link_ipv6=no
15445 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
15446         if test $ol_enable_ipv6 = yes ; then
15447                 as_fn_error "IPv6 support requires getaddrinfo() and inet_ntop()" "$LINENO" 5
15448         fi
15449 elif test $ol_enable_ipv6 != no ; then
15450         { $as_echo "$as_me:${as_lineno-$LINENO}: checking INET6_ADDRSTRLEN" >&5
15451 $as_echo_n "checking INET6_ADDRSTRLEN... " >&6; }
15452 if test "${ol_cv_inet6_addrstrlen+set}" = set; then :
15453   $as_echo_n "(cached) " >&6
15454 else
15455
15456                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15457 /* end confdefs.h.  */
15458
15459 #                       include <netinet/in.h>
15460 #                       ifdef INET6_ADDRSTRLEN
15461                                 __has_inet6_addrstrlen__;
15462 #                       endif
15463
15464 _ACEOF
15465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15466   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then :
15467   ol_cv_inet6_addrstrlen=yes
15468 else
15469   ol_cv_inet6_addrstrlen=no
15470 fi
15471 rm -f conftest*
15472
15473 fi
15474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_inet6_addrstrlen" >&5
15475 $as_echo "$ol_cv_inet6_addrstrlen" >&6; }
15476
15477
15478         { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr_storage" >&5
15479 $as_echo_n "checking struct sockaddr_storage... " >&6; }
15480 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then :
15481   $as_echo_n "(cached) " >&6
15482 else
15483
15484                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15485 /* end confdefs.h.  */
15486
15487 #include <sys/types.h>
15488 #include <sys/socket.h>
15489
15490 int
15491 main ()
15492 {
15493
15494                         struct sockaddr_storage ss;
15495
15496   ;
15497   return 0;
15498 }
15499 _ACEOF
15500 if ac_fn_c_try_compile "$LINENO"; then :
15501   ol_cv_struct_sockaddr_storage=yes
15502 else
15503   ol_cv_struct_sockaddr_storage=no
15504 fi
15505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15506 fi
15507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_struct_sockaddr_storage" >&5
15508 $as_echo "$ol_cv_struct_sockaddr_storage" >&6; }
15509
15510         if test $ol_cv_inet6_addrstrlen = yes &&
15511            test $ol_cv_struct_sockaddr_storage = yes ; then
15512                 ol_link_ipv6=yes
15513         elif test $ol_enable_ipv6 = yes &&
15514              test $ol_cv_inet6_addrstrlen = no ; then
15515                 as_fn_error "IPv6 support requires INET6_ADDRSTRLEN" "$LINENO" 5
15516         elif test $ol_enable_ipv6 = yes &&
15517              test $ol_cv_struct_sockaddr_storage = no ; then
15518                 as_fn_error "IPv6 support requires struct sockaddr_storage" "$LINENO" 5
15519         fi
15520 fi
15521
15522 if test $ol_enable_local != no ; then
15523         for ac_header in sys/un.h
15524 do :
15525   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15526 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15527 eval as_val=\$$as_ac_Header
15528    if test "x$as_val" = x""yes; then :
15529   cat >>confdefs.h <<_ACEOF
15530 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15531 _ACEOF
15532
15533 fi
15534
15535 done
15536
15537
15538         if test $ol_enable_local = auto ; then
15539                 ol_enable_local=$ac_cv_header_sys_un_h
15540         elif test $ac_cv_header_sys_un_h = no ; then
15541                 as_fn_error "AF_LOCAL domain support requires sys/un.h" "$LINENO" 5
15542         fi
15543 fi
15544
15545
15546 if test $ol_with_tls = yes ; then
15547         ol_with_tls=auto
15548 fi
15549
15550 ol_link_tls=no
15551 if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
15552         for ac_header in openssl/ssl.h
15553 do :
15554   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
15555 if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then :
15556   cat >>confdefs.h <<_ACEOF
15557 #define HAVE_OPENSSL_SSL_H 1
15558 _ACEOF
15559
15560 fi
15561
15562 done
15563
15564
15565         if test $ac_cv_header_openssl_ssl_h = yes ; then
15566                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_msg_callback in -lssl" >&5
15567 $as_echo_n "checking for SSL_CTX_set_msg_callback in -lssl... " >&6; }
15568 if test "${ac_cv_lib_ssl_SSL_CTX_set_msg_callback+set}" = set; then :
15569   $as_echo_n "(cached) " >&6
15570 else
15571   ac_check_lib_save_LIBS=$LIBS
15572 LIBS="-lssl -lcrypto $LIBS"
15573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15574 /* end confdefs.h.  */
15575
15576 /* Override any GCC internal prototype to avoid an error.
15577    Use char because int might match the return type of a GCC
15578    builtin and then its argument prototype would still apply.  */
15579 #ifdef __cplusplus
15580 extern "C"
15581 #endif
15582 char SSL_CTX_set_msg_callback ();
15583 int
15584 main ()
15585 {
15586 return SSL_CTX_set_msg_callback ();
15587   ;
15588   return 0;
15589 }
15590 _ACEOF
15591 if ac_fn_c_try_link "$LINENO"; then :
15592   ac_cv_lib_ssl_SSL_CTX_set_msg_callback=yes
15593 else
15594   ac_cv_lib_ssl_SSL_CTX_set_msg_callback=no
15595 fi
15596 rm -f core conftest.err conftest.$ac_objext \
15597     conftest$ac_exeext conftest.$ac_ext
15598 LIBS=$ac_check_lib_save_LIBS
15599 fi
15600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_set_msg_callback" >&5
15601 $as_echo "$ac_cv_lib_ssl_SSL_CTX_set_msg_callback" >&6; }
15602 if test "x$ac_cv_lib_ssl_SSL_CTX_set_msg_callback" = x""yes; then :
15603   have_openssl=yes
15604                         need_rsaref=no
15605 else
15606   have_openssl=no
15607 fi
15608
15609
15610                 if test $have_openssl = no ; then
15611                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl3_accept in -lssl" >&5
15612 $as_echo_n "checking for ssl3_accept in -lssl... " >&6; }
15613 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then :
15614   $as_echo_n "(cached) " >&6
15615 else
15616   ac_check_lib_save_LIBS=$LIBS
15617 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $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 ssl3_accept ();
15628 int
15629 main ()
15630 {
15631 return ssl3_accept ();
15632   ;
15633   return 0;
15634 }
15635 _ACEOF
15636 if ac_fn_c_try_link "$LINENO"; then :
15637   ac_cv_lib_ssl_ssl3_accept=yes
15638 else
15639   ac_cv_lib_ssl_ssl3_accept=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_ssl3_accept" >&5
15646 $as_echo "$ac_cv_lib_ssl_ssl3_accept" >&6; }
15647 if test "x$ac_cv_lib_ssl_ssl3_accept" = x""yes; then :
15648   have_openssl=yes
15649                                 need_rsaref=yes
15650 else
15651   have_openssl=no
15652 fi
15653
15654                 fi
15655
15656                 if test $have_openssl = yes ; then
15657                         ol_with_tls=openssl
15658                         ol_link_tls=yes
15659
15660
15661 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
15662
15663
15664                         if test $need_rsaref = yes; then
15665
15666 $as_echo "#define HAVE_RSAREF 1" >>confdefs.h
15667
15668
15669                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
15670                         else
15671                                 TLS_LIBS="-lssl -lcrypto"
15672                         fi
15673
15674                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version (CRL checking capability)" >&5
15675 $as_echo_n "checking OpenSSL library version (CRL checking capability)... " >&6; }
15676 if test "${ol_cv_ssl_crl_compat+set}" = set; then :
15677   $as_echo_n "(cached) " >&6
15678 else
15679
15680                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15681 /* end confdefs.h.  */
15682
15683 #ifdef HAVE_OPENSSL_SSL_H
15684 #include <openssl/ssl.h>
15685 #endif
15686
15687 /* Require 0.9.7d+ */
15688 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
15689         char *__ssl_compat = "0.9.7d";
15690 #endif
15691
15692 _ACEOF
15693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15694   $EGREP "__ssl_compat" >/dev/null 2>&1; then :
15695   ol_cv_ssl_crl_compat=yes
15696 else
15697   ol_cv_ssl_crl_compat=no
15698 fi
15699 rm -f conftest*
15700
15701 fi
15702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_ssl_crl_compat" >&5
15703 $as_echo "$ol_cv_ssl_crl_compat" >&6; }
15704
15705                         if test $ol_cv_ssl_crl_compat = yes ; then
15706
15707 $as_echo "#define HAVE_OPENSSL_CRL 1" >>confdefs.h
15708
15709                         fi
15710                 fi
15711         fi
15712 fi
15713
15714 if test $ol_link_tls = no ; then
15715         if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then
15716                 for ac_header in gnutls/gnutls.h
15717 do :
15718   ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
15719 if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then :
15720   cat >>confdefs.h <<_ACEOF
15721 #define HAVE_GNUTLS_GNUTLS_H 1
15722 _ACEOF
15723
15724 fi
15725
15726 done
15727
15728
15729                 if test $ac_cv_header_gnutls_gnutls_h = yes ; then
15730                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15731 /* end confdefs.h.  */
15732 #include <gnutls/gnutls.h>
15733 #if GNUTLS_VERSION_NUMBER < 0x020c00
15734 #error "GnuTLS 2.12.0 or newer required"
15735 #endif
15736 _ACEOF
15737 if ac_fn_c_try_cpp "$LINENO"; then :
15738
15739 else
15740   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15741 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15742 as_fn_error "GnuTLS is too old
15743 See \`config.log' for more details." "$LINENO" 5; }
15744 fi
15745 rm -f conftest.err conftest.$ac_ext
15746
15747                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
15748 $as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
15749 if test "${ac_cv_lib_gnutls_gnutls_init+set}" = set; then :
15750   $as_echo_n "(cached) " >&6
15751 else
15752   ac_check_lib_save_LIBS=$LIBS
15753 LIBS="-lgnutls  $LIBS"
15754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15755 /* end confdefs.h.  */
15756
15757 /* Override any GCC internal prototype to avoid an error.
15758    Use char because int might match the return type of a GCC
15759    builtin and then its argument prototype would still apply.  */
15760 #ifdef __cplusplus
15761 extern "C"
15762 #endif
15763 char gnutls_init ();
15764 int
15765 main ()
15766 {
15767 return gnutls_init ();
15768   ;
15769   return 0;
15770 }
15771 _ACEOF
15772 if ac_fn_c_try_link "$LINENO"; then :
15773   ac_cv_lib_gnutls_gnutls_init=yes
15774 else
15775   ac_cv_lib_gnutls_gnutls_init=no
15776 fi
15777 rm -f core conftest.err conftest.$ac_objext \
15778     conftest$ac_exeext conftest.$ac_ext
15779 LIBS=$ac_check_lib_save_LIBS
15780 fi
15781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_init" >&5
15782 $as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
15783 if test "x$ac_cv_lib_gnutls_gnutls_init" = x""yes; then :
15784   have_gnutls=yes
15785 else
15786   have_gnutls=no
15787 fi
15788
15789
15790                         if test $have_gnutls = yes ; then
15791                                 ol_with_tls=gnutls
15792                                 ol_link_tls=yes
15793
15794                                 TLS_LIBS="-lgnutls"
15795
15796
15797 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
15798
15799                         fi
15800                 fi
15801         fi
15802 fi
15803
15804 if test $ol_link_tls = no ; then
15805         if test $ol_with_tls = moznss || test $ol_with_tls = auto ; then
15806                 have_moznss=no
15807                 for ac_header in nssutil.h
15808 do :
15809   ac_fn_c_check_header_mongrel "$LINENO" "nssutil.h" "ac_cv_header_nssutil_h" "$ac_includes_default"
15810 if test "x$ac_cv_header_nssutil_h" = x""yes; then :
15811   cat >>confdefs.h <<_ACEOF
15812 #define HAVE_NSSUTIL_H 1
15813 _ACEOF
15814
15815 fi
15816
15817 done
15818
15819                 if test "$ac_cv_header_nssutil_h" = yes ; then
15820                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_Initialize in -lnss3" >&5
15821 $as_echo_n "checking for NSS_Initialize in -lnss3... " >&6; }
15822 if test "${ac_cv_lib_nss3_NSS_Initialize+set}" = set; then :
15823   $as_echo_n "(cached) " >&6
15824 else
15825   ac_check_lib_save_LIBS=$LIBS
15826 LIBS="-lnss3  $LIBS"
15827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15828 /* end confdefs.h.  */
15829
15830 /* Override any GCC internal prototype to avoid an error.
15831    Use char because int might match the return type of a GCC
15832    builtin and then its argument prototype would still apply.  */
15833 #ifdef __cplusplus
15834 extern "C"
15835 #endif
15836 char NSS_Initialize ();
15837 int
15838 main ()
15839 {
15840 return NSS_Initialize ();
15841   ;
15842   return 0;
15843 }
15844 _ACEOF
15845 if ac_fn_c_try_link "$LINENO"; then :
15846   ac_cv_lib_nss3_NSS_Initialize=yes
15847 else
15848   ac_cv_lib_nss3_NSS_Initialize=no
15849 fi
15850 rm -f core conftest.err conftest.$ac_objext \
15851     conftest$ac_exeext conftest.$ac_ext
15852 LIBS=$ac_check_lib_save_LIBS
15853 fi
15854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_NSS_Initialize" >&5
15855 $as_echo "$ac_cv_lib_nss3_NSS_Initialize" >&6; }
15856 if test "x$ac_cv_lib_nss3_NSS_Initialize" = x""yes; then :
15857    have_moznss=yes
15858 else
15859    have_moznss=no
15860 fi
15861
15862                 fi
15863
15864                 if test "$have_moznss" = yes ; then
15865                         ol_with_tls=moznss
15866                         ol_link_tls=yes
15867
15868 $as_echo "#define HAVE_MOZNSS 1" >>confdefs.h
15869
15870                         TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
15871                 else
15872                         if test $ol_with_tls = moznss ; then
15873                         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
15874                         fi
15875                 fi
15876         fi
15877 fi
15878
15879 WITH_TLS=no
15880 if test $ol_link_tls = yes ; then
15881
15882 $as_echo "#define HAVE_TLS 1" >>confdefs.h
15883
15884         WITH_TLS=yes
15885 elif test $ol_with_tls = auto ; then
15886         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate TLS/SSL package" >&5
15887 $as_echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
15888         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15889 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15890 elif test $ol_with_tls != no ; then
15891         as_fn_error "Could not locate TLS/SSL package" "$LINENO" 5
15892 else
15893         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15894 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15895 fi
15896
15897 if test $ol_enable_lmpasswd != no; then
15898         if test $ol_link_tls != yes ; then
15899                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
15900         fi
15901
15902
15903 $as_echo "#define SLAPD_LMHASH 1" >>confdefs.h
15904
15905 fi
15906
15907 ol_link_threads=no
15908
15909 case $ol_with_threads in auto | yes | nt)
15910
15911
15912         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
15913 if test "x$ac_cv_func__beginthread" = x""yes; then :
15914
15915 fi
15916
15917
15918         if test $ac_cv_func__beginthread = yes ; then
15919
15920 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
15921
15922                 ol_cv_nt_threads=yes
15923         fi
15924
15925
15926         if test "$ol_cv_nt_threads" = yes ; then
15927                 ol_link_threads=nt
15928                 ol_with_threads=found
15929                 ol_with_yielding_select=yes
15930
15931
15932 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
15933
15934
15935 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
15936
15937         fi
15938
15939         if test $ol_with_threads = nt ; then
15940                 as_fn_error "could not locate NT Threads" "$LINENO" 5
15941         fi
15942         ;;
15943 esac
15944
15945 case $ol_with_threads in auto | yes | posix)
15946
15947         for ac_header in pthread.h
15948 do :
15949   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15950 if test "x$ac_cv_header_pthread_h" = x""yes; then :
15951   cat >>confdefs.h <<_ACEOF
15952 #define HAVE_PTHREAD_H 1
15953 _ACEOF
15954
15955 fi
15956
15957 done
15958
15959
15960         if test $ac_cv_header_pthread_h = yes ; then
15961                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
15962 $as_echo_n "checking POSIX thread version... " >&6; }
15963 if test "${ol_cv_pthread_version+set}" = set; then :
15964   $as_echo_n "(cached) " >&6
15965 else
15966
15967         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15968 /* end confdefs.h.  */
15969
15970 #               include <pthread.h>
15971
15972 int
15973 main ()
15974 {
15975
15976                 int i = PTHREAD_CREATE_JOINABLE;
15977
15978   ;
15979   return 0;
15980 }
15981 _ACEOF
15982 if ac_fn_c_try_compile "$LINENO"; then :
15983
15984         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15985 /* end confdefs.h.  */
15986 #include <pthread.h>
15987
15988 _ACEOF
15989 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15990   $EGREP "pthread_detach" >/dev/null 2>&1; then :
15991   ol_cv_pthread_version=10
15992 else
15993   ol_cv_pthread_version=8
15994 fi
15995 rm -f conftest*
15996
15997 else
15998
15999         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16000 /* end confdefs.h.  */
16001
16002 #               include <pthread.h>
16003 #               ifdef PTHREAD_CREATE_UNDETACHED
16004                 draft7
16005 #               endif
16006
16007 _ACEOF
16008 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16009   $EGREP "draft7" >/dev/null 2>&1; then :
16010   ol_cv_pthread_version=7
16011 else
16012
16013         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16014 /* end confdefs.h.  */
16015 #include <pthread.h>
16016
16017 _ACEOF
16018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16019   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
16020   ol_cv_pthread_version=6
16021 else
16022
16023         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16024 /* end confdefs.h.  */
16025
16026 #               include <pthread.h>
16027 #ifdef          PTHREAD_MUTEX_INITIALIZER
16028                 draft5
16029 #endif
16030
16031 _ACEOF
16032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16033   $EGREP "draft5" >/dev/null 2>&1; then :
16034   ol_cv_pthread_version=5
16035 else
16036   ol_cv_pthread_version=4
16037 fi
16038 rm -f conftest*
16039
16040 fi
16041 rm -f conftest*
16042
16043 fi
16044 rm -f conftest*
16045
16046 fi
16047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16048
16049 fi
16050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
16051 $as_echo "$ol_cv_pthread_version" >&6; }
16052
16053
16054                 if test $ol_cv_pthread_version != 0 ; then
16055
16056 cat >>confdefs.h <<_ACEOF
16057 #define HAVE_PTHREADS $ol_cv_pthread_version
16058 _ACEOF
16059
16060                 else
16061                         as_fn_error "unknown pthread version" "$LINENO" 5
16062                 fi
16063
16064                 # consider threads found
16065                 ol_with_threads=found
16066
16067
16068         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
16069 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
16070 if test "${ol_cv_header_linux_threads+set}" = set; then :
16071   $as_echo_n "(cached) " >&6
16072 else
16073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16074 /* end confdefs.h.  */
16075 #include <pthread.h>
16076 _ACEOF
16077 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16078   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
16079   ol_cv_header_linux_threads=yes
16080 else
16081   ol_cv_header_linux_threads=no
16082 fi
16083 rm -f conftest*
16084
16085
16086 fi
16087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
16088 $as_echo "$ol_cv_header_linux_threads" >&6; }
16089         if test $ol_cv_header_linux_threads = yes; then
16090
16091 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
16092
16093         fi
16094
16095
16096         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
16097 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
16098 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then :
16099   $as_echo_n "(cached) " >&6
16100 else
16101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16102 /* end confdefs.h.  */
16103 #include <pthread.h>
16104 #ifdef _POSIX_THREAD_IS_GNU_PTH
16105         __gnu_pth__;
16106 #endif
16107
16108 _ACEOF
16109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16110   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
16111   ol_cv_header_gnu_pth_pthread_h=yes
16112 else
16113   ol_cv_header_gnu_pth_pthread_h=no
16114 fi
16115 rm -f conftest*
16116
16117
16118 fi
16119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
16120 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
16121
16122
16123                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
16124                         for ac_header in sched.h
16125 do :
16126   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
16127 if test "x$ac_cv_header_sched_h" = x""yes; then :
16128   cat >>confdefs.h <<_ACEOF
16129 #define HAVE_SCHED_H 1
16130 _ACEOF
16131
16132 fi
16133
16134 done
16135
16136                 fi
16137
16138
16139                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
16140 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
16141 if test "${ol_cv_pthread_create+set}" = set; then :
16142   $as_echo_n "(cached) " >&6
16143 else
16144
16145                         if test "$cross_compiling" = yes; then :
16146   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16147 /* end confdefs.h.  */
16148
16149 /* pthread test headers */
16150 #include <pthread.h>
16151 #if HAVE_PTHREADS < 7
16152 #include <errno.h>
16153 #endif
16154 #ifndef NULL
16155 #define NULL (void*)0
16156 #endif
16157
16158 static void *task(p)
16159         void *p;
16160 {
16161         return (void *) (p == NULL);
16162 }
16163
16164 int
16165 main ()
16166 {
16167
16168         /* pthread test function */
16169 #ifndef PTHREAD_CREATE_DETACHED
16170 #define PTHREAD_CREATE_DETACHED 1
16171 #endif
16172         pthread_t t;
16173         int status;
16174         int detach = PTHREAD_CREATE_DETACHED;
16175
16176 #if HAVE_PTHREADS > 4
16177         /* Final pthreads */
16178         pthread_attr_t attr;
16179
16180         status = pthread_attr_init(&attr);
16181         if( status ) return status;
16182
16183 #if HAVE_PTHREADS < 7
16184         status = pthread_attr_setdetachstate(&attr, &detach);
16185         if( status < 0 ) status = errno;
16186 #else
16187         status = pthread_attr_setdetachstate(&attr, detach);
16188 #endif
16189         if( status ) return status;
16190         status = pthread_create( &t, &attr, task, NULL );
16191 #if HAVE_PTHREADS < 7
16192         if( status < 0 ) status = errno;
16193 #endif
16194         if( status ) return status;
16195 #else
16196         /* Draft 4 pthreads */
16197         status = pthread_create( &t, pthread_attr_default, task, NULL );
16198         if( status ) return errno;
16199
16200         /* give thread a chance to complete */
16201         /* it should remain joinable and hence detachable */
16202         sleep( 1 );
16203
16204         status = pthread_detach( &t );
16205         if( status ) return errno;
16206 #endif
16207
16208 #ifdef HAVE_LINUX_THREADS
16209         pthread_kill_other_threads_np();
16210 #endif
16211
16212         return 0;
16213
16214   ;
16215   return 0;
16216 }
16217 _ACEOF
16218 if ac_fn_c_try_link "$LINENO"; then :
16219   ol_cv_pthread_create=yes
16220 else
16221   ol_cv_pthread_create=no
16222 fi
16223 rm -f core conftest.err conftest.$ac_objext \
16224     conftest$ac_exeext conftest.$ac_ext
16225 else
16226   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16227 /* end confdefs.h.  */
16228
16229 /* pthread test headers */
16230 #include <pthread.h>
16231 #if HAVE_PTHREADS < 7
16232 #include <errno.h>
16233 #endif
16234 #ifndef NULL
16235 #define NULL (void*)0
16236 #endif
16237
16238 static void *task(p)
16239         void *p;
16240 {
16241         return (void *) (p == NULL);
16242 }
16243
16244
16245 int main(argc, argv)
16246         int argc;
16247         char **argv;
16248 {
16249
16250         /* pthread test function */
16251 #ifndef PTHREAD_CREATE_DETACHED
16252 #define PTHREAD_CREATE_DETACHED 1
16253 #endif
16254         pthread_t t;
16255         int status;
16256         int detach = PTHREAD_CREATE_DETACHED;
16257
16258 #if HAVE_PTHREADS > 4
16259         /* Final pthreads */
16260         pthread_attr_t attr;
16261
16262         status = pthread_attr_init(&attr);
16263         if( status ) return status;
16264
16265 #if HAVE_PTHREADS < 7
16266         status = pthread_attr_setdetachstate(&attr, &detach);
16267         if( status < 0 ) status = errno;
16268 #else
16269         status = pthread_attr_setdetachstate(&attr, detach);
16270 #endif
16271         if( status ) return status;
16272         status = pthread_create( &t, &attr, task, NULL );
16273 #if HAVE_PTHREADS < 7
16274         if( status < 0 ) status = errno;
16275 #endif
16276         if( status ) return status;
16277 #else
16278         /* Draft 4 pthreads */
16279         status = pthread_create( &t, pthread_attr_default, task, NULL );
16280         if( status ) return errno;
16281
16282         /* give thread a chance to complete */
16283         /* it should remain joinable and hence detachable */
16284         sleep( 1 );
16285
16286         status = pthread_detach( &t );
16287         if( status ) return errno;
16288 #endif
16289
16290 #ifdef HAVE_LINUX_THREADS
16291         pthread_kill_other_threads_np();
16292 #endif
16293
16294         return 0;
16295
16296 }
16297
16298 _ACEOF
16299 if ac_fn_c_try_run "$LINENO"; then :
16300   ol_cv_pthread_create=yes
16301 else
16302   ol_cv_pthread_create=no
16303 fi
16304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16305   conftest.$ac_objext conftest.beam conftest.$ac_ext
16306 fi
16307
16308 fi
16309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
16310 $as_echo "$ol_cv_pthread_create" >&6; }
16311
16312                 if test $ol_cv_pthread_create != no ; then
16313                         ol_link_threads=posix
16314                         ol_link_pthreads=""
16315                 fi
16316
16317                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
16318 if test "$ol_link_threads" = no ; then
16319         # try -kthread
16320         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
16321 $as_echo_n "checking for pthread link with -kthread... " >&6; }
16322 if test "${ol_cv_pthread_kthread+set}" = set; then :
16323   $as_echo_n "(cached) " >&6
16324 else
16325
16326                 # save the flags
16327                 ol_LIBS="$LIBS"
16328                 LIBS="-kthread $LIBS"
16329
16330                 if test "$cross_compiling" = yes; then :
16331   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16332 /* end confdefs.h.  */
16333
16334 /* pthread test headers */
16335 #include <pthread.h>
16336 #if HAVE_PTHREADS < 7
16337 #include <errno.h>
16338 #endif
16339 #ifndef NULL
16340 #define NULL (void*)0
16341 #endif
16342
16343 static void *task(p)
16344         void *p;
16345 {
16346         return (void *) (p == NULL);
16347 }
16348
16349 int
16350 main ()
16351 {
16352
16353         /* pthread test function */
16354 #ifndef PTHREAD_CREATE_DETACHED
16355 #define PTHREAD_CREATE_DETACHED 1
16356 #endif
16357         pthread_t t;
16358         int status;
16359         int detach = PTHREAD_CREATE_DETACHED;
16360
16361 #if HAVE_PTHREADS > 4
16362         /* Final pthreads */
16363         pthread_attr_t attr;
16364
16365         status = pthread_attr_init(&attr);
16366         if( status ) return status;
16367
16368 #if HAVE_PTHREADS < 7
16369         status = pthread_attr_setdetachstate(&attr, &detach);
16370         if( status < 0 ) status = errno;
16371 #else
16372         status = pthread_attr_setdetachstate(&attr, detach);
16373 #endif
16374         if( status ) return status;
16375         status = pthread_create( &t, &attr, task, NULL );
16376 #if HAVE_PTHREADS < 7
16377         if( status < 0 ) status = errno;
16378 #endif
16379         if( status ) return status;
16380 #else
16381         /* Draft 4 pthreads */
16382         status = pthread_create( &t, pthread_attr_default, task, NULL );
16383         if( status ) return errno;
16384
16385         /* give thread a chance to complete */
16386         /* it should remain joinable and hence detachable */
16387         sleep( 1 );
16388
16389         status = pthread_detach( &t );
16390         if( status ) return errno;
16391 #endif
16392
16393 #ifdef HAVE_LINUX_THREADS
16394         pthread_kill_other_threads_np();
16395 #endif
16396
16397         return 0;
16398
16399   ;
16400   return 0;
16401 }
16402 _ACEOF
16403 if ac_fn_c_try_link "$LINENO"; then :
16404   ol_cv_pthread_kthread=yes
16405 else
16406   ol_cv_pthread_kthread=no
16407 fi
16408 rm -f core conftest.err conftest.$ac_objext \
16409     conftest$ac_exeext conftest.$ac_ext
16410 else
16411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16412 /* end confdefs.h.  */
16413
16414 /* pthread test headers */
16415 #include <pthread.h>
16416 #if HAVE_PTHREADS < 7
16417 #include <errno.h>
16418 #endif
16419 #ifndef NULL
16420 #define NULL (void*)0
16421 #endif
16422
16423 static void *task(p)
16424         void *p;
16425 {
16426         return (void *) (p == NULL);
16427 }
16428
16429
16430 int main(argc, argv)
16431         int argc;
16432         char **argv;
16433 {
16434
16435         /* pthread test function */
16436 #ifndef PTHREAD_CREATE_DETACHED
16437 #define PTHREAD_CREATE_DETACHED 1
16438 #endif
16439         pthread_t t;
16440         int status;
16441         int detach = PTHREAD_CREATE_DETACHED;
16442
16443 #if HAVE_PTHREADS > 4
16444         /* Final pthreads */
16445         pthread_attr_t attr;
16446
16447         status = pthread_attr_init(&attr);
16448         if( status ) return status;
16449
16450 #if HAVE_PTHREADS < 7
16451         status = pthread_attr_setdetachstate(&attr, &detach);
16452         if( status < 0 ) status = errno;
16453 #else
16454         status = pthread_attr_setdetachstate(&attr, detach);
16455 #endif
16456         if( status ) return status;
16457         status = pthread_create( &t, &attr, task, NULL );
16458 #if HAVE_PTHREADS < 7
16459         if( status < 0 ) status = errno;
16460 #endif
16461         if( status ) return status;
16462 #else
16463         /* Draft 4 pthreads */
16464         status = pthread_create( &t, pthread_attr_default, task, NULL );
16465         if( status ) return errno;
16466
16467         /* give thread a chance to complete */
16468         /* it should remain joinable and hence detachable */
16469         sleep( 1 );
16470
16471         status = pthread_detach( &t );
16472         if( status ) return errno;
16473 #endif
16474
16475 #ifdef HAVE_LINUX_THREADS
16476         pthread_kill_other_threads_np();
16477 #endif
16478
16479         return 0;
16480
16481 }
16482
16483 _ACEOF
16484 if ac_fn_c_try_run "$LINENO"; then :
16485   ol_cv_pthread_kthread=yes
16486 else
16487   ol_cv_pthread_kthread=no
16488 fi
16489 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16490   conftest.$ac_objext conftest.beam conftest.$ac_ext
16491 fi
16492
16493
16494                 # restore the LIBS
16495                 LIBS="$ol_LIBS"
16496
16497 fi
16498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
16499 $as_echo "$ol_cv_pthread_kthread" >&6; }
16500
16501         if test $ol_cv_pthread_kthread = yes ; then
16502                 ol_link_pthreads="-kthread"
16503                 ol_link_threads=posix
16504         fi
16505 fi
16506
16507                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
16508 if test "$ol_link_threads" = no ; then
16509         # try -pthread
16510         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
16511 $as_echo_n "checking for pthread link with -pthread... " >&6; }
16512 if test "${ol_cv_pthread_pthread+set}" = set; then :
16513   $as_echo_n "(cached) " >&6
16514 else
16515
16516                 # save the flags
16517                 ol_LIBS="$LIBS"
16518                 LIBS="-pthread $LIBS"
16519
16520                 if test "$cross_compiling" = yes; then :
16521   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16522 /* end confdefs.h.  */
16523
16524 /* pthread test headers */
16525 #include <pthread.h>
16526 #if HAVE_PTHREADS < 7
16527 #include <errno.h>
16528 #endif
16529 #ifndef NULL
16530 #define NULL (void*)0
16531 #endif
16532
16533 static void *task(p)
16534         void *p;
16535 {
16536         return (void *) (p == NULL);
16537 }
16538
16539 int
16540 main ()
16541 {
16542
16543         /* pthread test function */
16544 #ifndef PTHREAD_CREATE_DETACHED
16545 #define PTHREAD_CREATE_DETACHED 1
16546 #endif
16547         pthread_t t;
16548         int status;
16549         int detach = PTHREAD_CREATE_DETACHED;
16550
16551 #if HAVE_PTHREADS > 4
16552         /* Final pthreads */
16553         pthread_attr_t attr;
16554
16555         status = pthread_attr_init(&attr);
16556         if( status ) return status;
16557
16558 #if HAVE_PTHREADS < 7
16559         status = pthread_attr_setdetachstate(&attr, &detach);
16560         if( status < 0 ) status = errno;
16561 #else
16562         status = pthread_attr_setdetachstate(&attr, detach);
16563 #endif
16564         if( status ) return status;
16565         status = pthread_create( &t, &attr, task, NULL );
16566 #if HAVE_PTHREADS < 7
16567         if( status < 0 ) status = errno;
16568 #endif
16569         if( status ) return status;
16570 #else
16571         /* Draft 4 pthreads */
16572         status = pthread_create( &t, pthread_attr_default, task, NULL );
16573         if( status ) return errno;
16574
16575         /* give thread a chance to complete */
16576         /* it should remain joinable and hence detachable */
16577         sleep( 1 );
16578
16579         status = pthread_detach( &t );
16580         if( status ) return errno;
16581 #endif
16582
16583 #ifdef HAVE_LINUX_THREADS
16584         pthread_kill_other_threads_np();
16585 #endif
16586
16587         return 0;
16588
16589   ;
16590   return 0;
16591 }
16592 _ACEOF
16593 if ac_fn_c_try_link "$LINENO"; then :
16594   ol_cv_pthread_pthread=yes
16595 else
16596   ol_cv_pthread_pthread=no
16597 fi
16598 rm -f core conftest.err conftest.$ac_objext \
16599     conftest$ac_exeext conftest.$ac_ext
16600 else
16601   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16602 /* end confdefs.h.  */
16603
16604 /* pthread test headers */
16605 #include <pthread.h>
16606 #if HAVE_PTHREADS < 7
16607 #include <errno.h>
16608 #endif
16609 #ifndef NULL
16610 #define NULL (void*)0
16611 #endif
16612
16613 static void *task(p)
16614         void *p;
16615 {
16616         return (void *) (p == NULL);
16617 }
16618
16619
16620 int main(argc, argv)
16621         int argc;
16622         char **argv;
16623 {
16624
16625         /* pthread test function */
16626 #ifndef PTHREAD_CREATE_DETACHED
16627 #define PTHREAD_CREATE_DETACHED 1
16628 #endif
16629         pthread_t t;
16630         int status;
16631         int detach = PTHREAD_CREATE_DETACHED;
16632
16633 #if HAVE_PTHREADS > 4
16634         /* Final pthreads */
16635         pthread_attr_t attr;
16636
16637         status = pthread_attr_init(&attr);
16638         if( status ) return status;
16639
16640 #if HAVE_PTHREADS < 7
16641         status = pthread_attr_setdetachstate(&attr, &detach);
16642         if( status < 0 ) status = errno;
16643 #else
16644         status = pthread_attr_setdetachstate(&attr, detach);
16645 #endif
16646         if( status ) return status;
16647         status = pthread_create( &t, &attr, task, NULL );
16648 #if HAVE_PTHREADS < 7
16649         if( status < 0 ) status = errno;
16650 #endif
16651         if( status ) return status;
16652 #else
16653         /* Draft 4 pthreads */
16654         status = pthread_create( &t, pthread_attr_default, task, NULL );
16655         if( status ) return errno;
16656
16657         /* give thread a chance to complete */
16658         /* it should remain joinable and hence detachable */
16659         sleep( 1 );
16660
16661         status = pthread_detach( &t );
16662         if( status ) return errno;
16663 #endif
16664
16665 #ifdef HAVE_LINUX_THREADS
16666         pthread_kill_other_threads_np();
16667 #endif
16668
16669         return 0;
16670
16671 }
16672
16673 _ACEOF
16674 if ac_fn_c_try_run "$LINENO"; then :
16675   ol_cv_pthread_pthread=yes
16676 else
16677   ol_cv_pthread_pthread=no
16678 fi
16679 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16680   conftest.$ac_objext conftest.beam conftest.$ac_ext
16681 fi
16682
16683
16684                 # restore the LIBS
16685                 LIBS="$ol_LIBS"
16686
16687 fi
16688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
16689 $as_echo "$ol_cv_pthread_pthread" >&6; }
16690
16691         if test $ol_cv_pthread_pthread = yes ; then
16692                 ol_link_pthreads="-pthread"
16693                 ol_link_threads=posix
16694         fi
16695 fi
16696
16697                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
16698 if test "$ol_link_threads" = no ; then
16699         # try -pthreads
16700         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
16701 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
16702 if test "${ol_cv_pthread_pthreads+set}" = set; then :
16703   $as_echo_n "(cached) " >&6
16704 else
16705
16706                 # save the flags
16707                 ol_LIBS="$LIBS"
16708                 LIBS="-pthreads $LIBS"
16709
16710                 if test "$cross_compiling" = yes; then :
16711   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16712 /* end confdefs.h.  */
16713
16714 /* pthread test headers */
16715 #include <pthread.h>
16716 #if HAVE_PTHREADS < 7
16717 #include <errno.h>
16718 #endif
16719 #ifndef NULL
16720 #define NULL (void*)0
16721 #endif
16722
16723 static void *task(p)
16724         void *p;
16725 {
16726         return (void *) (p == NULL);
16727 }
16728
16729 int
16730 main ()
16731 {
16732
16733         /* pthread test function */
16734 #ifndef PTHREAD_CREATE_DETACHED
16735 #define PTHREAD_CREATE_DETACHED 1
16736 #endif
16737         pthread_t t;
16738         int status;
16739         int detach = PTHREAD_CREATE_DETACHED;
16740
16741 #if HAVE_PTHREADS > 4
16742         /* Final pthreads */
16743         pthread_attr_t attr;
16744
16745         status = pthread_attr_init(&attr);
16746         if( status ) return status;
16747
16748 #if HAVE_PTHREADS < 7
16749         status = pthread_attr_setdetachstate(&attr, &detach);
16750         if( status < 0 ) status = errno;
16751 #else
16752         status = pthread_attr_setdetachstate(&attr, detach);
16753 #endif
16754         if( status ) return status;
16755         status = pthread_create( &t, &attr, task, NULL );
16756 #if HAVE_PTHREADS < 7
16757         if( status < 0 ) status = errno;
16758 #endif
16759         if( status ) return status;
16760 #else
16761         /* Draft 4 pthreads */
16762         status = pthread_create( &t, pthread_attr_default, task, NULL );
16763         if( status ) return errno;
16764
16765         /* give thread a chance to complete */
16766         /* it should remain joinable and hence detachable */
16767         sleep( 1 );
16768
16769         status = pthread_detach( &t );
16770         if( status ) return errno;
16771 #endif
16772
16773 #ifdef HAVE_LINUX_THREADS
16774         pthread_kill_other_threads_np();
16775 #endif
16776
16777         return 0;
16778
16779   ;
16780   return 0;
16781 }
16782 _ACEOF
16783 if ac_fn_c_try_link "$LINENO"; then :
16784   ol_cv_pthread_pthreads=yes
16785 else
16786   ol_cv_pthread_pthreads=no
16787 fi
16788 rm -f core conftest.err conftest.$ac_objext \
16789     conftest$ac_exeext conftest.$ac_ext
16790 else
16791   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16792 /* end confdefs.h.  */
16793
16794 /* pthread test headers */
16795 #include <pthread.h>
16796 #if HAVE_PTHREADS < 7
16797 #include <errno.h>
16798 #endif
16799 #ifndef NULL
16800 #define NULL (void*)0
16801 #endif
16802
16803 static void *task(p)
16804         void *p;
16805 {
16806         return (void *) (p == NULL);
16807 }
16808
16809
16810 int main(argc, argv)
16811         int argc;
16812         char **argv;
16813 {
16814
16815         /* pthread test function */
16816 #ifndef PTHREAD_CREATE_DETACHED
16817 #define PTHREAD_CREATE_DETACHED 1
16818 #endif
16819         pthread_t t;
16820         int status;
16821         int detach = PTHREAD_CREATE_DETACHED;
16822
16823 #if HAVE_PTHREADS > 4
16824         /* Final pthreads */
16825         pthread_attr_t attr;
16826
16827         status = pthread_attr_init(&attr);
16828         if( status ) return status;
16829
16830 #if HAVE_PTHREADS < 7
16831         status = pthread_attr_setdetachstate(&attr, &detach);
16832         if( status < 0 ) status = errno;
16833 #else
16834         status = pthread_attr_setdetachstate(&attr, detach);
16835 #endif
16836         if( status ) return status;
16837         status = pthread_create( &t, &attr, task, NULL );
16838 #if HAVE_PTHREADS < 7
16839         if( status < 0 ) status = errno;
16840 #endif
16841         if( status ) return status;
16842 #else
16843         /* Draft 4 pthreads */
16844         status = pthread_create( &t, pthread_attr_default, task, NULL );
16845         if( status ) return errno;
16846
16847         /* give thread a chance to complete */
16848         /* it should remain joinable and hence detachable */
16849         sleep( 1 );
16850
16851         status = pthread_detach( &t );
16852         if( status ) return errno;
16853 #endif
16854
16855 #ifdef HAVE_LINUX_THREADS
16856         pthread_kill_other_threads_np();
16857 #endif
16858
16859         return 0;
16860
16861 }
16862
16863 _ACEOF
16864 if ac_fn_c_try_run "$LINENO"; then :
16865   ol_cv_pthread_pthreads=yes
16866 else
16867   ol_cv_pthread_pthreads=no
16868 fi
16869 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16870   conftest.$ac_objext conftest.beam conftest.$ac_ext
16871 fi
16872
16873
16874                 # restore the LIBS
16875                 LIBS="$ol_LIBS"
16876
16877 fi
16878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
16879 $as_echo "$ol_cv_pthread_pthreads" >&6; }
16880
16881         if test $ol_cv_pthread_pthreads = yes ; then
16882                 ol_link_pthreads="-pthreads"
16883                 ol_link_threads=posix
16884         fi
16885 fi
16886
16887                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
16888 if test "$ol_link_threads" = no ; then
16889         # try -mthreads
16890         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
16891 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
16892 if test "${ol_cv_pthread_mthreads+set}" = set; then :
16893   $as_echo_n "(cached) " >&6
16894 else
16895
16896                 # save the flags
16897                 ol_LIBS="$LIBS"
16898                 LIBS="-mthreads $LIBS"
16899
16900                 if test "$cross_compiling" = yes; then :
16901   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16902 /* end confdefs.h.  */
16903
16904 /* pthread test headers */
16905 #include <pthread.h>
16906 #if HAVE_PTHREADS < 7
16907 #include <errno.h>
16908 #endif
16909 #ifndef NULL
16910 #define NULL (void*)0
16911 #endif
16912
16913 static void *task(p)
16914         void *p;
16915 {
16916         return (void *) (p == NULL);
16917 }
16918
16919 int
16920 main ()
16921 {
16922
16923         /* pthread test function */
16924 #ifndef PTHREAD_CREATE_DETACHED
16925 #define PTHREAD_CREATE_DETACHED 1
16926 #endif
16927         pthread_t t;
16928         int status;
16929         int detach = PTHREAD_CREATE_DETACHED;
16930
16931 #if HAVE_PTHREADS > 4
16932         /* Final pthreads */
16933         pthread_attr_t attr;
16934
16935         status = pthread_attr_init(&attr);
16936         if( status ) return status;
16937
16938 #if HAVE_PTHREADS < 7
16939         status = pthread_attr_setdetachstate(&attr, &detach);
16940         if( status < 0 ) status = errno;
16941 #else
16942         status = pthread_attr_setdetachstate(&attr, detach);
16943 #endif
16944         if( status ) return status;
16945         status = pthread_create( &t, &attr, task, NULL );
16946 #if HAVE_PTHREADS < 7
16947         if( status < 0 ) status = errno;
16948 #endif
16949         if( status ) return status;
16950 #else
16951         /* Draft 4 pthreads */
16952         status = pthread_create( &t, pthread_attr_default, task, NULL );
16953         if( status ) return errno;
16954
16955         /* give thread a chance to complete */
16956         /* it should remain joinable and hence detachable */
16957         sleep( 1 );
16958
16959         status = pthread_detach( &t );
16960         if( status ) return errno;
16961 #endif
16962
16963 #ifdef HAVE_LINUX_THREADS
16964         pthread_kill_other_threads_np();
16965 #endif
16966
16967         return 0;
16968
16969   ;
16970   return 0;
16971 }
16972 _ACEOF
16973 if ac_fn_c_try_link "$LINENO"; then :
16974   ol_cv_pthread_mthreads=yes
16975 else
16976   ol_cv_pthread_mthreads=no
16977 fi
16978 rm -f core conftest.err conftest.$ac_objext \
16979     conftest$ac_exeext conftest.$ac_ext
16980 else
16981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16982 /* end confdefs.h.  */
16983
16984 /* pthread test headers */
16985 #include <pthread.h>
16986 #if HAVE_PTHREADS < 7
16987 #include <errno.h>
16988 #endif
16989 #ifndef NULL
16990 #define NULL (void*)0
16991 #endif
16992
16993 static void *task(p)
16994         void *p;
16995 {
16996         return (void *) (p == NULL);
16997 }
16998
16999
17000 int main(argc, argv)
17001         int argc;
17002         char **argv;
17003 {
17004
17005         /* pthread test function */
17006 #ifndef PTHREAD_CREATE_DETACHED
17007 #define PTHREAD_CREATE_DETACHED 1
17008 #endif
17009         pthread_t t;
17010         int status;
17011         int detach = PTHREAD_CREATE_DETACHED;
17012
17013 #if HAVE_PTHREADS > 4
17014         /* Final pthreads */
17015         pthread_attr_t attr;
17016
17017         status = pthread_attr_init(&attr);
17018         if( status ) return status;
17019
17020 #if HAVE_PTHREADS < 7
17021         status = pthread_attr_setdetachstate(&attr, &detach);
17022         if( status < 0 ) status = errno;
17023 #else
17024         status = pthread_attr_setdetachstate(&attr, detach);
17025 #endif
17026         if( status ) return status;
17027         status = pthread_create( &t, &attr, task, NULL );
17028 #if HAVE_PTHREADS < 7
17029         if( status < 0 ) status = errno;
17030 #endif
17031         if( status ) return status;
17032 #else
17033         /* Draft 4 pthreads */
17034         status = pthread_create( &t, pthread_attr_default, task, NULL );
17035         if( status ) return errno;
17036
17037         /* give thread a chance to complete */
17038         /* it should remain joinable and hence detachable */
17039         sleep( 1 );
17040
17041         status = pthread_detach( &t );
17042         if( status ) return errno;
17043 #endif
17044
17045 #ifdef HAVE_LINUX_THREADS
17046         pthread_kill_other_threads_np();
17047 #endif
17048
17049         return 0;
17050
17051 }
17052
17053 _ACEOF
17054 if ac_fn_c_try_run "$LINENO"; then :
17055   ol_cv_pthread_mthreads=yes
17056 else
17057   ol_cv_pthread_mthreads=no
17058 fi
17059 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17060   conftest.$ac_objext conftest.beam conftest.$ac_ext
17061 fi
17062
17063
17064                 # restore the LIBS
17065                 LIBS="$ol_LIBS"
17066
17067 fi
17068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
17069 $as_echo "$ol_cv_pthread_mthreads" >&6; }
17070
17071         if test $ol_cv_pthread_mthreads = yes ; then
17072                 ol_link_pthreads="-mthreads"
17073                 ol_link_threads=posix
17074         fi
17075 fi
17076
17077                 # Pthread try link: -thread (ol_cv_pthread_thread)
17078 if test "$ol_link_threads" = no ; then
17079         # try -thread
17080         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
17081 $as_echo_n "checking for pthread link with -thread... " >&6; }
17082 if test "${ol_cv_pthread_thread+set}" = set; then :
17083   $as_echo_n "(cached) " >&6
17084 else
17085
17086                 # save the flags
17087                 ol_LIBS="$LIBS"
17088                 LIBS="-thread $LIBS"
17089
17090                 if test "$cross_compiling" = yes; then :
17091   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17092 /* end confdefs.h.  */
17093
17094 /* pthread test headers */
17095 #include <pthread.h>
17096 #if HAVE_PTHREADS < 7
17097 #include <errno.h>
17098 #endif
17099 #ifndef NULL
17100 #define NULL (void*)0
17101 #endif
17102
17103 static void *task(p)
17104         void *p;
17105 {
17106         return (void *) (p == NULL);
17107 }
17108
17109 int
17110 main ()
17111 {
17112
17113         /* pthread test function */
17114 #ifndef PTHREAD_CREATE_DETACHED
17115 #define PTHREAD_CREATE_DETACHED 1
17116 #endif
17117         pthread_t t;
17118         int status;
17119         int detach = PTHREAD_CREATE_DETACHED;
17120
17121 #if HAVE_PTHREADS > 4
17122         /* Final pthreads */
17123         pthread_attr_t attr;
17124
17125         status = pthread_attr_init(&attr);
17126         if( status ) return status;
17127
17128 #if HAVE_PTHREADS < 7
17129         status = pthread_attr_setdetachstate(&attr, &detach);
17130         if( status < 0 ) status = errno;
17131 #else
17132         status = pthread_attr_setdetachstate(&attr, detach);
17133 #endif
17134         if( status ) return status;
17135         status = pthread_create( &t, &attr, task, NULL );
17136 #if HAVE_PTHREADS < 7
17137         if( status < 0 ) status = errno;
17138 #endif
17139         if( status ) return status;
17140 #else
17141         /* Draft 4 pthreads */
17142         status = pthread_create( &t, pthread_attr_default, task, NULL );
17143         if( status ) return errno;
17144
17145         /* give thread a chance to complete */
17146         /* it should remain joinable and hence detachable */
17147         sleep( 1 );
17148
17149         status = pthread_detach( &t );
17150         if( status ) return errno;
17151 #endif
17152
17153 #ifdef HAVE_LINUX_THREADS
17154         pthread_kill_other_threads_np();
17155 #endif
17156
17157         return 0;
17158
17159   ;
17160   return 0;
17161 }
17162 _ACEOF
17163 if ac_fn_c_try_link "$LINENO"; then :
17164   ol_cv_pthread_thread=yes
17165 else
17166   ol_cv_pthread_thread=no
17167 fi
17168 rm -f core conftest.err conftest.$ac_objext \
17169     conftest$ac_exeext conftest.$ac_ext
17170 else
17171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17172 /* end confdefs.h.  */
17173
17174 /* pthread test headers */
17175 #include <pthread.h>
17176 #if HAVE_PTHREADS < 7
17177 #include <errno.h>
17178 #endif
17179 #ifndef NULL
17180 #define NULL (void*)0
17181 #endif
17182
17183 static void *task(p)
17184         void *p;
17185 {
17186         return (void *) (p == NULL);
17187 }
17188
17189
17190 int main(argc, argv)
17191         int argc;
17192         char **argv;
17193 {
17194
17195         /* pthread test function */
17196 #ifndef PTHREAD_CREATE_DETACHED
17197 #define PTHREAD_CREATE_DETACHED 1
17198 #endif
17199         pthread_t t;
17200         int status;
17201         int detach = PTHREAD_CREATE_DETACHED;
17202
17203 #if HAVE_PTHREADS > 4
17204         /* Final pthreads */
17205         pthread_attr_t attr;
17206
17207         status = pthread_attr_init(&attr);
17208         if( status ) return status;
17209
17210 #if HAVE_PTHREADS < 7
17211         status = pthread_attr_setdetachstate(&attr, &detach);
17212         if( status < 0 ) status = errno;
17213 #else
17214         status = pthread_attr_setdetachstate(&attr, detach);
17215 #endif
17216         if( status ) return status;
17217         status = pthread_create( &t, &attr, task, NULL );
17218 #if HAVE_PTHREADS < 7
17219         if( status < 0 ) status = errno;
17220 #endif
17221         if( status ) return status;
17222 #else
17223         /* Draft 4 pthreads */
17224         status = pthread_create( &t, pthread_attr_default, task, NULL );
17225         if( status ) return errno;
17226
17227         /* give thread a chance to complete */
17228         /* it should remain joinable and hence detachable */
17229         sleep( 1 );
17230
17231         status = pthread_detach( &t );
17232         if( status ) return errno;
17233 #endif
17234
17235 #ifdef HAVE_LINUX_THREADS
17236         pthread_kill_other_threads_np();
17237 #endif
17238
17239         return 0;
17240
17241 }
17242
17243 _ACEOF
17244 if ac_fn_c_try_run "$LINENO"; then :
17245   ol_cv_pthread_thread=yes
17246 else
17247   ol_cv_pthread_thread=no
17248 fi
17249 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17250   conftest.$ac_objext conftest.beam conftest.$ac_ext
17251 fi
17252
17253
17254                 # restore the LIBS
17255                 LIBS="$ol_LIBS"
17256
17257 fi
17258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
17259 $as_echo "$ol_cv_pthread_thread" >&6; }
17260
17261         if test $ol_cv_pthread_thread = yes ; then
17262                 ol_link_pthreads="-thread"
17263                 ol_link_threads=posix
17264         fi
17265 fi
17266
17267
17268                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
17269 if test "$ol_link_threads" = no ; then
17270         # try -lpthread -lmach -lexc -lc_r
17271         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
17272 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
17273 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then :
17274   $as_echo_n "(cached) " >&6
17275 else
17276
17277                 # save the flags
17278                 ol_LIBS="$LIBS"
17279                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
17280
17281                 if test "$cross_compiling" = yes; then :
17282   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17283 /* end confdefs.h.  */
17284
17285 /* pthread test headers */
17286 #include <pthread.h>
17287 #if HAVE_PTHREADS < 7
17288 #include <errno.h>
17289 #endif
17290 #ifndef NULL
17291 #define NULL (void*)0
17292 #endif
17293
17294 static void *task(p)
17295         void *p;
17296 {
17297         return (void *) (p == NULL);
17298 }
17299
17300 int
17301 main ()
17302 {
17303
17304         /* pthread test function */
17305 #ifndef PTHREAD_CREATE_DETACHED
17306 #define PTHREAD_CREATE_DETACHED 1
17307 #endif
17308         pthread_t t;
17309         int status;
17310         int detach = PTHREAD_CREATE_DETACHED;
17311
17312 #if HAVE_PTHREADS > 4
17313         /* Final pthreads */
17314         pthread_attr_t attr;
17315
17316         status = pthread_attr_init(&attr);
17317         if( status ) return status;
17318
17319 #if HAVE_PTHREADS < 7
17320         status = pthread_attr_setdetachstate(&attr, &detach);
17321         if( status < 0 ) status = errno;
17322 #else
17323         status = pthread_attr_setdetachstate(&attr, detach);
17324 #endif
17325         if( status ) return status;
17326         status = pthread_create( &t, &attr, task, NULL );
17327 #if HAVE_PTHREADS < 7
17328         if( status < 0 ) status = errno;
17329 #endif
17330         if( status ) return status;
17331 #else
17332         /* Draft 4 pthreads */
17333         status = pthread_create( &t, pthread_attr_default, task, NULL );
17334         if( status ) return errno;
17335
17336         /* give thread a chance to complete */
17337         /* it should remain joinable and hence detachable */
17338         sleep( 1 );
17339
17340         status = pthread_detach( &t );
17341         if( status ) return errno;
17342 #endif
17343
17344 #ifdef HAVE_LINUX_THREADS
17345         pthread_kill_other_threads_np();
17346 #endif
17347
17348         return 0;
17349
17350   ;
17351   return 0;
17352 }
17353 _ACEOF
17354 if ac_fn_c_try_link "$LINENO"; then :
17355   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17356 else
17357   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17358 fi
17359 rm -f core conftest.err conftest.$ac_objext \
17360     conftest$ac_exeext conftest.$ac_ext
17361 else
17362   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17363 /* end confdefs.h.  */
17364
17365 /* pthread test headers */
17366 #include <pthread.h>
17367 #if HAVE_PTHREADS < 7
17368 #include <errno.h>
17369 #endif
17370 #ifndef NULL
17371 #define NULL (void*)0
17372 #endif
17373
17374 static void *task(p)
17375         void *p;
17376 {
17377         return (void *) (p == NULL);
17378 }
17379
17380
17381 int main(argc, argv)
17382         int argc;
17383         char **argv;
17384 {
17385
17386         /* pthread test function */
17387 #ifndef PTHREAD_CREATE_DETACHED
17388 #define PTHREAD_CREATE_DETACHED 1
17389 #endif
17390         pthread_t t;
17391         int status;
17392         int detach = PTHREAD_CREATE_DETACHED;
17393
17394 #if HAVE_PTHREADS > 4
17395         /* Final pthreads */
17396         pthread_attr_t attr;
17397
17398         status = pthread_attr_init(&attr);
17399         if( status ) return status;
17400
17401 #if HAVE_PTHREADS < 7
17402         status = pthread_attr_setdetachstate(&attr, &detach);
17403         if( status < 0 ) status = errno;
17404 #else
17405         status = pthread_attr_setdetachstate(&attr, detach);
17406 #endif
17407         if( status ) return status;
17408         status = pthread_create( &t, &attr, task, NULL );
17409 #if HAVE_PTHREADS < 7
17410         if( status < 0 ) status = errno;
17411 #endif
17412         if( status ) return status;
17413 #else
17414         /* Draft 4 pthreads */
17415         status = pthread_create( &t, pthread_attr_default, task, NULL );
17416         if( status ) return errno;
17417
17418         /* give thread a chance to complete */
17419         /* it should remain joinable and hence detachable */
17420         sleep( 1 );
17421
17422         status = pthread_detach( &t );
17423         if( status ) return errno;
17424 #endif
17425
17426 #ifdef HAVE_LINUX_THREADS
17427         pthread_kill_other_threads_np();
17428 #endif
17429
17430         return 0;
17431
17432 }
17433
17434 _ACEOF
17435 if ac_fn_c_try_run "$LINENO"; then :
17436   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17437 else
17438   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17439 fi
17440 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17441   conftest.$ac_objext conftest.beam conftest.$ac_ext
17442 fi
17443
17444
17445                 # restore the LIBS
17446                 LIBS="$ol_LIBS"
17447
17448 fi
17449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
17450 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
17451
17452         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
17453                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
17454                 ol_link_threads=posix
17455         fi
17456 fi
17457
17458                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
17459 if test "$ol_link_threads" = no ; then
17460         # try -lpthread -lmach -lexc
17461         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
17462 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
17463 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then :
17464   $as_echo_n "(cached) " >&6
17465 else
17466
17467                 # save the flags
17468                 ol_LIBS="$LIBS"
17469                 LIBS="-lpthread -lmach -lexc $LIBS"
17470
17471                 if test "$cross_compiling" = yes; then :
17472   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17473 /* end confdefs.h.  */
17474
17475 /* pthread test headers */
17476 #include <pthread.h>
17477 #if HAVE_PTHREADS < 7
17478 #include <errno.h>
17479 #endif
17480 #ifndef NULL
17481 #define NULL (void*)0
17482 #endif
17483
17484 static void *task(p)
17485         void *p;
17486 {
17487         return (void *) (p == NULL);
17488 }
17489
17490 int
17491 main ()
17492 {
17493
17494         /* pthread test function */
17495 #ifndef PTHREAD_CREATE_DETACHED
17496 #define PTHREAD_CREATE_DETACHED 1
17497 #endif
17498         pthread_t t;
17499         int status;
17500         int detach = PTHREAD_CREATE_DETACHED;
17501
17502 #if HAVE_PTHREADS > 4
17503         /* Final pthreads */
17504         pthread_attr_t attr;
17505
17506         status = pthread_attr_init(&attr);
17507         if( status ) return status;
17508
17509 #if HAVE_PTHREADS < 7
17510         status = pthread_attr_setdetachstate(&attr, &detach);
17511         if( status < 0 ) status = errno;
17512 #else
17513         status = pthread_attr_setdetachstate(&attr, detach);
17514 #endif
17515         if( status ) return status;
17516         status = pthread_create( &t, &attr, task, NULL );
17517 #if HAVE_PTHREADS < 7
17518         if( status < 0 ) status = errno;
17519 #endif
17520         if( status ) return status;
17521 #else
17522         /* Draft 4 pthreads */
17523         status = pthread_create( &t, pthread_attr_default, task, NULL );
17524         if( status ) return errno;
17525
17526         /* give thread a chance to complete */
17527         /* it should remain joinable and hence detachable */
17528         sleep( 1 );
17529
17530         status = pthread_detach( &t );
17531         if( status ) return errno;
17532 #endif
17533
17534 #ifdef HAVE_LINUX_THREADS
17535         pthread_kill_other_threads_np();
17536 #endif
17537
17538         return 0;
17539
17540   ;
17541   return 0;
17542 }
17543 _ACEOF
17544 if ac_fn_c_try_link "$LINENO"; then :
17545   ol_cv_pthread_lpthread_lmach_lexc=yes
17546 else
17547   ol_cv_pthread_lpthread_lmach_lexc=no
17548 fi
17549 rm -f core conftest.err conftest.$ac_objext \
17550     conftest$ac_exeext conftest.$ac_ext
17551 else
17552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17553 /* end confdefs.h.  */
17554
17555 /* pthread test headers */
17556 #include <pthread.h>
17557 #if HAVE_PTHREADS < 7
17558 #include <errno.h>
17559 #endif
17560 #ifndef NULL
17561 #define NULL (void*)0
17562 #endif
17563
17564 static void *task(p)
17565         void *p;
17566 {
17567         return (void *) (p == NULL);
17568 }
17569
17570
17571 int main(argc, argv)
17572         int argc;
17573         char **argv;
17574 {
17575
17576         /* pthread test function */
17577 #ifndef PTHREAD_CREATE_DETACHED
17578 #define PTHREAD_CREATE_DETACHED 1
17579 #endif
17580         pthread_t t;
17581         int status;
17582         int detach = PTHREAD_CREATE_DETACHED;
17583
17584 #if HAVE_PTHREADS > 4
17585         /* Final pthreads */
17586         pthread_attr_t attr;
17587
17588         status = pthread_attr_init(&attr);
17589         if( status ) return status;
17590
17591 #if HAVE_PTHREADS < 7
17592         status = pthread_attr_setdetachstate(&attr, &detach);
17593         if( status < 0 ) status = errno;
17594 #else
17595         status = pthread_attr_setdetachstate(&attr, detach);
17596 #endif
17597         if( status ) return status;
17598         status = pthread_create( &t, &attr, task, NULL );
17599 #if HAVE_PTHREADS < 7
17600         if( status < 0 ) status = errno;
17601 #endif
17602         if( status ) return status;
17603 #else
17604         /* Draft 4 pthreads */
17605         status = pthread_create( &t, pthread_attr_default, task, NULL );
17606         if( status ) return errno;
17607
17608         /* give thread a chance to complete */
17609         /* it should remain joinable and hence detachable */
17610         sleep( 1 );
17611
17612         status = pthread_detach( &t );
17613         if( status ) return errno;
17614 #endif
17615
17616 #ifdef HAVE_LINUX_THREADS
17617         pthread_kill_other_threads_np();
17618 #endif
17619
17620         return 0;
17621
17622 }
17623
17624 _ACEOF
17625 if ac_fn_c_try_run "$LINENO"; then :
17626   ol_cv_pthread_lpthread_lmach_lexc=yes
17627 else
17628   ol_cv_pthread_lpthread_lmach_lexc=no
17629 fi
17630 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17631   conftest.$ac_objext conftest.beam conftest.$ac_ext
17632 fi
17633
17634
17635                 # restore the LIBS
17636                 LIBS="$ol_LIBS"
17637
17638 fi
17639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
17640 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
17641
17642         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
17643                 ol_link_pthreads="-lpthread -lmach -lexc"
17644                 ol_link_threads=posix
17645         fi
17646 fi
17647
17648
17649                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
17650 if test "$ol_link_threads" = no ; then
17651         # try -lpthread -Wl,-woff,85
17652         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
17653 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
17654 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then :
17655   $as_echo_n "(cached) " >&6
17656 else
17657
17658                 # save the flags
17659                 ol_LIBS="$LIBS"
17660                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
17661
17662                 if test "$cross_compiling" = yes; then :
17663   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17664 /* end confdefs.h.  */
17665
17666 /* pthread test headers */
17667 #include <pthread.h>
17668 #if HAVE_PTHREADS < 7
17669 #include <errno.h>
17670 #endif
17671 #ifndef NULL
17672 #define NULL (void*)0
17673 #endif
17674
17675 static void *task(p)
17676         void *p;
17677 {
17678         return (void *) (p == NULL);
17679 }
17680
17681 int
17682 main ()
17683 {
17684
17685         /* pthread test function */
17686 #ifndef PTHREAD_CREATE_DETACHED
17687 #define PTHREAD_CREATE_DETACHED 1
17688 #endif
17689         pthread_t t;
17690         int status;
17691         int detach = PTHREAD_CREATE_DETACHED;
17692
17693 #if HAVE_PTHREADS > 4
17694         /* Final pthreads */
17695         pthread_attr_t attr;
17696
17697         status = pthread_attr_init(&attr);
17698         if( status ) return status;
17699
17700 #if HAVE_PTHREADS < 7
17701         status = pthread_attr_setdetachstate(&attr, &detach);
17702         if( status < 0 ) status = errno;
17703 #else
17704         status = pthread_attr_setdetachstate(&attr, detach);
17705 #endif
17706         if( status ) return status;
17707         status = pthread_create( &t, &attr, task, NULL );
17708 #if HAVE_PTHREADS < 7
17709         if( status < 0 ) status = errno;
17710 #endif
17711         if( status ) return status;
17712 #else
17713         /* Draft 4 pthreads */
17714         status = pthread_create( &t, pthread_attr_default, task, NULL );
17715         if( status ) return errno;
17716
17717         /* give thread a chance to complete */
17718         /* it should remain joinable and hence detachable */
17719         sleep( 1 );
17720
17721         status = pthread_detach( &t );
17722         if( status ) return errno;
17723 #endif
17724
17725 #ifdef HAVE_LINUX_THREADS
17726         pthread_kill_other_threads_np();
17727 #endif
17728
17729         return 0;
17730
17731   ;
17732   return 0;
17733 }
17734 _ACEOF
17735 if ac_fn_c_try_link "$LINENO"; then :
17736   ol_cv_pthread_lib_lpthread_woff=yes
17737 else
17738   ol_cv_pthread_lib_lpthread_woff=no
17739 fi
17740 rm -f core conftest.err conftest.$ac_objext \
17741     conftest$ac_exeext conftest.$ac_ext
17742 else
17743   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17744 /* end confdefs.h.  */
17745
17746 /* pthread test headers */
17747 #include <pthread.h>
17748 #if HAVE_PTHREADS < 7
17749 #include <errno.h>
17750 #endif
17751 #ifndef NULL
17752 #define NULL (void*)0
17753 #endif
17754
17755 static void *task(p)
17756         void *p;
17757 {
17758         return (void *) (p == NULL);
17759 }
17760
17761
17762 int main(argc, argv)
17763         int argc;
17764         char **argv;
17765 {
17766
17767         /* pthread test function */
17768 #ifndef PTHREAD_CREATE_DETACHED
17769 #define PTHREAD_CREATE_DETACHED 1
17770 #endif
17771         pthread_t t;
17772         int status;
17773         int detach = PTHREAD_CREATE_DETACHED;
17774
17775 #if HAVE_PTHREADS > 4
17776         /* Final pthreads */
17777         pthread_attr_t attr;
17778
17779         status = pthread_attr_init(&attr);
17780         if( status ) return status;
17781
17782 #if HAVE_PTHREADS < 7
17783         status = pthread_attr_setdetachstate(&attr, &detach);
17784         if( status < 0 ) status = errno;
17785 #else
17786         status = pthread_attr_setdetachstate(&attr, detach);
17787 #endif
17788         if( status ) return status;
17789         status = pthread_create( &t, &attr, task, NULL );
17790 #if HAVE_PTHREADS < 7
17791         if( status < 0 ) status = errno;
17792 #endif
17793         if( status ) return status;
17794 #else
17795         /* Draft 4 pthreads */
17796         status = pthread_create( &t, pthread_attr_default, task, NULL );
17797         if( status ) return errno;
17798
17799         /* give thread a chance to complete */
17800         /* it should remain joinable and hence detachable */
17801         sleep( 1 );
17802
17803         status = pthread_detach( &t );
17804         if( status ) return errno;
17805 #endif
17806
17807 #ifdef HAVE_LINUX_THREADS
17808         pthread_kill_other_threads_np();
17809 #endif
17810
17811         return 0;
17812
17813 }
17814
17815 _ACEOF
17816 if ac_fn_c_try_run "$LINENO"; then :
17817   ol_cv_pthread_lib_lpthread_woff=yes
17818 else
17819   ol_cv_pthread_lib_lpthread_woff=no
17820 fi
17821 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17822   conftest.$ac_objext conftest.beam conftest.$ac_ext
17823 fi
17824
17825
17826                 # restore the LIBS
17827                 LIBS="$ol_LIBS"
17828
17829 fi
17830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
17831 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
17832
17833         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
17834                 ol_link_pthreads="-lpthread -Wl,-woff,85"
17835                 ol_link_threads=posix
17836         fi
17837 fi
17838
17839
17840                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
17841 if test "$ol_link_threads" = no ; then
17842         # try -lpthread
17843         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
17844 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
17845 if test "${ol_cv_pthread_lpthread+set}" = set; then :
17846   $as_echo_n "(cached) " >&6
17847 else
17848
17849                 # save the flags
17850                 ol_LIBS="$LIBS"
17851                 LIBS="-lpthread $LIBS"
17852
17853                 if test "$cross_compiling" = yes; then :
17854   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17855 /* end confdefs.h.  */
17856
17857 /* pthread test headers */
17858 #include <pthread.h>
17859 #if HAVE_PTHREADS < 7
17860 #include <errno.h>
17861 #endif
17862 #ifndef NULL
17863 #define NULL (void*)0
17864 #endif
17865
17866 static void *task(p)
17867         void *p;
17868 {
17869         return (void *) (p == NULL);
17870 }
17871
17872 int
17873 main ()
17874 {
17875
17876         /* pthread test function */
17877 #ifndef PTHREAD_CREATE_DETACHED
17878 #define PTHREAD_CREATE_DETACHED 1
17879 #endif
17880         pthread_t t;
17881         int status;
17882         int detach = PTHREAD_CREATE_DETACHED;
17883
17884 #if HAVE_PTHREADS > 4
17885         /* Final pthreads */
17886         pthread_attr_t attr;
17887
17888         status = pthread_attr_init(&attr);
17889         if( status ) return status;
17890
17891 #if HAVE_PTHREADS < 7
17892         status = pthread_attr_setdetachstate(&attr, &detach);
17893         if( status < 0 ) status = errno;
17894 #else
17895         status = pthread_attr_setdetachstate(&attr, detach);
17896 #endif
17897         if( status ) return status;
17898         status = pthread_create( &t, &attr, task, NULL );
17899 #if HAVE_PTHREADS < 7
17900         if( status < 0 ) status = errno;
17901 #endif
17902         if( status ) return status;
17903 #else
17904         /* Draft 4 pthreads */
17905         status = pthread_create( &t, pthread_attr_default, task, NULL );
17906         if( status ) return errno;
17907
17908         /* give thread a chance to complete */
17909         /* it should remain joinable and hence detachable */
17910         sleep( 1 );
17911
17912         status = pthread_detach( &t );
17913         if( status ) return errno;
17914 #endif
17915
17916 #ifdef HAVE_LINUX_THREADS
17917         pthread_kill_other_threads_np();
17918 #endif
17919
17920         return 0;
17921
17922   ;
17923   return 0;
17924 }
17925 _ACEOF
17926 if ac_fn_c_try_link "$LINENO"; then :
17927   ol_cv_pthread_lpthread=yes
17928 else
17929   ol_cv_pthread_lpthread=no
17930 fi
17931 rm -f core conftest.err conftest.$ac_objext \
17932     conftest$ac_exeext conftest.$ac_ext
17933 else
17934   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17935 /* end confdefs.h.  */
17936
17937 /* pthread test headers */
17938 #include <pthread.h>
17939 #if HAVE_PTHREADS < 7
17940 #include <errno.h>
17941 #endif
17942 #ifndef NULL
17943 #define NULL (void*)0
17944 #endif
17945
17946 static void *task(p)
17947         void *p;
17948 {
17949         return (void *) (p == NULL);
17950 }
17951
17952
17953 int main(argc, argv)
17954         int argc;
17955         char **argv;
17956 {
17957
17958         /* pthread test function */
17959 #ifndef PTHREAD_CREATE_DETACHED
17960 #define PTHREAD_CREATE_DETACHED 1
17961 #endif
17962         pthread_t t;
17963         int status;
17964         int detach = PTHREAD_CREATE_DETACHED;
17965
17966 #if HAVE_PTHREADS > 4
17967         /* Final pthreads */
17968         pthread_attr_t attr;
17969
17970         status = pthread_attr_init(&attr);
17971         if( status ) return status;
17972
17973 #if HAVE_PTHREADS < 7
17974         status = pthread_attr_setdetachstate(&attr, &detach);
17975         if( status < 0 ) status = errno;
17976 #else
17977         status = pthread_attr_setdetachstate(&attr, detach);
17978 #endif
17979         if( status ) return status;
17980         status = pthread_create( &t, &attr, task, NULL );
17981 #if HAVE_PTHREADS < 7
17982         if( status < 0 ) status = errno;
17983 #endif
17984         if( status ) return status;
17985 #else
17986         /* Draft 4 pthreads */
17987         status = pthread_create( &t, pthread_attr_default, task, NULL );
17988         if( status ) return errno;
17989
17990         /* give thread a chance to complete */
17991         /* it should remain joinable and hence detachable */
17992         sleep( 1 );
17993
17994         status = pthread_detach( &t );
17995         if( status ) return errno;
17996 #endif
17997
17998 #ifdef HAVE_LINUX_THREADS
17999         pthread_kill_other_threads_np();
18000 #endif
18001
18002         return 0;
18003
18004 }
18005
18006 _ACEOF
18007 if ac_fn_c_try_run "$LINENO"; then :
18008   ol_cv_pthread_lpthread=yes
18009 else
18010   ol_cv_pthread_lpthread=no
18011 fi
18012 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18013   conftest.$ac_objext conftest.beam conftest.$ac_ext
18014 fi
18015
18016
18017                 # restore the LIBS
18018                 LIBS="$ol_LIBS"
18019
18020 fi
18021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
18022 $as_echo "$ol_cv_pthread_lpthread" >&6; }
18023
18024         if test $ol_cv_pthread_lpthread = yes ; then
18025                 ol_link_pthreads="-lpthread"
18026                 ol_link_threads=posix
18027         fi
18028 fi
18029
18030                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
18031 if test "$ol_link_threads" = no ; then
18032         # try -lc_r
18033         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
18034 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
18035 if test "${ol_cv_pthread_lc_r+set}" = set; then :
18036   $as_echo_n "(cached) " >&6
18037 else
18038
18039                 # save the flags
18040                 ol_LIBS="$LIBS"
18041                 LIBS="-lc_r $LIBS"
18042
18043                 if test "$cross_compiling" = yes; then :
18044   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18045 /* end confdefs.h.  */
18046
18047 /* pthread test headers */
18048 #include <pthread.h>
18049 #if HAVE_PTHREADS < 7
18050 #include <errno.h>
18051 #endif
18052 #ifndef NULL
18053 #define NULL (void*)0
18054 #endif
18055
18056 static void *task(p)
18057         void *p;
18058 {
18059         return (void *) (p == NULL);
18060 }
18061
18062 int
18063 main ()
18064 {
18065
18066         /* pthread test function */
18067 #ifndef PTHREAD_CREATE_DETACHED
18068 #define PTHREAD_CREATE_DETACHED 1
18069 #endif
18070         pthread_t t;
18071         int status;
18072         int detach = PTHREAD_CREATE_DETACHED;
18073
18074 #if HAVE_PTHREADS > 4
18075         /* Final pthreads */
18076         pthread_attr_t attr;
18077
18078         status = pthread_attr_init(&attr);
18079         if( status ) return status;
18080
18081 #if HAVE_PTHREADS < 7
18082         status = pthread_attr_setdetachstate(&attr, &detach);
18083         if( status < 0 ) status = errno;
18084 #else
18085         status = pthread_attr_setdetachstate(&attr, detach);
18086 #endif
18087         if( status ) return status;
18088         status = pthread_create( &t, &attr, task, NULL );
18089 #if HAVE_PTHREADS < 7
18090         if( status < 0 ) status = errno;
18091 #endif
18092         if( status ) return status;
18093 #else
18094         /* Draft 4 pthreads */
18095         status = pthread_create( &t, pthread_attr_default, task, NULL );
18096         if( status ) return errno;
18097
18098         /* give thread a chance to complete */
18099         /* it should remain joinable and hence detachable */
18100         sleep( 1 );
18101
18102         status = pthread_detach( &t );
18103         if( status ) return errno;
18104 #endif
18105
18106 #ifdef HAVE_LINUX_THREADS
18107         pthread_kill_other_threads_np();
18108 #endif
18109
18110         return 0;
18111
18112   ;
18113   return 0;
18114 }
18115 _ACEOF
18116 if ac_fn_c_try_link "$LINENO"; then :
18117   ol_cv_pthread_lc_r=yes
18118 else
18119   ol_cv_pthread_lc_r=no
18120 fi
18121 rm -f core conftest.err conftest.$ac_objext \
18122     conftest$ac_exeext conftest.$ac_ext
18123 else
18124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18125 /* end confdefs.h.  */
18126
18127 /* pthread test headers */
18128 #include <pthread.h>
18129 #if HAVE_PTHREADS < 7
18130 #include <errno.h>
18131 #endif
18132 #ifndef NULL
18133 #define NULL (void*)0
18134 #endif
18135
18136 static void *task(p)
18137         void *p;
18138 {
18139         return (void *) (p == NULL);
18140 }
18141
18142
18143 int main(argc, argv)
18144         int argc;
18145         char **argv;
18146 {
18147
18148         /* pthread test function */
18149 #ifndef PTHREAD_CREATE_DETACHED
18150 #define PTHREAD_CREATE_DETACHED 1
18151 #endif
18152         pthread_t t;
18153         int status;
18154         int detach = PTHREAD_CREATE_DETACHED;
18155
18156 #if HAVE_PTHREADS > 4
18157         /* Final pthreads */
18158         pthread_attr_t attr;
18159
18160         status = pthread_attr_init(&attr);
18161         if( status ) return status;
18162
18163 #if HAVE_PTHREADS < 7
18164         status = pthread_attr_setdetachstate(&attr, &detach);
18165         if( status < 0 ) status = errno;
18166 #else
18167         status = pthread_attr_setdetachstate(&attr, detach);
18168 #endif
18169         if( status ) return status;
18170         status = pthread_create( &t, &attr, task, NULL );
18171 #if HAVE_PTHREADS < 7
18172         if( status < 0 ) status = errno;
18173 #endif
18174         if( status ) return status;
18175 #else
18176         /* Draft 4 pthreads */
18177         status = pthread_create( &t, pthread_attr_default, task, NULL );
18178         if( status ) return errno;
18179
18180         /* give thread a chance to complete */
18181         /* it should remain joinable and hence detachable */
18182         sleep( 1 );
18183
18184         status = pthread_detach( &t );
18185         if( status ) return errno;
18186 #endif
18187
18188 #ifdef HAVE_LINUX_THREADS
18189         pthread_kill_other_threads_np();
18190 #endif
18191
18192         return 0;
18193
18194 }
18195
18196 _ACEOF
18197 if ac_fn_c_try_run "$LINENO"; then :
18198   ol_cv_pthread_lc_r=yes
18199 else
18200   ol_cv_pthread_lc_r=no
18201 fi
18202 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18203   conftest.$ac_objext conftest.beam conftest.$ac_ext
18204 fi
18205
18206
18207                 # restore the LIBS
18208                 LIBS="$ol_LIBS"
18209
18210 fi
18211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
18212 $as_echo "$ol_cv_pthread_lc_r" >&6; }
18213
18214         if test $ol_cv_pthread_lc_r = yes ; then
18215                 ol_link_pthreads="-lc_r"
18216                 ol_link_threads=posix
18217         fi
18218 fi
18219
18220
18221                 # Pthread try link: -threads (ol_cv_pthread_threads)
18222 if test "$ol_link_threads" = no ; then
18223         # try -threads
18224         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
18225 $as_echo_n "checking for pthread link with -threads... " >&6; }
18226 if test "${ol_cv_pthread_threads+set}" = set; then :
18227   $as_echo_n "(cached) " >&6
18228 else
18229
18230                 # save the flags
18231                 ol_LIBS="$LIBS"
18232                 LIBS="-threads $LIBS"
18233
18234                 if test "$cross_compiling" = yes; then :
18235   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18236 /* end confdefs.h.  */
18237
18238 /* pthread test headers */
18239 #include <pthread.h>
18240 #if HAVE_PTHREADS < 7
18241 #include <errno.h>
18242 #endif
18243 #ifndef NULL
18244 #define NULL (void*)0
18245 #endif
18246
18247 static void *task(p)
18248         void *p;
18249 {
18250         return (void *) (p == NULL);
18251 }
18252
18253 int
18254 main ()
18255 {
18256
18257         /* pthread test function */
18258 #ifndef PTHREAD_CREATE_DETACHED
18259 #define PTHREAD_CREATE_DETACHED 1
18260 #endif
18261         pthread_t t;
18262         int status;
18263         int detach = PTHREAD_CREATE_DETACHED;
18264
18265 #if HAVE_PTHREADS > 4
18266         /* Final pthreads */
18267         pthread_attr_t attr;
18268
18269         status = pthread_attr_init(&attr);
18270         if( status ) return status;
18271
18272 #if HAVE_PTHREADS < 7
18273         status = pthread_attr_setdetachstate(&attr, &detach);
18274         if( status < 0 ) status = errno;
18275 #else
18276         status = pthread_attr_setdetachstate(&attr, detach);
18277 #endif
18278         if( status ) return status;
18279         status = pthread_create( &t, &attr, task, NULL );
18280 #if HAVE_PTHREADS < 7
18281         if( status < 0 ) status = errno;
18282 #endif
18283         if( status ) return status;
18284 #else
18285         /* Draft 4 pthreads */
18286         status = pthread_create( &t, pthread_attr_default, task, NULL );
18287         if( status ) return errno;
18288
18289         /* give thread a chance to complete */
18290         /* it should remain joinable and hence detachable */
18291         sleep( 1 );
18292
18293         status = pthread_detach( &t );
18294         if( status ) return errno;
18295 #endif
18296
18297 #ifdef HAVE_LINUX_THREADS
18298         pthread_kill_other_threads_np();
18299 #endif
18300
18301         return 0;
18302
18303   ;
18304   return 0;
18305 }
18306 _ACEOF
18307 if ac_fn_c_try_link "$LINENO"; then :
18308   ol_cv_pthread_threads=yes
18309 else
18310   ol_cv_pthread_threads=no
18311 fi
18312 rm -f core conftest.err conftest.$ac_objext \
18313     conftest$ac_exeext conftest.$ac_ext
18314 else
18315   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18316 /* end confdefs.h.  */
18317
18318 /* pthread test headers */
18319 #include <pthread.h>
18320 #if HAVE_PTHREADS < 7
18321 #include <errno.h>
18322 #endif
18323 #ifndef NULL
18324 #define NULL (void*)0
18325 #endif
18326
18327 static void *task(p)
18328         void *p;
18329 {
18330         return (void *) (p == NULL);
18331 }
18332
18333
18334 int main(argc, argv)
18335         int argc;
18336         char **argv;
18337 {
18338
18339         /* pthread test function */
18340 #ifndef PTHREAD_CREATE_DETACHED
18341 #define PTHREAD_CREATE_DETACHED 1
18342 #endif
18343         pthread_t t;
18344         int status;
18345         int detach = PTHREAD_CREATE_DETACHED;
18346
18347 #if HAVE_PTHREADS > 4
18348         /* Final pthreads */
18349         pthread_attr_t attr;
18350
18351         status = pthread_attr_init(&attr);
18352         if( status ) return status;
18353
18354 #if HAVE_PTHREADS < 7
18355         status = pthread_attr_setdetachstate(&attr, &detach);
18356         if( status < 0 ) status = errno;
18357 #else
18358         status = pthread_attr_setdetachstate(&attr, detach);
18359 #endif
18360         if( status ) return status;
18361         status = pthread_create( &t, &attr, task, NULL );
18362 #if HAVE_PTHREADS < 7
18363         if( status < 0 ) status = errno;
18364 #endif
18365         if( status ) return status;
18366 #else
18367         /* Draft 4 pthreads */
18368         status = pthread_create( &t, pthread_attr_default, task, NULL );
18369         if( status ) return errno;
18370
18371         /* give thread a chance to complete */
18372         /* it should remain joinable and hence detachable */
18373         sleep( 1 );
18374
18375         status = pthread_detach( &t );
18376         if( status ) return errno;
18377 #endif
18378
18379 #ifdef HAVE_LINUX_THREADS
18380         pthread_kill_other_threads_np();
18381 #endif
18382
18383         return 0;
18384
18385 }
18386
18387 _ACEOF
18388 if ac_fn_c_try_run "$LINENO"; then :
18389   ol_cv_pthread_threads=yes
18390 else
18391   ol_cv_pthread_threads=no
18392 fi
18393 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18394   conftest.$ac_objext conftest.beam conftest.$ac_ext
18395 fi
18396
18397
18398                 # restore the LIBS
18399                 LIBS="$ol_LIBS"
18400
18401 fi
18402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
18403 $as_echo "$ol_cv_pthread_threads" >&6; }
18404
18405         if test $ol_cv_pthread_threads = yes ; then
18406                 ol_link_pthreads="-threads"
18407                 ol_link_threads=posix
18408         fi
18409 fi
18410
18411
18412                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
18413 if test "$ol_link_threads" = no ; then
18414         # try -lpthreads -lmach -lexc -lc_r
18415         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
18416 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
18417 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then :
18418   $as_echo_n "(cached) " >&6
18419 else
18420
18421                 # save the flags
18422                 ol_LIBS="$LIBS"
18423                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
18424
18425                 if test "$cross_compiling" = yes; then :
18426   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18427 /* end confdefs.h.  */
18428
18429 /* pthread test headers */
18430 #include <pthread.h>
18431 #if HAVE_PTHREADS < 7
18432 #include <errno.h>
18433 #endif
18434 #ifndef NULL
18435 #define NULL (void*)0
18436 #endif
18437
18438 static void *task(p)
18439         void *p;
18440 {
18441         return (void *) (p == NULL);
18442 }
18443
18444 int
18445 main ()
18446 {
18447
18448         /* pthread test function */
18449 #ifndef PTHREAD_CREATE_DETACHED
18450 #define PTHREAD_CREATE_DETACHED 1
18451 #endif
18452         pthread_t t;
18453         int status;
18454         int detach = PTHREAD_CREATE_DETACHED;
18455
18456 #if HAVE_PTHREADS > 4
18457         /* Final pthreads */
18458         pthread_attr_t attr;
18459
18460         status = pthread_attr_init(&attr);
18461         if( status ) return status;
18462
18463 #if HAVE_PTHREADS < 7
18464         status = pthread_attr_setdetachstate(&attr, &detach);
18465         if( status < 0 ) status = errno;
18466 #else
18467         status = pthread_attr_setdetachstate(&attr, detach);
18468 #endif
18469         if( status ) return status;
18470         status = pthread_create( &t, &attr, task, NULL );
18471 #if HAVE_PTHREADS < 7
18472         if( status < 0 ) status = errno;
18473 #endif
18474         if( status ) return status;
18475 #else
18476         /* Draft 4 pthreads */
18477         status = pthread_create( &t, pthread_attr_default, task, NULL );
18478         if( status ) return errno;
18479
18480         /* give thread a chance to complete */
18481         /* it should remain joinable and hence detachable */
18482         sleep( 1 );
18483
18484         status = pthread_detach( &t );
18485         if( status ) return errno;
18486 #endif
18487
18488 #ifdef HAVE_LINUX_THREADS
18489         pthread_kill_other_threads_np();
18490 #endif
18491
18492         return 0;
18493
18494   ;
18495   return 0;
18496 }
18497 _ACEOF
18498 if ac_fn_c_try_link "$LINENO"; then :
18499   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18500 else
18501   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18502 fi
18503 rm -f core conftest.err conftest.$ac_objext \
18504     conftest$ac_exeext conftest.$ac_ext
18505 else
18506   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18507 /* end confdefs.h.  */
18508
18509 /* pthread test headers */
18510 #include <pthread.h>
18511 #if HAVE_PTHREADS < 7
18512 #include <errno.h>
18513 #endif
18514 #ifndef NULL
18515 #define NULL (void*)0
18516 #endif
18517
18518 static void *task(p)
18519         void *p;
18520 {
18521         return (void *) (p == NULL);
18522 }
18523
18524
18525 int main(argc, argv)
18526         int argc;
18527         char **argv;
18528 {
18529
18530         /* pthread test function */
18531 #ifndef PTHREAD_CREATE_DETACHED
18532 #define PTHREAD_CREATE_DETACHED 1
18533 #endif
18534         pthread_t t;
18535         int status;
18536         int detach = PTHREAD_CREATE_DETACHED;
18537
18538 #if HAVE_PTHREADS > 4
18539         /* Final pthreads */
18540         pthread_attr_t attr;
18541
18542         status = pthread_attr_init(&attr);
18543         if( status ) return status;
18544
18545 #if HAVE_PTHREADS < 7
18546         status = pthread_attr_setdetachstate(&attr, &detach);
18547         if( status < 0 ) status = errno;
18548 #else
18549         status = pthread_attr_setdetachstate(&attr, detach);
18550 #endif
18551         if( status ) return status;
18552         status = pthread_create( &t, &attr, task, NULL );
18553 #if HAVE_PTHREADS < 7
18554         if( status < 0 ) status = errno;
18555 #endif
18556         if( status ) return status;
18557 #else
18558         /* Draft 4 pthreads */
18559         status = pthread_create( &t, pthread_attr_default, task, NULL );
18560         if( status ) return errno;
18561
18562         /* give thread a chance to complete */
18563         /* it should remain joinable and hence detachable */
18564         sleep( 1 );
18565
18566         status = pthread_detach( &t );
18567         if( status ) return errno;
18568 #endif
18569
18570 #ifdef HAVE_LINUX_THREADS
18571         pthread_kill_other_threads_np();
18572 #endif
18573
18574         return 0;
18575
18576 }
18577
18578 _ACEOF
18579 if ac_fn_c_try_run "$LINENO"; then :
18580   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18581 else
18582   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18583 fi
18584 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18585   conftest.$ac_objext conftest.beam conftest.$ac_ext
18586 fi
18587
18588
18589                 # restore the LIBS
18590                 LIBS="$ol_LIBS"
18591
18592 fi
18593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
18594 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
18595
18596         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
18597                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
18598                 ol_link_threads=posix
18599         fi
18600 fi
18601
18602                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
18603 if test "$ol_link_threads" = no ; then
18604         # try -lpthreads -lmach -lexc
18605         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
18606 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
18607 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then :
18608   $as_echo_n "(cached) " >&6
18609 else
18610
18611                 # save the flags
18612                 ol_LIBS="$LIBS"
18613                 LIBS="-lpthreads -lmach -lexc $LIBS"
18614
18615                 if test "$cross_compiling" = yes; then :
18616   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18617 /* end confdefs.h.  */
18618
18619 /* pthread test headers */
18620 #include <pthread.h>
18621 #if HAVE_PTHREADS < 7
18622 #include <errno.h>
18623 #endif
18624 #ifndef NULL
18625 #define NULL (void*)0
18626 #endif
18627
18628 static void *task(p)
18629         void *p;
18630 {
18631         return (void *) (p == NULL);
18632 }
18633
18634 int
18635 main ()
18636 {
18637
18638         /* pthread test function */
18639 #ifndef PTHREAD_CREATE_DETACHED
18640 #define PTHREAD_CREATE_DETACHED 1
18641 #endif
18642         pthread_t t;
18643         int status;
18644         int detach = PTHREAD_CREATE_DETACHED;
18645
18646 #if HAVE_PTHREADS > 4
18647         /* Final pthreads */
18648         pthread_attr_t attr;
18649
18650         status = pthread_attr_init(&attr);
18651         if( status ) return status;
18652
18653 #if HAVE_PTHREADS < 7
18654         status = pthread_attr_setdetachstate(&attr, &detach);
18655         if( status < 0 ) status = errno;
18656 #else
18657         status = pthread_attr_setdetachstate(&attr, detach);
18658 #endif
18659         if( status ) return status;
18660         status = pthread_create( &t, &attr, task, NULL );
18661 #if HAVE_PTHREADS < 7
18662         if( status < 0 ) status = errno;
18663 #endif
18664         if( status ) return status;
18665 #else
18666         /* Draft 4 pthreads */
18667         status = pthread_create( &t, pthread_attr_default, task, NULL );
18668         if( status ) return errno;
18669
18670         /* give thread a chance to complete */
18671         /* it should remain joinable and hence detachable */
18672         sleep( 1 );
18673
18674         status = pthread_detach( &t );
18675         if( status ) return errno;
18676 #endif
18677
18678 #ifdef HAVE_LINUX_THREADS
18679         pthread_kill_other_threads_np();
18680 #endif
18681
18682         return 0;
18683
18684   ;
18685   return 0;
18686 }
18687 _ACEOF
18688 if ac_fn_c_try_link "$LINENO"; then :
18689   ol_cv_pthread_lpthreads_lmach_lexc=yes
18690 else
18691   ol_cv_pthread_lpthreads_lmach_lexc=no
18692 fi
18693 rm -f core conftest.err conftest.$ac_objext \
18694     conftest$ac_exeext conftest.$ac_ext
18695 else
18696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18697 /* end confdefs.h.  */
18698
18699 /* pthread test headers */
18700 #include <pthread.h>
18701 #if HAVE_PTHREADS < 7
18702 #include <errno.h>
18703 #endif
18704 #ifndef NULL
18705 #define NULL (void*)0
18706 #endif
18707
18708 static void *task(p)
18709         void *p;
18710 {
18711         return (void *) (p == NULL);
18712 }
18713
18714
18715 int main(argc, argv)
18716         int argc;
18717         char **argv;
18718 {
18719
18720         /* pthread test function */
18721 #ifndef PTHREAD_CREATE_DETACHED
18722 #define PTHREAD_CREATE_DETACHED 1
18723 #endif
18724         pthread_t t;
18725         int status;
18726         int detach = PTHREAD_CREATE_DETACHED;
18727
18728 #if HAVE_PTHREADS > 4
18729         /* Final pthreads */
18730         pthread_attr_t attr;
18731
18732         status = pthread_attr_init(&attr);
18733         if( status ) return status;
18734
18735 #if HAVE_PTHREADS < 7
18736         status = pthread_attr_setdetachstate(&attr, &detach);
18737         if( status < 0 ) status = errno;
18738 #else
18739         status = pthread_attr_setdetachstate(&attr, detach);
18740 #endif
18741         if( status ) return status;
18742         status = pthread_create( &t, &attr, task, NULL );
18743 #if HAVE_PTHREADS < 7
18744         if( status < 0 ) status = errno;
18745 #endif
18746         if( status ) return status;
18747 #else
18748         /* Draft 4 pthreads */
18749         status = pthread_create( &t, pthread_attr_default, task, NULL );
18750         if( status ) return errno;
18751
18752         /* give thread a chance to complete */
18753         /* it should remain joinable and hence detachable */
18754         sleep( 1 );
18755
18756         status = pthread_detach( &t );
18757         if( status ) return errno;
18758 #endif
18759
18760 #ifdef HAVE_LINUX_THREADS
18761         pthread_kill_other_threads_np();
18762 #endif
18763
18764         return 0;
18765
18766 }
18767
18768 _ACEOF
18769 if ac_fn_c_try_run "$LINENO"; then :
18770   ol_cv_pthread_lpthreads_lmach_lexc=yes
18771 else
18772   ol_cv_pthread_lpthreads_lmach_lexc=no
18773 fi
18774 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18775   conftest.$ac_objext conftest.beam conftest.$ac_ext
18776 fi
18777
18778
18779                 # restore the LIBS
18780                 LIBS="$ol_LIBS"
18781
18782 fi
18783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
18784 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
18785
18786         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
18787                 ol_link_pthreads="-lpthreads -lmach -lexc"
18788                 ol_link_threads=posix
18789         fi
18790 fi
18791
18792                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
18793 if test "$ol_link_threads" = no ; then
18794         # try -lpthreads -lexc
18795         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
18796 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
18797 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then :
18798   $as_echo_n "(cached) " >&6
18799 else
18800
18801                 # save the flags
18802                 ol_LIBS="$LIBS"
18803                 LIBS="-lpthreads -lexc $LIBS"
18804
18805                 if test "$cross_compiling" = yes; then :
18806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18807 /* end confdefs.h.  */
18808
18809 /* pthread test headers */
18810 #include <pthread.h>
18811 #if HAVE_PTHREADS < 7
18812 #include <errno.h>
18813 #endif
18814 #ifndef NULL
18815 #define NULL (void*)0
18816 #endif
18817
18818 static void *task(p)
18819         void *p;
18820 {
18821         return (void *) (p == NULL);
18822 }
18823
18824 int
18825 main ()
18826 {
18827
18828         /* pthread test function */
18829 #ifndef PTHREAD_CREATE_DETACHED
18830 #define PTHREAD_CREATE_DETACHED 1
18831 #endif
18832         pthread_t t;
18833         int status;
18834         int detach = PTHREAD_CREATE_DETACHED;
18835
18836 #if HAVE_PTHREADS > 4
18837         /* Final pthreads */
18838         pthread_attr_t attr;
18839
18840         status = pthread_attr_init(&attr);
18841         if( status ) return status;
18842
18843 #if HAVE_PTHREADS < 7
18844         status = pthread_attr_setdetachstate(&attr, &detach);
18845         if( status < 0 ) status = errno;
18846 #else
18847         status = pthread_attr_setdetachstate(&attr, detach);
18848 #endif
18849         if( status ) return status;
18850         status = pthread_create( &t, &attr, task, NULL );
18851 #if HAVE_PTHREADS < 7
18852         if( status < 0 ) status = errno;
18853 #endif
18854         if( status ) return status;
18855 #else
18856         /* Draft 4 pthreads */
18857         status = pthread_create( &t, pthread_attr_default, task, NULL );
18858         if( status ) return errno;
18859
18860         /* give thread a chance to complete */
18861         /* it should remain joinable and hence detachable */
18862         sleep( 1 );
18863
18864         status = pthread_detach( &t );
18865         if( status ) return errno;
18866 #endif
18867
18868 #ifdef HAVE_LINUX_THREADS
18869         pthread_kill_other_threads_np();
18870 #endif
18871
18872         return 0;
18873
18874   ;
18875   return 0;
18876 }
18877 _ACEOF
18878 if ac_fn_c_try_link "$LINENO"; then :
18879   ol_cv_pthread_lpthreads_lexc=yes
18880 else
18881   ol_cv_pthread_lpthreads_lexc=no
18882 fi
18883 rm -f core conftest.err conftest.$ac_objext \
18884     conftest$ac_exeext conftest.$ac_ext
18885 else
18886   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18887 /* end confdefs.h.  */
18888
18889 /* pthread test headers */
18890 #include <pthread.h>
18891 #if HAVE_PTHREADS < 7
18892 #include <errno.h>
18893 #endif
18894 #ifndef NULL
18895 #define NULL (void*)0
18896 #endif
18897
18898 static void *task(p)
18899         void *p;
18900 {
18901         return (void *) (p == NULL);
18902 }
18903
18904
18905 int main(argc, argv)
18906         int argc;
18907         char **argv;
18908 {
18909
18910         /* pthread test function */
18911 #ifndef PTHREAD_CREATE_DETACHED
18912 #define PTHREAD_CREATE_DETACHED 1
18913 #endif
18914         pthread_t t;
18915         int status;
18916         int detach = PTHREAD_CREATE_DETACHED;
18917
18918 #if HAVE_PTHREADS > 4
18919         /* Final pthreads */
18920         pthread_attr_t attr;
18921
18922         status = pthread_attr_init(&attr);
18923         if( status ) return status;
18924
18925 #if HAVE_PTHREADS < 7
18926         status = pthread_attr_setdetachstate(&attr, &detach);
18927         if( status < 0 ) status = errno;
18928 #else
18929         status = pthread_attr_setdetachstate(&attr, detach);
18930 #endif
18931         if( status ) return status;
18932         status = pthread_create( &t, &attr, task, NULL );
18933 #if HAVE_PTHREADS < 7
18934         if( status < 0 ) status = errno;
18935 #endif
18936         if( status ) return status;
18937 #else
18938         /* Draft 4 pthreads */
18939         status = pthread_create( &t, pthread_attr_default, task, NULL );
18940         if( status ) return errno;
18941
18942         /* give thread a chance to complete */
18943         /* it should remain joinable and hence detachable */
18944         sleep( 1 );
18945
18946         status = pthread_detach( &t );
18947         if( status ) return errno;
18948 #endif
18949
18950 #ifdef HAVE_LINUX_THREADS
18951         pthread_kill_other_threads_np();
18952 #endif
18953
18954         return 0;
18955
18956 }
18957
18958 _ACEOF
18959 if ac_fn_c_try_run "$LINENO"; then :
18960   ol_cv_pthread_lpthreads_lexc=yes
18961 else
18962   ol_cv_pthread_lpthreads_lexc=no
18963 fi
18964 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18965   conftest.$ac_objext conftest.beam conftest.$ac_ext
18966 fi
18967
18968
18969                 # restore the LIBS
18970                 LIBS="$ol_LIBS"
18971
18972 fi
18973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
18974 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
18975
18976         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
18977                 ol_link_pthreads="-lpthreads -lexc"
18978                 ol_link_threads=posix
18979         fi
18980 fi
18981
18982
18983                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
18984 if test "$ol_link_threads" = no ; then
18985         # try -lpthreads
18986         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
18987 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
18988 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then :
18989   $as_echo_n "(cached) " >&6
18990 else
18991
18992                 # save the flags
18993                 ol_LIBS="$LIBS"
18994                 LIBS="-lpthreads $LIBS"
18995
18996                 if test "$cross_compiling" = yes; then :
18997   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18998 /* end confdefs.h.  */
18999
19000 /* pthread test headers */
19001 #include <pthread.h>
19002 #if HAVE_PTHREADS < 7
19003 #include <errno.h>
19004 #endif
19005 #ifndef NULL
19006 #define NULL (void*)0
19007 #endif
19008
19009 static void *task(p)
19010         void *p;
19011 {
19012         return (void *) (p == NULL);
19013 }
19014
19015 int
19016 main ()
19017 {
19018
19019         /* pthread test function */
19020 #ifndef PTHREAD_CREATE_DETACHED
19021 #define PTHREAD_CREATE_DETACHED 1
19022 #endif
19023         pthread_t t;
19024         int status;
19025         int detach = PTHREAD_CREATE_DETACHED;
19026
19027 #if HAVE_PTHREADS > 4
19028         /* Final pthreads */
19029         pthread_attr_t attr;
19030
19031         status = pthread_attr_init(&attr);
19032         if( status ) return status;
19033
19034 #if HAVE_PTHREADS < 7
19035         status = pthread_attr_setdetachstate(&attr, &detach);
19036         if( status < 0 ) status = errno;
19037 #else
19038         status = pthread_attr_setdetachstate(&attr, detach);
19039 #endif
19040         if( status ) return status;
19041         status = pthread_create( &t, &attr, task, NULL );
19042 #if HAVE_PTHREADS < 7
19043         if( status < 0 ) status = errno;
19044 #endif
19045         if( status ) return status;
19046 #else
19047         /* Draft 4 pthreads */
19048         status = pthread_create( &t, pthread_attr_default, task, NULL );
19049         if( status ) return errno;
19050
19051         /* give thread a chance to complete */
19052         /* it should remain joinable and hence detachable */
19053         sleep( 1 );
19054
19055         status = pthread_detach( &t );
19056         if( status ) return errno;
19057 #endif
19058
19059 #ifdef HAVE_LINUX_THREADS
19060         pthread_kill_other_threads_np();
19061 #endif
19062
19063         return 0;
19064
19065   ;
19066   return 0;
19067 }
19068 _ACEOF
19069 if ac_fn_c_try_link "$LINENO"; then :
19070   ol_cv_pthread_lib_lpthreads=yes
19071 else
19072   ol_cv_pthread_lib_lpthreads=no
19073 fi
19074 rm -f core conftest.err conftest.$ac_objext \
19075     conftest$ac_exeext conftest.$ac_ext
19076 else
19077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19078 /* end confdefs.h.  */
19079
19080 /* pthread test headers */
19081 #include <pthread.h>
19082 #if HAVE_PTHREADS < 7
19083 #include <errno.h>
19084 #endif
19085 #ifndef NULL
19086 #define NULL (void*)0
19087 #endif
19088
19089 static void *task(p)
19090         void *p;
19091 {
19092         return (void *) (p == NULL);
19093 }
19094
19095
19096 int main(argc, argv)
19097         int argc;
19098         char **argv;
19099 {
19100
19101         /* pthread test function */
19102 #ifndef PTHREAD_CREATE_DETACHED
19103 #define PTHREAD_CREATE_DETACHED 1
19104 #endif
19105         pthread_t t;
19106         int status;
19107         int detach = PTHREAD_CREATE_DETACHED;
19108
19109 #if HAVE_PTHREADS > 4
19110         /* Final pthreads */
19111         pthread_attr_t attr;
19112
19113         status = pthread_attr_init(&attr);
19114         if( status ) return status;
19115
19116 #if HAVE_PTHREADS < 7
19117         status = pthread_attr_setdetachstate(&attr, &detach);
19118         if( status < 0 ) status = errno;
19119 #else
19120         status = pthread_attr_setdetachstate(&attr, detach);
19121 #endif
19122         if( status ) return status;
19123         status = pthread_create( &t, &attr, task, NULL );
19124 #if HAVE_PTHREADS < 7
19125         if( status < 0 ) status = errno;
19126 #endif
19127         if( status ) return status;
19128 #else
19129         /* Draft 4 pthreads */
19130         status = pthread_create( &t, pthread_attr_default, task, NULL );
19131         if( status ) return errno;
19132
19133         /* give thread a chance to complete */
19134         /* it should remain joinable and hence detachable */
19135         sleep( 1 );
19136
19137         status = pthread_detach( &t );
19138         if( status ) return errno;
19139 #endif
19140
19141 #ifdef HAVE_LINUX_THREADS
19142         pthread_kill_other_threads_np();
19143 #endif
19144
19145         return 0;
19146
19147 }
19148
19149 _ACEOF
19150 if ac_fn_c_try_run "$LINENO"; then :
19151   ol_cv_pthread_lib_lpthreads=yes
19152 else
19153   ol_cv_pthread_lib_lpthreads=no
19154 fi
19155 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19156   conftest.$ac_objext conftest.beam conftest.$ac_ext
19157 fi
19158
19159
19160                 # restore the LIBS
19161                 LIBS="$ol_LIBS"
19162
19163 fi
19164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
19165 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
19166
19167         if test $ol_cv_pthread_lib_lpthreads = yes ; then
19168                 ol_link_pthreads="-lpthreads"
19169                 ol_link_threads=posix
19170         fi
19171 fi
19172
19173
19174                 if test $ol_link_threads != no ; then
19175                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
19176
19177                                                 save_CPPFLAGS="$CPPFLAGS"
19178                         save_LIBS="$LIBS"
19179                         LIBS="$LTHREAD_LIBS $LIBS"
19180
19181                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
19182 do :
19183   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19184 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19185 eval as_val=\$$as_ac_var
19186    if test "x$as_val" = x""yes; then :
19187   cat >>confdefs.h <<_ACEOF
19188 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19189 _ACEOF
19190
19191 fi
19192 done
19193
19194
19195                         if test $ac_cv_func_sched_yield = no &&
19196                            test $ac_cv_func_pthread_yield = no &&
19197                            test $ac_cv_func_thr_yield = no ; then
19198                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
19199 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
19200 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
19201   $as_echo_n "(cached) " >&6
19202 else
19203   ac_check_lib_save_LIBS=$LIBS
19204 LIBS="-lrt  $LIBS"
19205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19206 /* end confdefs.h.  */
19207
19208 /* Override any GCC internal prototype to avoid an error.
19209    Use char because int might match the return type of a GCC
19210    builtin and then its argument prototype would still apply.  */
19211 #ifdef __cplusplus
19212 extern "C"
19213 #endif
19214 char sched_yield ();
19215 int
19216 main ()
19217 {
19218 return sched_yield ();
19219   ;
19220   return 0;
19221 }
19222 _ACEOF
19223 if ac_fn_c_try_link "$LINENO"; then :
19224   ac_cv_lib_rt_sched_yield=yes
19225 else
19226   ac_cv_lib_rt_sched_yield=no
19227 fi
19228 rm -f core conftest.err conftest.$ac_objext \
19229     conftest$ac_exeext conftest.$ac_ext
19230 LIBS=$ac_check_lib_save_LIBS
19231 fi
19232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19233 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
19234 if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
19235   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
19236
19237 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
19238
19239                                         ac_cv_func_sched_yield=yes
19240 else
19241   ac_cv_func_sched_yield=no
19242 fi
19243
19244                         fi
19245                         if test $ac_cv_func_sched_yield = no &&
19246                            test $ac_cv_func_pthread_yield = no &&
19247                            test "$ac_cv_func_thr_yield" = no ; then
19248                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
19249 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
19250                         fi
19251
19252                                                 for ac_func in pthread_kill
19253 do :
19254   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
19255 if test "x$ac_cv_func_pthread_kill" = x""yes; then :
19256   cat >>confdefs.h <<_ACEOF
19257 #define HAVE_PTHREAD_KILL 1
19258 _ACEOF
19259
19260 fi
19261 done
19262
19263
19264                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
19265 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
19266 if test "${ol_cv_func_pthread_rwlock_destroy+set}" = set; then :
19267   $as_echo_n "(cached) " >&6
19268 else
19269
19270                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19271 /* end confdefs.h.  */
19272
19273 #include <pthread.h>
19274 pthread_rwlock_t rwlock;
19275
19276 int
19277 main ()
19278 {
19279 pthread_rwlock_destroy(&rwlock);
19280   ;
19281   return 0;
19282 }
19283 _ACEOF
19284 if ac_fn_c_try_link "$LINENO"; then :
19285   ol_cv_func_pthread_rwlock_destroy=yes
19286 else
19287   ol_cv_func_pthread_rwlock_destroy=no
19288 fi
19289 rm -f core conftest.err conftest.$ac_objext \
19290     conftest$ac_exeext conftest.$ac_ext
19291
19292 fi
19293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
19294 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
19295                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
19296
19297 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
19298
19299                         fi
19300
19301                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
19302 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
19303 if test "${ol_cv_func_pthread_detach+set}" = set; then :
19304   $as_echo_n "(cached) " >&6
19305 else
19306
19307                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19308 /* end confdefs.h.  */
19309
19310 #include <pthread.h>
19311 #ifndef NULL
19312 #define NULL (void*)0
19313 #endif
19314
19315 int
19316 main ()
19317 {
19318 pthread_detach(NULL);
19319   ;
19320   return 0;
19321 }
19322 _ACEOF
19323 if ac_fn_c_try_link "$LINENO"; then :
19324   ol_cv_func_pthread_detach=yes
19325 else
19326   ol_cv_func_pthread_detach=no
19327 fi
19328 rm -f core conftest.err conftest.$ac_objext \
19329     conftest$ac_exeext conftest.$ac_ext
19330
19331 fi
19332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
19333 $as_echo "$ol_cv_func_pthread_detach" >&6; }
19334
19335                         if test $ol_cv_func_pthread_detach = no ; then
19336                                 as_fn_error "could not locate pthread_detach()" "$LINENO" 5
19337                         fi
19338
19339
19340 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
19341
19342
19343                                                 for ac_func in \
19344                                 pthread_setconcurrency \
19345                                 pthread_getconcurrency \
19346                                 thr_setconcurrency \
19347                                 thr_getconcurrency \
19348
19349 do :
19350   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19351 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19352 eval as_val=\$$as_ac_var
19353    if test "x$as_val" = x""yes; then :
19354   cat >>confdefs.h <<_ACEOF
19355 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19356 _ACEOF
19357
19358 fi
19359 done
19360
19361
19362
19363         for ac_func in pthread_kill_other_threads_np
19364 do :
19365   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
19366 if test "x$ac_cv_func_pthread_kill_other_threads_np" = x""yes; then :
19367   cat >>confdefs.h <<_ACEOF
19368 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
19369 _ACEOF
19370
19371 fi
19372 done
19373
19374         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
19375 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
19376 if test "${ol_cv_sys_linux_threads+set}" = set; then :
19377   $as_echo_n "(cached) " >&6
19378 else
19379   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
19380 fi
19381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
19382 $as_echo "$ol_cv_sys_linux_threads" >&6; }
19383
19384
19385
19386
19387         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
19388 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
19389 if test "${ol_cv_linux_threads+set}" = set; then :
19390   $as_echo_n "(cached) " >&6
19391 else
19392
19393                 if test $ol_cv_header_linux_threads = yes &&
19394                    test $ol_cv_sys_linux_threads = yes; then
19395                         ol_cv_linux_threads=yes
19396                 elif test $ol_cv_header_linux_threads = no &&
19397                      test $ol_cv_sys_linux_threads = no; then
19398                         ol_cv_linux_threads=no
19399                 else
19400                         ol_cv_linux_threads=error
19401                 fi
19402
19403 fi
19404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
19405 $as_echo "$ol_cv_linux_threads" >&6; }
19406
19407
19408                         if test $ol_cv_linux_threads = error; then
19409                                 as_fn_error "LinuxThreads header/library mismatch" "$LINENO" 5;
19410                         fi
19411
19412                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
19413 $as_echo_n "checking if pthread_create() works... " >&6; }
19414 if test "${ol_cv_pthread_create_works+set}" = set; then :
19415   $as_echo_n "(cached) " >&6
19416 else
19417
19418                         if test "$cross_compiling" = yes; then :
19419                                 ol_cv_pthread_create_works=yes
19420 else
19421   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19422 /* end confdefs.h.  */
19423
19424 /* pthread test headers */
19425 #include <pthread.h>
19426 #if HAVE_PTHREADS < 7
19427 #include <errno.h>
19428 #endif
19429 #ifndef NULL
19430 #define NULL (void*)0
19431 #endif
19432
19433 static void *task(p)
19434         void *p;
19435 {
19436         return (void *) (p == NULL);
19437 }
19438
19439
19440 int main(argc, argv)
19441         int argc;
19442         char **argv;
19443 {
19444
19445         /* pthread test function */
19446 #ifndef PTHREAD_CREATE_DETACHED
19447 #define PTHREAD_CREATE_DETACHED 1
19448 #endif
19449         pthread_t t;
19450         int status;
19451         int detach = PTHREAD_CREATE_DETACHED;
19452
19453 #if HAVE_PTHREADS > 4
19454         /* Final pthreads */
19455         pthread_attr_t attr;
19456
19457         status = pthread_attr_init(&attr);
19458         if( status ) return status;
19459
19460 #if HAVE_PTHREADS < 7
19461         status = pthread_attr_setdetachstate(&attr, &detach);
19462         if( status < 0 ) status = errno;
19463 #else
19464         status = pthread_attr_setdetachstate(&attr, detach);
19465 #endif
19466         if( status ) return status;
19467         status = pthread_create( &t, &attr, task, NULL );
19468 #if HAVE_PTHREADS < 7
19469         if( status < 0 ) status = errno;
19470 #endif
19471         if( status ) return status;
19472 #else
19473         /* Draft 4 pthreads */
19474         status = pthread_create( &t, pthread_attr_default, task, NULL );
19475         if( status ) return errno;
19476
19477         /* give thread a chance to complete */
19478         /* it should remain joinable and hence detachable */
19479         sleep( 1 );
19480
19481         status = pthread_detach( &t );
19482         if( status ) return errno;
19483 #endif
19484
19485 #ifdef HAVE_LINUX_THREADS
19486         pthread_kill_other_threads_np();
19487 #endif
19488
19489         return 0;
19490
19491 }
19492
19493 _ACEOF
19494 if ac_fn_c_try_run "$LINENO"; then :
19495   ol_cv_pthread_create_works=yes
19496 else
19497   ol_cv_pthread_create_works=no
19498 fi
19499 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19500   conftest.$ac_objext conftest.beam conftest.$ac_ext
19501 fi
19502
19503 fi
19504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
19505 $as_echo "$ol_cv_pthread_create_works" >&6; }
19506
19507                         if test $ol_cv_pthread_create_works = no ; then
19508                                 as_fn_error "pthread_create is not usable, check environment settings" "$LINENO" 5
19509                         fi
19510
19511                         ol_replace_broken_yield=no
19512
19513                         if test $ol_replace_broken_yield = yes ; then
19514
19515 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
19516
19517                         fi
19518
19519                                                 if test $ol_with_yielding_select = auto ; then
19520                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
19521 $as_echo_n "checking if select yields when using pthreads... " >&6; }
19522 if test "${ol_cv_pthread_select_yields+set}" = set; then :
19523   $as_echo_n "(cached) " >&6
19524 else
19525
19526                                 if test "$cross_compiling" = yes; then :
19527   ol_cv_pthread_select_yields=cross
19528 else
19529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19530 /* end confdefs.h.  */
19531
19532 #include <sys/types.h>
19533 #include <sys/time.h>
19534 #include <unistd.h>
19535 #include <pthread.h>
19536 #ifndef NULL
19537 #define NULL (void*) 0
19538 #endif
19539
19540 static int fildes[2];
19541
19542 static void *task(p)
19543         void *p;
19544 {
19545         int i;
19546         struct timeval tv;
19547
19548         fd_set rfds;
19549
19550         tv.tv_sec=10;
19551         tv.tv_usec=0;
19552
19553         FD_ZERO(&rfds);
19554         FD_SET(fildes[0], &rfds);
19555
19556         /* we're not interested in any fds */
19557         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
19558
19559         if(i < 0) {
19560                 perror("select");
19561                 exit(10);
19562         }
19563
19564         exit(0); /* if we exit here, the select blocked the whole process */
19565 }
19566
19567 int main(argc, argv)
19568         int argc;
19569         char **argv;
19570 {
19571         pthread_t t;
19572
19573         /* create a pipe to select */
19574         if(pipe(&fildes[0])) {
19575                 perror("select");
19576                 exit(1);
19577         }
19578
19579 #ifdef HAVE_PTHREAD_SETCONCURRENCY
19580         (void) pthread_setconcurrency(2);
19581 #else
19582 #ifdef HAVE_THR_SETCONCURRENCY
19583         /* Set Solaris LWP concurrency to 2 */
19584         thr_setconcurrency(2);
19585 #endif
19586 #endif
19587
19588 #if HAVE_PTHREADS < 6
19589         pthread_create(&t, pthread_attr_default, task, NULL);
19590 #else
19591         pthread_create(&t, NULL, task, NULL);
19592 #endif
19593
19594         /* make sure task runs first */
19595 #ifdef HAVE_THR_YIELD
19596         thr_yield();
19597 #elif defined( HAVE_SCHED_YIELD )
19598         sched_yield();
19599 #elif defined( HAVE_PTHREAD_YIELD )
19600         pthread_yield();
19601 #endif
19602
19603         exit(2);
19604 }
19605 _ACEOF
19606 if ac_fn_c_try_run "$LINENO"; then :
19607   ol_cv_pthread_select_yields=no
19608 else
19609   ol_cv_pthread_select_yields=yes
19610 fi
19611 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19612   conftest.$ac_objext conftest.beam conftest.$ac_ext
19613 fi
19614
19615 fi
19616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
19617 $as_echo "$ol_cv_pthread_select_yields" >&6; }
19618
19619                                 if test $ol_cv_pthread_select_yields = cross ; then
19620                                         as_fn_error "crossing compiling: use --with-yielding_select=yes|no|manual" "$LINENO" 5
19621                                 fi
19622
19623                                 if test $ol_cv_pthread_select_yields = yes ; then
19624                                         ol_with_yielding_select=yes
19625                                 fi
19626                         fi
19627
19628                                                 CPPFLAGS="$save_CPPFLAGS"
19629                         LIBS="$save_LIBS"
19630                 else
19631                         as_fn_error "could not locate usable POSIX Threads" "$LINENO" 5
19632                 fi
19633         fi
19634
19635         if test $ol_with_threads = posix ; then
19636                 as_fn_error "could not locate POSIX Threads" "$LINENO" 5
19637         fi
19638         ;;
19639 esac
19640
19641 case $ol_with_threads in auto | yes | mach)
19642
19643                 for ac_header in mach/cthreads.h cthreads.h
19644 do :
19645   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19646 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19647 eval as_val=\$$as_ac_Header
19648    if test "x$as_val" = x""yes; then :
19649   cat >>confdefs.h <<_ACEOF
19650 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19651 _ACEOF
19652
19653 fi
19654
19655 done
19656
19657         if test $ac_cv_header_mach_cthreads_h = yes ; then
19658                 ol_with_threads=found
19659
19660                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19661 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19662   ol_link_threads=yes
19663 fi
19664
19665
19666                 if test $ol_link_threads = no ; then
19667                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
19668 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
19669 if test "${ol_cv_cthread_all_load+set}" = set; then :
19670   $as_echo_n "(cached) " >&6
19671 else
19672
19673                                                                 save_LIBS="$LIBS"
19674                                 LIBS="-all_load $LIBS"
19675                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19676 /* end confdefs.h.  */
19677 #include <mach/cthreads.h>
19678 int
19679 main ()
19680 {
19681
19682                                         cthread_fork((void *)0, (void *)0);
19683
19684   ;
19685   return 0;
19686 }
19687 _ACEOF
19688 if ac_fn_c_try_link "$LINENO"; then :
19689   ol_cv_cthread_all_load=yes
19690 else
19691   ol_cv_cthread_all_load=no
19692 fi
19693 rm -f core conftest.err conftest.$ac_objext \
19694     conftest$ac_exeext conftest.$ac_ext
19695                                                                 LIBS="$save_LIBS"
19696
19697 fi
19698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
19699 $as_echo "$ol_cv_cthread_all_load" >&6; }
19700
19701                         if test $ol_cv_cthread_all_load = yes ; then
19702                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
19703                                 ol_link_threads=mach
19704                                 ol_with_threads=found
19705                         fi
19706                 fi
19707
19708         elif test $ac_cv_header_cthreads_h = yes ; then
19709
19710                 ol_with_threads=found
19711
19712                                 save_LIBS="$LIBS"
19713                 LIBS="$LIBS -lthreads"
19714                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19715 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19716   ol_link_threads=yes
19717 fi
19718
19719                 LIBS="$save_LIBS"
19720
19721                 if test $ol_link_threads = yes ; then
19722                         LTHREAD_LIBS="-lthreads"
19723                         ol_link_threads=mach
19724                         ol_with_threads=found
19725                 else
19726                         as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19727                 fi
19728
19729         elif test $ol_with_threads = mach ; then
19730                 as_fn_error "could not locate Mach CThreads" "$LINENO" 5
19731         fi
19732
19733         if test $ol_link_threads = mach ; then
19734
19735 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
19736
19737         elif test $ol_with_threads = found ; then
19738                 as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19739         fi
19740         ;;
19741 esac
19742
19743 case $ol_with_threads in auto | yes | pth)
19744
19745         for ac_header in pth.h
19746 do :
19747   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
19748 if test "x$ac_cv_header_pth_h" = x""yes; then :
19749   cat >>confdefs.h <<_ACEOF
19750 #define HAVE_PTH_H 1
19751 _ACEOF
19752
19753 fi
19754
19755 done
19756
19757
19758         if test $ac_cv_header_pth_h = yes ; then
19759                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
19760 $as_echo_n "checking for pth_version in -lpth... " >&6; }
19761 if test "${ac_cv_lib_pth_pth_version+set}" = set; then :
19762   $as_echo_n "(cached) " >&6
19763 else
19764   ac_check_lib_save_LIBS=$LIBS
19765 LIBS="-lpth  $LIBS"
19766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19767 /* end confdefs.h.  */
19768
19769 /* Override any GCC internal prototype to avoid an error.
19770    Use char because int might match the return type of a GCC
19771    builtin and then its argument prototype would still apply.  */
19772 #ifdef __cplusplus
19773 extern "C"
19774 #endif
19775 char pth_version ();
19776 int
19777 main ()
19778 {
19779 return pth_version ();
19780   ;
19781   return 0;
19782 }
19783 _ACEOF
19784 if ac_fn_c_try_link "$LINENO"; then :
19785   ac_cv_lib_pth_pth_version=yes
19786 else
19787   ac_cv_lib_pth_pth_version=no
19788 fi
19789 rm -f core conftest.err conftest.$ac_objext \
19790     conftest$ac_exeext conftest.$ac_ext
19791 LIBS=$ac_check_lib_save_LIBS
19792 fi
19793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
19794 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
19795 if test "x$ac_cv_lib_pth_pth_version" = x""yes; then :
19796   have_pth=yes
19797 else
19798   have_pth=no
19799 fi
19800
19801
19802                 if test $have_pth = yes ; then
19803
19804 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
19805
19806                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
19807                         ol_link_threads=pth
19808                         ol_with_threads=found
19809
19810                         if test $ol_with_yielding_select = auto ; then
19811                                 ol_with_yielding_select=yes
19812                         fi
19813                 fi
19814         fi
19815         ;;
19816 esac
19817
19818 case $ol_with_threads in auto | yes | lwp)
19819
19820                 for ac_header in thread.h synch.h
19821 do :
19822   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19823 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19824 eval as_val=\$$as_ac_Header
19825    if test "x$as_val" = x""yes; then :
19826   cat >>confdefs.h <<_ACEOF
19827 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19828 _ACEOF
19829
19830 fi
19831
19832 done
19833
19834         if test $ac_cv_header_thread_h = yes &&
19835            test $ac_cv_header_synch_h = yes ; then
19836                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
19837 $as_echo_n "checking for thr_create in -lthread... " >&6; }
19838 if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
19839   $as_echo_n "(cached) " >&6
19840 else
19841   ac_check_lib_save_LIBS=$LIBS
19842 LIBS="-lthread  $LIBS"
19843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19844 /* end confdefs.h.  */
19845
19846 /* Override any GCC internal prototype to avoid an error.
19847    Use char because int might match the return type of a GCC
19848    builtin and then its argument prototype would still apply.  */
19849 #ifdef __cplusplus
19850 extern "C"
19851 #endif
19852 char thr_create ();
19853 int
19854 main ()
19855 {
19856 return thr_create ();
19857   ;
19858   return 0;
19859 }
19860 _ACEOF
19861 if ac_fn_c_try_link "$LINENO"; then :
19862   ac_cv_lib_thread_thr_create=yes
19863 else
19864   ac_cv_lib_thread_thr_create=no
19865 fi
19866 rm -f core conftest.err conftest.$ac_objext \
19867     conftest$ac_exeext conftest.$ac_ext
19868 LIBS=$ac_check_lib_save_LIBS
19869 fi
19870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
19871 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
19872 if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
19873   have_thr=yes
19874 else
19875   have_thr=no
19876 fi
19877
19878
19879                 if test $have_thr = yes ; then
19880
19881 $as_echo "#define HAVE_THR 1" >>confdefs.h
19882
19883                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
19884                         ol_link_threads=thr
19885
19886                         if test $ol_with_yielding_select = auto ; then
19887                                 ol_with_yielding_select=yes
19888                         fi
19889
19890                                                 for ac_func in \
19891                                 thr_setconcurrency \
19892                                 thr_getconcurrency \
19893
19894 do :
19895   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19896 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19897 eval as_val=\$$as_ac_var
19898    if test "x$as_val" = x""yes; then :
19899   cat >>confdefs.h <<_ACEOF
19900 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19901 _ACEOF
19902
19903 fi
19904 done
19905
19906                 fi
19907         fi
19908         ;;
19909 esac
19910
19911 if test $ol_with_yielding_select = yes ; then
19912
19913 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
19914
19915 fi
19916
19917 if test $ol_with_threads = manual ; then
19918                 ol_link_threads=yes
19919
19920         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
19921 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
19922
19923         for ac_header in pthread.h sched.h
19924 do :
19925   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19926 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19927 eval as_val=\$$as_ac_Header
19928    if test "x$as_val" = x""yes; then :
19929   cat >>confdefs.h <<_ACEOF
19930 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19931 _ACEOF
19932
19933 fi
19934
19935 done
19936
19937         for ac_func in sched_yield pthread_yield
19938 do :
19939   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19940 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19941 eval as_val=\$$as_ac_var
19942    if test "x$as_val" = x""yes; then :
19943   cat >>confdefs.h <<_ACEOF
19944 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19945 _ACEOF
19946
19947 fi
19948 done
19949
19950
19951         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
19952 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
19953 if test "${ol_cv_header_linux_threads+set}" = set; then :
19954   $as_echo_n "(cached) " >&6
19955 else
19956   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19957 /* end confdefs.h.  */
19958 #include <pthread.h>
19959 _ACEOF
19960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19961   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
19962   ol_cv_header_linux_threads=yes
19963 else
19964   ol_cv_header_linux_threads=no
19965 fi
19966 rm -f conftest*
19967
19968
19969 fi
19970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
19971 $as_echo "$ol_cv_header_linux_threads" >&6; }
19972         if test $ol_cv_header_linux_threads = yes; then
19973
19974 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
19975
19976         fi
19977
19978
19979         for ac_header in mach/cthreads.h
19980 do :
19981   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
19982 if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
19983   cat >>confdefs.h <<_ACEOF
19984 #define HAVE_MACH_CTHREADS_H 1
19985 _ACEOF
19986
19987 fi
19988
19989 done
19990
19991         for ac_header in thread.h synch.h
19992 do :
19993   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19994 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19995 eval as_val=\$$as_ac_Header
19996    if test "x$as_val" = x""yes; then :
19997   cat >>confdefs.h <<_ACEOF
19998 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19999 _ACEOF
20000
20001 fi
20002
20003 done
20004
20005 fi
20006
20007 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
20008                         $as_echo "#define REENTRANT 1" >>confdefs.h
20009
20010         $as_echo "#define _REENTRANT 1" >>confdefs.h
20011
20012         $as_echo "#define THREAD_SAFE 1" >>confdefs.h
20013
20014         $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
20015
20016         $as_echo "#define THREADSAFE 1" >>confdefs.h
20017
20018         $as_echo "#define _THREADSAFE 1" >>confdefs.h
20019
20020         $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
20021
20022
20023                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
20024 $as_echo_n "checking for thread specific errno... " >&6; }
20025 if test "${ol_cv_errno_thread_specific+set}" = set; then :
20026   $as_echo_n "(cached) " >&6
20027 else
20028
20029                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20030 /* end confdefs.h.  */
20031 #include <errno.h>
20032 int
20033 main ()
20034 {
20035 errno = 0;
20036   ;
20037   return 0;
20038 }
20039 _ACEOF
20040 if ac_fn_c_try_link "$LINENO"; then :
20041   ol_cv_errno_thread_specific=yes
20042 else
20043   ol_cv_errno_thread_specific=no
20044 fi
20045 rm -f core conftest.err conftest.$ac_objext \
20046     conftest$ac_exeext conftest.$ac_ext
20047
20048 fi
20049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
20050 $as_echo "$ol_cv_errno_thread_specific" >&6; }
20051
20052                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
20053 $as_echo_n "checking for thread specific h_errno... " >&6; }
20054 if test "${ol_cv_h_errno_thread_specific+set}" = set; then :
20055   $as_echo_n "(cached) " >&6
20056 else
20057
20058                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20059 /* end confdefs.h.  */
20060 #include <netdb.h>
20061 int
20062 main ()
20063 {
20064 h_errno = 0;
20065   ;
20066   return 0;
20067 }
20068 _ACEOF
20069 if ac_fn_c_try_link "$LINENO"; then :
20070   ol_cv_h_errno_thread_specific=yes
20071 else
20072   ol_cv_h_errno_thread_specific=no
20073 fi
20074 rm -f core conftest.err conftest.$ac_objext \
20075     conftest$ac_exeext conftest.$ac_ext
20076
20077 fi
20078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
20079 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
20080
20081         if test $ol_cv_errno_thread_specific != yes ||
20082            test $ol_cv_h_errno_thread_specific != yes ; then
20083                 LIBS="$LTHREAD_LIBS $LIBS"
20084                 LTHREAD_LIBS=""
20085         fi
20086
20087 fi
20088
20089 if test $ol_link_threads = no ; then
20090         if test $ol_with_threads = yes ; then
20091                 as_fn_error "no suitable thread support" "$LINENO" 5
20092         fi
20093
20094         if test $ol_with_threads = auto ; then
20095                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
20096 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
20097                 ol_with_threads=no
20098         fi
20099
20100
20101 $as_echo "#define NO_THREADS 1" >>confdefs.h
20102
20103         LTHREAD_LIBS=""
20104         BUILD_THREAD=no
20105 else
20106         BUILD_THREAD=yes
20107 fi
20108
20109 if test $ol_link_threads != no ; then
20110
20111 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
20112
20113 fi
20114
20115 for ac_func in \
20116         ctime_r                 \
20117         gmtime_r localtime_r \
20118         gethostbyname_r gethostbyaddr_r \
20119
20120 do :
20121   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20122 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20123 eval as_val=\$$as_ac_var
20124    if test "x$as_val" = x""yes; then :
20125   cat >>confdefs.h <<_ACEOF
20126 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20127 _ACEOF
20128
20129 fi
20130 done
20131
20132
20133 if test "$ac_cv_func_ctime_r" = no ; then
20134         ol_cv_func_ctime_r_nargs=0
20135 else
20136         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of ctime_r" >&5
20137 $as_echo_n "checking number of arguments of ctime_r... " >&6; }
20138 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then :
20139   $as_echo_n "(cached) " >&6
20140 else
20141   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20142 /* end confdefs.h.  */
20143 #include <time.h>
20144 int
20145 main ()
20146 {
20147 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
20148   ;
20149   return 0;
20150 }
20151 _ACEOF
20152 if ac_fn_c_try_compile "$LINENO"; then :
20153   ol_cv_func_ctime_r_nargs3=yes
20154 else
20155   ol_cv_func_ctime_r_nargs3=no
20156 fi
20157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20158
20159         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20160 /* end confdefs.h.  */
20161 #include <time.h>
20162 int
20163 main ()
20164 {
20165 time_t ti; char *buffer; ctime_r(&ti,buffer);
20166   ;
20167   return 0;
20168 }
20169 _ACEOF
20170 if ac_fn_c_try_compile "$LINENO"; then :
20171   ol_cv_func_ctime_r_nargs2=yes
20172 else
20173   ol_cv_func_ctime_r_nargs2=no
20174 fi
20175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20176
20177         if test $ol_cv_func_ctime_r_nargs3 = yes &&
20178            test $ol_cv_func_ctime_r_nargs2 = no ; then
20179
20180                 ol_cv_func_ctime_r_nargs=3
20181
20182         elif test $ol_cv_func_ctime_r_nargs3 = no &&
20183              test $ol_cv_func_ctime_r_nargs2 = yes ; then
20184
20185                 ol_cv_func_ctime_r_nargs=2
20186
20187         else
20188                 ol_cv_func_ctime_r_nargs=0
20189         fi
20190
20191 fi
20192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_ctime_r_nargs" >&5
20193 $as_echo "$ol_cv_func_ctime_r_nargs" >&6; }
20194
20195   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
20196
20197 cat >>confdefs.h <<_ACEOF
20198 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
20199 _ACEOF
20200
20201   fi
20202
20203 fi
20204
20205 if test "$ac_cv_func_gethostbyname_r" = yes ; then
20206         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyname_r" >&5
20207 $as_echo_n "checking number of arguments of gethostbyname_r... " >&6; }
20208 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then :
20209   $as_echo_n "(cached) " >&6
20210 else
20211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20212 /* end confdefs.h.  */
20213 #include <sys/types.h>
20214 #include <sys/socket.h>
20215 #include <netinet/in.h>
20216 #include <netdb.h>
20217 #define BUFSIZE (sizeof(struct hostent)+10)
20218 int
20219 main ()
20220 {
20221 struct hostent hent; char buffer[BUFSIZE];
20222                 int bufsize=BUFSIZE;int h_errno;
20223                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
20224                         buffer, bufsize, &h_errno);
20225   ;
20226   return 0;
20227 }
20228 _ACEOF
20229 if ac_fn_c_try_compile "$LINENO"; then :
20230   ol_cv_func_gethostbyname_r_nargs5=yes
20231 else
20232   ol_cv_func_gethostbyname_r_nargs5=no
20233 fi
20234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20235
20236         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20237 /* end confdefs.h.  */
20238 #include <sys/types.h>
20239 #include <sys/socket.h>
20240 #include <netinet/in.h>
20241 #include <netdb.h>
20242 #define BUFSIZE (sizeof(struct hostent)+10)
20243 int
20244 main ()
20245 {
20246 struct hostent hent;struct hostent *rhent;
20247                 char buffer[BUFSIZE];
20248                 int bufsize=BUFSIZE;int h_errno;
20249                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
20250                         &rhent, &h_errno);
20251   ;
20252   return 0;
20253 }
20254 _ACEOF
20255 if ac_fn_c_try_compile "$LINENO"; then :
20256   ol_cv_func_gethostbyname_r_nargs6=yes
20257 else
20258   ol_cv_func_gethostbyname_r_nargs6=no
20259 fi
20260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20261
20262         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
20263            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
20264
20265                 ol_cv_func_gethostbyname_r_nargs=5
20266
20267         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
20268              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
20269
20270                 ol_cv_func_gethostbyname_r_nargs=6
20271
20272         else
20273                 ol_cv_func_gethostbyname_r_nargs=0
20274         fi
20275
20276 fi
20277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyname_r_nargs" >&5
20278 $as_echo "$ol_cv_func_gethostbyname_r_nargs" >&6; }
20279   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
20280
20281 cat >>confdefs.h <<_ACEOF
20282 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
20283 _ACEOF
20284
20285   fi
20286
20287 else
20288         ol_cv_func_gethostbyname_r_nargs=0
20289 fi
20290
20291 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
20292         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyaddr_r" >&5
20293 $as_echo_n "checking number of arguments of gethostbyaddr_r... " >&6; }
20294 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then :
20295   $as_echo_n "(cached) " >&6
20296 else
20297   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20298 /* end confdefs.h.  */
20299 #include <sys/types.h>
20300 #include <sys/socket.h>
20301 #include <netinet/in.h>
20302 #include <netdb.h>
20303 #define BUFSIZE (sizeof(struct hostent)+10)
20304 int
20305 main ()
20306 {
20307 struct hostent hent; char buffer[BUFSIZE];
20308             struct in_addr add;
20309             size_t alen=sizeof(struct in_addr);
20310             int bufsize=BUFSIZE;int h_errno;
20311                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20312                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
20313   ;
20314   return 0;
20315 }
20316 _ACEOF
20317 if ac_fn_c_try_compile "$LINENO"; then :
20318   ol_cv_func_gethostbyaddr_r_nargs7=yes
20319 else
20320   ol_cv_func_gethostbyaddr_r_nargs7=no
20321 fi
20322 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20323
20324         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20325 /* end confdefs.h.  */
20326 #include <sys/types.h>
20327 #include <sys/socket.h>
20328 #include <netinet/in.h>
20329 #include <netdb.h>
20330 #define BUFSIZE (sizeof(struct hostent)+10)
20331 int
20332 main ()
20333 {
20334 struct hostent hent;
20335                 struct hostent *rhent; char buffer[BUFSIZE];
20336                 struct in_addr add;
20337                 size_t alen=sizeof(struct in_addr);
20338                 int bufsize=BUFSIZE;int h_errno;
20339                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20340                         alen, AF_INET, &hent, buffer, bufsize,
20341                         &rhent, &h_errno);
20342   ;
20343   return 0;
20344 }
20345 _ACEOF
20346 if ac_fn_c_try_compile "$LINENO"; then :
20347   ol_cv_func_gethostbyaddr_r_nargs8=yes
20348 else
20349   ol_cv_func_gethostbyaddr_r_nargs8=no
20350 fi
20351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20352
20353         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
20354            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
20355
20356                 ol_cv_func_gethostbyaddr_r_nargs=7
20357
20358         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
20359              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
20360
20361                 ol_cv_func_gethostbyaddr_r_nargs=8
20362
20363         else
20364                 ol_cv_func_gethostbyaddr_r_nargs=0
20365         fi
20366
20367 fi
20368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
20369 $as_echo "$ol_cv_func_gethostbyaddr_r_nargs" >&6; }
20370   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
20371
20372 cat >>confdefs.h <<_ACEOF
20373 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
20374 _ACEOF
20375
20376   fi
20377
20378 else
20379         ol_cv_func_gethostbyaddr_r_nargs=0
20380 fi
20381
20382 ol_link_bdb=no
20383
20384 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
20385         ol_cv_berkeley_db=no
20386 for ac_header in db.h
20387 do :
20388   ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default"
20389 if test "x$ac_cv_header_db_h" = x""yes; then :
20390   cat >>confdefs.h <<_ACEOF
20391 #define HAVE_DB_H 1
20392 _ACEOF
20393
20394 fi
20395
20396 done
20397
20398 if test $ac_cv_header_db_h = yes; then
20399         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB major version in db.h" >&5
20400 $as_echo_n "checking for Berkeley DB major version in db.h... " >&6; }
20401 if test "${ol_cv_bdb_major+set}" = set; then :
20402   $as_echo_n "(cached) " >&6
20403 else
20404
20405         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20406 /* end confdefs.h.  */
20407
20408 #include <db.h>
20409 #ifndef DB_VERSION_MAJOR
20410 #       define DB_VERSION_MAJOR 1
20411 #endif
20412 __db_version DB_VERSION_MAJOR
20413
20414 _ACEOF
20415         set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
20416         ol_cv_bdb_major=${3}
20417
20418 fi
20419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_major" >&5
20420 $as_echo "$ol_cv_bdb_major" >&6; }
20421 case $ol_cv_bdb_major in [1-9]*) : ;; *)
20422         as_fn_error "Unknown Berkeley DB major version in db.h" "$LINENO" 5 ;;
20423 esac
20424
20425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB minor version in db.h" >&5
20426 $as_echo_n "checking for Berkeley DB minor version in db.h... " >&6; }
20427 if test "${ol_cv_bdb_minor+set}" = set; then :
20428   $as_echo_n "(cached) " >&6
20429 else
20430
20431         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20432 /* end confdefs.h.  */
20433
20434 #include <db.h>
20435 #ifndef DB_VERSION_MINOR
20436 #       define DB_VERSION_MINOR 0
20437 #endif
20438 __db_version DB_VERSION_MINOR
20439
20440 _ACEOF
20441         set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
20442         ol_cv_bdb_minor=${3}
20443
20444 fi
20445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_minor" >&5
20446 $as_echo "$ol_cv_bdb_minor" >&6; }
20447 case $ol_cv_bdb_minor in [0-9]*) : ;; *)
20448         as_fn_error "Unknown Berkeley DB minor version in db.h" "$LINENO" 5 ;;
20449 esac
20450
20451         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Berkeley DB version supported by BDB/HDB backends" >&5
20452 $as_echo_n "checking if Berkeley DB version supported by BDB/HDB backends... " >&6; }
20453 if test "${ol_cv_bdb_compat+set}" = set; then :
20454   $as_echo_n "(cached) " >&6
20455 else
20456
20457         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20458 /* end confdefs.h.  */
20459
20460 #include <db.h>
20461
20462  /* this check could be improved */
20463 #ifndef DB_VERSION_MAJOR
20464 #       define DB_VERSION_MAJOR 1
20465 #endif
20466 #ifndef DB_VERSION_MINOR
20467 #       define DB_VERSION_MINOR 0
20468 #endif
20469 #ifndef DB_VERSION_PATCH
20470 #       define DB_VERSION_PATCH 0
20471 #endif
20472
20473 #define DB_VERSION_FULL ((DB_VERSION_MAJOR<<16)|(DB_VERSION_MINOR<<8)|DB_VERSION_PATCH)
20474
20475 /* require 4.4 or later, but less than 6.0.20 */
20476 #if DB_VERSION_FULL >= 0x040400 && DB_VERSION_FULL < 0x060014
20477         __db_version_compat
20478 #endif
20479 #if DB_VERSION_FULL >= 0x060014
20480 #error "BerkeleyDB 6.0.20+ license is incompatible with LDAP"
20481 #endif
20482
20483 _ACEOF
20484 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20485   $EGREP "__db_version_compat" >/dev/null 2>&1; then :
20486   ol_cv_bdb_compat=yes
20487 else
20488   ol_cv_bdb_compat=no
20489 fi
20490 rm -f conftest*
20491
20492 fi
20493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_compat" >&5
20494 $as_echo "$ol_cv_bdb_compat" >&6; }
20495
20496
20497         if test $ol_cv_bdb_compat != yes ; then
20498                 as_fn_error "BerkeleyDB version incompatible with BDB/HDB backends" "$LINENO" 5
20499         fi
20500
20501         ol_cv_lib_db=no
20502
20503 if test $ol_cv_bdb_major = 5 ; then
20504         if test $ol_cv_lib_db = no ; then
20505         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)" >&5
20506 $as_echo_n "checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)... " >&6; }
20507 if test "${ol_cv_db_db_5_dot_m+set}" = set; then :
20508   $as_echo_n "(cached) " >&6
20509 else
20510
20511         ol_DB_LIB=-ldb-5.$ol_cv_bdb_minor
20512         ol_LIBS=$LIBS
20513         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20514
20515         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20516 /* end confdefs.h.  */
20517
20518 #ifdef HAVE_DB_185_H
20519 # include <db_185.h>
20520 #else
20521 # include <db.h>
20522 #endif
20523
20524 #ifndef DB_VERSION_MAJOR
20525 # define DB_VERSION_MAJOR 1
20526 #endif
20527
20528 #ifndef NULL
20529 #define NULL ((void*)0)
20530 #endif
20531
20532 int
20533 main ()
20534 {
20535
20536 #if DB_VERSION_MAJOR > 2
20537         db_env_create( NULL, 0 );
20538 #elif DB_VERSION_MAJOR > 1
20539         db_appexit( NULL );
20540 #else
20541         (void) dbopen( NULL, 0, 0, 0, NULL);
20542 #endif
20543
20544   ;
20545   return 0;
20546 }
20547 _ACEOF
20548 if ac_fn_c_try_link "$LINENO"; then :
20549   ol_cv_db_db_5_dot_m=yes
20550 else
20551   ol_cv_db_db_5_dot_m=no
20552 fi
20553 rm -f core conftest.err conftest.$ac_objext \
20554     conftest$ac_exeext conftest.$ac_ext
20555
20556         LIBS="$ol_LIBS"
20557
20558 fi
20559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_dot_m" >&5
20560 $as_echo "$ol_cv_db_db_5_dot_m" >&6; }
20561
20562         if test $ol_cv_db_db_5_dot_m = yes ; then
20563                 ol_cv_lib_db=-ldb-5.$ol_cv_bdb_minor
20564         fi
20565 fi
20566
20567         if test $ol_cv_lib_db = no ; then
20568         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)" >&5
20569 $as_echo_n "checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)... " >&6; }
20570 if test "${ol_cv_db_db5m+set}" = set; then :
20571   $as_echo_n "(cached) " >&6
20572 else
20573
20574         ol_DB_LIB=-ldb5$ol_cv_bdb_minor
20575         ol_LIBS=$LIBS
20576         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20577
20578         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20579 /* end confdefs.h.  */
20580
20581 #ifdef HAVE_DB_185_H
20582 # include <db_185.h>
20583 #else
20584 # include <db.h>
20585 #endif
20586
20587 #ifndef DB_VERSION_MAJOR
20588 # define DB_VERSION_MAJOR 1
20589 #endif
20590
20591 #ifndef NULL
20592 #define NULL ((void*)0)
20593 #endif
20594
20595 int
20596 main ()
20597 {
20598
20599 #if DB_VERSION_MAJOR > 2
20600         db_env_create( NULL, 0 );
20601 #elif DB_VERSION_MAJOR > 1
20602         db_appexit( NULL );
20603 #else
20604         (void) dbopen( NULL, 0, 0, 0, NULL);
20605 #endif
20606
20607   ;
20608   return 0;
20609 }
20610 _ACEOF
20611 if ac_fn_c_try_link "$LINENO"; then :
20612   ol_cv_db_db5m=yes
20613 else
20614   ol_cv_db_db5m=no
20615 fi
20616 rm -f core conftest.err conftest.$ac_objext \
20617     conftest$ac_exeext conftest.$ac_ext
20618
20619         LIBS="$ol_LIBS"
20620
20621 fi
20622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5m" >&5
20623 $as_echo "$ol_cv_db_db5m" >&6; }
20624
20625         if test $ol_cv_db_db5m = yes ; then
20626                 ol_cv_lib_db=-ldb5$ol_cv_bdb_minor
20627         fi
20628 fi
20629
20630         if test $ol_cv_lib_db = no ; then
20631         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)" >&5
20632 $as_echo_n "checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)... " >&6; }
20633 if test "${ol_cv_db_db_5m+set}" = set; then :
20634   $as_echo_n "(cached) " >&6
20635 else
20636
20637         ol_DB_LIB=-ldb-5$ol_cv_bdb_minor
20638         ol_LIBS=$LIBS
20639         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20640
20641         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20642 /* end confdefs.h.  */
20643
20644 #ifdef HAVE_DB_185_H
20645 # include <db_185.h>
20646 #else
20647 # include <db.h>
20648 #endif
20649
20650 #ifndef DB_VERSION_MAJOR
20651 # define DB_VERSION_MAJOR 1
20652 #endif
20653
20654 #ifndef NULL
20655 #define NULL ((void*)0)
20656 #endif
20657
20658 int
20659 main ()
20660 {
20661
20662 #if DB_VERSION_MAJOR > 2
20663         db_env_create( NULL, 0 );
20664 #elif DB_VERSION_MAJOR > 1
20665         db_appexit( NULL );
20666 #else
20667         (void) dbopen( NULL, 0, 0, 0, NULL);
20668 #endif
20669
20670   ;
20671   return 0;
20672 }
20673 _ACEOF
20674 if ac_fn_c_try_link "$LINENO"; then :
20675   ol_cv_db_db_5m=yes
20676 else
20677   ol_cv_db_db_5m=no
20678 fi
20679 rm -f core conftest.err conftest.$ac_objext \
20680     conftest$ac_exeext conftest.$ac_ext
20681
20682         LIBS="$ol_LIBS"
20683
20684 fi
20685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5m" >&5
20686 $as_echo "$ol_cv_db_db_5m" >&6; }
20687
20688         if test $ol_cv_db_db_5m = yes ; then
20689                 ol_cv_lib_db=-ldb-5$ol_cv_bdb_minor
20690         fi
20691 fi
20692
20693         if test $ol_cv_lib_db = no ; then
20694         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)" >&5
20695 $as_echo_n "checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)... " >&6; }
20696 if test "${ol_cv_db_db_5_m+set}" = set; then :
20697   $as_echo_n "(cached) " >&6
20698 else
20699
20700         ol_DB_LIB=-ldb-5-$ol_cv_bdb_minor
20701         ol_LIBS=$LIBS
20702         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20703
20704         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20705 /* end confdefs.h.  */
20706
20707 #ifdef HAVE_DB_185_H
20708 # include <db_185.h>
20709 #else
20710 # include <db.h>
20711 #endif
20712
20713 #ifndef DB_VERSION_MAJOR
20714 # define DB_VERSION_MAJOR 1
20715 #endif
20716
20717 #ifndef NULL
20718 #define NULL ((void*)0)
20719 #endif
20720
20721 int
20722 main ()
20723 {
20724
20725 #if DB_VERSION_MAJOR > 2
20726         db_env_create( NULL, 0 );
20727 #elif DB_VERSION_MAJOR > 1
20728         db_appexit( NULL );
20729 #else
20730         (void) dbopen( NULL, 0, 0, 0, NULL);
20731 #endif
20732
20733   ;
20734   return 0;
20735 }
20736 _ACEOF
20737 if ac_fn_c_try_link "$LINENO"; then :
20738   ol_cv_db_db_5_m=yes
20739 else
20740   ol_cv_db_db_5_m=no
20741 fi
20742 rm -f core conftest.err conftest.$ac_objext \
20743     conftest$ac_exeext conftest.$ac_ext
20744
20745         LIBS="$ol_LIBS"
20746
20747 fi
20748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_m" >&5
20749 $as_echo "$ol_cv_db_db_5_m" >&6; }
20750
20751         if test $ol_cv_db_db_5_m = yes ; then
20752                 ol_cv_lib_db=-ldb-5-$ol_cv_bdb_minor
20753         fi
20754 fi
20755
20756         if test $ol_cv_lib_db = no ; then
20757         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5)" >&5
20758 $as_echo_n "checking for Berkeley DB link (-ldb-5)... " >&6; }
20759 if test "${ol_cv_db_db_5+set}" = set; then :
20760   $as_echo_n "(cached) " >&6
20761 else
20762
20763         ol_DB_LIB=-ldb-5
20764         ol_LIBS=$LIBS
20765         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20766
20767         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20768 /* end confdefs.h.  */
20769
20770 #ifdef HAVE_DB_185_H
20771 # include <db_185.h>
20772 #else
20773 # include <db.h>
20774 #endif
20775
20776 #ifndef DB_VERSION_MAJOR
20777 # define DB_VERSION_MAJOR 1
20778 #endif
20779
20780 #ifndef NULL
20781 #define NULL ((void*)0)
20782 #endif
20783
20784 int
20785 main ()
20786 {
20787
20788 #if DB_VERSION_MAJOR > 2
20789         db_env_create( NULL, 0 );
20790 #elif DB_VERSION_MAJOR > 1
20791         db_appexit( NULL );
20792 #else
20793         (void) dbopen( NULL, 0, 0, 0, NULL);
20794 #endif
20795
20796   ;
20797   return 0;
20798 }
20799 _ACEOF
20800 if ac_fn_c_try_link "$LINENO"; then :
20801   ol_cv_db_db_5=yes
20802 else
20803   ol_cv_db_db_5=no
20804 fi
20805 rm -f core conftest.err conftest.$ac_objext \
20806     conftest$ac_exeext conftest.$ac_ext
20807
20808         LIBS="$ol_LIBS"
20809
20810 fi
20811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5" >&5
20812 $as_echo "$ol_cv_db_db_5" >&6; }
20813
20814         if test $ol_cv_db_db_5 = yes ; then
20815                 ol_cv_lib_db=-ldb-5
20816         fi
20817 fi
20818
20819         if test $ol_cv_lib_db = no ; then
20820         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5)" >&5
20821 $as_echo_n "checking for Berkeley DB link (-ldb5)... " >&6; }
20822 if test "${ol_cv_db_db5+set}" = set; then :
20823   $as_echo_n "(cached) " >&6
20824 else
20825
20826         ol_DB_LIB=-ldb5
20827         ol_LIBS=$LIBS
20828         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20829
20830         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20831 /* end confdefs.h.  */
20832
20833 #ifdef HAVE_DB_185_H
20834 # include <db_185.h>
20835 #else
20836 # include <db.h>
20837 #endif
20838
20839 #ifndef DB_VERSION_MAJOR
20840 # define DB_VERSION_MAJOR 1
20841 #endif
20842
20843 #ifndef NULL
20844 #define NULL ((void*)0)
20845 #endif
20846
20847 int
20848 main ()
20849 {
20850
20851 #if DB_VERSION_MAJOR > 2
20852         db_env_create( NULL, 0 );
20853 #elif DB_VERSION_MAJOR > 1
20854         db_appexit( NULL );
20855 #else
20856         (void) dbopen( NULL, 0, 0, 0, NULL);
20857 #endif
20858
20859   ;
20860   return 0;
20861 }
20862 _ACEOF
20863 if ac_fn_c_try_link "$LINENO"; then :
20864   ol_cv_db_db5=yes
20865 else
20866   ol_cv_db_db5=no
20867 fi
20868 rm -f core conftest.err conftest.$ac_objext \
20869     conftest$ac_exeext conftest.$ac_ext
20870
20871         LIBS="$ol_LIBS"
20872
20873 fi
20874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5" >&5
20875 $as_echo "$ol_cv_db_db5" >&6; }
20876
20877         if test $ol_cv_db_db5 = yes ; then
20878                 ol_cv_lib_db=-ldb5
20879         fi
20880 fi
20881
20882 elif test $ol_cv_bdb_major = 4 ; then
20883         if test $ol_cv_lib_db = no ; then
20884         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)" >&5
20885 $as_echo_n "checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)... " >&6; }
20886 if test "${ol_cv_db_db_4_dot_m+set}" = set; then :
20887   $as_echo_n "(cached) " >&6
20888 else
20889
20890         ol_DB_LIB=-ldb-4.$ol_cv_bdb_minor
20891         ol_LIBS=$LIBS
20892         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20893
20894         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20895 /* end confdefs.h.  */
20896
20897 #ifdef HAVE_DB_185_H
20898 # include <db_185.h>
20899 #else
20900 # include <db.h>
20901 #endif
20902
20903 #ifndef DB_VERSION_MAJOR
20904 # define DB_VERSION_MAJOR 1
20905 #endif
20906
20907 #ifndef NULL
20908 #define NULL ((void*)0)
20909 #endif
20910
20911 int
20912 main ()
20913 {
20914
20915 #if DB_VERSION_MAJOR > 2
20916         db_env_create( NULL, 0 );
20917 #elif DB_VERSION_MAJOR > 1
20918         db_appexit( NULL );
20919 #else
20920         (void) dbopen( NULL, 0, 0, 0, NULL);
20921 #endif
20922
20923   ;
20924   return 0;
20925 }
20926 _ACEOF
20927 if ac_fn_c_try_link "$LINENO"; then :
20928   ol_cv_db_db_4_dot_m=yes
20929 else
20930   ol_cv_db_db_4_dot_m=no
20931 fi
20932 rm -f core conftest.err conftest.$ac_objext \
20933     conftest$ac_exeext conftest.$ac_ext
20934
20935         LIBS="$ol_LIBS"
20936
20937 fi
20938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_dot_m" >&5
20939 $as_echo "$ol_cv_db_db_4_dot_m" >&6; }
20940
20941         if test $ol_cv_db_db_4_dot_m = yes ; then
20942                 ol_cv_lib_db=-ldb-4.$ol_cv_bdb_minor
20943         fi
20944 fi
20945
20946         if test $ol_cv_lib_db = no ; then
20947         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)" >&5
20948 $as_echo_n "checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)... " >&6; }
20949 if test "${ol_cv_db_db4m+set}" = set; then :
20950   $as_echo_n "(cached) " >&6
20951 else
20952
20953         ol_DB_LIB=-ldb4$ol_cv_bdb_minor
20954         ol_LIBS=$LIBS
20955         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20956
20957         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20958 /* end confdefs.h.  */
20959
20960 #ifdef HAVE_DB_185_H
20961 # include <db_185.h>
20962 #else
20963 # include <db.h>
20964 #endif
20965
20966 #ifndef DB_VERSION_MAJOR
20967 # define DB_VERSION_MAJOR 1
20968 #endif
20969
20970 #ifndef NULL
20971 #define NULL ((void*)0)
20972 #endif
20973
20974 int
20975 main ()
20976 {
20977
20978 #if DB_VERSION_MAJOR > 2
20979         db_env_create( NULL, 0 );
20980 #elif DB_VERSION_MAJOR > 1
20981         db_appexit( NULL );
20982 #else
20983         (void) dbopen( NULL, 0, 0, 0, NULL);
20984 #endif
20985
20986   ;
20987   return 0;
20988 }
20989 _ACEOF
20990 if ac_fn_c_try_link "$LINENO"; then :
20991   ol_cv_db_db4m=yes
20992 else
20993   ol_cv_db_db4m=no
20994 fi
20995 rm -f core conftest.err conftest.$ac_objext \
20996     conftest$ac_exeext conftest.$ac_ext
20997
20998         LIBS="$ol_LIBS"
20999
21000 fi
21001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4m" >&5
21002 $as_echo "$ol_cv_db_db4m" >&6; }
21003
21004         if test $ol_cv_db_db4m = yes ; then
21005                 ol_cv_lib_db=-ldb4$ol_cv_bdb_minor
21006         fi
21007 fi
21008
21009         if test $ol_cv_lib_db = no ; then
21010         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)" >&5
21011 $as_echo_n "checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)... " >&6; }
21012 if test "${ol_cv_db_db_4m+set}" = set; then :
21013   $as_echo_n "(cached) " >&6
21014 else
21015
21016         ol_DB_LIB=-ldb-4$ol_cv_bdb_minor
21017         ol_LIBS=$LIBS
21018         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21019
21020         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21021 /* end confdefs.h.  */
21022
21023 #ifdef HAVE_DB_185_H
21024 # include <db_185.h>
21025 #else
21026 # include <db.h>
21027 #endif
21028
21029 #ifndef DB_VERSION_MAJOR
21030 # define DB_VERSION_MAJOR 1
21031 #endif
21032
21033 #ifndef NULL
21034 #define NULL ((void*)0)
21035 #endif
21036
21037 int
21038 main ()
21039 {
21040
21041 #if DB_VERSION_MAJOR > 2
21042         db_env_create( NULL, 0 );
21043 #elif DB_VERSION_MAJOR > 1
21044         db_appexit( NULL );
21045 #else
21046         (void) dbopen( NULL, 0, 0, 0, NULL);
21047 #endif
21048
21049   ;
21050   return 0;
21051 }
21052 _ACEOF
21053 if ac_fn_c_try_link "$LINENO"; then :
21054   ol_cv_db_db_4m=yes
21055 else
21056   ol_cv_db_db_4m=no
21057 fi
21058 rm -f core conftest.err conftest.$ac_objext \
21059     conftest$ac_exeext conftest.$ac_ext
21060
21061         LIBS="$ol_LIBS"
21062
21063 fi
21064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4m" >&5
21065 $as_echo "$ol_cv_db_db_4m" >&6; }
21066
21067         if test $ol_cv_db_db_4m = yes ; then
21068                 ol_cv_lib_db=-ldb-4$ol_cv_bdb_minor
21069         fi
21070 fi
21071
21072         if test $ol_cv_lib_db = no ; then
21073         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)" >&5
21074 $as_echo_n "checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)... " >&6; }
21075 if test "${ol_cv_db_db_4_m+set}" = set; then :
21076   $as_echo_n "(cached) " >&6
21077 else
21078
21079         ol_DB_LIB=-ldb-4-$ol_cv_bdb_minor
21080         ol_LIBS=$LIBS
21081         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21082
21083         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21084 /* end confdefs.h.  */
21085
21086 #ifdef HAVE_DB_185_H
21087 # include <db_185.h>
21088 #else
21089 # include <db.h>
21090 #endif
21091
21092 #ifndef DB_VERSION_MAJOR
21093 # define DB_VERSION_MAJOR 1
21094 #endif
21095
21096 #ifndef NULL
21097 #define NULL ((void*)0)
21098 #endif
21099
21100 int
21101 main ()
21102 {
21103
21104 #if DB_VERSION_MAJOR > 2
21105         db_env_create( NULL, 0 );
21106 #elif DB_VERSION_MAJOR > 1
21107         db_appexit( NULL );
21108 #else
21109         (void) dbopen( NULL, 0, 0, 0, NULL);
21110 #endif
21111
21112   ;
21113   return 0;
21114 }
21115 _ACEOF
21116 if ac_fn_c_try_link "$LINENO"; then :
21117   ol_cv_db_db_4_m=yes
21118 else
21119   ol_cv_db_db_4_m=no
21120 fi
21121 rm -f core conftest.err conftest.$ac_objext \
21122     conftest$ac_exeext conftest.$ac_ext
21123
21124         LIBS="$ol_LIBS"
21125
21126 fi
21127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_m" >&5
21128 $as_echo "$ol_cv_db_db_4_m" >&6; }
21129
21130         if test $ol_cv_db_db_4_m = yes ; then
21131                 ol_cv_lib_db=-ldb-4-$ol_cv_bdb_minor
21132         fi
21133 fi
21134
21135         if test $ol_cv_lib_db = no ; then
21136         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4)" >&5
21137 $as_echo_n "checking for Berkeley DB link (-ldb-4)... " >&6; }
21138 if test "${ol_cv_db_db_4+set}" = set; then :
21139   $as_echo_n "(cached) " >&6
21140 else
21141
21142         ol_DB_LIB=-ldb-4
21143         ol_LIBS=$LIBS
21144         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21145
21146         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21147 /* end confdefs.h.  */
21148
21149 #ifdef HAVE_DB_185_H
21150 # include <db_185.h>
21151 #else
21152 # include <db.h>
21153 #endif
21154
21155 #ifndef DB_VERSION_MAJOR
21156 # define DB_VERSION_MAJOR 1
21157 #endif
21158
21159 #ifndef NULL
21160 #define NULL ((void*)0)
21161 #endif
21162
21163 int
21164 main ()
21165 {
21166
21167 #if DB_VERSION_MAJOR > 2
21168         db_env_create( NULL, 0 );
21169 #elif DB_VERSION_MAJOR > 1
21170         db_appexit( NULL );
21171 #else
21172         (void) dbopen( NULL, 0, 0, 0, NULL);
21173 #endif
21174
21175   ;
21176   return 0;
21177 }
21178 _ACEOF
21179 if ac_fn_c_try_link "$LINENO"; then :
21180   ol_cv_db_db_4=yes
21181 else
21182   ol_cv_db_db_4=no
21183 fi
21184 rm -f core conftest.err conftest.$ac_objext \
21185     conftest$ac_exeext conftest.$ac_ext
21186
21187         LIBS="$ol_LIBS"
21188
21189 fi
21190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4" >&5
21191 $as_echo "$ol_cv_db_db_4" >&6; }
21192
21193         if test $ol_cv_db_db_4 = yes ; then
21194                 ol_cv_lib_db=-ldb-4
21195         fi
21196 fi
21197
21198         if test $ol_cv_lib_db = no ; then
21199         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4)" >&5
21200 $as_echo_n "checking for Berkeley DB link (-ldb4)... " >&6; }
21201 if test "${ol_cv_db_db4+set}" = set; then :
21202   $as_echo_n "(cached) " >&6
21203 else
21204
21205         ol_DB_LIB=-ldb4
21206         ol_LIBS=$LIBS
21207         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21208
21209         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21210 /* end confdefs.h.  */
21211
21212 #ifdef HAVE_DB_185_H
21213 # include <db_185.h>
21214 #else
21215 # include <db.h>
21216 #endif
21217
21218 #ifndef DB_VERSION_MAJOR
21219 # define DB_VERSION_MAJOR 1
21220 #endif
21221
21222 #ifndef NULL
21223 #define NULL ((void*)0)
21224 #endif
21225
21226 int
21227 main ()
21228 {
21229
21230 #if DB_VERSION_MAJOR > 2
21231         db_env_create( NULL, 0 );
21232 #elif DB_VERSION_MAJOR > 1
21233         db_appexit( NULL );
21234 #else
21235         (void) dbopen( NULL, 0, 0, 0, NULL);
21236 #endif
21237
21238   ;
21239   return 0;
21240 }
21241 _ACEOF
21242 if ac_fn_c_try_link "$LINENO"; then :
21243   ol_cv_db_db4=yes
21244 else
21245   ol_cv_db_db4=no
21246 fi
21247 rm -f core conftest.err conftest.$ac_objext \
21248     conftest$ac_exeext conftest.$ac_ext
21249
21250         LIBS="$ol_LIBS"
21251
21252 fi
21253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4" >&5
21254 $as_echo "$ol_cv_db_db4" >&6; }
21255
21256         if test $ol_cv_db_db4 = yes ; then
21257                 ol_cv_lib_db=-ldb4
21258         fi
21259 fi
21260
21261 fi
21262 if test $ol_cv_lib_db = no ; then
21263         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb)" >&5
21264 $as_echo_n "checking for Berkeley DB link (-ldb)... " >&6; }
21265 if test "${ol_cv_db_db+set}" = set; then :
21266   $as_echo_n "(cached) " >&6
21267 else
21268
21269         ol_DB_LIB=-ldb
21270         ol_LIBS=$LIBS
21271         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21272
21273         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21274 /* end confdefs.h.  */
21275
21276 #ifdef HAVE_DB_185_H
21277 # include <db_185.h>
21278 #else
21279 # include <db.h>
21280 #endif
21281
21282 #ifndef DB_VERSION_MAJOR
21283 # define DB_VERSION_MAJOR 1
21284 #endif
21285
21286 #ifndef NULL
21287 #define NULL ((void*)0)
21288 #endif
21289
21290 int
21291 main ()
21292 {
21293
21294 #if DB_VERSION_MAJOR > 2
21295         db_env_create( NULL, 0 );
21296 #elif DB_VERSION_MAJOR > 1
21297         db_appexit( NULL );
21298 #else
21299         (void) dbopen( NULL, 0, 0, 0, NULL);
21300 #endif
21301
21302   ;
21303   return 0;
21304 }
21305 _ACEOF
21306 if ac_fn_c_try_link "$LINENO"; then :
21307   ol_cv_db_db=yes
21308 else
21309   ol_cv_db_db=no
21310 fi
21311 rm -f core conftest.err conftest.$ac_objext \
21312     conftest$ac_exeext conftest.$ac_ext
21313
21314         LIBS="$ol_LIBS"
21315
21316 fi
21317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db" >&5
21318 $as_echo "$ol_cv_db_db" >&6; }
21319
21320         if test $ol_cv_db_db = yes ; then
21321                 ol_cv_lib_db=-ldb
21322         fi
21323 fi
21324
21325 if test $ol_cv_lib_db = no ; then
21326         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (default)" >&5
21327 $as_echo_n "checking for Berkeley DB link (default)... " >&6; }
21328 if test "${ol_cv_db_none+set}" = set; then :
21329   $as_echo_n "(cached) " >&6
21330 else
21331
21332         ol_DB_LIB=
21333         ol_LIBS=$LIBS
21334         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21335
21336         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21337 /* end confdefs.h.  */
21338
21339 #ifdef HAVE_DB_185_H
21340 # include <db_185.h>
21341 #else
21342 # include <db.h>
21343 #endif
21344
21345 #ifndef DB_VERSION_MAJOR
21346 # define DB_VERSION_MAJOR 1
21347 #endif
21348
21349 #ifndef NULL
21350 #define NULL ((void*)0)
21351 #endif
21352
21353 int
21354 main ()
21355 {
21356
21357 #if DB_VERSION_MAJOR > 2
21358         db_env_create( NULL, 0 );
21359 #elif DB_VERSION_MAJOR > 1
21360         db_appexit( NULL );
21361 #else
21362         (void) dbopen( NULL, 0, 0, 0, NULL);
21363 #endif
21364
21365   ;
21366   return 0;
21367 }
21368 _ACEOF
21369 if ac_fn_c_try_link "$LINENO"; then :
21370   ol_cv_db_none=yes
21371 else
21372   ol_cv_db_none=no
21373 fi
21374 rm -f core conftest.err conftest.$ac_objext \
21375     conftest$ac_exeext conftest.$ac_ext
21376
21377         LIBS="$ol_LIBS"
21378
21379 fi
21380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_none" >&5
21381 $as_echo "$ol_cv_db_none" >&6; }
21382
21383         if test $ol_cv_db_none = yes ; then
21384                 ol_cv_lib_db=yes
21385         fi
21386 fi
21387
21388
21389         if test "$ol_cv_lib_db" != no ; then
21390                 ol_cv_berkeley_db=yes
21391                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB library and header version match" >&5
21392 $as_echo_n "checking for Berkeley DB library and header version match... " >&6; }
21393 if test "${ol_cv_berkeley_db_version+set}" = set; then :
21394   $as_echo_n "(cached) " >&6
21395 else
21396
21397         ol_LIBS="$LIBS"
21398         LIBS="$LTHREAD_LIBS $LIBS"
21399         if test $ol_cv_lib_db != yes ; then
21400                 LIBS="$ol_cv_lib_db $LIBS"
21401         fi
21402
21403         if test "$cross_compiling" = yes; then :
21404   ol_cv_berkeley_db_version=cross
21405 else
21406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21407 /* end confdefs.h.  */
21408
21409 #ifdef HAVE_DB_185_H
21410         choke me;
21411 #else
21412 #include <db.h>
21413 #endif
21414 #ifndef DB_VERSION_MAJOR
21415 # define DB_VERSION_MAJOR 1
21416 #endif
21417 #ifndef NULL
21418 #define NULL ((void *)0)
21419 #endif
21420 main()
21421 {
21422 #if DB_VERSION_MAJOR > 1
21423         char *version;
21424         int major, minor, patch;
21425
21426         version = db_version( &major, &minor, &patch );
21427
21428         if( major != DB_VERSION_MAJOR ||
21429                 minor != DB_VERSION_MINOR ||
21430                 patch != DB_VERSION_PATCH )
21431         {
21432                 printf("Berkeley DB version mismatch\n"
21433                         "\theader: %s\n\tlibrary: %s\n",
21434                         DB_VERSION_STRING, version);
21435                 return 1;
21436         }
21437 #endif
21438
21439         return 0;
21440 }
21441 _ACEOF
21442 if ac_fn_c_try_run "$LINENO"; then :
21443   ol_cv_berkeley_db_version=yes
21444 else
21445   ol_cv_berkeley_db_version=no
21446 fi
21447 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21448   conftest.$ac_objext conftest.beam conftest.$ac_ext
21449 fi
21450
21451
21452         LIBS="$ol_LIBS"
21453
21454 fi
21455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_version" >&5
21456 $as_echo "$ol_cv_berkeley_db_version" >&6; }
21457
21458         if test $ol_cv_berkeley_db_version = no ; then
21459                 as_fn_error "Berkeley DB version mismatch" "$LINENO" 5
21460         fi
21461
21462                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB thread support" >&5
21463 $as_echo_n "checking for Berkeley DB thread support... " >&6; }
21464 if test "${ol_cv_berkeley_db_thread+set}" = set; then :
21465   $as_echo_n "(cached) " >&6
21466 else
21467
21468         ol_LIBS="$LIBS"
21469         LIBS="$LTHREAD_LIBS $LIBS"
21470         if test $ol_cv_lib_db != yes ; then
21471                 LIBS="$ol_cv_lib_db $LIBS"
21472         fi
21473
21474         if test "$cross_compiling" = yes; then :
21475   ol_cv_berkeley_db_thread=cross
21476 else
21477   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21478 /* end confdefs.h.  */
21479
21480 #ifdef HAVE_DB_185_H
21481         choke me;
21482 #else
21483 #include <db.h>
21484 #endif
21485 #ifndef NULL
21486 #define NULL ((void *)0)
21487 #endif
21488 main()
21489 {
21490         int rc;
21491         u_int32_t flags = DB_CREATE |
21492 #ifdef DB_PRIVATE
21493                 DB_PRIVATE |
21494 #endif
21495                 DB_THREAD;
21496
21497 #if DB_VERSION_MAJOR > 2
21498         DB_ENV *env = NULL;
21499
21500         rc = db_env_create( &env, 0 );
21501
21502         flags |= DB_INIT_MPOOL;
21503 #ifdef DB_MPOOL_PRIVATE
21504         flags |= DB_MPOOL_PRIVATE;
21505 #endif
21506
21507         if( rc ) {
21508                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21509                 return rc;
21510         }
21511
21512 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
21513         rc = (env->open)( env, NULL, flags, 0 );
21514 #else
21515         rc = (env->open)( env, NULL, NULL, flags, 0 );
21516 #endif
21517
21518         if ( rc == 0 ) {
21519                 rc = env->close( env, 0 );
21520         }
21521
21522         if( rc ) {
21523                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21524                 return rc;
21525         }
21526
21527 #else
21528         DB_ENV env;
21529         memset( &env, '\0', sizeof(env) );
21530
21531         rc = db_appinit( NULL, NULL, &env, flags );
21532
21533         if( rc == 0 ) {
21534                 db_appexit( &env );
21535         }
21536
21537         unlink("__db_mpool.share");
21538         unlink("__db_lock.share");
21539 #endif
21540
21541         return rc;
21542 }
21543 _ACEOF
21544 if ac_fn_c_try_run "$LINENO"; then :
21545   ol_cv_berkeley_db_thread=yes
21546 else
21547   ol_cv_berkeley_db_thread=no
21548 fi
21549 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21550   conftest.$ac_objext conftest.beam conftest.$ac_ext
21551 fi
21552
21553
21554         LIBS="$ol_LIBS"
21555
21556 fi
21557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_thread" >&5
21558 $as_echo "$ol_cv_berkeley_db_thread" >&6; }
21559
21560         if test $ol_cv_berkeley_db_thread != no ; then
21561
21562 $as_echo "#define HAVE_BERKELEY_DB_THREAD 1" >>confdefs.h
21563
21564         fi
21565
21566         fi
21567 fi
21568
21569
21570         if test $ol_cv_berkeley_db = no ; then
21571                 as_fn_error "BDB/HDB: BerkeleyDB not available" "$LINENO" 5
21572         fi
21573
21574
21575 $as_echo "#define HAVE_BERKELEY_DB 1" >>confdefs.h
21576
21577
21578                         if test $ol_cv_lib_db != yes ; then
21579                 BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
21580         fi
21581
21582         SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
21583
21584         ol_link_bdb=yes
21585 fi
21586
21587
21588 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
21589         BUILD_LIBS_DYNAMIC=shared
21590
21591 $as_echo "#define LDAP_LIBS_DYNAMIC 1" >>confdefs.h
21592
21593         LTSTATIC=""
21594 else
21595         BUILD_LIBS_DYNAMIC=static
21596         LTSTATIC="-static"
21597 fi
21598
21599 if test $ol_enable_wrappers != no ; then
21600         for ac_header in tcpd.h
21601 do :
21602   ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
21603 if test "x$ac_cv_header_tcpd_h" = x""yes; then :
21604   cat >>confdefs.h <<_ACEOF
21605 #define HAVE_TCPD_H 1
21606 _ACEOF
21607
21608                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library" >&5
21609 $as_echo_n "checking for TCP wrappers library... " >&6; }
21610                 save_LIBS="$LIBS"
21611                 LIBS="$LIBS -lwrap"
21612                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21613 /* end confdefs.h.  */
21614
21615 #include <tcpd.h>
21616 int allow_severity = 0;
21617 int deny_severity  = 0;
21618
21619 struct request_info *req;
21620
21621 int
21622 main ()
21623 {
21624
21625 hosts_access(req)
21626
21627   ;
21628   return 0;
21629 }
21630 _ACEOF
21631 if ac_fn_c_try_link "$LINENO"; then :
21632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap" >&5
21633 $as_echo "-lwrap" >&6; }
21634                 have_wrappers=yes
21635                 LIBS="$save_LIBS"
21636 else
21637
21638                                 LIBS="$LIBS -lnsl"
21639                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21640 /* end confdefs.h.  */
21641
21642 #include <tcpd.h>
21643 int allow_severity = 0;
21644 int deny_severity  = 0;
21645
21646 struct request_info *req;
21647
21648 int
21649 main ()
21650 {
21651
21652 hosts_access(req)
21653
21654   ;
21655   return 0;
21656 }
21657 _ACEOF
21658 if ac_fn_c_try_link "$LINENO"; then :
21659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap -lnsl" >&5
21660 $as_echo "-lwrap -lnsl" >&6; }
21661                 have_wrappers=yes
21662                 LIBS="$save_LIBS -lnsl"
21663 else
21664
21665                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21666 $as_echo "no" >&6; }
21667                 have_wrappers=no
21668                 LIBS=$save_LIBS
21669 fi
21670 rm -f core conftest.err conftest.$ac_objext \
21671     conftest$ac_exeext conftest.$ac_ext
21672 fi
21673 rm -f core conftest.err conftest.$ac_objext \
21674     conftest$ac_exeext conftest.$ac_ext
21675 else
21676   have_wrappers=no
21677 fi
21678
21679 done
21680
21681
21682         if test $have_wrappers = yes ; then
21683
21684 $as_echo "#define HAVE_TCPD 1" >>confdefs.h
21685
21686                 WRAP_LIBS="-lwrap"
21687         elif test $ol_enable_wrappers = yes ; then
21688                 as_fn_error "could not find TCP wrappers, select apppropriate options or disable" "$LINENO" 5
21689         else
21690                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find TCP wrappers, support disabled" >&5
21691 $as_echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
21692                 WRAP_LIBS=""
21693         fi
21694 fi
21695
21696 if test $ol_enable_syslog != no ; then
21697         ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
21698 if test "x$ac_cv_func_openlog" = x""yes; then :
21699
21700 fi
21701
21702         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
21703                 { as_fn_set_status select appropriate options or disable
21704 as_fn_error "could not find syslog" "$LINENO" 5; }
21705         fi
21706         ol_enable_syslog=$ac_cv_func_openlog
21707 fi
21708
21709 ol_link_sql=no
21710 if test $ol_enable_sql != no ; then
21711         for ac_header in sql.h sqlext.h
21712 do :
21713   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21714 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21715 eval as_val=\$$as_ac_Header
21716    if test "x$as_val" = x""yes; then :
21717   cat >>confdefs.h <<_ACEOF
21718 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21719 _ACEOF
21720
21721 else
21722
21723                 as_fn_error "could not locate SQL headers" "$LINENO" 5
21724
21725 fi
21726
21727 done
21728
21729
21730         sql_LIBS="$LIBS"
21731         LIBS="$LTHREAD_LIBS $LIBS"
21732
21733         if test $ol_with_odbc = auto ; then
21734                 ol_with_odbc="iodbc unixodbc odbc32"
21735         fi
21736
21737         for odbc in $ol_with_odbc ; do
21738                 if test $ol_link_sql = no ; then
21739                         case $odbc in
21740                         iodbc)
21741                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -liodbc" >&5
21742 $as_echo_n "checking for SQLDriverConnect in -liodbc... " >&6; }
21743 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then :
21744   $as_echo_n "(cached) " >&6
21745 else
21746   ac_check_lib_save_LIBS=$LIBS
21747 LIBS="-liodbc  $LIBS"
21748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21749 /* end confdefs.h.  */
21750
21751 /* Override any GCC internal prototype to avoid an error.
21752    Use char because int might match the return type of a GCC
21753    builtin and then its argument prototype would still apply.  */
21754 #ifdef __cplusplus
21755 extern "C"
21756 #endif
21757 char SQLDriverConnect ();
21758 int
21759 main ()
21760 {
21761 return SQLDriverConnect ();
21762   ;
21763   return 0;
21764 }
21765 _ACEOF
21766 if ac_fn_c_try_link "$LINENO"; then :
21767   ac_cv_lib_iodbc_SQLDriverConnect=yes
21768 else
21769   ac_cv_lib_iodbc_SQLDriverConnect=no
21770 fi
21771 rm -f core conftest.err conftest.$ac_objext \
21772     conftest$ac_exeext conftest.$ac_ext
21773 LIBS=$ac_check_lib_save_LIBS
21774 fi
21775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
21776 $as_echo "$ac_cv_lib_iodbc_SQLDriverConnect" >&6; }
21777 if test "x$ac_cv_lib_iodbc_SQLDriverConnect" = x""yes; then :
21778   have_iodbc=yes
21779 else
21780   have_iodbc=no
21781 fi
21782
21783                                 if test $have_iodbc = yes ; then
21784                                         ol_link_sql="-liodbc"
21785                                 fi
21786                                 ;;
21787
21788                         unixodbc)
21789                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc" >&5
21790 $as_echo_n "checking for SQLDriverConnect in -lodbc... " >&6; }
21791 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then :
21792   $as_echo_n "(cached) " >&6
21793 else
21794   ac_check_lib_save_LIBS=$LIBS
21795 LIBS="-lodbc  $LIBS"
21796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21797 /* end confdefs.h.  */
21798
21799 /* Override any GCC internal prototype to avoid an error.
21800    Use char because int might match the return type of a GCC
21801    builtin and then its argument prototype would still apply.  */
21802 #ifdef __cplusplus
21803 extern "C"
21804 #endif
21805 char SQLDriverConnect ();
21806 int
21807 main ()
21808 {
21809 return SQLDriverConnect ();
21810   ;
21811   return 0;
21812 }
21813 _ACEOF
21814 if ac_fn_c_try_link "$LINENO"; then :
21815   ac_cv_lib_odbc_SQLDriverConnect=yes
21816 else
21817   ac_cv_lib_odbc_SQLDriverConnect=no
21818 fi
21819 rm -f core conftest.err conftest.$ac_objext \
21820     conftest$ac_exeext conftest.$ac_ext
21821 LIBS=$ac_check_lib_save_LIBS
21822 fi
21823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
21824 $as_echo "$ac_cv_lib_odbc_SQLDriverConnect" >&6; }
21825 if test "x$ac_cv_lib_odbc_SQLDriverConnect" = x""yes; then :
21826   have_odbc=yes
21827 else
21828   have_odbc=no
21829 fi
21830
21831                                 if test $have_odbc = yes ; then
21832                                         ol_link_sql="-lodbc"
21833                                 fi
21834                                 ;;
21835
21836                         odbc32)
21837                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32" >&5
21838 $as_echo_n "checking for SQLDriverConnect in -lodbc32... " >&6; }
21839 if test "${ac_cv_lib_odbc32_SQLDriverConnect+set}" = set; then :
21840   $as_echo_n "(cached) " >&6
21841 else
21842   ac_check_lib_save_LIBS=$LIBS
21843 LIBS="-lodbc32  $LIBS"
21844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21845 /* end confdefs.h.  */
21846
21847 /* Override any GCC internal prototype to avoid an error.
21848    Use char because int might match the return type of a GCC
21849    builtin and then its argument prototype would still apply.  */
21850 #ifdef __cplusplus
21851 extern "C"
21852 #endif
21853 char SQLDriverConnect ();
21854 int
21855 main ()
21856 {
21857 return SQLDriverConnect ();
21858   ;
21859   return 0;
21860 }
21861 _ACEOF
21862 if ac_fn_c_try_link "$LINENO"; then :
21863   ac_cv_lib_odbc32_SQLDriverConnect=yes
21864 else
21865   ac_cv_lib_odbc32_SQLDriverConnect=no
21866 fi
21867 rm -f core conftest.err conftest.$ac_objext \
21868     conftest$ac_exeext conftest.$ac_ext
21869 LIBS=$ac_check_lib_save_LIBS
21870 fi
21871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_SQLDriverConnect" >&5
21872 $as_echo "$ac_cv_lib_odbc32_SQLDriverConnect" >&6; }
21873 if test "x$ac_cv_lib_odbc32_SQLDriverConnect" = x""yes; then :
21874   have_odbc32=yes
21875 else
21876   have_odbc32=no
21877 fi
21878
21879
21880                                                                 if test $have_odbc32 = no ; then
21881                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32 with windows.h" >&5
21882 $as_echo_n "checking for SQLDriverConnect in -lodbc32 with windows.h... " >&6; }
21883                                         save_LIBS="$LIBS"
21884                                         LIBS="$LIBS -lodbc32"
21885                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21886 /* end confdefs.h.  */
21887 #include <windows.h>
21888                                         #include <sqlext.h>
21889
21890 int
21891 main ()
21892 {
21893
21894                                                 SQLDriverConnect(NULL,NULL,NULL,0,NULL,0,NULL,0);
21895
21896   ;
21897   return 0;
21898 }
21899 _ACEOF
21900 if ac_fn_c_try_link "$LINENO"; then :
21901   have_odbc32=yes
21902 else
21903   have_odbc32=no
21904 fi
21905 rm -f core conftest.err conftest.$ac_objext \
21906     conftest$ac_exeext conftest.$ac_ext
21907                                         LIBS="$save_LIBS"
21908                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_odbc32" >&5
21909 $as_echo "$have_odbc32" >&6; }
21910                                 fi
21911
21912                                 if test $have_odbc32 = yes ; then
21913                                         ol_link_sql="-lodbc32"
21914                                 fi
21915                                 ;;
21916
21917                         *)
21918                                 as_fn_error "unknown ODBC library" "$LINENO" 5
21919                                 ;;
21920                         esac
21921                 fi
21922         done
21923
21924         LIBS="$sql_LIBS"
21925
21926         if test $ol_link_sql != no ; then
21927                 SLAPD_SQL_LIBS="$ol_link_sql"
21928
21929         elif test $ol_enable_sql != auto ; then
21930                 as_fn_error "could not locate suitable ODBC library" "$LINENO" 5
21931         fi
21932 fi
21933
21934 ol_link_ndb=no
21935 if test $ol_enable_ndb != no ; then
21936         # Extract the first word of "mysql_config", so it can be a program name with args.
21937 set dummy mysql_config; ac_word=$2
21938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21939 $as_echo_n "checking for $ac_word... " >&6; }
21940 if test "${ac_cv_prog_MYSQL+set}" = set; then :
21941   $as_echo_n "(cached) " >&6
21942 else
21943   if test -n "$MYSQL"; then
21944   ac_cv_prog_MYSQL="$MYSQL" # Let the user override the test.
21945 else
21946 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21947 for as_dir in $PATH
21948 do
21949   IFS=$as_save_IFS
21950   test -z "$as_dir" && as_dir=.
21951     for ac_exec_ext in '' $ac_executable_extensions; do
21952   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21953     ac_cv_prog_MYSQL="yes"
21954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21955     break 2
21956   fi
21957 done
21958   done
21959 IFS=$as_save_IFS
21960
21961 fi
21962 fi
21963 MYSQL=$ac_cv_prog_MYSQL
21964 if test -n "$MYSQL"; then
21965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL" >&5
21966 $as_echo "$MYSQL" >&6; }
21967 else
21968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21969 $as_echo "no" >&6; }
21970 fi
21971
21972
21973         if test "$MYSQL" != yes ; then
21974                 as_fn_error "could not locate mysql_config" "$LINENO" 5
21975         fi
21976
21977         SQL_INC=`mysql_config --include`
21978         SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi"
21979
21980         save_CPPFLAGS="$CPPFLAGS"
21981         CPPFLAGS="$SLAPD_NDB_INCS"
21982         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NdbApi.hpp" >&5
21983 $as_echo_n "checking for NdbApi.hpp... " >&6; }
21984         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21985 /* end confdefs.h.  */
21986 #include <NdbApi.hpp>
21987 _ACEOF
21988 if ac_fn_c_try_cpp "$LINENO"; then :
21989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21990 $as_echo "yes" >&6; }
21991 else
21992   as_fn_error "could not locate NdbApi headers" "$LINENO" 5
21993
21994 fi
21995 rm -f conftest.err conftest.$ac_ext
21996         CPPFLAGS="$save_CPPFLAGS"
21997
21998         SQL_LIB=`mysql_config --libs_r`
21999         SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++"
22000
22001         save_LDFLAGS="$LDFLAGS"
22002         save_LIBS="$LIBS"
22003         LDFLAGS="$SQL_LIB"
22004         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ndb_init in -lndbclient" >&5
22005 $as_echo_n "checking for ndb_init in -lndbclient... " >&6; }
22006 if test "${ac_cv_lib_ndbclient_ndb_init+set}" = set; then :
22007   $as_echo_n "(cached) " >&6
22008 else
22009   ac_check_lib_save_LIBS=$LIBS
22010 LIBS="-lndbclient -lstdc++ $LIBS"
22011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22012 /* end confdefs.h.  */
22013
22014 /* Override any GCC internal prototype to avoid an error.
22015    Use char because int might match the return type of a GCC
22016    builtin and then its argument prototype would still apply.  */
22017 #ifdef __cplusplus
22018 extern "C"
22019 #endif
22020 char ndb_init ();
22021 int
22022 main ()
22023 {
22024 return ndb_init ();
22025   ;
22026   return 0;
22027 }
22028 _ACEOF
22029 if ac_fn_c_try_link "$LINENO"; then :
22030   ac_cv_lib_ndbclient_ndb_init=yes
22031 else
22032   ac_cv_lib_ndbclient_ndb_init=no
22033 fi
22034 rm -f core conftest.err conftest.$ac_objext \
22035     conftest$ac_exeext conftest.$ac_ext
22036 LIBS=$ac_check_lib_save_LIBS
22037 fi
22038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbclient_ndb_init" >&5
22039 $as_echo "$ac_cv_lib_ndbclient_ndb_init" >&6; }
22040 if test "x$ac_cv_lib_ndbclient_ndb_init" = x""yes; then :
22041   : ok
22042 else
22043
22044                 as_fn_error "could not locate ndbclient library" "$LINENO" 5
22045
22046 fi
22047
22048         LIBS="$save_LIBS"
22049         LDFLAGS="$save_LDFLAGS"
22050
22051         if test "$ol_enable_ndb" = yes ; then
22052                 SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
22053         fi
22054 fi
22055
22056 ol_link_wt=no
22057 if test $ol_enable_wt != no ; then
22058         # Extract the first word of "pkg-config", so it can be a program name with args.
22059 set dummy pkg-config; ac_word=$2
22060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22061 $as_echo_n "checking for $ac_word... " >&6; }
22062 if test "${ac_cv_prog_PKGCONFIG+set}" = set; then :
22063   $as_echo_n "(cached) " >&6
22064 else
22065   if test -n "$PKGCONFIG"; then
22066   ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
22067 else
22068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22069 for as_dir in $PATH
22070 do
22071   IFS=$as_save_IFS
22072   test -z "$as_dir" && as_dir=.
22073     for ac_exec_ext in '' $ac_executable_extensions; do
22074   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22075     ac_cv_prog_PKGCONFIG="yes"
22076     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22077     break 2
22078   fi
22079 done
22080   done
22081 IFS=$as_save_IFS
22082
22083 fi
22084 fi
22085 PKGCONFIG=$ac_cv_prog_PKGCONFIG
22086 if test -n "$PKGCONFIG"; then
22087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
22088 $as_echo "$PKGCONFIG" >&6; }
22089 else
22090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22091 $as_echo "no" >&6; }
22092 fi
22093
22094
22095         if test "$PKGCONFIG" != yes ; then
22096                 as_fn_error "could not locate pkg-config" "$LINENO" 5
22097         fi
22098         WT_INCS=`pkg-config --cflags wiredtiger`
22099         WT_LIBS=`pkg-config --libs wiredtiger`
22100
22101         save_CFLAGS="$CFLAGS"
22102         save_LDFLAGS="$LDFLAGS"
22103         CFLAGS="$WT_INCS"
22104         CPPFLAGS="$WT_INCS"
22105         LDFLAGS="$WT_LIBS"
22106         for ac_header in wiredtiger.h
22107 do :
22108   ac_fn_c_check_header_mongrel "$LINENO" "wiredtiger.h" "ac_cv_header_wiredtiger_h" "$ac_includes_default"
22109 if test "x$ac_cv_header_wiredtiger_h" = x""yes; then :
22110   cat >>confdefs.h <<_ACEOF
22111 #define HAVE_WIREDTIGER_H 1
22112 _ACEOF
22113
22114 fi
22115
22116 done
22117
22118         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wiredtiger_version in -lwiredtiger" >&5
22119 $as_echo_n "checking for wiredtiger_version in -lwiredtiger... " >&6; }
22120 if test "${ac_cv_lib_wiredtiger_wiredtiger_version+set}" = set; then :
22121   $as_echo_n "(cached) " >&6
22122 else
22123   ac_check_lib_save_LIBS=$LIBS
22124 LIBS="-lwiredtiger  $LIBS"
22125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22126 /* end confdefs.h.  */
22127
22128 /* Override any GCC internal prototype to avoid an error.
22129    Use char because int might match the return type of a GCC
22130    builtin and then its argument prototype would still apply.  */
22131 #ifdef __cplusplus
22132 extern "C"
22133 #endif
22134 char wiredtiger_version ();
22135 int
22136 main ()
22137 {
22138 return wiredtiger_version ();
22139   ;
22140   return 0;
22141 }
22142 _ACEOF
22143 if ac_fn_c_try_link "$LINENO"; then :
22144   ac_cv_lib_wiredtiger_wiredtiger_version=yes
22145 else
22146   ac_cv_lib_wiredtiger_wiredtiger_version=no
22147 fi
22148 rm -f core conftest.err conftest.$ac_objext \
22149     conftest$ac_exeext conftest.$ac_ext
22150 LIBS=$ac_check_lib_save_LIBS
22151 fi
22152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wiredtiger_wiredtiger_version" >&5
22153 $as_echo "$ac_cv_lib_wiredtiger_wiredtiger_version" >&6; }
22154 if test "x$ac_cv_lib_wiredtiger_wiredtiger_version" = x""yes; then :
22155   : ok
22156 else
22157
22158                 as_fn_error "could not locate wiredtiger library" "$LINENO" 5
22159
22160 fi
22161
22162         CFLAGS="$save_CFLAGS"
22163         CPPFLAGS="$save_CPPFLAGS"
22164         LDFLAGS="$save_LDFLAGS"
22165         SLAPD_LIBS="$SLAPD_LIBS \$(WT_LIBS)"
22166         ol_link_wt=yes
22167 fi
22168
22169 ol_icu=no
22170 for ac_header in unicode/utypes.h
22171 do :
22172   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22173 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22174 eval as_val=\$$as_ac_Header
22175    if test "x$as_val" = x""yes; then :
22176   cat >>confdefs.h <<_ACEOF
22177 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22178 _ACEOF
22179
22180 fi
22181
22182 done
22183
22184 if test $ac_cv_header_unicode_utypes_h = yes ; then
22185                 OL_ICULIBS="-licuuc -licudata"
22186
22187         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU libraries" >&5
22188 $as_echo_n "checking for ICU libraries... " >&6; }
22189 if test "${ol_cv_lib_icu+set}" = set; then :
22190   $as_echo_n "(cached) " >&6
22191 else
22192
22193                 ol_LIBS="$LIBS"
22194                 LIBS="$OL_ICULIBS $LIBS"
22195                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22196 /* end confdefs.h.  */
22197
22198 #include <unicode/utypes.h>
22199
22200 int
22201 main ()
22202 {
22203
22204 (void) u_errorName(0);
22205
22206   ;
22207   return 0;
22208 }
22209 _ACEOF
22210 if ac_fn_c_try_link "$LINENO"; then :
22211   ol_cv_lib_icu=yes
22212 else
22213   ol_cv_lib_icu=no
22214 fi
22215 rm -f core conftest.err conftest.$ac_objext \
22216     conftest$ac_exeext conftest.$ac_ext
22217                 LIBS="$ol_LIBS"
22218
22219 fi
22220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_icu" >&5
22221 $as_echo "$ol_cv_lib_icu" >&6; }
22222
22223         if test $ol_cv_lib_icu != no ; then
22224                 ol_icu="$OL_ICULIBS"
22225
22226 $as_echo "#define HAVE_ICU 1" >>confdefs.h
22227
22228         fi
22229 fi
22230
22231 if test "$ol_icu" = no ; then
22232         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ICU not available" >&5
22233 $as_echo "$as_me: WARNING: ICU not available" >&2;}
22234 else
22235         ICU_LIBS="$ol_icu"
22236 fi
22237 WITH_SASL=no
22238 ol_link_sasl=no
22239 ol_link_spasswd=no
22240 if test $ol_with_cyrus_sasl != no ; then
22241         for ac_header in sasl/sasl.h sasl.h
22242 do :
22243   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22244 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22245 eval as_val=\$$as_ac_Header
22246    if test "x$as_val" = x""yes; then :
22247   cat >>confdefs.h <<_ACEOF
22248 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22249 _ACEOF
22250
22251 fi
22252
22253 done
22254
22255
22256         if test $ac_cv_header_sasl_sasl_h = yes ||
22257            test $ac_cv_header_sasl_h = yes; then
22258                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
22259 $as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
22260 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then :
22261   $as_echo_n "(cached) " >&6
22262 else
22263   ac_check_lib_save_LIBS=$LIBS
22264 LIBS="-lsasl2  $LIBS"
22265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22266 /* end confdefs.h.  */
22267
22268 /* Override any GCC internal prototype to avoid an error.
22269    Use char because int might match the return type of a GCC
22270    builtin and then its argument prototype would still apply.  */
22271 #ifdef __cplusplus
22272 extern "C"
22273 #endif
22274 char sasl_client_init ();
22275 int
22276 main ()
22277 {
22278 return sasl_client_init ();
22279   ;
22280   return 0;
22281 }
22282 _ACEOF
22283 if ac_fn_c_try_link "$LINENO"; then :
22284   ac_cv_lib_sasl2_sasl_client_init=yes
22285 else
22286   ac_cv_lib_sasl2_sasl_client_init=no
22287 fi
22288 rm -f core conftest.err conftest.$ac_objext \
22289     conftest$ac_exeext conftest.$ac_ext
22290 LIBS=$ac_check_lib_save_LIBS
22291 fi
22292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
22293 $as_echo "$ac_cv_lib_sasl2_sasl_client_init" >&6; }
22294 if test "x$ac_cv_lib_sasl2_sasl_client_init" = x""yes; then :
22295   ol_link_sasl="-lsasl2"
22296 else
22297   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl" >&5
22298 $as_echo_n "checking for sasl_client_init in -lsasl... " >&6; }
22299 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then :
22300   $as_echo_n "(cached) " >&6
22301 else
22302   ac_check_lib_save_LIBS=$LIBS
22303 LIBS="-lsasl  $LIBS"
22304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22305 /* end confdefs.h.  */
22306
22307 /* Override any GCC internal prototype to avoid an error.
22308    Use char because int might match the return type of a GCC
22309    builtin and then its argument prototype would still apply.  */
22310 #ifdef __cplusplus
22311 extern "C"
22312 #endif
22313 char sasl_client_init ();
22314 int
22315 main ()
22316 {
22317 return sasl_client_init ();
22318   ;
22319   return 0;
22320 }
22321 _ACEOF
22322 if ac_fn_c_try_link "$LINENO"; then :
22323   ac_cv_lib_sasl_sasl_client_init=yes
22324 else
22325   ac_cv_lib_sasl_sasl_client_init=no
22326 fi
22327 rm -f core conftest.err conftest.$ac_objext \
22328     conftest$ac_exeext conftest.$ac_ext
22329 LIBS=$ac_check_lib_save_LIBS
22330 fi
22331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl_sasl_client_init" >&5
22332 $as_echo "$ac_cv_lib_sasl_sasl_client_init" >&6; }
22333 if test "x$ac_cv_lib_sasl_sasl_client_init" = x""yes; then :
22334   ol_link_sasl="-lsasl"
22335 fi
22336
22337 fi
22338
22339         fi
22340
22341         if test $ol_link_sasl = no ; then
22342                 if test $ol_with_cyrus_sasl != auto ; then
22343                         as_fn_error "Could not locate Cyrus SASL" "$LINENO" 5
22344                 else
22345                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate Cyrus SASL" >&5
22346 $as_echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
22347                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22348 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22349                         if test $ol_link_tls = no ; then
22350                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22351 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22352                         fi
22353                 fi
22354         else
22355                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Cyrus SASL library version" >&5
22356 $as_echo_n "checking Cyrus SASL library version... " >&6; }
22357 if test "${ol_cv_sasl_compat+set}" = set; then :
22358   $as_echo_n "(cached) " >&6
22359 else
22360
22361         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22362 /* end confdefs.h.  */
22363
22364 #ifdef HAVE_SASL_SASL_H
22365 #include <sasl/sasl.h>
22366 #else
22367 #include <sasl.h>
22368 #endif
22369
22370 /* Require 2.1.15+ */
22371 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22372         char *__sasl_compat = "2.2+ or better okay (we guess)";
22373 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22374         && SASL_VERSION_STEP >=15
22375         char *__sasl_compat = "2.1.15+ or better okay";
22376 #endif
22377
22378 _ACEOF
22379 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22380   $EGREP "__sasl_compat" >/dev/null 2>&1; then :
22381   ol_cv_sasl_compat=yes
22382 else
22383   ol_cv_sasl_compat=no
22384 fi
22385 rm -f conftest*
22386
22387 fi
22388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sasl_compat" >&5
22389 $as_echo "$ol_cv_sasl_compat" >&6; }
22390
22391                 if test $ol_cv_sasl_compat = no ; then
22392                         ol_link_sasl=no
22393                         as_fn_error "Cyrus SASL library located but is incompatible" "$LINENO" 5
22394                 fi
22395
22396
22397 $as_echo "#define HAVE_CYRUS_SASL 1" >>confdefs.h
22398
22399                 SASL_LIBS="$ol_link_sasl"
22400                 if test $ol_enable_spasswd != no ; then
22401                         ol_link_spasswd=yes
22402                 fi
22403
22404                 ac_save_LIBS="$LIBS"
22405                 LIBS="$LIBS $ol_link_sasl"
22406                 ac_fn_c_check_func "$LINENO" "sasl_version" "ac_cv_func_sasl_version"
22407 if test "x$ac_cv_func_sasl_version" = x""yes; then :
22408
22409 $as_echo "#define HAVE_SASL_VERSION 1" >>confdefs.h
22410
22411 fi
22412
22413                 LIBS="$ac_save_LIBS"
22414
22415                 WITH_SASL=yes
22416         fi
22417
22418 else
22419         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22420 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22421         if test $ol_link_tls = no ; then
22422                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22423 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22424         fi
22425 fi
22426
22427 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
22428         dev=no
22429         if test -r /dev/urandom ; then
22430                 dev="/dev/urandom";
22431         elif test -r /idev/urandom ; then
22432                 dev="/idev/urandom";
22433         elif test -r /dev/srandom ; then
22434                 dev="/dev/srandom";
22435         elif test -r /dev/random ; then
22436                 dev="/dev/random";
22437         elif test -r /idev/random ; then
22438                 dev="/idev/random";
22439         fi
22440
22441         if test $dev != no ; then
22442
22443 cat >>confdefs.h <<_ACEOF
22444 #define URANDOM_DEVICE "$dev"
22445 _ACEOF
22446
22447         fi
22448 fi
22449
22450 ol_link_fetch=no
22451 if test $ol_with_fetch != no ; then
22452         ol_LIBS=$LIBS
22453 LIBS="-lfetch -lcom_err $LIBS"
22454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking fetch(3) library" >&5
22455 $as_echo_n "checking fetch(3) library... " >&6; }
22456 if test "${ol_cv_lib_fetch+set}" = set; then :
22457   $as_echo_n "(cached) " >&6
22458 else
22459
22460         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22461 /* end confdefs.h.  */
22462
22463 #ifdef HAVE_SYS_PARAM_H
22464 #include <sys/param.h>
22465 #endif
22466 #include <stdio.h>
22467 #include <fetch.h>
22468 int
22469 main ()
22470 {
22471 struct url *u = fetchParseURL("file:///");
22472   ;
22473   return 0;
22474 }
22475 _ACEOF
22476 if ac_fn_c_try_link "$LINENO"; then :
22477   ol_cv_lib_fetch=yes
22478 else
22479   ol_cv_lib_fetch=no
22480 fi
22481 rm -f core conftest.err conftest.$ac_objext \
22482     conftest$ac_exeext conftest.$ac_ext
22483 fi
22484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_fetch" >&5
22485 $as_echo "$ol_cv_lib_fetch" >&6; }
22486 LIBS=$ol_LIBS
22487 if test $ol_cv_lib_fetch != no ; then
22488         ol_link_fetch="-lfetch -lcom_err"
22489
22490 $as_echo "#define HAVE_FETCH 1" >>confdefs.h
22491
22492 fi
22493
22494
22495         if test $ol_cv_lib_fetch != no ; then
22496                 LIBS="$LIBS $ol_link_fetch"
22497                 ol_link_fetch=freebsd
22498
22499         elif test $ol_with_fetch != auto ; then
22500                 as_fn_error "no suitable API for --with-fetch=$ol_with_fetch" "$LINENO" 5
22501         fi
22502 fi
22503
22504 if test $ol_enable_crypt != no ; then
22505         save_LIBS="$LIBS"
22506         LIBS="$TLS_LIBS $LIBS"
22507
22508         ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
22509 if test "x$ac_cv_func_crypt" = x""yes; then :
22510   have_crypt=yes
22511 else
22512
22513                 LIBS="$save_LIBS"
22514                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
22515 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
22516 if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
22517   $as_echo_n "(cached) " >&6
22518 else
22519   ac_check_lib_save_LIBS=$LIBS
22520 LIBS="-lcrypt  $LIBS"
22521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22522 /* end confdefs.h.  */
22523
22524 /* Override any GCC internal prototype to avoid an error.
22525    Use char because int might match the return type of a GCC
22526    builtin and then its argument prototype would still apply.  */
22527 #ifdef __cplusplus
22528 extern "C"
22529 #endif
22530 char crypt ();
22531 int
22532 main ()
22533 {
22534 return crypt ();
22535   ;
22536   return 0;
22537 }
22538 _ACEOF
22539 if ac_fn_c_try_link "$LINENO"; then :
22540   ac_cv_lib_crypt_crypt=yes
22541 else
22542   ac_cv_lib_crypt_crypt=no
22543 fi
22544 rm -f core conftest.err conftest.$ac_objext \
22545     conftest$ac_exeext conftest.$ac_ext
22546 LIBS=$ac_check_lib_save_LIBS
22547 fi
22548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
22549 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
22550 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
22551   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22552                         have_crypt=yes
22553 else
22554   have_crypt=no
22555 fi
22556
22557 fi
22558
22559
22560         LIBS="$save_LIBS"
22561
22562         if test $have_crypt = yes ; then
22563
22564 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
22565
22566         else
22567                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find crypt" >&5
22568 $as_echo "$as_me: WARNING: could not find crypt" >&2;}
22569                 if test $ol_enable_crypt = yes ; then
22570                         as_fn_error "could not find crypt, select appropriate options or disable" "$LINENO" 5
22571                 fi
22572
22573                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling crypt support" >&5
22574 $as_echo "$as_me: WARNING: disabling crypt support" >&2;}
22575                 ol_enable_crypt=no
22576         fi
22577 fi
22578
22579 if test $ol_enable_proctitle != no ; then
22580         ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
22581 if test "x$ac_cv_func_setproctitle" = x""yes; then :
22582   have_setproctitle=yes
22583 else
22584
22585                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5
22586 $as_echo_n "checking for setproctitle in -lutil... " >&6; }
22587 if test "${ac_cv_lib_util_setproctitle+set}" = set; then :
22588   $as_echo_n "(cached) " >&6
22589 else
22590   ac_check_lib_save_LIBS=$LIBS
22591 LIBS="-lutil  $LIBS"
22592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22593 /* end confdefs.h.  */
22594
22595 /* Override any GCC internal prototype to avoid an error.
22596    Use char because int might match the return type of a GCC
22597    builtin and then its argument prototype would still apply.  */
22598 #ifdef __cplusplus
22599 extern "C"
22600 #endif
22601 char setproctitle ();
22602 int
22603 main ()
22604 {
22605 return setproctitle ();
22606   ;
22607   return 0;
22608 }
22609 _ACEOF
22610 if ac_fn_c_try_link "$LINENO"; then :
22611   ac_cv_lib_util_setproctitle=yes
22612 else
22613   ac_cv_lib_util_setproctitle=no
22614 fi
22615 rm -f core conftest.err conftest.$ac_objext \
22616     conftest$ac_exeext conftest.$ac_ext
22617 LIBS=$ac_check_lib_save_LIBS
22618 fi
22619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_setproctitle" >&5
22620 $as_echo "$ac_cv_lib_util_setproctitle" >&6; }
22621 if test "x$ac_cv_lib_util_setproctitle" = x""yes; then :
22622   have_setproctitle=yes
22623                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22624 else
22625   have_setproctitle=no
22626                         case " $LIBOBJS " in
22627   *" setproctitle.$ac_objext "* ) ;;
22628   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
22629  ;;
22630 esac
22631
22632                         LIBSRCS="$LIBSRCS setproctitle.c"
22633 fi
22634
22635 fi
22636
22637
22638         if test $have_setproctitle = yes ; then
22639
22640 $as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h
22641
22642         fi
22643 fi
22644
22645 if test $ol_enable_slp != no ; then
22646         for ac_header in slp.h
22647 do :
22648   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22649 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22650 eval as_val=\$$as_ac_Header
22651    if test "x$as_val" = x""yes; then :
22652   cat >>confdefs.h <<_ACEOF
22653 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22654 _ACEOF
22655
22656 fi
22657
22658 done
22659
22660
22661         if test $ac_cv_header_slp_h = yes ; then
22662                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLPOpen in -lslp" >&5
22663 $as_echo_n "checking for SLPOpen in -lslp... " >&6; }
22664 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then :
22665   $as_echo_n "(cached) " >&6
22666 else
22667   ac_check_lib_save_LIBS=$LIBS
22668 LIBS="-lslp  $LIBS"
22669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22670 /* end confdefs.h.  */
22671
22672 /* Override any GCC internal prototype to avoid an error.
22673    Use char because int might match the return type of a GCC
22674    builtin and then its argument prototype would still apply.  */
22675 #ifdef __cplusplus
22676 extern "C"
22677 #endif
22678 char SLPOpen ();
22679 int
22680 main ()
22681 {
22682 return SLPOpen ();
22683   ;
22684   return 0;
22685 }
22686 _ACEOF
22687 if ac_fn_c_try_link "$LINENO"; then :
22688   ac_cv_lib_slp_SLPOpen=yes
22689 else
22690   ac_cv_lib_slp_SLPOpen=no
22691 fi
22692 rm -f core conftest.err conftest.$ac_objext \
22693     conftest$ac_exeext conftest.$ac_ext
22694 LIBS=$ac_check_lib_save_LIBS
22695 fi
22696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slp_SLPOpen" >&5
22697 $as_echo "$ac_cv_lib_slp_SLPOpen" >&6; }
22698 if test "x$ac_cv_lib_slp_SLPOpen" = x""yes; then :
22699   have_slp=yes
22700 else
22701   have_slp=no
22702 fi
22703
22704                 if test $have_slp = yes ; then
22705
22706 $as_echo "#define HAVE_SLP 1" >>confdefs.h
22707
22708                         SLAPD_SLP_LIBS=-lslp
22709                 fi
22710
22711         elif test $ol_enable_slp = yes ; then
22712                 as_fn_error "SLP not found" "$LINENO" 5
22713         fi
22714 fi
22715
22716
22717 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
22718 if test "x$ac_cv_type_mode_t" = x""yes; then :
22719
22720 else
22721
22722 cat >>confdefs.h <<_ACEOF
22723 #define mode_t int
22724 _ACEOF
22725
22726 fi
22727
22728 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
22729 if test "x$ac_cv_type_off_t" = x""yes; then :
22730
22731 else
22732
22733 cat >>confdefs.h <<_ACEOF
22734 #define off_t long
22735 _ACEOF
22736
22737 fi
22738
22739 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
22740 if test "x$ac_cv_type_pid_t" = x""yes; then :
22741
22742 else
22743
22744 cat >>confdefs.h <<_ACEOF
22745 #define pid_t int
22746 _ACEOF
22747
22748 fi
22749
22750 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
22751 if test "x$ac_cv_type_ssize_t" = x""yes; then :
22752
22753 else
22754
22755 cat >>confdefs.h <<_ACEOF
22756 #define ssize_t signed int
22757 _ACEOF
22758
22759 fi
22760
22761 ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
22762 if test "x$ac_cv_type_caddr_t" = x""yes; then :
22763
22764 else
22765
22766 cat >>confdefs.h <<_ACEOF
22767 #define caddr_t char *
22768 _ACEOF
22769
22770 fi
22771
22772 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
22773 if test "x$ac_cv_type_size_t" = x""yes; then :
22774
22775 else
22776
22777 cat >>confdefs.h <<_ACEOF
22778 #define size_t unsigned
22779 _ACEOF
22780
22781 fi
22782
22783
22784 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
22785 if test "x$ac_cv_type_long_long" = x""yes; then :
22786
22787 cat >>confdefs.h <<_ACEOF
22788 #define HAVE_LONG_LONG 1
22789 _ACEOF
22790
22791
22792 fi
22793
22794 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
22795 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
22796
22797 cat >>confdefs.h <<_ACEOF
22798 #define HAVE_PTRDIFF_T 1
22799 _ACEOF
22800
22801
22802 fi
22803
22804
22805
22806 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default
22807 #ifdef HAVE_SYS_SOCKET_H
22808 #include <sys/socket.h>
22809 #endif
22810 "
22811 if test "x$ac_cv_type_socklen_t" = x""yes; then :
22812
22813 fi
22814
22815
22816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the type of arg 3 to accept()" >&5
22817 $as_echo_n "checking the type of arg 3 to accept()... " >&6; }
22818 if test "${ol_cv_type_ber_socklen_t+set}" = set; then :
22819   $as_echo_n "(cached) " >&6
22820 else
22821
22822         set socklen_t int unsigned "unsigned long" long size_t
22823         test "$ac_cv_type_socklen_t" = yes || shift
22824         ol_cv_type_ber_socklen_t=$1 guessing="guessing "
22825         for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
22826                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22827 /* end confdefs.h.  */
22828 $ac_includes_default
22829 #ifdef HAVE_SYS_SOCKET_H
22830 #include <sys/socket.h>
22831 #endif
22832 extern int accept(int s, $addrtype *ap, $lentype *lp);
22833
22834 int
22835 main ()
22836 {
22837
22838 accept(0, (struct sockaddr *) 0, ($lentype *) 0);
22839
22840   ;
22841   return 0;
22842 }
22843 _ACEOF
22844 if ac_fn_c_try_compile "$LINENO"; then :
22845   ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
22846 fi
22847 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22848         done ; done
22849 fi
22850
22851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
22852 $as_echo "$guessing$ol_cv_type_ber_socklen_t *" >&6; }
22853
22854 cat >>confdefs.h <<_ACEOF
22855 #define ber_socklen_t $ol_cv_type_ber_socklen_t
22856 _ACEOF
22857
22858
22859 if test "$ac_cv_type_socklen_t" != yes; then
22860
22861 cat >>confdefs.h <<_ACEOF
22862 #define socklen_t $ol_cv_type_ber_socklen_t
22863 _ACEOF
22864
22865 fi
22866
22867
22868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
22869 $as_echo_n "checking return type of signal handlers... " >&6; }
22870 if test "${ac_cv_type_signal+set}" = set; then :
22871   $as_echo_n "(cached) " >&6
22872 else
22873   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22874 /* end confdefs.h.  */
22875 #include <sys/types.h>
22876 #include <signal.h>
22877
22878 int
22879 main ()
22880 {
22881 return *(signal (0, 0)) (0) == 1;
22882   ;
22883   return 0;
22884 }
22885 _ACEOF
22886 if ac_fn_c_try_compile "$LINENO"; then :
22887   ac_cv_type_signal=int
22888 else
22889   ac_cv_type_signal=void
22890 fi
22891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22892 fi
22893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
22894 $as_echo "$ac_cv_type_signal" >&6; }
22895
22896 cat >>confdefs.h <<_ACEOF
22897 #define RETSIGTYPE $ac_cv_type_signal
22898 _ACEOF
22899
22900
22901
22902 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default
22903 #include <signal.h>
22904
22905 "
22906 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
22907
22908 else
22909
22910 cat >>confdefs.h <<_ACEOF
22911 #define sig_atomic_t int
22912 _ACEOF
22913
22914 fi
22915
22916
22917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
22918 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
22919 if test "${ac_cv_type_uid_t+set}" = set; then :
22920   $as_echo_n "(cached) " >&6
22921 else
22922   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22923 /* end confdefs.h.  */
22924 #include <sys/types.h>
22925
22926 _ACEOF
22927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22928   $EGREP "uid_t" >/dev/null 2>&1; then :
22929   ac_cv_type_uid_t=yes
22930 else
22931   ac_cv_type_uid_t=no
22932 fi
22933 rm -f conftest*
22934
22935 fi
22936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
22937 $as_echo "$ac_cv_type_uid_t" >&6; }
22938 if test $ac_cv_type_uid_t = no; then
22939
22940 $as_echo "#define uid_t int" >>confdefs.h
22941
22942
22943 $as_echo "#define gid_t int" >>confdefs.h
22944
22945 fi
22946
22947
22948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
22949 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
22950 if test "${ac_cv_header_time+set}" = set; then :
22951   $as_echo_n "(cached) " >&6
22952 else
22953   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22954 /* end confdefs.h.  */
22955 #include <sys/types.h>
22956 #include <sys/time.h>
22957 #include <time.h>
22958
22959 int
22960 main ()
22961 {
22962 if ((struct tm *) 0)
22963 return 0;
22964   ;
22965   return 0;
22966 }
22967 _ACEOF
22968 if ac_fn_c_try_compile "$LINENO"; then :
22969   ac_cv_header_time=yes
22970 else
22971   ac_cv_header_time=no
22972 fi
22973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22974 fi
22975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
22976 $as_echo "$ac_cv_header_time" >&6; }
22977 if test $ac_cv_header_time = yes; then
22978
22979 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
22980
22981 fi
22982
22983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
22984 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
22985 if test "${ac_cv_struct_tm+set}" = set; then :
22986   $as_echo_n "(cached) " >&6
22987 else
22988   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22989 /* end confdefs.h.  */
22990 #include <sys/types.h>
22991 #include <time.h>
22992
22993 int
22994 main ()
22995 {
22996 struct tm tm;
22997                                      int *p = &tm.tm_sec;
22998                                      return !p;
22999   ;
23000   return 0;
23001 }
23002 _ACEOF
23003 if ac_fn_c_try_compile "$LINENO"; then :
23004   ac_cv_struct_tm=time.h
23005 else
23006   ac_cv_struct_tm=sys/time.h
23007 fi
23008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23009 fi
23010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
23011 $as_echo "$ac_cv_struct_tm" >&6; }
23012 if test $ac_cv_struct_tm = sys/time.h; then
23013
23014 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
23015
23016 fi
23017
23018 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
23019 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
23020
23021 cat >>confdefs.h <<_ACEOF
23022 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
23023 _ACEOF
23024
23025
23026 fi
23027
23028 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "$ac_includes_default
23029 #include <pwd.h>
23030 "
23031 if test "x$ac_cv_member_struct_passwd_pw_gecos" = x""yes; then :
23032
23033 cat >>confdefs.h <<_ACEOF
23034 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
23035 _ACEOF
23036
23037
23038 fi
23039
23040 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "$ac_includes_default
23041 #include <pwd.h>
23042 "
23043 if test "x$ac_cv_member_struct_passwd_pw_passwd" = x""yes; then :
23044
23045 cat >>confdefs.h <<_ACEOF
23046 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
23047 _ACEOF
23048
23049
23050 fi
23051
23052
23053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if toupper() requires islower()" >&5
23054 $as_echo_n "checking if toupper() requires islower()... " >&6; }
23055 if test "${ol_cv_c_upper_lower+set}" = set; then :
23056   $as_echo_n "(cached) " >&6
23057 else
23058
23059         if test "$cross_compiling" = yes; then :
23060   ol_cv_c_upper_lower=safe
23061 else
23062   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23063 /* end confdefs.h.  */
23064
23065 #include <ctype.h>
23066 main()
23067 {
23068         if ('C' == toupper('C'))
23069                 exit(0);
23070         else
23071                 exit(1);
23072 }
23073 _ACEOF
23074 if ac_fn_c_try_run "$LINENO"; then :
23075   ol_cv_c_upper_lower=no
23076 else
23077   ol_cv_c_upper_lower=yes
23078 fi
23079 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23080   conftest.$ac_objext conftest.beam conftest.$ac_ext
23081 fi
23082
23083 fi
23084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_upper_lower" >&5
23085 $as_echo "$ol_cv_c_upper_lower" >&6; }
23086 if test $ol_cv_c_upper_lower != no ; then
23087
23088 $as_echo "#define C_UPPER_LOWER 1" >>confdefs.h
23089
23090 fi
23091
23092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
23093 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
23094 if test "${ac_cv_c_const+set}" = set; then :
23095   $as_echo_n "(cached) " >&6
23096 else
23097   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23098 /* end confdefs.h.  */
23099
23100 int
23101 main ()
23102 {
23103 /* FIXME: Include the comments suggested by Paul. */
23104 #ifndef __cplusplus
23105   /* Ultrix mips cc rejects this.  */
23106   typedef int charset[2];
23107   const charset cs;
23108   /* SunOS 4.1.1 cc rejects this.  */
23109   char const *const *pcpcc;
23110   char **ppc;
23111   /* NEC SVR4.0.2 mips cc rejects this.  */
23112   struct point {int x, y;};
23113   static struct point const zero = {0,0};
23114   /* AIX XL C 1.02.0.0 rejects this.
23115      It does not let you subtract one const X* pointer from another in
23116      an arm of an if-expression whose if-part is not a constant
23117      expression */
23118   const char *g = "string";
23119   pcpcc = &g + (g ? g-g : 0);
23120   /* HPUX 7.0 cc rejects these. */
23121   ++pcpcc;
23122   ppc = (char**) pcpcc;
23123   pcpcc = (char const *const *) ppc;
23124   { /* SCO 3.2v4 cc rejects this.  */
23125     char *t;
23126     char const *s = 0 ? (char *) 0 : (char const *) 0;
23127
23128     *t++ = 0;
23129     if (s) return 0;
23130   }
23131   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23132     int x[] = {25, 17};
23133     const int *foo = &x[0];
23134     ++foo;
23135   }
23136   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23137     typedef const int *iptr;
23138     iptr p = 0;
23139     ++p;
23140   }
23141   { /* AIX XL C 1.02.0.0 rejects this saying
23142        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23143     struct s { int j; const int *ap[3]; };
23144     struct s *b; b->j = 5;
23145   }
23146   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23147     const int foo = 10;
23148     if (!foo) return 0;
23149   }
23150   return !cs[0] && !zero.x;
23151 #endif
23152
23153   ;
23154   return 0;
23155 }
23156 _ACEOF
23157 if ac_fn_c_try_compile "$LINENO"; then :
23158   ac_cv_c_const=yes
23159 else
23160   ac_cv_c_const=no
23161 fi
23162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23163 fi
23164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
23165 $as_echo "$ac_cv_c_const" >&6; }
23166 if test $ac_cv_c_const = no; then
23167
23168 $as_echo "#define const /**/" >>confdefs.h
23169
23170 fi
23171
23172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler understands volatile" >&5
23173 $as_echo_n "checking if compiler understands volatile... " >&6; }
23174 if test "${ol_cv_c_volatile+set}" = set; then :
23175   $as_echo_n "(cached) " >&6
23176 else
23177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23178 /* end confdefs.h.  */
23179 int x, y, z;
23180 int
23181 main ()
23182 {
23183 volatile int a; int * volatile b = x ? &y : &z;
23184       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23185       *b = 0;
23186   ;
23187   return 0;
23188 }
23189 _ACEOF
23190 if ac_fn_c_try_compile "$LINENO"; then :
23191   ol_cv_c_volatile=yes
23192 else
23193   ol_cv_c_volatile=no
23194 fi
23195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23196 fi
23197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_volatile" >&5
23198 $as_echo "$ol_cv_c_volatile" >&6; }
23199   if test $ol_cv_c_volatile = yes; then
23200     :
23201   else
23202
23203 $as_echo "#define volatile /**/" >>confdefs.h
23204
23205   fi
23206
23207
23208 if test $cross_compiling = yes ; then
23209         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Crossing compiling... all bets are off!" >&5
23210 $as_echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
23211
23212 $as_echo "#define CROSS_COMPILING 1" >>confdefs.h
23213
23214 else
23215          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
23216 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
23217 if test "${ac_cv_c_bigendian+set}" = set; then :
23218   $as_echo_n "(cached) " >&6
23219 else
23220   ac_cv_c_bigendian=unknown
23221     # See if we're dealing with a universal compiler.
23222     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23223 /* end confdefs.h.  */
23224 #ifndef __APPLE_CC__
23225                not a universal capable compiler
23226              #endif
23227              typedef int dummy;
23228
23229 _ACEOF
23230 if ac_fn_c_try_compile "$LINENO"; then :
23231
23232         # Check for potential -arch flags.  It is not universal unless
23233         # there are at least two -arch flags with different values.
23234         ac_arch=
23235         ac_prev=
23236         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
23237          if test -n "$ac_prev"; then
23238            case $ac_word in
23239              i?86 | x86_64 | ppc | ppc64)
23240                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
23241                  ac_arch=$ac_word
23242                else
23243                  ac_cv_c_bigendian=universal
23244                  break
23245                fi
23246                ;;
23247            esac
23248            ac_prev=
23249          elif test "x$ac_word" = "x-arch"; then
23250            ac_prev=arch
23251          fi
23252        done
23253 fi
23254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23255     if test $ac_cv_c_bigendian = unknown; then
23256       # See if sys/param.h defines the BYTE_ORDER macro.
23257       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23258 /* end confdefs.h.  */
23259 #include <sys/types.h>
23260              #include <sys/param.h>
23261
23262 int
23263 main ()
23264 {
23265 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23266                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23267                      && LITTLE_ENDIAN)
23268               bogus endian macros
23269              #endif
23270
23271   ;
23272   return 0;
23273 }
23274 _ACEOF
23275 if ac_fn_c_try_compile "$LINENO"; then :
23276   # It does; now see whether it defined to BIG_ENDIAN or not.
23277          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23278 /* end confdefs.h.  */
23279 #include <sys/types.h>
23280                 #include <sys/param.h>
23281
23282 int
23283 main ()
23284 {
23285 #if BYTE_ORDER != BIG_ENDIAN
23286                  not big endian
23287                 #endif
23288
23289   ;
23290   return 0;
23291 }
23292 _ACEOF
23293 if ac_fn_c_try_compile "$LINENO"; then :
23294   ac_cv_c_bigendian=yes
23295 else
23296   ac_cv_c_bigendian=no
23297 fi
23298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23299 fi
23300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23301     fi
23302     if test $ac_cv_c_bigendian = unknown; then
23303       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23304       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23305 /* end confdefs.h.  */
23306 #include <limits.h>
23307
23308 int
23309 main ()
23310 {
23311 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23312               bogus endian macros
23313              #endif
23314
23315   ;
23316   return 0;
23317 }
23318 _ACEOF
23319 if ac_fn_c_try_compile "$LINENO"; then :
23320   # It does; now see whether it defined to _BIG_ENDIAN or not.
23321          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23322 /* end confdefs.h.  */
23323 #include <limits.h>
23324
23325 int
23326 main ()
23327 {
23328 #ifndef _BIG_ENDIAN
23329                  not big endian
23330                 #endif
23331
23332   ;
23333   return 0;
23334 }
23335 _ACEOF
23336 if ac_fn_c_try_compile "$LINENO"; then :
23337   ac_cv_c_bigendian=yes
23338 else
23339   ac_cv_c_bigendian=no
23340 fi
23341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23342 fi
23343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23344     fi
23345     if test $ac_cv_c_bigendian = unknown; then
23346       # Compile a test program.
23347       if test "$cross_compiling" = yes; then :
23348   # Try to guess by grepping values from an object file.
23349          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23350 /* end confdefs.h.  */
23351 short int ascii_mm[] =
23352                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23353                 short int ascii_ii[] =
23354                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23355                 int use_ascii (int i) {
23356                   return ascii_mm[i] + ascii_ii[i];
23357                 }
23358                 short int ebcdic_ii[] =
23359                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23360                 short int ebcdic_mm[] =
23361                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23362                 int use_ebcdic (int i) {
23363                   return ebcdic_mm[i] + ebcdic_ii[i];
23364                 }
23365                 extern int foo;
23366
23367 int
23368 main ()
23369 {
23370 return use_ascii (foo) == use_ebcdic (foo);
23371   ;
23372   return 0;
23373 }
23374 _ACEOF
23375 if ac_fn_c_try_compile "$LINENO"; then :
23376   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
23377               ac_cv_c_bigendian=yes
23378             fi
23379             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23380               if test "$ac_cv_c_bigendian" = unknown; then
23381                 ac_cv_c_bigendian=no
23382               else
23383                 # finding both strings is unlikely to happen, but who knows?
23384                 ac_cv_c_bigendian=unknown
23385               fi
23386             fi
23387 fi
23388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23389 else
23390   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23391 /* end confdefs.h.  */
23392 $ac_includes_default
23393 int
23394 main ()
23395 {
23396
23397              /* Are we little or big endian?  From Harbison&Steele.  */
23398              union
23399              {
23400                long int l;
23401                char c[sizeof (long int)];
23402              } u;
23403              u.l = 1;
23404              return u.c[sizeof (long int) - 1] == 1;
23405
23406   ;
23407   return 0;
23408 }
23409 _ACEOF
23410 if ac_fn_c_try_run "$LINENO"; then :
23411   ac_cv_c_bigendian=no
23412 else
23413   ac_cv_c_bigendian=yes
23414 fi
23415 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23416   conftest.$ac_objext conftest.beam conftest.$ac_ext
23417 fi
23418
23419     fi
23420 fi
23421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
23422 $as_echo "$ac_cv_c_bigendian" >&6; }
23423  case $ac_cv_c_bigendian in #(
23424    yes)
23425      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
23426 ;; #(
23427    no)
23428       ;; #(
23429    universal)
23430
23431 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
23432
23433      ;; #(
23434    *)
23435      as_fn_error "unknown endianness
23436  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
23437  esac
23438
23439 fi
23440
23441 # The cast to long int works around a bug in the HP C Compiler
23442 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23443 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23444 # This bug is HP SR number 8606223364.
23445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23446 $as_echo_n "checking size of short... " >&6; }
23447 if test "${ac_cv_sizeof_short+set}" = set; then :
23448   $as_echo_n "(cached) " >&6
23449 else
23450   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23451
23452 else
23453   if test "$ac_cv_type_short" = yes; then
23454      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23455 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23456 { as_fn_set_status 77
23457 as_fn_error "cannot compute sizeof (short)
23458 See \`config.log' for more details." "$LINENO" 5; }; }
23459    else
23460      ac_cv_sizeof_short=0
23461    fi
23462 fi
23463
23464 fi
23465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23466 $as_echo "$ac_cv_sizeof_short" >&6; }
23467
23468
23469
23470 cat >>confdefs.h <<_ACEOF
23471 #define SIZEOF_SHORT $ac_cv_sizeof_short
23472 _ACEOF
23473
23474
23475 # The cast to long int works around a bug in the HP C Compiler
23476 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23477 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23478 # This bug is HP SR number 8606223364.
23479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23480 $as_echo_n "checking size of int... " >&6; }
23481 if test "${ac_cv_sizeof_int+set}" = set; then :
23482   $as_echo_n "(cached) " >&6
23483 else
23484   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23485
23486 else
23487   if test "$ac_cv_type_int" = yes; then
23488      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23489 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23490 { as_fn_set_status 77
23491 as_fn_error "cannot compute sizeof (int)
23492 See \`config.log' for more details." "$LINENO" 5; }; }
23493    else
23494      ac_cv_sizeof_int=0
23495    fi
23496 fi
23497
23498 fi
23499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23500 $as_echo "$ac_cv_sizeof_int" >&6; }
23501
23502
23503
23504 cat >>confdefs.h <<_ACEOF
23505 #define SIZEOF_INT $ac_cv_sizeof_int
23506 _ACEOF
23507
23508
23509 # The cast to long int works around a bug in the HP C Compiler
23510 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23511 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23512 # This bug is HP SR number 8606223364.
23513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23514 $as_echo_n "checking size of long... " >&6; }
23515 if test "${ac_cv_sizeof_long+set}" = set; then :
23516   $as_echo_n "(cached) " >&6
23517 else
23518   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23519
23520 else
23521   if test "$ac_cv_type_long" = yes; then
23522      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23523 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23524 { as_fn_set_status 77
23525 as_fn_error "cannot compute sizeof (long)
23526 See \`config.log' for more details." "$LINENO" 5; }; }
23527    else
23528      ac_cv_sizeof_long=0
23529    fi
23530 fi
23531
23532 fi
23533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23534 $as_echo "$ac_cv_sizeof_long" >&6; }
23535
23536
23537
23538 cat >>confdefs.h <<_ACEOF
23539 #define SIZEOF_LONG $ac_cv_sizeof_long
23540 _ACEOF
23541
23542
23543 # The cast to long int works around a bug in the HP C Compiler
23544 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23545 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23546 # This bug is HP SR number 8606223364.
23547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
23548 $as_echo_n "checking size of long long... " >&6; }
23549 if test "${ac_cv_sizeof_long_long+set}" = set; then :
23550   $as_echo_n "(cached) " >&6
23551 else
23552   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
23553
23554 else
23555   if test "$ac_cv_type_long_long" = yes; then
23556      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23557 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23558 { as_fn_set_status 77
23559 as_fn_error "cannot compute sizeof (long long)
23560 See \`config.log' for more details." "$LINENO" 5; }; }
23561    else
23562      ac_cv_sizeof_long_long=0
23563    fi
23564 fi
23565
23566 fi
23567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
23568 $as_echo "$ac_cv_sizeof_long_long" >&6; }
23569
23570
23571
23572 cat >>confdefs.h <<_ACEOF
23573 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
23574 _ACEOF
23575
23576
23577 # The cast to long int works around a bug in the HP C Compiler
23578 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23579 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23580 # This bug is HP SR number 8606223364.
23581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
23582 $as_echo_n "checking size of wchar_t... " >&6; }
23583 if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
23584   $as_echo_n "(cached) " >&6
23585 else
23586   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "$ac_includes_default"; then :
23587
23588 else
23589   if test "$ac_cv_type_wchar_t" = yes; then
23590      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23591 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23592 { as_fn_set_status 77
23593 as_fn_error "cannot compute sizeof (wchar_t)
23594 See \`config.log' for more details." "$LINENO" 5; }; }
23595    else
23596      ac_cv_sizeof_wchar_t=0
23597    fi
23598 fi
23599
23600 fi
23601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
23602 $as_echo "$ac_cv_sizeof_wchar_t" >&6; }
23603
23604
23605
23606 cat >>confdefs.h <<_ACEOF
23607 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23608 _ACEOF
23609
23610
23611
23612 if test "$ac_cv_sizeof_int" -lt 4 ; then
23613         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
23614 $as_echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
23615
23616
23617 $as_echo "#define LBER_INT_T long" >>confdefs.h
23618
23619 else
23620
23621 $as_echo "#define LBER_INT_T int" >>confdefs.h
23622
23623 fi
23624
23625
23626 $as_echo "#define LBER_LEN_T long" >>confdefs.h
23627
23628
23629 $as_echo "#define LBER_SOCKET_T int" >>confdefs.h
23630
23631
23632 $as_echo "#define LBER_TAG_T long" >>confdefs.h
23633
23634
23635 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
23636         if test $ac_cv_sizeof_long_long -gt 4 ; then
23637                 ol_with_mp=longlong
23638
23639 $as_echo "#define USE_MP_LONG_LONG 1" >>confdefs.h
23640
23641         elif test $ol_with_mp = longlong ; then
23642                 as_fn_error "long long unusable for multiple precision" "$LINENO" 5
23643         fi
23644 fi
23645 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
23646         if test $ac_cv_sizeof_long -gt 4 ; then
23647                 ol_with_mp=long
23648
23649 $as_echo "#define USE_MP_LONG 1" >>confdefs.h
23650
23651         elif test $ol_with_mp = long ; then
23652                 as_fn_error "long unusable for multiple precision" "$LINENO" 5
23653         fi
23654 fi
23655 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
23656         for ac_header in openssl/bn.h
23657 do :
23658   ac_fn_c_check_header_mongrel "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default"
23659 if test "x$ac_cv_header_openssl_bn_h" = x""yes; then :
23660   cat >>confdefs.h <<_ACEOF
23661 #define HAVE_OPENSSL_BN_H 1
23662 _ACEOF
23663
23664 fi
23665
23666 done
23667
23668         for ac_header in openssl/crypto.h
23669 do :
23670   ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
23671 if test "x$ac_cv_header_openssl_crypto_h" = x""yes; then :
23672   cat >>confdefs.h <<_ACEOF
23673 #define HAVE_OPENSSL_CRYPTO_H 1
23674 _ACEOF
23675
23676 fi
23677
23678 done
23679
23680         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
23681                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
23682                 test "$ol_with_tls" = "found" ; then
23683                 ol_with_mp=bignum
23684
23685 $as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h
23686
23687         elif test $ol_with_mp = bignum ; then
23688                 as_fn_error "bignum not available" "$LINENO" 5
23689         fi
23690 fi
23691 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
23692         for ac_header in gmp.h
23693 do :
23694   ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
23695 if test "x$ac_cv_header_gmp_h" = x""yes; then :
23696   cat >>confdefs.h <<_ACEOF
23697 #define HAVE_GMP_H 1
23698 _ACEOF
23699
23700 fi
23701
23702 done
23703
23704         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_add_ui in -lgmp" >&5
23705 $as_echo_n "checking for __gmpz_add_ui in -lgmp... " >&6; }
23706 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then :
23707   $as_echo_n "(cached) " >&6
23708 else
23709   ac_check_lib_save_LIBS=$LIBS
23710 LIBS="-lgmp  $LIBS"
23711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23712 /* end confdefs.h.  */
23713
23714 /* Override any GCC internal prototype to avoid an error.
23715    Use char because int might match the return type of a GCC
23716    builtin and then its argument prototype would still apply.  */
23717 #ifdef __cplusplus
23718 extern "C"
23719 #endif
23720 char __gmpz_add_ui ();
23721 int
23722 main ()
23723 {
23724 return __gmpz_add_ui ();
23725   ;
23726   return 0;
23727 }
23728 _ACEOF
23729 if ac_fn_c_try_link "$LINENO"; then :
23730   ac_cv_lib_gmp___gmpz_add_ui=yes
23731 else
23732   ac_cv_lib_gmp___gmpz_add_ui=no
23733 fi
23734 rm -f core conftest.err conftest.$ac_objext \
23735     conftest$ac_exeext conftest.$ac_ext
23736 LIBS=$ac_check_lib_save_LIBS
23737 fi
23738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
23739 $as_echo "$ac_cv_lib_gmp___gmpz_add_ui" >&6; }
23740 if test "x$ac_cv_lib_gmp___gmpz_add_ui" = x""yes; then :
23741   cat >>confdefs.h <<_ACEOF
23742 #define HAVE_LIBGMP 1
23743 _ACEOF
23744
23745   LIBS="-lgmp $LIBS"
23746
23747 fi
23748
23749         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
23750
23751 $as_echo "#define USE_MP_GMP 1" >>confdefs.h
23752
23753                 ol_with_mp=gmp
23754         elif test $ol_with_mp = gmp ; then
23755                 as_fn_error "gmp not available" "$LINENO" 5
23756         fi
23757 fi
23758 if test $ol_with_mp = auto ; then
23759         ol_with_mp=no
23760 fi
23761
23762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
23763 $as_echo_n "checking for working memcmp... " >&6; }
23764 if test "${ac_cv_func_memcmp_working+set}" = set; then :
23765   $as_echo_n "(cached) " >&6
23766 else
23767   if test "$cross_compiling" = yes; then :
23768   ac_cv_func_memcmp_working=no
23769 else
23770   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23771 /* end confdefs.h.  */
23772 $ac_includes_default
23773 int
23774 main ()
23775 {
23776
23777   /* Some versions of memcmp are not 8-bit clean.  */
23778   char c0 = '\100', c1 = '\200', c2 = '\201';
23779   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
23780     return 1;
23781
23782   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
23783      or more and with at least one buffer not starting on a 4-byte boundary.
23784      William Lewis provided this test program.   */
23785   {
23786     char foo[21];
23787     char bar[21];
23788     int i;
23789     for (i = 0; i < 4; i++)
23790       {
23791         char *a = foo + i;
23792         char *b = bar + i;
23793         strcpy (a, "--------01111111");
23794         strcpy (b, "--------10000000");
23795         if (memcmp (a, b, 16) >= 0)
23796           return 1;
23797       }
23798     return 0;
23799   }
23800
23801   ;
23802   return 0;
23803 }
23804 _ACEOF
23805 if ac_fn_c_try_run "$LINENO"; then :
23806   ac_cv_func_memcmp_working=yes
23807 else
23808   ac_cv_func_memcmp_working=no
23809 fi
23810 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23811   conftest.$ac_objext conftest.beam conftest.$ac_ext
23812 fi
23813
23814 fi
23815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
23816 $as_echo "$ac_cv_func_memcmp_working" >&6; }
23817 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
23818   *" memcmp.$ac_objext "* ) ;;
23819   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
23820  ;;
23821 esac
23822
23823
23824
23825 if test $ac_cv_func_memcmp_working = no ; then
23826
23827 $as_echo "#define NEED_MEMCMP_REPLACEMENT 1" >>confdefs.h
23828
23829 fi
23830
23831 for ac_func in strftime
23832 do :
23833   ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23834 if test "x$ac_cv_func_strftime" = x""yes; then :
23835   cat >>confdefs.h <<_ACEOF
23836 #define HAVE_STRFTIME 1
23837 _ACEOF
23838
23839 else
23840   # strftime is in -lintl on SCO UNIX.
23841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
23842 $as_echo_n "checking for strftime in -lintl... " >&6; }
23843 if test "${ac_cv_lib_intl_strftime+set}" = set; then :
23844   $as_echo_n "(cached) " >&6
23845 else
23846   ac_check_lib_save_LIBS=$LIBS
23847 LIBS="-lintl  $LIBS"
23848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23849 /* end confdefs.h.  */
23850
23851 /* Override any GCC internal prototype to avoid an error.
23852    Use char because int might match the return type of a GCC
23853    builtin and then its argument prototype would still apply.  */
23854 #ifdef __cplusplus
23855 extern "C"
23856 #endif
23857 char strftime ();
23858 int
23859 main ()
23860 {
23861 return strftime ();
23862   ;
23863   return 0;
23864 }
23865 _ACEOF
23866 if ac_fn_c_try_link "$LINENO"; then :
23867   ac_cv_lib_intl_strftime=yes
23868 else
23869   ac_cv_lib_intl_strftime=no
23870 fi
23871 rm -f core conftest.err conftest.$ac_objext \
23872     conftest$ac_exeext conftest.$ac_ext
23873 LIBS=$ac_check_lib_save_LIBS
23874 fi
23875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
23876 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
23877 if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
23878   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
23879
23880 LIBS="-lintl $LIBS"
23881 fi
23882
23883 fi
23884 done
23885
23886
23887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton()" >&5
23888 $as_echo_n "checking for inet_aton()... " >&6; }
23889 if test "${ol_cv_func_inet_aton+set}" = set; then :
23890   $as_echo_n "(cached) " >&6
23891 else
23892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23893 /* end confdefs.h.  */
23894
23895 #ifdef HAVE_SYS_TYPES_H
23896 #       include <sys/types.h>
23897 #endif
23898 #ifdef HAVE_SYS_SOCKET_H
23899 #       include <sys/socket.h>
23900 #       ifdef HAVE_SYS_SELECT_H
23901 #               include <sys/select.h>
23902 #       endif
23903 #       include <netinet/in.h>
23904 #       ifdef HAVE_ARPA_INET_H
23905 #               include <arpa/inet.h>
23906 #       endif
23907 #endif
23908
23909 int
23910 main ()
23911 {
23912 struct in_addr in;
23913 int rc = inet_aton( "255.255.255.255", &in );
23914   ;
23915   return 0;
23916 }
23917 _ACEOF
23918 if ac_fn_c_try_link "$LINENO"; then :
23919   ol_cv_func_inet_aton=yes
23920 else
23921   ol_cv_func_inet_aton=no
23922 fi
23923 rm -f core conftest.err conftest.$ac_objext \
23924     conftest$ac_exeext conftest.$ac_ext
23925 fi
23926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_inet_aton" >&5
23927 $as_echo "$ol_cv_func_inet_aton" >&6; }
23928   if test $ol_cv_func_inet_aton != no; then
23929
23930 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
23931
23932   fi
23933
23934
23935 ac_fn_c_check_func "$LINENO" "_spawnlp" "ac_cv_func__spawnlp"
23936 if test "x$ac_cv_func__spawnlp" = x""yes; then :
23937
23938 $as_echo "#define HAVE_SPAWNLP 1" >>confdefs.h
23939
23940 fi
23941
23942
23943 ac_fn_c_check_func "$LINENO" "_snprintf" "ac_cv_func__snprintf"
23944 if test "x$ac_cv_func__snprintf" = x""yes; then :
23945   ac_cv_func_snprintf=yes
23946
23947 $as_echo "#define snprintf _snprintf" >>confdefs.h
23948
23949
23950 fi
23951
23952
23953 for ac_func in vsnprintf _vsnprintf
23954 do :
23955   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23956 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23957 eval as_val=\$$as_ac_var
23958    if test "x$as_val" = x""yes; then :
23959   cat >>confdefs.h <<_ACEOF
23960 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23961 _ACEOF
23962
23963 fi
23964 done
23965
23966
23967 if test $ac_cv_func_vsnprintf = no -a $ac_cv_func__vsnprintf = yes ; then
23968         ac_cv_func_vsnprintf=yes
23969
23970 $as_echo "#define vsnprintf _vsnprintf" >>confdefs.h
23971
23972 fi
23973
23974 for ac_func in vprintf
23975 do :
23976   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
23977 if test "x$ac_cv_func_vprintf" = x""yes; then :
23978   cat >>confdefs.h <<_ACEOF
23979 #define HAVE_VPRINTF 1
23980 _ACEOF
23981
23982 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
23983 if test "x$ac_cv_func__doprnt" = x""yes; then :
23984
23985 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
23986
23987 fi
23988
23989 fi
23990 done
23991
23992
23993
23994 if test $ac_cv_func_vprintf = yes ; then
23995                 for ac_func in snprintf vsnprintf
23996 do :
23997   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23998 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23999 eval as_val=\$$as_ac_var
24000    if test "x$as_val" = x""yes; then :
24001   cat >>confdefs.h <<_ACEOF
24002 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24003 _ACEOF
24004
24005 fi
24006 done
24007
24008 fi
24009
24010 for ac_func in \
24011         bcopy                   \
24012         closesocket             \
24013         chroot                  \
24014         endgrent                \
24015         endpwent                \
24016         fcntl                   \
24017         flock                   \
24018         fstat                   \
24019         getdtablesize           \
24020         geteuid                 \
24021         getgrgid                \
24022         gethostname             \
24023         getpassphrase           \
24024         getpwuid                \
24025         getpwnam                \
24026         getspnam                \
24027         gettimeofday            \
24028         initgroups              \
24029         inet_ntoa_b             \
24030         ioctl                   \
24031         lockf                   \
24032         memcpy                  \
24033         memmove                 \
24034         memrchr                 \
24035         mkstemp                 \
24036         mktemp                  \
24037         pipe                    \
24038         read                    \
24039         recv                    \
24040         recvfrom                \
24041         setpwfile               \
24042         setgid                  \
24043         setegid                 \
24044         setsid                  \
24045         setuid                  \
24046         seteuid                 \
24047         signal                  \
24048         strdup                  \
24049         strpbrk                 \
24050         strrchr                 \
24051         strsep                  \
24052         strstr                  \
24053         strtol                  \
24054         strtoul                 \
24055         strtoq                  \
24056         strtouq                 \
24057         strtoll                 \
24058         strtoull                \
24059         strspn                  \
24060         sysconf                 \
24061         waitpid                 \
24062         wait4                   \
24063         write                   \
24064         send                    \
24065         sendmsg                 \
24066         sendto                  \
24067
24068 do :
24069   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24070 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24071 eval as_val=\$$as_ac_var
24072    if test "x$as_val" = x""yes; then :
24073   cat >>confdefs.h <<_ACEOF
24074 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24075 _ACEOF
24076
24077 fi
24078 done
24079
24080
24081 for ac_func in getopt getpeereid
24082 do :
24083   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24084 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24085 eval as_val=\$$as_ac_var
24086    if test "x$as_val" = x""yes; then :
24087   cat >>confdefs.h <<_ACEOF
24088 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24089 _ACEOF
24090
24091 else
24092   case " $LIBOBJS " in
24093   *" $ac_func.$ac_objext "* ) ;;
24094   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
24095  ;;
24096 esac
24097
24098 fi
24099 done
24100
24101
24102
24103 if test "$ac_cv_func_getopt" != yes; then
24104         LIBSRCS="$LIBSRCS getopt.c"
24105 fi
24106
24107 if test "$ac_cv_func_getpeereid" != yes; then
24108         for ac_func in getpeerucred
24109 do :
24110   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24111 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24112 eval as_val=\$$as_ac_var
24113    if test "x$as_val" = x""yes; then :
24114   cat >>confdefs.h <<_ACEOF
24115 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24116 _ACEOF
24117
24118 fi
24119 done
24120
24121         if test "$ac_cv_func_getpeerucred" != yes ; then
24122                 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrightslen" "ac_cv_member_struct_msghdr_msg_accrightslen" "$ac_includes_default
24123 #ifdef HAVE_SYS_SOCKET_H
24124 #include <sys/socket.h>
24125 #endif
24126 "
24127 if test "x$ac_cv_member_struct_msghdr_msg_accrightslen" = x""yes; then :
24128
24129 cat >>confdefs.h <<_ACEOF
24130 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
24131 _ACEOF
24132
24133
24134 fi
24135
24136                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
24137                         ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "$ac_includes_default
24138 #ifdef HAVE_SYS_SOCKET_H
24139 #include <sys/socket.h>
24140 #endif
24141 "
24142 if test "x$ac_cv_member_struct_msghdr_msg_control" = x""yes; then :
24143
24144 cat >>confdefs.h <<_ACEOF
24145 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
24146 _ACEOF
24147
24148
24149 fi
24150
24151                 fi
24152                 ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default"
24153 if test "x$ac_cv_member_struct_stat_st_fstype" = x""yes; then :
24154
24155 cat >>confdefs.h <<_ACEOF
24156 #define HAVE_STRUCT_STAT_ST_FSTYPE 1
24157 _ACEOF
24158
24159
24160 fi
24161 ac_fn_c_check_member "$LINENO" "struct stat" "st_vfstype" "ac_cv_member_struct_stat_st_vfstype" "$ac_includes_default"
24162 if test "x$ac_cv_member_struct_stat_st_vfstype" = x""yes; then :
24163
24164 cat >>confdefs.h <<_ACEOF
24165 #define HAVE_STRUCT_STAT_ST_VFSTYPE 1
24166 _ACEOF
24167
24168
24169 fi
24170
24171                 if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
24172                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24173 /* end confdefs.h.  */
24174 struct stat st; char *ptr=st.st_fstype;
24175 _ACEOF
24176 if ac_fn_c_try_compile "$LINENO"; then :
24177
24178 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1" >>confdefs.h
24179
24180 else
24181
24182 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1" >>confdefs.h
24183
24184 fi
24185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24186                 fi
24187         fi
24188         LIBSRCS="$LIBSRCS getpeereid.c"
24189 fi
24190
24191 if test "$ac_cv_func_snprintf" != yes ||
24192    test "$ac_cv_func_vsnprintf" != yes; then
24193         if test "$ac_cv_func_snprintf" != yes; then
24194
24195 $as_echo "#define snprintf ber_pvt_snprintf" >>confdefs.h
24196
24197         fi
24198         if test "$ac_cv_func_vsnprintf" != yes; then
24199
24200 $as_echo "#define vsnprintf ber_pvt_vsnprintf" >>confdefs.h
24201
24202         fi
24203 fi
24204
24205
24206 if test "$ol_enable_slapi" != no ; then
24207                         for ac_header in ltdl.h
24208 do :
24209   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
24210 if test "x$ac_cv_header_ltdl_h" = x""yes; then :
24211   cat >>confdefs.h <<_ACEOF
24212 #define HAVE_LTDL_H 1
24213 _ACEOF
24214
24215 fi
24216
24217 done
24218
24219
24220         if test $ac_cv_header_ltdl_h != yes ; then
24221                 as_fn_error "could not locate <ltdl.h>" "$LINENO" 5
24222         fi
24223         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
24224 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
24225 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
24226   $as_echo_n "(cached) " >&6
24227 else
24228   ac_check_lib_save_LIBS=$LIBS
24229 LIBS="-lltdl  $LIBS"
24230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24231 /* end confdefs.h.  */
24232
24233 /* Override any GCC internal prototype to avoid an error.
24234    Use char because int might match the return type of a GCC
24235    builtin and then its argument prototype would still apply.  */
24236 #ifdef __cplusplus
24237 extern "C"
24238 #endif
24239 char lt_dlinit ();
24240 int
24241 main ()
24242 {
24243 return lt_dlinit ();
24244   ;
24245   return 0;
24246 }
24247 _ACEOF
24248 if ac_fn_c_try_link "$LINENO"; then :
24249   ac_cv_lib_ltdl_lt_dlinit=yes
24250 else
24251   ac_cv_lib_ltdl_lt_dlinit=no
24252 fi
24253 rm -f core conftest.err conftest.$ac_objext \
24254     conftest$ac_exeext conftest.$ac_ext
24255 LIBS=$ac_check_lib_save_LIBS
24256 fi
24257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
24258 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
24259 if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
24260
24261                 SLAPI_LIBS=-lltdl
24262                 LIBSLAPI=slapi/libslapi.la
24263
24264 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
24265
24266
24267 else
24268   as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
24269 fi
24270
24271
24272
24273 $as_echo "#define LDAP_SLAPI 1" >>confdefs.h
24274
24275 fi
24276
24277 if test "$ol_enable_debug" != no ; then
24278         if test "$ol_enable_debug" = traditional; then
24279
24280 $as_echo "#define OLD_DEBUG 1" >>confdefs.h
24281
24282         fi
24283
24284 $as_echo "#define LDAP_DEBUG 1" >>confdefs.h
24285
24286 fi
24287 if test "$ol_enable_syslog" = yes ; then
24288
24289 $as_echo "#define LDAP_SYSLOG 1" >>confdefs.h
24290
24291 fi
24292 if test "$ol_enable_proctitle" != no ; then
24293
24294 $as_echo "#define LDAP_PROCTITLE 1" >>confdefs.h
24295
24296 fi
24297 if test "$ol_enable_referrals" != no ; then
24298
24299 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION" >>confdefs.h
24300
24301 fi
24302 if test "$ol_enable_local" != no; then
24303
24304 $as_echo "#define LDAP_PF_LOCAL 1" >>confdefs.h
24305
24306 fi
24307 if test "$ol_link_ipv6" != no; then
24308
24309 $as_echo "#define LDAP_PF_INET6 1" >>confdefs.h
24310
24311 fi
24312 if test "$ol_enable_cleartext" != no ; then
24313
24314 $as_echo "#define SLAPD_CLEARTEXT 1" >>confdefs.h
24315
24316 fi
24317 if test "$ol_enable_crypt" != no ; then
24318
24319 $as_echo "#define SLAPD_CRYPT 1" >>confdefs.h
24320
24321 fi
24322 if test "$ol_link_spasswd" != no ; then
24323
24324 $as_echo "#define SLAPD_SPASSWD 1" >>confdefs.h
24325
24326 fi
24327 if test "$ol_enable_rlookups" != no ; then
24328
24329 $as_echo "#define SLAPD_RLOOKUPS 1" >>confdefs.h
24330
24331 fi
24332 if test "$ol_enable_aci" != no ; then
24333         if test $ol_enable_dynacl = no ; then
24334                 ol_enable_dynacl=yes
24335                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ACIs need dynacl" >&5
24336 $as_echo "$as_me: WARNING: ACIs need dynacl" >&2;}
24337         fi
24338         if test "$ol_enable_aci" = mod ; then
24339                 MFLAG=SLAPD_MOD_DYNAMIC
24340                                 as_fn_error "ACI build as dynamic module not supported (yet)" "$LINENO" 5
24341         else
24342                 MFLAG=SLAPD_MOD_STATIC
24343         fi
24344         WITH_ACI_ENABLED=$ol_enable_aci
24345
24346 cat >>confdefs.h <<_ACEOF
24347 #define SLAPD_ACI_ENABLED $MFLAG
24348 _ACEOF
24349
24350 else
24351         WITH_ACI_ENABLED=no
24352 fi
24353 if test "$ol_enable_dynacl" != no ; then
24354
24355 $as_echo "#define SLAP_DYNACL 1" >>confdefs.h
24356
24357 fi
24358
24359 if test "$ol_link_modules" != no ; then
24360
24361 $as_echo "#define SLAPD_MODULES 1" >>confdefs.h
24362
24363         BUILD_SLAPD=yes
24364         SLAPD_MODULES_LDFLAGS="-dlopen self"
24365 fi
24366
24367
24368 $as_echo "#define SLAPD_MOD_STATIC 1" >>confdefs.h
24369
24370
24371 $as_echo "#define SLAPD_MOD_DYNAMIC 2" >>confdefs.h
24372
24373
24374 if test "$ol_enable_monitor" != no ; then
24375         BUILD_SLAPD=yes
24376         BUILD_MONITOR=$ol_enable_monitor
24377         if test "$ol_enable_monitor" = mod ; then
24378                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24379                 MFLAG=SLAPD_MOD_DYNAMIC
24380         else
24381                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24382                 MFLAG=SLAPD_MOD_STATIC
24383         fi
24384
24385 cat >>confdefs.h <<_ACEOF
24386 #define SLAPD_MONITOR $MFLAG
24387 _ACEOF
24388
24389 fi
24390
24391 if test "$ol_enable_bdb" != no ; then
24392         BUILD_SLAPD=yes
24393         BUILD_BDB=$ol_enable_bdb
24394         if test "$ol_enable_bdb" = mod ; then
24395                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24396                 MFLAG=SLAPD_MOD_DYNAMIC
24397         else
24398                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24399                 MFLAG=SLAPD_MOD_STATIC
24400         fi
24401
24402 cat >>confdefs.h <<_ACEOF
24403 #define SLAPD_BDB $MFLAG
24404 _ACEOF
24405
24406 fi
24407
24408 if test "$ol_enable_dnssrv" != no ; then
24409         BUILD_SLAPD=yes
24410         BUILD_DNSSRV=$ol_enable_dnssrv
24411         if test "$ol_enable_dnssrv" = mod ; then
24412                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24413                 MFLAG=SLAPD_MOD_DYNAMIC
24414         else
24415                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24416                 MFLAG=SLAPD_MOD_STATIC
24417         fi
24418
24419 cat >>confdefs.h <<_ACEOF
24420 #define SLAPD_DNSSRV $MFLAG
24421 _ACEOF
24422
24423 fi
24424
24425 if test "$ol_enable_hdb" != no ; then
24426         BUILD_SLAPD=yes
24427         BUILD_HDB=$ol_enable_hdb
24428         if test "$ol_enable_hdb" = mod ; then
24429                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24430                 MFLAG=SLAPD_MOD_DYNAMIC
24431         else
24432                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24433                 MFLAG=SLAPD_MOD_STATIC
24434         fi
24435
24436 cat >>confdefs.h <<_ACEOF
24437 #define SLAPD_HDB $MFLAG
24438 _ACEOF
24439
24440 fi
24441
24442 if test "$ol_enable_ldap" != no ; then
24443         BUILD_SLAPD=yes
24444         BUILD_LDAP=$ol_enable_ldap
24445         if test "$ol_enable_ldap" = mod ; then
24446                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24447                 MFLAG=SLAPD_MOD_DYNAMIC
24448         else
24449                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24450                 MFLAG=SLAPD_MOD_STATIC
24451         fi
24452
24453 cat >>confdefs.h <<_ACEOF
24454 #define SLAPD_LDAP $MFLAG
24455 _ACEOF
24456
24457 fi
24458
24459 if test "$ol_enable_mdb" != no ; then
24460         BUILD_SLAPD=yes
24461         BUILD_MDB=$ol_enable_mdb
24462         if test "$ol_enable_mdb" = mod ; then
24463                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-mdb"
24464                 MFLAG=SLAPD_MOD_DYNAMIC
24465         else
24466                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-mdb"
24467                 MFLAG=SLAPD_MOD_STATIC
24468         fi
24469
24470 cat >>confdefs.h <<_ACEOF
24471 #define SLAPD_MDB $MFLAG
24472 _ACEOF
24473
24474 fi
24475
24476 if test "$ol_enable_meta" != no ; then
24477         BUILD_SLAPD=yes
24478         BUILD_META=$ol_enable_meta
24479         BUILD_REWRITE=yes
24480         if test "$ol_enable_meta" = mod ; then
24481                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24482                 MFLAG=SLAPD_MOD_DYNAMIC
24483         else
24484                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24485                 MFLAG=SLAPD_MOD_STATIC
24486         fi
24487
24488 cat >>confdefs.h <<_ACEOF
24489 #define SLAPD_META $MFLAG
24490 _ACEOF
24491
24492 fi
24493
24494 if test "$ol_enable_asyncmeta" != no ; then
24495         BUILD_SLAPD=yes
24496         BUILD_ASYNCMETA=$ol_enable_asyncmeta
24497         BUILD_REWRITE=yes
24498         if test "$ol_enable_asyncmeta" = mod ; then
24499                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-asyncmeta"
24500                 MFLAG=SLAPD_MOD_DYNAMIC
24501         else
24502                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-asyncmeta"
24503                 MFLAG=SLAPD_MOD_STATIC
24504         fi
24505
24506 cat >>confdefs.h <<_ACEOF
24507 #define SLAPD_ASYNCMETA $MFLAG
24508 _ACEOF
24509
24510 fi
24511
24512 if test "$ol_enable_ndb" != no ; then
24513         BUILD_SLAPD=yes
24514         BUILD_NDB=$ol_enable_ndb
24515         if test "$ol_enable_ndb" = mod ; then
24516                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ndb"
24517                 MFLAG=SLAPD_MOD_DYNAMIC
24518         else
24519                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ndb"
24520                 MFLAG=SLAPD_MOD_STATIC
24521         fi
24522
24523 cat >>confdefs.h <<_ACEOF
24524 #define SLAPD_NDB $MFLAG
24525 _ACEOF
24526
24527 fi
24528
24529 if test "$ol_enable_null" != no ; then
24530         BUILD_SLAPD=yes
24531         BUILD_NULL=$ol_enable_null
24532         if test "$ol_enable_null" = mod ; then
24533                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24534                 MFLAG=SLAPD_MOD_DYNAMIC
24535         else
24536                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24537                 MFLAG=SLAPD_MOD_STATIC
24538         fi
24539
24540 cat >>confdefs.h <<_ACEOF
24541 #define SLAPD_NULL $MFLAG
24542 _ACEOF
24543
24544 fi
24545
24546 if test "$ol_enable_passwd" != no ; then
24547         BUILD_SLAPD=yes
24548         BUILD_PASSWD=$ol_enable_passwd
24549         if test "$ol_enable_passwd" = mod ; then
24550                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24551                 MFLAG=SLAPD_MOD_DYNAMIC
24552         else
24553                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24554                 MFLAG=SLAPD_MOD_STATIC
24555         fi
24556
24557 cat >>confdefs.h <<_ACEOF
24558 #define SLAPD_PASSWD $MFLAG
24559 _ACEOF
24560
24561 fi
24562
24563 if test "$ol_link_perl" != no ; then
24564         BUILD_SLAPD=yes
24565         BUILD_PERL=$ol_enable_perl
24566         if test "$ol_enable_perl" = mod ; then
24567                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24568                 MFLAG=SLAPD_MOD_DYNAMIC
24569         else
24570                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24571                 MFLAG=SLAPD_MOD_STATIC
24572         fi
24573
24574 cat >>confdefs.h <<_ACEOF
24575 #define SLAPD_PERL $MFLAG
24576 _ACEOF
24577
24578 fi
24579
24580 if test "$ol_enable_relay" != no ; then
24581         BUILD_SLAPD=yes
24582         BUILD_RELAY=$ol_enable_relay
24583         if test "$ol_enable_relay" = mod ; then
24584                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
24585                 MFLAG=SLAPD_MOD_DYNAMIC
24586         else
24587                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
24588                 MFLAG=SLAPD_MOD_STATIC
24589         fi
24590
24591 cat >>confdefs.h <<_ACEOF
24592 #define SLAPD_RELAY $MFLAG
24593 _ACEOF
24594
24595 fi
24596
24597 if test "$ol_enable_shell" != no ; then
24598         if test "$ol_link_threads" != no ; then
24599                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use of --without-threads is recommended with back-shell" >&5
24600 $as_echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
24601         fi
24602         BUILD_SLAPD=yes
24603         BUILD_SHELL=$ol_enable_shell
24604         if test "$ol_enable_shell" = mod ; then
24605                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24606                 MFLAG=SLAPD_MOD_DYNAMIC
24607         else
24608                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24609                 MFLAG=SLAPD_MOD_STATIC
24610         fi
24611
24612 cat >>confdefs.h <<_ACEOF
24613 #define SLAPD_SHELL $MFLAG
24614 _ACEOF
24615
24616 fi
24617
24618 if test "$ol_enable_sock" != no ; then
24619         BUILD_SLAPD=yes
24620         BUILD_SOCK=$ol_enable_sock
24621         if test "$ol_enable_sock" = mod ; then
24622                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sock"
24623                 MFLAG=SLAPD_MOD_DYNAMIC
24624         else
24625                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sock"
24626                 MFLAG=SLAPD_MOD_STATIC
24627         fi
24628
24629 cat >>confdefs.h <<_ACEOF
24630 #define SLAPD_SOCK $MFLAG
24631 _ACEOF
24632
24633 fi
24634
24635 if test "$ol_link_sql" != no ; then
24636         BUILD_SLAPD=yes
24637         BUILD_SQL=$ol_enable_sql
24638         if test "$ol_enable_sql" = mod; then
24639                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24640                 MFLAG=SLAPD_MOD_DYNAMIC
24641         else
24642                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24643                 MFLAG=SLAPD_MOD_STATIC
24644         fi
24645
24646 cat >>confdefs.h <<_ACEOF
24647 #define SLAPD_SQL $MFLAG
24648 _ACEOF
24649
24650 fi
24651
24652 if test "$ol_link_wt" != no ; then
24653         BUILD_SLAPD=yes
24654         BUILD_WT=$ol_enable_wt
24655         if test "$ol_enable_wt" = mod; then
24656                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-wt"
24657                 MFLAG=SLAPD_MOD_DYNAMIC
24658         else
24659                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-wt"
24660                 MFLAG=SLAPD_MOD_STATIC
24661         fi
24662
24663 cat >>confdefs.h <<_ACEOF
24664 #define SLAPD_WT $MFLAG
24665 _ACEOF
24666
24667 fi
24668
24669 if test "$ol_enable_accesslog" != no ; then
24670         BUILD_ACCESSLOG=$ol_enable_accesslog
24671         if test "$ol_enable_accesslog" = mod ; then
24672                 MFLAG=SLAPD_MOD_DYNAMIC
24673                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
24674         else
24675                 MFLAG=SLAPD_MOD_STATIC
24676                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
24677         fi
24678
24679 cat >>confdefs.h <<_ACEOF
24680 #define SLAPD_OVER_ACCESSLOG $MFLAG
24681 _ACEOF
24682
24683 fi
24684
24685 if test "$ol_enable_auditlog" != no ; then
24686         BUILD_AUDITLOG=$ol_enable_auditlog
24687         if test "$ol_enable_auditlog" = mod ; then
24688                 MFLAG=SLAPD_MOD_DYNAMIC
24689                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
24690         else
24691                 MFLAG=SLAPD_MOD_STATIC
24692                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
24693         fi
24694
24695 cat >>confdefs.h <<_ACEOF
24696 #define SLAPD_OVER_AUDITLOG $MFLAG
24697 _ACEOF
24698
24699 fi
24700
24701 if test "$ol_enable_autoca" != no ; then
24702         BUILD_AUTOCA=$ol_enable_autoca
24703         if test "$ol_enable_autoca" = mod ; then
24704                 MFLAG=SLAPD_MOD_DYNAMIC
24705                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS autoca.la"
24706         else
24707                 MFLAG=SLAPD_MOD_STATIC
24708                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS autoca.o"
24709         fi
24710
24711 cat >>confdefs.h <<_ACEOF
24712 #define SLAPD_OVER_AUTOCA $MFLAG
24713 _ACEOF
24714
24715 fi
24716
24717 if test "$ol_enable_collect" != no ; then
24718         BUILD_COLLECT=$ol_enable_collect
24719         if test "$ol_enable_collect" = mod ; then
24720                 MFLAG=SLAPD_MOD_DYNAMIC
24721                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS collect.la"
24722         else
24723                 MFLAG=SLAPD_MOD_STATIC
24724                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS collect.o"
24725         fi
24726
24727 cat >>confdefs.h <<_ACEOF
24728 #define SLAPD_OVER_COLLECT $MFLAG
24729 _ACEOF
24730
24731 fi
24732
24733 if test "$ol_enable_constraint" != no ; then
24734         BUILD_CONSTRAINT=$ol_enable_constraint
24735         if test "$ol_enable_constraint" = mod ; then
24736                 MFLAG=SLAPD_MOD_DYNAMIC
24737                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la"
24738         else
24739                 MFLAG=SLAPD_MOD_STATIC
24740                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o"
24741         fi
24742
24743 cat >>confdefs.h <<_ACEOF
24744 #define SLAPD_OVER_CONSTRAINT $MFLAG
24745 _ACEOF
24746
24747 fi
24748
24749 if test "$ol_enable_dds" != no ; then
24750         BUILD_DDS=$ol_enable_dds
24751         if test "$ol_enable_dds" = mod ; then
24752                 MFLAG=SLAPD_MOD_DYNAMIC
24753                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
24754         else
24755                 MFLAG=SLAPD_MOD_STATIC
24756                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
24757         fi
24758
24759 cat >>confdefs.h <<_ACEOF
24760 #define SLAPD_OVER_DDS $MFLAG
24761 _ACEOF
24762
24763 fi
24764
24765 if test "$ol_enable_deref" != no ; then
24766         BUILD_DEREF=$ol_enable_deref
24767         if test "$ol_enable_deref" = mod ; then
24768                 MFLAG=SLAPD_MOD_DYNAMIC
24769                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS deref.la"
24770         else
24771                 MFLAG=SLAPD_MOD_STATIC
24772                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS deref.o"
24773         fi
24774
24775 cat >>confdefs.h <<_ACEOF
24776 #define SLAPD_OVER_DEREF $MFLAG
24777 _ACEOF
24778
24779 fi
24780
24781 if test "$ol_enable_dyngroup" != no ; then
24782         BUILD_DYNGROUP=$ol_enable_dyngroup
24783         if test "$ol_enable_dyngroup" = mod ; then
24784                 MFLAG=SLAPD_MOD_DYNAMIC
24785                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24786         else
24787                 MFLAG=SLAPD_MOD_STATIC
24788                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
24789         fi
24790
24791 cat >>confdefs.h <<_ACEOF
24792 #define SLAPD_OVER_DYNGROUP $MFLAG
24793 _ACEOF
24794
24795 fi
24796
24797 if test "$ol_enable_dynlist" != no ; then
24798         BUILD_DYNLIST=$ol_enable_dynlist
24799         if test "$ol_enable_dynlist" = mod ; then
24800                 MFLAG=SLAPD_MOD_DYNAMIC
24801                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
24802         else
24803                 MFLAG=SLAPD_MOD_STATIC
24804                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
24805         fi
24806
24807 cat >>confdefs.h <<_ACEOF
24808 #define SLAPD_OVER_DYNLIST $MFLAG
24809 _ACEOF
24810
24811 fi
24812
24813 if test "$ol_enable_memberof" != no ; then
24814         BUILD_MEMBEROF=$ol_enable_memberof
24815         if test "$ol_enable_memberof" = mod ; then
24816                 MFLAG=SLAPD_MOD_DYNAMIC
24817                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la"
24818         else
24819                 MFLAG=SLAPD_MOD_STATIC
24820                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o"
24821         fi
24822
24823 cat >>confdefs.h <<_ACEOF
24824 #define SLAPD_OVER_MEMBEROF $MFLAG
24825 _ACEOF
24826
24827 fi
24828
24829 if test "$ol_enable_ppolicy" != no ; then
24830         BUILD_PPOLICY=$ol_enable_ppolicy
24831         if test "$ol_enable_ppolicy" = mod ; then
24832                 MFLAG=SLAPD_MOD_DYNAMIC
24833                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24834         else
24835                 MFLAG=SLAPD_MOD_STATIC
24836                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
24837         fi
24838
24839 cat >>confdefs.h <<_ACEOF
24840 #define SLAPD_OVER_PPOLICY $MFLAG
24841 _ACEOF
24842
24843 fi
24844
24845 if test "$ol_enable_proxycache" != no ; then
24846         BUILD_PROXYCACHE=$ol_enable_proxycache
24847         if test "$ol_enable_proxycache" = mod ; then
24848                 MFLAG=SLAPD_MOD_DYNAMIC
24849                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24850         else
24851                 MFLAG=SLAPD_MOD_STATIC
24852                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
24853         fi
24854
24855 cat >>confdefs.h <<_ACEOF
24856 #define SLAPD_OVER_PROXYCACHE $MFLAG
24857 _ACEOF
24858
24859 fi
24860
24861 if test "$ol_enable_refint" != no ; then
24862         BUILD_REFINT=$ol_enable_refint
24863         if test "$ol_enable_refint" = mod ; then
24864                 MFLAG=SLAPD_MOD_DYNAMIC
24865                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24866         else
24867                 MFLAG=SLAPD_MOD_STATIC
24868                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
24869         fi
24870
24871 cat >>confdefs.h <<_ACEOF
24872 #define SLAPD_OVER_REFINT $MFLAG
24873 _ACEOF
24874
24875 fi
24876
24877 if test "$ol_enable_retcode" != no ; then
24878         BUILD_RETCODE=$ol_enable_retcode
24879         if test "$ol_enable_retcode" = mod ; then
24880                 MFLAG=SLAPD_MOD_DYNAMIC
24881                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
24882         else
24883                 MFLAG=SLAPD_MOD_STATIC
24884                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
24885         fi
24886
24887 cat >>confdefs.h <<_ACEOF
24888 #define SLAPD_OVER_RETCODE $MFLAG
24889 _ACEOF
24890
24891 fi
24892
24893 if test "$ol_enable_rwm" != no ; then
24894         BUILD_REWRITE=yes
24895         BUILD_RWM=$ol_enable_rwm
24896         if test "$ol_enable_rwm" = mod ; then
24897                 MFLAG=SLAPD_MOD_DYNAMIC
24898                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24899         else
24900                 MFLAG=SLAPD_MOD_STATIC
24901                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
24902         fi
24903
24904 cat >>confdefs.h <<_ACEOF
24905 #define SLAPD_OVER_RWM $MFLAG
24906 _ACEOF
24907
24908 fi
24909
24910 if test "$ol_enable_seqmod" != no ; then
24911         BUILD_SEQMOD=$ol_enable_seqmod
24912         if test "$ol_enable_seqmod" = mod ; then
24913                 MFLAG=SLAPD_MOD_DYNAMIC
24914                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
24915         else
24916                 MFLAG=SLAPD_MOD_STATIC
24917                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
24918         fi
24919
24920 cat >>confdefs.h <<_ACEOF
24921 #define SLAPD_OVER_SEQMOD $MFLAG
24922 _ACEOF
24923
24924 fi
24925
24926 if test "$ol_enable_sssvlv" != no ; then
24927         BUILD_SSSVLV=$ol_enable_sssvlv
24928         if test "$ol_enable_sssvlv" = mod ; then
24929                 MFLAG=SLAPD_MOD_DYNAMIC
24930                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS sssvlv.la"
24931         else
24932                 MFLAG=SLAPD_MOD_STATIC
24933                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS sssvlv.o"
24934         fi
24935
24936 cat >>confdefs.h <<_ACEOF
24937 #define SLAPD_OVER_SSSVLV $MFLAG
24938 _ACEOF
24939
24940 fi
24941
24942 if test "$ol_enable_syncprov" != no ; then
24943         BUILD_SYNCPROV=$ol_enable_syncprov
24944         if test "$ol_enable_syncprov" = mod ; then
24945                 MFLAG=SLAPD_MOD_DYNAMIC
24946                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
24947         else
24948                 MFLAG=SLAPD_MOD_STATIC
24949                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
24950         fi
24951
24952 cat >>confdefs.h <<_ACEOF
24953 #define SLAPD_OVER_SYNCPROV $MFLAG
24954 _ACEOF
24955
24956 fi
24957
24958 if test "$ol_enable_translucent" != no ; then
24959         BUILD_TRANSLUCENT=$ol_enable_translucent
24960         if test "$ol_enable_translucent" = mod ; then
24961                 MFLAG=SLAPD_MOD_DYNAMIC
24962                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
24963         else
24964                 MFLAG=SLAPD_MOD_STATIC
24965                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
24966         fi
24967
24968 cat >>confdefs.h <<_ACEOF
24969 #define SLAPD_OVER_TRANSLUCENT $MFLAG
24970 _ACEOF
24971
24972 fi
24973
24974 if test "$ol_enable_unique" != no ; then
24975         BUILD_UNIQUE=$ol_enable_unique
24976         if test "$ol_enable_unique" = mod ; then
24977                 MFLAG=SLAPD_MOD_DYNAMIC
24978                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24979         else
24980                 MFLAG=SLAPD_MOD_STATIC
24981                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
24982         fi
24983
24984 cat >>confdefs.h <<_ACEOF
24985 #define SLAPD_OVER_UNIQUE $MFLAG
24986 _ACEOF
24987
24988 fi
24989
24990 if test "$ol_enable_valsort" != no ; then
24991         BUILD_VALSORT=$ol_enable_valsort
24992         if test "$ol_enable_valsort" = mod ; then
24993                 MFLAG=SLAPD_MOD_DYNAMIC
24994                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
24995         else
24996                 MFLAG=SLAPD_MOD_STATIC
24997                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
24998         fi
24999
25000 cat >>confdefs.h <<_ACEOF
25001 #define SLAPD_OVER_VALSORT $MFLAG
25002 _ACEOF
25003
25004 fi
25005
25006 if test "$ol_enable_rewrite" != no ; then
25007
25008 $as_echo "#define ENABLE_REWRITE 1" >>confdefs.h
25009
25010         BUILD_REWRITE=yes
25011 fi
25012
25013 if test "$ol_enable_slapi" != no ; then
25014
25015 $as_echo "#define ENABLE_SLAPI 1" >>confdefs.h
25016
25017         BUILD_SLAPI=yes
25018         SLAPD_SLAPI_DEPEND=libslapi.a
25019 fi
25020
25021
25022
25023 if test "$ac_cv_mingw32" = yes -o $ol_cv_msvc = yes ; then
25024         PLAT=NT
25025         SLAPD_MODULES_LDFLAGS=
25026 else
25027         PLAT=UNIX
25028 fi
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126 # Check whether --with-xxinstall was given.
25127 if test "${with_xxinstall+set}" = set; then :
25128   withval=$with_xxinstall;
25129 fi
25130
25131
25132
25133 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"
25134
25135
25136 ac_config_commands="$ac_config_commands default"
25137
25138
25139
25140 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25141 # Let make expand exec_prefix.
25142 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25143
25144 DEFS=-DHAVE_CONFIG_H
25145
25146 ac_libobjs=
25147 ac_ltlibobjs=
25148 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25149   # 1. Remove the extension, and $U if already installed.
25150   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25151   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
25152   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
25153   #    will be set to the directory where LIBOBJS objects are built.
25154   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25155   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
25156 done
25157 LIBOBJS=$ac_libobjs
25158
25159 LTLIBOBJS=$ac_ltlibobjs
25160
25161
25162 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
25163   as_fn_error "conditional \"AMDEP\" was never defined.
25164 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25165 fi
25166 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
25167   as_fn_error "conditional \"am__fastdepCC\" was never defined.
25168 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25169 fi
25170 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
25171   as_fn_error "conditional \"am__fastdepCC\" was never defined.
25172 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25173 fi
25174
25175
25176 : ${CONFIG_STATUS=./config.status}
25177 ac_write_fail=0
25178 ac_clean_files_save=$ac_clean_files
25179 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25180 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25181 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25182 as_write_fail=0
25183 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
25184 #! $SHELL
25185 # Generated by $as_me.
25186 # Run this file to recreate the current configuration.
25187 # Compiler output produced by configure, useful for debugging
25188 # configure, is in config.log if it exists.
25189
25190 debug=false
25191 ac_cs_recheck=false
25192 ac_cs_silent=false
25193
25194 SHELL=\${CONFIG_SHELL-$SHELL}
25195 export SHELL
25196 _ASEOF
25197 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25198 ## -------------------- ##
25199 ## M4sh Initialization. ##
25200 ## -------------------- ##
25201
25202 # Be more Bourne compatible
25203 DUALCASE=1; export DUALCASE # for MKS sh
25204 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
25205   emulate sh
25206   NULLCMD=:
25207   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25208   # is contrary to our usage.  Disable this feature.
25209   alias -g '${1+"$@"}'='"$@"'
25210   setopt NO_GLOB_SUBST
25211 else
25212   case `(set -o) 2>/dev/null` in #(
25213   *posix*) :
25214     set -o posix ;; #(
25215   *) :
25216      ;;
25217 esac
25218 fi
25219
25220
25221 as_nl='
25222 '
25223 export as_nl
25224 # Printing a long string crashes Solaris 7 /usr/bin/printf.
25225 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25226 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
25227 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
25228 # Prefer a ksh shell builtin over an external printf program on Solaris,
25229 # but without wasting forks for bash or zsh.
25230 if test -z "$BASH_VERSION$ZSH_VERSION" \
25231     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
25232   as_echo='print -r --'
25233   as_echo_n='print -rn --'
25234 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
25235   as_echo='printf %s\n'
25236   as_echo_n='printf %s'
25237 else
25238   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
25239     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
25240     as_echo_n='/usr/ucb/echo -n'
25241   else
25242     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
25243     as_echo_n_body='eval
25244       arg=$1;
25245       case $arg in #(
25246       *"$as_nl"*)
25247         expr "X$arg" : "X\\(.*\\)$as_nl";
25248         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
25249       esac;
25250       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
25251     '
25252     export as_echo_n_body
25253     as_echo_n='sh -c $as_echo_n_body as_echo'
25254   fi
25255   export as_echo_body
25256   as_echo='sh -c $as_echo_body as_echo'
25257 fi
25258
25259 # The user is always right.
25260 if test "${PATH_SEPARATOR+set}" != set; then
25261   PATH_SEPARATOR=:
25262   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25263     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25264       PATH_SEPARATOR=';'
25265   }
25266 fi
25267
25268
25269 # IFS
25270 # We need space, tab and new line, in precisely that order.  Quoting is
25271 # there to prevent editors from complaining about space-tab.
25272 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
25273 # splitting by setting IFS to empty value.)
25274 IFS=" ""        $as_nl"
25275
25276 # Find who we are.  Look in the path if we contain no directory separator.
25277 case $0 in #((
25278   *[\\/]* ) as_myself=$0 ;;
25279   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25280 for as_dir in $PATH
25281 do
25282   IFS=$as_save_IFS
25283   test -z "$as_dir" && as_dir=.
25284     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25285   done
25286 IFS=$as_save_IFS
25287
25288      ;;
25289 esac
25290 # We did not find ourselves, most probably we were run as `sh COMMAND'
25291 # in which case we are not to be found in the path.
25292 if test "x$as_myself" = x; then
25293   as_myself=$0
25294 fi
25295 if test ! -f "$as_myself"; then
25296   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25297   exit 1
25298 fi
25299
25300 # Unset variables that we do not need and which cause bugs (e.g. in
25301 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
25302 # suppresses any "Segmentation fault" message there.  '((' could
25303 # trigger a bug in pdksh 5.2.14.
25304 for as_var in BASH_ENV ENV MAIL MAILPATH
25305 do eval test x\${$as_var+set} = xset \
25306   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25307 done
25308 PS1='$ '
25309 PS2='> '
25310 PS4='+ '
25311
25312 # NLS nuisances.
25313 LC_ALL=C
25314 export LC_ALL
25315 LANGUAGE=C
25316 export LANGUAGE
25317
25318 # CDPATH.
25319 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25320
25321
25322 # as_fn_error ERROR [LINENO LOG_FD]
25323 # ---------------------------------
25324 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25325 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
25326 # script with status $?, using 1 if that was 0.
25327 as_fn_error ()
25328 {
25329   as_status=$?; test $as_status -eq 0 && as_status=1
25330   if test "$3"; then
25331     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25332     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
25333   fi
25334   $as_echo "$as_me: error: $1" >&2
25335   as_fn_exit $as_status
25336 } # as_fn_error
25337
25338
25339 # as_fn_set_status STATUS
25340 # -----------------------
25341 # Set $? to STATUS, without forking.
25342 as_fn_set_status ()
25343 {
25344   return $1
25345 } # as_fn_set_status
25346
25347 # as_fn_exit STATUS
25348 # -----------------
25349 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25350 as_fn_exit ()
25351 {
25352   set +e
25353   as_fn_set_status $1
25354   exit $1
25355 } # as_fn_exit
25356
25357 # as_fn_unset VAR
25358 # ---------------
25359 # Portably unset VAR.
25360 as_fn_unset ()
25361 {
25362   { eval $1=; unset $1;}
25363 }
25364 as_unset=as_fn_unset
25365 # as_fn_append VAR VALUE
25366 # ----------------------
25367 # Append the text in VALUE to the end of the definition contained in VAR. Take
25368 # advantage of any shell optimizations that allow amortized linear growth over
25369 # repeated appends, instead of the typical quadratic growth present in naive
25370 # implementations.
25371 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25372   eval 'as_fn_append ()
25373   {
25374     eval $1+=\$2
25375   }'
25376 else
25377   as_fn_append ()
25378   {
25379     eval $1=\$$1\$2
25380   }
25381 fi # as_fn_append
25382
25383 # as_fn_arith ARG...
25384 # ------------------
25385 # Perform arithmetic evaluation on the ARGs, and store the result in the
25386 # global $as_val. Take advantage of shells that can avoid forks. The arguments
25387 # must be portable across $(()) and expr.
25388 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25389   eval 'as_fn_arith ()
25390   {
25391     as_val=$(( $* ))
25392   }'
25393 else
25394   as_fn_arith ()
25395   {
25396     as_val=`expr "$@" || test $? -eq 1`
25397   }
25398 fi # as_fn_arith
25399
25400
25401 if expr a : '\(a\)' >/dev/null 2>&1 &&
25402    test "X`expr 00001 : '.*\(...\)'`" = X001; then
25403   as_expr=expr
25404 else
25405   as_expr=false
25406 fi
25407
25408 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25409   as_basename=basename
25410 else
25411   as_basename=false
25412 fi
25413
25414 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25415   as_dirname=dirname
25416 else
25417   as_dirname=false
25418 fi
25419
25420 as_me=`$as_basename -- "$0" ||
25421 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25422          X"$0" : 'X\(//\)$' \| \
25423          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25424 $as_echo X/"$0" |
25425     sed '/^.*\/\([^/][^/]*\)\/*$/{
25426             s//\1/
25427             q
25428           }
25429           /^X\/\(\/\/\)$/{
25430             s//\1/
25431             q
25432           }
25433           /^X\/\(\/\).*/{
25434             s//\1/
25435             q
25436           }
25437           s/.*/./; q'`
25438
25439 # Avoid depending upon Character Ranges.
25440 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25441 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25442 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25443 as_cr_digits='0123456789'
25444 as_cr_alnum=$as_cr_Letters$as_cr_digits
25445
25446 ECHO_C= ECHO_N= ECHO_T=
25447 case `echo -n x` in #(((((
25448 -n*)
25449   case `echo 'xy\c'` in
25450   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
25451   xy)  ECHO_C='\c';;
25452   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
25453        ECHO_T=' ';;
25454   esac;;
25455 *)
25456   ECHO_N='-n';;
25457 esac
25458
25459 rm -f conf$$ conf$$.exe conf$$.file
25460 if test -d conf$$.dir; then
25461   rm -f conf$$.dir/conf$$.file
25462 else
25463   rm -f conf$$.dir
25464   mkdir conf$$.dir 2>/dev/null
25465 fi
25466 if (echo >conf$$.file) 2>/dev/null; then
25467   if ln -s conf$$.file conf$$ 2>/dev/null; then
25468     as_ln_s='ln -s'
25469     # ... but there are two gotchas:
25470     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25471     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25472     # In both cases, we have to default to `cp -p'.
25473     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25474       as_ln_s='cp -p'
25475   elif ln conf$$.file conf$$ 2>/dev/null; then
25476     as_ln_s=ln
25477   else
25478     as_ln_s='cp -p'
25479   fi
25480 else
25481   as_ln_s='cp -p'
25482 fi
25483 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25484 rmdir conf$$.dir 2>/dev/null
25485
25486
25487 # as_fn_mkdir_p
25488 # -------------
25489 # Create "$as_dir" as a directory, including parents if necessary.
25490 as_fn_mkdir_p ()
25491 {
25492
25493   case $as_dir in #(
25494   -*) as_dir=./$as_dir;;
25495   esac
25496   test -d "$as_dir" || eval $as_mkdir_p || {
25497     as_dirs=
25498     while :; do
25499       case $as_dir in #(
25500       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25501       *) as_qdir=$as_dir;;
25502       esac
25503       as_dirs="'$as_qdir' $as_dirs"
25504       as_dir=`$as_dirname -- "$as_dir" ||
25505 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25506          X"$as_dir" : 'X\(//\)[^/]' \| \
25507          X"$as_dir" : 'X\(//\)$' \| \
25508          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25509 $as_echo X"$as_dir" |
25510     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25511             s//\1/
25512             q
25513           }
25514           /^X\(\/\/\)[^/].*/{
25515             s//\1/
25516             q
25517           }
25518           /^X\(\/\/\)$/{
25519             s//\1/
25520             q
25521           }
25522           /^X\(\/\).*/{
25523             s//\1/
25524             q
25525           }
25526           s/.*/./; q'`
25527       test -d "$as_dir" && break
25528     done
25529     test -z "$as_dirs" || eval "mkdir $as_dirs"
25530   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
25531
25532
25533 } # as_fn_mkdir_p
25534 if mkdir -p . 2>/dev/null; then
25535   as_mkdir_p='mkdir -p "$as_dir"'
25536 else
25537   test -d ./-p && rmdir ./-p
25538   as_mkdir_p=false
25539 fi
25540
25541 if test -x / >/dev/null 2>&1; then
25542   as_test_x='test -x'
25543 else
25544   if ls -dL / >/dev/null 2>&1; then
25545     as_ls_L_option=L
25546   else
25547     as_ls_L_option=
25548   fi
25549   as_test_x='
25550     eval sh -c '\''
25551       if test -d "$1"; then
25552         test -d "$1/.";
25553       else
25554         case $1 in #(
25555         -*)set "./$1";;
25556         esac;
25557         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
25558         ???[sx]*):;;*)false;;esac;fi
25559     '\'' sh
25560   '
25561 fi
25562 as_executable_p=$as_test_x
25563
25564 # Sed expression to map a string onto a valid CPP name.
25565 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25566
25567 # Sed expression to map a string onto a valid variable name.
25568 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25569
25570
25571 exec 6>&1
25572 ## ----------------------------------- ##
25573 ## Main body of $CONFIG_STATUS script. ##
25574 ## ----------------------------------- ##
25575 _ASEOF
25576 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25577
25578 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25579 # Save the log message, to keep $0 and so on meaningful, and to
25580 # report actual input values of CONFIG_FILES etc. instead of their
25581 # values after options handling.
25582 ac_log="
25583 This file was extended by $as_me, which was
25584 generated by GNU Autoconf 2.65.  Invocation command line was
25585
25586   CONFIG_FILES    = $CONFIG_FILES
25587   CONFIG_HEADERS  = $CONFIG_HEADERS
25588   CONFIG_LINKS    = $CONFIG_LINKS
25589   CONFIG_COMMANDS = $CONFIG_COMMANDS
25590   $ $0 $@
25591
25592 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25593 "
25594
25595 _ACEOF
25596
25597 case $ac_config_files in *"
25598 "*) set x $ac_config_files; shift; ac_config_files=$*;;
25599 esac
25600
25601 case $ac_config_headers in *"
25602 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25603 esac
25604
25605
25606 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25607 # Files that config.status was made for.
25608 config_files="$ac_config_files"
25609 config_headers="$ac_config_headers"
25610 config_commands="$ac_config_commands"
25611
25612 _ACEOF
25613
25614 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25615 ac_cs_usage="\
25616 \`$as_me' instantiates files and other configuration actions
25617 from templates according to the current configuration.  Unless the files
25618 and actions are specified as TAGs, all are instantiated by default.
25619
25620 Usage: $0 [OPTION]... [TAG]...
25621
25622   -h, --help       print this help, then exit
25623   -V, --version    print version number and configuration settings, then exit
25624       --config     print configuration, then exit
25625   -q, --quiet, --silent
25626                    do not print progress messages
25627   -d, --debug      don't remove temporary files
25628       --recheck    update $as_me by reconfiguring in the same conditions
25629       --file=FILE[:TEMPLATE]
25630                    instantiate the configuration file FILE
25631       --header=FILE[:TEMPLATE]
25632                    instantiate the configuration header FILE
25633
25634 Configuration files:
25635 $config_files
25636
25637 Configuration headers:
25638 $config_headers
25639
25640 Configuration commands:
25641 $config_commands
25642
25643 Report bugs to <<http://www.openldap.org/its/>>."
25644
25645 _ACEOF
25646 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25647 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
25648 ac_cs_version="\\
25649 config.status
25650 configured by $0, generated by GNU Autoconf 2.65,
25651   with options \\"\$ac_cs_config\\"
25652
25653 Copyright (C) 2009 Free Software Foundation, Inc.
25654 This config.status script is free software; the Free Software Foundation
25655 gives unlimited permission to copy, distribute and modify it."
25656
25657 ac_pwd='$ac_pwd'
25658 srcdir='$srcdir'
25659 INSTALL='$INSTALL'
25660 AWK='$AWK'
25661 test -n "\$AWK" || AWK=awk
25662 _ACEOF
25663
25664 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25665 # The default lists apply if the user does not specify any file.
25666 ac_need_defaults=:
25667 while test $# != 0
25668 do
25669   case $1 in
25670   --*=*)
25671     ac_option=`expr "X$1" : 'X\([^=]*\)='`
25672     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25673     ac_shift=:
25674     ;;
25675   *)
25676     ac_option=$1
25677     ac_optarg=$2
25678     ac_shift=shift
25679     ;;
25680   esac
25681
25682   case $ac_option in
25683   # Handling of the options.
25684   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25685     ac_cs_recheck=: ;;
25686   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25687     $as_echo "$ac_cs_version"; exit ;;
25688   --config | --confi | --conf | --con | --co | --c )
25689     $as_echo "$ac_cs_config"; exit ;;
25690   --debug | --debu | --deb | --de | --d | -d )
25691     debug=: ;;
25692   --file | --fil | --fi | --f )
25693     $ac_shift
25694     case $ac_optarg in
25695     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25696     esac
25697     as_fn_append CONFIG_FILES " '$ac_optarg'"
25698     ac_need_defaults=false;;
25699   --header | --heade | --head | --hea )
25700     $ac_shift
25701     case $ac_optarg in
25702     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25703     esac
25704     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25705     ac_need_defaults=false;;
25706   --he | --h)
25707     # Conflict between --help and --header
25708     as_fn_error "ambiguous option: \`$1'
25709 Try \`$0 --help' for more information.";;
25710   --help | --hel | -h )
25711     $as_echo "$ac_cs_usage"; exit ;;
25712   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25713   | -silent | --silent | --silen | --sile | --sil | --si | --s)
25714     ac_cs_silent=: ;;
25715
25716   # This is an error.
25717   -*) as_fn_error "unrecognized option: \`$1'
25718 Try \`$0 --help' for more information." ;;
25719
25720   *) as_fn_append ac_config_targets " $1"
25721      ac_need_defaults=false ;;
25722
25723   esac
25724   shift
25725 done
25726
25727 ac_configure_extra_args=
25728
25729 if $ac_cs_silent; then
25730   exec 6>/dev/null
25731   ac_configure_extra_args="$ac_configure_extra_args --silent"
25732 fi
25733
25734 _ACEOF
25735 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25736 if \$ac_cs_recheck; then
25737   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25738   shift
25739   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25740   CONFIG_SHELL='$SHELL'
25741   export CONFIG_SHELL
25742   exec "\$@"
25743 fi
25744
25745 _ACEOF
25746 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25747 exec 5>>config.log
25748 {
25749   echo
25750   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25751 ## Running $as_me. ##
25752 _ASBOX
25753   $as_echo "$ac_log"
25754 } >&5
25755
25756 _ACEOF
25757 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25758 #
25759 # INIT-COMMANDS
25760 #
25761 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25762
25763 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25764 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
25765
25766
25767 _ACEOF
25768
25769 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25770
25771 # Handling of arguments.
25772 for ac_config_target in $ac_config_targets
25773 do
25774   case $ac_config_target in
25775     "include/portable.h") CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
25776     "include/ldap_features.h") CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
25777     "include/lber_types.h") CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
25778     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25779     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
25780     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
25781     "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
25782     "doc/man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
25783     "doc/man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
25784     "doc/man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
25785     "doc/man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
25786     "clients/Makefile") CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
25787     "clients/tools/Makefile") CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
25788     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
25789     "libraries/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
25790     "libraries/liblber/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25791     "libraries/libldap/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25792     "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" ;;
25793     "libraries/liblunicode/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25794     "libraries/liblutil/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25795     "libraries/librewrite/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25796     "servers/Makefile") CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
25797     "servers/slapd/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
25798     "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" ;;
25799     "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" ;;
25800     "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" ;;
25801     "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" ;;
25802     "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" ;;
25803     "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" ;;
25804     "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" ;;
25805     "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" ;;
25806     "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" ;;
25807     "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" ;;
25808     "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" ;;
25809     "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" ;;
25810     "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" ;;
25811     "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" ;;
25812     "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" ;;
25813     "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" ;;
25814     "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" ;;
25815     "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" ;;
25816     "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" ;;
25817     "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" ;;
25818     "servers/slapd/overlays/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
25819     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
25820     "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;;
25821     "tests/progs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
25822     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25823
25824   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25825   esac
25826 done
25827
25828
25829 # If the user did not use the arguments to specify the items to instantiate,
25830 # then the envvar interface is used.  Set only those that are not.
25831 # We use the long form for the default assignment because of an extremely
25832 # bizarre bug on SunOS 4.1.3.
25833 if $ac_need_defaults; then
25834   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25835   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25836   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25837 fi
25838
25839 # Have a temporary directory for convenience.  Make it in the build tree
25840 # simply because there is no reason against having it here, and in addition,
25841 # creating and moving files from /tmp can sometimes cause problems.
25842 # Hook for its removal unless debugging.
25843 # Note that there is a small window in which the directory will not be cleaned:
25844 # after its creation but before its name has been assigned to `$tmp'.
25845 $debug ||
25846 {
25847   tmp=
25848   trap 'exit_status=$?
25849   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25850 ' 0
25851   trap 'as_fn_exit 1' 1 2 13 15
25852 }
25853 # Create a (secure) tmp directory for tmp files.
25854
25855 {
25856   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25857   test -n "$tmp" && test -d "$tmp"
25858 }  ||
25859 {
25860   tmp=./conf$$-$RANDOM
25861   (umask 077 && mkdir "$tmp")
25862 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25863
25864 # Set up the scripts for CONFIG_FILES section.
25865 # No need to generate them if there are no CONFIG_FILES.
25866 # This happens for instance with `./config.status config.h'.
25867 if test -n "$CONFIG_FILES"; then
25868
25869
25870 ac_cr=`echo X | tr X '\015'`
25871 # On cygwin, bash can eat \r inside `` if the user requested igncr.
25872 # But we know of no other shell where ac_cr would be empty at this
25873 # point, so we can use a bashism as a fallback.
25874 if test "x$ac_cr" = x; then
25875   eval ac_cr=\$\'\\r\'
25876 fi
25877 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25878 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25879   ac_cs_awk_cr='\r'
25880 else
25881   ac_cs_awk_cr=$ac_cr
25882 fi
25883
25884 echo 'BEGIN {' >"$tmp/subs1.awk" &&
25885 _ACEOF
25886
25887
25888 {
25889   echo "cat >conf$$subs.awk <<_ACEOF" &&
25890   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25891   echo "_ACEOF"
25892 } >conf$$subs.sh ||
25893   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25894 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25895 ac_delim='%!_!# '
25896 for ac_last_try in false false false false false :; do
25897   . ./conf$$subs.sh ||
25898     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25899
25900   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25901   if test $ac_delim_n = $ac_delim_num; then
25902     break
25903   elif $ac_last_try; then
25904     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25905   else
25906     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25907   fi
25908 done
25909 rm -f conf$$subs.sh
25910
25911 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25912 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
25913 _ACEOF
25914 sed -n '
25915 h
25916 s/^/S["/; s/!.*/"]=/
25917 p
25918 g
25919 s/^[^!]*!//
25920 :repl
25921 t repl
25922 s/'"$ac_delim"'$//
25923 t delim
25924 :nl
25925 h
25926 s/\(.\{148\}\)..*/\1/
25927 t more1
25928 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25929 p
25930 n
25931 b repl
25932 :more1
25933 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25934 p
25935 g
25936 s/.\{148\}//
25937 t nl
25938 :delim
25939 h
25940 s/\(.\{148\}\)..*/\1/
25941 t more2
25942 s/["\\]/\\&/g; s/^/"/; s/$/"/
25943 p
25944 b
25945 :more2
25946 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25947 p
25948 g
25949 s/.\{148\}//
25950 t delim
25951 ' <conf$$subs.awk | sed '
25952 /^[^""]/{
25953   N
25954   s/\n//
25955 }
25956 ' >>$CONFIG_STATUS || ac_write_fail=1
25957 rm -f conf$$subs.awk
25958 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25959 _ACAWK
25960 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
25961   for (key in S) S_is_set[key] = 1
25962   FS = "\a"
25963
25964 }
25965 {
25966   line = $ 0
25967   nfields = split(line, field, "@")
25968   substed = 0
25969   len = length(field[1])
25970   for (i = 2; i < nfields; i++) {
25971     key = field[i]
25972     keylen = length(key)
25973     if (S_is_set[key]) {
25974       value = S[key]
25975       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25976       len += length(value) + length(field[++i])
25977       substed = 1
25978     } else
25979       len += 1 + keylen
25980   }
25981
25982   print line
25983 }
25984
25985 _ACAWK
25986 _ACEOF
25987 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25988 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25989   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25990 else
25991   cat
25992 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25993   || as_fn_error "could not setup config files machinery" "$LINENO" 5
25994 _ACEOF
25995
25996 # VPATH may cause trouble with some makes, so we remove $(srcdir),
25997 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25998 # trailing colons and then remove the whole line if VPATH becomes empty
25999 # (actually we leave an empty line to preserve line numbers).
26000 if test "x$srcdir" = x.; then
26001   ac_vpsub='/^[  ]*VPATH[        ]*=/{
26002 s/:*\$(srcdir):*/:/
26003 s/:*\${srcdir}:*/:/
26004 s/:*@srcdir@:*/:/
26005 s/^\([^=]*=[     ]*\):*/\1/
26006 s/:*$//
26007 s/^[^=]*=[       ]*$//
26008 }'
26009 fi
26010
26011 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26012 fi # test -n "$CONFIG_FILES"
26013
26014 # Set up the scripts for CONFIG_HEADERS section.
26015 # No need to generate them if there are no CONFIG_HEADERS.
26016 # This happens for instance with `./config.status Makefile'.
26017 if test -n "$CONFIG_HEADERS"; then
26018 cat >"$tmp/defines.awk" <<\_ACAWK ||
26019 BEGIN {
26020 _ACEOF
26021
26022 # Transform confdefs.h into an awk script `defines.awk', embedded as
26023 # here-document in config.status, that substitutes the proper values into
26024 # config.h.in to produce config.h.
26025
26026 # Create a delimiter string that does not exist in confdefs.h, to ease
26027 # handling of long lines.
26028 ac_delim='%!_!# '
26029 for ac_last_try in false false :; do
26030   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
26031   if test -z "$ac_t"; then
26032     break
26033   elif $ac_last_try; then
26034     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
26035   else
26036     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26037   fi
26038 done
26039
26040 # For the awk script, D is an array of macro values keyed by name,
26041 # likewise P contains macro parameters if any.  Preserve backslash
26042 # newline sequences.
26043
26044 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26045 sed -n '
26046 s/.\{148\}/&'"$ac_delim"'/g
26047 t rset
26048 :rset
26049 s/^[     ]*#[    ]*define[       ][      ]*/ /
26050 t def
26051 d
26052 :def
26053 s/\\$//
26054 t bsnl
26055 s/["\\]/\\&/g
26056 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
26057 D["\1"]=" \3"/p
26058 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
26059 d
26060 :bsnl
26061 s/["\\]/\\&/g
26062 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
26063 D["\1"]=" \3\\\\\\n"\\/p
26064 t cont
26065 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26066 t cont
26067 d
26068 :cont
26069 n
26070 s/.\{148\}/&'"$ac_delim"'/g
26071 t clear
26072 :clear
26073 s/\\$//
26074 t bsnlc
26075 s/["\\]/\\&/g; s/^/"/; s/$/"/p
26076 d
26077 :bsnlc
26078 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26079 b cont
26080 ' <confdefs.h | sed '
26081 s/'"$ac_delim"'/"\\\
26082 "/g' >>$CONFIG_STATUS || ac_write_fail=1
26083
26084 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26085   for (key in D) D_is_set[key] = 1
26086   FS = "\a"
26087 }
26088 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26089   line = \$ 0
26090   split(line, arg, " ")
26091   if (arg[1] == "#") {
26092     defundef = arg[2]
26093     mac1 = arg[3]
26094   } else {
26095     defundef = substr(arg[1], 2)
26096     mac1 = arg[2]
26097   }
26098   split(mac1, mac2, "(") #)
26099   macro = mac2[1]
26100   prefix = substr(line, 1, index(line, defundef) - 1)
26101   if (D_is_set[macro]) {
26102     # Preserve the white space surrounding the "#".
26103     print prefix "define", macro P[macro] D[macro]
26104     next
26105   } else {
26106     # Replace #undef with comments.  This is necessary, for example,
26107     # in the case of _POSIX_SOURCE, which is predefined and required
26108     # on some systems where configure will not decide to define it.
26109     if (defundef == "undef") {
26110       print "/*", prefix defundef, macro, "*/"
26111       next
26112     }
26113   }
26114 }
26115 { print }
26116 _ACAWK
26117 _ACEOF
26118 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26119   as_fn_error "could not setup config headers machinery" "$LINENO" 5
26120 fi # test -n "$CONFIG_HEADERS"
26121
26122
26123 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
26124 shift
26125 for ac_tag
26126 do
26127   case $ac_tag in
26128   :[FHLC]) ac_mode=$ac_tag; continue;;
26129   esac
26130   case $ac_mode$ac_tag in
26131   :[FHL]*:*);;
26132   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
26133   :[FH]-) ac_tag=-:-;;
26134   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26135   esac
26136   ac_save_IFS=$IFS
26137   IFS=:
26138   set x $ac_tag
26139   IFS=$ac_save_IFS
26140   shift
26141   ac_file=$1
26142   shift
26143
26144   case $ac_mode in
26145   :L) ac_source=$1;;
26146   :[FH])
26147     ac_file_inputs=
26148     for ac_f
26149     do
26150       case $ac_f in
26151       -) ac_f="$tmp/stdin";;
26152       *) # Look for the file first in the build tree, then in the source tree
26153          # (if the path is not absolute).  The absolute path cannot be DOS-style,
26154          # because $ac_f cannot contain `:'.
26155          test -f "$ac_f" ||
26156            case $ac_f in
26157            [\\/$]*) false;;
26158            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26159            esac ||
26160            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26161       esac
26162       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26163       as_fn_append ac_file_inputs " '$ac_f'"
26164     done
26165
26166     # Let's still pretend it is `configure' which instantiates (i.e., don't
26167     # use $as_me), people would be surprised to read:
26168     #    /* config.h.  Generated by config.status.  */
26169     configure_input='Generated from '`
26170           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26171         `' by configure.'
26172     if test x"$ac_file" != x-; then
26173       configure_input="$ac_file.  $configure_input"
26174       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26175 $as_echo "$as_me: creating $ac_file" >&6;}
26176     fi
26177     # Neutralize special characters interpreted by sed in replacement strings.
26178     case $configure_input in #(
26179     *\&* | *\|* | *\\* )
26180        ac_sed_conf_input=`$as_echo "$configure_input" |
26181        sed 's/[\\\\&|]/\\\\&/g'`;; #(
26182     *) ac_sed_conf_input=$configure_input;;
26183     esac
26184
26185     case $ac_tag in
26186     *:-:* | *:-) cat >"$tmp/stdin" \
26187       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
26188     esac
26189     ;;
26190   esac
26191
26192   ac_dir=`$as_dirname -- "$ac_file" ||
26193 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26194          X"$ac_file" : 'X\(//\)[^/]' \| \
26195          X"$ac_file" : 'X\(//\)$' \| \
26196          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26197 $as_echo X"$ac_file" |
26198     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26199             s//\1/
26200             q
26201           }
26202           /^X\(\/\/\)[^/].*/{
26203             s//\1/
26204             q
26205           }
26206           /^X\(\/\/\)$/{
26207             s//\1/
26208             q
26209           }
26210           /^X\(\/\).*/{
26211             s//\1/
26212             q
26213           }
26214           s/.*/./; q'`
26215   as_dir="$ac_dir"; as_fn_mkdir_p
26216   ac_builddir=.
26217
26218 case "$ac_dir" in
26219 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26220 *)
26221   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
26222   # A ".." for each directory in $ac_dir_suffix.
26223   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26224   case $ac_top_builddir_sub in
26225   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26226   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26227   esac ;;
26228 esac
26229 ac_abs_top_builddir=$ac_pwd
26230 ac_abs_builddir=$ac_pwd$ac_dir_suffix
26231 # for backward compatibility:
26232 ac_top_builddir=$ac_top_build_prefix
26233
26234 case $srcdir in
26235   .)  # We are building in place.
26236     ac_srcdir=.
26237     ac_top_srcdir=$ac_top_builddir_sub
26238     ac_abs_top_srcdir=$ac_pwd ;;
26239   [\\/]* | ?:[\\/]* )  # Absolute name.
26240     ac_srcdir=$srcdir$ac_dir_suffix;
26241     ac_top_srcdir=$srcdir
26242     ac_abs_top_srcdir=$srcdir ;;
26243   *) # Relative name.
26244     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26245     ac_top_srcdir=$ac_top_build_prefix$srcdir
26246     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
26247 esac
26248 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
26249
26250
26251   case $ac_mode in
26252   :F)
26253   #
26254   # CONFIG_FILE
26255   #
26256
26257   case $INSTALL in
26258   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26259   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
26260   esac
26261 _ACEOF
26262
26263 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26264 # If the template does not know about datarootdir, expand it.
26265 # FIXME: This hack should be removed a few years after 2.60.
26266 ac_datarootdir_hack=; ac_datarootdir_seen=
26267 ac_sed_dataroot='
26268 /datarootdir/ {
26269   p
26270   q
26271 }
26272 /@datadir@/p
26273 /@docdir@/p
26274 /@infodir@/p
26275 /@localedir@/p
26276 /@mandir@/p'
26277 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26278 *datarootdir*) ac_datarootdir_seen=yes;;
26279 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26280   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26281 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26282 _ACEOF
26283 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26284   ac_datarootdir_hack='
26285   s&@datadir@&$datadir&g
26286   s&@docdir@&$docdir&g
26287   s&@infodir@&$infodir&g
26288   s&@localedir@&$localedir&g
26289   s&@mandir@&$mandir&g
26290   s&\\\${datarootdir}&$datarootdir&g' ;;
26291 esac
26292 _ACEOF
26293
26294 # Neutralize VPATH when `$srcdir' = `.'.
26295 # Shell code in configure.ac might set extrasub.
26296 # FIXME: do we really want to maintain this feature?
26297 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26298 ac_sed_extra="$ac_vpsub
26299 $extrasub
26300 _ACEOF
26301 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26302 :t
26303 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26304 s|@configure_input@|$ac_sed_conf_input|;t t
26305 s&@top_builddir@&$ac_top_builddir_sub&;t t
26306 s&@top_build_prefix@&$ac_top_build_prefix&;t t
26307 s&@srcdir@&$ac_srcdir&;t t
26308 s&@abs_srcdir@&$ac_abs_srcdir&;t t
26309 s&@top_srcdir@&$ac_top_srcdir&;t t
26310 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26311 s&@builddir@&$ac_builddir&;t t
26312 s&@abs_builddir@&$ac_abs_builddir&;t t
26313 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26314 s&@INSTALL@&$ac_INSTALL&;t t
26315 $ac_datarootdir_hack
26316 "
26317 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
26318   || as_fn_error "could not create $ac_file" "$LINENO" 5
26319
26320 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26321   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26322   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26323   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26324 which seems to be undefined.  Please make sure it is defined." >&5
26325 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26326 which seems to be undefined.  Please make sure it is defined." >&2;}
26327
26328   rm -f "$tmp/stdin"
26329   case $ac_file in
26330   -) cat "$tmp/out" && rm -f "$tmp/out";;
26331   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
26332   esac \
26333   || as_fn_error "could not create $ac_file" "$LINENO" 5
26334  ;;
26335   :H)
26336   #
26337   # CONFIG_HEADER
26338   #
26339   if test x"$ac_file" != x-; then
26340     {
26341       $as_echo "/* $configure_input  */" \
26342       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
26343     } >"$tmp/config.h" \
26344       || as_fn_error "could not create $ac_file" "$LINENO" 5
26345     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
26346       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26347 $as_echo "$as_me: $ac_file is unchanged" >&6;}
26348     else
26349       rm -f "$ac_file"
26350       mv "$tmp/config.h" "$ac_file" \
26351         || as_fn_error "could not create $ac_file" "$LINENO" 5
26352     fi
26353   else
26354     $as_echo "/* $configure_input  */" \
26355       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
26356       || as_fn_error "could not create -" "$LINENO" 5
26357   fi
26358 # Compute "$ac_file"'s index in $config_headers.
26359 _am_stamp_count=1
26360 for _am_header in $config_headers :; do
26361   case $_am_header in
26362     "$ac_file" | "$ac_file":* )
26363       break ;;
26364     * )
26365       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26366   esac
26367 done
26368 echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
26369 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26370          X"$ac_file" : 'X\(//\)[^/]' \| \
26371          X"$ac_file" : 'X\(//\)$' \| \
26372          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26373 $as_echo X"$ac_file" |
26374     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26375             s//\1/
26376             q
26377           }
26378           /^X\(\/\/\)[^/].*/{
26379             s//\1/
26380             q
26381           }
26382           /^X\(\/\/\)$/{
26383             s//\1/
26384             q
26385           }
26386           /^X\(\/\).*/{
26387             s//\1/
26388             q
26389           }
26390           s/.*/./; q'`/stamp-h$_am_stamp_count
26391  ;;
26392
26393   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26394 $as_echo "$as_me: executing $ac_file commands" >&6;}
26395  ;;
26396   esac
26397
26398
26399   case $ac_file$ac_mode in
26400     "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
26401   # Strip MF so we end up with the name of the file.
26402   mf=`echo "$mf" | sed -e 's/:.*$//'`
26403   # Check whether this is an Automake generated Makefile or not.
26404   # We used to match only the files named `Makefile.in', but
26405   # some people rename them; so instead we look at the file content.
26406   # Grep'ing the first line is not enough: some people post-process
26407   # each Makefile.in and add a new line on top of each file to say so.
26408   # So let's grep whole file.
26409   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
26410     dirpart=`$as_dirname -- "$mf" ||
26411 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26412          X"$mf" : 'X\(//\)[^/]' \| \
26413          X"$mf" : 'X\(//\)$' \| \
26414          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
26415 $as_echo X"$mf" |
26416     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26417             s//\1/
26418             q
26419           }
26420           /^X\(\/\/\)[^/].*/{
26421             s//\1/
26422             q
26423           }
26424           /^X\(\/\/\)$/{
26425             s//\1/
26426             q
26427           }
26428           /^X\(\/\).*/{
26429             s//\1/
26430             q
26431           }
26432           s/.*/./; q'`
26433   else
26434     continue
26435   fi
26436   # Extract the definition of DEPDIR, am__include, and am__quote
26437   # from the Makefile without running `make'.
26438   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
26439   test -z "$DEPDIR" && continue
26440   am__include=`sed -n 's/^am__include = //p' < "$mf"`
26441   test -z "am__include" && continue
26442   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
26443   # When using ansi2knr, U may be empty or an underscore; expand it
26444   U=`sed -n 's/^U = //p' < "$mf"`
26445   # Find all dependency output files, they are included files with
26446   # $(DEPDIR) in their names.  We invoke sed twice because it is the
26447   # simplest approach to changing $(DEPDIR) to its actual value in the
26448   # expansion.
26449   for file in `sed -n "
26450     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
26451        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
26452     # Make sure the directory exists.
26453     test -f "$dirpart/$file" && continue
26454     fdir=`$as_dirname -- "$file" ||
26455 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26456          X"$file" : 'X\(//\)[^/]' \| \
26457          X"$file" : 'X\(//\)$' \| \
26458          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
26459 $as_echo X"$file" |
26460     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26461             s//\1/
26462             q
26463           }
26464           /^X\(\/\/\)[^/].*/{
26465             s//\1/
26466             q
26467           }
26468           /^X\(\/\/\)$/{
26469             s//\1/
26470             q
26471           }
26472           /^X\(\/\).*/{
26473             s//\1/
26474             q
26475           }
26476           s/.*/./; q'`
26477     as_dir=$dirpart/$fdir; as_fn_mkdir_p
26478     # echo "creating $dirpart/$file"
26479     echo '# dummy' > "$dirpart/$file"
26480   done
26481 done
26482  ;;
26483     "default":C)
26484 chmod +x tests/run
26485 date > stamp-h
26486 BACKENDSC="servers/slapd/backends.c"
26487 echo "Making $BACKENDSC"
26488 rm -f $BACKENDSC
26489 cat > $BACKENDSC << ENDX
26490 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26491  *
26492  * Copyright 1998-2017 The OpenLDAP Foundation.
26493  * All rights reserved.
26494  *
26495  * Redistribution and use in source and binary forms, with or without
26496  * modification, are permitted only as authorized by the OpenLDAP
26497  * Public License.
26498  *
26499  * A copy of this license is available in the file LICENSE in the
26500  * top-level directory of the distribution or, alternatively, at
26501  * <http://www.OpenLDAP.org/license.html>.
26502  */
26503 /* This file is automatically generated by configure; please do not edit. */
26504
26505 #include "portable.h"
26506 #include "slap.h"
26507
26508 ENDX
26509 if test "${STATIC_BACKENDS}"; then
26510         for b in config ${STATIC_BACKENDS}; do
26511                 bb=`echo "${b}" | sed -e 's/back-//'`
26512                 cat >> $BACKENDSC << ENDX
26513 extern BI_init ${bb}_back_initialize;
26514 ENDX
26515         done
26516
26517         cat >> $BACKENDSC << ENDX
26518
26519 BackendInfo slap_binfo[] = {
26520 ENDX
26521
26522         for b in config ${STATIC_BACKENDS}; do
26523                 bb=`echo "${b}" | sed -e 's/back-//'`
26524                 echo "    Add ${bb} ..."
26525                 cat >> $BACKENDSC << ENDX
26526         { "${bb}", ${bb}_back_initialize },
26527 ENDX
26528         done
26529
26530         cat >> $BACKENDSC << ENDX
26531         { NULL, NULL },
26532 };
26533
26534 /* end of generated file */
26535 ENDX
26536 fi
26537 OVERLAYSC="servers/slapd/overlays/statover.c"
26538 echo "Making $OVERLAYSC"
26539 rm -f $OVERLAYSC
26540 cat > $OVERLAYSC << ENDX
26541 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26542  *
26543  * Copyright 1998-2017 The OpenLDAP Foundation.
26544  * All rights reserved.
26545  *
26546  * Redistribution and use in source and binary forms, with or without
26547  * modification, are permitted only as authorized by the OpenLDAP
26548  * Public License.
26549  *
26550  * A copy of this license is available in the file LICENSE in the
26551  * top-level directory of the distribution or, alternatively, at
26552  * <http://www.OpenLDAP.org/license.html>.
26553  */
26554 /* This file is automatically generated by configure; please do not edit. */
26555
26556 #include "portable.h"
26557 #include "slap.h"
26558
26559 ENDX
26560 if test "${STATIC_OVERLAYS}"; then
26561         for o in ${STATIC_OVERLAYS}; do
26562                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26563                 cat >> $OVERLAYSC << ENDX
26564 extern OV_init ${oo}_initialize;
26565 ENDX
26566         done
26567 fi
26568
26569 cat >> $OVERLAYSC << ENDX
26570
26571 OverlayInit slap_oinfo[] = {
26572 ENDX
26573
26574 if test "${STATIC_OVERLAYS}"; then
26575         for o in ${STATIC_OVERLAYS}; do
26576                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26577                 echo "    Add ${oo} ..."
26578                 cat >> $OVERLAYSC << ENDX
26579         { "${oo}", ${oo}_initialize },
26580 ENDX
26581         done
26582 fi
26583
26584         cat >> $OVERLAYSC << ENDX
26585         { NULL, NULL },
26586 };
26587
26588 /* end of generated file */
26589 ENDX
26590
26591 if test "${ol_cv_mkdep}" = no; then
26592         echo '(Do not "make depend"; we do not know how to build dependencies)'
26593 else
26594         echo 'Please run "make depend" to build dependencies'
26595 fi
26596  ;;
26597
26598   esac
26599 done # for ac_tag
26600
26601
26602 as_fn_exit 0
26603 _ACEOF
26604 ac_clean_files=$ac_clean_files_save
26605
26606 test $ac_write_fail = 0 ||
26607   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
26608
26609
26610 # configure is writing to config.log, and then calls config.status.
26611 # config.status does its own redirection, appending to config.log.
26612 # Unfortunately, on DOS this fails, as config.log is still kept open
26613 # by configure, so config.status won't be able to write to it; its
26614 # output is simply discarded.  So we exec the FD to /dev/null,
26615 # effectively closing config.log, so it can be properly (re)opened and
26616 # appended to by config.status.  When coming back to configure, we
26617 # need to make the FD available again.
26618 if test "$no_create" != yes; then
26619   ac_cs_success=:
26620   ac_config_status_args=
26621   test "$silent" = yes &&
26622     ac_config_status_args="$ac_config_status_args --quiet"
26623   exec 5>/dev/null
26624   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26625   exec 5>>config.log
26626   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26627   # would make configure fail if this is the last instruction.
26628   $ac_cs_success || as_fn_exit $?
26629 fi
26630 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26631   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26632 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26633 fi
26634