]> git.sur5r.net Git - openldap/blob - configure
Do not require ac/string.h for lber_pvt.h
[openldap] / configure
1 #! /bin/sh
2 # From configure.in Id: 46e5e8cc8f0216bd3fa077597f237c3dbabd3a75 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.65.
5 #
6 # Copyright 1998-2018 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 WITH_TLS_TYPE
765 TLS_LIBS
766 SASL_LIBS
767 KRB5_LIBS
768 KRB4_LIBS
769 MOD_PERL_LDFLAGS
770 SLAPD_PERL_LDFLAGS
771 PERL_CPPFLAGS
772 SLAPD_DYNAMIC_OVERLAYS
773 SLAPD_STATIC_OVERLAYS
774 SLAPD_DYNAMIC_BACKENDS
775 SLAPD_STATIC_BACKENDS
776 SLAPD_NO_STATIC
777 SLAPD_MODULES_LDFLAGS
778 SLAPD_MODULES_CPPFLAGS
779 WRAP_LIBS
780 LUTIL_LIBS
781 LTHREAD_LIBS
782 SLAPD_NDB_INCS
783 SLAPD_NDB_LIBS
784 BDB_LIBS
785 SLAPD_LIBS
786 LDAP_LIBS
787 BUILD_VALSORT
788 BUILD_UNIQUE
789 BUILD_TRANSLUCENT
790 BUILD_SYNCPROV
791 BUILD_SSSVLV
792 BUILD_SEQMOD
793 BUILD_RWM
794 BUILD_RETCODE
795 BUILD_REFINT
796 BUILD_PROXYCACHE
797 BUILD_PPOLICY
798 BUILD_MEMBEROF
799 BUILD_LASTMOD
800 BUILD_DYNLIST
801 BUILD_DYNGROUP
802 BUILD_DEREF
803 BUILD_DENYOP
804 BUILD_DDS
805 BUILD_CONSTRAINT
806 BUILD_COLLECT
807 BUILD_AUTOCA
808 BUILD_AUDITLOG
809 BUILD_ACCESSLOG
810 BUILD_WT
811 BUILD_SQL
812 BUILD_SOCK
813 BUILD_SHELL
814 BUILD_PERL
815 BUILD_RELAY
816 BUILD_PASSWD
817 BUILD_NULL
818 BUILD_NDB
819 BUILD_MONITOR
820 BUILD_ASYNCMETA
821 BUILD_META
822 BUILD_MDB
823 BUILD_LDAP
824 BUILD_HDB
825 BUILD_DNSSRV
826 BUILD_BDB
827 SLAPD_SLAPI_DEPEND
828 BUILD_SLAPI
829 BUILD_SLAPD
830 BUILD_LIBS_DYNAMIC
831 BUILD_THREAD
832 WITH_ACI_ENABLED
833 WITH_MODULES_ENABLED
834 WITH_TLS
835 WITH_SASL
836 PLAT
837 LIBSRCS
838 LIBOBJS
839 PKGCONFIG
840 MYSQL
841 LTSTATIC
842 OL_MKDEP_FLAGS
843 OL_MKDEP
844 PERLBIN
845 LIBTOOL
846 CPP
847 OBJDUMP
848 AS
849 DLLTOOL
850 RANLIB
851 ECHO
852 LN_S
853 EGREP
854 GREP
855 am__fastdepCC_FALSE
856 am__fastdepCC_TRUE
857 CCDEPMODE
858 AMDEPBACKSLASH
859 AMDEP_FALSE
860 AMDEP_TRUE
861 am__quote
862 am__include
863 DEPDIR
864 OBJEXT
865 EXEEXT
866 ac_ct_CC
867 CPPFLAGS
868 LDFLAGS
869 CFLAGS
870 AR
871 CC
872 ldap_subdir
873 top_builddir
874 OPENLDAP_RELEASE_DATE
875 OPENLDAP_LIBVERSION
876 OPENLDAP_LIBRELEASE
877 am__untar
878 am__tar
879 AMTAR
880 am__leading_dot
881 SET_MAKE
882 AWK
883 mkdir_p
884 INSTALL_STRIP_PROGRAM
885 STRIP
886 install_sh
887 MAKEINFO
888 AUTOHEADER
889 AUTOMAKE
890 AUTOCONF
891 ACLOCAL
892 VERSION
893 PACKAGE
894 CYGPATH_W
895 INSTALL_DATA
896 INSTALL_SCRIPT
897 INSTALL_PROGRAM
898 target_os
899 target_vendor
900 target_cpu
901 target
902 host_os
903 host_vendor
904 host_cpu
905 host
906 build_os
907 build_vendor
908 build_cpu
909 build
910 target_alias
911 host_alias
912 build_alias
913 LIBS
914 ECHO_T
915 ECHO_N
916 ECHO_C
917 DEFS
918 mandir
919 localedir
920 libdir
921 psdir
922 pdfdir
923 dvidir
924 htmldir
925 infodir
926 docdir
927 oldincludedir
928 includedir
929 localstatedir
930 sharedstatedir
931 sysconfdir
932 datadir
933 datarootdir
934 libexecdir
935 sbindir
936 bindir
937 program_transform_name
938 prefix
939 exec_prefix
940 PACKAGE_URL
941 PACKAGE_BUGREPORT
942 PACKAGE_STRING
943 PACKAGE_VERSION
944 PACKAGE_TARNAME
945 PACKAGE_NAME
946 PATH_SEPARATOR
947 SHELL'
948 ac_subst_files=''
949 ac_user_opts='
950 enable_option_checking
951 with_subdir
952 enable_debug
953 enable_dynamic
954 enable_syslog
955 enable_proctitle
956 enable_ipv6
957 enable_local
958 with_cyrus_sasl
959 with_fetch
960 with_threads
961 with_tls
962 with_yielding_select
963 with_mp
964 with_odbc
965 enable_xxslapdoptions
966 enable_slapd
967 enable_dynacl
968 enable_aci
969 enable_cleartext
970 enable_crypt
971 enable_lmpasswd
972 enable_spasswd
973 enable_modules
974 enable_rewrite
975 enable_rlookups
976 enable_slapi
977 enable_slp
978 enable_wrappers
979 enable_xxslapbackends
980 enable_backends
981 enable_bdb
982 enable_dnssrv
983 enable_hdb
984 enable_ldap
985 enable_mdb
986 enable_meta
987 enable_asyncmeta
988 enable_monitor
989 enable_ndb
990 enable_null
991 enable_passwd
992 enable_perl
993 enable_relay
994 enable_shell
995 enable_sock
996 enable_sql
997 enable_wt
998 enable_xxslapoverlays
999 enable_overlays
1000 enable_accesslog
1001 enable_auditlog
1002 enable_autoca
1003 enable_collect
1004 enable_constraint
1005 enable_dds
1006 enable_deref
1007 enable_dyngroup
1008 enable_dynlist
1009 enable_memberof
1010 enable_ppolicy
1011 enable_proxycache
1012 enable_refint
1013 enable_retcode
1014 enable_rwm
1015 enable_seqmod
1016 enable_sssvlv
1017 enable_syncprov
1018 enable_translucent
1019 enable_unique
1020 enable_valsort
1021 enable_xxliboptions
1022 enable_static
1023 enable_shared
1024 enable_fast_install
1025 enable_dependency_tracking
1026 with_gnu_ld
1027 enable_libtool_lock
1028 with_pic
1029 with_tags
1030 with_xxinstall
1031 '
1032       ac_precious_vars='build_alias
1033 host_alias
1034 target_alias
1035 CC
1036 CFLAGS
1037 LDFLAGS
1038 LIBS
1039 CPPFLAGS
1040 CPP'
1041
1042
1043 # Initialize some variables set by options.
1044 ac_init_help=
1045 ac_init_version=false
1046 ac_unrecognized_opts=
1047 ac_unrecognized_sep=
1048 # The variables have the same names as the options, with
1049 # dashes changed to underlines.
1050 cache_file=/dev/null
1051 exec_prefix=NONE
1052 no_create=
1053 no_recursion=
1054 prefix=NONE
1055 program_prefix=NONE
1056 program_suffix=NONE
1057 program_transform_name=s,x,x,
1058 silent=
1059 site=
1060 srcdir=
1061 verbose=
1062 x_includes=NONE
1063 x_libraries=NONE
1064
1065 # Installation directory options.
1066 # These are left unexpanded so users can "make install exec_prefix=/foo"
1067 # and all the variables that are supposed to be based on exec_prefix
1068 # by default will actually change.
1069 # Use braces instead of parens because sh, perl, etc. also accept them.
1070 # (The list follows the same order as the GNU Coding Standards.)
1071 bindir='${exec_prefix}/bin'
1072 sbindir='${exec_prefix}/sbin'
1073 libexecdir='${exec_prefix}/libexec'
1074 datarootdir='${prefix}/share'
1075 datadir='${datarootdir}'
1076 sysconfdir='${prefix}/etc'
1077 sharedstatedir='${prefix}/com'
1078 localstatedir='${prefix}/var'
1079 includedir='${prefix}/include'
1080 oldincludedir='/usr/include'
1081 docdir='${datarootdir}/doc/${PACKAGE}'
1082 infodir='${datarootdir}/info'
1083 htmldir='${docdir}'
1084 dvidir='${docdir}'
1085 pdfdir='${docdir}'
1086 psdir='${docdir}'
1087 libdir='${exec_prefix}/lib'
1088 localedir='${datarootdir}/locale'
1089 mandir='${datarootdir}/man'
1090
1091 ac_prev=
1092 ac_dashdash=
1093 for ac_option
1094 do
1095   # If the previous option needs an argument, assign it.
1096   if test -n "$ac_prev"; then
1097     eval $ac_prev=\$ac_option
1098     ac_prev=
1099     continue
1100   fi
1101
1102   case $ac_option in
1103   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1104   *)    ac_optarg=yes ;;
1105   esac
1106
1107   # Accept the important Cygnus configure options, so we can diagnose typos.
1108
1109   case $ac_dashdash$ac_option in
1110   --)
1111     ac_dashdash=yes ;;
1112
1113   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1114     ac_prev=bindir ;;
1115   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1116     bindir=$ac_optarg ;;
1117
1118   -build | --build | --buil | --bui | --bu)
1119     ac_prev=build_alias ;;
1120   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1121     build_alias=$ac_optarg ;;
1122
1123   -cache-file | --cache-file | --cache-fil | --cache-fi \
1124   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1125     ac_prev=cache_file ;;
1126   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1127   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1128     cache_file=$ac_optarg ;;
1129
1130   --config-cache | -C)
1131     cache_file=config.cache ;;
1132
1133   -datadir | --datadir | --datadi | --datad)
1134     ac_prev=datadir ;;
1135   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1136     datadir=$ac_optarg ;;
1137
1138   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1139   | --dataroo | --dataro | --datar)
1140     ac_prev=datarootdir ;;
1141   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1142   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1143     datarootdir=$ac_optarg ;;
1144
1145   -disable-* | --disable-*)
1146     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1147     # Reject names that are not valid shell variable names.
1148     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1149       as_fn_error "invalid feature name: $ac_useropt"
1150     ac_useropt_orig=$ac_useropt
1151     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1152     case $ac_user_opts in
1153       *"
1154 "enable_$ac_useropt"
1155 "*) ;;
1156       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1157          ac_unrecognized_sep=', ';;
1158     esac
1159     eval enable_$ac_useropt=no ;;
1160
1161   -docdir | --docdir | --docdi | --doc | --do)
1162     ac_prev=docdir ;;
1163   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1164     docdir=$ac_optarg ;;
1165
1166   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1167     ac_prev=dvidir ;;
1168   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1169     dvidir=$ac_optarg ;;
1170
1171   -enable-* | --enable-*)
1172     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1173     # Reject names that are not valid shell variable names.
1174     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1175       as_fn_error "invalid feature name: $ac_useropt"
1176     ac_useropt_orig=$ac_useropt
1177     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1178     case $ac_user_opts in
1179       *"
1180 "enable_$ac_useropt"
1181 "*) ;;
1182       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1183          ac_unrecognized_sep=', ';;
1184     esac
1185     eval enable_$ac_useropt=\$ac_optarg ;;
1186
1187   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1188   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1189   | --exec | --exe | --ex)
1190     ac_prev=exec_prefix ;;
1191   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1192   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1193   | --exec=* | --exe=* | --ex=*)
1194     exec_prefix=$ac_optarg ;;
1195
1196   -gas | --gas | --ga | --g)
1197     # Obsolete; use --with-gas.
1198     with_gas=yes ;;
1199
1200   -help | --help | --hel | --he | -h)
1201     ac_init_help=long ;;
1202   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1203     ac_init_help=recursive ;;
1204   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1205     ac_init_help=short ;;
1206
1207   -host | --host | --hos | --ho)
1208     ac_prev=host_alias ;;
1209   -host=* | --host=* | --hos=* | --ho=*)
1210     host_alias=$ac_optarg ;;
1211
1212   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1213     ac_prev=htmldir ;;
1214   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1215   | --ht=*)
1216     htmldir=$ac_optarg ;;
1217
1218   -includedir | --includedir | --includedi | --included | --include \
1219   | --includ | --inclu | --incl | --inc)
1220     ac_prev=includedir ;;
1221   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1222   | --includ=* | --inclu=* | --incl=* | --inc=*)
1223     includedir=$ac_optarg ;;
1224
1225   -infodir | --infodir | --infodi | --infod | --info | --inf)
1226     ac_prev=infodir ;;
1227   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1228     infodir=$ac_optarg ;;
1229
1230   -libdir | --libdir | --libdi | --libd)
1231     ac_prev=libdir ;;
1232   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1233     libdir=$ac_optarg ;;
1234
1235   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1236   | --libexe | --libex | --libe)
1237     ac_prev=libexecdir ;;
1238   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1239   | --libexe=* | --libex=* | --libe=*)
1240     libexecdir=$ac_optarg ;;
1241
1242   -localedir | --localedir | --localedi | --localed | --locale)
1243     ac_prev=localedir ;;
1244   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1245     localedir=$ac_optarg ;;
1246
1247   -localstatedir | --localstatedir | --localstatedi | --localstated \
1248   | --localstate | --localstat | --localsta | --localst | --locals)
1249     ac_prev=localstatedir ;;
1250   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1251   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1252     localstatedir=$ac_optarg ;;
1253
1254   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1255     ac_prev=mandir ;;
1256   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1257     mandir=$ac_optarg ;;
1258
1259   -nfp | --nfp | --nf)
1260     # Obsolete; use --without-fp.
1261     with_fp=no ;;
1262
1263   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1264   | --no-cr | --no-c | -n)
1265     no_create=yes ;;
1266
1267   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1268   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1269     no_recursion=yes ;;
1270
1271   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1272   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1273   | --oldin | --oldi | --old | --ol | --o)
1274     ac_prev=oldincludedir ;;
1275   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1276   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1277   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1278     oldincludedir=$ac_optarg ;;
1279
1280   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1281     ac_prev=prefix ;;
1282   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1283     prefix=$ac_optarg ;;
1284
1285   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1286   | --program-pre | --program-pr | --program-p)
1287     ac_prev=program_prefix ;;
1288   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1289   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1290     program_prefix=$ac_optarg ;;
1291
1292   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1293   | --program-suf | --program-su | --program-s)
1294     ac_prev=program_suffix ;;
1295   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1296   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1297     program_suffix=$ac_optarg ;;
1298
1299   -program-transform-name | --program-transform-name \
1300   | --program-transform-nam | --program-transform-na \
1301   | --program-transform-n | --program-transform- \
1302   | --program-transform | --program-transfor \
1303   | --program-transfo | --program-transf \
1304   | --program-trans | --program-tran \
1305   | --progr-tra | --program-tr | --program-t)
1306     ac_prev=program_transform_name ;;
1307   -program-transform-name=* | --program-transform-name=* \
1308   | --program-transform-nam=* | --program-transform-na=* \
1309   | --program-transform-n=* | --program-transform-=* \
1310   | --program-transform=* | --program-transfor=* \
1311   | --program-transfo=* | --program-transf=* \
1312   | --program-trans=* | --program-tran=* \
1313   | --progr-tra=* | --program-tr=* | --program-t=*)
1314     program_transform_name=$ac_optarg ;;
1315
1316   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1317     ac_prev=pdfdir ;;
1318   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1319     pdfdir=$ac_optarg ;;
1320
1321   -psdir | --psdir | --psdi | --psd | --ps)
1322     ac_prev=psdir ;;
1323   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1324     psdir=$ac_optarg ;;
1325
1326   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1327   | -silent | --silent | --silen | --sile | --sil)
1328     silent=yes ;;
1329
1330   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1331     ac_prev=sbindir ;;
1332   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1333   | --sbi=* | --sb=*)
1334     sbindir=$ac_optarg ;;
1335
1336   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1337   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1338   | --sharedst | --shareds | --shared | --share | --shar \
1339   | --sha | --sh)
1340     ac_prev=sharedstatedir ;;
1341   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1342   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1343   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1344   | --sha=* | --sh=*)
1345     sharedstatedir=$ac_optarg ;;
1346
1347   -site | --site | --sit)
1348     ac_prev=site ;;
1349   -site=* | --site=* | --sit=*)
1350     site=$ac_optarg ;;
1351
1352   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1353     ac_prev=srcdir ;;
1354   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1355     srcdir=$ac_optarg ;;
1356
1357   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1358   | --syscon | --sysco | --sysc | --sys | --sy)
1359     ac_prev=sysconfdir ;;
1360   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1361   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1362     sysconfdir=$ac_optarg ;;
1363
1364   -target | --target | --targe | --targ | --tar | --ta | --t)
1365     ac_prev=target_alias ;;
1366   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1367     target_alias=$ac_optarg ;;
1368
1369   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1370     verbose=yes ;;
1371
1372   -version | --version | --versio | --versi | --vers | -V)
1373     ac_init_version=: ;;
1374
1375   -with-* | --with-*)
1376     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1377     # Reject names that are not valid shell variable names.
1378     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1379       as_fn_error "invalid package name: $ac_useropt"
1380     ac_useropt_orig=$ac_useropt
1381     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1382     case $ac_user_opts in
1383       *"
1384 "with_$ac_useropt"
1385 "*) ;;
1386       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1387          ac_unrecognized_sep=', ';;
1388     esac
1389     eval with_$ac_useropt=\$ac_optarg ;;
1390
1391   -without-* | --without-*)
1392     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1393     # Reject names that are not valid shell variable names.
1394     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1395       as_fn_error "invalid package name: $ac_useropt"
1396     ac_useropt_orig=$ac_useropt
1397     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1398     case $ac_user_opts in
1399       *"
1400 "with_$ac_useropt"
1401 "*) ;;
1402       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1403          ac_unrecognized_sep=', ';;
1404     esac
1405     eval with_$ac_useropt=no ;;
1406
1407   --x)
1408     # Obsolete; use --with-x.
1409     with_x=yes ;;
1410
1411   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1412   | --x-incl | --x-inc | --x-in | --x-i)
1413     ac_prev=x_includes ;;
1414   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1415   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1416     x_includes=$ac_optarg ;;
1417
1418   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1419   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1420     ac_prev=x_libraries ;;
1421   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1422   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1423     x_libraries=$ac_optarg ;;
1424
1425   -*) as_fn_error "unrecognized option: \`$ac_option'
1426 Try \`$0 --help' for more information."
1427     ;;
1428
1429   *=*)
1430     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1431     # Reject names that are not valid shell variable names.
1432     case $ac_envvar in #(
1433       '' | [0-9]* | *[!_$as_cr_alnum]* )
1434       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1435     esac
1436     eval $ac_envvar=\$ac_optarg
1437     export $ac_envvar ;;
1438
1439   *)
1440     # FIXME: should be removed in autoconf 3.0.
1441     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1442     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1443       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1444     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1445     ;;
1446
1447   esac
1448 done
1449
1450 if test -n "$ac_prev"; then
1451   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1452   as_fn_error "missing argument to $ac_option"
1453 fi
1454
1455 if test -n "$ac_unrecognized_opts"; then
1456   case $enable_option_checking in
1457     no) ;;
1458     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1459     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1460   esac
1461 fi
1462
1463 # Check all directory arguments for consistency.
1464 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1465                 datadir sysconfdir sharedstatedir localstatedir includedir \
1466                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1467                 libdir localedir mandir
1468 do
1469   eval ac_val=\$$ac_var
1470   # Remove trailing slashes.
1471   case $ac_val in
1472     */ )
1473       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1474       eval $ac_var=\$ac_val;;
1475   esac
1476   # Be sure to have absolute directory names.
1477   case $ac_val in
1478     [\\/$]* | ?:[\\/]* )  continue;;
1479     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1480   esac
1481   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1482 done
1483
1484 # There might be people who depend on the old broken behavior: `$host'
1485 # used to hold the argument of --host etc.
1486 # FIXME: To remove some day.
1487 build=$build_alias
1488 host=$host_alias
1489 target=$target_alias
1490
1491 # FIXME: To remove some day.
1492 if test "x$host_alias" != x; then
1493   if test "x$build_alias" = x; then
1494     cross_compiling=maybe
1495     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1496     If a cross compiler is detected then cross compile mode will be used." >&2
1497   elif test "x$build_alias" != "x$host_alias"; then
1498     cross_compiling=yes
1499   fi
1500 fi
1501
1502 ac_tool_prefix=
1503 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1504
1505 test "$silent" = yes && exec 6>/dev/null
1506
1507
1508 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1509 ac_ls_di=`ls -di .` &&
1510 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1511   as_fn_error "working directory cannot be determined"
1512 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1513   as_fn_error "pwd does not report name of working directory"
1514
1515
1516 # Find the source files, if location was not specified.
1517 if test -z "$srcdir"; then
1518   ac_srcdir_defaulted=yes
1519   # Try the directory containing this script, then the parent directory.
1520   ac_confdir=`$as_dirname -- "$as_myself" ||
1521 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1522          X"$as_myself" : 'X\(//\)[^/]' \| \
1523          X"$as_myself" : 'X\(//\)$' \| \
1524          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1525 $as_echo X"$as_myself" |
1526     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1527             s//\1/
1528             q
1529           }
1530           /^X\(\/\/\)[^/].*/{
1531             s//\1/
1532             q
1533           }
1534           /^X\(\/\/\)$/{
1535             s//\1/
1536             q
1537           }
1538           /^X\(\/\).*/{
1539             s//\1/
1540             q
1541           }
1542           s/.*/./; q'`
1543   srcdir=$ac_confdir
1544   if test ! -r "$srcdir/$ac_unique_file"; then
1545     srcdir=..
1546   fi
1547 else
1548   ac_srcdir_defaulted=no
1549 fi
1550 if test ! -r "$srcdir/$ac_unique_file"; then
1551   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1552   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1553 fi
1554 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1555 ac_abs_confdir=`(
1556         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1557         pwd)`
1558 # When building in place, set srcdir=.
1559 if test "$ac_abs_confdir" = "$ac_pwd"; then
1560   srcdir=.
1561 fi
1562 # Remove unnecessary trailing slashes from srcdir.
1563 # Double slashes in file names in object file debugging info
1564 # mess up M-x gdb in Emacs.
1565 case $srcdir in
1566 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1567 esac
1568 for ac_var in $ac_precious_vars; do
1569   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1570   eval ac_env_${ac_var}_value=\$${ac_var}
1571   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1572   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1573 done
1574
1575 #
1576 # Report the --help message.
1577 #
1578 if test "$ac_init_help" = "long"; then
1579   # Omit some internal or obsolete options to make the list less imposing.
1580   # This message is too long to be a string in the A/UX 3.1 sh.
1581   cat <<_ACEOF
1582 \`configure' configures this package to adapt to many kinds of systems.
1583
1584 Usage: $0 [OPTION]... [VAR=VALUE]...
1585
1586 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1587 VAR=VALUE.  See below for descriptions of some of the useful variables.
1588
1589 Defaults for the options are specified in brackets.
1590
1591 Configuration:
1592   -h, --help              display this help and exit
1593       --help=short        display options specific to this package
1594       --help=recursive    display the short help of all the included packages
1595   -V, --version           display version information and exit
1596   -q, --quiet, --silent   do not print \`checking...' messages
1597       --cache-file=FILE   cache test results in FILE [disabled]
1598   -C, --config-cache      alias for \`--cache-file=config.cache'
1599   -n, --no-create         do not create output files
1600       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1601
1602 Installation directories:
1603   --prefix=PREFIX         install architecture-independent files in PREFIX
1604                           [$ac_default_prefix]
1605   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1606                           [PREFIX]
1607
1608 By default, \`make install' will install all the files in
1609 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1610 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1611 for instance \`--prefix=\$HOME'.
1612
1613 For better control, use the options below.
1614
1615 Fine tuning of the installation directories:
1616   --bindir=DIR            user executables [EPREFIX/bin]
1617   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1618   --libexecdir=DIR        program executables [EPREFIX/libexec]
1619   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1620   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1621   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1622   --libdir=DIR            object code libraries [EPREFIX/lib]
1623   --includedir=DIR        C header files [PREFIX/include]
1624   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1625   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1626   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1627   --infodir=DIR           info documentation [DATAROOTDIR/info]
1628   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1629   --mandir=DIR            man documentation [DATAROOTDIR/man]
1630   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1631   --htmldir=DIR           html documentation [DOCDIR]
1632   --dvidir=DIR            dvi documentation [DOCDIR]
1633   --pdfdir=DIR            pdf documentation [DOCDIR]
1634   --psdir=DIR             ps documentation [DOCDIR]
1635 _ACEOF
1636
1637   cat <<\_ACEOF
1638
1639 Program names:
1640   --program-prefix=PREFIX            prepend PREFIX to installed program names
1641   --program-suffix=SUFFIX            append SUFFIX to installed program names
1642   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1643
1644 System types:
1645   --build=BUILD     configure for building on BUILD [guessed]
1646   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1647   --target=TARGET   configure for building compilers for TARGET [HOST]
1648 _ACEOF
1649 fi
1650
1651 if test -n "$ac_init_help"; then
1652
1653   cat <<\_ACEOF
1654
1655 Optional Features:
1656   --disable-option-checking  ignore unrecognized --enable/--with options
1657   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1658   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1659   --enable-debug          enable debugging no|yes|traditional [yes]
1660   --enable-dynamic        enable linking built binaries with dynamic libs [no]
1661   --enable-syslog         enable syslog support [auto]
1662   --enable-proctitle      enable proctitle support [yes]
1663   --enable-ipv6           enable IPv6 support [auto]
1664   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]
1665
1666 SLAPD (Standalone LDAP Daemon) Options:
1667   --enable-slapd          enable building slapd [yes]
1668     --enable-dynacl       enable run-time loadable ACL support (experimental) [no]
1669     --enable-aci          enable per-object ACIs (experimental) no|yes|mod [no]
1670     --enable-cleartext    enable cleartext passwords [yes]
1671     --enable-crypt        enable crypt(3) passwords [no]
1672     --enable-lmpasswd     enable LAN Manager passwords [no]
1673     --enable-spasswd      enable (Cyrus) SASL password verification [no]
1674     --enable-modules      enable dynamic module support [no]
1675     --enable-rewrite      enable DN rewriting in back-ldap and rwm overlay [auto]
1676     --enable-rlookups     enable reverse lookups of client hostnames [no]
1677     --enable-slapi        enable SLAPI support (experimental) [no]
1678     --enable-slp          enable SLPv2 support [no]
1679     --enable-wrappers     enable tcp wrapper support [no]
1680
1681 SLAPD Backend Options:
1682     --enable-backends     enable all available backends no|yes|mod
1683     --enable-bdb          enable Berkeley DB backend no|yes|mod [no]
1684     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]
1685     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]
1686     --enable-ldap         enable ldap backend no|yes|mod [no]
1687     --enable-mdb          enable mdb database backend no|yes|mod [yes]
1688     --enable-meta         enable metadirectory backend no|yes|mod [no]
1689     --enable-asyncmeta    enable asynchronous metadirectory backend no|yes|mod [no]
1690     --enable-monitor      enable monitor backend no|yes|mod [yes]
1691     --enable-ndb          enable MySQL NDB Cluster backend no|yes|mod [no]
1692     --enable-null         enable null backend no|yes|mod [no]
1693     --enable-passwd       enable passwd backend no|yes|mod [no]
1694     --enable-perl         enable perl backend no|yes|mod [no]
1695     --enable-relay        enable relay backend no|yes|mod [yes]
1696     --enable-shell        enable shell backend no|yes|mod [no]
1697     --enable-sock         enable sock backend no|yes|mod [no]
1698     --enable-sql          enable sql backend no|yes|mod [no]
1699     --enable-wt   enable WiredTiger backend no|yes|mod [no]
1700
1701 SLAPD Overlay Options:
1702     --enable-overlays     enable all available overlays no|yes|mod
1703     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [no]
1704     --enable-auditlog     Audit Logging overlay no|yes|mod [no]
1705     --enable-autoca       Automatic Certificate Authority overlay no|yes|mod [no]
1706     --enable-collect      Collect overlay no|yes|mod [no]
1707     --enable-constraint   Attribute Constraint overlay no|yes|mod [no]
1708     --enable-dds          Dynamic Directory Services overlay no|yes|mod [no]
1709     --enable-deref        Dereference overlay no|yes|mod [no]
1710     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1711     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1712     --enable-memberof     Reverse Group Membership overlay no|yes|mod [no]
1713     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1714     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1715     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1716     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1717     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1718     --enable-seqmod       Sequential Modify overlay no|yes|mod [no]
1719     --enable-sssvlv       ServerSideSort/VLV overlay no|yes|mod [no]
1720     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1721     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1722     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1723     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1724
1725 Library Generation & Linking Options
1726   --enable-static[=PKGS]  build static libraries [default=yes]
1727   --enable-shared[=PKGS]  build shared libraries [default=yes]
1728   --enable-fast-install[=PKGS]
1729                           optimize for fast installation [default=yes]
1730   --disable-dependency-tracking  speeds up one-time build
1731   --enable-dependency-tracking   do not reject slow dependency extractors
1732   --disable-libtool-lock  avoid locking (might break parallel builds)
1733
1734 Optional Packages:
1735   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1736   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1737   --with-subdir=DIR       change default subdirectory used for installs
1738   --with-cyrus-sasl       with Cyrus SASL support [auto]
1739   --with-fetch            with fetch(3) URL support [auto]
1740   --with-threads          with threads [auto]
1741   --with-tls              with TLS/SSL support auto|openssl|gnutls|moznss [auto]
1742   --with-yielding-select  with implicitly yielding select [auto]
1743   --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1744   --with-odbc             with specific ODBC support iodbc|unixodbc|odbc32|auto [auto]
1745   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1746   --with-pic              try to use only PIC/non-PIC objects [default=use
1747                           both]
1748   --with-tags[=TAGS]      include additional configurations [automatic]
1749
1750 See INSTALL file for further details.
1751
1752 Some influential environment variables:
1753   CC          C compiler command
1754   CFLAGS      C compiler flags
1755   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1756               nonstandard directory <lib dir>
1757   LIBS        libraries to pass to the linker, e.g. -l<library>
1758   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1759               you have headers in a nonstandard directory <include dir>
1760   CPP         C preprocessor
1761
1762 Use these variables to override the choices made by `configure' or to help
1763 it to find libraries and programs with nonstandard names/locations.
1764
1765 Report bugs to the package provider.
1766 _ACEOF
1767 ac_status=$?
1768 fi
1769
1770 if test "$ac_init_help" = "recursive"; then
1771   # If there are subdirs, report their specific --help.
1772   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1773     test -d "$ac_dir" ||
1774       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1775       continue
1776     ac_builddir=.
1777
1778 case "$ac_dir" in
1779 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1780 *)
1781   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1782   # A ".." for each directory in $ac_dir_suffix.
1783   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1784   case $ac_top_builddir_sub in
1785   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1786   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1787   esac ;;
1788 esac
1789 ac_abs_top_builddir=$ac_pwd
1790 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1791 # for backward compatibility:
1792 ac_top_builddir=$ac_top_build_prefix
1793
1794 case $srcdir in
1795   .)  # We are building in place.
1796     ac_srcdir=.
1797     ac_top_srcdir=$ac_top_builddir_sub
1798     ac_abs_top_srcdir=$ac_pwd ;;
1799   [\\/]* | ?:[\\/]* )  # Absolute name.
1800     ac_srcdir=$srcdir$ac_dir_suffix;
1801     ac_top_srcdir=$srcdir
1802     ac_abs_top_srcdir=$srcdir ;;
1803   *) # Relative name.
1804     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1805     ac_top_srcdir=$ac_top_build_prefix$srcdir
1806     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1807 esac
1808 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1809
1810     cd "$ac_dir" || { ac_status=$?; continue; }
1811     # Check for guested configure.
1812     if test -f "$ac_srcdir/configure.gnu"; then
1813       echo &&
1814       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1815     elif test -f "$ac_srcdir/configure"; then
1816       echo &&
1817       $SHELL "$ac_srcdir/configure" --help=recursive
1818     else
1819       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1820     fi || ac_status=$?
1821     cd "$ac_pwd" || { ac_status=$?; break; }
1822   done
1823 fi
1824
1825 test -n "$ac_init_help" && exit $ac_status
1826 if $ac_init_version; then
1827   cat <<\_ACEOF
1828 configure
1829 generated by GNU Autoconf 2.65
1830
1831 Copyright (C) 2009 Free Software Foundation, Inc.
1832 This configure script is free software; the Free Software Foundation
1833 gives unlimited permission to copy, distribute and modify it.
1834
1835 Copyright 1998-2018 The OpenLDAP Foundation. All rights reserved.
1836 Restrictions apply, see COPYRIGHT and LICENSE files.
1837 _ACEOF
1838   exit
1839 fi
1840
1841 ## ------------------------ ##
1842 ## Autoconf initialization. ##
1843 ## ------------------------ ##
1844
1845 # ac_fn_c_try_compile LINENO
1846 # --------------------------
1847 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1848 ac_fn_c_try_compile ()
1849 {
1850   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1851   rm -f conftest.$ac_objext
1852   if { { ac_try="$ac_compile"
1853 case "(($ac_try" in
1854   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1855   *) ac_try_echo=$ac_try;;
1856 esac
1857 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1858 $as_echo "$ac_try_echo"; } >&5
1859   (eval "$ac_compile") 2>conftest.err
1860   ac_status=$?
1861   if test -s conftest.err; then
1862     grep -v '^ *+' conftest.err >conftest.er1
1863     cat conftest.er1 >&5
1864     mv -f conftest.er1 conftest.err
1865   fi
1866   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867   test $ac_status = 0; } && {
1868          test -z "$ac_c_werror_flag" ||
1869          test ! -s conftest.err
1870        } && test -s conftest.$ac_objext; then :
1871   ac_retval=0
1872 else
1873   $as_echo "$as_me: failed program was:" >&5
1874 sed 's/^/| /' conftest.$ac_ext >&5
1875
1876         ac_retval=1
1877 fi
1878   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1879   as_fn_set_status $ac_retval
1880
1881 } # ac_fn_c_try_compile
1882
1883 # ac_fn_c_try_link LINENO
1884 # -----------------------
1885 # Try to link conftest.$ac_ext, and return whether this succeeded.
1886 ac_fn_c_try_link ()
1887 {
1888   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889   rm -f conftest.$ac_objext conftest$ac_exeext
1890   if { { ac_try="$ac_link"
1891 case "(($ac_try" in
1892   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1893   *) ac_try_echo=$ac_try;;
1894 esac
1895 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1896 $as_echo "$ac_try_echo"; } >&5
1897   (eval "$ac_link") 2>conftest.err
1898   ac_status=$?
1899   if test -s conftest.err; then
1900     grep -v '^ *+' conftest.err >conftest.er1
1901     cat conftest.er1 >&5
1902     mv -f conftest.er1 conftest.err
1903   fi
1904   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1905   test $ac_status = 0; } && {
1906          test -z "$ac_c_werror_flag" ||
1907          test ! -s conftest.err
1908        } && test -s conftest$ac_exeext && {
1909          test "$cross_compiling" = yes ||
1910          $as_test_x conftest$ac_exeext
1911        }; then :
1912   ac_retval=0
1913 else
1914   $as_echo "$as_me: failed program was:" >&5
1915 sed 's/^/| /' conftest.$ac_ext >&5
1916
1917         ac_retval=1
1918 fi
1919   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1920   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1921   # interfere with the next link command; also delete a directory that is
1922   # left behind by Apple's compiler.  We do this before executing the actions.
1923   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1924   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1925   as_fn_set_status $ac_retval
1926
1927 } # ac_fn_c_try_link
1928
1929 # ac_fn_c_try_cpp LINENO
1930 # ----------------------
1931 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1932 ac_fn_c_try_cpp ()
1933 {
1934   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935   if { { ac_try="$ac_cpp conftest.$ac_ext"
1936 case "(($ac_try" in
1937   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1938   *) ac_try_echo=$ac_try;;
1939 esac
1940 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1941 $as_echo "$ac_try_echo"; } >&5
1942   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1943   ac_status=$?
1944   if test -s conftest.err; then
1945     grep -v '^ *+' conftest.err >conftest.er1
1946     cat conftest.er1 >&5
1947     mv -f conftest.er1 conftest.err
1948   fi
1949   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1950   test $ac_status = 0; } >/dev/null && {
1951          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1952          test ! -s conftest.err
1953        }; then :
1954   ac_retval=0
1955 else
1956   $as_echo "$as_me: failed program was:" >&5
1957 sed 's/^/| /' conftest.$ac_ext >&5
1958
1959     ac_retval=1
1960 fi
1961   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1962   as_fn_set_status $ac_retval
1963
1964 } # ac_fn_c_try_cpp
1965
1966 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1967 # -------------------------------------------------------
1968 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1969 # the include files in INCLUDES and setting the cache variable VAR
1970 # accordingly.
1971 ac_fn_c_check_header_mongrel ()
1972 {
1973   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1974   if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1975   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1976 $as_echo_n "checking for $2... " >&6; }
1977 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1978   $as_echo_n "(cached) " >&6
1979 fi
1980 eval ac_res=\$$3
1981                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982 $as_echo "$ac_res" >&6; }
1983 else
1984   # Is the header compilable?
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1986 $as_echo_n "checking $2 usability... " >&6; }
1987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1988 /* end confdefs.h.  */
1989 $4
1990 #include <$2>
1991 _ACEOF
1992 if ac_fn_c_try_compile "$LINENO"; then :
1993   ac_header_compiler=yes
1994 else
1995   ac_header_compiler=no
1996 fi
1997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1999 $as_echo "$ac_header_compiler" >&6; }
2000
2001 # Is the header present?
2002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2003 $as_echo_n "checking $2 presence... " >&6; }
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005 /* end confdefs.h.  */
2006 #include <$2>
2007 _ACEOF
2008 if ac_fn_c_try_cpp "$LINENO"; then :
2009   ac_header_preproc=yes
2010 else
2011   ac_header_preproc=no
2012 fi
2013 rm -f conftest.err conftest.$ac_ext
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2015 $as_echo "$ac_header_preproc" >&6; }
2016
2017 # So?  What about this header?
2018 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2019   yes:no: )
2020     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2021 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2022     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2023 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2024     ;;
2025   no:yes:* )
2026     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2027 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2028     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2029 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2030     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2031 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2032     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2033 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2034     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2035 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2036 ( cat <<\_ASBOX
2037 ## --------------------------------------------- ##
2038 ## Report this to <http://www.openldap.org/its/> ##
2039 ## --------------------------------------------- ##
2040 _ASBOX
2041      ) | sed "s/^/$as_me: WARNING:     /" >&2
2042     ;;
2043 esac
2044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2045 $as_echo_n "checking for $2... " >&6; }
2046 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2047   $as_echo_n "(cached) " >&6
2048 else
2049   eval "$3=\$ac_header_compiler"
2050 fi
2051 eval ac_res=\$$3
2052                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2053 $as_echo "$ac_res" >&6; }
2054 fi
2055   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2056
2057 } # ac_fn_c_check_header_mongrel
2058
2059 # ac_fn_c_try_run LINENO
2060 # ----------------------
2061 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2062 # that executables *can* be run.
2063 ac_fn_c_try_run ()
2064 {
2065   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066   if { { ac_try="$ac_link"
2067 case "(($ac_try" in
2068   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2069   *) ac_try_echo=$ac_try;;
2070 esac
2071 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2072 $as_echo "$ac_try_echo"; } >&5
2073   (eval "$ac_link") 2>&5
2074   ac_status=$?
2075   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2076   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2077   { { case "(($ac_try" in
2078   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2079   *) ac_try_echo=$ac_try;;
2080 esac
2081 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2082 $as_echo "$ac_try_echo"; } >&5
2083   (eval "$ac_try") 2>&5
2084   ac_status=$?
2085   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2086   test $ac_status = 0; }; }; then :
2087   ac_retval=0
2088 else
2089   $as_echo "$as_me: program exited with status $ac_status" >&5
2090        $as_echo "$as_me: failed program was:" >&5
2091 sed 's/^/| /' conftest.$ac_ext >&5
2092
2093        ac_retval=$ac_status
2094 fi
2095   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2096   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2097   as_fn_set_status $ac_retval
2098
2099 } # ac_fn_c_try_run
2100
2101 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2102 # -------------------------------------------------------
2103 # Tests whether HEADER exists and can be compiled using the include files in
2104 # INCLUDES, setting the cache variable VAR accordingly.
2105 ac_fn_c_check_header_compile ()
2106 {
2107   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2108   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2109 $as_echo_n "checking for $2... " >&6; }
2110 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2111   $as_echo_n "(cached) " >&6
2112 else
2113   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2114 /* end confdefs.h.  */
2115 $4
2116 #include <$2>
2117 _ACEOF
2118 if ac_fn_c_try_compile "$LINENO"; then :
2119   eval "$3=yes"
2120 else
2121   eval "$3=no"
2122 fi
2123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2124 fi
2125 eval ac_res=\$$3
2126                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2127 $as_echo "$ac_res" >&6; }
2128   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2129
2130 } # ac_fn_c_check_header_compile
2131
2132 # ac_fn_c_check_func LINENO FUNC VAR
2133 # ----------------------------------
2134 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2135 ac_fn_c_check_func ()
2136 {
2137   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2138   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2139 $as_echo_n "checking for $2... " >&6; }
2140 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2141   $as_echo_n "(cached) " >&6
2142 else
2143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2144 /* end confdefs.h.  */
2145 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2146    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2147 #define $2 innocuous_$2
2148
2149 /* System header to define __stub macros and hopefully few prototypes,
2150     which can conflict with char $2 (); below.
2151     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2152     <limits.h> exists even on freestanding compilers.  */
2153
2154 #ifdef __STDC__
2155 # include <limits.h>
2156 #else
2157 # include <assert.h>
2158 #endif
2159
2160 #undef $2
2161
2162 /* Override any GCC internal prototype to avoid an error.
2163    Use char because int might match the return type of a GCC
2164    builtin and then its argument prototype would still apply.  */
2165 #ifdef __cplusplus
2166 extern "C"
2167 #endif
2168 char $2 ();
2169 /* The GNU C library defines this for functions which it implements
2170     to always fail with ENOSYS.  Some functions are actually named
2171     something starting with __ and the normal name is an alias.  */
2172 #if defined __stub_$2 || defined __stub___$2
2173 choke me
2174 #endif
2175
2176 int
2177 main ()
2178 {
2179 return $2 ();
2180   ;
2181   return 0;
2182 }
2183 _ACEOF
2184 if ac_fn_c_try_link "$LINENO"; then :
2185   eval "$3=yes"
2186 else
2187   eval "$3=no"
2188 fi
2189 rm -f core conftest.err conftest.$ac_objext \
2190     conftest$ac_exeext conftest.$ac_ext
2191 fi
2192 eval ac_res=\$$3
2193                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2194 $as_echo "$ac_res" >&6; }
2195   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2196
2197 } # ac_fn_c_check_func
2198
2199 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2200 # -------------------------------------------
2201 # Tests whether TYPE exists after having included INCLUDES, setting cache
2202 # variable VAR accordingly.
2203 ac_fn_c_check_type ()
2204 {
2205   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2206   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2207 $as_echo_n "checking for $2... " >&6; }
2208 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2209   $as_echo_n "(cached) " >&6
2210 else
2211   eval "$3=no"
2212   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2213 /* end confdefs.h.  */
2214 $4
2215 int
2216 main ()
2217 {
2218 if (sizeof ($2))
2219          return 0;
2220   ;
2221   return 0;
2222 }
2223 _ACEOF
2224 if ac_fn_c_try_compile "$LINENO"; then :
2225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2226 /* end confdefs.h.  */
2227 $4
2228 int
2229 main ()
2230 {
2231 if (sizeof (($2)))
2232             return 0;
2233   ;
2234   return 0;
2235 }
2236 _ACEOF
2237 if ac_fn_c_try_compile "$LINENO"; then :
2238
2239 else
2240   eval "$3=yes"
2241 fi
2242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2243 fi
2244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2245 fi
2246 eval ac_res=\$$3
2247                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2248 $as_echo "$ac_res" >&6; }
2249   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2250
2251 } # ac_fn_c_check_type
2252
2253 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2254 # ----------------------------------------------------
2255 # Tries to find if the field MEMBER exists in type AGGR, after including
2256 # INCLUDES, setting cache variable VAR accordingly.
2257 ac_fn_c_check_member ()
2258 {
2259   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2260   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2261 $as_echo_n "checking for $2.$3... " >&6; }
2262 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2263   $as_echo_n "(cached) " >&6
2264 else
2265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266 /* end confdefs.h.  */
2267 $5
2268 int
2269 main ()
2270 {
2271 static $2 ac_aggr;
2272 if (ac_aggr.$3)
2273 return 0;
2274   ;
2275   return 0;
2276 }
2277 _ACEOF
2278 if ac_fn_c_try_compile "$LINENO"; then :
2279   eval "$4=yes"
2280 else
2281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2282 /* end confdefs.h.  */
2283 $5
2284 int
2285 main ()
2286 {
2287 static $2 ac_aggr;
2288 if (sizeof ac_aggr.$3)
2289 return 0;
2290   ;
2291   return 0;
2292 }
2293 _ACEOF
2294 if ac_fn_c_try_compile "$LINENO"; then :
2295   eval "$4=yes"
2296 else
2297   eval "$4=no"
2298 fi
2299 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2300 fi
2301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2302 fi
2303 eval ac_res=\$$4
2304                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2305 $as_echo "$ac_res" >&6; }
2306   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2307
2308 } # ac_fn_c_check_member
2309
2310 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2311 # --------------------------------------------
2312 # Tries to find the compile-time value of EXPR in a program that includes
2313 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2314 # computed
2315 ac_fn_c_compute_int ()
2316 {
2317   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2318   if test "$cross_compiling" = yes; then
2319     # Depending upon the size, compute the lo and hi bounds.
2320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321 /* end confdefs.h.  */
2322 $4
2323 int
2324 main ()
2325 {
2326 static int test_array [1 - 2 * !(($2) >= 0)];
2327 test_array [0] = 0
2328
2329   ;
2330   return 0;
2331 }
2332 _ACEOF
2333 if ac_fn_c_try_compile "$LINENO"; then :
2334   ac_lo=0 ac_mid=0
2335   while :; do
2336     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2337 /* end confdefs.h.  */
2338 $4
2339 int
2340 main ()
2341 {
2342 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2343 test_array [0] = 0
2344
2345   ;
2346   return 0;
2347 }
2348 _ACEOF
2349 if ac_fn_c_try_compile "$LINENO"; then :
2350   ac_hi=$ac_mid; break
2351 else
2352   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2353                         if test $ac_lo -le $ac_mid; then
2354                           ac_lo= ac_hi=
2355                           break
2356                         fi
2357                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2358 fi
2359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2360   done
2361 else
2362   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2363 /* end confdefs.h.  */
2364 $4
2365 int
2366 main ()
2367 {
2368 static int test_array [1 - 2 * !(($2) < 0)];
2369 test_array [0] = 0
2370
2371   ;
2372   return 0;
2373 }
2374 _ACEOF
2375 if ac_fn_c_try_compile "$LINENO"; then :
2376   ac_hi=-1 ac_mid=-1
2377   while :; do
2378     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379 /* end confdefs.h.  */
2380 $4
2381 int
2382 main ()
2383 {
2384 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2385 test_array [0] = 0
2386
2387   ;
2388   return 0;
2389 }
2390 _ACEOF
2391 if ac_fn_c_try_compile "$LINENO"; then :
2392   ac_lo=$ac_mid; break
2393 else
2394   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2395                         if test $ac_mid -le $ac_hi; then
2396                           ac_lo= ac_hi=
2397                           break
2398                         fi
2399                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2400 fi
2401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2402   done
2403 else
2404   ac_lo= ac_hi=
2405 fi
2406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2407 fi
2408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409 # Binary search between lo and hi bounds.
2410 while test "x$ac_lo" != "x$ac_hi"; do
2411   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2412   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2413 /* end confdefs.h.  */
2414 $4
2415 int
2416 main ()
2417 {
2418 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2419 test_array [0] = 0
2420
2421   ;
2422   return 0;
2423 }
2424 _ACEOF
2425 if ac_fn_c_try_compile "$LINENO"; then :
2426   ac_hi=$ac_mid
2427 else
2428   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2429 fi
2430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2431 done
2432 case $ac_lo in #((
2433 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2434 '') ac_retval=1 ;;
2435 esac
2436   else
2437     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2438 /* end confdefs.h.  */
2439 $4
2440 static long int longval () { return $2; }
2441 static unsigned long int ulongval () { return $2; }
2442 #include <stdio.h>
2443 #include <stdlib.h>
2444 int
2445 main ()
2446 {
2447
2448   FILE *f = fopen ("conftest.val", "w");
2449   if (! f)
2450     return 1;
2451   if (($2) < 0)
2452     {
2453       long int i = longval ();
2454       if (i != ($2))
2455         return 1;
2456       fprintf (f, "%ld", i);
2457     }
2458   else
2459     {
2460       unsigned long int i = ulongval ();
2461       if (i != ($2))
2462         return 1;
2463       fprintf (f, "%lu", i);
2464     }
2465   /* Do not output a trailing newline, as this causes \r\n confusion
2466      on some platforms.  */
2467   return ferror (f) || fclose (f) != 0;
2468
2469   ;
2470   return 0;
2471 }
2472 _ACEOF
2473 if ac_fn_c_try_run "$LINENO"; then :
2474   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2475 else
2476   ac_retval=1
2477 fi
2478 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2479   conftest.$ac_objext conftest.beam conftest.$ac_ext
2480 rm -f conftest.val
2481
2482   fi
2483   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2484   as_fn_set_status $ac_retval
2485
2486 } # ac_fn_c_compute_int
2487 cat >config.log <<_ACEOF
2488 This file contains any messages produced by compilers while
2489 running configure, to aid debugging if configure makes a mistake.
2490
2491 It was created by $as_me, which was
2492 generated by GNU Autoconf 2.65.  Invocation command line was
2493
2494   $ $0 $@
2495
2496 _ACEOF
2497 exec 5>>config.log
2498 {
2499 cat <<_ASUNAME
2500 ## --------- ##
2501 ## Platform. ##
2502 ## --------- ##
2503
2504 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2505 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2506 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2507 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2508 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2509
2510 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2511 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2512
2513 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2514 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2515 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2516 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2517 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2518 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2519 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2520
2521 _ASUNAME
2522
2523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2524 for as_dir in $PATH
2525 do
2526   IFS=$as_save_IFS
2527   test -z "$as_dir" && as_dir=.
2528     $as_echo "PATH: $as_dir"
2529   done
2530 IFS=$as_save_IFS
2531
2532 } >&5
2533
2534 cat >&5 <<_ACEOF
2535
2536
2537 ## ----------- ##
2538 ## Core tests. ##
2539 ## ----------- ##
2540
2541 _ACEOF
2542
2543
2544 # Keep a trace of the command line.
2545 # Strip out --no-create and --no-recursion so they do not pile up.
2546 # Strip out --silent because we don't want to record it for future runs.
2547 # Also quote any args containing shell meta-characters.
2548 # Make two passes to allow for proper duplicate-argument suppression.
2549 ac_configure_args=
2550 ac_configure_args0=
2551 ac_configure_args1=
2552 ac_must_keep_next=false
2553 for ac_pass in 1 2
2554 do
2555   for ac_arg
2556   do
2557     case $ac_arg in
2558     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2559     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2560     | -silent | --silent | --silen | --sile | --sil)
2561       continue ;;
2562     *\'*)
2563       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2564     esac
2565     case $ac_pass in
2566     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2567     2)
2568       as_fn_append ac_configure_args1 " '$ac_arg'"
2569       if test $ac_must_keep_next = true; then
2570         ac_must_keep_next=false # Got value, back to normal.
2571       else
2572         case $ac_arg in
2573           *=* | --config-cache | -C | -disable-* | --disable-* \
2574           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2575           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2576           | -with-* | --with-* | -without-* | --without-* | --x)
2577             case "$ac_configure_args0 " in
2578               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2579             esac
2580             ;;
2581           -* ) ac_must_keep_next=true ;;
2582         esac
2583       fi
2584       as_fn_append ac_configure_args " '$ac_arg'"
2585       ;;
2586     esac
2587   done
2588 done
2589 { ac_configure_args0=; unset ac_configure_args0;}
2590 { ac_configure_args1=; unset ac_configure_args1;}
2591
2592 # When interrupted or exit'd, cleanup temporary files, and complete
2593 # config.log.  We remove comments because anyway the quotes in there
2594 # would cause problems or look ugly.
2595 # WARNING: Use '\'' to represent an apostrophe within the trap.
2596 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2597 trap 'exit_status=$?
2598   # Save into config.log some information that might help in debugging.
2599   {
2600     echo
2601
2602     cat <<\_ASBOX
2603 ## ---------------- ##
2604 ## Cache variables. ##
2605 ## ---------------- ##
2606 _ASBOX
2607     echo
2608     # The following way of writing the cache mishandles newlines in values,
2609 (
2610   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2611     eval ac_val=\$$ac_var
2612     case $ac_val in #(
2613     *${as_nl}*)
2614       case $ac_var in #(
2615       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2616 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2617       esac
2618       case $ac_var in #(
2619       _ | IFS | as_nl) ;; #(
2620       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2621       *) { eval $ac_var=; unset $ac_var;} ;;
2622       esac ;;
2623     esac
2624   done
2625   (set) 2>&1 |
2626     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2627     *${as_nl}ac_space=\ *)
2628       sed -n \
2629         "s/'\''/'\''\\\\'\'''\''/g;
2630           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2631       ;; #(
2632     *)
2633       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2634       ;;
2635     esac |
2636     sort
2637 )
2638     echo
2639
2640     cat <<\_ASBOX
2641 ## ----------------- ##
2642 ## Output variables. ##
2643 ## ----------------- ##
2644 _ASBOX
2645     echo
2646     for ac_var in $ac_subst_vars
2647     do
2648       eval ac_val=\$$ac_var
2649       case $ac_val in
2650       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2651       esac
2652       $as_echo "$ac_var='\''$ac_val'\''"
2653     done | sort
2654     echo
2655
2656     if test -n "$ac_subst_files"; then
2657       cat <<\_ASBOX
2658 ## ------------------- ##
2659 ## File substitutions. ##
2660 ## ------------------- ##
2661 _ASBOX
2662       echo
2663       for ac_var in $ac_subst_files
2664       do
2665         eval ac_val=\$$ac_var
2666         case $ac_val in
2667         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2668         esac
2669         $as_echo "$ac_var='\''$ac_val'\''"
2670       done | sort
2671       echo
2672     fi
2673
2674     if test -s confdefs.h; then
2675       cat <<\_ASBOX
2676 ## ----------- ##
2677 ## confdefs.h. ##
2678 ## ----------- ##
2679 _ASBOX
2680       echo
2681       cat confdefs.h
2682       echo
2683     fi
2684     test "$ac_signal" != 0 &&
2685       $as_echo "$as_me: caught signal $ac_signal"
2686     $as_echo "$as_me: exit $exit_status"
2687   } >&5
2688   rm -f core *.core core.conftest.* &&
2689     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2690     exit $exit_status
2691 ' 0
2692 for ac_signal in 1 2 13 15; do
2693   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2694 done
2695 ac_signal=0
2696
2697 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2698 rm -f -r conftest* confdefs.h
2699
2700 $as_echo "/* confdefs.h */" > confdefs.h
2701
2702 # Predefined preprocessor variables.
2703
2704 cat >>confdefs.h <<_ACEOF
2705 #define PACKAGE_NAME "$PACKAGE_NAME"
2706 _ACEOF
2707
2708 cat >>confdefs.h <<_ACEOF
2709 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2710 _ACEOF
2711
2712 cat >>confdefs.h <<_ACEOF
2713 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2714 _ACEOF
2715
2716 cat >>confdefs.h <<_ACEOF
2717 #define PACKAGE_STRING "$PACKAGE_STRING"
2718 _ACEOF
2719
2720 cat >>confdefs.h <<_ACEOF
2721 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2722 _ACEOF
2723
2724 cat >>confdefs.h <<_ACEOF
2725 #define PACKAGE_URL "$PACKAGE_URL"
2726 _ACEOF
2727
2728
2729 # Let the site file select an alternate cache file if it wants to.
2730 # Prefer an explicitly selected file to automatically selected ones.
2731 ac_site_file1=NONE
2732 ac_site_file2=NONE
2733 if test -n "$CONFIG_SITE"; then
2734   ac_site_file1=$CONFIG_SITE
2735 elif test "x$prefix" != xNONE; then
2736   ac_site_file1=$prefix/share/config.site
2737   ac_site_file2=$prefix/etc/config.site
2738 else
2739   ac_site_file1=$ac_default_prefix/share/config.site
2740   ac_site_file2=$ac_default_prefix/etc/config.site
2741 fi
2742 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2743 do
2744   test "x$ac_site_file" = xNONE && continue
2745   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2746     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2747 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2748     sed 's/^/| /' "$ac_site_file" >&5
2749     . "$ac_site_file"
2750   fi
2751 done
2752
2753
2754 # Check that the precious variables saved in the cache have kept the same
2755 # value.
2756 ac_cache_corrupted=false
2757 for ac_var in $ac_precious_vars; do
2758   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2759   eval ac_new_set=\$ac_env_${ac_var}_set
2760   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2761   eval ac_new_val=\$ac_env_${ac_var}_value
2762   case $ac_old_set,$ac_new_set in
2763     set,)
2764       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2765 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2766       ac_cache_corrupted=: ;;
2767     ,set)
2768       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2769 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2770       ac_cache_corrupted=: ;;
2771     ,);;
2772     *)
2773       if test "x$ac_old_val" != "x$ac_new_val"; then
2774         # differences in whitespace do not lead to failure.
2775         ac_old_val_w=`echo x $ac_old_val`
2776         ac_new_val_w=`echo x $ac_new_val`
2777         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2778           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2779 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2780           ac_cache_corrupted=:
2781         else
2782           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2783 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2784           eval $ac_var=\$ac_old_val
2785         fi
2786         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2787 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2788         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2789 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2790       fi;;
2791   esac
2792   # Pass precious variables to config.status.
2793   if test "$ac_new_set" = set; then
2794     case $ac_new_val in
2795     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2796     *) ac_arg=$ac_var=$ac_new_val ;;
2797     esac
2798     case " $ac_configure_args " in
2799       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2800       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2801     esac
2802   fi
2803 done
2804 if $ac_cache_corrupted; then
2805   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2806 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2807   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2808 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2809   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2810 fi
2811 ## -------------------- ##
2812 ## Main body of script. ##
2813 ## -------------------- ##
2814
2815 ac_ext=c
2816 ac_cpp='$CPP $CPPFLAGS'
2817 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2818 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2819 ac_compiler_gnu=$ac_cv_c_compiler_gnu
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
2848 ac_aux_dir=
2849 for ac_dir in build "$srcdir"/build; do
2850   for ac_t in install-sh install.sh shtool; do
2851     if test -f "$ac_dir/$ac_t"; then
2852       ac_aux_dir=$ac_dir
2853       ac_install_sh="$ac_aux_dir/$ac_t -c"
2854       break 2
2855     fi
2856   done
2857 done
2858 if test -z "$ac_aux_dir"; then
2859   as_fn_error "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5
2860 fi
2861
2862 # These three variables are undocumented and unsupported,
2863 # and are intended to be withdrawn in a future Autoconf release.
2864 # They can cause serious problems if a builder's source tree is in a directory
2865 # whose full name contains unusual characters.
2866 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2867 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2868 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2869
2870
2871 eval `$ac_aux_dir/version.sh`
2872 if test -z "$OL_STRING"; then
2873         as_fn_error "could not determine version" "$LINENO" 5
2874 fi
2875
2876 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
2877         ac_cv_shtool="$ac_aux_dir/shtool"
2878 else
2879         as_fn_error "no shtool found in $ac_aux_dir" "$LINENO" 5
2880 fi
2881
2882 SHTOOL="$ac_cv_shtool"
2883
2884 TB="" TN=""
2885 if test -t 1; then
2886         TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
2887         TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
2888 fi
2889
2890 OPENLDAP_REPO=""
2891 if test -d $ac_aux_dir/../.git; then
2892         OPENLDAP_REPO="(from Git clone) "
2893 elif test -d $ac_aux_dir/CVS; then
2894         OPENLDAP_REPO="(from CVS checkout) "
2895 fi
2896
2897 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_REPO}..."
2898
2899 # Make sure we can run config.sub.
2900 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2901   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2902
2903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2904 $as_echo_n "checking build system type... " >&6; }
2905 if test "${ac_cv_build+set}" = set; then :
2906   $as_echo_n "(cached) " >&6
2907 else
2908   ac_build_alias=$build_alias
2909 test "x$ac_build_alias" = x &&
2910   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2911 test "x$ac_build_alias" = x &&
2912   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
2913 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2914   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2915
2916 fi
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2918 $as_echo "$ac_cv_build" >&6; }
2919 case $ac_cv_build in
2920 *-*-*) ;;
2921 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
2922 esac
2923 build=$ac_cv_build
2924 ac_save_IFS=$IFS; IFS='-'
2925 set x $ac_cv_build
2926 shift
2927 build_cpu=$1
2928 build_vendor=$2
2929 shift; shift
2930 # Remember, the first character of IFS is used to create $*,
2931 # except with old shells:
2932 build_os=$*
2933 IFS=$ac_save_IFS
2934 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2935
2936
2937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2938 $as_echo_n "checking host system type... " >&6; }
2939 if test "${ac_cv_host+set}" = set; then :
2940   $as_echo_n "(cached) " >&6
2941 else
2942   if test "x$host_alias" = x; then
2943   ac_cv_host=$ac_cv_build
2944 else
2945   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2946     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2947 fi
2948
2949 fi
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2951 $as_echo "$ac_cv_host" >&6; }
2952 case $ac_cv_host in
2953 *-*-*) ;;
2954 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
2955 esac
2956 host=$ac_cv_host
2957 ac_save_IFS=$IFS; IFS='-'
2958 set x $ac_cv_host
2959 shift
2960 host_cpu=$1
2961 host_vendor=$2
2962 shift; shift
2963 # Remember, the first character of IFS is used to create $*,
2964 # except with old shells:
2965 host_os=$*
2966 IFS=$ac_save_IFS
2967 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2968
2969
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2971 $as_echo_n "checking target system type... " >&6; }
2972 if test "${ac_cv_target+set}" = set; then :
2973   $as_echo_n "(cached) " >&6
2974 else
2975   if test "x$target_alias" = x; then
2976   ac_cv_target=$ac_cv_host
2977 else
2978   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2979     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2980 fi
2981
2982 fi
2983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2984 $as_echo "$ac_cv_target" >&6; }
2985 case $ac_cv_target in
2986 *-*-*) ;;
2987 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
2988 esac
2989 target=$ac_cv_target
2990 ac_save_IFS=$IFS; IFS='-'
2991 set x $ac_cv_target
2992 shift
2993 target_cpu=$1
2994 target_vendor=$2
2995 shift; shift
2996 # Remember, the first character of IFS is used to create $*,
2997 # except with old shells:
2998 target_os=$*
2999 IFS=$ac_save_IFS
3000 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
3001
3002
3003 # The aliases save the names the user supplied, while $host etc.
3004 # will get canonicalized.
3005 test -n "$target_alias" &&
3006   test "$program_prefix$program_suffix$program_transform_name" = \
3007     NONENONEs,x,x, &&
3008   program_prefix=${target_alias}-
3009
3010 am__api_version="1.9"
3011 # Find a good install program.  We prefer a C program (faster),
3012 # so one script is as good as another.  But avoid the broken or
3013 # incompatible versions:
3014 # SysV /etc/install, /usr/sbin/install
3015 # SunOS /usr/etc/install
3016 # IRIX /sbin/install
3017 # AIX /bin/install
3018 # AmigaOS /C/install, which installs bootblocks on floppy discs
3019 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3020 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3021 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3022 # OS/2's system install, which has a completely different semantic
3023 # ./install, which can be erroneously created by make from ./install.sh.
3024 # Reject install programs that cannot install multiple files.
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3026 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3027 if test -z "$INSTALL"; then
3028 if test "${ac_cv_path_install+set}" = set; then :
3029   $as_echo_n "(cached) " >&6
3030 else
3031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3032 for as_dir in $PATH
3033 do
3034   IFS=$as_save_IFS
3035   test -z "$as_dir" && as_dir=.
3036     # Account for people who put trailing slashes in PATH elements.
3037 case $as_dir/ in #((
3038   ./ | .// | /[cC]/* | \
3039   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3040   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3041   /usr/ucb/* ) ;;
3042   *)
3043     # OSF1 and SCO ODT 3.0 have their own names for install.
3044     # Don't use installbsd from OSF since it installs stuff as root
3045     # by default.
3046     for ac_prog in ginstall scoinst install; do
3047       for ac_exec_ext in '' $ac_executable_extensions; do
3048         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3049           if test $ac_prog = install &&
3050             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3051             # AIX install.  It has an incompatible calling convention.
3052             :
3053           elif test $ac_prog = install &&
3054             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3055             # program-specific install script used by HP pwplus--don't use.
3056             :
3057           else
3058             rm -rf conftest.one conftest.two conftest.dir
3059             echo one > conftest.one
3060             echo two > conftest.two
3061             mkdir conftest.dir
3062             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3063               test -s conftest.one && test -s conftest.two &&
3064               test -s conftest.dir/conftest.one &&
3065               test -s conftest.dir/conftest.two
3066             then
3067               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3068               break 3
3069             fi
3070           fi
3071         fi
3072       done
3073     done
3074     ;;
3075 esac
3076
3077   done
3078 IFS=$as_save_IFS
3079
3080 rm -rf conftest.one conftest.two conftest.dir
3081
3082 fi
3083   if test "${ac_cv_path_install+set}" = set; then
3084     INSTALL=$ac_cv_path_install
3085   else
3086     # As a last resort, use the slow shell script.  Don't cache a
3087     # value for INSTALL within a source directory, because that will
3088     # break other packages using the cache if that directory is
3089     # removed, or if the value is a relative name.
3090     INSTALL=$ac_install_sh
3091   fi
3092 fi
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3094 $as_echo "$INSTALL" >&6; }
3095
3096 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3097 # It thinks the first close brace ends the variable substitution.
3098 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3099
3100 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3101
3102 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3103
3104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3105 $as_echo_n "checking whether build environment is sane... " >&6; }
3106 # Just in case
3107 sleep 1
3108 echo timestamp > conftest.file
3109 # Do `set' in a subshell so we don't clobber the current shell's
3110 # arguments.  Must try -L first in case configure is actually a
3111 # symlink; some systems play weird games with the mod time of symlinks
3112 # (eg FreeBSD returns the mod time of the symlink's containing
3113 # directory).
3114 if (
3115    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
3116    if test "$*" = "X"; then
3117       # -L didn't work.
3118       set X `ls -t $srcdir/configure conftest.file`
3119    fi
3120    rm -f conftest.file
3121    if test "$*" != "X $srcdir/configure conftest.file" \
3122       && test "$*" != "X conftest.file $srcdir/configure"; then
3123
3124       # If neither matched, then we have a broken ls.  This can happen
3125       # if, for instance, CONFIG_SHELL is bash and it inherits a
3126       # broken ls alias from the environment.  This has actually
3127       # happened.  Such a system could not be considered "sane".
3128       as_fn_error "ls -t appears to fail.  Make sure there is not a broken
3129 alias in your environment" "$LINENO" 5
3130    fi
3131
3132    test "$2" = conftest.file
3133    )
3134 then
3135    # Ok.
3136    :
3137 else
3138    as_fn_error "newly created file is older than distributed files!
3139 Check your system clock" "$LINENO" 5
3140 fi
3141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3142 $as_echo "yes" >&6; }
3143 test "$program_prefix" != NONE &&
3144   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3145 # Use a double $ so make ignores it.
3146 test "$program_suffix" != NONE &&
3147   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3148 # Double any \ or $.
3149 # By default was `s,x,x', remove it if useless.
3150 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3151 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3152
3153 # expand $ac_aux_dir to an absolute path
3154 am_aux_dir=`cd $ac_aux_dir && pwd`
3155
3156 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3157 # Use eval to expand $SHELL
3158 if eval "$MISSING --run true"; then
3159   am_missing_run="$MISSING --run "
3160 else
3161   am_missing_run=
3162   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3163 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3164 fi
3165
3166 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
3167   # We used to keeping the `.' as first argument, in order to
3168   # allow $(mkdir_p) to be used without argument.  As in
3169   #   $(mkdir_p) $(somedir)
3170   # where $(somedir) is conditionally defined.  However this is wrong
3171   # for two reasons:
3172   #  1. if the package is installed by a user who cannot write `.'
3173   #     make install will fail,
3174   #  2. the above comment should most certainly read
3175   #     $(mkdir_p) $(DESTDIR)$(somedir)
3176   #     so it does not work when $(somedir) is undefined and
3177   #     $(DESTDIR) is not.
3178   #  To support the latter case, we have to write
3179   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
3180   #  so the `.' trick is pointless.
3181   mkdir_p='mkdir -p --'
3182 else
3183   # On NextStep and OpenStep, the `mkdir' command does not
3184   # recognize any option.  It will interpret all options as
3185   # directories to create, and then abort because `.' already
3186   # exists.
3187   for d in ./-p ./--version;
3188   do
3189     test -d $d && rmdir $d
3190   done
3191   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
3192   if test -f "$ac_aux_dir/mkinstalldirs"; then
3193     mkdir_p='$(mkinstalldirs)'
3194   else
3195     mkdir_p='$(install_sh) -d'
3196   fi
3197 fi
3198
3199 for ac_prog in gawk mawk nawk awk
3200 do
3201   # Extract the first word of "$ac_prog", so it can be a program name with args.
3202 set dummy $ac_prog; ac_word=$2
3203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3204 $as_echo_n "checking for $ac_word... " >&6; }
3205 if test "${ac_cv_prog_AWK+set}" = set; then :
3206   $as_echo_n "(cached) " >&6
3207 else
3208   if test -n "$AWK"; then
3209   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3210 else
3211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3212 for as_dir in $PATH
3213 do
3214   IFS=$as_save_IFS
3215   test -z "$as_dir" && as_dir=.
3216     for ac_exec_ext in '' $ac_executable_extensions; do
3217   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3218     ac_cv_prog_AWK="$ac_prog"
3219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3220     break 2
3221   fi
3222 done
3223   done
3224 IFS=$as_save_IFS
3225
3226 fi
3227 fi
3228 AWK=$ac_cv_prog_AWK
3229 if test -n "$AWK"; then
3230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3231 $as_echo "$AWK" >&6; }
3232 else
3233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3234 $as_echo "no" >&6; }
3235 fi
3236
3237
3238   test -n "$AWK" && break
3239 done
3240
3241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3242 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3243 set x ${MAKE-make}
3244 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3245 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3246   $as_echo_n "(cached) " >&6
3247 else
3248   cat >conftest.make <<\_ACEOF
3249 SHELL = /bin/sh
3250 all:
3251         @echo '@@@%%%=$(MAKE)=@@@%%%'
3252 _ACEOF
3253 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3254 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3255   *@@@%%%=?*=@@@%%%*)
3256     eval ac_cv_prog_make_${ac_make}_set=yes;;
3257   *)
3258     eval ac_cv_prog_make_${ac_make}_set=no;;
3259 esac
3260 rm -f conftest.make
3261 fi
3262 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3264 $as_echo "yes" >&6; }
3265   SET_MAKE=
3266 else
3267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3268 $as_echo "no" >&6; }
3269   SET_MAKE="MAKE=${MAKE-make}"
3270 fi
3271
3272 rm -rf .tst 2>/dev/null
3273 mkdir .tst 2>/dev/null
3274 if test -d .tst; then
3275   am__leading_dot=.
3276 else
3277   am__leading_dot=_
3278 fi
3279 rmdir .tst 2>/dev/null
3280
3281 # test to see if srcdir already configured
3282 if test "`cd $srcdir && pwd`" != "`pwd`" &&
3283    test -f $srcdir/config.status; then
3284   as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3285 fi
3286
3287 # test whether we have cygpath
3288 if test -z "$CYGPATH_W"; then
3289   if (cygpath --version) >/dev/null 2>/dev/null; then
3290     CYGPATH_W='cygpath -w'
3291   else
3292     CYGPATH_W=echo
3293   fi
3294 fi
3295
3296
3297 # Define the identity of the package.
3298  PACKAGE=$OL_PACKAGE
3299  VERSION=$OL_VERSION
3300
3301
3302 # Some tools Automake needs.
3303
3304 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3305
3306
3307 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3308
3309
3310 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3311
3312
3313 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3314
3315
3316 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3317
3318 install_sh=${install_sh-"$am_aux_dir/install-sh"}
3319
3320 # Installed binaries are usually stripped using `strip' when the user
3321 # run `make install-strip'.  However `strip' might not be the right
3322 # tool to use in cross-compilation environments, therefore Automake
3323 # will honor the `STRIP' environment variable to overrule this program.
3324 if test "$cross_compiling" != no; then
3325   if test -n "$ac_tool_prefix"; then
3326   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3327 set dummy ${ac_tool_prefix}strip; ac_word=$2
3328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3329 $as_echo_n "checking for $ac_word... " >&6; }
3330 if test "${ac_cv_prog_STRIP+set}" = set; then :
3331   $as_echo_n "(cached) " >&6
3332 else
3333   if test -n "$STRIP"; then
3334   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3335 else
3336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3337 for as_dir in $PATH
3338 do
3339   IFS=$as_save_IFS
3340   test -z "$as_dir" && as_dir=.
3341     for ac_exec_ext in '' $ac_executable_extensions; do
3342   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3343     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3345     break 2
3346   fi
3347 done
3348   done
3349 IFS=$as_save_IFS
3350
3351 fi
3352 fi
3353 STRIP=$ac_cv_prog_STRIP
3354 if test -n "$STRIP"; then
3355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3356 $as_echo "$STRIP" >&6; }
3357 else
3358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3359 $as_echo "no" >&6; }
3360 fi
3361
3362
3363 fi
3364 if test -z "$ac_cv_prog_STRIP"; then
3365   ac_ct_STRIP=$STRIP
3366   # Extract the first word of "strip", so it can be a program name with args.
3367 set dummy strip; ac_word=$2
3368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3369 $as_echo_n "checking for $ac_word... " >&6; }
3370 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3371   $as_echo_n "(cached) " >&6
3372 else
3373   if test -n "$ac_ct_STRIP"; then
3374   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3375 else
3376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3377 for as_dir in $PATH
3378 do
3379   IFS=$as_save_IFS
3380   test -z "$as_dir" && as_dir=.
3381     for ac_exec_ext in '' $ac_executable_extensions; do
3382   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3383     ac_cv_prog_ac_ct_STRIP="strip"
3384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3385     break 2
3386   fi
3387 done
3388   done
3389 IFS=$as_save_IFS
3390
3391 fi
3392 fi
3393 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3394 if test -n "$ac_ct_STRIP"; then
3395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3396 $as_echo "$ac_ct_STRIP" >&6; }
3397 else
3398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3399 $as_echo "no" >&6; }
3400 fi
3401
3402   if test "x$ac_ct_STRIP" = x; then
3403     STRIP=":"
3404   else
3405     case $cross_compiling:$ac_tool_warned in
3406 yes:)
3407 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3408 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3409 ac_tool_warned=yes ;;
3410 esac
3411     STRIP=$ac_ct_STRIP
3412   fi
3413 else
3414   STRIP="$ac_cv_prog_STRIP"
3415 fi
3416
3417 fi
3418 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
3419
3420 # We need awk for the "check" target.  The system "awk" is bad on
3421 # some platforms.
3422 # Always define AMTAR for backward compatibility.
3423
3424 AMTAR=${AMTAR-"${am_missing_run}tar"}
3425
3426 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3427
3428
3429
3430
3431
3432 cat >>confdefs.h <<_ACEOF
3433 #define OPENLDAP_PACKAGE "$PACKAGE"
3434 _ACEOF
3435
3436
3437 cat >>confdefs.h <<_ACEOF
3438 #define OPENLDAP_VERSION "$VERSION"
3439 _ACEOF
3440
3441
3442
3443 cat >>confdefs.h <<_ACEOF
3444 #define LDAP_VENDOR_VERSION $OL_API_INC
3445 _ACEOF
3446
3447
3448 cat >>confdefs.h <<_ACEOF
3449 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
3450 _ACEOF
3451
3452
3453 cat >>confdefs.h <<_ACEOF
3454 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
3455 _ACEOF
3456
3457
3458 cat >>confdefs.h <<_ACEOF
3459 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
3460 _ACEOF
3461
3462
3463 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
3464
3465 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
3466
3467 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
3468
3469
3470
3471
3472
3473 ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
3474
3475 ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
3476
3477 ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
3478
3479
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking configure arguments" >&5
3481 $as_echo_n "checking configure arguments... " >&6; }
3482
3483
3484 top_builddir=`pwd`
3485
3486 ldap_subdir="/openldap"
3487
3488
3489 # Check whether --with-subdir was given.
3490 if test "${with_subdir+set}" = set; then :
3491   withval=$with_subdir; case "$withval" in
3492         no) ldap_subdir=""
3493                 ;;
3494         yes)
3495                 ;;
3496         /*|\\*)
3497                 ldap_subdir="$withval"
3498                 ;;
3499         *)
3500                 ldap_subdir="/$withval"
3501                 ;;
3502 esac
3503
3504 fi
3505
3506
3507 # OpenLDAP --enable-debug
3508
3509         # Check whether --enable-debug was given.
3510 if test "${enable_debug+set}" = set; then :
3511   enableval=$enable_debug;
3512         ol_arg=invalid
3513         for ol_val in no yes traditional ; do
3514                 if test "$enableval" = "$ol_val" ; then
3515                         ol_arg="$ol_val"
3516                 fi
3517         done
3518         if test "$ol_arg" = "invalid" ; then
3519                 as_fn_error "bad value $enableval for --enable-debug" "$LINENO" 5
3520         fi
3521         ol_enable_debug="$ol_arg"
3522
3523 else
3524         ol_enable_debug=yes
3525 fi
3526
3527 # end --enable-debug
3528 # OpenLDAP --enable-dynamic
3529
3530         # Check whether --enable-dynamic was given.
3531 if test "${enable_dynamic+set}" = set; then :
3532   enableval=$enable_dynamic;
3533         ol_arg=invalid
3534         for ol_val in auto yes no ; do
3535                 if test "$enableval" = "$ol_val" ; then
3536                         ol_arg="$ol_val"
3537                 fi
3538         done
3539         if test "$ol_arg" = "invalid" ; then
3540                 as_fn_error "bad value $enableval for --enable-dynamic" "$LINENO" 5
3541         fi
3542         ol_enable_dynamic="$ol_arg"
3543
3544 else
3545         ol_enable_dynamic=no
3546 fi
3547
3548 # end --enable-dynamic
3549 # OpenLDAP --enable-syslog
3550
3551         # Check whether --enable-syslog was given.
3552 if test "${enable_syslog+set}" = set; then :
3553   enableval=$enable_syslog;
3554         ol_arg=invalid
3555         for ol_val in auto yes no ; do
3556                 if test "$enableval" = "$ol_val" ; then
3557                         ol_arg="$ol_val"
3558                 fi
3559         done
3560         if test "$ol_arg" = "invalid" ; then
3561                 as_fn_error "bad value $enableval for --enable-syslog" "$LINENO" 5
3562         fi
3563         ol_enable_syslog="$ol_arg"
3564
3565 else
3566         ol_enable_syslog=auto
3567 fi
3568
3569 # end --enable-syslog
3570 # OpenLDAP --enable-proctitle
3571
3572         # Check whether --enable-proctitle was given.
3573 if test "${enable_proctitle+set}" = set; then :
3574   enableval=$enable_proctitle;
3575         ol_arg=invalid
3576         for ol_val in auto yes no ; do
3577                 if test "$enableval" = "$ol_val" ; then
3578                         ol_arg="$ol_val"
3579                 fi
3580         done
3581         if test "$ol_arg" = "invalid" ; then
3582                 as_fn_error "bad value $enableval for --enable-proctitle" "$LINENO" 5
3583         fi
3584         ol_enable_proctitle="$ol_arg"
3585
3586 else
3587         ol_enable_proctitle=yes
3588 fi
3589
3590 # end --enable-proctitle
3591 ol_enable_referrals=${ol_enable_referrals-no}
3592 # OpenLDAP --enable-ipv6
3593
3594         # Check whether --enable-ipv6 was given.
3595 if test "${enable_ipv6+set}" = set; then :
3596   enableval=$enable_ipv6;
3597         ol_arg=invalid
3598         for ol_val in auto yes no ; do
3599                 if test "$enableval" = "$ol_val" ; then
3600                         ol_arg="$ol_val"
3601                 fi
3602         done
3603         if test "$ol_arg" = "invalid" ; then
3604                 as_fn_error "bad value $enableval for --enable-ipv6" "$LINENO" 5
3605         fi
3606         ol_enable_ipv6="$ol_arg"
3607
3608 else
3609         ol_enable_ipv6=auto
3610 fi
3611
3612 # end --enable-ipv6
3613 # OpenLDAP --enable-local
3614
3615         # Check whether --enable-local was given.
3616 if test "${enable_local+set}" = set; then :
3617   enableval=$enable_local;
3618         ol_arg=invalid
3619         for ol_val in auto yes no ; do
3620                 if test "$enableval" = "$ol_val" ; then
3621                         ol_arg="$ol_val"
3622                 fi
3623         done
3624         if test "$ol_arg" = "invalid" ; then
3625                 as_fn_error "bad value $enableval for --enable-local" "$LINENO" 5
3626         fi
3627         ol_enable_local="$ol_arg"
3628
3629 else
3630         ol_enable_local=auto
3631 fi
3632
3633 # end --enable-local
3634
3635 # OpenLDAP --with-cyrus_sasl
3636
3637 # Check whether --with-cyrus_sasl was given.
3638 if test "${with_cyrus_sasl+set}" = set; then :
3639   withval=$with_cyrus_sasl;
3640         ol_arg=invalid
3641         for ol_val in auto yes no  ; do
3642                 if test "$withval" = "$ol_val" ; then
3643                         ol_arg="$ol_val"
3644                 fi
3645         done
3646         if test "$ol_arg" = "invalid" ; then
3647                 as_fn_error "bad value $withval for --with-cyrus_sasl" "$LINENO" 5
3648         fi
3649         ol_with_cyrus_sasl="$ol_arg"
3650
3651 else
3652         ol_with_cyrus_sasl="auto"
3653 fi
3654 # end --with-cyrus_sasl
3655
3656 # OpenLDAP --with-fetch
3657
3658 # Check whether --with-fetch was given.
3659 if test "${with_fetch+set}" = set; then :
3660   withval=$with_fetch;
3661         ol_arg=invalid
3662         for ol_val in auto yes no  ; do
3663                 if test "$withval" = "$ol_val" ; then
3664                         ol_arg="$ol_val"
3665                 fi
3666         done
3667         if test "$ol_arg" = "invalid" ; then
3668                 as_fn_error "bad value $withval for --with-fetch" "$LINENO" 5
3669         fi
3670         ol_with_fetch="$ol_arg"
3671
3672 else
3673         ol_with_fetch="auto"
3674 fi
3675 # end --with-fetch
3676
3677 # OpenLDAP --with-threads
3678
3679 # Check whether --with-threads was given.
3680 if test "${with_threads+set}" = set; then :
3681   withval=$with_threads;
3682         ol_arg=invalid
3683         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
3684                 if test "$withval" = "$ol_val" ; then
3685                         ol_arg="$ol_val"
3686                 fi
3687         done
3688         if test "$ol_arg" = "invalid" ; then
3689                 as_fn_error "bad value $withval for --with-threads" "$LINENO" 5
3690         fi
3691         ol_with_threads="$ol_arg"
3692
3693 else
3694         ol_with_threads="auto"
3695 fi
3696 # end --with-threads
3697
3698 # OpenLDAP --with-tls
3699
3700 # Check whether --with-tls was given.
3701 if test "${with_tls+set}" = set; then :
3702   withval=$with_tls;
3703         ol_arg=invalid
3704         for ol_val in auto openssl gnutls moznss yes no  ; do
3705                 if test "$withval" = "$ol_val" ; then
3706                         ol_arg="$ol_val"
3707                 fi
3708         done
3709         if test "$ol_arg" = "invalid" ; then
3710                 as_fn_error "bad value $withval for --with-tls" "$LINENO" 5
3711         fi
3712         ol_with_tls="$ol_arg"
3713
3714 else
3715         ol_with_tls="auto"
3716 fi
3717 # end --with-tls
3718
3719 # OpenLDAP --with-yielding_select
3720
3721 # Check whether --with-yielding_select was given.
3722 if test "${with_yielding_select+set}" = set; then :
3723   withval=$with_yielding_select;
3724         ol_arg=invalid
3725         for ol_val in auto yes no manual  ; do
3726                 if test "$withval" = "$ol_val" ; then
3727                         ol_arg="$ol_val"
3728                 fi
3729         done
3730         if test "$ol_arg" = "invalid" ; then
3731                 as_fn_error "bad value $withval for --with-yielding_select" "$LINENO" 5
3732         fi
3733         ol_with_yielding_select="$ol_arg"
3734
3735 else
3736         ol_with_yielding_select="auto"
3737 fi
3738 # end --with-yielding_select
3739
3740 # OpenLDAP --with-mp
3741
3742 # Check whether --with-mp was given.
3743 if test "${with_mp+set}" = set; then :
3744   withval=$with_mp;
3745         ol_arg=invalid
3746         for ol_val in auto longlong long bignum gmp yes no ; do
3747                 if test "$withval" = "$ol_val" ; then
3748                         ol_arg="$ol_val"
3749                 fi
3750         done
3751         if test "$ol_arg" = "invalid" ; then
3752                 as_fn_error "bad value $withval for --with-mp" "$LINENO" 5
3753         fi
3754         ol_with_mp="$ol_arg"
3755
3756 else
3757         ol_with_mp="auto"
3758 fi
3759 # end --with-mp
3760
3761 # OpenLDAP --with-odbc
3762
3763 # Check whether --with-odbc was given.
3764 if test "${with_odbc+set}" = set; then :
3765   withval=$with_odbc;
3766         ol_arg=invalid
3767         for ol_val in auto iodbc unixodbc odbc32  ; do
3768                 if test "$withval" = "$ol_val" ; then
3769                         ol_arg="$ol_val"
3770                 fi
3771         done
3772         if test "$ol_arg" = "invalid" ; then
3773                 as_fn_error "bad value $withval for --with-odbc" "$LINENO" 5
3774         fi
3775         ol_with_odbc="$ol_arg"
3776
3777 else
3778         ol_with_odbc="auto"
3779 fi
3780 # end --with-odbc
3781
3782
3783
3784 # Check whether --enable-xxslapdoptions was given.
3785 if test "${enable_xxslapdoptions+set}" = set; then :
3786   enableval=$enable_xxslapdoptions;
3787 fi
3788
3789 # OpenLDAP --enable-slapd
3790
3791         # Check whether --enable-slapd was given.
3792 if test "${enable_slapd+set}" = set; then :
3793   enableval=$enable_slapd;
3794         ol_arg=invalid
3795         for ol_val in auto yes no ; do
3796                 if test "$enableval" = "$ol_val" ; then
3797                         ol_arg="$ol_val"
3798                 fi
3799         done
3800         if test "$ol_arg" = "invalid" ; then
3801                 as_fn_error "bad value $enableval for --enable-slapd" "$LINENO" 5
3802         fi
3803         ol_enable_slapd="$ol_arg"
3804
3805 else
3806         ol_enable_slapd=yes
3807 fi
3808
3809 # end --enable-slapd
3810 # OpenLDAP --enable-dynacl
3811
3812         # Check whether --enable-dynacl was given.
3813 if test "${enable_dynacl+set}" = set; then :
3814   enableval=$enable_dynacl;
3815         ol_arg=invalid
3816         for ol_val in auto yes no ; do
3817                 if test "$enableval" = "$ol_val" ; then
3818                         ol_arg="$ol_val"
3819                 fi
3820         done
3821         if test "$ol_arg" = "invalid" ; then
3822                 as_fn_error "bad value $enableval for --enable-dynacl" "$LINENO" 5
3823         fi
3824         ol_enable_dynacl="$ol_arg"
3825
3826 else
3827         ol_enable_dynacl=no
3828 fi
3829
3830 # end --enable-dynacl
3831 # OpenLDAP --enable-aci
3832
3833         # Check whether --enable-aci was given.
3834 if test "${enable_aci+set}" = set; then :
3835   enableval=$enable_aci;
3836         ol_arg=invalid
3837         for ol_val in no yes mod ; do
3838                 if test "$enableval" = "$ol_val" ; then
3839                         ol_arg="$ol_val"
3840                 fi
3841         done
3842         if test "$ol_arg" = "invalid" ; then
3843                 as_fn_error "bad value $enableval for --enable-aci" "$LINENO" 5
3844         fi
3845         ol_enable_aci="$ol_arg"
3846
3847 else
3848         ol_enable_aci=no
3849 fi
3850
3851 # end --enable-aci
3852 # OpenLDAP --enable-cleartext
3853
3854         # Check whether --enable-cleartext was given.
3855 if test "${enable_cleartext+set}" = set; then :
3856   enableval=$enable_cleartext;
3857         ol_arg=invalid
3858         for ol_val in auto yes no ; do
3859                 if test "$enableval" = "$ol_val" ; then
3860                         ol_arg="$ol_val"
3861                 fi
3862         done
3863         if test "$ol_arg" = "invalid" ; then
3864                 as_fn_error "bad value $enableval for --enable-cleartext" "$LINENO" 5
3865         fi
3866         ol_enable_cleartext="$ol_arg"
3867
3868 else
3869         ol_enable_cleartext=yes
3870 fi
3871
3872 # end --enable-cleartext
3873 # OpenLDAP --enable-crypt
3874
3875         # Check whether --enable-crypt was given.
3876 if test "${enable_crypt+set}" = set; then :
3877   enableval=$enable_crypt;
3878         ol_arg=invalid
3879         for ol_val in auto yes no ; do
3880                 if test "$enableval" = "$ol_val" ; then
3881                         ol_arg="$ol_val"
3882                 fi
3883         done
3884         if test "$ol_arg" = "invalid" ; then
3885                 as_fn_error "bad value $enableval for --enable-crypt" "$LINENO" 5
3886         fi
3887         ol_enable_crypt="$ol_arg"
3888
3889 else
3890         ol_enable_crypt=no
3891 fi
3892
3893 # end --enable-crypt
3894 # OpenLDAP --enable-lmpasswd
3895
3896         # Check whether --enable-lmpasswd was given.
3897 if test "${enable_lmpasswd+set}" = set; then :
3898   enableval=$enable_lmpasswd;
3899         ol_arg=invalid
3900         for ol_val in auto yes no ; do
3901                 if test "$enableval" = "$ol_val" ; then
3902                         ol_arg="$ol_val"
3903                 fi
3904         done
3905         if test "$ol_arg" = "invalid" ; then
3906                 as_fn_error "bad value $enableval for --enable-lmpasswd" "$LINENO" 5
3907         fi
3908         ol_enable_lmpasswd="$ol_arg"
3909
3910 else
3911         ol_enable_lmpasswd=no
3912 fi
3913
3914 # end --enable-lmpasswd
3915 # OpenLDAP --enable-spasswd
3916
3917         # Check whether --enable-spasswd was given.
3918 if test "${enable_spasswd+set}" = set; then :
3919   enableval=$enable_spasswd;
3920         ol_arg=invalid
3921         for ol_val in auto yes no ; do
3922                 if test "$enableval" = "$ol_val" ; then
3923                         ol_arg="$ol_val"
3924                 fi
3925         done
3926         if test "$ol_arg" = "invalid" ; then
3927                 as_fn_error "bad value $enableval for --enable-spasswd" "$LINENO" 5
3928         fi
3929         ol_enable_spasswd="$ol_arg"
3930
3931 else
3932         ol_enable_spasswd=no
3933 fi
3934
3935 # end --enable-spasswd
3936 # OpenLDAP --enable-modules
3937
3938         # Check whether --enable-modules was given.
3939 if test "${enable_modules+set}" = set; then :
3940   enableval=$enable_modules;
3941         ol_arg=invalid
3942         for ol_val in auto yes no ; do
3943                 if test "$enableval" = "$ol_val" ; then
3944                         ol_arg="$ol_val"
3945                 fi
3946         done
3947         if test "$ol_arg" = "invalid" ; then
3948                 as_fn_error "bad value $enableval for --enable-modules" "$LINENO" 5
3949         fi
3950         ol_enable_modules="$ol_arg"
3951
3952 else
3953         ol_enable_modules=no
3954 fi
3955
3956 # end --enable-modules
3957 # OpenLDAP --enable-rewrite
3958
3959         # Check whether --enable-rewrite was given.
3960 if test "${enable_rewrite+set}" = set; then :
3961   enableval=$enable_rewrite;
3962         ol_arg=invalid
3963         for ol_val in auto yes no ; do
3964                 if test "$enableval" = "$ol_val" ; then
3965                         ol_arg="$ol_val"
3966                 fi
3967         done
3968         if test "$ol_arg" = "invalid" ; then
3969                 as_fn_error "bad value $enableval for --enable-rewrite" "$LINENO" 5
3970         fi
3971         ol_enable_rewrite="$ol_arg"
3972
3973 else
3974         ol_enable_rewrite=auto
3975 fi
3976
3977 # end --enable-rewrite
3978 # OpenLDAP --enable-rlookups
3979
3980         # Check whether --enable-rlookups was given.
3981 if test "${enable_rlookups+set}" = set; then :
3982   enableval=$enable_rlookups;
3983         ol_arg=invalid
3984         for ol_val in auto yes no ; do
3985                 if test "$enableval" = "$ol_val" ; then
3986                         ol_arg="$ol_val"
3987                 fi
3988         done
3989         if test "$ol_arg" = "invalid" ; then
3990                 as_fn_error "bad value $enableval for --enable-rlookups" "$LINENO" 5
3991         fi
3992         ol_enable_rlookups="$ol_arg"
3993
3994 else
3995         ol_enable_rlookups=no
3996 fi
3997
3998 # end --enable-rlookups
3999 # OpenLDAP --enable-slapi
4000
4001         # Check whether --enable-slapi was given.
4002 if test "${enable_slapi+set}" = set; then :
4003   enableval=$enable_slapi;
4004         ol_arg=invalid
4005         for ol_val in auto yes no ; do
4006                 if test "$enableval" = "$ol_val" ; then
4007                         ol_arg="$ol_val"
4008                 fi
4009         done
4010         if test "$ol_arg" = "invalid" ; then
4011                 as_fn_error "bad value $enableval for --enable-slapi" "$LINENO" 5
4012         fi
4013         ol_enable_slapi="$ol_arg"
4014
4015 else
4016         ol_enable_slapi=no
4017 fi
4018
4019 # end --enable-slapi
4020 # OpenLDAP --enable-slp
4021
4022         # Check whether --enable-slp was given.
4023 if test "${enable_slp+set}" = set; then :
4024   enableval=$enable_slp;
4025         ol_arg=invalid
4026         for ol_val in auto yes no ; do
4027                 if test "$enableval" = "$ol_val" ; then
4028                         ol_arg="$ol_val"
4029                 fi
4030         done
4031         if test "$ol_arg" = "invalid" ; then
4032                 as_fn_error "bad value $enableval for --enable-slp" "$LINENO" 5
4033         fi
4034         ol_enable_slp="$ol_arg"
4035
4036 else
4037         ol_enable_slp=no
4038 fi
4039
4040 # end --enable-slp
4041 # OpenLDAP --enable-wrappers
4042
4043         # Check whether --enable-wrappers was given.
4044 if test "${enable_wrappers+set}" = set; then :
4045   enableval=$enable_wrappers;
4046         ol_arg=invalid
4047         for ol_val in auto yes no ; do
4048                 if test "$enableval" = "$ol_val" ; then
4049                         ol_arg="$ol_val"
4050                 fi
4051         done
4052         if test "$ol_arg" = "invalid" ; then
4053                 as_fn_error "bad value $enableval for --enable-wrappers" "$LINENO" 5
4054         fi
4055         ol_enable_wrappers="$ol_arg"
4056
4057 else
4058         ol_enable_wrappers=no
4059 fi
4060
4061 # end --enable-wrappers
4062
4063 Backends="bdb \
4064         dnssrv \
4065         hdb \
4066         ldap \
4067         mdb \
4068         meta \
4069         asyncmeta \
4070         monitor \
4071         ndb \
4072         null \
4073         passwd \
4074         perl \
4075         relay \
4076         shell \
4077         sock \
4078         sql \
4079         wt"
4080
4081 # Check whether --enable-xxslapbackends was given.
4082 if test "${enable_xxslapbackends+set}" = set; then :
4083   enableval=$enable_xxslapbackends;
4084 fi
4085
4086
4087 # OpenLDAP --enable-backends
4088
4089         # Check whether --enable-backends was given.
4090 if test "${enable_backends+set}" = set; then :
4091   enableval=$enable_backends;
4092         ol_arg=invalid
4093         for ol_val in no yes mod ; do
4094                 if test "$enableval" = "$ol_val" ; then
4095                         ol_arg="$ol_val"
4096                 fi
4097         done
4098         if test "$ol_arg" = "invalid" ; then
4099                 as_fn_error "bad value $enableval for --enable-backends" "$LINENO" 5
4100         fi
4101         ol_enable_backends="$ol_arg"
4102
4103 fi
4104
4105 # end --enable-backends
4106 # OpenLDAP --enable-bdb
4107
4108         # Check whether --enable-bdb was given.
4109 if test "${enable_bdb+set}" = set; then :
4110   enableval=$enable_bdb;
4111         ol_arg=invalid
4112         for ol_val in no yes mod ; do
4113                 if test "$enableval" = "$ol_val" ; then
4114                         ol_arg="$ol_val"
4115                 fi
4116         done
4117         if test "$ol_arg" = "invalid" ; then
4118                 as_fn_error "bad value $enableval for --enable-bdb" "$LINENO" 5
4119         fi
4120         ol_enable_bdb="$ol_arg"
4121
4122 else
4123         ol_enable_bdb=${ol_enable_backends:-no}
4124 fi
4125
4126 # end --enable-bdb
4127 # OpenLDAP --enable-dnssrv
4128
4129         # Check whether --enable-dnssrv was given.
4130 if test "${enable_dnssrv+set}" = set; then :
4131   enableval=$enable_dnssrv;
4132         ol_arg=invalid
4133         for ol_val in no yes mod ; do
4134                 if test "$enableval" = "$ol_val" ; then
4135                         ol_arg="$ol_val"
4136                 fi
4137         done
4138         if test "$ol_arg" = "invalid" ; then
4139                 as_fn_error "bad value $enableval for --enable-dnssrv" "$LINENO" 5
4140         fi
4141         ol_enable_dnssrv="$ol_arg"
4142
4143 else
4144         ol_enable_dnssrv=${ol_enable_backends:-no}
4145 fi
4146
4147 # end --enable-dnssrv
4148 # OpenLDAP --enable-hdb
4149
4150         # Check whether --enable-hdb was given.
4151 if test "${enable_hdb+set}" = set; then :
4152   enableval=$enable_hdb;
4153         ol_arg=invalid
4154         for ol_val in no yes mod ; do
4155                 if test "$enableval" = "$ol_val" ; then
4156                         ol_arg="$ol_val"
4157                 fi
4158         done
4159         if test "$ol_arg" = "invalid" ; then
4160                 as_fn_error "bad value $enableval for --enable-hdb" "$LINENO" 5
4161         fi
4162         ol_enable_hdb="$ol_arg"
4163
4164 else
4165         ol_enable_hdb=${ol_enable_backends:-no}
4166 fi
4167
4168 # end --enable-hdb
4169 # OpenLDAP --enable-ldap
4170
4171         # Check whether --enable-ldap was given.
4172 if test "${enable_ldap+set}" = set; then :
4173   enableval=$enable_ldap;
4174         ol_arg=invalid
4175         for ol_val in no yes mod ; do
4176                 if test "$enableval" = "$ol_val" ; then
4177                         ol_arg="$ol_val"
4178                 fi
4179         done
4180         if test "$ol_arg" = "invalid" ; then
4181                 as_fn_error "bad value $enableval for --enable-ldap" "$LINENO" 5
4182         fi
4183         ol_enable_ldap="$ol_arg"
4184
4185 else
4186         ol_enable_ldap=${ol_enable_backends:-no}
4187 fi
4188
4189 # end --enable-ldap
4190 # OpenLDAP --enable-mdb
4191
4192         # Check whether --enable-mdb was given.
4193 if test "${enable_mdb+set}" = set; then :
4194   enableval=$enable_mdb;
4195         ol_arg=invalid
4196         for ol_val in no yes mod ; do
4197                 if test "$enableval" = "$ol_val" ; then
4198                         ol_arg="$ol_val"
4199                 fi
4200         done
4201         if test "$ol_arg" = "invalid" ; then
4202                 as_fn_error "bad value $enableval for --enable-mdb" "$LINENO" 5
4203         fi
4204         ol_enable_mdb="$ol_arg"
4205
4206 else
4207         ol_enable_mdb=${ol_enable_backends:-yes}
4208 fi
4209
4210 # end --enable-mdb
4211 # OpenLDAP --enable-meta
4212
4213         # Check whether --enable-meta was given.
4214 if test "${enable_meta+set}" = set; then :
4215   enableval=$enable_meta;
4216         ol_arg=invalid
4217         for ol_val in no yes mod ; do
4218                 if test "$enableval" = "$ol_val" ; then
4219                         ol_arg="$ol_val"
4220                 fi
4221         done
4222         if test "$ol_arg" = "invalid" ; then
4223                 as_fn_error "bad value $enableval for --enable-meta" "$LINENO" 5
4224         fi
4225         ol_enable_meta="$ol_arg"
4226
4227 else
4228         ol_enable_meta=${ol_enable_backends:-no}
4229 fi
4230
4231 # end --enable-meta
4232 # OpenLDAP --enable-asyncmeta
4233
4234         # Check whether --enable-asyncmeta was given.
4235 if test "${enable_asyncmeta+set}" = set; then :
4236   enableval=$enable_asyncmeta;
4237         ol_arg=invalid
4238         for ol_val in no yes mod ; do
4239                 if test "$enableval" = "$ol_val" ; then
4240                         ol_arg="$ol_val"
4241                 fi
4242         done
4243         if test "$ol_arg" = "invalid" ; then
4244                 as_fn_error "bad value $enableval for --enable-asyncmeta" "$LINENO" 5
4245         fi
4246         ol_enable_asyncmeta="$ol_arg"
4247
4248 else
4249         ol_enable_asyncmeta=${ol_enable_backends:-no}
4250 fi
4251
4252 # end --enable-asyncmeta
4253 # OpenLDAP --enable-monitor
4254
4255         # Check whether --enable-monitor was given.
4256 if test "${enable_monitor+set}" = set; then :
4257   enableval=$enable_monitor;
4258         ol_arg=invalid
4259         for ol_val in no yes mod ; do
4260                 if test "$enableval" = "$ol_val" ; then
4261                         ol_arg="$ol_val"
4262                 fi
4263         done
4264         if test "$ol_arg" = "invalid" ; then
4265                 as_fn_error "bad value $enableval for --enable-monitor" "$LINENO" 5
4266         fi
4267         ol_enable_monitor="$ol_arg"
4268
4269 else
4270         ol_enable_monitor=${ol_enable_backends:-yes}
4271 fi
4272
4273 # end --enable-monitor
4274 # OpenLDAP --enable-ndb
4275
4276         # Check whether --enable-ndb was given.
4277 if test "${enable_ndb+set}" = set; then :
4278   enableval=$enable_ndb;
4279         ol_arg=invalid
4280         for ol_val in no yes mod ; do
4281                 if test "$enableval" = "$ol_val" ; then
4282                         ol_arg="$ol_val"
4283                 fi
4284         done
4285         if test "$ol_arg" = "invalid" ; then
4286                 as_fn_error "bad value $enableval for --enable-ndb" "$LINENO" 5
4287         fi
4288         ol_enable_ndb="$ol_arg"
4289
4290 else
4291         ol_enable_ndb=${ol_enable_backends:-no}
4292 fi
4293
4294 # end --enable-ndb
4295 # OpenLDAP --enable-null
4296
4297         # Check whether --enable-null was given.
4298 if test "${enable_null+set}" = set; then :
4299   enableval=$enable_null;
4300         ol_arg=invalid
4301         for ol_val in no yes mod ; do
4302                 if test "$enableval" = "$ol_val" ; then
4303                         ol_arg="$ol_val"
4304                 fi
4305         done
4306         if test "$ol_arg" = "invalid" ; then
4307                 as_fn_error "bad value $enableval for --enable-null" "$LINENO" 5
4308         fi
4309         ol_enable_null="$ol_arg"
4310
4311 else
4312         ol_enable_null=${ol_enable_backends:-no}
4313 fi
4314
4315 # end --enable-null
4316 # OpenLDAP --enable-passwd
4317
4318         # Check whether --enable-passwd was given.
4319 if test "${enable_passwd+set}" = set; then :
4320   enableval=$enable_passwd;
4321         ol_arg=invalid
4322         for ol_val in no yes mod ; do
4323                 if test "$enableval" = "$ol_val" ; then
4324                         ol_arg="$ol_val"
4325                 fi
4326         done
4327         if test "$ol_arg" = "invalid" ; then
4328                 as_fn_error "bad value $enableval for --enable-passwd" "$LINENO" 5
4329         fi
4330         ol_enable_passwd="$ol_arg"
4331
4332 else
4333         ol_enable_passwd=${ol_enable_backends:-no}
4334 fi
4335
4336 # end --enable-passwd
4337 # OpenLDAP --enable-perl
4338
4339         # Check whether --enable-perl was given.
4340 if test "${enable_perl+set}" = set; then :
4341   enableval=$enable_perl;
4342         ol_arg=invalid
4343         for ol_val in no yes mod ; do
4344                 if test "$enableval" = "$ol_val" ; then
4345                         ol_arg="$ol_val"
4346                 fi
4347         done
4348         if test "$ol_arg" = "invalid" ; then
4349                 as_fn_error "bad value $enableval for --enable-perl" "$LINENO" 5
4350         fi
4351         ol_enable_perl="$ol_arg"
4352
4353 else
4354         ol_enable_perl=${ol_enable_backends:-no}
4355 fi
4356
4357 # end --enable-perl
4358 # OpenLDAP --enable-relay
4359
4360         # Check whether --enable-relay was given.
4361 if test "${enable_relay+set}" = set; then :
4362   enableval=$enable_relay;
4363         ol_arg=invalid
4364         for ol_val in no yes mod ; do
4365                 if test "$enableval" = "$ol_val" ; then
4366                         ol_arg="$ol_val"
4367                 fi
4368         done
4369         if test "$ol_arg" = "invalid" ; then
4370                 as_fn_error "bad value $enableval for --enable-relay" "$LINENO" 5
4371         fi
4372         ol_enable_relay="$ol_arg"
4373
4374 else
4375         ol_enable_relay=${ol_enable_backends:-yes}
4376 fi
4377
4378 # end --enable-relay
4379 # OpenLDAP --enable-shell
4380
4381         # Check whether --enable-shell was given.
4382 if test "${enable_shell+set}" = set; then :
4383   enableval=$enable_shell;
4384         ol_arg=invalid
4385         for ol_val in no yes mod ; do
4386                 if test "$enableval" = "$ol_val" ; then
4387                         ol_arg="$ol_val"
4388                 fi
4389         done
4390         if test "$ol_arg" = "invalid" ; then
4391                 as_fn_error "bad value $enableval for --enable-shell" "$LINENO" 5
4392         fi
4393         ol_enable_shell="$ol_arg"
4394
4395 else
4396         ol_enable_shell=${ol_enable_backends:-no}
4397 fi
4398
4399 # end --enable-shell
4400 # OpenLDAP --enable-sock
4401
4402         # Check whether --enable-sock was given.
4403 if test "${enable_sock+set}" = set; then :
4404   enableval=$enable_sock;
4405         ol_arg=invalid
4406         for ol_val in no yes mod ; do
4407                 if test "$enableval" = "$ol_val" ; then
4408                         ol_arg="$ol_val"
4409                 fi
4410         done
4411         if test "$ol_arg" = "invalid" ; then
4412                 as_fn_error "bad value $enableval for --enable-sock" "$LINENO" 5
4413         fi
4414         ol_enable_sock="$ol_arg"
4415
4416 else
4417         ol_enable_sock=${ol_enable_backends:-no}
4418 fi
4419
4420 # end --enable-sock
4421 # OpenLDAP --enable-sql
4422
4423         # Check whether --enable-sql was given.
4424 if test "${enable_sql+set}" = set; then :
4425   enableval=$enable_sql;
4426         ol_arg=invalid
4427         for ol_val in no yes mod ; do
4428                 if test "$enableval" = "$ol_val" ; then
4429                         ol_arg="$ol_val"
4430                 fi
4431         done
4432         if test "$ol_arg" = "invalid" ; then
4433                 as_fn_error "bad value $enableval for --enable-sql" "$LINENO" 5
4434         fi
4435         ol_enable_sql="$ol_arg"
4436
4437 else
4438         ol_enable_sql=${ol_enable_backends:-no}
4439 fi
4440
4441 # end --enable-sql
4442 # OpenLDAP --enable-wt
4443
4444         # Check whether --enable-wt was given.
4445 if test "${enable_wt+set}" = set; then :
4446   enableval=$enable_wt;
4447         ol_arg=invalid
4448         for ol_val in no yes mod ; do
4449                 if test "$enableval" = "$ol_val" ; then
4450                         ol_arg="$ol_val"
4451                 fi
4452         done
4453         if test "$ol_arg" = "invalid" ; then
4454                 as_fn_error "bad value $enableval for --enable-wt" "$LINENO" 5
4455         fi
4456         ol_enable_wt="$ol_arg"
4457
4458 else
4459         ol_enable_wt=${ol_enable_backends:-no}
4460 fi
4461
4462 # end --enable-wt
4463
4464 Overlays="accesslog \
4465         auditlog \
4466         autoca \
4467         collect \
4468         constraint \
4469         dds \
4470         deref \
4471         dyngroup \
4472         dynlist \
4473         memberof \
4474         ppolicy \
4475         proxycache \
4476         refint \
4477         retcode \
4478         rwm \
4479         seqmod \
4480         sssvlv \
4481         syncprov \
4482         translucent \
4483         unique \
4484         valsort"
4485
4486 # Check whether --enable-xxslapoverlays was given.
4487 if test "${enable_xxslapoverlays+set}" = set; then :
4488   enableval=$enable_xxslapoverlays;
4489 fi
4490
4491
4492 # OpenLDAP --enable-overlays
4493
4494         # Check whether --enable-overlays was given.
4495 if test "${enable_overlays+set}" = set; then :
4496   enableval=$enable_overlays;
4497         ol_arg=invalid
4498         for ol_val in no yes mod ; do
4499                 if test "$enableval" = "$ol_val" ; then
4500                         ol_arg="$ol_val"
4501                 fi
4502         done
4503         if test "$ol_arg" = "invalid" ; then
4504                 as_fn_error "bad value $enableval for --enable-overlays" "$LINENO" 5
4505         fi
4506         ol_enable_overlays="$ol_arg"
4507
4508 fi
4509
4510 # end --enable-overlays
4511 # OpenLDAP --enable-accesslog
4512
4513         # Check whether --enable-accesslog was given.
4514 if test "${enable_accesslog+set}" = set; then :
4515   enableval=$enable_accesslog;
4516         ol_arg=invalid
4517         for ol_val in no yes mod ; do
4518                 if test "$enableval" = "$ol_val" ; then
4519                         ol_arg="$ol_val"
4520                 fi
4521         done
4522         if test "$ol_arg" = "invalid" ; then
4523                 as_fn_error "bad value $enableval for --enable-accesslog" "$LINENO" 5
4524         fi
4525         ol_enable_accesslog="$ol_arg"
4526
4527 else
4528         ol_enable_accesslog=${ol_enable_overlays:-no}
4529 fi
4530
4531 # end --enable-accesslog
4532
4533 # OpenLDAP --enable-auditlog
4534
4535         # Check whether --enable-auditlog was given.
4536 if test "${enable_auditlog+set}" = set; then :
4537   enableval=$enable_auditlog;
4538         ol_arg=invalid
4539         for ol_val in no yes mod ; do
4540                 if test "$enableval" = "$ol_val" ; then
4541                         ol_arg="$ol_val"
4542                 fi
4543         done
4544         if test "$ol_arg" = "invalid" ; then
4545                 as_fn_error "bad value $enableval for --enable-auditlog" "$LINENO" 5
4546         fi
4547         ol_enable_auditlog="$ol_arg"
4548
4549 else
4550         ol_enable_auditlog=${ol_enable_overlays:-no}
4551 fi
4552
4553 # end --enable-auditlog
4554
4555 # OpenLDAP --enable-autoca
4556
4557         # Check whether --enable-autoca was given.
4558 if test "${enable_autoca+set}" = set; then :
4559   enableval=$enable_autoca;
4560         ol_arg=invalid
4561         for ol_val in no yes mod ; do
4562                 if test "$enableval" = "$ol_val" ; then
4563                         ol_arg="$ol_val"
4564                 fi
4565         done
4566         if test "$ol_arg" = "invalid" ; then
4567                 as_fn_error "bad value $enableval for --enable-autoca" "$LINENO" 5
4568         fi
4569         ol_enable_autoca="$ol_arg"
4570
4571 else
4572         ol_enable_autoca=${ol_enable_overlays:-no}
4573 fi
4574
4575 # end --enable-autoca
4576
4577 # OpenLDAP --enable-collect
4578
4579         # Check whether --enable-collect was given.
4580 if test "${enable_collect+set}" = set; then :
4581   enableval=$enable_collect;
4582         ol_arg=invalid
4583         for ol_val in no yes mod ; do
4584                 if test "$enableval" = "$ol_val" ; then
4585                         ol_arg="$ol_val"
4586                 fi
4587         done
4588         if test "$ol_arg" = "invalid" ; then
4589                 as_fn_error "bad value $enableval for --enable-collect" "$LINENO" 5
4590         fi
4591         ol_enable_collect="$ol_arg"
4592
4593 else
4594         ol_enable_collect=${ol_enable_overlays:-no}
4595 fi
4596
4597 # end --enable-collect
4598
4599 # OpenLDAP --enable-constraint
4600
4601         # Check whether --enable-constraint was given.
4602 if test "${enable_constraint+set}" = set; then :
4603   enableval=$enable_constraint;
4604         ol_arg=invalid
4605         for ol_val in no yes mod ; do
4606                 if test "$enableval" = "$ol_val" ; then
4607                         ol_arg="$ol_val"
4608                 fi
4609         done
4610         if test "$ol_arg" = "invalid" ; then
4611                 as_fn_error "bad value $enableval for --enable-constraint" "$LINENO" 5
4612         fi
4613         ol_enable_constraint="$ol_arg"
4614
4615 else
4616         ol_enable_constraint=${ol_enable_overlays:-no}
4617 fi
4618
4619 # end --enable-constraint
4620
4621 # OpenLDAP --enable-dds
4622
4623         # Check whether --enable-dds was given.
4624 if test "${enable_dds+set}" = set; then :
4625   enableval=$enable_dds;
4626         ol_arg=invalid
4627         for ol_val in no yes mod ; do
4628                 if test "$enableval" = "$ol_val" ; then
4629                         ol_arg="$ol_val"
4630                 fi
4631         done
4632         if test "$ol_arg" = "invalid" ; then
4633                 as_fn_error "bad value $enableval for --enable-dds" "$LINENO" 5
4634         fi
4635         ol_enable_dds="$ol_arg"
4636
4637 else
4638         ol_enable_dds=${ol_enable_overlays:-no}
4639 fi
4640
4641 # end --enable-dds
4642
4643 # OpenLDAP --enable-deref
4644
4645         # Check whether --enable-deref was given.
4646 if test "${enable_deref+set}" = set; then :
4647   enableval=$enable_deref;
4648         ol_arg=invalid
4649         for ol_val in no yes mod ; do
4650                 if test "$enableval" = "$ol_val" ; then
4651                         ol_arg="$ol_val"
4652                 fi
4653         done
4654         if test "$ol_arg" = "invalid" ; then
4655                 as_fn_error "bad value $enableval for --enable-deref" "$LINENO" 5
4656         fi
4657         ol_enable_deref="$ol_arg"
4658
4659 else
4660         ol_enable_deref=${ol_enable_overlays:-no}
4661 fi
4662
4663 # end --enable-deref
4664
4665 # OpenLDAP --enable-dyngroup
4666
4667         # Check whether --enable-dyngroup was given.
4668 if test "${enable_dyngroup+set}" = set; then :
4669   enableval=$enable_dyngroup;
4670         ol_arg=invalid
4671         for ol_val in no yes mod ; do
4672                 if test "$enableval" = "$ol_val" ; then
4673                         ol_arg="$ol_val"
4674                 fi
4675         done
4676         if test "$ol_arg" = "invalid" ; then
4677                 as_fn_error "bad value $enableval for --enable-dyngroup" "$LINENO" 5
4678         fi
4679         ol_enable_dyngroup="$ol_arg"
4680
4681 else
4682         ol_enable_dyngroup=${ol_enable_overlays:-no}
4683 fi
4684
4685 # end --enable-dyngroup
4686
4687 # OpenLDAP --enable-dynlist
4688
4689         # Check whether --enable-dynlist was given.
4690 if test "${enable_dynlist+set}" = set; then :
4691   enableval=$enable_dynlist;
4692         ol_arg=invalid
4693         for ol_val in no yes mod ; do
4694                 if test "$enableval" = "$ol_val" ; then
4695                         ol_arg="$ol_val"
4696                 fi
4697         done
4698         if test "$ol_arg" = "invalid" ; then
4699                 as_fn_error "bad value $enableval for --enable-dynlist" "$LINENO" 5
4700         fi
4701         ol_enable_dynlist="$ol_arg"
4702
4703 else
4704         ol_enable_dynlist=${ol_enable_overlays:-no}
4705 fi
4706
4707 # end --enable-dynlist
4708
4709 # OpenLDAP --enable-memberof
4710
4711         # Check whether --enable-memberof was given.
4712 if test "${enable_memberof+set}" = set; then :
4713   enableval=$enable_memberof;
4714         ol_arg=invalid
4715         for ol_val in no yes mod ; do
4716                 if test "$enableval" = "$ol_val" ; then
4717                         ol_arg="$ol_val"
4718                 fi
4719         done
4720         if test "$ol_arg" = "invalid" ; then
4721                 as_fn_error "bad value $enableval for --enable-memberof" "$LINENO" 5
4722         fi
4723         ol_enable_memberof="$ol_arg"
4724
4725 else
4726         ol_enable_memberof=${ol_enable_overlays:-no}
4727 fi
4728
4729 # end --enable-memberof
4730
4731 # OpenLDAP --enable-ppolicy
4732
4733         # Check whether --enable-ppolicy was given.
4734 if test "${enable_ppolicy+set}" = set; then :
4735   enableval=$enable_ppolicy;
4736         ol_arg=invalid
4737         for ol_val in no yes mod ; do
4738                 if test "$enableval" = "$ol_val" ; then
4739                         ol_arg="$ol_val"
4740                 fi
4741         done
4742         if test "$ol_arg" = "invalid" ; then
4743                 as_fn_error "bad value $enableval for --enable-ppolicy" "$LINENO" 5
4744         fi
4745         ol_enable_ppolicy="$ol_arg"
4746
4747 else
4748         ol_enable_ppolicy=${ol_enable_overlays:-no}
4749 fi
4750
4751 # end --enable-ppolicy
4752
4753 # OpenLDAP --enable-proxycache
4754
4755         # Check whether --enable-proxycache was given.
4756 if test "${enable_proxycache+set}" = set; then :
4757   enableval=$enable_proxycache;
4758         ol_arg=invalid
4759         for ol_val in no yes mod ; do
4760                 if test "$enableval" = "$ol_val" ; then
4761                         ol_arg="$ol_val"
4762                 fi
4763         done
4764         if test "$ol_arg" = "invalid" ; then
4765                 as_fn_error "bad value $enableval for --enable-proxycache" "$LINENO" 5
4766         fi
4767         ol_enable_proxycache="$ol_arg"
4768
4769 else
4770         ol_enable_proxycache=${ol_enable_overlays:-no}
4771 fi
4772
4773 # end --enable-proxycache
4774
4775 # OpenLDAP --enable-refint
4776
4777         # Check whether --enable-refint was given.
4778 if test "${enable_refint+set}" = set; then :
4779   enableval=$enable_refint;
4780         ol_arg=invalid
4781         for ol_val in no yes mod ; do
4782                 if test "$enableval" = "$ol_val" ; then
4783                         ol_arg="$ol_val"
4784                 fi
4785         done
4786         if test "$ol_arg" = "invalid" ; then
4787                 as_fn_error "bad value $enableval for --enable-refint" "$LINENO" 5
4788         fi
4789         ol_enable_refint="$ol_arg"
4790
4791 else
4792         ol_enable_refint=${ol_enable_overlays:-no}
4793 fi
4794
4795 # end --enable-refint
4796
4797 # OpenLDAP --enable-retcode
4798
4799         # Check whether --enable-retcode was given.
4800 if test "${enable_retcode+set}" = set; then :
4801   enableval=$enable_retcode;
4802         ol_arg=invalid
4803         for ol_val in no yes mod ; do
4804                 if test "$enableval" = "$ol_val" ; then
4805                         ol_arg="$ol_val"
4806                 fi
4807         done
4808         if test "$ol_arg" = "invalid" ; then
4809                 as_fn_error "bad value $enableval for --enable-retcode" "$LINENO" 5
4810         fi
4811         ol_enable_retcode="$ol_arg"
4812
4813 else
4814         ol_enable_retcode=${ol_enable_overlays:-no}
4815 fi
4816
4817 # end --enable-retcode
4818
4819 # OpenLDAP --enable-rwm
4820
4821         # Check whether --enable-rwm was given.
4822 if test "${enable_rwm+set}" = set; then :
4823   enableval=$enable_rwm;
4824         ol_arg=invalid
4825         for ol_val in no yes mod ; do
4826                 if test "$enableval" = "$ol_val" ; then
4827                         ol_arg="$ol_val"
4828                 fi
4829         done
4830         if test "$ol_arg" = "invalid" ; then
4831                 as_fn_error "bad value $enableval for --enable-rwm" "$LINENO" 5
4832         fi
4833         ol_enable_rwm="$ol_arg"
4834
4835 else
4836         ol_enable_rwm=${ol_enable_overlays:-no}
4837 fi
4838
4839 # end --enable-rwm
4840
4841 # OpenLDAP --enable-seqmod
4842
4843         # Check whether --enable-seqmod was given.
4844 if test "${enable_seqmod+set}" = set; then :
4845   enableval=$enable_seqmod;
4846         ol_arg=invalid
4847         for ol_val in no yes mod ; do
4848                 if test "$enableval" = "$ol_val" ; then
4849                         ol_arg="$ol_val"
4850                 fi
4851         done
4852         if test "$ol_arg" = "invalid" ; then
4853                 as_fn_error "bad value $enableval for --enable-seqmod" "$LINENO" 5
4854         fi
4855         ol_enable_seqmod="$ol_arg"
4856
4857 else
4858         ol_enable_seqmod=${ol_enable_overlays:-no}
4859 fi
4860
4861 # end --enable-seqmod
4862
4863 # OpenLDAP --enable-sssvlv
4864
4865         # Check whether --enable-sssvlv was given.
4866 if test "${enable_sssvlv+set}" = set; then :
4867   enableval=$enable_sssvlv;
4868         ol_arg=invalid
4869         for ol_val in no yes mod ; do
4870                 if test "$enableval" = "$ol_val" ; then
4871                         ol_arg="$ol_val"
4872                 fi
4873         done
4874         if test "$ol_arg" = "invalid" ; then
4875                 as_fn_error "bad value $enableval for --enable-sssvlv" "$LINENO" 5
4876         fi
4877         ol_enable_sssvlv="$ol_arg"
4878
4879 else
4880         ol_enable_sssvlv=${ol_enable_overlays:-no}
4881 fi
4882
4883 # end --enable-sssvlv
4884
4885 # OpenLDAP --enable-syncprov
4886
4887         # Check whether --enable-syncprov was given.
4888 if test "${enable_syncprov+set}" = set; then :
4889   enableval=$enable_syncprov;
4890         ol_arg=invalid
4891         for ol_val in no yes mod ; do
4892                 if test "$enableval" = "$ol_val" ; then
4893                         ol_arg="$ol_val"
4894                 fi
4895         done
4896         if test "$ol_arg" = "invalid" ; then
4897                 as_fn_error "bad value $enableval for --enable-syncprov" "$LINENO" 5
4898         fi
4899         ol_enable_syncprov="$ol_arg"
4900
4901 else
4902         ol_enable_syncprov=${ol_enable_overlays:-yes}
4903 fi
4904
4905 # end --enable-syncprov
4906
4907 # OpenLDAP --enable-translucent
4908
4909         # Check whether --enable-translucent was given.
4910 if test "${enable_translucent+set}" = set; then :
4911   enableval=$enable_translucent;
4912         ol_arg=invalid
4913         for ol_val in no yes mod ; do
4914                 if test "$enableval" = "$ol_val" ; then
4915                         ol_arg="$ol_val"
4916                 fi
4917         done
4918         if test "$ol_arg" = "invalid" ; then
4919                 as_fn_error "bad value $enableval for --enable-translucent" "$LINENO" 5
4920         fi
4921         ol_enable_translucent="$ol_arg"
4922
4923 else
4924         ol_enable_translucent=${ol_enable_overlays:-no}
4925 fi
4926
4927 # end --enable-translucent
4928
4929 # OpenLDAP --enable-unique
4930
4931         # Check whether --enable-unique was given.
4932 if test "${enable_unique+set}" = set; then :
4933   enableval=$enable_unique;
4934         ol_arg=invalid
4935         for ol_val in no yes mod ; do
4936                 if test "$enableval" = "$ol_val" ; then
4937                         ol_arg="$ol_val"
4938                 fi
4939         done
4940         if test "$ol_arg" = "invalid" ; then
4941                 as_fn_error "bad value $enableval for --enable-unique" "$LINENO" 5
4942         fi
4943         ol_enable_unique="$ol_arg"
4944
4945 else
4946         ol_enable_unique=${ol_enable_overlays:-no}
4947 fi
4948
4949 # end --enable-unique
4950
4951 # OpenLDAP --enable-valsort
4952
4953         # Check whether --enable-valsort was given.
4954 if test "${enable_valsort+set}" = set; then :
4955   enableval=$enable_valsort;
4956         ol_arg=invalid
4957         for ol_val in no yes mod ; do
4958                 if test "$enableval" = "$ol_val" ; then
4959                         ol_arg="$ol_val"
4960                 fi
4961         done
4962         if test "$ol_arg" = "invalid" ; then
4963                 as_fn_error "bad value $enableval for --enable-valsort" "$LINENO" 5
4964         fi
4965         ol_enable_valsort="$ol_arg"
4966
4967 else
4968         ol_enable_valsort=${ol_enable_overlays:-no}
4969 fi
4970
4971 # end --enable-valsort
4972
4973
4974 # Check whether --enable-xxliboptions was given.
4975 if test "${enable_xxliboptions+set}" = set; then :
4976   enableval=$enable_xxliboptions;
4977 fi
4978
4979 # Check whether --enable-static was given.
4980 if test "${enable_static+set}" = set; then :
4981   enableval=$enable_static; p=${PACKAGE-default}
4982     case $enableval in
4983     yes) enable_static=yes ;;
4984     no) enable_static=no ;;
4985     *)
4986      enable_static=no
4987       # Look at the argument we got.  We use all the common list separators.
4988       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4989       for pkg in $enableval; do
4990         IFS="$lt_save_ifs"
4991         if test "X$pkg" = "X$p"; then
4992           enable_static=yes
4993         fi
4994       done
4995       IFS="$lt_save_ifs"
4996       ;;
4997     esac
4998 else
4999   enable_static=yes
5000 fi
5001
5002
5003 # Check whether --enable-shared was given.
5004 if test "${enable_shared+set}" = set; then :
5005   enableval=$enable_shared; p=${PACKAGE-default}
5006     case $enableval in
5007     yes) enable_shared=yes ;;
5008     no) enable_shared=no ;;
5009     *)
5010       enable_shared=no
5011       # Look at the argument we got.  We use all the common list separators.
5012       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5013       for pkg in $enableval; do
5014         IFS="$lt_save_ifs"
5015         if test "X$pkg" = "X$p"; then
5016           enable_shared=yes
5017         fi
5018       done
5019       IFS="$lt_save_ifs"
5020       ;;
5021     esac
5022 else
5023   enable_shared=yes
5024 fi
5025
5026
5027
5028
5029 # validate options
5030 if test $ol_enable_slapd = no ; then
5031                 if test $ol_enable_slapi = yes ; then
5032                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
5033 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
5034         fi
5035         case "$ol_enable_backends" in yes | mod)
5036                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
5037 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
5038         esac
5039         for i in $Backends; do
5040                 eval "ol_tmp=\$ol_enable_$i"
5041                 if test $ol_tmp != no ; then
5042                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
5043 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
5044                         eval "ol_enable_$i=no"
5045                 fi
5046         done
5047         if test $ol_enable_modules = yes ; then
5048                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
5049 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
5050         fi
5051         if test $ol_enable_wrappers = yes ; then
5052                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
5053 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
5054         fi
5055         if test $ol_enable_rlookups = yes ; then
5056                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
5057 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
5058         fi
5059         if test $ol_enable_dynacl = yes ; then
5060                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
5061 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
5062         fi
5063         if test $ol_enable_aci != no ; then
5064                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
5065 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
5066         fi
5067         if test $ol_enable_rewrite = yes ; then
5068                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
5069 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
5070         fi
5071                 case "$ol_enable_overlays" in yes | mod)
5072                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
5073 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
5074         esac
5075         for i in $Overlays; do
5076                 eval "ol_tmp=\$ol_enable_$i"
5077                 if test $ol_tmp != no ; then
5078                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
5079 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
5080                         eval "ol_enable_$i=no"
5081                 fi
5082         done
5083
5084         # force settings to no
5085         ol_enable_slapi=no
5086
5087         ol_enable_backends=
5088         ol_enable_overlays=
5089         ol_enable_modules=no
5090         ol_enable_rlookups=no
5091         ol_enable_dynacl=no
5092         ol_enable_aci=no
5093         ol_enable_wrappers=no
5094
5095         ol_enable_rewrite=no
5096
5097 elif test $ol_enable_modules != yes &&
5098         test $ol_enable_bdb = no &&
5099         test $ol_enable_dnssrv = no &&
5100         test $ol_enable_hdb = no &&
5101         test $ol_enable_ldap = no &&
5102         test $ol_enable_mdb = no &&
5103         test $ol_enable_meta = no &&
5104         test $ol_enable_asyncmeta = no &&
5105         test $ol_enable_monitor = no &&
5106         test $ol_enable_ndb = no &&
5107         test $ol_enable_null = no &&
5108         test $ol_enable_passwd = no &&
5109         test $ol_enable_perl = no &&
5110         test $ol_enable_relay = no &&
5111         test $ol_enable_shell = no &&
5112         test $ol_enable_sock = no &&
5113         test $ol_enable_sql = no &&
5114         test $ol_enable_wt = no ; then
5115
5116         if test $ol_enable_slapd = yes ; then
5117                 as_fn_error "slapd requires a backend" "$LINENO" 5
5118         else
5119                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipping slapd, no backend specified" >&5
5120 $as_echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
5121                 ol_enable_slapd=no
5122         fi
5123 fi
5124
5125 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
5126         as_fn_error "--enable-meta requires --enable-ldap" "$LINENO" 5
5127 fi
5128
5129 if test $ol_enable_asyncmeta/$ol_enable_ldap = yes/no ; then
5130         as_fn_error "--enable-asyncmeta requires --enable-ldap" "$LINENO" 5
5131 fi
5132
5133 if test $ol_enable_lmpasswd = yes ; then
5134         if test $ol_with_tls = no ; then
5135                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
5136         fi
5137 fi
5138
5139 if test $ol_enable_spasswd = yes ; then
5140         if test $ol_with_cyrus_sasl = no ; then
5141                 as_fn_error "options require --with-cyrus-sasl" "$LINENO" 5
5142         fi
5143         ol_with_cyrus_sasl=yes
5144 fi
5145
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
5147 $as_echo "done" >&6; }
5148
5149 LDAP_LIBS=
5150 BDB_LIBS=
5151 SLAPD_NDB_LIBS=
5152 SLAPD_NDB_INCS=
5153 LTHREAD_LIBS=
5154 LUTIL_LIBS=
5155
5156 SLAPD_LIBS=
5157
5158 BUILD_SLAPD=no
5159
5160 BUILD_THREAD=no
5161
5162 BUILD_SLAPI=no
5163 SLAPD_SLAPI_DEPEND=
5164
5165 BUILD_BDB=no
5166 BUILD_DNSSRV=no
5167 BUILD_HDB=no
5168 BUILD_LDAP=no
5169 BUILD_MDB=no
5170 BUILD_META=no
5171 BUILD_ASYNCMETA=no
5172 BUILD_MONITOR=no
5173 BUILD_NDB=no
5174 BUILD_NULL=no
5175 BUILD_PASSWD=no
5176 BUILD_PERL=no
5177 BUILD_RELAY=no
5178 BUILD_SHELL=no
5179 BUILD_SOCK=no
5180 BUILD_SQL=no
5181 BUILD_WT=no
5182
5183 BUILD_ACCESSLOG=no
5184 BUILD_AUDITLOG=no
5185 BUILD_AUTOCA=no
5186 BUILD_CONSTRAINT=no
5187 BUILD_DDS=no
5188 BUILD_DENYOP=no
5189 BUILD_DEREF=no
5190 BUILD_DYNGROUP=no
5191 BUILD_DYNLIST=no
5192 BUILD_LASTMOD=no
5193 BUILD_MEMBEROF=no
5194 BUILD_PPOLICY=no
5195 BUILD_PROXYCACHE=no
5196 BUILD_REFINT=no
5197 BUILD_RETCODE=no
5198 BUILD_RWM=no
5199 BUILD_SEQMOD=no
5200 BUILD_SSSVLV=no
5201 BUILD_SYNCPROV=no
5202 BUILD_TRANSLUCENT=no
5203 BUILD_UNIQUE=no
5204 BUILD_VALSORT=no
5205
5206 SLAPD_STATIC_OVERLAYS=
5207 SLAPD_DYNAMIC_OVERLAYS=
5208
5209 SLAPD_MODULES_LDFLAGS=
5210 SLAPD_MODULES_CPPFLAGS=
5211
5212 SLAPD_STATIC_BACKENDS=back-ldif
5213 SLAPD_DYNAMIC_BACKENDS=
5214
5215 SLAPD_PERL_LDFLAGS=
5216 MOD_PERL_LDFLAGS=
5217 PERL_CPPFLAGS=
5218
5219 SLAPD_SQL_LDFLAGS=
5220 SLAPD_SQL_LIBS=
5221 SLAPD_SQL_INCLUDES=
5222
5223 KRB4_LIBS=
5224 KRB5_LIBS=
5225 SASL_LIBS=
5226 TLS_LIBS=
5227 WITH_TLS_TYPE=
5228 MODULES_LIBS=
5229 SLAPI_LIBS=
5230 LIBSLAPI=
5231 AUTH_LIBS=
5232 ICU_LIBS=
5233
5234 SLAPD_SLP_LIBS=
5235 SLAPD_GMP_LIBS=
5236
5237
5238
5239 $as_echo "#define HAVE_MKVERSION 1" >>confdefs.h
5240
5241
5242
5243
5244 ol_aix_threads=no
5245 case "$target" in
5246 *-*-aix*)       if test -z "$CC" ; then
5247                 case "$ol_with_threads" in
5248                 auto | yes |  posix) ol_aix_threads=yes ;;
5249                 esac
5250         fi
5251 ;;
5252 esac
5253
5254 if test $ol_aix_threads = yes ; then
5255         if test -z "${CC}" ; then
5256                 for ac_prog in cc_r xlc_r cc
5257 do
5258   # Extract the first word of "$ac_prog", so it can be a program name with args.
5259 set dummy $ac_prog; ac_word=$2
5260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5261 $as_echo_n "checking for $ac_word... " >&6; }
5262 if test "${ac_cv_prog_CC+set}" = set; then :
5263   $as_echo_n "(cached) " >&6
5264 else
5265   if test -n "$CC"; then
5266   ac_cv_prog_CC="$CC" # Let the user override the test.
5267 else
5268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5269 for as_dir in $PATH
5270 do
5271   IFS=$as_save_IFS
5272   test -z "$as_dir" && as_dir=.
5273     for ac_exec_ext in '' $ac_executable_extensions; do
5274   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5275     ac_cv_prog_CC="$ac_prog"
5276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5277     break 2
5278   fi
5279 done
5280   done
5281 IFS=$as_save_IFS
5282
5283 fi
5284 fi
5285 CC=$ac_cv_prog_CC
5286 if test -n "$CC"; then
5287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5288 $as_echo "$CC" >&6; }
5289 else
5290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5291 $as_echo "no" >&6; }
5292 fi
5293
5294
5295   test -n "$CC" && break
5296 done
5297
5298
5299                 if test "$CC" = cc ; then
5300                                                 if test $ol_with_threads != auto ; then
5301                                 as_fn_error "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
5302                         else
5303                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
5304 $as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
5305                         fi
5306                         ol_with_threads=no
5307                 fi
5308         fi
5309
5310         case ${CC} in cc_r | xlc_r)
5311                 ol_with_threads=posix
5312                 ol_cv_pthread_create=yes
5313                 ;;
5314         esac
5315 fi
5316
5317 if test -z "${CC}"; then
5318         for ac_prog in cc gcc
5319 do
5320   # Extract the first word of "$ac_prog", so it can be a program name with args.
5321 set dummy $ac_prog; ac_word=$2
5322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5323 $as_echo_n "checking for $ac_word... " >&6; }
5324 if test "${ac_cv_prog_CC+set}" = set; then :
5325   $as_echo_n "(cached) " >&6
5326 else
5327   if test -n "$CC"; then
5328   ac_cv_prog_CC="$CC" # Let the user override the test.
5329 else
5330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5331 for as_dir in $PATH
5332 do
5333   IFS=$as_save_IFS
5334   test -z "$as_dir" && as_dir=.
5335     for ac_exec_ext in '' $ac_executable_extensions; do
5336   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5337     ac_cv_prog_CC="$ac_prog"
5338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5339     break 2
5340   fi
5341 done
5342   done
5343 IFS=$as_save_IFS
5344
5345 fi
5346 fi
5347 CC=$ac_cv_prog_CC
5348 if test -n "$CC"; then
5349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5350 $as_echo "$CC" >&6; }
5351 else
5352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5353 $as_echo "no" >&6; }
5354 fi
5355
5356
5357   test -n "$CC" && break
5358 done
5359 test -n "$CC" || CC="missing"
5360
5361
5362         if test "${CC}" = "missing" ; then
5363                 as_fn_error "Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." "$LINENO" 5
5364         fi
5365 fi
5366
5367 if test -z "${AR}"; then
5368         for ac_prog in ar gar
5369 do
5370   # Extract the first word of "$ac_prog", so it can be a program name with args.
5371 set dummy $ac_prog; ac_word=$2
5372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5373 $as_echo_n "checking for $ac_word... " >&6; }
5374 if test "${ac_cv_prog_AR+set}" = set; then :
5375   $as_echo_n "(cached) " >&6
5376 else
5377   if test -n "$AR"; then
5378   ac_cv_prog_AR="$AR" # Let the user override the test.
5379 else
5380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5381 for as_dir in $PATH
5382 do
5383   IFS=$as_save_IFS
5384   test -z "$as_dir" && as_dir=.
5385     for ac_exec_ext in '' $ac_executable_extensions; do
5386   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5387     ac_cv_prog_AR="$ac_prog"
5388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5389     break 2
5390   fi
5391 done
5392   done
5393 IFS=$as_save_IFS
5394
5395 fi
5396 fi
5397 AR=$ac_cv_prog_AR
5398 if test -n "$AR"; then
5399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5400 $as_echo "$AR" >&6; }
5401 else
5402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5403 $as_echo "no" >&6; }
5404 fi
5405
5406
5407   test -n "$AR" && break
5408 done
5409 test -n "$AR" || AR="missing"
5410
5411
5412         if test "${AR}" = "missing" ; then
5413                 as_fn_error "Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." "$LINENO" 5
5414         fi
5415 fi
5416
5417
5418
5419
5420
5421 # Check whether --enable-fast-install was given.
5422 if test "${enable_fast_install+set}" = set; then :
5423   enableval=$enable_fast_install; p=${PACKAGE-default}
5424     case $enableval in
5425     yes) enable_fast_install=yes ;;
5426     no) enable_fast_install=no ;;
5427     *)
5428       enable_fast_install=no
5429       # Look at the argument we got.  We use all the common list separators.
5430       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5431       for pkg in $enableval; do
5432         IFS="$lt_save_ifs"
5433         if test "X$pkg" = "X$p"; then
5434           enable_fast_install=yes
5435         fi
5436       done
5437       IFS="$lt_save_ifs"
5438       ;;
5439     esac
5440 else
5441   enable_fast_install=yes
5442 fi
5443
5444
5445 DEPDIR="${am__leading_dot}deps"
5446
5447 ac_config_commands="$ac_config_commands depfiles"
5448
5449
5450 am_make=${MAKE-make}
5451 cat > confinc << 'END'
5452 am__doit:
5453         @echo done
5454 .PHONY: am__doit
5455 END
5456 # If we don't find an include directive, just comment out the code.
5457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5458 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5459 am__include="#"
5460 am__quote=
5461 _am_result=none
5462 # First try GNU make style include.
5463 echo "include confinc" > confmf
5464 # We grep out `Entering directory' and `Leaving directory'
5465 # messages which can occur if `w' ends up in MAKEFLAGS.
5466 # In particular we don't look at `^make:' because GNU make might
5467 # be invoked under some other name (usually "gmake"), in which
5468 # case it prints its new name instead of `make'.
5469 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
5470    am__include=include
5471    am__quote=
5472    _am_result=GNU
5473 fi
5474 # Now try BSD make style include.
5475 if test "$am__include" = "#"; then
5476    echo '.include "confinc"' > confmf
5477    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
5478       am__include=.include
5479       am__quote="\""
5480       _am_result=BSD
5481    fi
5482 fi
5483
5484
5485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5486 $as_echo "$_am_result" >&6; }
5487 rm -f confinc confmf
5488
5489 # Check whether --enable-dependency-tracking was given.
5490 if test "${enable_dependency_tracking+set}" = set; then :
5491   enableval=$enable_dependency_tracking;
5492 fi
5493
5494 if test "x$enable_dependency_tracking" != xno; then
5495   am_depcomp="$ac_aux_dir/depcomp"
5496   AMDEPBACKSLASH='\'
5497 fi
5498
5499
5500 if test "x$enable_dependency_tracking" != xno; then
5501   AMDEP_TRUE=
5502   AMDEP_FALSE='#'
5503 else
5504   AMDEP_TRUE='#'
5505   AMDEP_FALSE=
5506 fi
5507
5508
5509
5510 ac_ext=c
5511 ac_cpp='$CPP $CPPFLAGS'
5512 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5513 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5514 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5515 if test -n "$ac_tool_prefix"; then
5516   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5517 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5519 $as_echo_n "checking for $ac_word... " >&6; }
5520 if test "${ac_cv_prog_CC+set}" = set; then :
5521   $as_echo_n "(cached) " >&6
5522 else
5523   if test -n "$CC"; then
5524   ac_cv_prog_CC="$CC" # Let the user override the test.
5525 else
5526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5527 for as_dir in $PATH
5528 do
5529   IFS=$as_save_IFS
5530   test -z "$as_dir" && as_dir=.
5531     for ac_exec_ext in '' $ac_executable_extensions; do
5532   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5533     ac_cv_prog_CC="${ac_tool_prefix}gcc"
5534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5535     break 2
5536   fi
5537 done
5538   done
5539 IFS=$as_save_IFS
5540
5541 fi
5542 fi
5543 CC=$ac_cv_prog_CC
5544 if test -n "$CC"; then
5545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5546 $as_echo "$CC" >&6; }
5547 else
5548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5549 $as_echo "no" >&6; }
5550 fi
5551
5552
5553 fi
5554 if test -z "$ac_cv_prog_CC"; then
5555   ac_ct_CC=$CC
5556   # Extract the first word of "gcc", so it can be a program name with args.
5557 set dummy gcc; ac_word=$2
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5559 $as_echo_n "checking for $ac_word... " >&6; }
5560 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5561   $as_echo_n "(cached) " >&6
5562 else
5563   if test -n "$ac_ct_CC"; then
5564   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5565 else
5566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5567 for as_dir in $PATH
5568 do
5569   IFS=$as_save_IFS
5570   test -z "$as_dir" && as_dir=.
5571     for ac_exec_ext in '' $ac_executable_extensions; do
5572   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5573     ac_cv_prog_ac_ct_CC="gcc"
5574     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5575     break 2
5576   fi
5577 done
5578   done
5579 IFS=$as_save_IFS
5580
5581 fi
5582 fi
5583 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5584 if test -n "$ac_ct_CC"; then
5585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5586 $as_echo "$ac_ct_CC" >&6; }
5587 else
5588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5589 $as_echo "no" >&6; }
5590 fi
5591
5592   if test "x$ac_ct_CC" = x; then
5593     CC=""
5594   else
5595     case $cross_compiling:$ac_tool_warned in
5596 yes:)
5597 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5598 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5599 ac_tool_warned=yes ;;
5600 esac
5601     CC=$ac_ct_CC
5602   fi
5603 else
5604   CC="$ac_cv_prog_CC"
5605 fi
5606
5607 if test -z "$CC"; then
5608           if test -n "$ac_tool_prefix"; then
5609     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5610 set dummy ${ac_tool_prefix}cc; ac_word=$2
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5612 $as_echo_n "checking for $ac_word... " >&6; }
5613 if test "${ac_cv_prog_CC+set}" = set; then :
5614   $as_echo_n "(cached) " >&6
5615 else
5616   if test -n "$CC"; then
5617   ac_cv_prog_CC="$CC" # Let the user override the test.
5618 else
5619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5620 for as_dir in $PATH
5621 do
5622   IFS=$as_save_IFS
5623   test -z "$as_dir" && as_dir=.
5624     for ac_exec_ext in '' $ac_executable_extensions; do
5625   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5626     ac_cv_prog_CC="${ac_tool_prefix}cc"
5627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5628     break 2
5629   fi
5630 done
5631   done
5632 IFS=$as_save_IFS
5633
5634 fi
5635 fi
5636 CC=$ac_cv_prog_CC
5637 if test -n "$CC"; then
5638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5639 $as_echo "$CC" >&6; }
5640 else
5641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5642 $as_echo "no" >&6; }
5643 fi
5644
5645
5646   fi
5647 fi
5648 if test -z "$CC"; then
5649   # Extract the first word of "cc", so it can be a program name with args.
5650 set dummy cc; ac_word=$2
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652 $as_echo_n "checking for $ac_word... " >&6; }
5653 if test "${ac_cv_prog_CC+set}" = set; then :
5654   $as_echo_n "(cached) " >&6
5655 else
5656   if test -n "$CC"; then
5657   ac_cv_prog_CC="$CC" # Let the user override the test.
5658 else
5659   ac_prog_rejected=no
5660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661 for as_dir in $PATH
5662 do
5663   IFS=$as_save_IFS
5664   test -z "$as_dir" && as_dir=.
5665     for ac_exec_ext in '' $ac_executable_extensions; do
5666   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5667     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5668        ac_prog_rejected=yes
5669        continue
5670      fi
5671     ac_cv_prog_CC="cc"
5672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5673     break 2
5674   fi
5675 done
5676   done
5677 IFS=$as_save_IFS
5678
5679 if test $ac_prog_rejected = yes; then
5680   # We found a bogon in the path, so make sure we never use it.
5681   set dummy $ac_cv_prog_CC
5682   shift
5683   if test $# != 0; then
5684     # We chose a different compiler from the bogus one.
5685     # However, it has the same basename, so the bogon will be chosen
5686     # first if we set CC to just the basename; use the full file name.
5687     shift
5688     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5689   fi
5690 fi
5691 fi
5692 fi
5693 CC=$ac_cv_prog_CC
5694 if test -n "$CC"; then
5695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5696 $as_echo "$CC" >&6; }
5697 else
5698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5699 $as_echo "no" >&6; }
5700 fi
5701
5702
5703 fi
5704 if test -z "$CC"; then
5705   if test -n "$ac_tool_prefix"; then
5706   for ac_prog in cl.exe
5707   do
5708     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5709 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5711 $as_echo_n "checking for $ac_word... " >&6; }
5712 if test "${ac_cv_prog_CC+set}" = set; then :
5713   $as_echo_n "(cached) " >&6
5714 else
5715   if test -n "$CC"; then
5716   ac_cv_prog_CC="$CC" # Let the user override the test.
5717 else
5718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5719 for as_dir in $PATH
5720 do
5721   IFS=$as_save_IFS
5722   test -z "$as_dir" && as_dir=.
5723     for ac_exec_ext in '' $ac_executable_extensions; do
5724   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5725     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5727     break 2
5728   fi
5729 done
5730   done
5731 IFS=$as_save_IFS
5732
5733 fi
5734 fi
5735 CC=$ac_cv_prog_CC
5736 if test -n "$CC"; then
5737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5738 $as_echo "$CC" >&6; }
5739 else
5740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5741 $as_echo "no" >&6; }
5742 fi
5743
5744
5745     test -n "$CC" && break
5746   done
5747 fi
5748 if test -z "$CC"; then
5749   ac_ct_CC=$CC
5750   for ac_prog in cl.exe
5751 do
5752   # Extract the first word of "$ac_prog", so it can be a program name with args.
5753 set dummy $ac_prog; ac_word=$2
5754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5755 $as_echo_n "checking for $ac_word... " >&6; }
5756 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5757   $as_echo_n "(cached) " >&6
5758 else
5759   if test -n "$ac_ct_CC"; then
5760   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5761 else
5762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5763 for as_dir in $PATH
5764 do
5765   IFS=$as_save_IFS
5766   test -z "$as_dir" && as_dir=.
5767     for ac_exec_ext in '' $ac_executable_extensions; do
5768   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5769     ac_cv_prog_ac_ct_CC="$ac_prog"
5770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5771     break 2
5772   fi
5773 done
5774   done
5775 IFS=$as_save_IFS
5776
5777 fi
5778 fi
5779 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5780 if test -n "$ac_ct_CC"; then
5781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5782 $as_echo "$ac_ct_CC" >&6; }
5783 else
5784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5785 $as_echo "no" >&6; }
5786 fi
5787
5788
5789   test -n "$ac_ct_CC" && break
5790 done
5791
5792   if test "x$ac_ct_CC" = x; then
5793     CC=""
5794   else
5795     case $cross_compiling:$ac_tool_warned in
5796 yes:)
5797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5798 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5799 ac_tool_warned=yes ;;
5800 esac
5801     CC=$ac_ct_CC
5802   fi
5803 fi
5804
5805 fi
5806
5807
5808 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5809 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5810 as_fn_error "no acceptable C compiler found in \$PATH
5811 See \`config.log' for more details." "$LINENO" 5; }
5812
5813 # Provide some information about the compiler.
5814 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5815 set X $ac_compile
5816 ac_compiler=$2
5817 for ac_option in --version -v -V -qversion; do
5818   { { ac_try="$ac_compiler $ac_option >&5"
5819 case "(($ac_try" in
5820   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5821   *) ac_try_echo=$ac_try;;
5822 esac
5823 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5824 $as_echo "$ac_try_echo"; } >&5
5825   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5826   ac_status=$?
5827   if test -s conftest.err; then
5828     sed '10a\
5829 ... rest of stderr output deleted ...
5830          10q' conftest.err >conftest.er1
5831     cat conftest.er1 >&5
5832   fi
5833   rm -f conftest.er1 conftest.err
5834   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5835   test $ac_status = 0; }
5836 done
5837
5838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5839 /* end confdefs.h.  */
5840
5841 int
5842 main ()
5843 {
5844
5845   ;
5846   return 0;
5847 }
5848 _ACEOF
5849 ac_clean_files_save=$ac_clean_files
5850 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5851 # Try to create an executable without -o first, disregard a.out.
5852 # It will help us diagnose broken compilers, and finding out an intuition
5853 # of exeext.
5854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5855 $as_echo_n "checking whether the C compiler works... " >&6; }
5856 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5857
5858 # The possible output files:
5859 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5860
5861 ac_rmfiles=
5862 for ac_file in $ac_files
5863 do
5864   case $ac_file in
5865     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5866     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5867   esac
5868 done
5869 rm -f $ac_rmfiles
5870
5871 if { { ac_try="$ac_link_default"
5872 case "(($ac_try" in
5873   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5874   *) ac_try_echo=$ac_try;;
5875 esac
5876 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5877 $as_echo "$ac_try_echo"; } >&5
5878   (eval "$ac_link_default") 2>&5
5879   ac_status=$?
5880   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5881   test $ac_status = 0; }; then :
5882   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5883 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5884 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
5885 # so that the user can short-circuit this test for compilers unknown to
5886 # Autoconf.
5887 for ac_file in $ac_files ''
5888 do
5889   test -f "$ac_file" || continue
5890   case $ac_file in
5891     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5892         ;;
5893     [ab].out )
5894         # We found the default executable, but exeext='' is most
5895         # certainly right.
5896         break;;
5897     *.* )
5898         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5899         then :; else
5900            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5901         fi
5902         # We set ac_cv_exeext here because the later test for it is not
5903         # safe: cross compilers may not add the suffix if given an `-o'
5904         # argument, so we may need to know it at that point already.
5905         # Even if this section looks crufty: it has the advantage of
5906         # actually working.
5907         break;;
5908     * )
5909         break;;
5910   esac
5911 done
5912 test "$ac_cv_exeext" = no && ac_cv_exeext=
5913
5914 else
5915   ac_file=''
5916 fi
5917 if test -z "$ac_file"; then :
5918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5919 $as_echo "no" >&6; }
5920 $as_echo "$as_me: failed program was:" >&5
5921 sed 's/^/| /' conftest.$ac_ext >&5
5922
5923 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5924 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5925 { as_fn_set_status 77
5926 as_fn_error "C compiler cannot create executables
5927 See \`config.log' for more details." "$LINENO" 5; }; }
5928 else
5929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5930 $as_echo "yes" >&6; }
5931 fi
5932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5933 $as_echo_n "checking for C compiler default output file name... " >&6; }
5934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5935 $as_echo "$ac_file" >&6; }
5936 ac_exeext=$ac_cv_exeext
5937
5938 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5939 ac_clean_files=$ac_clean_files_save
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5941 $as_echo_n "checking for suffix of executables... " >&6; }
5942 if { { ac_try="$ac_link"
5943 case "(($ac_try" in
5944   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5945   *) ac_try_echo=$ac_try;;
5946 esac
5947 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5948 $as_echo "$ac_try_echo"; } >&5
5949   (eval "$ac_link") 2>&5
5950   ac_status=$?
5951   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5952   test $ac_status = 0; }; then :
5953   # If both `conftest.exe' and `conftest' are `present' (well, observable)
5954 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5955 # work properly (i.e., refer to `conftest.exe'), while it won't with
5956 # `rm'.
5957 for ac_file in conftest.exe conftest conftest.*; do
5958   test -f "$ac_file" || continue
5959   case $ac_file in
5960     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5961     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5962           break;;
5963     * ) break;;
5964   esac
5965 done
5966 else
5967   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5968 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5969 as_fn_error "cannot compute suffix of executables: cannot compile and link
5970 See \`config.log' for more details." "$LINENO" 5; }
5971 fi
5972 rm -f conftest conftest$ac_cv_exeext
5973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5974 $as_echo "$ac_cv_exeext" >&6; }
5975
5976 rm -f conftest.$ac_ext
5977 EXEEXT=$ac_cv_exeext
5978 ac_exeext=$EXEEXT
5979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5980 /* end confdefs.h.  */
5981 #include <stdio.h>
5982 int
5983 main ()
5984 {
5985 FILE *f = fopen ("conftest.out", "w");
5986  return ferror (f) || fclose (f) != 0;
5987
5988   ;
5989   return 0;
5990 }
5991 _ACEOF
5992 ac_clean_files="$ac_clean_files conftest.out"
5993 # Check that the compiler produces executables we can run.  If not, either
5994 # the compiler is broken, or we cross compile.
5995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5996 $as_echo_n "checking whether we are cross compiling... " >&6; }
5997 if test "$cross_compiling" != yes; then
5998   { { ac_try="$ac_link"
5999 case "(($ac_try" in
6000   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6001   *) ac_try_echo=$ac_try;;
6002 esac
6003 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6004 $as_echo "$ac_try_echo"; } >&5
6005   (eval "$ac_link") 2>&5
6006   ac_status=$?
6007   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6008   test $ac_status = 0; }
6009   if { ac_try='./conftest$ac_cv_exeext'
6010   { { case "(($ac_try" in
6011   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6012   *) ac_try_echo=$ac_try;;
6013 esac
6014 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6015 $as_echo "$ac_try_echo"; } >&5
6016   (eval "$ac_try") 2>&5
6017   ac_status=$?
6018   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6019   test $ac_status = 0; }; }; then
6020     cross_compiling=no
6021   else
6022     if test "$cross_compiling" = maybe; then
6023         cross_compiling=yes
6024     else
6025         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6026 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6027 as_fn_error "cannot run C compiled programs.
6028 If you meant to cross compile, use \`--host'.
6029 See \`config.log' for more details." "$LINENO" 5; }
6030     fi
6031   fi
6032 fi
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
6034 $as_echo "$cross_compiling" >&6; }
6035
6036 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
6037 ac_clean_files=$ac_clean_files_save
6038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
6039 $as_echo_n "checking for suffix of object files... " >&6; }
6040 if test "${ac_cv_objext+set}" = set; then :
6041   $as_echo_n "(cached) " >&6
6042 else
6043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6044 /* end confdefs.h.  */
6045
6046 int
6047 main ()
6048 {
6049
6050   ;
6051   return 0;
6052 }
6053 _ACEOF
6054 rm -f conftest.o conftest.obj
6055 if { { ac_try="$ac_compile"
6056 case "(($ac_try" in
6057   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6058   *) ac_try_echo=$ac_try;;
6059 esac
6060 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6061 $as_echo "$ac_try_echo"; } >&5
6062   (eval "$ac_compile") 2>&5
6063   ac_status=$?
6064   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6065   test $ac_status = 0; }; then :
6066   for ac_file in conftest.o conftest.obj conftest.*; do
6067   test -f "$ac_file" || continue;
6068   case $ac_file in
6069     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
6070     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
6071        break;;
6072   esac
6073 done
6074 else
6075   $as_echo "$as_me: failed program was:" >&5
6076 sed 's/^/| /' conftest.$ac_ext >&5
6077
6078 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6079 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6080 as_fn_error "cannot compute suffix of object files: cannot compile
6081 See \`config.log' for more details." "$LINENO" 5; }
6082 fi
6083 rm -f conftest.$ac_cv_objext conftest.$ac_ext
6084 fi
6085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
6086 $as_echo "$ac_cv_objext" >&6; }
6087 OBJEXT=$ac_cv_objext
6088 ac_objext=$OBJEXT
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6090 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6091 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
6092   $as_echo_n "(cached) " >&6
6093 else
6094   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6095 /* end confdefs.h.  */
6096
6097 int
6098 main ()
6099 {
6100 #ifndef __GNUC__
6101        choke me
6102 #endif
6103
6104   ;
6105   return 0;
6106 }
6107 _ACEOF
6108 if ac_fn_c_try_compile "$LINENO"; then :
6109   ac_compiler_gnu=yes
6110 else
6111   ac_compiler_gnu=no
6112 fi
6113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6114 ac_cv_c_compiler_gnu=$ac_compiler_gnu
6115
6116 fi
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6118 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
6119 if test $ac_compiler_gnu = yes; then
6120   GCC=yes
6121 else
6122   GCC=
6123 fi
6124 ac_test_CFLAGS=${CFLAGS+set}
6125 ac_save_CFLAGS=$CFLAGS
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6127 $as_echo_n "checking whether $CC accepts -g... " >&6; }
6128 if test "${ac_cv_prog_cc_g+set}" = set; then :
6129   $as_echo_n "(cached) " >&6
6130 else
6131   ac_save_c_werror_flag=$ac_c_werror_flag
6132    ac_c_werror_flag=yes
6133    ac_cv_prog_cc_g=no
6134    CFLAGS="-g"
6135    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6136 /* end confdefs.h.  */
6137
6138 int
6139 main ()
6140 {
6141
6142   ;
6143   return 0;
6144 }
6145 _ACEOF
6146 if ac_fn_c_try_compile "$LINENO"; then :
6147   ac_cv_prog_cc_g=yes
6148 else
6149   CFLAGS=""
6150       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6151 /* end confdefs.h.  */
6152
6153 int
6154 main ()
6155 {
6156
6157   ;
6158   return 0;
6159 }
6160 _ACEOF
6161 if ac_fn_c_try_compile "$LINENO"; then :
6162
6163 else
6164   ac_c_werror_flag=$ac_save_c_werror_flag
6165          CFLAGS="-g"
6166          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6167 /* end confdefs.h.  */
6168
6169 int
6170 main ()
6171 {
6172
6173   ;
6174   return 0;
6175 }
6176 _ACEOF
6177 if ac_fn_c_try_compile "$LINENO"; then :
6178   ac_cv_prog_cc_g=yes
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 fi
6184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6185    ac_c_werror_flag=$ac_save_c_werror_flag
6186 fi
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6188 $as_echo "$ac_cv_prog_cc_g" >&6; }
6189 if test "$ac_test_CFLAGS" = set; then
6190   CFLAGS=$ac_save_CFLAGS
6191 elif test $ac_cv_prog_cc_g = yes; then
6192   if test "$GCC" = yes; then
6193     CFLAGS="-g -O2"
6194   else
6195     CFLAGS="-g"
6196   fi
6197 else
6198   if test "$GCC" = yes; then
6199     CFLAGS="-O2"
6200   else
6201     CFLAGS=
6202   fi
6203 fi
6204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6205 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6206 if test "${ac_cv_prog_cc_c89+set}" = set; then :
6207   $as_echo_n "(cached) " >&6
6208 else
6209   ac_cv_prog_cc_c89=no
6210 ac_save_CC=$CC
6211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6212 /* end confdefs.h.  */
6213 #include <stdarg.h>
6214 #include <stdio.h>
6215 #include <sys/types.h>
6216 #include <sys/stat.h>
6217 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6218 struct buf { int x; };
6219 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6220 static char *e (p, i)
6221      char **p;
6222      int i;
6223 {
6224   return p[i];
6225 }
6226 static char *f (char * (*g) (char **, int), char **p, ...)
6227 {
6228   char *s;
6229   va_list v;
6230   va_start (v,p);
6231   s = g (p, va_arg (v,int));
6232   va_end (v);
6233   return s;
6234 }
6235
6236 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6237    function prototypes and stuff, but not '\xHH' hex character constants.
6238    These don't provoke an error unfortunately, instead are silently treated
6239    as 'x'.  The following induces an error, until -std is added to get
6240    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6241    array size at least.  It's necessary to write '\x00'==0 to get something
6242    that's true only with -std.  */
6243 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6244
6245 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6246    inside strings and character constants.  */
6247 #define FOO(x) 'x'
6248 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6249
6250 int test (int i, double x);
6251 struct s1 {int (*f) (int a);};
6252 struct s2 {int (*f) (double a);};
6253 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6254 int argc;
6255 char **argv;
6256 int
6257 main ()
6258 {
6259 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6260   ;
6261   return 0;
6262 }
6263 _ACEOF
6264 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6265         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6266 do
6267   CC="$ac_save_CC $ac_arg"
6268   if ac_fn_c_try_compile "$LINENO"; then :
6269   ac_cv_prog_cc_c89=$ac_arg
6270 fi
6271 rm -f core conftest.err conftest.$ac_objext
6272   test "x$ac_cv_prog_cc_c89" != "xno" && break
6273 done
6274 rm -f conftest.$ac_ext
6275 CC=$ac_save_CC
6276
6277 fi
6278 # AC_CACHE_VAL
6279 case "x$ac_cv_prog_cc_c89" in
6280   x)
6281     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6282 $as_echo "none needed" >&6; } ;;
6283   xno)
6284     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6285 $as_echo "unsupported" >&6; } ;;
6286   *)
6287     CC="$CC $ac_cv_prog_cc_c89"
6288     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6289 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6290 esac
6291 if test "x$ac_cv_prog_cc_c89" != xno; then :
6292
6293 fi
6294
6295 ac_ext=c
6296 ac_cpp='$CPP $CPPFLAGS'
6297 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6298 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6299 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6300
6301 depcc="$CC"   am_compiler_list=
6302
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6304 $as_echo_n "checking dependency style of $depcc... " >&6; }
6305 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
6306   $as_echo_n "(cached) " >&6
6307 else
6308   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6309   # We make a subdir and do the tests there.  Otherwise we can end up
6310   # making bogus files that we don't know about and never remove.  For
6311   # instance it was reported that on HP-UX the gcc test will end up
6312   # making a dummy file named `D' -- because `-MD' means `put the output
6313   # in D'.
6314   mkdir conftest.dir
6315   # Copy depcomp to subdir because otherwise we won't find it if we're
6316   # using a relative directory.
6317   cp "$am_depcomp" conftest.dir
6318   cd conftest.dir
6319   # We will build objects and dependencies in a subdirectory because
6320   # it helps to detect inapplicable dependency modes.  For instance
6321   # both Tru64's cc and ICC support -MD to output dependencies as a
6322   # side effect of compilation, but ICC will put the dependencies in
6323   # the current directory while Tru64 will put them in the object
6324   # directory.
6325   mkdir sub
6326
6327   am_cv_CC_dependencies_compiler_type=none
6328   if test "$am_compiler_list" = ""; then
6329      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6330   fi
6331   for depmode in $am_compiler_list; do
6332     # Setup a source with many dependencies, because some compilers
6333     # like to wrap large dependency lists on column 80 (with \), and
6334     # we should not choose a depcomp mode which is confused by this.
6335     #
6336     # We need to recreate these files for each test, as the compiler may
6337     # overwrite some of them when testing with obscure command lines.
6338     # This happens at least with the AIX C compiler.
6339     : > sub/conftest.c
6340     for i in 1 2 3 4 5 6; do
6341       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6342       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6343       # Solaris 8's {/usr,}/bin/sh.
6344       touch sub/conftst$i.h
6345     done
6346     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6347
6348     case $depmode in
6349     nosideeffect)
6350       # after this tag, mechanisms are not by side-effect, so they'll
6351       # only be used when explicitly requested
6352       if test "x$enable_dependency_tracking" = xyes; then
6353         continue
6354       else
6355         break
6356       fi
6357       ;;
6358     none) break ;;
6359     esac
6360     # We check with `-c' and `-o' for the sake of the "dashmstdout"
6361     # mode.  It turns out that the SunPro C++ compiler does not properly
6362     # handle `-M -o', and we need to detect this.
6363     if depmode=$depmode \
6364        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6365        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6366        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6367          >/dev/null 2>conftest.err &&
6368        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6369        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6370        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6371       # icc doesn't choke on unknown options, it will just issue warnings
6372       # or remarks (even with -Werror).  So we grep stderr for any message
6373       # that says an option was ignored or not supported.
6374       # When given -MP, icc 7.0 and 7.1 complain thusly:
6375       #   icc: Command line warning: ignoring option '-M'; no argument required
6376       # The diagnosis changed in icc 8.0:
6377       #   icc: Command line remark: option '-MP' not supported
6378       if (grep 'ignoring option' conftest.err ||
6379           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6380         am_cv_CC_dependencies_compiler_type=$depmode
6381         break
6382       fi
6383     fi
6384   done
6385
6386   cd ..
6387   rm -rf conftest.dir
6388 else
6389   am_cv_CC_dependencies_compiler_type=none
6390 fi
6391
6392 fi
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6394 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6395 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6396
6397
6398
6399 if
6400   test "x$enable_dependency_tracking" != xno \
6401   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6402   am__fastdepCC_TRUE=
6403   am__fastdepCC_FALSE='#'
6404 else
6405   am__fastdepCC_TRUE='#'
6406   am__fastdepCC_FALSE=
6407 fi
6408
6409
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6411 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6412 if test "${lt_cv_path_SED+set}" = set; then :
6413   $as_echo_n "(cached) " >&6
6414 else
6415   # Loop through the user's path and test for sed and gsed.
6416 # Then use that list of sed's as ones to test for truncation.
6417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6418 for as_dir in $PATH
6419 do
6420   IFS=$as_save_IFS
6421   test -z "$as_dir" && as_dir=.
6422   for lt_ac_prog in sed gsed; do
6423     for ac_exec_ext in '' $ac_executable_extensions; do
6424       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6425         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6426       fi
6427     done
6428   done
6429 done
6430 lt_ac_max=0
6431 lt_ac_count=0
6432 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6433 # along with /bin/sed that truncates output.
6434 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6435   test ! -f $lt_ac_sed && continue
6436   cat /dev/null > conftest.in
6437   lt_ac_count=0
6438   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6439   # Check for GNU sed and select it if it is found.
6440   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6441     lt_cv_path_SED=$lt_ac_sed
6442     break
6443   fi
6444   while true; do
6445     cat conftest.in conftest.in >conftest.tmp
6446     mv conftest.tmp conftest.in
6447     cp conftest.in conftest.nl
6448     echo >>conftest.nl
6449     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6450     cmp -s conftest.out conftest.nl || break
6451     # 10000 chars as input seems more than enough
6452     test $lt_ac_count -gt 10 && break
6453     lt_ac_count=`expr $lt_ac_count + 1`
6454     if test $lt_ac_count -gt $lt_ac_max; then
6455       lt_ac_max=$lt_ac_count
6456       lt_cv_path_SED=$lt_ac_sed
6457     fi
6458   done
6459 done
6460
6461 fi
6462
6463 SED=$lt_cv_path_SED
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
6465 $as_echo "$SED" >&6; }
6466
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6468 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6469 if test "${ac_cv_path_GREP+set}" = set; then :
6470   $as_echo_n "(cached) " >&6
6471 else
6472   if test -z "$GREP"; then
6473   ac_path_GREP_found=false
6474   # Loop through the user's path and test for each of PROGNAME-LIST
6475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6476 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6477 do
6478   IFS=$as_save_IFS
6479   test -z "$as_dir" && as_dir=.
6480     for ac_prog in grep ggrep; do
6481     for ac_exec_ext in '' $ac_executable_extensions; do
6482       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6483       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6484 # Check for GNU ac_path_GREP and select it if it is found.
6485   # Check for GNU $ac_path_GREP
6486 case `"$ac_path_GREP" --version 2>&1` in
6487 *GNU*)
6488   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6489 *)
6490   ac_count=0
6491   $as_echo_n 0123456789 >"conftest.in"
6492   while :
6493   do
6494     cat "conftest.in" "conftest.in" >"conftest.tmp"
6495     mv "conftest.tmp" "conftest.in"
6496     cp "conftest.in" "conftest.nl"
6497     $as_echo 'GREP' >> "conftest.nl"
6498     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6499     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6500     as_fn_arith $ac_count + 1 && ac_count=$as_val
6501     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6502       # Best one so far, save it but keep looking for a better one
6503       ac_cv_path_GREP="$ac_path_GREP"
6504       ac_path_GREP_max=$ac_count
6505     fi
6506     # 10*(2^10) chars as input seems more than enough
6507     test $ac_count -gt 10 && break
6508   done
6509   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6510 esac
6511
6512       $ac_path_GREP_found && break 3
6513     done
6514   done
6515   done
6516 IFS=$as_save_IFS
6517   if test -z "$ac_cv_path_GREP"; then
6518     as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6519   fi
6520 else
6521   ac_cv_path_GREP=$GREP
6522 fi
6523
6524 fi
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6526 $as_echo "$ac_cv_path_GREP" >&6; }
6527  GREP="$ac_cv_path_GREP"
6528
6529
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6531 $as_echo_n "checking for egrep... " >&6; }
6532 if test "${ac_cv_path_EGREP+set}" = set; then :
6533   $as_echo_n "(cached) " >&6
6534 else
6535   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6536    then ac_cv_path_EGREP="$GREP -E"
6537    else
6538      if test -z "$EGREP"; then
6539   ac_path_EGREP_found=false
6540   # Loop through the user's path and test for each of PROGNAME-LIST
6541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6543 do
6544   IFS=$as_save_IFS
6545   test -z "$as_dir" && as_dir=.
6546     for ac_prog in egrep; do
6547     for ac_exec_ext in '' $ac_executable_extensions; do
6548       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6549       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6550 # Check for GNU ac_path_EGREP and select it if it is found.
6551   # Check for GNU $ac_path_EGREP
6552 case `"$ac_path_EGREP" --version 2>&1` in
6553 *GNU*)
6554   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6555 *)
6556   ac_count=0
6557   $as_echo_n 0123456789 >"conftest.in"
6558   while :
6559   do
6560     cat "conftest.in" "conftest.in" >"conftest.tmp"
6561     mv "conftest.tmp" "conftest.in"
6562     cp "conftest.in" "conftest.nl"
6563     $as_echo 'EGREP' >> "conftest.nl"
6564     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6565     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6566     as_fn_arith $ac_count + 1 && ac_count=$as_val
6567     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6568       # Best one so far, save it but keep looking for a better one
6569       ac_cv_path_EGREP="$ac_path_EGREP"
6570       ac_path_EGREP_max=$ac_count
6571     fi
6572     # 10*(2^10) chars as input seems more than enough
6573     test $ac_count -gt 10 && break
6574   done
6575   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6576 esac
6577
6578       $ac_path_EGREP_found && break 3
6579     done
6580   done
6581   done
6582 IFS=$as_save_IFS
6583   if test -z "$ac_cv_path_EGREP"; then
6584     as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6585   fi
6586 else
6587   ac_cv_path_EGREP=$EGREP
6588 fi
6589
6590    fi
6591 fi
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6593 $as_echo "$ac_cv_path_EGREP" >&6; }
6594  EGREP="$ac_cv_path_EGREP"
6595
6596
6597
6598 # Check whether --with-gnu-ld was given.
6599 if test "${with_gnu_ld+set}" = set; then :
6600   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6601 else
6602   with_gnu_ld=no
6603 fi
6604
6605 ac_prog=ld
6606 if test "$GCC" = yes; then
6607   # Check if gcc -print-prog-name=ld gives a path.
6608   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
6609 $as_echo_n "checking for ld used by $CC... " >&6; }
6610   case $host in
6611   *-*-mingw*)
6612     # gcc leaves a trailing carriage return which upsets mingw
6613     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6614   *)
6615     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6616   esac
6617   case $ac_prog in
6618     # Accept absolute paths.
6619     [\\/]* | ?:[\\/]*)
6620       re_direlt='/[^/][^/]*/\.\./'
6621       # Canonicalize the pathname of ld
6622       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
6623       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6624         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
6625       done
6626       test -z "$LD" && LD="$ac_prog"
6627       ;;
6628   "")
6629     # If it fails, then pretend we aren't using GCC.
6630     ac_prog=ld
6631     ;;
6632   *)
6633     # If it is relative, then search for the first ld in PATH.
6634     with_gnu_ld=unknown
6635     ;;
6636   esac
6637 elif test "$with_gnu_ld" = yes; then
6638   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6639 $as_echo_n "checking for GNU ld... " >&6; }
6640 else
6641   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6642 $as_echo_n "checking for non-GNU ld... " >&6; }
6643 fi
6644 if test "${lt_cv_path_LD+set}" = set; then :
6645   $as_echo_n "(cached) " >&6
6646 else
6647   if test -z "$LD"; then
6648   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6649   for ac_dir in $PATH; do
6650     IFS="$lt_save_ifs"
6651     test -z "$ac_dir" && ac_dir=.
6652     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6653       lt_cv_path_LD="$ac_dir/$ac_prog"
6654       # Check to see if the program is GNU ld.  I'd rather use --version,
6655       # but apparently some variants of GNU ld only accept -v.
6656       # Break only if it was the GNU/non-GNU ld that we prefer.
6657       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6658       *GNU* | *'with BFD'*)
6659         test "$with_gnu_ld" != no && break
6660         ;;
6661       *)
6662         test "$with_gnu_ld" != yes && break
6663         ;;
6664       esac
6665     fi
6666   done
6667   IFS="$lt_save_ifs"
6668 else
6669   lt_cv_path_LD="$LD" # Let the user override the test with a path.
6670 fi
6671 fi
6672
6673 LD="$lt_cv_path_LD"
6674 if test -n "$LD"; then
6675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6676 $as_echo "$LD" >&6; }
6677 else
6678   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6679 $as_echo "no" >&6; }
6680 fi
6681 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
6682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6683 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6684 if test "${lt_cv_prog_gnu_ld+set}" = set; then :
6685   $as_echo_n "(cached) " >&6
6686 else
6687   # I'd rather use --version here, but apparently some GNU lds only accept -v.
6688 case `$LD -v 2>&1 </dev/null` in
6689 *GNU* | *'with BFD'*)
6690   lt_cv_prog_gnu_ld=yes
6691   ;;
6692 *)
6693   lt_cv_prog_gnu_ld=no
6694   ;;
6695 esac
6696 fi
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
6698 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
6699 with_gnu_ld=$lt_cv_prog_gnu_ld
6700
6701
6702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6703 $as_echo_n "checking for $LD option to reload object files... " >&6; }
6704 if test "${lt_cv_ld_reload_flag+set}" = set; then :
6705   $as_echo_n "(cached) " >&6
6706 else
6707   lt_cv_ld_reload_flag='-r'
6708 fi
6709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6710 $as_echo "$lt_cv_ld_reload_flag" >&6; }
6711 reload_flag=$lt_cv_ld_reload_flag
6712 case $reload_flag in
6713 "" | " "*) ;;
6714 *) reload_flag=" $reload_flag" ;;
6715 esac
6716 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6717 case $host_os in
6718   darwin*)
6719     if test "$GCC" = yes; then
6720       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
6721     else
6722       reload_cmds='$LD$reload_flag -o $output$reload_objs'
6723     fi
6724     ;;
6725 esac
6726
6727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5
6728 $as_echo_n "checking for BSD-compatible nm... " >&6; }
6729 if test "${lt_cv_path_NM+set}" = set; then :
6730   $as_echo_n "(cached) " >&6
6731 else
6732   if test -n "$NM"; then
6733   # Let the user override the test.
6734   lt_cv_path_NM="$NM"
6735 else
6736   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6737   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
6738     IFS="$lt_save_ifs"
6739     test -z "$ac_dir" && ac_dir=.
6740     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
6741     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6742       # Check to see if the nm accepts a BSD-compat flag.
6743       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
6744       #   nm: unknown option "B" ignored
6745       # Tru64's nm complains that /dev/null is an invalid object file
6746       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
6747       */dev/null* | *'Invalid file or object type'*)
6748         lt_cv_path_NM="$tmp_nm -B"
6749         break
6750         ;;
6751       *)
6752         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
6753         */dev/null*)
6754           lt_cv_path_NM="$tmp_nm -p"
6755           break
6756           ;;
6757         *)
6758           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6759           continue # so that we can try to find one that supports BSD flags
6760           ;;
6761         esac
6762       esac
6763     fi
6764   done
6765   IFS="$lt_save_ifs"
6766   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
6767 fi
6768 fi
6769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
6770 $as_echo "$lt_cv_path_NM" >&6; }
6771 NM="$lt_cv_path_NM"
6772
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6774 $as_echo_n "checking whether ln -s works... " >&6; }
6775 LN_S=$as_ln_s
6776 if test "$LN_S" = "ln -s"; then
6777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6778 $as_echo "yes" >&6; }
6779 else
6780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6781 $as_echo "no, using $LN_S" >&6; }
6782 fi
6783
6784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognise dependent libraries" >&5
6785 $as_echo_n "checking how to recognise dependent libraries... " >&6; }
6786 if test "${lt_cv_deplibs_check_method+set}" = set; then :
6787   $as_echo_n "(cached) " >&6
6788 else
6789   lt_cv_file_magic_cmd='$MAGIC_CMD'
6790 lt_cv_file_magic_test_file=
6791 lt_cv_deplibs_check_method='unknown'
6792 # Need to set the preceding variable on all platforms that support
6793 # interlibrary dependencies.
6794 # 'none' -- dependencies not supported.
6795 # `unknown' -- same as none, but documents that we really don't know.
6796 # 'pass_all' -- all dependencies passed with no checks.
6797 # 'test_compile' -- check by making test program.
6798 # 'file_magic [[regex]]' -- check by looking for files in library path
6799 # which responds to the $file_magic_cmd with a given extended regex.
6800 # If you have `file' or equivalent on your system and you're not sure
6801 # whether `pass_all' will *always* work, you probably want this one.
6802
6803 case $host_os in
6804 aix4* | aix5*)
6805   lt_cv_deplibs_check_method=pass_all
6806   ;;
6807
6808 beos*)
6809   lt_cv_deplibs_check_method=pass_all
6810   ;;
6811
6812 bsdi[45]*)
6813   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6814   lt_cv_file_magic_cmd='/usr/bin/file -L'
6815   lt_cv_file_magic_test_file=/shlib/libc.so
6816   ;;
6817
6818 cygwin*)
6819   # func_win32_libid is a shell function defined in ltmain.sh
6820   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6821   lt_cv_file_magic_cmd='func_win32_libid'
6822   ;;
6823
6824 mingw* | pw32*)
6825   # Base MSYS/MinGW do not provide the 'file' command needed by
6826   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
6827   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6828   lt_cv_file_magic_cmd='$OBJDUMP -f'
6829   ;;
6830
6831 darwin* | rhapsody*)
6832   lt_cv_deplibs_check_method=pass_all
6833   ;;
6834
6835 freebsd* | kfreebsd*-gnu | dragonfly*)
6836   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6837     case $host_cpu in
6838     i*86 )
6839       # Not sure whether the presence of OpenBSD here was a mistake.
6840       # Let's accept both of them until this is cleared up.
6841       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6842       lt_cv_file_magic_cmd=/usr/bin/file
6843       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6844       ;;
6845     esac
6846   else
6847     lt_cv_deplibs_check_method=pass_all
6848   fi
6849   ;;
6850
6851 gnu*)
6852   lt_cv_deplibs_check_method=pass_all
6853   ;;
6854
6855 hpux10.20* | hpux11*)
6856   lt_cv_file_magic_cmd=/usr/bin/file
6857   case $host_cpu in
6858   ia64*)
6859     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6860     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6861     ;;
6862   hppa*64*)
6863     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]'
6864     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6865     ;;
6866   *)
6867     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
6868     lt_cv_file_magic_test_file=/usr/lib/libc.sl
6869     ;;
6870   esac
6871   ;;
6872
6873 irix5* | irix6* | nonstopux*)
6874   case $LD in
6875   *-32|*"-32 ") libmagic=32-bit;;
6876   *-n32|*"-n32 ") libmagic=N32;;
6877   *-64|*"-64 ") libmagic=64-bit;;
6878   *) libmagic=never-match;;
6879   esac
6880   lt_cv_deplibs_check_method=pass_all
6881   ;;
6882
6883 # This must be Linux ELF.
6884 linux*)
6885   lt_cv_deplibs_check_method=pass_all
6886   ;;
6887
6888 netbsd*)
6889   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6890     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6891   else
6892     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6893   fi
6894   ;;
6895
6896 newos6*)
6897   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6898   lt_cv_file_magic_cmd=/usr/bin/file
6899   lt_cv_file_magic_test_file=/usr/lib/libnls.so
6900   ;;
6901
6902 nto-qnx*)
6903   lt_cv_deplibs_check_method=unknown
6904   ;;
6905
6906 openbsd*)
6907   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6908     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6909   else
6910     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6911   fi
6912   ;;
6913
6914 osf3* | osf4* | osf5*)
6915   lt_cv_deplibs_check_method=pass_all
6916   ;;
6917
6918 sco3.2v5*)
6919   lt_cv_deplibs_check_method=pass_all
6920   ;;
6921
6922 solaris*)
6923   lt_cv_deplibs_check_method=pass_all
6924   ;;
6925
6926 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6927   case $host_vendor in
6928   motorola)
6929     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]'
6930     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6931     ;;
6932   ncr)
6933     lt_cv_deplibs_check_method=pass_all
6934     ;;
6935   sequent)
6936     lt_cv_file_magic_cmd='/bin/file'
6937     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6938     ;;
6939   sni)
6940     lt_cv_file_magic_cmd='/bin/file'
6941     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6942     lt_cv_file_magic_test_file=/lib/libc.so
6943     ;;
6944   siemens)
6945     lt_cv_deplibs_check_method=pass_all
6946     ;;
6947   esac
6948   ;;
6949
6950 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
6951   lt_cv_deplibs_check_method=pass_all
6952   ;;
6953 esac
6954
6955 fi
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6957 $as_echo "$lt_cv_deplibs_check_method" >&6; }
6958 file_magic_cmd=$lt_cv_file_magic_cmd
6959 deplibs_check_method=$lt_cv_deplibs_check_method
6960 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6961
6962
6963
6964
6965 # If no C compiler was specified, use CC.
6966 LTCC=${LTCC-"$CC"}
6967
6968 # Allow CC to be a program name with arguments.
6969 compiler=$CC
6970
6971
6972 # Check whether --enable-libtool-lock was given.
6973 if test "${enable_libtool_lock+set}" = set; then :
6974   enableval=$enable_libtool_lock;
6975 fi
6976
6977 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6978
6979 # Some flags need to be propagated to the compiler or linker for good
6980 # libtool support.
6981 case $host in
6982 ia64-*-hpux*)
6983   # Find out which ABI we are using.
6984   echo 'int i;' > conftest.$ac_ext
6985   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6986   (eval $ac_compile) 2>&5
6987   ac_status=$?
6988   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6989   test $ac_status = 0; }; then
6990     case `/usr/bin/file conftest.$ac_objext` in
6991     *ELF-32*)
6992       HPUX_IA64_MODE="32"
6993       ;;
6994     *ELF-64*)
6995       HPUX_IA64_MODE="64"
6996       ;;
6997     esac
6998   fi
6999   rm -rf conftest*
7000   ;;
7001 *-*-irix6*)
7002   # Find out which ABI we are using.
7003   echo '#line 7001 "configure"' > conftest.$ac_ext
7004   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7005   (eval $ac_compile) 2>&5
7006   ac_status=$?
7007   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7008   test $ac_status = 0; }; then
7009    if test "$lt_cv_prog_gnu_ld" = yes; then
7010     case `/usr/bin/file conftest.$ac_objext` in
7011     *32-bit*)
7012       LD="${LD-ld} -melf32bsmip"
7013       ;;
7014     *N32*)
7015       LD="${LD-ld} -melf32bmipn32"
7016       ;;
7017     *64-bit*)
7018       LD="${LD-ld} -melf64bmip"
7019       ;;
7020     esac
7021    else
7022     case `/usr/bin/file conftest.$ac_objext` in
7023     *32-bit*)
7024       LD="${LD-ld} -32"
7025       ;;
7026     *N32*)
7027       LD="${LD-ld} -n32"
7028       ;;
7029     *64-bit*)
7030       LD="${LD-ld} -64"
7031       ;;
7032     esac
7033    fi
7034   fi
7035   rm -rf conftest*
7036   ;;
7037
7038 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
7039   # Find out which ABI we are using.
7040   echo 'int i;' > conftest.$ac_ext
7041   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7042   (eval $ac_compile) 2>&5
7043   ac_status=$?
7044   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7045   test $ac_status = 0; }; then
7046     case `/usr/bin/file conftest.o` in
7047     *32-bit*)
7048       case $host in
7049         x86_64-*linux*)
7050           LD="${LD-ld} -m elf_i386"
7051           ;;
7052         ppc64-*linux*|powerpc64-*linux*)
7053           LD="${LD-ld} -m elf32ppclinux"
7054           ;;
7055         s390x-*linux*)
7056           LD="${LD-ld} -m elf_s390"
7057           ;;
7058         sparc64-*linux*)
7059           LD="${LD-ld} -m elf32_sparc"
7060           ;;
7061       esac
7062       ;;
7063     *64-bit*)
7064       case $host in
7065         x86_64-*linux*)
7066           LD="${LD-ld} -m elf_x86_64"
7067           ;;
7068         ppc*-*linux*|powerpc*-*linux*)
7069           LD="${LD-ld} -m elf64ppc"
7070           ;;
7071         s390*-*linux*)
7072           LD="${LD-ld} -m elf64_s390"
7073           ;;
7074         sparc*-*linux*)
7075           LD="${LD-ld} -m elf64_sparc"
7076           ;;
7077       esac
7078       ;;
7079     esac
7080   fi
7081   rm -rf conftest*
7082   ;;
7083
7084 *-*-sco3.2v5*)
7085   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
7086   SAVE_CFLAGS="$CFLAGS"
7087   CFLAGS="$CFLAGS -belf"
7088   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
7089 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
7090 if test "${lt_cv_cc_needs_belf+set}" = set; then :
7091   $as_echo_n "(cached) " >&6
7092 else
7093   ac_ext=c
7094 ac_cpp='$CPP $CPPFLAGS'
7095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7098
7099      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7100 /* end confdefs.h.  */
7101
7102 int
7103 main ()
7104 {
7105
7106   ;
7107   return 0;
7108 }
7109 _ACEOF
7110 if ac_fn_c_try_link "$LINENO"; then :
7111   lt_cv_cc_needs_belf=yes
7112 else
7113   lt_cv_cc_needs_belf=no
7114 fi
7115 rm -f core conftest.err conftest.$ac_objext \
7116     conftest$ac_exeext conftest.$ac_ext
7117      ac_ext=c
7118 ac_cpp='$CPP $CPPFLAGS'
7119 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7120 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7121 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7122
7123 fi
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7125 $as_echo "$lt_cv_cc_needs_belf" >&6; }
7126   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7127     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7128     CFLAGS="$SAVE_CFLAGS"
7129   fi
7130   ;;
7131 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
7132   if test -n "$ac_tool_prefix"; then
7133   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7134 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7136 $as_echo_n "checking for $ac_word... " >&6; }
7137 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7138   $as_echo_n "(cached) " >&6
7139 else
7140   if test -n "$DLLTOOL"; then
7141   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7142 else
7143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7144 for as_dir in $PATH
7145 do
7146   IFS=$as_save_IFS
7147   test -z "$as_dir" && as_dir=.
7148     for ac_exec_ext in '' $ac_executable_extensions; do
7149   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7150     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7152     break 2
7153   fi
7154 done
7155   done
7156 IFS=$as_save_IFS
7157
7158 fi
7159 fi
7160 DLLTOOL=$ac_cv_prog_DLLTOOL
7161 if test -n "$DLLTOOL"; then
7162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7163 $as_echo "$DLLTOOL" >&6; }
7164 else
7165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7166 $as_echo "no" >&6; }
7167 fi
7168
7169
7170 fi
7171 if test -z "$ac_cv_prog_DLLTOOL"; then
7172   ac_ct_DLLTOOL=$DLLTOOL
7173   # Extract the first word of "dlltool", so it can be a program name with args.
7174 set dummy dlltool; ac_word=$2
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7176 $as_echo_n "checking for $ac_word... " >&6; }
7177 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7178   $as_echo_n "(cached) " >&6
7179 else
7180   if test -n "$ac_ct_DLLTOOL"; then
7181   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7182 else
7183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7184 for as_dir in $PATH
7185 do
7186   IFS=$as_save_IFS
7187   test -z "$as_dir" && as_dir=.
7188     for ac_exec_ext in '' $ac_executable_extensions; do
7189   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7190     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7191     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7192     break 2
7193   fi
7194 done
7195   done
7196 IFS=$as_save_IFS
7197
7198 fi
7199 fi
7200 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7201 if test -n "$ac_ct_DLLTOOL"; then
7202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7203 $as_echo "$ac_ct_DLLTOOL" >&6; }
7204 else
7205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7206 $as_echo "no" >&6; }
7207 fi
7208
7209   if test "x$ac_ct_DLLTOOL" = x; then
7210     DLLTOOL="false"
7211   else
7212     case $cross_compiling:$ac_tool_warned in
7213 yes:)
7214 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7215 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7216 ac_tool_warned=yes ;;
7217 esac
7218     DLLTOOL=$ac_ct_DLLTOOL
7219   fi
7220 else
7221   DLLTOOL="$ac_cv_prog_DLLTOOL"
7222 fi
7223
7224   if test -n "$ac_tool_prefix"; then
7225   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
7226 set dummy ${ac_tool_prefix}as; ac_word=$2
7227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7228 $as_echo_n "checking for $ac_word... " >&6; }
7229 if test "${ac_cv_prog_AS+set}" = set; then :
7230   $as_echo_n "(cached) " >&6
7231 else
7232   if test -n "$AS"; then
7233   ac_cv_prog_AS="$AS" # Let the user override the test.
7234 else
7235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7236 for as_dir in $PATH
7237 do
7238   IFS=$as_save_IFS
7239   test -z "$as_dir" && as_dir=.
7240     for ac_exec_ext in '' $ac_executable_extensions; do
7241   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7242     ac_cv_prog_AS="${ac_tool_prefix}as"
7243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7244     break 2
7245   fi
7246 done
7247   done
7248 IFS=$as_save_IFS
7249
7250 fi
7251 fi
7252 AS=$ac_cv_prog_AS
7253 if test -n "$AS"; then
7254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
7255 $as_echo "$AS" >&6; }
7256 else
7257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7258 $as_echo "no" >&6; }
7259 fi
7260
7261
7262 fi
7263 if test -z "$ac_cv_prog_AS"; then
7264   ac_ct_AS=$AS
7265   # Extract the first word of "as", so it can be a program name with args.
7266 set dummy as; ac_word=$2
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7268 $as_echo_n "checking for $ac_word... " >&6; }
7269 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
7270   $as_echo_n "(cached) " >&6
7271 else
7272   if test -n "$ac_ct_AS"; then
7273   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
7274 else
7275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7276 for as_dir in $PATH
7277 do
7278   IFS=$as_save_IFS
7279   test -z "$as_dir" && as_dir=.
7280     for ac_exec_ext in '' $ac_executable_extensions; do
7281   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7282     ac_cv_prog_ac_ct_AS="as"
7283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7284     break 2
7285   fi
7286 done
7287   done
7288 IFS=$as_save_IFS
7289
7290 fi
7291 fi
7292 ac_ct_AS=$ac_cv_prog_ac_ct_AS
7293 if test -n "$ac_ct_AS"; then
7294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
7295 $as_echo "$ac_ct_AS" >&6; }
7296 else
7297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298 $as_echo "no" >&6; }
7299 fi
7300
7301   if test "x$ac_ct_AS" = x; then
7302     AS="false"
7303   else
7304     case $cross_compiling:$ac_tool_warned in
7305 yes:)
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7307 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7308 ac_tool_warned=yes ;;
7309 esac
7310     AS=$ac_ct_AS
7311   fi
7312 else
7313   AS="$ac_cv_prog_AS"
7314 fi
7315
7316   if test -n "$ac_tool_prefix"; then
7317   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7318 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7320 $as_echo_n "checking for $ac_word... " >&6; }
7321 if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
7322   $as_echo_n "(cached) " >&6
7323 else
7324   if test -n "$OBJDUMP"; then
7325   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7326 else
7327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7328 for as_dir in $PATH
7329 do
7330   IFS=$as_save_IFS
7331   test -z "$as_dir" && as_dir=.
7332     for ac_exec_ext in '' $ac_executable_extensions; do
7333   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7334     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7336     break 2
7337   fi
7338 done
7339   done
7340 IFS=$as_save_IFS
7341
7342 fi
7343 fi
7344 OBJDUMP=$ac_cv_prog_OBJDUMP
7345 if test -n "$OBJDUMP"; then
7346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7347 $as_echo "$OBJDUMP" >&6; }
7348 else
7349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7350 $as_echo "no" >&6; }
7351 fi
7352
7353
7354 fi
7355 if test -z "$ac_cv_prog_OBJDUMP"; then
7356   ac_ct_OBJDUMP=$OBJDUMP
7357   # Extract the first word of "objdump", so it can be a program name with args.
7358 set dummy objdump; ac_word=$2
7359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7360 $as_echo_n "checking for $ac_word... " >&6; }
7361 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
7362   $as_echo_n "(cached) " >&6
7363 else
7364   if test -n "$ac_ct_OBJDUMP"; then
7365   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7366 else
7367 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7368 for as_dir in $PATH
7369 do
7370   IFS=$as_save_IFS
7371   test -z "$as_dir" && as_dir=.
7372     for ac_exec_ext in '' $ac_executable_extensions; do
7373   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7374     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7375     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7376     break 2
7377   fi
7378 done
7379   done
7380 IFS=$as_save_IFS
7381
7382 fi
7383 fi
7384 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7385 if test -n "$ac_ct_OBJDUMP"; then
7386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7387 $as_echo "$ac_ct_OBJDUMP" >&6; }
7388 else
7389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7390 $as_echo "no" >&6; }
7391 fi
7392
7393   if test "x$ac_ct_OBJDUMP" = x; then
7394     OBJDUMP="false"
7395   else
7396     case $cross_compiling:$ac_tool_warned in
7397 yes:)
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7399 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7400 ac_tool_warned=yes ;;
7401 esac
7402     OBJDUMP=$ac_ct_OBJDUMP
7403   fi
7404 else
7405   OBJDUMP="$ac_cv_prog_OBJDUMP"
7406 fi
7407
7408   ;;
7409
7410 esac
7411
7412 need_locks="$enable_libtool_lock"
7413
7414
7415 ac_ext=c
7416 ac_cpp='$CPP $CPPFLAGS'
7417 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7418 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7419 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7421 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7422 # On Suns, sometimes $CPP names a directory.
7423 if test -n "$CPP" && test -d "$CPP"; then
7424   CPP=
7425 fi
7426 if test -z "$CPP"; then
7427   if test "${ac_cv_prog_CPP+set}" = set; then :
7428   $as_echo_n "(cached) " >&6
7429 else
7430       # Double quotes because CPP needs to be expanded
7431     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7432     do
7433       ac_preproc_ok=false
7434 for ac_c_preproc_warn_flag in '' yes
7435 do
7436   # Use a header file that comes with gcc, so configuring glibc
7437   # with a fresh cross-compiler works.
7438   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7439   # <limits.h> exists even on freestanding compilers.
7440   # On the NeXT, cc -E runs the code through the compiler's parser,
7441   # not just through cpp. "Syntax error" is here to catch this case.
7442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7443 /* end confdefs.h.  */
7444 #ifdef __STDC__
7445 # include <limits.h>
7446 #else
7447 # include <assert.h>
7448 #endif
7449                      Syntax error
7450 _ACEOF
7451 if ac_fn_c_try_cpp "$LINENO"; then :
7452
7453 else
7454   # Broken: fails on valid input.
7455 continue
7456 fi
7457 rm -f conftest.err conftest.$ac_ext
7458
7459   # OK, works on sane cases.  Now check whether nonexistent headers
7460   # can be detected and how.
7461   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7462 /* end confdefs.h.  */
7463 #include <ac_nonexistent.h>
7464 _ACEOF
7465 if ac_fn_c_try_cpp "$LINENO"; then :
7466   # Broken: success on invalid input.
7467 continue
7468 else
7469   # Passes both tests.
7470 ac_preproc_ok=:
7471 break
7472 fi
7473 rm -f conftest.err conftest.$ac_ext
7474
7475 done
7476 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7477 rm -f conftest.err conftest.$ac_ext
7478 if $ac_preproc_ok; then :
7479   break
7480 fi
7481
7482     done
7483     ac_cv_prog_CPP=$CPP
7484
7485 fi
7486   CPP=$ac_cv_prog_CPP
7487 else
7488   ac_cv_prog_CPP=$CPP
7489 fi
7490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7491 $as_echo "$CPP" >&6; }
7492 ac_preproc_ok=false
7493 for ac_c_preproc_warn_flag in '' yes
7494 do
7495   # Use a header file that comes with gcc, so configuring glibc
7496   # with a fresh cross-compiler works.
7497   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7498   # <limits.h> exists even on freestanding compilers.
7499   # On the NeXT, cc -E runs the code through the compiler's parser,
7500   # not just through cpp. "Syntax error" is here to catch this case.
7501   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7502 /* end confdefs.h.  */
7503 #ifdef __STDC__
7504 # include <limits.h>
7505 #else
7506 # include <assert.h>
7507 #endif
7508                      Syntax error
7509 _ACEOF
7510 if ac_fn_c_try_cpp "$LINENO"; then :
7511
7512 else
7513   # Broken: fails on valid input.
7514 continue
7515 fi
7516 rm -f conftest.err conftest.$ac_ext
7517
7518   # OK, works on sane cases.  Now check whether nonexistent headers
7519   # can be detected and how.
7520   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7521 /* end confdefs.h.  */
7522 #include <ac_nonexistent.h>
7523 _ACEOF
7524 if ac_fn_c_try_cpp "$LINENO"; then :
7525   # Broken: success on invalid input.
7526 continue
7527 else
7528   # Passes both tests.
7529 ac_preproc_ok=:
7530 break
7531 fi
7532 rm -f conftest.err conftest.$ac_ext
7533
7534 done
7535 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7536 rm -f conftest.err conftest.$ac_ext
7537 if $ac_preproc_ok; then :
7538
7539 else
7540   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7541 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7542 as_fn_error "C preprocessor \"$CPP\" fails sanity check
7543 See \`config.log' for more details." "$LINENO" 5; }
7544 fi
7545
7546 ac_ext=c
7547 ac_cpp='$CPP $CPPFLAGS'
7548 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7549 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7550 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7551
7552
7553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7554 $as_echo_n "checking for ANSI C header files... " >&6; }
7555 if test "${ac_cv_header_stdc+set}" = set; then :
7556   $as_echo_n "(cached) " >&6
7557 else
7558   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7559 /* end confdefs.h.  */
7560 #include <stdlib.h>
7561 #include <stdarg.h>
7562 #include <string.h>
7563 #include <float.h>
7564
7565 int
7566 main ()
7567 {
7568
7569   ;
7570   return 0;
7571 }
7572 _ACEOF
7573 if ac_fn_c_try_compile "$LINENO"; then :
7574   ac_cv_header_stdc=yes
7575 else
7576   ac_cv_header_stdc=no
7577 fi
7578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7579
7580 if test $ac_cv_header_stdc = yes; then
7581   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7582   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7583 /* end confdefs.h.  */
7584 #include <string.h>
7585
7586 _ACEOF
7587 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7588   $EGREP "memchr" >/dev/null 2>&1; then :
7589
7590 else
7591   ac_cv_header_stdc=no
7592 fi
7593 rm -f conftest*
7594
7595 fi
7596
7597 if test $ac_cv_header_stdc = yes; then
7598   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7599   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7600 /* end confdefs.h.  */
7601 #include <stdlib.h>
7602
7603 _ACEOF
7604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7605   $EGREP "free" >/dev/null 2>&1; then :
7606
7607 else
7608   ac_cv_header_stdc=no
7609 fi
7610 rm -f conftest*
7611
7612 fi
7613
7614 if test $ac_cv_header_stdc = yes; then
7615   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7616   if test "$cross_compiling" = yes; then :
7617   :
7618 else
7619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7620 /* end confdefs.h.  */
7621 #include <ctype.h>
7622 #include <stdlib.h>
7623 #if ((' ' & 0x0FF) == 0x020)
7624 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7625 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7626 #else
7627 # define ISLOWER(c) \
7628                    (('a' <= (c) && (c) <= 'i') \
7629                      || ('j' <= (c) && (c) <= 'r') \
7630                      || ('s' <= (c) && (c) <= 'z'))
7631 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7632 #endif
7633
7634 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7635 int
7636 main ()
7637 {
7638   int i;
7639   for (i = 0; i < 256; i++)
7640     if (XOR (islower (i), ISLOWER (i))
7641         || toupper (i) != TOUPPER (i))
7642       return 2;
7643   return 0;
7644 }
7645 _ACEOF
7646 if ac_fn_c_try_run "$LINENO"; then :
7647
7648 else
7649   ac_cv_header_stdc=no
7650 fi
7651 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7652   conftest.$ac_objext conftest.beam conftest.$ac_ext
7653 fi
7654
7655 fi
7656 fi
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7658 $as_echo "$ac_cv_header_stdc" >&6; }
7659 if test $ac_cv_header_stdc = yes; then
7660
7661 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7662
7663 fi
7664
7665 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7666 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7667                   inttypes.h stdint.h unistd.h
7668 do :
7669   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7670 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7671 "
7672 eval as_val=\$$as_ac_Header
7673    if test "x$as_val" = x""yes; then :
7674   cat >>confdefs.h <<_ACEOF
7675 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7676 _ACEOF
7677
7678 fi
7679
7680 done
7681
7682
7683 for ac_header in dlfcn.h
7684 do :
7685   ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
7686 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
7687   cat >>confdefs.h <<_ACEOF
7688 #define HAVE_DLFCN_H 1
7689 _ACEOF
7690
7691 fi
7692
7693 done
7694
7695
7696 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
7697
7698 # find the maximum length of command line arguments
7699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7700 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7701 if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
7702   $as_echo_n "(cached) " >&6
7703 else
7704     i=0
7705   teststring="ABCD"
7706
7707   case $build_os in
7708   msdosdjgpp*)
7709     # On DJGPP, this test can blow up pretty badly due to problems in libc
7710     # (any single argument exceeding 2000 bytes causes a buffer overrun
7711     # during glob expansion).  Even if it were fixed, the result of this
7712     # check would be larger than it should be.
7713     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7714     ;;
7715
7716   gnu*)
7717     # Under GNU Hurd, this test is not required because there is
7718     # no limit to the length of command line arguments.
7719     # Libtool will interpret -1 as no limit whatsoever
7720     lt_cv_sys_max_cmd_len=-1;
7721     ;;
7722
7723   cygwin* | mingw*)
7724     # On Win9x/ME, this test blows up -- it succeeds, but takes
7725     # about 5 minutes as the teststring grows exponentially.
7726     # Worse, since 9x/ME are not pre-emptively multitasking,
7727     # you end up with a "frozen" computer, even though with patience
7728     # the test eventually succeeds (with a max line length of 256k).
7729     # Instead, let's just punt: use the minimum linelength reported by
7730     # all of the supported platforms: 8192 (on NT/2K/XP).
7731     lt_cv_sys_max_cmd_len=8192;
7732     ;;
7733
7734   amigaos*)
7735     # On AmigaOS with pdksh, this test takes hours, literally.
7736     # So we just punt and use a minimum line length of 8192.
7737     lt_cv_sys_max_cmd_len=8192;
7738     ;;
7739
7740   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7741     # This has been around since 386BSD, at least.  Likely further.
7742     if test -x /sbin/sysctl; then
7743       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7744     elif test -x /usr/sbin/sysctl; then
7745       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7746     else
7747       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7748     fi
7749     # And add a safety zone
7750     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7751     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7752     ;;
7753   osf*)
7754     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7755     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7756     # nice to cause kernel panics so lets avoid the loop below.
7757     # First set a reasonable default.
7758     lt_cv_sys_max_cmd_len=16384
7759     #
7760     if test -x /sbin/sysconfig; then
7761       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7762         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7763       esac
7764     fi
7765     ;;
7766   *)
7767     # If test is not a shell built-in, we'll probably end up computing a
7768     # maximum length that is only half of the actual maximum length, but
7769     # we can't tell.
7770     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7771     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
7772                = "XX$teststring") >/dev/null 2>&1 &&
7773             new_result=`expr "X$teststring" : ".*" 2>&1` &&
7774             lt_cv_sys_max_cmd_len=$new_result &&
7775             test $i != 17 # 1/2 MB should be enough
7776     do
7777       i=`expr $i + 1`
7778       teststring=$teststring$teststring
7779     done
7780     teststring=
7781     # Add a significant safety factor because C++ compilers can tack on massive
7782     # amounts of additional arguments before passing them to the linker.
7783     # It appears as though 1/2 is a usable value.
7784     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7785     ;;
7786   esac
7787
7788 fi
7789
7790 if test -n $lt_cv_sys_max_cmd_len ; then
7791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7792 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7793 else
7794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7795 $as_echo "none" >&6; }
7796 fi
7797
7798
7799
7800
7801 # Check for command to grab the raw symbol name followed by C symbol from nm.
7802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7803 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
7804 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
7805   $as_echo_n "(cached) " >&6
7806 else
7807
7808 # These are sane defaults that work on at least a few old systems.
7809 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
7810
7811 # Character class describing NM global symbol codes.
7812 symcode='[BCDEGRST]'
7813
7814 # Regexp to match symbols that can be accessed directly from C.
7815 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7816
7817 # Transform an extracted symbol line into a proper C declaration
7818 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
7819
7820 # Transform an extracted symbol line into symbol name and symbol address
7821 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'"
7822
7823 # Define system-specific variables.
7824 case $host_os in
7825 aix*)
7826   symcode='[BCDT]'
7827   ;;
7828 cygwin* | mingw* | pw32*)
7829   symcode='[ABCDGISTW]'
7830   ;;
7831 hpux*) # Its linker distinguishes data from code symbols
7832   if test "$host_cpu" = ia64; then
7833     symcode='[ABCDEGRST]'
7834   fi
7835   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7836   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'"
7837   ;;
7838 linux*)
7839   if test "$host_cpu" = ia64; then
7840     symcode='[ABCDGIRSTW]'
7841     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7842     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'"
7843   fi
7844   ;;
7845 irix* | nonstopux*)
7846   symcode='[BCDEGRST]'
7847   ;;
7848 osf*)
7849   symcode='[BCDEGQRST]'
7850   ;;
7851 solaris* | sysv5*)
7852   symcode='[BDRT]'
7853   ;;
7854 sysv4)
7855   symcode='[DFNSTU]'
7856   ;;
7857 esac
7858
7859 # Handle CRLF in mingw tool chain
7860 opt_cr=
7861 case $build_os in
7862 mingw*)
7863   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7864   ;;
7865 esac
7866
7867 # If we're using GNU nm, then use its standard symbol codes.
7868 case `$NM -V 2>&1` in
7869 *GNU* | *'with BFD'*)
7870   symcode='[ABCDGIRSTW]' ;;
7871 esac
7872
7873 # Try without a prefix undercore, then with it.
7874 for ac_symprfx in "" "_"; do
7875
7876   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7877   symxfrm="\\1 $ac_symprfx\\2 \\2"
7878
7879   # Write the raw and C identifiers.
7880   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7881
7882   # Check to see that the pipe works correctly.
7883   pipe_works=no
7884
7885   rm -f conftest*
7886   cat > conftest.$ac_ext <<EOF
7887 #ifdef __cplusplus
7888 extern "C" {
7889 #endif
7890 char nm_test_var;
7891 void nm_test_func(){}
7892 #ifdef __cplusplus
7893 }
7894 #endif
7895 int main(){nm_test_var='a';nm_test_func();return(0);}
7896 EOF
7897
7898   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7899   (eval $ac_compile) 2>&5
7900   ac_status=$?
7901   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7902   test $ac_status = 0; }; then
7903     # Now try to grab the symbols.
7904     nlist=conftest.nm
7905     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
7906   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
7907   ac_status=$?
7908   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7909   test $ac_status = 0; } && test -s "$nlist"; then
7910       # Try sorting and uniquifying the output.
7911       if sort "$nlist" | uniq > "$nlist"T; then
7912         mv -f "$nlist"T "$nlist"
7913       else
7914         rm -f "$nlist"T
7915       fi
7916
7917       # Make sure that we snagged all the symbols we need.
7918       if grep ' nm_test_var$' "$nlist" >/dev/null; then
7919         if grep ' nm_test_func$' "$nlist" >/dev/null; then
7920           cat <<EOF > conftest.$ac_ext
7921 #ifdef __cplusplus
7922 extern "C" {
7923 #endif
7924
7925 EOF
7926           # Now generate the symbol file.
7927           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7928
7929           cat <<EOF >> conftest.$ac_ext
7930 #if defined (__STDC__) && __STDC__
7931 # define lt_ptr_t void *
7932 #else
7933 # define lt_ptr_t char *
7934 # define const
7935 #endif
7936
7937 /* The mapping between symbol names and symbols. */
7938 const struct {
7939   const char *name;
7940   lt_ptr_t address;
7941 }
7942 lt_preloaded_symbols[] =
7943 {
7944 EOF
7945           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7946           cat <<\EOF >> conftest.$ac_ext
7947   {0, (lt_ptr_t) 0}
7948 };
7949
7950 #ifdef __cplusplus
7951 }
7952 #endif
7953 EOF
7954           # Now try linking the two files.
7955           mv conftest.$ac_objext conftstm.$ac_objext
7956           lt_save_LIBS="$LIBS"
7957           lt_save_CFLAGS="$CFLAGS"
7958           LIBS="conftstm.$ac_objext"
7959           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7960           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7961   (eval $ac_link) 2>&5
7962   ac_status=$?
7963   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7964   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7965             pipe_works=yes
7966           fi
7967           LIBS="$lt_save_LIBS"
7968           CFLAGS="$lt_save_CFLAGS"
7969         else
7970           echo "cannot find nm_test_func in $nlist" >&5
7971         fi
7972       else
7973         echo "cannot find nm_test_var in $nlist" >&5
7974       fi
7975     else
7976       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7977     fi
7978   else
7979     echo "$progname: failed program was:" >&5
7980     cat conftest.$ac_ext >&5
7981   fi
7982   rm -f conftest* conftst*
7983
7984   # Do not use the global_symbol_pipe unless it works.
7985   if test "$pipe_works" = yes; then
7986     break
7987   else
7988     lt_cv_sys_global_symbol_pipe=
7989   fi
7990 done
7991
7992 fi
7993
7994 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7995   lt_cv_sys_global_symbol_to_cdecl=
7996 fi
7997 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7999 $as_echo "failed" >&6; }
8000 else
8001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8002 $as_echo "ok" >&6; }
8003 fi
8004
8005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
8006 $as_echo_n "checking for objdir... " >&6; }
8007 if test "${lt_cv_objdir+set}" = set; then :
8008   $as_echo_n "(cached) " >&6
8009 else
8010   rm -f .libs 2>/dev/null
8011 mkdir .libs 2>/dev/null
8012 if test -d .libs; then
8013   lt_cv_objdir=.libs
8014 else
8015   # MS-DOS does not allow filenames that begin with a dot.
8016   lt_cv_objdir=_libs
8017 fi
8018 rmdir .libs 2>/dev/null
8019 fi
8020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
8021 $as_echo "$lt_cv_objdir" >&6; }
8022 objdir=$lt_cv_objdir
8023
8024
8025
8026
8027
8028 case $host_os in
8029 aix3*)
8030   # AIX sometimes has problems with the GCC collect2 program.  For some
8031   # reason, if we set the COLLECT_NAMES environment variable, the problems
8032   # vanish in a puff of smoke.
8033   if test "X${COLLECT_NAMES+set}" != Xset; then
8034     COLLECT_NAMES=
8035     export COLLECT_NAMES
8036   fi
8037   ;;
8038 esac
8039
8040 # Sed substitution that helps us do robust quoting.  It backslashifies
8041 # metacharacters that are still active within double-quoted strings.
8042 Xsed='sed -e 1s/^X//'
8043 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
8044
8045 # Same as above, but do not quote variable references.
8046 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
8047
8048 # Sed substitution to delay expansion of an escaped shell variable in a
8049 # double_quote_subst'ed string.
8050 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
8051
8052 # Sed substitution to avoid accidental globbing in evaled expressions
8053 no_glob_subst='s/\*/\\\*/g'
8054
8055 # Constants:
8056 rm="rm -f"
8057
8058 # Global variables:
8059 default_ofile=libtool
8060 can_build_shared=yes
8061
8062 # All known linkers require a `.a' archive for static linking (except MSVC,
8063 # which needs '.lib').
8064 libext=a
8065 ltmain="$ac_aux_dir/ltmain.sh"
8066 ofile="$default_ofile"
8067 with_gnu_ld="$lt_cv_prog_gnu_ld"
8068
8069 if test -n "$ac_tool_prefix"; then
8070   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8071 set dummy ${ac_tool_prefix}ar; ac_word=$2
8072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8073 $as_echo_n "checking for $ac_word... " >&6; }
8074 if test "${ac_cv_prog_AR+set}" = set; then :
8075   $as_echo_n "(cached) " >&6
8076 else
8077   if test -n "$AR"; then
8078   ac_cv_prog_AR="$AR" # Let the user override the test.
8079 else
8080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8081 for as_dir in $PATH
8082 do
8083   IFS=$as_save_IFS
8084   test -z "$as_dir" && as_dir=.
8085     for ac_exec_ext in '' $ac_executable_extensions; do
8086   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8087     ac_cv_prog_AR="${ac_tool_prefix}ar"
8088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8089     break 2
8090   fi
8091 done
8092   done
8093 IFS=$as_save_IFS
8094
8095 fi
8096 fi
8097 AR=$ac_cv_prog_AR
8098 if test -n "$AR"; then
8099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8100 $as_echo "$AR" >&6; }
8101 else
8102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8103 $as_echo "no" >&6; }
8104 fi
8105
8106
8107 fi
8108 if test -z "$ac_cv_prog_AR"; then
8109   ac_ct_AR=$AR
8110   # Extract the first word of "ar", so it can be a program name with args.
8111 set dummy ar; ac_word=$2
8112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8113 $as_echo_n "checking for $ac_word... " >&6; }
8114 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8115   $as_echo_n "(cached) " >&6
8116 else
8117   if test -n "$ac_ct_AR"; then
8118   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8119 else
8120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8121 for as_dir in $PATH
8122 do
8123   IFS=$as_save_IFS
8124   test -z "$as_dir" && as_dir=.
8125     for ac_exec_ext in '' $ac_executable_extensions; do
8126   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8127     ac_cv_prog_ac_ct_AR="ar"
8128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8129     break 2
8130   fi
8131 done
8132   done
8133 IFS=$as_save_IFS
8134
8135 fi
8136 fi
8137 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8138 if test -n "$ac_ct_AR"; then
8139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8140 $as_echo "$ac_ct_AR" >&6; }
8141 else
8142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8143 $as_echo "no" >&6; }
8144 fi
8145
8146   if test "x$ac_ct_AR" = x; then
8147     AR="false"
8148   else
8149     case $cross_compiling:$ac_tool_warned in
8150 yes:)
8151 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8152 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8153 ac_tool_warned=yes ;;
8154 esac
8155     AR=$ac_ct_AR
8156   fi
8157 else
8158   AR="$ac_cv_prog_AR"
8159 fi
8160
8161 if test -n "$ac_tool_prefix"; then
8162   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8163 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8165 $as_echo_n "checking for $ac_word... " >&6; }
8166 if test "${ac_cv_prog_RANLIB+set}" = set; then :
8167   $as_echo_n "(cached) " >&6
8168 else
8169   if test -n "$RANLIB"; then
8170   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8171 else
8172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8173 for as_dir in $PATH
8174 do
8175   IFS=$as_save_IFS
8176   test -z "$as_dir" && as_dir=.
8177     for ac_exec_ext in '' $ac_executable_extensions; do
8178   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8179     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8181     break 2
8182   fi
8183 done
8184   done
8185 IFS=$as_save_IFS
8186
8187 fi
8188 fi
8189 RANLIB=$ac_cv_prog_RANLIB
8190 if test -n "$RANLIB"; then
8191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8192 $as_echo "$RANLIB" >&6; }
8193 else
8194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8195 $as_echo "no" >&6; }
8196 fi
8197
8198
8199 fi
8200 if test -z "$ac_cv_prog_RANLIB"; then
8201   ac_ct_RANLIB=$RANLIB
8202   # Extract the first word of "ranlib", so it can be a program name with args.
8203 set dummy ranlib; ac_word=$2
8204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8205 $as_echo_n "checking for $ac_word... " >&6; }
8206 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8207   $as_echo_n "(cached) " >&6
8208 else
8209   if test -n "$ac_ct_RANLIB"; then
8210   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8211 else
8212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213 for as_dir in $PATH
8214 do
8215   IFS=$as_save_IFS
8216   test -z "$as_dir" && as_dir=.
8217     for ac_exec_ext in '' $ac_executable_extensions; do
8218   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8219     ac_cv_prog_ac_ct_RANLIB="ranlib"
8220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8221     break 2
8222   fi
8223 done
8224   done
8225 IFS=$as_save_IFS
8226
8227 fi
8228 fi
8229 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8230 if test -n "$ac_ct_RANLIB"; then
8231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8232 $as_echo "$ac_ct_RANLIB" >&6; }
8233 else
8234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8235 $as_echo "no" >&6; }
8236 fi
8237
8238   if test "x$ac_ct_RANLIB" = x; then
8239     RANLIB=":"
8240   else
8241     case $cross_compiling:$ac_tool_warned in
8242 yes:)
8243 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8244 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8245 ac_tool_warned=yes ;;
8246 esac
8247     RANLIB=$ac_ct_RANLIB
8248   fi
8249 else
8250   RANLIB="$ac_cv_prog_RANLIB"
8251 fi
8252
8253 if test -n "$ac_tool_prefix"; then
8254   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8255 set dummy ${ac_tool_prefix}strip; ac_word=$2
8256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8257 $as_echo_n "checking for $ac_word... " >&6; }
8258 if test "${ac_cv_prog_STRIP+set}" = set; then :
8259   $as_echo_n "(cached) " >&6
8260 else
8261   if test -n "$STRIP"; then
8262   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8263 else
8264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8265 for as_dir in $PATH
8266 do
8267   IFS=$as_save_IFS
8268   test -z "$as_dir" && as_dir=.
8269     for ac_exec_ext in '' $ac_executable_extensions; do
8270   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8271     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8273     break 2
8274   fi
8275 done
8276   done
8277 IFS=$as_save_IFS
8278
8279 fi
8280 fi
8281 STRIP=$ac_cv_prog_STRIP
8282 if test -n "$STRIP"; then
8283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8284 $as_echo "$STRIP" >&6; }
8285 else
8286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8287 $as_echo "no" >&6; }
8288 fi
8289
8290
8291 fi
8292 if test -z "$ac_cv_prog_STRIP"; then
8293   ac_ct_STRIP=$STRIP
8294   # Extract the first word of "strip", so it can be a program name with args.
8295 set dummy strip; ac_word=$2
8296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8297 $as_echo_n "checking for $ac_word... " >&6; }
8298 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
8299   $as_echo_n "(cached) " >&6
8300 else
8301   if test -n "$ac_ct_STRIP"; then
8302   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8303 else
8304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8305 for as_dir in $PATH
8306 do
8307   IFS=$as_save_IFS
8308   test -z "$as_dir" && as_dir=.
8309     for ac_exec_ext in '' $ac_executable_extensions; do
8310   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8311     ac_cv_prog_ac_ct_STRIP="strip"
8312     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8313     break 2
8314   fi
8315 done
8316   done
8317 IFS=$as_save_IFS
8318
8319 fi
8320 fi
8321 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8322 if test -n "$ac_ct_STRIP"; then
8323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8324 $as_echo "$ac_ct_STRIP" >&6; }
8325 else
8326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8327 $as_echo "no" >&6; }
8328 fi
8329
8330   if test "x$ac_ct_STRIP" = x; then
8331     STRIP=":"
8332   else
8333     case $cross_compiling:$ac_tool_warned in
8334 yes:)
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8336 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8337 ac_tool_warned=yes ;;
8338 esac
8339     STRIP=$ac_ct_STRIP
8340   fi
8341 else
8342   STRIP="$ac_cv_prog_STRIP"
8343 fi
8344
8345
8346 old_CC="$CC"
8347 old_CFLAGS="$CFLAGS"
8348
8349 # Set sane defaults for various variables
8350 test -z "$AR" && AR=ar
8351 test -z "$AR_FLAGS" && AR_FLAGS=cru
8352 test -z "$AS" && AS=as
8353 test -z "$CC" && CC=cc
8354 test -z "$LTCC" && LTCC=$CC
8355 test -z "$DLLTOOL" && DLLTOOL=dlltool
8356 test -z "$LD" && LD=ld
8357 test -z "$LN_S" && LN_S="ln -s"
8358 test -z "$MAGIC_CMD" && MAGIC_CMD=file
8359 test -z "$NM" && NM=nm
8360 test -z "$SED" && SED=sed
8361 test -z "$OBJDUMP" && OBJDUMP=objdump
8362 test -z "$RANLIB" && RANLIB=:
8363 test -z "$STRIP" && STRIP=:
8364 test -z "$ac_objext" && ac_objext=o
8365
8366 # Determine commands to create old-style static archives.
8367 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
8368 old_postinstall_cmds='chmod 644 $oldlib'
8369 old_postuninstall_cmds=
8370
8371 if test -n "$RANLIB"; then
8372   case $host_os in
8373   openbsd*)
8374     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
8375     ;;
8376   *)
8377     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
8378     ;;
8379   esac
8380   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
8381 fi
8382
8383 for cc_temp in $compiler""; do
8384   case $cc_temp in
8385     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8386     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8387     \-*) ;;
8388     *) break;;
8389   esac
8390 done
8391 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8392
8393
8394 # Only perform the check for file, if the check method requires it
8395 case $deplibs_check_method in
8396 file_magic*)
8397   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8398     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
8399 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8400 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8401   $as_echo_n "(cached) " >&6
8402 else
8403   case $MAGIC_CMD in
8404 [\\/*] |  ?:[\\/]*)
8405   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8406   ;;
8407 *)
8408   lt_save_MAGIC_CMD="$MAGIC_CMD"
8409   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8410   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8411   for ac_dir in $ac_dummy; do
8412     IFS="$lt_save_ifs"
8413     test -z "$ac_dir" && ac_dir=.
8414     if test -f $ac_dir/${ac_tool_prefix}file; then
8415       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8416       if test -n "$file_magic_test_file"; then
8417         case $deplibs_check_method in
8418         "file_magic "*)
8419           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8420           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8421           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8422             $EGREP "$file_magic_regex" > /dev/null; then
8423             :
8424           else
8425             cat <<EOF 1>&2
8426
8427 *** Warning: the command libtool uses to detect shared libraries,
8428 *** $file_magic_cmd, produces output that libtool cannot recognize.
8429 *** The result is that libtool may fail to recognize shared libraries
8430 *** as such.  This will affect the creation of libtool libraries that
8431 *** depend on shared libraries, but programs linked with such libtool
8432 *** libraries will work regardless of this problem.  Nevertheless, you
8433 *** may want to report the problem to your system manager and/or to
8434 *** bug-libtool@gnu.org
8435
8436 EOF
8437           fi ;;
8438         esac
8439       fi
8440       break
8441     fi
8442   done
8443   IFS="$lt_save_ifs"
8444   MAGIC_CMD="$lt_save_MAGIC_CMD"
8445   ;;
8446 esac
8447 fi
8448
8449 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8450 if test -n "$MAGIC_CMD"; then
8451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8452 $as_echo "$MAGIC_CMD" >&6; }
8453 else
8454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8455 $as_echo "no" >&6; }
8456 fi
8457
8458 if test -z "$lt_cv_path_MAGIC_CMD"; then
8459   if test -n "$ac_tool_prefix"; then
8460     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
8461 $as_echo_n "checking for file... " >&6; }
8462 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8463   $as_echo_n "(cached) " >&6
8464 else
8465   case $MAGIC_CMD in
8466 [\\/*] |  ?:[\\/]*)
8467   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8468   ;;
8469 *)
8470   lt_save_MAGIC_CMD="$MAGIC_CMD"
8471   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8472   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8473   for ac_dir in $ac_dummy; do
8474     IFS="$lt_save_ifs"
8475     test -z "$ac_dir" && ac_dir=.
8476     if test -f $ac_dir/file; then
8477       lt_cv_path_MAGIC_CMD="$ac_dir/file"
8478       if test -n "$file_magic_test_file"; then
8479         case $deplibs_check_method in
8480         "file_magic "*)
8481           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8482           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8483           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8484             $EGREP "$file_magic_regex" > /dev/null; then
8485             :
8486           else
8487             cat <<EOF 1>&2
8488
8489 *** Warning: the command libtool uses to detect shared libraries,
8490 *** $file_magic_cmd, produces output that libtool cannot recognize.
8491 *** The result is that libtool may fail to recognize shared libraries
8492 *** as such.  This will affect the creation of libtool libraries that
8493 *** depend on shared libraries, but programs linked with such libtool
8494 *** libraries will work regardless of this problem.  Nevertheless, you
8495 *** may want to report the problem to your system manager and/or to
8496 *** bug-libtool@gnu.org
8497
8498 EOF
8499           fi ;;
8500         esac
8501       fi
8502       break
8503     fi
8504   done
8505   IFS="$lt_save_ifs"
8506   MAGIC_CMD="$lt_save_MAGIC_CMD"
8507   ;;
8508 esac
8509 fi
8510
8511 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8512 if test -n "$MAGIC_CMD"; then
8513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8514 $as_echo "$MAGIC_CMD" >&6; }
8515 else
8516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8517 $as_echo "no" >&6; }
8518 fi
8519
8520   else
8521     MAGIC_CMD=:
8522   fi
8523 fi
8524
8525   fi
8526   ;;
8527 esac
8528
8529 enable_dlopen=yes
8530 enable_win32_dll=yes
8531
8532 # Check whether --enable-libtool-lock was given.
8533 if test "${enable_libtool_lock+set}" = set; then :
8534   enableval=$enable_libtool_lock;
8535 fi
8536
8537 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
8538
8539
8540 # Check whether --with-pic was given.
8541 if test "${with_pic+set}" = set; then :
8542   withval=$with_pic; pic_mode="$withval"
8543 else
8544   pic_mode=default
8545 fi
8546
8547 test -z "$pic_mode" && pic_mode=default
8548
8549 # Use C for the default configuration in the libtool script
8550 tagname=
8551 lt_save_CC="$CC"
8552 ac_ext=c
8553 ac_cpp='$CPP $CPPFLAGS'
8554 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8555 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8556 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8557
8558
8559 # Source file extension for C test sources.
8560 ac_ext=c
8561
8562 # Object file extension for compiled C test sources.
8563 objext=o
8564 objext=$objext
8565
8566 # Code to be used in simple compile tests
8567 lt_simple_compile_test_code="int some_variable = 0;\n"
8568
8569 # Code to be used in simple link tests
8570 lt_simple_link_test_code='int main(){return(0);}\n'
8571
8572
8573 # If no C compiler was specified, use CC.
8574 LTCC=${LTCC-"$CC"}
8575
8576 # Allow CC to be a program name with arguments.
8577 compiler=$CC
8578
8579
8580 # save warnings/boilerplate of simple test code
8581 ac_outfile=conftest.$ac_objext
8582 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
8583 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8584 _lt_compiler_boilerplate=`cat conftest.err`
8585 $rm conftest*
8586
8587 ac_outfile=conftest.$ac_objext
8588 printf "$lt_simple_link_test_code" >conftest.$ac_ext
8589 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8590 _lt_linker_boilerplate=`cat conftest.err`
8591 $rm conftest*
8592
8593
8594 #
8595 # Check for any special shared library compilation flags.
8596 #
8597 lt_prog_cc_shlib=
8598 if test "$GCC" = no; then
8599   case $host_os in
8600   sco3.2v5*)
8601     lt_prog_cc_shlib='-belf'
8602     ;;
8603   esac
8604 fi
8605 if test -n "$lt_prog_cc_shlib"; then
8606   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
8607 $as_echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
8608   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
8609   else
8610     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
8611 $as_echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
8612     lt_cv_prog_cc_can_build_shared=no
8613   fi
8614 fi
8615
8616
8617 #
8618 # Check to make sure the static flag actually works.
8619 #
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_prog_compiler_static works" >&5
8621 $as_echo_n "checking if $compiler static flag $lt_prog_compiler_static works... " >&6; }
8622 if test "${lt_prog_compiler_static_works+set}" = set; then :
8623   $as_echo_n "(cached) " >&6
8624 else
8625   lt_prog_compiler_static_works=no
8626    save_LDFLAGS="$LDFLAGS"
8627    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
8628    printf "$lt_simple_link_test_code" > conftest.$ac_ext
8629    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8630      # The linker can only warn and ignore the option if not recognized
8631      # So say no if there are warnings
8632      if test -s conftest.err; then
8633        # Append any errors to the config.log.
8634        cat conftest.err 1>&5
8635        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
8636        $SED '/^$/d' conftest.err >conftest.er2
8637        if diff conftest.exp conftest.er2 >/dev/null; then
8638          lt_prog_compiler_static_works=yes
8639        fi
8640      else
8641        lt_prog_compiler_static_works=yes
8642      fi
8643    fi
8644    $rm conftest*
8645    LDFLAGS="$save_LDFLAGS"
8646
8647 fi
8648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_static_works" >&5
8649 $as_echo "$lt_prog_compiler_static_works" >&6; }
8650
8651 if test x"$lt_prog_compiler_static_works" = xyes; then
8652     :
8653 else
8654     lt_prog_compiler_static=
8655 fi
8656
8657
8658
8659
8660 lt_prog_compiler_no_builtin_flag=
8661
8662 if test "$GCC" = yes; then
8663   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
8664
8665
8666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
8667 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
8668 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
8669   $as_echo_n "(cached) " >&6
8670 else
8671   lt_cv_prog_compiler_rtti_exceptions=no
8672   ac_outfile=conftest.$ac_objext
8673    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8674    lt_compiler_flag="-fno-rtti -fno-exceptions"
8675    # Insert the option either (1) after the last *FLAGS variable, or
8676    # (2) before a word containing "conftest.", or (3) at the end.
8677    # Note that $ac_compile itself does not contain backslashes and begins
8678    # with a dollar sign (not a hyphen), so the echo should work correctly.
8679    # The option is referenced via a variable to avoid confusing sed.
8680    lt_compile=`echo "$ac_compile" | $SED \
8681    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8682    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8683    -e 's:$: $lt_compiler_flag:'`
8684    (eval echo "\"\$as_me:8682: $lt_compile\"" >&5)
8685    (eval "$lt_compile" 2>conftest.err)
8686    ac_status=$?
8687    cat conftest.err >&5
8688    echo "$as_me:8686: \$? = $ac_status" >&5
8689    if (exit $ac_status) && test -s "$ac_outfile"; then
8690      # The compiler can only warn and ignore the option if not recognized
8691      # So say no if there are warnings other than the usual output.
8692      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8693      $SED '/^$/d' conftest.err >conftest.er2
8694      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8695        lt_cv_prog_compiler_rtti_exceptions=yes
8696      fi
8697    fi
8698    $rm conftest*
8699
8700 fi
8701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
8702 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
8703
8704 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
8705     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
8706 else
8707     :
8708 fi
8709
8710 fi
8711
8712 lt_prog_compiler_wl=
8713 lt_prog_compiler_pic=
8714 lt_prog_compiler_static=
8715
8716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8717 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8718
8719   if test "$GCC" = yes; then
8720     lt_prog_compiler_wl='-Wl,'
8721     lt_prog_compiler_static='-static'
8722
8723     case $host_os in
8724       aix*)
8725       # All AIX code is PIC.
8726       if test "$host_cpu" = ia64; then
8727         # AIX 5 now supports IA64 processor
8728         lt_prog_compiler_static='-Bstatic'
8729       fi
8730       ;;
8731
8732     amigaos*)
8733       # FIXME: we need at least 68020 code to build shared libraries, but
8734       # adding the `-m68020' flag to GCC prevents building anything better,
8735       # like `-m68040'.
8736       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
8737       ;;
8738
8739     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8740       # PIC is the default for these OSes.
8741       ;;
8742
8743     mingw* | pw32* | os2*)
8744       # This hack is so that the source file can tell whether it is being
8745       # built for inclusion in a dll (and should export symbols for example).
8746       lt_prog_compiler_pic='-DDLL_EXPORT'
8747       ;;
8748
8749     darwin* | rhapsody*)
8750       # PIC is the default on this platform
8751       # Common symbols not allowed in MH_DYLIB files
8752       lt_prog_compiler_pic='-fno-common'
8753       ;;
8754
8755     msdosdjgpp*)
8756       # Just because we use GCC doesn't mean we suddenly get shared libraries
8757       # on systems that don't support them.
8758       lt_prog_compiler_can_build_shared=no
8759       enable_shared=no
8760       ;;
8761
8762     sysv4*MP*)
8763       if test -d /usr/nec; then
8764         lt_prog_compiler_pic=-Kconform_pic
8765       fi
8766       ;;
8767
8768     hpux*)
8769       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8770       # not for PA HP-UX.
8771       case $host_cpu in
8772       hppa*64*|ia64*)
8773         # +Z the default
8774         ;;
8775       *)
8776         lt_prog_compiler_pic='-fPIC'
8777         ;;
8778       esac
8779       ;;
8780
8781     *)
8782       lt_prog_compiler_pic='-fPIC'
8783       ;;
8784     esac
8785   else
8786     # PORTME Check for flag to pass linker flags through the system compiler.
8787     case $host_os in
8788     aix*)
8789       lt_prog_compiler_wl='-Wl,'
8790       if test "$host_cpu" = ia64; then
8791         # AIX 5 now supports IA64 processor
8792         lt_prog_compiler_static='-Bstatic'
8793       else
8794         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
8795       fi
8796       ;;
8797       darwin*)
8798         # PIC is the default on this platform
8799         # Common symbols not allowed in MH_DYLIB files
8800        case $cc_basename in
8801          xlc*)
8802          lt_prog_compiler_pic='-qnocommon'
8803          lt_prog_compiler_wl='-Wl,'
8804          ;;
8805        esac
8806        ;;
8807
8808     mingw* | pw32* | os2*)
8809       # This hack is so that the source file can tell whether it is being
8810       # built for inclusion in a dll (and should export symbols for example).
8811       lt_prog_compiler_pic='-DDLL_EXPORT'
8812       ;;
8813
8814     hpux9* | hpux10* | hpux11*)
8815       lt_prog_compiler_wl='-Wl,'
8816       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8817       # not for PA HP-UX.
8818       case $host_cpu in
8819       hppa*64*|ia64*)
8820         # +Z the default
8821         ;;
8822       *)
8823         lt_prog_compiler_pic='+Z'
8824         ;;
8825       esac
8826       # Is there a better lt_prog_compiler_static that works with the bundled CC?
8827       lt_prog_compiler_static='${wl}-a ${wl}archive'
8828       ;;
8829
8830     irix5* | irix6* | nonstopux*)
8831       lt_prog_compiler_wl='-Wl,'
8832       # PIC (with -KPIC) is the default.
8833       lt_prog_compiler_static='-non_shared'
8834       ;;
8835
8836     newsos6)
8837       lt_prog_compiler_pic='-KPIC'
8838       lt_prog_compiler_static='-Bstatic'
8839       ;;
8840
8841     linux*)
8842       case $cc_basename in
8843       icc* | ecc*)
8844         lt_prog_compiler_wl='-Wl,'
8845         lt_prog_compiler_pic='-KPIC'
8846         lt_prog_compiler_static='-static'
8847         ;;
8848       pgcc* | pgf77* | pgf90* | pgf95*)
8849         # Portland Group compilers (*not* the Pentium gcc compiler,
8850         # which looks to be a dead project)
8851         lt_prog_compiler_wl='-Wl,'
8852         lt_prog_compiler_pic='-fpic'
8853         lt_prog_compiler_static='-Bstatic'
8854         ;;
8855       ccc*)
8856         lt_prog_compiler_wl='-Wl,'
8857         # All Alpha code is PIC.
8858         lt_prog_compiler_static='-non_shared'
8859         ;;
8860       esac
8861       ;;
8862
8863     osf3* | osf4* | osf5*)
8864       lt_prog_compiler_wl='-Wl,'
8865       # All OSF/1 code is PIC.
8866       lt_prog_compiler_static='-non_shared'
8867       ;;
8868
8869     sco3.2v5*)
8870       lt_prog_compiler_pic='-Kpic'
8871       lt_prog_compiler_static='-dn'
8872       ;;
8873
8874     solaris*)
8875       lt_prog_compiler_pic='-KPIC'
8876       lt_prog_compiler_static='-Bstatic'
8877       case $cc_basename in
8878       f77* | f90* | f95*)
8879         lt_prog_compiler_wl='-Qoption ld ';;
8880       *)
8881         lt_prog_compiler_wl='-Wl,';;
8882       esac
8883       ;;
8884
8885     sunos4*)
8886       lt_prog_compiler_wl='-Qoption ld '
8887       lt_prog_compiler_pic='-PIC'
8888       lt_prog_compiler_static='-Bstatic'
8889       ;;
8890
8891     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8892       lt_prog_compiler_wl='-Wl,'
8893       lt_prog_compiler_pic='-KPIC'
8894       lt_prog_compiler_static='-Bstatic'
8895       ;;
8896
8897     sysv4*MP*)
8898       if test -d /usr/nec ;then
8899         lt_prog_compiler_pic='-Kconform_pic'
8900         lt_prog_compiler_static='-Bstatic'
8901       fi
8902       ;;
8903
8904     unicos*)
8905       lt_prog_compiler_wl='-Wl,'
8906       lt_prog_compiler_can_build_shared=no
8907       ;;
8908
8909     uts4*)
8910       lt_prog_compiler_pic='-pic'
8911       lt_prog_compiler_static='-Bstatic'
8912       ;;
8913
8914     *)
8915       lt_prog_compiler_can_build_shared=no
8916       ;;
8917     esac
8918   fi
8919
8920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
8921 $as_echo "$lt_prog_compiler_pic" >&6; }
8922
8923 #
8924 # Check to make sure the PIC flag actually works.
8925 #
8926 if test -n "$lt_prog_compiler_pic"; then
8927
8928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8929 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
8930 if test "${lt_prog_compiler_pic_works+set}" = set; then :
8931   $as_echo_n "(cached) " >&6
8932 else
8933   lt_prog_compiler_pic_works=no
8934   ac_outfile=conftest.$ac_objext
8935    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8936    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8937    # Insert the option either (1) after the last *FLAGS variable, or
8938    # (2) before a word containing "conftest.", or (3) at the end.
8939    # Note that $ac_compile itself does not contain backslashes and begins
8940    # with a dollar sign (not a hyphen), so the echo should work correctly.
8941    # The option is referenced via a variable to avoid confusing sed.
8942    lt_compile=`echo "$ac_compile" | $SED \
8943    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8944    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8945    -e 's:$: $lt_compiler_flag:'`
8946    (eval echo "\"\$as_me:8944: $lt_compile\"" >&5)
8947    (eval "$lt_compile" 2>conftest.err)
8948    ac_status=$?
8949    cat conftest.err >&5
8950    echo "$as_me:8948: \$? = $ac_status" >&5
8951    if (exit $ac_status) && test -s "$ac_outfile"; then
8952      # The compiler can only warn and ignore the option if not recognized
8953      # So say no if there are warnings other than the usual output.
8954      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8955      $SED '/^$/d' conftest.err >conftest.er2
8956      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8957        lt_prog_compiler_pic_works=yes
8958      fi
8959    fi
8960    $rm conftest*
8961
8962 fi
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_works" >&5
8964 $as_echo "$lt_prog_compiler_pic_works" >&6; }
8965
8966 if test x"$lt_prog_compiler_pic_works" = xyes; then
8967     case $lt_prog_compiler_pic in
8968      "" | " "*) ;;
8969      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8970      esac
8971 else
8972     lt_prog_compiler_pic=
8973      lt_prog_compiler_can_build_shared=no
8974 fi
8975
8976 fi
8977 case $host_os in
8978   # For platforms which do not support PIC, -DPIC is meaningless:
8979   *djgpp*)
8980     lt_prog_compiler_pic=
8981     ;;
8982   *)
8983     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8984     ;;
8985 esac
8986
8987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8988 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8989 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8990   $as_echo_n "(cached) " >&6
8991 else
8992   lt_cv_prog_compiler_c_o=no
8993    $rm -r conftest 2>/dev/null
8994    mkdir conftest
8995    cd conftest
8996    mkdir out
8997    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8998
8999    lt_compiler_flag="-o out/conftest2.$ac_objext"
9000    # Insert the option either (1) after the last *FLAGS variable, or
9001    # (2) before a word containing "conftest.", or (3) at the end.
9002    # Note that $ac_compile itself does not contain backslashes and begins
9003    # with a dollar sign (not a hyphen), so the echo should work correctly.
9004    lt_compile=`echo "$ac_compile" | $SED \
9005    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9006    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9007    -e 's:$: $lt_compiler_flag:'`
9008    (eval echo "\"\$as_me:9006: $lt_compile\"" >&5)
9009    (eval "$lt_compile" 2>out/conftest.err)
9010    ac_status=$?
9011    cat out/conftest.err >&5
9012    echo "$as_me:9010: \$? = $ac_status" >&5
9013    if (exit $ac_status) && test -s out/conftest2.$ac_objext
9014    then
9015      # The compiler can only warn and ignore the option if not recognized
9016      # So say no if there are warnings
9017      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
9018      $SED '/^$/d' out/conftest.err >out/conftest.er2
9019      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9020        lt_cv_prog_compiler_c_o=yes
9021      fi
9022    fi
9023    chmod u+w . 2>&5
9024    $rm conftest*
9025    # SGI C++ compiler will create directory out/ii_files/ for
9026    # template instantiation
9027    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
9028    $rm out/* && rmdir out
9029    cd ..
9030    rmdir conftest
9031    $rm conftest*
9032
9033 fi
9034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
9035 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
9036
9037
9038 hard_links="nottested"
9039 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
9040   # do not overwrite the value of need_locks provided by the user
9041   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
9042 $as_echo_n "checking if we can lock with hard links... " >&6; }
9043   hard_links=yes
9044   $rm conftest*
9045   ln conftest.a conftest.b 2>/dev/null && hard_links=no
9046   touch conftest.a
9047   ln conftest.a conftest.b 2>&5 || hard_links=no
9048   ln conftest.a conftest.b 2>/dev/null && hard_links=no
9049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
9050 $as_echo "$hard_links" >&6; }
9051   if test "$hard_links" = no; then
9052     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
9053 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
9054     need_locks=warn
9055   fi
9056 else
9057   need_locks=no
9058 fi
9059
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
9061 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
9062
9063   runpath_var=
9064   allow_undefined_flag=
9065   enable_shared_with_static_runtimes=no
9066   archive_cmds=
9067   archive_expsym_cmds=
9068   old_archive_From_new_cmds=
9069   old_archive_from_expsyms_cmds=
9070   export_dynamic_flag_spec=
9071   whole_archive_flag_spec=
9072   thread_safe_flag_spec=
9073   hardcode_libdir_flag_spec=
9074   hardcode_libdir_flag_spec_ld=
9075   hardcode_libdir_separator=
9076   hardcode_direct=no
9077   hardcode_minus_L=no
9078   hardcode_shlibpath_var=unsupported
9079   link_all_deplibs=unknown
9080   hardcode_automatic=no
9081   module_cmds=
9082   module_expsym_cmds=
9083   always_export_symbols=no
9084   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
9085   # include_expsyms should be a list of space-separated symbols to be *always*
9086   # included in the symbol list
9087   include_expsyms=
9088   # exclude_expsyms can be an extended regexp of symbols to exclude
9089   # it will be wrapped by ` (' and `)$', so one must not match beginning or
9090   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9091   # as well as any symbol that contains `d'.
9092   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
9093   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9094   # platforms (ab)use it in PIC code, but their linkers get confused if
9095   # the symbol is explicitly referenced.  Since portable code cannot
9096   # rely on this symbol name, it's probably fine to never include it in
9097   # preloaded symbol tables.
9098   extract_expsyms_cmds=
9099   # Just being paranoid about ensuring that cc_basename is set.
9100   for cc_temp in $compiler""; do
9101   case $cc_temp in
9102     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9103     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9104     \-*) ;;
9105     *) break;;
9106   esac
9107 done
9108 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
9109
9110   case $host_os in
9111   cygwin* | mingw* | pw32*)
9112     # FIXME: the MSVC++ port hasn't been tested in a loooong time
9113     # When not using gcc, we currently assume that we are using
9114     # Microsoft Visual C++.
9115     if test "$GCC" != yes; then
9116       with_gnu_ld=no
9117     fi
9118     ;;
9119   openbsd*)
9120     with_gnu_ld=no
9121     ;;
9122   esac
9123
9124   ld_shlibs=yes
9125   if test "$with_gnu_ld" = yes; then
9126     # If archive_cmds runs LD, not CC, wlarc should be empty
9127     wlarc='${wl}'
9128
9129     # Set some defaults for GNU ld with shared library support. These
9130     # are reset later if shared libraries are not supported. Putting them
9131     # here allows them to be overridden if necessary.
9132     runpath_var=LD_RUN_PATH
9133     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
9134     export_dynamic_flag_spec='${wl}--export-dynamic'
9135     # ancient GNU ld didn't support --whole-archive et. al.
9136     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
9137         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9138       else
9139         whole_archive_flag_spec=
9140     fi
9141     supports_anon_versioning=no
9142     case `$LD -v 2>/dev/null` in
9143       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9144       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9145       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9146       *\ 2.11.*) ;; # other 2.11 versions
9147       *) supports_anon_versioning=yes ;;
9148     esac
9149
9150     # See if GNU ld supports shared libraries.
9151     case $host_os in
9152     aix3* | aix4* | aix5*)
9153       # On AIX/PPC, the GNU linker is very broken
9154       if test "$host_cpu" != ia64; then
9155         ld_shlibs=no
9156         cat <<EOF 1>&2
9157
9158 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
9159 *** to be unable to reliably create shared libraries on AIX.
9160 *** Therefore, libtool is disabling shared libraries support.  If you
9161 *** really care for shared libraries, you may want to modify your PATH
9162 *** so that a non-GNU linker is found, and then restart.
9163
9164 EOF
9165       fi
9166       ;;
9167
9168     amigaos*)
9169       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)'
9170       hardcode_libdir_flag_spec='-L$libdir'
9171       hardcode_minus_L=yes
9172
9173       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9174       # that the semantics of dynamic libraries on AmigaOS, at least up
9175       # to version 4, is to share data among multiple programs linked
9176       # with the same dynamic library.  Since this doesn't match the
9177       # behavior of shared libraries on other platforms, we can't use
9178       # them.
9179       ld_shlibs=no
9180       ;;
9181
9182     beos*)
9183       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9184         allow_undefined_flag=unsupported
9185         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9186         # support --undefined.  This deserves some investigation.  FIXME
9187         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9188       else
9189         ld_shlibs=no
9190       fi
9191       ;;
9192
9193     cygwin* | mingw* | pw32*)
9194       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9195       # as there is no search path for DLLs.
9196       hardcode_libdir_flag_spec='-L$libdir'
9197       allow_undefined_flag=unsupported
9198       always_export_symbols=no
9199       enable_shared_with_static_runtimes=yes
9200       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
9201
9202       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
9203         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
9204         # If the export-symbols file already is a .def file (1st line
9205         # is EXPORTS), use it as is; otherwise, prepend...
9206         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9207           cp $export_symbols $output_objdir/$soname.def;
9208         else
9209           echo EXPORTS > $output_objdir/$soname.def;
9210           cat $export_symbols >> $output_objdir/$soname.def;
9211         fi~
9212         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
9213       else
9214         ld_shlibs=no
9215       fi
9216       ;;
9217
9218     linux*)
9219       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9220         tmp_addflag=
9221         case $cc_basename,$host_cpu in
9222         pgcc*)                          # Portland Group C compiler
9223           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'
9224           tmp_addflag=' $pic_flag'
9225           ;;
9226         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
9227           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'
9228           tmp_addflag=' $pic_flag -Mnomain' ;;
9229         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
9230           tmp_addflag=' -i_dynamic' ;;
9231         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
9232           tmp_addflag=' -i_dynamic -nofor_main' ;;
9233         ifc* | ifort*)                  # Intel Fortran compiler
9234           tmp_addflag=' -nofor_main' ;;
9235         esac
9236         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9237
9238         if test $supports_anon_versioning = yes; then
9239           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
9240   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9241   $echo "local: *; };" >> $output_objdir/$libname.ver~
9242           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9243         fi
9244       else
9245         ld_shlibs=no
9246       fi
9247       ;;
9248
9249     netbsd*)
9250       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9251         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9252         wlarc=
9253       else
9254         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9255         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9256       fi
9257       ;;
9258
9259     solaris* | sysv5*)
9260       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
9261         ld_shlibs=no
9262         cat <<EOF 1>&2
9263
9264 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
9265 *** create shared libraries on Solaris systems.  Therefore, libtool
9266 *** is disabling shared libraries support.  We urge you to upgrade GNU
9267 *** binutils to release 2.9.1 or newer.  Another option is to modify
9268 *** your PATH or compiler configuration so that the native linker is
9269 *** used, and then restart.
9270
9271 EOF
9272       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9273         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9274         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9275       else
9276         ld_shlibs=no
9277       fi
9278       ;;
9279
9280     sunos4*)
9281       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9282       wlarc=
9283       hardcode_direct=yes
9284       hardcode_shlibpath_var=no
9285       ;;
9286
9287     *)
9288       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9289         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9290         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9291       else
9292         ld_shlibs=no
9293       fi
9294       ;;
9295     esac
9296
9297     if test "$ld_shlibs" = no; then
9298       runpath_var=
9299       hardcode_libdir_flag_spec=
9300       export_dynamic_flag_spec=
9301       whole_archive_flag_spec=
9302     fi
9303   else
9304     # PORTME fill in a description of your system's linker (not GNU ld)
9305     case $host_os in
9306     aix3*)
9307       allow_undefined_flag=unsupported
9308       always_export_symbols=yes
9309       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'
9310       # Note: this linker hardcodes the directories in LIBPATH if there
9311       # are no directories specified by -L.
9312       hardcode_minus_L=yes
9313       if test "$GCC" = yes && test -z "$link_static_flag"; then
9314         # Neither direct hardcoding nor static linking is supported with a
9315         # broken collect2.
9316         hardcode_direct=unsupported
9317       fi
9318       ;;
9319
9320     aix4* | aix5*)
9321       if test "$host_cpu" = ia64; then
9322         # On IA64, the linker does run time linking by default, so we don't
9323         # have to do anything special.
9324         aix_use_runtimelinking=no
9325         exp_sym_flag='-Bexport'
9326         no_entry_flag=""
9327       else
9328         # If we're using GNU nm, then we don't want the "-C" option.
9329         # -C means demangle to AIX nm, but means don't demangle with GNU nm
9330         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
9331           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'
9332         else
9333           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'
9334         fi
9335         aix_use_runtimelinking=no
9336
9337         # Test if we are trying to use run time linking or normal
9338         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9339         # need to do runtime linking.
9340         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
9341           for ld_flag in $LDFLAGS; do
9342           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
9343             aix_use_runtimelinking=yes
9344             break
9345           fi
9346           done
9347         esac
9348
9349         exp_sym_flag='-bexport'
9350         no_entry_flag='-bnoentry'
9351       fi
9352
9353       # When large executables or shared objects are built, AIX ld can
9354       # have problems creating the table of contents.  If linking a library
9355       # or program results in "error TOC overflow" add -mminimal-toc to
9356       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9357       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9358
9359       archive_cmds=''
9360       hardcode_direct=yes
9361       hardcode_libdir_separator=':'
9362       link_all_deplibs=yes
9363
9364       if test "$GCC" = yes; then
9365         case $host_os in aix4.[012]|aix4.[012].*)
9366         # We only want to do this on AIX 4.2 and lower, the check
9367         # below for broken collect2 doesn't work under 4.3+
9368           collect2name=`${CC} -print-prog-name=collect2`
9369           if test -f "$collect2name" && \
9370            strings "$collect2name" | grep resolve_lib_name >/dev/null
9371           then
9372           # We have reworked collect2
9373           hardcode_direct=yes
9374           else
9375           # We have old collect2
9376           hardcode_direct=unsupported
9377           # It fails to find uninstalled libraries when the uninstalled
9378           # path is not listed in the libpath.  Setting hardcode_minus_L
9379           # to unsupported forces relinking
9380           hardcode_minus_L=yes
9381           hardcode_libdir_flag_spec='-L$libdir'
9382           hardcode_libdir_separator=
9383           fi
9384         esac
9385         shared_flag='-shared'
9386         if test "$aix_use_runtimelinking" = yes; then
9387           shared_flag="$shared_flag "'${wl}-G'
9388         fi
9389       else
9390         # not using gcc
9391         if test "$host_cpu" = ia64; then
9392         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9393         # chokes on -Wl,-G. The following line is correct:
9394           shared_flag='-G'
9395         else
9396         if test "$aix_use_runtimelinking" = yes; then
9397             shared_flag='${wl}-G'
9398           else
9399             shared_flag='${wl}-bM:SRE'
9400         fi
9401         fi
9402       fi
9403
9404       # It seems that -bexpall does not export symbols beginning with
9405       # underscore (_), so it is better to generate a list of symbols to export.
9406       always_export_symbols=yes
9407       if test "$aix_use_runtimelinking" = yes; then
9408         # Warning - without using the other runtime loading flags (-brtl),
9409         # -berok will link without error, but may produce a broken library.
9410         allow_undefined_flag='-berok'
9411        # Determine the default libpath from the value encoded in an empty executable.
9412        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9413 /* end confdefs.h.  */
9414
9415 int
9416 main ()
9417 {
9418
9419   ;
9420   return 0;
9421 }
9422 _ACEOF
9423 if ac_fn_c_try_link "$LINENO"; then :
9424
9425 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9426 }'`
9427 # Check for a 64-bit object if we didn't find anything.
9428 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; }
9429 }'`; fi
9430 fi
9431 rm -f core conftest.err conftest.$ac_objext \
9432     conftest$ac_exeext conftest.$ac_ext
9433 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9434
9435        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9436         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"
9437        else
9438         if test "$host_cpu" = ia64; then
9439           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
9440           allow_undefined_flag="-z nodefs"
9441           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"
9442         else
9443          # Determine the default libpath from the value encoded in an empty executable.
9444          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9445 /* end confdefs.h.  */
9446
9447 int
9448 main ()
9449 {
9450
9451   ;
9452   return 0;
9453 }
9454 _ACEOF
9455 if ac_fn_c_try_link "$LINENO"; then :
9456
9457 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9458 }'`
9459 # Check for a 64-bit object if we didn't find anything.
9460 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; }
9461 }'`; fi
9462 fi
9463 rm -f core conftest.err conftest.$ac_objext \
9464     conftest$ac_exeext conftest.$ac_ext
9465 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9466
9467          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9468           # Warning - without using the other run time loading flags,
9469           # -berok will link without error, but may produce a broken library.
9470           no_undefined_flag=' ${wl}-bernotok'
9471           allow_undefined_flag=' ${wl}-berok'
9472           # -bexpall does not export symbols beginning with underscore (_)
9473           always_export_symbols=yes
9474           # Exported symbols can be pulled into shared objects from archives
9475           whole_archive_flag_spec=' '
9476           archive_cmds_need_lc=yes
9477           # This is similar to how AIX traditionally builds its shared libraries.
9478           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'
9479         fi
9480       fi
9481       ;;
9482
9483     amigaos*)
9484       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)'
9485       hardcode_libdir_flag_spec='-L$libdir'
9486       hardcode_minus_L=yes
9487       # see comment about different semantics on the GNU ld section
9488       ld_shlibs=no
9489       ;;
9490
9491     bsdi[45]*)
9492       export_dynamic_flag_spec=-rdynamic
9493       ;;
9494
9495     cygwin* | mingw* | pw32*)
9496       # When not using gcc, we currently assume that we are using
9497       # Microsoft Visual C++.
9498       # hardcode_libdir_flag_spec is actually meaningless, as there is
9499       # no search path for DLLs.
9500       hardcode_libdir_flag_spec=' '
9501       allow_undefined_flag=unsupported
9502       # Tell ltmain to make .lib files, not .a files.
9503       libext=lib
9504       # Tell ltmain to make .dll files, not .so files.
9505       shrext_cmds=".dll"
9506       # FIXME: Setting linknames here is a bad hack.
9507       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
9508       # The linker will automatically build a .lib file if we build a DLL.
9509       old_archive_From_new_cmds='true'
9510       # FIXME: Should let the user specify the lib program.
9511       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
9512       fix_srcfile_path='`cygpath -w "$srcfile"`'
9513       enable_shared_with_static_runtimes=yes
9514       ;;
9515
9516     darwin* | rhapsody*)
9517       case $host_os in
9518         rhapsody* | darwin1.[012])
9519          allow_undefined_flag='${wl}-undefined ${wl}suppress'
9520          ;;
9521        *) # Darwin 1.3 on
9522          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
9523            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9524          else
9525            case ${MACOSX_DEPLOYMENT_TARGET} in
9526              10.[012])
9527                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9528                ;;
9529              10.*)
9530                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
9531                ;;
9532            esac
9533          fi
9534          ;;
9535       esac
9536       archive_cmds_need_lc=no
9537       hardcode_direct=no
9538       hardcode_automatic=yes
9539       hardcode_shlibpath_var=unsupported
9540       whole_archive_flag_spec=''
9541       link_all_deplibs=yes
9542     if test "$GCC" = yes ; then
9543         output_verbose_link_cmd='echo'
9544         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
9545       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9546       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9547       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}'
9548       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}'
9549     else
9550       case $cc_basename in
9551         xlc*)
9552          output_verbose_link_cmd='echo'
9553          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
9554          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9555           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9556          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}'
9557           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}'
9558           ;;
9559        *)
9560          ld_shlibs=no
9561           ;;
9562       esac
9563     fi
9564       ;;
9565
9566     dgux*)
9567       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9568       hardcode_libdir_flag_spec='-L$libdir'
9569       hardcode_shlibpath_var=no
9570       ;;
9571
9572     freebsd1*)
9573       ld_shlibs=no
9574       ;;
9575
9576     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9577     # support.  Future versions do this automatically, but an explicit c++rt0.o
9578     # does not break anything, and helps significantly (at the cost of a little
9579     # extra space).
9580     freebsd2.2*)
9581       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9582       hardcode_libdir_flag_spec='-R$libdir'
9583       hardcode_direct=yes
9584       hardcode_shlibpath_var=no
9585       ;;
9586
9587     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9588     freebsd2*)
9589       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9590       hardcode_direct=yes
9591       hardcode_minus_L=yes
9592       hardcode_shlibpath_var=no
9593       ;;
9594
9595     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9596     freebsd* | kfreebsd*-gnu | dragonfly*)
9597       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9598       hardcode_libdir_flag_spec='-R$libdir'
9599       hardcode_direct=yes
9600       hardcode_shlibpath_var=no
9601       ;;
9602
9603     hpux9*)
9604       if test "$GCC" = yes; then
9605         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'
9606       else
9607         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'
9608       fi
9609       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9610       hardcode_libdir_separator=:
9611       hardcode_direct=yes
9612
9613       # hardcode_minus_L: Not really in the search PATH,
9614       # but as the default location of the library.
9615       hardcode_minus_L=yes
9616       export_dynamic_flag_spec='${wl}-E'
9617       ;;
9618
9619     hpux10* | hpux11*)
9620       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9621         case $host_cpu in
9622         hppa*64*|ia64*)
9623           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9624           ;;
9625         *)
9626           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9627           ;;
9628         esac
9629       else
9630         case $host_cpu in
9631         hppa*64*|ia64*)
9632           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
9633           ;;
9634         *)
9635           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9636           ;;
9637         esac
9638       fi
9639       if test "$with_gnu_ld" = no; then
9640         case $host_cpu in
9641         hppa*64*)
9642           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9643           hardcode_libdir_flag_spec_ld='+b $libdir'
9644           hardcode_libdir_separator=:
9645           hardcode_direct=no
9646           hardcode_shlibpath_var=no
9647           ;;
9648         ia64*)
9649           hardcode_libdir_flag_spec='-L$libdir'
9650           hardcode_direct=no
9651           hardcode_shlibpath_var=no
9652
9653           # hardcode_minus_L: Not really in the search PATH,
9654           # but as the default location of the library.
9655           hardcode_minus_L=yes
9656           ;;
9657         *)
9658           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9659           hardcode_libdir_separator=:
9660           hardcode_direct=yes
9661           export_dynamic_flag_spec='${wl}-E'
9662
9663           # hardcode_minus_L: Not really in the search PATH,
9664           # but as the default location of the library.
9665           hardcode_minus_L=yes
9666           ;;
9667         esac
9668       fi
9669       ;;
9670
9671     irix5* | irix6* | nonstopux*)
9672       if test "$GCC" = yes; then
9673         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'
9674       else
9675         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'
9676         hardcode_libdir_flag_spec_ld='-rpath $libdir'
9677       fi
9678       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9679       hardcode_libdir_separator=:
9680       link_all_deplibs=yes
9681       ;;
9682
9683     netbsd*)
9684       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9685         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
9686       else
9687         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
9688       fi
9689       hardcode_libdir_flag_spec='-R$libdir'
9690       hardcode_direct=yes
9691       hardcode_shlibpath_var=no
9692       ;;
9693
9694     newsos6)
9695       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9696       hardcode_direct=yes
9697       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9698       hardcode_libdir_separator=:
9699       hardcode_shlibpath_var=no
9700       ;;
9701
9702     openbsd*)
9703       hardcode_direct=yes
9704       hardcode_shlibpath_var=no
9705       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9706         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9707         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9708         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9709         export_dynamic_flag_spec='${wl}-E'
9710       else
9711        case $host_os in
9712          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9713            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9714            hardcode_libdir_flag_spec='-R$libdir'
9715            ;;
9716          *)
9717            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9718            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9719            ;;
9720        esac
9721       fi
9722       ;;
9723
9724     os2*)
9725       hardcode_libdir_flag_spec='-L$libdir'
9726       hardcode_minus_L=yes
9727       allow_undefined_flag=unsupported
9728       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'
9729       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9730       ;;
9731
9732     osf3*)
9733       if test "$GCC" = yes; then
9734         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9735         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'
9736       else
9737         allow_undefined_flag=' -expect_unresolved \*'
9738         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'
9739       fi
9740       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9741       hardcode_libdir_separator=:
9742       ;;
9743
9744     osf4* | osf5*)      # as osf3* with the addition of -msym flag
9745       if test "$GCC" = yes; then
9746         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9747         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'
9748         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9749       else
9750         allow_undefined_flag=' -expect_unresolved \*'
9751         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'
9752         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
9753         $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'
9754
9755         # Both c and cxx compiler support -rpath directly
9756         hardcode_libdir_flag_spec='-rpath $libdir'
9757       fi
9758       hardcode_libdir_separator=:
9759       ;;
9760
9761     sco3.2v5*)
9762       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9763       hardcode_shlibpath_var=no
9764       export_dynamic_flag_spec='${wl}-Bexport'
9765       runpath_var=LD_RUN_PATH
9766       hardcode_runpath_var=yes
9767       ;;
9768
9769     solaris*)
9770       no_undefined_flag=' -z text'
9771       if test "$GCC" = yes; then
9772         wlarc='${wl}'
9773         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9774         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9775           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
9776       else
9777         wlarc=''
9778         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9779         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9780         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9781       fi
9782       hardcode_libdir_flag_spec='-R$libdir'
9783       hardcode_shlibpath_var=no
9784       case $host_os in
9785       solaris2.[0-5] | solaris2.[0-5].*) ;;
9786       *)
9787         # The compiler driver will combine linker options so we
9788         # cannot just pass the convience library names through
9789         # without $wl, iff we do not link with $LD.
9790         # Luckily, gcc supports the same syntax we need for Sun Studio.
9791         # Supported since Solaris 2.6 (maybe 2.5.1?)
9792         case $wlarc in
9793         '')
9794           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
9795         *)
9796           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' ;;
9797         esac ;;
9798       esac
9799       link_all_deplibs=yes
9800       ;;
9801
9802     sunos4*)
9803       if test "x$host_vendor" = xsequent; then
9804         # Use $CC to link under sequent, because it throws in some extra .o
9805         # files that make .init and .fini sections work.
9806         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9807       else
9808         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9809       fi
9810       hardcode_libdir_flag_spec='-L$libdir'
9811       hardcode_direct=yes
9812       hardcode_minus_L=yes
9813       hardcode_shlibpath_var=no
9814       ;;
9815
9816     sysv4)
9817       case $host_vendor in
9818         sni)
9819           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9820           hardcode_direct=yes # is this really true???
9821         ;;
9822         siemens)
9823           ## LD is ld it makes a PLAMLIB
9824           ## CC just makes a GrossModule.
9825           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9826           reload_cmds='$CC -r -o $output$reload_objs'
9827           hardcode_direct=no
9828         ;;
9829         motorola)
9830           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9831           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9832         ;;
9833       esac
9834       runpath_var='LD_RUN_PATH'
9835       hardcode_shlibpath_var=no
9836       ;;
9837
9838     sysv4.3*)
9839       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9840       hardcode_shlibpath_var=no
9841       export_dynamic_flag_spec='-Bexport'
9842       ;;
9843
9844     sysv4*MP*)
9845       if test -d /usr/nec; then
9846         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9847         hardcode_shlibpath_var=no
9848         runpath_var=LD_RUN_PATH
9849         hardcode_runpath_var=yes
9850         ld_shlibs=yes
9851       fi
9852       ;;
9853
9854     sysv4.2uw2*)
9855       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9856       hardcode_direct=yes
9857       hardcode_minus_L=no
9858       hardcode_shlibpath_var=no
9859       hardcode_runpath_var=yes
9860       runpath_var=LD_RUN_PATH
9861       ;;
9862
9863    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
9864       no_undefined_flag='${wl}-z ${wl}text'
9865       if test "$GCC" = yes; then
9866         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9867       else
9868         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9869       fi
9870       runpath_var='LD_RUN_PATH'
9871       hardcode_shlibpath_var=no
9872       ;;
9873
9874     sysv5*)
9875       no_undefined_flag=' -z text'
9876       # $CC -shared without GNU ld will not create a library from C++
9877       # object files and a static libstdc++, better avoid it by now
9878       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9879       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9880                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9881       hardcode_libdir_flag_spec=
9882       hardcode_shlibpath_var=no
9883       runpath_var='LD_RUN_PATH'
9884       ;;
9885
9886     uts4*)
9887       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9888       hardcode_libdir_flag_spec='-L$libdir'
9889       hardcode_shlibpath_var=no
9890       ;;
9891
9892     *)
9893       ld_shlibs=no
9894       ;;
9895     esac
9896   fi
9897
9898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
9899 $as_echo "$ld_shlibs" >&6; }
9900 test "$ld_shlibs" = no && can_build_shared=no
9901
9902 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9903 if test "$GCC" = yes; then
9904   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9905 fi
9906
9907 #
9908 # Do we need to explicitly link libc?
9909 #
9910 case "x$archive_cmds_need_lc" in
9911 x|xyes)
9912   # Assume -lc should be added
9913   archive_cmds_need_lc=yes
9914
9915   if test "$enable_shared" = yes && test "$GCC" = yes; then
9916     case $archive_cmds in
9917     *'~'*)
9918       # FIXME: we may have to deal with multi-command sequences.
9919       ;;
9920     '$CC '*)
9921       # Test whether the compiler implicitly links with -lc since on some
9922       # systems, -lgcc has to come before -lc. If gcc already passes -lc
9923       # to ld, don't add -lc before -lgcc.
9924       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
9925 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
9926       $rm conftest*
9927       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
9928
9929       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9930   (eval $ac_compile) 2>&5
9931   ac_status=$?
9932   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9933   test $ac_status = 0; } 2>conftest.err; then
9934         soname=conftest
9935         lib=conftest
9936         libobjs=conftest.$ac_objext
9937         deplibs=
9938         wl=$lt_prog_compiler_wl
9939         compiler_flags=-v
9940         linker_flags=-v
9941         verstring=
9942         output_objdir=.
9943         libname=conftest
9944         lt_save_allow_undefined_flag=$allow_undefined_flag
9945         allow_undefined_flag=
9946         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9947   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
9948   ac_status=$?
9949   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9950   test $ac_status = 0; }
9951         then
9952           archive_cmds_need_lc=no
9953         else
9954           archive_cmds_need_lc=yes
9955         fi
9956         allow_undefined_flag=$lt_save_allow_undefined_flag
9957       else
9958         cat conftest.err 1>&5
9959       fi
9960       $rm conftest*
9961       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
9962 $as_echo "$archive_cmds_need_lc" >&6; }
9963       ;;
9964     esac
9965   fi
9966   ;;
9967 esac
9968
9969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
9970 $as_echo_n "checking dynamic linker characteristics... " >&6; }
9971 library_names_spec=
9972 libname_spec='lib$name'
9973 soname_spec=
9974 shrext_cmds=".so"
9975 postinstall_cmds=
9976 postuninstall_cmds=
9977 finish_cmds=
9978 finish_eval=
9979 shlibpath_var=
9980 shlibpath_overrides_runpath=unknown
9981 version_type=none
9982 dynamic_linker="$host_os ld.so"
9983 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9984 if test "$GCC" = yes; then
9985   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9986   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9987     # if the path contains ";" then we assume it to be the separator
9988     # otherwise default to the standard path separator (i.e. ":") - it is
9989     # assumed that no part of a normal pathname contains ";" but that should
9990     # okay in the real world where ";" in dirpaths is itself problematic.
9991     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9992   else
9993     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9994   fi
9995 else
9996   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9997 fi
9998 need_lib_prefix=unknown
9999 hardcode_into_libs=no
10000
10001 # when you set need_version to no, make sure it does not cause -set_version
10002 # flags to be left without arguments
10003 need_version=unknown
10004
10005 case $host_os in
10006 aix3*)
10007   version_type=linux
10008   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
10009   shlibpath_var=LIBPATH
10010
10011   # AIX 3 has no versioning support, so we append a major version to the name.
10012   soname_spec='${libname}${release}${shared_ext}$major'
10013   ;;
10014
10015 aix4* | aix5*)
10016   version_type=linux
10017   need_lib_prefix=no
10018   need_version=no
10019   hardcode_into_libs=yes
10020   if test "$host_cpu" = ia64; then
10021     # AIX 5 supports IA64
10022     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
10023     shlibpath_var=LD_LIBRARY_PATH
10024   else
10025     # With GCC up to 2.95.x, collect2 would create an import file
10026     # for dependence libraries.  The import file would start with
10027     # the line `#! .'.  This would cause the generated library to
10028     # depend on `.', always an invalid library.  This was fixed in
10029     # development snapshots of GCC prior to 3.0.
10030     case $host_os in
10031       aix4 | aix4.[01] | aix4.[01].*)
10032       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
10033            echo ' yes '
10034            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
10035         :
10036       else
10037         can_build_shared=no
10038       fi
10039       ;;
10040     esac
10041     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
10042     # soname into executable. Probably we can add versioning support to
10043     # collect2, so additional links can be useful in future.
10044     if test "$aix_use_runtimelinking" = yes; then
10045       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
10046       # instead of lib<name>.a to let people know that these are not
10047       # typical AIX shared libraries.
10048       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10049     else
10050       # We preserve .a as extension for shared libraries through AIX4.2
10051       # and later when we are not doing run time linking.
10052       library_names_spec='${libname}${release}.a $libname.a'
10053       soname_spec='${libname}${release}${shared_ext}$major'
10054     fi
10055     shlibpath_var=LIBPATH
10056   fi
10057   ;;
10058
10059 amigaos*)
10060   library_names_spec='$libname.ixlibrary $libname.a'
10061   # Create ${libname}_ixlibrary.a entries in /sys/libs.
10062   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'
10063   ;;
10064
10065 beos*)
10066   library_names_spec='${libname}${shared_ext}'
10067   dynamic_linker="$host_os ld.so"
10068   shlibpath_var=LIBRARY_PATH
10069   ;;
10070
10071 bsdi[45]*)
10072   version_type=linux
10073   need_version=no
10074   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10075   soname_spec='${libname}${release}${shared_ext}$major'
10076   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
10077   shlibpath_var=LD_LIBRARY_PATH
10078   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
10079   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
10080   # the default ld.so.conf also contains /usr/contrib/lib and
10081   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
10082   # libtool to hard-code these into programs
10083   ;;
10084
10085 cygwin* | mingw* | pw32*)
10086   version_type=windows
10087   shrext_cmds=".dll"
10088   need_version=no
10089   need_lib_prefix=no
10090
10091   case $GCC,$host_os in
10092   yes,cygwin* | yes,mingw* | yes,pw32*)
10093     library_names_spec='$libname.dll.a'
10094     # DLL is installed to $(libdir)/../bin by postinstall_cmds
10095     postinstall_cmds='base_file=`basename \${file}`~
10096       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
10097       dldir=$destdir/`dirname \$dlpath`~
10098       test -d \$dldir || mkdir -p \$dldir~
10099       $install_prog $dir/$dlname \$dldir/$dlname~
10100       chmod a+x \$dldir/$dlname'
10101     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10102       dlpath=$dir/\$dldll~
10103        $rm \$dlpath'
10104     shlibpath_overrides_runpath=yes
10105
10106     case $host_os in
10107     cygwin*)
10108       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
10109       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10110       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
10111       ;;
10112     mingw*)
10113       # MinGW DLLs use traditional 'lib' prefix
10114       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10115       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
10116       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
10117         # It is most probably a Windows format PATH printed by
10118         # mingw gcc, but we are running on Cygwin. Gcc prints its search
10119         # path with ; separators, and with drive letters. We can handle the
10120         # drive letters (cygwin fileutils understands them), so leave them,
10121         # especially as we might pass files found there to a mingw objdump,
10122         # which wouldn't understand a cygwinified path. Ahh.
10123         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10124       else
10125         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
10126       fi
10127       ;;
10128     pw32*)
10129       # pw32 DLLs use 'pw' prefix rather than 'lib'
10130       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10131       ;;
10132     esac
10133     ;;
10134
10135   *)
10136     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10137     ;;
10138   esac
10139   dynamic_linker='Win32 ld.exe'
10140   # FIXME: first we should search . and the directory the executable is in
10141   shlibpath_var=PATH
10142   ;;
10143
10144 darwin* | rhapsody*)
10145   dynamic_linker="$host_os dyld"
10146   version_type=darwin
10147   need_lib_prefix=no
10148   need_version=no
10149   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
10150   soname_spec='${libname}${release}${major}$shared_ext'
10151   shlibpath_overrides_runpath=yes
10152   shlibpath_var=DYLD_LIBRARY_PATH
10153   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10154   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
10155   if test "$GCC" = yes; then
10156     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"`
10157   else
10158     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
10159   fi
10160   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10161   ;;
10162
10163 dgux*)
10164   version_type=linux
10165   need_lib_prefix=no
10166   need_version=no
10167   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10168   soname_spec='${libname}${release}${shared_ext}$major'
10169   shlibpath_var=LD_LIBRARY_PATH
10170   ;;
10171
10172 freebsd1*)
10173   dynamic_linker=no
10174   ;;
10175
10176 kfreebsd*-gnu)
10177   version_type=linux
10178   need_lib_prefix=no
10179   need_version=no
10180   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10181   soname_spec='${libname}${release}${shared_ext}$major'
10182   shlibpath_var=LD_LIBRARY_PATH
10183   shlibpath_overrides_runpath=no
10184   hardcode_into_libs=yes
10185   dynamic_linker='GNU ld.so'
10186   ;;
10187
10188 freebsd* | dragonfly*)
10189   # DragonFly does not have aout.  When/if they implement a new
10190   # versioning mechanism, adjust this.
10191   if test -x /usr/bin/objformat; then
10192     objformat=`/usr/bin/objformat`
10193   else
10194     case $host_os in
10195     freebsd[123]*) objformat=aout ;;
10196     *) objformat=elf ;;
10197     esac
10198   fi
10199   version_type=freebsd-$objformat
10200   case $version_type in
10201     freebsd-elf*)
10202       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10203       need_version=no
10204       need_lib_prefix=no
10205       ;;
10206     freebsd-*)
10207       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
10208       need_version=yes
10209       ;;
10210   esac
10211   shlibpath_var=LD_LIBRARY_PATH
10212   case $host_os in
10213   freebsd2*)
10214     shlibpath_overrides_runpath=yes
10215     ;;
10216   freebsd3.[01]* | freebsdelf3.[01]*)
10217     shlibpath_overrides_runpath=yes
10218     hardcode_into_libs=yes
10219     ;;
10220   *) # from 3.2 on
10221     shlibpath_overrides_runpath=no
10222     hardcode_into_libs=yes
10223     ;;
10224   esac
10225   ;;
10226
10227 gnu*)
10228   version_type=linux
10229   need_lib_prefix=no
10230   need_version=no
10231   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10232   soname_spec='${libname}${release}${shared_ext}$major'
10233   shlibpath_var=LD_LIBRARY_PATH
10234   hardcode_into_libs=yes
10235   ;;
10236
10237 hpux9* | hpux10* | hpux11*)
10238   # Give a soname corresponding to the major version so that dld.sl refuses to
10239   # link against other versions.
10240   version_type=sunos
10241   need_lib_prefix=no
10242   need_version=no
10243   case $host_cpu in
10244   ia64*)
10245     shrext_cmds='.so'
10246     hardcode_into_libs=yes
10247     dynamic_linker="$host_os dld.so"
10248     shlibpath_var=LD_LIBRARY_PATH
10249     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10250     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10251     soname_spec='${libname}${release}${shared_ext}$major'
10252     if test "X$HPUX_IA64_MODE" = X32; then
10253       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10254     else
10255       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10256     fi
10257     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10258     ;;
10259    hppa*64*)
10260      shrext_cmds='.sl'
10261      hardcode_into_libs=yes
10262      dynamic_linker="$host_os dld.sl"
10263      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10264      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10265      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10266      soname_spec='${libname}${release}${shared_ext}$major'
10267      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10268      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10269      ;;
10270    *)
10271     shrext_cmds='.sl'
10272     dynamic_linker="$host_os dld.sl"
10273     shlibpath_var=SHLIB_PATH
10274     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10275     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10276     soname_spec='${libname}${release}${shared_ext}$major'
10277     ;;
10278   esac
10279   # HP-UX runs *really* slowly unless shared libraries are mode 555.
10280   postinstall_cmds='chmod 555 $lib'
10281   ;;
10282
10283 irix5* | irix6* | nonstopux*)
10284   case $host_os in
10285     nonstopux*) version_type=nonstopux ;;
10286     *)
10287         if test "$lt_cv_prog_gnu_ld" = yes; then
10288                 version_type=linux
10289         else
10290                 version_type=irix
10291         fi ;;
10292   esac
10293   need_lib_prefix=no
10294   need_version=no
10295   soname_spec='${libname}${release}${shared_ext}$major'
10296   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
10297   case $host_os in
10298   irix5* | nonstopux*)
10299     libsuff= shlibsuff=
10300     ;;
10301   *)
10302     case $LD in # libtool.m4 will add one of these switches to LD
10303     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10304       libsuff= shlibsuff= libmagic=32-bit;;
10305     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10306       libsuff=32 shlibsuff=N32 libmagic=N32;;
10307     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10308       libsuff=64 shlibsuff=64 libmagic=64-bit;;
10309     *) libsuff= shlibsuff= libmagic=never-match;;
10310     esac
10311     ;;
10312   esac
10313   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10314   shlibpath_overrides_runpath=no
10315   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10316   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
10317   hardcode_into_libs=yes
10318   ;;
10319
10320 # No shared lib support for Linux oldld, aout, or coff.
10321 linux*oldld* | linux*aout* | linux*coff*)
10322   dynamic_linker=no
10323   ;;
10324
10325 # This must be Linux ELF.
10326 linux*)
10327   version_type=linux
10328   need_lib_prefix=no
10329   need_version=no
10330   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10331   soname_spec='${libname}${release}${shared_ext}$major'
10332   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10333   shlibpath_var=LD_LIBRARY_PATH
10334   shlibpath_overrides_runpath=no
10335   # This implies no fast_install, which is unacceptable.
10336   # Some rework will be needed to allow for fast_install
10337   # before this can be enabled.
10338   hardcode_into_libs=yes
10339
10340   # Append ld.so.conf contents to the search path
10341   if test -f /etc/ld.so.conf; then
10342     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' ' '`
10343     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10344   fi
10345
10346   # We used to test for /lib/ld.so.1 and disable shared libraries on
10347   # powerpc, because MkLinux only supported shared libraries with the
10348   # GNU dynamic linker.  Since this was broken with cross compilers,
10349   # most powerpc-linux boxes support dynamic linking these days and
10350   # people can always --disable-shared, the test was removed, and we
10351   # assume the GNU/Linux dynamic linker is in use.
10352   dynamic_linker='GNU/Linux ld.so'
10353   ;;
10354
10355 knetbsd*-gnu)
10356   version_type=linux
10357   need_lib_prefix=no
10358   need_version=no
10359   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10360   soname_spec='${libname}${release}${shared_ext}$major'
10361   shlibpath_var=LD_LIBRARY_PATH
10362   shlibpath_overrides_runpath=no
10363   hardcode_into_libs=yes
10364   dynamic_linker='GNU ld.so'
10365   ;;
10366
10367 netbsd*)
10368   version_type=sunos
10369   need_lib_prefix=no
10370   need_version=no
10371   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10372     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10373     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10374     dynamic_linker='NetBSD (a.out) ld.so'
10375   else
10376     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10377     soname_spec='${libname}${release}${shared_ext}$major'
10378     dynamic_linker='NetBSD ld.elf_so'
10379   fi
10380   shlibpath_var=LD_LIBRARY_PATH
10381   shlibpath_overrides_runpath=yes
10382   hardcode_into_libs=yes
10383   ;;
10384
10385 newsos6)
10386   version_type=linux
10387   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10388   shlibpath_var=LD_LIBRARY_PATH
10389   shlibpath_overrides_runpath=yes
10390   ;;
10391
10392 nto-qnx*)
10393   version_type=linux
10394   need_lib_prefix=no
10395   need_version=no
10396   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10397   soname_spec='${libname}${release}${shared_ext}$major'
10398   shlibpath_var=LD_LIBRARY_PATH
10399   shlibpath_overrides_runpath=yes
10400   ;;
10401
10402 openbsd*)
10403   version_type=sunos
10404   need_lib_prefix=no
10405   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10406   case $host_os in
10407     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10408     *)                         need_version=no  ;;
10409   esac
10410   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10411   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10412   shlibpath_var=LD_LIBRARY_PATH
10413   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10414     case $host_os in
10415       openbsd2.[89] | openbsd2.[89].*)
10416         shlibpath_overrides_runpath=no
10417         ;;
10418       *)
10419         shlibpath_overrides_runpath=yes
10420         ;;
10421       esac
10422   else
10423     shlibpath_overrides_runpath=yes
10424   fi
10425   ;;
10426
10427 os2*)
10428   libname_spec='$name'
10429   shrext_cmds=".dll"
10430   need_lib_prefix=no
10431   library_names_spec='$libname${shared_ext} $libname.a'
10432   dynamic_linker='OS/2 ld.exe'
10433   shlibpath_var=LIBPATH
10434   ;;
10435
10436 osf3* | osf4* | osf5*)
10437   version_type=osf
10438   need_lib_prefix=no
10439   need_version=no
10440   soname_spec='${libname}${release}${shared_ext}$major'
10441   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10442   shlibpath_var=LD_LIBRARY_PATH
10443   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10444   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
10445   ;;
10446
10447 sco3.2v5*)
10448   version_type=osf
10449   soname_spec='${libname}${release}${shared_ext}$major'
10450   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10451   shlibpath_var=LD_LIBRARY_PATH
10452   ;;
10453
10454 solaris*)
10455   version_type=linux
10456   need_lib_prefix=no
10457   need_version=no
10458   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10459   soname_spec='${libname}${release}${shared_ext}$major'
10460   shlibpath_var=LD_LIBRARY_PATH
10461   shlibpath_overrides_runpath=yes
10462   hardcode_into_libs=yes
10463   # ldd complains unless libraries are executable
10464   postinstall_cmds='chmod +x $lib'
10465   ;;
10466
10467 sunos4*)
10468   version_type=sunos
10469   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10470   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10471   shlibpath_var=LD_LIBRARY_PATH
10472   shlibpath_overrides_runpath=yes
10473   if test "$with_gnu_ld" = yes; then
10474     need_lib_prefix=no
10475   fi
10476   need_version=yes
10477   ;;
10478
10479 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10480   version_type=linux
10481   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10482   soname_spec='${libname}${release}${shared_ext}$major'
10483   shlibpath_var=LD_LIBRARY_PATH
10484   case $host_vendor in
10485     sni)
10486       shlibpath_overrides_runpath=no
10487       need_lib_prefix=no
10488       export_dynamic_flag_spec='${wl}-Blargedynsym'
10489       runpath_var=LD_RUN_PATH
10490       ;;
10491     siemens)
10492       need_lib_prefix=no
10493       ;;
10494     motorola)
10495       need_lib_prefix=no
10496       need_version=no
10497       shlibpath_overrides_runpath=no
10498       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10499       ;;
10500   esac
10501   ;;
10502
10503 sysv4*MP*)
10504   if test -d /usr/nec ;then
10505     version_type=linux
10506     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
10507     soname_spec='$libname${shared_ext}.$major'
10508     shlibpath_var=LD_LIBRARY_PATH
10509   fi
10510   ;;
10511
10512 uts4*)
10513   version_type=linux
10514   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10515   soname_spec='${libname}${release}${shared_ext}$major'
10516   shlibpath_var=LD_LIBRARY_PATH
10517   ;;
10518
10519 *)
10520   dynamic_linker=no
10521   ;;
10522 esac
10523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
10524 $as_echo "$dynamic_linker" >&6; }
10525 test "$dynamic_linker" = no && can_build_shared=no
10526
10527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
10528 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
10529 hardcode_action=
10530 if test -n "$hardcode_libdir_flag_spec" || \
10531    test -n "$runpath_var" || \
10532    test "X$hardcode_automatic" = "Xyes" ; then
10533
10534   # We can hardcode non-existant directories.
10535   if test "$hardcode_direct" != no &&
10536      # If the only mechanism to avoid hardcoding is shlibpath_var, we
10537      # have to relink, otherwise we might link with an installed library
10538      # when we should be linking with a yet-to-be-installed one
10539      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
10540      test "$hardcode_minus_L" != no; then
10541     # Linking always hardcodes the temporary library directory.
10542     hardcode_action=relink
10543   else
10544     # We can link without hardcoding, and we can hardcode nonexisting dirs.
10545     hardcode_action=immediate
10546   fi
10547 else
10548   # We cannot hardcode anything, or else we can only hardcode existing
10549   # directories.
10550   hardcode_action=unsupported
10551 fi
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
10553 $as_echo "$hardcode_action" >&6; }
10554
10555 if test "$hardcode_action" = relink; then
10556   # Fast installation is not supported
10557   enable_fast_install=no
10558 elif test "$shlibpath_overrides_runpath" = yes ||
10559      test "$enable_shared" = no; then
10560   # Fast installation is not necessary
10561   enable_fast_install=needless
10562 fi
10563
10564 striplib=
10565 old_striplib=
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
10567 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
10568 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
10569   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
10570   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
10571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10572 $as_echo "yes" >&6; }
10573 else
10574 # FIXME - insert some real tests, host_os isn't really good enough
10575   case $host_os in
10576    darwin*)
10577        if test -n "$STRIP" ; then
10578          striplib="$STRIP -x"
10579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10580 $as_echo "yes" >&6; }
10581        else
10582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10583 $as_echo "no" >&6; }
10584 fi
10585        ;;
10586    *)
10587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10588 $as_echo "no" >&6; }
10589     ;;
10590   esac
10591 fi
10592
10593 if test "x$enable_dlopen" != xyes; then
10594   enable_dlopen=unknown
10595   enable_dlopen_self=unknown
10596   enable_dlopen_self_static=unknown
10597 else
10598   lt_cv_dlopen=no
10599   lt_cv_dlopen_libs=
10600
10601   case $host_os in
10602   beos*)
10603     lt_cv_dlopen="load_add_on"
10604     lt_cv_dlopen_libs=
10605     lt_cv_dlopen_self=yes
10606     ;;
10607
10608   mingw* | pw32*)
10609     lt_cv_dlopen="LoadLibrary"
10610     lt_cv_dlopen_libs=
10611    ;;
10612
10613   cygwin*)
10614     lt_cv_dlopen="dlopen"
10615     lt_cv_dlopen_libs=
10616    ;;
10617
10618   darwin*)
10619   # if libdl is installed we need to link against it
10620     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10621 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10622 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10623   $as_echo_n "(cached) " >&6
10624 else
10625   ac_check_lib_save_LIBS=$LIBS
10626 LIBS="-ldl  $LIBS"
10627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10628 /* end confdefs.h.  */
10629
10630 /* Override any GCC internal prototype to avoid an error.
10631    Use char because int might match the return type of a GCC
10632    builtin and then its argument prototype would still apply.  */
10633 #ifdef __cplusplus
10634 extern "C"
10635 #endif
10636 char dlopen ();
10637 int
10638 main ()
10639 {
10640 return dlopen ();
10641   ;
10642   return 0;
10643 }
10644 _ACEOF
10645 if ac_fn_c_try_link "$LINENO"; then :
10646   ac_cv_lib_dl_dlopen=yes
10647 else
10648   ac_cv_lib_dl_dlopen=no
10649 fi
10650 rm -f core conftest.err conftest.$ac_objext \
10651     conftest$ac_exeext conftest.$ac_ext
10652 LIBS=$ac_check_lib_save_LIBS
10653 fi
10654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10655 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10656 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10657   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10658 else
10659
10660     lt_cv_dlopen="dyld"
10661     lt_cv_dlopen_libs=
10662     lt_cv_dlopen_self=yes
10663
10664 fi
10665
10666    ;;
10667
10668   *)
10669     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
10670 if test "x$ac_cv_func_shl_load" = x""yes; then :
10671   lt_cv_dlopen="shl_load"
10672 else
10673   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10674 $as_echo_n "checking for shl_load in -ldld... " >&6; }
10675 if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
10676   $as_echo_n "(cached) " >&6
10677 else
10678   ac_check_lib_save_LIBS=$LIBS
10679 LIBS="-ldld  $LIBS"
10680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10681 /* end confdefs.h.  */
10682
10683 /* Override any GCC internal prototype to avoid an error.
10684    Use char because int might match the return type of a GCC
10685    builtin and then its argument prototype would still apply.  */
10686 #ifdef __cplusplus
10687 extern "C"
10688 #endif
10689 char shl_load ();
10690 int
10691 main ()
10692 {
10693 return shl_load ();
10694   ;
10695   return 0;
10696 }
10697 _ACEOF
10698 if ac_fn_c_try_link "$LINENO"; then :
10699   ac_cv_lib_dld_shl_load=yes
10700 else
10701   ac_cv_lib_dld_shl_load=no
10702 fi
10703 rm -f core conftest.err conftest.$ac_objext \
10704     conftest$ac_exeext conftest.$ac_ext
10705 LIBS=$ac_check_lib_save_LIBS
10706 fi
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
10708 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
10709 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
10710   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
10711 else
10712   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
10713 if test "x$ac_cv_func_dlopen" = x""yes; then :
10714   lt_cv_dlopen="dlopen"
10715 else
10716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10717 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10718 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10719   $as_echo_n "(cached) " >&6
10720 else
10721   ac_check_lib_save_LIBS=$LIBS
10722 LIBS="-ldl  $LIBS"
10723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10724 /* end confdefs.h.  */
10725
10726 /* Override any GCC internal prototype to avoid an error.
10727    Use char because int might match the return type of a GCC
10728    builtin and then its argument prototype would still apply.  */
10729 #ifdef __cplusplus
10730 extern "C"
10731 #endif
10732 char dlopen ();
10733 int
10734 main ()
10735 {
10736 return dlopen ();
10737   ;
10738   return 0;
10739 }
10740 _ACEOF
10741 if ac_fn_c_try_link "$LINENO"; then :
10742   ac_cv_lib_dl_dlopen=yes
10743 else
10744   ac_cv_lib_dl_dlopen=no
10745 fi
10746 rm -f core conftest.err conftest.$ac_objext \
10747     conftest$ac_exeext conftest.$ac_ext
10748 LIBS=$ac_check_lib_save_LIBS
10749 fi
10750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10751 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10752 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10753   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10754 else
10755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
10756 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
10757 if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
10758   $as_echo_n "(cached) " >&6
10759 else
10760   ac_check_lib_save_LIBS=$LIBS
10761 LIBS="-lsvld  $LIBS"
10762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10763 /* end confdefs.h.  */
10764
10765 /* Override any GCC internal prototype to avoid an error.
10766    Use char because int might match the return type of a GCC
10767    builtin and then its argument prototype would still apply.  */
10768 #ifdef __cplusplus
10769 extern "C"
10770 #endif
10771 char dlopen ();
10772 int
10773 main ()
10774 {
10775 return dlopen ();
10776   ;
10777   return 0;
10778 }
10779 _ACEOF
10780 if ac_fn_c_try_link "$LINENO"; then :
10781   ac_cv_lib_svld_dlopen=yes
10782 else
10783   ac_cv_lib_svld_dlopen=no
10784 fi
10785 rm -f core conftest.err conftest.$ac_objext \
10786     conftest$ac_exeext conftest.$ac_ext
10787 LIBS=$ac_check_lib_save_LIBS
10788 fi
10789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
10790 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
10791 if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
10792   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10793 else
10794   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
10795 $as_echo_n "checking for dld_link in -ldld... " >&6; }
10796 if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
10797   $as_echo_n "(cached) " >&6
10798 else
10799   ac_check_lib_save_LIBS=$LIBS
10800 LIBS="-ldld  $LIBS"
10801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10802 /* end confdefs.h.  */
10803
10804 /* Override any GCC internal prototype to avoid an error.
10805    Use char because int might match the return type of a GCC
10806    builtin and then its argument prototype would still apply.  */
10807 #ifdef __cplusplus
10808 extern "C"
10809 #endif
10810 char dld_link ();
10811 int
10812 main ()
10813 {
10814 return dld_link ();
10815   ;
10816   return 0;
10817 }
10818 _ACEOF
10819 if ac_fn_c_try_link "$LINENO"; then :
10820   ac_cv_lib_dld_dld_link=yes
10821 else
10822   ac_cv_lib_dld_dld_link=no
10823 fi
10824 rm -f core conftest.err conftest.$ac_objext \
10825     conftest$ac_exeext conftest.$ac_ext
10826 LIBS=$ac_check_lib_save_LIBS
10827 fi
10828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
10829 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
10830 if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
10831   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10832 fi
10833
10834
10835 fi
10836
10837
10838 fi
10839
10840
10841 fi
10842
10843
10844 fi
10845
10846
10847 fi
10848
10849     ;;
10850   esac
10851
10852   if test "x$lt_cv_dlopen" != xno; then
10853     enable_dlopen=yes
10854   else
10855     enable_dlopen=no
10856   fi
10857
10858   case $lt_cv_dlopen in
10859   dlopen)
10860     save_CPPFLAGS="$CPPFLAGS"
10861     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10862
10863     save_LDFLAGS="$LDFLAGS"
10864     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10865
10866     save_LIBS="$LIBS"
10867     LIBS="$lt_cv_dlopen_libs $LIBS"
10868
10869     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
10870 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
10871 if test "${lt_cv_dlopen_self+set}" = set; then :
10872   $as_echo_n "(cached) " >&6
10873 else
10874           if test "$cross_compiling" = yes; then :
10875   lt_cv_dlopen_self=cross
10876 else
10877   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10878   lt_status=$lt_dlunknown
10879   cat > conftest.$ac_ext <<EOF
10880 #line 10878 "configure"
10881 #include "confdefs.h"
10882
10883 #if HAVE_DLFCN_H
10884 #include <dlfcn.h>
10885 #endif
10886
10887 #include <stdio.h>
10888
10889 #ifdef RTLD_GLOBAL
10890 #  define LT_DLGLOBAL           RTLD_GLOBAL
10891 #else
10892 #  ifdef DL_GLOBAL
10893 #    define LT_DLGLOBAL         DL_GLOBAL
10894 #  else
10895 #    define LT_DLGLOBAL         0
10896 #  endif
10897 #endif
10898
10899 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10900    find out it does not work in some platform. */
10901 #ifndef LT_DLLAZY_OR_NOW
10902 #  ifdef RTLD_LAZY
10903 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10904 #  else
10905 #    ifdef DL_LAZY
10906 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10907 #    else
10908 #      ifdef RTLD_NOW
10909 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10910 #      else
10911 #        ifdef DL_NOW
10912 #          define LT_DLLAZY_OR_NOW      DL_NOW
10913 #        else
10914 #          define LT_DLLAZY_OR_NOW      0
10915 #        endif
10916 #      endif
10917 #    endif
10918 #  endif
10919 #endif
10920
10921 #ifdef __cplusplus
10922 extern "C" void exit (int);
10923 #endif
10924
10925 void fnord() { int i=42;}
10926 int main ()
10927 {
10928   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10929   int status = $lt_dlunknown;
10930
10931   if (self)
10932     {
10933       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10934       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10935       /* dlclose (self); */
10936     }
10937
10938     exit (status);
10939 }
10940 EOF
10941   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10942   (eval $ac_link) 2>&5
10943   ac_status=$?
10944   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10945   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10946     (./conftest; exit; ) >&5 2>/dev/null
10947     lt_status=$?
10948     case x$lt_status in
10949       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10950       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10951       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10952     esac
10953   else :
10954     # compilation failed
10955     lt_cv_dlopen_self=no
10956   fi
10957 fi
10958 rm -fr conftest*
10959
10960
10961 fi
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
10963 $as_echo "$lt_cv_dlopen_self" >&6; }
10964
10965     if test "x$lt_cv_dlopen_self" = xyes; then
10966       LDFLAGS="$LDFLAGS $link_static_flag"
10967       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
10968 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
10969 if test "${lt_cv_dlopen_self_static+set}" = set; then :
10970   $as_echo_n "(cached) " >&6
10971 else
10972           if test "$cross_compiling" = yes; then :
10973   lt_cv_dlopen_self_static=cross
10974 else
10975   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10976   lt_status=$lt_dlunknown
10977   cat > conftest.$ac_ext <<EOF
10978 #line 10976 "configure"
10979 #include "confdefs.h"
10980
10981 #if HAVE_DLFCN_H
10982 #include <dlfcn.h>
10983 #endif
10984
10985 #include <stdio.h>
10986
10987 #ifdef RTLD_GLOBAL
10988 #  define LT_DLGLOBAL           RTLD_GLOBAL
10989 #else
10990 #  ifdef DL_GLOBAL
10991 #    define LT_DLGLOBAL         DL_GLOBAL
10992 #  else
10993 #    define LT_DLGLOBAL         0
10994 #  endif
10995 #endif
10996
10997 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10998    find out it does not work in some platform. */
10999 #ifndef LT_DLLAZY_OR_NOW
11000 #  ifdef RTLD_LAZY
11001 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
11002 #  else
11003 #    ifdef DL_LAZY
11004 #      define LT_DLLAZY_OR_NOW          DL_LAZY
11005 #    else
11006 #      ifdef RTLD_NOW
11007 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
11008 #      else
11009 #        ifdef DL_NOW
11010 #          define LT_DLLAZY_OR_NOW      DL_NOW
11011 #        else
11012 #          define LT_DLLAZY_OR_NOW      0
11013 #        endif
11014 #      endif
11015 #    endif
11016 #  endif
11017 #endif
11018
11019 #ifdef __cplusplus
11020 extern "C" void exit (int);
11021 #endif
11022
11023 void fnord() { int i=42;}
11024 int main ()
11025 {
11026   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11027   int status = $lt_dlunknown;
11028
11029   if (self)
11030     {
11031       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
11032       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11033       /* dlclose (self); */
11034     }
11035
11036     exit (status);
11037 }
11038 EOF
11039   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
11040   (eval $ac_link) 2>&5
11041   ac_status=$?
11042   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11043   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
11044     (./conftest; exit; ) >&5 2>/dev/null
11045     lt_status=$?
11046     case x$lt_status in
11047       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
11048       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
11049       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
11050     esac
11051   else :
11052     # compilation failed
11053     lt_cv_dlopen_self_static=no
11054   fi
11055 fi
11056 rm -fr conftest*
11057
11058
11059 fi
11060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
11061 $as_echo "$lt_cv_dlopen_self_static" >&6; }
11062     fi
11063
11064     CPPFLAGS="$save_CPPFLAGS"
11065     LDFLAGS="$save_LDFLAGS"
11066     LIBS="$save_LIBS"
11067     ;;
11068   esac
11069
11070   case $lt_cv_dlopen_self in
11071   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
11072   *) enable_dlopen_self=unknown ;;
11073   esac
11074
11075   case $lt_cv_dlopen_self_static in
11076   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
11077   *) enable_dlopen_self_static=unknown ;;
11078   esac
11079 fi
11080
11081
11082 # Report which librarie types wil actually be built
11083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
11084 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
11085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
11086 $as_echo "$can_build_shared" >&6; }
11087
11088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
11089 $as_echo_n "checking whether to build shared libraries... " >&6; }
11090 test "$can_build_shared" = "no" && enable_shared=no
11091
11092 # On AIX, shared libraries and static libraries use the same namespace, and
11093 # are all built from PIC.
11094 case $host_os in
11095 aix3*)
11096   test "$enable_shared" = yes && enable_static=no
11097   if test -n "$RANLIB"; then
11098     archive_cmds="$archive_cmds~\$RANLIB \$lib"
11099     postinstall_cmds='$RANLIB $lib'
11100   fi
11101   ;;
11102
11103 aix4* | aix5*)
11104   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
11105     test "$enable_shared" = yes && enable_static=no
11106   fi
11107     ;;
11108 esac
11109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
11110 $as_echo "$enable_shared" >&6; }
11111
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
11113 $as_echo_n "checking whether to build static libraries... " >&6; }
11114 # Make sure either enable_shared or enable_static is yes.
11115 test "$enable_shared" = yes || enable_static=yes
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
11117 $as_echo "$enable_static" >&6; }
11118
11119 # The else clause should only fire when bootstrapping the
11120 # libtool distribution, otherwise you forgot to ship ltmain.sh
11121 # with your package, and you will get complaints that there are
11122 # no rules to generate ltmain.sh.
11123 if test -f "$ltmain"; then
11124   # See if we are running on zsh, and set the options which allow our commands through
11125   # without removal of \ escapes.
11126   if test -n "${ZSH_VERSION+set}" ; then
11127     setopt NO_GLOB_SUBST
11128   fi
11129   # Now quote all the things that may contain metacharacters while being
11130   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11131   # variables and quote the copies for generation of the libtool script.
11132   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11133     SED SHELL STRIP \
11134     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11135     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11136     deplibs_check_method reload_flag reload_cmds need_locks \
11137     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11138     lt_cv_sys_global_symbol_to_c_name_address \
11139     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11140     old_postinstall_cmds old_postuninstall_cmds \
11141     compiler \
11142     CC \
11143     LD \
11144     lt_prog_compiler_wl \
11145     lt_prog_compiler_pic \
11146     lt_prog_compiler_static \
11147     lt_prog_compiler_no_builtin_flag \
11148     export_dynamic_flag_spec \
11149     thread_safe_flag_spec \
11150     whole_archive_flag_spec \
11151     enable_shared_with_static_runtimes \
11152     old_archive_cmds \
11153     old_archive_from_new_cmds \
11154     predep_objects \
11155     postdep_objects \
11156     predeps \
11157     postdeps \
11158     compiler_lib_search_path \
11159     archive_cmds \
11160     archive_expsym_cmds \
11161     postinstall_cmds \
11162     postuninstall_cmds \
11163     old_archive_from_expsyms_cmds \
11164     allow_undefined_flag \
11165     no_undefined_flag \
11166     export_symbols_cmds \
11167     hardcode_libdir_flag_spec \
11168     hardcode_libdir_flag_spec_ld \
11169     hardcode_libdir_separator \
11170     hardcode_automatic \
11171     module_cmds \
11172     module_expsym_cmds \
11173     lt_cv_prog_compiler_c_o \
11174     exclude_expsyms \
11175     include_expsyms; do
11176
11177     case $var in
11178     old_archive_cmds | \
11179     old_archive_from_new_cmds | \
11180     archive_cmds | \
11181     archive_expsym_cmds | \
11182     module_cmds | \
11183     module_expsym_cmds | \
11184     old_archive_from_expsyms_cmds | \
11185     export_symbols_cmds | \
11186     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11187     postinstall_cmds | postuninstall_cmds | \
11188     old_postinstall_cmds | old_postuninstall_cmds | \
11189     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11190       # Double-quote double-evaled strings.
11191       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11192       ;;
11193     *)
11194       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11195       ;;
11196     esac
11197   done
11198
11199   case $lt_echo in
11200   *'\$0 --fallback-echo"')
11201     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11202     ;;
11203   esac
11204
11205 cfgfile="${ofile}T"
11206   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
11207   $rm -f "$cfgfile"
11208   { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
11209 $as_echo "$as_me: creating $ofile" >&6;}
11210
11211   cat <<__EOF__ >> "$cfgfile"
11212 #! $SHELL
11213
11214 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
11215 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
11216 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
11217 #
11218 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
11219 # Free Software Foundation, Inc.
11220 #
11221 # This file is part of GNU Libtool:
11222 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
11223 #
11224 # This program is free software; you can redistribute it and/or modify
11225 # it under the terms of the GNU General Public License as published by
11226 # the Free Software Foundation; either version 2 of the License, or
11227 # (at your option) any later version.
11228 #
11229 # This program is distributed in the hope that it will be useful, but
11230 # WITHOUT ANY WARRANTY; without even the implied warranty of
11231 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11232 # General Public License for more details.
11233 #
11234 # You should have received a copy of the GNU General Public License
11235 # along with this program; if not, write to the Free Software
11236 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
11237 #
11238 # As a special exception to the GNU General Public License, if you
11239 # distribute this file as part of a program that contains a
11240 # configuration script generated by Autoconf, you may include it under
11241 # the same distribution terms that you use for the rest of that program.
11242
11243 # A sed program that does not truncate output.
11244 SED=$lt_SED
11245
11246 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
11247 Xsed="$SED -e 1s/^X//"
11248
11249 # The HP-UX ksh and POSIX shell print the target directory to stdout
11250 # if CDPATH is set.
11251 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11252
11253 # The names of the tagged configurations supported by this script.
11254 available_tags=
11255
11256 # ### BEGIN LIBTOOL CONFIG
11257
11258 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11259
11260 # Shell to use when invoking shell scripts.
11261 SHELL=$lt_SHELL
11262
11263 # Whether or not to build shared libraries.
11264 build_libtool_libs=$enable_shared
11265
11266 # Whether or not to build static libraries.
11267 build_old_libs=$enable_static
11268
11269 # Whether or not to add -lc for building shared libraries.
11270 build_libtool_need_lc=$archive_cmds_need_lc
11271
11272 # Whether or not to disallow shared libs when runtime libs are static
11273 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
11274
11275 # Whether or not to optimize for fast installation.
11276 fast_install=$enable_fast_install
11277
11278 # The host system.
11279 host_alias=$host_alias
11280 host=$host
11281 host_os=$host_os
11282
11283 # The build system.
11284 build_alias=$build_alias
11285 build=$build
11286 build_os=$build_os
11287
11288 # An echo program that does not interpret backslashes.
11289 echo=$lt_echo
11290
11291 # The archiver.
11292 AR=$lt_AR
11293 AR_FLAGS=$lt_AR_FLAGS
11294
11295 # A C compiler.
11296 LTCC=$lt_LTCC
11297
11298 # A language-specific compiler.
11299 CC=$lt_compiler
11300
11301 # Is the compiler the GNU C compiler?
11302 with_gcc=$GCC
11303
11304 # An ERE matcher.
11305 EGREP=$lt_EGREP
11306
11307 # The linker used to build libraries.
11308 LD=$lt_LD
11309
11310 # Whether we need hard or soft links.
11311 LN_S=$lt_LN_S
11312
11313 # A BSD-compatible nm program.
11314 NM=$lt_NM
11315
11316 # A symbol stripping program
11317 STRIP=$lt_STRIP
11318
11319 # Used to examine libraries when file_magic_cmd begins "file"
11320 MAGIC_CMD=$MAGIC_CMD
11321
11322 # Used on cygwin: DLL creation program.
11323 DLLTOOL="$DLLTOOL"
11324
11325 # Used on cygwin: object dumper.
11326 OBJDUMP="$OBJDUMP"
11327
11328 # Used on cygwin: assembler.
11329 AS="$AS"
11330
11331 # The name of the directory that contains temporary libtool files.
11332 objdir=$objdir
11333
11334 # How to create reloadable object files.
11335 reload_flag=$lt_reload_flag
11336 reload_cmds=$lt_reload_cmds
11337
11338 # How to pass a linker flag through the compiler.
11339 wl=$lt_lt_prog_compiler_wl
11340
11341 # Object file suffix (normally "o").
11342 objext="$ac_objext"
11343
11344 # Old archive suffix (normally "a").
11345 libext="$libext"
11346
11347 # Shared library suffix (normally ".so").
11348 shrext_cmds='$shrext_cmds'
11349
11350 # Executable file suffix (normally "").
11351 exeext="$exeext"
11352
11353 # Additional compiler flags for building library objects.
11354 pic_flag=$lt_lt_prog_compiler_pic
11355 pic_mode=$pic_mode
11356
11357 # What is the maximum length of a command?
11358 max_cmd_len=$lt_cv_sys_max_cmd_len
11359
11360 # Does compiler simultaneously support -c and -o options?
11361 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
11362
11363 # Must we lock files when doing compilation?
11364 need_locks=$lt_need_locks
11365
11366 # Do we need the lib prefix for modules?
11367 need_lib_prefix=$need_lib_prefix
11368
11369 # Do we need a version for libraries?
11370 need_version=$need_version
11371
11372 # Whether dlopen is supported.
11373 dlopen_support=$enable_dlopen
11374
11375 # Whether dlopen of programs is supported.
11376 dlopen_self=$enable_dlopen_self
11377
11378 # Whether dlopen of statically linked programs is supported.
11379 dlopen_self_static=$enable_dlopen_self_static
11380
11381 # Compiler flag to prevent dynamic linking.
11382 link_static_flag=$lt_lt_prog_compiler_static
11383
11384 # Compiler flag to turn off builtin functions.
11385 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
11386
11387 # Compiler flag to allow reflexive dlopens.
11388 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
11389
11390 # Compiler flag to generate shared objects directly from archives.
11391 whole_archive_flag_spec=$lt_whole_archive_flag_spec
11392
11393 # Compiler flag to generate thread-safe objects.
11394 thread_safe_flag_spec=$lt_thread_safe_flag_spec
11395
11396 # Library versioning type.
11397 version_type=$version_type
11398
11399 # Format of library name prefix.
11400 libname_spec=$lt_libname_spec
11401
11402 # List of archive names.  First name is the real one, the rest are links.
11403 # The last name is the one that the linker finds with -lNAME.
11404 library_names_spec=$lt_library_names_spec
11405
11406 # The coded name of the library, if different from the real name.
11407 soname_spec=$lt_soname_spec
11408
11409 # Commands used to build and install an old-style archive.
11410 RANLIB=$lt_RANLIB
11411 old_archive_cmds=$lt_old_archive_cmds
11412 old_postinstall_cmds=$lt_old_postinstall_cmds
11413 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11414
11415 # Create an old-style archive from a shared archive.
11416 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
11417
11418 # Create a temporary old-style archive to link instead of a shared archive.
11419 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
11420
11421 # Commands used to build and install a shared archive.
11422 archive_cmds=$lt_archive_cmds
11423 archive_expsym_cmds=$lt_archive_expsym_cmds
11424 postinstall_cmds=$lt_postinstall_cmds
11425 postuninstall_cmds=$lt_postuninstall_cmds
11426
11427 # Commands used to build a loadable module (assumed same as above if empty)
11428 module_cmds=$lt_module_cmds
11429 module_expsym_cmds=$lt_module_expsym_cmds
11430
11431 # Commands to strip libraries.
11432 old_striplib=$lt_old_striplib
11433 striplib=$lt_striplib
11434
11435 # Dependencies to place before the objects being linked to create a
11436 # shared library.
11437 predep_objects=$lt_predep_objects
11438
11439 # Dependencies to place after the objects being linked to create a
11440 # shared library.
11441 postdep_objects=$lt_postdep_objects
11442
11443 # Dependencies to place before the objects being linked to create a
11444 # shared library.
11445 predeps=$lt_predeps
11446
11447 # Dependencies to place after the objects being linked to create a
11448 # shared library.
11449 postdeps=$lt_postdeps
11450
11451 # The library search path used internally by the compiler when linking
11452 # a shared library.
11453 compiler_lib_search_path=$lt_compiler_lib_search_path
11454
11455 # Method to check whether dependent libraries are shared objects.
11456 deplibs_check_method=$lt_deplibs_check_method
11457
11458 # Command to use when deplibs_check_method == file_magic.
11459 file_magic_cmd=$lt_file_magic_cmd
11460
11461 # Flag that allows shared libraries with undefined symbols to be built.
11462 allow_undefined_flag=$lt_allow_undefined_flag
11463
11464 # Flag that forces no undefined symbols.
11465 no_undefined_flag=$lt_no_undefined_flag
11466
11467 # Commands used to finish a libtool library installation in a directory.
11468 finish_cmds=$lt_finish_cmds
11469
11470 # Same as above, but a single script fragment to be evaled but not shown.
11471 finish_eval=$lt_finish_eval
11472
11473 # Take the output of nm and produce a listing of raw symbols and C names.
11474 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11475
11476 # Transform the output of nm in a proper C declaration
11477 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11478
11479 # Transform the output of nm in a C name address pair
11480 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11481
11482 # This is the shared library runtime path variable.
11483 runpath_var=$runpath_var
11484
11485 # This is the shared library path variable.
11486 shlibpath_var=$shlibpath_var
11487
11488 # Is shlibpath searched before the hard-coded library search path?
11489 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11490
11491 # How to hardcode a shared library path into an executable.
11492 hardcode_action=$hardcode_action
11493
11494 # Whether we should hardcode library paths into libraries.
11495 hardcode_into_libs=$hardcode_into_libs
11496
11497 # Flag to hardcode \$libdir into a binary during linking.
11498 # This must work even if \$libdir does not exist.
11499 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
11500
11501 # If ld is used when linking, flag to hardcode \$libdir into
11502 # a binary during linking. This must work even if \$libdir does
11503 # not exist.
11504 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
11505
11506 # Whether we need a single -rpath flag with a separated argument.
11507 hardcode_libdir_separator=$lt_hardcode_libdir_separator
11508
11509 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11510 # resulting binary.
11511 hardcode_direct=$hardcode_direct
11512
11513 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11514 # resulting binary.
11515 hardcode_minus_L=$hardcode_minus_L
11516
11517 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11518 # the resulting binary.
11519 hardcode_shlibpath_var=$hardcode_shlibpath_var
11520
11521 # Set to yes if building a shared library automatically hardcodes DIR into the library
11522 # and all subsequent libraries and executables linked against it.
11523 hardcode_automatic=$hardcode_automatic
11524
11525 # Variables whose values should be saved in libtool wrapper scripts and
11526 # restored at relink time.
11527 variables_saved_for_relink="$variables_saved_for_relink"
11528
11529 # Whether libtool must link a program against all its dependency libraries.
11530 link_all_deplibs=$link_all_deplibs
11531
11532 # Compile-time system search path for libraries
11533 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11534
11535 # Run-time system search path for libraries
11536 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11537
11538 # Fix the shell variable \$srcfile for the compiler.
11539 fix_srcfile_path="$fix_srcfile_path"
11540
11541 # Set to yes if exported symbols are required.
11542 always_export_symbols=$always_export_symbols
11543
11544 # The commands to list exported symbols.
11545 export_symbols_cmds=$lt_export_symbols_cmds
11546
11547 # The commands to extract the exported symbol list from a shared archive.
11548 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11549
11550 # Symbols that should not be listed in the preloaded symbols.
11551 exclude_expsyms=$lt_exclude_expsyms
11552
11553 # Symbols that must always be exported.
11554 include_expsyms=$lt_include_expsyms
11555
11556 # ### END LIBTOOL CONFIG
11557
11558 __EOF__
11559
11560
11561   case $host_os in
11562   aix3*)
11563     cat <<\EOF >> "$cfgfile"
11564
11565 # AIX sometimes has problems with the GCC collect2 program.  For some
11566 # reason, if we set the COLLECT_NAMES environment variable, the problems
11567 # vanish in a puff of smoke.
11568 if test "X${COLLECT_NAMES+set}" != Xset; then
11569   COLLECT_NAMES=
11570   export COLLECT_NAMES
11571 fi
11572 EOF
11573     ;;
11574   esac
11575
11576   # We use sed instead of cat because bash on DJGPP gets confused if
11577   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
11578   # text mode, it properly converts lines to CR/LF.  This bash problem
11579   # is reportedly fixed, but why not run on old versions too?
11580   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
11581
11582   mv -f "$cfgfile" "$ofile" || \
11583     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
11584   chmod +x "$ofile"
11585
11586 else
11587   # If there is no Makefile yet, we rely on a make rule to execute
11588   # `config.status --recheck' to rerun these tests and create the
11589   # libtool script then.
11590   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11591   if test -f "$ltmain_in"; then
11592     test -f Makefile && make "$ltmain"
11593   fi
11594 fi
11595
11596
11597 ac_ext=c
11598 ac_cpp='$CPP $CPPFLAGS'
11599 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11600 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11601 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11602
11603 CC="$lt_save_CC"
11604
11605
11606 # Check whether --with-tags was given.
11607 if test "${with_tags+set}" = set; then :
11608   withval=$with_tags; tagnames="$withval"
11609 fi
11610
11611
11612 if test -f "$ltmain" && test -n "$tagnames"; then
11613   if test ! -f "${ofile}"; then
11614     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist" >&5
11615 $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11616   fi
11617
11618   if test -z "$LTCC"; then
11619     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11620     if test -z "$LTCC"; then
11621       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11622 $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11623     else
11624       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11625 $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11626     fi
11627   fi
11628
11629   # Extract list of available tagged configurations in $ofile.
11630   # Note that this assumes the entire list is on one line.
11631   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11632
11633   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11634   for tagname in $tagnames; do
11635     IFS="$lt_save_ifs"
11636     # Check whether tagname contains only valid characters
11637     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11638     "") ;;
11639     *)  as_fn_error "invalid tag name: $tagname" "$LINENO" 5
11640         ;;
11641     esac
11642
11643     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11644     then
11645       as_fn_error "tag name \"$tagname\" already exists" "$LINENO" 5
11646     fi
11647
11648     # Update the list of available tags.
11649     if test -n "$tagname"; then
11650       echo appending configuration tag \"$tagname\" to $ofile
11651
11652       case $tagname in
11653       CXX)
11654         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11655             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11656             (test "X$CXX" != "Xg++"))) ; then
11657           :
11658         else
11659           tagname=""
11660         fi
11661         ;;
11662
11663       F77)
11664         if test -n "$F77" && test "X$F77" != "Xno"; then
11665           :
11666         else
11667           tagname=""
11668         fi
11669         ;;
11670
11671       GCJ)
11672         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11673           :
11674         else
11675           tagname=""
11676         fi
11677         ;;
11678
11679       RC)
11680
11681
11682 # Source file extension for RC test sources.
11683 ac_ext=rc
11684
11685 # Object file extension for compiled RC test sources.
11686 objext=o
11687 objext_RC=$objext
11688
11689 # Code to be used in simple compile tests
11690 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11691
11692 # Code to be used in simple link tests
11693 lt_simple_link_test_code="$lt_simple_compile_test_code"
11694
11695 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11696
11697 # If no C compiler was specified, use CC.
11698 LTCC=${LTCC-"$CC"}
11699
11700 # Allow CC to be a program name with arguments.
11701 compiler=$CC
11702
11703
11704 # save warnings/boilerplate of simple test code
11705 ac_outfile=conftest.$ac_objext
11706 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11707 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11708 _lt_compiler_boilerplate=`cat conftest.err`
11709 $rm conftest*
11710
11711 ac_outfile=conftest.$ac_objext
11712 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11713 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11714 _lt_linker_boilerplate=`cat conftest.err`
11715 $rm conftest*
11716
11717
11718 # Allow CC to be a program name with arguments.
11719 lt_save_CC="$CC"
11720 CC=${RC-"windres"}
11721 compiler=$CC
11722 compiler_RC=$CC
11723 for cc_temp in $compiler""; do
11724   case $cc_temp in
11725     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11726     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11727     \-*) ;;
11728     *) break;;
11729   esac
11730 done
11731 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11732
11733 lt_cv_prog_compiler_c_o_RC=yes
11734
11735 # The else clause should only fire when bootstrapping the
11736 # libtool distribution, otherwise you forgot to ship ltmain.sh
11737 # with your package, and you will get complaints that there are
11738 # no rules to generate ltmain.sh.
11739 if test -f "$ltmain"; then
11740   # See if we are running on zsh, and set the options which allow our commands through
11741   # without removal of \ escapes.
11742   if test -n "${ZSH_VERSION+set}" ; then
11743     setopt NO_GLOB_SUBST
11744   fi
11745   # Now quote all the things that may contain metacharacters while being
11746   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11747   # variables and quote the copies for generation of the libtool script.
11748   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11749     SED SHELL STRIP \
11750     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11751     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11752     deplibs_check_method reload_flag reload_cmds need_locks \
11753     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11754     lt_cv_sys_global_symbol_to_c_name_address \
11755     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11756     old_postinstall_cmds old_postuninstall_cmds \
11757     compiler_RC \
11758     CC_RC \
11759     LD_RC \
11760     lt_prog_compiler_wl_RC \
11761     lt_prog_compiler_pic_RC \
11762     lt_prog_compiler_static_RC \
11763     lt_prog_compiler_no_builtin_flag_RC \
11764     export_dynamic_flag_spec_RC \
11765     thread_safe_flag_spec_RC \
11766     whole_archive_flag_spec_RC \
11767     enable_shared_with_static_runtimes_RC \
11768     old_archive_cmds_RC \
11769     old_archive_from_new_cmds_RC \
11770     predep_objects_RC \
11771     postdep_objects_RC \
11772     predeps_RC \
11773     postdeps_RC \
11774     compiler_lib_search_path_RC \
11775     archive_cmds_RC \
11776     archive_expsym_cmds_RC \
11777     postinstall_cmds_RC \
11778     postuninstall_cmds_RC \
11779     old_archive_from_expsyms_cmds_RC \
11780     allow_undefined_flag_RC \
11781     no_undefined_flag_RC \
11782     export_symbols_cmds_RC \
11783     hardcode_libdir_flag_spec_RC \
11784     hardcode_libdir_flag_spec_ld_RC \
11785     hardcode_libdir_separator_RC \
11786     hardcode_automatic_RC \
11787     module_cmds_RC \
11788     module_expsym_cmds_RC \
11789     lt_cv_prog_compiler_c_o_RC \
11790     exclude_expsyms_RC \
11791     include_expsyms_RC; do
11792
11793     case $var in
11794     old_archive_cmds_RC | \
11795     old_archive_from_new_cmds_RC | \
11796     archive_cmds_RC | \
11797     archive_expsym_cmds_RC | \
11798     module_cmds_RC | \
11799     module_expsym_cmds_RC | \
11800     old_archive_from_expsyms_cmds_RC | \
11801     export_symbols_cmds_RC | \
11802     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11803     postinstall_cmds | postuninstall_cmds | \
11804     old_postinstall_cmds | old_postuninstall_cmds | \
11805     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11806       # Double-quote double-evaled strings.
11807       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11808       ;;
11809     *)
11810       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11811       ;;
11812     esac
11813   done
11814
11815   case $lt_echo in
11816   *'\$0 --fallback-echo"')
11817     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11818     ;;
11819   esac
11820
11821 cfgfile="$ofile"
11822
11823   cat <<__EOF__ >> "$cfgfile"
11824 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11825
11826 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11827
11828 # Shell to use when invoking shell scripts.
11829 SHELL=$lt_SHELL
11830
11831 # Whether or not to build shared libraries.
11832 build_libtool_libs=$enable_shared
11833
11834 # Whether or not to build static libraries.
11835 build_old_libs=$enable_static
11836
11837 # Whether or not to add -lc for building shared libraries.
11838 build_libtool_need_lc=$archive_cmds_need_lc_RC
11839
11840 # Whether or not to disallow shared libs when runtime libs are static
11841 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11842
11843 # Whether or not to optimize for fast installation.
11844 fast_install=$enable_fast_install
11845
11846 # The host system.
11847 host_alias=$host_alias
11848 host=$host
11849 host_os=$host_os
11850
11851 # The build system.
11852 build_alias=$build_alias
11853 build=$build
11854 build_os=$build_os
11855
11856 # An echo program that does not interpret backslashes.
11857 echo=$lt_echo
11858
11859 # The archiver.
11860 AR=$lt_AR
11861 AR_FLAGS=$lt_AR_FLAGS
11862
11863 # A C compiler.
11864 LTCC=$lt_LTCC
11865
11866 # A language-specific compiler.
11867 CC=$lt_compiler_RC
11868
11869 # Is the compiler the GNU C compiler?
11870 with_gcc=$GCC_RC
11871
11872 # An ERE matcher.
11873 EGREP=$lt_EGREP
11874
11875 # The linker used to build libraries.
11876 LD=$lt_LD_RC
11877
11878 # Whether we need hard or soft links.
11879 LN_S=$lt_LN_S
11880
11881 # A BSD-compatible nm program.
11882 NM=$lt_NM
11883
11884 # A symbol stripping program
11885 STRIP=$lt_STRIP
11886
11887 # Used to examine libraries when file_magic_cmd begins "file"
11888 MAGIC_CMD=$MAGIC_CMD
11889
11890 # Used on cygwin: DLL creation program.
11891 DLLTOOL="$DLLTOOL"
11892
11893 # Used on cygwin: object dumper.
11894 OBJDUMP="$OBJDUMP"
11895
11896 # Used on cygwin: assembler.
11897 AS="$AS"
11898
11899 # The name of the directory that contains temporary libtool files.
11900 objdir=$objdir
11901
11902 # How to create reloadable object files.
11903 reload_flag=$lt_reload_flag
11904 reload_cmds=$lt_reload_cmds
11905
11906 # How to pass a linker flag through the compiler.
11907 wl=$lt_lt_prog_compiler_wl_RC
11908
11909 # Object file suffix (normally "o").
11910 objext="$ac_objext"
11911
11912 # Old archive suffix (normally "a").
11913 libext="$libext"
11914
11915 # Shared library suffix (normally ".so").
11916 shrext_cmds='$shrext_cmds'
11917
11918 # Executable file suffix (normally "").
11919 exeext="$exeext"
11920
11921 # Additional compiler flags for building library objects.
11922 pic_flag=$lt_lt_prog_compiler_pic_RC
11923 pic_mode=$pic_mode
11924
11925 # What is the maximum length of a command?
11926 max_cmd_len=$lt_cv_sys_max_cmd_len
11927
11928 # Does compiler simultaneously support -c and -o options?
11929 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11930
11931 # Must we lock files when doing compilation?
11932 need_locks=$lt_need_locks
11933
11934 # Do we need the lib prefix for modules?
11935 need_lib_prefix=$need_lib_prefix
11936
11937 # Do we need a version for libraries?
11938 need_version=$need_version
11939
11940 # Whether dlopen is supported.
11941 dlopen_support=$enable_dlopen
11942
11943 # Whether dlopen of programs is supported.
11944 dlopen_self=$enable_dlopen_self
11945
11946 # Whether dlopen of statically linked programs is supported.
11947 dlopen_self_static=$enable_dlopen_self_static
11948
11949 # Compiler flag to prevent dynamic linking.
11950 link_static_flag=$lt_lt_prog_compiler_static_RC
11951
11952 # Compiler flag to turn off builtin functions.
11953 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11954
11955 # Compiler flag to allow reflexive dlopens.
11956 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11957
11958 # Compiler flag to generate shared objects directly from archives.
11959 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11960
11961 # Compiler flag to generate thread-safe objects.
11962 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11963
11964 # Library versioning type.
11965 version_type=$version_type
11966
11967 # Format of library name prefix.
11968 libname_spec=$lt_libname_spec
11969
11970 # List of archive names.  First name is the real one, the rest are links.
11971 # The last name is the one that the linker finds with -lNAME.
11972 library_names_spec=$lt_library_names_spec
11973
11974 # The coded name of the library, if different from the real name.
11975 soname_spec=$lt_soname_spec
11976
11977 # Commands used to build and install an old-style archive.
11978 RANLIB=$lt_RANLIB
11979 old_archive_cmds=$lt_old_archive_cmds_RC
11980 old_postinstall_cmds=$lt_old_postinstall_cmds
11981 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11982
11983 # Create an old-style archive from a shared archive.
11984 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11985
11986 # Create a temporary old-style archive to link instead of a shared archive.
11987 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11988
11989 # Commands used to build and install a shared archive.
11990 archive_cmds=$lt_archive_cmds_RC
11991 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11992 postinstall_cmds=$lt_postinstall_cmds
11993 postuninstall_cmds=$lt_postuninstall_cmds
11994
11995 # Commands used to build a loadable module (assumed same as above if empty)
11996 module_cmds=$lt_module_cmds_RC
11997 module_expsym_cmds=$lt_module_expsym_cmds_RC
11998
11999 # Commands to strip libraries.
12000 old_striplib=$lt_old_striplib
12001 striplib=$lt_striplib
12002
12003 # Dependencies to place before the objects being linked to create a
12004 # shared library.
12005 predep_objects=$lt_predep_objects_RC
12006
12007 # Dependencies to place after the objects being linked to create a
12008 # shared library.
12009 postdep_objects=$lt_postdep_objects_RC
12010
12011 # Dependencies to place before the objects being linked to create a
12012 # shared library.
12013 predeps=$lt_predeps_RC
12014
12015 # Dependencies to place after the objects being linked to create a
12016 # shared library.
12017 postdeps=$lt_postdeps_RC
12018
12019 # The library search path used internally by the compiler when linking
12020 # a shared library.
12021 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
12022
12023 # Method to check whether dependent libraries are shared objects.
12024 deplibs_check_method=$lt_deplibs_check_method
12025
12026 # Command to use when deplibs_check_method == file_magic.
12027 file_magic_cmd=$lt_file_magic_cmd
12028
12029 # Flag that allows shared libraries with undefined symbols to be built.
12030 allow_undefined_flag=$lt_allow_undefined_flag_RC
12031
12032 # Flag that forces no undefined symbols.
12033 no_undefined_flag=$lt_no_undefined_flag_RC
12034
12035 # Commands used to finish a libtool library installation in a directory.
12036 finish_cmds=$lt_finish_cmds
12037
12038 # Same as above, but a single script fragment to be evaled but not shown.
12039 finish_eval=$lt_finish_eval
12040
12041 # Take the output of nm and produce a listing of raw symbols and C names.
12042 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
12043
12044 # Transform the output of nm in a proper C declaration
12045 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
12046
12047 # Transform the output of nm in a C name address pair
12048 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
12049
12050 # This is the shared library runtime path variable.
12051 runpath_var=$runpath_var
12052
12053 # This is the shared library path variable.
12054 shlibpath_var=$shlibpath_var
12055
12056 # Is shlibpath searched before the hard-coded library search path?
12057 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
12058
12059 # How to hardcode a shared library path into an executable.
12060 hardcode_action=$hardcode_action_RC
12061
12062 # Whether we should hardcode library paths into libraries.
12063 hardcode_into_libs=$hardcode_into_libs
12064
12065 # Flag to hardcode \$libdir into a binary during linking.
12066 # This must work even if \$libdir does not exist.
12067 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
12068
12069 # If ld is used when linking, flag to hardcode \$libdir into
12070 # a binary during linking. This must work even if \$libdir does
12071 # not exist.
12072 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
12073
12074 # Whether we need a single -rpath flag with a separated argument.
12075 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
12076
12077 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
12078 # resulting binary.
12079 hardcode_direct=$hardcode_direct_RC
12080
12081 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
12082 # resulting binary.
12083 hardcode_minus_L=$hardcode_minus_L_RC
12084
12085 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
12086 # the resulting binary.
12087 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
12088
12089 # Set to yes if building a shared library automatically hardcodes DIR into the library
12090 # and all subsequent libraries and executables linked against it.
12091 hardcode_automatic=$hardcode_automatic_RC
12092
12093 # Variables whose values should be saved in libtool wrapper scripts and
12094 # restored at relink time.
12095 variables_saved_for_relink="$variables_saved_for_relink"
12096
12097 # Whether libtool must link a program against all its dependency libraries.
12098 link_all_deplibs=$link_all_deplibs_RC
12099
12100 # Compile-time system search path for libraries
12101 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
12102
12103 # Run-time system search path for libraries
12104 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
12105
12106 # Fix the shell variable \$srcfile for the compiler.
12107 fix_srcfile_path="$fix_srcfile_path_RC"
12108
12109 # Set to yes if exported symbols are required.
12110 always_export_symbols=$always_export_symbols_RC
12111
12112 # The commands to list exported symbols.
12113 export_symbols_cmds=$lt_export_symbols_cmds_RC
12114
12115 # The commands to extract the exported symbol list from a shared archive.
12116 extract_expsyms_cmds=$lt_extract_expsyms_cmds
12117
12118 # Symbols that should not be listed in the preloaded symbols.
12119 exclude_expsyms=$lt_exclude_expsyms_RC
12120
12121 # Symbols that must always be exported.
12122 include_expsyms=$lt_include_expsyms_RC
12123
12124 # ### END LIBTOOL TAG CONFIG: $tagname
12125
12126 __EOF__
12127
12128
12129 else
12130   # If there is no Makefile yet, we rely on a make rule to execute
12131   # `config.status --recheck' to rerun these tests and create the
12132   # libtool script then.
12133   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
12134   if test -f "$ltmain_in"; then
12135     test -f Makefile && make "$ltmain"
12136   fi
12137 fi
12138
12139
12140 ac_ext=c
12141 ac_cpp='$CPP $CPPFLAGS'
12142 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12143 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12144 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12145
12146 CC="$lt_save_CC"
12147
12148         ;;
12149
12150       *)
12151         as_fn_error "Unsupported tag name: $tagname" "$LINENO" 5
12152         ;;
12153       esac
12154
12155       # Append the new tag name to the list of available tags.
12156       if test -n "$tagname" ; then
12157       available_tags="$available_tags $tagname"
12158     fi
12159     fi
12160   done
12161   IFS="$lt_save_ifs"
12162
12163   # Now substitute the updated list of available tags.
12164   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
12165     mv "${ofile}T" "$ofile"
12166     chmod +x "$ofile"
12167   else
12168     rm -f "${ofile}T"
12169     as_fn_error "unable to update list of available tagged configurations." "$LINENO" 5
12170   fi
12171 fi
12172
12173
12174
12175 # This can be used to rebuild libtool when needed
12176 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
12177
12178 # Always use our own libtool.
12179 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
12180
12181 # Prevent multiple expansion
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192 ol_link_perl=no
12193 if test $ol_enable_perl != no ; then
12194         # Extract the first word of "perl", so it can be a program name with args.
12195 set dummy perl; ac_word=$2
12196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12197 $as_echo_n "checking for $ac_word... " >&6; }
12198 if test "${ac_cv_path_PERLBIN+set}" = set; then :
12199   $as_echo_n "(cached) " >&6
12200 else
12201   case $PERLBIN in
12202   [\\/]* | ?:[\\/]*)
12203   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
12204   ;;
12205   *)
12206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12207 for as_dir in $PATH
12208 do
12209   IFS=$as_save_IFS
12210   test -z "$as_dir" && as_dir=.
12211     for ac_exec_ext in '' $ac_executable_extensions; do
12212   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12213     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
12214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12215     break 2
12216   fi
12217 done
12218   done
12219 IFS=$as_save_IFS
12220
12221   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
12222   ;;
12223 esac
12224 fi
12225 PERLBIN=$ac_cv_path_PERLBIN
12226 if test -n "$PERLBIN"; then
12227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLBIN" >&5
12228 $as_echo "$PERLBIN" >&6; }
12229 else
12230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12231 $as_echo "no" >&6; }
12232 fi
12233
12234
12235
12236         if test "no$PERLBIN" = "no" ; then
12237                 if test $ol_enable_perl = yes ; then
12238                         as_fn_error "could not locate perl" "$LINENO" 5
12239                 fi
12240
12241         else
12242                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
12243                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
12244
12245                 if test x"$ol_enable_perl" = "xyes" ; then
12246                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
12247                 else
12248                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
12249                 fi
12250                                 ol_link_perl=yes
12251         fi
12252 fi
12253
12254 ac_ext=c
12255 ac_cpp='$CPP $CPPFLAGS'
12256 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12257 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12258 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
12260 $as_echo_n "checking how to run the C preprocessor... " >&6; }
12261 # On Suns, sometimes $CPP names a directory.
12262 if test -n "$CPP" && test -d "$CPP"; then
12263   CPP=
12264 fi
12265 if test -z "$CPP"; then
12266   if test "${ac_cv_prog_CPP+set}" = set; then :
12267   $as_echo_n "(cached) " >&6
12268 else
12269       # Double quotes because CPP needs to be expanded
12270     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
12271     do
12272       ac_preproc_ok=false
12273 for ac_c_preproc_warn_flag in '' yes
12274 do
12275   # Use a header file that comes with gcc, so configuring glibc
12276   # with a fresh cross-compiler works.
12277   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12278   # <limits.h> exists even on freestanding compilers.
12279   # On the NeXT, cc -E runs the code through the compiler's parser,
12280   # not just through cpp. "Syntax error" is here to catch this case.
12281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12282 /* end confdefs.h.  */
12283 #ifdef __STDC__
12284 # include <limits.h>
12285 #else
12286 # include <assert.h>
12287 #endif
12288                      Syntax error
12289 _ACEOF
12290 if ac_fn_c_try_cpp "$LINENO"; then :
12291
12292 else
12293   # Broken: fails on valid input.
12294 continue
12295 fi
12296 rm -f conftest.err conftest.$ac_ext
12297
12298   # OK, works on sane cases.  Now check whether nonexistent headers
12299   # can be detected and how.
12300   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12301 /* end confdefs.h.  */
12302 #include <ac_nonexistent.h>
12303 _ACEOF
12304 if ac_fn_c_try_cpp "$LINENO"; then :
12305   # Broken: success on invalid input.
12306 continue
12307 else
12308   # Passes both tests.
12309 ac_preproc_ok=:
12310 break
12311 fi
12312 rm -f conftest.err conftest.$ac_ext
12313
12314 done
12315 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12316 rm -f conftest.err conftest.$ac_ext
12317 if $ac_preproc_ok; then :
12318   break
12319 fi
12320
12321     done
12322     ac_cv_prog_CPP=$CPP
12323
12324 fi
12325   CPP=$ac_cv_prog_CPP
12326 else
12327   ac_cv_prog_CPP=$CPP
12328 fi
12329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
12330 $as_echo "$CPP" >&6; }
12331 ac_preproc_ok=false
12332 for ac_c_preproc_warn_flag in '' yes
12333 do
12334   # Use a header file that comes with gcc, so configuring glibc
12335   # with a fresh cross-compiler works.
12336   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12337   # <limits.h> exists even on freestanding compilers.
12338   # On the NeXT, cc -E runs the code through the compiler's parser,
12339   # not just through cpp. "Syntax error" is here to catch this case.
12340   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12341 /* end confdefs.h.  */
12342 #ifdef __STDC__
12343 # include <limits.h>
12344 #else
12345 # include <assert.h>
12346 #endif
12347                      Syntax error
12348 _ACEOF
12349 if ac_fn_c_try_cpp "$LINENO"; then :
12350
12351 else
12352   # Broken: fails on valid input.
12353 continue
12354 fi
12355 rm -f conftest.err conftest.$ac_ext
12356
12357   # OK, works on sane cases.  Now check whether nonexistent headers
12358   # can be detected and how.
12359   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12360 /* end confdefs.h.  */
12361 #include <ac_nonexistent.h>
12362 _ACEOF
12363 if ac_fn_c_try_cpp "$LINENO"; then :
12364   # Broken: success on invalid input.
12365 continue
12366 else
12367   # Passes both tests.
12368 ac_preproc_ok=:
12369 break
12370 fi
12371 rm -f conftest.err conftest.$ac_ext
12372
12373 done
12374 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12375 rm -f conftest.err conftest.$ac_ext
12376 if $ac_preproc_ok; then :
12377
12378 else
12379   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12380 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12381 as_fn_error "C preprocessor \"$CPP\" fails sanity check
12382 See \`config.log' for more details." "$LINENO" 5; }
12383 fi
12384
12385 ac_ext=c
12386 ac_cpp='$CPP $CPPFLAGS'
12387 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12388 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12389 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12390
12391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using MS Visual C++" >&5
12392 $as_echo_n "checking whether we are using MS Visual C++... " >&6; }
12393 if test "${ol_cv_msvc+set}" = set; then :
12394   $as_echo_n "(cached) " >&6
12395 else
12396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12397 /* end confdefs.h.  */
12398
12399 #ifndef _MSC_VER
12400 #include <__FOO__/generate_error.h>
12401 #endif
12402
12403 _ACEOF
12404 if ac_fn_c_try_cpp "$LINENO"; then :
12405   ol_cv_msvc=yes
12406 else
12407   ol_cv_msvc=no
12408 fi
12409 rm -f conftest.err conftest.$ac_ext
12410 fi
12411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_msvc" >&5
12412 $as_echo "$ol_cv_msvc" >&6; }
12413
12414 case $host_os in
12415   *mingw32* ) ac_cv_mingw32=yes ;;
12416   *cygwin* ) ac_cv_cygwin=yes ;;
12417   *interix* ) ac_cv_interix=yes ;;
12418 esac
12419
12420
12421
12422
12423 cat >>confdefs.h <<_ACEOF
12424 #define EXEEXT "${EXEEXT}"
12425 _ACEOF
12426
12427
12428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for be_app in -lbe" >&5
12429 $as_echo_n "checking for be_app in -lbe... " >&6; }
12430 if test "${ac_cv_lib_be_be_app+set}" = set; then :
12431   $as_echo_n "(cached) " >&6
12432 else
12433   ac_check_lib_save_LIBS=$LIBS
12434 LIBS="-lbe -lroot -lnet $LIBS"
12435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12436 /* end confdefs.h.  */
12437
12438 /* Override any GCC internal prototype to avoid an error.
12439    Use char because int might match the return type of a GCC
12440    builtin and then its argument prototype would still apply.  */
12441 #ifdef __cplusplus
12442 extern "C"
12443 #endif
12444 char be_app ();
12445 int
12446 main ()
12447 {
12448 return be_app ();
12449   ;
12450   return 0;
12451 }
12452 _ACEOF
12453 if ac_fn_c_try_link "$LINENO"; then :
12454   ac_cv_lib_be_be_app=yes
12455 else
12456   ac_cv_lib_be_be_app=no
12457 fi
12458 rm -f core conftest.err conftest.$ac_objext \
12459     conftest$ac_exeext conftest.$ac_ext
12460 LIBS=$ac_check_lib_save_LIBS
12461 fi
12462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_be_be_app" >&5
12463 $as_echo "$ac_cv_lib_be_be_app" >&6; }
12464 if test "x$ac_cv_lib_be_be_app" = x""yes; then :
12465   LIBS="$LIBS -lbe -lroot -lnet"
12466 else
12467   :
12468 fi
12469
12470
12471 ac_ext=c
12472 ac_cpp='$CPP $CPPFLAGS'
12473 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12474 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12475 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12476 if test -n "$ac_tool_prefix"; then
12477   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
12478 set dummy ${ac_tool_prefix}gcc; ac_word=$2
12479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12480 $as_echo_n "checking for $ac_word... " >&6; }
12481 if test "${ac_cv_prog_CC+set}" = set; then :
12482   $as_echo_n "(cached) " >&6
12483 else
12484   if test -n "$CC"; then
12485   ac_cv_prog_CC="$CC" # Let the user override the test.
12486 else
12487 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12488 for as_dir in $PATH
12489 do
12490   IFS=$as_save_IFS
12491   test -z "$as_dir" && as_dir=.
12492     for ac_exec_ext in '' $ac_executable_extensions; do
12493   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12494     ac_cv_prog_CC="${ac_tool_prefix}gcc"
12495     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12496     break 2
12497   fi
12498 done
12499   done
12500 IFS=$as_save_IFS
12501
12502 fi
12503 fi
12504 CC=$ac_cv_prog_CC
12505 if test -n "$CC"; then
12506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12507 $as_echo "$CC" >&6; }
12508 else
12509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12510 $as_echo "no" >&6; }
12511 fi
12512
12513
12514 fi
12515 if test -z "$ac_cv_prog_CC"; then
12516   ac_ct_CC=$CC
12517   # Extract the first word of "gcc", so it can be a program name with args.
12518 set dummy gcc; ac_word=$2
12519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12520 $as_echo_n "checking for $ac_word... " >&6; }
12521 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
12522   $as_echo_n "(cached) " >&6
12523 else
12524   if test -n "$ac_ct_CC"; then
12525   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12526 else
12527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12528 for as_dir in $PATH
12529 do
12530   IFS=$as_save_IFS
12531   test -z "$as_dir" && as_dir=.
12532     for ac_exec_ext in '' $ac_executable_extensions; do
12533   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12534     ac_cv_prog_ac_ct_CC="gcc"
12535     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12536     break 2
12537   fi
12538 done
12539   done
12540 IFS=$as_save_IFS
12541
12542 fi
12543 fi
12544 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12545 if test -n "$ac_ct_CC"; then
12546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12547 $as_echo "$ac_ct_CC" >&6; }
12548 else
12549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12550 $as_echo "no" >&6; }
12551 fi
12552
12553   if test "x$ac_ct_CC" = x; then
12554     CC=""
12555   else
12556     case $cross_compiling:$ac_tool_warned in
12557 yes:)
12558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12559 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12560 ac_tool_warned=yes ;;
12561 esac
12562     CC=$ac_ct_CC
12563   fi
12564 else
12565   CC="$ac_cv_prog_CC"
12566 fi
12567
12568 if test -z "$CC"; then
12569           if test -n "$ac_tool_prefix"; then
12570     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12571 set dummy ${ac_tool_prefix}cc; ac_word=$2
12572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12573 $as_echo_n "checking for $ac_word... " >&6; }
12574 if test "${ac_cv_prog_CC+set}" = set; then :
12575   $as_echo_n "(cached) " >&6
12576 else
12577   if test -n "$CC"; then
12578   ac_cv_prog_CC="$CC" # Let the user override the test.
12579 else
12580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12581 for as_dir in $PATH
12582 do
12583   IFS=$as_save_IFS
12584   test -z "$as_dir" && as_dir=.
12585     for ac_exec_ext in '' $ac_executable_extensions; do
12586   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12587     ac_cv_prog_CC="${ac_tool_prefix}cc"
12588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12589     break 2
12590   fi
12591 done
12592   done
12593 IFS=$as_save_IFS
12594
12595 fi
12596 fi
12597 CC=$ac_cv_prog_CC
12598 if test -n "$CC"; then
12599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12600 $as_echo "$CC" >&6; }
12601 else
12602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12603 $as_echo "no" >&6; }
12604 fi
12605
12606
12607   fi
12608 fi
12609 if test -z "$CC"; then
12610   # Extract the first word of "cc", so it can be a program name with args.
12611 set dummy cc; ac_word=$2
12612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12613 $as_echo_n "checking for $ac_word... " >&6; }
12614 if test "${ac_cv_prog_CC+set}" = set; then :
12615   $as_echo_n "(cached) " >&6
12616 else
12617   if test -n "$CC"; then
12618   ac_cv_prog_CC="$CC" # Let the user override the test.
12619 else
12620   ac_prog_rejected=no
12621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12622 for as_dir in $PATH
12623 do
12624   IFS=$as_save_IFS
12625   test -z "$as_dir" && as_dir=.
12626     for ac_exec_ext in '' $ac_executable_extensions; do
12627   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12628     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12629        ac_prog_rejected=yes
12630        continue
12631      fi
12632     ac_cv_prog_CC="cc"
12633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12634     break 2
12635   fi
12636 done
12637   done
12638 IFS=$as_save_IFS
12639
12640 if test $ac_prog_rejected = yes; then
12641   # We found a bogon in the path, so make sure we never use it.
12642   set dummy $ac_cv_prog_CC
12643   shift
12644   if test $# != 0; then
12645     # We chose a different compiler from the bogus one.
12646     # However, it has the same basename, so the bogon will be chosen
12647     # first if we set CC to just the basename; use the full file name.
12648     shift
12649     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12650   fi
12651 fi
12652 fi
12653 fi
12654 CC=$ac_cv_prog_CC
12655 if test -n "$CC"; then
12656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12657 $as_echo "$CC" >&6; }
12658 else
12659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12660 $as_echo "no" >&6; }
12661 fi
12662
12663
12664 fi
12665 if test -z "$CC"; then
12666   if test -n "$ac_tool_prefix"; then
12667   for ac_prog in cl.exe
12668   do
12669     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12670 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12672 $as_echo_n "checking for $ac_word... " >&6; }
12673 if test "${ac_cv_prog_CC+set}" = set; then :
12674   $as_echo_n "(cached) " >&6
12675 else
12676   if test -n "$CC"; then
12677   ac_cv_prog_CC="$CC" # Let the user override the test.
12678 else
12679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12680 for as_dir in $PATH
12681 do
12682   IFS=$as_save_IFS
12683   test -z "$as_dir" && as_dir=.
12684     for ac_exec_ext in '' $ac_executable_extensions; do
12685   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12686     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12688     break 2
12689   fi
12690 done
12691   done
12692 IFS=$as_save_IFS
12693
12694 fi
12695 fi
12696 CC=$ac_cv_prog_CC
12697 if test -n "$CC"; then
12698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12699 $as_echo "$CC" >&6; }
12700 else
12701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12702 $as_echo "no" >&6; }
12703 fi
12704
12705
12706     test -n "$CC" && break
12707   done
12708 fi
12709 if test -z "$CC"; then
12710   ac_ct_CC=$CC
12711   for ac_prog in cl.exe
12712 do
12713   # Extract the first word of "$ac_prog", so it can be a program name with args.
12714 set dummy $ac_prog; ac_word=$2
12715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12716 $as_echo_n "checking for $ac_word... " >&6; }
12717 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
12718   $as_echo_n "(cached) " >&6
12719 else
12720   if test -n "$ac_ct_CC"; then
12721   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12722 else
12723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12724 for as_dir in $PATH
12725 do
12726   IFS=$as_save_IFS
12727   test -z "$as_dir" && as_dir=.
12728     for ac_exec_ext in '' $ac_executable_extensions; do
12729   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12730     ac_cv_prog_ac_ct_CC="$ac_prog"
12731     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12732     break 2
12733   fi
12734 done
12735   done
12736 IFS=$as_save_IFS
12737
12738 fi
12739 fi
12740 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12741 if test -n "$ac_ct_CC"; then
12742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12743 $as_echo "$ac_ct_CC" >&6; }
12744 else
12745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12746 $as_echo "no" >&6; }
12747 fi
12748
12749
12750   test -n "$ac_ct_CC" && break
12751 done
12752
12753   if test "x$ac_ct_CC" = x; then
12754     CC=""
12755   else
12756     case $cross_compiling:$ac_tool_warned in
12757 yes:)
12758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12759 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12760 ac_tool_warned=yes ;;
12761 esac
12762     CC=$ac_ct_CC
12763   fi
12764 fi
12765
12766 fi
12767
12768
12769 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12770 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12771 as_fn_error "no acceptable C compiler found in \$PATH
12772 See \`config.log' for more details." "$LINENO" 5; }
12773
12774 # Provide some information about the compiler.
12775 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
12776 set X $ac_compile
12777 ac_compiler=$2
12778 for ac_option in --version -v -V -qversion; do
12779   { { ac_try="$ac_compiler $ac_option >&5"
12780 case "(($ac_try" in
12781   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12782   *) ac_try_echo=$ac_try;;
12783 esac
12784 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12785 $as_echo "$ac_try_echo"; } >&5
12786   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
12787   ac_status=$?
12788   if test -s conftest.err; then
12789     sed '10a\
12790 ... rest of stderr output deleted ...
12791          10q' conftest.err >conftest.er1
12792     cat conftest.er1 >&5
12793   fi
12794   rm -f conftest.er1 conftest.err
12795   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12796   test $ac_status = 0; }
12797 done
12798
12799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
12800 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
12801 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
12802   $as_echo_n "(cached) " >&6
12803 else
12804   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12805 /* end confdefs.h.  */
12806
12807 int
12808 main ()
12809 {
12810 #ifndef __GNUC__
12811        choke me
12812 #endif
12813
12814   ;
12815   return 0;
12816 }
12817 _ACEOF
12818 if ac_fn_c_try_compile "$LINENO"; then :
12819   ac_compiler_gnu=yes
12820 else
12821   ac_compiler_gnu=no
12822 fi
12823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12824 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12825
12826 fi
12827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
12828 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
12829 if test $ac_compiler_gnu = yes; then
12830   GCC=yes
12831 else
12832   GCC=
12833 fi
12834 ac_test_CFLAGS=${CFLAGS+set}
12835 ac_save_CFLAGS=$CFLAGS
12836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
12837 $as_echo_n "checking whether $CC accepts -g... " >&6; }
12838 if test "${ac_cv_prog_cc_g+set}" = set; then :
12839   $as_echo_n "(cached) " >&6
12840 else
12841   ac_save_c_werror_flag=$ac_c_werror_flag
12842    ac_c_werror_flag=yes
12843    ac_cv_prog_cc_g=no
12844    CFLAGS="-g"
12845    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12846 /* end confdefs.h.  */
12847
12848 int
12849 main ()
12850 {
12851
12852   ;
12853   return 0;
12854 }
12855 _ACEOF
12856 if ac_fn_c_try_compile "$LINENO"; then :
12857   ac_cv_prog_cc_g=yes
12858 else
12859   CFLAGS=""
12860       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12861 /* end confdefs.h.  */
12862
12863 int
12864 main ()
12865 {
12866
12867   ;
12868   return 0;
12869 }
12870 _ACEOF
12871 if ac_fn_c_try_compile "$LINENO"; then :
12872
12873 else
12874   ac_c_werror_flag=$ac_save_c_werror_flag
12875          CFLAGS="-g"
12876          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12877 /* end confdefs.h.  */
12878
12879 int
12880 main ()
12881 {
12882
12883   ;
12884   return 0;
12885 }
12886 _ACEOF
12887 if ac_fn_c_try_compile "$LINENO"; then :
12888   ac_cv_prog_cc_g=yes
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 fi
12894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12895    ac_c_werror_flag=$ac_save_c_werror_flag
12896 fi
12897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
12898 $as_echo "$ac_cv_prog_cc_g" >&6; }
12899 if test "$ac_test_CFLAGS" = set; then
12900   CFLAGS=$ac_save_CFLAGS
12901 elif test $ac_cv_prog_cc_g = yes; then
12902   if test "$GCC" = yes; then
12903     CFLAGS="-g -O2"
12904   else
12905     CFLAGS="-g"
12906   fi
12907 else
12908   if test "$GCC" = yes; then
12909     CFLAGS="-O2"
12910   else
12911     CFLAGS=
12912   fi
12913 fi
12914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
12915 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
12916 if test "${ac_cv_prog_cc_c89+set}" = set; then :
12917   $as_echo_n "(cached) " >&6
12918 else
12919   ac_cv_prog_cc_c89=no
12920 ac_save_CC=$CC
12921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12922 /* end confdefs.h.  */
12923 #include <stdarg.h>
12924 #include <stdio.h>
12925 #include <sys/types.h>
12926 #include <sys/stat.h>
12927 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12928 struct buf { int x; };
12929 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12930 static char *e (p, i)
12931      char **p;
12932      int i;
12933 {
12934   return p[i];
12935 }
12936 static char *f (char * (*g) (char **, int), char **p, ...)
12937 {
12938   char *s;
12939   va_list v;
12940   va_start (v,p);
12941   s = g (p, va_arg (v,int));
12942   va_end (v);
12943   return s;
12944 }
12945
12946 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12947    function prototypes and stuff, but not '\xHH' hex character constants.
12948    These don't provoke an error unfortunately, instead are silently treated
12949    as 'x'.  The following induces an error, until -std is added to get
12950    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12951    array size at least.  It's necessary to write '\x00'==0 to get something
12952    that's true only with -std.  */
12953 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12954
12955 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
12956    inside strings and character constants.  */
12957 #define FOO(x) 'x'
12958 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
12959
12960 int test (int i, double x);
12961 struct s1 {int (*f) (int a);};
12962 struct s2 {int (*f) (double a);};
12963 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12964 int argc;
12965 char **argv;
12966 int
12967 main ()
12968 {
12969 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12970   ;
12971   return 0;
12972 }
12973 _ACEOF
12974 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
12975         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12976 do
12977   CC="$ac_save_CC $ac_arg"
12978   if ac_fn_c_try_compile "$LINENO"; then :
12979   ac_cv_prog_cc_c89=$ac_arg
12980 fi
12981 rm -f core conftest.err conftest.$ac_objext
12982   test "x$ac_cv_prog_cc_c89" != "xno" && break
12983 done
12984 rm -f conftest.$ac_ext
12985 CC=$ac_save_CC
12986
12987 fi
12988 # AC_CACHE_VAL
12989 case "x$ac_cv_prog_cc_c89" in
12990   x)
12991     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12992 $as_echo "none needed" >&6; } ;;
12993   xno)
12994     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12995 $as_echo "unsupported" >&6; } ;;
12996   *)
12997     CC="$CC $ac_cv_prog_cc_c89"
12998     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
12999 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
13000 esac
13001 if test "x$ac_cv_prog_cc_c89" != xno; then :
13002
13003 fi
13004
13005 ac_ext=c
13006 ac_cpp='$CPP $CPPFLAGS'
13007 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13008 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13009 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13010
13011 depcc="$CC"   am_compiler_list=
13012
13013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
13014 $as_echo_n "checking dependency style of $depcc... " >&6; }
13015 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
13016   $as_echo_n "(cached) " >&6
13017 else
13018   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
13019   # We make a subdir and do the tests there.  Otherwise we can end up
13020   # making bogus files that we don't know about and never remove.  For
13021   # instance it was reported that on HP-UX the gcc test will end up
13022   # making a dummy file named `D' -- because `-MD' means `put the output
13023   # in D'.
13024   mkdir conftest.dir
13025   # Copy depcomp to subdir because otherwise we won't find it if we're
13026   # using a relative directory.
13027   cp "$am_depcomp" conftest.dir
13028   cd conftest.dir
13029   # We will build objects and dependencies in a subdirectory because
13030   # it helps to detect inapplicable dependency modes.  For instance
13031   # both Tru64's cc and ICC support -MD to output dependencies as a
13032   # side effect of compilation, but ICC will put the dependencies in
13033   # the current directory while Tru64 will put them in the object
13034   # directory.
13035   mkdir sub
13036
13037   am_cv_CC_dependencies_compiler_type=none
13038   if test "$am_compiler_list" = ""; then
13039      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
13040   fi
13041   for depmode in $am_compiler_list; do
13042     # Setup a source with many dependencies, because some compilers
13043     # like to wrap large dependency lists on column 80 (with \), and
13044     # we should not choose a depcomp mode which is confused by this.
13045     #
13046     # We need to recreate these files for each test, as the compiler may
13047     # overwrite some of them when testing with obscure command lines.
13048     # This happens at least with the AIX C compiler.
13049     : > sub/conftest.c
13050     for i in 1 2 3 4 5 6; do
13051       echo '#include "conftst'$i'.h"' >> sub/conftest.c
13052       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
13053       # Solaris 8's {/usr,}/bin/sh.
13054       touch sub/conftst$i.h
13055     done
13056     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
13057
13058     case $depmode in
13059     nosideeffect)
13060       # after this tag, mechanisms are not by side-effect, so they'll
13061       # only be used when explicitly requested
13062       if test "x$enable_dependency_tracking" = xyes; then
13063         continue
13064       else
13065         break
13066       fi
13067       ;;
13068     none) break ;;
13069     esac
13070     # We check with `-c' and `-o' for the sake of the "dashmstdout"
13071     # mode.  It turns out that the SunPro C++ compiler does not properly
13072     # handle `-M -o', and we need to detect this.
13073     if depmode=$depmode \
13074        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
13075        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
13076        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
13077          >/dev/null 2>conftest.err &&
13078        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
13079        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
13080        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
13081       # icc doesn't choke on unknown options, it will just issue warnings
13082       # or remarks (even with -Werror).  So we grep stderr for any message
13083       # that says an option was ignored or not supported.
13084       # When given -MP, icc 7.0 and 7.1 complain thusly:
13085       #   icc: Command line warning: ignoring option '-M'; no argument required
13086       # The diagnosis changed in icc 8.0:
13087       #   icc: Command line remark: option '-MP' not supported
13088       if (grep 'ignoring option' conftest.err ||
13089           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
13090         am_cv_CC_dependencies_compiler_type=$depmode
13091         break
13092       fi
13093     fi
13094   done
13095
13096   cd ..
13097   rm -rf conftest.dir
13098 else
13099   am_cv_CC_dependencies_compiler_type=none
13100 fi
13101
13102 fi
13103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
13104 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
13105 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
13106
13107
13108
13109 if
13110   test "x$enable_dependency_tracking" != xno \
13111   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
13112   am__fastdepCC_TRUE=
13113   am__fastdepCC_FALSE='#'
13114 else
13115   am__fastdepCC_TRUE='#'
13116   am__fastdepCC_FALSE=
13117 fi
13118
13119
13120 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
13121         as_fn_error "OpenLDAP requires compiler to support STDC constructs." "$LINENO" 5
13122 fi
13123
13124 # test for make depend flag
13125 OL_MKDEP=
13126 OL_MKDEP_FLAGS=
13127 if test -z "${MKDEP}"; then
13128         OL_MKDEP="${CC-cc}"
13129         if test -z "${MKDEP_FLAGS}"; then
13130                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${OL_MKDEP} depend flag" >&5
13131 $as_echo_n "checking for ${OL_MKDEP} depend flag... " >&6; }
13132 if test "${ol_cv_mkdep+set}" = set; then :
13133   $as_echo_n "(cached) " >&6
13134 else
13135
13136                         ol_cv_mkdep=no
13137                         for flag in "-M" "-xM"; do
13138                                 cat > conftest.c <<EOF
13139  noCode;
13140 EOF
13141                                 if { ac_try='$OL_MKDEP $flag conftest.c'
13142   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
13143   (eval $ac_try) 2>&5
13144   ac_status=$?
13145   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13146   test $ac_status = 0; }; } \
13147                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
13148                                 then
13149                                         if test ! -f conftest."${ac_object}" ; then
13150                                                 ol_cv_mkdep=$flag
13151                                                 OL_MKDEP_FLAGS="$flag"
13152                                                 break
13153                                         fi
13154                                 fi
13155                         done
13156                         rm -f conftest*
13157
13158 fi
13159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_mkdep" >&5
13160 $as_echo "$ol_cv_mkdep" >&6; }
13161                 test "$ol_cv_mkdep" = no && OL_MKDEP=":"
13162         else
13163                 cc_cv_mkdep=yes
13164                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13165         fi
13166 else
13167         cc_cv_mkdep=yes
13168         OL_MKDEP="${MKDEP}"
13169         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13170 fi
13171
13172
13173
13174 if test "${ol_cv_mkdep}" = no ; then
13175         # this will soon become an error
13176         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: do not know how to generate dependencies" >&5
13177 $as_echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
13178 fi
13179
13180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for afopen in -ls" >&5
13181 $as_echo_n "checking for afopen in -ls... " >&6; }
13182 if test "${ac_cv_lib_s_afopen+set}" = set; then :
13183   $as_echo_n "(cached) " >&6
13184 else
13185   ac_check_lib_save_LIBS=$LIBS
13186 LIBS="-ls  $LIBS"
13187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13188 /* end confdefs.h.  */
13189
13190 /* Override any GCC internal prototype to avoid an error.
13191    Use char because int might match the return type of a GCC
13192    builtin and then its argument prototype would still apply.  */
13193 #ifdef __cplusplus
13194 extern "C"
13195 #endif
13196 char afopen ();
13197 int
13198 main ()
13199 {
13200 return afopen ();
13201   ;
13202   return 0;
13203 }
13204 _ACEOF
13205 if ac_fn_c_try_link "$LINENO"; then :
13206   ac_cv_lib_s_afopen=yes
13207 else
13208   ac_cv_lib_s_afopen=no
13209 fi
13210 rm -f core conftest.err conftest.$ac_objext \
13211     conftest$ac_exeext conftest.$ac_ext
13212 LIBS=$ac_check_lib_save_LIBS
13213 fi
13214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_afopen" >&5
13215 $as_echo "$ac_cv_lib_s_afopen" >&6; }
13216 if test "x$ac_cv_lib_s_afopen" = x""yes; then :
13217
13218         AUTH_LIBS=-ls
13219
13220 $as_echo "#define HAVE_AIX_SECURITY 1" >>confdefs.h
13221
13222
13223 fi
13224
13225
13226 case "$target" in
13227 *-ibm-openedition)
13228         ac_cv_func_getopt=no
13229
13230 $as_echo "#define BOTH_STRINGS_H 1" >>confdefs.h
13231
13232         ;;
13233 esac
13234
13235 ol_link_modules=no
13236 WITH_MODULES_ENABLED=no
13237 if test $ol_enable_modules != no ; then
13238         for ac_header in ltdl.h
13239 do :
13240   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
13241 if test "x$ac_cv_header_ltdl_h" = x""yes; then :
13242   cat >>confdefs.h <<_ACEOF
13243 #define HAVE_LTDL_H 1
13244 _ACEOF
13245
13246 fi
13247
13248 done
13249
13250
13251         if test $ac_cv_header_ltdl_h = no ; then
13252                 as_fn_error "could not locate libtool ltdl.h" "$LINENO" 5
13253         fi
13254
13255         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
13256 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
13257 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
13258   $as_echo_n "(cached) " >&6
13259 else
13260   ac_check_lib_save_LIBS=$LIBS
13261 LIBS="-lltdl  $LIBS"
13262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13263 /* end confdefs.h.  */
13264
13265 /* Override any GCC internal prototype to avoid an error.
13266    Use char because int might match the return type of a GCC
13267    builtin and then its argument prototype would still apply.  */
13268 #ifdef __cplusplus
13269 extern "C"
13270 #endif
13271 char lt_dlinit ();
13272 int
13273 main ()
13274 {
13275 return lt_dlinit ();
13276   ;
13277   return 0;
13278 }
13279 _ACEOF
13280 if ac_fn_c_try_link "$LINENO"; then :
13281   ac_cv_lib_ltdl_lt_dlinit=yes
13282 else
13283   ac_cv_lib_ltdl_lt_dlinit=no
13284 fi
13285 rm -f core conftest.err conftest.$ac_objext \
13286     conftest$ac_exeext conftest.$ac_ext
13287 LIBS=$ac_check_lib_save_LIBS
13288 fi
13289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13290 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
13291 if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
13292
13293                 MODULES_LIBS=-lltdl
13294
13295 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
13296
13297
13298 fi
13299
13300
13301         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13302                 as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
13303         fi
13304         ol_link_modules=yes
13305         WITH_MODULES_ENABLED=yes
13306
13307 else
13308         for i in $Backends; do
13309                 eval "ol_tmp=\$ol_enable_$i"
13310                 if test $ol_tmp = mod ; then
13311                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i backend" >&5
13312 $as_echo "$as_me: WARNING: building static $i backend" >&2;}
13313                         eval "ol_enable_$i=yes"
13314                 fi
13315         done
13316         for i in $Overlays; do
13317                 eval "ol_tmp=\$ol_enable_$i"
13318                 if test $ol_tmp = mod ; then
13319                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i overlay" >&5
13320 $as_echo "$as_me: WARNING: building static $i overlay" >&2;}
13321                         eval "ol_enable_$i=yes"
13322                 fi
13323         done
13324 fi
13325
13326 # test for EBCDIC
13327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EBCDIC" >&5
13328 $as_echo_n "checking for EBCDIC... " >&6; }
13329 if test "${ol_cv_cpp_ebcdic+set}" = set; then :
13330   $as_echo_n "(cached) " >&6
13331 else
13332
13333         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13334 /* end confdefs.h.  */
13335
13336 #if !('M' == 0xd4)
13337 #include <__ASCII__/generate_error.h>
13338 #endif
13339
13340 _ACEOF
13341 if ac_fn_c_try_cpp "$LINENO"; then :
13342   ol_cv_cpp_ebcdic=yes
13343 else
13344   ol_cv_cpp_ebcdic=no
13345 fi
13346 rm -f conftest.err conftest.$ac_ext
13347 fi
13348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cpp_ebcdic" >&5
13349 $as_echo "$ol_cv_cpp_ebcdic" >&6; }
13350 if test $ol_cv_cpp_ebcdic = yes ; then
13351
13352 $as_echo "#define HAVE_EBCDIC 1" >>confdefs.h
13353
13354 fi
13355
13356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13357 $as_echo_n "checking for ANSI C header files... " >&6; }
13358 if test "${ol_cv_header_stdc+set}" = set; then :
13359   $as_echo_n "(cached) " >&6
13360 else
13361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13362 /* end confdefs.h.  */
13363 #include <stdlib.h>
13364 #include <stdarg.h>
13365 #include <string.h>
13366 #include <float.h>
13367 _ACEOF
13368 if ac_fn_c_try_cpp "$LINENO"; then :
13369   ol_cv_header_stdc=yes
13370 else
13371   ol_cv_header_stdc=no
13372 fi
13373 rm -f conftest.err conftest.$ac_ext
13374
13375 if test $ol_cv_header_stdc = yes; then
13376   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13378 /* end confdefs.h.  */
13379 #include <string.h>
13380
13381 _ACEOF
13382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13383   $EGREP "memchr" >/dev/null 2>&1; then :
13384
13385 else
13386   ol_cv_header_stdc=no
13387 fi
13388 rm -f conftest*
13389
13390 fi
13391
13392 if test $ol_cv_header_stdc = yes; then
13393   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13395 /* end confdefs.h.  */
13396 #include <stdlib.h>
13397
13398 _ACEOF
13399 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13400   $EGREP "free" >/dev/null 2>&1; then :
13401
13402 else
13403   ol_cv_header_stdc=no
13404 fi
13405 rm -f conftest*
13406
13407 fi
13408
13409 if test $ol_cv_header_stdc = yes; then
13410   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13411 if test "$cross_compiling" = yes; then :
13412   :
13413 else
13414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13415 /* end confdefs.h.  */
13416 #include <ctype.h>
13417 #ifndef HAVE_EBCDIC
13418 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13419 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13420 #else
13421 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13422                 || ('j' <= (c) && (c) <= 'r') \
13423                 || ('s' <= (c) && (c) <= 'z'))
13424 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13425 #endif
13426 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13427 int main () { int i; for (i = 0; i < 256; i++)
13428 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13429 exit (0); }
13430
13431 _ACEOF
13432 if ac_fn_c_try_run "$LINENO"; then :
13433
13434 else
13435   ol_cv_header_stdc=no
13436 fi
13437 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13438   conftest.$ac_objext conftest.beam conftest.$ac_ext
13439 fi
13440
13441 fi
13442 fi
13443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_stdc" >&5
13444 $as_echo "$ol_cv_header_stdc" >&6; }
13445 if test $ol_cv_header_stdc = yes; then
13446   $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13447
13448 fi
13449 ac_cv_header_stdc=disable
13450
13451
13452 if test $ol_cv_header_stdc != yes; then
13453         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate Standard C compliant headers" >&5
13454 $as_echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13455 fi
13456
13457 ac_header_dirent=no
13458 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13459   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
13461 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
13462 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
13463   $as_echo_n "(cached) " >&6
13464 else
13465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13466 /* end confdefs.h.  */
13467 #include <sys/types.h>
13468 #include <$ac_hdr>
13469
13470 int
13471 main ()
13472 {
13473 if ((DIR *) 0)
13474 return 0;
13475   ;
13476   return 0;
13477 }
13478 _ACEOF
13479 if ac_fn_c_try_compile "$LINENO"; then :
13480   eval "$as_ac_Header=yes"
13481 else
13482   eval "$as_ac_Header=no"
13483 fi
13484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13485 fi
13486 eval ac_res=\$$as_ac_Header
13487                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13488 $as_echo "$ac_res" >&6; }
13489 eval as_val=\$$as_ac_Header
13490    if test "x$as_val" = x""yes; then :
13491   cat >>confdefs.h <<_ACEOF
13492 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13493 _ACEOF
13494
13495 ac_header_dirent=$ac_hdr; break
13496 fi
13497
13498 done
13499 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13500 if test $ac_header_dirent = dirent.h; then
13501   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13502 $as_echo_n "checking for library containing opendir... " >&6; }
13503 if test "${ac_cv_search_opendir+set}" = set; then :
13504   $as_echo_n "(cached) " >&6
13505 else
13506   ac_func_search_save_LIBS=$LIBS
13507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13508 /* end confdefs.h.  */
13509
13510 /* Override any GCC internal prototype to avoid an error.
13511    Use char because int might match the return type of a GCC
13512    builtin and then its argument prototype would still apply.  */
13513 #ifdef __cplusplus
13514 extern "C"
13515 #endif
13516 char opendir ();
13517 int
13518 main ()
13519 {
13520 return opendir ();
13521   ;
13522   return 0;
13523 }
13524 _ACEOF
13525 for ac_lib in '' dir; do
13526   if test -z "$ac_lib"; then
13527     ac_res="none required"
13528   else
13529     ac_res=-l$ac_lib
13530     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13531   fi
13532   if ac_fn_c_try_link "$LINENO"; then :
13533   ac_cv_search_opendir=$ac_res
13534 fi
13535 rm -f core conftest.err conftest.$ac_objext \
13536     conftest$ac_exeext
13537   if test "${ac_cv_search_opendir+set}" = set; then :
13538   break
13539 fi
13540 done
13541 if test "${ac_cv_search_opendir+set}" = set; then :
13542
13543 else
13544   ac_cv_search_opendir=no
13545 fi
13546 rm conftest.$ac_ext
13547 LIBS=$ac_func_search_save_LIBS
13548 fi
13549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13550 $as_echo "$ac_cv_search_opendir" >&6; }
13551 ac_res=$ac_cv_search_opendir
13552 if test "$ac_res" != no; then :
13553   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13554
13555 fi
13556
13557 else
13558   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13559 $as_echo_n "checking for library containing opendir... " >&6; }
13560 if test "${ac_cv_search_opendir+set}" = set; then :
13561   $as_echo_n "(cached) " >&6
13562 else
13563   ac_func_search_save_LIBS=$LIBS
13564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13565 /* end confdefs.h.  */
13566
13567 /* Override any GCC internal prototype to avoid an error.
13568    Use char because int might match the return type of a GCC
13569    builtin and then its argument prototype would still apply.  */
13570 #ifdef __cplusplus
13571 extern "C"
13572 #endif
13573 char opendir ();
13574 int
13575 main ()
13576 {
13577 return opendir ();
13578   ;
13579   return 0;
13580 }
13581 _ACEOF
13582 for ac_lib in '' x; do
13583   if test -z "$ac_lib"; then
13584     ac_res="none required"
13585   else
13586     ac_res=-l$ac_lib
13587     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13588   fi
13589   if ac_fn_c_try_link "$LINENO"; then :
13590   ac_cv_search_opendir=$ac_res
13591 fi
13592 rm -f core conftest.err conftest.$ac_objext \
13593     conftest$ac_exeext
13594   if test "${ac_cv_search_opendir+set}" = set; then :
13595   break
13596 fi
13597 done
13598 if test "${ac_cv_search_opendir+set}" = set; then :
13599
13600 else
13601   ac_cv_search_opendir=no
13602 fi
13603 rm conftest.$ac_ext
13604 LIBS=$ac_func_search_save_LIBS
13605 fi
13606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13607 $as_echo "$ac_cv_search_opendir" >&6; }
13608 ac_res=$ac_cv_search_opendir
13609 if test "$ac_res" != no; then :
13610   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13611
13612 fi
13613
13614 fi
13615
13616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
13617 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
13618 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
13619   $as_echo_n "(cached) " >&6
13620 else
13621   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13622 /* end confdefs.h.  */
13623 #include <sys/types.h>
13624 #include <sys/wait.h>
13625 #ifndef WEXITSTATUS
13626 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
13627 #endif
13628 #ifndef WIFEXITED
13629 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13630 #endif
13631
13632 int
13633 main ()
13634 {
13635   int s;
13636   wait (&s);
13637   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13638   ;
13639   return 0;
13640 }
13641 _ACEOF
13642 if ac_fn_c_try_compile "$LINENO"; then :
13643   ac_cv_header_sys_wait_h=yes
13644 else
13645   ac_cv_header_sys_wait_h=no
13646 fi
13647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13648 fi
13649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
13650 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
13651 if test $ac_cv_header_sys_wait_h = yes; then
13652
13653 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
13654
13655 fi
13656
13657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
13658 $as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
13659 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then :
13660   $as_echo_n "(cached) " >&6
13661 else
13662   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13663 /* end confdefs.h.  */
13664 #include <sys/types.h>
13665 #include <termios.h>
13666 #ifdef TIOCGWINSZ
13667   yes
13668 #endif
13669
13670 _ACEOF
13671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13672   $EGREP "yes" >/dev/null 2>&1; then :
13673   ac_cv_sys_tiocgwinsz_in_termios_h=yes
13674 else
13675   ac_cv_sys_tiocgwinsz_in_termios_h=no
13676 fi
13677 rm -f conftest*
13678
13679 fi
13680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13681 $as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
13682
13683 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13684   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13685 $as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
13686 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then :
13687   $as_echo_n "(cached) " >&6
13688 else
13689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13690 /* end confdefs.h.  */
13691 #include <sys/types.h>
13692 #include <sys/ioctl.h>
13693 #ifdef TIOCGWINSZ
13694   yes
13695 #endif
13696
13697 _ACEOF
13698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13699   $EGREP "yes" >/dev/null 2>&1; then :
13700   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13701 else
13702   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13703 fi
13704 rm -f conftest*
13705
13706 fi
13707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13708 $as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
13709
13710   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13711
13712 $as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
13713
13714   fi
13715 fi
13716
13717
13718 for ac_header in \
13719         arpa/inet.h             \
13720         arpa/nameser.h  \
13721         assert.h                \
13722         bits/types.h    \
13723         conio.h                 \
13724         crypt.h                 \
13725         direct.h                \
13726         errno.h                 \
13727         fcntl.h                 \
13728         filio.h                 \
13729         getopt.h                \
13730         grp.h                   \
13731         io.h                    \
13732         libutil.h               \
13733         limits.h                \
13734         locale.h                \
13735         malloc.h                \
13736         memory.h                \
13737         psap.h                  \
13738         pwd.h                   \
13739         process.h               \
13740         sgtty.h                 \
13741         shadow.h                \
13742         stddef.h                \
13743         string.h                \
13744         strings.h               \
13745         sysexits.h              \
13746         sys/file.h              \
13747         sys/filio.h             \
13748         sys/fstyp.h             \
13749         sys/errno.h             \
13750         sys/ioctl.h             \
13751         sys/param.h             \
13752         sys/privgrp.h   \
13753         sys/resource.h  \
13754         sys/select.h    \
13755         sys/socket.h    \
13756         sys/stat.h              \
13757         sys/syslog.h    \
13758         sys/time.h              \
13759         sys/types.h             \
13760         sys/uio.h               \
13761         sys/vmount.h    \
13762         syslog.h                \
13763         termios.h               \
13764         unistd.h                \
13765         utime.h                 \
13766
13767 do :
13768   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13769 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13770 eval as_val=\$$as_ac_Header
13771    if test "x$as_val" = x""yes; then :
13772   cat >>confdefs.h <<_ACEOF
13773 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13774 _ACEOF
13775
13776 fi
13777
13778 done
13779
13780
13781 if test "$ac_cv_mingw32" = yes \
13782         -o "$ac_cv_interix" = yes \
13783         -o "$ol_cv_msvc" = yes
13784 then
13785         for ac_header in winsock.h winsock2.h
13786 do :
13787   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13788 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13789 eval as_val=\$$as_ac_Header
13790    if test "x$as_val" = x""yes; then :
13791   cat >>confdefs.h <<_ACEOF
13792 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13793 _ACEOF
13794
13795 fi
13796
13797 done
13798
13799 fi
13800
13801 for ac_header in resolv.h
13802 do :
13803   ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default
13804 #include <netinet/in.h>
13805
13806 "
13807 if test "x$ac_cv_header_resolv_h" = x""yes; then :
13808   cat >>confdefs.h <<_ACEOF
13809 #define HAVE_RESOLV_H 1
13810 _ACEOF
13811
13812 fi
13813
13814 done
13815
13816
13817 for ac_header in netinet/tcp.h
13818 do :
13819   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13820 #include <netinet/in.h>
13821
13822 "
13823 if test "x$ac_cv_header_netinet_tcp_h" = x""yes; then :
13824   cat >>confdefs.h <<_ACEOF
13825 #define HAVE_NETINET_TCP_H 1
13826 _ACEOF
13827
13828 fi
13829
13830 done
13831
13832
13833 for ac_header in sys/ucred.h
13834 do :
13835   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13836 #ifdef HAVE_SYS_PARAM_H
13837 #include <sys/param.h>
13838 #endif
13839
13840 "
13841 if test "x$ac_cv_header_sys_ucred_h" = x""yes; then :
13842   cat >>confdefs.h <<_ACEOF
13843 #define HAVE_SYS_UCRED_H 1
13844 _ACEOF
13845
13846 fi
13847
13848 done
13849
13850
13851
13852 for ac_func in sigaction sigset
13853 do :
13854   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13855 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13856 eval as_val=\$$as_ac_var
13857    if test "x$as_val" = x""yes; then :
13858   cat >>confdefs.h <<_ACEOF
13859 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13860 _ACEOF
13861
13862 fi
13863 done
13864
13865
13866 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
13867         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset in -lV3" >&5
13868 $as_echo_n "checking for sigset in -lV3... " >&6; }
13869 if test "${ac_cv_lib_V3_sigset+set}" = set; then :
13870   $as_echo_n "(cached) " >&6
13871 else
13872   ac_check_lib_save_LIBS=$LIBS
13873 LIBS="-lV3  $LIBS"
13874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13875 /* end confdefs.h.  */
13876
13877 /* Override any GCC internal prototype to avoid an error.
13878    Use char because int might match the return type of a GCC
13879    builtin and then its argument prototype would still apply.  */
13880 #ifdef __cplusplus
13881 extern "C"
13882 #endif
13883 char sigset ();
13884 int
13885 main ()
13886 {
13887 return sigset ();
13888   ;
13889   return 0;
13890 }
13891 _ACEOF
13892 if ac_fn_c_try_link "$LINENO"; then :
13893   ac_cv_lib_V3_sigset=yes
13894 else
13895   ac_cv_lib_V3_sigset=no
13896 fi
13897 rm -f core conftest.err conftest.$ac_objext \
13898     conftest$ac_exeext conftest.$ac_ext
13899 LIBS=$ac_check_lib_save_LIBS
13900 fi
13901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_V3_sigset" >&5
13902 $as_echo "$ac_cv_lib_V3_sigset" >&6; }
13903 if test "x$ac_cv_lib_V3_sigset" = x""yes; then :
13904   cat >>confdefs.h <<_ACEOF
13905 #define HAVE_LIBV3 1
13906 _ACEOF
13907
13908   LIBS="-lV3 $LIBS"
13909
13910 fi
13911
13912 fi
13913
13914 if test $ol_cv_msvc = yes ; then
13915    ol_cv_winsock=yes
13916 fi
13917
13918 if test "$ac_cv_header_winsock_h" = yes; then
13919         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock" >&5
13920 $as_echo_n "checking for winsock... " >&6; }
13921 if test "${ol_cv_winsock+set}" = set; then :
13922   $as_echo_n "(cached) " >&6
13923 else
13924
13925         save_LIBS="$LIBS"
13926         for curlib in none ws2_32 wsock32; do
13927                 if test $curlib != none ; then
13928                 LIBS="$save_LIBS -l$curlib"
13929                 fi
13930                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13931 /* end confdefs.h.  */
13932 #include <winsock.h>
13933
13934 int
13935 main ()
13936 {
13937
13938                         socket(0,0,0);
13939                         select(0,NULL,NULL,NULL,NULL);
13940                         closesocket(0);
13941                         gethostname(NULL,0);
13942
13943   ;
13944   return 0;
13945 }
13946 _ACEOF
13947 if ac_fn_c_try_link "$LINENO"; then :
13948   ol_cv_winsock=$curlib
13949 else
13950   ol_cv_winsock=no
13951 fi
13952 rm -f core conftest.err conftest.$ac_objext \
13953     conftest$ac_exeext conftest.$ac_ext
13954
13955                 test "$ol_cv_winsock" != no && break
13956         done
13957         LIBS="$save_LIBS"
13958
13959 fi
13960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_winsock" >&5
13961 $as_echo "$ol_cv_winsock" >&6; }
13962
13963         if test $ol_cv_winsock != no ; then
13964
13965 $as_echo "#define HAVE_WINSOCK 1" >>confdefs.h
13966
13967         ac_cv_func_socket=yes
13968         ac_cv_func_select=yes
13969         ac_cv_func_closesocket=yes
13970         ac_cv_func_gethostname=yes
13971
13972                 if test $ol_cv_winsock != none -a $ol_cv_winsock != yes ; then
13973                 LIBS="$LIBS -l$ol_cv_winsock"
13974                 fi
13975
13976         if test $ol_cv_winsock = ws2_32 -o $ol_cv_winsock = yes ; then
13977
13978 $as_echo "#define HAVE_WINSOCK2 1" >>confdefs.h
13979
13980         fi
13981         fi
13982 fi
13983
13984
13985 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13986 if test "x$ac_cv_func_socket" = x""yes; then :
13987   :
13988 else
13989
13990         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
13991 $as_echo_n "checking for main in -lsocket... " >&6; }
13992 if test "${ac_cv_lib_socket_main+set}" = set; then :
13993   $as_echo_n "(cached) " >&6
13994 else
13995   ac_check_lib_save_LIBS=$LIBS
13996 LIBS="-lsocket  $LIBS"
13997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13998 /* end confdefs.h.  */
13999
14000
14001 int
14002 main ()
14003 {
14004 return main ();
14005   ;
14006   return 0;
14007 }
14008 _ACEOF
14009 if ac_fn_c_try_link "$LINENO"; then :
14010   ac_cv_lib_socket_main=yes
14011 else
14012   ac_cv_lib_socket_main=no
14013 fi
14014 rm -f core conftest.err conftest.$ac_objext \
14015     conftest$ac_exeext conftest.$ac_ext
14016 LIBS=$ac_check_lib_save_LIBS
14017 fi
14018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
14019 $as_echo "$ac_cv_lib_socket_main" >&6; }
14020 if test "x$ac_cv_lib_socket_main" = x""yes; then :
14021   cat >>confdefs.h <<_ACEOF
14022 #define HAVE_LIBSOCKET 1
14023 _ACEOF
14024
14025   LIBS="-lsocket $LIBS"
14026
14027 fi
14028
14029         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
14030 $as_echo_n "checking for socket in -lnet... " >&6; }
14031 if test "${ac_cv_lib_net_socket+set}" = set; then :
14032   $as_echo_n "(cached) " >&6
14033 else
14034   ac_check_lib_save_LIBS=$LIBS
14035 LIBS="-lnet  $LIBS"
14036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14037 /* end confdefs.h.  */
14038
14039 /* Override any GCC internal prototype to avoid an error.
14040    Use char because int might match the return type of a GCC
14041    builtin and then its argument prototype would still apply.  */
14042 #ifdef __cplusplus
14043 extern "C"
14044 #endif
14045 char socket ();
14046 int
14047 main ()
14048 {
14049 return socket ();
14050   ;
14051   return 0;
14052 }
14053 _ACEOF
14054 if ac_fn_c_try_link "$LINENO"; then :
14055   ac_cv_lib_net_socket=yes
14056 else
14057   ac_cv_lib_net_socket=no
14058 fi
14059 rm -f core conftest.err conftest.$ac_objext \
14060     conftest$ac_exeext conftest.$ac_ext
14061 LIBS=$ac_check_lib_save_LIBS
14062 fi
14063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
14064 $as_echo "$ac_cv_lib_net_socket" >&6; }
14065 if test "x$ac_cv_lib_net_socket" = x""yes; then :
14066   cat >>confdefs.h <<_ACEOF
14067 #define HAVE_LIBNET 1
14068 _ACEOF
14069
14070   LIBS="-lnet $LIBS"
14071
14072 fi
14073
14074         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl_s" >&5
14075 $as_echo_n "checking for main in -lnsl_s... " >&6; }
14076 if test "${ac_cv_lib_nsl_s_main+set}" = set; then :
14077   $as_echo_n "(cached) " >&6
14078 else
14079   ac_check_lib_save_LIBS=$LIBS
14080 LIBS="-lnsl_s  $LIBS"
14081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14082 /* end confdefs.h.  */
14083
14084
14085 int
14086 main ()
14087 {
14088 return main ();
14089   ;
14090   return 0;
14091 }
14092 _ACEOF
14093 if ac_fn_c_try_link "$LINENO"; then :
14094   ac_cv_lib_nsl_s_main=yes
14095 else
14096   ac_cv_lib_nsl_s_main=no
14097 fi
14098 rm -f core conftest.err conftest.$ac_objext \
14099     conftest$ac_exeext conftest.$ac_ext
14100 LIBS=$ac_check_lib_save_LIBS
14101 fi
14102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_s_main" >&5
14103 $as_echo "$ac_cv_lib_nsl_s_main" >&6; }
14104 if test "x$ac_cv_lib_nsl_s_main" = x""yes; then :
14105   cat >>confdefs.h <<_ACEOF
14106 #define HAVE_LIBNSL_S 1
14107 _ACEOF
14108
14109   LIBS="-lnsl_s $LIBS"
14110
14111 fi
14112
14113         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5
14114 $as_echo_n "checking for main in -lnsl... " >&6; }
14115 if test "${ac_cv_lib_nsl_main+set}" = set; then :
14116   $as_echo_n "(cached) " >&6
14117 else
14118   ac_check_lib_save_LIBS=$LIBS
14119 LIBS="-lnsl  $LIBS"
14120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14121 /* end confdefs.h.  */
14122
14123
14124 int
14125 main ()
14126 {
14127 return main ();
14128   ;
14129   return 0;
14130 }
14131 _ACEOF
14132 if ac_fn_c_try_link "$LINENO"; then :
14133   ac_cv_lib_nsl_main=yes
14134 else
14135   ac_cv_lib_nsl_main=no
14136 fi
14137 rm -f core conftest.err conftest.$ac_objext \
14138     conftest$ac_exeext conftest.$ac_ext
14139 LIBS=$ac_check_lib_save_LIBS
14140 fi
14141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5
14142 $as_echo "$ac_cv_lib_nsl_main" >&6; }
14143 if test "x$ac_cv_lib_nsl_main" = x""yes; then :
14144   cat >>confdefs.h <<_ACEOF
14145 #define HAVE_LIBNSL 1
14146 _ACEOF
14147
14148   LIBS="-lnsl $LIBS"
14149
14150 fi
14151
14152         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -linet" >&5
14153 $as_echo_n "checking for socket in -linet... " >&6; }
14154 if test "${ac_cv_lib_inet_socket+set}" = set; then :
14155   $as_echo_n "(cached) " >&6
14156 else
14157   ac_check_lib_save_LIBS=$LIBS
14158 LIBS="-linet  $LIBS"
14159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14160 /* end confdefs.h.  */
14161
14162 /* Override any GCC internal prototype to avoid an error.
14163    Use char because int might match the return type of a GCC
14164    builtin and then its argument prototype would still apply.  */
14165 #ifdef __cplusplus
14166 extern "C"
14167 #endif
14168 char socket ();
14169 int
14170 main ()
14171 {
14172 return socket ();
14173   ;
14174   return 0;
14175 }
14176 _ACEOF
14177 if ac_fn_c_try_link "$LINENO"; then :
14178   ac_cv_lib_inet_socket=yes
14179 else
14180   ac_cv_lib_inet_socket=no
14181 fi
14182 rm -f core conftest.err conftest.$ac_objext \
14183     conftest$ac_exeext conftest.$ac_ext
14184 LIBS=$ac_check_lib_save_LIBS
14185 fi
14186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_socket" >&5
14187 $as_echo "$ac_cv_lib_inet_socket" >&6; }
14188 if test "x$ac_cv_lib_inet_socket" = x""yes; then :
14189   cat >>confdefs.h <<_ACEOF
14190 #define HAVE_LIBINET 1
14191 _ACEOF
14192
14193   LIBS="-linet $LIBS"
14194
14195 fi
14196
14197         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgen" >&5
14198 $as_echo_n "checking for main in -lgen... " >&6; }
14199 if test "${ac_cv_lib_gen_main+set}" = set; then :
14200   $as_echo_n "(cached) " >&6
14201 else
14202   ac_check_lib_save_LIBS=$LIBS
14203 LIBS="-lgen  $LIBS"
14204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14205 /* end confdefs.h.  */
14206
14207
14208 int
14209 main ()
14210 {
14211 return main ();
14212   ;
14213   return 0;
14214 }
14215 _ACEOF
14216 if ac_fn_c_try_link "$LINENO"; then :
14217   ac_cv_lib_gen_main=yes
14218 else
14219   ac_cv_lib_gen_main=no
14220 fi
14221 rm -f core conftest.err conftest.$ac_objext \
14222     conftest$ac_exeext conftest.$ac_ext
14223 LIBS=$ac_check_lib_save_LIBS
14224 fi
14225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_main" >&5
14226 $as_echo "$ac_cv_lib_gen_main" >&6; }
14227 if test "x$ac_cv_lib_gen_main" = x""yes; then :
14228   cat >>confdefs.h <<_ACEOF
14229 #define HAVE_LIBGEN 1
14230 _ACEOF
14231
14232   LIBS="-lgen $LIBS"
14233
14234 fi
14235
14236
14237 fi
14238
14239
14240 ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
14241 if test "x$ac_cv_func_select" = x""yes; then :
14242   :
14243 else
14244   as_fn_error "select() required." "$LINENO" 5
14245 fi
14246
14247
14248 if test "${ac_cv_header_winsock_h}" != yes; then
14249                                 for ac_header in sys/select.h sys/socket.h
14250 do :
14251   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14252 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14253 eval as_val=\$$as_ac_Header
14254    if test "x$as_val" = x""yes; then :
14255   cat >>confdefs.h <<_ACEOF
14256 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14257 _ACEOF
14258
14259 fi
14260
14261 done
14262
14263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
14264 $as_echo_n "checking types of arguments for select... " >&6; }
14265 if test "${ac_cv_func_select_args+set}" = set; then :
14266   $as_echo_n "(cached) " >&6
14267 else
14268   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
14269  for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
14270   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
14271    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14272 /* end confdefs.h.  */
14273 $ac_includes_default
14274 #ifdef HAVE_SYS_SELECT_H
14275 # include <sys/select.h>
14276 #endif
14277 #ifdef HAVE_SYS_SOCKET_H
14278 # include <sys/socket.h>
14279 #endif
14280
14281 int
14282 main ()
14283 {
14284 extern int select ($ac_arg1,
14285                                             $ac_arg234, $ac_arg234, $ac_arg234,
14286                                             $ac_arg5);
14287   ;
14288   return 0;
14289 }
14290 _ACEOF
14291 if ac_fn_c_try_compile "$LINENO"; then :
14292   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
14293 fi
14294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14295   done
14296  done
14297 done
14298 # Provide a safe default value.
14299 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
14300
14301 fi
14302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
14303 $as_echo "$ac_cv_func_select_args" >&6; }
14304 ac_save_IFS=$IFS; IFS=','
14305 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
14306 IFS=$ac_save_IFS
14307 shift
14308
14309 cat >>confdefs.h <<_ACEOF
14310 #define SELECT_TYPE_ARG1 $1
14311 _ACEOF
14312
14313
14314 cat >>confdefs.h <<_ACEOF
14315 #define SELECT_TYPE_ARG234 ($2)
14316 _ACEOF
14317
14318
14319 cat >>confdefs.h <<_ACEOF
14320 #define SELECT_TYPE_ARG5 ($3)
14321 _ACEOF
14322
14323 rm -f conftest*
14324
14325 fi
14326
14327
14328 for ac_func in poll
14329 do :
14330   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14331 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14332 eval as_val=\$$as_ac_var
14333    if test "x$as_val" = x""yes; then :
14334   cat >>confdefs.h <<_ACEOF
14335 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14336 _ACEOF
14337
14338 fi
14339 done
14340
14341 if test $ac_cv_func_poll = yes; then
14342 for ac_header in poll.h sys/poll.h
14343 do :
14344   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14345 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14346 eval as_val=\$$as_ac_Header
14347    if test "x$as_val" = x""yes; then :
14348   cat >>confdefs.h <<_ACEOF
14349 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14350 _ACEOF
14351
14352 fi
14353
14354 done
14355
14356 fi
14357
14358 for ac_header in sys/epoll.h
14359 do :
14360   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14361 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14362 eval as_val=\$$as_ac_Header
14363    if test "x$as_val" = x""yes; then :
14364   cat >>confdefs.h <<_ACEOF
14365 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14366 _ACEOF
14367
14368 fi
14369
14370 done
14371
14372 if test "${ac_cv_header_sys_epoll_h}" = yes; then
14373         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll system call" >&5
14374 $as_echo_n "checking for epoll system call... " >&6; }
14375         if test "$cross_compiling" = yes; then :
14376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14377 $as_echo "no" >&6; }
14378 else
14379   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14380 /* end confdefs.h.  */
14381 int main(int argc, char **argv)
14382 {
14383         int epfd = epoll_create(256);
14384         exit (epfd == -1 ? 1 : 0);
14385 }
14386 _ACEOF
14387 if ac_fn_c_try_run "$LINENO"; then :
14388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14389 $as_echo "yes" >&6; }
14390
14391 $as_echo "#define HAVE_EPOLL 1" >>confdefs.h
14392
14393 else
14394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14395 $as_echo "no" >&6; }
14396 fi
14397 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14398   conftest.$ac_objext conftest.beam conftest.$ac_ext
14399 fi
14400
14401 fi
14402
14403 for ac_header in sys/event.h
14404 do :
14405   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14406 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14407 eval as_val=\$$as_ac_Header
14408    if test "x$as_val" = x""yes; then :
14409   cat >>confdefs.h <<_ACEOF
14410 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14411 _ACEOF
14412
14413 fi
14414
14415 done
14416
14417 if test "${ac_cv_header_sys_event_h}" = yes; then
14418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue system call" >&5
14419 $as_echo_n "checking for kqueue system call... " >&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 kqfd = kqueue();
14429         exit (kqfd == -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_KQUEUE 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 for ac_header in sys/devpoll.h
14449 do :
14450   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14451 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14452 eval as_val=\$$as_ac_Header
14453    if test "x$as_val" = x""yes; then :
14454   cat >>confdefs.h <<_ACEOF
14455 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14456 _ACEOF
14457
14458 fi
14459
14460 done
14461
14462 if test "${ac_cv_header_sys_devpoll_h}" = yes \
14463                 -a "${ac_cv_header_poll_h}" = yes ; \
14464 then
14465         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/poll" >&5
14466 $as_echo_n "checking for /dev/poll... " >&6; }
14467         if test "$cross_compiling" = yes; then :
14468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14469 $as_echo "no" >&6; }
14470 else
14471   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14472 /* end confdefs.h.  */
14473 int main(int argc, char **argv)
14474 {
14475         int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
14476         exit (devpollfd == -1 ? 1 : 0);
14477 }
14478 _ACEOF
14479 if ac_fn_c_try_run "$LINENO"; then :
14480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14481 $as_echo "yes" >&6; }
14482
14483 $as_echo "#define HAVE_DEVPOLL 1" >>confdefs.h
14484
14485 else
14486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14487 $as_echo "no" >&6; }
14488 fi
14489 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14490   conftest.$ac_objext conftest.beam conftest.$ac_ext
14491 fi
14492
14493 fi
14494
14495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14496 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14497 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14498   $as_echo_n "(cached) " >&6
14499 else
14500
14501         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14502 /* end confdefs.h.  */
14503
14504 #include <stdio.h>
14505 #include <sys/types.h>
14506 #include <errno.h>
14507 #ifdef _WIN32
14508 #include <stdlib.h>
14509 #endif
14510 int
14511 main ()
14512 {
14513 char *c = (char *) *sys_errlist
14514   ;
14515   return 0;
14516 }
14517 _ACEOF
14518 if ac_fn_c_try_compile "$LINENO"; then :
14519   ol_cv_dcl_sys_errlist=yes
14520         ol_cv_have_sys_errlist=yes
14521 else
14522   ol_cv_dcl_sys_errlist=no
14523 fi
14524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14525 fi
14526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14527 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14528 #
14529 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14530 if test $ol_cv_dcl_sys_errlist = no ; then
14531
14532 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14533
14534
14535         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14536 $as_echo_n "checking existence of sys_errlist... " >&6; }
14537 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14538   $as_echo_n "(cached) " >&6
14539 else
14540
14541                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14542 /* end confdefs.h.  */
14543 #include <errno.h>
14544 int
14545 main ()
14546 {
14547 char *c = (char *) *sys_errlist
14548   ;
14549   return 0;
14550 }
14551 _ACEOF
14552 if ac_fn_c_try_link "$LINENO"; then :
14553   ol_cv_have_sys_errlist=yes
14554 else
14555   ol_cv_have_sys_errlist=no
14556 fi
14557 rm -f core conftest.err conftest.$ac_objext \
14558     conftest$ac_exeext conftest.$ac_ext
14559 fi
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14561 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14562 fi
14563 if test $ol_cv_have_sys_errlist = yes ; then
14564
14565 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14566
14567 fi
14568  for ac_func in strerror strerror_r
14569 do :
14570   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14571 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14572 eval as_val=\$$as_ac_var
14573    if test "x$as_val" = x""yes; then :
14574   cat >>confdefs.h <<_ACEOF
14575 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14576 _ACEOF
14577
14578 fi
14579 done
14580
14581 ol_cv_func_strerror_r=no
14582 if test "${ac_cv_func_strerror_r}" = yes ; then
14583         { $as_echo "$as_me:${as_lineno-$LINENO}: checking non-posix strerror_r" >&5
14584 $as_echo_n "checking non-posix strerror_r... " >&6; }
14585 if test "${ol_cv_nonposix_strerror_r+set}" = set; then :
14586   $as_echo_n "(cached) " >&6
14587 else
14588
14589         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14590 /* end confdefs.h.  */
14591 #include <string.h>
14592 _ACEOF
14593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14594   $EGREP "strerror_r" >/dev/null 2>&1; then :
14595   ol_decl_strerror_r=yes
14596 else
14597   ol_decl_strerror_r=no
14598 fi
14599 rm -f conftest*
14600
14601         if test $ol_decl_strerror_r = yes ; then
14602                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14603 /* end confdefs.h.  */
14604 #include <string.h>
14605 int
14606 main ()
14607 {
14608    /* from autoconf 2.59 */
14609                                 char buf[100];
14610                                 char x = *strerror_r (0, buf, sizeof buf);
14611                                 char *p = strerror_r (0, buf, sizeof buf);
14612
14613   ;
14614   return 0;
14615 }
14616 _ACEOF
14617 if ac_fn_c_try_compile "$LINENO"; then :
14618   ol_cv_nonposix_strerror_r=yes
14619 else
14620   ol_cv_nonposix_strerror_r=no
14621 fi
14622 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14623         else
14624                 if test "$cross_compiling" = yes; then :
14625   ol_cv_nonposix_strerror=no
14626 else
14627   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628 /* end confdefs.h.  */
14629
14630                         main() {
14631                                 char buf[100];
14632                                 buf[0] = 0;
14633                                 strerror_r( 1, buf, sizeof buf );
14634                                 exit( buf[0] == 0 );
14635                         }
14636
14637 _ACEOF
14638 if ac_fn_c_try_run "$LINENO"; then :
14639   ol_cv_nonposix_strerror_r=yes
14640 else
14641   ol_cv_nonposix_strerror=no
14642 fi
14643 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14644   conftest.$ac_objext conftest.beam conftest.$ac_ext
14645 fi
14646
14647         fi
14648
14649 fi
14650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_nonposix_strerror_r" >&5
14651 $as_echo "$ol_cv_nonposix_strerror_r" >&6; }
14652 if test $ol_cv_nonposix_strerror_r = yes ; then
14653
14654 $as_echo "#define HAVE_NONPOSIX_STRERROR_R 1" >>confdefs.h
14655
14656 fi
14657
14658 elif test "${ac_cv_func_strerror}" = no ; then
14659         { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14660 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14661 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14662   $as_echo_n "(cached) " >&6
14663 else
14664
14665         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14666 /* end confdefs.h.  */
14667
14668 #include <stdio.h>
14669 #include <sys/types.h>
14670 #include <errno.h>
14671 #ifdef _WIN32
14672 #include <stdlib.h>
14673 #endif
14674 int
14675 main ()
14676 {
14677 char *c = (char *) *sys_errlist
14678   ;
14679   return 0;
14680 }
14681 _ACEOF
14682 if ac_fn_c_try_compile "$LINENO"; then :
14683   ol_cv_dcl_sys_errlist=yes
14684         ol_cv_have_sys_errlist=yes
14685 else
14686   ol_cv_dcl_sys_errlist=no
14687 fi
14688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14689 fi
14690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14691 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14692 #
14693 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14694 if test $ol_cv_dcl_sys_errlist = no ; then
14695
14696 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14697
14698
14699         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14700 $as_echo_n "checking existence of sys_errlist... " >&6; }
14701 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14702   $as_echo_n "(cached) " >&6
14703 else
14704
14705                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14706 /* end confdefs.h.  */
14707 #include <errno.h>
14708 int
14709 main ()
14710 {
14711 char *c = (char *) *sys_errlist
14712   ;
14713   return 0;
14714 }
14715 _ACEOF
14716 if ac_fn_c_try_link "$LINENO"; then :
14717   ol_cv_have_sys_errlist=yes
14718 else
14719   ol_cv_have_sys_errlist=no
14720 fi
14721 rm -f core conftest.err conftest.$ac_objext \
14722     conftest$ac_exeext conftest.$ac_ext
14723 fi
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14725 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14726 fi
14727 if test $ol_cv_have_sys_errlist = yes ; then
14728
14729 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14730
14731 fi
14732
14733 fi
14734
14735
14736 for ac_header in regex.h
14737 do :
14738   ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default
14739 #ifdef HAVE_SYS_TYPES_H
14740 #include <sys/types.h>
14741 #endif
14742
14743 "
14744 if test "x$ac_cv_header_regex_h" = x""yes; then :
14745   cat >>confdefs.h <<_ACEOF
14746 #define HAVE_REGEX_H 1
14747 _ACEOF
14748
14749 fi
14750
14751 done
14752
14753
14754 if test "$ac_cv_header_regex_h" != yes ; then
14755         as_fn_error "POSIX regex.h required." "$LINENO" 5
14756 fi
14757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing regfree" >&5
14758 $as_echo_n "checking for library containing regfree... " >&6; }
14759 if test "${ac_cv_search_regfree+set}" = set; then :
14760   $as_echo_n "(cached) " >&6
14761 else
14762   ac_func_search_save_LIBS=$LIBS
14763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14764 /* end confdefs.h.  */
14765
14766 /* Override any GCC internal prototype to avoid an error.
14767    Use char because int might match the return type of a GCC
14768    builtin and then its argument prototype would still apply.  */
14769 #ifdef __cplusplus
14770 extern "C"
14771 #endif
14772 char regfree ();
14773 int
14774 main ()
14775 {
14776 return regfree ();
14777   ;
14778   return 0;
14779 }
14780 _ACEOF
14781 for ac_lib in '' regex gnuregex; do
14782   if test -z "$ac_lib"; then
14783     ac_res="none required"
14784   else
14785     ac_res=-l$ac_lib
14786     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14787   fi
14788   if ac_fn_c_try_link "$LINENO"; then :
14789   ac_cv_search_regfree=$ac_res
14790 fi
14791 rm -f core conftest.err conftest.$ac_objext \
14792     conftest$ac_exeext
14793   if test "${ac_cv_search_regfree+set}" = set; then :
14794   break
14795 fi
14796 done
14797 if test "${ac_cv_search_regfree+set}" = set; then :
14798
14799 else
14800   ac_cv_search_regfree=no
14801 fi
14802 rm conftest.$ac_ext
14803 LIBS=$ac_func_search_save_LIBS
14804 fi
14805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_regfree" >&5
14806 $as_echo "$ac_cv_search_regfree" >&6; }
14807 ac_res=$ac_cv_search_regfree
14808 if test "$ac_res" != no; then :
14809   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14810   :
14811 else
14812   as_fn_error "POSIX regex required." "$LINENO" 5
14813 fi
14814
14815
14816
14817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible POSIX regex" >&5
14818 $as_echo_n "checking for compatible POSIX regex... " >&6; }
14819 if test "${ol_cv_c_posix_regex+set}" = set; then :
14820   $as_echo_n "(cached) " >&6
14821 else
14822
14823         if test "$cross_compiling" = yes; then :
14824   ol_cv_c_posix_regex=cross
14825 else
14826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14827 /* end confdefs.h.  */
14828
14829 #include <sys/types.h>
14830 #include <regex.h>
14831 static char *pattern, *string;
14832 main()
14833 {
14834         int rc;
14835         regex_t re;
14836
14837         pattern = "^A";
14838
14839         if(regcomp(&re, pattern, 0)) {
14840                 return -1;
14841         }
14842
14843         string = "ALL MATCH";
14844
14845         rc = regexec(&re, string, 0, (void*)0, 0);
14846
14847         regfree(&re);
14848
14849         return rc;
14850 }
14851 _ACEOF
14852 if ac_fn_c_try_run "$LINENO"; then :
14853   ol_cv_c_posix_regex=yes
14854 else
14855   ol_cv_c_posix_regex=no
14856 fi
14857 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14858   conftest.$ac_objext conftest.beam conftest.$ac_ext
14859 fi
14860
14861 fi
14862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_posix_regex" >&5
14863 $as_echo "$ol_cv_c_posix_regex" >&6; }
14864
14865 if test "$ol_cv_c_posix_regex" = no ; then
14866         as_fn_error "broken POSIX regex!" "$LINENO" 5
14867 fi
14868
14869
14870 have_uuid=no
14871 for ac_header in sys/uuid.h
14872 do :
14873   ac_fn_c_check_header_mongrel "$LINENO" "sys/uuid.h" "ac_cv_header_sys_uuid_h" "$ac_includes_default"
14874 if test "x$ac_cv_header_sys_uuid_h" = x""yes; then :
14875   cat >>confdefs.h <<_ACEOF
14876 #define HAVE_SYS_UUID_H 1
14877 _ACEOF
14878
14879 fi
14880
14881 done
14882
14883 if test $ac_cv_header_sys_uuid_h = yes ; then
14884         save_LIBS="$LIBS"
14885         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_to_str" >&5
14886 $as_echo_n "checking for library containing uuid_to_str... " >&6; }
14887 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14888   $as_echo_n "(cached) " >&6
14889 else
14890   ac_func_search_save_LIBS=$LIBS
14891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14892 /* end confdefs.h.  */
14893
14894 /* Override any GCC internal prototype to avoid an error.
14895    Use char because int might match the return type of a GCC
14896    builtin and then its argument prototype would still apply.  */
14897 #ifdef __cplusplus
14898 extern "C"
14899 #endif
14900 char uuid_to_str ();
14901 int
14902 main ()
14903 {
14904 return uuid_to_str ();
14905   ;
14906   return 0;
14907 }
14908 _ACEOF
14909 for ac_lib in '' uuid; do
14910   if test -z "$ac_lib"; then
14911     ac_res="none required"
14912   else
14913     ac_res=-l$ac_lib
14914     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14915   fi
14916   if ac_fn_c_try_link "$LINENO"; then :
14917   ac_cv_search_uuid_to_str=$ac_res
14918 fi
14919 rm -f core conftest.err conftest.$ac_objext \
14920     conftest$ac_exeext
14921   if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14922   break
14923 fi
14924 done
14925 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14926
14927 else
14928   ac_cv_search_uuid_to_str=no
14929 fi
14930 rm conftest.$ac_ext
14931 LIBS=$ac_func_search_save_LIBS
14932 fi
14933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_to_str" >&5
14934 $as_echo "$ac_cv_search_uuid_to_str" >&6; }
14935 ac_res=$ac_cv_search_uuid_to_str
14936 if test "$ac_res" != no; then :
14937   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14938   have_uuid=yes
14939 else
14940   :
14941 fi
14942
14943         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_create" >&5
14944 $as_echo_n "checking for library containing uuid_create... " >&6; }
14945 if test "${ac_cv_search_uuid_create+set}" = set; then :
14946   $as_echo_n "(cached) " >&6
14947 else
14948   ac_func_search_save_LIBS=$LIBS
14949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14950 /* end confdefs.h.  */
14951
14952 /* Override any GCC internal prototype to avoid an error.
14953    Use char because int might match the return type of a GCC
14954    builtin and then its argument prototype would still apply.  */
14955 #ifdef __cplusplus
14956 extern "C"
14957 #endif
14958 char uuid_create ();
14959 int
14960 main ()
14961 {
14962 return uuid_create ();
14963   ;
14964   return 0;
14965 }
14966 _ACEOF
14967 for ac_lib in '' uuid; do
14968   if test -z "$ac_lib"; then
14969     ac_res="none required"
14970   else
14971     ac_res=-l$ac_lib
14972     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14973   fi
14974   if ac_fn_c_try_link "$LINENO"; then :
14975   ac_cv_search_uuid_create=$ac_res
14976 fi
14977 rm -f core conftest.err conftest.$ac_objext \
14978     conftest$ac_exeext
14979   if test "${ac_cv_search_uuid_create+set}" = set; then :
14980   break
14981 fi
14982 done
14983 if test "${ac_cv_search_uuid_create+set}" = set; then :
14984
14985 else
14986   ac_cv_search_uuid_create=no
14987 fi
14988 rm conftest.$ac_ext
14989 LIBS=$ac_func_search_save_LIBS
14990 fi
14991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_create" >&5
14992 $as_echo "$ac_cv_search_uuid_create" >&6; }
14993 ac_res=$ac_cv_search_uuid_create
14994 if test "$ac_res" != no; then :
14995   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14996   :
14997 else
14998   have_uuid=no
14999 fi
15000
15001         LIBS="$save_LIBS"
15002
15003         if test $have_uuid = yes ; then
15004
15005 $as_echo "#define HAVE_UUID_TO_STR 1" >>confdefs.h
15006
15007
15008                 test "$ac_cv_search_uuid_to_str" = "none required" || \
15009                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
15010         fi
15011 fi
15012
15013 if test $have_uuid = no ; then
15014         for ac_header in uuid/uuid.h
15015 do :
15016   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
15017 if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then :
15018   cat >>confdefs.h <<_ACEOF
15019 #define HAVE_UUID_UUID_H 1
15020 _ACEOF
15021
15022 fi
15023
15024 done
15025
15026         if test $ac_cv_header_uuid_uuid_h = yes ; then
15027                 save_LIBS="$LIBS"
15028                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
15029 $as_echo_n "checking for library containing uuid_generate... " >&6; }
15030 if test "${ac_cv_search_uuid_generate+set}" = set; then :
15031   $as_echo_n "(cached) " >&6
15032 else
15033   ac_func_search_save_LIBS=$LIBS
15034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15035 /* end confdefs.h.  */
15036
15037 /* Override any GCC internal prototype to avoid an error.
15038    Use char because int might match the return type of a GCC
15039    builtin and then its argument prototype would still apply.  */
15040 #ifdef __cplusplus
15041 extern "C"
15042 #endif
15043 char uuid_generate ();
15044 int
15045 main ()
15046 {
15047 return uuid_generate ();
15048   ;
15049   return 0;
15050 }
15051 _ACEOF
15052 for ac_lib in '' uuid; do
15053   if test -z "$ac_lib"; then
15054     ac_res="none required"
15055   else
15056     ac_res=-l$ac_lib
15057     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15058   fi
15059   if ac_fn_c_try_link "$LINENO"; then :
15060   ac_cv_search_uuid_generate=$ac_res
15061 fi
15062 rm -f core conftest.err conftest.$ac_objext \
15063     conftest$ac_exeext
15064   if test "${ac_cv_search_uuid_generate+set}" = set; then :
15065   break
15066 fi
15067 done
15068 if test "${ac_cv_search_uuid_generate+set}" = set; then :
15069
15070 else
15071   ac_cv_search_uuid_generate=no
15072 fi
15073 rm conftest.$ac_ext
15074 LIBS=$ac_func_search_save_LIBS
15075 fi
15076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
15077 $as_echo "$ac_cv_search_uuid_generate" >&6; }
15078 ac_res=$ac_cv_search_uuid_generate
15079 if test "$ac_res" != no; then :
15080   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15081   have_uuid=yes
15082 else
15083   :
15084 fi
15085
15086                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_unparse_lower" >&5
15087 $as_echo_n "checking for library containing uuid_unparse_lower... " >&6; }
15088 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
15089   $as_echo_n "(cached) " >&6
15090 else
15091   ac_func_search_save_LIBS=$LIBS
15092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15093 /* end confdefs.h.  */
15094
15095 /* Override any GCC internal prototype to avoid an error.
15096    Use char because int might match the return type of a GCC
15097    builtin and then its argument prototype would still apply.  */
15098 #ifdef __cplusplus
15099 extern "C"
15100 #endif
15101 char uuid_unparse_lower ();
15102 int
15103 main ()
15104 {
15105 return uuid_unparse_lower ();
15106   ;
15107   return 0;
15108 }
15109 _ACEOF
15110 for ac_lib in '' uuid; do
15111   if test -z "$ac_lib"; then
15112     ac_res="none required"
15113   else
15114     ac_res=-l$ac_lib
15115     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15116   fi
15117   if ac_fn_c_try_link "$LINENO"; then :
15118   ac_cv_search_uuid_unparse_lower=$ac_res
15119 fi
15120 rm -f core conftest.err conftest.$ac_objext \
15121     conftest$ac_exeext
15122   if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
15123   break
15124 fi
15125 done
15126 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
15127
15128 else
15129   ac_cv_search_uuid_unparse_lower=no
15130 fi
15131 rm conftest.$ac_ext
15132 LIBS=$ac_func_search_save_LIBS
15133 fi
15134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_unparse_lower" >&5
15135 $as_echo "$ac_cv_search_uuid_unparse_lower" >&6; }
15136 ac_res=$ac_cv_search_uuid_unparse_lower
15137 if test "$ac_res" != no; then :
15138   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15139   :
15140 else
15141   have_uuid=no
15142 fi
15143
15144                 LIBS="$save_LIBS"
15145
15146                 if test $have_uuid = yes ; then
15147
15148 $as_echo "#define HAVE_UUID_GENERATE 1" >>confdefs.h
15149
15150
15151                         test "$ac_cv_search_uuid_generate" = "none required" || \
15152                                 SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_generate"
15153                 fi
15154         fi
15155 fi
15156
15157 if test $have_uuid = no ; then
15158         { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
15159 $as_echo_n "checking to see if -lrpcrt4 is needed for win32 UUID support... " >&6; }
15160         save_LIBS="$LIBS"
15161         LIBS="$LIBS -lrpcrt4"
15162         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15163 /* end confdefs.h.  */
15164
15165                 int __stdcall UuidCreate(void *);
15166                 int __stdcall UuidToStringA(void *,void **);
15167
15168 int
15169 main ()
15170 {
15171
15172                 UuidCreate(0);
15173                 UuidToStringA(0,0);
15174
15175   ;
15176   return 0;
15177 }
15178 _ACEOF
15179 if ac_fn_c_try_link "$LINENO"; then :
15180   need_rpcrt=yes
15181 else
15182   need_rpcrt=no
15183 fi
15184 rm -f core conftest.err conftest.$ac_objext \
15185     conftest$ac_exeext conftest.$ac_ext
15186         if test $need_rpcrt = yes; then
15187                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
15188         fi
15189         LIBS="$save_LIBS"
15190         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_rpcrt" >&5
15191 $as_echo "$need_rpcrt" >&6; }
15192 fi
15193
15194 ol_cv_lib_resolver=no
15195 if test $ol_cv_lib_resolver = no ; then
15196         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (default)" >&5
15197 $as_echo_n "checking for resolver link (default)... " >&6; }
15198 if test "${ol_cv_resolver_none+set}" = set; then :
15199   $as_echo_n "(cached) " >&6
15200 else
15201
15202         ol_RESOLVER_LIB=
15203         ol_LIBS=$LIBS
15204         LIBS="$ol_RESOLVER_LIB $LIBS"
15205
15206         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15207 /* end confdefs.h.  */
15208
15209 #ifdef HAVE_SYS_TYPES_H
15210 #       include <sys/types.h>
15211 #endif
15212 #include <netinet/in.h>
15213 #ifdef HAVE_ARPA_NAMESER_H
15214 #       include <arpa/nameser.h>
15215 #endif
15216 #ifdef HAVE_RESOLV_H
15217 #       include <resolv.h>
15218 #endif
15219
15220 int
15221 main ()
15222 {
15223 {
15224         int len, status;
15225         char *request = NULL;
15226         unsigned char reply[64*1024];
15227         unsigned char host[64*1024];
15228         unsigned char *p;
15229
15230 #ifdef NS_HFIXEDSZ
15231         /* Bind 8/9 interface */
15232         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15233 #else
15234         /* Bind 4 interface */
15235 # ifndef T_SRV
15236 #  define T_SRV 33
15237 # endif
15238         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15239 #endif
15240         p = reply;
15241 #ifdef NS_HFIXEDSZ
15242         /* Bind 8/9 interface */
15243         p += NS_HFIXEDSZ;
15244 #elif defined(HFIXEDSZ)
15245         /* Bind 4 interface w/ HFIXEDSZ */
15246         p += HFIXEDSZ;
15247 #else
15248         /* Bind 4 interface w/o HFIXEDSZ */
15249         p += sizeof(HEADER);
15250 #endif
15251         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15252 }
15253   ;
15254   return 0;
15255 }
15256 _ACEOF
15257 if ac_fn_c_try_link "$LINENO"; then :
15258   ol_cv_resolver_none=yes
15259 else
15260   ol_cv_resolver_none=no
15261 fi
15262 rm -f core conftest.err conftest.$ac_objext \
15263     conftest$ac_exeext conftest.$ac_ext
15264
15265         LIBS="$ol_LIBS"
15266
15267 fi
15268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_none" >&5
15269 $as_echo "$ol_cv_resolver_none" >&6; }
15270
15271         if test $ol_cv_resolver_none = yes ; then
15272                 ol_cv_lib_resolver=yes
15273         fi
15274 fi
15275
15276 if test $ol_cv_lib_resolver = no ; then
15277         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lresolv)" >&5
15278 $as_echo_n "checking for resolver link (-lresolv)... " >&6; }
15279 if test "${ol_cv_resolver_resolv+set}" = set; then :
15280   $as_echo_n "(cached) " >&6
15281 else
15282
15283         ol_RESOLVER_LIB=-lresolv
15284         ol_LIBS=$LIBS
15285         LIBS="$ol_RESOLVER_LIB $LIBS"
15286
15287         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15288 /* end confdefs.h.  */
15289
15290 #ifdef HAVE_SYS_TYPES_H
15291 #       include <sys/types.h>
15292 #endif
15293 #include <netinet/in.h>
15294 #ifdef HAVE_ARPA_NAMESER_H
15295 #       include <arpa/nameser.h>
15296 #endif
15297 #ifdef HAVE_RESOLV_H
15298 #       include <resolv.h>
15299 #endif
15300
15301 int
15302 main ()
15303 {
15304 {
15305         int len, status;
15306         char *request = NULL;
15307         unsigned char reply[64*1024];
15308         unsigned char host[64*1024];
15309         unsigned char *p;
15310
15311 #ifdef NS_HFIXEDSZ
15312         /* Bind 8/9 interface */
15313         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15314 #else
15315         /* Bind 4 interface */
15316 # ifndef T_SRV
15317 #  define T_SRV 33
15318 # endif
15319         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15320 #endif
15321         p = reply;
15322 #ifdef NS_HFIXEDSZ
15323         /* Bind 8/9 interface */
15324         p += NS_HFIXEDSZ;
15325 #elif defined(HFIXEDSZ)
15326         /* Bind 4 interface w/ HFIXEDSZ */
15327         p += HFIXEDSZ;
15328 #else
15329         /* Bind 4 interface w/o HFIXEDSZ */
15330         p += sizeof(HEADER);
15331 #endif
15332         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15333 }
15334   ;
15335   return 0;
15336 }
15337 _ACEOF
15338 if ac_fn_c_try_link "$LINENO"; then :
15339   ol_cv_resolver_resolv=yes
15340 else
15341   ol_cv_resolver_resolv=no
15342 fi
15343 rm -f core conftest.err conftest.$ac_objext \
15344     conftest$ac_exeext conftest.$ac_ext
15345
15346         LIBS="$ol_LIBS"
15347
15348 fi
15349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_resolv" >&5
15350 $as_echo "$ol_cv_resolver_resolv" >&6; }
15351
15352         if test $ol_cv_resolver_resolv = yes ; then
15353                 ol_cv_lib_resolver=-lresolv
15354         fi
15355 fi
15356
15357 if test $ol_cv_lib_resolver = no ; then
15358         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lbind)" >&5
15359 $as_echo_n "checking for resolver link (-lbind)... " >&6; }
15360 if test "${ol_cv_resolver_bind+set}" = set; then :
15361   $as_echo_n "(cached) " >&6
15362 else
15363
15364         ol_RESOLVER_LIB=-lbind
15365         ol_LIBS=$LIBS
15366         LIBS="$ol_RESOLVER_LIB $LIBS"
15367
15368         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15369 /* end confdefs.h.  */
15370
15371 #ifdef HAVE_SYS_TYPES_H
15372 #       include <sys/types.h>
15373 #endif
15374 #include <netinet/in.h>
15375 #ifdef HAVE_ARPA_NAMESER_H
15376 #       include <arpa/nameser.h>
15377 #endif
15378 #ifdef HAVE_RESOLV_H
15379 #       include <resolv.h>
15380 #endif
15381
15382 int
15383 main ()
15384 {
15385 {
15386         int len, status;
15387         char *request = NULL;
15388         unsigned char reply[64*1024];
15389         unsigned char host[64*1024];
15390         unsigned char *p;
15391
15392 #ifdef NS_HFIXEDSZ
15393         /* Bind 8/9 interface */
15394         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15395 #else
15396         /* Bind 4 interface */
15397 # ifndef T_SRV
15398 #  define T_SRV 33
15399 # endif
15400         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15401 #endif
15402         p = reply;
15403 #ifdef NS_HFIXEDSZ
15404         /* Bind 8/9 interface */
15405         p += NS_HFIXEDSZ;
15406 #elif defined(HFIXEDSZ)
15407         /* Bind 4 interface w/ HFIXEDSZ */
15408         p += HFIXEDSZ;
15409 #else
15410         /* Bind 4 interface w/o HFIXEDSZ */
15411         p += sizeof(HEADER);
15412 #endif
15413         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15414 }
15415   ;
15416   return 0;
15417 }
15418 _ACEOF
15419 if ac_fn_c_try_link "$LINENO"; then :
15420   ol_cv_resolver_bind=yes
15421 else
15422   ol_cv_resolver_bind=no
15423 fi
15424 rm -f core conftest.err conftest.$ac_objext \
15425     conftest$ac_exeext conftest.$ac_ext
15426
15427         LIBS="$ol_LIBS"
15428
15429 fi
15430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_bind" >&5
15431 $as_echo "$ol_cv_resolver_bind" >&6; }
15432
15433         if test $ol_cv_resolver_bind = yes ; then
15434                 ol_cv_lib_resolver=-lbind
15435         fi
15436 fi
15437
15438
15439
15440 ol_link_dnssrv=no
15441 if test "$ol_cv_lib_resolver" != no ; then
15442
15443 $as_echo "#define HAVE_RES_QUERY 1" >>confdefs.h
15444
15445
15446         if test "$ol_enable_dnssrv" != no ; then
15447                 ol_link_dnssrv=yes
15448         fi
15449
15450         if test "$ol_cv_lib_resolver" != yes ; then
15451                 LIBS="$ol_cv_lib_resolver $LIBS"
15452         fi
15453 fi
15454
15455 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
15456         if test "$ol_link_dnssrv" = no ; then
15457                 as_fn_error "DNSSRV requires res_query()" "$LINENO" 5
15458         fi
15459 else
15460         ol_enable_dnssrv=no
15461 fi
15462
15463 for ac_func in hstrerror
15464 do :
15465   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15466 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15467 eval as_val=\$$as_ac_var
15468    if test "x$as_val" = x""yes; then :
15469   cat >>confdefs.h <<_ACEOF
15470 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15471 _ACEOF
15472
15473 fi
15474 done
15475
15476
15477 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
15478 do :
15479   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15480 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15481 eval as_val=\$$as_ac_var
15482    if test "x$as_val" = x""yes; then :
15483   cat >>confdefs.h <<_ACEOF
15484 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15485 _ACEOF
15486
15487 fi
15488 done
15489
15490
15491 ol_link_ipv6=no
15492 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
15493         if test $ol_enable_ipv6 = yes ; then
15494                 as_fn_error "IPv6 support requires getaddrinfo() and inet_ntop()" "$LINENO" 5
15495         fi
15496 elif test $ol_enable_ipv6 != no ; then
15497         { $as_echo "$as_me:${as_lineno-$LINENO}: checking INET6_ADDRSTRLEN" >&5
15498 $as_echo_n "checking INET6_ADDRSTRLEN... " >&6; }
15499 if test "${ol_cv_inet6_addrstrlen+set}" = set; then :
15500   $as_echo_n "(cached) " >&6
15501 else
15502
15503                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15504 /* end confdefs.h.  */
15505
15506 #                       include <netinet/in.h>
15507 #                       ifdef INET6_ADDRSTRLEN
15508                                 __has_inet6_addrstrlen__;
15509 #                       endif
15510
15511 _ACEOF
15512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15513   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then :
15514   ol_cv_inet6_addrstrlen=yes
15515 else
15516   ol_cv_inet6_addrstrlen=no
15517 fi
15518 rm -f conftest*
15519
15520 fi
15521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_inet6_addrstrlen" >&5
15522 $as_echo "$ol_cv_inet6_addrstrlen" >&6; }
15523
15524
15525         { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr_storage" >&5
15526 $as_echo_n "checking struct sockaddr_storage... " >&6; }
15527 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then :
15528   $as_echo_n "(cached) " >&6
15529 else
15530
15531                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15532 /* end confdefs.h.  */
15533
15534 #include <sys/types.h>
15535 #include <sys/socket.h>
15536
15537 int
15538 main ()
15539 {
15540
15541                         struct sockaddr_storage ss;
15542
15543   ;
15544   return 0;
15545 }
15546 _ACEOF
15547 if ac_fn_c_try_compile "$LINENO"; then :
15548   ol_cv_struct_sockaddr_storage=yes
15549 else
15550   ol_cv_struct_sockaddr_storage=no
15551 fi
15552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15553 fi
15554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_struct_sockaddr_storage" >&5
15555 $as_echo "$ol_cv_struct_sockaddr_storage" >&6; }
15556
15557         if test $ol_cv_inet6_addrstrlen = yes &&
15558            test $ol_cv_struct_sockaddr_storage = yes ; then
15559                 ol_link_ipv6=yes
15560         elif test $ol_enable_ipv6 = yes &&
15561              test $ol_cv_inet6_addrstrlen = no ; then
15562                 as_fn_error "IPv6 support requires INET6_ADDRSTRLEN" "$LINENO" 5
15563         elif test $ol_enable_ipv6 = yes &&
15564              test $ol_cv_struct_sockaddr_storage = no ; then
15565                 as_fn_error "IPv6 support requires struct sockaddr_storage" "$LINENO" 5
15566         fi
15567 fi
15568
15569 if test $ol_enable_local != no ; then
15570         for ac_header in sys/un.h
15571 do :
15572   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15573 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15574 eval as_val=\$$as_ac_Header
15575    if test "x$as_val" = x""yes; then :
15576   cat >>confdefs.h <<_ACEOF
15577 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15578 _ACEOF
15579
15580 fi
15581
15582 done
15583
15584
15585         if test $ol_enable_local = auto ; then
15586                 ol_enable_local=$ac_cv_header_sys_un_h
15587         elif test $ac_cv_header_sys_un_h = no ; then
15588                 as_fn_error "AF_LOCAL domain support requires sys/un.h" "$LINENO" 5
15589         fi
15590 fi
15591
15592
15593 if test $ol_with_tls = yes ; then
15594         ol_with_tls=auto
15595 fi
15596
15597 ol_link_tls=no
15598 if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
15599         for ac_header in openssl/ssl.h
15600 do :
15601   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
15602 if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then :
15603   cat >>confdefs.h <<_ACEOF
15604 #define HAVE_OPENSSL_SSL_H 1
15605 _ACEOF
15606
15607 fi
15608
15609 done
15610
15611
15612         if test $ac_cv_header_openssl_ssl_h = yes ; then
15613                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_msg_callback in -lssl" >&5
15614 $as_echo_n "checking for SSL_CTX_set_msg_callback in -lssl... " >&6; }
15615 if test "${ac_cv_lib_ssl_SSL_CTX_set_msg_callback+set}" = set; then :
15616   $as_echo_n "(cached) " >&6
15617 else
15618   ac_check_lib_save_LIBS=$LIBS
15619 LIBS="-lssl -lcrypto $LIBS"
15620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15621 /* end confdefs.h.  */
15622
15623 /* Override any GCC internal prototype to avoid an error.
15624    Use char because int might match the return type of a GCC
15625    builtin and then its argument prototype would still apply.  */
15626 #ifdef __cplusplus
15627 extern "C"
15628 #endif
15629 char SSL_CTX_set_msg_callback ();
15630 int
15631 main ()
15632 {
15633 return SSL_CTX_set_msg_callback ();
15634   ;
15635   return 0;
15636 }
15637 _ACEOF
15638 if ac_fn_c_try_link "$LINENO"; then :
15639   ac_cv_lib_ssl_SSL_CTX_set_msg_callback=yes
15640 else
15641   ac_cv_lib_ssl_SSL_CTX_set_msg_callback=no
15642 fi
15643 rm -f core conftest.err conftest.$ac_objext \
15644     conftest$ac_exeext conftest.$ac_ext
15645 LIBS=$ac_check_lib_save_LIBS
15646 fi
15647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_set_msg_callback" >&5
15648 $as_echo "$ac_cv_lib_ssl_SSL_CTX_set_msg_callback" >&6; }
15649 if test "x$ac_cv_lib_ssl_SSL_CTX_set_msg_callback" = x""yes; then :
15650   have_openssl=yes
15651                         need_rsaref=no
15652 else
15653   have_openssl=no
15654 fi
15655
15656
15657                 if test $have_openssl = no ; then
15658                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl3_accept in -lssl" >&5
15659 $as_echo_n "checking for ssl3_accept in -lssl... " >&6; }
15660 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then :
15661   $as_echo_n "(cached) " >&6
15662 else
15663   ac_check_lib_save_LIBS=$LIBS
15664 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
15665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15666 /* end confdefs.h.  */
15667
15668 /* Override any GCC internal prototype to avoid an error.
15669    Use char because int might match the return type of a GCC
15670    builtin and then its argument prototype would still apply.  */
15671 #ifdef __cplusplus
15672 extern "C"
15673 #endif
15674 char ssl3_accept ();
15675 int
15676 main ()
15677 {
15678 return ssl3_accept ();
15679   ;
15680   return 0;
15681 }
15682 _ACEOF
15683 if ac_fn_c_try_link "$LINENO"; then :
15684   ac_cv_lib_ssl_ssl3_accept=yes
15685 else
15686   ac_cv_lib_ssl_ssl3_accept=no
15687 fi
15688 rm -f core conftest.err conftest.$ac_objext \
15689     conftest$ac_exeext conftest.$ac_ext
15690 LIBS=$ac_check_lib_save_LIBS
15691 fi
15692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_ssl3_accept" >&5
15693 $as_echo "$ac_cv_lib_ssl_ssl3_accept" >&6; }
15694 if test "x$ac_cv_lib_ssl_ssl3_accept" = x""yes; then :
15695   have_openssl=yes
15696                                 need_rsaref=yes
15697 else
15698   have_openssl=no
15699 fi
15700
15701                 fi
15702
15703                 if test $have_openssl = yes ; then
15704                         ol_with_tls=openssl
15705                         ol_link_tls=yes
15706                         WITH_TLS_TYPE=openssl
15707
15708
15709 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
15710
15711
15712                         if test $need_rsaref = yes; then
15713
15714 $as_echo "#define HAVE_RSAREF 1" >>confdefs.h
15715
15716
15717                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
15718                         else
15719                                 TLS_LIBS="-lssl -lcrypto"
15720                         fi
15721
15722                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version (CRL checking capability)" >&5
15723 $as_echo_n "checking OpenSSL library version (CRL checking capability)... " >&6; }
15724 if test "${ol_cv_ssl_crl_compat+set}" = set; then :
15725   $as_echo_n "(cached) " >&6
15726 else
15727
15728                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15729 /* end confdefs.h.  */
15730
15731 #ifdef HAVE_OPENSSL_SSL_H
15732 #include <openssl/ssl.h>
15733 #endif
15734
15735 /* Require 0.9.7d+ */
15736 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
15737         char *__ssl_compat = "0.9.7d";
15738 #endif
15739
15740 _ACEOF
15741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15742   $EGREP "__ssl_compat" >/dev/null 2>&1; then :
15743   ol_cv_ssl_crl_compat=yes
15744 else
15745   ol_cv_ssl_crl_compat=no
15746 fi
15747 rm -f conftest*
15748
15749 fi
15750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_ssl_crl_compat" >&5
15751 $as_echo "$ol_cv_ssl_crl_compat" >&6; }
15752
15753                         if test $ol_cv_ssl_crl_compat = yes ; then
15754
15755 $as_echo "#define HAVE_OPENSSL_CRL 1" >>confdefs.h
15756
15757                         fi
15758                 fi
15759         fi
15760 fi
15761
15762 if test $ol_link_tls = no ; then
15763         if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then
15764                 for ac_header in gnutls/gnutls.h
15765 do :
15766   ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
15767 if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then :
15768   cat >>confdefs.h <<_ACEOF
15769 #define HAVE_GNUTLS_GNUTLS_H 1
15770 _ACEOF
15771
15772 fi
15773
15774 done
15775
15776
15777                 if test $ac_cv_header_gnutls_gnutls_h = yes ; then
15778                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15779 /* end confdefs.h.  */
15780 #include <gnutls/gnutls.h>
15781 #if GNUTLS_VERSION_NUMBER < 0x020c00
15782 #error "GnuTLS 2.12.0 or newer required"
15783 #endif
15784 _ACEOF
15785 if ac_fn_c_try_cpp "$LINENO"; then :
15786
15787 else
15788   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15789 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15790 as_fn_error "GnuTLS is too old
15791 See \`config.log' for more details." "$LINENO" 5; }
15792 fi
15793 rm -f conftest.err conftest.$ac_ext
15794
15795                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
15796 $as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
15797 if test "${ac_cv_lib_gnutls_gnutls_init+set}" = set; then :
15798   $as_echo_n "(cached) " >&6
15799 else
15800   ac_check_lib_save_LIBS=$LIBS
15801 LIBS="-lgnutls  $LIBS"
15802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15803 /* end confdefs.h.  */
15804
15805 /* Override any GCC internal prototype to avoid an error.
15806    Use char because int might match the return type of a GCC
15807    builtin and then its argument prototype would still apply.  */
15808 #ifdef __cplusplus
15809 extern "C"
15810 #endif
15811 char gnutls_init ();
15812 int
15813 main ()
15814 {
15815 return gnutls_init ();
15816   ;
15817   return 0;
15818 }
15819 _ACEOF
15820 if ac_fn_c_try_link "$LINENO"; then :
15821   ac_cv_lib_gnutls_gnutls_init=yes
15822 else
15823   ac_cv_lib_gnutls_gnutls_init=no
15824 fi
15825 rm -f core conftest.err conftest.$ac_objext \
15826     conftest$ac_exeext conftest.$ac_ext
15827 LIBS=$ac_check_lib_save_LIBS
15828 fi
15829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_init" >&5
15830 $as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
15831 if test "x$ac_cv_lib_gnutls_gnutls_init" = x""yes; then :
15832   have_gnutls=yes
15833 else
15834   have_gnutls=no
15835 fi
15836
15837
15838                         if test $have_gnutls = yes ; then
15839                                 ol_with_tls=gnutls
15840                                 ol_link_tls=yes
15841                                 WITH_TLS_TYPE=gnutls
15842
15843                                 TLS_LIBS="-lgnutls"
15844
15845
15846 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
15847
15848                         fi
15849                 fi
15850         fi
15851 fi
15852
15853 if test $ol_link_tls = no ; then
15854         if test $ol_with_tls = moznss || test $ol_with_tls = auto ; then
15855                 have_moznss=no
15856                 for ac_header in nssutil.h
15857 do :
15858   ac_fn_c_check_header_mongrel "$LINENO" "nssutil.h" "ac_cv_header_nssutil_h" "$ac_includes_default"
15859 if test "x$ac_cv_header_nssutil_h" = x""yes; then :
15860   cat >>confdefs.h <<_ACEOF
15861 #define HAVE_NSSUTIL_H 1
15862 _ACEOF
15863
15864 fi
15865
15866 done
15867
15868                 if test "$ac_cv_header_nssutil_h" = yes ; then
15869                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_Initialize in -lnss3" >&5
15870 $as_echo_n "checking for NSS_Initialize in -lnss3... " >&6; }
15871 if test "${ac_cv_lib_nss3_NSS_Initialize+set}" = set; then :
15872   $as_echo_n "(cached) " >&6
15873 else
15874   ac_check_lib_save_LIBS=$LIBS
15875 LIBS="-lnss3  $LIBS"
15876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15877 /* end confdefs.h.  */
15878
15879 /* Override any GCC internal prototype to avoid an error.
15880    Use char because int might match the return type of a GCC
15881    builtin and then its argument prototype would still apply.  */
15882 #ifdef __cplusplus
15883 extern "C"
15884 #endif
15885 char NSS_Initialize ();
15886 int
15887 main ()
15888 {
15889 return NSS_Initialize ();
15890   ;
15891   return 0;
15892 }
15893 _ACEOF
15894 if ac_fn_c_try_link "$LINENO"; then :
15895   ac_cv_lib_nss3_NSS_Initialize=yes
15896 else
15897   ac_cv_lib_nss3_NSS_Initialize=no
15898 fi
15899 rm -f core conftest.err conftest.$ac_objext \
15900     conftest$ac_exeext conftest.$ac_ext
15901 LIBS=$ac_check_lib_save_LIBS
15902 fi
15903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_NSS_Initialize" >&5
15904 $as_echo "$ac_cv_lib_nss3_NSS_Initialize" >&6; }
15905 if test "x$ac_cv_lib_nss3_NSS_Initialize" = x""yes; then :
15906    have_moznss=yes
15907 else
15908    have_moznss=no
15909 fi
15910
15911                 fi
15912
15913                 if test "$have_moznss" = yes ; then
15914                         ol_with_tls=moznss
15915                         ol_link_tls=yes
15916
15917 $as_echo "#define HAVE_MOZNSS 1" >>confdefs.h
15918
15919                         TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
15920                 else
15921                         if test $ol_with_tls = moznss ; then
15922                         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
15923                         fi
15924                 fi
15925         fi
15926 fi
15927
15928 WITH_TLS=no
15929 if test $ol_link_tls = yes ; then
15930
15931 $as_echo "#define HAVE_TLS 1" >>confdefs.h
15932
15933         WITH_TLS=yes
15934 elif test $ol_with_tls = auto ; then
15935         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate TLS/SSL package" >&5
15936 $as_echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
15937         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15938 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15939 elif test $ol_with_tls != no ; then
15940         as_fn_error "Could not locate TLS/SSL package" "$LINENO" 5
15941 else
15942         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15943 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15944 fi
15945
15946 if test $ol_enable_lmpasswd != no; then
15947         if test $ol_link_tls != yes ; then
15948                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
15949         fi
15950
15951
15952 $as_echo "#define SLAPD_LMHASH 1" >>confdefs.h
15953
15954 fi
15955
15956 ol_link_threads=no
15957
15958 case $ol_with_threads in auto | yes | nt)
15959
15960
15961         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
15962 if test "x$ac_cv_func__beginthread" = x""yes; then :
15963
15964 fi
15965
15966
15967         if test $ac_cv_func__beginthread = yes ; then
15968
15969 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
15970
15971                 ol_cv_nt_threads=yes
15972         fi
15973
15974
15975         if test "$ol_cv_nt_threads" = yes ; then
15976                 ol_link_threads=nt
15977                 ol_with_threads=found
15978                 ol_with_yielding_select=yes
15979
15980
15981 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
15982
15983
15984 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
15985
15986         fi
15987
15988         if test $ol_with_threads = nt ; then
15989                 as_fn_error "could not locate NT Threads" "$LINENO" 5
15990         fi
15991         ;;
15992 esac
15993
15994 case $ol_with_threads in auto | yes | posix)
15995
15996         for ac_header in pthread.h
15997 do :
15998   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15999 if test "x$ac_cv_header_pthread_h" = x""yes; then :
16000   cat >>confdefs.h <<_ACEOF
16001 #define HAVE_PTHREAD_H 1
16002 _ACEOF
16003
16004 fi
16005
16006 done
16007
16008
16009         if test $ac_cv_header_pthread_h = yes ; then
16010                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
16011 $as_echo_n "checking POSIX thread version... " >&6; }
16012 if test "${ol_cv_pthread_version+set}" = set; then :
16013   $as_echo_n "(cached) " >&6
16014 else
16015
16016         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16017 /* end confdefs.h.  */
16018
16019 #               include <pthread.h>
16020
16021 int
16022 main ()
16023 {
16024
16025                 int i = PTHREAD_CREATE_JOINABLE;
16026
16027   ;
16028   return 0;
16029 }
16030 _ACEOF
16031 if ac_fn_c_try_compile "$LINENO"; then :
16032
16033         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16034 /* end confdefs.h.  */
16035 #include <pthread.h>
16036
16037 _ACEOF
16038 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16039   $EGREP "pthread_detach" >/dev/null 2>&1; then :
16040   ol_cv_pthread_version=10
16041 else
16042   ol_cv_pthread_version=8
16043 fi
16044 rm -f conftest*
16045
16046 else
16047
16048         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16049 /* end confdefs.h.  */
16050
16051 #               include <pthread.h>
16052 #               ifdef PTHREAD_CREATE_UNDETACHED
16053                 draft7
16054 #               endif
16055
16056 _ACEOF
16057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16058   $EGREP "draft7" >/dev/null 2>&1; then :
16059   ol_cv_pthread_version=7
16060 else
16061
16062         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16063 /* end confdefs.h.  */
16064 #include <pthread.h>
16065
16066 _ACEOF
16067 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16068   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
16069   ol_cv_pthread_version=6
16070 else
16071
16072         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16073 /* end confdefs.h.  */
16074
16075 #               include <pthread.h>
16076 #ifdef          PTHREAD_MUTEX_INITIALIZER
16077                 draft5
16078 #endif
16079
16080 _ACEOF
16081 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16082   $EGREP "draft5" >/dev/null 2>&1; then :
16083   ol_cv_pthread_version=5
16084 else
16085   ol_cv_pthread_version=4
16086 fi
16087 rm -f conftest*
16088
16089 fi
16090 rm -f conftest*
16091
16092 fi
16093 rm -f conftest*
16094
16095 fi
16096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16097
16098 fi
16099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
16100 $as_echo "$ol_cv_pthread_version" >&6; }
16101
16102
16103                 if test $ol_cv_pthread_version != 0 ; then
16104
16105 cat >>confdefs.h <<_ACEOF
16106 #define HAVE_PTHREADS $ol_cv_pthread_version
16107 _ACEOF
16108
16109                 else
16110                         as_fn_error "unknown pthread version" "$LINENO" 5
16111                 fi
16112
16113                 # consider threads found
16114                 ol_with_threads=found
16115
16116
16117         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
16118 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
16119 if test "${ol_cv_header_linux_threads+set}" = set; then :
16120   $as_echo_n "(cached) " >&6
16121 else
16122   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16123 /* end confdefs.h.  */
16124 #include <pthread.h>
16125 _ACEOF
16126 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16127   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
16128   ol_cv_header_linux_threads=yes
16129 else
16130   ol_cv_header_linux_threads=no
16131 fi
16132 rm -f conftest*
16133
16134
16135 fi
16136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
16137 $as_echo "$ol_cv_header_linux_threads" >&6; }
16138         if test $ol_cv_header_linux_threads = yes; then
16139
16140 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
16141
16142         fi
16143
16144
16145         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
16146 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
16147 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then :
16148   $as_echo_n "(cached) " >&6
16149 else
16150   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16151 /* end confdefs.h.  */
16152 #include <pthread.h>
16153 #ifdef _POSIX_THREAD_IS_GNU_PTH
16154         __gnu_pth__;
16155 #endif
16156
16157 _ACEOF
16158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16159   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
16160   ol_cv_header_gnu_pth_pthread_h=yes
16161 else
16162   ol_cv_header_gnu_pth_pthread_h=no
16163 fi
16164 rm -f conftest*
16165
16166
16167 fi
16168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
16169 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
16170
16171
16172                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
16173                         for ac_header in sched.h
16174 do :
16175   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
16176 if test "x$ac_cv_header_sched_h" = x""yes; then :
16177   cat >>confdefs.h <<_ACEOF
16178 #define HAVE_SCHED_H 1
16179 _ACEOF
16180
16181 fi
16182
16183 done
16184
16185                 fi
16186
16187
16188                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
16189 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
16190 if test "${ol_cv_pthread_create+set}" = set; then :
16191   $as_echo_n "(cached) " >&6
16192 else
16193
16194                         if test "$cross_compiling" = yes; then :
16195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16196 /* end confdefs.h.  */
16197
16198 /* pthread test headers */
16199 #include <pthread.h>
16200 #if HAVE_PTHREADS < 7
16201 #include <errno.h>
16202 #endif
16203 #ifndef NULL
16204 #define NULL (void*)0
16205 #endif
16206
16207 static void *task(p)
16208         void *p;
16209 {
16210         return (void *) (p == NULL);
16211 }
16212
16213 int
16214 main ()
16215 {
16216
16217         /* pthread test function */
16218 #ifndef PTHREAD_CREATE_DETACHED
16219 #define PTHREAD_CREATE_DETACHED 1
16220 #endif
16221         pthread_t t;
16222         int status;
16223         int detach = PTHREAD_CREATE_DETACHED;
16224
16225 #if HAVE_PTHREADS > 4
16226         /* Final pthreads */
16227         pthread_attr_t attr;
16228
16229         status = pthread_attr_init(&attr);
16230         if( status ) return status;
16231
16232 #if HAVE_PTHREADS < 7
16233         status = pthread_attr_setdetachstate(&attr, &detach);
16234         if( status < 0 ) status = errno;
16235 #else
16236         status = pthread_attr_setdetachstate(&attr, detach);
16237 #endif
16238         if( status ) return status;
16239         status = pthread_create( &t, &attr, task, NULL );
16240 #if HAVE_PTHREADS < 7
16241         if( status < 0 ) status = errno;
16242 #endif
16243         if( status ) return status;
16244 #else
16245         /* Draft 4 pthreads */
16246         status = pthread_create( &t, pthread_attr_default, task, NULL );
16247         if( status ) return errno;
16248
16249         /* give thread a chance to complete */
16250         /* it should remain joinable and hence detachable */
16251         sleep( 1 );
16252
16253         status = pthread_detach( &t );
16254         if( status ) return errno;
16255 #endif
16256
16257 #ifdef HAVE_LINUX_THREADS
16258         pthread_kill_other_threads_np();
16259 #endif
16260
16261         return 0;
16262
16263   ;
16264   return 0;
16265 }
16266 _ACEOF
16267 if ac_fn_c_try_link "$LINENO"; then :
16268   ol_cv_pthread_create=yes
16269 else
16270   ol_cv_pthread_create=no
16271 fi
16272 rm -f core conftest.err conftest.$ac_objext \
16273     conftest$ac_exeext conftest.$ac_ext
16274 else
16275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16276 /* end confdefs.h.  */
16277
16278 /* pthread test headers */
16279 #include <pthread.h>
16280 #if HAVE_PTHREADS < 7
16281 #include <errno.h>
16282 #endif
16283 #ifndef NULL
16284 #define NULL (void*)0
16285 #endif
16286
16287 static void *task(p)
16288         void *p;
16289 {
16290         return (void *) (p == NULL);
16291 }
16292
16293
16294 int main(argc, argv)
16295         int argc;
16296         char **argv;
16297 {
16298
16299         /* pthread test function */
16300 #ifndef PTHREAD_CREATE_DETACHED
16301 #define PTHREAD_CREATE_DETACHED 1
16302 #endif
16303         pthread_t t;
16304         int status;
16305         int detach = PTHREAD_CREATE_DETACHED;
16306
16307 #if HAVE_PTHREADS > 4
16308         /* Final pthreads */
16309         pthread_attr_t attr;
16310
16311         status = pthread_attr_init(&attr);
16312         if( status ) return status;
16313
16314 #if HAVE_PTHREADS < 7
16315         status = pthread_attr_setdetachstate(&attr, &detach);
16316         if( status < 0 ) status = errno;
16317 #else
16318         status = pthread_attr_setdetachstate(&attr, detach);
16319 #endif
16320         if( status ) return status;
16321         status = pthread_create( &t, &attr, task, NULL );
16322 #if HAVE_PTHREADS < 7
16323         if( status < 0 ) status = errno;
16324 #endif
16325         if( status ) return status;
16326 #else
16327         /* Draft 4 pthreads */
16328         status = pthread_create( &t, pthread_attr_default, task, NULL );
16329         if( status ) return errno;
16330
16331         /* give thread a chance to complete */
16332         /* it should remain joinable and hence detachable */
16333         sleep( 1 );
16334
16335         status = pthread_detach( &t );
16336         if( status ) return errno;
16337 #endif
16338
16339 #ifdef HAVE_LINUX_THREADS
16340         pthread_kill_other_threads_np();
16341 #endif
16342
16343         return 0;
16344
16345 }
16346
16347 _ACEOF
16348 if ac_fn_c_try_run "$LINENO"; then :
16349   ol_cv_pthread_create=yes
16350 else
16351   ol_cv_pthread_create=no
16352 fi
16353 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16354   conftest.$ac_objext conftest.beam conftest.$ac_ext
16355 fi
16356
16357 fi
16358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
16359 $as_echo "$ol_cv_pthread_create" >&6; }
16360
16361                 if test $ol_cv_pthread_create != no ; then
16362                         ol_link_threads=posix
16363                         ol_link_pthreads=""
16364                 fi
16365
16366                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
16367 if test "$ol_link_threads" = no ; then
16368         # try -kthread
16369         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
16370 $as_echo_n "checking for pthread link with -kthread... " >&6; }
16371 if test "${ol_cv_pthread_kthread+set}" = set; then :
16372   $as_echo_n "(cached) " >&6
16373 else
16374
16375                 # save the flags
16376                 ol_LIBS="$LIBS"
16377                 LIBS="-kthread $LIBS"
16378
16379                 if test "$cross_compiling" = yes; then :
16380   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16381 /* end confdefs.h.  */
16382
16383 /* pthread test headers */
16384 #include <pthread.h>
16385 #if HAVE_PTHREADS < 7
16386 #include <errno.h>
16387 #endif
16388 #ifndef NULL
16389 #define NULL (void*)0
16390 #endif
16391
16392 static void *task(p)
16393         void *p;
16394 {
16395         return (void *) (p == NULL);
16396 }
16397
16398 int
16399 main ()
16400 {
16401
16402         /* pthread test function */
16403 #ifndef PTHREAD_CREATE_DETACHED
16404 #define PTHREAD_CREATE_DETACHED 1
16405 #endif
16406         pthread_t t;
16407         int status;
16408         int detach = PTHREAD_CREATE_DETACHED;
16409
16410 #if HAVE_PTHREADS > 4
16411         /* Final pthreads */
16412         pthread_attr_t attr;
16413
16414         status = pthread_attr_init(&attr);
16415         if( status ) return status;
16416
16417 #if HAVE_PTHREADS < 7
16418         status = pthread_attr_setdetachstate(&attr, &detach);
16419         if( status < 0 ) status = errno;
16420 #else
16421         status = pthread_attr_setdetachstate(&attr, detach);
16422 #endif
16423         if( status ) return status;
16424         status = pthread_create( &t, &attr, task, NULL );
16425 #if HAVE_PTHREADS < 7
16426         if( status < 0 ) status = errno;
16427 #endif
16428         if( status ) return status;
16429 #else
16430         /* Draft 4 pthreads */
16431         status = pthread_create( &t, pthread_attr_default, task, NULL );
16432         if( status ) return errno;
16433
16434         /* give thread a chance to complete */
16435         /* it should remain joinable and hence detachable */
16436         sleep( 1 );
16437
16438         status = pthread_detach( &t );
16439         if( status ) return errno;
16440 #endif
16441
16442 #ifdef HAVE_LINUX_THREADS
16443         pthread_kill_other_threads_np();
16444 #endif
16445
16446         return 0;
16447
16448   ;
16449   return 0;
16450 }
16451 _ACEOF
16452 if ac_fn_c_try_link "$LINENO"; then :
16453   ol_cv_pthread_kthread=yes
16454 else
16455   ol_cv_pthread_kthread=no
16456 fi
16457 rm -f core conftest.err conftest.$ac_objext \
16458     conftest$ac_exeext conftest.$ac_ext
16459 else
16460   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16461 /* end confdefs.h.  */
16462
16463 /* pthread test headers */
16464 #include <pthread.h>
16465 #if HAVE_PTHREADS < 7
16466 #include <errno.h>
16467 #endif
16468 #ifndef NULL
16469 #define NULL (void*)0
16470 #endif
16471
16472 static void *task(p)
16473         void *p;
16474 {
16475         return (void *) (p == NULL);
16476 }
16477
16478
16479 int main(argc, argv)
16480         int argc;
16481         char **argv;
16482 {
16483
16484         /* pthread test function */
16485 #ifndef PTHREAD_CREATE_DETACHED
16486 #define PTHREAD_CREATE_DETACHED 1
16487 #endif
16488         pthread_t t;
16489         int status;
16490         int detach = PTHREAD_CREATE_DETACHED;
16491
16492 #if HAVE_PTHREADS > 4
16493         /* Final pthreads */
16494         pthread_attr_t attr;
16495
16496         status = pthread_attr_init(&attr);
16497         if( status ) return status;
16498
16499 #if HAVE_PTHREADS < 7
16500         status = pthread_attr_setdetachstate(&attr, &detach);
16501         if( status < 0 ) status = errno;
16502 #else
16503         status = pthread_attr_setdetachstate(&attr, detach);
16504 #endif
16505         if( status ) return status;
16506         status = pthread_create( &t, &attr, task, NULL );
16507 #if HAVE_PTHREADS < 7
16508         if( status < 0 ) status = errno;
16509 #endif
16510         if( status ) return status;
16511 #else
16512         /* Draft 4 pthreads */
16513         status = pthread_create( &t, pthread_attr_default, task, NULL );
16514         if( status ) return errno;
16515
16516         /* give thread a chance to complete */
16517         /* it should remain joinable and hence detachable */
16518         sleep( 1 );
16519
16520         status = pthread_detach( &t );
16521         if( status ) return errno;
16522 #endif
16523
16524 #ifdef HAVE_LINUX_THREADS
16525         pthread_kill_other_threads_np();
16526 #endif
16527
16528         return 0;
16529
16530 }
16531
16532 _ACEOF
16533 if ac_fn_c_try_run "$LINENO"; then :
16534   ol_cv_pthread_kthread=yes
16535 else
16536   ol_cv_pthread_kthread=no
16537 fi
16538 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16539   conftest.$ac_objext conftest.beam conftest.$ac_ext
16540 fi
16541
16542
16543                 # restore the LIBS
16544                 LIBS="$ol_LIBS"
16545
16546 fi
16547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
16548 $as_echo "$ol_cv_pthread_kthread" >&6; }
16549
16550         if test $ol_cv_pthread_kthread = yes ; then
16551                 ol_link_pthreads="-kthread"
16552                 ol_link_threads=posix
16553         fi
16554 fi
16555
16556                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
16557 if test "$ol_link_threads" = no ; then
16558         # try -pthread
16559         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
16560 $as_echo_n "checking for pthread link with -pthread... " >&6; }
16561 if test "${ol_cv_pthread_pthread+set}" = set; then :
16562   $as_echo_n "(cached) " >&6
16563 else
16564
16565                 # save the flags
16566                 ol_LIBS="$LIBS"
16567                 LIBS="-pthread $LIBS"
16568
16569                 if test "$cross_compiling" = yes; then :
16570   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16571 /* end confdefs.h.  */
16572
16573 /* pthread test headers */
16574 #include <pthread.h>
16575 #if HAVE_PTHREADS < 7
16576 #include <errno.h>
16577 #endif
16578 #ifndef NULL
16579 #define NULL (void*)0
16580 #endif
16581
16582 static void *task(p)
16583         void *p;
16584 {
16585         return (void *) (p == NULL);
16586 }
16587
16588 int
16589 main ()
16590 {
16591
16592         /* pthread test function */
16593 #ifndef PTHREAD_CREATE_DETACHED
16594 #define PTHREAD_CREATE_DETACHED 1
16595 #endif
16596         pthread_t t;
16597         int status;
16598         int detach = PTHREAD_CREATE_DETACHED;
16599
16600 #if HAVE_PTHREADS > 4
16601         /* Final pthreads */
16602         pthread_attr_t attr;
16603
16604         status = pthread_attr_init(&attr);
16605         if( status ) return status;
16606
16607 #if HAVE_PTHREADS < 7
16608         status = pthread_attr_setdetachstate(&attr, &detach);
16609         if( status < 0 ) status = errno;
16610 #else
16611         status = pthread_attr_setdetachstate(&attr, detach);
16612 #endif
16613         if( status ) return status;
16614         status = pthread_create( &t, &attr, task, NULL );
16615 #if HAVE_PTHREADS < 7
16616         if( status < 0 ) status = errno;
16617 #endif
16618         if( status ) return status;
16619 #else
16620         /* Draft 4 pthreads */
16621         status = pthread_create( &t, pthread_attr_default, task, NULL );
16622         if( status ) return errno;
16623
16624         /* give thread a chance to complete */
16625         /* it should remain joinable and hence detachable */
16626         sleep( 1 );
16627
16628         status = pthread_detach( &t );
16629         if( status ) return errno;
16630 #endif
16631
16632 #ifdef HAVE_LINUX_THREADS
16633         pthread_kill_other_threads_np();
16634 #endif
16635
16636         return 0;
16637
16638   ;
16639   return 0;
16640 }
16641 _ACEOF
16642 if ac_fn_c_try_link "$LINENO"; then :
16643   ol_cv_pthread_pthread=yes
16644 else
16645   ol_cv_pthread_pthread=no
16646 fi
16647 rm -f core conftest.err conftest.$ac_objext \
16648     conftest$ac_exeext conftest.$ac_ext
16649 else
16650   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16651 /* end confdefs.h.  */
16652
16653 /* pthread test headers */
16654 #include <pthread.h>
16655 #if HAVE_PTHREADS < 7
16656 #include <errno.h>
16657 #endif
16658 #ifndef NULL
16659 #define NULL (void*)0
16660 #endif
16661
16662 static void *task(p)
16663         void *p;
16664 {
16665         return (void *) (p == NULL);
16666 }
16667
16668
16669 int main(argc, argv)
16670         int argc;
16671         char **argv;
16672 {
16673
16674         /* pthread test function */
16675 #ifndef PTHREAD_CREATE_DETACHED
16676 #define PTHREAD_CREATE_DETACHED 1
16677 #endif
16678         pthread_t t;
16679         int status;
16680         int detach = PTHREAD_CREATE_DETACHED;
16681
16682 #if HAVE_PTHREADS > 4
16683         /* Final pthreads */
16684         pthread_attr_t attr;
16685
16686         status = pthread_attr_init(&attr);
16687         if( status ) return status;
16688
16689 #if HAVE_PTHREADS < 7
16690         status = pthread_attr_setdetachstate(&attr, &detach);
16691         if( status < 0 ) status = errno;
16692 #else
16693         status = pthread_attr_setdetachstate(&attr, detach);
16694 #endif
16695         if( status ) return status;
16696         status = pthread_create( &t, &attr, task, NULL );
16697 #if HAVE_PTHREADS < 7
16698         if( status < 0 ) status = errno;
16699 #endif
16700         if( status ) return status;
16701 #else
16702         /* Draft 4 pthreads */
16703         status = pthread_create( &t, pthread_attr_default, task, NULL );
16704         if( status ) return errno;
16705
16706         /* give thread a chance to complete */
16707         /* it should remain joinable and hence detachable */
16708         sleep( 1 );
16709
16710         status = pthread_detach( &t );
16711         if( status ) return errno;
16712 #endif
16713
16714 #ifdef HAVE_LINUX_THREADS
16715         pthread_kill_other_threads_np();
16716 #endif
16717
16718         return 0;
16719
16720 }
16721
16722 _ACEOF
16723 if ac_fn_c_try_run "$LINENO"; then :
16724   ol_cv_pthread_pthread=yes
16725 else
16726   ol_cv_pthread_pthread=no
16727 fi
16728 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16729   conftest.$ac_objext conftest.beam conftest.$ac_ext
16730 fi
16731
16732
16733                 # restore the LIBS
16734                 LIBS="$ol_LIBS"
16735
16736 fi
16737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
16738 $as_echo "$ol_cv_pthread_pthread" >&6; }
16739
16740         if test $ol_cv_pthread_pthread = yes ; then
16741                 ol_link_pthreads="-pthread"
16742                 ol_link_threads=posix
16743         fi
16744 fi
16745
16746                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
16747 if test "$ol_link_threads" = no ; then
16748         # try -pthreads
16749         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
16750 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
16751 if test "${ol_cv_pthread_pthreads+set}" = set; then :
16752   $as_echo_n "(cached) " >&6
16753 else
16754
16755                 # save the flags
16756                 ol_LIBS="$LIBS"
16757                 LIBS="-pthreads $LIBS"
16758
16759                 if test "$cross_compiling" = yes; then :
16760   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16761 /* end confdefs.h.  */
16762
16763 /* pthread test headers */
16764 #include <pthread.h>
16765 #if HAVE_PTHREADS < 7
16766 #include <errno.h>
16767 #endif
16768 #ifndef NULL
16769 #define NULL (void*)0
16770 #endif
16771
16772 static void *task(p)
16773         void *p;
16774 {
16775         return (void *) (p == NULL);
16776 }
16777
16778 int
16779 main ()
16780 {
16781
16782         /* pthread test function */
16783 #ifndef PTHREAD_CREATE_DETACHED
16784 #define PTHREAD_CREATE_DETACHED 1
16785 #endif
16786         pthread_t t;
16787         int status;
16788         int detach = PTHREAD_CREATE_DETACHED;
16789
16790 #if HAVE_PTHREADS > 4
16791         /* Final pthreads */
16792         pthread_attr_t attr;
16793
16794         status = pthread_attr_init(&attr);
16795         if( status ) return status;
16796
16797 #if HAVE_PTHREADS < 7
16798         status = pthread_attr_setdetachstate(&attr, &detach);
16799         if( status < 0 ) status = errno;
16800 #else
16801         status = pthread_attr_setdetachstate(&attr, detach);
16802 #endif
16803         if( status ) return status;
16804         status = pthread_create( &t, &attr, task, NULL );
16805 #if HAVE_PTHREADS < 7
16806         if( status < 0 ) status = errno;
16807 #endif
16808         if( status ) return status;
16809 #else
16810         /* Draft 4 pthreads */
16811         status = pthread_create( &t, pthread_attr_default, task, NULL );
16812         if( status ) return errno;
16813
16814         /* give thread a chance to complete */
16815         /* it should remain joinable and hence detachable */
16816         sleep( 1 );
16817
16818         status = pthread_detach( &t );
16819         if( status ) return errno;
16820 #endif
16821
16822 #ifdef HAVE_LINUX_THREADS
16823         pthread_kill_other_threads_np();
16824 #endif
16825
16826         return 0;
16827
16828   ;
16829   return 0;
16830 }
16831 _ACEOF
16832 if ac_fn_c_try_link "$LINENO"; then :
16833   ol_cv_pthread_pthreads=yes
16834 else
16835   ol_cv_pthread_pthreads=no
16836 fi
16837 rm -f core conftest.err conftest.$ac_objext \
16838     conftest$ac_exeext conftest.$ac_ext
16839 else
16840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16841 /* end confdefs.h.  */
16842
16843 /* pthread test headers */
16844 #include <pthread.h>
16845 #if HAVE_PTHREADS < 7
16846 #include <errno.h>
16847 #endif
16848 #ifndef NULL
16849 #define NULL (void*)0
16850 #endif
16851
16852 static void *task(p)
16853         void *p;
16854 {
16855         return (void *) (p == NULL);
16856 }
16857
16858
16859 int main(argc, argv)
16860         int argc;
16861         char **argv;
16862 {
16863
16864         /* pthread test function */
16865 #ifndef PTHREAD_CREATE_DETACHED
16866 #define PTHREAD_CREATE_DETACHED 1
16867 #endif
16868         pthread_t t;
16869         int status;
16870         int detach = PTHREAD_CREATE_DETACHED;
16871
16872 #if HAVE_PTHREADS > 4
16873         /* Final pthreads */
16874         pthread_attr_t attr;
16875
16876         status = pthread_attr_init(&attr);
16877         if( status ) return status;
16878
16879 #if HAVE_PTHREADS < 7
16880         status = pthread_attr_setdetachstate(&attr, &detach);
16881         if( status < 0 ) status = errno;
16882 #else
16883         status = pthread_attr_setdetachstate(&attr, detach);
16884 #endif
16885         if( status ) return status;
16886         status = pthread_create( &t, &attr, task, NULL );
16887 #if HAVE_PTHREADS < 7
16888         if( status < 0 ) status = errno;
16889 #endif
16890         if( status ) return status;
16891 #else
16892         /* Draft 4 pthreads */
16893         status = pthread_create( &t, pthread_attr_default, task, NULL );
16894         if( status ) return errno;
16895
16896         /* give thread a chance to complete */
16897         /* it should remain joinable and hence detachable */
16898         sleep( 1 );
16899
16900         status = pthread_detach( &t );
16901         if( status ) return errno;
16902 #endif
16903
16904 #ifdef HAVE_LINUX_THREADS
16905         pthread_kill_other_threads_np();
16906 #endif
16907
16908         return 0;
16909
16910 }
16911
16912 _ACEOF
16913 if ac_fn_c_try_run "$LINENO"; then :
16914   ol_cv_pthread_pthreads=yes
16915 else
16916   ol_cv_pthread_pthreads=no
16917 fi
16918 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16919   conftest.$ac_objext conftest.beam conftest.$ac_ext
16920 fi
16921
16922
16923                 # restore the LIBS
16924                 LIBS="$ol_LIBS"
16925
16926 fi
16927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
16928 $as_echo "$ol_cv_pthread_pthreads" >&6; }
16929
16930         if test $ol_cv_pthread_pthreads = yes ; then
16931                 ol_link_pthreads="-pthreads"
16932                 ol_link_threads=posix
16933         fi
16934 fi
16935
16936                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
16937 if test "$ol_link_threads" = no ; then
16938         # try -mthreads
16939         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
16940 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
16941 if test "${ol_cv_pthread_mthreads+set}" = set; then :
16942   $as_echo_n "(cached) " >&6
16943 else
16944
16945                 # save the flags
16946                 ol_LIBS="$LIBS"
16947                 LIBS="-mthreads $LIBS"
16948
16949                 if test "$cross_compiling" = yes; then :
16950   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16951 /* end confdefs.h.  */
16952
16953 /* pthread test headers */
16954 #include <pthread.h>
16955 #if HAVE_PTHREADS < 7
16956 #include <errno.h>
16957 #endif
16958 #ifndef NULL
16959 #define NULL (void*)0
16960 #endif
16961
16962 static void *task(p)
16963         void *p;
16964 {
16965         return (void *) (p == NULL);
16966 }
16967
16968 int
16969 main ()
16970 {
16971
16972         /* pthread test function */
16973 #ifndef PTHREAD_CREATE_DETACHED
16974 #define PTHREAD_CREATE_DETACHED 1
16975 #endif
16976         pthread_t t;
16977         int status;
16978         int detach = PTHREAD_CREATE_DETACHED;
16979
16980 #if HAVE_PTHREADS > 4
16981         /* Final pthreads */
16982         pthread_attr_t attr;
16983
16984         status = pthread_attr_init(&attr);
16985         if( status ) return status;
16986
16987 #if HAVE_PTHREADS < 7
16988         status = pthread_attr_setdetachstate(&attr, &detach);
16989         if( status < 0 ) status = errno;
16990 #else
16991         status = pthread_attr_setdetachstate(&attr, detach);
16992 #endif
16993         if( status ) return status;
16994         status = pthread_create( &t, &attr, task, NULL );
16995 #if HAVE_PTHREADS < 7
16996         if( status < 0 ) status = errno;
16997 #endif
16998         if( status ) return status;
16999 #else
17000         /* Draft 4 pthreads */
17001         status = pthread_create( &t, pthread_attr_default, task, NULL );
17002         if( status ) return errno;
17003
17004         /* give thread a chance to complete */
17005         /* it should remain joinable and hence detachable */
17006         sleep( 1 );
17007
17008         status = pthread_detach( &t );
17009         if( status ) return errno;
17010 #endif
17011
17012 #ifdef HAVE_LINUX_THREADS
17013         pthread_kill_other_threads_np();
17014 #endif
17015
17016         return 0;
17017
17018   ;
17019   return 0;
17020 }
17021 _ACEOF
17022 if ac_fn_c_try_link "$LINENO"; then :
17023   ol_cv_pthread_mthreads=yes
17024 else
17025   ol_cv_pthread_mthreads=no
17026 fi
17027 rm -f core conftest.err conftest.$ac_objext \
17028     conftest$ac_exeext conftest.$ac_ext
17029 else
17030   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17031 /* end confdefs.h.  */
17032
17033 /* pthread test headers */
17034 #include <pthread.h>
17035 #if HAVE_PTHREADS < 7
17036 #include <errno.h>
17037 #endif
17038 #ifndef NULL
17039 #define NULL (void*)0
17040 #endif
17041
17042 static void *task(p)
17043         void *p;
17044 {
17045         return (void *) (p == NULL);
17046 }
17047
17048
17049 int main(argc, argv)
17050         int argc;
17051         char **argv;
17052 {
17053
17054         /* pthread test function */
17055 #ifndef PTHREAD_CREATE_DETACHED
17056 #define PTHREAD_CREATE_DETACHED 1
17057 #endif
17058         pthread_t t;
17059         int status;
17060         int detach = PTHREAD_CREATE_DETACHED;
17061
17062 #if HAVE_PTHREADS > 4
17063         /* Final pthreads */
17064         pthread_attr_t attr;
17065
17066         status = pthread_attr_init(&attr);
17067         if( status ) return status;
17068
17069 #if HAVE_PTHREADS < 7
17070         status = pthread_attr_setdetachstate(&attr, &detach);
17071         if( status < 0 ) status = errno;
17072 #else
17073         status = pthread_attr_setdetachstate(&attr, detach);
17074 #endif
17075         if( status ) return status;
17076         status = pthread_create( &t, &attr, task, NULL );
17077 #if HAVE_PTHREADS < 7
17078         if( status < 0 ) status = errno;
17079 #endif
17080         if( status ) return status;
17081 #else
17082         /* Draft 4 pthreads */
17083         status = pthread_create( &t, pthread_attr_default, task, NULL );
17084         if( status ) return errno;
17085
17086         /* give thread a chance to complete */
17087         /* it should remain joinable and hence detachable */
17088         sleep( 1 );
17089
17090         status = pthread_detach( &t );
17091         if( status ) return errno;
17092 #endif
17093
17094 #ifdef HAVE_LINUX_THREADS
17095         pthread_kill_other_threads_np();
17096 #endif
17097
17098         return 0;
17099
17100 }
17101
17102 _ACEOF
17103 if ac_fn_c_try_run "$LINENO"; then :
17104   ol_cv_pthread_mthreads=yes
17105 else
17106   ol_cv_pthread_mthreads=no
17107 fi
17108 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17109   conftest.$ac_objext conftest.beam conftest.$ac_ext
17110 fi
17111
17112
17113                 # restore the LIBS
17114                 LIBS="$ol_LIBS"
17115
17116 fi
17117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
17118 $as_echo "$ol_cv_pthread_mthreads" >&6; }
17119
17120         if test $ol_cv_pthread_mthreads = yes ; then
17121                 ol_link_pthreads="-mthreads"
17122                 ol_link_threads=posix
17123         fi
17124 fi
17125
17126                 # Pthread try link: -thread (ol_cv_pthread_thread)
17127 if test "$ol_link_threads" = no ; then
17128         # try -thread
17129         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
17130 $as_echo_n "checking for pthread link with -thread... " >&6; }
17131 if test "${ol_cv_pthread_thread+set}" = set; then :
17132   $as_echo_n "(cached) " >&6
17133 else
17134
17135                 # save the flags
17136                 ol_LIBS="$LIBS"
17137                 LIBS="-thread $LIBS"
17138
17139                 if test "$cross_compiling" = yes; then :
17140   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17141 /* end confdefs.h.  */
17142
17143 /* pthread test headers */
17144 #include <pthread.h>
17145 #if HAVE_PTHREADS < 7
17146 #include <errno.h>
17147 #endif
17148 #ifndef NULL
17149 #define NULL (void*)0
17150 #endif
17151
17152 static void *task(p)
17153         void *p;
17154 {
17155         return (void *) (p == NULL);
17156 }
17157
17158 int
17159 main ()
17160 {
17161
17162         /* pthread test function */
17163 #ifndef PTHREAD_CREATE_DETACHED
17164 #define PTHREAD_CREATE_DETACHED 1
17165 #endif
17166         pthread_t t;
17167         int status;
17168         int detach = PTHREAD_CREATE_DETACHED;
17169
17170 #if HAVE_PTHREADS > 4
17171         /* Final pthreads */
17172         pthread_attr_t attr;
17173
17174         status = pthread_attr_init(&attr);
17175         if( status ) return status;
17176
17177 #if HAVE_PTHREADS < 7
17178         status = pthread_attr_setdetachstate(&attr, &detach);
17179         if( status < 0 ) status = errno;
17180 #else
17181         status = pthread_attr_setdetachstate(&attr, detach);
17182 #endif
17183         if( status ) return status;
17184         status = pthread_create( &t, &attr, task, NULL );
17185 #if HAVE_PTHREADS < 7
17186         if( status < 0 ) status = errno;
17187 #endif
17188         if( status ) return status;
17189 #else
17190         /* Draft 4 pthreads */
17191         status = pthread_create( &t, pthread_attr_default, task, NULL );
17192         if( status ) return errno;
17193
17194         /* give thread a chance to complete */
17195         /* it should remain joinable and hence detachable */
17196         sleep( 1 );
17197
17198         status = pthread_detach( &t );
17199         if( status ) return errno;
17200 #endif
17201
17202 #ifdef HAVE_LINUX_THREADS
17203         pthread_kill_other_threads_np();
17204 #endif
17205
17206         return 0;
17207
17208   ;
17209   return 0;
17210 }
17211 _ACEOF
17212 if ac_fn_c_try_link "$LINENO"; then :
17213   ol_cv_pthread_thread=yes
17214 else
17215   ol_cv_pthread_thread=no
17216 fi
17217 rm -f core conftest.err conftest.$ac_objext \
17218     conftest$ac_exeext conftest.$ac_ext
17219 else
17220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17221 /* end confdefs.h.  */
17222
17223 /* pthread test headers */
17224 #include <pthread.h>
17225 #if HAVE_PTHREADS < 7
17226 #include <errno.h>
17227 #endif
17228 #ifndef NULL
17229 #define NULL (void*)0
17230 #endif
17231
17232 static void *task(p)
17233         void *p;
17234 {
17235         return (void *) (p == NULL);
17236 }
17237
17238
17239 int main(argc, argv)
17240         int argc;
17241         char **argv;
17242 {
17243
17244         /* pthread test function */
17245 #ifndef PTHREAD_CREATE_DETACHED
17246 #define PTHREAD_CREATE_DETACHED 1
17247 #endif
17248         pthread_t t;
17249         int status;
17250         int detach = PTHREAD_CREATE_DETACHED;
17251
17252 #if HAVE_PTHREADS > 4
17253         /* Final pthreads */
17254         pthread_attr_t attr;
17255
17256         status = pthread_attr_init(&attr);
17257         if( status ) return status;
17258
17259 #if HAVE_PTHREADS < 7
17260         status = pthread_attr_setdetachstate(&attr, &detach);
17261         if( status < 0 ) status = errno;
17262 #else
17263         status = pthread_attr_setdetachstate(&attr, detach);
17264 #endif
17265         if( status ) return status;
17266         status = pthread_create( &t, &attr, task, NULL );
17267 #if HAVE_PTHREADS < 7
17268         if( status < 0 ) status = errno;
17269 #endif
17270         if( status ) return status;
17271 #else
17272         /* Draft 4 pthreads */
17273         status = pthread_create( &t, pthread_attr_default, task, NULL );
17274         if( status ) return errno;
17275
17276         /* give thread a chance to complete */
17277         /* it should remain joinable and hence detachable */
17278         sleep( 1 );
17279
17280         status = pthread_detach( &t );
17281         if( status ) return errno;
17282 #endif
17283
17284 #ifdef HAVE_LINUX_THREADS
17285         pthread_kill_other_threads_np();
17286 #endif
17287
17288         return 0;
17289
17290 }
17291
17292 _ACEOF
17293 if ac_fn_c_try_run "$LINENO"; then :
17294   ol_cv_pthread_thread=yes
17295 else
17296   ol_cv_pthread_thread=no
17297 fi
17298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17299   conftest.$ac_objext conftest.beam conftest.$ac_ext
17300 fi
17301
17302
17303                 # restore the LIBS
17304                 LIBS="$ol_LIBS"
17305
17306 fi
17307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
17308 $as_echo "$ol_cv_pthread_thread" >&6; }
17309
17310         if test $ol_cv_pthread_thread = yes ; then
17311                 ol_link_pthreads="-thread"
17312                 ol_link_threads=posix
17313         fi
17314 fi
17315
17316
17317                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
17318 if test "$ol_link_threads" = no ; then
17319         # try -lpthread -lmach -lexc -lc_r
17320         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
17321 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
17322 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then :
17323   $as_echo_n "(cached) " >&6
17324 else
17325
17326                 # save the flags
17327                 ol_LIBS="$LIBS"
17328                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
17329
17330                 if test "$cross_compiling" = yes; then :
17331   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17332 /* end confdefs.h.  */
17333
17334 /* pthread test headers */
17335 #include <pthread.h>
17336 #if HAVE_PTHREADS < 7
17337 #include <errno.h>
17338 #endif
17339 #ifndef NULL
17340 #define NULL (void*)0
17341 #endif
17342
17343 static void *task(p)
17344         void *p;
17345 {
17346         return (void *) (p == NULL);
17347 }
17348
17349 int
17350 main ()
17351 {
17352
17353         /* pthread test function */
17354 #ifndef PTHREAD_CREATE_DETACHED
17355 #define PTHREAD_CREATE_DETACHED 1
17356 #endif
17357         pthread_t t;
17358         int status;
17359         int detach = PTHREAD_CREATE_DETACHED;
17360
17361 #if HAVE_PTHREADS > 4
17362         /* Final pthreads */
17363         pthread_attr_t attr;
17364
17365         status = pthread_attr_init(&attr);
17366         if( status ) return status;
17367
17368 #if HAVE_PTHREADS < 7
17369         status = pthread_attr_setdetachstate(&attr, &detach);
17370         if( status < 0 ) status = errno;
17371 #else
17372         status = pthread_attr_setdetachstate(&attr, detach);
17373 #endif
17374         if( status ) return status;
17375         status = pthread_create( &t, &attr, task, NULL );
17376 #if HAVE_PTHREADS < 7
17377         if( status < 0 ) status = errno;
17378 #endif
17379         if( status ) return status;
17380 #else
17381         /* Draft 4 pthreads */
17382         status = pthread_create( &t, pthread_attr_default, task, NULL );
17383         if( status ) return errno;
17384
17385         /* give thread a chance to complete */
17386         /* it should remain joinable and hence detachable */
17387         sleep( 1 );
17388
17389         status = pthread_detach( &t );
17390         if( status ) return errno;
17391 #endif
17392
17393 #ifdef HAVE_LINUX_THREADS
17394         pthread_kill_other_threads_np();
17395 #endif
17396
17397         return 0;
17398
17399   ;
17400   return 0;
17401 }
17402 _ACEOF
17403 if ac_fn_c_try_link "$LINENO"; then :
17404   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17405 else
17406   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17407 fi
17408 rm -f core conftest.err conftest.$ac_objext \
17409     conftest$ac_exeext conftest.$ac_ext
17410 else
17411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17412 /* end confdefs.h.  */
17413
17414 /* pthread test headers */
17415 #include <pthread.h>
17416 #if HAVE_PTHREADS < 7
17417 #include <errno.h>
17418 #endif
17419 #ifndef NULL
17420 #define NULL (void*)0
17421 #endif
17422
17423 static void *task(p)
17424         void *p;
17425 {
17426         return (void *) (p == NULL);
17427 }
17428
17429
17430 int main(argc, argv)
17431         int argc;
17432         char **argv;
17433 {
17434
17435         /* pthread test function */
17436 #ifndef PTHREAD_CREATE_DETACHED
17437 #define PTHREAD_CREATE_DETACHED 1
17438 #endif
17439         pthread_t t;
17440         int status;
17441         int detach = PTHREAD_CREATE_DETACHED;
17442
17443 #if HAVE_PTHREADS > 4
17444         /* Final pthreads */
17445         pthread_attr_t attr;
17446
17447         status = pthread_attr_init(&attr);
17448         if( status ) return status;
17449
17450 #if HAVE_PTHREADS < 7
17451         status = pthread_attr_setdetachstate(&attr, &detach);
17452         if( status < 0 ) status = errno;
17453 #else
17454         status = pthread_attr_setdetachstate(&attr, detach);
17455 #endif
17456         if( status ) return status;
17457         status = pthread_create( &t, &attr, task, NULL );
17458 #if HAVE_PTHREADS < 7
17459         if( status < 0 ) status = errno;
17460 #endif
17461         if( status ) return status;
17462 #else
17463         /* Draft 4 pthreads */
17464         status = pthread_create( &t, pthread_attr_default, task, NULL );
17465         if( status ) return errno;
17466
17467         /* give thread a chance to complete */
17468         /* it should remain joinable and hence detachable */
17469         sleep( 1 );
17470
17471         status = pthread_detach( &t );
17472         if( status ) return errno;
17473 #endif
17474
17475 #ifdef HAVE_LINUX_THREADS
17476         pthread_kill_other_threads_np();
17477 #endif
17478
17479         return 0;
17480
17481 }
17482
17483 _ACEOF
17484 if ac_fn_c_try_run "$LINENO"; then :
17485   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17486 else
17487   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17488 fi
17489 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17490   conftest.$ac_objext conftest.beam conftest.$ac_ext
17491 fi
17492
17493
17494                 # restore the LIBS
17495                 LIBS="$ol_LIBS"
17496
17497 fi
17498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
17499 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
17500
17501         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
17502                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
17503                 ol_link_threads=posix
17504         fi
17505 fi
17506
17507                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
17508 if test "$ol_link_threads" = no ; then
17509         # try -lpthread -lmach -lexc
17510         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
17511 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
17512 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then :
17513   $as_echo_n "(cached) " >&6
17514 else
17515
17516                 # save the flags
17517                 ol_LIBS="$LIBS"
17518                 LIBS="-lpthread -lmach -lexc $LIBS"
17519
17520                 if test "$cross_compiling" = yes; then :
17521   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17522 /* end confdefs.h.  */
17523
17524 /* pthread test headers */
17525 #include <pthread.h>
17526 #if HAVE_PTHREADS < 7
17527 #include <errno.h>
17528 #endif
17529 #ifndef NULL
17530 #define NULL (void*)0
17531 #endif
17532
17533 static void *task(p)
17534         void *p;
17535 {
17536         return (void *) (p == NULL);
17537 }
17538
17539 int
17540 main ()
17541 {
17542
17543         /* pthread test function */
17544 #ifndef PTHREAD_CREATE_DETACHED
17545 #define PTHREAD_CREATE_DETACHED 1
17546 #endif
17547         pthread_t t;
17548         int status;
17549         int detach = PTHREAD_CREATE_DETACHED;
17550
17551 #if HAVE_PTHREADS > 4
17552         /* Final pthreads */
17553         pthread_attr_t attr;
17554
17555         status = pthread_attr_init(&attr);
17556         if( status ) return status;
17557
17558 #if HAVE_PTHREADS < 7
17559         status = pthread_attr_setdetachstate(&attr, &detach);
17560         if( status < 0 ) status = errno;
17561 #else
17562         status = pthread_attr_setdetachstate(&attr, detach);
17563 #endif
17564         if( status ) return status;
17565         status = pthread_create( &t, &attr, task, NULL );
17566 #if HAVE_PTHREADS < 7
17567         if( status < 0 ) status = errno;
17568 #endif
17569         if( status ) return status;
17570 #else
17571         /* Draft 4 pthreads */
17572         status = pthread_create( &t, pthread_attr_default, task, NULL );
17573         if( status ) return errno;
17574
17575         /* give thread a chance to complete */
17576         /* it should remain joinable and hence detachable */
17577         sleep( 1 );
17578
17579         status = pthread_detach( &t );
17580         if( status ) return errno;
17581 #endif
17582
17583 #ifdef HAVE_LINUX_THREADS
17584         pthread_kill_other_threads_np();
17585 #endif
17586
17587         return 0;
17588
17589   ;
17590   return 0;
17591 }
17592 _ACEOF
17593 if ac_fn_c_try_link "$LINENO"; then :
17594   ol_cv_pthread_lpthread_lmach_lexc=yes
17595 else
17596   ol_cv_pthread_lpthread_lmach_lexc=no
17597 fi
17598 rm -f core conftest.err conftest.$ac_objext \
17599     conftest$ac_exeext conftest.$ac_ext
17600 else
17601   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17602 /* end confdefs.h.  */
17603
17604 /* pthread test headers */
17605 #include <pthread.h>
17606 #if HAVE_PTHREADS < 7
17607 #include <errno.h>
17608 #endif
17609 #ifndef NULL
17610 #define NULL (void*)0
17611 #endif
17612
17613 static void *task(p)
17614         void *p;
17615 {
17616         return (void *) (p == NULL);
17617 }
17618
17619
17620 int main(argc, argv)
17621         int argc;
17622         char **argv;
17623 {
17624
17625         /* pthread test function */
17626 #ifndef PTHREAD_CREATE_DETACHED
17627 #define PTHREAD_CREATE_DETACHED 1
17628 #endif
17629         pthread_t t;
17630         int status;
17631         int detach = PTHREAD_CREATE_DETACHED;
17632
17633 #if HAVE_PTHREADS > 4
17634         /* Final pthreads */
17635         pthread_attr_t attr;
17636
17637         status = pthread_attr_init(&attr);
17638         if( status ) return status;
17639
17640 #if HAVE_PTHREADS < 7
17641         status = pthread_attr_setdetachstate(&attr, &detach);
17642         if( status < 0 ) status = errno;
17643 #else
17644         status = pthread_attr_setdetachstate(&attr, detach);
17645 #endif
17646         if( status ) return status;
17647         status = pthread_create( &t, &attr, task, NULL );
17648 #if HAVE_PTHREADS < 7
17649         if( status < 0 ) status = errno;
17650 #endif
17651         if( status ) return status;
17652 #else
17653         /* Draft 4 pthreads */
17654         status = pthread_create( &t, pthread_attr_default, task, NULL );
17655         if( status ) return errno;
17656
17657         /* give thread a chance to complete */
17658         /* it should remain joinable and hence detachable */
17659         sleep( 1 );
17660
17661         status = pthread_detach( &t );
17662         if( status ) return errno;
17663 #endif
17664
17665 #ifdef HAVE_LINUX_THREADS
17666         pthread_kill_other_threads_np();
17667 #endif
17668
17669         return 0;
17670
17671 }
17672
17673 _ACEOF
17674 if ac_fn_c_try_run "$LINENO"; then :
17675   ol_cv_pthread_lpthread_lmach_lexc=yes
17676 else
17677   ol_cv_pthread_lpthread_lmach_lexc=no
17678 fi
17679 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17680   conftest.$ac_objext conftest.beam conftest.$ac_ext
17681 fi
17682
17683
17684                 # restore the LIBS
17685                 LIBS="$ol_LIBS"
17686
17687 fi
17688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
17689 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
17690
17691         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
17692                 ol_link_pthreads="-lpthread -lmach -lexc"
17693                 ol_link_threads=posix
17694         fi
17695 fi
17696
17697
17698                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
17699 if test "$ol_link_threads" = no ; then
17700         # try -lpthread -Wl,-woff,85
17701         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
17702 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
17703 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then :
17704   $as_echo_n "(cached) " >&6
17705 else
17706
17707                 # save the flags
17708                 ol_LIBS="$LIBS"
17709                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
17710
17711                 if test "$cross_compiling" = yes; then :
17712   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17713 /* end confdefs.h.  */
17714
17715 /* pthread test headers */
17716 #include <pthread.h>
17717 #if HAVE_PTHREADS < 7
17718 #include <errno.h>
17719 #endif
17720 #ifndef NULL
17721 #define NULL (void*)0
17722 #endif
17723
17724 static void *task(p)
17725         void *p;
17726 {
17727         return (void *) (p == NULL);
17728 }
17729
17730 int
17731 main ()
17732 {
17733
17734         /* pthread test function */
17735 #ifndef PTHREAD_CREATE_DETACHED
17736 #define PTHREAD_CREATE_DETACHED 1
17737 #endif
17738         pthread_t t;
17739         int status;
17740         int detach = PTHREAD_CREATE_DETACHED;
17741
17742 #if HAVE_PTHREADS > 4
17743         /* Final pthreads */
17744         pthread_attr_t attr;
17745
17746         status = pthread_attr_init(&attr);
17747         if( status ) return status;
17748
17749 #if HAVE_PTHREADS < 7
17750         status = pthread_attr_setdetachstate(&attr, &detach);
17751         if( status < 0 ) status = errno;
17752 #else
17753         status = pthread_attr_setdetachstate(&attr, detach);
17754 #endif
17755         if( status ) return status;
17756         status = pthread_create( &t, &attr, task, NULL );
17757 #if HAVE_PTHREADS < 7
17758         if( status < 0 ) status = errno;
17759 #endif
17760         if( status ) return status;
17761 #else
17762         /* Draft 4 pthreads */
17763         status = pthread_create( &t, pthread_attr_default, task, NULL );
17764         if( status ) return errno;
17765
17766         /* give thread a chance to complete */
17767         /* it should remain joinable and hence detachable */
17768         sleep( 1 );
17769
17770         status = pthread_detach( &t );
17771         if( status ) return errno;
17772 #endif
17773
17774 #ifdef HAVE_LINUX_THREADS
17775         pthread_kill_other_threads_np();
17776 #endif
17777
17778         return 0;
17779
17780   ;
17781   return 0;
17782 }
17783 _ACEOF
17784 if ac_fn_c_try_link "$LINENO"; then :
17785   ol_cv_pthread_lib_lpthread_woff=yes
17786 else
17787   ol_cv_pthread_lib_lpthread_woff=no
17788 fi
17789 rm -f core conftest.err conftest.$ac_objext \
17790     conftest$ac_exeext conftest.$ac_ext
17791 else
17792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17793 /* end confdefs.h.  */
17794
17795 /* pthread test headers */
17796 #include <pthread.h>
17797 #if HAVE_PTHREADS < 7
17798 #include <errno.h>
17799 #endif
17800 #ifndef NULL
17801 #define NULL (void*)0
17802 #endif
17803
17804 static void *task(p)
17805         void *p;
17806 {
17807         return (void *) (p == NULL);
17808 }
17809
17810
17811 int main(argc, argv)
17812         int argc;
17813         char **argv;
17814 {
17815
17816         /* pthread test function */
17817 #ifndef PTHREAD_CREATE_DETACHED
17818 #define PTHREAD_CREATE_DETACHED 1
17819 #endif
17820         pthread_t t;
17821         int status;
17822         int detach = PTHREAD_CREATE_DETACHED;
17823
17824 #if HAVE_PTHREADS > 4
17825         /* Final pthreads */
17826         pthread_attr_t attr;
17827
17828         status = pthread_attr_init(&attr);
17829         if( status ) return status;
17830
17831 #if HAVE_PTHREADS < 7
17832         status = pthread_attr_setdetachstate(&attr, &detach);
17833         if( status < 0 ) status = errno;
17834 #else
17835         status = pthread_attr_setdetachstate(&attr, detach);
17836 #endif
17837         if( status ) return status;
17838         status = pthread_create( &t, &attr, task, NULL );
17839 #if HAVE_PTHREADS < 7
17840         if( status < 0 ) status = errno;
17841 #endif
17842         if( status ) return status;
17843 #else
17844         /* Draft 4 pthreads */
17845         status = pthread_create( &t, pthread_attr_default, task, NULL );
17846         if( status ) return errno;
17847
17848         /* give thread a chance to complete */
17849         /* it should remain joinable and hence detachable */
17850         sleep( 1 );
17851
17852         status = pthread_detach( &t );
17853         if( status ) return errno;
17854 #endif
17855
17856 #ifdef HAVE_LINUX_THREADS
17857         pthread_kill_other_threads_np();
17858 #endif
17859
17860         return 0;
17861
17862 }
17863
17864 _ACEOF
17865 if ac_fn_c_try_run "$LINENO"; then :
17866   ol_cv_pthread_lib_lpthread_woff=yes
17867 else
17868   ol_cv_pthread_lib_lpthread_woff=no
17869 fi
17870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17871   conftest.$ac_objext conftest.beam conftest.$ac_ext
17872 fi
17873
17874
17875                 # restore the LIBS
17876                 LIBS="$ol_LIBS"
17877
17878 fi
17879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
17880 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
17881
17882         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
17883                 ol_link_pthreads="-lpthread -Wl,-woff,85"
17884                 ol_link_threads=posix
17885         fi
17886 fi
17887
17888
17889                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
17890 if test "$ol_link_threads" = no ; then
17891         # try -lpthread
17892         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
17893 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
17894 if test "${ol_cv_pthread_lpthread+set}" = set; then :
17895   $as_echo_n "(cached) " >&6
17896 else
17897
17898                 # save the flags
17899                 ol_LIBS="$LIBS"
17900                 LIBS="-lpthread $LIBS"
17901
17902                 if test "$cross_compiling" = yes; then :
17903   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17904 /* end confdefs.h.  */
17905
17906 /* pthread test headers */
17907 #include <pthread.h>
17908 #if HAVE_PTHREADS < 7
17909 #include <errno.h>
17910 #endif
17911 #ifndef NULL
17912 #define NULL (void*)0
17913 #endif
17914
17915 static void *task(p)
17916         void *p;
17917 {
17918         return (void *) (p == NULL);
17919 }
17920
17921 int
17922 main ()
17923 {
17924
17925         /* pthread test function */
17926 #ifndef PTHREAD_CREATE_DETACHED
17927 #define PTHREAD_CREATE_DETACHED 1
17928 #endif
17929         pthread_t t;
17930         int status;
17931         int detach = PTHREAD_CREATE_DETACHED;
17932
17933 #if HAVE_PTHREADS > 4
17934         /* Final pthreads */
17935         pthread_attr_t attr;
17936
17937         status = pthread_attr_init(&attr);
17938         if( status ) return status;
17939
17940 #if HAVE_PTHREADS < 7
17941         status = pthread_attr_setdetachstate(&attr, &detach);
17942         if( status < 0 ) status = errno;
17943 #else
17944         status = pthread_attr_setdetachstate(&attr, detach);
17945 #endif
17946         if( status ) return status;
17947         status = pthread_create( &t, &attr, task, NULL );
17948 #if HAVE_PTHREADS < 7
17949         if( status < 0 ) status = errno;
17950 #endif
17951         if( status ) return status;
17952 #else
17953         /* Draft 4 pthreads */
17954         status = pthread_create( &t, pthread_attr_default, task, NULL );
17955         if( status ) return errno;
17956
17957         /* give thread a chance to complete */
17958         /* it should remain joinable and hence detachable */
17959         sleep( 1 );
17960
17961         status = pthread_detach( &t );
17962         if( status ) return errno;
17963 #endif
17964
17965 #ifdef HAVE_LINUX_THREADS
17966         pthread_kill_other_threads_np();
17967 #endif
17968
17969         return 0;
17970
17971   ;
17972   return 0;
17973 }
17974 _ACEOF
17975 if ac_fn_c_try_link "$LINENO"; then :
17976   ol_cv_pthread_lpthread=yes
17977 else
17978   ol_cv_pthread_lpthread=no
17979 fi
17980 rm -f core conftest.err conftest.$ac_objext \
17981     conftest$ac_exeext conftest.$ac_ext
17982 else
17983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17984 /* end confdefs.h.  */
17985
17986 /* pthread test headers */
17987 #include <pthread.h>
17988 #if HAVE_PTHREADS < 7
17989 #include <errno.h>
17990 #endif
17991 #ifndef NULL
17992 #define NULL (void*)0
17993 #endif
17994
17995 static void *task(p)
17996         void *p;
17997 {
17998         return (void *) (p == NULL);
17999 }
18000
18001
18002 int main(argc, argv)
18003         int argc;
18004         char **argv;
18005 {
18006
18007         /* pthread test function */
18008 #ifndef PTHREAD_CREATE_DETACHED
18009 #define PTHREAD_CREATE_DETACHED 1
18010 #endif
18011         pthread_t t;
18012         int status;
18013         int detach = PTHREAD_CREATE_DETACHED;
18014
18015 #if HAVE_PTHREADS > 4
18016         /* Final pthreads */
18017         pthread_attr_t attr;
18018
18019         status = pthread_attr_init(&attr);
18020         if( status ) return status;
18021
18022 #if HAVE_PTHREADS < 7
18023         status = pthread_attr_setdetachstate(&attr, &detach);
18024         if( status < 0 ) status = errno;
18025 #else
18026         status = pthread_attr_setdetachstate(&attr, detach);
18027 #endif
18028         if( status ) return status;
18029         status = pthread_create( &t, &attr, task, NULL );
18030 #if HAVE_PTHREADS < 7
18031         if( status < 0 ) status = errno;
18032 #endif
18033         if( status ) return status;
18034 #else
18035         /* Draft 4 pthreads */
18036         status = pthread_create( &t, pthread_attr_default, task, NULL );
18037         if( status ) return errno;
18038
18039         /* give thread a chance to complete */
18040         /* it should remain joinable and hence detachable */
18041         sleep( 1 );
18042
18043         status = pthread_detach( &t );
18044         if( status ) return errno;
18045 #endif
18046
18047 #ifdef HAVE_LINUX_THREADS
18048         pthread_kill_other_threads_np();
18049 #endif
18050
18051         return 0;
18052
18053 }
18054
18055 _ACEOF
18056 if ac_fn_c_try_run "$LINENO"; then :
18057   ol_cv_pthread_lpthread=yes
18058 else
18059   ol_cv_pthread_lpthread=no
18060 fi
18061 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18062   conftest.$ac_objext conftest.beam conftest.$ac_ext
18063 fi
18064
18065
18066                 # restore the LIBS
18067                 LIBS="$ol_LIBS"
18068
18069 fi
18070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
18071 $as_echo "$ol_cv_pthread_lpthread" >&6; }
18072
18073         if test $ol_cv_pthread_lpthread = yes ; then
18074                 ol_link_pthreads="-lpthread"
18075                 ol_link_threads=posix
18076         fi
18077 fi
18078
18079                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
18080 if test "$ol_link_threads" = no ; then
18081         # try -lc_r
18082         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
18083 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
18084 if test "${ol_cv_pthread_lc_r+set}" = set; then :
18085   $as_echo_n "(cached) " >&6
18086 else
18087
18088                 # save the flags
18089                 ol_LIBS="$LIBS"
18090                 LIBS="-lc_r $LIBS"
18091
18092                 if test "$cross_compiling" = yes; then :
18093   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18094 /* end confdefs.h.  */
18095
18096 /* pthread test headers */
18097 #include <pthread.h>
18098 #if HAVE_PTHREADS < 7
18099 #include <errno.h>
18100 #endif
18101 #ifndef NULL
18102 #define NULL (void*)0
18103 #endif
18104
18105 static void *task(p)
18106         void *p;
18107 {
18108         return (void *) (p == NULL);
18109 }
18110
18111 int
18112 main ()
18113 {
18114
18115         /* pthread test function */
18116 #ifndef PTHREAD_CREATE_DETACHED
18117 #define PTHREAD_CREATE_DETACHED 1
18118 #endif
18119         pthread_t t;
18120         int status;
18121         int detach = PTHREAD_CREATE_DETACHED;
18122
18123 #if HAVE_PTHREADS > 4
18124         /* Final pthreads */
18125         pthread_attr_t attr;
18126
18127         status = pthread_attr_init(&attr);
18128         if( status ) return status;
18129
18130 #if HAVE_PTHREADS < 7
18131         status = pthread_attr_setdetachstate(&attr, &detach);
18132         if( status < 0 ) status = errno;
18133 #else
18134         status = pthread_attr_setdetachstate(&attr, detach);
18135 #endif
18136         if( status ) return status;
18137         status = pthread_create( &t, &attr, task, NULL );
18138 #if HAVE_PTHREADS < 7
18139         if( status < 0 ) status = errno;
18140 #endif
18141         if( status ) return status;
18142 #else
18143         /* Draft 4 pthreads */
18144         status = pthread_create( &t, pthread_attr_default, task, NULL );
18145         if( status ) return errno;
18146
18147         /* give thread a chance to complete */
18148         /* it should remain joinable and hence detachable */
18149         sleep( 1 );
18150
18151         status = pthread_detach( &t );
18152         if( status ) return errno;
18153 #endif
18154
18155 #ifdef HAVE_LINUX_THREADS
18156         pthread_kill_other_threads_np();
18157 #endif
18158
18159         return 0;
18160
18161   ;
18162   return 0;
18163 }
18164 _ACEOF
18165 if ac_fn_c_try_link "$LINENO"; then :
18166   ol_cv_pthread_lc_r=yes
18167 else
18168   ol_cv_pthread_lc_r=no
18169 fi
18170 rm -f core conftest.err conftest.$ac_objext \
18171     conftest$ac_exeext conftest.$ac_ext
18172 else
18173   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18174 /* end confdefs.h.  */
18175
18176 /* pthread test headers */
18177 #include <pthread.h>
18178 #if HAVE_PTHREADS < 7
18179 #include <errno.h>
18180 #endif
18181 #ifndef NULL
18182 #define NULL (void*)0
18183 #endif
18184
18185 static void *task(p)
18186         void *p;
18187 {
18188         return (void *) (p == NULL);
18189 }
18190
18191
18192 int main(argc, argv)
18193         int argc;
18194         char **argv;
18195 {
18196
18197         /* pthread test function */
18198 #ifndef PTHREAD_CREATE_DETACHED
18199 #define PTHREAD_CREATE_DETACHED 1
18200 #endif
18201         pthread_t t;
18202         int status;
18203         int detach = PTHREAD_CREATE_DETACHED;
18204
18205 #if HAVE_PTHREADS > 4
18206         /* Final pthreads */
18207         pthread_attr_t attr;
18208
18209         status = pthread_attr_init(&attr);
18210         if( status ) return status;
18211
18212 #if HAVE_PTHREADS < 7
18213         status = pthread_attr_setdetachstate(&attr, &detach);
18214         if( status < 0 ) status = errno;
18215 #else
18216         status = pthread_attr_setdetachstate(&attr, detach);
18217 #endif
18218         if( status ) return status;
18219         status = pthread_create( &t, &attr, task, NULL );
18220 #if HAVE_PTHREADS < 7
18221         if( status < 0 ) status = errno;
18222 #endif
18223         if( status ) return status;
18224 #else
18225         /* Draft 4 pthreads */
18226         status = pthread_create( &t, pthread_attr_default, task, NULL );
18227         if( status ) return errno;
18228
18229         /* give thread a chance to complete */
18230         /* it should remain joinable and hence detachable */
18231         sleep( 1 );
18232
18233         status = pthread_detach( &t );
18234         if( status ) return errno;
18235 #endif
18236
18237 #ifdef HAVE_LINUX_THREADS
18238         pthread_kill_other_threads_np();
18239 #endif
18240
18241         return 0;
18242
18243 }
18244
18245 _ACEOF
18246 if ac_fn_c_try_run "$LINENO"; then :
18247   ol_cv_pthread_lc_r=yes
18248 else
18249   ol_cv_pthread_lc_r=no
18250 fi
18251 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18252   conftest.$ac_objext conftest.beam conftest.$ac_ext
18253 fi
18254
18255
18256                 # restore the LIBS
18257                 LIBS="$ol_LIBS"
18258
18259 fi
18260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
18261 $as_echo "$ol_cv_pthread_lc_r" >&6; }
18262
18263         if test $ol_cv_pthread_lc_r = yes ; then
18264                 ol_link_pthreads="-lc_r"
18265                 ol_link_threads=posix
18266         fi
18267 fi
18268
18269
18270                 # Pthread try link: -threads (ol_cv_pthread_threads)
18271 if test "$ol_link_threads" = no ; then
18272         # try -threads
18273         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
18274 $as_echo_n "checking for pthread link with -threads... " >&6; }
18275 if test "${ol_cv_pthread_threads+set}" = set; then :
18276   $as_echo_n "(cached) " >&6
18277 else
18278
18279                 # save the flags
18280                 ol_LIBS="$LIBS"
18281                 LIBS="-threads $LIBS"
18282
18283                 if test "$cross_compiling" = yes; then :
18284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18285 /* end confdefs.h.  */
18286
18287 /* pthread test headers */
18288 #include <pthread.h>
18289 #if HAVE_PTHREADS < 7
18290 #include <errno.h>
18291 #endif
18292 #ifndef NULL
18293 #define NULL (void*)0
18294 #endif
18295
18296 static void *task(p)
18297         void *p;
18298 {
18299         return (void *) (p == NULL);
18300 }
18301
18302 int
18303 main ()
18304 {
18305
18306         /* pthread test function */
18307 #ifndef PTHREAD_CREATE_DETACHED
18308 #define PTHREAD_CREATE_DETACHED 1
18309 #endif
18310         pthread_t t;
18311         int status;
18312         int detach = PTHREAD_CREATE_DETACHED;
18313
18314 #if HAVE_PTHREADS > 4
18315         /* Final pthreads */
18316         pthread_attr_t attr;
18317
18318         status = pthread_attr_init(&attr);
18319         if( status ) return status;
18320
18321 #if HAVE_PTHREADS < 7
18322         status = pthread_attr_setdetachstate(&attr, &detach);
18323         if( status < 0 ) status = errno;
18324 #else
18325         status = pthread_attr_setdetachstate(&attr, detach);
18326 #endif
18327         if( status ) return status;
18328         status = pthread_create( &t, &attr, task, NULL );
18329 #if HAVE_PTHREADS < 7
18330         if( status < 0 ) status = errno;
18331 #endif
18332         if( status ) return status;
18333 #else
18334         /* Draft 4 pthreads */
18335         status = pthread_create( &t, pthread_attr_default, task, NULL );
18336         if( status ) return errno;
18337
18338         /* give thread a chance to complete */
18339         /* it should remain joinable and hence detachable */
18340         sleep( 1 );
18341
18342         status = pthread_detach( &t );
18343         if( status ) return errno;
18344 #endif
18345
18346 #ifdef HAVE_LINUX_THREADS
18347         pthread_kill_other_threads_np();
18348 #endif
18349
18350         return 0;
18351
18352   ;
18353   return 0;
18354 }
18355 _ACEOF
18356 if ac_fn_c_try_link "$LINENO"; then :
18357   ol_cv_pthread_threads=yes
18358 else
18359   ol_cv_pthread_threads=no
18360 fi
18361 rm -f core conftest.err conftest.$ac_objext \
18362     conftest$ac_exeext conftest.$ac_ext
18363 else
18364   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18365 /* end confdefs.h.  */
18366
18367 /* pthread test headers */
18368 #include <pthread.h>
18369 #if HAVE_PTHREADS < 7
18370 #include <errno.h>
18371 #endif
18372 #ifndef NULL
18373 #define NULL (void*)0
18374 #endif
18375
18376 static void *task(p)
18377         void *p;
18378 {
18379         return (void *) (p == NULL);
18380 }
18381
18382
18383 int main(argc, argv)
18384         int argc;
18385         char **argv;
18386 {
18387
18388         /* pthread test function */
18389 #ifndef PTHREAD_CREATE_DETACHED
18390 #define PTHREAD_CREATE_DETACHED 1
18391 #endif
18392         pthread_t t;
18393         int status;
18394         int detach = PTHREAD_CREATE_DETACHED;
18395
18396 #if HAVE_PTHREADS > 4
18397         /* Final pthreads */
18398         pthread_attr_t attr;
18399
18400         status = pthread_attr_init(&attr);
18401         if( status ) return status;
18402
18403 #if HAVE_PTHREADS < 7
18404         status = pthread_attr_setdetachstate(&attr, &detach);
18405         if( status < 0 ) status = errno;
18406 #else
18407         status = pthread_attr_setdetachstate(&attr, detach);
18408 #endif
18409         if( status ) return status;
18410         status = pthread_create( &t, &attr, task, NULL );
18411 #if HAVE_PTHREADS < 7
18412         if( status < 0 ) status = errno;
18413 #endif
18414         if( status ) return status;
18415 #else
18416         /* Draft 4 pthreads */
18417         status = pthread_create( &t, pthread_attr_default, task, NULL );
18418         if( status ) return errno;
18419
18420         /* give thread a chance to complete */
18421         /* it should remain joinable and hence detachable */
18422         sleep( 1 );
18423
18424         status = pthread_detach( &t );
18425         if( status ) return errno;
18426 #endif
18427
18428 #ifdef HAVE_LINUX_THREADS
18429         pthread_kill_other_threads_np();
18430 #endif
18431
18432         return 0;
18433
18434 }
18435
18436 _ACEOF
18437 if ac_fn_c_try_run "$LINENO"; then :
18438   ol_cv_pthread_threads=yes
18439 else
18440   ol_cv_pthread_threads=no
18441 fi
18442 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18443   conftest.$ac_objext conftest.beam conftest.$ac_ext
18444 fi
18445
18446
18447                 # restore the LIBS
18448                 LIBS="$ol_LIBS"
18449
18450 fi
18451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
18452 $as_echo "$ol_cv_pthread_threads" >&6; }
18453
18454         if test $ol_cv_pthread_threads = yes ; then
18455                 ol_link_pthreads="-threads"
18456                 ol_link_threads=posix
18457         fi
18458 fi
18459
18460
18461                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
18462 if test "$ol_link_threads" = no ; then
18463         # try -lpthreads -lmach -lexc -lc_r
18464         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
18465 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
18466 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then :
18467   $as_echo_n "(cached) " >&6
18468 else
18469
18470                 # save the flags
18471                 ol_LIBS="$LIBS"
18472                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
18473
18474                 if test "$cross_compiling" = yes; then :
18475   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18476 /* end confdefs.h.  */
18477
18478 /* pthread test headers */
18479 #include <pthread.h>
18480 #if HAVE_PTHREADS < 7
18481 #include <errno.h>
18482 #endif
18483 #ifndef NULL
18484 #define NULL (void*)0
18485 #endif
18486
18487 static void *task(p)
18488         void *p;
18489 {
18490         return (void *) (p == NULL);
18491 }
18492
18493 int
18494 main ()
18495 {
18496
18497         /* pthread test function */
18498 #ifndef PTHREAD_CREATE_DETACHED
18499 #define PTHREAD_CREATE_DETACHED 1
18500 #endif
18501         pthread_t t;
18502         int status;
18503         int detach = PTHREAD_CREATE_DETACHED;
18504
18505 #if HAVE_PTHREADS > 4
18506         /* Final pthreads */
18507         pthread_attr_t attr;
18508
18509         status = pthread_attr_init(&attr);
18510         if( status ) return status;
18511
18512 #if HAVE_PTHREADS < 7
18513         status = pthread_attr_setdetachstate(&attr, &detach);
18514         if( status < 0 ) status = errno;
18515 #else
18516         status = pthread_attr_setdetachstate(&attr, detach);
18517 #endif
18518         if( status ) return status;
18519         status = pthread_create( &t, &attr, task, NULL );
18520 #if HAVE_PTHREADS < 7
18521         if( status < 0 ) status = errno;
18522 #endif
18523         if( status ) return status;
18524 #else
18525         /* Draft 4 pthreads */
18526         status = pthread_create( &t, pthread_attr_default, task, NULL );
18527         if( status ) return errno;
18528
18529         /* give thread a chance to complete */
18530         /* it should remain joinable and hence detachable */
18531         sleep( 1 );
18532
18533         status = pthread_detach( &t );
18534         if( status ) return errno;
18535 #endif
18536
18537 #ifdef HAVE_LINUX_THREADS
18538         pthread_kill_other_threads_np();
18539 #endif
18540
18541         return 0;
18542
18543   ;
18544   return 0;
18545 }
18546 _ACEOF
18547 if ac_fn_c_try_link "$LINENO"; then :
18548   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18549 else
18550   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18551 fi
18552 rm -f core conftest.err conftest.$ac_objext \
18553     conftest$ac_exeext conftest.$ac_ext
18554 else
18555   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18556 /* end confdefs.h.  */
18557
18558 /* pthread test headers */
18559 #include <pthread.h>
18560 #if HAVE_PTHREADS < 7
18561 #include <errno.h>
18562 #endif
18563 #ifndef NULL
18564 #define NULL (void*)0
18565 #endif
18566
18567 static void *task(p)
18568         void *p;
18569 {
18570         return (void *) (p == NULL);
18571 }
18572
18573
18574 int main(argc, argv)
18575         int argc;
18576         char **argv;
18577 {
18578
18579         /* pthread test function */
18580 #ifndef PTHREAD_CREATE_DETACHED
18581 #define PTHREAD_CREATE_DETACHED 1
18582 #endif
18583         pthread_t t;
18584         int status;
18585         int detach = PTHREAD_CREATE_DETACHED;
18586
18587 #if HAVE_PTHREADS > 4
18588         /* Final pthreads */
18589         pthread_attr_t attr;
18590
18591         status = pthread_attr_init(&attr);
18592         if( status ) return status;
18593
18594 #if HAVE_PTHREADS < 7
18595         status = pthread_attr_setdetachstate(&attr, &detach);
18596         if( status < 0 ) status = errno;
18597 #else
18598         status = pthread_attr_setdetachstate(&attr, detach);
18599 #endif
18600         if( status ) return status;
18601         status = pthread_create( &t, &attr, task, NULL );
18602 #if HAVE_PTHREADS < 7
18603         if( status < 0 ) status = errno;
18604 #endif
18605         if( status ) return status;
18606 #else
18607         /* Draft 4 pthreads */
18608         status = pthread_create( &t, pthread_attr_default, task, NULL );
18609         if( status ) return errno;
18610
18611         /* give thread a chance to complete */
18612         /* it should remain joinable and hence detachable */
18613         sleep( 1 );
18614
18615         status = pthread_detach( &t );
18616         if( status ) return errno;
18617 #endif
18618
18619 #ifdef HAVE_LINUX_THREADS
18620         pthread_kill_other_threads_np();
18621 #endif
18622
18623         return 0;
18624
18625 }
18626
18627 _ACEOF
18628 if ac_fn_c_try_run "$LINENO"; then :
18629   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18630 else
18631   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18632 fi
18633 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18634   conftest.$ac_objext conftest.beam conftest.$ac_ext
18635 fi
18636
18637
18638                 # restore the LIBS
18639                 LIBS="$ol_LIBS"
18640
18641 fi
18642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
18643 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
18644
18645         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
18646                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
18647                 ol_link_threads=posix
18648         fi
18649 fi
18650
18651                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
18652 if test "$ol_link_threads" = no ; then
18653         # try -lpthreads -lmach -lexc
18654         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
18655 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
18656 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then :
18657   $as_echo_n "(cached) " >&6
18658 else
18659
18660                 # save the flags
18661                 ol_LIBS="$LIBS"
18662                 LIBS="-lpthreads -lmach -lexc $LIBS"
18663
18664                 if test "$cross_compiling" = yes; then :
18665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18666 /* end confdefs.h.  */
18667
18668 /* pthread test headers */
18669 #include <pthread.h>
18670 #if HAVE_PTHREADS < 7
18671 #include <errno.h>
18672 #endif
18673 #ifndef NULL
18674 #define NULL (void*)0
18675 #endif
18676
18677 static void *task(p)
18678         void *p;
18679 {
18680         return (void *) (p == NULL);
18681 }
18682
18683 int
18684 main ()
18685 {
18686
18687         /* pthread test function */
18688 #ifndef PTHREAD_CREATE_DETACHED
18689 #define PTHREAD_CREATE_DETACHED 1
18690 #endif
18691         pthread_t t;
18692         int status;
18693         int detach = PTHREAD_CREATE_DETACHED;
18694
18695 #if HAVE_PTHREADS > 4
18696         /* Final pthreads */
18697         pthread_attr_t attr;
18698
18699         status = pthread_attr_init(&attr);
18700         if( status ) return status;
18701
18702 #if HAVE_PTHREADS < 7
18703         status = pthread_attr_setdetachstate(&attr, &detach);
18704         if( status < 0 ) status = errno;
18705 #else
18706         status = pthread_attr_setdetachstate(&attr, detach);
18707 #endif
18708         if( status ) return status;
18709         status = pthread_create( &t, &attr, task, NULL );
18710 #if HAVE_PTHREADS < 7
18711         if( status < 0 ) status = errno;
18712 #endif
18713         if( status ) return status;
18714 #else
18715         /* Draft 4 pthreads */
18716         status = pthread_create( &t, pthread_attr_default, task, NULL );
18717         if( status ) return errno;
18718
18719         /* give thread a chance to complete */
18720         /* it should remain joinable and hence detachable */
18721         sleep( 1 );
18722
18723         status = pthread_detach( &t );
18724         if( status ) return errno;
18725 #endif
18726
18727 #ifdef HAVE_LINUX_THREADS
18728         pthread_kill_other_threads_np();
18729 #endif
18730
18731         return 0;
18732
18733   ;
18734   return 0;
18735 }
18736 _ACEOF
18737 if ac_fn_c_try_link "$LINENO"; then :
18738   ol_cv_pthread_lpthreads_lmach_lexc=yes
18739 else
18740   ol_cv_pthread_lpthreads_lmach_lexc=no
18741 fi
18742 rm -f core conftest.err conftest.$ac_objext \
18743     conftest$ac_exeext conftest.$ac_ext
18744 else
18745   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18746 /* end confdefs.h.  */
18747
18748 /* pthread test headers */
18749 #include <pthread.h>
18750 #if HAVE_PTHREADS < 7
18751 #include <errno.h>
18752 #endif
18753 #ifndef NULL
18754 #define NULL (void*)0
18755 #endif
18756
18757 static void *task(p)
18758         void *p;
18759 {
18760         return (void *) (p == NULL);
18761 }
18762
18763
18764 int main(argc, argv)
18765         int argc;
18766         char **argv;
18767 {
18768
18769         /* pthread test function */
18770 #ifndef PTHREAD_CREATE_DETACHED
18771 #define PTHREAD_CREATE_DETACHED 1
18772 #endif
18773         pthread_t t;
18774         int status;
18775         int detach = PTHREAD_CREATE_DETACHED;
18776
18777 #if HAVE_PTHREADS > 4
18778         /* Final pthreads */
18779         pthread_attr_t attr;
18780
18781         status = pthread_attr_init(&attr);
18782         if( status ) return status;
18783
18784 #if HAVE_PTHREADS < 7
18785         status = pthread_attr_setdetachstate(&attr, &detach);
18786         if( status < 0 ) status = errno;
18787 #else
18788         status = pthread_attr_setdetachstate(&attr, detach);
18789 #endif
18790         if( status ) return status;
18791         status = pthread_create( &t, &attr, task, NULL );
18792 #if HAVE_PTHREADS < 7
18793         if( status < 0 ) status = errno;
18794 #endif
18795         if( status ) return status;
18796 #else
18797         /* Draft 4 pthreads */
18798         status = pthread_create( &t, pthread_attr_default, task, NULL );
18799         if( status ) return errno;
18800
18801         /* give thread a chance to complete */
18802         /* it should remain joinable and hence detachable */
18803         sleep( 1 );
18804
18805         status = pthread_detach( &t );
18806         if( status ) return errno;
18807 #endif
18808
18809 #ifdef HAVE_LINUX_THREADS
18810         pthread_kill_other_threads_np();
18811 #endif
18812
18813         return 0;
18814
18815 }
18816
18817 _ACEOF
18818 if ac_fn_c_try_run "$LINENO"; then :
18819   ol_cv_pthread_lpthreads_lmach_lexc=yes
18820 else
18821   ol_cv_pthread_lpthreads_lmach_lexc=no
18822 fi
18823 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18824   conftest.$ac_objext conftest.beam conftest.$ac_ext
18825 fi
18826
18827
18828                 # restore the LIBS
18829                 LIBS="$ol_LIBS"
18830
18831 fi
18832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
18833 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
18834
18835         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
18836                 ol_link_pthreads="-lpthreads -lmach -lexc"
18837                 ol_link_threads=posix
18838         fi
18839 fi
18840
18841                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
18842 if test "$ol_link_threads" = no ; then
18843         # try -lpthreads -lexc
18844         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
18845 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
18846 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then :
18847   $as_echo_n "(cached) " >&6
18848 else
18849
18850                 # save the flags
18851                 ol_LIBS="$LIBS"
18852                 LIBS="-lpthreads -lexc $LIBS"
18853
18854                 if test "$cross_compiling" = yes; then :
18855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18856 /* end confdefs.h.  */
18857
18858 /* pthread test headers */
18859 #include <pthread.h>
18860 #if HAVE_PTHREADS < 7
18861 #include <errno.h>
18862 #endif
18863 #ifndef NULL
18864 #define NULL (void*)0
18865 #endif
18866
18867 static void *task(p)
18868         void *p;
18869 {
18870         return (void *) (p == NULL);
18871 }
18872
18873 int
18874 main ()
18875 {
18876
18877         /* pthread test function */
18878 #ifndef PTHREAD_CREATE_DETACHED
18879 #define PTHREAD_CREATE_DETACHED 1
18880 #endif
18881         pthread_t t;
18882         int status;
18883         int detach = PTHREAD_CREATE_DETACHED;
18884
18885 #if HAVE_PTHREADS > 4
18886         /* Final pthreads */
18887         pthread_attr_t attr;
18888
18889         status = pthread_attr_init(&attr);
18890         if( status ) return status;
18891
18892 #if HAVE_PTHREADS < 7
18893         status = pthread_attr_setdetachstate(&attr, &detach);
18894         if( status < 0 ) status = errno;
18895 #else
18896         status = pthread_attr_setdetachstate(&attr, detach);
18897 #endif
18898         if( status ) return status;
18899         status = pthread_create( &t, &attr, task, NULL );
18900 #if HAVE_PTHREADS < 7
18901         if( status < 0 ) status = errno;
18902 #endif
18903         if( status ) return status;
18904 #else
18905         /* Draft 4 pthreads */
18906         status = pthread_create( &t, pthread_attr_default, task, NULL );
18907         if( status ) return errno;
18908
18909         /* give thread a chance to complete */
18910         /* it should remain joinable and hence detachable */
18911         sleep( 1 );
18912
18913         status = pthread_detach( &t );
18914         if( status ) return errno;
18915 #endif
18916
18917 #ifdef HAVE_LINUX_THREADS
18918         pthread_kill_other_threads_np();
18919 #endif
18920
18921         return 0;
18922
18923   ;
18924   return 0;
18925 }
18926 _ACEOF
18927 if ac_fn_c_try_link "$LINENO"; then :
18928   ol_cv_pthread_lpthreads_lexc=yes
18929 else
18930   ol_cv_pthread_lpthreads_lexc=no
18931 fi
18932 rm -f core conftest.err conftest.$ac_objext \
18933     conftest$ac_exeext conftest.$ac_ext
18934 else
18935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18936 /* end confdefs.h.  */
18937
18938 /* pthread test headers */
18939 #include <pthread.h>
18940 #if HAVE_PTHREADS < 7
18941 #include <errno.h>
18942 #endif
18943 #ifndef NULL
18944 #define NULL (void*)0
18945 #endif
18946
18947 static void *task(p)
18948         void *p;
18949 {
18950         return (void *) (p == NULL);
18951 }
18952
18953
18954 int main(argc, argv)
18955         int argc;
18956         char **argv;
18957 {
18958
18959         /* pthread test function */
18960 #ifndef PTHREAD_CREATE_DETACHED
18961 #define PTHREAD_CREATE_DETACHED 1
18962 #endif
18963         pthread_t t;
18964         int status;
18965         int detach = PTHREAD_CREATE_DETACHED;
18966
18967 #if HAVE_PTHREADS > 4
18968         /* Final pthreads */
18969         pthread_attr_t attr;
18970
18971         status = pthread_attr_init(&attr);
18972         if( status ) return status;
18973
18974 #if HAVE_PTHREADS < 7
18975         status = pthread_attr_setdetachstate(&attr, &detach);
18976         if( status < 0 ) status = errno;
18977 #else
18978         status = pthread_attr_setdetachstate(&attr, detach);
18979 #endif
18980         if( status ) return status;
18981         status = pthread_create( &t, &attr, task, NULL );
18982 #if HAVE_PTHREADS < 7
18983         if( status < 0 ) status = errno;
18984 #endif
18985         if( status ) return status;
18986 #else
18987         /* Draft 4 pthreads */
18988         status = pthread_create( &t, pthread_attr_default, task, NULL );
18989         if( status ) return errno;
18990
18991         /* give thread a chance to complete */
18992         /* it should remain joinable and hence detachable */
18993         sleep( 1 );
18994
18995         status = pthread_detach( &t );
18996         if( status ) return errno;
18997 #endif
18998
18999 #ifdef HAVE_LINUX_THREADS
19000         pthread_kill_other_threads_np();
19001 #endif
19002
19003         return 0;
19004
19005 }
19006
19007 _ACEOF
19008 if ac_fn_c_try_run "$LINENO"; then :
19009   ol_cv_pthread_lpthreads_lexc=yes
19010 else
19011   ol_cv_pthread_lpthreads_lexc=no
19012 fi
19013 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19014   conftest.$ac_objext conftest.beam conftest.$ac_ext
19015 fi
19016
19017
19018                 # restore the LIBS
19019                 LIBS="$ol_LIBS"
19020
19021 fi
19022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
19023 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
19024
19025         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
19026                 ol_link_pthreads="-lpthreads -lexc"
19027                 ol_link_threads=posix
19028         fi
19029 fi
19030
19031
19032                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
19033 if test "$ol_link_threads" = no ; then
19034         # try -lpthreads
19035         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
19036 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
19037 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then :
19038   $as_echo_n "(cached) " >&6
19039 else
19040
19041                 # save the flags
19042                 ol_LIBS="$LIBS"
19043                 LIBS="-lpthreads $LIBS"
19044
19045                 if test "$cross_compiling" = yes; then :
19046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19047 /* end confdefs.h.  */
19048
19049 /* pthread test headers */
19050 #include <pthread.h>
19051 #if HAVE_PTHREADS < 7
19052 #include <errno.h>
19053 #endif
19054 #ifndef NULL
19055 #define NULL (void*)0
19056 #endif
19057
19058 static void *task(p)
19059         void *p;
19060 {
19061         return (void *) (p == NULL);
19062 }
19063
19064 int
19065 main ()
19066 {
19067
19068         /* pthread test function */
19069 #ifndef PTHREAD_CREATE_DETACHED
19070 #define PTHREAD_CREATE_DETACHED 1
19071 #endif
19072         pthread_t t;
19073         int status;
19074         int detach = PTHREAD_CREATE_DETACHED;
19075
19076 #if HAVE_PTHREADS > 4
19077         /* Final pthreads */
19078         pthread_attr_t attr;
19079
19080         status = pthread_attr_init(&attr);
19081         if( status ) return status;
19082
19083 #if HAVE_PTHREADS < 7
19084         status = pthread_attr_setdetachstate(&attr, &detach);
19085         if( status < 0 ) status = errno;
19086 #else
19087         status = pthread_attr_setdetachstate(&attr, detach);
19088 #endif
19089         if( status ) return status;
19090         status = pthread_create( &t, &attr, task, NULL );
19091 #if HAVE_PTHREADS < 7
19092         if( status < 0 ) status = errno;
19093 #endif
19094         if( status ) return status;
19095 #else
19096         /* Draft 4 pthreads */
19097         status = pthread_create( &t, pthread_attr_default, task, NULL );
19098         if( status ) return errno;
19099
19100         /* give thread a chance to complete */
19101         /* it should remain joinable and hence detachable */
19102         sleep( 1 );
19103
19104         status = pthread_detach( &t );
19105         if( status ) return errno;
19106 #endif
19107
19108 #ifdef HAVE_LINUX_THREADS
19109         pthread_kill_other_threads_np();
19110 #endif
19111
19112         return 0;
19113
19114   ;
19115   return 0;
19116 }
19117 _ACEOF
19118 if ac_fn_c_try_link "$LINENO"; then :
19119   ol_cv_pthread_lib_lpthreads=yes
19120 else
19121   ol_cv_pthread_lib_lpthreads=no
19122 fi
19123 rm -f core conftest.err conftest.$ac_objext \
19124     conftest$ac_exeext conftest.$ac_ext
19125 else
19126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19127 /* end confdefs.h.  */
19128
19129 /* pthread test headers */
19130 #include <pthread.h>
19131 #if HAVE_PTHREADS < 7
19132 #include <errno.h>
19133 #endif
19134 #ifndef NULL
19135 #define NULL (void*)0
19136 #endif
19137
19138 static void *task(p)
19139         void *p;
19140 {
19141         return (void *) (p == NULL);
19142 }
19143
19144
19145 int main(argc, argv)
19146         int argc;
19147         char **argv;
19148 {
19149
19150         /* pthread test function */
19151 #ifndef PTHREAD_CREATE_DETACHED
19152 #define PTHREAD_CREATE_DETACHED 1
19153 #endif
19154         pthread_t t;
19155         int status;
19156         int detach = PTHREAD_CREATE_DETACHED;
19157
19158 #if HAVE_PTHREADS > 4
19159         /* Final pthreads */
19160         pthread_attr_t attr;
19161
19162         status = pthread_attr_init(&attr);
19163         if( status ) return status;
19164
19165 #if HAVE_PTHREADS < 7
19166         status = pthread_attr_setdetachstate(&attr, &detach);
19167         if( status < 0 ) status = errno;
19168 #else
19169         status = pthread_attr_setdetachstate(&attr, detach);
19170 #endif
19171         if( status ) return status;
19172         status = pthread_create( &t, &attr, task, NULL );
19173 #if HAVE_PTHREADS < 7
19174         if( status < 0 ) status = errno;
19175 #endif
19176         if( status ) return status;
19177 #else
19178         /* Draft 4 pthreads */
19179         status = pthread_create( &t, pthread_attr_default, task, NULL );
19180         if( status ) return errno;
19181
19182         /* give thread a chance to complete */
19183         /* it should remain joinable and hence detachable */
19184         sleep( 1 );
19185
19186         status = pthread_detach( &t );
19187         if( status ) return errno;
19188 #endif
19189
19190 #ifdef HAVE_LINUX_THREADS
19191         pthread_kill_other_threads_np();
19192 #endif
19193
19194         return 0;
19195
19196 }
19197
19198 _ACEOF
19199 if ac_fn_c_try_run "$LINENO"; then :
19200   ol_cv_pthread_lib_lpthreads=yes
19201 else
19202   ol_cv_pthread_lib_lpthreads=no
19203 fi
19204 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19205   conftest.$ac_objext conftest.beam conftest.$ac_ext
19206 fi
19207
19208
19209                 # restore the LIBS
19210                 LIBS="$ol_LIBS"
19211
19212 fi
19213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
19214 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
19215
19216         if test $ol_cv_pthread_lib_lpthreads = yes ; then
19217                 ol_link_pthreads="-lpthreads"
19218                 ol_link_threads=posix
19219         fi
19220 fi
19221
19222
19223                 if test $ol_link_threads != no ; then
19224                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
19225
19226                                                 save_CPPFLAGS="$CPPFLAGS"
19227                         save_LIBS="$LIBS"
19228                         LIBS="$LTHREAD_LIBS $LIBS"
19229
19230                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
19231 do :
19232   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19233 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19234 eval as_val=\$$as_ac_var
19235    if test "x$as_val" = x""yes; then :
19236   cat >>confdefs.h <<_ACEOF
19237 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19238 _ACEOF
19239
19240 fi
19241 done
19242
19243
19244                         if test $ac_cv_func_sched_yield = no &&
19245                            test $ac_cv_func_pthread_yield = no &&
19246                            test $ac_cv_func_thr_yield = no ; then
19247                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
19248 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
19249 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
19250   $as_echo_n "(cached) " >&6
19251 else
19252   ac_check_lib_save_LIBS=$LIBS
19253 LIBS="-lrt  $LIBS"
19254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19255 /* end confdefs.h.  */
19256
19257 /* Override any GCC internal prototype to avoid an error.
19258    Use char because int might match the return type of a GCC
19259    builtin and then its argument prototype would still apply.  */
19260 #ifdef __cplusplus
19261 extern "C"
19262 #endif
19263 char sched_yield ();
19264 int
19265 main ()
19266 {
19267 return sched_yield ();
19268   ;
19269   return 0;
19270 }
19271 _ACEOF
19272 if ac_fn_c_try_link "$LINENO"; then :
19273   ac_cv_lib_rt_sched_yield=yes
19274 else
19275   ac_cv_lib_rt_sched_yield=no
19276 fi
19277 rm -f core conftest.err conftest.$ac_objext \
19278     conftest$ac_exeext conftest.$ac_ext
19279 LIBS=$ac_check_lib_save_LIBS
19280 fi
19281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19282 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
19283 if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
19284   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
19285
19286 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
19287
19288                                         ac_cv_func_sched_yield=yes
19289 else
19290   ac_cv_func_sched_yield=no
19291 fi
19292
19293                         fi
19294                         if test $ac_cv_func_sched_yield = no &&
19295                            test $ac_cv_func_pthread_yield = no &&
19296                            test "$ac_cv_func_thr_yield" = no ; then
19297                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
19298 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
19299                         fi
19300
19301                                                 for ac_func in pthread_kill
19302 do :
19303   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
19304 if test "x$ac_cv_func_pthread_kill" = x""yes; then :
19305   cat >>confdefs.h <<_ACEOF
19306 #define HAVE_PTHREAD_KILL 1
19307 _ACEOF
19308
19309 fi
19310 done
19311
19312
19313                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
19314 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
19315 if test "${ol_cv_func_pthread_rwlock_destroy+set}" = set; then :
19316   $as_echo_n "(cached) " >&6
19317 else
19318
19319                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19320 /* end confdefs.h.  */
19321
19322 #include <pthread.h>
19323 pthread_rwlock_t rwlock;
19324
19325 int
19326 main ()
19327 {
19328 pthread_rwlock_destroy(&rwlock);
19329   ;
19330   return 0;
19331 }
19332 _ACEOF
19333 if ac_fn_c_try_link "$LINENO"; then :
19334   ol_cv_func_pthread_rwlock_destroy=yes
19335 else
19336   ol_cv_func_pthread_rwlock_destroy=no
19337 fi
19338 rm -f core conftest.err conftest.$ac_objext \
19339     conftest$ac_exeext conftest.$ac_ext
19340
19341 fi
19342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
19343 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
19344                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
19345
19346 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
19347
19348                         fi
19349
19350                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
19351 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
19352 if test "${ol_cv_func_pthread_detach+set}" = set; then :
19353   $as_echo_n "(cached) " >&6
19354 else
19355
19356                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19357 /* end confdefs.h.  */
19358
19359 #include <pthread.h>
19360 #ifndef NULL
19361 #define NULL (void*)0
19362 #endif
19363
19364 int
19365 main ()
19366 {
19367 pthread_detach(NULL);
19368   ;
19369   return 0;
19370 }
19371 _ACEOF
19372 if ac_fn_c_try_link "$LINENO"; then :
19373   ol_cv_func_pthread_detach=yes
19374 else
19375   ol_cv_func_pthread_detach=no
19376 fi
19377 rm -f core conftest.err conftest.$ac_objext \
19378     conftest$ac_exeext conftest.$ac_ext
19379
19380 fi
19381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
19382 $as_echo "$ol_cv_func_pthread_detach" >&6; }
19383
19384                         if test $ol_cv_func_pthread_detach = no ; then
19385                                 as_fn_error "could not locate pthread_detach()" "$LINENO" 5
19386                         fi
19387
19388
19389 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
19390
19391
19392                                                 for ac_func in \
19393                                 pthread_setconcurrency \
19394                                 pthread_getconcurrency \
19395                                 thr_setconcurrency \
19396                                 thr_getconcurrency \
19397
19398 do :
19399   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19400 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19401 eval as_val=\$$as_ac_var
19402    if test "x$as_val" = x""yes; then :
19403   cat >>confdefs.h <<_ACEOF
19404 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19405 _ACEOF
19406
19407 fi
19408 done
19409
19410
19411
19412         for ac_func in pthread_kill_other_threads_np
19413 do :
19414   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
19415 if test "x$ac_cv_func_pthread_kill_other_threads_np" = x""yes; then :
19416   cat >>confdefs.h <<_ACEOF
19417 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
19418 _ACEOF
19419
19420 fi
19421 done
19422
19423         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
19424 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
19425 if test "${ol_cv_sys_linux_threads+set}" = set; then :
19426   $as_echo_n "(cached) " >&6
19427 else
19428   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
19429 fi
19430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
19431 $as_echo "$ol_cv_sys_linux_threads" >&6; }
19432
19433
19434
19435
19436         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
19437 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
19438 if test "${ol_cv_linux_threads+set}" = set; then :
19439   $as_echo_n "(cached) " >&6
19440 else
19441
19442                 if test $ol_cv_header_linux_threads = yes &&
19443                    test $ol_cv_sys_linux_threads = yes; then
19444                         ol_cv_linux_threads=yes
19445                 elif test $ol_cv_header_linux_threads = no &&
19446                      test $ol_cv_sys_linux_threads = no; then
19447                         ol_cv_linux_threads=no
19448                 else
19449                         ol_cv_linux_threads=error
19450                 fi
19451
19452 fi
19453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
19454 $as_echo "$ol_cv_linux_threads" >&6; }
19455
19456
19457                         if test $ol_cv_linux_threads = error; then
19458                                 as_fn_error "LinuxThreads header/library mismatch" "$LINENO" 5;
19459                         fi
19460
19461                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
19462 $as_echo_n "checking if pthread_create() works... " >&6; }
19463 if test "${ol_cv_pthread_create_works+set}" = set; then :
19464   $as_echo_n "(cached) " >&6
19465 else
19466
19467                         if test "$cross_compiling" = yes; then :
19468                                 ol_cv_pthread_create_works=yes
19469 else
19470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19471 /* end confdefs.h.  */
19472
19473 /* pthread test headers */
19474 #include <pthread.h>
19475 #if HAVE_PTHREADS < 7
19476 #include <errno.h>
19477 #endif
19478 #ifndef NULL
19479 #define NULL (void*)0
19480 #endif
19481
19482 static void *task(p)
19483         void *p;
19484 {
19485         return (void *) (p == NULL);
19486 }
19487
19488
19489 int main(argc, argv)
19490         int argc;
19491         char **argv;
19492 {
19493
19494         /* pthread test function */
19495 #ifndef PTHREAD_CREATE_DETACHED
19496 #define PTHREAD_CREATE_DETACHED 1
19497 #endif
19498         pthread_t t;
19499         int status;
19500         int detach = PTHREAD_CREATE_DETACHED;
19501
19502 #if HAVE_PTHREADS > 4
19503         /* Final pthreads */
19504         pthread_attr_t attr;
19505
19506         status = pthread_attr_init(&attr);
19507         if( status ) return status;
19508
19509 #if HAVE_PTHREADS < 7
19510         status = pthread_attr_setdetachstate(&attr, &detach);
19511         if( status < 0 ) status = errno;
19512 #else
19513         status = pthread_attr_setdetachstate(&attr, detach);
19514 #endif
19515         if( status ) return status;
19516         status = pthread_create( &t, &attr, task, NULL );
19517 #if HAVE_PTHREADS < 7
19518         if( status < 0 ) status = errno;
19519 #endif
19520         if( status ) return status;
19521 #else
19522         /* Draft 4 pthreads */
19523         status = pthread_create( &t, pthread_attr_default, task, NULL );
19524         if( status ) return errno;
19525
19526         /* give thread a chance to complete */
19527         /* it should remain joinable and hence detachable */
19528         sleep( 1 );
19529
19530         status = pthread_detach( &t );
19531         if( status ) return errno;
19532 #endif
19533
19534 #ifdef HAVE_LINUX_THREADS
19535         pthread_kill_other_threads_np();
19536 #endif
19537
19538         return 0;
19539
19540 }
19541
19542 _ACEOF
19543 if ac_fn_c_try_run "$LINENO"; then :
19544   ol_cv_pthread_create_works=yes
19545 else
19546   ol_cv_pthread_create_works=no
19547 fi
19548 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19549   conftest.$ac_objext conftest.beam conftest.$ac_ext
19550 fi
19551
19552 fi
19553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
19554 $as_echo "$ol_cv_pthread_create_works" >&6; }
19555
19556                         if test $ol_cv_pthread_create_works = no ; then
19557                                 as_fn_error "pthread_create is not usable, check environment settings" "$LINENO" 5
19558                         fi
19559
19560                         ol_replace_broken_yield=no
19561
19562                         if test $ol_replace_broken_yield = yes ; then
19563
19564 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
19565
19566                         fi
19567
19568                                                 if test $ol_with_yielding_select = auto ; then
19569                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
19570 $as_echo_n "checking if select yields when using pthreads... " >&6; }
19571 if test "${ol_cv_pthread_select_yields+set}" = set; then :
19572   $as_echo_n "(cached) " >&6
19573 else
19574
19575                                 if test "$cross_compiling" = yes; then :
19576   ol_cv_pthread_select_yields=cross
19577 else
19578   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19579 /* end confdefs.h.  */
19580
19581 #include <sys/types.h>
19582 #include <sys/time.h>
19583 #include <unistd.h>
19584 #include <pthread.h>
19585 #ifndef NULL
19586 #define NULL (void*) 0
19587 #endif
19588
19589 static int fildes[2];
19590
19591 static void *task(p)
19592         void *p;
19593 {
19594         int i;
19595         struct timeval tv;
19596
19597         fd_set rfds;
19598
19599         tv.tv_sec=10;
19600         tv.tv_usec=0;
19601
19602         FD_ZERO(&rfds);
19603         FD_SET(fildes[0], &rfds);
19604
19605         /* we're not interested in any fds */
19606         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
19607
19608         if(i < 0) {
19609                 perror("select");
19610                 exit(10);
19611         }
19612
19613         exit(0); /* if we exit here, the select blocked the whole process */
19614 }
19615
19616 int main(argc, argv)
19617         int argc;
19618         char **argv;
19619 {
19620         pthread_t t;
19621
19622         /* create a pipe to select */
19623         if(pipe(&fildes[0])) {
19624                 perror("select");
19625                 exit(1);
19626         }
19627
19628 #ifdef HAVE_PTHREAD_SETCONCURRENCY
19629         (void) pthread_setconcurrency(2);
19630 #else
19631 #ifdef HAVE_THR_SETCONCURRENCY
19632         /* Set Solaris LWP concurrency to 2 */
19633         thr_setconcurrency(2);
19634 #endif
19635 #endif
19636
19637 #if HAVE_PTHREADS < 6
19638         pthread_create(&t, pthread_attr_default, task, NULL);
19639 #else
19640         pthread_create(&t, NULL, task, NULL);
19641 #endif
19642
19643         /* make sure task runs first */
19644 #ifdef HAVE_THR_YIELD
19645         thr_yield();
19646 #elif defined( HAVE_SCHED_YIELD )
19647         sched_yield();
19648 #elif defined( HAVE_PTHREAD_YIELD )
19649         pthread_yield();
19650 #endif
19651
19652         exit(2);
19653 }
19654 _ACEOF
19655 if ac_fn_c_try_run "$LINENO"; then :
19656   ol_cv_pthread_select_yields=no
19657 else
19658   ol_cv_pthread_select_yields=yes
19659 fi
19660 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19661   conftest.$ac_objext conftest.beam conftest.$ac_ext
19662 fi
19663
19664 fi
19665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
19666 $as_echo "$ol_cv_pthread_select_yields" >&6; }
19667
19668                                 if test $ol_cv_pthread_select_yields = cross ; then
19669                                         as_fn_error "crossing compiling: use --with-yielding_select=yes|no|manual" "$LINENO" 5
19670                                 fi
19671
19672                                 if test $ol_cv_pthread_select_yields = yes ; then
19673                                         ol_with_yielding_select=yes
19674                                 fi
19675                         fi
19676
19677                                                 CPPFLAGS="$save_CPPFLAGS"
19678                         LIBS="$save_LIBS"
19679                 else
19680                         as_fn_error "could not locate usable POSIX Threads" "$LINENO" 5
19681                 fi
19682         fi
19683
19684         if test $ol_with_threads = posix ; then
19685                 as_fn_error "could not locate POSIX Threads" "$LINENO" 5
19686         fi
19687         ;;
19688 esac
19689
19690 case $ol_with_threads in auto | yes | mach)
19691
19692                 for ac_header in mach/cthreads.h cthreads.h
19693 do :
19694   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19695 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19696 eval as_val=\$$as_ac_Header
19697    if test "x$as_val" = x""yes; then :
19698   cat >>confdefs.h <<_ACEOF
19699 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19700 _ACEOF
19701
19702 fi
19703
19704 done
19705
19706         if test $ac_cv_header_mach_cthreads_h = yes ; then
19707                 ol_with_threads=found
19708
19709                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19710 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19711   ol_link_threads=yes
19712 fi
19713
19714
19715                 if test $ol_link_threads = no ; then
19716                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
19717 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
19718 if test "${ol_cv_cthread_all_load+set}" = set; then :
19719   $as_echo_n "(cached) " >&6
19720 else
19721
19722                                                                 save_LIBS="$LIBS"
19723                                 LIBS="-all_load $LIBS"
19724                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19725 /* end confdefs.h.  */
19726 #include <mach/cthreads.h>
19727 int
19728 main ()
19729 {
19730
19731                                         cthread_fork((void *)0, (void *)0);
19732
19733   ;
19734   return 0;
19735 }
19736 _ACEOF
19737 if ac_fn_c_try_link "$LINENO"; then :
19738   ol_cv_cthread_all_load=yes
19739 else
19740   ol_cv_cthread_all_load=no
19741 fi
19742 rm -f core conftest.err conftest.$ac_objext \
19743     conftest$ac_exeext conftest.$ac_ext
19744                                                                 LIBS="$save_LIBS"
19745
19746 fi
19747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
19748 $as_echo "$ol_cv_cthread_all_load" >&6; }
19749
19750                         if test $ol_cv_cthread_all_load = yes ; then
19751                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
19752                                 ol_link_threads=mach
19753                                 ol_with_threads=found
19754                         fi
19755                 fi
19756
19757         elif test $ac_cv_header_cthreads_h = yes ; then
19758
19759                 ol_with_threads=found
19760
19761                                 save_LIBS="$LIBS"
19762                 LIBS="$LIBS -lthreads"
19763                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19764 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19765   ol_link_threads=yes
19766 fi
19767
19768                 LIBS="$save_LIBS"
19769
19770                 if test $ol_link_threads = yes ; then
19771                         LTHREAD_LIBS="-lthreads"
19772                         ol_link_threads=mach
19773                         ol_with_threads=found
19774                 else
19775                         as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19776                 fi
19777
19778         elif test $ol_with_threads = mach ; then
19779                 as_fn_error "could not locate Mach CThreads" "$LINENO" 5
19780         fi
19781
19782         if test $ol_link_threads = mach ; then
19783
19784 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
19785
19786         elif test $ol_with_threads = found ; then
19787                 as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19788         fi
19789         ;;
19790 esac
19791
19792 case $ol_with_threads in auto | yes | pth)
19793
19794         for ac_header in pth.h
19795 do :
19796   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
19797 if test "x$ac_cv_header_pth_h" = x""yes; then :
19798   cat >>confdefs.h <<_ACEOF
19799 #define HAVE_PTH_H 1
19800 _ACEOF
19801
19802 fi
19803
19804 done
19805
19806
19807         if test $ac_cv_header_pth_h = yes ; then
19808                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
19809 $as_echo_n "checking for pth_version in -lpth... " >&6; }
19810 if test "${ac_cv_lib_pth_pth_version+set}" = set; then :
19811   $as_echo_n "(cached) " >&6
19812 else
19813   ac_check_lib_save_LIBS=$LIBS
19814 LIBS="-lpth  $LIBS"
19815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19816 /* end confdefs.h.  */
19817
19818 /* Override any GCC internal prototype to avoid an error.
19819    Use char because int might match the return type of a GCC
19820    builtin and then its argument prototype would still apply.  */
19821 #ifdef __cplusplus
19822 extern "C"
19823 #endif
19824 char pth_version ();
19825 int
19826 main ()
19827 {
19828 return pth_version ();
19829   ;
19830   return 0;
19831 }
19832 _ACEOF
19833 if ac_fn_c_try_link "$LINENO"; then :
19834   ac_cv_lib_pth_pth_version=yes
19835 else
19836   ac_cv_lib_pth_pth_version=no
19837 fi
19838 rm -f core conftest.err conftest.$ac_objext \
19839     conftest$ac_exeext conftest.$ac_ext
19840 LIBS=$ac_check_lib_save_LIBS
19841 fi
19842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
19843 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
19844 if test "x$ac_cv_lib_pth_pth_version" = x""yes; then :
19845   have_pth=yes
19846 else
19847   have_pth=no
19848 fi
19849
19850
19851                 if test $have_pth = yes ; then
19852
19853 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
19854
19855                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
19856                         ol_link_threads=pth
19857                         ol_with_threads=found
19858
19859                         if test $ol_with_yielding_select = auto ; then
19860                                 ol_with_yielding_select=yes
19861                         fi
19862                 fi
19863         fi
19864         ;;
19865 esac
19866
19867 case $ol_with_threads in auto | yes | lwp)
19868
19869                 for ac_header in thread.h synch.h
19870 do :
19871   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19872 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19873 eval as_val=\$$as_ac_Header
19874    if test "x$as_val" = x""yes; then :
19875   cat >>confdefs.h <<_ACEOF
19876 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19877 _ACEOF
19878
19879 fi
19880
19881 done
19882
19883         if test $ac_cv_header_thread_h = yes &&
19884            test $ac_cv_header_synch_h = yes ; then
19885                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
19886 $as_echo_n "checking for thr_create in -lthread... " >&6; }
19887 if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
19888   $as_echo_n "(cached) " >&6
19889 else
19890   ac_check_lib_save_LIBS=$LIBS
19891 LIBS="-lthread  $LIBS"
19892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19893 /* end confdefs.h.  */
19894
19895 /* Override any GCC internal prototype to avoid an error.
19896    Use char because int might match the return type of a GCC
19897    builtin and then its argument prototype would still apply.  */
19898 #ifdef __cplusplus
19899 extern "C"
19900 #endif
19901 char thr_create ();
19902 int
19903 main ()
19904 {
19905 return thr_create ();
19906   ;
19907   return 0;
19908 }
19909 _ACEOF
19910 if ac_fn_c_try_link "$LINENO"; then :
19911   ac_cv_lib_thread_thr_create=yes
19912 else
19913   ac_cv_lib_thread_thr_create=no
19914 fi
19915 rm -f core conftest.err conftest.$ac_objext \
19916     conftest$ac_exeext conftest.$ac_ext
19917 LIBS=$ac_check_lib_save_LIBS
19918 fi
19919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
19920 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
19921 if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
19922   have_thr=yes
19923 else
19924   have_thr=no
19925 fi
19926
19927
19928                 if test $have_thr = yes ; then
19929
19930 $as_echo "#define HAVE_THR 1" >>confdefs.h
19931
19932                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
19933                         ol_link_threads=thr
19934
19935                         if test $ol_with_yielding_select = auto ; then
19936                                 ol_with_yielding_select=yes
19937                         fi
19938
19939                                                 for ac_func in \
19940                                 thr_setconcurrency \
19941                                 thr_getconcurrency \
19942
19943 do :
19944   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19945 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19946 eval as_val=\$$as_ac_var
19947    if test "x$as_val" = x""yes; then :
19948   cat >>confdefs.h <<_ACEOF
19949 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19950 _ACEOF
19951
19952 fi
19953 done
19954
19955                 fi
19956         fi
19957         ;;
19958 esac
19959
19960 if test $ol_with_yielding_select = yes ; then
19961
19962 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
19963
19964 fi
19965
19966 if test $ol_with_threads = manual ; then
19967                 ol_link_threads=yes
19968
19969         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
19970 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
19971
19972         for ac_header in pthread.h sched.h
19973 do :
19974   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19975 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19976 eval as_val=\$$as_ac_Header
19977    if test "x$as_val" = x""yes; then :
19978   cat >>confdefs.h <<_ACEOF
19979 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19980 _ACEOF
19981
19982 fi
19983
19984 done
19985
19986         for ac_func in sched_yield pthread_yield
19987 do :
19988   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19989 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19990 eval as_val=\$$as_ac_var
19991    if test "x$as_val" = x""yes; then :
19992   cat >>confdefs.h <<_ACEOF
19993 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19994 _ACEOF
19995
19996 fi
19997 done
19998
19999
20000         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
20001 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
20002 if test "${ol_cv_header_linux_threads+set}" = set; then :
20003   $as_echo_n "(cached) " >&6
20004 else
20005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20006 /* end confdefs.h.  */
20007 #include <pthread.h>
20008 _ACEOF
20009 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20010   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
20011   ol_cv_header_linux_threads=yes
20012 else
20013   ol_cv_header_linux_threads=no
20014 fi
20015 rm -f conftest*
20016
20017
20018 fi
20019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
20020 $as_echo "$ol_cv_header_linux_threads" >&6; }
20021         if test $ol_cv_header_linux_threads = yes; then
20022
20023 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
20024
20025         fi
20026
20027
20028         for ac_header in mach/cthreads.h
20029 do :
20030   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
20031 if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
20032   cat >>confdefs.h <<_ACEOF
20033 #define HAVE_MACH_CTHREADS_H 1
20034 _ACEOF
20035
20036 fi
20037
20038 done
20039
20040         for ac_header in thread.h synch.h
20041 do :
20042   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20043 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20044 eval as_val=\$$as_ac_Header
20045    if test "x$as_val" = x""yes; then :
20046   cat >>confdefs.h <<_ACEOF
20047 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20048 _ACEOF
20049
20050 fi
20051
20052 done
20053
20054 fi
20055
20056 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
20057                         $as_echo "#define REENTRANT 1" >>confdefs.h
20058
20059         $as_echo "#define _REENTRANT 1" >>confdefs.h
20060
20061         $as_echo "#define THREAD_SAFE 1" >>confdefs.h
20062
20063         $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
20064
20065         $as_echo "#define THREADSAFE 1" >>confdefs.h
20066
20067         $as_echo "#define _THREADSAFE 1" >>confdefs.h
20068
20069         $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
20070
20071
20072                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
20073 $as_echo_n "checking for thread specific errno... " >&6; }
20074 if test "${ol_cv_errno_thread_specific+set}" = set; then :
20075   $as_echo_n "(cached) " >&6
20076 else
20077
20078                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20079 /* end confdefs.h.  */
20080 #include <errno.h>
20081 int
20082 main ()
20083 {
20084 errno = 0;
20085   ;
20086   return 0;
20087 }
20088 _ACEOF
20089 if ac_fn_c_try_link "$LINENO"; then :
20090   ol_cv_errno_thread_specific=yes
20091 else
20092   ol_cv_errno_thread_specific=no
20093 fi
20094 rm -f core conftest.err conftest.$ac_objext \
20095     conftest$ac_exeext conftest.$ac_ext
20096
20097 fi
20098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
20099 $as_echo "$ol_cv_errno_thread_specific" >&6; }
20100
20101                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
20102 $as_echo_n "checking for thread specific h_errno... " >&6; }
20103 if test "${ol_cv_h_errno_thread_specific+set}" = set; then :
20104   $as_echo_n "(cached) " >&6
20105 else
20106
20107                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20108 /* end confdefs.h.  */
20109 #include <netdb.h>
20110 int
20111 main ()
20112 {
20113 h_errno = 0;
20114   ;
20115   return 0;
20116 }
20117 _ACEOF
20118 if ac_fn_c_try_link "$LINENO"; then :
20119   ol_cv_h_errno_thread_specific=yes
20120 else
20121   ol_cv_h_errno_thread_specific=no
20122 fi
20123 rm -f core conftest.err conftest.$ac_objext \
20124     conftest$ac_exeext conftest.$ac_ext
20125
20126 fi
20127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
20128 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
20129
20130         if test $ol_cv_errno_thread_specific != yes ||
20131            test $ol_cv_h_errno_thread_specific != yes ; then
20132                 LIBS="$LTHREAD_LIBS $LIBS"
20133                 LTHREAD_LIBS=""
20134         fi
20135
20136 fi
20137
20138 if test $ol_link_threads = no ; then
20139         if test $ol_with_threads = yes ; then
20140                 as_fn_error "no suitable thread support" "$LINENO" 5
20141         fi
20142
20143         if test $ol_with_threads = auto ; then
20144                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
20145 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
20146                 ol_with_threads=no
20147         fi
20148
20149
20150 $as_echo "#define NO_THREADS 1" >>confdefs.h
20151
20152         LTHREAD_LIBS=""
20153         BUILD_THREAD=no
20154 else
20155         BUILD_THREAD=yes
20156 fi
20157
20158 if test $ol_link_threads != no ; then
20159
20160 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
20161
20162 fi
20163
20164 for ac_func in \
20165         ctime_r                 \
20166         gmtime_r localtime_r \
20167         gethostbyname_r gethostbyaddr_r \
20168
20169 do :
20170   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20171 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20172 eval as_val=\$$as_ac_var
20173    if test "x$as_val" = x""yes; then :
20174   cat >>confdefs.h <<_ACEOF
20175 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20176 _ACEOF
20177
20178 fi
20179 done
20180
20181
20182 if test "$ac_cv_func_ctime_r" = no ; then
20183         ol_cv_func_ctime_r_nargs=0
20184 else
20185         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of ctime_r" >&5
20186 $as_echo_n "checking number of arguments of ctime_r... " >&6; }
20187 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then :
20188   $as_echo_n "(cached) " >&6
20189 else
20190   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20191 /* end confdefs.h.  */
20192 #include <time.h>
20193 int
20194 main ()
20195 {
20196 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
20197   ;
20198   return 0;
20199 }
20200 _ACEOF
20201 if ac_fn_c_try_compile "$LINENO"; then :
20202   ol_cv_func_ctime_r_nargs3=yes
20203 else
20204   ol_cv_func_ctime_r_nargs3=no
20205 fi
20206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20207
20208         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20209 /* end confdefs.h.  */
20210 #include <time.h>
20211 int
20212 main ()
20213 {
20214 time_t ti; char *buffer; ctime_r(&ti,buffer);
20215   ;
20216   return 0;
20217 }
20218 _ACEOF
20219 if ac_fn_c_try_compile "$LINENO"; then :
20220   ol_cv_func_ctime_r_nargs2=yes
20221 else
20222   ol_cv_func_ctime_r_nargs2=no
20223 fi
20224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20225
20226         if test $ol_cv_func_ctime_r_nargs3 = yes &&
20227            test $ol_cv_func_ctime_r_nargs2 = no ; then
20228
20229                 ol_cv_func_ctime_r_nargs=3
20230
20231         elif test $ol_cv_func_ctime_r_nargs3 = no &&
20232              test $ol_cv_func_ctime_r_nargs2 = yes ; then
20233
20234                 ol_cv_func_ctime_r_nargs=2
20235
20236         else
20237                 ol_cv_func_ctime_r_nargs=0
20238         fi
20239
20240 fi
20241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_ctime_r_nargs" >&5
20242 $as_echo "$ol_cv_func_ctime_r_nargs" >&6; }
20243
20244   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
20245
20246 cat >>confdefs.h <<_ACEOF
20247 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
20248 _ACEOF
20249
20250   fi
20251
20252 fi
20253
20254 if test "$ac_cv_func_gethostbyname_r" = yes ; then
20255         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyname_r" >&5
20256 $as_echo_n "checking number of arguments of gethostbyname_r... " >&6; }
20257 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then :
20258   $as_echo_n "(cached) " >&6
20259 else
20260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20261 /* end confdefs.h.  */
20262 #include <sys/types.h>
20263 #include <sys/socket.h>
20264 #include <netinet/in.h>
20265 #include <netdb.h>
20266 #define BUFSIZE (sizeof(struct hostent)+10)
20267 int
20268 main ()
20269 {
20270 struct hostent hent; char buffer[BUFSIZE];
20271                 int bufsize=BUFSIZE;int h_errno;
20272                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
20273                         buffer, bufsize, &h_errno);
20274   ;
20275   return 0;
20276 }
20277 _ACEOF
20278 if ac_fn_c_try_compile "$LINENO"; then :
20279   ol_cv_func_gethostbyname_r_nargs5=yes
20280 else
20281   ol_cv_func_gethostbyname_r_nargs5=no
20282 fi
20283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20284
20285         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20286 /* end confdefs.h.  */
20287 #include <sys/types.h>
20288 #include <sys/socket.h>
20289 #include <netinet/in.h>
20290 #include <netdb.h>
20291 #define BUFSIZE (sizeof(struct hostent)+10)
20292 int
20293 main ()
20294 {
20295 struct hostent hent;struct hostent *rhent;
20296                 char buffer[BUFSIZE];
20297                 int bufsize=BUFSIZE;int h_errno;
20298                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
20299                         &rhent, &h_errno);
20300   ;
20301   return 0;
20302 }
20303 _ACEOF
20304 if ac_fn_c_try_compile "$LINENO"; then :
20305   ol_cv_func_gethostbyname_r_nargs6=yes
20306 else
20307   ol_cv_func_gethostbyname_r_nargs6=no
20308 fi
20309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20310
20311         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
20312            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
20313
20314                 ol_cv_func_gethostbyname_r_nargs=5
20315
20316         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
20317              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
20318
20319                 ol_cv_func_gethostbyname_r_nargs=6
20320
20321         else
20322                 ol_cv_func_gethostbyname_r_nargs=0
20323         fi
20324
20325 fi
20326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyname_r_nargs" >&5
20327 $as_echo "$ol_cv_func_gethostbyname_r_nargs" >&6; }
20328   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
20329
20330 cat >>confdefs.h <<_ACEOF
20331 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
20332 _ACEOF
20333
20334   fi
20335
20336 else
20337         ol_cv_func_gethostbyname_r_nargs=0
20338 fi
20339
20340 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
20341         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyaddr_r" >&5
20342 $as_echo_n "checking number of arguments of gethostbyaddr_r... " >&6; }
20343 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then :
20344   $as_echo_n "(cached) " >&6
20345 else
20346   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20347 /* end confdefs.h.  */
20348 #include <sys/types.h>
20349 #include <sys/socket.h>
20350 #include <netinet/in.h>
20351 #include <netdb.h>
20352 #define BUFSIZE (sizeof(struct hostent)+10)
20353 int
20354 main ()
20355 {
20356 struct hostent hent; char buffer[BUFSIZE];
20357             struct in_addr add;
20358             size_t alen=sizeof(struct in_addr);
20359             int bufsize=BUFSIZE;int h_errno;
20360                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20361                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
20362   ;
20363   return 0;
20364 }
20365 _ACEOF
20366 if ac_fn_c_try_compile "$LINENO"; then :
20367   ol_cv_func_gethostbyaddr_r_nargs7=yes
20368 else
20369   ol_cv_func_gethostbyaddr_r_nargs7=no
20370 fi
20371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20372
20373         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20374 /* end confdefs.h.  */
20375 #include <sys/types.h>
20376 #include <sys/socket.h>
20377 #include <netinet/in.h>
20378 #include <netdb.h>
20379 #define BUFSIZE (sizeof(struct hostent)+10)
20380 int
20381 main ()
20382 {
20383 struct hostent hent;
20384                 struct hostent *rhent; char buffer[BUFSIZE];
20385                 struct in_addr add;
20386                 size_t alen=sizeof(struct in_addr);
20387                 int bufsize=BUFSIZE;int h_errno;
20388                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20389                         alen, AF_INET, &hent, buffer, bufsize,
20390                         &rhent, &h_errno);
20391   ;
20392   return 0;
20393 }
20394 _ACEOF
20395 if ac_fn_c_try_compile "$LINENO"; then :
20396   ol_cv_func_gethostbyaddr_r_nargs8=yes
20397 else
20398   ol_cv_func_gethostbyaddr_r_nargs8=no
20399 fi
20400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20401
20402         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
20403            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
20404
20405                 ol_cv_func_gethostbyaddr_r_nargs=7
20406
20407         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
20408              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
20409
20410                 ol_cv_func_gethostbyaddr_r_nargs=8
20411
20412         else
20413                 ol_cv_func_gethostbyaddr_r_nargs=0
20414         fi
20415
20416 fi
20417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
20418 $as_echo "$ol_cv_func_gethostbyaddr_r_nargs" >&6; }
20419   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
20420
20421 cat >>confdefs.h <<_ACEOF
20422 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
20423 _ACEOF
20424
20425   fi
20426
20427 else
20428         ol_cv_func_gethostbyaddr_r_nargs=0
20429 fi
20430
20431 ol_link_bdb=no
20432
20433 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
20434         ol_cv_berkeley_db=no
20435 for ac_header in db.h
20436 do :
20437   ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default"
20438 if test "x$ac_cv_header_db_h" = x""yes; then :
20439   cat >>confdefs.h <<_ACEOF
20440 #define HAVE_DB_H 1
20441 _ACEOF
20442
20443 fi
20444
20445 done
20446
20447 if test $ac_cv_header_db_h = yes; then
20448         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB major version in db.h" >&5
20449 $as_echo_n "checking for Berkeley DB major version in db.h... " >&6; }
20450 if test "${ol_cv_bdb_major+set}" = set; then :
20451   $as_echo_n "(cached) " >&6
20452 else
20453
20454         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20455 /* end confdefs.h.  */
20456
20457 #include <db.h>
20458 #ifndef DB_VERSION_MAJOR
20459 #       define DB_VERSION_MAJOR 1
20460 #endif
20461 __db_version DB_VERSION_MAJOR
20462
20463 _ACEOF
20464         set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
20465         ol_cv_bdb_major=${3}
20466
20467 fi
20468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_major" >&5
20469 $as_echo "$ol_cv_bdb_major" >&6; }
20470 case $ol_cv_bdb_major in [1-9]*) : ;; *)
20471         as_fn_error "Unknown Berkeley DB major version in db.h" "$LINENO" 5 ;;
20472 esac
20473
20474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB minor version in db.h" >&5
20475 $as_echo_n "checking for Berkeley DB minor version in db.h... " >&6; }
20476 if test "${ol_cv_bdb_minor+set}" = set; then :
20477   $as_echo_n "(cached) " >&6
20478 else
20479
20480         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20481 /* end confdefs.h.  */
20482
20483 #include <db.h>
20484 #ifndef DB_VERSION_MINOR
20485 #       define DB_VERSION_MINOR 0
20486 #endif
20487 __db_version DB_VERSION_MINOR
20488
20489 _ACEOF
20490         set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
20491         ol_cv_bdb_minor=${3}
20492
20493 fi
20494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_minor" >&5
20495 $as_echo "$ol_cv_bdb_minor" >&6; }
20496 case $ol_cv_bdb_minor in [0-9]*) : ;; *)
20497         as_fn_error "Unknown Berkeley DB minor version in db.h" "$LINENO" 5 ;;
20498 esac
20499
20500         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Berkeley DB version supported by BDB/HDB backends" >&5
20501 $as_echo_n "checking if Berkeley DB version supported by BDB/HDB backends... " >&6; }
20502 if test "${ol_cv_bdb_compat+set}" = set; then :
20503   $as_echo_n "(cached) " >&6
20504 else
20505
20506         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20507 /* end confdefs.h.  */
20508
20509 #include <db.h>
20510
20511  /* this check could be improved */
20512 #ifndef DB_VERSION_MAJOR
20513 #       define DB_VERSION_MAJOR 1
20514 #endif
20515 #ifndef DB_VERSION_MINOR
20516 #       define DB_VERSION_MINOR 0
20517 #endif
20518 #ifndef DB_VERSION_PATCH
20519 #       define DB_VERSION_PATCH 0
20520 #endif
20521
20522 #define DB_VERSION_FULL ((DB_VERSION_MAJOR<<16)|(DB_VERSION_MINOR<<8)|DB_VERSION_PATCH)
20523
20524 /* require 4.4 or later, but less than 6.0.20 */
20525 #if DB_VERSION_FULL >= 0x040400 && DB_VERSION_FULL < 0x060014
20526         __db_version_compat
20527 #endif
20528 #if DB_VERSION_FULL >= 0x060014
20529 #error "BerkeleyDB 6.0.20+ license is incompatible with LDAP"
20530 #endif
20531
20532 _ACEOF
20533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20534   $EGREP "__db_version_compat" >/dev/null 2>&1; then :
20535   ol_cv_bdb_compat=yes
20536 else
20537   ol_cv_bdb_compat=no
20538 fi
20539 rm -f conftest*
20540
20541 fi
20542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_compat" >&5
20543 $as_echo "$ol_cv_bdb_compat" >&6; }
20544
20545
20546         if test $ol_cv_bdb_compat != yes ; then
20547                 as_fn_error "BerkeleyDB version incompatible with BDB/HDB backends" "$LINENO" 5
20548         fi
20549
20550         ol_cv_lib_db=no
20551
20552 if test $ol_cv_bdb_major = 5 ; then
20553         if test $ol_cv_lib_db = no ; then
20554         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)" >&5
20555 $as_echo_n "checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)... " >&6; }
20556 if test "${ol_cv_db_db_5_dot_m+set}" = set; then :
20557   $as_echo_n "(cached) " >&6
20558 else
20559
20560         ol_DB_LIB=-ldb-5.$ol_cv_bdb_minor
20561         ol_LIBS=$LIBS
20562         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20563
20564         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20565 /* end confdefs.h.  */
20566
20567 #ifdef HAVE_DB_185_H
20568 # include <db_185.h>
20569 #else
20570 # include <db.h>
20571 #endif
20572
20573 #ifndef DB_VERSION_MAJOR
20574 # define DB_VERSION_MAJOR 1
20575 #endif
20576
20577 #ifndef NULL
20578 #define NULL ((void*)0)
20579 #endif
20580
20581 int
20582 main ()
20583 {
20584
20585 #if DB_VERSION_MAJOR > 2
20586         db_env_create( NULL, 0 );
20587 #elif DB_VERSION_MAJOR > 1
20588         db_appexit( NULL );
20589 #else
20590         (void) dbopen( NULL, 0, 0, 0, NULL);
20591 #endif
20592
20593   ;
20594   return 0;
20595 }
20596 _ACEOF
20597 if ac_fn_c_try_link "$LINENO"; then :
20598   ol_cv_db_db_5_dot_m=yes
20599 else
20600   ol_cv_db_db_5_dot_m=no
20601 fi
20602 rm -f core conftest.err conftest.$ac_objext \
20603     conftest$ac_exeext conftest.$ac_ext
20604
20605         LIBS="$ol_LIBS"
20606
20607 fi
20608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_dot_m" >&5
20609 $as_echo "$ol_cv_db_db_5_dot_m" >&6; }
20610
20611         if test $ol_cv_db_db_5_dot_m = yes ; then
20612                 ol_cv_lib_db=-ldb-5.$ol_cv_bdb_minor
20613         fi
20614 fi
20615
20616         if test $ol_cv_lib_db = no ; then
20617         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)" >&5
20618 $as_echo_n "checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)... " >&6; }
20619 if test "${ol_cv_db_db5m+set}" = set; then :
20620   $as_echo_n "(cached) " >&6
20621 else
20622
20623         ol_DB_LIB=-ldb5$ol_cv_bdb_minor
20624         ol_LIBS=$LIBS
20625         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20626
20627         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20628 /* end confdefs.h.  */
20629
20630 #ifdef HAVE_DB_185_H
20631 # include <db_185.h>
20632 #else
20633 # include <db.h>
20634 #endif
20635
20636 #ifndef DB_VERSION_MAJOR
20637 # define DB_VERSION_MAJOR 1
20638 #endif
20639
20640 #ifndef NULL
20641 #define NULL ((void*)0)
20642 #endif
20643
20644 int
20645 main ()
20646 {
20647
20648 #if DB_VERSION_MAJOR > 2
20649         db_env_create( NULL, 0 );
20650 #elif DB_VERSION_MAJOR > 1
20651         db_appexit( NULL );
20652 #else
20653         (void) dbopen( NULL, 0, 0, 0, NULL);
20654 #endif
20655
20656   ;
20657   return 0;
20658 }
20659 _ACEOF
20660 if ac_fn_c_try_link "$LINENO"; then :
20661   ol_cv_db_db5m=yes
20662 else
20663   ol_cv_db_db5m=no
20664 fi
20665 rm -f core conftest.err conftest.$ac_objext \
20666     conftest$ac_exeext conftest.$ac_ext
20667
20668         LIBS="$ol_LIBS"
20669
20670 fi
20671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5m" >&5
20672 $as_echo "$ol_cv_db_db5m" >&6; }
20673
20674         if test $ol_cv_db_db5m = yes ; then
20675                 ol_cv_lib_db=-ldb5$ol_cv_bdb_minor
20676         fi
20677 fi
20678
20679         if test $ol_cv_lib_db = no ; then
20680         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)" >&5
20681 $as_echo_n "checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)... " >&6; }
20682 if test "${ol_cv_db_db_5m+set}" = set; then :
20683   $as_echo_n "(cached) " >&6
20684 else
20685
20686         ol_DB_LIB=-ldb-5$ol_cv_bdb_minor
20687         ol_LIBS=$LIBS
20688         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20689
20690         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20691 /* end confdefs.h.  */
20692
20693 #ifdef HAVE_DB_185_H
20694 # include <db_185.h>
20695 #else
20696 # include <db.h>
20697 #endif
20698
20699 #ifndef DB_VERSION_MAJOR
20700 # define DB_VERSION_MAJOR 1
20701 #endif
20702
20703 #ifndef NULL
20704 #define NULL ((void*)0)
20705 #endif
20706
20707 int
20708 main ()
20709 {
20710
20711 #if DB_VERSION_MAJOR > 2
20712         db_env_create( NULL, 0 );
20713 #elif DB_VERSION_MAJOR > 1
20714         db_appexit( NULL );
20715 #else
20716         (void) dbopen( NULL, 0, 0, 0, NULL);
20717 #endif
20718
20719   ;
20720   return 0;
20721 }
20722 _ACEOF
20723 if ac_fn_c_try_link "$LINENO"; then :
20724   ol_cv_db_db_5m=yes
20725 else
20726   ol_cv_db_db_5m=no
20727 fi
20728 rm -f core conftest.err conftest.$ac_objext \
20729     conftest$ac_exeext conftest.$ac_ext
20730
20731         LIBS="$ol_LIBS"
20732
20733 fi
20734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5m" >&5
20735 $as_echo "$ol_cv_db_db_5m" >&6; }
20736
20737         if test $ol_cv_db_db_5m = yes ; then
20738                 ol_cv_lib_db=-ldb-5$ol_cv_bdb_minor
20739         fi
20740 fi
20741
20742         if test $ol_cv_lib_db = no ; then
20743         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)" >&5
20744 $as_echo_n "checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)... " >&6; }
20745 if test "${ol_cv_db_db_5_m+set}" = set; then :
20746   $as_echo_n "(cached) " >&6
20747 else
20748
20749         ol_DB_LIB=-ldb-5-$ol_cv_bdb_minor
20750         ol_LIBS=$LIBS
20751         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20752
20753         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20754 /* end confdefs.h.  */
20755
20756 #ifdef HAVE_DB_185_H
20757 # include <db_185.h>
20758 #else
20759 # include <db.h>
20760 #endif
20761
20762 #ifndef DB_VERSION_MAJOR
20763 # define DB_VERSION_MAJOR 1
20764 #endif
20765
20766 #ifndef NULL
20767 #define NULL ((void*)0)
20768 #endif
20769
20770 int
20771 main ()
20772 {
20773
20774 #if DB_VERSION_MAJOR > 2
20775         db_env_create( NULL, 0 );
20776 #elif DB_VERSION_MAJOR > 1
20777         db_appexit( NULL );
20778 #else
20779         (void) dbopen( NULL, 0, 0, 0, NULL);
20780 #endif
20781
20782   ;
20783   return 0;
20784 }
20785 _ACEOF
20786 if ac_fn_c_try_link "$LINENO"; then :
20787   ol_cv_db_db_5_m=yes
20788 else
20789   ol_cv_db_db_5_m=no
20790 fi
20791 rm -f core conftest.err conftest.$ac_objext \
20792     conftest$ac_exeext conftest.$ac_ext
20793
20794         LIBS="$ol_LIBS"
20795
20796 fi
20797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_m" >&5
20798 $as_echo "$ol_cv_db_db_5_m" >&6; }
20799
20800         if test $ol_cv_db_db_5_m = yes ; then
20801                 ol_cv_lib_db=-ldb-5-$ol_cv_bdb_minor
20802         fi
20803 fi
20804
20805         if test $ol_cv_lib_db = no ; then
20806         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5)" >&5
20807 $as_echo_n "checking for Berkeley DB link (-ldb-5)... " >&6; }
20808 if test "${ol_cv_db_db_5+set}" = set; then :
20809   $as_echo_n "(cached) " >&6
20810 else
20811
20812         ol_DB_LIB=-ldb-5
20813         ol_LIBS=$LIBS
20814         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20815
20816         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20817 /* end confdefs.h.  */
20818
20819 #ifdef HAVE_DB_185_H
20820 # include <db_185.h>
20821 #else
20822 # include <db.h>
20823 #endif
20824
20825 #ifndef DB_VERSION_MAJOR
20826 # define DB_VERSION_MAJOR 1
20827 #endif
20828
20829 #ifndef NULL
20830 #define NULL ((void*)0)
20831 #endif
20832
20833 int
20834 main ()
20835 {
20836
20837 #if DB_VERSION_MAJOR > 2
20838         db_env_create( NULL, 0 );
20839 #elif DB_VERSION_MAJOR > 1
20840         db_appexit( NULL );
20841 #else
20842         (void) dbopen( NULL, 0, 0, 0, NULL);
20843 #endif
20844
20845   ;
20846   return 0;
20847 }
20848 _ACEOF
20849 if ac_fn_c_try_link "$LINENO"; then :
20850   ol_cv_db_db_5=yes
20851 else
20852   ol_cv_db_db_5=no
20853 fi
20854 rm -f core conftest.err conftest.$ac_objext \
20855     conftest$ac_exeext conftest.$ac_ext
20856
20857         LIBS="$ol_LIBS"
20858
20859 fi
20860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5" >&5
20861 $as_echo "$ol_cv_db_db_5" >&6; }
20862
20863         if test $ol_cv_db_db_5 = yes ; then
20864                 ol_cv_lib_db=-ldb-5
20865         fi
20866 fi
20867
20868         if test $ol_cv_lib_db = no ; then
20869         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5)" >&5
20870 $as_echo_n "checking for Berkeley DB link (-ldb5)... " >&6; }
20871 if test "${ol_cv_db_db5+set}" = set; then :
20872   $as_echo_n "(cached) " >&6
20873 else
20874
20875         ol_DB_LIB=-ldb5
20876         ol_LIBS=$LIBS
20877         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20878
20879         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20880 /* end confdefs.h.  */
20881
20882 #ifdef HAVE_DB_185_H
20883 # include <db_185.h>
20884 #else
20885 # include <db.h>
20886 #endif
20887
20888 #ifndef DB_VERSION_MAJOR
20889 # define DB_VERSION_MAJOR 1
20890 #endif
20891
20892 #ifndef NULL
20893 #define NULL ((void*)0)
20894 #endif
20895
20896 int
20897 main ()
20898 {
20899
20900 #if DB_VERSION_MAJOR > 2
20901         db_env_create( NULL, 0 );
20902 #elif DB_VERSION_MAJOR > 1
20903         db_appexit( NULL );
20904 #else
20905         (void) dbopen( NULL, 0, 0, 0, NULL);
20906 #endif
20907
20908   ;
20909   return 0;
20910 }
20911 _ACEOF
20912 if ac_fn_c_try_link "$LINENO"; then :
20913   ol_cv_db_db5=yes
20914 else
20915   ol_cv_db_db5=no
20916 fi
20917 rm -f core conftest.err conftest.$ac_objext \
20918     conftest$ac_exeext conftest.$ac_ext
20919
20920         LIBS="$ol_LIBS"
20921
20922 fi
20923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5" >&5
20924 $as_echo "$ol_cv_db_db5" >&6; }
20925
20926         if test $ol_cv_db_db5 = yes ; then
20927                 ol_cv_lib_db=-ldb5
20928         fi
20929 fi
20930
20931 elif test $ol_cv_bdb_major = 4 ; then
20932         if test $ol_cv_lib_db = no ; then
20933         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)" >&5
20934 $as_echo_n "checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)... " >&6; }
20935 if test "${ol_cv_db_db_4_dot_m+set}" = set; then :
20936   $as_echo_n "(cached) " >&6
20937 else
20938
20939         ol_DB_LIB=-ldb-4.$ol_cv_bdb_minor
20940         ol_LIBS=$LIBS
20941         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20942
20943         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20944 /* end confdefs.h.  */
20945
20946 #ifdef HAVE_DB_185_H
20947 # include <db_185.h>
20948 #else
20949 # include <db.h>
20950 #endif
20951
20952 #ifndef DB_VERSION_MAJOR
20953 # define DB_VERSION_MAJOR 1
20954 #endif
20955
20956 #ifndef NULL
20957 #define NULL ((void*)0)
20958 #endif
20959
20960 int
20961 main ()
20962 {
20963
20964 #if DB_VERSION_MAJOR > 2
20965         db_env_create( NULL, 0 );
20966 #elif DB_VERSION_MAJOR > 1
20967         db_appexit( NULL );
20968 #else
20969         (void) dbopen( NULL, 0, 0, 0, NULL);
20970 #endif
20971
20972   ;
20973   return 0;
20974 }
20975 _ACEOF
20976 if ac_fn_c_try_link "$LINENO"; then :
20977   ol_cv_db_db_4_dot_m=yes
20978 else
20979   ol_cv_db_db_4_dot_m=no
20980 fi
20981 rm -f core conftest.err conftest.$ac_objext \
20982     conftest$ac_exeext conftest.$ac_ext
20983
20984         LIBS="$ol_LIBS"
20985
20986 fi
20987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_dot_m" >&5
20988 $as_echo "$ol_cv_db_db_4_dot_m" >&6; }
20989
20990         if test $ol_cv_db_db_4_dot_m = yes ; then
20991                 ol_cv_lib_db=-ldb-4.$ol_cv_bdb_minor
20992         fi
20993 fi
20994
20995         if test $ol_cv_lib_db = no ; then
20996         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)" >&5
20997 $as_echo_n "checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)... " >&6; }
20998 if test "${ol_cv_db_db4m+set}" = set; then :
20999   $as_echo_n "(cached) " >&6
21000 else
21001
21002         ol_DB_LIB=-ldb4$ol_cv_bdb_minor
21003         ol_LIBS=$LIBS
21004         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21005
21006         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21007 /* end confdefs.h.  */
21008
21009 #ifdef HAVE_DB_185_H
21010 # include <db_185.h>
21011 #else
21012 # include <db.h>
21013 #endif
21014
21015 #ifndef DB_VERSION_MAJOR
21016 # define DB_VERSION_MAJOR 1
21017 #endif
21018
21019 #ifndef NULL
21020 #define NULL ((void*)0)
21021 #endif
21022
21023 int
21024 main ()
21025 {
21026
21027 #if DB_VERSION_MAJOR > 2
21028         db_env_create( NULL, 0 );
21029 #elif DB_VERSION_MAJOR > 1
21030         db_appexit( NULL );
21031 #else
21032         (void) dbopen( NULL, 0, 0, 0, NULL);
21033 #endif
21034
21035   ;
21036   return 0;
21037 }
21038 _ACEOF
21039 if ac_fn_c_try_link "$LINENO"; then :
21040   ol_cv_db_db4m=yes
21041 else
21042   ol_cv_db_db4m=no
21043 fi
21044 rm -f core conftest.err conftest.$ac_objext \
21045     conftest$ac_exeext conftest.$ac_ext
21046
21047         LIBS="$ol_LIBS"
21048
21049 fi
21050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4m" >&5
21051 $as_echo "$ol_cv_db_db4m" >&6; }
21052
21053         if test $ol_cv_db_db4m = yes ; then
21054                 ol_cv_lib_db=-ldb4$ol_cv_bdb_minor
21055         fi
21056 fi
21057
21058         if test $ol_cv_lib_db = no ; then
21059         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)" >&5
21060 $as_echo_n "checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)... " >&6; }
21061 if test "${ol_cv_db_db_4m+set}" = set; then :
21062   $as_echo_n "(cached) " >&6
21063 else
21064
21065         ol_DB_LIB=-ldb-4$ol_cv_bdb_minor
21066         ol_LIBS=$LIBS
21067         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21068
21069         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21070 /* end confdefs.h.  */
21071
21072 #ifdef HAVE_DB_185_H
21073 # include <db_185.h>
21074 #else
21075 # include <db.h>
21076 #endif
21077
21078 #ifndef DB_VERSION_MAJOR
21079 # define DB_VERSION_MAJOR 1
21080 #endif
21081
21082 #ifndef NULL
21083 #define NULL ((void*)0)
21084 #endif
21085
21086 int
21087 main ()
21088 {
21089
21090 #if DB_VERSION_MAJOR > 2
21091         db_env_create( NULL, 0 );
21092 #elif DB_VERSION_MAJOR > 1
21093         db_appexit( NULL );
21094 #else
21095         (void) dbopen( NULL, 0, 0, 0, NULL);
21096 #endif
21097
21098   ;
21099   return 0;
21100 }
21101 _ACEOF
21102 if ac_fn_c_try_link "$LINENO"; then :
21103   ol_cv_db_db_4m=yes
21104 else
21105   ol_cv_db_db_4m=no
21106 fi
21107 rm -f core conftest.err conftest.$ac_objext \
21108     conftest$ac_exeext conftest.$ac_ext
21109
21110         LIBS="$ol_LIBS"
21111
21112 fi
21113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4m" >&5
21114 $as_echo "$ol_cv_db_db_4m" >&6; }
21115
21116         if test $ol_cv_db_db_4m = yes ; then
21117                 ol_cv_lib_db=-ldb-4$ol_cv_bdb_minor
21118         fi
21119 fi
21120
21121         if test $ol_cv_lib_db = no ; then
21122         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)" >&5
21123 $as_echo_n "checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)... " >&6; }
21124 if test "${ol_cv_db_db_4_m+set}" = set; then :
21125   $as_echo_n "(cached) " >&6
21126 else
21127
21128         ol_DB_LIB=-ldb-4-$ol_cv_bdb_minor
21129         ol_LIBS=$LIBS
21130         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21131
21132         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21133 /* end confdefs.h.  */
21134
21135 #ifdef HAVE_DB_185_H
21136 # include <db_185.h>
21137 #else
21138 # include <db.h>
21139 #endif
21140
21141 #ifndef DB_VERSION_MAJOR
21142 # define DB_VERSION_MAJOR 1
21143 #endif
21144
21145 #ifndef NULL
21146 #define NULL ((void*)0)
21147 #endif
21148
21149 int
21150 main ()
21151 {
21152
21153 #if DB_VERSION_MAJOR > 2
21154         db_env_create( NULL, 0 );
21155 #elif DB_VERSION_MAJOR > 1
21156         db_appexit( NULL );
21157 #else
21158         (void) dbopen( NULL, 0, 0, 0, NULL);
21159 #endif
21160
21161   ;
21162   return 0;
21163 }
21164 _ACEOF
21165 if ac_fn_c_try_link "$LINENO"; then :
21166   ol_cv_db_db_4_m=yes
21167 else
21168   ol_cv_db_db_4_m=no
21169 fi
21170 rm -f core conftest.err conftest.$ac_objext \
21171     conftest$ac_exeext conftest.$ac_ext
21172
21173         LIBS="$ol_LIBS"
21174
21175 fi
21176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_m" >&5
21177 $as_echo "$ol_cv_db_db_4_m" >&6; }
21178
21179         if test $ol_cv_db_db_4_m = yes ; then
21180                 ol_cv_lib_db=-ldb-4-$ol_cv_bdb_minor
21181         fi
21182 fi
21183
21184         if test $ol_cv_lib_db = no ; then
21185         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4)" >&5
21186 $as_echo_n "checking for Berkeley DB link (-ldb-4)... " >&6; }
21187 if test "${ol_cv_db_db_4+set}" = set; then :
21188   $as_echo_n "(cached) " >&6
21189 else
21190
21191         ol_DB_LIB=-ldb-4
21192         ol_LIBS=$LIBS
21193         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21194
21195         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21196 /* end confdefs.h.  */
21197
21198 #ifdef HAVE_DB_185_H
21199 # include <db_185.h>
21200 #else
21201 # include <db.h>
21202 #endif
21203
21204 #ifndef DB_VERSION_MAJOR
21205 # define DB_VERSION_MAJOR 1
21206 #endif
21207
21208 #ifndef NULL
21209 #define NULL ((void*)0)
21210 #endif
21211
21212 int
21213 main ()
21214 {
21215
21216 #if DB_VERSION_MAJOR > 2
21217         db_env_create( NULL, 0 );
21218 #elif DB_VERSION_MAJOR > 1
21219         db_appexit( NULL );
21220 #else
21221         (void) dbopen( NULL, 0, 0, 0, NULL);
21222 #endif
21223
21224   ;
21225   return 0;
21226 }
21227 _ACEOF
21228 if ac_fn_c_try_link "$LINENO"; then :
21229   ol_cv_db_db_4=yes
21230 else
21231   ol_cv_db_db_4=no
21232 fi
21233 rm -f core conftest.err conftest.$ac_objext \
21234     conftest$ac_exeext conftest.$ac_ext
21235
21236         LIBS="$ol_LIBS"
21237
21238 fi
21239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4" >&5
21240 $as_echo "$ol_cv_db_db_4" >&6; }
21241
21242         if test $ol_cv_db_db_4 = yes ; then
21243                 ol_cv_lib_db=-ldb-4
21244         fi
21245 fi
21246
21247         if test $ol_cv_lib_db = no ; then
21248         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4)" >&5
21249 $as_echo_n "checking for Berkeley DB link (-ldb4)... " >&6; }
21250 if test "${ol_cv_db_db4+set}" = set; then :
21251   $as_echo_n "(cached) " >&6
21252 else
21253
21254         ol_DB_LIB=-ldb4
21255         ol_LIBS=$LIBS
21256         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21257
21258         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21259 /* end confdefs.h.  */
21260
21261 #ifdef HAVE_DB_185_H
21262 # include <db_185.h>
21263 #else
21264 # include <db.h>
21265 #endif
21266
21267 #ifndef DB_VERSION_MAJOR
21268 # define DB_VERSION_MAJOR 1
21269 #endif
21270
21271 #ifndef NULL
21272 #define NULL ((void*)0)
21273 #endif
21274
21275 int
21276 main ()
21277 {
21278
21279 #if DB_VERSION_MAJOR > 2
21280         db_env_create( NULL, 0 );
21281 #elif DB_VERSION_MAJOR > 1
21282         db_appexit( NULL );
21283 #else
21284         (void) dbopen( NULL, 0, 0, 0, NULL);
21285 #endif
21286
21287   ;
21288   return 0;
21289 }
21290 _ACEOF
21291 if ac_fn_c_try_link "$LINENO"; then :
21292   ol_cv_db_db4=yes
21293 else
21294   ol_cv_db_db4=no
21295 fi
21296 rm -f core conftest.err conftest.$ac_objext \
21297     conftest$ac_exeext conftest.$ac_ext
21298
21299         LIBS="$ol_LIBS"
21300
21301 fi
21302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4" >&5
21303 $as_echo "$ol_cv_db_db4" >&6; }
21304
21305         if test $ol_cv_db_db4 = yes ; then
21306                 ol_cv_lib_db=-ldb4
21307         fi
21308 fi
21309
21310 fi
21311 if test $ol_cv_lib_db = no ; then
21312         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb)" >&5
21313 $as_echo_n "checking for Berkeley DB link (-ldb)... " >&6; }
21314 if test "${ol_cv_db_db+set}" = set; then :
21315   $as_echo_n "(cached) " >&6
21316 else
21317
21318         ol_DB_LIB=-ldb
21319         ol_LIBS=$LIBS
21320         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21321
21322         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21323 /* end confdefs.h.  */
21324
21325 #ifdef HAVE_DB_185_H
21326 # include <db_185.h>
21327 #else
21328 # include <db.h>
21329 #endif
21330
21331 #ifndef DB_VERSION_MAJOR
21332 # define DB_VERSION_MAJOR 1
21333 #endif
21334
21335 #ifndef NULL
21336 #define NULL ((void*)0)
21337 #endif
21338
21339 int
21340 main ()
21341 {
21342
21343 #if DB_VERSION_MAJOR > 2
21344         db_env_create( NULL, 0 );
21345 #elif DB_VERSION_MAJOR > 1
21346         db_appexit( NULL );
21347 #else
21348         (void) dbopen( NULL, 0, 0, 0, NULL);
21349 #endif
21350
21351   ;
21352   return 0;
21353 }
21354 _ACEOF
21355 if ac_fn_c_try_link "$LINENO"; then :
21356   ol_cv_db_db=yes
21357 else
21358   ol_cv_db_db=no
21359 fi
21360 rm -f core conftest.err conftest.$ac_objext \
21361     conftest$ac_exeext conftest.$ac_ext
21362
21363         LIBS="$ol_LIBS"
21364
21365 fi
21366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db" >&5
21367 $as_echo "$ol_cv_db_db" >&6; }
21368
21369         if test $ol_cv_db_db = yes ; then
21370                 ol_cv_lib_db=-ldb
21371         fi
21372 fi
21373
21374 if test $ol_cv_lib_db = no ; then
21375         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (default)" >&5
21376 $as_echo_n "checking for Berkeley DB link (default)... " >&6; }
21377 if test "${ol_cv_db_none+set}" = set; then :
21378   $as_echo_n "(cached) " >&6
21379 else
21380
21381         ol_DB_LIB=
21382         ol_LIBS=$LIBS
21383         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21384
21385         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21386 /* end confdefs.h.  */
21387
21388 #ifdef HAVE_DB_185_H
21389 # include <db_185.h>
21390 #else
21391 # include <db.h>
21392 #endif
21393
21394 #ifndef DB_VERSION_MAJOR
21395 # define DB_VERSION_MAJOR 1
21396 #endif
21397
21398 #ifndef NULL
21399 #define NULL ((void*)0)
21400 #endif
21401
21402 int
21403 main ()
21404 {
21405
21406 #if DB_VERSION_MAJOR > 2
21407         db_env_create( NULL, 0 );
21408 #elif DB_VERSION_MAJOR > 1
21409         db_appexit( NULL );
21410 #else
21411         (void) dbopen( NULL, 0, 0, 0, NULL);
21412 #endif
21413
21414   ;
21415   return 0;
21416 }
21417 _ACEOF
21418 if ac_fn_c_try_link "$LINENO"; then :
21419   ol_cv_db_none=yes
21420 else
21421   ol_cv_db_none=no
21422 fi
21423 rm -f core conftest.err conftest.$ac_objext \
21424     conftest$ac_exeext conftest.$ac_ext
21425
21426         LIBS="$ol_LIBS"
21427
21428 fi
21429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_none" >&5
21430 $as_echo "$ol_cv_db_none" >&6; }
21431
21432         if test $ol_cv_db_none = yes ; then
21433                 ol_cv_lib_db=yes
21434         fi
21435 fi
21436
21437
21438         if test "$ol_cv_lib_db" != no ; then
21439                 ol_cv_berkeley_db=yes
21440                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB library and header version match" >&5
21441 $as_echo_n "checking for Berkeley DB library and header version match... " >&6; }
21442 if test "${ol_cv_berkeley_db_version+set}" = set; then :
21443   $as_echo_n "(cached) " >&6
21444 else
21445
21446         ol_LIBS="$LIBS"
21447         LIBS="$LTHREAD_LIBS $LIBS"
21448         if test $ol_cv_lib_db != yes ; then
21449                 LIBS="$ol_cv_lib_db $LIBS"
21450         fi
21451
21452         if test "$cross_compiling" = yes; then :
21453   ol_cv_berkeley_db_version=cross
21454 else
21455   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21456 /* end confdefs.h.  */
21457
21458 #ifdef HAVE_DB_185_H
21459         choke me;
21460 #else
21461 #include <db.h>
21462 #endif
21463 #ifndef DB_VERSION_MAJOR
21464 # define DB_VERSION_MAJOR 1
21465 #endif
21466 #ifndef NULL
21467 #define NULL ((void *)0)
21468 #endif
21469 main()
21470 {
21471 #if DB_VERSION_MAJOR > 1
21472         char *version;
21473         int major, minor, patch;
21474
21475         version = db_version( &major, &minor, &patch );
21476
21477         if( major != DB_VERSION_MAJOR ||
21478                 minor != DB_VERSION_MINOR ||
21479                 patch != DB_VERSION_PATCH )
21480         {
21481                 printf("Berkeley DB version mismatch\n"
21482                         "\theader: %s\n\tlibrary: %s\n",
21483                         DB_VERSION_STRING, version);
21484                 return 1;
21485         }
21486 #endif
21487
21488         return 0;
21489 }
21490 _ACEOF
21491 if ac_fn_c_try_run "$LINENO"; then :
21492   ol_cv_berkeley_db_version=yes
21493 else
21494   ol_cv_berkeley_db_version=no
21495 fi
21496 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21497   conftest.$ac_objext conftest.beam conftest.$ac_ext
21498 fi
21499
21500
21501         LIBS="$ol_LIBS"
21502
21503 fi
21504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_version" >&5
21505 $as_echo "$ol_cv_berkeley_db_version" >&6; }
21506
21507         if test $ol_cv_berkeley_db_version = no ; then
21508                 as_fn_error "Berkeley DB version mismatch" "$LINENO" 5
21509         fi
21510
21511                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB thread support" >&5
21512 $as_echo_n "checking for Berkeley DB thread support... " >&6; }
21513 if test "${ol_cv_berkeley_db_thread+set}" = set; then :
21514   $as_echo_n "(cached) " >&6
21515 else
21516
21517         ol_LIBS="$LIBS"
21518         LIBS="$LTHREAD_LIBS $LIBS"
21519         if test $ol_cv_lib_db != yes ; then
21520                 LIBS="$ol_cv_lib_db $LIBS"
21521         fi
21522
21523         if test "$cross_compiling" = yes; then :
21524   ol_cv_berkeley_db_thread=cross
21525 else
21526   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21527 /* end confdefs.h.  */
21528
21529 #ifdef HAVE_DB_185_H
21530         choke me;
21531 #else
21532 #include <db.h>
21533 #endif
21534 #ifndef NULL
21535 #define NULL ((void *)0)
21536 #endif
21537 main()
21538 {
21539         int rc;
21540         u_int32_t flags = DB_CREATE |
21541 #ifdef DB_PRIVATE
21542                 DB_PRIVATE |
21543 #endif
21544                 DB_THREAD;
21545
21546 #if DB_VERSION_MAJOR > 2
21547         DB_ENV *env = NULL;
21548
21549         rc = db_env_create( &env, 0 );
21550
21551         flags |= DB_INIT_MPOOL;
21552 #ifdef DB_MPOOL_PRIVATE
21553         flags |= DB_MPOOL_PRIVATE;
21554 #endif
21555
21556         if( rc ) {
21557                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21558                 return rc;
21559         }
21560
21561 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
21562         rc = (env->open)( env, NULL, flags, 0 );
21563 #else
21564         rc = (env->open)( env, NULL, NULL, flags, 0 );
21565 #endif
21566
21567         if ( rc == 0 ) {
21568                 rc = env->close( env, 0 );
21569         }
21570
21571         if( rc ) {
21572                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21573                 return rc;
21574         }
21575
21576 #else
21577         DB_ENV env;
21578         memset( &env, '\0', sizeof(env) );
21579
21580         rc = db_appinit( NULL, NULL, &env, flags );
21581
21582         if( rc == 0 ) {
21583                 db_appexit( &env );
21584         }
21585
21586         unlink("__db_mpool.share");
21587         unlink("__db_lock.share");
21588 #endif
21589
21590         return rc;
21591 }
21592 _ACEOF
21593 if ac_fn_c_try_run "$LINENO"; then :
21594   ol_cv_berkeley_db_thread=yes
21595 else
21596   ol_cv_berkeley_db_thread=no
21597 fi
21598 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21599   conftest.$ac_objext conftest.beam conftest.$ac_ext
21600 fi
21601
21602
21603         LIBS="$ol_LIBS"
21604
21605 fi
21606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_thread" >&5
21607 $as_echo "$ol_cv_berkeley_db_thread" >&6; }
21608
21609         if test $ol_cv_berkeley_db_thread != no ; then
21610
21611 $as_echo "#define HAVE_BERKELEY_DB_THREAD 1" >>confdefs.h
21612
21613         fi
21614
21615         fi
21616 fi
21617
21618
21619         if test $ol_cv_berkeley_db = no ; then
21620                 as_fn_error "BDB/HDB: BerkeleyDB not available" "$LINENO" 5
21621         fi
21622
21623
21624 $as_echo "#define HAVE_BERKELEY_DB 1" >>confdefs.h
21625
21626
21627                         if test $ol_cv_lib_db != yes ; then
21628                 BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
21629         fi
21630
21631         SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
21632
21633         ol_link_bdb=yes
21634 fi
21635
21636
21637 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
21638         BUILD_LIBS_DYNAMIC=shared
21639
21640 $as_echo "#define LDAP_LIBS_DYNAMIC 1" >>confdefs.h
21641
21642         LTSTATIC=""
21643 else
21644         BUILD_LIBS_DYNAMIC=static
21645         LTSTATIC="-static"
21646 fi
21647
21648 if test $ol_enable_wrappers != no ; then
21649         for ac_header in tcpd.h
21650 do :
21651   ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
21652 if test "x$ac_cv_header_tcpd_h" = x""yes; then :
21653   cat >>confdefs.h <<_ACEOF
21654 #define HAVE_TCPD_H 1
21655 _ACEOF
21656
21657                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library" >&5
21658 $as_echo_n "checking for TCP wrappers library... " >&6; }
21659                 save_LIBS="$LIBS"
21660                 LIBS="$LIBS -lwrap"
21661                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21662 /* end confdefs.h.  */
21663
21664 #include <tcpd.h>
21665 int allow_severity = 0;
21666 int deny_severity  = 0;
21667
21668 struct request_info *req;
21669
21670 int
21671 main ()
21672 {
21673
21674 hosts_access(req)
21675
21676   ;
21677   return 0;
21678 }
21679 _ACEOF
21680 if ac_fn_c_try_link "$LINENO"; then :
21681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap" >&5
21682 $as_echo "-lwrap" >&6; }
21683                 have_wrappers=yes
21684                 LIBS="$save_LIBS"
21685 else
21686
21687                                 LIBS="$LIBS -lnsl"
21688                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21689 /* end confdefs.h.  */
21690
21691 #include <tcpd.h>
21692 int allow_severity = 0;
21693 int deny_severity  = 0;
21694
21695 struct request_info *req;
21696
21697 int
21698 main ()
21699 {
21700
21701 hosts_access(req)
21702
21703   ;
21704   return 0;
21705 }
21706 _ACEOF
21707 if ac_fn_c_try_link "$LINENO"; then :
21708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap -lnsl" >&5
21709 $as_echo "-lwrap -lnsl" >&6; }
21710                 have_wrappers=yes
21711                 LIBS="$save_LIBS -lnsl"
21712 else
21713
21714                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21715 $as_echo "no" >&6; }
21716                 have_wrappers=no
21717                 LIBS=$save_LIBS
21718 fi
21719 rm -f core conftest.err conftest.$ac_objext \
21720     conftest$ac_exeext conftest.$ac_ext
21721 fi
21722 rm -f core conftest.err conftest.$ac_objext \
21723     conftest$ac_exeext conftest.$ac_ext
21724 else
21725   have_wrappers=no
21726 fi
21727
21728 done
21729
21730
21731         if test $have_wrappers = yes ; then
21732
21733 $as_echo "#define HAVE_TCPD 1" >>confdefs.h
21734
21735                 WRAP_LIBS="-lwrap"
21736         elif test $ol_enable_wrappers = yes ; then
21737                 as_fn_error "could not find TCP wrappers, select appropriate options or disable" "$LINENO" 5
21738         else
21739                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find TCP wrappers, support disabled" >&5
21740 $as_echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
21741                 WRAP_LIBS=""
21742         fi
21743 fi
21744
21745 if test $ol_enable_syslog != no ; then
21746         ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
21747 if test "x$ac_cv_func_openlog" = x""yes; then :
21748
21749 fi
21750
21751         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
21752                 { as_fn_set_status select appropriate options or disable
21753 as_fn_error "could not find syslog" "$LINENO" 5; }
21754         fi
21755         ol_enable_syslog=$ac_cv_func_openlog
21756 fi
21757
21758 ol_link_sql=no
21759 if test $ol_enable_sql != no ; then
21760         for ac_header in sql.h sqlext.h
21761 do :
21762   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21763 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21764 eval as_val=\$$as_ac_Header
21765    if test "x$as_val" = x""yes; then :
21766   cat >>confdefs.h <<_ACEOF
21767 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21768 _ACEOF
21769
21770 else
21771
21772                 as_fn_error "could not locate SQL headers" "$LINENO" 5
21773
21774 fi
21775
21776 done
21777
21778
21779         sql_LIBS="$LIBS"
21780         LIBS="$LTHREAD_LIBS $LIBS"
21781
21782         if test $ol_with_odbc = auto ; then
21783                 ol_with_odbc="iodbc unixodbc odbc32"
21784         fi
21785
21786         for odbc in $ol_with_odbc ; do
21787                 if test $ol_link_sql = no ; then
21788                         case $odbc in
21789                         iodbc)
21790                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -liodbc" >&5
21791 $as_echo_n "checking for SQLDriverConnect in -liodbc... " >&6; }
21792 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then :
21793   $as_echo_n "(cached) " >&6
21794 else
21795   ac_check_lib_save_LIBS=$LIBS
21796 LIBS="-liodbc  $LIBS"
21797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21798 /* end confdefs.h.  */
21799
21800 /* Override any GCC internal prototype to avoid an error.
21801    Use char because int might match the return type of a GCC
21802    builtin and then its argument prototype would still apply.  */
21803 #ifdef __cplusplus
21804 extern "C"
21805 #endif
21806 char SQLDriverConnect ();
21807 int
21808 main ()
21809 {
21810 return SQLDriverConnect ();
21811   ;
21812   return 0;
21813 }
21814 _ACEOF
21815 if ac_fn_c_try_link "$LINENO"; then :
21816   ac_cv_lib_iodbc_SQLDriverConnect=yes
21817 else
21818   ac_cv_lib_iodbc_SQLDriverConnect=no
21819 fi
21820 rm -f core conftest.err conftest.$ac_objext \
21821     conftest$ac_exeext conftest.$ac_ext
21822 LIBS=$ac_check_lib_save_LIBS
21823 fi
21824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
21825 $as_echo "$ac_cv_lib_iodbc_SQLDriverConnect" >&6; }
21826 if test "x$ac_cv_lib_iodbc_SQLDriverConnect" = x""yes; then :
21827   have_iodbc=yes
21828 else
21829   have_iodbc=no
21830 fi
21831
21832                                 if test $have_iodbc = yes ; then
21833                                         ol_link_sql="-liodbc"
21834                                 fi
21835                                 ;;
21836
21837                         unixodbc)
21838                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc" >&5
21839 $as_echo_n "checking for SQLDriverConnect in -lodbc... " >&6; }
21840 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then :
21841   $as_echo_n "(cached) " >&6
21842 else
21843   ac_check_lib_save_LIBS=$LIBS
21844 LIBS="-lodbc  $LIBS"
21845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21846 /* end confdefs.h.  */
21847
21848 /* Override any GCC internal prototype to avoid an error.
21849    Use char because int might match the return type of a GCC
21850    builtin and then its argument prototype would still apply.  */
21851 #ifdef __cplusplus
21852 extern "C"
21853 #endif
21854 char SQLDriverConnect ();
21855 int
21856 main ()
21857 {
21858 return SQLDriverConnect ();
21859   ;
21860   return 0;
21861 }
21862 _ACEOF
21863 if ac_fn_c_try_link "$LINENO"; then :
21864   ac_cv_lib_odbc_SQLDriverConnect=yes
21865 else
21866   ac_cv_lib_odbc_SQLDriverConnect=no
21867 fi
21868 rm -f core conftest.err conftest.$ac_objext \
21869     conftest$ac_exeext conftest.$ac_ext
21870 LIBS=$ac_check_lib_save_LIBS
21871 fi
21872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
21873 $as_echo "$ac_cv_lib_odbc_SQLDriverConnect" >&6; }
21874 if test "x$ac_cv_lib_odbc_SQLDriverConnect" = x""yes; then :
21875   have_odbc=yes
21876 else
21877   have_odbc=no
21878 fi
21879
21880                                 if test $have_odbc = yes ; then
21881                                         ol_link_sql="-lodbc"
21882                                 fi
21883                                 ;;
21884
21885                         odbc32)
21886                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32" >&5
21887 $as_echo_n "checking for SQLDriverConnect in -lodbc32... " >&6; }
21888 if test "${ac_cv_lib_odbc32_SQLDriverConnect+set}" = set; then :
21889   $as_echo_n "(cached) " >&6
21890 else
21891   ac_check_lib_save_LIBS=$LIBS
21892 LIBS="-lodbc32  $LIBS"
21893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21894 /* end confdefs.h.  */
21895
21896 /* Override any GCC internal prototype to avoid an error.
21897    Use char because int might match the return type of a GCC
21898    builtin and then its argument prototype would still apply.  */
21899 #ifdef __cplusplus
21900 extern "C"
21901 #endif
21902 char SQLDriverConnect ();
21903 int
21904 main ()
21905 {
21906 return SQLDriverConnect ();
21907   ;
21908   return 0;
21909 }
21910 _ACEOF
21911 if ac_fn_c_try_link "$LINENO"; then :
21912   ac_cv_lib_odbc32_SQLDriverConnect=yes
21913 else
21914   ac_cv_lib_odbc32_SQLDriverConnect=no
21915 fi
21916 rm -f core conftest.err conftest.$ac_objext \
21917     conftest$ac_exeext conftest.$ac_ext
21918 LIBS=$ac_check_lib_save_LIBS
21919 fi
21920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_SQLDriverConnect" >&5
21921 $as_echo "$ac_cv_lib_odbc32_SQLDriverConnect" >&6; }
21922 if test "x$ac_cv_lib_odbc32_SQLDriverConnect" = x""yes; then :
21923   have_odbc32=yes
21924 else
21925   have_odbc32=no
21926 fi
21927
21928
21929                                                                 if test $have_odbc32 = no ; then
21930                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32 with windows.h" >&5
21931 $as_echo_n "checking for SQLDriverConnect in -lodbc32 with windows.h... " >&6; }
21932                                         save_LIBS="$LIBS"
21933                                         LIBS="$LIBS -lodbc32"
21934                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21935 /* end confdefs.h.  */
21936 #include <windows.h>
21937                                         #include <sqlext.h>
21938
21939 int
21940 main ()
21941 {
21942
21943                                                 SQLDriverConnect(NULL,NULL,NULL,0,NULL,0,NULL,0);
21944
21945   ;
21946   return 0;
21947 }
21948 _ACEOF
21949 if ac_fn_c_try_link "$LINENO"; then :
21950   have_odbc32=yes
21951 else
21952   have_odbc32=no
21953 fi
21954 rm -f core conftest.err conftest.$ac_objext \
21955     conftest$ac_exeext conftest.$ac_ext
21956                                         LIBS="$save_LIBS"
21957                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_odbc32" >&5
21958 $as_echo "$have_odbc32" >&6; }
21959                                 fi
21960
21961                                 if test $have_odbc32 = yes ; then
21962                                         ol_link_sql="-lodbc32"
21963                                 fi
21964                                 ;;
21965
21966                         *)
21967                                 as_fn_error "unknown ODBC library" "$LINENO" 5
21968                                 ;;
21969                         esac
21970                 fi
21971         done
21972
21973         LIBS="$sql_LIBS"
21974
21975         if test $ol_link_sql != no ; then
21976                 SLAPD_SQL_LIBS="$ol_link_sql"
21977
21978         elif test $ol_enable_sql != auto ; then
21979                 as_fn_error "could not locate suitable ODBC library" "$LINENO" 5
21980         fi
21981 fi
21982
21983 ol_link_ndb=no
21984 if test $ol_enable_ndb != no ; then
21985         # Extract the first word of "mysql_config", so it can be a program name with args.
21986 set dummy mysql_config; ac_word=$2
21987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21988 $as_echo_n "checking for $ac_word... " >&6; }
21989 if test "${ac_cv_prog_MYSQL+set}" = set; then :
21990   $as_echo_n "(cached) " >&6
21991 else
21992   if test -n "$MYSQL"; then
21993   ac_cv_prog_MYSQL="$MYSQL" # Let the user override the test.
21994 else
21995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21996 for as_dir in $PATH
21997 do
21998   IFS=$as_save_IFS
21999   test -z "$as_dir" && as_dir=.
22000     for ac_exec_ext in '' $ac_executable_extensions; do
22001   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22002     ac_cv_prog_MYSQL="yes"
22003     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22004     break 2
22005   fi
22006 done
22007   done
22008 IFS=$as_save_IFS
22009
22010 fi
22011 fi
22012 MYSQL=$ac_cv_prog_MYSQL
22013 if test -n "$MYSQL"; then
22014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL" >&5
22015 $as_echo "$MYSQL" >&6; }
22016 else
22017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22018 $as_echo "no" >&6; }
22019 fi
22020
22021
22022         if test "$MYSQL" != yes ; then
22023                 as_fn_error "could not locate mysql_config" "$LINENO" 5
22024         fi
22025
22026         SQL_INC=`mysql_config --include`
22027         SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi"
22028
22029         save_CPPFLAGS="$CPPFLAGS"
22030         CPPFLAGS="$SLAPD_NDB_INCS"
22031         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NdbApi.hpp" >&5
22032 $as_echo_n "checking for NdbApi.hpp... " >&6; }
22033         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22034 /* end confdefs.h.  */
22035 #include <NdbApi.hpp>
22036 _ACEOF
22037 if ac_fn_c_try_cpp "$LINENO"; then :
22038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22039 $as_echo "yes" >&6; }
22040 else
22041   as_fn_error "could not locate NdbApi headers" "$LINENO" 5
22042
22043 fi
22044 rm -f conftest.err conftest.$ac_ext
22045         CPPFLAGS="$save_CPPFLAGS"
22046
22047         SQL_LIB=`mysql_config --libs_r`
22048         SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++"
22049
22050         save_LDFLAGS="$LDFLAGS"
22051         save_LIBS="$LIBS"
22052         LDFLAGS="$SQL_LIB"
22053         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ndb_init in -lndbclient" >&5
22054 $as_echo_n "checking for ndb_init in -lndbclient... " >&6; }
22055 if test "${ac_cv_lib_ndbclient_ndb_init+set}" = set; then :
22056   $as_echo_n "(cached) " >&6
22057 else
22058   ac_check_lib_save_LIBS=$LIBS
22059 LIBS="-lndbclient -lstdc++ $LIBS"
22060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22061 /* end confdefs.h.  */
22062
22063 /* Override any GCC internal prototype to avoid an error.
22064    Use char because int might match the return type of a GCC
22065    builtin and then its argument prototype would still apply.  */
22066 #ifdef __cplusplus
22067 extern "C"
22068 #endif
22069 char ndb_init ();
22070 int
22071 main ()
22072 {
22073 return ndb_init ();
22074   ;
22075   return 0;
22076 }
22077 _ACEOF
22078 if ac_fn_c_try_link "$LINENO"; then :
22079   ac_cv_lib_ndbclient_ndb_init=yes
22080 else
22081   ac_cv_lib_ndbclient_ndb_init=no
22082 fi
22083 rm -f core conftest.err conftest.$ac_objext \
22084     conftest$ac_exeext conftest.$ac_ext
22085 LIBS=$ac_check_lib_save_LIBS
22086 fi
22087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbclient_ndb_init" >&5
22088 $as_echo "$ac_cv_lib_ndbclient_ndb_init" >&6; }
22089 if test "x$ac_cv_lib_ndbclient_ndb_init" = x""yes; then :
22090   : ok
22091 else
22092
22093                 as_fn_error "could not locate ndbclient library" "$LINENO" 5
22094
22095 fi
22096
22097         LIBS="$save_LIBS"
22098         LDFLAGS="$save_LDFLAGS"
22099
22100         if test "$ol_enable_ndb" = yes ; then
22101                 SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
22102         fi
22103 fi
22104
22105 ol_link_wt=no
22106 if test $ol_enable_wt != no ; then
22107         # Extract the first word of "pkg-config", so it can be a program name with args.
22108 set dummy pkg-config; ac_word=$2
22109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22110 $as_echo_n "checking for $ac_word... " >&6; }
22111 if test "${ac_cv_prog_PKGCONFIG+set}" = set; then :
22112   $as_echo_n "(cached) " >&6
22113 else
22114   if test -n "$PKGCONFIG"; then
22115   ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
22116 else
22117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22118 for as_dir in $PATH
22119 do
22120   IFS=$as_save_IFS
22121   test -z "$as_dir" && as_dir=.
22122     for ac_exec_ext in '' $ac_executable_extensions; do
22123   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22124     ac_cv_prog_PKGCONFIG="yes"
22125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22126     break 2
22127   fi
22128 done
22129   done
22130 IFS=$as_save_IFS
22131
22132 fi
22133 fi
22134 PKGCONFIG=$ac_cv_prog_PKGCONFIG
22135 if test -n "$PKGCONFIG"; then
22136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
22137 $as_echo "$PKGCONFIG" >&6; }
22138 else
22139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22140 $as_echo "no" >&6; }
22141 fi
22142
22143
22144         if test "$PKGCONFIG" != yes ; then
22145                 as_fn_error "could not locate pkg-config" "$LINENO" 5
22146         fi
22147         WT_INCS=`pkg-config --cflags wiredtiger`
22148         WT_LIBS=`pkg-config --libs wiredtiger`
22149
22150         save_CFLAGS="$CFLAGS"
22151         save_LDFLAGS="$LDFLAGS"
22152         CFLAGS="$WT_INCS"
22153         CPPFLAGS="$WT_INCS"
22154         LDFLAGS="$WT_LIBS"
22155         for ac_header in wiredtiger.h
22156 do :
22157   ac_fn_c_check_header_mongrel "$LINENO" "wiredtiger.h" "ac_cv_header_wiredtiger_h" "$ac_includes_default"
22158 if test "x$ac_cv_header_wiredtiger_h" = x""yes; then :
22159   cat >>confdefs.h <<_ACEOF
22160 #define HAVE_WIREDTIGER_H 1
22161 _ACEOF
22162
22163 fi
22164
22165 done
22166
22167         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wiredtiger_version in -lwiredtiger" >&5
22168 $as_echo_n "checking for wiredtiger_version in -lwiredtiger... " >&6; }
22169 if test "${ac_cv_lib_wiredtiger_wiredtiger_version+set}" = set; then :
22170   $as_echo_n "(cached) " >&6
22171 else
22172   ac_check_lib_save_LIBS=$LIBS
22173 LIBS="-lwiredtiger  $LIBS"
22174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22175 /* end confdefs.h.  */
22176
22177 /* Override any GCC internal prototype to avoid an error.
22178    Use char because int might match the return type of a GCC
22179    builtin and then its argument prototype would still apply.  */
22180 #ifdef __cplusplus
22181 extern "C"
22182 #endif
22183 char wiredtiger_version ();
22184 int
22185 main ()
22186 {
22187 return wiredtiger_version ();
22188   ;
22189   return 0;
22190 }
22191 _ACEOF
22192 if ac_fn_c_try_link "$LINENO"; then :
22193   ac_cv_lib_wiredtiger_wiredtiger_version=yes
22194 else
22195   ac_cv_lib_wiredtiger_wiredtiger_version=no
22196 fi
22197 rm -f core conftest.err conftest.$ac_objext \
22198     conftest$ac_exeext conftest.$ac_ext
22199 LIBS=$ac_check_lib_save_LIBS
22200 fi
22201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wiredtiger_wiredtiger_version" >&5
22202 $as_echo "$ac_cv_lib_wiredtiger_wiredtiger_version" >&6; }
22203 if test "x$ac_cv_lib_wiredtiger_wiredtiger_version" = x""yes; then :
22204   : ok
22205 else
22206
22207                 as_fn_error "could not locate wiredtiger library" "$LINENO" 5
22208
22209 fi
22210
22211         CFLAGS="$save_CFLAGS"
22212         CPPFLAGS="$save_CPPFLAGS"
22213         LDFLAGS="$save_LDFLAGS"
22214         SLAPD_LIBS="$SLAPD_LIBS \$(WT_LIBS)"
22215         ol_link_wt=yes
22216 fi
22217
22218 ol_icu=no
22219 for ac_header in unicode/utypes.h
22220 do :
22221   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22222 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22223 eval as_val=\$$as_ac_Header
22224    if test "x$as_val" = x""yes; then :
22225   cat >>confdefs.h <<_ACEOF
22226 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22227 _ACEOF
22228
22229 fi
22230
22231 done
22232
22233 if test $ac_cv_header_unicode_utypes_h = yes ; then
22234                 OL_ICULIBS="-licuuc -licudata"
22235
22236         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU libraries" >&5
22237 $as_echo_n "checking for ICU libraries... " >&6; }
22238 if test "${ol_cv_lib_icu+set}" = set; then :
22239   $as_echo_n "(cached) " >&6
22240 else
22241
22242                 ol_LIBS="$LIBS"
22243                 LIBS="$OL_ICULIBS $LIBS"
22244                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22245 /* end confdefs.h.  */
22246
22247 #include <unicode/utypes.h>
22248
22249 int
22250 main ()
22251 {
22252
22253 (void) u_errorName(0);
22254
22255   ;
22256   return 0;
22257 }
22258 _ACEOF
22259 if ac_fn_c_try_link "$LINENO"; then :
22260   ol_cv_lib_icu=yes
22261 else
22262   ol_cv_lib_icu=no
22263 fi
22264 rm -f core conftest.err conftest.$ac_objext \
22265     conftest$ac_exeext conftest.$ac_ext
22266                 LIBS="$ol_LIBS"
22267
22268 fi
22269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_icu" >&5
22270 $as_echo "$ol_cv_lib_icu" >&6; }
22271
22272         if test $ol_cv_lib_icu != no ; then
22273                 ol_icu="$OL_ICULIBS"
22274
22275 $as_echo "#define HAVE_ICU 1" >>confdefs.h
22276
22277         fi
22278 fi
22279
22280 if test "$ol_icu" = no ; then
22281         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ICU not available" >&5
22282 $as_echo "$as_me: WARNING: ICU not available" >&2;}
22283 else
22284         ICU_LIBS="$ol_icu"
22285 fi
22286 WITH_SASL=no
22287 ol_link_sasl=no
22288 ol_link_spasswd=no
22289 if test $ol_with_cyrus_sasl != no ; then
22290         for ac_header in sasl/sasl.h sasl.h
22291 do :
22292   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22293 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22294 eval as_val=\$$as_ac_Header
22295    if test "x$as_val" = x""yes; then :
22296   cat >>confdefs.h <<_ACEOF
22297 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22298 _ACEOF
22299
22300 fi
22301
22302 done
22303
22304
22305         if test $ac_cv_header_sasl_sasl_h = yes ||
22306            test $ac_cv_header_sasl_h = yes; then
22307                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
22308 $as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
22309 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then :
22310   $as_echo_n "(cached) " >&6
22311 else
22312   ac_check_lib_save_LIBS=$LIBS
22313 LIBS="-lsasl2  $LIBS"
22314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22315 /* end confdefs.h.  */
22316
22317 /* Override any GCC internal prototype to avoid an error.
22318    Use char because int might match the return type of a GCC
22319    builtin and then its argument prototype would still apply.  */
22320 #ifdef __cplusplus
22321 extern "C"
22322 #endif
22323 char sasl_client_init ();
22324 int
22325 main ()
22326 {
22327 return sasl_client_init ();
22328   ;
22329   return 0;
22330 }
22331 _ACEOF
22332 if ac_fn_c_try_link "$LINENO"; then :
22333   ac_cv_lib_sasl2_sasl_client_init=yes
22334 else
22335   ac_cv_lib_sasl2_sasl_client_init=no
22336 fi
22337 rm -f core conftest.err conftest.$ac_objext \
22338     conftest$ac_exeext conftest.$ac_ext
22339 LIBS=$ac_check_lib_save_LIBS
22340 fi
22341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
22342 $as_echo "$ac_cv_lib_sasl2_sasl_client_init" >&6; }
22343 if test "x$ac_cv_lib_sasl2_sasl_client_init" = x""yes; then :
22344   ol_link_sasl="-lsasl2"
22345 else
22346   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl" >&5
22347 $as_echo_n "checking for sasl_client_init in -lsasl... " >&6; }
22348 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then :
22349   $as_echo_n "(cached) " >&6
22350 else
22351   ac_check_lib_save_LIBS=$LIBS
22352 LIBS="-lsasl  $LIBS"
22353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22354 /* end confdefs.h.  */
22355
22356 /* Override any GCC internal prototype to avoid an error.
22357    Use char because int might match the return type of a GCC
22358    builtin and then its argument prototype would still apply.  */
22359 #ifdef __cplusplus
22360 extern "C"
22361 #endif
22362 char sasl_client_init ();
22363 int
22364 main ()
22365 {
22366 return sasl_client_init ();
22367   ;
22368   return 0;
22369 }
22370 _ACEOF
22371 if ac_fn_c_try_link "$LINENO"; then :
22372   ac_cv_lib_sasl_sasl_client_init=yes
22373 else
22374   ac_cv_lib_sasl_sasl_client_init=no
22375 fi
22376 rm -f core conftest.err conftest.$ac_objext \
22377     conftest$ac_exeext conftest.$ac_ext
22378 LIBS=$ac_check_lib_save_LIBS
22379 fi
22380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl_sasl_client_init" >&5
22381 $as_echo "$ac_cv_lib_sasl_sasl_client_init" >&6; }
22382 if test "x$ac_cv_lib_sasl_sasl_client_init" = x""yes; then :
22383   ol_link_sasl="-lsasl"
22384 fi
22385
22386 fi
22387
22388         fi
22389
22390         if test $ol_link_sasl = no ; then
22391                 if test $ol_with_cyrus_sasl != auto ; then
22392                         as_fn_error "Could not locate Cyrus SASL" "$LINENO" 5
22393                 else
22394                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate Cyrus SASL" >&5
22395 $as_echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
22396                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22397 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22398                         if test $ol_link_tls = no ; then
22399                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22400 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22401                         fi
22402                 fi
22403         else
22404                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Cyrus SASL library version" >&5
22405 $as_echo_n "checking Cyrus SASL library version... " >&6; }
22406 if test "${ol_cv_sasl_compat+set}" = set; then :
22407   $as_echo_n "(cached) " >&6
22408 else
22409
22410         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22411 /* end confdefs.h.  */
22412
22413 #ifdef HAVE_SASL_SASL_H
22414 #include <sasl/sasl.h>
22415 #else
22416 #include <sasl.h>
22417 #endif
22418
22419 /* Require 2.1.15+ */
22420 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22421         char *__sasl_compat = "2.2+ or better okay (we guess)";
22422 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22423         && SASL_VERSION_STEP >=15
22424         char *__sasl_compat = "2.1.15+ or better okay";
22425 #endif
22426
22427 _ACEOF
22428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22429   $EGREP "__sasl_compat" >/dev/null 2>&1; then :
22430   ol_cv_sasl_compat=yes
22431 else
22432   ol_cv_sasl_compat=no
22433 fi
22434 rm -f conftest*
22435
22436 fi
22437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sasl_compat" >&5
22438 $as_echo "$ol_cv_sasl_compat" >&6; }
22439
22440                 if test $ol_cv_sasl_compat = no ; then
22441                         ol_link_sasl=no
22442                         as_fn_error "Cyrus SASL library located but is incompatible" "$LINENO" 5
22443                 fi
22444
22445
22446 $as_echo "#define HAVE_CYRUS_SASL 1" >>confdefs.h
22447
22448                 SASL_LIBS="$ol_link_sasl"
22449                 if test $ol_enable_spasswd != no ; then
22450                         ol_link_spasswd=yes
22451                 fi
22452
22453                 ac_save_LIBS="$LIBS"
22454                 LIBS="$LIBS $ol_link_sasl"
22455                 ac_fn_c_check_func "$LINENO" "sasl_version" "ac_cv_func_sasl_version"
22456 if test "x$ac_cv_func_sasl_version" = x""yes; then :
22457
22458 $as_echo "#define HAVE_SASL_VERSION 1" >>confdefs.h
22459
22460 fi
22461
22462                 LIBS="$ac_save_LIBS"
22463
22464                 WITH_SASL=yes
22465         fi
22466
22467 else
22468         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22469 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22470         if test $ol_link_tls = no ; then
22471                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22472 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22473         fi
22474 fi
22475
22476 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
22477         dev=no
22478         if test -r /dev/urandom ; then
22479                 dev="/dev/urandom";
22480         elif test -r /idev/urandom ; then
22481                 dev="/idev/urandom";
22482         elif test -r /dev/srandom ; then
22483                 dev="/dev/srandom";
22484         elif test -r /dev/random ; then
22485                 dev="/dev/random";
22486         elif test -r /idev/random ; then
22487                 dev="/idev/random";
22488         fi
22489
22490         if test $dev != no ; then
22491
22492 cat >>confdefs.h <<_ACEOF
22493 #define URANDOM_DEVICE "$dev"
22494 _ACEOF
22495
22496         fi
22497 fi
22498
22499 ol_link_fetch=no
22500 if test $ol_with_fetch != no ; then
22501         ol_LIBS=$LIBS
22502 LIBS="-lfetch -lcom_err $LIBS"
22503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking fetch(3) library" >&5
22504 $as_echo_n "checking fetch(3) library... " >&6; }
22505 if test "${ol_cv_lib_fetch+set}" = set; then :
22506   $as_echo_n "(cached) " >&6
22507 else
22508
22509         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22510 /* end confdefs.h.  */
22511
22512 #ifdef HAVE_SYS_PARAM_H
22513 #include <sys/param.h>
22514 #endif
22515 #include <stdio.h>
22516 #include <fetch.h>
22517 int
22518 main ()
22519 {
22520 struct url *u = fetchParseURL("file:///");
22521   ;
22522   return 0;
22523 }
22524 _ACEOF
22525 if ac_fn_c_try_link "$LINENO"; then :
22526   ol_cv_lib_fetch=yes
22527 else
22528   ol_cv_lib_fetch=no
22529 fi
22530 rm -f core conftest.err conftest.$ac_objext \
22531     conftest$ac_exeext conftest.$ac_ext
22532 fi
22533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_fetch" >&5
22534 $as_echo "$ol_cv_lib_fetch" >&6; }
22535 LIBS=$ol_LIBS
22536 if test $ol_cv_lib_fetch != no ; then
22537         ol_link_fetch="-lfetch -lcom_err"
22538
22539 $as_echo "#define HAVE_FETCH 1" >>confdefs.h
22540
22541 fi
22542
22543
22544         if test $ol_cv_lib_fetch != no ; then
22545                 LIBS="$LIBS $ol_link_fetch"
22546                 ol_link_fetch=freebsd
22547
22548         elif test $ol_with_fetch != auto ; then
22549                 as_fn_error "no suitable API for --with-fetch=$ol_with_fetch" "$LINENO" 5
22550         fi
22551 fi
22552
22553 if test $ol_enable_crypt != no ; then
22554         save_LIBS="$LIBS"
22555         LIBS="$TLS_LIBS $LIBS"
22556
22557         ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
22558 if test "x$ac_cv_func_crypt" = x""yes; then :
22559   have_crypt=yes
22560 else
22561
22562                 LIBS="$save_LIBS"
22563                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
22564 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
22565 if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
22566   $as_echo_n "(cached) " >&6
22567 else
22568   ac_check_lib_save_LIBS=$LIBS
22569 LIBS="-lcrypt  $LIBS"
22570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22571 /* end confdefs.h.  */
22572
22573 /* Override any GCC internal prototype to avoid an error.
22574    Use char because int might match the return type of a GCC
22575    builtin and then its argument prototype would still apply.  */
22576 #ifdef __cplusplus
22577 extern "C"
22578 #endif
22579 char crypt ();
22580 int
22581 main ()
22582 {
22583 return crypt ();
22584   ;
22585   return 0;
22586 }
22587 _ACEOF
22588 if ac_fn_c_try_link "$LINENO"; then :
22589   ac_cv_lib_crypt_crypt=yes
22590 else
22591   ac_cv_lib_crypt_crypt=no
22592 fi
22593 rm -f core conftest.err conftest.$ac_objext \
22594     conftest$ac_exeext conftest.$ac_ext
22595 LIBS=$ac_check_lib_save_LIBS
22596 fi
22597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
22598 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
22599 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
22600   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22601                         have_crypt=yes
22602 else
22603   have_crypt=no
22604 fi
22605
22606 fi
22607
22608
22609         LIBS="$TLS_LIBS $LIBS"
22610         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt_r in -lcrypt" >&5
22611 $as_echo_n "checking for crypt_r in -lcrypt... " >&6; }
22612 if test "${ac_cv_lib_crypt_crypt_r+set}" = set; then :
22613   $as_echo_n "(cached) " >&6
22614 else
22615   ac_check_lib_save_LIBS=$LIBS
22616 LIBS="-lcrypt  $LIBS"
22617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22618 /* end confdefs.h.  */
22619
22620 /* Override any GCC internal prototype to avoid an error.
22621    Use char because int might match the return type of a GCC
22622    builtin and then its argument prototype would still apply.  */
22623 #ifdef __cplusplus
22624 extern "C"
22625 #endif
22626 char crypt_r ();
22627 int
22628 main ()
22629 {
22630 return crypt_r ();
22631   ;
22632   return 0;
22633 }
22634 _ACEOF
22635 if ac_fn_c_try_link "$LINENO"; then :
22636   ac_cv_lib_crypt_crypt_r=yes
22637 else
22638   ac_cv_lib_crypt_crypt_r=no
22639 fi
22640 rm -f core conftest.err conftest.$ac_objext \
22641     conftest$ac_exeext conftest.$ac_ext
22642 LIBS=$ac_check_lib_save_LIBS
22643 fi
22644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt_r" >&5
22645 $as_echo "$ac_cv_lib_crypt_crypt_r" >&6; }
22646 if test "x$ac_cv_lib_crypt_crypt_r" = x""yes; then :
22647   have_crypt_r=yes
22648 else
22649   have_crypt_r=no
22650 fi
22651
22652
22653         LIBS="$save_LIBS"
22654
22655         if test $have_crypt = yes ; then
22656
22657 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
22658
22659                 if test $have_crypt_r = yes ; then
22660
22661 $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
22662
22663                 fi
22664         else
22665                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find crypt" >&5
22666 $as_echo "$as_me: WARNING: could not find crypt" >&2;}
22667                 if test $ol_enable_crypt = yes ; then
22668                         as_fn_error "could not find crypt, select appropriate options or disable" "$LINENO" 5
22669                 fi
22670
22671                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling crypt support" >&5
22672 $as_echo "$as_me: WARNING: disabling crypt support" >&2;}
22673                 ol_enable_crypt=no
22674         fi
22675 fi
22676
22677 if test $ol_enable_proctitle != no ; then
22678         ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
22679 if test "x$ac_cv_func_setproctitle" = x""yes; then :
22680   have_setproctitle=yes
22681 else
22682
22683                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5
22684 $as_echo_n "checking for setproctitle in -lutil... " >&6; }
22685 if test "${ac_cv_lib_util_setproctitle+set}" = set; then :
22686   $as_echo_n "(cached) " >&6
22687 else
22688   ac_check_lib_save_LIBS=$LIBS
22689 LIBS="-lutil  $LIBS"
22690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22691 /* end confdefs.h.  */
22692
22693 /* Override any GCC internal prototype to avoid an error.
22694    Use char because int might match the return type of a GCC
22695    builtin and then its argument prototype would still apply.  */
22696 #ifdef __cplusplus
22697 extern "C"
22698 #endif
22699 char setproctitle ();
22700 int
22701 main ()
22702 {
22703 return setproctitle ();
22704   ;
22705   return 0;
22706 }
22707 _ACEOF
22708 if ac_fn_c_try_link "$LINENO"; then :
22709   ac_cv_lib_util_setproctitle=yes
22710 else
22711   ac_cv_lib_util_setproctitle=no
22712 fi
22713 rm -f core conftest.err conftest.$ac_objext \
22714     conftest$ac_exeext conftest.$ac_ext
22715 LIBS=$ac_check_lib_save_LIBS
22716 fi
22717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_setproctitle" >&5
22718 $as_echo "$ac_cv_lib_util_setproctitle" >&6; }
22719 if test "x$ac_cv_lib_util_setproctitle" = x""yes; then :
22720   have_setproctitle=yes
22721                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22722 else
22723   have_setproctitle=no
22724                         case " $LIBOBJS " in
22725   *" setproctitle.$ac_objext "* ) ;;
22726   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
22727  ;;
22728 esac
22729
22730                         LIBSRCS="$LIBSRCS setproctitle.c"
22731 fi
22732
22733 fi
22734
22735
22736         if test $have_setproctitle = yes ; then
22737
22738 $as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h
22739
22740         fi
22741 fi
22742
22743 if test $ol_enable_slp != no ; then
22744         for ac_header in slp.h
22745 do :
22746   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22747 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22748 eval as_val=\$$as_ac_Header
22749    if test "x$as_val" = x""yes; then :
22750   cat >>confdefs.h <<_ACEOF
22751 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22752 _ACEOF
22753
22754 fi
22755
22756 done
22757
22758
22759         if test $ac_cv_header_slp_h = yes ; then
22760                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLPOpen in -lslp" >&5
22761 $as_echo_n "checking for SLPOpen in -lslp... " >&6; }
22762 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then :
22763   $as_echo_n "(cached) " >&6
22764 else
22765   ac_check_lib_save_LIBS=$LIBS
22766 LIBS="-lslp  $LIBS"
22767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22768 /* end confdefs.h.  */
22769
22770 /* Override any GCC internal prototype to avoid an error.
22771    Use char because int might match the return type of a GCC
22772    builtin and then its argument prototype would still apply.  */
22773 #ifdef __cplusplus
22774 extern "C"
22775 #endif
22776 char SLPOpen ();
22777 int
22778 main ()
22779 {
22780 return SLPOpen ();
22781   ;
22782   return 0;
22783 }
22784 _ACEOF
22785 if ac_fn_c_try_link "$LINENO"; then :
22786   ac_cv_lib_slp_SLPOpen=yes
22787 else
22788   ac_cv_lib_slp_SLPOpen=no
22789 fi
22790 rm -f core conftest.err conftest.$ac_objext \
22791     conftest$ac_exeext conftest.$ac_ext
22792 LIBS=$ac_check_lib_save_LIBS
22793 fi
22794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slp_SLPOpen" >&5
22795 $as_echo "$ac_cv_lib_slp_SLPOpen" >&6; }
22796 if test "x$ac_cv_lib_slp_SLPOpen" = x""yes; then :
22797   have_slp=yes
22798 else
22799   have_slp=no
22800 fi
22801
22802                 if test $have_slp = yes ; then
22803
22804 $as_echo "#define HAVE_SLP 1" >>confdefs.h
22805
22806                         SLAPD_SLP_LIBS=-lslp
22807                 fi
22808
22809         elif test $ol_enable_slp = yes ; then
22810                 as_fn_error "SLP not found" "$LINENO" 5
22811         fi
22812 fi
22813
22814
22815 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
22816 if test "x$ac_cv_type_mode_t" = x""yes; then :
22817
22818 else
22819
22820 cat >>confdefs.h <<_ACEOF
22821 #define mode_t int
22822 _ACEOF
22823
22824 fi
22825
22826 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
22827 if test "x$ac_cv_type_off_t" = x""yes; then :
22828
22829 else
22830
22831 cat >>confdefs.h <<_ACEOF
22832 #define off_t long
22833 _ACEOF
22834
22835 fi
22836
22837 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
22838 if test "x$ac_cv_type_pid_t" = x""yes; then :
22839
22840 else
22841
22842 cat >>confdefs.h <<_ACEOF
22843 #define pid_t int
22844 _ACEOF
22845
22846 fi
22847
22848 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
22849 if test "x$ac_cv_type_ssize_t" = x""yes; then :
22850
22851 else
22852
22853 cat >>confdefs.h <<_ACEOF
22854 #define ssize_t signed int
22855 _ACEOF
22856
22857 fi
22858
22859 ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
22860 if test "x$ac_cv_type_caddr_t" = x""yes; then :
22861
22862 else
22863
22864 cat >>confdefs.h <<_ACEOF
22865 #define caddr_t char *
22866 _ACEOF
22867
22868 fi
22869
22870 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
22871 if test "x$ac_cv_type_size_t" = x""yes; then :
22872
22873 else
22874
22875 cat >>confdefs.h <<_ACEOF
22876 #define size_t unsigned
22877 _ACEOF
22878
22879 fi
22880
22881
22882 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
22883 if test "x$ac_cv_type_long_long" = x""yes; then :
22884
22885 cat >>confdefs.h <<_ACEOF
22886 #define HAVE_LONG_LONG 1
22887 _ACEOF
22888
22889
22890 fi
22891
22892 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
22893 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
22894
22895 cat >>confdefs.h <<_ACEOF
22896 #define HAVE_PTRDIFF_T 1
22897 _ACEOF
22898
22899
22900 fi
22901
22902
22903
22904 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default
22905 #ifdef HAVE_SYS_SOCKET_H
22906 #include <sys/socket.h>
22907 #endif
22908 "
22909 if test "x$ac_cv_type_socklen_t" = x""yes; then :
22910
22911 fi
22912
22913
22914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the type of arg 3 to accept()" >&5
22915 $as_echo_n "checking the type of arg 3 to accept()... " >&6; }
22916 if test "${ol_cv_type_ber_socklen_t+set}" = set; then :
22917   $as_echo_n "(cached) " >&6
22918 else
22919
22920         set socklen_t int unsigned "unsigned long" long size_t
22921         test "$ac_cv_type_socklen_t" = yes || shift
22922         ol_cv_type_ber_socklen_t=$1 guessing="guessing "
22923         for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
22924                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22925 /* end confdefs.h.  */
22926 $ac_includes_default
22927 #ifdef HAVE_SYS_SOCKET_H
22928 #include <sys/socket.h>
22929 #endif
22930 extern int accept(int s, $addrtype *ap, $lentype *lp);
22931
22932 int
22933 main ()
22934 {
22935
22936 accept(0, (struct sockaddr *) 0, ($lentype *) 0);
22937
22938   ;
22939   return 0;
22940 }
22941 _ACEOF
22942 if ac_fn_c_try_compile "$LINENO"; then :
22943   ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
22944 fi
22945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22946         done ; done
22947 fi
22948
22949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
22950 $as_echo "$guessing$ol_cv_type_ber_socklen_t *" >&6; }
22951
22952 cat >>confdefs.h <<_ACEOF
22953 #define ber_socklen_t $ol_cv_type_ber_socklen_t
22954 _ACEOF
22955
22956
22957 if test "$ac_cv_type_socklen_t" != yes; then
22958
22959 cat >>confdefs.h <<_ACEOF
22960 #define socklen_t $ol_cv_type_ber_socklen_t
22961 _ACEOF
22962
22963 fi
22964
22965
22966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
22967 $as_echo_n "checking return type of signal handlers... " >&6; }
22968 if test "${ac_cv_type_signal+set}" = set; then :
22969   $as_echo_n "(cached) " >&6
22970 else
22971   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22972 /* end confdefs.h.  */
22973 #include <sys/types.h>
22974 #include <signal.h>
22975
22976 int
22977 main ()
22978 {
22979 return *(signal (0, 0)) (0) == 1;
22980   ;
22981   return 0;
22982 }
22983 _ACEOF
22984 if ac_fn_c_try_compile "$LINENO"; then :
22985   ac_cv_type_signal=int
22986 else
22987   ac_cv_type_signal=void
22988 fi
22989 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22990 fi
22991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
22992 $as_echo "$ac_cv_type_signal" >&6; }
22993
22994 cat >>confdefs.h <<_ACEOF
22995 #define RETSIGTYPE $ac_cv_type_signal
22996 _ACEOF
22997
22998
22999
23000 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default
23001 #include <signal.h>
23002
23003 "
23004 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
23005
23006 else
23007
23008 cat >>confdefs.h <<_ACEOF
23009 #define sig_atomic_t int
23010 _ACEOF
23011
23012 fi
23013
23014
23015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
23016 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
23017 if test "${ac_cv_type_uid_t+set}" = set; then :
23018   $as_echo_n "(cached) " >&6
23019 else
23020   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23021 /* end confdefs.h.  */
23022 #include <sys/types.h>
23023
23024 _ACEOF
23025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23026   $EGREP "uid_t" >/dev/null 2>&1; then :
23027   ac_cv_type_uid_t=yes
23028 else
23029   ac_cv_type_uid_t=no
23030 fi
23031 rm -f conftest*
23032
23033 fi
23034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
23035 $as_echo "$ac_cv_type_uid_t" >&6; }
23036 if test $ac_cv_type_uid_t = no; then
23037
23038 $as_echo "#define uid_t int" >>confdefs.h
23039
23040
23041 $as_echo "#define gid_t int" >>confdefs.h
23042
23043 fi
23044
23045
23046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
23047 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
23048 if test "${ac_cv_header_time+set}" = set; then :
23049   $as_echo_n "(cached) " >&6
23050 else
23051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23052 /* end confdefs.h.  */
23053 #include <sys/types.h>
23054 #include <sys/time.h>
23055 #include <time.h>
23056
23057 int
23058 main ()
23059 {
23060 if ((struct tm *) 0)
23061 return 0;
23062   ;
23063   return 0;
23064 }
23065 _ACEOF
23066 if ac_fn_c_try_compile "$LINENO"; then :
23067   ac_cv_header_time=yes
23068 else
23069   ac_cv_header_time=no
23070 fi
23071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23072 fi
23073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
23074 $as_echo "$ac_cv_header_time" >&6; }
23075 if test $ac_cv_header_time = yes; then
23076
23077 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
23078
23079 fi
23080
23081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
23082 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
23083 if test "${ac_cv_struct_tm+set}" = set; then :
23084   $as_echo_n "(cached) " >&6
23085 else
23086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23087 /* end confdefs.h.  */
23088 #include <sys/types.h>
23089 #include <time.h>
23090
23091 int
23092 main ()
23093 {
23094 struct tm tm;
23095                                      int *p = &tm.tm_sec;
23096                                      return !p;
23097   ;
23098   return 0;
23099 }
23100 _ACEOF
23101 if ac_fn_c_try_compile "$LINENO"; then :
23102   ac_cv_struct_tm=time.h
23103 else
23104   ac_cv_struct_tm=sys/time.h
23105 fi
23106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23107 fi
23108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
23109 $as_echo "$ac_cv_struct_tm" >&6; }
23110 if test $ac_cv_struct_tm = sys/time.h; then
23111
23112 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
23113
23114 fi
23115
23116 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
23117 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
23118
23119 cat >>confdefs.h <<_ACEOF
23120 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
23121 _ACEOF
23122
23123
23124 fi
23125
23126 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "$ac_includes_default
23127 #include <pwd.h>
23128 "
23129 if test "x$ac_cv_member_struct_passwd_pw_gecos" = x""yes; then :
23130
23131 cat >>confdefs.h <<_ACEOF
23132 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
23133 _ACEOF
23134
23135
23136 fi
23137
23138 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "$ac_includes_default
23139 #include <pwd.h>
23140 "
23141 if test "x$ac_cv_member_struct_passwd_pw_passwd" = x""yes; then :
23142
23143 cat >>confdefs.h <<_ACEOF
23144 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
23145 _ACEOF
23146
23147
23148 fi
23149
23150
23151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if toupper() requires islower()" >&5
23152 $as_echo_n "checking if toupper() requires islower()... " >&6; }
23153 if test "${ol_cv_c_upper_lower+set}" = set; then :
23154   $as_echo_n "(cached) " >&6
23155 else
23156
23157         if test "$cross_compiling" = yes; then :
23158   ol_cv_c_upper_lower=safe
23159 else
23160   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23161 /* end confdefs.h.  */
23162
23163 #include <ctype.h>
23164 main()
23165 {
23166         if ('C' == toupper('C'))
23167                 exit(0);
23168         else
23169                 exit(1);
23170 }
23171 _ACEOF
23172 if ac_fn_c_try_run "$LINENO"; then :
23173   ol_cv_c_upper_lower=no
23174 else
23175   ol_cv_c_upper_lower=yes
23176 fi
23177 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23178   conftest.$ac_objext conftest.beam conftest.$ac_ext
23179 fi
23180
23181 fi
23182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_upper_lower" >&5
23183 $as_echo "$ol_cv_c_upper_lower" >&6; }
23184 if test $ol_cv_c_upper_lower != no ; then
23185
23186 $as_echo "#define C_UPPER_LOWER 1" >>confdefs.h
23187
23188 fi
23189
23190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
23191 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
23192 if test "${ac_cv_c_const+set}" = set; then :
23193   $as_echo_n "(cached) " >&6
23194 else
23195   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23196 /* end confdefs.h.  */
23197
23198 int
23199 main ()
23200 {
23201 /* FIXME: Include the comments suggested by Paul. */
23202 #ifndef __cplusplus
23203   /* Ultrix mips cc rejects this.  */
23204   typedef int charset[2];
23205   const charset cs;
23206   /* SunOS 4.1.1 cc rejects this.  */
23207   char const *const *pcpcc;
23208   char **ppc;
23209   /* NEC SVR4.0.2 mips cc rejects this.  */
23210   struct point {int x, y;};
23211   static struct point const zero = {0,0};
23212   /* AIX XL C 1.02.0.0 rejects this.
23213      It does not let you subtract one const X* pointer from another in
23214      an arm of an if-expression whose if-part is not a constant
23215      expression */
23216   const char *g = "string";
23217   pcpcc = &g + (g ? g-g : 0);
23218   /* HPUX 7.0 cc rejects these. */
23219   ++pcpcc;
23220   ppc = (char**) pcpcc;
23221   pcpcc = (char const *const *) ppc;
23222   { /* SCO 3.2v4 cc rejects this.  */
23223     char *t;
23224     char const *s = 0 ? (char *) 0 : (char const *) 0;
23225
23226     *t++ = 0;
23227     if (s) return 0;
23228   }
23229   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
23230     int x[] = {25, 17};
23231     const int *foo = &x[0];
23232     ++foo;
23233   }
23234   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
23235     typedef const int *iptr;
23236     iptr p = 0;
23237     ++p;
23238   }
23239   { /* AIX XL C 1.02.0.0 rejects this saying
23240        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
23241     struct s { int j; const int *ap[3]; };
23242     struct s *b; b->j = 5;
23243   }
23244   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
23245     const int foo = 10;
23246     if (!foo) return 0;
23247   }
23248   return !cs[0] && !zero.x;
23249 #endif
23250
23251   ;
23252   return 0;
23253 }
23254 _ACEOF
23255 if ac_fn_c_try_compile "$LINENO"; then :
23256   ac_cv_c_const=yes
23257 else
23258   ac_cv_c_const=no
23259 fi
23260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23261 fi
23262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
23263 $as_echo "$ac_cv_c_const" >&6; }
23264 if test $ac_cv_c_const = no; then
23265
23266 $as_echo "#define const /**/" >>confdefs.h
23267
23268 fi
23269
23270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler understands volatile" >&5
23271 $as_echo_n "checking if compiler understands volatile... " >&6; }
23272 if test "${ol_cv_c_volatile+set}" = set; then :
23273   $as_echo_n "(cached) " >&6
23274 else
23275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23276 /* end confdefs.h.  */
23277 int x, y, z;
23278 int
23279 main ()
23280 {
23281 volatile int a; int * volatile b = x ? &y : &z;
23282       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
23283       *b = 0;
23284   ;
23285   return 0;
23286 }
23287 _ACEOF
23288 if ac_fn_c_try_compile "$LINENO"; then :
23289   ol_cv_c_volatile=yes
23290 else
23291   ol_cv_c_volatile=no
23292 fi
23293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23294 fi
23295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_volatile" >&5
23296 $as_echo "$ol_cv_c_volatile" >&6; }
23297   if test $ol_cv_c_volatile = yes; then
23298     :
23299   else
23300
23301 $as_echo "#define volatile /**/" >>confdefs.h
23302
23303   fi
23304
23305
23306 if test $cross_compiling = yes ; then
23307         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Crossing compiling... all bets are off!" >&5
23308 $as_echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
23309
23310 $as_echo "#define CROSS_COMPILING 1" >>confdefs.h
23311
23312 else
23313          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
23314 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
23315 if test "${ac_cv_c_bigendian+set}" = set; then :
23316   $as_echo_n "(cached) " >&6
23317 else
23318   ac_cv_c_bigendian=unknown
23319     # See if we're dealing with a universal compiler.
23320     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23321 /* end confdefs.h.  */
23322 #ifndef __APPLE_CC__
23323                not a universal capable compiler
23324              #endif
23325              typedef int dummy;
23326
23327 _ACEOF
23328 if ac_fn_c_try_compile "$LINENO"; then :
23329
23330         # Check for potential -arch flags.  It is not universal unless
23331         # there are at least two -arch flags with different values.
23332         ac_arch=
23333         ac_prev=
23334         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
23335          if test -n "$ac_prev"; then
23336            case $ac_word in
23337              i?86 | x86_64 | ppc | ppc64)
23338                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
23339                  ac_arch=$ac_word
23340                else
23341                  ac_cv_c_bigendian=universal
23342                  break
23343                fi
23344                ;;
23345            esac
23346            ac_prev=
23347          elif test "x$ac_word" = "x-arch"; then
23348            ac_prev=arch
23349          fi
23350        done
23351 fi
23352 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23353     if test $ac_cv_c_bigendian = unknown; then
23354       # See if sys/param.h defines the BYTE_ORDER macro.
23355       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23356 /* end confdefs.h.  */
23357 #include <sys/types.h>
23358              #include <sys/param.h>
23359
23360 int
23361 main ()
23362 {
23363 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23364                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23365                      && LITTLE_ENDIAN)
23366               bogus endian macros
23367              #endif
23368
23369   ;
23370   return 0;
23371 }
23372 _ACEOF
23373 if ac_fn_c_try_compile "$LINENO"; then :
23374   # It does; now see whether it defined to BIG_ENDIAN or not.
23375          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23376 /* end confdefs.h.  */
23377 #include <sys/types.h>
23378                 #include <sys/param.h>
23379
23380 int
23381 main ()
23382 {
23383 #if BYTE_ORDER != BIG_ENDIAN
23384                  not big endian
23385                 #endif
23386
23387   ;
23388   return 0;
23389 }
23390 _ACEOF
23391 if ac_fn_c_try_compile "$LINENO"; then :
23392   ac_cv_c_bigendian=yes
23393 else
23394   ac_cv_c_bigendian=no
23395 fi
23396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23397 fi
23398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23399     fi
23400     if test $ac_cv_c_bigendian = unknown; then
23401       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23402       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23403 /* end confdefs.h.  */
23404 #include <limits.h>
23405
23406 int
23407 main ()
23408 {
23409 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23410               bogus endian macros
23411              #endif
23412
23413   ;
23414   return 0;
23415 }
23416 _ACEOF
23417 if ac_fn_c_try_compile "$LINENO"; then :
23418   # It does; now see whether it defined to _BIG_ENDIAN or not.
23419          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23420 /* end confdefs.h.  */
23421 #include <limits.h>
23422
23423 int
23424 main ()
23425 {
23426 #ifndef _BIG_ENDIAN
23427                  not big endian
23428                 #endif
23429
23430   ;
23431   return 0;
23432 }
23433 _ACEOF
23434 if ac_fn_c_try_compile "$LINENO"; then :
23435   ac_cv_c_bigendian=yes
23436 else
23437   ac_cv_c_bigendian=no
23438 fi
23439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23440 fi
23441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23442     fi
23443     if test $ac_cv_c_bigendian = unknown; then
23444       # Compile a test program.
23445       if test "$cross_compiling" = yes; then :
23446   # Try to guess by grepping values from an object file.
23447          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23448 /* end confdefs.h.  */
23449 short int ascii_mm[] =
23450                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23451                 short int ascii_ii[] =
23452                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23453                 int use_ascii (int i) {
23454                   return ascii_mm[i] + ascii_ii[i];
23455                 }
23456                 short int ebcdic_ii[] =
23457                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23458                 short int ebcdic_mm[] =
23459                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23460                 int use_ebcdic (int i) {
23461                   return ebcdic_mm[i] + ebcdic_ii[i];
23462                 }
23463                 extern int foo;
23464
23465 int
23466 main ()
23467 {
23468 return use_ascii (foo) == use_ebcdic (foo);
23469   ;
23470   return 0;
23471 }
23472 _ACEOF
23473 if ac_fn_c_try_compile "$LINENO"; then :
23474   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
23475               ac_cv_c_bigendian=yes
23476             fi
23477             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23478               if test "$ac_cv_c_bigendian" = unknown; then
23479                 ac_cv_c_bigendian=no
23480               else
23481                 # finding both strings is unlikely to happen, but who knows?
23482                 ac_cv_c_bigendian=unknown
23483               fi
23484             fi
23485 fi
23486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23487 else
23488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23489 /* end confdefs.h.  */
23490 $ac_includes_default
23491 int
23492 main ()
23493 {
23494
23495              /* Are we little or big endian?  From Harbison&Steele.  */
23496              union
23497              {
23498                long int l;
23499                char c[sizeof (long int)];
23500              } u;
23501              u.l = 1;
23502              return u.c[sizeof (long int) - 1] == 1;
23503
23504   ;
23505   return 0;
23506 }
23507 _ACEOF
23508 if ac_fn_c_try_run "$LINENO"; then :
23509   ac_cv_c_bigendian=no
23510 else
23511   ac_cv_c_bigendian=yes
23512 fi
23513 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23514   conftest.$ac_objext conftest.beam conftest.$ac_ext
23515 fi
23516
23517     fi
23518 fi
23519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
23520 $as_echo "$ac_cv_c_bigendian" >&6; }
23521  case $ac_cv_c_bigendian in #(
23522    yes)
23523      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
23524 ;; #(
23525    no)
23526       ;; #(
23527    universal)
23528
23529 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
23530
23531      ;; #(
23532    *)
23533      as_fn_error "unknown endianness
23534  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
23535  esac
23536
23537 fi
23538
23539 # The cast to long int works around a bug in the HP C Compiler
23540 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23541 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23542 # This bug is HP SR number 8606223364.
23543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23544 $as_echo_n "checking size of short... " >&6; }
23545 if test "${ac_cv_sizeof_short+set}" = set; then :
23546   $as_echo_n "(cached) " >&6
23547 else
23548   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23549
23550 else
23551   if test "$ac_cv_type_short" = yes; then
23552      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23553 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23554 { as_fn_set_status 77
23555 as_fn_error "cannot compute sizeof (short)
23556 See \`config.log' for more details." "$LINENO" 5; }; }
23557    else
23558      ac_cv_sizeof_short=0
23559    fi
23560 fi
23561
23562 fi
23563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23564 $as_echo "$ac_cv_sizeof_short" >&6; }
23565
23566
23567
23568 cat >>confdefs.h <<_ACEOF
23569 #define SIZEOF_SHORT $ac_cv_sizeof_short
23570 _ACEOF
23571
23572
23573 # The cast to long int works around a bug in the HP C Compiler
23574 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23575 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23576 # This bug is HP SR number 8606223364.
23577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23578 $as_echo_n "checking size of int... " >&6; }
23579 if test "${ac_cv_sizeof_int+set}" = set; then :
23580   $as_echo_n "(cached) " >&6
23581 else
23582   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23583
23584 else
23585   if test "$ac_cv_type_int" = yes; then
23586      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23587 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23588 { as_fn_set_status 77
23589 as_fn_error "cannot compute sizeof (int)
23590 See \`config.log' for more details." "$LINENO" 5; }; }
23591    else
23592      ac_cv_sizeof_int=0
23593    fi
23594 fi
23595
23596 fi
23597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23598 $as_echo "$ac_cv_sizeof_int" >&6; }
23599
23600
23601
23602 cat >>confdefs.h <<_ACEOF
23603 #define SIZEOF_INT $ac_cv_sizeof_int
23604 _ACEOF
23605
23606
23607 # The cast to long int works around a bug in the HP C Compiler
23608 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23609 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23610 # This bug is HP SR number 8606223364.
23611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23612 $as_echo_n "checking size of long... " >&6; }
23613 if test "${ac_cv_sizeof_long+set}" = set; then :
23614   $as_echo_n "(cached) " >&6
23615 else
23616   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23617
23618 else
23619   if test "$ac_cv_type_long" = yes; then
23620      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23621 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23622 { as_fn_set_status 77
23623 as_fn_error "cannot compute sizeof (long)
23624 See \`config.log' for more details." "$LINENO" 5; }; }
23625    else
23626      ac_cv_sizeof_long=0
23627    fi
23628 fi
23629
23630 fi
23631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23632 $as_echo "$ac_cv_sizeof_long" >&6; }
23633
23634
23635
23636 cat >>confdefs.h <<_ACEOF
23637 #define SIZEOF_LONG $ac_cv_sizeof_long
23638 _ACEOF
23639
23640
23641 # The cast to long int works around a bug in the HP C Compiler
23642 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23643 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23644 # This bug is HP SR number 8606223364.
23645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
23646 $as_echo_n "checking size of long long... " >&6; }
23647 if test "${ac_cv_sizeof_long_long+set}" = set; then :
23648   $as_echo_n "(cached) " >&6
23649 else
23650   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
23651
23652 else
23653   if test "$ac_cv_type_long_long" = yes; then
23654      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23655 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23656 { as_fn_set_status 77
23657 as_fn_error "cannot compute sizeof (long long)
23658 See \`config.log' for more details." "$LINENO" 5; }; }
23659    else
23660      ac_cv_sizeof_long_long=0
23661    fi
23662 fi
23663
23664 fi
23665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
23666 $as_echo "$ac_cv_sizeof_long_long" >&6; }
23667
23668
23669
23670 cat >>confdefs.h <<_ACEOF
23671 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
23672 _ACEOF
23673
23674
23675 # The cast to long int works around a bug in the HP C Compiler
23676 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23677 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23678 # This bug is HP SR number 8606223364.
23679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
23680 $as_echo_n "checking size of wchar_t... " >&6; }
23681 if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
23682   $as_echo_n "(cached) " >&6
23683 else
23684   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "$ac_includes_default"; then :
23685
23686 else
23687   if test "$ac_cv_type_wchar_t" = yes; then
23688      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23689 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23690 { as_fn_set_status 77
23691 as_fn_error "cannot compute sizeof (wchar_t)
23692 See \`config.log' for more details." "$LINENO" 5; }; }
23693    else
23694      ac_cv_sizeof_wchar_t=0
23695    fi
23696 fi
23697
23698 fi
23699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
23700 $as_echo "$ac_cv_sizeof_wchar_t" >&6; }
23701
23702
23703
23704 cat >>confdefs.h <<_ACEOF
23705 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23706 _ACEOF
23707
23708
23709
23710 if test "$ac_cv_sizeof_int" -lt 4 ; then
23711         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
23712 $as_echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
23713
23714
23715 $as_echo "#define LBER_INT_T long" >>confdefs.h
23716
23717 else
23718
23719 $as_echo "#define LBER_INT_T int" >>confdefs.h
23720
23721 fi
23722
23723
23724 $as_echo "#define LBER_LEN_T long" >>confdefs.h
23725
23726
23727 $as_echo "#define LBER_SOCKET_T int" >>confdefs.h
23728
23729
23730 $as_echo "#define LBER_TAG_T long" >>confdefs.h
23731
23732
23733 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
23734         if test $ac_cv_sizeof_long_long -gt 4 ; then
23735                 ol_with_mp=longlong
23736
23737 $as_echo "#define USE_MP_LONG_LONG 1" >>confdefs.h
23738
23739         elif test $ol_with_mp = longlong ; then
23740                 as_fn_error "long long unusable for multiple precision" "$LINENO" 5
23741         fi
23742 fi
23743 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
23744         if test $ac_cv_sizeof_long -gt 4 ; then
23745                 ol_with_mp=long
23746
23747 $as_echo "#define USE_MP_LONG 1" >>confdefs.h
23748
23749         elif test $ol_with_mp = long ; then
23750                 as_fn_error "long unusable for multiple precision" "$LINENO" 5
23751         fi
23752 fi
23753 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
23754         for ac_header in openssl/bn.h
23755 do :
23756   ac_fn_c_check_header_mongrel "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default"
23757 if test "x$ac_cv_header_openssl_bn_h" = x""yes; then :
23758   cat >>confdefs.h <<_ACEOF
23759 #define HAVE_OPENSSL_BN_H 1
23760 _ACEOF
23761
23762 fi
23763
23764 done
23765
23766         for ac_header in openssl/crypto.h
23767 do :
23768   ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
23769 if test "x$ac_cv_header_openssl_crypto_h" = x""yes; then :
23770   cat >>confdefs.h <<_ACEOF
23771 #define HAVE_OPENSSL_CRYPTO_H 1
23772 _ACEOF
23773
23774 fi
23775
23776 done
23777
23778         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
23779                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
23780                 test "$ol_with_tls" = "found" ; then
23781                 ol_with_mp=bignum
23782
23783 $as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h
23784
23785         elif test $ol_with_mp = bignum ; then
23786                 as_fn_error "bignum not available" "$LINENO" 5
23787         fi
23788 fi
23789 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
23790         for ac_header in gmp.h
23791 do :
23792   ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
23793 if test "x$ac_cv_header_gmp_h" = x""yes; then :
23794   cat >>confdefs.h <<_ACEOF
23795 #define HAVE_GMP_H 1
23796 _ACEOF
23797
23798 fi
23799
23800 done
23801
23802         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_add_ui in -lgmp" >&5
23803 $as_echo_n "checking for __gmpz_add_ui in -lgmp... " >&6; }
23804 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then :
23805   $as_echo_n "(cached) " >&6
23806 else
23807   ac_check_lib_save_LIBS=$LIBS
23808 LIBS="-lgmp  $LIBS"
23809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23810 /* end confdefs.h.  */
23811
23812 /* Override any GCC internal prototype to avoid an error.
23813    Use char because int might match the return type of a GCC
23814    builtin and then its argument prototype would still apply.  */
23815 #ifdef __cplusplus
23816 extern "C"
23817 #endif
23818 char __gmpz_add_ui ();
23819 int
23820 main ()
23821 {
23822 return __gmpz_add_ui ();
23823   ;
23824   return 0;
23825 }
23826 _ACEOF
23827 if ac_fn_c_try_link "$LINENO"; then :
23828   ac_cv_lib_gmp___gmpz_add_ui=yes
23829 else
23830   ac_cv_lib_gmp___gmpz_add_ui=no
23831 fi
23832 rm -f core conftest.err conftest.$ac_objext \
23833     conftest$ac_exeext conftest.$ac_ext
23834 LIBS=$ac_check_lib_save_LIBS
23835 fi
23836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
23837 $as_echo "$ac_cv_lib_gmp___gmpz_add_ui" >&6; }
23838 if test "x$ac_cv_lib_gmp___gmpz_add_ui" = x""yes; then :
23839   cat >>confdefs.h <<_ACEOF
23840 #define HAVE_LIBGMP 1
23841 _ACEOF
23842
23843   LIBS="-lgmp $LIBS"
23844
23845 fi
23846
23847         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
23848
23849 $as_echo "#define USE_MP_GMP 1" >>confdefs.h
23850
23851                 ol_with_mp=gmp
23852         elif test $ol_with_mp = gmp ; then
23853                 as_fn_error "gmp not available" "$LINENO" 5
23854         fi
23855 fi
23856 if test $ol_with_mp = auto ; then
23857         ol_with_mp=no
23858 fi
23859
23860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
23861 $as_echo_n "checking for working memcmp... " >&6; }
23862 if test "${ac_cv_func_memcmp_working+set}" = set; then :
23863   $as_echo_n "(cached) " >&6
23864 else
23865   if test "$cross_compiling" = yes; then :
23866   ac_cv_func_memcmp_working=no
23867 else
23868   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23869 /* end confdefs.h.  */
23870 $ac_includes_default
23871 int
23872 main ()
23873 {
23874
23875   /* Some versions of memcmp are not 8-bit clean.  */
23876   char c0 = '\100', c1 = '\200', c2 = '\201';
23877   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
23878     return 1;
23879
23880   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
23881      or more and with at least one buffer not starting on a 4-byte boundary.
23882      William Lewis provided this test program.   */
23883   {
23884     char foo[21];
23885     char bar[21];
23886     int i;
23887     for (i = 0; i < 4; i++)
23888       {
23889         char *a = foo + i;
23890         char *b = bar + i;
23891         strcpy (a, "--------01111111");
23892         strcpy (b, "--------10000000");
23893         if (memcmp (a, b, 16) >= 0)
23894           return 1;
23895       }
23896     return 0;
23897   }
23898
23899   ;
23900   return 0;
23901 }
23902 _ACEOF
23903 if ac_fn_c_try_run "$LINENO"; then :
23904   ac_cv_func_memcmp_working=yes
23905 else
23906   ac_cv_func_memcmp_working=no
23907 fi
23908 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23909   conftest.$ac_objext conftest.beam conftest.$ac_ext
23910 fi
23911
23912 fi
23913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
23914 $as_echo "$ac_cv_func_memcmp_working" >&6; }
23915 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
23916   *" memcmp.$ac_objext "* ) ;;
23917   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
23918  ;;
23919 esac
23920
23921
23922
23923 if test $ac_cv_func_memcmp_working = no ; then
23924
23925 $as_echo "#define NEED_MEMCMP_REPLACEMENT 1" >>confdefs.h
23926
23927 fi
23928
23929 for ac_func in strftime
23930 do :
23931   ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23932 if test "x$ac_cv_func_strftime" = x""yes; then :
23933   cat >>confdefs.h <<_ACEOF
23934 #define HAVE_STRFTIME 1
23935 _ACEOF
23936
23937 else
23938   # strftime is in -lintl on SCO UNIX.
23939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
23940 $as_echo_n "checking for strftime in -lintl... " >&6; }
23941 if test "${ac_cv_lib_intl_strftime+set}" = set; then :
23942   $as_echo_n "(cached) " >&6
23943 else
23944   ac_check_lib_save_LIBS=$LIBS
23945 LIBS="-lintl  $LIBS"
23946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23947 /* end confdefs.h.  */
23948
23949 /* Override any GCC internal prototype to avoid an error.
23950    Use char because int might match the return type of a GCC
23951    builtin and then its argument prototype would still apply.  */
23952 #ifdef __cplusplus
23953 extern "C"
23954 #endif
23955 char strftime ();
23956 int
23957 main ()
23958 {
23959 return strftime ();
23960   ;
23961   return 0;
23962 }
23963 _ACEOF
23964 if ac_fn_c_try_link "$LINENO"; then :
23965   ac_cv_lib_intl_strftime=yes
23966 else
23967   ac_cv_lib_intl_strftime=no
23968 fi
23969 rm -f core conftest.err conftest.$ac_objext \
23970     conftest$ac_exeext conftest.$ac_ext
23971 LIBS=$ac_check_lib_save_LIBS
23972 fi
23973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
23974 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
23975 if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
23976   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
23977
23978 LIBS="-lintl $LIBS"
23979 fi
23980
23981 fi
23982 done
23983
23984
23985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton()" >&5
23986 $as_echo_n "checking for inet_aton()... " >&6; }
23987 if test "${ol_cv_func_inet_aton+set}" = set; then :
23988   $as_echo_n "(cached) " >&6
23989 else
23990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23991 /* end confdefs.h.  */
23992
23993 #ifdef HAVE_SYS_TYPES_H
23994 #       include <sys/types.h>
23995 #endif
23996 #ifdef HAVE_SYS_SOCKET_H
23997 #       include <sys/socket.h>
23998 #       ifdef HAVE_SYS_SELECT_H
23999 #               include <sys/select.h>
24000 #       endif
24001 #       include <netinet/in.h>
24002 #       ifdef HAVE_ARPA_INET_H
24003 #               include <arpa/inet.h>
24004 #       endif
24005 #endif
24006
24007 int
24008 main ()
24009 {
24010 struct in_addr in;
24011 int rc = inet_aton( "255.255.255.255", &in );
24012   ;
24013   return 0;
24014 }
24015 _ACEOF
24016 if ac_fn_c_try_link "$LINENO"; then :
24017   ol_cv_func_inet_aton=yes
24018 else
24019   ol_cv_func_inet_aton=no
24020 fi
24021 rm -f core conftest.err conftest.$ac_objext \
24022     conftest$ac_exeext conftest.$ac_ext
24023 fi
24024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_inet_aton" >&5
24025 $as_echo "$ol_cv_func_inet_aton" >&6; }
24026   if test $ol_cv_func_inet_aton != no; then
24027
24028 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
24029
24030   fi
24031
24032
24033 ac_fn_c_check_func "$LINENO" "_spawnlp" "ac_cv_func__spawnlp"
24034 if test "x$ac_cv_func__spawnlp" = x""yes; then :
24035
24036 $as_echo "#define HAVE_SPAWNLP 1" >>confdefs.h
24037
24038 fi
24039
24040
24041 ac_fn_c_check_func "$LINENO" "_snprintf" "ac_cv_func__snprintf"
24042 if test "x$ac_cv_func__snprintf" = x""yes; then :
24043   ac_cv_func_snprintf=yes
24044
24045 $as_echo "#define snprintf _snprintf" >>confdefs.h
24046
24047
24048 fi
24049
24050
24051 for ac_func in vsnprintf _vsnprintf
24052 do :
24053   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24054 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24055 eval as_val=\$$as_ac_var
24056    if test "x$as_val" = x""yes; then :
24057   cat >>confdefs.h <<_ACEOF
24058 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24059 _ACEOF
24060
24061 fi
24062 done
24063
24064
24065 if test $ac_cv_func_vsnprintf = no -a $ac_cv_func__vsnprintf = yes ; then
24066         ac_cv_func_vsnprintf=yes
24067
24068 $as_echo "#define vsnprintf _vsnprintf" >>confdefs.h
24069
24070 fi
24071
24072 for ac_func in vprintf
24073 do :
24074   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
24075 if test "x$ac_cv_func_vprintf" = x""yes; then :
24076   cat >>confdefs.h <<_ACEOF
24077 #define HAVE_VPRINTF 1
24078 _ACEOF
24079
24080 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
24081 if test "x$ac_cv_func__doprnt" = x""yes; then :
24082
24083 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
24084
24085 fi
24086
24087 fi
24088 done
24089
24090
24091
24092 if test $ac_cv_func_vprintf = yes ; then
24093                 for ac_func in snprintf vsnprintf
24094 do :
24095   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24096 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24097 eval as_val=\$$as_ac_var
24098    if test "x$as_val" = x""yes; then :
24099   cat >>confdefs.h <<_ACEOF
24100 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24101 _ACEOF
24102
24103 fi
24104 done
24105
24106 fi
24107
24108 for ac_func in \
24109         bcopy                   \
24110         closesocket             \
24111         chroot                  \
24112         endgrent                \
24113         endpwent                \
24114         fcntl                   \
24115         flock                   \
24116         fstat                   \
24117         getdtablesize           \
24118         geteuid                 \
24119         getgrgid                \
24120         gethostname             \
24121         getpassphrase           \
24122         getpwuid                \
24123         getpwnam                \
24124         getspnam                \
24125         gettimeofday            \
24126         initgroups              \
24127         inet_ntoa_b             \
24128         ioctl                   \
24129         lockf                   \
24130         memcpy                  \
24131         memmove                 \
24132         memrchr                 \
24133         mkstemp                 \
24134         mktemp                  \
24135         pipe                    \
24136         read                    \
24137         recv                    \
24138         recvfrom                \
24139         setpwfile               \
24140         setgid                  \
24141         setegid                 \
24142         setsid                  \
24143         setuid                  \
24144         seteuid                 \
24145         signal                  \
24146         strdup                  \
24147         strpbrk                 \
24148         strrchr                 \
24149         strsep                  \
24150         strstr                  \
24151         strtol                  \
24152         strtoul                 \
24153         strtoq                  \
24154         strtouq                 \
24155         strtoll                 \
24156         strtoull                \
24157         strspn                  \
24158         sysconf                 \
24159         waitpid                 \
24160         wait4                   \
24161         write                   \
24162         send                    \
24163         sendmsg                 \
24164         sendto                  \
24165
24166 do :
24167   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24168 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24169 eval as_val=\$$as_ac_var
24170    if test "x$as_val" = x""yes; then :
24171   cat >>confdefs.h <<_ACEOF
24172 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24173 _ACEOF
24174
24175 fi
24176 done
24177
24178
24179 for ac_func in getopt getpeereid
24180 do :
24181   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24182 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24183 eval as_val=\$$as_ac_var
24184    if test "x$as_val" = x""yes; then :
24185   cat >>confdefs.h <<_ACEOF
24186 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24187 _ACEOF
24188
24189 else
24190   case " $LIBOBJS " in
24191   *" $ac_func.$ac_objext "* ) ;;
24192   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
24193  ;;
24194 esac
24195
24196 fi
24197 done
24198
24199
24200
24201 if test "$ac_cv_func_getopt" != yes; then
24202         LIBSRCS="$LIBSRCS getopt.c"
24203 fi
24204
24205 if test "$ac_cv_func_getpeereid" != yes; then
24206         for ac_func in getpeerucred
24207 do :
24208   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
24209 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
24210 eval as_val=\$$as_ac_var
24211    if test "x$as_val" = x""yes; then :
24212   cat >>confdefs.h <<_ACEOF
24213 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
24214 _ACEOF
24215
24216 fi
24217 done
24218
24219         if test "$ac_cv_func_getpeerucred" != yes ; then
24220                 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrightslen" "ac_cv_member_struct_msghdr_msg_accrightslen" "$ac_includes_default
24221 #ifdef HAVE_SYS_SOCKET_H
24222 #include <sys/socket.h>
24223 #endif
24224 "
24225 if test "x$ac_cv_member_struct_msghdr_msg_accrightslen" = x""yes; then :
24226
24227 cat >>confdefs.h <<_ACEOF
24228 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
24229 _ACEOF
24230
24231
24232 fi
24233
24234                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
24235                         ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "$ac_includes_default
24236 #ifdef HAVE_SYS_SOCKET_H
24237 #include <sys/socket.h>
24238 #endif
24239 "
24240 if test "x$ac_cv_member_struct_msghdr_msg_control" = x""yes; then :
24241
24242 cat >>confdefs.h <<_ACEOF
24243 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
24244 _ACEOF
24245
24246
24247 fi
24248
24249                 fi
24250                 ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default"
24251 if test "x$ac_cv_member_struct_stat_st_fstype" = x""yes; then :
24252
24253 cat >>confdefs.h <<_ACEOF
24254 #define HAVE_STRUCT_STAT_ST_FSTYPE 1
24255 _ACEOF
24256
24257
24258 fi
24259 ac_fn_c_check_member "$LINENO" "struct stat" "st_vfstype" "ac_cv_member_struct_stat_st_vfstype" "$ac_includes_default"
24260 if test "x$ac_cv_member_struct_stat_st_vfstype" = x""yes; then :
24261
24262 cat >>confdefs.h <<_ACEOF
24263 #define HAVE_STRUCT_STAT_ST_VFSTYPE 1
24264 _ACEOF
24265
24266
24267 fi
24268
24269                 if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
24270                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24271 /* end confdefs.h.  */
24272 struct stat st; char *ptr=st.st_fstype;
24273 _ACEOF
24274 if ac_fn_c_try_compile "$LINENO"; then :
24275
24276 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1" >>confdefs.h
24277
24278 else
24279
24280 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1" >>confdefs.h
24281
24282 fi
24283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24284                 fi
24285         fi
24286         LIBSRCS="$LIBSRCS getpeereid.c"
24287 fi
24288
24289 if test "$ac_cv_func_snprintf" != yes ||
24290    test "$ac_cv_func_vsnprintf" != yes; then
24291         if test "$ac_cv_func_snprintf" != yes; then
24292
24293 $as_echo "#define snprintf ber_pvt_snprintf" >>confdefs.h
24294
24295         fi
24296         if test "$ac_cv_func_vsnprintf" != yes; then
24297
24298 $as_echo "#define vsnprintf ber_pvt_vsnprintf" >>confdefs.h
24299
24300         fi
24301 fi
24302
24303
24304 if test "$ol_enable_slapi" != no ; then
24305                         for ac_header in ltdl.h
24306 do :
24307   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
24308 if test "x$ac_cv_header_ltdl_h" = x""yes; then :
24309   cat >>confdefs.h <<_ACEOF
24310 #define HAVE_LTDL_H 1
24311 _ACEOF
24312
24313 fi
24314
24315 done
24316
24317
24318         if test $ac_cv_header_ltdl_h != yes ; then
24319                 as_fn_error "could not locate <ltdl.h>" "$LINENO" 5
24320         fi
24321         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
24322 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
24323 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
24324   $as_echo_n "(cached) " >&6
24325 else
24326   ac_check_lib_save_LIBS=$LIBS
24327 LIBS="-lltdl  $LIBS"
24328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24329 /* end confdefs.h.  */
24330
24331 /* Override any GCC internal prototype to avoid an error.
24332    Use char because int might match the return type of a GCC
24333    builtin and then its argument prototype would still apply.  */
24334 #ifdef __cplusplus
24335 extern "C"
24336 #endif
24337 char lt_dlinit ();
24338 int
24339 main ()
24340 {
24341 return lt_dlinit ();
24342   ;
24343   return 0;
24344 }
24345 _ACEOF
24346 if ac_fn_c_try_link "$LINENO"; then :
24347   ac_cv_lib_ltdl_lt_dlinit=yes
24348 else
24349   ac_cv_lib_ltdl_lt_dlinit=no
24350 fi
24351 rm -f core conftest.err conftest.$ac_objext \
24352     conftest$ac_exeext conftest.$ac_ext
24353 LIBS=$ac_check_lib_save_LIBS
24354 fi
24355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
24356 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
24357 if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
24358
24359                 SLAPI_LIBS=-lltdl
24360                 LIBSLAPI=slapi/libslapi.la
24361
24362 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
24363
24364
24365 else
24366   as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
24367 fi
24368
24369
24370
24371 $as_echo "#define LDAP_SLAPI 1" >>confdefs.h
24372
24373 fi
24374
24375 if test "$ol_enable_debug" != no ; then
24376         if test "$ol_enable_debug" = traditional; then
24377
24378 $as_echo "#define OLD_DEBUG 1" >>confdefs.h
24379
24380         fi
24381
24382 $as_echo "#define LDAP_DEBUG 1" >>confdefs.h
24383
24384 fi
24385 if test "$ol_enable_syslog" = yes ; then
24386
24387 $as_echo "#define LDAP_SYSLOG 1" >>confdefs.h
24388
24389 fi
24390 if test "$ol_enable_proctitle" != no ; then
24391
24392 $as_echo "#define LDAP_PROCTITLE 1" >>confdefs.h
24393
24394 fi
24395 if test "$ol_enable_referrals" != no ; then
24396
24397 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION" >>confdefs.h
24398
24399 fi
24400 if test "$ol_enable_local" != no; then
24401
24402 $as_echo "#define LDAP_PF_LOCAL 1" >>confdefs.h
24403
24404 fi
24405 if test "$ol_link_ipv6" != no; then
24406
24407 $as_echo "#define LDAP_PF_INET6 1" >>confdefs.h
24408
24409 fi
24410 if test "$ol_enable_cleartext" != no ; then
24411
24412 $as_echo "#define SLAPD_CLEARTEXT 1" >>confdefs.h
24413
24414 fi
24415 if test "$ol_enable_crypt" != no ; then
24416
24417 $as_echo "#define SLAPD_CRYPT 1" >>confdefs.h
24418
24419 fi
24420 if test "$ol_link_spasswd" != no ; then
24421
24422 $as_echo "#define SLAPD_SPASSWD 1" >>confdefs.h
24423
24424 fi
24425 if test "$ol_enable_rlookups" != no ; then
24426
24427 $as_echo "#define SLAPD_RLOOKUPS 1" >>confdefs.h
24428
24429 fi
24430 if test "$ol_enable_aci" != no ; then
24431         if test $ol_enable_dynacl = no ; then
24432                 ol_enable_dynacl=yes
24433                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ACIs need dynacl" >&5
24434 $as_echo "$as_me: WARNING: ACIs need dynacl" >&2;}
24435         fi
24436         if test "$ol_enable_aci" = mod ; then
24437                 MFLAG=SLAPD_MOD_DYNAMIC
24438                                 as_fn_error "ACI build as dynamic module not supported (yet)" "$LINENO" 5
24439         else
24440                 MFLAG=SLAPD_MOD_STATIC
24441         fi
24442         WITH_ACI_ENABLED=$ol_enable_aci
24443
24444 cat >>confdefs.h <<_ACEOF
24445 #define SLAPD_ACI_ENABLED $MFLAG
24446 _ACEOF
24447
24448 else
24449         WITH_ACI_ENABLED=no
24450 fi
24451 if test "$ol_enable_dynacl" != no ; then
24452
24453 $as_echo "#define SLAP_DYNACL 1" >>confdefs.h
24454
24455 fi
24456
24457 if test "$ol_link_modules" != no ; then
24458
24459 $as_echo "#define SLAPD_MODULES 1" >>confdefs.h
24460
24461         BUILD_SLAPD=yes
24462         SLAPD_MODULES_LDFLAGS="-dlopen self"
24463 fi
24464
24465
24466 $as_echo "#define SLAPD_MOD_STATIC 1" >>confdefs.h
24467
24468
24469 $as_echo "#define SLAPD_MOD_DYNAMIC 2" >>confdefs.h
24470
24471
24472 if test "$ol_enable_monitor" != no ; then
24473         BUILD_SLAPD=yes
24474         BUILD_MONITOR=$ol_enable_monitor
24475         if test "$ol_enable_monitor" = mod ; then
24476                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24477                 MFLAG=SLAPD_MOD_DYNAMIC
24478         else
24479                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24480                 MFLAG=SLAPD_MOD_STATIC
24481         fi
24482
24483 cat >>confdefs.h <<_ACEOF
24484 #define SLAPD_MONITOR $MFLAG
24485 _ACEOF
24486
24487 fi
24488
24489 if test "$ol_enable_bdb" != no ; then
24490         BUILD_SLAPD=yes
24491         BUILD_BDB=$ol_enable_bdb
24492         if test "$ol_enable_bdb" = mod ; then
24493                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24494                 MFLAG=SLAPD_MOD_DYNAMIC
24495         else
24496                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24497                 MFLAG=SLAPD_MOD_STATIC
24498         fi
24499
24500 cat >>confdefs.h <<_ACEOF
24501 #define SLAPD_BDB $MFLAG
24502 _ACEOF
24503
24504 fi
24505
24506 if test "$ol_enable_dnssrv" != no ; then
24507         BUILD_SLAPD=yes
24508         BUILD_DNSSRV=$ol_enable_dnssrv
24509         if test "$ol_enable_dnssrv" = mod ; then
24510                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24511                 MFLAG=SLAPD_MOD_DYNAMIC
24512         else
24513                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24514                 MFLAG=SLAPD_MOD_STATIC
24515         fi
24516
24517 cat >>confdefs.h <<_ACEOF
24518 #define SLAPD_DNSSRV $MFLAG
24519 _ACEOF
24520
24521 fi
24522
24523 if test "$ol_enable_hdb" != no ; then
24524         BUILD_SLAPD=yes
24525         BUILD_HDB=$ol_enable_hdb
24526         if test "$ol_enable_hdb" = mod ; then
24527                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24528                 MFLAG=SLAPD_MOD_DYNAMIC
24529         else
24530                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24531                 MFLAG=SLAPD_MOD_STATIC
24532         fi
24533
24534 cat >>confdefs.h <<_ACEOF
24535 #define SLAPD_HDB $MFLAG
24536 _ACEOF
24537
24538 fi
24539
24540 if test "$ol_enable_ldap" != no ; then
24541         BUILD_SLAPD=yes
24542         BUILD_LDAP=$ol_enable_ldap
24543         if test "$ol_enable_ldap" = mod ; then
24544                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24545                 MFLAG=SLAPD_MOD_DYNAMIC
24546         else
24547                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24548                 MFLAG=SLAPD_MOD_STATIC
24549         fi
24550
24551 cat >>confdefs.h <<_ACEOF
24552 #define SLAPD_LDAP $MFLAG
24553 _ACEOF
24554
24555 fi
24556
24557 if test "$ol_enable_mdb" != no ; then
24558         BUILD_SLAPD=yes
24559         BUILD_MDB=$ol_enable_mdb
24560         if test "$ol_enable_mdb" = mod ; then
24561                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-mdb"
24562                 MFLAG=SLAPD_MOD_DYNAMIC
24563         else
24564                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-mdb"
24565                 MFLAG=SLAPD_MOD_STATIC
24566         fi
24567
24568 cat >>confdefs.h <<_ACEOF
24569 #define SLAPD_MDB $MFLAG
24570 _ACEOF
24571
24572 fi
24573
24574 if test "$ol_enable_meta" != no ; then
24575         BUILD_SLAPD=yes
24576         BUILD_META=$ol_enable_meta
24577         BUILD_REWRITE=yes
24578         if test "$ol_enable_meta" = mod ; then
24579                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24580                 MFLAG=SLAPD_MOD_DYNAMIC
24581         else
24582                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24583                 MFLAG=SLAPD_MOD_STATIC
24584         fi
24585
24586 cat >>confdefs.h <<_ACEOF
24587 #define SLAPD_META $MFLAG
24588 _ACEOF
24589
24590 fi
24591
24592 if test "$ol_enable_asyncmeta" != no ; then
24593         BUILD_SLAPD=yes
24594         BUILD_ASYNCMETA=$ol_enable_asyncmeta
24595         BUILD_REWRITE=yes
24596         if test "$ol_enable_asyncmeta" = mod ; then
24597                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-asyncmeta"
24598                 MFLAG=SLAPD_MOD_DYNAMIC
24599         else
24600                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-asyncmeta"
24601                 MFLAG=SLAPD_MOD_STATIC
24602         fi
24603
24604 cat >>confdefs.h <<_ACEOF
24605 #define SLAPD_ASYNCMETA $MFLAG
24606 _ACEOF
24607
24608 fi
24609
24610 if test "$ol_enable_ndb" != no ; then
24611         BUILD_SLAPD=yes
24612         BUILD_NDB=$ol_enable_ndb
24613         if test "$ol_enable_ndb" = mod ; then
24614                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ndb"
24615                 MFLAG=SLAPD_MOD_DYNAMIC
24616         else
24617                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ndb"
24618                 MFLAG=SLAPD_MOD_STATIC
24619         fi
24620
24621 cat >>confdefs.h <<_ACEOF
24622 #define SLAPD_NDB $MFLAG
24623 _ACEOF
24624
24625 fi
24626
24627 if test "$ol_enable_null" != no ; then
24628         BUILD_SLAPD=yes
24629         BUILD_NULL=$ol_enable_null
24630         if test "$ol_enable_null" = mod ; then
24631                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24632                 MFLAG=SLAPD_MOD_DYNAMIC
24633         else
24634                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24635                 MFLAG=SLAPD_MOD_STATIC
24636         fi
24637
24638 cat >>confdefs.h <<_ACEOF
24639 #define SLAPD_NULL $MFLAG
24640 _ACEOF
24641
24642 fi
24643
24644 if test "$ol_enable_passwd" != no ; then
24645         BUILD_SLAPD=yes
24646         BUILD_PASSWD=$ol_enable_passwd
24647         if test "$ol_enable_passwd" = mod ; then
24648                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24649                 MFLAG=SLAPD_MOD_DYNAMIC
24650         else
24651                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24652                 MFLAG=SLAPD_MOD_STATIC
24653         fi
24654
24655 cat >>confdefs.h <<_ACEOF
24656 #define SLAPD_PASSWD $MFLAG
24657 _ACEOF
24658
24659 fi
24660
24661 if test "$ol_link_perl" != no ; then
24662         BUILD_SLAPD=yes
24663         BUILD_PERL=$ol_enable_perl
24664         if test "$ol_enable_perl" = mod ; then
24665                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24666                 MFLAG=SLAPD_MOD_DYNAMIC
24667         else
24668                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24669                 MFLAG=SLAPD_MOD_STATIC
24670         fi
24671
24672 cat >>confdefs.h <<_ACEOF
24673 #define SLAPD_PERL $MFLAG
24674 _ACEOF
24675
24676 fi
24677
24678 if test "$ol_enable_relay" != no ; then
24679         BUILD_SLAPD=yes
24680         BUILD_RELAY=$ol_enable_relay
24681         if test "$ol_enable_relay" = mod ; then
24682                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
24683                 MFLAG=SLAPD_MOD_DYNAMIC
24684         else
24685                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
24686                 MFLAG=SLAPD_MOD_STATIC
24687         fi
24688
24689 cat >>confdefs.h <<_ACEOF
24690 #define SLAPD_RELAY $MFLAG
24691 _ACEOF
24692
24693 fi
24694
24695 if test "$ol_enable_shell" != no ; then
24696         if test "$ol_link_threads" != no ; then
24697                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use of --without-threads is recommended with back-shell" >&5
24698 $as_echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
24699         fi
24700         BUILD_SLAPD=yes
24701         BUILD_SHELL=$ol_enable_shell
24702         if test "$ol_enable_shell" = mod ; then
24703                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24704                 MFLAG=SLAPD_MOD_DYNAMIC
24705         else
24706                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24707                 MFLAG=SLAPD_MOD_STATIC
24708         fi
24709
24710 cat >>confdefs.h <<_ACEOF
24711 #define SLAPD_SHELL $MFLAG
24712 _ACEOF
24713
24714 fi
24715
24716 if test "$ol_enable_sock" != no ; then
24717         BUILD_SLAPD=yes
24718         BUILD_SOCK=$ol_enable_sock
24719         if test "$ol_enable_sock" = mod ; then
24720                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sock"
24721                 MFLAG=SLAPD_MOD_DYNAMIC
24722         else
24723                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sock"
24724                 MFLAG=SLAPD_MOD_STATIC
24725         fi
24726
24727 cat >>confdefs.h <<_ACEOF
24728 #define SLAPD_SOCK $MFLAG
24729 _ACEOF
24730
24731 fi
24732
24733 if test "$ol_link_sql" != no ; then
24734         BUILD_SLAPD=yes
24735         BUILD_SQL=$ol_enable_sql
24736         if test "$ol_enable_sql" = mod; then
24737                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24738                 MFLAG=SLAPD_MOD_DYNAMIC
24739         else
24740                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24741                 MFLAG=SLAPD_MOD_STATIC
24742         fi
24743
24744 cat >>confdefs.h <<_ACEOF
24745 #define SLAPD_SQL $MFLAG
24746 _ACEOF
24747
24748 fi
24749
24750 if test "$ol_link_wt" != no ; then
24751         BUILD_SLAPD=yes
24752         BUILD_WT=$ol_enable_wt
24753         if test "$ol_enable_wt" = mod; then
24754                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-wt"
24755                 MFLAG=SLAPD_MOD_DYNAMIC
24756         else
24757                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-wt"
24758                 MFLAG=SLAPD_MOD_STATIC
24759         fi
24760
24761 cat >>confdefs.h <<_ACEOF
24762 #define SLAPD_WT $MFLAG
24763 _ACEOF
24764
24765 fi
24766
24767 if test "$ol_enable_accesslog" != no ; then
24768         BUILD_ACCESSLOG=$ol_enable_accesslog
24769         if test "$ol_enable_accesslog" = mod ; then
24770                 MFLAG=SLAPD_MOD_DYNAMIC
24771                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
24772         else
24773                 MFLAG=SLAPD_MOD_STATIC
24774                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
24775         fi
24776
24777 cat >>confdefs.h <<_ACEOF
24778 #define SLAPD_OVER_ACCESSLOG $MFLAG
24779 _ACEOF
24780
24781 fi
24782
24783 if test "$ol_enable_auditlog" != no ; then
24784         BUILD_AUDITLOG=$ol_enable_auditlog
24785         if test "$ol_enable_auditlog" = mod ; then
24786                 MFLAG=SLAPD_MOD_DYNAMIC
24787                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
24788         else
24789                 MFLAG=SLAPD_MOD_STATIC
24790                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
24791         fi
24792
24793 cat >>confdefs.h <<_ACEOF
24794 #define SLAPD_OVER_AUDITLOG $MFLAG
24795 _ACEOF
24796
24797 fi
24798
24799 if test "$ol_enable_autoca" != no ; then
24800         BUILD_AUTOCA=$ol_enable_autoca
24801         if test "$ol_enable_autoca" = mod ; then
24802                 MFLAG=SLAPD_MOD_DYNAMIC
24803                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS autoca.la"
24804         else
24805                 MFLAG=SLAPD_MOD_STATIC
24806                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS autoca.o"
24807         fi
24808
24809 cat >>confdefs.h <<_ACEOF
24810 #define SLAPD_OVER_AUTOCA $MFLAG
24811 _ACEOF
24812
24813 fi
24814
24815 if test "$ol_enable_collect" != no ; then
24816         BUILD_COLLECT=$ol_enable_collect
24817         if test "$ol_enable_collect" = mod ; then
24818                 MFLAG=SLAPD_MOD_DYNAMIC
24819                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS collect.la"
24820         else
24821                 MFLAG=SLAPD_MOD_STATIC
24822                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS collect.o"
24823         fi
24824
24825 cat >>confdefs.h <<_ACEOF
24826 #define SLAPD_OVER_COLLECT $MFLAG
24827 _ACEOF
24828
24829 fi
24830
24831 if test "$ol_enable_constraint" != no ; then
24832         BUILD_CONSTRAINT=$ol_enable_constraint
24833         if test "$ol_enable_constraint" = mod ; then
24834                 MFLAG=SLAPD_MOD_DYNAMIC
24835                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la"
24836         else
24837                 MFLAG=SLAPD_MOD_STATIC
24838                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o"
24839         fi
24840
24841 cat >>confdefs.h <<_ACEOF
24842 #define SLAPD_OVER_CONSTRAINT $MFLAG
24843 _ACEOF
24844
24845 fi
24846
24847 if test "$ol_enable_dds" != no ; then
24848         BUILD_DDS=$ol_enable_dds
24849         if test "$ol_enable_dds" = mod ; then
24850                 MFLAG=SLAPD_MOD_DYNAMIC
24851                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
24852         else
24853                 MFLAG=SLAPD_MOD_STATIC
24854                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
24855         fi
24856
24857 cat >>confdefs.h <<_ACEOF
24858 #define SLAPD_OVER_DDS $MFLAG
24859 _ACEOF
24860
24861 fi
24862
24863 if test "$ol_enable_deref" != no ; then
24864         BUILD_DEREF=$ol_enable_deref
24865         if test "$ol_enable_deref" = mod ; then
24866                 MFLAG=SLAPD_MOD_DYNAMIC
24867                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS deref.la"
24868         else
24869                 MFLAG=SLAPD_MOD_STATIC
24870                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS deref.o"
24871         fi
24872
24873 cat >>confdefs.h <<_ACEOF
24874 #define SLAPD_OVER_DEREF $MFLAG
24875 _ACEOF
24876
24877 fi
24878
24879 if test "$ol_enable_dyngroup" != no ; then
24880         BUILD_DYNGROUP=$ol_enable_dyngroup
24881         if test "$ol_enable_dyngroup" = mod ; then
24882                 MFLAG=SLAPD_MOD_DYNAMIC
24883                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24884         else
24885                 MFLAG=SLAPD_MOD_STATIC
24886                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
24887         fi
24888
24889 cat >>confdefs.h <<_ACEOF
24890 #define SLAPD_OVER_DYNGROUP $MFLAG
24891 _ACEOF
24892
24893 fi
24894
24895 if test "$ol_enable_dynlist" != no ; then
24896         BUILD_DYNLIST=$ol_enable_dynlist
24897         if test "$ol_enable_dynlist" = mod ; then
24898                 MFLAG=SLAPD_MOD_DYNAMIC
24899                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
24900         else
24901                 MFLAG=SLAPD_MOD_STATIC
24902                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
24903         fi
24904
24905 cat >>confdefs.h <<_ACEOF
24906 #define SLAPD_OVER_DYNLIST $MFLAG
24907 _ACEOF
24908
24909 fi
24910
24911 if test "$ol_enable_memberof" != no ; then
24912         BUILD_MEMBEROF=$ol_enable_memberof
24913         if test "$ol_enable_memberof" = mod ; then
24914                 MFLAG=SLAPD_MOD_DYNAMIC
24915                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la"
24916         else
24917                 MFLAG=SLAPD_MOD_STATIC
24918                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o"
24919         fi
24920
24921 cat >>confdefs.h <<_ACEOF
24922 #define SLAPD_OVER_MEMBEROF $MFLAG
24923 _ACEOF
24924
24925 fi
24926
24927 if test "$ol_enable_ppolicy" != no ; then
24928         BUILD_PPOLICY=$ol_enable_ppolicy
24929         if test "$ol_enable_ppolicy" = mod ; then
24930                 MFLAG=SLAPD_MOD_DYNAMIC
24931                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24932         else
24933                 MFLAG=SLAPD_MOD_STATIC
24934                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
24935         fi
24936
24937 cat >>confdefs.h <<_ACEOF
24938 #define SLAPD_OVER_PPOLICY $MFLAG
24939 _ACEOF
24940
24941 fi
24942
24943 if test "$ol_enable_proxycache" != no ; then
24944         BUILD_PROXYCACHE=$ol_enable_proxycache
24945         if test "$ol_enable_proxycache" = mod ; then
24946                 MFLAG=SLAPD_MOD_DYNAMIC
24947                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24948         else
24949                 MFLAG=SLAPD_MOD_STATIC
24950                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
24951         fi
24952
24953 cat >>confdefs.h <<_ACEOF
24954 #define SLAPD_OVER_PROXYCACHE $MFLAG
24955 _ACEOF
24956
24957 fi
24958
24959 if test "$ol_enable_refint" != no ; then
24960         BUILD_REFINT=$ol_enable_refint
24961         if test "$ol_enable_refint" = mod ; then
24962                 MFLAG=SLAPD_MOD_DYNAMIC
24963                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24964         else
24965                 MFLAG=SLAPD_MOD_STATIC
24966                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
24967         fi
24968
24969 cat >>confdefs.h <<_ACEOF
24970 #define SLAPD_OVER_REFINT $MFLAG
24971 _ACEOF
24972
24973 fi
24974
24975 if test "$ol_enable_retcode" != no ; then
24976         BUILD_RETCODE=$ol_enable_retcode
24977         if test "$ol_enable_retcode" = mod ; then
24978                 MFLAG=SLAPD_MOD_DYNAMIC
24979                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
24980         else
24981                 MFLAG=SLAPD_MOD_STATIC
24982                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
24983         fi
24984
24985 cat >>confdefs.h <<_ACEOF
24986 #define SLAPD_OVER_RETCODE $MFLAG
24987 _ACEOF
24988
24989 fi
24990
24991 if test "$ol_enable_rwm" != no ; then
24992         BUILD_REWRITE=yes
24993         BUILD_RWM=$ol_enable_rwm
24994         if test "$ol_enable_rwm" = mod ; then
24995                 MFLAG=SLAPD_MOD_DYNAMIC
24996                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24997         else
24998                 MFLAG=SLAPD_MOD_STATIC
24999                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
25000         fi
25001
25002 cat >>confdefs.h <<_ACEOF
25003 #define SLAPD_OVER_RWM $MFLAG
25004 _ACEOF
25005
25006 fi
25007
25008 if test "$ol_enable_seqmod" != no ; then
25009         BUILD_SEQMOD=$ol_enable_seqmod
25010         if test "$ol_enable_seqmod" = mod ; then
25011                 MFLAG=SLAPD_MOD_DYNAMIC
25012                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
25013         else
25014                 MFLAG=SLAPD_MOD_STATIC
25015                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
25016         fi
25017
25018 cat >>confdefs.h <<_ACEOF
25019 #define SLAPD_OVER_SEQMOD $MFLAG
25020 _ACEOF
25021
25022 fi
25023
25024 if test "$ol_enable_sssvlv" != no ; then
25025         BUILD_SSSVLV=$ol_enable_sssvlv
25026         if test "$ol_enable_sssvlv" = mod ; then
25027                 MFLAG=SLAPD_MOD_DYNAMIC
25028                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS sssvlv.la"
25029         else
25030                 MFLAG=SLAPD_MOD_STATIC
25031                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS sssvlv.o"
25032         fi
25033
25034 cat >>confdefs.h <<_ACEOF
25035 #define SLAPD_OVER_SSSVLV $MFLAG
25036 _ACEOF
25037
25038 fi
25039
25040 if test "$ol_enable_syncprov" != no ; then
25041         BUILD_SYNCPROV=$ol_enable_syncprov
25042         if test "$ol_enable_syncprov" = mod ; then
25043                 MFLAG=SLAPD_MOD_DYNAMIC
25044                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
25045         else
25046                 MFLAG=SLAPD_MOD_STATIC
25047                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
25048         fi
25049
25050 cat >>confdefs.h <<_ACEOF
25051 #define SLAPD_OVER_SYNCPROV $MFLAG
25052 _ACEOF
25053
25054 fi
25055
25056 if test "$ol_enable_translucent" != no ; then
25057         BUILD_TRANSLUCENT=$ol_enable_translucent
25058         if test "$ol_enable_translucent" = mod ; then
25059                 MFLAG=SLAPD_MOD_DYNAMIC
25060                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
25061         else
25062                 MFLAG=SLAPD_MOD_STATIC
25063                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
25064         fi
25065
25066 cat >>confdefs.h <<_ACEOF
25067 #define SLAPD_OVER_TRANSLUCENT $MFLAG
25068 _ACEOF
25069
25070 fi
25071
25072 if test "$ol_enable_unique" != no ; then
25073         BUILD_UNIQUE=$ol_enable_unique
25074         if test "$ol_enable_unique" = mod ; then
25075                 MFLAG=SLAPD_MOD_DYNAMIC
25076                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
25077         else
25078                 MFLAG=SLAPD_MOD_STATIC
25079                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
25080         fi
25081
25082 cat >>confdefs.h <<_ACEOF
25083 #define SLAPD_OVER_UNIQUE $MFLAG
25084 _ACEOF
25085
25086 fi
25087
25088 if test "$ol_enable_valsort" != no ; then
25089         BUILD_VALSORT=$ol_enable_valsort
25090         if test "$ol_enable_valsort" = mod ; then
25091                 MFLAG=SLAPD_MOD_DYNAMIC
25092                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
25093         else
25094                 MFLAG=SLAPD_MOD_STATIC
25095                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
25096         fi
25097
25098 cat >>confdefs.h <<_ACEOF
25099 #define SLAPD_OVER_VALSORT $MFLAG
25100 _ACEOF
25101
25102 fi
25103
25104 if test "$ol_enable_rewrite" != no ; then
25105
25106 $as_echo "#define ENABLE_REWRITE 1" >>confdefs.h
25107
25108         BUILD_REWRITE=yes
25109 fi
25110
25111 if test "$ol_enable_slapi" != no ; then
25112
25113 $as_echo "#define ENABLE_SLAPI 1" >>confdefs.h
25114
25115         BUILD_SLAPI=yes
25116         SLAPD_SLAPI_DEPEND=libslapi.a
25117 fi
25118
25119
25120
25121 if test "$ac_cv_mingw32" = yes -o $ol_cv_msvc = yes ; then
25122         PLAT=NT
25123         SLAPD_MODULES_LDFLAGS=
25124 else
25125         PLAT=UNIX
25126 fi
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224 # Check whether --with-xxinstall was given.
25225 if test "${with_xxinstall+set}" = set; then :
25226   withval=$with_xxinstall;
25227 fi
25228
25229
25230
25231 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"
25232
25233
25234 ac_config_commands="$ac_config_commands default"
25235
25236
25237
25238 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25239 # Let make expand exec_prefix.
25240 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25241
25242 DEFS=-DHAVE_CONFIG_H
25243
25244 ac_libobjs=
25245 ac_ltlibobjs=
25246 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25247   # 1. Remove the extension, and $U if already installed.
25248   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25249   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
25250   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
25251   #    will be set to the directory where LIBOBJS objects are built.
25252   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25253   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
25254 done
25255 LIBOBJS=$ac_libobjs
25256
25257 LTLIBOBJS=$ac_ltlibobjs
25258
25259
25260 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
25261   as_fn_error "conditional \"AMDEP\" was never defined.
25262 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25263 fi
25264 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
25265   as_fn_error "conditional \"am__fastdepCC\" was never defined.
25266 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25267 fi
25268 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
25269   as_fn_error "conditional \"am__fastdepCC\" was never defined.
25270 Usually this means the macro was only invoked conditionally." "$LINENO" 5
25271 fi
25272
25273
25274 : ${CONFIG_STATUS=./config.status}
25275 ac_write_fail=0
25276 ac_clean_files_save=$ac_clean_files
25277 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25278 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
25279 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25280 as_write_fail=0
25281 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
25282 #! $SHELL
25283 # Generated by $as_me.
25284 # Run this file to recreate the current configuration.
25285 # Compiler output produced by configure, useful for debugging
25286 # configure, is in config.log if it exists.
25287
25288 debug=false
25289 ac_cs_recheck=false
25290 ac_cs_silent=false
25291
25292 SHELL=\${CONFIG_SHELL-$SHELL}
25293 export SHELL
25294 _ASEOF
25295 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
25296 ## -------------------- ##
25297 ## M4sh Initialization. ##
25298 ## -------------------- ##
25299
25300 # Be more Bourne compatible
25301 DUALCASE=1; export DUALCASE # for MKS sh
25302 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
25303   emulate sh
25304   NULLCMD=:
25305   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25306   # is contrary to our usage.  Disable this feature.
25307   alias -g '${1+"$@"}'='"$@"'
25308   setopt NO_GLOB_SUBST
25309 else
25310   case `(set -o) 2>/dev/null` in #(
25311   *posix*) :
25312     set -o posix ;; #(
25313   *) :
25314      ;;
25315 esac
25316 fi
25317
25318
25319 as_nl='
25320 '
25321 export as_nl
25322 # Printing a long string crashes Solaris 7 /usr/bin/printf.
25323 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25324 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
25325 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
25326 # Prefer a ksh shell builtin over an external printf program on Solaris,
25327 # but without wasting forks for bash or zsh.
25328 if test -z "$BASH_VERSION$ZSH_VERSION" \
25329     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
25330   as_echo='print -r --'
25331   as_echo_n='print -rn --'
25332 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
25333   as_echo='printf %s\n'
25334   as_echo_n='printf %s'
25335 else
25336   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
25337     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
25338     as_echo_n='/usr/ucb/echo -n'
25339   else
25340     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
25341     as_echo_n_body='eval
25342       arg=$1;
25343       case $arg in #(
25344       *"$as_nl"*)
25345         expr "X$arg" : "X\\(.*\\)$as_nl";
25346         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
25347       esac;
25348       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
25349     '
25350     export as_echo_n_body
25351     as_echo_n='sh -c $as_echo_n_body as_echo'
25352   fi
25353   export as_echo_body
25354   as_echo='sh -c $as_echo_body as_echo'
25355 fi
25356
25357 # The user is always right.
25358 if test "${PATH_SEPARATOR+set}" != set; then
25359   PATH_SEPARATOR=:
25360   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25361     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25362       PATH_SEPARATOR=';'
25363   }
25364 fi
25365
25366
25367 # IFS
25368 # We need space, tab and new line, in precisely that order.  Quoting is
25369 # there to prevent editors from complaining about space-tab.
25370 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
25371 # splitting by setting IFS to empty value.)
25372 IFS=" ""        $as_nl"
25373
25374 # Find who we are.  Look in the path if we contain no directory separator.
25375 case $0 in #((
25376   *[\\/]* ) as_myself=$0 ;;
25377   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25378 for as_dir in $PATH
25379 do
25380   IFS=$as_save_IFS
25381   test -z "$as_dir" && as_dir=.
25382     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25383   done
25384 IFS=$as_save_IFS
25385
25386      ;;
25387 esac
25388 # We did not find ourselves, most probably we were run as `sh COMMAND'
25389 # in which case we are not to be found in the path.
25390 if test "x$as_myself" = x; then
25391   as_myself=$0
25392 fi
25393 if test ! -f "$as_myself"; then
25394   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25395   exit 1
25396 fi
25397
25398 # Unset variables that we do not need and which cause bugs (e.g. in
25399 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
25400 # suppresses any "Segmentation fault" message there.  '((' could
25401 # trigger a bug in pdksh 5.2.14.
25402 for as_var in BASH_ENV ENV MAIL MAILPATH
25403 do eval test x\${$as_var+set} = xset \
25404   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25405 done
25406 PS1='$ '
25407 PS2='> '
25408 PS4='+ '
25409
25410 # NLS nuisances.
25411 LC_ALL=C
25412 export LC_ALL
25413 LANGUAGE=C
25414 export LANGUAGE
25415
25416 # CDPATH.
25417 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25418
25419
25420 # as_fn_error ERROR [LINENO LOG_FD]
25421 # ---------------------------------
25422 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25423 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
25424 # script with status $?, using 1 if that was 0.
25425 as_fn_error ()
25426 {
25427   as_status=$?; test $as_status -eq 0 && as_status=1
25428   if test "$3"; then
25429     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25430     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
25431   fi
25432   $as_echo "$as_me: error: $1" >&2
25433   as_fn_exit $as_status
25434 } # as_fn_error
25435
25436
25437 # as_fn_set_status STATUS
25438 # -----------------------
25439 # Set $? to STATUS, without forking.
25440 as_fn_set_status ()
25441 {
25442   return $1
25443 } # as_fn_set_status
25444
25445 # as_fn_exit STATUS
25446 # -----------------
25447 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25448 as_fn_exit ()
25449 {
25450   set +e
25451   as_fn_set_status $1
25452   exit $1
25453 } # as_fn_exit
25454
25455 # as_fn_unset VAR
25456 # ---------------
25457 # Portably unset VAR.
25458 as_fn_unset ()
25459 {
25460   { eval $1=; unset $1;}
25461 }
25462 as_unset=as_fn_unset
25463 # as_fn_append VAR VALUE
25464 # ----------------------
25465 # Append the text in VALUE to the end of the definition contained in VAR. Take
25466 # advantage of any shell optimizations that allow amortized linear growth over
25467 # repeated appends, instead of the typical quadratic growth present in naive
25468 # implementations.
25469 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25470   eval 'as_fn_append ()
25471   {
25472     eval $1+=\$2
25473   }'
25474 else
25475   as_fn_append ()
25476   {
25477     eval $1=\$$1\$2
25478   }
25479 fi # as_fn_append
25480
25481 # as_fn_arith ARG...
25482 # ------------------
25483 # Perform arithmetic evaluation on the ARGs, and store the result in the
25484 # global $as_val. Take advantage of shells that can avoid forks. The arguments
25485 # must be portable across $(()) and expr.
25486 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25487   eval 'as_fn_arith ()
25488   {
25489     as_val=$(( $* ))
25490   }'
25491 else
25492   as_fn_arith ()
25493   {
25494     as_val=`expr "$@" || test $? -eq 1`
25495   }
25496 fi # as_fn_arith
25497
25498
25499 if expr a : '\(a\)' >/dev/null 2>&1 &&
25500    test "X`expr 00001 : '.*\(...\)'`" = X001; then
25501   as_expr=expr
25502 else
25503   as_expr=false
25504 fi
25505
25506 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25507   as_basename=basename
25508 else
25509   as_basename=false
25510 fi
25511
25512 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25513   as_dirname=dirname
25514 else
25515   as_dirname=false
25516 fi
25517
25518 as_me=`$as_basename -- "$0" ||
25519 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25520          X"$0" : 'X\(//\)$' \| \
25521          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25522 $as_echo X/"$0" |
25523     sed '/^.*\/\([^/][^/]*\)\/*$/{
25524             s//\1/
25525             q
25526           }
25527           /^X\/\(\/\/\)$/{
25528             s//\1/
25529             q
25530           }
25531           /^X\/\(\/\).*/{
25532             s//\1/
25533             q
25534           }
25535           s/.*/./; q'`
25536
25537 # Avoid depending upon Character Ranges.
25538 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25539 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25540 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25541 as_cr_digits='0123456789'
25542 as_cr_alnum=$as_cr_Letters$as_cr_digits
25543
25544 ECHO_C= ECHO_N= ECHO_T=
25545 case `echo -n x` in #(((((
25546 -n*)
25547   case `echo 'xy\c'` in
25548   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
25549   xy)  ECHO_C='\c';;
25550   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
25551        ECHO_T=' ';;
25552   esac;;
25553 *)
25554   ECHO_N='-n';;
25555 esac
25556
25557 rm -f conf$$ conf$$.exe conf$$.file
25558 if test -d conf$$.dir; then
25559   rm -f conf$$.dir/conf$$.file
25560 else
25561   rm -f conf$$.dir
25562   mkdir conf$$.dir 2>/dev/null
25563 fi
25564 if (echo >conf$$.file) 2>/dev/null; then
25565   if ln -s conf$$.file conf$$ 2>/dev/null; then
25566     as_ln_s='ln -s'
25567     # ... but there are two gotchas:
25568     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25569     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25570     # In both cases, we have to default to `cp -p'.
25571     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25572       as_ln_s='cp -p'
25573   elif ln conf$$.file conf$$ 2>/dev/null; then
25574     as_ln_s=ln
25575   else
25576     as_ln_s='cp -p'
25577   fi
25578 else
25579   as_ln_s='cp -p'
25580 fi
25581 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25582 rmdir conf$$.dir 2>/dev/null
25583
25584
25585 # as_fn_mkdir_p
25586 # -------------
25587 # Create "$as_dir" as a directory, including parents if necessary.
25588 as_fn_mkdir_p ()
25589 {
25590
25591   case $as_dir in #(
25592   -*) as_dir=./$as_dir;;
25593   esac
25594   test -d "$as_dir" || eval $as_mkdir_p || {
25595     as_dirs=
25596     while :; do
25597       case $as_dir in #(
25598       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25599       *) as_qdir=$as_dir;;
25600       esac
25601       as_dirs="'$as_qdir' $as_dirs"
25602       as_dir=`$as_dirname -- "$as_dir" ||
25603 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25604          X"$as_dir" : 'X\(//\)[^/]' \| \
25605          X"$as_dir" : 'X\(//\)$' \| \
25606          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25607 $as_echo X"$as_dir" |
25608     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25609             s//\1/
25610             q
25611           }
25612           /^X\(\/\/\)[^/].*/{
25613             s//\1/
25614             q
25615           }
25616           /^X\(\/\/\)$/{
25617             s//\1/
25618             q
25619           }
25620           /^X\(\/\).*/{
25621             s//\1/
25622             q
25623           }
25624           s/.*/./; q'`
25625       test -d "$as_dir" && break
25626     done
25627     test -z "$as_dirs" || eval "mkdir $as_dirs"
25628   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
25629
25630
25631 } # as_fn_mkdir_p
25632 if mkdir -p . 2>/dev/null; then
25633   as_mkdir_p='mkdir -p "$as_dir"'
25634 else
25635   test -d ./-p && rmdir ./-p
25636   as_mkdir_p=false
25637 fi
25638
25639 if test -x / >/dev/null 2>&1; then
25640   as_test_x='test -x'
25641 else
25642   if ls -dL / >/dev/null 2>&1; then
25643     as_ls_L_option=L
25644   else
25645     as_ls_L_option=
25646   fi
25647   as_test_x='
25648     eval sh -c '\''
25649       if test -d "$1"; then
25650         test -d "$1/.";
25651       else
25652         case $1 in #(
25653         -*)set "./$1";;
25654         esac;
25655         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
25656         ???[sx]*):;;*)false;;esac;fi
25657     '\'' sh
25658   '
25659 fi
25660 as_executable_p=$as_test_x
25661
25662 # Sed expression to map a string onto a valid CPP name.
25663 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25664
25665 # Sed expression to map a string onto a valid variable name.
25666 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25667
25668
25669 exec 6>&1
25670 ## ----------------------------------- ##
25671 ## Main body of $CONFIG_STATUS script. ##
25672 ## ----------------------------------- ##
25673 _ASEOF
25674 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25675
25676 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25677 # Save the log message, to keep $0 and so on meaningful, and to
25678 # report actual input values of CONFIG_FILES etc. instead of their
25679 # values after options handling.
25680 ac_log="
25681 This file was extended by $as_me, which was
25682 generated by GNU Autoconf 2.65.  Invocation command line was
25683
25684   CONFIG_FILES    = $CONFIG_FILES
25685   CONFIG_HEADERS  = $CONFIG_HEADERS
25686   CONFIG_LINKS    = $CONFIG_LINKS
25687   CONFIG_COMMANDS = $CONFIG_COMMANDS
25688   $ $0 $@
25689
25690 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25691 "
25692
25693 _ACEOF
25694
25695 case $ac_config_files in *"
25696 "*) set x $ac_config_files; shift; ac_config_files=$*;;
25697 esac
25698
25699 case $ac_config_headers in *"
25700 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25701 esac
25702
25703
25704 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25705 # Files that config.status was made for.
25706 config_files="$ac_config_files"
25707 config_headers="$ac_config_headers"
25708 config_commands="$ac_config_commands"
25709
25710 _ACEOF
25711
25712 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25713 ac_cs_usage="\
25714 \`$as_me' instantiates files and other configuration actions
25715 from templates according to the current configuration.  Unless the files
25716 and actions are specified as TAGs, all are instantiated by default.
25717
25718 Usage: $0 [OPTION]... [TAG]...
25719
25720   -h, --help       print this help, then exit
25721   -V, --version    print version number and configuration settings, then exit
25722       --config     print configuration, then exit
25723   -q, --quiet, --silent
25724                    do not print progress messages
25725   -d, --debug      don't remove temporary files
25726       --recheck    update $as_me by reconfiguring in the same conditions
25727       --file=FILE[:TEMPLATE]
25728                    instantiate the configuration file FILE
25729       --header=FILE[:TEMPLATE]
25730                    instantiate the configuration header FILE
25731
25732 Configuration files:
25733 $config_files
25734
25735 Configuration headers:
25736 $config_headers
25737
25738 Configuration commands:
25739 $config_commands
25740
25741 Report bugs to <<http://www.openldap.org/its/>>."
25742
25743 _ACEOF
25744 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25745 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
25746 ac_cs_version="\\
25747 config.status
25748 configured by $0, generated by GNU Autoconf 2.65,
25749   with options \\"\$ac_cs_config\\"
25750
25751 Copyright (C) 2009 Free Software Foundation, Inc.
25752 This config.status script is free software; the Free Software Foundation
25753 gives unlimited permission to copy, distribute and modify it."
25754
25755 ac_pwd='$ac_pwd'
25756 srcdir='$srcdir'
25757 INSTALL='$INSTALL'
25758 AWK='$AWK'
25759 test -n "\$AWK" || AWK=awk
25760 _ACEOF
25761
25762 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25763 # The default lists apply if the user does not specify any file.
25764 ac_need_defaults=:
25765 while test $# != 0
25766 do
25767   case $1 in
25768   --*=*)
25769     ac_option=`expr "X$1" : 'X\([^=]*\)='`
25770     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25771     ac_shift=:
25772     ;;
25773   *)
25774     ac_option=$1
25775     ac_optarg=$2
25776     ac_shift=shift
25777     ;;
25778   esac
25779
25780   case $ac_option in
25781   # Handling of the options.
25782   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25783     ac_cs_recheck=: ;;
25784   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25785     $as_echo "$ac_cs_version"; exit ;;
25786   --config | --confi | --conf | --con | --co | --c )
25787     $as_echo "$ac_cs_config"; exit ;;
25788   --debug | --debu | --deb | --de | --d | -d )
25789     debug=: ;;
25790   --file | --fil | --fi | --f )
25791     $ac_shift
25792     case $ac_optarg in
25793     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25794     esac
25795     as_fn_append CONFIG_FILES " '$ac_optarg'"
25796     ac_need_defaults=false;;
25797   --header | --heade | --head | --hea )
25798     $ac_shift
25799     case $ac_optarg in
25800     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25801     esac
25802     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25803     ac_need_defaults=false;;
25804   --he | --h)
25805     # Conflict between --help and --header
25806     as_fn_error "ambiguous option: \`$1'
25807 Try \`$0 --help' for more information.";;
25808   --help | --hel | -h )
25809     $as_echo "$ac_cs_usage"; exit ;;
25810   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25811   | -silent | --silent | --silen | --sile | --sil | --si | --s)
25812     ac_cs_silent=: ;;
25813
25814   # This is an error.
25815   -*) as_fn_error "unrecognized option: \`$1'
25816 Try \`$0 --help' for more information." ;;
25817
25818   *) as_fn_append ac_config_targets " $1"
25819      ac_need_defaults=false ;;
25820
25821   esac
25822   shift
25823 done
25824
25825 ac_configure_extra_args=
25826
25827 if $ac_cs_silent; then
25828   exec 6>/dev/null
25829   ac_configure_extra_args="$ac_configure_extra_args --silent"
25830 fi
25831
25832 _ACEOF
25833 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25834 if \$ac_cs_recheck; then
25835   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25836   shift
25837   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25838   CONFIG_SHELL='$SHELL'
25839   export CONFIG_SHELL
25840   exec "\$@"
25841 fi
25842
25843 _ACEOF
25844 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25845 exec 5>>config.log
25846 {
25847   echo
25848   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25849 ## Running $as_me. ##
25850 _ASBOX
25851   $as_echo "$ac_log"
25852 } >&5
25853
25854 _ACEOF
25855 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25856 #
25857 # INIT-COMMANDS
25858 #
25859 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25860
25861 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25862 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
25863
25864
25865 _ACEOF
25866
25867 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25868
25869 # Handling of arguments.
25870 for ac_config_target in $ac_config_targets
25871 do
25872   case $ac_config_target in
25873     "include/portable.h") CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
25874     "include/ldap_features.h") CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
25875     "include/lber_types.h") CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
25876     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25877     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
25878     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
25879     "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
25880     "doc/man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
25881     "doc/man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
25882     "doc/man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
25883     "doc/man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
25884     "clients/Makefile") CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
25885     "clients/tools/Makefile") CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
25886     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
25887     "libraries/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
25888     "libraries/liblber/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25889     "libraries/libldap/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25890     "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" ;;
25891     "libraries/liblunicode/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25892     "libraries/liblutil/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25893     "libraries/librewrite/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25894     "servers/Makefile") CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
25895     "servers/slapd/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
25896     "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" ;;
25897     "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" ;;
25898     "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" ;;
25899     "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" ;;
25900     "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" ;;
25901     "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" ;;
25902     "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" ;;
25903     "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" ;;
25904     "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" ;;
25905     "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" ;;
25906     "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" ;;
25907     "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" ;;
25908     "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" ;;
25909     "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" ;;
25910     "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" ;;
25911     "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" ;;
25912     "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" ;;
25913     "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" ;;
25914     "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" ;;
25915     "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" ;;
25916     "servers/slapd/overlays/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
25917     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
25918     "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;;
25919     "tests/progs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
25920     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25921
25922   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25923   esac
25924 done
25925
25926
25927 # If the user did not use the arguments to specify the items to instantiate,
25928 # then the envvar interface is used.  Set only those that are not.
25929 # We use the long form for the default assignment because of an extremely
25930 # bizarre bug on SunOS 4.1.3.
25931 if $ac_need_defaults; then
25932   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25933   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25934   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25935 fi
25936
25937 # Have a temporary directory for convenience.  Make it in the build tree
25938 # simply because there is no reason against having it here, and in addition,
25939 # creating and moving files from /tmp can sometimes cause problems.
25940 # Hook for its removal unless debugging.
25941 # Note that there is a small window in which the directory will not be cleaned:
25942 # after its creation but before its name has been assigned to `$tmp'.
25943 $debug ||
25944 {
25945   tmp=
25946   trap 'exit_status=$?
25947   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25948 ' 0
25949   trap 'as_fn_exit 1' 1 2 13 15
25950 }
25951 # Create a (secure) tmp directory for tmp files.
25952
25953 {
25954   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25955   test -n "$tmp" && test -d "$tmp"
25956 }  ||
25957 {
25958   tmp=./conf$$-$RANDOM
25959   (umask 077 && mkdir "$tmp")
25960 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25961
25962 # Set up the scripts for CONFIG_FILES section.
25963 # No need to generate them if there are no CONFIG_FILES.
25964 # This happens for instance with `./config.status config.h'.
25965 if test -n "$CONFIG_FILES"; then
25966
25967
25968 ac_cr=`echo X | tr X '\015'`
25969 # On cygwin, bash can eat \r inside `` if the user requested igncr.
25970 # But we know of no other shell where ac_cr would be empty at this
25971 # point, so we can use a bashism as a fallback.
25972 if test "x$ac_cr" = x; then
25973   eval ac_cr=\$\'\\r\'
25974 fi
25975 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25976 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25977   ac_cs_awk_cr='\r'
25978 else
25979   ac_cs_awk_cr=$ac_cr
25980 fi
25981
25982 echo 'BEGIN {' >"$tmp/subs1.awk" &&
25983 _ACEOF
25984
25985
25986 {
25987   echo "cat >conf$$subs.awk <<_ACEOF" &&
25988   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25989   echo "_ACEOF"
25990 } >conf$$subs.sh ||
25991   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25992 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25993 ac_delim='%!_!# '
25994 for ac_last_try in false false false false false :; do
25995   . ./conf$$subs.sh ||
25996     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25997
25998   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25999   if test $ac_delim_n = $ac_delim_num; then
26000     break
26001   elif $ac_last_try; then
26002     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
26003   else
26004     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26005   fi
26006 done
26007 rm -f conf$$subs.sh
26008
26009 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26010 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
26011 _ACEOF
26012 sed -n '
26013 h
26014 s/^/S["/; s/!.*/"]=/
26015 p
26016 g
26017 s/^[^!]*!//
26018 :repl
26019 t repl
26020 s/'"$ac_delim"'$//
26021 t delim
26022 :nl
26023 h
26024 s/\(.\{148\}\)..*/\1/
26025 t more1
26026 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26027 p
26028 n
26029 b repl
26030 :more1
26031 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26032 p
26033 g
26034 s/.\{148\}//
26035 t nl
26036 :delim
26037 h
26038 s/\(.\{148\}\)..*/\1/
26039 t more2
26040 s/["\\]/\\&/g; s/^/"/; s/$/"/
26041 p
26042 b
26043 :more2
26044 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26045 p
26046 g
26047 s/.\{148\}//
26048 t delim
26049 ' <conf$$subs.awk | sed '
26050 /^[^""]/{
26051   N
26052   s/\n//
26053 }
26054 ' >>$CONFIG_STATUS || ac_write_fail=1
26055 rm -f conf$$subs.awk
26056 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26057 _ACAWK
26058 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
26059   for (key in S) S_is_set[key] = 1
26060   FS = "\a"
26061
26062 }
26063 {
26064   line = $ 0
26065   nfields = split(line, field, "@")
26066   substed = 0
26067   len = length(field[1])
26068   for (i = 2; i < nfields; i++) {
26069     key = field[i]
26070     keylen = length(key)
26071     if (S_is_set[key]) {
26072       value = S[key]
26073       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26074       len += length(value) + length(field[++i])
26075       substed = 1
26076     } else
26077       len += 1 + keylen
26078   }
26079
26080   print line
26081 }
26082
26083 _ACAWK
26084 _ACEOF
26085 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26086 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26087   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26088 else
26089   cat
26090 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
26091   || as_fn_error "could not setup config files machinery" "$LINENO" 5
26092 _ACEOF
26093
26094 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26095 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26096 # trailing colons and then remove the whole line if VPATH becomes empty
26097 # (actually we leave an empty line to preserve line numbers).
26098 if test "x$srcdir" = x.; then
26099   ac_vpsub='/^[  ]*VPATH[        ]*=/{
26100 s/:*\$(srcdir):*/:/
26101 s/:*\${srcdir}:*/:/
26102 s/:*@srcdir@:*/:/
26103 s/^\([^=]*=[     ]*\):*/\1/
26104 s/:*$//
26105 s/^[^=]*=[       ]*$//
26106 }'
26107 fi
26108
26109 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26110 fi # test -n "$CONFIG_FILES"
26111
26112 # Set up the scripts for CONFIG_HEADERS section.
26113 # No need to generate them if there are no CONFIG_HEADERS.
26114 # This happens for instance with `./config.status Makefile'.
26115 if test -n "$CONFIG_HEADERS"; then
26116 cat >"$tmp/defines.awk" <<\_ACAWK ||
26117 BEGIN {
26118 _ACEOF
26119
26120 # Transform confdefs.h into an awk script `defines.awk', embedded as
26121 # here-document in config.status, that substitutes the proper values into
26122 # config.h.in to produce config.h.
26123
26124 # Create a delimiter string that does not exist in confdefs.h, to ease
26125 # handling of long lines.
26126 ac_delim='%!_!# '
26127 for ac_last_try in false false :; do
26128   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
26129   if test -z "$ac_t"; then
26130     break
26131   elif $ac_last_try; then
26132     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
26133   else
26134     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26135   fi
26136 done
26137
26138 # For the awk script, D is an array of macro values keyed by name,
26139 # likewise P contains macro parameters if any.  Preserve backslash
26140 # newline sequences.
26141
26142 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26143 sed -n '
26144 s/.\{148\}/&'"$ac_delim"'/g
26145 t rset
26146 :rset
26147 s/^[     ]*#[    ]*define[       ][      ]*/ /
26148 t def
26149 d
26150 :def
26151 s/\\$//
26152 t bsnl
26153 s/["\\]/\\&/g
26154 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
26155 D["\1"]=" \3"/p
26156 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
26157 d
26158 :bsnl
26159 s/["\\]/\\&/g
26160 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
26161 D["\1"]=" \3\\\\\\n"\\/p
26162 t cont
26163 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26164 t cont
26165 d
26166 :cont
26167 n
26168 s/.\{148\}/&'"$ac_delim"'/g
26169 t clear
26170 :clear
26171 s/\\$//
26172 t bsnlc
26173 s/["\\]/\\&/g; s/^/"/; s/$/"/p
26174 d
26175 :bsnlc
26176 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26177 b cont
26178 ' <confdefs.h | sed '
26179 s/'"$ac_delim"'/"\\\
26180 "/g' >>$CONFIG_STATUS || ac_write_fail=1
26181
26182 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26183   for (key in D) D_is_set[key] = 1
26184   FS = "\a"
26185 }
26186 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26187   line = \$ 0
26188   split(line, arg, " ")
26189   if (arg[1] == "#") {
26190     defundef = arg[2]
26191     mac1 = arg[3]
26192   } else {
26193     defundef = substr(arg[1], 2)
26194     mac1 = arg[2]
26195   }
26196   split(mac1, mac2, "(") #)
26197   macro = mac2[1]
26198   prefix = substr(line, 1, index(line, defundef) - 1)
26199   if (D_is_set[macro]) {
26200     # Preserve the white space surrounding the "#".
26201     print prefix "define", macro P[macro] D[macro]
26202     next
26203   } else {
26204     # Replace #undef with comments.  This is necessary, for example,
26205     # in the case of _POSIX_SOURCE, which is predefined and required
26206     # on some systems where configure will not decide to define it.
26207     if (defundef == "undef") {
26208       print "/*", prefix defundef, macro, "*/"
26209       next
26210     }
26211   }
26212 }
26213 { print }
26214 _ACAWK
26215 _ACEOF
26216 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26217   as_fn_error "could not setup config headers machinery" "$LINENO" 5
26218 fi # test -n "$CONFIG_HEADERS"
26219
26220
26221 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
26222 shift
26223 for ac_tag
26224 do
26225   case $ac_tag in
26226   :[FHLC]) ac_mode=$ac_tag; continue;;
26227   esac
26228   case $ac_mode$ac_tag in
26229   :[FHL]*:*);;
26230   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
26231   :[FH]-) ac_tag=-:-;;
26232   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26233   esac
26234   ac_save_IFS=$IFS
26235   IFS=:
26236   set x $ac_tag
26237   IFS=$ac_save_IFS
26238   shift
26239   ac_file=$1
26240   shift
26241
26242   case $ac_mode in
26243   :L) ac_source=$1;;
26244   :[FH])
26245     ac_file_inputs=
26246     for ac_f
26247     do
26248       case $ac_f in
26249       -) ac_f="$tmp/stdin";;
26250       *) # Look for the file first in the build tree, then in the source tree
26251          # (if the path is not absolute).  The absolute path cannot be DOS-style,
26252          # because $ac_f cannot contain `:'.
26253          test -f "$ac_f" ||
26254            case $ac_f in
26255            [\\/$]*) false;;
26256            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26257            esac ||
26258            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
26259       esac
26260       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26261       as_fn_append ac_file_inputs " '$ac_f'"
26262     done
26263
26264     # Let's still pretend it is `configure' which instantiates (i.e., don't
26265     # use $as_me), people would be surprised to read:
26266     #    /* config.h.  Generated by config.status.  */
26267     configure_input='Generated from '`
26268           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26269         `' by configure.'
26270     if test x"$ac_file" != x-; then
26271       configure_input="$ac_file.  $configure_input"
26272       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
26273 $as_echo "$as_me: creating $ac_file" >&6;}
26274     fi
26275     # Neutralize special characters interpreted by sed in replacement strings.
26276     case $configure_input in #(
26277     *\&* | *\|* | *\\* )
26278        ac_sed_conf_input=`$as_echo "$configure_input" |
26279        sed 's/[\\\\&|]/\\\\&/g'`;; #(
26280     *) ac_sed_conf_input=$configure_input;;
26281     esac
26282
26283     case $ac_tag in
26284     *:-:* | *:-) cat >"$tmp/stdin" \
26285       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
26286     esac
26287     ;;
26288   esac
26289
26290   ac_dir=`$as_dirname -- "$ac_file" ||
26291 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26292          X"$ac_file" : 'X\(//\)[^/]' \| \
26293          X"$ac_file" : 'X\(//\)$' \| \
26294          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26295 $as_echo X"$ac_file" |
26296     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26297             s//\1/
26298             q
26299           }
26300           /^X\(\/\/\)[^/].*/{
26301             s//\1/
26302             q
26303           }
26304           /^X\(\/\/\)$/{
26305             s//\1/
26306             q
26307           }
26308           /^X\(\/\).*/{
26309             s//\1/
26310             q
26311           }
26312           s/.*/./; q'`
26313   as_dir="$ac_dir"; as_fn_mkdir_p
26314   ac_builddir=.
26315
26316 case "$ac_dir" in
26317 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26318 *)
26319   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
26320   # A ".." for each directory in $ac_dir_suffix.
26321   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
26322   case $ac_top_builddir_sub in
26323   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26324   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26325   esac ;;
26326 esac
26327 ac_abs_top_builddir=$ac_pwd
26328 ac_abs_builddir=$ac_pwd$ac_dir_suffix
26329 # for backward compatibility:
26330 ac_top_builddir=$ac_top_build_prefix
26331
26332 case $srcdir in
26333   .)  # We are building in place.
26334     ac_srcdir=.
26335     ac_top_srcdir=$ac_top_builddir_sub
26336     ac_abs_top_srcdir=$ac_pwd ;;
26337   [\\/]* | ?:[\\/]* )  # Absolute name.
26338     ac_srcdir=$srcdir$ac_dir_suffix;
26339     ac_top_srcdir=$srcdir
26340     ac_abs_top_srcdir=$srcdir ;;
26341   *) # Relative name.
26342     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26343     ac_top_srcdir=$ac_top_build_prefix$srcdir
26344     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
26345 esac
26346 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
26347
26348
26349   case $ac_mode in
26350   :F)
26351   #
26352   # CONFIG_FILE
26353   #
26354
26355   case $INSTALL in
26356   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26357   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
26358   esac
26359 _ACEOF
26360
26361 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26362 # If the template does not know about datarootdir, expand it.
26363 # FIXME: This hack should be removed a few years after 2.60.
26364 ac_datarootdir_hack=; ac_datarootdir_seen=
26365 ac_sed_dataroot='
26366 /datarootdir/ {
26367   p
26368   q
26369 }
26370 /@datadir@/p
26371 /@docdir@/p
26372 /@infodir@/p
26373 /@localedir@/p
26374 /@mandir@/p'
26375 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26376 *datarootdir*) ac_datarootdir_seen=yes;;
26377 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26378   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26379 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26380 _ACEOF
26381 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26382   ac_datarootdir_hack='
26383   s&@datadir@&$datadir&g
26384   s&@docdir@&$docdir&g
26385   s&@infodir@&$infodir&g
26386   s&@localedir@&$localedir&g
26387   s&@mandir@&$mandir&g
26388   s&\\\${datarootdir}&$datarootdir&g' ;;
26389 esac
26390 _ACEOF
26391
26392 # Neutralize VPATH when `$srcdir' = `.'.
26393 # Shell code in configure.ac might set extrasub.
26394 # FIXME: do we really want to maintain this feature?
26395 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26396 ac_sed_extra="$ac_vpsub
26397 $extrasub
26398 _ACEOF
26399 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26400 :t
26401 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26402 s|@configure_input@|$ac_sed_conf_input|;t t
26403 s&@top_builddir@&$ac_top_builddir_sub&;t t
26404 s&@top_build_prefix@&$ac_top_build_prefix&;t t
26405 s&@srcdir@&$ac_srcdir&;t t
26406 s&@abs_srcdir@&$ac_abs_srcdir&;t t
26407 s&@top_srcdir@&$ac_top_srcdir&;t t
26408 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26409 s&@builddir@&$ac_builddir&;t t
26410 s&@abs_builddir@&$ac_abs_builddir&;t t
26411 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26412 s&@INSTALL@&$ac_INSTALL&;t t
26413 $ac_datarootdir_hack
26414 "
26415 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
26416   || as_fn_error "could not create $ac_file" "$LINENO" 5
26417
26418 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26419   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26420   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26421   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26422 which seems to be undefined.  Please make sure it is defined." >&5
26423 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26424 which seems to be undefined.  Please make sure it is defined." >&2;}
26425
26426   rm -f "$tmp/stdin"
26427   case $ac_file in
26428   -) cat "$tmp/out" && rm -f "$tmp/out";;
26429   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
26430   esac \
26431   || as_fn_error "could not create $ac_file" "$LINENO" 5
26432  ;;
26433   :H)
26434   #
26435   # CONFIG_HEADER
26436   #
26437   if test x"$ac_file" != x-; then
26438     {
26439       $as_echo "/* $configure_input  */" \
26440       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
26441     } >"$tmp/config.h" \
26442       || as_fn_error "could not create $ac_file" "$LINENO" 5
26443     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
26444       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26445 $as_echo "$as_me: $ac_file is unchanged" >&6;}
26446     else
26447       rm -f "$ac_file"
26448       mv "$tmp/config.h" "$ac_file" \
26449         || as_fn_error "could not create $ac_file" "$LINENO" 5
26450     fi
26451   else
26452     $as_echo "/* $configure_input  */" \
26453       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
26454       || as_fn_error "could not create -" "$LINENO" 5
26455   fi
26456 # Compute "$ac_file"'s index in $config_headers.
26457 _am_stamp_count=1
26458 for _am_header in $config_headers :; do
26459   case $_am_header in
26460     "$ac_file" | "$ac_file":* )
26461       break ;;
26462     * )
26463       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26464   esac
26465 done
26466 echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
26467 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26468          X"$ac_file" : 'X\(//\)[^/]' \| \
26469          X"$ac_file" : 'X\(//\)$' \| \
26470          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26471 $as_echo X"$ac_file" |
26472     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26473             s//\1/
26474             q
26475           }
26476           /^X\(\/\/\)[^/].*/{
26477             s//\1/
26478             q
26479           }
26480           /^X\(\/\/\)$/{
26481             s//\1/
26482             q
26483           }
26484           /^X\(\/\).*/{
26485             s//\1/
26486             q
26487           }
26488           s/.*/./; q'`/stamp-h$_am_stamp_count
26489  ;;
26490
26491   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26492 $as_echo "$as_me: executing $ac_file commands" >&6;}
26493  ;;
26494   esac
26495
26496
26497   case $ac_file$ac_mode in
26498     "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
26499   # Strip MF so we end up with the name of the file.
26500   mf=`echo "$mf" | sed -e 's/:.*$//'`
26501   # Check whether this is an Automake generated Makefile or not.
26502   # We used to match only the files named `Makefile.in', but
26503   # some people rename them; so instead we look at the file content.
26504   # Grep'ing the first line is not enough: some people post-process
26505   # each Makefile.in and add a new line on top of each file to say so.
26506   # So let's grep whole file.
26507   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
26508     dirpart=`$as_dirname -- "$mf" ||
26509 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26510          X"$mf" : 'X\(//\)[^/]' \| \
26511          X"$mf" : 'X\(//\)$' \| \
26512          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
26513 $as_echo X"$mf" |
26514     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26515             s//\1/
26516             q
26517           }
26518           /^X\(\/\/\)[^/].*/{
26519             s//\1/
26520             q
26521           }
26522           /^X\(\/\/\)$/{
26523             s//\1/
26524             q
26525           }
26526           /^X\(\/\).*/{
26527             s//\1/
26528             q
26529           }
26530           s/.*/./; q'`
26531   else
26532     continue
26533   fi
26534   # Extract the definition of DEPDIR, am__include, and am__quote
26535   # from the Makefile without running `make'.
26536   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
26537   test -z "$DEPDIR" && continue
26538   am__include=`sed -n 's/^am__include = //p' < "$mf"`
26539   test -z "am__include" && continue
26540   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
26541   # When using ansi2knr, U may be empty or an underscore; expand it
26542   U=`sed -n 's/^U = //p' < "$mf"`
26543   # Find all dependency output files, they are included files with
26544   # $(DEPDIR) in their names.  We invoke sed twice because it is the
26545   # simplest approach to changing $(DEPDIR) to its actual value in the
26546   # expansion.
26547   for file in `sed -n "
26548     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
26549        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
26550     # Make sure the directory exists.
26551     test -f "$dirpart/$file" && continue
26552     fdir=`$as_dirname -- "$file" ||
26553 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26554          X"$file" : 'X\(//\)[^/]' \| \
26555          X"$file" : 'X\(//\)$' \| \
26556          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
26557 $as_echo X"$file" |
26558     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26559             s//\1/
26560             q
26561           }
26562           /^X\(\/\/\)[^/].*/{
26563             s//\1/
26564             q
26565           }
26566           /^X\(\/\/\)$/{
26567             s//\1/
26568             q
26569           }
26570           /^X\(\/\).*/{
26571             s//\1/
26572             q
26573           }
26574           s/.*/./; q'`
26575     as_dir=$dirpart/$fdir; as_fn_mkdir_p
26576     # echo "creating $dirpart/$file"
26577     echo '# dummy' > "$dirpart/$file"
26578   done
26579 done
26580  ;;
26581     "default":C)
26582 chmod +x tests/run
26583 date > stamp-h
26584 BACKENDSC="servers/slapd/backends.c"
26585 echo "Making $BACKENDSC"
26586 rm -f $BACKENDSC
26587 cat > $BACKENDSC << ENDX
26588 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26589  *
26590  * Copyright 1998-2018 The OpenLDAP Foundation.
26591  * All rights reserved.
26592  *
26593  * Redistribution and use in source and binary forms, with or without
26594  * modification, are permitted only as authorized by the OpenLDAP
26595  * Public License.
26596  *
26597  * A copy of this license is available in the file LICENSE in the
26598  * top-level directory of the distribution or, alternatively, at
26599  * <http://www.OpenLDAP.org/license.html>.
26600  */
26601 /* This file is automatically generated by configure; please do not edit. */
26602
26603 #include "portable.h"
26604 #include "slap.h"
26605
26606 ENDX
26607 if test "${STATIC_BACKENDS}"; then
26608         for b in config ${STATIC_BACKENDS}; do
26609                 bb=`echo "${b}" | sed -e 's/back-//'`
26610                 cat >> $BACKENDSC << ENDX
26611 extern BI_init ${bb}_back_initialize;
26612 ENDX
26613         done
26614
26615         cat >> $BACKENDSC << ENDX
26616
26617 BackendInfo slap_binfo[] = {
26618 ENDX
26619
26620         for b in config ${STATIC_BACKENDS}; do
26621                 bb=`echo "${b}" | sed -e 's/back-//'`
26622                 echo "    Add ${bb} ..."
26623                 cat >> $BACKENDSC << ENDX
26624         { "${bb}", ${bb}_back_initialize },
26625 ENDX
26626         done
26627
26628         cat >> $BACKENDSC << ENDX
26629         { NULL, NULL },
26630 };
26631
26632 /* end of generated file */
26633 ENDX
26634 fi
26635 OVERLAYSC="servers/slapd/overlays/statover.c"
26636 echo "Making $OVERLAYSC"
26637 rm -f $OVERLAYSC
26638 cat > $OVERLAYSC << ENDX
26639 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26640  *
26641  * Copyright 1998-2018 The OpenLDAP Foundation.
26642  * All rights reserved.
26643  *
26644  * Redistribution and use in source and binary forms, with or without
26645  * modification, are permitted only as authorized by the OpenLDAP
26646  * Public License.
26647  *
26648  * A copy of this license is available in the file LICENSE in the
26649  * top-level directory of the distribution or, alternatively, at
26650  * <http://www.OpenLDAP.org/license.html>.
26651  */
26652 /* This file is automatically generated by configure; please do not edit. */
26653
26654 #include "portable.h"
26655 #include "slap.h"
26656
26657 ENDX
26658 if test "${STATIC_OVERLAYS}"; then
26659         for o in ${STATIC_OVERLAYS}; do
26660                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26661                 cat >> $OVERLAYSC << ENDX
26662 extern OV_init ${oo}_initialize;
26663 ENDX
26664         done
26665 fi
26666
26667 cat >> $OVERLAYSC << ENDX
26668
26669 OverlayInit slap_oinfo[] = {
26670 ENDX
26671
26672 if test "${STATIC_OVERLAYS}"; then
26673         for o in ${STATIC_OVERLAYS}; do
26674                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26675                 echo "    Add ${oo} ..."
26676                 cat >> $OVERLAYSC << ENDX
26677         { "${oo}", ${oo}_initialize },
26678 ENDX
26679         done
26680 fi
26681
26682         cat >> $OVERLAYSC << ENDX
26683         { NULL, NULL },
26684 };
26685
26686 /* end of generated file */
26687 ENDX
26688
26689 if test "${ol_cv_mkdep}" = no; then
26690         echo '(Do not "make depend"; we do not know how to build dependencies)'
26691 else
26692         echo 'Please run "make depend" to build dependencies'
26693 fi
26694  ;;
26695
26696   esac
26697 done # for ac_tag
26698
26699
26700 as_fn_exit 0
26701 _ACEOF
26702 ac_clean_files=$ac_clean_files_save
26703
26704 test $ac_write_fail = 0 ||
26705   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
26706
26707
26708 # configure is writing to config.log, and then calls config.status.
26709 # config.status does its own redirection, appending to config.log.
26710 # Unfortunately, on DOS this fails, as config.log is still kept open
26711 # by configure, so config.status won't be able to write to it; its
26712 # output is simply discarded.  So we exec the FD to /dev/null,
26713 # effectively closing config.log, so it can be properly (re)opened and
26714 # appended to by config.status.  When coming back to configure, we
26715 # need to make the FD available again.
26716 if test "$no_create" != yes; then
26717   ac_cs_success=:
26718   ac_config_status_args=
26719   test "$silent" = yes &&
26720     ac_config_status_args="$ac_config_status_args --quiet"
26721   exec 5>/dev/null
26722   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26723   exec 5>>config.log
26724   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26725   # would make configure fail if this is the last instruction.
26726   $ac_cs_success || as_fn_exit $?
26727 fi
26728 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26729   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26730 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26731 fi
26732