]> git.sur5r.net Git - openldap/blob - configure
Update configure for git
[openldap] / configure
1 #! /bin/sh
2 # From configure.in Id: 1d573e0701efe896a879cfcd059811288c28befa .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.65.
5 #
6 # Copyright 1998-2011 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 SLAPD_SQL_INCLUDES
753 SLAPD_SQL_LIBS
754 SLAPD_SQL_LDFLAGS
755 SLAPD_GMP_LIBS
756 SLAPD_SLP_LIBS
757 ICU_LIBS
758 AUTH_LIBS
759 LIBSLAPITOOLS
760 LIBSLAPI
761 SLAPI_LIBS
762 MODULES_LIBS
763 TLS_LIBS
764 SASL_LIBS
765 KRB5_LIBS
766 KRB4_LIBS
767 MOD_PERL_LDFLAGS
768 SLAPD_PERL_LDFLAGS
769 PERL_CPPFLAGS
770 SLAPD_DYNAMIC_OVERLAYS
771 SLAPD_STATIC_OVERLAYS
772 SLAPD_DYNAMIC_BACKENDS
773 SLAPD_STATIC_BACKENDS
774 SLAPD_NO_STATIC
775 SLAPD_MODULES_LDFLAGS
776 SLAPD_MODULES_CPPFLAGS
777 WRAP_LIBS
778 LUTIL_LIBS
779 LTHREAD_LIBS
780 SLAPD_NDB_INCS
781 SLAPD_NDB_LIBS
782 BDB_LIBS
783 SLAPD_LIBS
784 LDAP_LIBS
785 BUILD_VALSORT
786 BUILD_UNIQUE
787 BUILD_TRANSLUCENT
788 BUILD_SYNCPROV
789 BUILD_SSSVLV
790 BUILD_SEQMOD
791 BUILD_RWM
792 BUILD_RETCODE
793 BUILD_REFINT
794 BUILD_PROXYCACHE
795 BUILD_PPOLICY
796 BUILD_MEMBEROF
797 BUILD_LASTMOD
798 BUILD_DYNLIST
799 BUILD_DYNGROUP
800 BUILD_DEREF
801 BUILD_DENYOP
802 BUILD_DDS
803 BUILD_CONSTRAINT
804 BUILD_COLLECT
805 BUILD_AUDITLOG
806 BUILD_ACCESSLOG
807 BUILD_SQL
808 BUILD_SOCK
809 BUILD_SHELL
810 BUILD_PERL
811 BUILD_RELAY
812 BUILD_PASSWD
813 BUILD_NULL
814 BUILD_NDB
815 BUILD_MONITOR
816 BUILD_META
817 BUILD_LDAP
818 BUILD_HDB
819 BUILD_DNSSRV
820 BUILD_BDB
821 SLAPD_SLAPI_DEPEND
822 BUILD_SLAPI
823 BUILD_SLAPD
824 BUILD_LIBS_DYNAMIC
825 BUILD_THREAD
826 WITH_ACI_ENABLED
827 WITH_MODULES_ENABLED
828 WITH_TLS
829 WITH_SASL
830 PLAT
831 LIBSRCS
832 LIBOBJS
833 MYSQL
834 LTSTATIC
835 OL_MKDEP_FLAGS
836 OL_MKDEP
837 PERLBIN
838 LIBTOOL
839 CPP
840 OBJDUMP
841 AS
842 DLLTOOL
843 RANLIB
844 ECHO
845 LN_S
846 EGREP
847 GREP
848 am__fastdepCC_FALSE
849 am__fastdepCC_TRUE
850 CCDEPMODE
851 AMDEPBACKSLASH
852 AMDEP_FALSE
853 AMDEP_TRUE
854 am__quote
855 am__include
856 DEPDIR
857 OBJEXT
858 EXEEXT
859 ac_ct_CC
860 CPPFLAGS
861 LDFLAGS
862 CFLAGS
863 AR
864 CC
865 ldap_subdir
866 top_builddir
867 OPENLDAP_RELEASE_DATE
868 OPENLDAP_LIBVERSION
869 OPENLDAP_LIBRELEASE
870 am__untar
871 am__tar
872 AMTAR
873 am__leading_dot
874 SET_MAKE
875 AWK
876 mkdir_p
877 INSTALL_STRIP_PROGRAM
878 STRIP
879 install_sh
880 MAKEINFO
881 AUTOHEADER
882 AUTOMAKE
883 AUTOCONF
884 ACLOCAL
885 VERSION
886 PACKAGE
887 CYGPATH_W
888 INSTALL_DATA
889 INSTALL_SCRIPT
890 INSTALL_PROGRAM
891 target_os
892 target_vendor
893 target_cpu
894 target
895 host_os
896 host_vendor
897 host_cpu
898 host
899 build_os
900 build_vendor
901 build_cpu
902 build
903 target_alias
904 host_alias
905 build_alias
906 LIBS
907 ECHO_T
908 ECHO_N
909 ECHO_C
910 DEFS
911 mandir
912 localedir
913 libdir
914 psdir
915 pdfdir
916 dvidir
917 htmldir
918 infodir
919 docdir
920 oldincludedir
921 includedir
922 localstatedir
923 sharedstatedir
924 sysconfdir
925 datadir
926 datarootdir
927 libexecdir
928 sbindir
929 bindir
930 program_transform_name
931 prefix
932 exec_prefix
933 PACKAGE_URL
934 PACKAGE_BUGREPORT
935 PACKAGE_STRING
936 PACKAGE_VERSION
937 PACKAGE_TARNAME
938 PACKAGE_NAME
939 PATH_SEPARATOR
940 SHELL'
941 ac_subst_files=''
942 ac_user_opts='
943 enable_option_checking
944 with_subdir
945 enable_debug
946 enable_dynamic
947 enable_syslog
948 enable_proctitle
949 enable_ipv6
950 enable_local
951 with_cyrus_sasl
952 with_fetch
953 with_threads
954 with_tls
955 with_yielding_select
956 with_mp
957 with_odbc
958 enable_xxslapdoptions
959 enable_slapd
960 enable_dynacl
961 enable_aci
962 enable_cleartext
963 enable_crypt
964 enable_lmpasswd
965 enable_spasswd
966 enable_modules
967 enable_rewrite
968 enable_rlookups
969 enable_slapi
970 enable_slp
971 enable_wrappers
972 enable_xxslapbackends
973 enable_backends
974 enable_bdb
975 enable_dnssrv
976 enable_hdb
977 enable_ldap
978 enable_meta
979 enable_monitor
980 enable_ndb
981 enable_null
982 enable_passwd
983 enable_perl
984 enable_relay
985 enable_shell
986 enable_sock
987 enable_sql
988 enable_xxslapoverlays
989 enable_overlays
990 enable_accesslog
991 enable_auditlog
992 enable_collect
993 enable_constraint
994 enable_dds
995 enable_deref
996 enable_dyngroup
997 enable_dynlist
998 enable_memberof
999 enable_ppolicy
1000 enable_proxycache
1001 enable_refint
1002 enable_retcode
1003 enable_rwm
1004 enable_seqmod
1005 enable_sssvlv
1006 enable_syncprov
1007 enable_translucent
1008 enable_unique
1009 enable_valsort
1010 enable_xxliboptions
1011 enable_static
1012 enable_shared
1013 enable_fast_install
1014 enable_dependency_tracking
1015 with_gnu_ld
1016 enable_libtool_lock
1017 with_pic
1018 with_tags
1019 with_xxinstall
1020 '
1021       ac_precious_vars='build_alias
1022 host_alias
1023 target_alias
1024 CC
1025 CFLAGS
1026 LDFLAGS
1027 LIBS
1028 CPPFLAGS
1029 CPP'
1030
1031
1032 # Initialize some variables set by options.
1033 ac_init_help=
1034 ac_init_version=false
1035 ac_unrecognized_opts=
1036 ac_unrecognized_sep=
1037 # The variables have the same names as the options, with
1038 # dashes changed to underlines.
1039 cache_file=/dev/null
1040 exec_prefix=NONE
1041 no_create=
1042 no_recursion=
1043 prefix=NONE
1044 program_prefix=NONE
1045 program_suffix=NONE
1046 program_transform_name=s,x,x,
1047 silent=
1048 site=
1049 srcdir=
1050 verbose=
1051 x_includes=NONE
1052 x_libraries=NONE
1053
1054 # Installation directory options.
1055 # These are left unexpanded so users can "make install exec_prefix=/foo"
1056 # and all the variables that are supposed to be based on exec_prefix
1057 # by default will actually change.
1058 # Use braces instead of parens because sh, perl, etc. also accept them.
1059 # (The list follows the same order as the GNU Coding Standards.)
1060 bindir='${exec_prefix}/bin'
1061 sbindir='${exec_prefix}/sbin'
1062 libexecdir='${exec_prefix}/libexec'
1063 datarootdir='${prefix}/share'
1064 datadir='${datarootdir}'
1065 sysconfdir='${prefix}/etc'
1066 sharedstatedir='${prefix}/com'
1067 localstatedir='${prefix}/var'
1068 includedir='${prefix}/include'
1069 oldincludedir='/usr/include'
1070 docdir='${datarootdir}/doc/${PACKAGE}'
1071 infodir='${datarootdir}/info'
1072 htmldir='${docdir}'
1073 dvidir='${docdir}'
1074 pdfdir='${docdir}'
1075 psdir='${docdir}'
1076 libdir='${exec_prefix}/lib'
1077 localedir='${datarootdir}/locale'
1078 mandir='${datarootdir}/man'
1079
1080 ac_prev=
1081 ac_dashdash=
1082 for ac_option
1083 do
1084   # If the previous option needs an argument, assign it.
1085   if test -n "$ac_prev"; then
1086     eval $ac_prev=\$ac_option
1087     ac_prev=
1088     continue
1089   fi
1090
1091   case $ac_option in
1092   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1093   *)    ac_optarg=yes ;;
1094   esac
1095
1096   # Accept the important Cygnus configure options, so we can diagnose typos.
1097
1098   case $ac_dashdash$ac_option in
1099   --)
1100     ac_dashdash=yes ;;
1101
1102   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1103     ac_prev=bindir ;;
1104   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1105     bindir=$ac_optarg ;;
1106
1107   -build | --build | --buil | --bui | --bu)
1108     ac_prev=build_alias ;;
1109   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1110     build_alias=$ac_optarg ;;
1111
1112   -cache-file | --cache-file | --cache-fil | --cache-fi \
1113   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1114     ac_prev=cache_file ;;
1115   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1116   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1117     cache_file=$ac_optarg ;;
1118
1119   --config-cache | -C)
1120     cache_file=config.cache ;;
1121
1122   -datadir | --datadir | --datadi | --datad)
1123     ac_prev=datadir ;;
1124   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1125     datadir=$ac_optarg ;;
1126
1127   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1128   | --dataroo | --dataro | --datar)
1129     ac_prev=datarootdir ;;
1130   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1131   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1132     datarootdir=$ac_optarg ;;
1133
1134   -disable-* | --disable-*)
1135     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1136     # Reject names that are not valid shell variable names.
1137     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1138       as_fn_error "invalid feature name: $ac_useropt"
1139     ac_useropt_orig=$ac_useropt
1140     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1141     case $ac_user_opts in
1142       *"
1143 "enable_$ac_useropt"
1144 "*) ;;
1145       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1146          ac_unrecognized_sep=', ';;
1147     esac
1148     eval enable_$ac_useropt=no ;;
1149
1150   -docdir | --docdir | --docdi | --doc | --do)
1151     ac_prev=docdir ;;
1152   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1153     docdir=$ac_optarg ;;
1154
1155   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1156     ac_prev=dvidir ;;
1157   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1158     dvidir=$ac_optarg ;;
1159
1160   -enable-* | --enable-*)
1161     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1162     # Reject names that are not valid shell variable names.
1163     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1164       as_fn_error "invalid feature name: $ac_useropt"
1165     ac_useropt_orig=$ac_useropt
1166     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1167     case $ac_user_opts in
1168       *"
1169 "enable_$ac_useropt"
1170 "*) ;;
1171       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1172          ac_unrecognized_sep=', ';;
1173     esac
1174     eval enable_$ac_useropt=\$ac_optarg ;;
1175
1176   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1177   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1178   | --exec | --exe | --ex)
1179     ac_prev=exec_prefix ;;
1180   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1181   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1182   | --exec=* | --exe=* | --ex=*)
1183     exec_prefix=$ac_optarg ;;
1184
1185   -gas | --gas | --ga | --g)
1186     # Obsolete; use --with-gas.
1187     with_gas=yes ;;
1188
1189   -help | --help | --hel | --he | -h)
1190     ac_init_help=long ;;
1191   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1192     ac_init_help=recursive ;;
1193   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1194     ac_init_help=short ;;
1195
1196   -host | --host | --hos | --ho)
1197     ac_prev=host_alias ;;
1198   -host=* | --host=* | --hos=* | --ho=*)
1199     host_alias=$ac_optarg ;;
1200
1201   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1202     ac_prev=htmldir ;;
1203   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1204   | --ht=*)
1205     htmldir=$ac_optarg ;;
1206
1207   -includedir | --includedir | --includedi | --included | --include \
1208   | --includ | --inclu | --incl | --inc)
1209     ac_prev=includedir ;;
1210   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1211   | --includ=* | --inclu=* | --incl=* | --inc=*)
1212     includedir=$ac_optarg ;;
1213
1214   -infodir | --infodir | --infodi | --infod | --info | --inf)
1215     ac_prev=infodir ;;
1216   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1217     infodir=$ac_optarg ;;
1218
1219   -libdir | --libdir | --libdi | --libd)
1220     ac_prev=libdir ;;
1221   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1222     libdir=$ac_optarg ;;
1223
1224   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1225   | --libexe | --libex | --libe)
1226     ac_prev=libexecdir ;;
1227   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1228   | --libexe=* | --libex=* | --libe=*)
1229     libexecdir=$ac_optarg ;;
1230
1231   -localedir | --localedir | --localedi | --localed | --locale)
1232     ac_prev=localedir ;;
1233   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1234     localedir=$ac_optarg ;;
1235
1236   -localstatedir | --localstatedir | --localstatedi | --localstated \
1237   | --localstate | --localstat | --localsta | --localst | --locals)
1238     ac_prev=localstatedir ;;
1239   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1240   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1241     localstatedir=$ac_optarg ;;
1242
1243   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1244     ac_prev=mandir ;;
1245   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1246     mandir=$ac_optarg ;;
1247
1248   -nfp | --nfp | --nf)
1249     # Obsolete; use --without-fp.
1250     with_fp=no ;;
1251
1252   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1253   | --no-cr | --no-c | -n)
1254     no_create=yes ;;
1255
1256   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1257   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1258     no_recursion=yes ;;
1259
1260   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1261   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1262   | --oldin | --oldi | --old | --ol | --o)
1263     ac_prev=oldincludedir ;;
1264   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1265   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1266   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1267     oldincludedir=$ac_optarg ;;
1268
1269   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1270     ac_prev=prefix ;;
1271   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1272     prefix=$ac_optarg ;;
1273
1274   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1275   | --program-pre | --program-pr | --program-p)
1276     ac_prev=program_prefix ;;
1277   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1278   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1279     program_prefix=$ac_optarg ;;
1280
1281   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1282   | --program-suf | --program-su | --program-s)
1283     ac_prev=program_suffix ;;
1284   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1285   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1286     program_suffix=$ac_optarg ;;
1287
1288   -program-transform-name | --program-transform-name \
1289   | --program-transform-nam | --program-transform-na \
1290   | --program-transform-n | --program-transform- \
1291   | --program-transform | --program-transfor \
1292   | --program-transfo | --program-transf \
1293   | --program-trans | --program-tran \
1294   | --progr-tra | --program-tr | --program-t)
1295     ac_prev=program_transform_name ;;
1296   -program-transform-name=* | --program-transform-name=* \
1297   | --program-transform-nam=* | --program-transform-na=* \
1298   | --program-transform-n=* | --program-transform-=* \
1299   | --program-transform=* | --program-transfor=* \
1300   | --program-transfo=* | --program-transf=* \
1301   | --program-trans=* | --program-tran=* \
1302   | --progr-tra=* | --program-tr=* | --program-t=*)
1303     program_transform_name=$ac_optarg ;;
1304
1305   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1306     ac_prev=pdfdir ;;
1307   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1308     pdfdir=$ac_optarg ;;
1309
1310   -psdir | --psdir | --psdi | --psd | --ps)
1311     ac_prev=psdir ;;
1312   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1313     psdir=$ac_optarg ;;
1314
1315   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1316   | -silent | --silent | --silen | --sile | --sil)
1317     silent=yes ;;
1318
1319   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1320     ac_prev=sbindir ;;
1321   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1322   | --sbi=* | --sb=*)
1323     sbindir=$ac_optarg ;;
1324
1325   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1326   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1327   | --sharedst | --shareds | --shared | --share | --shar \
1328   | --sha | --sh)
1329     ac_prev=sharedstatedir ;;
1330   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1331   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1332   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1333   | --sha=* | --sh=*)
1334     sharedstatedir=$ac_optarg ;;
1335
1336   -site | --site | --sit)
1337     ac_prev=site ;;
1338   -site=* | --site=* | --sit=*)
1339     site=$ac_optarg ;;
1340
1341   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1342     ac_prev=srcdir ;;
1343   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1344     srcdir=$ac_optarg ;;
1345
1346   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1347   | --syscon | --sysco | --sysc | --sys | --sy)
1348     ac_prev=sysconfdir ;;
1349   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1350   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1351     sysconfdir=$ac_optarg ;;
1352
1353   -target | --target | --targe | --targ | --tar | --ta | --t)
1354     ac_prev=target_alias ;;
1355   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1356     target_alias=$ac_optarg ;;
1357
1358   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1359     verbose=yes ;;
1360
1361   -version | --version | --versio | --versi | --vers | -V)
1362     ac_init_version=: ;;
1363
1364   -with-* | --with-*)
1365     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1366     # Reject names that are not valid shell variable names.
1367     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1368       as_fn_error "invalid package name: $ac_useropt"
1369     ac_useropt_orig=$ac_useropt
1370     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1371     case $ac_user_opts in
1372       *"
1373 "with_$ac_useropt"
1374 "*) ;;
1375       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1376          ac_unrecognized_sep=', ';;
1377     esac
1378     eval with_$ac_useropt=\$ac_optarg ;;
1379
1380   -without-* | --without-*)
1381     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1382     # Reject names that are not valid shell variable names.
1383     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1384       as_fn_error "invalid package name: $ac_useropt"
1385     ac_useropt_orig=$ac_useropt
1386     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1387     case $ac_user_opts in
1388       *"
1389 "with_$ac_useropt"
1390 "*) ;;
1391       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1392          ac_unrecognized_sep=', ';;
1393     esac
1394     eval with_$ac_useropt=no ;;
1395
1396   --x)
1397     # Obsolete; use --with-x.
1398     with_x=yes ;;
1399
1400   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1401   | --x-incl | --x-inc | --x-in | --x-i)
1402     ac_prev=x_includes ;;
1403   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1404   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1405     x_includes=$ac_optarg ;;
1406
1407   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1408   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1409     ac_prev=x_libraries ;;
1410   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1411   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1412     x_libraries=$ac_optarg ;;
1413
1414   -*) as_fn_error "unrecognized option: \`$ac_option'
1415 Try \`$0 --help' for more information."
1416     ;;
1417
1418   *=*)
1419     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1420     # Reject names that are not valid shell variable names.
1421     case $ac_envvar in #(
1422       '' | [0-9]* | *[!_$as_cr_alnum]* )
1423       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1424     esac
1425     eval $ac_envvar=\$ac_optarg
1426     export $ac_envvar ;;
1427
1428   *)
1429     # FIXME: should be removed in autoconf 3.0.
1430     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1431     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1432       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1433     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1434     ;;
1435
1436   esac
1437 done
1438
1439 if test -n "$ac_prev"; then
1440   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1441   as_fn_error "missing argument to $ac_option"
1442 fi
1443
1444 if test -n "$ac_unrecognized_opts"; then
1445   case $enable_option_checking in
1446     no) ;;
1447     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1448     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1449   esac
1450 fi
1451
1452 # Check all directory arguments for consistency.
1453 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1454                 datadir sysconfdir sharedstatedir localstatedir includedir \
1455                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1456                 libdir localedir mandir
1457 do
1458   eval ac_val=\$$ac_var
1459   # Remove trailing slashes.
1460   case $ac_val in
1461     */ )
1462       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1463       eval $ac_var=\$ac_val;;
1464   esac
1465   # Be sure to have absolute directory names.
1466   case $ac_val in
1467     [\\/$]* | ?:[\\/]* )  continue;;
1468     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1469   esac
1470   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1471 done
1472
1473 # There might be people who depend on the old broken behavior: `$host'
1474 # used to hold the argument of --host etc.
1475 # FIXME: To remove some day.
1476 build=$build_alias
1477 host=$host_alias
1478 target=$target_alias
1479
1480 # FIXME: To remove some day.
1481 if test "x$host_alias" != x; then
1482   if test "x$build_alias" = x; then
1483     cross_compiling=maybe
1484     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1485     If a cross compiler is detected then cross compile mode will be used." >&2
1486   elif test "x$build_alias" != "x$host_alias"; then
1487     cross_compiling=yes
1488   fi
1489 fi
1490
1491 ac_tool_prefix=
1492 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1493
1494 test "$silent" = yes && exec 6>/dev/null
1495
1496
1497 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1498 ac_ls_di=`ls -di .` &&
1499 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1500   as_fn_error "working directory cannot be determined"
1501 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1502   as_fn_error "pwd does not report name of working directory"
1503
1504
1505 # Find the source files, if location was not specified.
1506 if test -z "$srcdir"; then
1507   ac_srcdir_defaulted=yes
1508   # Try the directory containing this script, then the parent directory.
1509   ac_confdir=`$as_dirname -- "$as_myself" ||
1510 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1511          X"$as_myself" : 'X\(//\)[^/]' \| \
1512          X"$as_myself" : 'X\(//\)$' \| \
1513          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1514 $as_echo X"$as_myself" |
1515     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1516             s//\1/
1517             q
1518           }
1519           /^X\(\/\/\)[^/].*/{
1520             s//\1/
1521             q
1522           }
1523           /^X\(\/\/\)$/{
1524             s//\1/
1525             q
1526           }
1527           /^X\(\/\).*/{
1528             s//\1/
1529             q
1530           }
1531           s/.*/./; q'`
1532   srcdir=$ac_confdir
1533   if test ! -r "$srcdir/$ac_unique_file"; then
1534     srcdir=..
1535   fi
1536 else
1537   ac_srcdir_defaulted=no
1538 fi
1539 if test ! -r "$srcdir/$ac_unique_file"; then
1540   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1541   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1542 fi
1543 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1544 ac_abs_confdir=`(
1545         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1546         pwd)`
1547 # When building in place, set srcdir=.
1548 if test "$ac_abs_confdir" = "$ac_pwd"; then
1549   srcdir=.
1550 fi
1551 # Remove unnecessary trailing slashes from srcdir.
1552 # Double slashes in file names in object file debugging info
1553 # mess up M-x gdb in Emacs.
1554 case $srcdir in
1555 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1556 esac
1557 for ac_var in $ac_precious_vars; do
1558   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1559   eval ac_env_${ac_var}_value=\$${ac_var}
1560   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1561   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1562 done
1563
1564 #
1565 # Report the --help message.
1566 #
1567 if test "$ac_init_help" = "long"; then
1568   # Omit some internal or obsolete options to make the list less imposing.
1569   # This message is too long to be a string in the A/UX 3.1 sh.
1570   cat <<_ACEOF
1571 \`configure' configures this package to adapt to many kinds of systems.
1572
1573 Usage: $0 [OPTION]... [VAR=VALUE]...
1574
1575 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1576 VAR=VALUE.  See below for descriptions of some of the useful variables.
1577
1578 Defaults for the options are specified in brackets.
1579
1580 Configuration:
1581   -h, --help              display this help and exit
1582       --help=short        display options specific to this package
1583       --help=recursive    display the short help of all the included packages
1584   -V, --version           display version information and exit
1585   -q, --quiet, --silent   do not print \`checking...' messages
1586       --cache-file=FILE   cache test results in FILE [disabled]
1587   -C, --config-cache      alias for \`--cache-file=config.cache'
1588   -n, --no-create         do not create output files
1589       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1590
1591 Installation directories:
1592   --prefix=PREFIX         install architecture-independent files in PREFIX
1593                           [$ac_default_prefix]
1594   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1595                           [PREFIX]
1596
1597 By default, \`make install' will install all the files in
1598 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1599 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1600 for instance \`--prefix=\$HOME'.
1601
1602 For better control, use the options below.
1603
1604 Fine tuning of the installation directories:
1605   --bindir=DIR            user executables [EPREFIX/bin]
1606   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1607   --libexecdir=DIR        program executables [EPREFIX/libexec]
1608   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1609   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1610   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1611   --libdir=DIR            object code libraries [EPREFIX/lib]
1612   --includedir=DIR        C header files [PREFIX/include]
1613   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1614   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1615   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1616   --infodir=DIR           info documentation [DATAROOTDIR/info]
1617   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1618   --mandir=DIR            man documentation [DATAROOTDIR/man]
1619   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1620   --htmldir=DIR           html documentation [DOCDIR]
1621   --dvidir=DIR            dvi documentation [DOCDIR]
1622   --pdfdir=DIR            pdf documentation [DOCDIR]
1623   --psdir=DIR             ps documentation [DOCDIR]
1624 _ACEOF
1625
1626   cat <<\_ACEOF
1627
1628 Program names:
1629   --program-prefix=PREFIX            prepend PREFIX to installed program names
1630   --program-suffix=SUFFIX            append SUFFIX to installed program names
1631   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1632
1633 System types:
1634   --build=BUILD     configure for building on BUILD [guessed]
1635   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1636   --target=TARGET   configure for building compilers for TARGET [HOST]
1637 _ACEOF
1638 fi
1639
1640 if test -n "$ac_init_help"; then
1641
1642   cat <<\_ACEOF
1643
1644 Optional Features:
1645   --disable-option-checking  ignore unrecognized --enable/--with options
1646   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1647   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1648   --enable-debug          enable debugging no|yes|traditional [yes]
1649   --enable-dynamic        enable linking built binaries with dynamic libs [no]
1650   --enable-syslog         enable syslog support [auto]
1651   --enable-proctitle      enable proctitle support [yes]
1652   --enable-ipv6           enable IPv6 support [auto]
1653   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]
1654
1655 SLAPD (Standalone LDAP Daemon) Options:
1656   --enable-slapd          enable building slapd [yes]
1657     --enable-dynacl       enable run-time loadable ACL support (experimental) [no]
1658     --enable-aci          enable per-object ACIs (experimental) no|yes|mod [no]
1659     --enable-cleartext    enable cleartext passwords [yes]
1660     --enable-crypt        enable crypt(3) passwords [no]
1661     --enable-lmpasswd     enable LAN Manager passwords [no]
1662     --enable-spasswd      enable (Cyrus) SASL password verification [no]
1663     --enable-modules      enable dynamic module support [no]
1664     --enable-rewrite      enable DN rewriting in back-ldap and rwm overlay [auto]
1665     --enable-rlookups     enable reverse lookups of client hostnames [no]
1666     --enable-slapi        enable SLAPI support (experimental) [no]
1667     --enable-slp          enable SLPv2 support [no]
1668     --enable-wrappers     enable tcp wrapper support [no]
1669
1670 SLAPD Backend Options:
1671     --enable-backends     enable all available backends no|yes|mod
1672     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]
1673     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]
1674     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]
1675     --enable-ldap         enable ldap backend no|yes|mod [no]
1676     --enable-meta         enable metadirectory backend no|yes|mod [no]
1677     --enable-monitor      enable monitor backend no|yes|mod [yes]
1678     --enable-ndb          enable MySQL NDB Cluster backend no|yes|mod [no]
1679     --enable-null         enable null backend no|yes|mod [no]
1680     --enable-passwd       enable passwd backend no|yes|mod [no]
1681     --enable-perl         enable perl backend no|yes|mod [no]
1682     --enable-relay        enable relay backend no|yes|mod [yes]
1683     --enable-shell        enable shell backend no|yes|mod [no]
1684     --enable-sock         enable sock backend no|yes|mod [no]
1685     --enable-sql          enable sql backend no|yes|mod [no]
1686
1687 SLAPD Overlay Options:
1688     --enable-overlays     enable all available overlays no|yes|mod
1689     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [no]
1690     --enable-auditlog     Audit Logging overlay no|yes|mod [no]
1691     --enable-collect      Collect overlay no|yes|mod [no]
1692     --enable-constraint   Attribute Constraint overlay no|yes|mod [no]
1693     --enable-dds          Dynamic Directory Services overlay no|yes|mod [no]
1694     --enable-deref        Dereference overlay no|yes|mod [no]
1695     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1696     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1697     --enable-memberof     Reverse Group Membership overlay no|yes|mod [no]
1698     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1699     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1700     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1701     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1702     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1703     --enable-seqmod       Sequential Modify overlay no|yes|mod [no]
1704     --enable-sssvlv       ServerSideSort/VLV overlay no|yes|mod [no]
1705     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1706     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1707     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1708     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1709
1710 Library Generation & Linking Options
1711   --enable-static[=PKGS]  build static libraries [default=yes]
1712   --enable-shared[=PKGS]  build shared libraries [default=yes]
1713   --enable-fast-install[=PKGS]
1714                           optimize for fast installation [default=yes]
1715   --disable-dependency-tracking  speeds up one-time build
1716   --enable-dependency-tracking   do not reject slow dependency extractors
1717   --disable-libtool-lock  avoid locking (might break parallel builds)
1718
1719 Optional Packages:
1720   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1721   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1722   --with-subdir=DIR       change default subdirectory used for installs
1723   --with-cyrus-sasl       with Cyrus SASL support [auto]
1724   --with-fetch            with fetch(3) URL support [auto]
1725   --with-threads          with threads [auto]
1726   --with-tls              with TLS/SSL support auto|openssl|gnutls|moznss [auto]
1727   --with-yielding-select  with implicitly yielding select [auto]
1728   --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1729   --with-odbc             with specific ODBC support iodbc|unixodbc|odbc32|auto [auto]
1730   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1731   --with-pic              try to use only PIC/non-PIC objects [default=use
1732                           both]
1733   --with-tags[=TAGS]      include additional configurations [automatic]
1734
1735 See INSTALL file for further details.
1736
1737 Some influential environment variables:
1738   CC          C compiler command
1739   CFLAGS      C compiler flags
1740   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1741               nonstandard directory <lib dir>
1742   LIBS        libraries to pass to the linker, e.g. -l<library>
1743   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1744               you have headers in a nonstandard directory <include dir>
1745   CPP         C preprocessor
1746
1747 Use these variables to override the choices made by `configure' or to help
1748 it to find libraries and programs with nonstandard names/locations.
1749
1750 Report bugs to the package provider.
1751 _ACEOF
1752 ac_status=$?
1753 fi
1754
1755 if test "$ac_init_help" = "recursive"; then
1756   # If there are subdirs, report their specific --help.
1757   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1758     test -d "$ac_dir" ||
1759       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1760       continue
1761     ac_builddir=.
1762
1763 case "$ac_dir" in
1764 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1765 *)
1766   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1767   # A ".." for each directory in $ac_dir_suffix.
1768   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1769   case $ac_top_builddir_sub in
1770   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1771   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1772   esac ;;
1773 esac
1774 ac_abs_top_builddir=$ac_pwd
1775 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1776 # for backward compatibility:
1777 ac_top_builddir=$ac_top_build_prefix
1778
1779 case $srcdir in
1780   .)  # We are building in place.
1781     ac_srcdir=.
1782     ac_top_srcdir=$ac_top_builddir_sub
1783     ac_abs_top_srcdir=$ac_pwd ;;
1784   [\\/]* | ?:[\\/]* )  # Absolute name.
1785     ac_srcdir=$srcdir$ac_dir_suffix;
1786     ac_top_srcdir=$srcdir
1787     ac_abs_top_srcdir=$srcdir ;;
1788   *) # Relative name.
1789     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1790     ac_top_srcdir=$ac_top_build_prefix$srcdir
1791     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1792 esac
1793 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1794
1795     cd "$ac_dir" || { ac_status=$?; continue; }
1796     # Check for guested configure.
1797     if test -f "$ac_srcdir/configure.gnu"; then
1798       echo &&
1799       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1800     elif test -f "$ac_srcdir/configure"; then
1801       echo &&
1802       $SHELL "$ac_srcdir/configure" --help=recursive
1803     else
1804       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1805     fi || ac_status=$?
1806     cd "$ac_pwd" || { ac_status=$?; break; }
1807   done
1808 fi
1809
1810 test -n "$ac_init_help" && exit $ac_status
1811 if $ac_init_version; then
1812   cat <<\_ACEOF
1813 configure
1814 generated by GNU Autoconf 2.65
1815
1816 Copyright (C) 2009 Free Software Foundation, Inc.
1817 This configure script is free software; the Free Software Foundation
1818 gives unlimited permission to copy, distribute and modify it.
1819
1820 Copyright 1998-2011 The OpenLDAP Foundation. All rights reserved.
1821 Restrictions apply, see COPYRIGHT and LICENSE files.
1822 _ACEOF
1823   exit
1824 fi
1825
1826 ## ------------------------ ##
1827 ## Autoconf initialization. ##
1828 ## ------------------------ ##
1829
1830 # ac_fn_c_try_compile LINENO
1831 # --------------------------
1832 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1833 ac_fn_c_try_compile ()
1834 {
1835   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836   rm -f conftest.$ac_objext
1837   if { { ac_try="$ac_compile"
1838 case "(($ac_try" in
1839   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1840   *) ac_try_echo=$ac_try;;
1841 esac
1842 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1843 $as_echo "$ac_try_echo"; } >&5
1844   (eval "$ac_compile") 2>conftest.err
1845   ac_status=$?
1846   if test -s conftest.err; then
1847     grep -v '^ *+' conftest.err >conftest.er1
1848     cat conftest.er1 >&5
1849     mv -f conftest.er1 conftest.err
1850   fi
1851   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1852   test $ac_status = 0; } && {
1853          test -z "$ac_c_werror_flag" ||
1854          test ! -s conftest.err
1855        } && test -s conftest.$ac_objext; then :
1856   ac_retval=0
1857 else
1858   $as_echo "$as_me: failed program was:" >&5
1859 sed 's/^/| /' conftest.$ac_ext >&5
1860
1861         ac_retval=1
1862 fi
1863   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1864   as_fn_set_status $ac_retval
1865
1866 } # ac_fn_c_try_compile
1867
1868 # ac_fn_c_try_link LINENO
1869 # -----------------------
1870 # Try to link conftest.$ac_ext, and return whether this succeeded.
1871 ac_fn_c_try_link ()
1872 {
1873   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874   rm -f conftest.$ac_objext conftest$ac_exeext
1875   if { { ac_try="$ac_link"
1876 case "(($ac_try" in
1877   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1878   *) ac_try_echo=$ac_try;;
1879 esac
1880 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1881 $as_echo "$ac_try_echo"; } >&5
1882   (eval "$ac_link") 2>conftest.err
1883   ac_status=$?
1884   if test -s conftest.err; then
1885     grep -v '^ *+' conftest.err >conftest.er1
1886     cat conftest.er1 >&5
1887     mv -f conftest.er1 conftest.err
1888   fi
1889   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1890   test $ac_status = 0; } && {
1891          test -z "$ac_c_werror_flag" ||
1892          test ! -s conftest.err
1893        } && test -s conftest$ac_exeext && {
1894          test "$cross_compiling" = yes ||
1895          $as_test_x conftest$ac_exeext
1896        }; then :
1897   ac_retval=0
1898 else
1899   $as_echo "$as_me: failed program was:" >&5
1900 sed 's/^/| /' conftest.$ac_ext >&5
1901
1902         ac_retval=1
1903 fi
1904   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1905   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1906   # interfere with the next link command; also delete a directory that is
1907   # left behind by Apple's compiler.  We do this before executing the actions.
1908   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1909   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1910   as_fn_set_status $ac_retval
1911
1912 } # ac_fn_c_try_link
1913
1914 # ac_fn_c_try_cpp LINENO
1915 # ----------------------
1916 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1917 ac_fn_c_try_cpp ()
1918 {
1919   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920   if { { ac_try="$ac_cpp conftest.$ac_ext"
1921 case "(($ac_try" in
1922   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1923   *) ac_try_echo=$ac_try;;
1924 esac
1925 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1926 $as_echo "$ac_try_echo"; } >&5
1927   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1928   ac_status=$?
1929   if test -s conftest.err; then
1930     grep -v '^ *+' conftest.err >conftest.er1
1931     cat conftest.er1 >&5
1932     mv -f conftest.er1 conftest.err
1933   fi
1934   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1935   test $ac_status = 0; } >/dev/null && {
1936          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1937          test ! -s conftest.err
1938        }; then :
1939   ac_retval=0
1940 else
1941   $as_echo "$as_me: failed program was:" >&5
1942 sed 's/^/| /' conftest.$ac_ext >&5
1943
1944     ac_retval=1
1945 fi
1946   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1947   as_fn_set_status $ac_retval
1948
1949 } # ac_fn_c_try_cpp
1950
1951 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1952 # -------------------------------------------------------
1953 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1954 # the include files in INCLUDES and setting the cache variable VAR
1955 # accordingly.
1956 ac_fn_c_check_header_mongrel ()
1957 {
1958   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959   if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1960   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1961 $as_echo_n "checking for $2... " >&6; }
1962 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1963   $as_echo_n "(cached) " >&6
1964 fi
1965 eval ac_res=\$$3
1966                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1967 $as_echo "$ac_res" >&6; }
1968 else
1969   # Is the header compilable?
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1971 $as_echo_n "checking $2 usability... " >&6; }
1972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1973 /* end confdefs.h.  */
1974 $4
1975 #include <$2>
1976 _ACEOF
1977 if ac_fn_c_try_compile "$LINENO"; then :
1978   ac_header_compiler=yes
1979 else
1980   ac_header_compiler=no
1981 fi
1982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1984 $as_echo "$ac_header_compiler" >&6; }
1985
1986 # Is the header present?
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1988 $as_echo_n "checking $2 presence... " >&6; }
1989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1990 /* end confdefs.h.  */
1991 #include <$2>
1992 _ACEOF
1993 if ac_fn_c_try_cpp "$LINENO"; then :
1994   ac_header_preproc=yes
1995 else
1996   ac_header_preproc=no
1997 fi
1998 rm -f conftest.err conftest.$ac_ext
1999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2000 $as_echo "$ac_header_preproc" >&6; }
2001
2002 # So?  What about this header?
2003 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2004   yes:no: )
2005     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2006 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2007     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2008 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2009     ;;
2010   no:yes:* )
2011     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2012 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2013     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2014 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2015     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2016 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2017     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2018 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2019     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2020 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2021 ( cat <<\_ASBOX
2022 ## --------------------------------------------- ##
2023 ## Report this to <http://www.openldap.org/its/> ##
2024 ## --------------------------------------------- ##
2025 _ASBOX
2026      ) | sed "s/^/$as_me: WARNING:     /" >&2
2027     ;;
2028 esac
2029   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2030 $as_echo_n "checking for $2... " >&6; }
2031 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2032   $as_echo_n "(cached) " >&6
2033 else
2034   eval "$3=\$ac_header_compiler"
2035 fi
2036 eval ac_res=\$$3
2037                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2038 $as_echo "$ac_res" >&6; }
2039 fi
2040   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2041
2042 } # ac_fn_c_check_header_mongrel
2043
2044 # ac_fn_c_try_run LINENO
2045 # ----------------------
2046 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2047 # that executables *can* be run.
2048 ac_fn_c_try_run ()
2049 {
2050   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2051   if { { ac_try="$ac_link"
2052 case "(($ac_try" in
2053   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2054   *) ac_try_echo=$ac_try;;
2055 esac
2056 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2057 $as_echo "$ac_try_echo"; } >&5
2058   (eval "$ac_link") 2>&5
2059   ac_status=$?
2060   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2061   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2062   { { case "(($ac_try" in
2063   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2064   *) ac_try_echo=$ac_try;;
2065 esac
2066 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2067 $as_echo "$ac_try_echo"; } >&5
2068   (eval "$ac_try") 2>&5
2069   ac_status=$?
2070   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2071   test $ac_status = 0; }; }; then :
2072   ac_retval=0
2073 else
2074   $as_echo "$as_me: program exited with status $ac_status" >&5
2075        $as_echo "$as_me: failed program was:" >&5
2076 sed 's/^/| /' conftest.$ac_ext >&5
2077
2078        ac_retval=$ac_status
2079 fi
2080   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2081   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2082   as_fn_set_status $ac_retval
2083
2084 } # ac_fn_c_try_run
2085
2086 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2087 # -------------------------------------------------------
2088 # Tests whether HEADER exists and can be compiled using the include files in
2089 # INCLUDES, setting the cache variable VAR accordingly.
2090 ac_fn_c_check_header_compile ()
2091 {
2092   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2093   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2094 $as_echo_n "checking for $2... " >&6; }
2095 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2096   $as_echo_n "(cached) " >&6
2097 else
2098   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2099 /* end confdefs.h.  */
2100 $4
2101 #include <$2>
2102 _ACEOF
2103 if ac_fn_c_try_compile "$LINENO"; then :
2104   eval "$3=yes"
2105 else
2106   eval "$3=no"
2107 fi
2108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109 fi
2110 eval ac_res=\$$3
2111                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2112 $as_echo "$ac_res" >&6; }
2113   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2114
2115 } # ac_fn_c_check_header_compile
2116
2117 # ac_fn_c_check_func LINENO FUNC VAR
2118 # ----------------------------------
2119 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2120 ac_fn_c_check_func ()
2121 {
2122   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2123   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2124 $as_echo_n "checking for $2... " >&6; }
2125 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2126   $as_echo_n "(cached) " >&6
2127 else
2128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129 /* end confdefs.h.  */
2130 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2131    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2132 #define $2 innocuous_$2
2133
2134 /* System header to define __stub macros and hopefully few prototypes,
2135     which can conflict with char $2 (); below.
2136     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2137     <limits.h> exists even on freestanding compilers.  */
2138
2139 #ifdef __STDC__
2140 # include <limits.h>
2141 #else
2142 # include <assert.h>
2143 #endif
2144
2145 #undef $2
2146
2147 /* Override any GCC internal prototype to avoid an error.
2148    Use char because int might match the return type of a GCC
2149    builtin and then its argument prototype would still apply.  */
2150 #ifdef __cplusplus
2151 extern "C"
2152 #endif
2153 char $2 ();
2154 /* The GNU C library defines this for functions which it implements
2155     to always fail with ENOSYS.  Some functions are actually named
2156     something starting with __ and the normal name is an alias.  */
2157 #if defined __stub_$2 || defined __stub___$2
2158 choke me
2159 #endif
2160
2161 int
2162 main ()
2163 {
2164 return $2 ();
2165   ;
2166   return 0;
2167 }
2168 _ACEOF
2169 if ac_fn_c_try_link "$LINENO"; then :
2170   eval "$3=yes"
2171 else
2172   eval "$3=no"
2173 fi
2174 rm -f core conftest.err conftest.$ac_objext \
2175     conftest$ac_exeext conftest.$ac_ext
2176 fi
2177 eval ac_res=\$$3
2178                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2179 $as_echo "$ac_res" >&6; }
2180   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2181
2182 } # ac_fn_c_check_func
2183
2184 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2185 # -------------------------------------------
2186 # Tests whether TYPE exists after having included INCLUDES, setting cache
2187 # variable VAR accordingly.
2188 ac_fn_c_check_type ()
2189 {
2190   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2192 $as_echo_n "checking for $2... " >&6; }
2193 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2194   $as_echo_n "(cached) " >&6
2195 else
2196   eval "$3=no"
2197   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198 /* end confdefs.h.  */
2199 $4
2200 int
2201 main ()
2202 {
2203 if (sizeof ($2))
2204          return 0;
2205   ;
2206   return 0;
2207 }
2208 _ACEOF
2209 if ac_fn_c_try_compile "$LINENO"; then :
2210   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211 /* end confdefs.h.  */
2212 $4
2213 int
2214 main ()
2215 {
2216 if (sizeof (($2)))
2217             return 0;
2218   ;
2219   return 0;
2220 }
2221 _ACEOF
2222 if ac_fn_c_try_compile "$LINENO"; then :
2223
2224 else
2225   eval "$3=yes"
2226 fi
2227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2228 fi
2229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2230 fi
2231 eval ac_res=\$$3
2232                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233 $as_echo "$ac_res" >&6; }
2234   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2235
2236 } # ac_fn_c_check_type
2237
2238 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2239 # ----------------------------------------------------
2240 # Tries to find if the field MEMBER exists in type AGGR, after including
2241 # INCLUDES, setting cache variable VAR accordingly.
2242 ac_fn_c_check_member ()
2243 {
2244   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2246 $as_echo_n "checking for $2.$3... " >&6; }
2247 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2248   $as_echo_n "(cached) " >&6
2249 else
2250   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251 /* end confdefs.h.  */
2252 $5
2253 int
2254 main ()
2255 {
2256 static $2 ac_aggr;
2257 if (ac_aggr.$3)
2258 return 0;
2259   ;
2260   return 0;
2261 }
2262 _ACEOF
2263 if ac_fn_c_try_compile "$LINENO"; then :
2264   eval "$4=yes"
2265 else
2266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2267 /* end confdefs.h.  */
2268 $5
2269 int
2270 main ()
2271 {
2272 static $2 ac_aggr;
2273 if (sizeof ac_aggr.$3)
2274 return 0;
2275   ;
2276   return 0;
2277 }
2278 _ACEOF
2279 if ac_fn_c_try_compile "$LINENO"; then :
2280   eval "$4=yes"
2281 else
2282   eval "$4=no"
2283 fi
2284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2285 fi
2286 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2287 fi
2288 eval ac_res=\$$4
2289                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2290 $as_echo "$ac_res" >&6; }
2291   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2292
2293 } # ac_fn_c_check_member
2294
2295 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2296 # --------------------------------------------
2297 # Tries to find the compile-time value of EXPR in a program that includes
2298 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2299 # computed
2300 ac_fn_c_compute_int ()
2301 {
2302   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2303   if test "$cross_compiling" = yes; then
2304     # Depending upon the size, compute the lo and hi bounds.
2305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306 /* end confdefs.h.  */
2307 $4
2308 int
2309 main ()
2310 {
2311 static int test_array [1 - 2 * !(($2) >= 0)];
2312 test_array [0] = 0
2313
2314   ;
2315   return 0;
2316 }
2317 _ACEOF
2318 if ac_fn_c_try_compile "$LINENO"; then :
2319   ac_lo=0 ac_mid=0
2320   while :; do
2321     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2322 /* end confdefs.h.  */
2323 $4
2324 int
2325 main ()
2326 {
2327 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2328 test_array [0] = 0
2329
2330   ;
2331   return 0;
2332 }
2333 _ACEOF
2334 if ac_fn_c_try_compile "$LINENO"; then :
2335   ac_hi=$ac_mid; break
2336 else
2337   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2338                         if test $ac_lo -le $ac_mid; then
2339                           ac_lo= ac_hi=
2340                           break
2341                         fi
2342                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2343 fi
2344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2345   done
2346 else
2347   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348 /* end confdefs.h.  */
2349 $4
2350 int
2351 main ()
2352 {
2353 static int test_array [1 - 2 * !(($2) < 0)];
2354 test_array [0] = 0
2355
2356   ;
2357   return 0;
2358 }
2359 _ACEOF
2360 if ac_fn_c_try_compile "$LINENO"; then :
2361   ac_hi=-1 ac_mid=-1
2362   while :; do
2363     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364 /* end confdefs.h.  */
2365 $4
2366 int
2367 main ()
2368 {
2369 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2370 test_array [0] = 0
2371
2372   ;
2373   return 0;
2374 }
2375 _ACEOF
2376 if ac_fn_c_try_compile "$LINENO"; then :
2377   ac_lo=$ac_mid; break
2378 else
2379   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2380                         if test $ac_mid -le $ac_hi; then
2381                           ac_lo= ac_hi=
2382                           break
2383                         fi
2384                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2385 fi
2386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2387   done
2388 else
2389   ac_lo= ac_hi=
2390 fi
2391 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2392 fi
2393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394 # Binary search between lo and hi bounds.
2395 while test "x$ac_lo" != "x$ac_hi"; do
2396   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2397   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2398 /* end confdefs.h.  */
2399 $4
2400 int
2401 main ()
2402 {
2403 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2404 test_array [0] = 0
2405
2406   ;
2407   return 0;
2408 }
2409 _ACEOF
2410 if ac_fn_c_try_compile "$LINENO"; then :
2411   ac_hi=$ac_mid
2412 else
2413   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2414 fi
2415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2416 done
2417 case $ac_lo in #((
2418 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2419 '') ac_retval=1 ;;
2420 esac
2421   else
2422     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2423 /* end confdefs.h.  */
2424 $4
2425 static long int longval () { return $2; }
2426 static unsigned long int ulongval () { return $2; }
2427 #include <stdio.h>
2428 #include <stdlib.h>
2429 int
2430 main ()
2431 {
2432
2433   FILE *f = fopen ("conftest.val", "w");
2434   if (! f)
2435     return 1;
2436   if (($2) < 0)
2437     {
2438       long int i = longval ();
2439       if (i != ($2))
2440         return 1;
2441       fprintf (f, "%ld", i);
2442     }
2443   else
2444     {
2445       unsigned long int i = ulongval ();
2446       if (i != ($2))
2447         return 1;
2448       fprintf (f, "%lu", i);
2449     }
2450   /* Do not output a trailing newline, as this causes \r\n confusion
2451      on some platforms.  */
2452   return ferror (f) || fclose (f) != 0;
2453
2454   ;
2455   return 0;
2456 }
2457 _ACEOF
2458 if ac_fn_c_try_run "$LINENO"; then :
2459   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2460 else
2461   ac_retval=1
2462 fi
2463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2464   conftest.$ac_objext conftest.beam conftest.$ac_ext
2465 rm -f conftest.val
2466
2467   fi
2468   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2469   as_fn_set_status $ac_retval
2470
2471 } # ac_fn_c_compute_int
2472 cat >config.log <<_ACEOF
2473 This file contains any messages produced by compilers while
2474 running configure, to aid debugging if configure makes a mistake.
2475
2476 It was created by $as_me, which was
2477 generated by GNU Autoconf 2.65.  Invocation command line was
2478
2479   $ $0 $@
2480
2481 _ACEOF
2482 exec 5>>config.log
2483 {
2484 cat <<_ASUNAME
2485 ## --------- ##
2486 ## Platform. ##
2487 ## --------- ##
2488
2489 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2490 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2491 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2492 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2493 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2494
2495 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2496 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2497
2498 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2499 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2500 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2501 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2502 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2503 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2504 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2505
2506 _ASUNAME
2507
2508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2509 for as_dir in $PATH
2510 do
2511   IFS=$as_save_IFS
2512   test -z "$as_dir" && as_dir=.
2513     $as_echo "PATH: $as_dir"
2514   done
2515 IFS=$as_save_IFS
2516
2517 } >&5
2518
2519 cat >&5 <<_ACEOF
2520
2521
2522 ## ----------- ##
2523 ## Core tests. ##
2524 ## ----------- ##
2525
2526 _ACEOF
2527
2528
2529 # Keep a trace of the command line.
2530 # Strip out --no-create and --no-recursion so they do not pile up.
2531 # Strip out --silent because we don't want to record it for future runs.
2532 # Also quote any args containing shell meta-characters.
2533 # Make two passes to allow for proper duplicate-argument suppression.
2534 ac_configure_args=
2535 ac_configure_args0=
2536 ac_configure_args1=
2537 ac_must_keep_next=false
2538 for ac_pass in 1 2
2539 do
2540   for ac_arg
2541   do
2542     case $ac_arg in
2543     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2544     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2545     | -silent | --silent | --silen | --sile | --sil)
2546       continue ;;
2547     *\'*)
2548       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2549     esac
2550     case $ac_pass in
2551     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2552     2)
2553       as_fn_append ac_configure_args1 " '$ac_arg'"
2554       if test $ac_must_keep_next = true; then
2555         ac_must_keep_next=false # Got value, back to normal.
2556       else
2557         case $ac_arg in
2558           *=* | --config-cache | -C | -disable-* | --disable-* \
2559           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2560           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2561           | -with-* | --with-* | -without-* | --without-* | --x)
2562             case "$ac_configure_args0 " in
2563               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2564             esac
2565             ;;
2566           -* ) ac_must_keep_next=true ;;
2567         esac
2568       fi
2569       as_fn_append ac_configure_args " '$ac_arg'"
2570       ;;
2571     esac
2572   done
2573 done
2574 { ac_configure_args0=; unset ac_configure_args0;}
2575 { ac_configure_args1=; unset ac_configure_args1;}
2576
2577 # When interrupted or exit'd, cleanup temporary files, and complete
2578 # config.log.  We remove comments because anyway the quotes in there
2579 # would cause problems or look ugly.
2580 # WARNING: Use '\'' to represent an apostrophe within the trap.
2581 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2582 trap 'exit_status=$?
2583   # Save into config.log some information that might help in debugging.
2584   {
2585     echo
2586
2587     cat <<\_ASBOX
2588 ## ---------------- ##
2589 ## Cache variables. ##
2590 ## ---------------- ##
2591 _ASBOX
2592     echo
2593     # The following way of writing the cache mishandles newlines in values,
2594 (
2595   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2596     eval ac_val=\$$ac_var
2597     case $ac_val in #(
2598     *${as_nl}*)
2599       case $ac_var in #(
2600       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2601 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2602       esac
2603       case $ac_var in #(
2604       _ | IFS | as_nl) ;; #(
2605       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2606       *) { eval $ac_var=; unset $ac_var;} ;;
2607       esac ;;
2608     esac
2609   done
2610   (set) 2>&1 |
2611     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2612     *${as_nl}ac_space=\ *)
2613       sed -n \
2614         "s/'\''/'\''\\\\'\'''\''/g;
2615           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2616       ;; #(
2617     *)
2618       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2619       ;;
2620     esac |
2621     sort
2622 )
2623     echo
2624
2625     cat <<\_ASBOX
2626 ## ----------------- ##
2627 ## Output variables. ##
2628 ## ----------------- ##
2629 _ASBOX
2630     echo
2631     for ac_var in $ac_subst_vars
2632     do
2633       eval ac_val=\$$ac_var
2634       case $ac_val in
2635       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2636       esac
2637       $as_echo "$ac_var='\''$ac_val'\''"
2638     done | sort
2639     echo
2640
2641     if test -n "$ac_subst_files"; then
2642       cat <<\_ASBOX
2643 ## ------------------- ##
2644 ## File substitutions. ##
2645 ## ------------------- ##
2646 _ASBOX
2647       echo
2648       for ac_var in $ac_subst_files
2649       do
2650         eval ac_val=\$$ac_var
2651         case $ac_val in
2652         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2653         esac
2654         $as_echo "$ac_var='\''$ac_val'\''"
2655       done | sort
2656       echo
2657     fi
2658
2659     if test -s confdefs.h; then
2660       cat <<\_ASBOX
2661 ## ----------- ##
2662 ## confdefs.h. ##
2663 ## ----------- ##
2664 _ASBOX
2665       echo
2666       cat confdefs.h
2667       echo
2668     fi
2669     test "$ac_signal" != 0 &&
2670       $as_echo "$as_me: caught signal $ac_signal"
2671     $as_echo "$as_me: exit $exit_status"
2672   } >&5
2673   rm -f core *.core core.conftest.* &&
2674     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2675     exit $exit_status
2676 ' 0
2677 for ac_signal in 1 2 13 15; do
2678   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2679 done
2680 ac_signal=0
2681
2682 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2683 rm -f -r conftest* confdefs.h
2684
2685 $as_echo "/* confdefs.h */" > confdefs.h
2686
2687 # Predefined preprocessor variables.
2688
2689 cat >>confdefs.h <<_ACEOF
2690 #define PACKAGE_NAME "$PACKAGE_NAME"
2691 _ACEOF
2692
2693 cat >>confdefs.h <<_ACEOF
2694 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2695 _ACEOF
2696
2697 cat >>confdefs.h <<_ACEOF
2698 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2699 _ACEOF
2700
2701 cat >>confdefs.h <<_ACEOF
2702 #define PACKAGE_STRING "$PACKAGE_STRING"
2703 _ACEOF
2704
2705 cat >>confdefs.h <<_ACEOF
2706 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2707 _ACEOF
2708
2709 cat >>confdefs.h <<_ACEOF
2710 #define PACKAGE_URL "$PACKAGE_URL"
2711 _ACEOF
2712
2713
2714 # Let the site file select an alternate cache file if it wants to.
2715 # Prefer an explicitly selected file to automatically selected ones.
2716 ac_site_file1=NONE
2717 ac_site_file2=NONE
2718 if test -n "$CONFIG_SITE"; then
2719   ac_site_file1=$CONFIG_SITE
2720 elif test "x$prefix" != xNONE; then
2721   ac_site_file1=$prefix/share/config.site
2722   ac_site_file2=$prefix/etc/config.site
2723 else
2724   ac_site_file1=$ac_default_prefix/share/config.site
2725   ac_site_file2=$ac_default_prefix/etc/config.site
2726 fi
2727 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2728 do
2729   test "x$ac_site_file" = xNONE && continue
2730   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2731     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2732 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2733     sed 's/^/| /' "$ac_site_file" >&5
2734     . "$ac_site_file"
2735   fi
2736 done
2737
2738
2739 # Check that the precious variables saved in the cache have kept the same
2740 # value.
2741 ac_cache_corrupted=false
2742 for ac_var in $ac_precious_vars; do
2743   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2744   eval ac_new_set=\$ac_env_${ac_var}_set
2745   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2746   eval ac_new_val=\$ac_env_${ac_var}_value
2747   case $ac_old_set,$ac_new_set in
2748     set,)
2749       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2750 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2751       ac_cache_corrupted=: ;;
2752     ,set)
2753       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2754 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2755       ac_cache_corrupted=: ;;
2756     ,);;
2757     *)
2758       if test "x$ac_old_val" != "x$ac_new_val"; then
2759         # differences in whitespace do not lead to failure.
2760         ac_old_val_w=`echo x $ac_old_val`
2761         ac_new_val_w=`echo x $ac_new_val`
2762         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2763           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2764 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2765           ac_cache_corrupted=:
2766         else
2767           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2768 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2769           eval $ac_var=\$ac_old_val
2770         fi
2771         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2772 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2773         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2774 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2775       fi;;
2776   esac
2777   # Pass precious variables to config.status.
2778   if test "$ac_new_set" = set; then
2779     case $ac_new_val in
2780     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2781     *) ac_arg=$ac_var=$ac_new_val ;;
2782     esac
2783     case " $ac_configure_args " in
2784       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2785       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2786     esac
2787   fi
2788 done
2789 if $ac_cache_corrupted; then
2790   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2791 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2792   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2793 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2794   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2795 fi
2796 ## -------------------- ##
2797 ## Main body of script. ##
2798 ## -------------------- ##
2799
2800 ac_ext=c
2801 ac_cpp='$CPP $CPPFLAGS'
2802 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2803 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2804 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833 ac_aux_dir=
2834 for ac_dir in build "$srcdir"/build; do
2835   for ac_t in install-sh install.sh shtool; do
2836     if test -f "$ac_dir/$ac_t"; then
2837       ac_aux_dir=$ac_dir
2838       ac_install_sh="$ac_aux_dir/$ac_t -c"
2839       break 2
2840     fi
2841   done
2842 done
2843 if test -z "$ac_aux_dir"; then
2844   as_fn_error "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5
2845 fi
2846
2847 # These three variables are undocumented and unsupported,
2848 # and are intended to be withdrawn in a future Autoconf release.
2849 # They can cause serious problems if a builder's source tree is in a directory
2850 # whose full name contains unusual characters.
2851 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2852 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2853 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2854
2855
2856 eval `$ac_aux_dir/version.sh`
2857 if test -z "$OL_STRING"; then
2858         as_fn_error "could not determine version" "$LINENO" 5
2859 fi
2860
2861 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
2862         ac_cv_shtool="$ac_aux_dir/shtool"
2863 else
2864         as_fn_error "no shtool found in $ac_aux_dir" "$LINENO" 5
2865 fi
2866
2867 SHTOOL="$ac_cv_shtool"
2868
2869 TB="" TN=""
2870 if test -t 1; then
2871         TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
2872         TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
2873 fi
2874
2875 OPENLDAP_REPO=""
2876 if test -d $ac_aux_dir/../.git; then
2877         OPENLDAP_REPO="(from Git clone) "
2878 elif test -d $ac_aux_dir/CVS; then
2879         OPENLDAP_REPO="(from CVS checkout) "
2880 fi
2881
2882 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_REPO}..."
2883
2884 # Make sure we can run config.sub.
2885 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2886   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2887
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2889 $as_echo_n "checking build system type... " >&6; }
2890 if test "${ac_cv_build+set}" = set; then :
2891   $as_echo_n "(cached) " >&6
2892 else
2893   ac_build_alias=$build_alias
2894 test "x$ac_build_alias" = x &&
2895   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2896 test "x$ac_build_alias" = x &&
2897   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
2898 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2899   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2900
2901 fi
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2903 $as_echo "$ac_cv_build" >&6; }
2904 case $ac_cv_build in
2905 *-*-*) ;;
2906 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
2907 esac
2908 build=$ac_cv_build
2909 ac_save_IFS=$IFS; IFS='-'
2910 set x $ac_cv_build
2911 shift
2912 build_cpu=$1
2913 build_vendor=$2
2914 shift; shift
2915 # Remember, the first character of IFS is used to create $*,
2916 # except with old shells:
2917 build_os=$*
2918 IFS=$ac_save_IFS
2919 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2920
2921
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2923 $as_echo_n "checking host system type... " >&6; }
2924 if test "${ac_cv_host+set}" = set; then :
2925   $as_echo_n "(cached) " >&6
2926 else
2927   if test "x$host_alias" = x; then
2928   ac_cv_host=$ac_cv_build
2929 else
2930   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2931     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2932 fi
2933
2934 fi
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2936 $as_echo "$ac_cv_host" >&6; }
2937 case $ac_cv_host in
2938 *-*-*) ;;
2939 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
2940 esac
2941 host=$ac_cv_host
2942 ac_save_IFS=$IFS; IFS='-'
2943 set x $ac_cv_host
2944 shift
2945 host_cpu=$1
2946 host_vendor=$2
2947 shift; shift
2948 # Remember, the first character of IFS is used to create $*,
2949 # except with old shells:
2950 host_os=$*
2951 IFS=$ac_save_IFS
2952 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2953
2954
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2956 $as_echo_n "checking target system type... " >&6; }
2957 if test "${ac_cv_target+set}" = set; then :
2958   $as_echo_n "(cached) " >&6
2959 else
2960   if test "x$target_alias" = x; then
2961   ac_cv_target=$ac_cv_host
2962 else
2963   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2964     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2965 fi
2966
2967 fi
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2969 $as_echo "$ac_cv_target" >&6; }
2970 case $ac_cv_target in
2971 *-*-*) ;;
2972 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
2973 esac
2974 target=$ac_cv_target
2975 ac_save_IFS=$IFS; IFS='-'
2976 set x $ac_cv_target
2977 shift
2978 target_cpu=$1
2979 target_vendor=$2
2980 shift; shift
2981 # Remember, the first character of IFS is used to create $*,
2982 # except with old shells:
2983 target_os=$*
2984 IFS=$ac_save_IFS
2985 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2986
2987
2988 # The aliases save the names the user supplied, while $host etc.
2989 # will get canonicalized.
2990 test -n "$target_alias" &&
2991   test "$program_prefix$program_suffix$program_transform_name" = \
2992     NONENONEs,x,x, &&
2993   program_prefix=${target_alias}-
2994
2995 am__api_version="1.9"
2996 # Find a good install program.  We prefer a C program (faster),
2997 # so one script is as good as another.  But avoid the broken or
2998 # incompatible versions:
2999 # SysV /etc/install, /usr/sbin/install
3000 # SunOS /usr/etc/install
3001 # IRIX /sbin/install
3002 # AIX /bin/install
3003 # AmigaOS /C/install, which installs bootblocks on floppy discs
3004 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3005 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3006 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3007 # OS/2's system install, which has a completely different semantic
3008 # ./install, which can be erroneously created by make from ./install.sh.
3009 # Reject install programs that cannot install multiple files.
3010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3011 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3012 if test -z "$INSTALL"; then
3013 if test "${ac_cv_path_install+set}" = set; then :
3014   $as_echo_n "(cached) " >&6
3015 else
3016   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3017 for as_dir in $PATH
3018 do
3019   IFS=$as_save_IFS
3020   test -z "$as_dir" && as_dir=.
3021     # Account for people who put trailing slashes in PATH elements.
3022 case $as_dir/ in #((
3023   ./ | .// | /[cC]/* | \
3024   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3025   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3026   /usr/ucb/* ) ;;
3027   *)
3028     # OSF1 and SCO ODT 3.0 have their own names for install.
3029     # Don't use installbsd from OSF since it installs stuff as root
3030     # by default.
3031     for ac_prog in ginstall scoinst install; do
3032       for ac_exec_ext in '' $ac_executable_extensions; do
3033         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3034           if test $ac_prog = install &&
3035             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3036             # AIX install.  It has an incompatible calling convention.
3037             :
3038           elif test $ac_prog = install &&
3039             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3040             # program-specific install script used by HP pwplus--don't use.
3041             :
3042           else
3043             rm -rf conftest.one conftest.two conftest.dir
3044             echo one > conftest.one
3045             echo two > conftest.two
3046             mkdir conftest.dir
3047             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3048               test -s conftest.one && test -s conftest.two &&
3049               test -s conftest.dir/conftest.one &&
3050               test -s conftest.dir/conftest.two
3051             then
3052               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3053               break 3
3054             fi
3055           fi
3056         fi
3057       done
3058     done
3059     ;;
3060 esac
3061
3062   done
3063 IFS=$as_save_IFS
3064
3065 rm -rf conftest.one conftest.two conftest.dir
3066
3067 fi
3068   if test "${ac_cv_path_install+set}" = set; then
3069     INSTALL=$ac_cv_path_install
3070   else
3071     # As a last resort, use the slow shell script.  Don't cache a
3072     # value for INSTALL within a source directory, because that will
3073     # break other packages using the cache if that directory is
3074     # removed, or if the value is a relative name.
3075     INSTALL=$ac_install_sh
3076   fi
3077 fi
3078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3079 $as_echo "$INSTALL" >&6; }
3080
3081 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3082 # It thinks the first close brace ends the variable substitution.
3083 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3084
3085 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3086
3087 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3088
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3090 $as_echo_n "checking whether build environment is sane... " >&6; }
3091 # Just in case
3092 sleep 1
3093 echo timestamp > conftest.file
3094 # Do `set' in a subshell so we don't clobber the current shell's
3095 # arguments.  Must try -L first in case configure is actually a
3096 # symlink; some systems play weird games with the mod time of symlinks
3097 # (eg FreeBSD returns the mod time of the symlink's containing
3098 # directory).
3099 if (
3100    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
3101    if test "$*" = "X"; then
3102       # -L didn't work.
3103       set X `ls -t $srcdir/configure conftest.file`
3104    fi
3105    rm -f conftest.file
3106    if test "$*" != "X $srcdir/configure conftest.file" \
3107       && test "$*" != "X conftest.file $srcdir/configure"; then
3108
3109       # If neither matched, then we have a broken ls.  This can happen
3110       # if, for instance, CONFIG_SHELL is bash and it inherits a
3111       # broken ls alias from the environment.  This has actually
3112       # happened.  Such a system could not be considered "sane".
3113       as_fn_error "ls -t appears to fail.  Make sure there is not a broken
3114 alias in your environment" "$LINENO" 5
3115    fi
3116
3117    test "$2" = conftest.file
3118    )
3119 then
3120    # Ok.
3121    :
3122 else
3123    as_fn_error "newly created file is older than distributed files!
3124 Check your system clock" "$LINENO" 5
3125 fi
3126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3127 $as_echo "yes" >&6; }
3128 test "$program_prefix" != NONE &&
3129   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3130 # Use a double $ so make ignores it.
3131 test "$program_suffix" != NONE &&
3132   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3133 # Double any \ or $.
3134 # By default was `s,x,x', remove it if useless.
3135 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3136 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3137
3138 # expand $ac_aux_dir to an absolute path
3139 am_aux_dir=`cd $ac_aux_dir && pwd`
3140
3141 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3142 # Use eval to expand $SHELL
3143 if eval "$MISSING --run true"; then
3144   am_missing_run="$MISSING --run "
3145 else
3146   am_missing_run=
3147   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3148 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3149 fi
3150
3151 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
3152   # We used to keeping the `.' as first argument, in order to
3153   # allow $(mkdir_p) to be used without argument.  As in
3154   #   $(mkdir_p) $(somedir)
3155   # where $(somedir) is conditionally defined.  However this is wrong
3156   # for two reasons:
3157   #  1. if the package is installed by a user who cannot write `.'
3158   #     make install will fail,
3159   #  2. the above comment should most certainly read
3160   #     $(mkdir_p) $(DESTDIR)$(somedir)
3161   #     so it does not work when $(somedir) is undefined and
3162   #     $(DESTDIR) is not.
3163   #  To support the latter case, we have to write
3164   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
3165   #  so the `.' trick is pointless.
3166   mkdir_p='mkdir -p --'
3167 else
3168   # On NextStep and OpenStep, the `mkdir' command does not
3169   # recognize any option.  It will interpret all options as
3170   # directories to create, and then abort because `.' already
3171   # exists.
3172   for d in ./-p ./--version;
3173   do
3174     test -d $d && rmdir $d
3175   done
3176   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
3177   if test -f "$ac_aux_dir/mkinstalldirs"; then
3178     mkdir_p='$(mkinstalldirs)'
3179   else
3180     mkdir_p='$(install_sh) -d'
3181   fi
3182 fi
3183
3184 for ac_prog in gawk mawk nawk awk
3185 do
3186   # Extract the first word of "$ac_prog", so it can be a program name with args.
3187 set dummy $ac_prog; ac_word=$2
3188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3189 $as_echo_n "checking for $ac_word... " >&6; }
3190 if test "${ac_cv_prog_AWK+set}" = set; then :
3191   $as_echo_n "(cached) " >&6
3192 else
3193   if test -n "$AWK"; then
3194   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3195 else
3196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3197 for as_dir in $PATH
3198 do
3199   IFS=$as_save_IFS
3200   test -z "$as_dir" && as_dir=.
3201     for ac_exec_ext in '' $ac_executable_extensions; do
3202   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3203     ac_cv_prog_AWK="$ac_prog"
3204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3205     break 2
3206   fi
3207 done
3208   done
3209 IFS=$as_save_IFS
3210
3211 fi
3212 fi
3213 AWK=$ac_cv_prog_AWK
3214 if test -n "$AWK"; then
3215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3216 $as_echo "$AWK" >&6; }
3217 else
3218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3219 $as_echo "no" >&6; }
3220 fi
3221
3222
3223   test -n "$AWK" && break
3224 done
3225
3226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3227 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3228 set x ${MAKE-make}
3229 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3230 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3231   $as_echo_n "(cached) " >&6
3232 else
3233   cat >conftest.make <<\_ACEOF
3234 SHELL = /bin/sh
3235 all:
3236         @echo '@@@%%%=$(MAKE)=@@@%%%'
3237 _ACEOF
3238 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3239 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3240   *@@@%%%=?*=@@@%%%*)
3241     eval ac_cv_prog_make_${ac_make}_set=yes;;
3242   *)
3243     eval ac_cv_prog_make_${ac_make}_set=no;;
3244 esac
3245 rm -f conftest.make
3246 fi
3247 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3249 $as_echo "yes" >&6; }
3250   SET_MAKE=
3251 else
3252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3253 $as_echo "no" >&6; }
3254   SET_MAKE="MAKE=${MAKE-make}"
3255 fi
3256
3257 rm -rf .tst 2>/dev/null
3258 mkdir .tst 2>/dev/null
3259 if test -d .tst; then
3260   am__leading_dot=.
3261 else
3262   am__leading_dot=_
3263 fi
3264 rmdir .tst 2>/dev/null
3265
3266 # test to see if srcdir already configured
3267 if test "`cd $srcdir && pwd`" != "`pwd`" &&
3268    test -f $srcdir/config.status; then
3269   as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3270 fi
3271
3272 # test whether we have cygpath
3273 if test -z "$CYGPATH_W"; then
3274   if (cygpath --version) >/dev/null 2>/dev/null; then
3275     CYGPATH_W='cygpath -w'
3276   else
3277     CYGPATH_W=echo
3278   fi
3279 fi
3280
3281
3282 # Define the identity of the package.
3283  PACKAGE=$OL_PACKAGE
3284  VERSION=$OL_VERSION
3285
3286
3287 # Some tools Automake needs.
3288
3289 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3290
3291
3292 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3293
3294
3295 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3296
3297
3298 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3299
3300
3301 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3302
3303 install_sh=${install_sh-"$am_aux_dir/install-sh"}
3304
3305 # Installed binaries are usually stripped using `strip' when the user
3306 # run `make install-strip'.  However `strip' might not be the right
3307 # tool to use in cross-compilation environments, therefore Automake
3308 # will honor the `STRIP' environment variable to overrule this program.
3309 if test "$cross_compiling" != no; then
3310   if test -n "$ac_tool_prefix"; then
3311   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3312 set dummy ${ac_tool_prefix}strip; ac_word=$2
3313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3314 $as_echo_n "checking for $ac_word... " >&6; }
3315 if test "${ac_cv_prog_STRIP+set}" = set; then :
3316   $as_echo_n "(cached) " >&6
3317 else
3318   if test -n "$STRIP"; then
3319   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3320 else
3321 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3322 for as_dir in $PATH
3323 do
3324   IFS=$as_save_IFS
3325   test -z "$as_dir" && as_dir=.
3326     for ac_exec_ext in '' $ac_executable_extensions; do
3327   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3328     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3329     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3330     break 2
3331   fi
3332 done
3333   done
3334 IFS=$as_save_IFS
3335
3336 fi
3337 fi
3338 STRIP=$ac_cv_prog_STRIP
3339 if test -n "$STRIP"; then
3340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3341 $as_echo "$STRIP" >&6; }
3342 else
3343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3344 $as_echo "no" >&6; }
3345 fi
3346
3347
3348 fi
3349 if test -z "$ac_cv_prog_STRIP"; then
3350   ac_ct_STRIP=$STRIP
3351   # Extract the first word of "strip", so it can be a program name with args.
3352 set dummy strip; ac_word=$2
3353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3354 $as_echo_n "checking for $ac_word... " >&6; }
3355 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3356   $as_echo_n "(cached) " >&6
3357 else
3358   if test -n "$ac_ct_STRIP"; then
3359   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3360 else
3361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3362 for as_dir in $PATH
3363 do
3364   IFS=$as_save_IFS
3365   test -z "$as_dir" && as_dir=.
3366     for ac_exec_ext in '' $ac_executable_extensions; do
3367   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3368     ac_cv_prog_ac_ct_STRIP="strip"
3369     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3370     break 2
3371   fi
3372 done
3373   done
3374 IFS=$as_save_IFS
3375
3376 fi
3377 fi
3378 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3379 if test -n "$ac_ct_STRIP"; then
3380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3381 $as_echo "$ac_ct_STRIP" >&6; }
3382 else
3383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3384 $as_echo "no" >&6; }
3385 fi
3386
3387   if test "x$ac_ct_STRIP" = x; then
3388     STRIP=":"
3389   else
3390     case $cross_compiling:$ac_tool_warned in
3391 yes:)
3392 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3393 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3394 ac_tool_warned=yes ;;
3395 esac
3396     STRIP=$ac_ct_STRIP
3397   fi
3398 else
3399   STRIP="$ac_cv_prog_STRIP"
3400 fi
3401
3402 fi
3403 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
3404
3405 # We need awk for the "check" target.  The system "awk" is bad on
3406 # some platforms.
3407 # Always define AMTAR for backward compatibility.
3408
3409 AMTAR=${AMTAR-"${am_missing_run}tar"}
3410
3411 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3412
3413
3414
3415
3416
3417 cat >>confdefs.h <<_ACEOF
3418 #define OPENLDAP_PACKAGE "$PACKAGE"
3419 _ACEOF
3420
3421
3422 cat >>confdefs.h <<_ACEOF
3423 #define OPENLDAP_VERSION "$VERSION"
3424 _ACEOF
3425
3426
3427
3428 cat >>confdefs.h <<_ACEOF
3429 #define LDAP_VENDOR_VERSION $OL_API_INC
3430 _ACEOF
3431
3432
3433 cat >>confdefs.h <<_ACEOF
3434 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
3435 _ACEOF
3436
3437
3438 cat >>confdefs.h <<_ACEOF
3439 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
3440 _ACEOF
3441
3442
3443 cat >>confdefs.h <<_ACEOF
3444 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
3445 _ACEOF
3446
3447
3448 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
3449
3450 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
3451
3452 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
3453
3454
3455
3456
3457
3458 ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
3459
3460 ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
3461
3462 ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
3463
3464
3465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking configure arguments" >&5
3466 $as_echo_n "checking configure arguments... " >&6; }
3467
3468
3469 top_builddir=`pwd`
3470
3471 ldap_subdir="/openldap"
3472
3473
3474 # Check whether --with-subdir was given.
3475 if test "${with_subdir+set}" = set; then :
3476   withval=$with_subdir; case "$withval" in
3477         no) ldap_subdir=""
3478                 ;;
3479         yes)
3480                 ;;
3481         /*|\\*)
3482                 ldap_subdir="$withval"
3483                 ;;
3484         *)
3485                 ldap_subdir="/$withval"
3486                 ;;
3487 esac
3488
3489 fi
3490
3491
3492 # OpenLDAP --enable-debug
3493
3494         # Check whether --enable-debug was given.
3495 if test "${enable_debug+set}" = set; then :
3496   enableval=$enable_debug;
3497         ol_arg=invalid
3498         for ol_val in no yes traditional ; do
3499                 if test "$enableval" = "$ol_val" ; then
3500                         ol_arg="$ol_val"
3501                 fi
3502         done
3503         if test "$ol_arg" = "invalid" ; then
3504                 as_fn_error "bad value $enableval for --enable-debug" "$LINENO" 5
3505         fi
3506         ol_enable_debug="$ol_arg"
3507
3508 else
3509         ol_enable_debug=yes
3510 fi
3511
3512 # end --enable-debug
3513 # OpenLDAP --enable-dynamic
3514
3515         # Check whether --enable-dynamic was given.
3516 if test "${enable_dynamic+set}" = set; then :
3517   enableval=$enable_dynamic;
3518         ol_arg=invalid
3519         for ol_val in auto yes no ; do
3520                 if test "$enableval" = "$ol_val" ; then
3521                         ol_arg="$ol_val"
3522                 fi
3523         done
3524         if test "$ol_arg" = "invalid" ; then
3525                 as_fn_error "bad value $enableval for --enable-dynamic" "$LINENO" 5
3526         fi
3527         ol_enable_dynamic="$ol_arg"
3528
3529 else
3530         ol_enable_dynamic=no
3531 fi
3532
3533 # end --enable-dynamic
3534 # OpenLDAP --enable-syslog
3535
3536         # Check whether --enable-syslog was given.
3537 if test "${enable_syslog+set}" = set; then :
3538   enableval=$enable_syslog;
3539         ol_arg=invalid
3540         for ol_val in auto yes no ; do
3541                 if test "$enableval" = "$ol_val" ; then
3542                         ol_arg="$ol_val"
3543                 fi
3544         done
3545         if test "$ol_arg" = "invalid" ; then
3546                 as_fn_error "bad value $enableval for --enable-syslog" "$LINENO" 5
3547         fi
3548         ol_enable_syslog="$ol_arg"
3549
3550 else
3551         ol_enable_syslog=auto
3552 fi
3553
3554 # end --enable-syslog
3555 # OpenLDAP --enable-proctitle
3556
3557         # Check whether --enable-proctitle was given.
3558 if test "${enable_proctitle+set}" = set; then :
3559   enableval=$enable_proctitle;
3560         ol_arg=invalid
3561         for ol_val in auto yes no ; do
3562                 if test "$enableval" = "$ol_val" ; then
3563                         ol_arg="$ol_val"
3564                 fi
3565         done
3566         if test "$ol_arg" = "invalid" ; then
3567                 as_fn_error "bad value $enableval for --enable-proctitle" "$LINENO" 5
3568         fi
3569         ol_enable_proctitle="$ol_arg"
3570
3571 else
3572         ol_enable_proctitle=yes
3573 fi
3574
3575 # end --enable-proctitle
3576 ol_enable_referrals=${ol_enable_referrals-no}
3577 # OpenLDAP --enable-ipv6
3578
3579         # Check whether --enable-ipv6 was given.
3580 if test "${enable_ipv6+set}" = set; then :
3581   enableval=$enable_ipv6;
3582         ol_arg=invalid
3583         for ol_val in auto yes no ; do
3584                 if test "$enableval" = "$ol_val" ; then
3585                         ol_arg="$ol_val"
3586                 fi
3587         done
3588         if test "$ol_arg" = "invalid" ; then
3589                 as_fn_error "bad value $enableval for --enable-ipv6" "$LINENO" 5
3590         fi
3591         ol_enable_ipv6="$ol_arg"
3592
3593 else
3594         ol_enable_ipv6=auto
3595 fi
3596
3597 # end --enable-ipv6
3598 # OpenLDAP --enable-local
3599
3600         # Check whether --enable-local was given.
3601 if test "${enable_local+set}" = set; then :
3602   enableval=$enable_local;
3603         ol_arg=invalid
3604         for ol_val in auto yes no ; do
3605                 if test "$enableval" = "$ol_val" ; then
3606                         ol_arg="$ol_val"
3607                 fi
3608         done
3609         if test "$ol_arg" = "invalid" ; then
3610                 as_fn_error "bad value $enableval for --enable-local" "$LINENO" 5
3611         fi
3612         ol_enable_local="$ol_arg"
3613
3614 else
3615         ol_enable_local=auto
3616 fi
3617
3618 # end --enable-local
3619
3620 # OpenLDAP --with-cyrus_sasl
3621
3622 # Check whether --with-cyrus_sasl was given.
3623 if test "${with_cyrus_sasl+set}" = set; then :
3624   withval=$with_cyrus_sasl;
3625         ol_arg=invalid
3626         for ol_val in auto yes no  ; do
3627                 if test "$withval" = "$ol_val" ; then
3628                         ol_arg="$ol_val"
3629                 fi
3630         done
3631         if test "$ol_arg" = "invalid" ; then
3632                 as_fn_error "bad value $withval for --with-cyrus_sasl" "$LINENO" 5
3633         fi
3634         ol_with_cyrus_sasl="$ol_arg"
3635
3636 else
3637         ol_with_cyrus_sasl="auto"
3638 fi
3639 # end --with-cyrus_sasl
3640
3641 # OpenLDAP --with-fetch
3642
3643 # Check whether --with-fetch was given.
3644 if test "${with_fetch+set}" = set; then :
3645   withval=$with_fetch;
3646         ol_arg=invalid
3647         for ol_val in auto yes no  ; do
3648                 if test "$withval" = "$ol_val" ; then
3649                         ol_arg="$ol_val"
3650                 fi
3651         done
3652         if test "$ol_arg" = "invalid" ; then
3653                 as_fn_error "bad value $withval for --with-fetch" "$LINENO" 5
3654         fi
3655         ol_with_fetch="$ol_arg"
3656
3657 else
3658         ol_with_fetch="auto"
3659 fi
3660 # end --with-fetch
3661
3662 # OpenLDAP --with-threads
3663
3664 # Check whether --with-threads was given.
3665 if test "${with_threads+set}" = set; then :
3666   withval=$with_threads;
3667         ol_arg=invalid
3668         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
3669                 if test "$withval" = "$ol_val" ; then
3670                         ol_arg="$ol_val"
3671                 fi
3672         done
3673         if test "$ol_arg" = "invalid" ; then
3674                 as_fn_error "bad value $withval for --with-threads" "$LINENO" 5
3675         fi
3676         ol_with_threads="$ol_arg"
3677
3678 else
3679         ol_with_threads="auto"
3680 fi
3681 # end --with-threads
3682
3683 # OpenLDAP --with-tls
3684
3685 # Check whether --with-tls was given.
3686 if test "${with_tls+set}" = set; then :
3687   withval=$with_tls;
3688         ol_arg=invalid
3689         for ol_val in auto openssl gnutls moznss yes no  ; do
3690                 if test "$withval" = "$ol_val" ; then
3691                         ol_arg="$ol_val"
3692                 fi
3693         done
3694         if test "$ol_arg" = "invalid" ; then
3695                 as_fn_error "bad value $withval for --with-tls" "$LINENO" 5
3696         fi
3697         ol_with_tls="$ol_arg"
3698
3699 else
3700         ol_with_tls="auto"
3701 fi
3702 # end --with-tls
3703
3704 # OpenLDAP --with-yielding_select
3705
3706 # Check whether --with-yielding_select was given.
3707 if test "${with_yielding_select+set}" = set; then :
3708   withval=$with_yielding_select;
3709         ol_arg=invalid
3710         for ol_val in auto yes no manual  ; do
3711                 if test "$withval" = "$ol_val" ; then
3712                         ol_arg="$ol_val"
3713                 fi
3714         done
3715         if test "$ol_arg" = "invalid" ; then
3716                 as_fn_error "bad value $withval for --with-yielding_select" "$LINENO" 5
3717         fi
3718         ol_with_yielding_select="$ol_arg"
3719
3720 else
3721         ol_with_yielding_select="auto"
3722 fi
3723 # end --with-yielding_select
3724
3725 # OpenLDAP --with-mp
3726
3727 # Check whether --with-mp was given.
3728 if test "${with_mp+set}" = set; then :
3729   withval=$with_mp;
3730         ol_arg=invalid
3731         for ol_val in auto longlong long bignum gmp yes no ; do
3732                 if test "$withval" = "$ol_val" ; then
3733                         ol_arg="$ol_val"
3734                 fi
3735         done
3736         if test "$ol_arg" = "invalid" ; then
3737                 as_fn_error "bad value $withval for --with-mp" "$LINENO" 5
3738         fi
3739         ol_with_mp="$ol_arg"
3740
3741 else
3742         ol_with_mp="auto"
3743 fi
3744 # end --with-mp
3745
3746 # OpenLDAP --with-odbc
3747
3748 # Check whether --with-odbc was given.
3749 if test "${with_odbc+set}" = set; then :
3750   withval=$with_odbc;
3751         ol_arg=invalid
3752         for ol_val in auto iodbc unixodbc odbc32  ; do
3753                 if test "$withval" = "$ol_val" ; then
3754                         ol_arg="$ol_val"
3755                 fi
3756         done
3757         if test "$ol_arg" = "invalid" ; then
3758                 as_fn_error "bad value $withval for --with-odbc" "$LINENO" 5
3759         fi
3760         ol_with_odbc="$ol_arg"
3761
3762 else
3763         ol_with_odbc="auto"
3764 fi
3765 # end --with-odbc
3766
3767
3768
3769 # Check whether --enable-xxslapdoptions was given.
3770 if test "${enable_xxslapdoptions+set}" = set; then :
3771   enableval=$enable_xxslapdoptions;
3772 fi
3773
3774 # OpenLDAP --enable-slapd
3775
3776         # Check whether --enable-slapd was given.
3777 if test "${enable_slapd+set}" = set; then :
3778   enableval=$enable_slapd;
3779         ol_arg=invalid
3780         for ol_val in auto yes no ; do
3781                 if test "$enableval" = "$ol_val" ; then
3782                         ol_arg="$ol_val"
3783                 fi
3784         done
3785         if test "$ol_arg" = "invalid" ; then
3786                 as_fn_error "bad value $enableval for --enable-slapd" "$LINENO" 5
3787         fi
3788         ol_enable_slapd="$ol_arg"
3789
3790 else
3791         ol_enable_slapd=yes
3792 fi
3793
3794 # end --enable-slapd
3795 # OpenLDAP --enable-dynacl
3796
3797         # Check whether --enable-dynacl was given.
3798 if test "${enable_dynacl+set}" = set; then :
3799   enableval=$enable_dynacl;
3800         ol_arg=invalid
3801         for ol_val in auto yes no ; do
3802                 if test "$enableval" = "$ol_val" ; then
3803                         ol_arg="$ol_val"
3804                 fi
3805         done
3806         if test "$ol_arg" = "invalid" ; then
3807                 as_fn_error "bad value $enableval for --enable-dynacl" "$LINENO" 5
3808         fi
3809         ol_enable_dynacl="$ol_arg"
3810
3811 else
3812         ol_enable_dynacl=no
3813 fi
3814
3815 # end --enable-dynacl
3816 # OpenLDAP --enable-aci
3817
3818         # Check whether --enable-aci was given.
3819 if test "${enable_aci+set}" = set; then :
3820   enableval=$enable_aci;
3821         ol_arg=invalid
3822         for ol_val in no yes mod ; do
3823                 if test "$enableval" = "$ol_val" ; then
3824                         ol_arg="$ol_val"
3825                 fi
3826         done
3827         if test "$ol_arg" = "invalid" ; then
3828                 as_fn_error "bad value $enableval for --enable-aci" "$LINENO" 5
3829         fi
3830         ol_enable_aci="$ol_arg"
3831
3832 else
3833         ol_enable_aci=no
3834 fi
3835
3836 # end --enable-aci
3837 # OpenLDAP --enable-cleartext
3838
3839         # Check whether --enable-cleartext was given.
3840 if test "${enable_cleartext+set}" = set; then :
3841   enableval=$enable_cleartext;
3842         ol_arg=invalid
3843         for ol_val in auto yes no ; do
3844                 if test "$enableval" = "$ol_val" ; then
3845                         ol_arg="$ol_val"
3846                 fi
3847         done
3848         if test "$ol_arg" = "invalid" ; then
3849                 as_fn_error "bad value $enableval for --enable-cleartext" "$LINENO" 5
3850         fi
3851         ol_enable_cleartext="$ol_arg"
3852
3853 else
3854         ol_enable_cleartext=yes
3855 fi
3856
3857 # end --enable-cleartext
3858 # OpenLDAP --enable-crypt
3859
3860         # Check whether --enable-crypt was given.
3861 if test "${enable_crypt+set}" = set; then :
3862   enableval=$enable_crypt;
3863         ol_arg=invalid
3864         for ol_val in auto yes no ; do
3865                 if test "$enableval" = "$ol_val" ; then
3866                         ol_arg="$ol_val"
3867                 fi
3868         done
3869         if test "$ol_arg" = "invalid" ; then
3870                 as_fn_error "bad value $enableval for --enable-crypt" "$LINENO" 5
3871         fi
3872         ol_enable_crypt="$ol_arg"
3873
3874 else
3875         ol_enable_crypt=no
3876 fi
3877
3878 # end --enable-crypt
3879 # OpenLDAP --enable-lmpasswd
3880
3881         # Check whether --enable-lmpasswd was given.
3882 if test "${enable_lmpasswd+set}" = set; then :
3883   enableval=$enable_lmpasswd;
3884         ol_arg=invalid
3885         for ol_val in auto yes no ; do
3886                 if test "$enableval" = "$ol_val" ; then
3887                         ol_arg="$ol_val"
3888                 fi
3889         done
3890         if test "$ol_arg" = "invalid" ; then
3891                 as_fn_error "bad value $enableval for --enable-lmpasswd" "$LINENO" 5
3892         fi
3893         ol_enable_lmpasswd="$ol_arg"
3894
3895 else
3896         ol_enable_lmpasswd=no
3897 fi
3898
3899 # end --enable-lmpasswd
3900 # OpenLDAP --enable-spasswd
3901
3902         # Check whether --enable-spasswd was given.
3903 if test "${enable_spasswd+set}" = set; then :
3904   enableval=$enable_spasswd;
3905         ol_arg=invalid
3906         for ol_val in auto yes no ; do
3907                 if test "$enableval" = "$ol_val" ; then
3908                         ol_arg="$ol_val"
3909                 fi
3910         done
3911         if test "$ol_arg" = "invalid" ; then
3912                 as_fn_error "bad value $enableval for --enable-spasswd" "$LINENO" 5
3913         fi
3914         ol_enable_spasswd="$ol_arg"
3915
3916 else
3917         ol_enable_spasswd=no
3918 fi
3919
3920 # end --enable-spasswd
3921 # OpenLDAP --enable-modules
3922
3923         # Check whether --enable-modules was given.
3924 if test "${enable_modules+set}" = set; then :
3925   enableval=$enable_modules;
3926         ol_arg=invalid
3927         for ol_val in auto yes no ; do
3928                 if test "$enableval" = "$ol_val" ; then
3929                         ol_arg="$ol_val"
3930                 fi
3931         done
3932         if test "$ol_arg" = "invalid" ; then
3933                 as_fn_error "bad value $enableval for --enable-modules" "$LINENO" 5
3934         fi
3935         ol_enable_modules="$ol_arg"
3936
3937 else
3938         ol_enable_modules=no
3939 fi
3940
3941 # end --enable-modules
3942 # OpenLDAP --enable-rewrite
3943
3944         # Check whether --enable-rewrite was given.
3945 if test "${enable_rewrite+set}" = set; then :
3946   enableval=$enable_rewrite;
3947         ol_arg=invalid
3948         for ol_val in auto yes no ; do
3949                 if test "$enableval" = "$ol_val" ; then
3950                         ol_arg="$ol_val"
3951                 fi
3952         done
3953         if test "$ol_arg" = "invalid" ; then
3954                 as_fn_error "bad value $enableval for --enable-rewrite" "$LINENO" 5
3955         fi
3956         ol_enable_rewrite="$ol_arg"
3957
3958 else
3959         ol_enable_rewrite=auto
3960 fi
3961
3962 # end --enable-rewrite
3963 # OpenLDAP --enable-rlookups
3964
3965         # Check whether --enable-rlookups was given.
3966 if test "${enable_rlookups+set}" = set; then :
3967   enableval=$enable_rlookups;
3968         ol_arg=invalid
3969         for ol_val in auto yes no ; do
3970                 if test "$enableval" = "$ol_val" ; then
3971                         ol_arg="$ol_val"
3972                 fi
3973         done
3974         if test "$ol_arg" = "invalid" ; then
3975                 as_fn_error "bad value $enableval for --enable-rlookups" "$LINENO" 5
3976         fi
3977         ol_enable_rlookups="$ol_arg"
3978
3979 else
3980         ol_enable_rlookups=no
3981 fi
3982
3983 # end --enable-rlookups
3984 # OpenLDAP --enable-slapi
3985
3986         # Check whether --enable-slapi was given.
3987 if test "${enable_slapi+set}" = set; then :
3988   enableval=$enable_slapi;
3989         ol_arg=invalid
3990         for ol_val in auto yes no ; do
3991                 if test "$enableval" = "$ol_val" ; then
3992                         ol_arg="$ol_val"
3993                 fi
3994         done
3995         if test "$ol_arg" = "invalid" ; then
3996                 as_fn_error "bad value $enableval for --enable-slapi" "$LINENO" 5
3997         fi
3998         ol_enable_slapi="$ol_arg"
3999
4000 else
4001         ol_enable_slapi=no
4002 fi
4003
4004 # end --enable-slapi
4005 # OpenLDAP --enable-slp
4006
4007         # Check whether --enable-slp was given.
4008 if test "${enable_slp+set}" = set; then :
4009   enableval=$enable_slp;
4010         ol_arg=invalid
4011         for ol_val in auto yes no ; do
4012                 if test "$enableval" = "$ol_val" ; then
4013                         ol_arg="$ol_val"
4014                 fi
4015         done
4016         if test "$ol_arg" = "invalid" ; then
4017                 as_fn_error "bad value $enableval for --enable-slp" "$LINENO" 5
4018         fi
4019         ol_enable_slp="$ol_arg"
4020
4021 else
4022         ol_enable_slp=no
4023 fi
4024
4025 # end --enable-slp
4026 # OpenLDAP --enable-wrappers
4027
4028         # Check whether --enable-wrappers was given.
4029 if test "${enable_wrappers+set}" = set; then :
4030   enableval=$enable_wrappers;
4031         ol_arg=invalid
4032         for ol_val in auto yes no ; do
4033                 if test "$enableval" = "$ol_val" ; then
4034                         ol_arg="$ol_val"
4035                 fi
4036         done
4037         if test "$ol_arg" = "invalid" ; then
4038                 as_fn_error "bad value $enableval for --enable-wrappers" "$LINENO" 5
4039         fi
4040         ol_enable_wrappers="$ol_arg"
4041
4042 else
4043         ol_enable_wrappers=no
4044 fi
4045
4046 # end --enable-wrappers
4047
4048 Backends="bdb \
4049         dnssrv \
4050         hdb \
4051         ldap \
4052         meta \
4053         monitor \
4054         ndb \
4055         null \
4056         passwd \
4057         perl \
4058         relay \
4059         shell \
4060         sock \
4061         sql"
4062
4063 # Check whether --enable-xxslapbackends was given.
4064 if test "${enable_xxslapbackends+set}" = set; then :
4065   enableval=$enable_xxslapbackends;
4066 fi
4067
4068
4069 # OpenLDAP --enable-backends
4070
4071         # Check whether --enable-backends was given.
4072 if test "${enable_backends+set}" = set; then :
4073   enableval=$enable_backends;
4074         ol_arg=invalid
4075         for ol_val in no yes mod ; do
4076                 if test "$enableval" = "$ol_val" ; then
4077                         ol_arg="$ol_val"
4078                 fi
4079         done
4080         if test "$ol_arg" = "invalid" ; then
4081                 as_fn_error "bad value $enableval for --enable-backends" "$LINENO" 5
4082         fi
4083         ol_enable_backends="$ol_arg"
4084
4085 fi
4086
4087 # end --enable-backends
4088 # OpenLDAP --enable-bdb
4089
4090         # Check whether --enable-bdb was given.
4091 if test "${enable_bdb+set}" = set; then :
4092   enableval=$enable_bdb;
4093         ol_arg=invalid
4094         for ol_val in no yes mod ; do
4095                 if test "$enableval" = "$ol_val" ; then
4096                         ol_arg="$ol_val"
4097                 fi
4098         done
4099         if test "$ol_arg" = "invalid" ; then
4100                 as_fn_error "bad value $enableval for --enable-bdb" "$LINENO" 5
4101         fi
4102         ol_enable_bdb="$ol_arg"
4103
4104 else
4105         ol_enable_bdb=${ol_enable_backends:-yes}
4106 fi
4107
4108 # end --enable-bdb
4109 # OpenLDAP --enable-dnssrv
4110
4111         # Check whether --enable-dnssrv was given.
4112 if test "${enable_dnssrv+set}" = set; then :
4113   enableval=$enable_dnssrv;
4114         ol_arg=invalid
4115         for ol_val in no yes mod ; do
4116                 if test "$enableval" = "$ol_val" ; then
4117                         ol_arg="$ol_val"
4118                 fi
4119         done
4120         if test "$ol_arg" = "invalid" ; then
4121                 as_fn_error "bad value $enableval for --enable-dnssrv" "$LINENO" 5
4122         fi
4123         ol_enable_dnssrv="$ol_arg"
4124
4125 else
4126         ol_enable_dnssrv=${ol_enable_backends:-no}
4127 fi
4128
4129 # end --enable-dnssrv
4130 # OpenLDAP --enable-hdb
4131
4132         # Check whether --enable-hdb was given.
4133 if test "${enable_hdb+set}" = set; then :
4134   enableval=$enable_hdb;
4135         ol_arg=invalid
4136         for ol_val in no yes mod ; do
4137                 if test "$enableval" = "$ol_val" ; then
4138                         ol_arg="$ol_val"
4139                 fi
4140         done
4141         if test "$ol_arg" = "invalid" ; then
4142                 as_fn_error "bad value $enableval for --enable-hdb" "$LINENO" 5
4143         fi
4144         ol_enable_hdb="$ol_arg"
4145
4146 else
4147         ol_enable_hdb=${ol_enable_backends:-yes}
4148 fi
4149
4150 # end --enable-hdb
4151 # OpenLDAP --enable-ldap
4152
4153         # Check whether --enable-ldap was given.
4154 if test "${enable_ldap+set}" = set; then :
4155   enableval=$enable_ldap;
4156         ol_arg=invalid
4157         for ol_val in no yes mod ; do
4158                 if test "$enableval" = "$ol_val" ; then
4159                         ol_arg="$ol_val"
4160                 fi
4161         done
4162         if test "$ol_arg" = "invalid" ; then
4163                 as_fn_error "bad value $enableval for --enable-ldap" "$LINENO" 5
4164         fi
4165         ol_enable_ldap="$ol_arg"
4166
4167 else
4168         ol_enable_ldap=${ol_enable_backends:-no}
4169 fi
4170
4171 # end --enable-ldap
4172 # OpenLDAP --enable-meta
4173
4174         # Check whether --enable-meta was given.
4175 if test "${enable_meta+set}" = set; then :
4176   enableval=$enable_meta;
4177         ol_arg=invalid
4178         for ol_val in no yes mod ; do
4179                 if test "$enableval" = "$ol_val" ; then
4180                         ol_arg="$ol_val"
4181                 fi
4182         done
4183         if test "$ol_arg" = "invalid" ; then
4184                 as_fn_error "bad value $enableval for --enable-meta" "$LINENO" 5
4185         fi
4186         ol_enable_meta="$ol_arg"
4187
4188 else
4189         ol_enable_meta=${ol_enable_backends:-no}
4190 fi
4191
4192 # end --enable-meta
4193 # OpenLDAP --enable-monitor
4194
4195         # Check whether --enable-monitor was given.
4196 if test "${enable_monitor+set}" = set; then :
4197   enableval=$enable_monitor;
4198         ol_arg=invalid
4199         for ol_val in no yes mod ; do
4200                 if test "$enableval" = "$ol_val" ; then
4201                         ol_arg="$ol_val"
4202                 fi
4203         done
4204         if test "$ol_arg" = "invalid" ; then
4205                 as_fn_error "bad value $enableval for --enable-monitor" "$LINENO" 5
4206         fi
4207         ol_enable_monitor="$ol_arg"
4208
4209 else
4210         ol_enable_monitor=${ol_enable_backends:-yes}
4211 fi
4212
4213 # end --enable-monitor
4214 # OpenLDAP --enable-ndb
4215
4216         # Check whether --enable-ndb was given.
4217 if test "${enable_ndb+set}" = set; then :
4218   enableval=$enable_ndb;
4219         ol_arg=invalid
4220         for ol_val in no yes mod ; do
4221                 if test "$enableval" = "$ol_val" ; then
4222                         ol_arg="$ol_val"
4223                 fi
4224         done
4225         if test "$ol_arg" = "invalid" ; then
4226                 as_fn_error "bad value $enableval for --enable-ndb" "$LINENO" 5
4227         fi
4228         ol_enable_ndb="$ol_arg"
4229
4230 else
4231         ol_enable_ndb=${ol_enable_backends:-no}
4232 fi
4233
4234 # end --enable-ndb
4235 # OpenLDAP --enable-null
4236
4237         # Check whether --enable-null was given.
4238 if test "${enable_null+set}" = set; then :
4239   enableval=$enable_null;
4240         ol_arg=invalid
4241         for ol_val in no yes mod ; do
4242                 if test "$enableval" = "$ol_val" ; then
4243                         ol_arg="$ol_val"
4244                 fi
4245         done
4246         if test "$ol_arg" = "invalid" ; then
4247                 as_fn_error "bad value $enableval for --enable-null" "$LINENO" 5
4248         fi
4249         ol_enable_null="$ol_arg"
4250
4251 else
4252         ol_enable_null=${ol_enable_backends:-no}
4253 fi
4254
4255 # end --enable-null
4256 # OpenLDAP --enable-passwd
4257
4258         # Check whether --enable-passwd was given.
4259 if test "${enable_passwd+set}" = set; then :
4260   enableval=$enable_passwd;
4261         ol_arg=invalid
4262         for ol_val in no yes mod ; do
4263                 if test "$enableval" = "$ol_val" ; then
4264                         ol_arg="$ol_val"
4265                 fi
4266         done
4267         if test "$ol_arg" = "invalid" ; then
4268                 as_fn_error "bad value $enableval for --enable-passwd" "$LINENO" 5
4269         fi
4270         ol_enable_passwd="$ol_arg"
4271
4272 else
4273         ol_enable_passwd=${ol_enable_backends:-no}
4274 fi
4275
4276 # end --enable-passwd
4277 # OpenLDAP --enable-perl
4278
4279         # Check whether --enable-perl was given.
4280 if test "${enable_perl+set}" = set; then :
4281   enableval=$enable_perl;
4282         ol_arg=invalid
4283         for ol_val in no yes mod ; do
4284                 if test "$enableval" = "$ol_val" ; then
4285                         ol_arg="$ol_val"
4286                 fi
4287         done
4288         if test "$ol_arg" = "invalid" ; then
4289                 as_fn_error "bad value $enableval for --enable-perl" "$LINENO" 5
4290         fi
4291         ol_enable_perl="$ol_arg"
4292
4293 else
4294         ol_enable_perl=${ol_enable_backends:-no}
4295 fi
4296
4297 # end --enable-perl
4298 # OpenLDAP --enable-relay
4299
4300         # Check whether --enable-relay was given.
4301 if test "${enable_relay+set}" = set; then :
4302   enableval=$enable_relay;
4303         ol_arg=invalid
4304         for ol_val in no yes mod ; do
4305                 if test "$enableval" = "$ol_val" ; then
4306                         ol_arg="$ol_val"
4307                 fi
4308         done
4309         if test "$ol_arg" = "invalid" ; then
4310                 as_fn_error "bad value $enableval for --enable-relay" "$LINENO" 5
4311         fi
4312         ol_enable_relay="$ol_arg"
4313
4314 else
4315         ol_enable_relay=${ol_enable_backends:-yes}
4316 fi
4317
4318 # end --enable-relay
4319 # OpenLDAP --enable-shell
4320
4321         # Check whether --enable-shell was given.
4322 if test "${enable_shell+set}" = set; then :
4323   enableval=$enable_shell;
4324         ol_arg=invalid
4325         for ol_val in no yes mod ; do
4326                 if test "$enableval" = "$ol_val" ; then
4327                         ol_arg="$ol_val"
4328                 fi
4329         done
4330         if test "$ol_arg" = "invalid" ; then
4331                 as_fn_error "bad value $enableval for --enable-shell" "$LINENO" 5
4332         fi
4333         ol_enable_shell="$ol_arg"
4334
4335 else
4336         ol_enable_shell=${ol_enable_backends:-no}
4337 fi
4338
4339 # end --enable-shell
4340 # OpenLDAP --enable-sock
4341
4342         # Check whether --enable-sock was given.
4343 if test "${enable_sock+set}" = set; then :
4344   enableval=$enable_sock;
4345         ol_arg=invalid
4346         for ol_val in no yes mod ; do
4347                 if test "$enableval" = "$ol_val" ; then
4348                         ol_arg="$ol_val"
4349                 fi
4350         done
4351         if test "$ol_arg" = "invalid" ; then
4352                 as_fn_error "bad value $enableval for --enable-sock" "$LINENO" 5
4353         fi
4354         ol_enable_sock="$ol_arg"
4355
4356 else
4357         ol_enable_sock=${ol_enable_backends:-no}
4358 fi
4359
4360 # end --enable-sock
4361 # OpenLDAP --enable-sql
4362
4363         # Check whether --enable-sql was given.
4364 if test "${enable_sql+set}" = set; then :
4365   enableval=$enable_sql;
4366         ol_arg=invalid
4367         for ol_val in no yes mod ; do
4368                 if test "$enableval" = "$ol_val" ; then
4369                         ol_arg="$ol_val"
4370                 fi
4371         done
4372         if test "$ol_arg" = "invalid" ; then
4373                 as_fn_error "bad value $enableval for --enable-sql" "$LINENO" 5
4374         fi
4375         ol_enable_sql="$ol_arg"
4376
4377 else
4378         ol_enable_sql=${ol_enable_backends:-no}
4379 fi
4380
4381 # end --enable-sql
4382
4383 Overlays="accesslog \
4384         auditlog \
4385         collect \
4386         constraint \
4387         dds \
4388         deref \
4389         dyngroup \
4390         dynlist \
4391         memberof \
4392         ppolicy \
4393         proxycache \
4394         refint \
4395         retcode \
4396         rwm \
4397         seqmod \
4398         sssvlv \
4399         syncprov \
4400         translucent \
4401         unique \
4402         valsort"
4403
4404 # Check whether --enable-xxslapoverlays was given.
4405 if test "${enable_xxslapoverlays+set}" = set; then :
4406   enableval=$enable_xxslapoverlays;
4407 fi
4408
4409
4410 # OpenLDAP --enable-overlays
4411
4412         # Check whether --enable-overlays was given.
4413 if test "${enable_overlays+set}" = set; then :
4414   enableval=$enable_overlays;
4415         ol_arg=invalid
4416         for ol_val in no yes mod ; do
4417                 if test "$enableval" = "$ol_val" ; then
4418                         ol_arg="$ol_val"
4419                 fi
4420         done
4421         if test "$ol_arg" = "invalid" ; then
4422                 as_fn_error "bad value $enableval for --enable-overlays" "$LINENO" 5
4423         fi
4424         ol_enable_overlays="$ol_arg"
4425
4426 fi
4427
4428 # end --enable-overlays
4429 # OpenLDAP --enable-accesslog
4430
4431         # Check whether --enable-accesslog was given.
4432 if test "${enable_accesslog+set}" = set; then :
4433   enableval=$enable_accesslog;
4434         ol_arg=invalid
4435         for ol_val in no yes mod ; do
4436                 if test "$enableval" = "$ol_val" ; then
4437                         ol_arg="$ol_val"
4438                 fi
4439         done
4440         if test "$ol_arg" = "invalid" ; then
4441                 as_fn_error "bad value $enableval for --enable-accesslog" "$LINENO" 5
4442         fi
4443         ol_enable_accesslog="$ol_arg"
4444
4445 else
4446         ol_enable_accesslog=${ol_enable_overlays:-no}
4447 fi
4448
4449 # end --enable-accesslog
4450
4451 # OpenLDAP --enable-auditlog
4452
4453         # Check whether --enable-auditlog was given.
4454 if test "${enable_auditlog+set}" = set; then :
4455   enableval=$enable_auditlog;
4456         ol_arg=invalid
4457         for ol_val in no yes mod ; do
4458                 if test "$enableval" = "$ol_val" ; then
4459                         ol_arg="$ol_val"
4460                 fi
4461         done
4462         if test "$ol_arg" = "invalid" ; then
4463                 as_fn_error "bad value $enableval for --enable-auditlog" "$LINENO" 5
4464         fi
4465         ol_enable_auditlog="$ol_arg"
4466
4467 else
4468         ol_enable_auditlog=${ol_enable_overlays:-no}
4469 fi
4470
4471 # end --enable-auditlog
4472
4473 # OpenLDAP --enable-collect
4474
4475         # Check whether --enable-collect was given.
4476 if test "${enable_collect+set}" = set; then :
4477   enableval=$enable_collect;
4478         ol_arg=invalid
4479         for ol_val in no yes mod ; do
4480                 if test "$enableval" = "$ol_val" ; then
4481                         ol_arg="$ol_val"
4482                 fi
4483         done
4484         if test "$ol_arg" = "invalid" ; then
4485                 as_fn_error "bad value $enableval for --enable-collect" "$LINENO" 5
4486         fi
4487         ol_enable_collect="$ol_arg"
4488
4489 else
4490         ol_enable_collect=${ol_enable_overlays:-no}
4491 fi
4492
4493 # end --enable-collect
4494
4495 # OpenLDAP --enable-constraint
4496
4497         # Check whether --enable-constraint was given.
4498 if test "${enable_constraint+set}" = set; then :
4499   enableval=$enable_constraint;
4500         ol_arg=invalid
4501         for ol_val in no yes mod ; do
4502                 if test "$enableval" = "$ol_val" ; then
4503                         ol_arg="$ol_val"
4504                 fi
4505         done
4506         if test "$ol_arg" = "invalid" ; then
4507                 as_fn_error "bad value $enableval for --enable-constraint" "$LINENO" 5
4508         fi
4509         ol_enable_constraint="$ol_arg"
4510
4511 else
4512         ol_enable_constraint=${ol_enable_overlays:-no}
4513 fi
4514
4515 # end --enable-constraint
4516
4517 # OpenLDAP --enable-dds
4518
4519         # Check whether --enable-dds was given.
4520 if test "${enable_dds+set}" = set; then :
4521   enableval=$enable_dds;
4522         ol_arg=invalid
4523         for ol_val in no yes mod ; do
4524                 if test "$enableval" = "$ol_val" ; then
4525                         ol_arg="$ol_val"
4526                 fi
4527         done
4528         if test "$ol_arg" = "invalid" ; then
4529                 as_fn_error "bad value $enableval for --enable-dds" "$LINENO" 5
4530         fi
4531         ol_enable_dds="$ol_arg"
4532
4533 else
4534         ol_enable_dds=${ol_enable_overlays:-no}
4535 fi
4536
4537 # end --enable-dds
4538
4539 # OpenLDAP --enable-deref
4540
4541         # Check whether --enable-deref was given.
4542 if test "${enable_deref+set}" = set; then :
4543   enableval=$enable_deref;
4544         ol_arg=invalid
4545         for ol_val in no yes mod ; do
4546                 if test "$enableval" = "$ol_val" ; then
4547                         ol_arg="$ol_val"
4548                 fi
4549         done
4550         if test "$ol_arg" = "invalid" ; then
4551                 as_fn_error "bad value $enableval for --enable-deref" "$LINENO" 5
4552         fi
4553         ol_enable_deref="$ol_arg"
4554
4555 else
4556         ol_enable_deref=${ol_enable_overlays:-no}
4557 fi
4558
4559 # end --enable-deref
4560
4561 # OpenLDAP --enable-dyngroup
4562
4563         # Check whether --enable-dyngroup was given.
4564 if test "${enable_dyngroup+set}" = set; then :
4565   enableval=$enable_dyngroup;
4566         ol_arg=invalid
4567         for ol_val in no yes mod ; do
4568                 if test "$enableval" = "$ol_val" ; then
4569                         ol_arg="$ol_val"
4570                 fi
4571         done
4572         if test "$ol_arg" = "invalid" ; then
4573                 as_fn_error "bad value $enableval for --enable-dyngroup" "$LINENO" 5
4574         fi
4575         ol_enable_dyngroup="$ol_arg"
4576
4577 else
4578         ol_enable_dyngroup=${ol_enable_overlays:-no}
4579 fi
4580
4581 # end --enable-dyngroup
4582
4583 # OpenLDAP --enable-dynlist
4584
4585         # Check whether --enable-dynlist was given.
4586 if test "${enable_dynlist+set}" = set; then :
4587   enableval=$enable_dynlist;
4588         ol_arg=invalid
4589         for ol_val in no yes mod ; do
4590                 if test "$enableval" = "$ol_val" ; then
4591                         ol_arg="$ol_val"
4592                 fi
4593         done
4594         if test "$ol_arg" = "invalid" ; then
4595                 as_fn_error "bad value $enableval for --enable-dynlist" "$LINENO" 5
4596         fi
4597         ol_enable_dynlist="$ol_arg"
4598
4599 else
4600         ol_enable_dynlist=${ol_enable_overlays:-no}
4601 fi
4602
4603 # end --enable-dynlist
4604
4605 # OpenLDAP --enable-memberof
4606
4607         # Check whether --enable-memberof was given.
4608 if test "${enable_memberof+set}" = set; then :
4609   enableval=$enable_memberof;
4610         ol_arg=invalid
4611         for ol_val in no yes mod ; do
4612                 if test "$enableval" = "$ol_val" ; then
4613                         ol_arg="$ol_val"
4614                 fi
4615         done
4616         if test "$ol_arg" = "invalid" ; then
4617                 as_fn_error "bad value $enableval for --enable-memberof" "$LINENO" 5
4618         fi
4619         ol_enable_memberof="$ol_arg"
4620
4621 else
4622         ol_enable_memberof=${ol_enable_overlays:-no}
4623 fi
4624
4625 # end --enable-memberof
4626
4627 # OpenLDAP --enable-ppolicy
4628
4629         # Check whether --enable-ppolicy was given.
4630 if test "${enable_ppolicy+set}" = set; then :
4631   enableval=$enable_ppolicy;
4632         ol_arg=invalid
4633         for ol_val in no yes mod ; do
4634                 if test "$enableval" = "$ol_val" ; then
4635                         ol_arg="$ol_val"
4636                 fi
4637         done
4638         if test "$ol_arg" = "invalid" ; then
4639                 as_fn_error "bad value $enableval for --enable-ppolicy" "$LINENO" 5
4640         fi
4641         ol_enable_ppolicy="$ol_arg"
4642
4643 else
4644         ol_enable_ppolicy=${ol_enable_overlays:-no}
4645 fi
4646
4647 # end --enable-ppolicy
4648
4649 # OpenLDAP --enable-proxycache
4650
4651         # Check whether --enable-proxycache was given.
4652 if test "${enable_proxycache+set}" = set; then :
4653   enableval=$enable_proxycache;
4654         ol_arg=invalid
4655         for ol_val in no yes mod ; do
4656                 if test "$enableval" = "$ol_val" ; then
4657                         ol_arg="$ol_val"
4658                 fi
4659         done
4660         if test "$ol_arg" = "invalid" ; then
4661                 as_fn_error "bad value $enableval for --enable-proxycache" "$LINENO" 5
4662         fi
4663         ol_enable_proxycache="$ol_arg"
4664
4665 else
4666         ol_enable_proxycache=${ol_enable_overlays:-no}
4667 fi
4668
4669 # end --enable-proxycache
4670
4671 # OpenLDAP --enable-refint
4672
4673         # Check whether --enable-refint was given.
4674 if test "${enable_refint+set}" = set; then :
4675   enableval=$enable_refint;
4676         ol_arg=invalid
4677         for ol_val in no yes mod ; do
4678                 if test "$enableval" = "$ol_val" ; then
4679                         ol_arg="$ol_val"
4680                 fi
4681         done
4682         if test "$ol_arg" = "invalid" ; then
4683                 as_fn_error "bad value $enableval for --enable-refint" "$LINENO" 5
4684         fi
4685         ol_enable_refint="$ol_arg"
4686
4687 else
4688         ol_enable_refint=${ol_enable_overlays:-no}
4689 fi
4690
4691 # end --enable-refint
4692
4693 # OpenLDAP --enable-retcode
4694
4695         # Check whether --enable-retcode was given.
4696 if test "${enable_retcode+set}" = set; then :
4697   enableval=$enable_retcode;
4698         ol_arg=invalid
4699         for ol_val in no yes mod ; do
4700                 if test "$enableval" = "$ol_val" ; then
4701                         ol_arg="$ol_val"
4702                 fi
4703         done
4704         if test "$ol_arg" = "invalid" ; then
4705                 as_fn_error "bad value $enableval for --enable-retcode" "$LINENO" 5
4706         fi
4707         ol_enable_retcode="$ol_arg"
4708
4709 else
4710         ol_enable_retcode=${ol_enable_overlays:-no}
4711 fi
4712
4713 # end --enable-retcode
4714
4715 # OpenLDAP --enable-rwm
4716
4717         # Check whether --enable-rwm was given.
4718 if test "${enable_rwm+set}" = set; then :
4719   enableval=$enable_rwm;
4720         ol_arg=invalid
4721         for ol_val in no yes mod ; do
4722                 if test "$enableval" = "$ol_val" ; then
4723                         ol_arg="$ol_val"
4724                 fi
4725         done
4726         if test "$ol_arg" = "invalid" ; then
4727                 as_fn_error "bad value $enableval for --enable-rwm" "$LINENO" 5
4728         fi
4729         ol_enable_rwm="$ol_arg"
4730
4731 else
4732         ol_enable_rwm=${ol_enable_overlays:-no}
4733 fi
4734
4735 # end --enable-rwm
4736
4737 # OpenLDAP --enable-seqmod
4738
4739         # Check whether --enable-seqmod was given.
4740 if test "${enable_seqmod+set}" = set; then :
4741   enableval=$enable_seqmod;
4742         ol_arg=invalid
4743         for ol_val in no yes mod ; do
4744                 if test "$enableval" = "$ol_val" ; then
4745                         ol_arg="$ol_val"
4746                 fi
4747         done
4748         if test "$ol_arg" = "invalid" ; then
4749                 as_fn_error "bad value $enableval for --enable-seqmod" "$LINENO" 5
4750         fi
4751         ol_enable_seqmod="$ol_arg"
4752
4753 else
4754         ol_enable_seqmod=${ol_enable_overlays:-no}
4755 fi
4756
4757 # end --enable-seqmod
4758
4759 # OpenLDAP --enable-sssvlv
4760
4761         # Check whether --enable-sssvlv was given.
4762 if test "${enable_sssvlv+set}" = set; then :
4763   enableval=$enable_sssvlv;
4764         ol_arg=invalid
4765         for ol_val in no yes mod ; do
4766                 if test "$enableval" = "$ol_val" ; then
4767                         ol_arg="$ol_val"
4768                 fi
4769         done
4770         if test "$ol_arg" = "invalid" ; then
4771                 as_fn_error "bad value $enableval for --enable-sssvlv" "$LINENO" 5
4772         fi
4773         ol_enable_sssvlv="$ol_arg"
4774
4775 else
4776         ol_enable_sssvlv=${ol_enable_overlays:-no}
4777 fi
4778
4779 # end --enable-sssvlv
4780
4781 # OpenLDAP --enable-syncprov
4782
4783         # Check whether --enable-syncprov was given.
4784 if test "${enable_syncprov+set}" = set; then :
4785   enableval=$enable_syncprov;
4786         ol_arg=invalid
4787         for ol_val in no yes mod ; do
4788                 if test "$enableval" = "$ol_val" ; then
4789                         ol_arg="$ol_val"
4790                 fi
4791         done
4792         if test "$ol_arg" = "invalid" ; then
4793                 as_fn_error "bad value $enableval for --enable-syncprov" "$LINENO" 5
4794         fi
4795         ol_enable_syncprov="$ol_arg"
4796
4797 else
4798         ol_enable_syncprov=${ol_enable_overlays:-yes}
4799 fi
4800
4801 # end --enable-syncprov
4802
4803 # OpenLDAP --enable-translucent
4804
4805         # Check whether --enable-translucent was given.
4806 if test "${enable_translucent+set}" = set; then :
4807   enableval=$enable_translucent;
4808         ol_arg=invalid
4809         for ol_val in no yes mod ; do
4810                 if test "$enableval" = "$ol_val" ; then
4811                         ol_arg="$ol_val"
4812                 fi
4813         done
4814         if test "$ol_arg" = "invalid" ; then
4815                 as_fn_error "bad value $enableval for --enable-translucent" "$LINENO" 5
4816         fi
4817         ol_enable_translucent="$ol_arg"
4818
4819 else
4820         ol_enable_translucent=${ol_enable_overlays:-no}
4821 fi
4822
4823 # end --enable-translucent
4824
4825 # OpenLDAP --enable-unique
4826
4827         # Check whether --enable-unique was given.
4828 if test "${enable_unique+set}" = set; then :
4829   enableval=$enable_unique;
4830         ol_arg=invalid
4831         for ol_val in no yes mod ; do
4832                 if test "$enableval" = "$ol_val" ; then
4833                         ol_arg="$ol_val"
4834                 fi
4835         done
4836         if test "$ol_arg" = "invalid" ; then
4837                 as_fn_error "bad value $enableval for --enable-unique" "$LINENO" 5
4838         fi
4839         ol_enable_unique="$ol_arg"
4840
4841 else
4842         ol_enable_unique=${ol_enable_overlays:-no}
4843 fi
4844
4845 # end --enable-unique
4846
4847 # OpenLDAP --enable-valsort
4848
4849         # Check whether --enable-valsort was given.
4850 if test "${enable_valsort+set}" = set; then :
4851   enableval=$enable_valsort;
4852         ol_arg=invalid
4853         for ol_val in no yes mod ; do
4854                 if test "$enableval" = "$ol_val" ; then
4855                         ol_arg="$ol_val"
4856                 fi
4857         done
4858         if test "$ol_arg" = "invalid" ; then
4859                 as_fn_error "bad value $enableval for --enable-valsort" "$LINENO" 5
4860         fi
4861         ol_enable_valsort="$ol_arg"
4862
4863 else
4864         ol_enable_valsort=${ol_enable_overlays:-no}
4865 fi
4866
4867 # end --enable-valsort
4868
4869
4870 # Check whether --enable-xxliboptions was given.
4871 if test "${enable_xxliboptions+set}" = set; then :
4872   enableval=$enable_xxliboptions;
4873 fi
4874
4875 # Check whether --enable-static was given.
4876 if test "${enable_static+set}" = set; then :
4877   enableval=$enable_static; p=${PACKAGE-default}
4878     case $enableval in
4879     yes) enable_static=yes ;;
4880     no) enable_static=no ;;
4881     *)
4882      enable_static=no
4883       # Look at the argument we got.  We use all the common list separators.
4884       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4885       for pkg in $enableval; do
4886         IFS="$lt_save_ifs"
4887         if test "X$pkg" = "X$p"; then
4888           enable_static=yes
4889         fi
4890       done
4891       IFS="$lt_save_ifs"
4892       ;;
4893     esac
4894 else
4895   enable_static=yes
4896 fi
4897
4898
4899 # Check whether --enable-shared was given.
4900 if test "${enable_shared+set}" = set; then :
4901   enableval=$enable_shared; p=${PACKAGE-default}
4902     case $enableval in
4903     yes) enable_shared=yes ;;
4904     no) enable_shared=no ;;
4905     *)
4906       enable_shared=no
4907       # Look at the argument we got.  We use all the common list separators.
4908       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4909       for pkg in $enableval; do
4910         IFS="$lt_save_ifs"
4911         if test "X$pkg" = "X$p"; then
4912           enable_shared=yes
4913         fi
4914       done
4915       IFS="$lt_save_ifs"
4916       ;;
4917     esac
4918 else
4919   enable_shared=yes
4920 fi
4921
4922
4923
4924
4925 # validate options
4926 if test $ol_enable_slapd = no ; then
4927                 if test $ol_enable_slapi = yes ; then
4928                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
4929 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
4930         fi
4931         case "$ol_enable_backends" in yes | mod)
4932                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
4933 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
4934         esac
4935         for i in $Backends; do
4936                 eval "ol_tmp=\$ol_enable_$i"
4937                 if test $ol_tmp != no ; then
4938                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
4939 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
4940                         eval "ol_enable_$i=no"
4941                 fi
4942         done
4943         if test $ol_enable_modules = yes ; then
4944                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
4945 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
4946         fi
4947         if test $ol_enable_wrappers = yes ; then
4948                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
4949 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
4950         fi
4951         if test $ol_enable_rlookups = yes ; then
4952                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
4953 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
4954         fi
4955         if test $ol_enable_dynacl = yes ; then
4956                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
4957 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
4958         fi
4959         if test $ol_enable_aci != no ; then
4960                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
4961 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
4962         fi
4963         if test $ol_enable_rewrite = yes ; then
4964                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
4965 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
4966         fi
4967                 case "$ol_enable_overlays" in yes | mod)
4968                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
4969 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
4970         esac
4971         for i in $Overlays; do
4972                 eval "ol_tmp=\$ol_enable_$i"
4973                 if test $ol_tmp != no ; then
4974                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
4975 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
4976                         eval "ol_enable_$i=no"
4977                 fi
4978         done
4979
4980         # force settings to no
4981         ol_enable_slapi=no
4982
4983         ol_enable_backends=
4984         ol_enable_overlays=
4985         ol_enable_modules=no
4986         ol_enable_rlookups=no
4987         ol_enable_dynacl=no
4988         ol_enable_aci=no
4989         ol_enable_wrappers=no
4990
4991         ol_enable_rewrite=no
4992
4993 elif test $ol_enable_modules != yes &&
4994         test $ol_enable_bdb = no &&
4995         test $ol_enable_dnssrv = no &&
4996         test $ol_enable_hdb = no &&
4997         test $ol_enable_ldap = no &&
4998         test $ol_enable_meta = no &&
4999         test $ol_enable_monitor = no &&
5000         test $ol_enable_ndb = no &&
5001         test $ol_enable_null = no &&
5002         test $ol_enable_passwd = no &&
5003         test $ol_enable_perl = no &&
5004         test $ol_enable_relay = no &&
5005         test $ol_enable_shell = no &&
5006         test $ol_enable_sock = no &&
5007         test $ol_enable_sql = no ; then
5008
5009         if test $ol_enable_slapd = yes ; then
5010                 as_fn_error "slapd requires a backend" "$LINENO" 5
5011         else
5012                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipping slapd, no backend specified" >&5
5013 $as_echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
5014                 ol_enable_slapd=no
5015         fi
5016 fi
5017
5018 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
5019         as_fn_error "--enable-meta requires --enable-ldap" "$LINENO" 5
5020 fi
5021
5022 if test $ol_enable_lmpasswd = yes ; then
5023         if test $ol_with_tls = no ; then
5024                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
5025         fi
5026 fi
5027
5028 if test $ol_enable_spasswd = yes ; then
5029         if test $ol_with_cyrus_sasl = no ; then
5030                 as_fn_error "options require --with-cyrus-sasl" "$LINENO" 5
5031         fi
5032         ol_with_cyrus_sasl=yes
5033 fi
5034
5035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
5036 $as_echo "done" >&6; }
5037
5038 LDAP_LIBS=
5039 BDB_LIBS=
5040 SLAPD_NDB_LIBS=
5041 SLAPD_NDB_INCS=
5042 LTHREAD_LIBS=
5043 LUTIL_LIBS=
5044
5045 SLAPD_LIBS=
5046
5047 BUILD_SLAPD=no
5048
5049 BUILD_THREAD=no
5050
5051 BUILD_SLAPI=no
5052 SLAPD_SLAPI_DEPEND=
5053
5054 BUILD_BDB=no
5055 BUILD_DNSSRV=no
5056 BUILD_HDB=no
5057 BUILD_LDAP=no
5058 BUILD_META=no
5059 BUILD_MONITOR=no
5060 BUILD_NDB=no
5061 BUILD_NULL=no
5062 BUILD_PASSWD=no
5063 BUILD_PERL=no
5064 BUILD_RELAY=no
5065 BUILD_SHELL=no
5066 BUILD_SOCK=no
5067 BUILD_SQL=no
5068
5069 BUILD_ACCESSLOG=no
5070 BUILD_AUDITLOG=no
5071 BUILD_CONSTRAINT=no
5072 BUILD_DDS=no
5073 BUILD_DENYOP=no
5074 BUILD_DEREF=no
5075 BUILD_DYNGROUP=no
5076 BUILD_DYNLIST=no
5077 BUILD_LASTMOD=no
5078 BUILD_MEMBEROF=no
5079 BUILD_PPOLICY=no
5080 BUILD_PROXYCACHE=no
5081 BUILD_REFINT=no
5082 BUILD_RETCODE=no
5083 BUILD_RWM=no
5084 BUILD_SEQMOD=no
5085 BUILD_SSSVLV=no
5086 BUILD_SYNCPROV=no
5087 BUILD_TRANSLUCENT=no
5088 BUILD_UNIQUE=no
5089 BUILD_VALSORT=no
5090
5091 SLAPD_STATIC_OVERLAYS=
5092 SLAPD_DYNAMIC_OVERLAYS=
5093
5094 SLAPD_MODULES_LDFLAGS=
5095 SLAPD_MODULES_CPPFLAGS=
5096
5097 SLAPD_STATIC_BACKENDS=back-ldif
5098 SLAPD_DYNAMIC_BACKENDS=
5099
5100 SLAPD_PERL_LDFLAGS=
5101 MOD_PERL_LDFLAGS=
5102 PERL_CPPFLAGS=
5103
5104 SLAPD_SQL_LDFLAGS=
5105 SLAPD_SQL_LIBS=
5106 SLAPD_SQL_INCLUDES=
5107
5108 KRB4_LIBS=
5109 KRB5_LIBS=
5110 SASL_LIBS=
5111 TLS_LIBS=
5112 MODULES_LIBS=
5113 SLAPI_LIBS=
5114 LIBSLAPI=
5115 LIBSLAPITOOLS=
5116 AUTH_LIBS=
5117 ICU_LIBS=
5118
5119 SLAPD_SLP_LIBS=
5120 SLAPD_GMP_LIBS=
5121
5122
5123
5124 $as_echo "#define HAVE_MKVERSION 1" >>confdefs.h
5125
5126
5127
5128
5129 ol_aix_threads=no
5130 case "$target" in
5131 *-*-aix*)       if test -z "$CC" ; then
5132                 case "$ol_with_threads" in
5133                 auto | yes |  posix) ol_aix_threads=yes ;;
5134                 esac
5135         fi
5136 ;;
5137 esac
5138
5139 if test $ol_aix_threads = yes ; then
5140         if test -z "${CC}" ; then
5141                 for ac_prog in cc_r xlc_r cc
5142 do
5143   # Extract the first word of "$ac_prog", so it can be a program name with args.
5144 set dummy $ac_prog; ac_word=$2
5145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5146 $as_echo_n "checking for $ac_word... " >&6; }
5147 if test "${ac_cv_prog_CC+set}" = set; then :
5148   $as_echo_n "(cached) " >&6
5149 else
5150   if test -n "$CC"; then
5151   ac_cv_prog_CC="$CC" # Let the user override the test.
5152 else
5153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5154 for as_dir in $PATH
5155 do
5156   IFS=$as_save_IFS
5157   test -z "$as_dir" && as_dir=.
5158     for ac_exec_ext in '' $ac_executable_extensions; do
5159   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5160     ac_cv_prog_CC="$ac_prog"
5161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5162     break 2
5163   fi
5164 done
5165   done
5166 IFS=$as_save_IFS
5167
5168 fi
5169 fi
5170 CC=$ac_cv_prog_CC
5171 if test -n "$CC"; then
5172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5173 $as_echo "$CC" >&6; }
5174 else
5175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5176 $as_echo "no" >&6; }
5177 fi
5178
5179
5180   test -n "$CC" && break
5181 done
5182
5183
5184                 if test "$CC" = cc ; then
5185                                                 if test $ol_with_threads != auto ; then
5186                                 as_fn_error "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
5187                         else
5188                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
5189 $as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
5190                         fi
5191                         ol_with_threads=no
5192                 fi
5193         fi
5194
5195         case ${CC} in cc_r | xlc_r)
5196                 ol_with_threads=posix
5197                 ol_cv_pthread_create=yes
5198                 ;;
5199         esac
5200 fi
5201
5202 if test -z "${CC}"; then
5203         for ac_prog in cc gcc
5204 do
5205   # Extract the first word of "$ac_prog", so it can be a program name with args.
5206 set dummy $ac_prog; ac_word=$2
5207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5208 $as_echo_n "checking for $ac_word... " >&6; }
5209 if test "${ac_cv_prog_CC+set}" = set; then :
5210   $as_echo_n "(cached) " >&6
5211 else
5212   if test -n "$CC"; then
5213   ac_cv_prog_CC="$CC" # Let the user override the test.
5214 else
5215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5216 for as_dir in $PATH
5217 do
5218   IFS=$as_save_IFS
5219   test -z "$as_dir" && as_dir=.
5220     for ac_exec_ext in '' $ac_executable_extensions; do
5221   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5222     ac_cv_prog_CC="$ac_prog"
5223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5224     break 2
5225   fi
5226 done
5227   done
5228 IFS=$as_save_IFS
5229
5230 fi
5231 fi
5232 CC=$ac_cv_prog_CC
5233 if test -n "$CC"; then
5234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5235 $as_echo "$CC" >&6; }
5236 else
5237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238 $as_echo "no" >&6; }
5239 fi
5240
5241
5242   test -n "$CC" && break
5243 done
5244 test -n "$CC" || CC="missing"
5245
5246
5247         if test "${CC}" = "missing" ; then
5248                 as_fn_error "Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." "$LINENO" 5
5249         fi
5250 fi
5251
5252 if test -z "${AR}"; then
5253         for ac_prog in ar gar
5254 do
5255   # Extract the first word of "$ac_prog", so it can be a program name with args.
5256 set dummy $ac_prog; ac_word=$2
5257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5258 $as_echo_n "checking for $ac_word... " >&6; }
5259 if test "${ac_cv_prog_AR+set}" = set; then :
5260   $as_echo_n "(cached) " >&6
5261 else
5262   if test -n "$AR"; then
5263   ac_cv_prog_AR="$AR" # Let the user override the test.
5264 else
5265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5266 for as_dir in $PATH
5267 do
5268   IFS=$as_save_IFS
5269   test -z "$as_dir" && as_dir=.
5270     for ac_exec_ext in '' $ac_executable_extensions; do
5271   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5272     ac_cv_prog_AR="$ac_prog"
5273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5274     break 2
5275   fi
5276 done
5277   done
5278 IFS=$as_save_IFS
5279
5280 fi
5281 fi
5282 AR=$ac_cv_prog_AR
5283 if test -n "$AR"; then
5284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5285 $as_echo "$AR" >&6; }
5286 else
5287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5288 $as_echo "no" >&6; }
5289 fi
5290
5291
5292   test -n "$AR" && break
5293 done
5294 test -n "$AR" || AR="missing"
5295
5296
5297         if test "${AR}" = "missing" ; then
5298                 as_fn_error "Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." "$LINENO" 5
5299         fi
5300 fi
5301
5302
5303
5304
5305
5306 # Check whether --enable-fast-install was given.
5307 if test "${enable_fast_install+set}" = set; then :
5308   enableval=$enable_fast_install; p=${PACKAGE-default}
5309     case $enableval in
5310     yes) enable_fast_install=yes ;;
5311     no) enable_fast_install=no ;;
5312     *)
5313       enable_fast_install=no
5314       # Look at the argument we got.  We use all the common list separators.
5315       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5316       for pkg in $enableval; do
5317         IFS="$lt_save_ifs"
5318         if test "X$pkg" = "X$p"; then
5319           enable_fast_install=yes
5320         fi
5321       done
5322       IFS="$lt_save_ifs"
5323       ;;
5324     esac
5325 else
5326   enable_fast_install=yes
5327 fi
5328
5329
5330 DEPDIR="${am__leading_dot}deps"
5331
5332 ac_config_commands="$ac_config_commands depfiles"
5333
5334
5335 am_make=${MAKE-make}
5336 cat > confinc << 'END'
5337 am__doit:
5338         @echo done
5339 .PHONY: am__doit
5340 END
5341 # If we don't find an include directive, just comment out the code.
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5343 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5344 am__include="#"
5345 am__quote=
5346 _am_result=none
5347 # First try GNU make style include.
5348 echo "include confinc" > confmf
5349 # We grep out `Entering directory' and `Leaving directory'
5350 # messages which can occur if `w' ends up in MAKEFLAGS.
5351 # In particular we don't look at `^make:' because GNU make might
5352 # be invoked under some other name (usually "gmake"), in which
5353 # case it prints its new name instead of `make'.
5354 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
5355    am__include=include
5356    am__quote=
5357    _am_result=GNU
5358 fi
5359 # Now try BSD make style include.
5360 if test "$am__include" = "#"; then
5361    echo '.include "confinc"' > confmf
5362    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
5363       am__include=.include
5364       am__quote="\""
5365       _am_result=BSD
5366    fi
5367 fi
5368
5369
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5371 $as_echo "$_am_result" >&6; }
5372 rm -f confinc confmf
5373
5374 # Check whether --enable-dependency-tracking was given.
5375 if test "${enable_dependency_tracking+set}" = set; then :
5376   enableval=$enable_dependency_tracking;
5377 fi
5378
5379 if test "x$enable_dependency_tracking" != xno; then
5380   am_depcomp="$ac_aux_dir/depcomp"
5381   AMDEPBACKSLASH='\'
5382 fi
5383
5384
5385 if test "x$enable_dependency_tracking" != xno; then
5386   AMDEP_TRUE=
5387   AMDEP_FALSE='#'
5388 else
5389   AMDEP_TRUE='#'
5390   AMDEP_FALSE=
5391 fi
5392
5393
5394
5395 ac_ext=c
5396 ac_cpp='$CPP $CPPFLAGS'
5397 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5398 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5399 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5400 if test -n "$ac_tool_prefix"; then
5401   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5402 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5404 $as_echo_n "checking for $ac_word... " >&6; }
5405 if test "${ac_cv_prog_CC+set}" = set; then :
5406   $as_echo_n "(cached) " >&6
5407 else
5408   if test -n "$CC"; then
5409   ac_cv_prog_CC="$CC" # Let the user override the test.
5410 else
5411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5412 for as_dir in $PATH
5413 do
5414   IFS=$as_save_IFS
5415   test -z "$as_dir" && as_dir=.
5416     for ac_exec_ext in '' $ac_executable_extensions; do
5417   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5418     ac_cv_prog_CC="${ac_tool_prefix}gcc"
5419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5420     break 2
5421   fi
5422 done
5423   done
5424 IFS=$as_save_IFS
5425
5426 fi
5427 fi
5428 CC=$ac_cv_prog_CC
5429 if test -n "$CC"; then
5430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5431 $as_echo "$CC" >&6; }
5432 else
5433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5434 $as_echo "no" >&6; }
5435 fi
5436
5437
5438 fi
5439 if test -z "$ac_cv_prog_CC"; then
5440   ac_ct_CC=$CC
5441   # Extract the first word of "gcc", so it can be a program name with args.
5442 set dummy gcc; ac_word=$2
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5444 $as_echo_n "checking for $ac_word... " >&6; }
5445 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5446   $as_echo_n "(cached) " >&6
5447 else
5448   if test -n "$ac_ct_CC"; then
5449   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5450 else
5451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5452 for as_dir in $PATH
5453 do
5454   IFS=$as_save_IFS
5455   test -z "$as_dir" && as_dir=.
5456     for ac_exec_ext in '' $ac_executable_extensions; do
5457   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5458     ac_cv_prog_ac_ct_CC="gcc"
5459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5460     break 2
5461   fi
5462 done
5463   done
5464 IFS=$as_save_IFS
5465
5466 fi
5467 fi
5468 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5469 if test -n "$ac_ct_CC"; then
5470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5471 $as_echo "$ac_ct_CC" >&6; }
5472 else
5473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5474 $as_echo "no" >&6; }
5475 fi
5476
5477   if test "x$ac_ct_CC" = x; then
5478     CC=""
5479   else
5480     case $cross_compiling:$ac_tool_warned in
5481 yes:)
5482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5483 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5484 ac_tool_warned=yes ;;
5485 esac
5486     CC=$ac_ct_CC
5487   fi
5488 else
5489   CC="$ac_cv_prog_CC"
5490 fi
5491
5492 if test -z "$CC"; then
5493           if test -n "$ac_tool_prefix"; then
5494     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5495 set dummy ${ac_tool_prefix}cc; ac_word=$2
5496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497 $as_echo_n "checking for $ac_word... " >&6; }
5498 if test "${ac_cv_prog_CC+set}" = set; then :
5499   $as_echo_n "(cached) " >&6
5500 else
5501   if test -n "$CC"; then
5502   ac_cv_prog_CC="$CC" # Let the user override the test.
5503 else
5504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5505 for as_dir in $PATH
5506 do
5507   IFS=$as_save_IFS
5508   test -z "$as_dir" && as_dir=.
5509     for ac_exec_ext in '' $ac_executable_extensions; do
5510   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5511     ac_cv_prog_CC="${ac_tool_prefix}cc"
5512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5513     break 2
5514   fi
5515 done
5516   done
5517 IFS=$as_save_IFS
5518
5519 fi
5520 fi
5521 CC=$ac_cv_prog_CC
5522 if test -n "$CC"; then
5523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5524 $as_echo "$CC" >&6; }
5525 else
5526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5527 $as_echo "no" >&6; }
5528 fi
5529
5530
5531   fi
5532 fi
5533 if test -z "$CC"; then
5534   # Extract the first word of "cc", so it can be a program name with args.
5535 set dummy cc; ac_word=$2
5536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5537 $as_echo_n "checking for $ac_word... " >&6; }
5538 if test "${ac_cv_prog_CC+set}" = set; then :
5539   $as_echo_n "(cached) " >&6
5540 else
5541   if test -n "$CC"; then
5542   ac_cv_prog_CC="$CC" # Let the user override the test.
5543 else
5544   ac_prog_rejected=no
5545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5546 for as_dir in $PATH
5547 do
5548   IFS=$as_save_IFS
5549   test -z "$as_dir" && as_dir=.
5550     for ac_exec_ext in '' $ac_executable_extensions; do
5551   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5552     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5553        ac_prog_rejected=yes
5554        continue
5555      fi
5556     ac_cv_prog_CC="cc"
5557     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5558     break 2
5559   fi
5560 done
5561   done
5562 IFS=$as_save_IFS
5563
5564 if test $ac_prog_rejected = yes; then
5565   # We found a bogon in the path, so make sure we never use it.
5566   set dummy $ac_cv_prog_CC
5567   shift
5568   if test $# != 0; then
5569     # We chose a different compiler from the bogus one.
5570     # However, it has the same basename, so the bogon will be chosen
5571     # first if we set CC to just the basename; use the full file name.
5572     shift
5573     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5574   fi
5575 fi
5576 fi
5577 fi
5578 CC=$ac_cv_prog_CC
5579 if test -n "$CC"; then
5580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5581 $as_echo "$CC" >&6; }
5582 else
5583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584 $as_echo "no" >&6; }
5585 fi
5586
5587
5588 fi
5589 if test -z "$CC"; then
5590   if test -n "$ac_tool_prefix"; then
5591   for ac_prog in cl.exe
5592   do
5593     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5594 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5596 $as_echo_n "checking for $ac_word... " >&6; }
5597 if test "${ac_cv_prog_CC+set}" = set; then :
5598   $as_echo_n "(cached) " >&6
5599 else
5600   if test -n "$CC"; then
5601   ac_cv_prog_CC="$CC" # Let the user override the test.
5602 else
5603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5604 for as_dir in $PATH
5605 do
5606   IFS=$as_save_IFS
5607   test -z "$as_dir" && as_dir=.
5608     for ac_exec_ext in '' $ac_executable_extensions; do
5609   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5610     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5612     break 2
5613   fi
5614 done
5615   done
5616 IFS=$as_save_IFS
5617
5618 fi
5619 fi
5620 CC=$ac_cv_prog_CC
5621 if test -n "$CC"; then
5622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5623 $as_echo "$CC" >&6; }
5624 else
5625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5626 $as_echo "no" >&6; }
5627 fi
5628
5629
5630     test -n "$CC" && break
5631   done
5632 fi
5633 if test -z "$CC"; then
5634   ac_ct_CC=$CC
5635   for ac_prog in cl.exe
5636 do
5637   # Extract the first word of "$ac_prog", so it can be a program name with args.
5638 set dummy $ac_prog; ac_word=$2
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5640 $as_echo_n "checking for $ac_word... " >&6; }
5641 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5642   $as_echo_n "(cached) " >&6
5643 else
5644   if test -n "$ac_ct_CC"; then
5645   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5646 else
5647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5648 for as_dir in $PATH
5649 do
5650   IFS=$as_save_IFS
5651   test -z "$as_dir" && as_dir=.
5652     for ac_exec_ext in '' $ac_executable_extensions; do
5653   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5654     ac_cv_prog_ac_ct_CC="$ac_prog"
5655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5656     break 2
5657   fi
5658 done
5659   done
5660 IFS=$as_save_IFS
5661
5662 fi
5663 fi
5664 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5665 if test -n "$ac_ct_CC"; then
5666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5667 $as_echo "$ac_ct_CC" >&6; }
5668 else
5669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670 $as_echo "no" >&6; }
5671 fi
5672
5673
5674   test -n "$ac_ct_CC" && break
5675 done
5676
5677   if test "x$ac_ct_CC" = x; then
5678     CC=""
5679   else
5680     case $cross_compiling:$ac_tool_warned in
5681 yes:)
5682 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5683 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5684 ac_tool_warned=yes ;;
5685 esac
5686     CC=$ac_ct_CC
5687   fi
5688 fi
5689
5690 fi
5691
5692
5693 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5694 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5695 as_fn_error "no acceptable C compiler found in \$PATH
5696 See \`config.log' for more details." "$LINENO" 5; }
5697
5698 # Provide some information about the compiler.
5699 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5700 set X $ac_compile
5701 ac_compiler=$2
5702 for ac_option in --version -v -V -qversion; do
5703   { { ac_try="$ac_compiler $ac_option >&5"
5704 case "(($ac_try" in
5705   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5706   *) ac_try_echo=$ac_try;;
5707 esac
5708 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5709 $as_echo "$ac_try_echo"; } >&5
5710   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5711   ac_status=$?
5712   if test -s conftest.err; then
5713     sed '10a\
5714 ... rest of stderr output deleted ...
5715          10q' conftest.err >conftest.er1
5716     cat conftest.er1 >&5
5717   fi
5718   rm -f conftest.er1 conftest.err
5719   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5720   test $ac_status = 0; }
5721 done
5722
5723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5724 /* end confdefs.h.  */
5725
5726 int
5727 main ()
5728 {
5729
5730   ;
5731   return 0;
5732 }
5733 _ACEOF
5734 ac_clean_files_save=$ac_clean_files
5735 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5736 # Try to create an executable without -o first, disregard a.out.
5737 # It will help us diagnose broken compilers, and finding out an intuition
5738 # of exeext.
5739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5740 $as_echo_n "checking whether the C compiler works... " >&6; }
5741 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5742
5743 # The possible output files:
5744 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5745
5746 ac_rmfiles=
5747 for ac_file in $ac_files
5748 do
5749   case $ac_file in
5750     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5751     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5752   esac
5753 done
5754 rm -f $ac_rmfiles
5755
5756 if { { ac_try="$ac_link_default"
5757 case "(($ac_try" in
5758   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5759   *) ac_try_echo=$ac_try;;
5760 esac
5761 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5762 $as_echo "$ac_try_echo"; } >&5
5763   (eval "$ac_link_default") 2>&5
5764   ac_status=$?
5765   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5766   test $ac_status = 0; }; then :
5767   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5768 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5769 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
5770 # so that the user can short-circuit this test for compilers unknown to
5771 # Autoconf.
5772 for ac_file in $ac_files ''
5773 do
5774   test -f "$ac_file" || continue
5775   case $ac_file in
5776     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5777         ;;
5778     [ab].out )
5779         # We found the default executable, but exeext='' is most
5780         # certainly right.
5781         break;;
5782     *.* )
5783         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5784         then :; else
5785            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5786         fi
5787         # We set ac_cv_exeext here because the later test for it is not
5788         # safe: cross compilers may not add the suffix if given an `-o'
5789         # argument, so we may need to know it at that point already.
5790         # Even if this section looks crufty: it has the advantage of
5791         # actually working.
5792         break;;
5793     * )
5794         break;;
5795   esac
5796 done
5797 test "$ac_cv_exeext" = no && ac_cv_exeext=
5798
5799 else
5800   ac_file=''
5801 fi
5802 if test -z "$ac_file"; then :
5803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5804 $as_echo "no" >&6; }
5805 $as_echo "$as_me: failed program was:" >&5
5806 sed 's/^/| /' conftest.$ac_ext >&5
5807
5808 { { $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_set_status 77
5811 as_fn_error "C compiler cannot create executables
5812 See \`config.log' for more details." "$LINENO" 5; }; }
5813 else
5814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5815 $as_echo "yes" >&6; }
5816 fi
5817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5818 $as_echo_n "checking for C compiler default output file name... " >&6; }
5819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5820 $as_echo "$ac_file" >&6; }
5821 ac_exeext=$ac_cv_exeext
5822
5823 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5824 ac_clean_files=$ac_clean_files_save
5825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5826 $as_echo_n "checking for suffix of executables... " >&6; }
5827 if { { ac_try="$ac_link"
5828 case "(($ac_try" in
5829   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5830   *) ac_try_echo=$ac_try;;
5831 esac
5832 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5833 $as_echo "$ac_try_echo"; } >&5
5834   (eval "$ac_link") 2>&5
5835   ac_status=$?
5836   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5837   test $ac_status = 0; }; then :
5838   # If both `conftest.exe' and `conftest' are `present' (well, observable)
5839 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5840 # work properly (i.e., refer to `conftest.exe'), while it won't with
5841 # `rm'.
5842 for ac_file in conftest.exe conftest conftest.*; do
5843   test -f "$ac_file" || continue
5844   case $ac_file in
5845     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5846     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5847           break;;
5848     * ) break;;
5849   esac
5850 done
5851 else
5852   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5853 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5854 as_fn_error "cannot compute suffix of executables: cannot compile and link
5855 See \`config.log' for more details." "$LINENO" 5; }
5856 fi
5857 rm -f conftest conftest$ac_cv_exeext
5858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5859 $as_echo "$ac_cv_exeext" >&6; }
5860
5861 rm -f conftest.$ac_ext
5862 EXEEXT=$ac_cv_exeext
5863 ac_exeext=$EXEEXT
5864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5865 /* end confdefs.h.  */
5866 #include <stdio.h>
5867 int
5868 main ()
5869 {
5870 FILE *f = fopen ("conftest.out", "w");
5871  return ferror (f) || fclose (f) != 0;
5872
5873   ;
5874   return 0;
5875 }
5876 _ACEOF
5877 ac_clean_files="$ac_clean_files conftest.out"
5878 # Check that the compiler produces executables we can run.  If not, either
5879 # the compiler is broken, or we cross compile.
5880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5881 $as_echo_n "checking whether we are cross compiling... " >&6; }
5882 if test "$cross_compiling" != yes; then
5883   { { ac_try="$ac_link"
5884 case "(($ac_try" in
5885   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5886   *) ac_try_echo=$ac_try;;
5887 esac
5888 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5889 $as_echo "$ac_try_echo"; } >&5
5890   (eval "$ac_link") 2>&5
5891   ac_status=$?
5892   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5893   test $ac_status = 0; }
5894   if { ac_try='./conftest$ac_cv_exeext'
5895   { { case "(($ac_try" in
5896   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5897   *) ac_try_echo=$ac_try;;
5898 esac
5899 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5900 $as_echo "$ac_try_echo"; } >&5
5901   (eval "$ac_try") 2>&5
5902   ac_status=$?
5903   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5904   test $ac_status = 0; }; }; then
5905     cross_compiling=no
5906   else
5907     if test "$cross_compiling" = maybe; then
5908         cross_compiling=yes
5909     else
5910         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5911 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5912 as_fn_error "cannot run C compiled programs.
5913 If you meant to cross compile, use \`--host'.
5914 See \`config.log' for more details." "$LINENO" 5; }
5915     fi
5916   fi
5917 fi
5918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5919 $as_echo "$cross_compiling" >&6; }
5920
5921 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5922 ac_clean_files=$ac_clean_files_save
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5924 $as_echo_n "checking for suffix of object files... " >&6; }
5925 if test "${ac_cv_objext+set}" = set; then :
5926   $as_echo_n "(cached) " >&6
5927 else
5928   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929 /* end confdefs.h.  */
5930
5931 int
5932 main ()
5933 {
5934
5935   ;
5936   return 0;
5937 }
5938 _ACEOF
5939 rm -f conftest.o conftest.obj
5940 if { { ac_try="$ac_compile"
5941 case "(($ac_try" in
5942   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5943   *) ac_try_echo=$ac_try;;
5944 esac
5945 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5946 $as_echo "$ac_try_echo"; } >&5
5947   (eval "$ac_compile") 2>&5
5948   ac_status=$?
5949   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5950   test $ac_status = 0; }; then :
5951   for ac_file in conftest.o conftest.obj conftest.*; do
5952   test -f "$ac_file" || continue;
5953   case $ac_file in
5954     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5955     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5956        break;;
5957   esac
5958 done
5959 else
5960   $as_echo "$as_me: failed program was:" >&5
5961 sed 's/^/| /' conftest.$ac_ext >&5
5962
5963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5964 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5965 as_fn_error "cannot compute suffix of object files: cannot compile
5966 See \`config.log' for more details." "$LINENO" 5; }
5967 fi
5968 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5969 fi
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5971 $as_echo "$ac_cv_objext" >&6; }
5972 OBJEXT=$ac_cv_objext
5973 ac_objext=$OBJEXT
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5975 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5976 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5977   $as_echo_n "(cached) " >&6
5978 else
5979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5980 /* end confdefs.h.  */
5981
5982 int
5983 main ()
5984 {
5985 #ifndef __GNUC__
5986        choke me
5987 #endif
5988
5989   ;
5990   return 0;
5991 }
5992 _ACEOF
5993 if ac_fn_c_try_compile "$LINENO"; then :
5994   ac_compiler_gnu=yes
5995 else
5996   ac_compiler_gnu=no
5997 fi
5998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5999 ac_cv_c_compiler_gnu=$ac_compiler_gnu
6000
6001 fi
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6003 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
6004 if test $ac_compiler_gnu = yes; then
6005   GCC=yes
6006 else
6007   GCC=
6008 fi
6009 ac_test_CFLAGS=${CFLAGS+set}
6010 ac_save_CFLAGS=$CFLAGS
6011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6012 $as_echo_n "checking whether $CC accepts -g... " >&6; }
6013 if test "${ac_cv_prog_cc_g+set}" = set; then :
6014   $as_echo_n "(cached) " >&6
6015 else
6016   ac_save_c_werror_flag=$ac_c_werror_flag
6017    ac_c_werror_flag=yes
6018    ac_cv_prog_cc_g=no
6019    CFLAGS="-g"
6020    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6021 /* end confdefs.h.  */
6022
6023 int
6024 main ()
6025 {
6026
6027   ;
6028   return 0;
6029 }
6030 _ACEOF
6031 if ac_fn_c_try_compile "$LINENO"; then :
6032   ac_cv_prog_cc_g=yes
6033 else
6034   CFLAGS=""
6035       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6036 /* end confdefs.h.  */
6037
6038 int
6039 main ()
6040 {
6041
6042   ;
6043   return 0;
6044 }
6045 _ACEOF
6046 if ac_fn_c_try_compile "$LINENO"; then :
6047
6048 else
6049   ac_c_werror_flag=$ac_save_c_werror_flag
6050          CFLAGS="-g"
6051          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6052 /* end confdefs.h.  */
6053
6054 int
6055 main ()
6056 {
6057
6058   ;
6059   return 0;
6060 }
6061 _ACEOF
6062 if ac_fn_c_try_compile "$LINENO"; then :
6063   ac_cv_prog_cc_g=yes
6064 fi
6065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6066 fi
6067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6068 fi
6069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6070    ac_c_werror_flag=$ac_save_c_werror_flag
6071 fi
6072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6073 $as_echo "$ac_cv_prog_cc_g" >&6; }
6074 if test "$ac_test_CFLAGS" = set; then
6075   CFLAGS=$ac_save_CFLAGS
6076 elif test $ac_cv_prog_cc_g = yes; then
6077   if test "$GCC" = yes; then
6078     CFLAGS="-g -O2"
6079   else
6080     CFLAGS="-g"
6081   fi
6082 else
6083   if test "$GCC" = yes; then
6084     CFLAGS="-O2"
6085   else
6086     CFLAGS=
6087   fi
6088 fi
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6090 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6091 if test "${ac_cv_prog_cc_c89+set}" = set; then :
6092   $as_echo_n "(cached) " >&6
6093 else
6094   ac_cv_prog_cc_c89=no
6095 ac_save_CC=$CC
6096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6097 /* end confdefs.h.  */
6098 #include <stdarg.h>
6099 #include <stdio.h>
6100 #include <sys/types.h>
6101 #include <sys/stat.h>
6102 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6103 struct buf { int x; };
6104 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6105 static char *e (p, i)
6106      char **p;
6107      int i;
6108 {
6109   return p[i];
6110 }
6111 static char *f (char * (*g) (char **, int), char **p, ...)
6112 {
6113   char *s;
6114   va_list v;
6115   va_start (v,p);
6116   s = g (p, va_arg (v,int));
6117   va_end (v);
6118   return s;
6119 }
6120
6121 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6122    function prototypes and stuff, but not '\xHH' hex character constants.
6123    These don't provoke an error unfortunately, instead are silently treated
6124    as 'x'.  The following induces an error, until -std is added to get
6125    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6126    array size at least.  It's necessary to write '\x00'==0 to get something
6127    that's true only with -std.  */
6128 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6129
6130 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6131    inside strings and character constants.  */
6132 #define FOO(x) 'x'
6133 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6134
6135 int test (int i, double x);
6136 struct s1 {int (*f) (int a);};
6137 struct s2 {int (*f) (double a);};
6138 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6139 int argc;
6140 char **argv;
6141 int
6142 main ()
6143 {
6144 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6145   ;
6146   return 0;
6147 }
6148 _ACEOF
6149 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6150         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6151 do
6152   CC="$ac_save_CC $ac_arg"
6153   if ac_fn_c_try_compile "$LINENO"; then :
6154   ac_cv_prog_cc_c89=$ac_arg
6155 fi
6156 rm -f core conftest.err conftest.$ac_objext
6157   test "x$ac_cv_prog_cc_c89" != "xno" && break
6158 done
6159 rm -f conftest.$ac_ext
6160 CC=$ac_save_CC
6161
6162 fi
6163 # AC_CACHE_VAL
6164 case "x$ac_cv_prog_cc_c89" in
6165   x)
6166     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6167 $as_echo "none needed" >&6; } ;;
6168   xno)
6169     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6170 $as_echo "unsupported" >&6; } ;;
6171   *)
6172     CC="$CC $ac_cv_prog_cc_c89"
6173     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6174 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6175 esac
6176 if test "x$ac_cv_prog_cc_c89" != xno; then :
6177
6178 fi
6179
6180 ac_ext=c
6181 ac_cpp='$CPP $CPPFLAGS'
6182 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6183 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6184 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6185
6186 depcc="$CC"   am_compiler_list=
6187
6188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6189 $as_echo_n "checking dependency style of $depcc... " >&6; }
6190 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
6191   $as_echo_n "(cached) " >&6
6192 else
6193   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6194   # We make a subdir and do the tests there.  Otherwise we can end up
6195   # making bogus files that we don't know about and never remove.  For
6196   # instance it was reported that on HP-UX the gcc test will end up
6197   # making a dummy file named `D' -- because `-MD' means `put the output
6198   # in D'.
6199   mkdir conftest.dir
6200   # Copy depcomp to subdir because otherwise we won't find it if we're
6201   # using a relative directory.
6202   cp "$am_depcomp" conftest.dir
6203   cd conftest.dir
6204   # We will build objects and dependencies in a subdirectory because
6205   # it helps to detect inapplicable dependency modes.  For instance
6206   # both Tru64's cc and ICC support -MD to output dependencies as a
6207   # side effect of compilation, but ICC will put the dependencies in
6208   # the current directory while Tru64 will put them in the object
6209   # directory.
6210   mkdir sub
6211
6212   am_cv_CC_dependencies_compiler_type=none
6213   if test "$am_compiler_list" = ""; then
6214      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6215   fi
6216   for depmode in $am_compiler_list; do
6217     # Setup a source with many dependencies, because some compilers
6218     # like to wrap large dependency lists on column 80 (with \), and
6219     # we should not choose a depcomp mode which is confused by this.
6220     #
6221     # We need to recreate these files for each test, as the compiler may
6222     # overwrite some of them when testing with obscure command lines.
6223     # This happens at least with the AIX C compiler.
6224     : > sub/conftest.c
6225     for i in 1 2 3 4 5 6; do
6226       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6227       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6228       # Solaris 8's {/usr,}/bin/sh.
6229       touch sub/conftst$i.h
6230     done
6231     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6232
6233     case $depmode in
6234     nosideeffect)
6235       # after this tag, mechanisms are not by side-effect, so they'll
6236       # only be used when explicitly requested
6237       if test "x$enable_dependency_tracking" = xyes; then
6238         continue
6239       else
6240         break
6241       fi
6242       ;;
6243     none) break ;;
6244     esac
6245     # We check with `-c' and `-o' for the sake of the "dashmstdout"
6246     # mode.  It turns out that the SunPro C++ compiler does not properly
6247     # handle `-M -o', and we need to detect this.
6248     if depmode=$depmode \
6249        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6250        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6251        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6252          >/dev/null 2>conftest.err &&
6253        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6254        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6255        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6256       # icc doesn't choke on unknown options, it will just issue warnings
6257       # or remarks (even with -Werror).  So we grep stderr for any message
6258       # that says an option was ignored or not supported.
6259       # When given -MP, icc 7.0 and 7.1 complain thusly:
6260       #   icc: Command line warning: ignoring option '-M'; no argument required
6261       # The diagnosis changed in icc 8.0:
6262       #   icc: Command line remark: option '-MP' not supported
6263       if (grep 'ignoring option' conftest.err ||
6264           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6265         am_cv_CC_dependencies_compiler_type=$depmode
6266         break
6267       fi
6268     fi
6269   done
6270
6271   cd ..
6272   rm -rf conftest.dir
6273 else
6274   am_cv_CC_dependencies_compiler_type=none
6275 fi
6276
6277 fi
6278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6279 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6280 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6281
6282
6283
6284 if
6285   test "x$enable_dependency_tracking" != xno \
6286   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6287   am__fastdepCC_TRUE=
6288   am__fastdepCC_FALSE='#'
6289 else
6290   am__fastdepCC_TRUE='#'
6291   am__fastdepCC_FALSE=
6292 fi
6293
6294
6295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6296 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6297 if test "${lt_cv_path_SED+set}" = set; then :
6298   $as_echo_n "(cached) " >&6
6299 else
6300   # Loop through the user's path and test for sed and gsed.
6301 # Then use that list of sed's as ones to test for truncation.
6302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6303 for as_dir in $PATH
6304 do
6305   IFS=$as_save_IFS
6306   test -z "$as_dir" && as_dir=.
6307   for lt_ac_prog in sed gsed; do
6308     for ac_exec_ext in '' $ac_executable_extensions; do
6309       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6310         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6311       fi
6312     done
6313   done
6314 done
6315 lt_ac_max=0
6316 lt_ac_count=0
6317 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6318 # along with /bin/sed that truncates output.
6319 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6320   test ! -f $lt_ac_sed && continue
6321   cat /dev/null > conftest.in
6322   lt_ac_count=0
6323   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6324   # Check for GNU sed and select it if it is found.
6325   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6326     lt_cv_path_SED=$lt_ac_sed
6327     break
6328   fi
6329   while true; do
6330     cat conftest.in conftest.in >conftest.tmp
6331     mv conftest.tmp conftest.in
6332     cp conftest.in conftest.nl
6333     echo >>conftest.nl
6334     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6335     cmp -s conftest.out conftest.nl || break
6336     # 10000 chars as input seems more than enough
6337     test $lt_ac_count -gt 10 && break
6338     lt_ac_count=`expr $lt_ac_count + 1`
6339     if test $lt_ac_count -gt $lt_ac_max; then
6340       lt_ac_max=$lt_ac_count
6341       lt_cv_path_SED=$lt_ac_sed
6342     fi
6343   done
6344 done
6345
6346 fi
6347
6348 SED=$lt_cv_path_SED
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
6350 $as_echo "$SED" >&6; }
6351
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6353 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6354 if test "${ac_cv_path_GREP+set}" = set; then :
6355   $as_echo_n "(cached) " >&6
6356 else
6357   if test -z "$GREP"; then
6358   ac_path_GREP_found=false
6359   # Loop through the user's path and test for each of PROGNAME-LIST
6360   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6361 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6362 do
6363   IFS=$as_save_IFS
6364   test -z "$as_dir" && as_dir=.
6365     for ac_prog in grep ggrep; do
6366     for ac_exec_ext in '' $ac_executable_extensions; do
6367       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6368       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6369 # Check for GNU ac_path_GREP and select it if it is found.
6370   # Check for GNU $ac_path_GREP
6371 case `"$ac_path_GREP" --version 2>&1` in
6372 *GNU*)
6373   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6374 *)
6375   ac_count=0
6376   $as_echo_n 0123456789 >"conftest.in"
6377   while :
6378   do
6379     cat "conftest.in" "conftest.in" >"conftest.tmp"
6380     mv "conftest.tmp" "conftest.in"
6381     cp "conftest.in" "conftest.nl"
6382     $as_echo 'GREP' >> "conftest.nl"
6383     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6384     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6385     as_fn_arith $ac_count + 1 && ac_count=$as_val
6386     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6387       # Best one so far, save it but keep looking for a better one
6388       ac_cv_path_GREP="$ac_path_GREP"
6389       ac_path_GREP_max=$ac_count
6390     fi
6391     # 10*(2^10) chars as input seems more than enough
6392     test $ac_count -gt 10 && break
6393   done
6394   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6395 esac
6396
6397       $ac_path_GREP_found && break 3
6398     done
6399   done
6400   done
6401 IFS=$as_save_IFS
6402   if test -z "$ac_cv_path_GREP"; then
6403     as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6404   fi
6405 else
6406   ac_cv_path_GREP=$GREP
6407 fi
6408
6409 fi
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6411 $as_echo "$ac_cv_path_GREP" >&6; }
6412  GREP="$ac_cv_path_GREP"
6413
6414
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6416 $as_echo_n "checking for egrep... " >&6; }
6417 if test "${ac_cv_path_EGREP+set}" = set; then :
6418   $as_echo_n "(cached) " >&6
6419 else
6420   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6421    then ac_cv_path_EGREP="$GREP -E"
6422    else
6423      if test -z "$EGREP"; then
6424   ac_path_EGREP_found=false
6425   # Loop through the user's path and test for each of PROGNAME-LIST
6426   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6427 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6428 do
6429   IFS=$as_save_IFS
6430   test -z "$as_dir" && as_dir=.
6431     for ac_prog in egrep; do
6432     for ac_exec_ext in '' $ac_executable_extensions; do
6433       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6434       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6435 # Check for GNU ac_path_EGREP and select it if it is found.
6436   # Check for GNU $ac_path_EGREP
6437 case `"$ac_path_EGREP" --version 2>&1` in
6438 *GNU*)
6439   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6440 *)
6441   ac_count=0
6442   $as_echo_n 0123456789 >"conftest.in"
6443   while :
6444   do
6445     cat "conftest.in" "conftest.in" >"conftest.tmp"
6446     mv "conftest.tmp" "conftest.in"
6447     cp "conftest.in" "conftest.nl"
6448     $as_echo 'EGREP' >> "conftest.nl"
6449     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6450     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6451     as_fn_arith $ac_count + 1 && ac_count=$as_val
6452     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6453       # Best one so far, save it but keep looking for a better one
6454       ac_cv_path_EGREP="$ac_path_EGREP"
6455       ac_path_EGREP_max=$ac_count
6456     fi
6457     # 10*(2^10) chars as input seems more than enough
6458     test $ac_count -gt 10 && break
6459   done
6460   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6461 esac
6462
6463       $ac_path_EGREP_found && break 3
6464     done
6465   done
6466   done
6467 IFS=$as_save_IFS
6468   if test -z "$ac_cv_path_EGREP"; then
6469     as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6470   fi
6471 else
6472   ac_cv_path_EGREP=$EGREP
6473 fi
6474
6475    fi
6476 fi
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6478 $as_echo "$ac_cv_path_EGREP" >&6; }
6479  EGREP="$ac_cv_path_EGREP"
6480
6481
6482
6483 # Check whether --with-gnu-ld was given.
6484 if test "${with_gnu_ld+set}" = set; then :
6485   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6486 else
6487   with_gnu_ld=no
6488 fi
6489
6490 ac_prog=ld
6491 if test "$GCC" = yes; then
6492   # Check if gcc -print-prog-name=ld gives a path.
6493   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
6494 $as_echo_n "checking for ld used by $CC... " >&6; }
6495   case $host in
6496   *-*-mingw*)
6497     # gcc leaves a trailing carriage return which upsets mingw
6498     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6499   *)
6500     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6501   esac
6502   case $ac_prog in
6503     # Accept absolute paths.
6504     [\\/]* | ?:[\\/]*)
6505       re_direlt='/[^/][^/]*/\.\./'
6506       # Canonicalize the pathname of ld
6507       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
6508       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6509         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
6510       done
6511       test -z "$LD" && LD="$ac_prog"
6512       ;;
6513   "")
6514     # If it fails, then pretend we aren't using GCC.
6515     ac_prog=ld
6516     ;;
6517   *)
6518     # If it is relative, then search for the first ld in PATH.
6519     with_gnu_ld=unknown
6520     ;;
6521   esac
6522 elif test "$with_gnu_ld" = yes; then
6523   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6524 $as_echo_n "checking for GNU ld... " >&6; }
6525 else
6526   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6527 $as_echo_n "checking for non-GNU ld... " >&6; }
6528 fi
6529 if test "${lt_cv_path_LD+set}" = set; then :
6530   $as_echo_n "(cached) " >&6
6531 else
6532   if test -z "$LD"; then
6533   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6534   for ac_dir in $PATH; do
6535     IFS="$lt_save_ifs"
6536     test -z "$ac_dir" && ac_dir=.
6537     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6538       lt_cv_path_LD="$ac_dir/$ac_prog"
6539       # Check to see if the program is GNU ld.  I'd rather use --version,
6540       # but apparently some variants of GNU ld only accept -v.
6541       # Break only if it was the GNU/non-GNU ld that we prefer.
6542       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6543       *GNU* | *'with BFD'*)
6544         test "$with_gnu_ld" != no && break
6545         ;;
6546       *)
6547         test "$with_gnu_ld" != yes && break
6548         ;;
6549       esac
6550     fi
6551   done
6552   IFS="$lt_save_ifs"
6553 else
6554   lt_cv_path_LD="$LD" # Let the user override the test with a path.
6555 fi
6556 fi
6557
6558 LD="$lt_cv_path_LD"
6559 if test -n "$LD"; then
6560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6561 $as_echo "$LD" >&6; }
6562 else
6563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564 $as_echo "no" >&6; }
6565 fi
6566 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6568 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6569 if test "${lt_cv_prog_gnu_ld+set}" = set; then :
6570   $as_echo_n "(cached) " >&6
6571 else
6572   # I'd rather use --version here, but apparently some GNU lds only accept -v.
6573 case `$LD -v 2>&1 </dev/null` in
6574 *GNU* | *'with BFD'*)
6575   lt_cv_prog_gnu_ld=yes
6576   ;;
6577 *)
6578   lt_cv_prog_gnu_ld=no
6579   ;;
6580 esac
6581 fi
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
6583 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
6584 with_gnu_ld=$lt_cv_prog_gnu_ld
6585
6586
6587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6588 $as_echo_n "checking for $LD option to reload object files... " >&6; }
6589 if test "${lt_cv_ld_reload_flag+set}" = set; then :
6590   $as_echo_n "(cached) " >&6
6591 else
6592   lt_cv_ld_reload_flag='-r'
6593 fi
6594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6595 $as_echo "$lt_cv_ld_reload_flag" >&6; }
6596 reload_flag=$lt_cv_ld_reload_flag
6597 case $reload_flag in
6598 "" | " "*) ;;
6599 *) reload_flag=" $reload_flag" ;;
6600 esac
6601 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6602 case $host_os in
6603   darwin*)
6604     if test "$GCC" = yes; then
6605       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
6606     else
6607       reload_cmds='$LD$reload_flag -o $output$reload_objs'
6608     fi
6609     ;;
6610 esac
6611
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5
6613 $as_echo_n "checking for BSD-compatible nm... " >&6; }
6614 if test "${lt_cv_path_NM+set}" = set; then :
6615   $as_echo_n "(cached) " >&6
6616 else
6617   if test -n "$NM"; then
6618   # Let the user override the test.
6619   lt_cv_path_NM="$NM"
6620 else
6621   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6622   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
6623     IFS="$lt_save_ifs"
6624     test -z "$ac_dir" && ac_dir=.
6625     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
6626     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6627       # Check to see if the nm accepts a BSD-compat flag.
6628       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
6629       #   nm: unknown option "B" ignored
6630       # Tru64's nm complains that /dev/null is an invalid object file
6631       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
6632       */dev/null* | *'Invalid file or object type'*)
6633         lt_cv_path_NM="$tmp_nm -B"
6634         break
6635         ;;
6636       *)
6637         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
6638         */dev/null*)
6639           lt_cv_path_NM="$tmp_nm -p"
6640           break
6641           ;;
6642         *)
6643           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6644           continue # so that we can try to find one that supports BSD flags
6645           ;;
6646         esac
6647       esac
6648     fi
6649   done
6650   IFS="$lt_save_ifs"
6651   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
6652 fi
6653 fi
6654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
6655 $as_echo "$lt_cv_path_NM" >&6; }
6656 NM="$lt_cv_path_NM"
6657
6658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6659 $as_echo_n "checking whether ln -s works... " >&6; }
6660 LN_S=$as_ln_s
6661 if test "$LN_S" = "ln -s"; then
6662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6663 $as_echo "yes" >&6; }
6664 else
6665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6666 $as_echo "no, using $LN_S" >&6; }
6667 fi
6668
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognise dependent libraries" >&5
6670 $as_echo_n "checking how to recognise dependent libraries... " >&6; }
6671 if test "${lt_cv_deplibs_check_method+set}" = set; then :
6672   $as_echo_n "(cached) " >&6
6673 else
6674   lt_cv_file_magic_cmd='$MAGIC_CMD'
6675 lt_cv_file_magic_test_file=
6676 lt_cv_deplibs_check_method='unknown'
6677 # Need to set the preceding variable on all platforms that support
6678 # interlibrary dependencies.
6679 # 'none' -- dependencies not supported.
6680 # `unknown' -- same as none, but documents that we really don't know.
6681 # 'pass_all' -- all dependencies passed with no checks.
6682 # 'test_compile' -- check by making test program.
6683 # 'file_magic [[regex]]' -- check by looking for files in library path
6684 # which responds to the $file_magic_cmd with a given extended regex.
6685 # If you have `file' or equivalent on your system and you're not sure
6686 # whether `pass_all' will *always* work, you probably want this one.
6687
6688 case $host_os in
6689 aix4* | aix5*)
6690   lt_cv_deplibs_check_method=pass_all
6691   ;;
6692
6693 beos*)
6694   lt_cv_deplibs_check_method=pass_all
6695   ;;
6696
6697 bsdi[45]*)
6698   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6699   lt_cv_file_magic_cmd='/usr/bin/file -L'
6700   lt_cv_file_magic_test_file=/shlib/libc.so
6701   ;;
6702
6703 cygwin*)
6704   # func_win32_libid is a shell function defined in ltmain.sh
6705   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6706   lt_cv_file_magic_cmd='func_win32_libid'
6707   ;;
6708
6709 mingw* | pw32*)
6710   # Base MSYS/MinGW do not provide the 'file' command needed by
6711   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
6712   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6713   lt_cv_file_magic_cmd='$OBJDUMP -f'
6714   ;;
6715
6716 darwin* | rhapsody*)
6717   lt_cv_deplibs_check_method=pass_all
6718   ;;
6719
6720 freebsd* | kfreebsd*-gnu | dragonfly*)
6721   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6722     case $host_cpu in
6723     i*86 )
6724       # Not sure whether the presence of OpenBSD here was a mistake.
6725       # Let's accept both of them until this is cleared up.
6726       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6727       lt_cv_file_magic_cmd=/usr/bin/file
6728       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6729       ;;
6730     esac
6731   else
6732     lt_cv_deplibs_check_method=pass_all
6733   fi
6734   ;;
6735
6736 gnu*)
6737   lt_cv_deplibs_check_method=pass_all
6738   ;;
6739
6740 hpux10.20* | hpux11*)
6741   lt_cv_file_magic_cmd=/usr/bin/file
6742   case $host_cpu in
6743   ia64*)
6744     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6745     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6746     ;;
6747   hppa*64*)
6748     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]'
6749     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6750     ;;
6751   *)
6752     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
6753     lt_cv_file_magic_test_file=/usr/lib/libc.sl
6754     ;;
6755   esac
6756   ;;
6757
6758 irix5* | irix6* | nonstopux*)
6759   case $LD in
6760   *-32|*"-32 ") libmagic=32-bit;;
6761   *-n32|*"-n32 ") libmagic=N32;;
6762   *-64|*"-64 ") libmagic=64-bit;;
6763   *) libmagic=never-match;;
6764   esac
6765   lt_cv_deplibs_check_method=pass_all
6766   ;;
6767
6768 # This must be Linux ELF.
6769 linux*)
6770   lt_cv_deplibs_check_method=pass_all
6771   ;;
6772
6773 netbsd*)
6774   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6775     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6776   else
6777     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6778   fi
6779   ;;
6780
6781 newos6*)
6782   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6783   lt_cv_file_magic_cmd=/usr/bin/file
6784   lt_cv_file_magic_test_file=/usr/lib/libnls.so
6785   ;;
6786
6787 nto-qnx*)
6788   lt_cv_deplibs_check_method=unknown
6789   ;;
6790
6791 openbsd*)
6792   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6793     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6794   else
6795     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6796   fi
6797   ;;
6798
6799 osf3* | osf4* | osf5*)
6800   lt_cv_deplibs_check_method=pass_all
6801   ;;
6802
6803 sco3.2v5*)
6804   lt_cv_deplibs_check_method=pass_all
6805   ;;
6806
6807 solaris*)
6808   lt_cv_deplibs_check_method=pass_all
6809   ;;
6810
6811 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6812   case $host_vendor in
6813   motorola)
6814     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]'
6815     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6816     ;;
6817   ncr)
6818     lt_cv_deplibs_check_method=pass_all
6819     ;;
6820   sequent)
6821     lt_cv_file_magic_cmd='/bin/file'
6822     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6823     ;;
6824   sni)
6825     lt_cv_file_magic_cmd='/bin/file'
6826     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6827     lt_cv_file_magic_test_file=/lib/libc.so
6828     ;;
6829   siemens)
6830     lt_cv_deplibs_check_method=pass_all
6831     ;;
6832   esac
6833   ;;
6834
6835 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
6836   lt_cv_deplibs_check_method=pass_all
6837   ;;
6838 esac
6839
6840 fi
6841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6842 $as_echo "$lt_cv_deplibs_check_method" >&6; }
6843 file_magic_cmd=$lt_cv_file_magic_cmd
6844 deplibs_check_method=$lt_cv_deplibs_check_method
6845 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6846
6847
6848
6849
6850 # If no C compiler was specified, use CC.
6851 LTCC=${LTCC-"$CC"}
6852
6853 # Allow CC to be a program name with arguments.
6854 compiler=$CC
6855
6856
6857 # Check whether --enable-libtool-lock was given.
6858 if test "${enable_libtool_lock+set}" = set; then :
6859   enableval=$enable_libtool_lock;
6860 fi
6861
6862 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6863
6864 # Some flags need to be propagated to the compiler or linker for good
6865 # libtool support.
6866 case $host in
6867 ia64-*-hpux*)
6868   # Find out which ABI we are using.
6869   echo 'int i;' > conftest.$ac_ext
6870   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6871   (eval $ac_compile) 2>&5
6872   ac_status=$?
6873   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6874   test $ac_status = 0; }; then
6875     case `/usr/bin/file conftest.$ac_objext` in
6876     *ELF-32*)
6877       HPUX_IA64_MODE="32"
6878       ;;
6879     *ELF-64*)
6880       HPUX_IA64_MODE="64"
6881       ;;
6882     esac
6883   fi
6884   rm -rf conftest*
6885   ;;
6886 *-*-irix6*)
6887   # Find out which ABI we are using.
6888   echo '#line 6888 "configure"' > conftest.$ac_ext
6889   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6890   (eval $ac_compile) 2>&5
6891   ac_status=$?
6892   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6893   test $ac_status = 0; }; then
6894    if test "$lt_cv_prog_gnu_ld" = yes; then
6895     case `/usr/bin/file conftest.$ac_objext` in
6896     *32-bit*)
6897       LD="${LD-ld} -melf32bsmip"
6898       ;;
6899     *N32*)
6900       LD="${LD-ld} -melf32bmipn32"
6901       ;;
6902     *64-bit*)
6903       LD="${LD-ld} -melf64bmip"
6904       ;;
6905     esac
6906    else
6907     case `/usr/bin/file conftest.$ac_objext` in
6908     *32-bit*)
6909       LD="${LD-ld} -32"
6910       ;;
6911     *N32*)
6912       LD="${LD-ld} -n32"
6913       ;;
6914     *64-bit*)
6915       LD="${LD-ld} -64"
6916       ;;
6917     esac
6918    fi
6919   fi
6920   rm -rf conftest*
6921   ;;
6922
6923 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6924   # Find out which ABI we are using.
6925   echo 'int i;' > conftest.$ac_ext
6926   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6927   (eval $ac_compile) 2>&5
6928   ac_status=$?
6929   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6930   test $ac_status = 0; }; then
6931     case `/usr/bin/file conftest.o` in
6932     *32-bit*)
6933       case $host in
6934         x86_64-*linux*)
6935           LD="${LD-ld} -m elf_i386"
6936           ;;
6937         ppc64-*linux*|powerpc64-*linux*)
6938           LD="${LD-ld} -m elf32ppclinux"
6939           ;;
6940         s390x-*linux*)
6941           LD="${LD-ld} -m elf_s390"
6942           ;;
6943         sparc64-*linux*)
6944           LD="${LD-ld} -m elf32_sparc"
6945           ;;
6946       esac
6947       ;;
6948     *64-bit*)
6949       case $host in
6950         x86_64-*linux*)
6951           LD="${LD-ld} -m elf_x86_64"
6952           ;;
6953         ppc*-*linux*|powerpc*-*linux*)
6954           LD="${LD-ld} -m elf64ppc"
6955           ;;
6956         s390*-*linux*)
6957           LD="${LD-ld} -m elf64_s390"
6958           ;;
6959         sparc*-*linux*)
6960           LD="${LD-ld} -m elf64_sparc"
6961           ;;
6962       esac
6963       ;;
6964     esac
6965   fi
6966   rm -rf conftest*
6967   ;;
6968
6969 *-*-sco3.2v5*)
6970   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6971   SAVE_CFLAGS="$CFLAGS"
6972   CFLAGS="$CFLAGS -belf"
6973   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
6974 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
6975 if test "${lt_cv_cc_needs_belf+set}" = set; then :
6976   $as_echo_n "(cached) " >&6
6977 else
6978   ac_ext=c
6979 ac_cpp='$CPP $CPPFLAGS'
6980 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6981 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6982 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6983
6984      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6985 /* end confdefs.h.  */
6986
6987 int
6988 main ()
6989 {
6990
6991   ;
6992   return 0;
6993 }
6994 _ACEOF
6995 if ac_fn_c_try_link "$LINENO"; then :
6996   lt_cv_cc_needs_belf=yes
6997 else
6998   lt_cv_cc_needs_belf=no
6999 fi
7000 rm -f core conftest.err conftest.$ac_objext \
7001     conftest$ac_exeext conftest.$ac_ext
7002      ac_ext=c
7003 ac_cpp='$CPP $CPPFLAGS'
7004 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7005 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7006 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7007
7008 fi
7009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7010 $as_echo "$lt_cv_cc_needs_belf" >&6; }
7011   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7012     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7013     CFLAGS="$SAVE_CFLAGS"
7014   fi
7015   ;;
7016 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
7017   if test -n "$ac_tool_prefix"; then
7018   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7019 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7021 $as_echo_n "checking for $ac_word... " >&6; }
7022 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7023   $as_echo_n "(cached) " >&6
7024 else
7025   if test -n "$DLLTOOL"; then
7026   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7027 else
7028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7029 for as_dir in $PATH
7030 do
7031   IFS=$as_save_IFS
7032   test -z "$as_dir" && as_dir=.
7033     for ac_exec_ext in '' $ac_executable_extensions; do
7034   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7035     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7037     break 2
7038   fi
7039 done
7040   done
7041 IFS=$as_save_IFS
7042
7043 fi
7044 fi
7045 DLLTOOL=$ac_cv_prog_DLLTOOL
7046 if test -n "$DLLTOOL"; then
7047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7048 $as_echo "$DLLTOOL" >&6; }
7049 else
7050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7051 $as_echo "no" >&6; }
7052 fi
7053
7054
7055 fi
7056 if test -z "$ac_cv_prog_DLLTOOL"; then
7057   ac_ct_DLLTOOL=$DLLTOOL
7058   # Extract the first word of "dlltool", so it can be a program name with args.
7059 set dummy dlltool; ac_word=$2
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7061 $as_echo_n "checking for $ac_word... " >&6; }
7062 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7063   $as_echo_n "(cached) " >&6
7064 else
7065   if test -n "$ac_ct_DLLTOOL"; then
7066   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7067 else
7068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7069 for as_dir in $PATH
7070 do
7071   IFS=$as_save_IFS
7072   test -z "$as_dir" && as_dir=.
7073     for ac_exec_ext in '' $ac_executable_extensions; do
7074   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7075     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7076     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7077     break 2
7078   fi
7079 done
7080   done
7081 IFS=$as_save_IFS
7082
7083 fi
7084 fi
7085 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7086 if test -n "$ac_ct_DLLTOOL"; then
7087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7088 $as_echo "$ac_ct_DLLTOOL" >&6; }
7089 else
7090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7091 $as_echo "no" >&6; }
7092 fi
7093
7094   if test "x$ac_ct_DLLTOOL" = x; then
7095     DLLTOOL="false"
7096   else
7097     case $cross_compiling:$ac_tool_warned in
7098 yes:)
7099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7100 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7101 ac_tool_warned=yes ;;
7102 esac
7103     DLLTOOL=$ac_ct_DLLTOOL
7104   fi
7105 else
7106   DLLTOOL="$ac_cv_prog_DLLTOOL"
7107 fi
7108
7109   if test -n "$ac_tool_prefix"; then
7110   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
7111 set dummy ${ac_tool_prefix}as; ac_word=$2
7112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7113 $as_echo_n "checking for $ac_word... " >&6; }
7114 if test "${ac_cv_prog_AS+set}" = set; then :
7115   $as_echo_n "(cached) " >&6
7116 else
7117   if test -n "$AS"; then
7118   ac_cv_prog_AS="$AS" # Let the user override the test.
7119 else
7120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7121 for as_dir in $PATH
7122 do
7123   IFS=$as_save_IFS
7124   test -z "$as_dir" && as_dir=.
7125     for ac_exec_ext in '' $ac_executable_extensions; do
7126   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7127     ac_cv_prog_AS="${ac_tool_prefix}as"
7128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7129     break 2
7130   fi
7131 done
7132   done
7133 IFS=$as_save_IFS
7134
7135 fi
7136 fi
7137 AS=$ac_cv_prog_AS
7138 if test -n "$AS"; then
7139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
7140 $as_echo "$AS" >&6; }
7141 else
7142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7143 $as_echo "no" >&6; }
7144 fi
7145
7146
7147 fi
7148 if test -z "$ac_cv_prog_AS"; then
7149   ac_ct_AS=$AS
7150   # Extract the first word of "as", so it can be a program name with args.
7151 set dummy as; ac_word=$2
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7153 $as_echo_n "checking for $ac_word... " >&6; }
7154 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
7155   $as_echo_n "(cached) " >&6
7156 else
7157   if test -n "$ac_ct_AS"; then
7158   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
7159 else
7160 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7161 for as_dir in $PATH
7162 do
7163   IFS=$as_save_IFS
7164   test -z "$as_dir" && as_dir=.
7165     for ac_exec_ext in '' $ac_executable_extensions; do
7166   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7167     ac_cv_prog_ac_ct_AS="as"
7168     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7169     break 2
7170   fi
7171 done
7172   done
7173 IFS=$as_save_IFS
7174
7175 fi
7176 fi
7177 ac_ct_AS=$ac_cv_prog_ac_ct_AS
7178 if test -n "$ac_ct_AS"; then
7179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
7180 $as_echo "$ac_ct_AS" >&6; }
7181 else
7182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7183 $as_echo "no" >&6; }
7184 fi
7185
7186   if test "x$ac_ct_AS" = x; then
7187     AS="false"
7188   else
7189     case $cross_compiling:$ac_tool_warned in
7190 yes:)
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7192 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7193 ac_tool_warned=yes ;;
7194 esac
7195     AS=$ac_ct_AS
7196   fi
7197 else
7198   AS="$ac_cv_prog_AS"
7199 fi
7200
7201   if test -n "$ac_tool_prefix"; then
7202   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7203 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7205 $as_echo_n "checking for $ac_word... " >&6; }
7206 if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
7207   $as_echo_n "(cached) " >&6
7208 else
7209   if test -n "$OBJDUMP"; then
7210   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7211 else
7212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7213 for as_dir in $PATH
7214 do
7215   IFS=$as_save_IFS
7216   test -z "$as_dir" && as_dir=.
7217     for ac_exec_ext in '' $ac_executable_extensions; do
7218   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7219     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7221     break 2
7222   fi
7223 done
7224   done
7225 IFS=$as_save_IFS
7226
7227 fi
7228 fi
7229 OBJDUMP=$ac_cv_prog_OBJDUMP
7230 if test -n "$OBJDUMP"; then
7231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7232 $as_echo "$OBJDUMP" >&6; }
7233 else
7234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7235 $as_echo "no" >&6; }
7236 fi
7237
7238
7239 fi
7240 if test -z "$ac_cv_prog_OBJDUMP"; then
7241   ac_ct_OBJDUMP=$OBJDUMP
7242   # Extract the first word of "objdump", so it can be a program name with args.
7243 set dummy objdump; ac_word=$2
7244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7245 $as_echo_n "checking for $ac_word... " >&6; }
7246 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
7247   $as_echo_n "(cached) " >&6
7248 else
7249   if test -n "$ac_ct_OBJDUMP"; then
7250   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7251 else
7252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7253 for as_dir in $PATH
7254 do
7255   IFS=$as_save_IFS
7256   test -z "$as_dir" && as_dir=.
7257     for ac_exec_ext in '' $ac_executable_extensions; do
7258   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7259     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7261     break 2
7262   fi
7263 done
7264   done
7265 IFS=$as_save_IFS
7266
7267 fi
7268 fi
7269 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7270 if test -n "$ac_ct_OBJDUMP"; then
7271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7272 $as_echo "$ac_ct_OBJDUMP" >&6; }
7273 else
7274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7275 $as_echo "no" >&6; }
7276 fi
7277
7278   if test "x$ac_ct_OBJDUMP" = x; then
7279     OBJDUMP="false"
7280   else
7281     case $cross_compiling:$ac_tool_warned in
7282 yes:)
7283 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7284 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7285 ac_tool_warned=yes ;;
7286 esac
7287     OBJDUMP=$ac_ct_OBJDUMP
7288   fi
7289 else
7290   OBJDUMP="$ac_cv_prog_OBJDUMP"
7291 fi
7292
7293   ;;
7294
7295 esac
7296
7297 need_locks="$enable_libtool_lock"
7298
7299
7300 ac_ext=c
7301 ac_cpp='$CPP $CPPFLAGS'
7302 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7303 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7304 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7306 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7307 # On Suns, sometimes $CPP names a directory.
7308 if test -n "$CPP" && test -d "$CPP"; then
7309   CPP=
7310 fi
7311 if test -z "$CPP"; then
7312   if test "${ac_cv_prog_CPP+set}" = set; then :
7313   $as_echo_n "(cached) " >&6
7314 else
7315       # Double quotes because CPP needs to be expanded
7316     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7317     do
7318       ac_preproc_ok=false
7319 for ac_c_preproc_warn_flag in '' yes
7320 do
7321   # Use a header file that comes with gcc, so configuring glibc
7322   # with a fresh cross-compiler works.
7323   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7324   # <limits.h> exists even on freestanding compilers.
7325   # On the NeXT, cc -E runs the code through the compiler's parser,
7326   # not just through cpp. "Syntax error" is here to catch this case.
7327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7328 /* end confdefs.h.  */
7329 #ifdef __STDC__
7330 # include <limits.h>
7331 #else
7332 # include <assert.h>
7333 #endif
7334                      Syntax error
7335 _ACEOF
7336 if ac_fn_c_try_cpp "$LINENO"; then :
7337
7338 else
7339   # Broken: fails on valid input.
7340 continue
7341 fi
7342 rm -f conftest.err conftest.$ac_ext
7343
7344   # OK, works on sane cases.  Now check whether nonexistent headers
7345   # can be detected and how.
7346   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7347 /* end confdefs.h.  */
7348 #include <ac_nonexistent.h>
7349 _ACEOF
7350 if ac_fn_c_try_cpp "$LINENO"; then :
7351   # Broken: success on invalid input.
7352 continue
7353 else
7354   # Passes both tests.
7355 ac_preproc_ok=:
7356 break
7357 fi
7358 rm -f conftest.err conftest.$ac_ext
7359
7360 done
7361 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7362 rm -f conftest.err conftest.$ac_ext
7363 if $ac_preproc_ok; then :
7364   break
7365 fi
7366
7367     done
7368     ac_cv_prog_CPP=$CPP
7369
7370 fi
7371   CPP=$ac_cv_prog_CPP
7372 else
7373   ac_cv_prog_CPP=$CPP
7374 fi
7375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7376 $as_echo "$CPP" >&6; }
7377 ac_preproc_ok=false
7378 for ac_c_preproc_warn_flag in '' yes
7379 do
7380   # Use a header file that comes with gcc, so configuring glibc
7381   # with a fresh cross-compiler works.
7382   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7383   # <limits.h> exists even on freestanding compilers.
7384   # On the NeXT, cc -E runs the code through the compiler's parser,
7385   # not just through cpp. "Syntax error" is here to catch this case.
7386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7387 /* end confdefs.h.  */
7388 #ifdef __STDC__
7389 # include <limits.h>
7390 #else
7391 # include <assert.h>
7392 #endif
7393                      Syntax error
7394 _ACEOF
7395 if ac_fn_c_try_cpp "$LINENO"; then :
7396
7397 else
7398   # Broken: fails on valid input.
7399 continue
7400 fi
7401 rm -f conftest.err conftest.$ac_ext
7402
7403   # OK, works on sane cases.  Now check whether nonexistent headers
7404   # can be detected and how.
7405   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7406 /* end confdefs.h.  */
7407 #include <ac_nonexistent.h>
7408 _ACEOF
7409 if ac_fn_c_try_cpp "$LINENO"; then :
7410   # Broken: success on invalid input.
7411 continue
7412 else
7413   # Passes both tests.
7414 ac_preproc_ok=:
7415 break
7416 fi
7417 rm -f conftest.err conftest.$ac_ext
7418
7419 done
7420 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7421 rm -f conftest.err conftest.$ac_ext
7422 if $ac_preproc_ok; then :
7423
7424 else
7425   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7426 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7427 as_fn_error "C preprocessor \"$CPP\" fails sanity check
7428 See \`config.log' for more details." "$LINENO" 5; }
7429 fi
7430
7431 ac_ext=c
7432 ac_cpp='$CPP $CPPFLAGS'
7433 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7434 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7435 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7436
7437
7438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7439 $as_echo_n "checking for ANSI C header files... " >&6; }
7440 if test "${ac_cv_header_stdc+set}" = set; then :
7441   $as_echo_n "(cached) " >&6
7442 else
7443   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7444 /* end confdefs.h.  */
7445 #include <stdlib.h>
7446 #include <stdarg.h>
7447 #include <string.h>
7448 #include <float.h>
7449
7450 int
7451 main ()
7452 {
7453
7454   ;
7455   return 0;
7456 }
7457 _ACEOF
7458 if ac_fn_c_try_compile "$LINENO"; then :
7459   ac_cv_header_stdc=yes
7460 else
7461   ac_cv_header_stdc=no
7462 fi
7463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7464
7465 if test $ac_cv_header_stdc = yes; then
7466   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7467   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7468 /* end confdefs.h.  */
7469 #include <string.h>
7470
7471 _ACEOF
7472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7473   $EGREP "memchr" >/dev/null 2>&1; then :
7474
7475 else
7476   ac_cv_header_stdc=no
7477 fi
7478 rm -f conftest*
7479
7480 fi
7481
7482 if test $ac_cv_header_stdc = yes; then
7483   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7485 /* end confdefs.h.  */
7486 #include <stdlib.h>
7487
7488 _ACEOF
7489 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7490   $EGREP "free" >/dev/null 2>&1; then :
7491
7492 else
7493   ac_cv_header_stdc=no
7494 fi
7495 rm -f conftest*
7496
7497 fi
7498
7499 if test $ac_cv_header_stdc = yes; then
7500   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7501   if test "$cross_compiling" = yes; then :
7502   :
7503 else
7504   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7505 /* end confdefs.h.  */
7506 #include <ctype.h>
7507 #include <stdlib.h>
7508 #if ((' ' & 0x0FF) == 0x020)
7509 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7510 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7511 #else
7512 # define ISLOWER(c) \
7513                    (('a' <= (c) && (c) <= 'i') \
7514                      || ('j' <= (c) && (c) <= 'r') \
7515                      || ('s' <= (c) && (c) <= 'z'))
7516 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7517 #endif
7518
7519 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7520 int
7521 main ()
7522 {
7523   int i;
7524   for (i = 0; i < 256; i++)
7525     if (XOR (islower (i), ISLOWER (i))
7526         || toupper (i) != TOUPPER (i))
7527       return 2;
7528   return 0;
7529 }
7530 _ACEOF
7531 if ac_fn_c_try_run "$LINENO"; then :
7532
7533 else
7534   ac_cv_header_stdc=no
7535 fi
7536 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7537   conftest.$ac_objext conftest.beam conftest.$ac_ext
7538 fi
7539
7540 fi
7541 fi
7542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7543 $as_echo "$ac_cv_header_stdc" >&6; }
7544 if test $ac_cv_header_stdc = yes; then
7545
7546 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7547
7548 fi
7549
7550 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7551 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7552                   inttypes.h stdint.h unistd.h
7553 do :
7554   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7555 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7556 "
7557 eval as_val=\$$as_ac_Header
7558    if test "x$as_val" = x""yes; then :
7559   cat >>confdefs.h <<_ACEOF
7560 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7561 _ACEOF
7562
7563 fi
7564
7565 done
7566
7567
7568 for ac_header in dlfcn.h
7569 do :
7570   ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
7571 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
7572   cat >>confdefs.h <<_ACEOF
7573 #define HAVE_DLFCN_H 1
7574 _ACEOF
7575
7576 fi
7577
7578 done
7579
7580
7581 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
7582
7583 # find the maximum length of command line arguments
7584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7585 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7586 if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
7587   $as_echo_n "(cached) " >&6
7588 else
7589     i=0
7590   teststring="ABCD"
7591
7592   case $build_os in
7593   msdosdjgpp*)
7594     # On DJGPP, this test can blow up pretty badly due to problems in libc
7595     # (any single argument exceeding 2000 bytes causes a buffer overrun
7596     # during glob expansion).  Even if it were fixed, the result of this
7597     # check would be larger than it should be.
7598     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7599     ;;
7600
7601   gnu*)
7602     # Under GNU Hurd, this test is not required because there is
7603     # no limit to the length of command line arguments.
7604     # Libtool will interpret -1 as no limit whatsoever
7605     lt_cv_sys_max_cmd_len=-1;
7606     ;;
7607
7608   cygwin* | mingw*)
7609     # On Win9x/ME, this test blows up -- it succeeds, but takes
7610     # about 5 minutes as the teststring grows exponentially.
7611     # Worse, since 9x/ME are not pre-emptively multitasking,
7612     # you end up with a "frozen" computer, even though with patience
7613     # the test eventually succeeds (with a max line length of 256k).
7614     # Instead, let's just punt: use the minimum linelength reported by
7615     # all of the supported platforms: 8192 (on NT/2K/XP).
7616     lt_cv_sys_max_cmd_len=8192;
7617     ;;
7618
7619   amigaos*)
7620     # On AmigaOS with pdksh, this test takes hours, literally.
7621     # So we just punt and use a minimum line length of 8192.
7622     lt_cv_sys_max_cmd_len=8192;
7623     ;;
7624
7625   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7626     # This has been around since 386BSD, at least.  Likely further.
7627     if test -x /sbin/sysctl; then
7628       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7629     elif test -x /usr/sbin/sysctl; then
7630       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7631     else
7632       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7633     fi
7634     # And add a safety zone
7635     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7636     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7637     ;;
7638   osf*)
7639     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7640     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7641     # nice to cause kernel panics so lets avoid the loop below.
7642     # First set a reasonable default.
7643     lt_cv_sys_max_cmd_len=16384
7644     #
7645     if test -x /sbin/sysconfig; then
7646       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7647         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7648       esac
7649     fi
7650     ;;
7651   *)
7652     # If test is not a shell built-in, we'll probably end up computing a
7653     # maximum length that is only half of the actual maximum length, but
7654     # we can't tell.
7655     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7656     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
7657                = "XX$teststring") >/dev/null 2>&1 &&
7658             new_result=`expr "X$teststring" : ".*" 2>&1` &&
7659             lt_cv_sys_max_cmd_len=$new_result &&
7660             test $i != 17 # 1/2 MB should be enough
7661     do
7662       i=`expr $i + 1`
7663       teststring=$teststring$teststring
7664     done
7665     teststring=
7666     # Add a significant safety factor because C++ compilers can tack on massive
7667     # amounts of additional arguments before passing them to the linker.
7668     # It appears as though 1/2 is a usable value.
7669     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7670     ;;
7671   esac
7672
7673 fi
7674
7675 if test -n $lt_cv_sys_max_cmd_len ; then
7676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7677 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7678 else
7679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7680 $as_echo "none" >&6; }
7681 fi
7682
7683
7684
7685
7686 # Check for command to grab the raw symbol name followed by C symbol from nm.
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7688 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
7689 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
7690   $as_echo_n "(cached) " >&6
7691 else
7692
7693 # These are sane defaults that work on at least a few old systems.
7694 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
7695
7696 # Character class describing NM global symbol codes.
7697 symcode='[BCDEGRST]'
7698
7699 # Regexp to match symbols that can be accessed directly from C.
7700 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7701
7702 # Transform an extracted symbol line into a proper C declaration
7703 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
7704
7705 # Transform an extracted symbol line into symbol name and symbol address
7706 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'"
7707
7708 # Define system-specific variables.
7709 case $host_os in
7710 aix*)
7711   symcode='[BCDT]'
7712   ;;
7713 cygwin* | mingw* | pw32*)
7714   symcode='[ABCDGISTW]'
7715   ;;
7716 hpux*) # Its linker distinguishes data from code symbols
7717   if test "$host_cpu" = ia64; then
7718     symcode='[ABCDEGRST]'
7719   fi
7720   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7721   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'"
7722   ;;
7723 linux*)
7724   if test "$host_cpu" = ia64; then
7725     symcode='[ABCDGIRSTW]'
7726     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7727     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'"
7728   fi
7729   ;;
7730 irix* | nonstopux*)
7731   symcode='[BCDEGRST]'
7732   ;;
7733 osf*)
7734   symcode='[BCDEGQRST]'
7735   ;;
7736 solaris* | sysv5*)
7737   symcode='[BDRT]'
7738   ;;
7739 sysv4)
7740   symcode='[DFNSTU]'
7741   ;;
7742 esac
7743
7744 # Handle CRLF in mingw tool chain
7745 opt_cr=
7746 case $build_os in
7747 mingw*)
7748   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7749   ;;
7750 esac
7751
7752 # If we're using GNU nm, then use its standard symbol codes.
7753 case `$NM -V 2>&1` in
7754 *GNU* | *'with BFD'*)
7755   symcode='[ABCDGIRSTW]' ;;
7756 esac
7757
7758 # Try without a prefix undercore, then with it.
7759 for ac_symprfx in "" "_"; do
7760
7761   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7762   symxfrm="\\1 $ac_symprfx\\2 \\2"
7763
7764   # Write the raw and C identifiers.
7765   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7766
7767   # Check to see that the pipe works correctly.
7768   pipe_works=no
7769
7770   rm -f conftest*
7771   cat > conftest.$ac_ext <<EOF
7772 #ifdef __cplusplus
7773 extern "C" {
7774 #endif
7775 char nm_test_var;
7776 void nm_test_func(){}
7777 #ifdef __cplusplus
7778 }
7779 #endif
7780 int main(){nm_test_var='a';nm_test_func();return(0);}
7781 EOF
7782
7783   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7784   (eval $ac_compile) 2>&5
7785   ac_status=$?
7786   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7787   test $ac_status = 0; }; then
7788     # Now try to grab the symbols.
7789     nlist=conftest.nm
7790     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
7791   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
7792   ac_status=$?
7793   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7794   test $ac_status = 0; } && test -s "$nlist"; then
7795       # Try sorting and uniquifying the output.
7796       if sort "$nlist" | uniq > "$nlist"T; then
7797         mv -f "$nlist"T "$nlist"
7798       else
7799         rm -f "$nlist"T
7800       fi
7801
7802       # Make sure that we snagged all the symbols we need.
7803       if grep ' nm_test_var$' "$nlist" >/dev/null; then
7804         if grep ' nm_test_func$' "$nlist" >/dev/null; then
7805           cat <<EOF > conftest.$ac_ext
7806 #ifdef __cplusplus
7807 extern "C" {
7808 #endif
7809
7810 EOF
7811           # Now generate the symbol file.
7812           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7813
7814           cat <<EOF >> conftest.$ac_ext
7815 #if defined (__STDC__) && __STDC__
7816 # define lt_ptr_t void *
7817 #else
7818 # define lt_ptr_t char *
7819 # define const
7820 #endif
7821
7822 /* The mapping between symbol names and symbols. */
7823 const struct {
7824   const char *name;
7825   lt_ptr_t address;
7826 }
7827 lt_preloaded_symbols[] =
7828 {
7829 EOF
7830           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7831           cat <<\EOF >> conftest.$ac_ext
7832   {0, (lt_ptr_t) 0}
7833 };
7834
7835 #ifdef __cplusplus
7836 }
7837 #endif
7838 EOF
7839           # Now try linking the two files.
7840           mv conftest.$ac_objext conftstm.$ac_objext
7841           lt_save_LIBS="$LIBS"
7842           lt_save_CFLAGS="$CFLAGS"
7843           LIBS="conftstm.$ac_objext"
7844           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7845           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7846   (eval $ac_link) 2>&5
7847   ac_status=$?
7848   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7849   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7850             pipe_works=yes
7851           fi
7852           LIBS="$lt_save_LIBS"
7853           CFLAGS="$lt_save_CFLAGS"
7854         else
7855           echo "cannot find nm_test_func in $nlist" >&5
7856         fi
7857       else
7858         echo "cannot find nm_test_var in $nlist" >&5
7859       fi
7860     else
7861       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7862     fi
7863   else
7864     echo "$progname: failed program was:" >&5
7865     cat conftest.$ac_ext >&5
7866   fi
7867   rm -f conftest* conftst*
7868
7869   # Do not use the global_symbol_pipe unless it works.
7870   if test "$pipe_works" = yes; then
7871     break
7872   else
7873     lt_cv_sys_global_symbol_pipe=
7874   fi
7875 done
7876
7877 fi
7878
7879 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7880   lt_cv_sys_global_symbol_to_cdecl=
7881 fi
7882 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7884 $as_echo "failed" >&6; }
7885 else
7886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7887 $as_echo "ok" >&6; }
7888 fi
7889
7890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
7891 $as_echo_n "checking for objdir... " >&6; }
7892 if test "${lt_cv_objdir+set}" = set; then :
7893   $as_echo_n "(cached) " >&6
7894 else
7895   rm -f .libs 2>/dev/null
7896 mkdir .libs 2>/dev/null
7897 if test -d .libs; then
7898   lt_cv_objdir=.libs
7899 else
7900   # MS-DOS does not allow filenames that begin with a dot.
7901   lt_cv_objdir=_libs
7902 fi
7903 rmdir .libs 2>/dev/null
7904 fi
7905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
7906 $as_echo "$lt_cv_objdir" >&6; }
7907 objdir=$lt_cv_objdir
7908
7909
7910
7911
7912
7913 case $host_os in
7914 aix3*)
7915   # AIX sometimes has problems with the GCC collect2 program.  For some
7916   # reason, if we set the COLLECT_NAMES environment variable, the problems
7917   # vanish in a puff of smoke.
7918   if test "X${COLLECT_NAMES+set}" != Xset; then
7919     COLLECT_NAMES=
7920     export COLLECT_NAMES
7921   fi
7922   ;;
7923 esac
7924
7925 # Sed substitution that helps us do robust quoting.  It backslashifies
7926 # metacharacters that are still active within double-quoted strings.
7927 Xsed='sed -e 1s/^X//'
7928 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
7929
7930 # Same as above, but do not quote variable references.
7931 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
7932
7933 # Sed substitution to delay expansion of an escaped shell variable in a
7934 # double_quote_subst'ed string.
7935 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7936
7937 # Sed substitution to avoid accidental globbing in evaled expressions
7938 no_glob_subst='s/\*/\\\*/g'
7939
7940 # Constants:
7941 rm="rm -f"
7942
7943 # Global variables:
7944 default_ofile=libtool
7945 can_build_shared=yes
7946
7947 # All known linkers require a `.a' archive for static linking (except MSVC,
7948 # which needs '.lib').
7949 libext=a
7950 ltmain="$ac_aux_dir/ltmain.sh"
7951 ofile="$default_ofile"
7952 with_gnu_ld="$lt_cv_prog_gnu_ld"
7953
7954 if test -n "$ac_tool_prefix"; then
7955   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7956 set dummy ${ac_tool_prefix}ar; ac_word=$2
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7958 $as_echo_n "checking for $ac_word... " >&6; }
7959 if test "${ac_cv_prog_AR+set}" = set; then :
7960   $as_echo_n "(cached) " >&6
7961 else
7962   if test -n "$AR"; then
7963   ac_cv_prog_AR="$AR" # Let the user override the test.
7964 else
7965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7966 for as_dir in $PATH
7967 do
7968   IFS=$as_save_IFS
7969   test -z "$as_dir" && as_dir=.
7970     for ac_exec_ext in '' $ac_executable_extensions; do
7971   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7972     ac_cv_prog_AR="${ac_tool_prefix}ar"
7973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7974     break 2
7975   fi
7976 done
7977   done
7978 IFS=$as_save_IFS
7979
7980 fi
7981 fi
7982 AR=$ac_cv_prog_AR
7983 if test -n "$AR"; then
7984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7985 $as_echo "$AR" >&6; }
7986 else
7987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7988 $as_echo "no" >&6; }
7989 fi
7990
7991
7992 fi
7993 if test -z "$ac_cv_prog_AR"; then
7994   ac_ct_AR=$AR
7995   # Extract the first word of "ar", so it can be a program name with args.
7996 set dummy ar; ac_word=$2
7997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7998 $as_echo_n "checking for $ac_word... " >&6; }
7999 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8000   $as_echo_n "(cached) " >&6
8001 else
8002   if test -n "$ac_ct_AR"; then
8003   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8004 else
8005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8006 for as_dir in $PATH
8007 do
8008   IFS=$as_save_IFS
8009   test -z "$as_dir" && as_dir=.
8010     for ac_exec_ext in '' $ac_executable_extensions; do
8011   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8012     ac_cv_prog_ac_ct_AR="ar"
8013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8014     break 2
8015   fi
8016 done
8017   done
8018 IFS=$as_save_IFS
8019
8020 fi
8021 fi
8022 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8023 if test -n "$ac_ct_AR"; then
8024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8025 $as_echo "$ac_ct_AR" >&6; }
8026 else
8027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8028 $as_echo "no" >&6; }
8029 fi
8030
8031   if test "x$ac_ct_AR" = x; then
8032     AR="false"
8033   else
8034     case $cross_compiling:$ac_tool_warned in
8035 yes:)
8036 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8037 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8038 ac_tool_warned=yes ;;
8039 esac
8040     AR=$ac_ct_AR
8041   fi
8042 else
8043   AR="$ac_cv_prog_AR"
8044 fi
8045
8046 if test -n "$ac_tool_prefix"; then
8047   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8048 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8050 $as_echo_n "checking for $ac_word... " >&6; }
8051 if test "${ac_cv_prog_RANLIB+set}" = set; then :
8052   $as_echo_n "(cached) " >&6
8053 else
8054   if test -n "$RANLIB"; then
8055   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8056 else
8057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8058 for as_dir in $PATH
8059 do
8060   IFS=$as_save_IFS
8061   test -z "$as_dir" && as_dir=.
8062     for ac_exec_ext in '' $ac_executable_extensions; do
8063   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8064     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8065     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8066     break 2
8067   fi
8068 done
8069   done
8070 IFS=$as_save_IFS
8071
8072 fi
8073 fi
8074 RANLIB=$ac_cv_prog_RANLIB
8075 if test -n "$RANLIB"; then
8076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8077 $as_echo "$RANLIB" >&6; }
8078 else
8079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8080 $as_echo "no" >&6; }
8081 fi
8082
8083
8084 fi
8085 if test -z "$ac_cv_prog_RANLIB"; then
8086   ac_ct_RANLIB=$RANLIB
8087   # Extract the first word of "ranlib", so it can be a program name with args.
8088 set dummy ranlib; ac_word=$2
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8090 $as_echo_n "checking for $ac_word... " >&6; }
8091 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8092   $as_echo_n "(cached) " >&6
8093 else
8094   if test -n "$ac_ct_RANLIB"; then
8095   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8096 else
8097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8098 for as_dir in $PATH
8099 do
8100   IFS=$as_save_IFS
8101   test -z "$as_dir" && as_dir=.
8102     for ac_exec_ext in '' $ac_executable_extensions; do
8103   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8104     ac_cv_prog_ac_ct_RANLIB="ranlib"
8105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8106     break 2
8107   fi
8108 done
8109   done
8110 IFS=$as_save_IFS
8111
8112 fi
8113 fi
8114 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8115 if test -n "$ac_ct_RANLIB"; then
8116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8117 $as_echo "$ac_ct_RANLIB" >&6; }
8118 else
8119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8120 $as_echo "no" >&6; }
8121 fi
8122
8123   if test "x$ac_ct_RANLIB" = x; then
8124     RANLIB=":"
8125   else
8126     case $cross_compiling:$ac_tool_warned in
8127 yes:)
8128 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8129 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8130 ac_tool_warned=yes ;;
8131 esac
8132     RANLIB=$ac_ct_RANLIB
8133   fi
8134 else
8135   RANLIB="$ac_cv_prog_RANLIB"
8136 fi
8137
8138 if test -n "$ac_tool_prefix"; then
8139   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8140 set dummy ${ac_tool_prefix}strip; ac_word=$2
8141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8142 $as_echo_n "checking for $ac_word... " >&6; }
8143 if test "${ac_cv_prog_STRIP+set}" = set; then :
8144   $as_echo_n "(cached) " >&6
8145 else
8146   if test -n "$STRIP"; then
8147   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8148 else
8149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8150 for as_dir in $PATH
8151 do
8152   IFS=$as_save_IFS
8153   test -z "$as_dir" && as_dir=.
8154     for ac_exec_ext in '' $ac_executable_extensions; do
8155   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8156     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8157     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8158     break 2
8159   fi
8160 done
8161   done
8162 IFS=$as_save_IFS
8163
8164 fi
8165 fi
8166 STRIP=$ac_cv_prog_STRIP
8167 if test -n "$STRIP"; then
8168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8169 $as_echo "$STRIP" >&6; }
8170 else
8171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8172 $as_echo "no" >&6; }
8173 fi
8174
8175
8176 fi
8177 if test -z "$ac_cv_prog_STRIP"; then
8178   ac_ct_STRIP=$STRIP
8179   # Extract the first word of "strip", so it can be a program name with args.
8180 set dummy strip; ac_word=$2
8181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8182 $as_echo_n "checking for $ac_word... " >&6; }
8183 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
8184   $as_echo_n "(cached) " >&6
8185 else
8186   if test -n "$ac_ct_STRIP"; then
8187   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8188 else
8189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8190 for as_dir in $PATH
8191 do
8192   IFS=$as_save_IFS
8193   test -z "$as_dir" && as_dir=.
8194     for ac_exec_ext in '' $ac_executable_extensions; do
8195   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8196     ac_cv_prog_ac_ct_STRIP="strip"
8197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8198     break 2
8199   fi
8200 done
8201   done
8202 IFS=$as_save_IFS
8203
8204 fi
8205 fi
8206 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8207 if test -n "$ac_ct_STRIP"; then
8208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8209 $as_echo "$ac_ct_STRIP" >&6; }
8210 else
8211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8212 $as_echo "no" >&6; }
8213 fi
8214
8215   if test "x$ac_ct_STRIP" = x; then
8216     STRIP=":"
8217   else
8218     case $cross_compiling:$ac_tool_warned in
8219 yes:)
8220 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8221 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8222 ac_tool_warned=yes ;;
8223 esac
8224     STRIP=$ac_ct_STRIP
8225   fi
8226 else
8227   STRIP="$ac_cv_prog_STRIP"
8228 fi
8229
8230
8231 old_CC="$CC"
8232 old_CFLAGS="$CFLAGS"
8233
8234 # Set sane defaults for various variables
8235 test -z "$AR" && AR=ar
8236 test -z "$AR_FLAGS" && AR_FLAGS=cru
8237 test -z "$AS" && AS=as
8238 test -z "$CC" && CC=cc
8239 test -z "$LTCC" && LTCC=$CC
8240 test -z "$DLLTOOL" && DLLTOOL=dlltool
8241 test -z "$LD" && LD=ld
8242 test -z "$LN_S" && LN_S="ln -s"
8243 test -z "$MAGIC_CMD" && MAGIC_CMD=file
8244 test -z "$NM" && NM=nm
8245 test -z "$SED" && SED=sed
8246 test -z "$OBJDUMP" && OBJDUMP=objdump
8247 test -z "$RANLIB" && RANLIB=:
8248 test -z "$STRIP" && STRIP=:
8249 test -z "$ac_objext" && ac_objext=o
8250
8251 # Determine commands to create old-style static archives.
8252 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
8253 old_postinstall_cmds='chmod 644 $oldlib'
8254 old_postuninstall_cmds=
8255
8256 if test -n "$RANLIB"; then
8257   case $host_os in
8258   openbsd*)
8259     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
8260     ;;
8261   *)
8262     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
8263     ;;
8264   esac
8265   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
8266 fi
8267
8268 for cc_temp in $compiler""; do
8269   case $cc_temp in
8270     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8271     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8272     \-*) ;;
8273     *) break;;
8274   esac
8275 done
8276 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8277
8278
8279 # Only perform the check for file, if the check method requires it
8280 case $deplibs_check_method in
8281 file_magic*)
8282   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8283     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
8284 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8285 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8286   $as_echo_n "(cached) " >&6
8287 else
8288   case $MAGIC_CMD in
8289 [\\/*] |  ?:[\\/]*)
8290   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8291   ;;
8292 *)
8293   lt_save_MAGIC_CMD="$MAGIC_CMD"
8294   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8295   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8296   for ac_dir in $ac_dummy; do
8297     IFS="$lt_save_ifs"
8298     test -z "$ac_dir" && ac_dir=.
8299     if test -f $ac_dir/${ac_tool_prefix}file; then
8300       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8301       if test -n "$file_magic_test_file"; then
8302         case $deplibs_check_method in
8303         "file_magic "*)
8304           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8305           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8306           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8307             $EGREP "$file_magic_regex" > /dev/null; then
8308             :
8309           else
8310             cat <<EOF 1>&2
8311
8312 *** Warning: the command libtool uses to detect shared libraries,
8313 *** $file_magic_cmd, produces output that libtool cannot recognize.
8314 *** The result is that libtool may fail to recognize shared libraries
8315 *** as such.  This will affect the creation of libtool libraries that
8316 *** depend on shared libraries, but programs linked with such libtool
8317 *** libraries will work regardless of this problem.  Nevertheless, you
8318 *** may want to report the problem to your system manager and/or to
8319 *** bug-libtool@gnu.org
8320
8321 EOF
8322           fi ;;
8323         esac
8324       fi
8325       break
8326     fi
8327   done
8328   IFS="$lt_save_ifs"
8329   MAGIC_CMD="$lt_save_MAGIC_CMD"
8330   ;;
8331 esac
8332 fi
8333
8334 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8335 if test -n "$MAGIC_CMD"; then
8336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8337 $as_echo "$MAGIC_CMD" >&6; }
8338 else
8339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8340 $as_echo "no" >&6; }
8341 fi
8342
8343 if test -z "$lt_cv_path_MAGIC_CMD"; then
8344   if test -n "$ac_tool_prefix"; then
8345     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
8346 $as_echo_n "checking for file... " >&6; }
8347 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8348   $as_echo_n "(cached) " >&6
8349 else
8350   case $MAGIC_CMD in
8351 [\\/*] |  ?:[\\/]*)
8352   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8353   ;;
8354 *)
8355   lt_save_MAGIC_CMD="$MAGIC_CMD"
8356   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8357   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8358   for ac_dir in $ac_dummy; do
8359     IFS="$lt_save_ifs"
8360     test -z "$ac_dir" && ac_dir=.
8361     if test -f $ac_dir/file; then
8362       lt_cv_path_MAGIC_CMD="$ac_dir/file"
8363       if test -n "$file_magic_test_file"; then
8364         case $deplibs_check_method in
8365         "file_magic "*)
8366           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8367           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8368           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8369             $EGREP "$file_magic_regex" > /dev/null; then
8370             :
8371           else
8372             cat <<EOF 1>&2
8373
8374 *** Warning: the command libtool uses to detect shared libraries,
8375 *** $file_magic_cmd, produces output that libtool cannot recognize.
8376 *** The result is that libtool may fail to recognize shared libraries
8377 *** as such.  This will affect the creation of libtool libraries that
8378 *** depend on shared libraries, but programs linked with such libtool
8379 *** libraries will work regardless of this problem.  Nevertheless, you
8380 *** may want to report the problem to your system manager and/or to
8381 *** bug-libtool@gnu.org
8382
8383 EOF
8384           fi ;;
8385         esac
8386       fi
8387       break
8388     fi
8389   done
8390   IFS="$lt_save_ifs"
8391   MAGIC_CMD="$lt_save_MAGIC_CMD"
8392   ;;
8393 esac
8394 fi
8395
8396 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8397 if test -n "$MAGIC_CMD"; then
8398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8399 $as_echo "$MAGIC_CMD" >&6; }
8400 else
8401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8402 $as_echo "no" >&6; }
8403 fi
8404
8405   else
8406     MAGIC_CMD=:
8407   fi
8408 fi
8409
8410   fi
8411   ;;
8412 esac
8413
8414 enable_dlopen=yes
8415 enable_win32_dll=yes
8416
8417 # Check whether --enable-libtool-lock was given.
8418 if test "${enable_libtool_lock+set}" = set; then :
8419   enableval=$enable_libtool_lock;
8420 fi
8421
8422 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
8423
8424
8425 # Check whether --with-pic was given.
8426 if test "${with_pic+set}" = set; then :
8427   withval=$with_pic; pic_mode="$withval"
8428 else
8429   pic_mode=default
8430 fi
8431
8432 test -z "$pic_mode" && pic_mode=default
8433
8434 # Use C for the default configuration in the libtool script
8435 tagname=
8436 lt_save_CC="$CC"
8437 ac_ext=c
8438 ac_cpp='$CPP $CPPFLAGS'
8439 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8440 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8441 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8442
8443
8444 # Source file extension for C test sources.
8445 ac_ext=c
8446
8447 # Object file extension for compiled C test sources.
8448 objext=o
8449 objext=$objext
8450
8451 # Code to be used in simple compile tests
8452 lt_simple_compile_test_code="int some_variable = 0;\n"
8453
8454 # Code to be used in simple link tests
8455 lt_simple_link_test_code='int main(){return(0);}\n'
8456
8457
8458 # If no C compiler was specified, use CC.
8459 LTCC=${LTCC-"$CC"}
8460
8461 # Allow CC to be a program name with arguments.
8462 compiler=$CC
8463
8464
8465 # save warnings/boilerplate of simple test code
8466 ac_outfile=conftest.$ac_objext
8467 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
8468 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8469 _lt_compiler_boilerplate=`cat conftest.err`
8470 $rm conftest*
8471
8472 ac_outfile=conftest.$ac_objext
8473 printf "$lt_simple_link_test_code" >conftest.$ac_ext
8474 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8475 _lt_linker_boilerplate=`cat conftest.err`
8476 $rm conftest*
8477
8478
8479 #
8480 # Check for any special shared library compilation flags.
8481 #
8482 lt_prog_cc_shlib=
8483 if test "$GCC" = no; then
8484   case $host_os in
8485   sco3.2v5*)
8486     lt_prog_cc_shlib='-belf'
8487     ;;
8488   esac
8489 fi
8490 if test -n "$lt_prog_cc_shlib"; then
8491   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
8492 $as_echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
8493   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
8494   else
8495     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
8496 $as_echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
8497     lt_cv_prog_cc_can_build_shared=no
8498   fi
8499 fi
8500
8501
8502 #
8503 # Check to make sure the static flag actually works.
8504 #
8505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_prog_compiler_static works" >&5
8506 $as_echo_n "checking if $compiler static flag $lt_prog_compiler_static works... " >&6; }
8507 if test "${lt_prog_compiler_static_works+set}" = set; then :
8508   $as_echo_n "(cached) " >&6
8509 else
8510   lt_prog_compiler_static_works=no
8511    save_LDFLAGS="$LDFLAGS"
8512    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
8513    printf "$lt_simple_link_test_code" > conftest.$ac_ext
8514    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8515      # The linker can only warn and ignore the option if not recognized
8516      # So say no if there are warnings
8517      if test -s conftest.err; then
8518        # Append any errors to the config.log.
8519        cat conftest.err 1>&5
8520        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
8521        $SED '/^$/d' conftest.err >conftest.er2
8522        if diff conftest.exp conftest.er2 >/dev/null; then
8523          lt_prog_compiler_static_works=yes
8524        fi
8525      else
8526        lt_prog_compiler_static_works=yes
8527      fi
8528    fi
8529    $rm conftest*
8530    LDFLAGS="$save_LDFLAGS"
8531
8532 fi
8533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_static_works" >&5
8534 $as_echo "$lt_prog_compiler_static_works" >&6; }
8535
8536 if test x"$lt_prog_compiler_static_works" = xyes; then
8537     :
8538 else
8539     lt_prog_compiler_static=
8540 fi
8541
8542
8543
8544
8545 lt_prog_compiler_no_builtin_flag=
8546
8547 if test "$GCC" = yes; then
8548   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
8549
8550
8551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
8552 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
8553 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
8554   $as_echo_n "(cached) " >&6
8555 else
8556   lt_cv_prog_compiler_rtti_exceptions=no
8557   ac_outfile=conftest.$ac_objext
8558    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8559    lt_compiler_flag="-fno-rtti -fno-exceptions"
8560    # Insert the option either (1) after the last *FLAGS variable, or
8561    # (2) before a word containing "conftest.", or (3) at the end.
8562    # Note that $ac_compile itself does not contain backslashes and begins
8563    # with a dollar sign (not a hyphen), so the echo should work correctly.
8564    # The option is referenced via a variable to avoid confusing sed.
8565    lt_compile=`echo "$ac_compile" | $SED \
8566    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8567    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8568    -e 's:$: $lt_compiler_flag:'`
8569    (eval echo "\"\$as_me:8569: $lt_compile\"" >&5)
8570    (eval "$lt_compile" 2>conftest.err)
8571    ac_status=$?
8572    cat conftest.err >&5
8573    echo "$as_me:8573: \$? = $ac_status" >&5
8574    if (exit $ac_status) && test -s "$ac_outfile"; then
8575      # The compiler can only warn and ignore the option if not recognized
8576      # So say no if there are warnings other than the usual output.
8577      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8578      $SED '/^$/d' conftest.err >conftest.er2
8579      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8580        lt_cv_prog_compiler_rtti_exceptions=yes
8581      fi
8582    fi
8583    $rm conftest*
8584
8585 fi
8586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
8587 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
8588
8589 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
8590     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
8591 else
8592     :
8593 fi
8594
8595 fi
8596
8597 lt_prog_compiler_wl=
8598 lt_prog_compiler_pic=
8599 lt_prog_compiler_static=
8600
8601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8602 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8603
8604   if test "$GCC" = yes; then
8605     lt_prog_compiler_wl='-Wl,'
8606     lt_prog_compiler_static='-static'
8607
8608     case $host_os in
8609       aix*)
8610       # All AIX code is PIC.
8611       if test "$host_cpu" = ia64; then
8612         # AIX 5 now supports IA64 processor
8613         lt_prog_compiler_static='-Bstatic'
8614       fi
8615       ;;
8616
8617     amigaos*)
8618       # FIXME: we need at least 68020 code to build shared libraries, but
8619       # adding the `-m68020' flag to GCC prevents building anything better,
8620       # like `-m68040'.
8621       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
8622       ;;
8623
8624     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8625       # PIC is the default for these OSes.
8626       ;;
8627
8628     mingw* | pw32* | os2*)
8629       # This hack is so that the source file can tell whether it is being
8630       # built for inclusion in a dll (and should export symbols for example).
8631       lt_prog_compiler_pic='-DDLL_EXPORT'
8632       ;;
8633
8634     darwin* | rhapsody*)
8635       # PIC is the default on this platform
8636       # Common symbols not allowed in MH_DYLIB files
8637       lt_prog_compiler_pic='-fno-common'
8638       ;;
8639
8640     msdosdjgpp*)
8641       # Just because we use GCC doesn't mean we suddenly get shared libraries
8642       # on systems that don't support them.
8643       lt_prog_compiler_can_build_shared=no
8644       enable_shared=no
8645       ;;
8646
8647     sysv4*MP*)
8648       if test -d /usr/nec; then
8649         lt_prog_compiler_pic=-Kconform_pic
8650       fi
8651       ;;
8652
8653     hpux*)
8654       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8655       # not for PA HP-UX.
8656       case $host_cpu in
8657       hppa*64*|ia64*)
8658         # +Z the default
8659         ;;
8660       *)
8661         lt_prog_compiler_pic='-fPIC'
8662         ;;
8663       esac
8664       ;;
8665
8666     *)
8667       lt_prog_compiler_pic='-fPIC'
8668       ;;
8669     esac
8670   else
8671     # PORTME Check for flag to pass linker flags through the system compiler.
8672     case $host_os in
8673     aix*)
8674       lt_prog_compiler_wl='-Wl,'
8675       if test "$host_cpu" = ia64; then
8676         # AIX 5 now supports IA64 processor
8677         lt_prog_compiler_static='-Bstatic'
8678       else
8679         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
8680       fi
8681       ;;
8682       darwin*)
8683         # PIC is the default on this platform
8684         # Common symbols not allowed in MH_DYLIB files
8685        case $cc_basename in
8686          xlc*)
8687          lt_prog_compiler_pic='-qnocommon'
8688          lt_prog_compiler_wl='-Wl,'
8689          ;;
8690        esac
8691        ;;
8692
8693     mingw* | pw32* | os2*)
8694       # This hack is so that the source file can tell whether it is being
8695       # built for inclusion in a dll (and should export symbols for example).
8696       lt_prog_compiler_pic='-DDLL_EXPORT'
8697       ;;
8698
8699     hpux9* | hpux10* | hpux11*)
8700       lt_prog_compiler_wl='-Wl,'
8701       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8702       # not for PA HP-UX.
8703       case $host_cpu in
8704       hppa*64*|ia64*)
8705         # +Z the default
8706         ;;
8707       *)
8708         lt_prog_compiler_pic='+Z'
8709         ;;
8710       esac
8711       # Is there a better lt_prog_compiler_static that works with the bundled CC?
8712       lt_prog_compiler_static='${wl}-a ${wl}archive'
8713       ;;
8714
8715     irix5* | irix6* | nonstopux*)
8716       lt_prog_compiler_wl='-Wl,'
8717       # PIC (with -KPIC) is the default.
8718       lt_prog_compiler_static='-non_shared'
8719       ;;
8720
8721     newsos6)
8722       lt_prog_compiler_pic='-KPIC'
8723       lt_prog_compiler_static='-Bstatic'
8724       ;;
8725
8726     linux*)
8727       case $cc_basename in
8728       icc* | ecc*)
8729         lt_prog_compiler_wl='-Wl,'
8730         lt_prog_compiler_pic='-KPIC'
8731         lt_prog_compiler_static='-static'
8732         ;;
8733       pgcc* | pgf77* | pgf90* | pgf95*)
8734         # Portland Group compilers (*not* the Pentium gcc compiler,
8735         # which looks to be a dead project)
8736         lt_prog_compiler_wl='-Wl,'
8737         lt_prog_compiler_pic='-fpic'
8738         lt_prog_compiler_static='-Bstatic'
8739         ;;
8740       ccc*)
8741         lt_prog_compiler_wl='-Wl,'
8742         # All Alpha code is PIC.
8743         lt_prog_compiler_static='-non_shared'
8744         ;;
8745       esac
8746       ;;
8747
8748     osf3* | osf4* | osf5*)
8749       lt_prog_compiler_wl='-Wl,'
8750       # All OSF/1 code is PIC.
8751       lt_prog_compiler_static='-non_shared'
8752       ;;
8753
8754     sco3.2v5*)
8755       lt_prog_compiler_pic='-Kpic'
8756       lt_prog_compiler_static='-dn'
8757       ;;
8758
8759     solaris*)
8760       lt_prog_compiler_pic='-KPIC'
8761       lt_prog_compiler_static='-Bstatic'
8762       case $cc_basename in
8763       f77* | f90* | f95*)
8764         lt_prog_compiler_wl='-Qoption ld ';;
8765       *)
8766         lt_prog_compiler_wl='-Wl,';;
8767       esac
8768       ;;
8769
8770     sunos4*)
8771       lt_prog_compiler_wl='-Qoption ld '
8772       lt_prog_compiler_pic='-PIC'
8773       lt_prog_compiler_static='-Bstatic'
8774       ;;
8775
8776     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8777       lt_prog_compiler_wl='-Wl,'
8778       lt_prog_compiler_pic='-KPIC'
8779       lt_prog_compiler_static='-Bstatic'
8780       ;;
8781
8782     sysv4*MP*)
8783       if test -d /usr/nec ;then
8784         lt_prog_compiler_pic='-Kconform_pic'
8785         lt_prog_compiler_static='-Bstatic'
8786       fi
8787       ;;
8788
8789     unicos*)
8790       lt_prog_compiler_wl='-Wl,'
8791       lt_prog_compiler_can_build_shared=no
8792       ;;
8793
8794     uts4*)
8795       lt_prog_compiler_pic='-pic'
8796       lt_prog_compiler_static='-Bstatic'
8797       ;;
8798
8799     *)
8800       lt_prog_compiler_can_build_shared=no
8801       ;;
8802     esac
8803   fi
8804
8805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
8806 $as_echo "$lt_prog_compiler_pic" >&6; }
8807
8808 #
8809 # Check to make sure the PIC flag actually works.
8810 #
8811 if test -n "$lt_prog_compiler_pic"; then
8812
8813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8814 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
8815 if test "${lt_prog_compiler_pic_works+set}" = set; then :
8816   $as_echo_n "(cached) " >&6
8817 else
8818   lt_prog_compiler_pic_works=no
8819   ac_outfile=conftest.$ac_objext
8820    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8821    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8822    # Insert the option either (1) after the last *FLAGS variable, or
8823    # (2) before a word containing "conftest.", or (3) at the end.
8824    # Note that $ac_compile itself does not contain backslashes and begins
8825    # with a dollar sign (not a hyphen), so the echo should work correctly.
8826    # The option is referenced via a variable to avoid confusing sed.
8827    lt_compile=`echo "$ac_compile" | $SED \
8828    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8829    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8830    -e 's:$: $lt_compiler_flag:'`
8831    (eval echo "\"\$as_me:8831: $lt_compile\"" >&5)
8832    (eval "$lt_compile" 2>conftest.err)
8833    ac_status=$?
8834    cat conftest.err >&5
8835    echo "$as_me:8835: \$? = $ac_status" >&5
8836    if (exit $ac_status) && test -s "$ac_outfile"; then
8837      # The compiler can only warn and ignore the option if not recognized
8838      # So say no if there are warnings other than the usual output.
8839      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8840      $SED '/^$/d' conftest.err >conftest.er2
8841      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8842        lt_prog_compiler_pic_works=yes
8843      fi
8844    fi
8845    $rm conftest*
8846
8847 fi
8848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_works" >&5
8849 $as_echo "$lt_prog_compiler_pic_works" >&6; }
8850
8851 if test x"$lt_prog_compiler_pic_works" = xyes; then
8852     case $lt_prog_compiler_pic in
8853      "" | " "*) ;;
8854      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8855      esac
8856 else
8857     lt_prog_compiler_pic=
8858      lt_prog_compiler_can_build_shared=no
8859 fi
8860
8861 fi
8862 case $host_os in
8863   # For platforms which do not support PIC, -DPIC is meaningless:
8864   *djgpp*)
8865     lt_prog_compiler_pic=
8866     ;;
8867   *)
8868     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8869     ;;
8870 esac
8871
8872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8873 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8874 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8875   $as_echo_n "(cached) " >&6
8876 else
8877   lt_cv_prog_compiler_c_o=no
8878    $rm -r conftest 2>/dev/null
8879    mkdir conftest
8880    cd conftest
8881    mkdir out
8882    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8883
8884    lt_compiler_flag="-o out/conftest2.$ac_objext"
8885    # Insert the option either (1) after the last *FLAGS variable, or
8886    # (2) before a word containing "conftest.", or (3) at the end.
8887    # Note that $ac_compile itself does not contain backslashes and begins
8888    # with a dollar sign (not a hyphen), so the echo should work correctly.
8889    lt_compile=`echo "$ac_compile" | $SED \
8890    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8891    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8892    -e 's:$: $lt_compiler_flag:'`
8893    (eval echo "\"\$as_me:8893: $lt_compile\"" >&5)
8894    (eval "$lt_compile" 2>out/conftest.err)
8895    ac_status=$?
8896    cat out/conftest.err >&5
8897    echo "$as_me:8897: \$? = $ac_status" >&5
8898    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8899    then
8900      # The compiler can only warn and ignore the option if not recognized
8901      # So say no if there are warnings
8902      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
8903      $SED '/^$/d' out/conftest.err >out/conftest.er2
8904      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8905        lt_cv_prog_compiler_c_o=yes
8906      fi
8907    fi
8908    chmod u+w . 2>&5
8909    $rm conftest*
8910    # SGI C++ compiler will create directory out/ii_files/ for
8911    # template instantiation
8912    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
8913    $rm out/* && rmdir out
8914    cd ..
8915    rmdir conftest
8916    $rm conftest*
8917
8918 fi
8919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8920 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8921
8922
8923 hard_links="nottested"
8924 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8925   # do not overwrite the value of need_locks provided by the user
8926   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
8927 $as_echo_n "checking if we can lock with hard links... " >&6; }
8928   hard_links=yes
8929   $rm conftest*
8930   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8931   touch conftest.a
8932   ln conftest.a conftest.b 2>&5 || hard_links=no
8933   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
8935 $as_echo "$hard_links" >&6; }
8936   if test "$hard_links" = no; then
8937     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8938 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8939     need_locks=warn
8940   fi
8941 else
8942   need_locks=no
8943 fi
8944
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8946 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
8947
8948   runpath_var=
8949   allow_undefined_flag=
8950   enable_shared_with_static_runtimes=no
8951   archive_cmds=
8952   archive_expsym_cmds=
8953   old_archive_From_new_cmds=
8954   old_archive_from_expsyms_cmds=
8955   export_dynamic_flag_spec=
8956   whole_archive_flag_spec=
8957   thread_safe_flag_spec=
8958   hardcode_libdir_flag_spec=
8959   hardcode_libdir_flag_spec_ld=
8960   hardcode_libdir_separator=
8961   hardcode_direct=no
8962   hardcode_minus_L=no
8963   hardcode_shlibpath_var=unsupported
8964   link_all_deplibs=unknown
8965   hardcode_automatic=no
8966   module_cmds=
8967   module_expsym_cmds=
8968   always_export_symbols=no
8969   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8970   # include_expsyms should be a list of space-separated symbols to be *always*
8971   # included in the symbol list
8972   include_expsyms=
8973   # exclude_expsyms can be an extended regexp of symbols to exclude
8974   # it will be wrapped by ` (' and `)$', so one must not match beginning or
8975   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8976   # as well as any symbol that contains `d'.
8977   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
8978   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8979   # platforms (ab)use it in PIC code, but their linkers get confused if
8980   # the symbol is explicitly referenced.  Since portable code cannot
8981   # rely on this symbol name, it's probably fine to never include it in
8982   # preloaded symbol tables.
8983   extract_expsyms_cmds=
8984   # Just being paranoid about ensuring that cc_basename is set.
8985   for cc_temp in $compiler""; do
8986   case $cc_temp in
8987     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8988     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8989     \-*) ;;
8990     *) break;;
8991   esac
8992 done
8993 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8994
8995   case $host_os in
8996   cygwin* | mingw* | pw32*)
8997     # FIXME: the MSVC++ port hasn't been tested in a loooong time
8998     # When not using gcc, we currently assume that we are using
8999     # Microsoft Visual C++.
9000     if test "$GCC" != yes; then
9001       with_gnu_ld=no
9002     fi
9003     ;;
9004   openbsd*)
9005     with_gnu_ld=no
9006     ;;
9007   esac
9008
9009   ld_shlibs=yes
9010   if test "$with_gnu_ld" = yes; then
9011     # If archive_cmds runs LD, not CC, wlarc should be empty
9012     wlarc='${wl}'
9013
9014     # Set some defaults for GNU ld with shared library support. These
9015     # are reset later if shared libraries are not supported. Putting them
9016     # here allows them to be overridden if necessary.
9017     runpath_var=LD_RUN_PATH
9018     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
9019     export_dynamic_flag_spec='${wl}--export-dynamic'
9020     # ancient GNU ld didn't support --whole-archive et. al.
9021     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
9022         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9023       else
9024         whole_archive_flag_spec=
9025     fi
9026     supports_anon_versioning=no
9027     case `$LD -v 2>/dev/null` in
9028       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9029       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9030       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9031       *\ 2.11.*) ;; # other 2.11 versions
9032       *) supports_anon_versioning=yes ;;
9033     esac
9034
9035     # See if GNU ld supports shared libraries.
9036     case $host_os in
9037     aix3* | aix4* | aix5*)
9038       # On AIX/PPC, the GNU linker is very broken
9039       if test "$host_cpu" != ia64; then
9040         ld_shlibs=no
9041         cat <<EOF 1>&2
9042
9043 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
9044 *** to be unable to reliably create shared libraries on AIX.
9045 *** Therefore, libtool is disabling shared libraries support.  If you
9046 *** really care for shared libraries, you may want to modify your PATH
9047 *** so that a non-GNU linker is found, and then restart.
9048
9049 EOF
9050       fi
9051       ;;
9052
9053     amigaos*)
9054       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)'
9055       hardcode_libdir_flag_spec='-L$libdir'
9056       hardcode_minus_L=yes
9057
9058       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9059       # that the semantics of dynamic libraries on AmigaOS, at least up
9060       # to version 4, is to share data among multiple programs linked
9061       # with the same dynamic library.  Since this doesn't match the
9062       # behavior of shared libraries on other platforms, we can't use
9063       # them.
9064       ld_shlibs=no
9065       ;;
9066
9067     beos*)
9068       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9069         allow_undefined_flag=unsupported
9070         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9071         # support --undefined.  This deserves some investigation.  FIXME
9072         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9073       else
9074         ld_shlibs=no
9075       fi
9076       ;;
9077
9078     cygwin* | mingw* | pw32*)
9079       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9080       # as there is no search path for DLLs.
9081       hardcode_libdir_flag_spec='-L$libdir'
9082       allow_undefined_flag=unsupported
9083       always_export_symbols=no
9084       enable_shared_with_static_runtimes=yes
9085       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
9086
9087       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
9088         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
9089         # If the export-symbols file already is a .def file (1st line
9090         # is EXPORTS), use it as is; otherwise, prepend...
9091         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9092           cp $export_symbols $output_objdir/$soname.def;
9093         else
9094           echo EXPORTS > $output_objdir/$soname.def;
9095           cat $export_symbols >> $output_objdir/$soname.def;
9096         fi~
9097         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
9098       else
9099         ld_shlibs=no
9100       fi
9101       ;;
9102
9103     linux*)
9104       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9105         tmp_addflag=
9106         case $cc_basename,$host_cpu in
9107         pgcc*)                          # Portland Group C compiler
9108           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'
9109           tmp_addflag=' $pic_flag'
9110           ;;
9111         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
9112           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'
9113           tmp_addflag=' $pic_flag -Mnomain' ;;
9114         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
9115           tmp_addflag=' -i_dynamic' ;;
9116         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
9117           tmp_addflag=' -i_dynamic -nofor_main' ;;
9118         ifc* | ifort*)                  # Intel Fortran compiler
9119           tmp_addflag=' -nofor_main' ;;
9120         esac
9121         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9122
9123         if test $supports_anon_versioning = yes; then
9124           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
9125   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9126   $echo "local: *; };" >> $output_objdir/$libname.ver~
9127           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9128         fi
9129       else
9130         ld_shlibs=no
9131       fi
9132       ;;
9133
9134     netbsd*)
9135       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9136         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9137         wlarc=
9138       else
9139         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9140         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9141       fi
9142       ;;
9143
9144     solaris* | sysv5*)
9145       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
9146         ld_shlibs=no
9147         cat <<EOF 1>&2
9148
9149 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
9150 *** create shared libraries on Solaris systems.  Therefore, libtool
9151 *** is disabling shared libraries support.  We urge you to upgrade GNU
9152 *** binutils to release 2.9.1 or newer.  Another option is to modify
9153 *** your PATH or compiler configuration so that the native linker is
9154 *** used, and then restart.
9155
9156 EOF
9157       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9158         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9159         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9160       else
9161         ld_shlibs=no
9162       fi
9163       ;;
9164
9165     sunos4*)
9166       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9167       wlarc=
9168       hardcode_direct=yes
9169       hardcode_shlibpath_var=no
9170       ;;
9171
9172     *)
9173       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9174         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9175         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9176       else
9177         ld_shlibs=no
9178       fi
9179       ;;
9180     esac
9181
9182     if test "$ld_shlibs" = no; then
9183       runpath_var=
9184       hardcode_libdir_flag_spec=
9185       export_dynamic_flag_spec=
9186       whole_archive_flag_spec=
9187     fi
9188   else
9189     # PORTME fill in a description of your system's linker (not GNU ld)
9190     case $host_os in
9191     aix3*)
9192       allow_undefined_flag=unsupported
9193       always_export_symbols=yes
9194       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'
9195       # Note: this linker hardcodes the directories in LIBPATH if there
9196       # are no directories specified by -L.
9197       hardcode_minus_L=yes
9198       if test "$GCC" = yes && test -z "$link_static_flag"; then
9199         # Neither direct hardcoding nor static linking is supported with a
9200         # broken collect2.
9201         hardcode_direct=unsupported
9202       fi
9203       ;;
9204
9205     aix4* | aix5*)
9206       if test "$host_cpu" = ia64; then
9207         # On IA64, the linker does run time linking by default, so we don't
9208         # have to do anything special.
9209         aix_use_runtimelinking=no
9210         exp_sym_flag='-Bexport'
9211         no_entry_flag=""
9212       else
9213         # If we're using GNU nm, then we don't want the "-C" option.
9214         # -C means demangle to AIX nm, but means don't demangle with GNU nm
9215         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
9216           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'
9217         else
9218           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'
9219         fi
9220         aix_use_runtimelinking=no
9221
9222         # Test if we are trying to use run time linking or normal
9223         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9224         # need to do runtime linking.
9225         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
9226           for ld_flag in $LDFLAGS; do
9227           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
9228             aix_use_runtimelinking=yes
9229             break
9230           fi
9231           done
9232         esac
9233
9234         exp_sym_flag='-bexport'
9235         no_entry_flag='-bnoentry'
9236       fi
9237
9238       # When large executables or shared objects are built, AIX ld can
9239       # have problems creating the table of contents.  If linking a library
9240       # or program results in "error TOC overflow" add -mminimal-toc to
9241       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9242       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9243
9244       archive_cmds=''
9245       hardcode_direct=yes
9246       hardcode_libdir_separator=':'
9247       link_all_deplibs=yes
9248
9249       if test "$GCC" = yes; then
9250         case $host_os in aix4.[012]|aix4.[012].*)
9251         # We only want to do this on AIX 4.2 and lower, the check
9252         # below for broken collect2 doesn't work under 4.3+
9253           collect2name=`${CC} -print-prog-name=collect2`
9254           if test -f "$collect2name" && \
9255            strings "$collect2name" | grep resolve_lib_name >/dev/null
9256           then
9257           # We have reworked collect2
9258           hardcode_direct=yes
9259           else
9260           # We have old collect2
9261           hardcode_direct=unsupported
9262           # It fails to find uninstalled libraries when the uninstalled
9263           # path is not listed in the libpath.  Setting hardcode_minus_L
9264           # to unsupported forces relinking
9265           hardcode_minus_L=yes
9266           hardcode_libdir_flag_spec='-L$libdir'
9267           hardcode_libdir_separator=
9268           fi
9269         esac
9270         shared_flag='-shared'
9271         if test "$aix_use_runtimelinking" = yes; then
9272           shared_flag="$shared_flag "'${wl}-G'
9273         fi
9274       else
9275         # not using gcc
9276         if test "$host_cpu" = ia64; then
9277         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9278         # chokes on -Wl,-G. The following line is correct:
9279           shared_flag='-G'
9280         else
9281         if test "$aix_use_runtimelinking" = yes; then
9282             shared_flag='${wl}-G'
9283           else
9284             shared_flag='${wl}-bM:SRE'
9285         fi
9286         fi
9287       fi
9288
9289       # It seems that -bexpall does not export symbols beginning with
9290       # underscore (_), so it is better to generate a list of symbols to export.
9291       always_export_symbols=yes
9292       if test "$aix_use_runtimelinking" = yes; then
9293         # Warning - without using the other runtime loading flags (-brtl),
9294         # -berok will link without error, but may produce a broken library.
9295         allow_undefined_flag='-berok'
9296        # Determine the default libpath from the value encoded in an empty executable.
9297        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9298 /* end confdefs.h.  */
9299
9300 int
9301 main ()
9302 {
9303
9304   ;
9305   return 0;
9306 }
9307 _ACEOF
9308 if ac_fn_c_try_link "$LINENO"; then :
9309
9310 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9311 }'`
9312 # Check for a 64-bit object if we didn't find anything.
9313 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; }
9314 }'`; fi
9315 fi
9316 rm -f core conftest.err conftest.$ac_objext \
9317     conftest$ac_exeext conftest.$ac_ext
9318 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9319
9320        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9321         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"
9322        else
9323         if test "$host_cpu" = ia64; then
9324           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
9325           allow_undefined_flag="-z nodefs"
9326           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"
9327         else
9328          # Determine the default libpath from the value encoded in an empty executable.
9329          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9330 /* end confdefs.h.  */
9331
9332 int
9333 main ()
9334 {
9335
9336   ;
9337   return 0;
9338 }
9339 _ACEOF
9340 if ac_fn_c_try_link "$LINENO"; then :
9341
9342 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9343 }'`
9344 # Check for a 64-bit object if we didn't find anything.
9345 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; }
9346 }'`; fi
9347 fi
9348 rm -f core conftest.err conftest.$ac_objext \
9349     conftest$ac_exeext conftest.$ac_ext
9350 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9351
9352          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9353           # Warning - without using the other run time loading flags,
9354           # -berok will link without error, but may produce a broken library.
9355           no_undefined_flag=' ${wl}-bernotok'
9356           allow_undefined_flag=' ${wl}-berok'
9357           # -bexpall does not export symbols beginning with underscore (_)
9358           always_export_symbols=yes
9359           # Exported symbols can be pulled into shared objects from archives
9360           whole_archive_flag_spec=' '
9361           archive_cmds_need_lc=yes
9362           # This is similar to how AIX traditionally builds its shared libraries.
9363           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'
9364         fi
9365       fi
9366       ;;
9367
9368     amigaos*)
9369       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)'
9370       hardcode_libdir_flag_spec='-L$libdir'
9371       hardcode_minus_L=yes
9372       # see comment about different semantics on the GNU ld section
9373       ld_shlibs=no
9374       ;;
9375
9376     bsdi[45]*)
9377       export_dynamic_flag_spec=-rdynamic
9378       ;;
9379
9380     cygwin* | mingw* | pw32*)
9381       # When not using gcc, we currently assume that we are using
9382       # Microsoft Visual C++.
9383       # hardcode_libdir_flag_spec is actually meaningless, as there is
9384       # no search path for DLLs.
9385       hardcode_libdir_flag_spec=' '
9386       allow_undefined_flag=unsupported
9387       # Tell ltmain to make .lib files, not .a files.
9388       libext=lib
9389       # Tell ltmain to make .dll files, not .so files.
9390       shrext_cmds=".dll"
9391       # FIXME: Setting linknames here is a bad hack.
9392       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
9393       # The linker will automatically build a .lib file if we build a DLL.
9394       old_archive_From_new_cmds='true'
9395       # FIXME: Should let the user specify the lib program.
9396       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
9397       fix_srcfile_path='`cygpath -w "$srcfile"`'
9398       enable_shared_with_static_runtimes=yes
9399       ;;
9400
9401     darwin* | rhapsody*)
9402       case $host_os in
9403         rhapsody* | darwin1.[012])
9404          allow_undefined_flag='${wl}-undefined ${wl}suppress'
9405          ;;
9406        *) # Darwin 1.3 on
9407          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
9408            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9409          else
9410            case ${MACOSX_DEPLOYMENT_TARGET} in
9411              10.[012])
9412                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9413                ;;
9414              10.*)
9415                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
9416                ;;
9417            esac
9418          fi
9419          ;;
9420       esac
9421       archive_cmds_need_lc=no
9422       hardcode_direct=no
9423       hardcode_automatic=yes
9424       hardcode_shlibpath_var=unsupported
9425       whole_archive_flag_spec=''
9426       link_all_deplibs=yes
9427     if test "$GCC" = yes ; then
9428         output_verbose_link_cmd='echo'
9429         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
9430       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9431       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9432       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}'
9433       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}'
9434     else
9435       case $cc_basename in
9436         xlc*)
9437          output_verbose_link_cmd='echo'
9438          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
9439          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9440           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9441          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}'
9442           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}'
9443           ;;
9444        *)
9445          ld_shlibs=no
9446           ;;
9447       esac
9448     fi
9449       ;;
9450
9451     dgux*)
9452       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9453       hardcode_libdir_flag_spec='-L$libdir'
9454       hardcode_shlibpath_var=no
9455       ;;
9456
9457     freebsd1*)
9458       ld_shlibs=no
9459       ;;
9460
9461     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9462     # support.  Future versions do this automatically, but an explicit c++rt0.o
9463     # does not break anything, and helps significantly (at the cost of a little
9464     # extra space).
9465     freebsd2.2*)
9466       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9467       hardcode_libdir_flag_spec='-R$libdir'
9468       hardcode_direct=yes
9469       hardcode_shlibpath_var=no
9470       ;;
9471
9472     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9473     freebsd2*)
9474       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9475       hardcode_direct=yes
9476       hardcode_minus_L=yes
9477       hardcode_shlibpath_var=no
9478       ;;
9479
9480     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9481     freebsd* | kfreebsd*-gnu | dragonfly*)
9482       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9483       hardcode_libdir_flag_spec='-R$libdir'
9484       hardcode_direct=yes
9485       hardcode_shlibpath_var=no
9486       ;;
9487
9488     hpux9*)
9489       if test "$GCC" = yes; then
9490         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'
9491       else
9492         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'
9493       fi
9494       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9495       hardcode_libdir_separator=:
9496       hardcode_direct=yes
9497
9498       # hardcode_minus_L: Not really in the search PATH,
9499       # but as the default location of the library.
9500       hardcode_minus_L=yes
9501       export_dynamic_flag_spec='${wl}-E'
9502       ;;
9503
9504     hpux10* | hpux11*)
9505       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9506         case $host_cpu in
9507         hppa*64*|ia64*)
9508           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9509           ;;
9510         *)
9511           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9512           ;;
9513         esac
9514       else
9515         case $host_cpu in
9516         hppa*64*|ia64*)
9517           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
9518           ;;
9519         *)
9520           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9521           ;;
9522         esac
9523       fi
9524       if test "$with_gnu_ld" = no; then
9525         case $host_cpu in
9526         hppa*64*)
9527           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9528           hardcode_libdir_flag_spec_ld='+b $libdir'
9529           hardcode_libdir_separator=:
9530           hardcode_direct=no
9531           hardcode_shlibpath_var=no
9532           ;;
9533         ia64*)
9534           hardcode_libdir_flag_spec='-L$libdir'
9535           hardcode_direct=no
9536           hardcode_shlibpath_var=no
9537
9538           # hardcode_minus_L: Not really in the search PATH,
9539           # but as the default location of the library.
9540           hardcode_minus_L=yes
9541           ;;
9542         *)
9543           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9544           hardcode_libdir_separator=:
9545           hardcode_direct=yes
9546           export_dynamic_flag_spec='${wl}-E'
9547
9548           # hardcode_minus_L: Not really in the search PATH,
9549           # but as the default location of the library.
9550           hardcode_minus_L=yes
9551           ;;
9552         esac
9553       fi
9554       ;;
9555
9556     irix5* | irix6* | nonstopux*)
9557       if test "$GCC" = yes; then
9558         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'
9559       else
9560         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'
9561         hardcode_libdir_flag_spec_ld='-rpath $libdir'
9562       fi
9563       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9564       hardcode_libdir_separator=:
9565       link_all_deplibs=yes
9566       ;;
9567
9568     netbsd*)
9569       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9570         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
9571       else
9572         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
9573       fi
9574       hardcode_libdir_flag_spec='-R$libdir'
9575       hardcode_direct=yes
9576       hardcode_shlibpath_var=no
9577       ;;
9578
9579     newsos6)
9580       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9581       hardcode_direct=yes
9582       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9583       hardcode_libdir_separator=:
9584       hardcode_shlibpath_var=no
9585       ;;
9586
9587     openbsd*)
9588       hardcode_direct=yes
9589       hardcode_shlibpath_var=no
9590       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9591         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9592         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9593         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9594         export_dynamic_flag_spec='${wl}-E'
9595       else
9596        case $host_os in
9597          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9598            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9599            hardcode_libdir_flag_spec='-R$libdir'
9600            ;;
9601          *)
9602            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9603            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9604            ;;
9605        esac
9606       fi
9607       ;;
9608
9609     os2*)
9610       hardcode_libdir_flag_spec='-L$libdir'
9611       hardcode_minus_L=yes
9612       allow_undefined_flag=unsupported
9613       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'
9614       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9615       ;;
9616
9617     osf3*)
9618       if test "$GCC" = yes; then
9619         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9620         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'
9621       else
9622         allow_undefined_flag=' -expect_unresolved \*'
9623         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'
9624       fi
9625       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9626       hardcode_libdir_separator=:
9627       ;;
9628
9629     osf4* | osf5*)      # as osf3* with the addition of -msym flag
9630       if test "$GCC" = yes; then
9631         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9632         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'
9633         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9634       else
9635         allow_undefined_flag=' -expect_unresolved \*'
9636         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'
9637         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
9638         $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'
9639
9640         # Both c and cxx compiler support -rpath directly
9641         hardcode_libdir_flag_spec='-rpath $libdir'
9642       fi
9643       hardcode_libdir_separator=:
9644       ;;
9645
9646     sco3.2v5*)
9647       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9648       hardcode_shlibpath_var=no
9649       export_dynamic_flag_spec='${wl}-Bexport'
9650       runpath_var=LD_RUN_PATH
9651       hardcode_runpath_var=yes
9652       ;;
9653
9654     solaris*)
9655       no_undefined_flag=' -z text'
9656       if test "$GCC" = yes; then
9657         wlarc='${wl}'
9658         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9659         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9660           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
9661       else
9662         wlarc=''
9663         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9664         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9665         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9666       fi
9667       hardcode_libdir_flag_spec='-R$libdir'
9668       hardcode_shlibpath_var=no
9669       case $host_os in
9670       solaris2.[0-5] | solaris2.[0-5].*) ;;
9671       *)
9672         # The compiler driver will combine linker options so we
9673         # cannot just pass the convience library names through
9674         # without $wl, iff we do not link with $LD.
9675         # Luckily, gcc supports the same syntax we need for Sun Studio.
9676         # Supported since Solaris 2.6 (maybe 2.5.1?)
9677         case $wlarc in
9678         '')
9679           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
9680         *)
9681           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' ;;
9682         esac ;;
9683       esac
9684       link_all_deplibs=yes
9685       ;;
9686
9687     sunos4*)
9688       if test "x$host_vendor" = xsequent; then
9689         # Use $CC to link under sequent, because it throws in some extra .o
9690         # files that make .init and .fini sections work.
9691         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9692       else
9693         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9694       fi
9695       hardcode_libdir_flag_spec='-L$libdir'
9696       hardcode_direct=yes
9697       hardcode_minus_L=yes
9698       hardcode_shlibpath_var=no
9699       ;;
9700
9701     sysv4)
9702       case $host_vendor in
9703         sni)
9704           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9705           hardcode_direct=yes # is this really true???
9706         ;;
9707         siemens)
9708           ## LD is ld it makes a PLAMLIB
9709           ## CC just makes a GrossModule.
9710           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9711           reload_cmds='$CC -r -o $output$reload_objs'
9712           hardcode_direct=no
9713         ;;
9714         motorola)
9715           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9716           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9717         ;;
9718       esac
9719       runpath_var='LD_RUN_PATH'
9720       hardcode_shlibpath_var=no
9721       ;;
9722
9723     sysv4.3*)
9724       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9725       hardcode_shlibpath_var=no
9726       export_dynamic_flag_spec='-Bexport'
9727       ;;
9728
9729     sysv4*MP*)
9730       if test -d /usr/nec; then
9731         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9732         hardcode_shlibpath_var=no
9733         runpath_var=LD_RUN_PATH
9734         hardcode_runpath_var=yes
9735         ld_shlibs=yes
9736       fi
9737       ;;
9738
9739     sysv4.2uw2*)
9740       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9741       hardcode_direct=yes
9742       hardcode_minus_L=no
9743       hardcode_shlibpath_var=no
9744       hardcode_runpath_var=yes
9745       runpath_var=LD_RUN_PATH
9746       ;;
9747
9748    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
9749       no_undefined_flag='${wl}-z ${wl}text'
9750       if test "$GCC" = yes; then
9751         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9752       else
9753         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9754       fi
9755       runpath_var='LD_RUN_PATH'
9756       hardcode_shlibpath_var=no
9757       ;;
9758
9759     sysv5*)
9760       no_undefined_flag=' -z text'
9761       # $CC -shared without GNU ld will not create a library from C++
9762       # object files and a static libstdc++, better avoid it by now
9763       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9764       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9765                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9766       hardcode_libdir_flag_spec=
9767       hardcode_shlibpath_var=no
9768       runpath_var='LD_RUN_PATH'
9769       ;;
9770
9771     uts4*)
9772       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9773       hardcode_libdir_flag_spec='-L$libdir'
9774       hardcode_shlibpath_var=no
9775       ;;
9776
9777     *)
9778       ld_shlibs=no
9779       ;;
9780     esac
9781   fi
9782
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
9784 $as_echo "$ld_shlibs" >&6; }
9785 test "$ld_shlibs" = no && can_build_shared=no
9786
9787 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9788 if test "$GCC" = yes; then
9789   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9790 fi
9791
9792 #
9793 # Do we need to explicitly link libc?
9794 #
9795 case "x$archive_cmds_need_lc" in
9796 x|xyes)
9797   # Assume -lc should be added
9798   archive_cmds_need_lc=yes
9799
9800   if test "$enable_shared" = yes && test "$GCC" = yes; then
9801     case $archive_cmds in
9802     *'~'*)
9803       # FIXME: we may have to deal with multi-command sequences.
9804       ;;
9805     '$CC '*)
9806       # Test whether the compiler implicitly links with -lc since on some
9807       # systems, -lgcc has to come before -lc. If gcc already passes -lc
9808       # to ld, don't add -lc before -lgcc.
9809       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
9810 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
9811       $rm conftest*
9812       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
9813
9814       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9815   (eval $ac_compile) 2>&5
9816   ac_status=$?
9817   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9818   test $ac_status = 0; } 2>conftest.err; then
9819         soname=conftest
9820         lib=conftest
9821         libobjs=conftest.$ac_objext
9822         deplibs=
9823         wl=$lt_prog_compiler_wl
9824         compiler_flags=-v
9825         linker_flags=-v
9826         verstring=
9827         output_objdir=.
9828         libname=conftest
9829         lt_save_allow_undefined_flag=$allow_undefined_flag
9830         allow_undefined_flag=
9831         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9832   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
9833   ac_status=$?
9834   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9835   test $ac_status = 0; }
9836         then
9837           archive_cmds_need_lc=no
9838         else
9839           archive_cmds_need_lc=yes
9840         fi
9841         allow_undefined_flag=$lt_save_allow_undefined_flag
9842       else
9843         cat conftest.err 1>&5
9844       fi
9845       $rm conftest*
9846       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
9847 $as_echo "$archive_cmds_need_lc" >&6; }
9848       ;;
9849     esac
9850   fi
9851   ;;
9852 esac
9853
9854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
9855 $as_echo_n "checking dynamic linker characteristics... " >&6; }
9856 library_names_spec=
9857 libname_spec='lib$name'
9858 soname_spec=
9859 shrext_cmds=".so"
9860 postinstall_cmds=
9861 postuninstall_cmds=
9862 finish_cmds=
9863 finish_eval=
9864 shlibpath_var=
9865 shlibpath_overrides_runpath=unknown
9866 version_type=none
9867 dynamic_linker="$host_os ld.so"
9868 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9869 if test "$GCC" = yes; then
9870   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9871   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9872     # if the path contains ";" then we assume it to be the separator
9873     # otherwise default to the standard path separator (i.e. ":") - it is
9874     # assumed that no part of a normal pathname contains ";" but that should
9875     # okay in the real world where ";" in dirpaths is itself problematic.
9876     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9877   else
9878     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9879   fi
9880 else
9881   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9882 fi
9883 need_lib_prefix=unknown
9884 hardcode_into_libs=no
9885
9886 # when you set need_version to no, make sure it does not cause -set_version
9887 # flags to be left without arguments
9888 need_version=unknown
9889
9890 case $host_os in
9891 aix3*)
9892   version_type=linux
9893   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9894   shlibpath_var=LIBPATH
9895
9896   # AIX 3 has no versioning support, so we append a major version to the name.
9897   soname_spec='${libname}${release}${shared_ext}$major'
9898   ;;
9899
9900 aix4* | aix5*)
9901   version_type=linux
9902   need_lib_prefix=no
9903   need_version=no
9904   hardcode_into_libs=yes
9905   if test "$host_cpu" = ia64; then
9906     # AIX 5 supports IA64
9907     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9908     shlibpath_var=LD_LIBRARY_PATH
9909   else
9910     # With GCC up to 2.95.x, collect2 would create an import file
9911     # for dependence libraries.  The import file would start with
9912     # the line `#! .'.  This would cause the generated library to
9913     # depend on `.', always an invalid library.  This was fixed in
9914     # development snapshots of GCC prior to 3.0.
9915     case $host_os in
9916       aix4 | aix4.[01] | aix4.[01].*)
9917       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9918            echo ' yes '
9919            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9920         :
9921       else
9922         can_build_shared=no
9923       fi
9924       ;;
9925     esac
9926     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9927     # soname into executable. Probably we can add versioning support to
9928     # collect2, so additional links can be useful in future.
9929     if test "$aix_use_runtimelinking" = yes; then
9930       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9931       # instead of lib<name>.a to let people know that these are not
9932       # typical AIX shared libraries.
9933       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9934     else
9935       # We preserve .a as extension for shared libraries through AIX4.2
9936       # and later when we are not doing run time linking.
9937       library_names_spec='${libname}${release}.a $libname.a'
9938       soname_spec='${libname}${release}${shared_ext}$major'
9939     fi
9940     shlibpath_var=LIBPATH
9941   fi
9942   ;;
9943
9944 amigaos*)
9945   library_names_spec='$libname.ixlibrary $libname.a'
9946   # Create ${libname}_ixlibrary.a entries in /sys/libs.
9947   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'
9948   ;;
9949
9950 beos*)
9951   library_names_spec='${libname}${shared_ext}'
9952   dynamic_linker="$host_os ld.so"
9953   shlibpath_var=LIBRARY_PATH
9954   ;;
9955
9956 bsdi[45]*)
9957   version_type=linux
9958   need_version=no
9959   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9960   soname_spec='${libname}${release}${shared_ext}$major'
9961   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9962   shlibpath_var=LD_LIBRARY_PATH
9963   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9964   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9965   # the default ld.so.conf also contains /usr/contrib/lib and
9966   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9967   # libtool to hard-code these into programs
9968   ;;
9969
9970 cygwin* | mingw* | pw32*)
9971   version_type=windows
9972   shrext_cmds=".dll"
9973   need_version=no
9974   need_lib_prefix=no
9975
9976   case $GCC,$host_os in
9977   yes,cygwin* | yes,mingw* | yes,pw32*)
9978     library_names_spec='$libname.dll.a'
9979     # DLL is installed to $(libdir)/../bin by postinstall_cmds
9980     postinstall_cmds='base_file=`basename \${file}`~
9981       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
9982       dldir=$destdir/`dirname \$dlpath`~
9983       test -d \$dldir || mkdir -p \$dldir~
9984       $install_prog $dir/$dlname \$dldir/$dlname~
9985       chmod a+x \$dldir/$dlname'
9986     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9987       dlpath=$dir/\$dldll~
9988        $rm \$dlpath'
9989     shlibpath_overrides_runpath=yes
9990
9991     case $host_os in
9992     cygwin*)
9993       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9994       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9995       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9996       ;;
9997     mingw*)
9998       # MinGW DLLs use traditional 'lib' prefix
9999       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10000       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
10001       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
10002         # It is most probably a Windows format PATH printed by
10003         # mingw gcc, but we are running on Cygwin. Gcc prints its search
10004         # path with ; separators, and with drive letters. We can handle the
10005         # drive letters (cygwin fileutils understands them), so leave them,
10006         # especially as we might pass files found there to a mingw objdump,
10007         # which wouldn't understand a cygwinified path. Ahh.
10008         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10009       else
10010         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
10011       fi
10012       ;;
10013     pw32*)
10014       # pw32 DLLs use 'pw' prefix rather than 'lib'
10015       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10016       ;;
10017     esac
10018     ;;
10019
10020   *)
10021     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10022     ;;
10023   esac
10024   dynamic_linker='Win32 ld.exe'
10025   # FIXME: first we should search . and the directory the executable is in
10026   shlibpath_var=PATH
10027   ;;
10028
10029 darwin* | rhapsody*)
10030   dynamic_linker="$host_os dyld"
10031   version_type=darwin
10032   need_lib_prefix=no
10033   need_version=no
10034   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
10035   soname_spec='${libname}${release}${major}$shared_ext'
10036   shlibpath_overrides_runpath=yes
10037   shlibpath_var=DYLD_LIBRARY_PATH
10038   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10039   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
10040   if test "$GCC" = yes; then
10041     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"`
10042   else
10043     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
10044   fi
10045   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10046   ;;
10047
10048 dgux*)
10049   version_type=linux
10050   need_lib_prefix=no
10051   need_version=no
10052   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10053   soname_spec='${libname}${release}${shared_ext}$major'
10054   shlibpath_var=LD_LIBRARY_PATH
10055   ;;
10056
10057 freebsd1*)
10058   dynamic_linker=no
10059   ;;
10060
10061 kfreebsd*-gnu)
10062   version_type=linux
10063   need_lib_prefix=no
10064   need_version=no
10065   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10066   soname_spec='${libname}${release}${shared_ext}$major'
10067   shlibpath_var=LD_LIBRARY_PATH
10068   shlibpath_overrides_runpath=no
10069   hardcode_into_libs=yes
10070   dynamic_linker='GNU ld.so'
10071   ;;
10072
10073 freebsd* | dragonfly*)
10074   # DragonFly does not have aout.  When/if they implement a new
10075   # versioning mechanism, adjust this.
10076   if test -x /usr/bin/objformat; then
10077     objformat=`/usr/bin/objformat`
10078   else
10079     case $host_os in
10080     freebsd[123]*) objformat=aout ;;
10081     *) objformat=elf ;;
10082     esac
10083   fi
10084   version_type=freebsd-$objformat
10085   case $version_type in
10086     freebsd-elf*)
10087       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10088       need_version=no
10089       need_lib_prefix=no
10090       ;;
10091     freebsd-*)
10092       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
10093       need_version=yes
10094       ;;
10095   esac
10096   shlibpath_var=LD_LIBRARY_PATH
10097   case $host_os in
10098   freebsd2*)
10099     shlibpath_overrides_runpath=yes
10100     ;;
10101   freebsd3.[01]* | freebsdelf3.[01]*)
10102     shlibpath_overrides_runpath=yes
10103     hardcode_into_libs=yes
10104     ;;
10105   *) # from 3.2 on
10106     shlibpath_overrides_runpath=no
10107     hardcode_into_libs=yes
10108     ;;
10109   esac
10110   ;;
10111
10112 gnu*)
10113   version_type=linux
10114   need_lib_prefix=no
10115   need_version=no
10116   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10117   soname_spec='${libname}${release}${shared_ext}$major'
10118   shlibpath_var=LD_LIBRARY_PATH
10119   hardcode_into_libs=yes
10120   ;;
10121
10122 hpux9* | hpux10* | hpux11*)
10123   # Give a soname corresponding to the major version so that dld.sl refuses to
10124   # link against other versions.
10125   version_type=sunos
10126   need_lib_prefix=no
10127   need_version=no
10128   case $host_cpu in
10129   ia64*)
10130     shrext_cmds='.so'
10131     hardcode_into_libs=yes
10132     dynamic_linker="$host_os dld.so"
10133     shlibpath_var=LD_LIBRARY_PATH
10134     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10135     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10136     soname_spec='${libname}${release}${shared_ext}$major'
10137     if test "X$HPUX_IA64_MODE" = X32; then
10138       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10139     else
10140       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10141     fi
10142     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10143     ;;
10144    hppa*64*)
10145      shrext_cmds='.sl'
10146      hardcode_into_libs=yes
10147      dynamic_linker="$host_os dld.sl"
10148      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10149      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10150      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10151      soname_spec='${libname}${release}${shared_ext}$major'
10152      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10153      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10154      ;;
10155    *)
10156     shrext_cmds='.sl'
10157     dynamic_linker="$host_os dld.sl"
10158     shlibpath_var=SHLIB_PATH
10159     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10160     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10161     soname_spec='${libname}${release}${shared_ext}$major'
10162     ;;
10163   esac
10164   # HP-UX runs *really* slowly unless shared libraries are mode 555.
10165   postinstall_cmds='chmod 555 $lib'
10166   ;;
10167
10168 irix5* | irix6* | nonstopux*)
10169   case $host_os in
10170     nonstopux*) version_type=nonstopux ;;
10171     *)
10172         if test "$lt_cv_prog_gnu_ld" = yes; then
10173                 version_type=linux
10174         else
10175                 version_type=irix
10176         fi ;;
10177   esac
10178   need_lib_prefix=no
10179   need_version=no
10180   soname_spec='${libname}${release}${shared_ext}$major'
10181   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
10182   case $host_os in
10183   irix5* | nonstopux*)
10184     libsuff= shlibsuff=
10185     ;;
10186   *)
10187     case $LD in # libtool.m4 will add one of these switches to LD
10188     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10189       libsuff= shlibsuff= libmagic=32-bit;;
10190     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10191       libsuff=32 shlibsuff=N32 libmagic=N32;;
10192     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10193       libsuff=64 shlibsuff=64 libmagic=64-bit;;
10194     *) libsuff= shlibsuff= libmagic=never-match;;
10195     esac
10196     ;;
10197   esac
10198   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10199   shlibpath_overrides_runpath=no
10200   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10201   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
10202   hardcode_into_libs=yes
10203   ;;
10204
10205 # No shared lib support for Linux oldld, aout, or coff.
10206 linux*oldld* | linux*aout* | linux*coff*)
10207   dynamic_linker=no
10208   ;;
10209
10210 # This must be Linux ELF.
10211 linux*)
10212   version_type=linux
10213   need_lib_prefix=no
10214   need_version=no
10215   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10216   soname_spec='${libname}${release}${shared_ext}$major'
10217   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10218   shlibpath_var=LD_LIBRARY_PATH
10219   shlibpath_overrides_runpath=no
10220   # This implies no fast_install, which is unacceptable.
10221   # Some rework will be needed to allow for fast_install
10222   # before this can be enabled.
10223   hardcode_into_libs=yes
10224
10225   # Append ld.so.conf contents to the search path
10226   if test -f /etc/ld.so.conf; then
10227     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' ' '`
10228     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10229   fi
10230
10231   # We used to test for /lib/ld.so.1 and disable shared libraries on
10232   # powerpc, because MkLinux only supported shared libraries with the
10233   # GNU dynamic linker.  Since this was broken with cross compilers,
10234   # most powerpc-linux boxes support dynamic linking these days and
10235   # people can always --disable-shared, the test was removed, and we
10236   # assume the GNU/Linux dynamic linker is in use.
10237   dynamic_linker='GNU/Linux ld.so'
10238   ;;
10239
10240 knetbsd*-gnu)
10241   version_type=linux
10242   need_lib_prefix=no
10243   need_version=no
10244   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10245   soname_spec='${libname}${release}${shared_ext}$major'
10246   shlibpath_var=LD_LIBRARY_PATH
10247   shlibpath_overrides_runpath=no
10248   hardcode_into_libs=yes
10249   dynamic_linker='GNU ld.so'
10250   ;;
10251
10252 netbsd*)
10253   version_type=sunos
10254   need_lib_prefix=no
10255   need_version=no
10256   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10257     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10258     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10259     dynamic_linker='NetBSD (a.out) ld.so'
10260   else
10261     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10262     soname_spec='${libname}${release}${shared_ext}$major'
10263     dynamic_linker='NetBSD ld.elf_so'
10264   fi
10265   shlibpath_var=LD_LIBRARY_PATH
10266   shlibpath_overrides_runpath=yes
10267   hardcode_into_libs=yes
10268   ;;
10269
10270 newsos6)
10271   version_type=linux
10272   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10273   shlibpath_var=LD_LIBRARY_PATH
10274   shlibpath_overrides_runpath=yes
10275   ;;
10276
10277 nto-qnx*)
10278   version_type=linux
10279   need_lib_prefix=no
10280   need_version=no
10281   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10282   soname_spec='${libname}${release}${shared_ext}$major'
10283   shlibpath_var=LD_LIBRARY_PATH
10284   shlibpath_overrides_runpath=yes
10285   ;;
10286
10287 openbsd*)
10288   version_type=sunos
10289   need_lib_prefix=no
10290   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10291   case $host_os in
10292     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10293     *)                         need_version=no  ;;
10294   esac
10295   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10296   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10297   shlibpath_var=LD_LIBRARY_PATH
10298   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10299     case $host_os in
10300       openbsd2.[89] | openbsd2.[89].*)
10301         shlibpath_overrides_runpath=no
10302         ;;
10303       *)
10304         shlibpath_overrides_runpath=yes
10305         ;;
10306       esac
10307   else
10308     shlibpath_overrides_runpath=yes
10309   fi
10310   ;;
10311
10312 os2*)
10313   libname_spec='$name'
10314   shrext_cmds=".dll"
10315   need_lib_prefix=no
10316   library_names_spec='$libname${shared_ext} $libname.a'
10317   dynamic_linker='OS/2 ld.exe'
10318   shlibpath_var=LIBPATH
10319   ;;
10320
10321 osf3* | osf4* | osf5*)
10322   version_type=osf
10323   need_lib_prefix=no
10324   need_version=no
10325   soname_spec='${libname}${release}${shared_ext}$major'
10326   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10327   shlibpath_var=LD_LIBRARY_PATH
10328   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10329   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
10330   ;;
10331
10332 sco3.2v5*)
10333   version_type=osf
10334   soname_spec='${libname}${release}${shared_ext}$major'
10335   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10336   shlibpath_var=LD_LIBRARY_PATH
10337   ;;
10338
10339 solaris*)
10340   version_type=linux
10341   need_lib_prefix=no
10342   need_version=no
10343   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10344   soname_spec='${libname}${release}${shared_ext}$major'
10345   shlibpath_var=LD_LIBRARY_PATH
10346   shlibpath_overrides_runpath=yes
10347   hardcode_into_libs=yes
10348   # ldd complains unless libraries are executable
10349   postinstall_cmds='chmod +x $lib'
10350   ;;
10351
10352 sunos4*)
10353   version_type=sunos
10354   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10355   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10356   shlibpath_var=LD_LIBRARY_PATH
10357   shlibpath_overrides_runpath=yes
10358   if test "$with_gnu_ld" = yes; then
10359     need_lib_prefix=no
10360   fi
10361   need_version=yes
10362   ;;
10363
10364 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10365   version_type=linux
10366   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10367   soname_spec='${libname}${release}${shared_ext}$major'
10368   shlibpath_var=LD_LIBRARY_PATH
10369   case $host_vendor in
10370     sni)
10371       shlibpath_overrides_runpath=no
10372       need_lib_prefix=no
10373       export_dynamic_flag_spec='${wl}-Blargedynsym'
10374       runpath_var=LD_RUN_PATH
10375       ;;
10376     siemens)
10377       need_lib_prefix=no
10378       ;;
10379     motorola)
10380       need_lib_prefix=no
10381       need_version=no
10382       shlibpath_overrides_runpath=no
10383       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10384       ;;
10385   esac
10386   ;;
10387
10388 sysv4*MP*)
10389   if test -d /usr/nec ;then
10390     version_type=linux
10391     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
10392     soname_spec='$libname${shared_ext}.$major'
10393     shlibpath_var=LD_LIBRARY_PATH
10394   fi
10395   ;;
10396
10397 uts4*)
10398   version_type=linux
10399   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10400   soname_spec='${libname}${release}${shared_ext}$major'
10401   shlibpath_var=LD_LIBRARY_PATH
10402   ;;
10403
10404 *)
10405   dynamic_linker=no
10406   ;;
10407 esac
10408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
10409 $as_echo "$dynamic_linker" >&6; }
10410 test "$dynamic_linker" = no && can_build_shared=no
10411
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
10413 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
10414 hardcode_action=
10415 if test -n "$hardcode_libdir_flag_spec" || \
10416    test -n "$runpath_var" || \
10417    test "X$hardcode_automatic" = "Xyes" ; then
10418
10419   # We can hardcode non-existant directories.
10420   if test "$hardcode_direct" != no &&
10421      # If the only mechanism to avoid hardcoding is shlibpath_var, we
10422      # have to relink, otherwise we might link with an installed library
10423      # when we should be linking with a yet-to-be-installed one
10424      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
10425      test "$hardcode_minus_L" != no; then
10426     # Linking always hardcodes the temporary library directory.
10427     hardcode_action=relink
10428   else
10429     # We can link without hardcoding, and we can hardcode nonexisting dirs.
10430     hardcode_action=immediate
10431   fi
10432 else
10433   # We cannot hardcode anything, or else we can only hardcode existing
10434   # directories.
10435   hardcode_action=unsupported
10436 fi
10437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
10438 $as_echo "$hardcode_action" >&6; }
10439
10440 if test "$hardcode_action" = relink; then
10441   # Fast installation is not supported
10442   enable_fast_install=no
10443 elif test "$shlibpath_overrides_runpath" = yes ||
10444      test "$enable_shared" = no; then
10445   # Fast installation is not necessary
10446   enable_fast_install=needless
10447 fi
10448
10449 striplib=
10450 old_striplib=
10451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
10452 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
10453 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
10454   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
10455   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
10456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10457 $as_echo "yes" >&6; }
10458 else
10459 # FIXME - insert some real tests, host_os isn't really good enough
10460   case $host_os in
10461    darwin*)
10462        if test -n "$STRIP" ; then
10463          striplib="$STRIP -x"
10464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10465 $as_echo "yes" >&6; }
10466        else
10467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468 $as_echo "no" >&6; }
10469 fi
10470        ;;
10471    *)
10472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10473 $as_echo "no" >&6; }
10474     ;;
10475   esac
10476 fi
10477
10478 if test "x$enable_dlopen" != xyes; then
10479   enable_dlopen=unknown
10480   enable_dlopen_self=unknown
10481   enable_dlopen_self_static=unknown
10482 else
10483   lt_cv_dlopen=no
10484   lt_cv_dlopen_libs=
10485
10486   case $host_os in
10487   beos*)
10488     lt_cv_dlopen="load_add_on"
10489     lt_cv_dlopen_libs=
10490     lt_cv_dlopen_self=yes
10491     ;;
10492
10493   mingw* | pw32*)
10494     lt_cv_dlopen="LoadLibrary"
10495     lt_cv_dlopen_libs=
10496    ;;
10497
10498   cygwin*)
10499     lt_cv_dlopen="dlopen"
10500     lt_cv_dlopen_libs=
10501    ;;
10502
10503   darwin*)
10504   # if libdl is installed we need to link against it
10505     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10506 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10507 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10508   $as_echo_n "(cached) " >&6
10509 else
10510   ac_check_lib_save_LIBS=$LIBS
10511 LIBS="-ldl  $LIBS"
10512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10513 /* end confdefs.h.  */
10514
10515 /* Override any GCC internal prototype to avoid an error.
10516    Use char because int might match the return type of a GCC
10517    builtin and then its argument prototype would still apply.  */
10518 #ifdef __cplusplus
10519 extern "C"
10520 #endif
10521 char dlopen ();
10522 int
10523 main ()
10524 {
10525 return dlopen ();
10526   ;
10527   return 0;
10528 }
10529 _ACEOF
10530 if ac_fn_c_try_link "$LINENO"; then :
10531   ac_cv_lib_dl_dlopen=yes
10532 else
10533   ac_cv_lib_dl_dlopen=no
10534 fi
10535 rm -f core conftest.err conftest.$ac_objext \
10536     conftest$ac_exeext conftest.$ac_ext
10537 LIBS=$ac_check_lib_save_LIBS
10538 fi
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10540 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10541 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10542   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10543 else
10544
10545     lt_cv_dlopen="dyld"
10546     lt_cv_dlopen_libs=
10547     lt_cv_dlopen_self=yes
10548
10549 fi
10550
10551    ;;
10552
10553   *)
10554     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
10555 if test "x$ac_cv_func_shl_load" = x""yes; then :
10556   lt_cv_dlopen="shl_load"
10557 else
10558   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10559 $as_echo_n "checking for shl_load in -ldld... " >&6; }
10560 if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
10561   $as_echo_n "(cached) " >&6
10562 else
10563   ac_check_lib_save_LIBS=$LIBS
10564 LIBS="-ldld  $LIBS"
10565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10566 /* end confdefs.h.  */
10567
10568 /* Override any GCC internal prototype to avoid an error.
10569    Use char because int might match the return type of a GCC
10570    builtin and then its argument prototype would still apply.  */
10571 #ifdef __cplusplus
10572 extern "C"
10573 #endif
10574 char shl_load ();
10575 int
10576 main ()
10577 {
10578 return shl_load ();
10579   ;
10580   return 0;
10581 }
10582 _ACEOF
10583 if ac_fn_c_try_link "$LINENO"; then :
10584   ac_cv_lib_dld_shl_load=yes
10585 else
10586   ac_cv_lib_dld_shl_load=no
10587 fi
10588 rm -f core conftest.err conftest.$ac_objext \
10589     conftest$ac_exeext conftest.$ac_ext
10590 LIBS=$ac_check_lib_save_LIBS
10591 fi
10592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
10593 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
10594 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
10595   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
10596 else
10597   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
10598 if test "x$ac_cv_func_dlopen" = x""yes; then :
10599   lt_cv_dlopen="dlopen"
10600 else
10601   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10602 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10603 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10604   $as_echo_n "(cached) " >&6
10605 else
10606   ac_check_lib_save_LIBS=$LIBS
10607 LIBS="-ldl  $LIBS"
10608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10609 /* end confdefs.h.  */
10610
10611 /* Override any GCC internal prototype to avoid an error.
10612    Use char because int might match the return type of a GCC
10613    builtin and then its argument prototype would still apply.  */
10614 #ifdef __cplusplus
10615 extern "C"
10616 #endif
10617 char dlopen ();
10618 int
10619 main ()
10620 {
10621 return dlopen ();
10622   ;
10623   return 0;
10624 }
10625 _ACEOF
10626 if ac_fn_c_try_link "$LINENO"; then :
10627   ac_cv_lib_dl_dlopen=yes
10628 else
10629   ac_cv_lib_dl_dlopen=no
10630 fi
10631 rm -f core conftest.err conftest.$ac_objext \
10632     conftest$ac_exeext conftest.$ac_ext
10633 LIBS=$ac_check_lib_save_LIBS
10634 fi
10635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10636 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10637 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10638   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10639 else
10640   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
10641 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
10642 if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
10643   $as_echo_n "(cached) " >&6
10644 else
10645   ac_check_lib_save_LIBS=$LIBS
10646 LIBS="-lsvld  $LIBS"
10647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10648 /* end confdefs.h.  */
10649
10650 /* Override any GCC internal prototype to avoid an error.
10651    Use char because int might match the return type of a GCC
10652    builtin and then its argument prototype would still apply.  */
10653 #ifdef __cplusplus
10654 extern "C"
10655 #endif
10656 char dlopen ();
10657 int
10658 main ()
10659 {
10660 return dlopen ();
10661   ;
10662   return 0;
10663 }
10664 _ACEOF
10665 if ac_fn_c_try_link "$LINENO"; then :
10666   ac_cv_lib_svld_dlopen=yes
10667 else
10668   ac_cv_lib_svld_dlopen=no
10669 fi
10670 rm -f core conftest.err conftest.$ac_objext \
10671     conftest$ac_exeext conftest.$ac_ext
10672 LIBS=$ac_check_lib_save_LIBS
10673 fi
10674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
10675 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
10676 if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
10677   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10678 else
10679   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
10680 $as_echo_n "checking for dld_link in -ldld... " >&6; }
10681 if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
10682   $as_echo_n "(cached) " >&6
10683 else
10684   ac_check_lib_save_LIBS=$LIBS
10685 LIBS="-ldld  $LIBS"
10686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10687 /* end confdefs.h.  */
10688
10689 /* Override any GCC internal prototype to avoid an error.
10690    Use char because int might match the return type of a GCC
10691    builtin and then its argument prototype would still apply.  */
10692 #ifdef __cplusplus
10693 extern "C"
10694 #endif
10695 char dld_link ();
10696 int
10697 main ()
10698 {
10699 return dld_link ();
10700   ;
10701   return 0;
10702 }
10703 _ACEOF
10704 if ac_fn_c_try_link "$LINENO"; then :
10705   ac_cv_lib_dld_dld_link=yes
10706 else
10707   ac_cv_lib_dld_dld_link=no
10708 fi
10709 rm -f core conftest.err conftest.$ac_objext \
10710     conftest$ac_exeext conftest.$ac_ext
10711 LIBS=$ac_check_lib_save_LIBS
10712 fi
10713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
10714 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
10715 if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
10716   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10717 fi
10718
10719
10720 fi
10721
10722
10723 fi
10724
10725
10726 fi
10727
10728
10729 fi
10730
10731
10732 fi
10733
10734     ;;
10735   esac
10736
10737   if test "x$lt_cv_dlopen" != xno; then
10738     enable_dlopen=yes
10739   else
10740     enable_dlopen=no
10741   fi
10742
10743   case $lt_cv_dlopen in
10744   dlopen)
10745     save_CPPFLAGS="$CPPFLAGS"
10746     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10747
10748     save_LDFLAGS="$LDFLAGS"
10749     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10750
10751     save_LIBS="$LIBS"
10752     LIBS="$lt_cv_dlopen_libs $LIBS"
10753
10754     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
10755 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
10756 if test "${lt_cv_dlopen_self+set}" = set; then :
10757   $as_echo_n "(cached) " >&6
10758 else
10759           if test "$cross_compiling" = yes; then :
10760   lt_cv_dlopen_self=cross
10761 else
10762   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10763   lt_status=$lt_dlunknown
10764   cat > conftest.$ac_ext <<EOF
10765 #line 10765 "configure"
10766 #include "confdefs.h"
10767
10768 #if HAVE_DLFCN_H
10769 #include <dlfcn.h>
10770 #endif
10771
10772 #include <stdio.h>
10773
10774 #ifdef RTLD_GLOBAL
10775 #  define LT_DLGLOBAL           RTLD_GLOBAL
10776 #else
10777 #  ifdef DL_GLOBAL
10778 #    define LT_DLGLOBAL         DL_GLOBAL
10779 #  else
10780 #    define LT_DLGLOBAL         0
10781 #  endif
10782 #endif
10783
10784 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10785    find out it does not work in some platform. */
10786 #ifndef LT_DLLAZY_OR_NOW
10787 #  ifdef RTLD_LAZY
10788 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10789 #  else
10790 #    ifdef DL_LAZY
10791 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10792 #    else
10793 #      ifdef RTLD_NOW
10794 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10795 #      else
10796 #        ifdef DL_NOW
10797 #          define LT_DLLAZY_OR_NOW      DL_NOW
10798 #        else
10799 #          define LT_DLLAZY_OR_NOW      0
10800 #        endif
10801 #      endif
10802 #    endif
10803 #  endif
10804 #endif
10805
10806 #ifdef __cplusplus
10807 extern "C" void exit (int);
10808 #endif
10809
10810 void fnord() { int i=42;}
10811 int main ()
10812 {
10813   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10814   int status = $lt_dlunknown;
10815
10816   if (self)
10817     {
10818       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10819       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10820       /* dlclose (self); */
10821     }
10822
10823     exit (status);
10824 }
10825 EOF
10826   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10827   (eval $ac_link) 2>&5
10828   ac_status=$?
10829   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10830   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10831     (./conftest; exit; ) >&5 2>/dev/null
10832     lt_status=$?
10833     case x$lt_status in
10834       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10835       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10836       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10837     esac
10838   else :
10839     # compilation failed
10840     lt_cv_dlopen_self=no
10841   fi
10842 fi
10843 rm -fr conftest*
10844
10845
10846 fi
10847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
10848 $as_echo "$lt_cv_dlopen_self" >&6; }
10849
10850     if test "x$lt_cv_dlopen_self" = xyes; then
10851       LDFLAGS="$LDFLAGS $link_static_flag"
10852       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
10853 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
10854 if test "${lt_cv_dlopen_self_static+set}" = set; then :
10855   $as_echo_n "(cached) " >&6
10856 else
10857           if test "$cross_compiling" = yes; then :
10858   lt_cv_dlopen_self_static=cross
10859 else
10860   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10861   lt_status=$lt_dlunknown
10862   cat > conftest.$ac_ext <<EOF
10863 #line 10863 "configure"
10864 #include "confdefs.h"
10865
10866 #if HAVE_DLFCN_H
10867 #include <dlfcn.h>
10868 #endif
10869
10870 #include <stdio.h>
10871
10872 #ifdef RTLD_GLOBAL
10873 #  define LT_DLGLOBAL           RTLD_GLOBAL
10874 #else
10875 #  ifdef DL_GLOBAL
10876 #    define LT_DLGLOBAL         DL_GLOBAL
10877 #  else
10878 #    define LT_DLGLOBAL         0
10879 #  endif
10880 #endif
10881
10882 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10883    find out it does not work in some platform. */
10884 #ifndef LT_DLLAZY_OR_NOW
10885 #  ifdef RTLD_LAZY
10886 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10887 #  else
10888 #    ifdef DL_LAZY
10889 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10890 #    else
10891 #      ifdef RTLD_NOW
10892 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10893 #      else
10894 #        ifdef DL_NOW
10895 #          define LT_DLLAZY_OR_NOW      DL_NOW
10896 #        else
10897 #          define LT_DLLAZY_OR_NOW      0
10898 #        endif
10899 #      endif
10900 #    endif
10901 #  endif
10902 #endif
10903
10904 #ifdef __cplusplus
10905 extern "C" void exit (int);
10906 #endif
10907
10908 void fnord() { int i=42;}
10909 int main ()
10910 {
10911   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10912   int status = $lt_dlunknown;
10913
10914   if (self)
10915     {
10916       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10917       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10918       /* dlclose (self); */
10919     }
10920
10921     exit (status);
10922 }
10923 EOF
10924   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10925   (eval $ac_link) 2>&5
10926   ac_status=$?
10927   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10928   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10929     (./conftest; exit; ) >&5 2>/dev/null
10930     lt_status=$?
10931     case x$lt_status in
10932       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10933       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10934       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
10935     esac
10936   else :
10937     # compilation failed
10938     lt_cv_dlopen_self_static=no
10939   fi
10940 fi
10941 rm -fr conftest*
10942
10943
10944 fi
10945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
10946 $as_echo "$lt_cv_dlopen_self_static" >&6; }
10947     fi
10948
10949     CPPFLAGS="$save_CPPFLAGS"
10950     LDFLAGS="$save_LDFLAGS"
10951     LIBS="$save_LIBS"
10952     ;;
10953   esac
10954
10955   case $lt_cv_dlopen_self in
10956   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10957   *) enable_dlopen_self=unknown ;;
10958   esac
10959
10960   case $lt_cv_dlopen_self_static in
10961   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10962   *) enable_dlopen_self_static=unknown ;;
10963   esac
10964 fi
10965
10966
10967 # Report which librarie types wil actually be built
10968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
10969 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
10971 $as_echo "$can_build_shared" >&6; }
10972
10973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
10974 $as_echo_n "checking whether to build shared libraries... " >&6; }
10975 test "$can_build_shared" = "no" && enable_shared=no
10976
10977 # On AIX, shared libraries and static libraries use the same namespace, and
10978 # are all built from PIC.
10979 case $host_os in
10980 aix3*)
10981   test "$enable_shared" = yes && enable_static=no
10982   if test -n "$RANLIB"; then
10983     archive_cmds="$archive_cmds~\$RANLIB \$lib"
10984     postinstall_cmds='$RANLIB $lib'
10985   fi
10986   ;;
10987
10988 aix4* | aix5*)
10989   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10990     test "$enable_shared" = yes && enable_static=no
10991   fi
10992     ;;
10993 esac
10994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
10995 $as_echo "$enable_shared" >&6; }
10996
10997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
10998 $as_echo_n "checking whether to build static libraries... " >&6; }
10999 # Make sure either enable_shared or enable_static is yes.
11000 test "$enable_shared" = yes || enable_static=yes
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
11002 $as_echo "$enable_static" >&6; }
11003
11004 # The else clause should only fire when bootstrapping the
11005 # libtool distribution, otherwise you forgot to ship ltmain.sh
11006 # with your package, and you will get complaints that there are
11007 # no rules to generate ltmain.sh.
11008 if test -f "$ltmain"; then
11009   # See if we are running on zsh, and set the options which allow our commands through
11010   # without removal of \ escapes.
11011   if test -n "${ZSH_VERSION+set}" ; then
11012     setopt NO_GLOB_SUBST
11013   fi
11014   # Now quote all the things that may contain metacharacters while being
11015   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11016   # variables and quote the copies for generation of the libtool script.
11017   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11018     SED SHELL STRIP \
11019     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11020     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11021     deplibs_check_method reload_flag reload_cmds need_locks \
11022     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11023     lt_cv_sys_global_symbol_to_c_name_address \
11024     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11025     old_postinstall_cmds old_postuninstall_cmds \
11026     compiler \
11027     CC \
11028     LD \
11029     lt_prog_compiler_wl \
11030     lt_prog_compiler_pic \
11031     lt_prog_compiler_static \
11032     lt_prog_compiler_no_builtin_flag \
11033     export_dynamic_flag_spec \
11034     thread_safe_flag_spec \
11035     whole_archive_flag_spec \
11036     enable_shared_with_static_runtimes \
11037     old_archive_cmds \
11038     old_archive_from_new_cmds \
11039     predep_objects \
11040     postdep_objects \
11041     predeps \
11042     postdeps \
11043     compiler_lib_search_path \
11044     archive_cmds \
11045     archive_expsym_cmds \
11046     postinstall_cmds \
11047     postuninstall_cmds \
11048     old_archive_from_expsyms_cmds \
11049     allow_undefined_flag \
11050     no_undefined_flag \
11051     export_symbols_cmds \
11052     hardcode_libdir_flag_spec \
11053     hardcode_libdir_flag_spec_ld \
11054     hardcode_libdir_separator \
11055     hardcode_automatic \
11056     module_cmds \
11057     module_expsym_cmds \
11058     lt_cv_prog_compiler_c_o \
11059     exclude_expsyms \
11060     include_expsyms; do
11061
11062     case $var in
11063     old_archive_cmds | \
11064     old_archive_from_new_cmds | \
11065     archive_cmds | \
11066     archive_expsym_cmds | \
11067     module_cmds | \
11068     module_expsym_cmds | \
11069     old_archive_from_expsyms_cmds | \
11070     export_symbols_cmds | \
11071     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11072     postinstall_cmds | postuninstall_cmds | \
11073     old_postinstall_cmds | old_postuninstall_cmds | \
11074     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11075       # Double-quote double-evaled strings.
11076       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11077       ;;
11078     *)
11079       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11080       ;;
11081     esac
11082   done
11083
11084   case $lt_echo in
11085   *'\$0 --fallback-echo"')
11086     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11087     ;;
11088   esac
11089
11090 cfgfile="${ofile}T"
11091   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
11092   $rm -f "$cfgfile"
11093   { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
11094 $as_echo "$as_me: creating $ofile" >&6;}
11095
11096   cat <<__EOF__ >> "$cfgfile"
11097 #! $SHELL
11098
11099 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
11100 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
11101 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
11102 #
11103 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
11104 # Free Software Foundation, Inc.
11105 #
11106 # This file is part of GNU Libtool:
11107 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
11108 #
11109 # This program is free software; you can redistribute it and/or modify
11110 # it under the terms of the GNU General Public License as published by
11111 # the Free Software Foundation; either version 2 of the License, or
11112 # (at your option) any later version.
11113 #
11114 # This program is distributed in the hope that it will be useful, but
11115 # WITHOUT ANY WARRANTY; without even the implied warranty of
11116 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11117 # General Public License for more details.
11118 #
11119 # You should have received a copy of the GNU General Public License
11120 # along with this program; if not, write to the Free Software
11121 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
11122 #
11123 # As a special exception to the GNU General Public License, if you
11124 # distribute this file as part of a program that contains a
11125 # configuration script generated by Autoconf, you may include it under
11126 # the same distribution terms that you use for the rest of that program.
11127
11128 # A sed program that does not truncate output.
11129 SED=$lt_SED
11130
11131 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
11132 Xsed="$SED -e 1s/^X//"
11133
11134 # The HP-UX ksh and POSIX shell print the target directory to stdout
11135 # if CDPATH is set.
11136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11137
11138 # The names of the tagged configurations supported by this script.
11139 available_tags=
11140
11141 # ### BEGIN LIBTOOL CONFIG
11142
11143 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11144
11145 # Shell to use when invoking shell scripts.
11146 SHELL=$lt_SHELL
11147
11148 # Whether or not to build shared libraries.
11149 build_libtool_libs=$enable_shared
11150
11151 # Whether or not to build static libraries.
11152 build_old_libs=$enable_static
11153
11154 # Whether or not to add -lc for building shared libraries.
11155 build_libtool_need_lc=$archive_cmds_need_lc
11156
11157 # Whether or not to disallow shared libs when runtime libs are static
11158 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
11159
11160 # Whether or not to optimize for fast installation.
11161 fast_install=$enable_fast_install
11162
11163 # The host system.
11164 host_alias=$host_alias
11165 host=$host
11166 host_os=$host_os
11167
11168 # The build system.
11169 build_alias=$build_alias
11170 build=$build
11171 build_os=$build_os
11172
11173 # An echo program that does not interpret backslashes.
11174 echo=$lt_echo
11175
11176 # The archiver.
11177 AR=$lt_AR
11178 AR_FLAGS=$lt_AR_FLAGS
11179
11180 # A C compiler.
11181 LTCC=$lt_LTCC
11182
11183 # A language-specific compiler.
11184 CC=$lt_compiler
11185
11186 # Is the compiler the GNU C compiler?
11187 with_gcc=$GCC
11188
11189 # An ERE matcher.
11190 EGREP=$lt_EGREP
11191
11192 # The linker used to build libraries.
11193 LD=$lt_LD
11194
11195 # Whether we need hard or soft links.
11196 LN_S=$lt_LN_S
11197
11198 # A BSD-compatible nm program.
11199 NM=$lt_NM
11200
11201 # A symbol stripping program
11202 STRIP=$lt_STRIP
11203
11204 # Used to examine libraries when file_magic_cmd begins "file"
11205 MAGIC_CMD=$MAGIC_CMD
11206
11207 # Used on cygwin: DLL creation program.
11208 DLLTOOL="$DLLTOOL"
11209
11210 # Used on cygwin: object dumper.
11211 OBJDUMP="$OBJDUMP"
11212
11213 # Used on cygwin: assembler.
11214 AS="$AS"
11215
11216 # The name of the directory that contains temporary libtool files.
11217 objdir=$objdir
11218
11219 # How to create reloadable object files.
11220 reload_flag=$lt_reload_flag
11221 reload_cmds=$lt_reload_cmds
11222
11223 # How to pass a linker flag through the compiler.
11224 wl=$lt_lt_prog_compiler_wl
11225
11226 # Object file suffix (normally "o").
11227 objext="$ac_objext"
11228
11229 # Old archive suffix (normally "a").
11230 libext="$libext"
11231
11232 # Shared library suffix (normally ".so").
11233 shrext_cmds='$shrext_cmds'
11234
11235 # Executable file suffix (normally "").
11236 exeext="$exeext"
11237
11238 # Additional compiler flags for building library objects.
11239 pic_flag=$lt_lt_prog_compiler_pic
11240 pic_mode=$pic_mode
11241
11242 # What is the maximum length of a command?
11243 max_cmd_len=$lt_cv_sys_max_cmd_len
11244
11245 # Does compiler simultaneously support -c and -o options?
11246 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
11247
11248 # Must we lock files when doing compilation?
11249 need_locks=$lt_need_locks
11250
11251 # Do we need the lib prefix for modules?
11252 need_lib_prefix=$need_lib_prefix
11253
11254 # Do we need a version for libraries?
11255 need_version=$need_version
11256
11257 # Whether dlopen is supported.
11258 dlopen_support=$enable_dlopen
11259
11260 # Whether dlopen of programs is supported.
11261 dlopen_self=$enable_dlopen_self
11262
11263 # Whether dlopen of statically linked programs is supported.
11264 dlopen_self_static=$enable_dlopen_self_static
11265
11266 # Compiler flag to prevent dynamic linking.
11267 link_static_flag=$lt_lt_prog_compiler_static
11268
11269 # Compiler flag to turn off builtin functions.
11270 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
11271
11272 # Compiler flag to allow reflexive dlopens.
11273 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
11274
11275 # Compiler flag to generate shared objects directly from archives.
11276 whole_archive_flag_spec=$lt_whole_archive_flag_spec
11277
11278 # Compiler flag to generate thread-safe objects.
11279 thread_safe_flag_spec=$lt_thread_safe_flag_spec
11280
11281 # Library versioning type.
11282 version_type=$version_type
11283
11284 # Format of library name prefix.
11285 libname_spec=$lt_libname_spec
11286
11287 # List of archive names.  First name is the real one, the rest are links.
11288 # The last name is the one that the linker finds with -lNAME.
11289 library_names_spec=$lt_library_names_spec
11290
11291 # The coded name of the library, if different from the real name.
11292 soname_spec=$lt_soname_spec
11293
11294 # Commands used to build and install an old-style archive.
11295 RANLIB=$lt_RANLIB
11296 old_archive_cmds=$lt_old_archive_cmds
11297 old_postinstall_cmds=$lt_old_postinstall_cmds
11298 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11299
11300 # Create an old-style archive from a shared archive.
11301 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
11302
11303 # Create a temporary old-style archive to link instead of a shared archive.
11304 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
11305
11306 # Commands used to build and install a shared archive.
11307 archive_cmds=$lt_archive_cmds
11308 archive_expsym_cmds=$lt_archive_expsym_cmds
11309 postinstall_cmds=$lt_postinstall_cmds
11310 postuninstall_cmds=$lt_postuninstall_cmds
11311
11312 # Commands used to build a loadable module (assumed same as above if empty)
11313 module_cmds=$lt_module_cmds
11314 module_expsym_cmds=$lt_module_expsym_cmds
11315
11316 # Commands to strip libraries.
11317 old_striplib=$lt_old_striplib
11318 striplib=$lt_striplib
11319
11320 # Dependencies to place before the objects being linked to create a
11321 # shared library.
11322 predep_objects=$lt_predep_objects
11323
11324 # Dependencies to place after the objects being linked to create a
11325 # shared library.
11326 postdep_objects=$lt_postdep_objects
11327
11328 # Dependencies to place before the objects being linked to create a
11329 # shared library.
11330 predeps=$lt_predeps
11331
11332 # Dependencies to place after the objects being linked to create a
11333 # shared library.
11334 postdeps=$lt_postdeps
11335
11336 # The library search path used internally by the compiler when linking
11337 # a shared library.
11338 compiler_lib_search_path=$lt_compiler_lib_search_path
11339
11340 # Method to check whether dependent libraries are shared objects.
11341 deplibs_check_method=$lt_deplibs_check_method
11342
11343 # Command to use when deplibs_check_method == file_magic.
11344 file_magic_cmd=$lt_file_magic_cmd
11345
11346 # Flag that allows shared libraries with undefined symbols to be built.
11347 allow_undefined_flag=$lt_allow_undefined_flag
11348
11349 # Flag that forces no undefined symbols.
11350 no_undefined_flag=$lt_no_undefined_flag
11351
11352 # Commands used to finish a libtool library installation in a directory.
11353 finish_cmds=$lt_finish_cmds
11354
11355 # Same as above, but a single script fragment to be evaled but not shown.
11356 finish_eval=$lt_finish_eval
11357
11358 # Take the output of nm and produce a listing of raw symbols and C names.
11359 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11360
11361 # Transform the output of nm in a proper C declaration
11362 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11363
11364 # Transform the output of nm in a C name address pair
11365 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11366
11367 # This is the shared library runtime path variable.
11368 runpath_var=$runpath_var
11369
11370 # This is the shared library path variable.
11371 shlibpath_var=$shlibpath_var
11372
11373 # Is shlibpath searched before the hard-coded library search path?
11374 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11375
11376 # How to hardcode a shared library path into an executable.
11377 hardcode_action=$hardcode_action
11378
11379 # Whether we should hardcode library paths into libraries.
11380 hardcode_into_libs=$hardcode_into_libs
11381
11382 # Flag to hardcode \$libdir into a binary during linking.
11383 # This must work even if \$libdir does not exist.
11384 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
11385
11386 # If ld is used when linking, flag to hardcode \$libdir into
11387 # a binary during linking. This must work even if \$libdir does
11388 # not exist.
11389 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
11390
11391 # Whether we need a single -rpath flag with a separated argument.
11392 hardcode_libdir_separator=$lt_hardcode_libdir_separator
11393
11394 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11395 # resulting binary.
11396 hardcode_direct=$hardcode_direct
11397
11398 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11399 # resulting binary.
11400 hardcode_minus_L=$hardcode_minus_L
11401
11402 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11403 # the resulting binary.
11404 hardcode_shlibpath_var=$hardcode_shlibpath_var
11405
11406 # Set to yes if building a shared library automatically hardcodes DIR into the library
11407 # and all subsequent libraries and executables linked against it.
11408 hardcode_automatic=$hardcode_automatic
11409
11410 # Variables whose values should be saved in libtool wrapper scripts and
11411 # restored at relink time.
11412 variables_saved_for_relink="$variables_saved_for_relink"
11413
11414 # Whether libtool must link a program against all its dependency libraries.
11415 link_all_deplibs=$link_all_deplibs
11416
11417 # Compile-time system search path for libraries
11418 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11419
11420 # Run-time system search path for libraries
11421 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11422
11423 # Fix the shell variable \$srcfile for the compiler.
11424 fix_srcfile_path="$fix_srcfile_path"
11425
11426 # Set to yes if exported symbols are required.
11427 always_export_symbols=$always_export_symbols
11428
11429 # The commands to list exported symbols.
11430 export_symbols_cmds=$lt_export_symbols_cmds
11431
11432 # The commands to extract the exported symbol list from a shared archive.
11433 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11434
11435 # Symbols that should not be listed in the preloaded symbols.
11436 exclude_expsyms=$lt_exclude_expsyms
11437
11438 # Symbols that must always be exported.
11439 include_expsyms=$lt_include_expsyms
11440
11441 # ### END LIBTOOL CONFIG
11442
11443 __EOF__
11444
11445
11446   case $host_os in
11447   aix3*)
11448     cat <<\EOF >> "$cfgfile"
11449
11450 # AIX sometimes has problems with the GCC collect2 program.  For some
11451 # reason, if we set the COLLECT_NAMES environment variable, the problems
11452 # vanish in a puff of smoke.
11453 if test "X${COLLECT_NAMES+set}" != Xset; then
11454   COLLECT_NAMES=
11455   export COLLECT_NAMES
11456 fi
11457 EOF
11458     ;;
11459   esac
11460
11461   # We use sed instead of cat because bash on DJGPP gets confused if
11462   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
11463   # text mode, it properly converts lines to CR/LF.  This bash problem
11464   # is reportedly fixed, but why not run on old versions too?
11465   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
11466
11467   mv -f "$cfgfile" "$ofile" || \
11468     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
11469   chmod +x "$ofile"
11470
11471 else
11472   # If there is no Makefile yet, we rely on a make rule to execute
11473   # `config.status --recheck' to rerun these tests and create the
11474   # libtool script then.
11475   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11476   if test -f "$ltmain_in"; then
11477     test -f Makefile && make "$ltmain"
11478   fi
11479 fi
11480
11481
11482 ac_ext=c
11483 ac_cpp='$CPP $CPPFLAGS'
11484 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11485 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11486 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11487
11488 CC="$lt_save_CC"
11489
11490
11491 # Check whether --with-tags was given.
11492 if test "${with_tags+set}" = set; then :
11493   withval=$with_tags; tagnames="$withval"
11494 fi
11495
11496
11497 if test -f "$ltmain" && test -n "$tagnames"; then
11498   if test ! -f "${ofile}"; then
11499     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist" >&5
11500 $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11501   fi
11502
11503   if test -z "$LTCC"; then
11504     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11505     if test -z "$LTCC"; then
11506       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11507 $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11508     else
11509       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11510 $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11511     fi
11512   fi
11513
11514   # Extract list of available tagged configurations in $ofile.
11515   # Note that this assumes the entire list is on one line.
11516   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11517
11518   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11519   for tagname in $tagnames; do
11520     IFS="$lt_save_ifs"
11521     # Check whether tagname contains only valid characters
11522     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11523     "") ;;
11524     *)  as_fn_error "invalid tag name: $tagname" "$LINENO" 5
11525         ;;
11526     esac
11527
11528     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11529     then
11530       as_fn_error "tag name \"$tagname\" already exists" "$LINENO" 5
11531     fi
11532
11533     # Update the list of available tags.
11534     if test -n "$tagname"; then
11535       echo appending configuration tag \"$tagname\" to $ofile
11536
11537       case $tagname in
11538       CXX)
11539         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11540             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11541             (test "X$CXX" != "Xg++"))) ; then
11542           :
11543         else
11544           tagname=""
11545         fi
11546         ;;
11547
11548       F77)
11549         if test -n "$F77" && test "X$F77" != "Xno"; then
11550           :
11551         else
11552           tagname=""
11553         fi
11554         ;;
11555
11556       GCJ)
11557         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11558           :
11559         else
11560           tagname=""
11561         fi
11562         ;;
11563
11564       RC)
11565
11566
11567 # Source file extension for RC test sources.
11568 ac_ext=rc
11569
11570 # Object file extension for compiled RC test sources.
11571 objext=o
11572 objext_RC=$objext
11573
11574 # Code to be used in simple compile tests
11575 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11576
11577 # Code to be used in simple link tests
11578 lt_simple_link_test_code="$lt_simple_compile_test_code"
11579
11580 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11581
11582 # If no C compiler was specified, use CC.
11583 LTCC=${LTCC-"$CC"}
11584
11585 # Allow CC to be a program name with arguments.
11586 compiler=$CC
11587
11588
11589 # save warnings/boilerplate of simple test code
11590 ac_outfile=conftest.$ac_objext
11591 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11592 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11593 _lt_compiler_boilerplate=`cat conftest.err`
11594 $rm conftest*
11595
11596 ac_outfile=conftest.$ac_objext
11597 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11598 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11599 _lt_linker_boilerplate=`cat conftest.err`
11600 $rm conftest*
11601
11602
11603 # Allow CC to be a program name with arguments.
11604 lt_save_CC="$CC"
11605 CC=${RC-"windres"}
11606 compiler=$CC
11607 compiler_RC=$CC
11608 for cc_temp in $compiler""; do
11609   case $cc_temp in
11610     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11611     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11612     \-*) ;;
11613     *) break;;
11614   esac
11615 done
11616 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11617
11618 lt_cv_prog_compiler_c_o_RC=yes
11619
11620 # The else clause should only fire when bootstrapping the
11621 # libtool distribution, otherwise you forgot to ship ltmain.sh
11622 # with your package, and you will get complaints that there are
11623 # no rules to generate ltmain.sh.
11624 if test -f "$ltmain"; then
11625   # See if we are running on zsh, and set the options which allow our commands through
11626   # without removal of \ escapes.
11627   if test -n "${ZSH_VERSION+set}" ; then
11628     setopt NO_GLOB_SUBST
11629   fi
11630   # Now quote all the things that may contain metacharacters while being
11631   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11632   # variables and quote the copies for generation of the libtool script.
11633   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11634     SED SHELL STRIP \
11635     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11636     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11637     deplibs_check_method reload_flag reload_cmds need_locks \
11638     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11639     lt_cv_sys_global_symbol_to_c_name_address \
11640     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11641     old_postinstall_cmds old_postuninstall_cmds \
11642     compiler_RC \
11643     CC_RC \
11644     LD_RC \
11645     lt_prog_compiler_wl_RC \
11646     lt_prog_compiler_pic_RC \
11647     lt_prog_compiler_static_RC \
11648     lt_prog_compiler_no_builtin_flag_RC \
11649     export_dynamic_flag_spec_RC \
11650     thread_safe_flag_spec_RC \
11651     whole_archive_flag_spec_RC \
11652     enable_shared_with_static_runtimes_RC \
11653     old_archive_cmds_RC \
11654     old_archive_from_new_cmds_RC \
11655     predep_objects_RC \
11656     postdep_objects_RC \
11657     predeps_RC \
11658     postdeps_RC \
11659     compiler_lib_search_path_RC \
11660     archive_cmds_RC \
11661     archive_expsym_cmds_RC \
11662     postinstall_cmds_RC \
11663     postuninstall_cmds_RC \
11664     old_archive_from_expsyms_cmds_RC \
11665     allow_undefined_flag_RC \
11666     no_undefined_flag_RC \
11667     export_symbols_cmds_RC \
11668     hardcode_libdir_flag_spec_RC \
11669     hardcode_libdir_flag_spec_ld_RC \
11670     hardcode_libdir_separator_RC \
11671     hardcode_automatic_RC \
11672     module_cmds_RC \
11673     module_expsym_cmds_RC \
11674     lt_cv_prog_compiler_c_o_RC \
11675     exclude_expsyms_RC \
11676     include_expsyms_RC; do
11677
11678     case $var in
11679     old_archive_cmds_RC | \
11680     old_archive_from_new_cmds_RC | \
11681     archive_cmds_RC | \
11682     archive_expsym_cmds_RC | \
11683     module_cmds_RC | \
11684     module_expsym_cmds_RC | \
11685     old_archive_from_expsyms_cmds_RC | \
11686     export_symbols_cmds_RC | \
11687     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11688     postinstall_cmds | postuninstall_cmds | \
11689     old_postinstall_cmds | old_postuninstall_cmds | \
11690     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11691       # Double-quote double-evaled strings.
11692       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11693       ;;
11694     *)
11695       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11696       ;;
11697     esac
11698   done
11699
11700   case $lt_echo in
11701   *'\$0 --fallback-echo"')
11702     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11703     ;;
11704   esac
11705
11706 cfgfile="$ofile"
11707
11708   cat <<__EOF__ >> "$cfgfile"
11709 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11710
11711 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11712
11713 # Shell to use when invoking shell scripts.
11714 SHELL=$lt_SHELL
11715
11716 # Whether or not to build shared libraries.
11717 build_libtool_libs=$enable_shared
11718
11719 # Whether or not to build static libraries.
11720 build_old_libs=$enable_static
11721
11722 # Whether or not to add -lc for building shared libraries.
11723 build_libtool_need_lc=$archive_cmds_need_lc_RC
11724
11725 # Whether or not to disallow shared libs when runtime libs are static
11726 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11727
11728 # Whether or not to optimize for fast installation.
11729 fast_install=$enable_fast_install
11730
11731 # The host system.
11732 host_alias=$host_alias
11733 host=$host
11734 host_os=$host_os
11735
11736 # The build system.
11737 build_alias=$build_alias
11738 build=$build
11739 build_os=$build_os
11740
11741 # An echo program that does not interpret backslashes.
11742 echo=$lt_echo
11743
11744 # The archiver.
11745 AR=$lt_AR
11746 AR_FLAGS=$lt_AR_FLAGS
11747
11748 # A C compiler.
11749 LTCC=$lt_LTCC
11750
11751 # A language-specific compiler.
11752 CC=$lt_compiler_RC
11753
11754 # Is the compiler the GNU C compiler?
11755 with_gcc=$GCC_RC
11756
11757 # An ERE matcher.
11758 EGREP=$lt_EGREP
11759
11760 # The linker used to build libraries.
11761 LD=$lt_LD_RC
11762
11763 # Whether we need hard or soft links.
11764 LN_S=$lt_LN_S
11765
11766 # A BSD-compatible nm program.
11767 NM=$lt_NM
11768
11769 # A symbol stripping program
11770 STRIP=$lt_STRIP
11771
11772 # Used to examine libraries when file_magic_cmd begins "file"
11773 MAGIC_CMD=$MAGIC_CMD
11774
11775 # Used on cygwin: DLL creation program.
11776 DLLTOOL="$DLLTOOL"
11777
11778 # Used on cygwin: object dumper.
11779 OBJDUMP="$OBJDUMP"
11780
11781 # Used on cygwin: assembler.
11782 AS="$AS"
11783
11784 # The name of the directory that contains temporary libtool files.
11785 objdir=$objdir
11786
11787 # How to create reloadable object files.
11788 reload_flag=$lt_reload_flag
11789 reload_cmds=$lt_reload_cmds
11790
11791 # How to pass a linker flag through the compiler.
11792 wl=$lt_lt_prog_compiler_wl_RC
11793
11794 # Object file suffix (normally "o").
11795 objext="$ac_objext"
11796
11797 # Old archive suffix (normally "a").
11798 libext="$libext"
11799
11800 # Shared library suffix (normally ".so").
11801 shrext_cmds='$shrext_cmds'
11802
11803 # Executable file suffix (normally "").
11804 exeext="$exeext"
11805
11806 # Additional compiler flags for building library objects.
11807 pic_flag=$lt_lt_prog_compiler_pic_RC
11808 pic_mode=$pic_mode
11809
11810 # What is the maximum length of a command?
11811 max_cmd_len=$lt_cv_sys_max_cmd_len
11812
11813 # Does compiler simultaneously support -c and -o options?
11814 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11815
11816 # Must we lock files when doing compilation?
11817 need_locks=$lt_need_locks
11818
11819 # Do we need the lib prefix for modules?
11820 need_lib_prefix=$need_lib_prefix
11821
11822 # Do we need a version for libraries?
11823 need_version=$need_version
11824
11825 # Whether dlopen is supported.
11826 dlopen_support=$enable_dlopen
11827
11828 # Whether dlopen of programs is supported.
11829 dlopen_self=$enable_dlopen_self
11830
11831 # Whether dlopen of statically linked programs is supported.
11832 dlopen_self_static=$enable_dlopen_self_static
11833
11834 # Compiler flag to prevent dynamic linking.
11835 link_static_flag=$lt_lt_prog_compiler_static_RC
11836
11837 # Compiler flag to turn off builtin functions.
11838 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11839
11840 # Compiler flag to allow reflexive dlopens.
11841 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11842
11843 # Compiler flag to generate shared objects directly from archives.
11844 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11845
11846 # Compiler flag to generate thread-safe objects.
11847 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11848
11849 # Library versioning type.
11850 version_type=$version_type
11851
11852 # Format of library name prefix.
11853 libname_spec=$lt_libname_spec
11854
11855 # List of archive names.  First name is the real one, the rest are links.
11856 # The last name is the one that the linker finds with -lNAME.
11857 library_names_spec=$lt_library_names_spec
11858
11859 # The coded name of the library, if different from the real name.
11860 soname_spec=$lt_soname_spec
11861
11862 # Commands used to build and install an old-style archive.
11863 RANLIB=$lt_RANLIB
11864 old_archive_cmds=$lt_old_archive_cmds_RC
11865 old_postinstall_cmds=$lt_old_postinstall_cmds
11866 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11867
11868 # Create an old-style archive from a shared archive.
11869 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11870
11871 # Create a temporary old-style archive to link instead of a shared archive.
11872 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11873
11874 # Commands used to build and install a shared archive.
11875 archive_cmds=$lt_archive_cmds_RC
11876 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11877 postinstall_cmds=$lt_postinstall_cmds
11878 postuninstall_cmds=$lt_postuninstall_cmds
11879
11880 # Commands used to build a loadable module (assumed same as above if empty)
11881 module_cmds=$lt_module_cmds_RC
11882 module_expsym_cmds=$lt_module_expsym_cmds_RC
11883
11884 # Commands to strip libraries.
11885 old_striplib=$lt_old_striplib
11886 striplib=$lt_striplib
11887
11888 # Dependencies to place before the objects being linked to create a
11889 # shared library.
11890 predep_objects=$lt_predep_objects_RC
11891
11892 # Dependencies to place after the objects being linked to create a
11893 # shared library.
11894 postdep_objects=$lt_postdep_objects_RC
11895
11896 # Dependencies to place before the objects being linked to create a
11897 # shared library.
11898 predeps=$lt_predeps_RC
11899
11900 # Dependencies to place after the objects being linked to create a
11901 # shared library.
11902 postdeps=$lt_postdeps_RC
11903
11904 # The library search path used internally by the compiler when linking
11905 # a shared library.
11906 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
11907
11908 # Method to check whether dependent libraries are shared objects.
11909 deplibs_check_method=$lt_deplibs_check_method
11910
11911 # Command to use when deplibs_check_method == file_magic.
11912 file_magic_cmd=$lt_file_magic_cmd
11913
11914 # Flag that allows shared libraries with undefined symbols to be built.
11915 allow_undefined_flag=$lt_allow_undefined_flag_RC
11916
11917 # Flag that forces no undefined symbols.
11918 no_undefined_flag=$lt_no_undefined_flag_RC
11919
11920 # Commands used to finish a libtool library installation in a directory.
11921 finish_cmds=$lt_finish_cmds
11922
11923 # Same as above, but a single script fragment to be evaled but not shown.
11924 finish_eval=$lt_finish_eval
11925
11926 # Take the output of nm and produce a listing of raw symbols and C names.
11927 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11928
11929 # Transform the output of nm in a proper C declaration
11930 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11931
11932 # Transform the output of nm in a C name address pair
11933 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11934
11935 # This is the shared library runtime path variable.
11936 runpath_var=$runpath_var
11937
11938 # This is the shared library path variable.
11939 shlibpath_var=$shlibpath_var
11940
11941 # Is shlibpath searched before the hard-coded library search path?
11942 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11943
11944 # How to hardcode a shared library path into an executable.
11945 hardcode_action=$hardcode_action_RC
11946
11947 # Whether we should hardcode library paths into libraries.
11948 hardcode_into_libs=$hardcode_into_libs
11949
11950 # Flag to hardcode \$libdir into a binary during linking.
11951 # This must work even if \$libdir does not exist.
11952 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
11953
11954 # If ld is used when linking, flag to hardcode \$libdir into
11955 # a binary during linking. This must work even if \$libdir does
11956 # not exist.
11957 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
11958
11959 # Whether we need a single -rpath flag with a separated argument.
11960 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
11961
11962 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11963 # resulting binary.
11964 hardcode_direct=$hardcode_direct_RC
11965
11966 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11967 # resulting binary.
11968 hardcode_minus_L=$hardcode_minus_L_RC
11969
11970 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11971 # the resulting binary.
11972 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
11973
11974 # Set to yes if building a shared library automatically hardcodes DIR into the library
11975 # and all subsequent libraries and executables linked against it.
11976 hardcode_automatic=$hardcode_automatic_RC
11977
11978 # Variables whose values should be saved in libtool wrapper scripts and
11979 # restored at relink time.
11980 variables_saved_for_relink="$variables_saved_for_relink"
11981
11982 # Whether libtool must link a program against all its dependency libraries.
11983 link_all_deplibs=$link_all_deplibs_RC
11984
11985 # Compile-time system search path for libraries
11986 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11987
11988 # Run-time system search path for libraries
11989 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11990
11991 # Fix the shell variable \$srcfile for the compiler.
11992 fix_srcfile_path="$fix_srcfile_path_RC"
11993
11994 # Set to yes if exported symbols are required.
11995 always_export_symbols=$always_export_symbols_RC
11996
11997 # The commands to list exported symbols.
11998 export_symbols_cmds=$lt_export_symbols_cmds_RC
11999
12000 # The commands to extract the exported symbol list from a shared archive.
12001 extract_expsyms_cmds=$lt_extract_expsyms_cmds
12002
12003 # Symbols that should not be listed in the preloaded symbols.
12004 exclude_expsyms=$lt_exclude_expsyms_RC
12005
12006 # Symbols that must always be exported.
12007 include_expsyms=$lt_include_expsyms_RC
12008
12009 # ### END LIBTOOL TAG CONFIG: $tagname
12010
12011 __EOF__
12012
12013
12014 else
12015   # If there is no Makefile yet, we rely on a make rule to execute
12016   # `config.status --recheck' to rerun these tests and create the
12017   # libtool script then.
12018   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
12019   if test -f "$ltmain_in"; then
12020     test -f Makefile && make "$ltmain"
12021   fi
12022 fi
12023
12024
12025 ac_ext=c
12026 ac_cpp='$CPP $CPPFLAGS'
12027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12030
12031 CC="$lt_save_CC"
12032
12033         ;;
12034
12035       *)
12036         as_fn_error "Unsupported tag name: $tagname" "$LINENO" 5
12037         ;;
12038       esac
12039
12040       # Append the new tag name to the list of available tags.
12041       if test -n "$tagname" ; then
12042       available_tags="$available_tags $tagname"
12043     fi
12044     fi
12045   done
12046   IFS="$lt_save_ifs"
12047
12048   # Now substitute the updated list of available tags.
12049   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
12050     mv "${ofile}T" "$ofile"
12051     chmod +x "$ofile"
12052   else
12053     rm -f "${ofile}T"
12054     as_fn_error "unable to update list of available tagged configurations." "$LINENO" 5
12055   fi
12056 fi
12057
12058
12059
12060 # This can be used to rebuild libtool when needed
12061 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
12062
12063 # Always use our own libtool.
12064 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
12065
12066 # Prevent multiple expansion
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077 ol_link_perl=no
12078 if test $ol_enable_perl != no ; then
12079         # Extract the first word of "perl", so it can be a program name with args.
12080 set dummy perl; ac_word=$2
12081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12082 $as_echo_n "checking for $ac_word... " >&6; }
12083 if test "${ac_cv_path_PERLBIN+set}" = set; then :
12084   $as_echo_n "(cached) " >&6
12085 else
12086   case $PERLBIN in
12087   [\\/]* | ?:[\\/]*)
12088   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
12089   ;;
12090   *)
12091   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12092 for as_dir in $PATH
12093 do
12094   IFS=$as_save_IFS
12095   test -z "$as_dir" && as_dir=.
12096     for ac_exec_ext in '' $ac_executable_extensions; do
12097   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12098     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
12099     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12100     break 2
12101   fi
12102 done
12103   done
12104 IFS=$as_save_IFS
12105
12106   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
12107   ;;
12108 esac
12109 fi
12110 PERLBIN=$ac_cv_path_PERLBIN
12111 if test -n "$PERLBIN"; then
12112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLBIN" >&5
12113 $as_echo "$PERLBIN" >&6; }
12114 else
12115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12116 $as_echo "no" >&6; }
12117 fi
12118
12119
12120
12121         if test "no$PERLBIN" = "no" ; then
12122                 if test $ol_enable_perl = yes ; then
12123                         as_fn_error "could not locate perl" "$LINENO" 5
12124                 fi
12125
12126         else
12127                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
12128                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
12129
12130                 if test x"$ol_enable_perl" = "xyes" ; then
12131                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
12132                 else
12133                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
12134                 fi
12135                                 ol_link_perl=yes
12136         fi
12137 fi
12138
12139 ac_ext=c
12140 ac_cpp='$CPP $CPPFLAGS'
12141 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12142 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12143 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
12145 $as_echo_n "checking how to run the C preprocessor... " >&6; }
12146 # On Suns, sometimes $CPP names a directory.
12147 if test -n "$CPP" && test -d "$CPP"; then
12148   CPP=
12149 fi
12150 if test -z "$CPP"; then
12151   if test "${ac_cv_prog_CPP+set}" = set; then :
12152   $as_echo_n "(cached) " >&6
12153 else
12154       # Double quotes because CPP needs to be expanded
12155     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
12156     do
12157       ac_preproc_ok=false
12158 for ac_c_preproc_warn_flag in '' yes
12159 do
12160   # Use a header file that comes with gcc, so configuring glibc
12161   # with a fresh cross-compiler works.
12162   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12163   # <limits.h> exists even on freestanding compilers.
12164   # On the NeXT, cc -E runs the code through the compiler's parser,
12165   # not just through cpp. "Syntax error" is here to catch this case.
12166   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12167 /* end confdefs.h.  */
12168 #ifdef __STDC__
12169 # include <limits.h>
12170 #else
12171 # include <assert.h>
12172 #endif
12173                      Syntax error
12174 _ACEOF
12175 if ac_fn_c_try_cpp "$LINENO"; then :
12176
12177 else
12178   # Broken: fails on valid input.
12179 continue
12180 fi
12181 rm -f conftest.err conftest.$ac_ext
12182
12183   # OK, works on sane cases.  Now check whether nonexistent headers
12184   # can be detected and how.
12185   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12186 /* end confdefs.h.  */
12187 #include <ac_nonexistent.h>
12188 _ACEOF
12189 if ac_fn_c_try_cpp "$LINENO"; then :
12190   # Broken: success on invalid input.
12191 continue
12192 else
12193   # Passes both tests.
12194 ac_preproc_ok=:
12195 break
12196 fi
12197 rm -f conftest.err conftest.$ac_ext
12198
12199 done
12200 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12201 rm -f conftest.err conftest.$ac_ext
12202 if $ac_preproc_ok; then :
12203   break
12204 fi
12205
12206     done
12207     ac_cv_prog_CPP=$CPP
12208
12209 fi
12210   CPP=$ac_cv_prog_CPP
12211 else
12212   ac_cv_prog_CPP=$CPP
12213 fi
12214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
12215 $as_echo "$CPP" >&6; }
12216 ac_preproc_ok=false
12217 for ac_c_preproc_warn_flag in '' yes
12218 do
12219   # Use a header file that comes with gcc, so configuring glibc
12220   # with a fresh cross-compiler works.
12221   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12222   # <limits.h> exists even on freestanding compilers.
12223   # On the NeXT, cc -E runs the code through the compiler's parser,
12224   # not just through cpp. "Syntax error" is here to catch this case.
12225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12226 /* end confdefs.h.  */
12227 #ifdef __STDC__
12228 # include <limits.h>
12229 #else
12230 # include <assert.h>
12231 #endif
12232                      Syntax error
12233 _ACEOF
12234 if ac_fn_c_try_cpp "$LINENO"; then :
12235
12236 else
12237   # Broken: fails on valid input.
12238 continue
12239 fi
12240 rm -f conftest.err conftest.$ac_ext
12241
12242   # OK, works on sane cases.  Now check whether nonexistent headers
12243   # can be detected and how.
12244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12245 /* end confdefs.h.  */
12246 #include <ac_nonexistent.h>
12247 _ACEOF
12248 if ac_fn_c_try_cpp "$LINENO"; then :
12249   # Broken: success on invalid input.
12250 continue
12251 else
12252   # Passes both tests.
12253 ac_preproc_ok=:
12254 break
12255 fi
12256 rm -f conftest.err conftest.$ac_ext
12257
12258 done
12259 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12260 rm -f conftest.err conftest.$ac_ext
12261 if $ac_preproc_ok; then :
12262
12263 else
12264   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12265 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12266 as_fn_error "C preprocessor \"$CPP\" fails sanity check
12267 See \`config.log' for more details." "$LINENO" 5; }
12268 fi
12269
12270 ac_ext=c
12271 ac_cpp='$CPP $CPPFLAGS'
12272 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12273 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12274 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12275
12276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using MS Visual C++" >&5
12277 $as_echo_n "checking whether we are using MS Visual C++... " >&6; }
12278 if test "${ol_cv_msvc+set}" = set; then :
12279   $as_echo_n "(cached) " >&6
12280 else
12281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12282 /* end confdefs.h.  */
12283
12284 #ifndef _MSC_VER
12285 #include <__FOO__/generate_error.h>
12286 #endif
12287
12288 _ACEOF
12289 if ac_fn_c_try_cpp "$LINENO"; then :
12290   ol_cv_msvc=yes
12291 else
12292   ol_cv_msvc=no
12293 fi
12294 rm -f conftest.err conftest.$ac_ext
12295 fi
12296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_msvc" >&5
12297 $as_echo "$ol_cv_msvc" >&6; }
12298
12299 case $host_os in
12300   *mingw32* ) ac_cv_mingw32=yes ;;
12301   *cygwin* ) ac_cv_cygwin=yes ;;
12302   *interix* ) ac_cv_interix=yes ;;
12303 esac
12304
12305
12306
12307
12308 cat >>confdefs.h <<_ACEOF
12309 #define EXEEXT "${EXEEXT}"
12310 _ACEOF
12311
12312
12313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for be_app in -lbe" >&5
12314 $as_echo_n "checking for be_app in -lbe... " >&6; }
12315 if test "${ac_cv_lib_be_be_app+set}" = set; then :
12316   $as_echo_n "(cached) " >&6
12317 else
12318   ac_check_lib_save_LIBS=$LIBS
12319 LIBS="-lbe -lroot -lnet $LIBS"
12320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12321 /* end confdefs.h.  */
12322
12323 /* Override any GCC internal prototype to avoid an error.
12324    Use char because int might match the return type of a GCC
12325    builtin and then its argument prototype would still apply.  */
12326 #ifdef __cplusplus
12327 extern "C"
12328 #endif
12329 char be_app ();
12330 int
12331 main ()
12332 {
12333 return be_app ();
12334   ;
12335   return 0;
12336 }
12337 _ACEOF
12338 if ac_fn_c_try_link "$LINENO"; then :
12339   ac_cv_lib_be_be_app=yes
12340 else
12341   ac_cv_lib_be_be_app=no
12342 fi
12343 rm -f core conftest.err conftest.$ac_objext \
12344     conftest$ac_exeext conftest.$ac_ext
12345 LIBS=$ac_check_lib_save_LIBS
12346 fi
12347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_be_be_app" >&5
12348 $as_echo "$ac_cv_lib_be_be_app" >&6; }
12349 if test "x$ac_cv_lib_be_be_app" = x""yes; then :
12350   LIBS="$LIBS -lbe -lroot -lnet"
12351 else
12352   :
12353 fi
12354
12355
12356 ac_ext=c
12357 ac_cpp='$CPP $CPPFLAGS'
12358 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12359 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12360 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12361 if test -n "$ac_tool_prefix"; then
12362   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
12363 set dummy ${ac_tool_prefix}gcc; ac_word=$2
12364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12365 $as_echo_n "checking for $ac_word... " >&6; }
12366 if test "${ac_cv_prog_CC+set}" = set; then :
12367   $as_echo_n "(cached) " >&6
12368 else
12369   if test -n "$CC"; then
12370   ac_cv_prog_CC="$CC" # Let the user override the test.
12371 else
12372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12373 for as_dir in $PATH
12374 do
12375   IFS=$as_save_IFS
12376   test -z "$as_dir" && as_dir=.
12377     for ac_exec_ext in '' $ac_executable_extensions; do
12378   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12379     ac_cv_prog_CC="${ac_tool_prefix}gcc"
12380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12381     break 2
12382   fi
12383 done
12384   done
12385 IFS=$as_save_IFS
12386
12387 fi
12388 fi
12389 CC=$ac_cv_prog_CC
12390 if test -n "$CC"; then
12391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12392 $as_echo "$CC" >&6; }
12393 else
12394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12395 $as_echo "no" >&6; }
12396 fi
12397
12398
12399 fi
12400 if test -z "$ac_cv_prog_CC"; then
12401   ac_ct_CC=$CC
12402   # Extract the first word of "gcc", so it can be a program name with args.
12403 set dummy gcc; ac_word=$2
12404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12405 $as_echo_n "checking for $ac_word... " >&6; }
12406 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
12407   $as_echo_n "(cached) " >&6
12408 else
12409   if test -n "$ac_ct_CC"; then
12410   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12411 else
12412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12413 for as_dir in $PATH
12414 do
12415   IFS=$as_save_IFS
12416   test -z "$as_dir" && as_dir=.
12417     for ac_exec_ext in '' $ac_executable_extensions; do
12418   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12419     ac_cv_prog_ac_ct_CC="gcc"
12420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12421     break 2
12422   fi
12423 done
12424   done
12425 IFS=$as_save_IFS
12426
12427 fi
12428 fi
12429 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12430 if test -n "$ac_ct_CC"; then
12431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12432 $as_echo "$ac_ct_CC" >&6; }
12433 else
12434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12435 $as_echo "no" >&6; }
12436 fi
12437
12438   if test "x$ac_ct_CC" = x; then
12439     CC=""
12440   else
12441     case $cross_compiling:$ac_tool_warned in
12442 yes:)
12443 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12444 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12445 ac_tool_warned=yes ;;
12446 esac
12447     CC=$ac_ct_CC
12448   fi
12449 else
12450   CC="$ac_cv_prog_CC"
12451 fi
12452
12453 if test -z "$CC"; then
12454           if test -n "$ac_tool_prefix"; then
12455     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12456 set dummy ${ac_tool_prefix}cc; ac_word=$2
12457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12458 $as_echo_n "checking for $ac_word... " >&6; }
12459 if test "${ac_cv_prog_CC+set}" = set; then :
12460   $as_echo_n "(cached) " >&6
12461 else
12462   if test -n "$CC"; then
12463   ac_cv_prog_CC="$CC" # Let the user override the test.
12464 else
12465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12466 for as_dir in $PATH
12467 do
12468   IFS=$as_save_IFS
12469   test -z "$as_dir" && as_dir=.
12470     for ac_exec_ext in '' $ac_executable_extensions; do
12471   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12472     ac_cv_prog_CC="${ac_tool_prefix}cc"
12473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12474     break 2
12475   fi
12476 done
12477   done
12478 IFS=$as_save_IFS
12479
12480 fi
12481 fi
12482 CC=$ac_cv_prog_CC
12483 if test -n "$CC"; then
12484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12485 $as_echo "$CC" >&6; }
12486 else
12487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488 $as_echo "no" >&6; }
12489 fi
12490
12491
12492   fi
12493 fi
12494 if test -z "$CC"; then
12495   # Extract the first word of "cc", so it can be a program name with args.
12496 set dummy cc; ac_word=$2
12497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12498 $as_echo_n "checking for $ac_word... " >&6; }
12499 if test "${ac_cv_prog_CC+set}" = set; then :
12500   $as_echo_n "(cached) " >&6
12501 else
12502   if test -n "$CC"; then
12503   ac_cv_prog_CC="$CC" # Let the user override the test.
12504 else
12505   ac_prog_rejected=no
12506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12507 for as_dir in $PATH
12508 do
12509   IFS=$as_save_IFS
12510   test -z "$as_dir" && as_dir=.
12511     for ac_exec_ext in '' $ac_executable_extensions; do
12512   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12513     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12514        ac_prog_rejected=yes
12515        continue
12516      fi
12517     ac_cv_prog_CC="cc"
12518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12519     break 2
12520   fi
12521 done
12522   done
12523 IFS=$as_save_IFS
12524
12525 if test $ac_prog_rejected = yes; then
12526   # We found a bogon in the path, so make sure we never use it.
12527   set dummy $ac_cv_prog_CC
12528   shift
12529   if test $# != 0; then
12530     # We chose a different compiler from the bogus one.
12531     # However, it has the same basename, so the bogon will be chosen
12532     # first if we set CC to just the basename; use the full file name.
12533     shift
12534     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12535   fi
12536 fi
12537 fi
12538 fi
12539 CC=$ac_cv_prog_CC
12540 if test -n "$CC"; then
12541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12542 $as_echo "$CC" >&6; }
12543 else
12544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12545 $as_echo "no" >&6; }
12546 fi
12547
12548
12549 fi
12550 if test -z "$CC"; then
12551   if test -n "$ac_tool_prefix"; then
12552   for ac_prog in cl.exe
12553   do
12554     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12555 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12557 $as_echo_n "checking for $ac_word... " >&6; }
12558 if test "${ac_cv_prog_CC+set}" = set; then :
12559   $as_echo_n "(cached) " >&6
12560 else
12561   if test -n "$CC"; then
12562   ac_cv_prog_CC="$CC" # Let the user override the test.
12563 else
12564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12565 for as_dir in $PATH
12566 do
12567   IFS=$as_save_IFS
12568   test -z "$as_dir" && as_dir=.
12569     for ac_exec_ext in '' $ac_executable_extensions; do
12570   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12571     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12573     break 2
12574   fi
12575 done
12576   done
12577 IFS=$as_save_IFS
12578
12579 fi
12580 fi
12581 CC=$ac_cv_prog_CC
12582 if test -n "$CC"; then
12583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12584 $as_echo "$CC" >&6; }
12585 else
12586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12587 $as_echo "no" >&6; }
12588 fi
12589
12590
12591     test -n "$CC" && break
12592   done
12593 fi
12594 if test -z "$CC"; then
12595   ac_ct_CC=$CC
12596   for ac_prog in cl.exe
12597 do
12598   # Extract the first word of "$ac_prog", so it can be a program name with args.
12599 set dummy $ac_prog; ac_word=$2
12600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12601 $as_echo_n "checking for $ac_word... " >&6; }
12602 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
12603   $as_echo_n "(cached) " >&6
12604 else
12605   if test -n "$ac_ct_CC"; then
12606   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12607 else
12608 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12609 for as_dir in $PATH
12610 do
12611   IFS=$as_save_IFS
12612   test -z "$as_dir" && as_dir=.
12613     for ac_exec_ext in '' $ac_executable_extensions; do
12614   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12615     ac_cv_prog_ac_ct_CC="$ac_prog"
12616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12617     break 2
12618   fi
12619 done
12620   done
12621 IFS=$as_save_IFS
12622
12623 fi
12624 fi
12625 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12626 if test -n "$ac_ct_CC"; then
12627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12628 $as_echo "$ac_ct_CC" >&6; }
12629 else
12630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12631 $as_echo "no" >&6; }
12632 fi
12633
12634
12635   test -n "$ac_ct_CC" && break
12636 done
12637
12638   if test "x$ac_ct_CC" = x; then
12639     CC=""
12640   else
12641     case $cross_compiling:$ac_tool_warned in
12642 yes:)
12643 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12644 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12645 ac_tool_warned=yes ;;
12646 esac
12647     CC=$ac_ct_CC
12648   fi
12649 fi
12650
12651 fi
12652
12653
12654 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12655 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12656 as_fn_error "no acceptable C compiler found in \$PATH
12657 See \`config.log' for more details." "$LINENO" 5; }
12658
12659 # Provide some information about the compiler.
12660 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
12661 set X $ac_compile
12662 ac_compiler=$2
12663 for ac_option in --version -v -V -qversion; do
12664   { { ac_try="$ac_compiler $ac_option >&5"
12665 case "(($ac_try" in
12666   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12667   *) ac_try_echo=$ac_try;;
12668 esac
12669 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12670 $as_echo "$ac_try_echo"; } >&5
12671   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
12672   ac_status=$?
12673   if test -s conftest.err; then
12674     sed '10a\
12675 ... rest of stderr output deleted ...
12676          10q' conftest.err >conftest.er1
12677     cat conftest.er1 >&5
12678   fi
12679   rm -f conftest.er1 conftest.err
12680   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12681   test $ac_status = 0; }
12682 done
12683
12684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
12685 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
12686 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
12687   $as_echo_n "(cached) " >&6
12688 else
12689   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12690 /* end confdefs.h.  */
12691
12692 int
12693 main ()
12694 {
12695 #ifndef __GNUC__
12696        choke me
12697 #endif
12698
12699   ;
12700   return 0;
12701 }
12702 _ACEOF
12703 if ac_fn_c_try_compile "$LINENO"; then :
12704   ac_compiler_gnu=yes
12705 else
12706   ac_compiler_gnu=no
12707 fi
12708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12709 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12710
12711 fi
12712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
12713 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
12714 if test $ac_compiler_gnu = yes; then
12715   GCC=yes
12716 else
12717   GCC=
12718 fi
12719 ac_test_CFLAGS=${CFLAGS+set}
12720 ac_save_CFLAGS=$CFLAGS
12721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
12722 $as_echo_n "checking whether $CC accepts -g... " >&6; }
12723 if test "${ac_cv_prog_cc_g+set}" = set; then :
12724   $as_echo_n "(cached) " >&6
12725 else
12726   ac_save_c_werror_flag=$ac_c_werror_flag
12727    ac_c_werror_flag=yes
12728    ac_cv_prog_cc_g=no
12729    CFLAGS="-g"
12730    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12731 /* end confdefs.h.  */
12732
12733 int
12734 main ()
12735 {
12736
12737   ;
12738   return 0;
12739 }
12740 _ACEOF
12741 if ac_fn_c_try_compile "$LINENO"; then :
12742   ac_cv_prog_cc_g=yes
12743 else
12744   CFLAGS=""
12745       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12746 /* end confdefs.h.  */
12747
12748 int
12749 main ()
12750 {
12751
12752   ;
12753   return 0;
12754 }
12755 _ACEOF
12756 if ac_fn_c_try_compile "$LINENO"; then :
12757
12758 else
12759   ac_c_werror_flag=$ac_save_c_werror_flag
12760          CFLAGS="-g"
12761          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12762 /* end confdefs.h.  */
12763
12764 int
12765 main ()
12766 {
12767
12768   ;
12769   return 0;
12770 }
12771 _ACEOF
12772 if ac_fn_c_try_compile "$LINENO"; then :
12773   ac_cv_prog_cc_g=yes
12774 fi
12775 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12776 fi
12777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12778 fi
12779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12780    ac_c_werror_flag=$ac_save_c_werror_flag
12781 fi
12782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
12783 $as_echo "$ac_cv_prog_cc_g" >&6; }
12784 if test "$ac_test_CFLAGS" = set; then
12785   CFLAGS=$ac_save_CFLAGS
12786 elif test $ac_cv_prog_cc_g = yes; then
12787   if test "$GCC" = yes; then
12788     CFLAGS="-g -O2"
12789   else
12790     CFLAGS="-g"
12791   fi
12792 else
12793   if test "$GCC" = yes; then
12794     CFLAGS="-O2"
12795   else
12796     CFLAGS=
12797   fi
12798 fi
12799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
12800 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
12801 if test "${ac_cv_prog_cc_c89+set}" = set; then :
12802   $as_echo_n "(cached) " >&6
12803 else
12804   ac_cv_prog_cc_c89=no
12805 ac_save_CC=$CC
12806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12807 /* end confdefs.h.  */
12808 #include <stdarg.h>
12809 #include <stdio.h>
12810 #include <sys/types.h>
12811 #include <sys/stat.h>
12812 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12813 struct buf { int x; };
12814 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12815 static char *e (p, i)
12816      char **p;
12817      int i;
12818 {
12819   return p[i];
12820 }
12821 static char *f (char * (*g) (char **, int), char **p, ...)
12822 {
12823   char *s;
12824   va_list v;
12825   va_start (v,p);
12826   s = g (p, va_arg (v,int));
12827   va_end (v);
12828   return s;
12829 }
12830
12831 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12832    function prototypes and stuff, but not '\xHH' hex character constants.
12833    These don't provoke an error unfortunately, instead are silently treated
12834    as 'x'.  The following induces an error, until -std is added to get
12835    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12836    array size at least.  It's necessary to write '\x00'==0 to get something
12837    that's true only with -std.  */
12838 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12839
12840 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
12841    inside strings and character constants.  */
12842 #define FOO(x) 'x'
12843 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
12844
12845 int test (int i, double x);
12846 struct s1 {int (*f) (int a);};
12847 struct s2 {int (*f) (double a);};
12848 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12849 int argc;
12850 char **argv;
12851 int
12852 main ()
12853 {
12854 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12855   ;
12856   return 0;
12857 }
12858 _ACEOF
12859 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
12860         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12861 do
12862   CC="$ac_save_CC $ac_arg"
12863   if ac_fn_c_try_compile "$LINENO"; then :
12864   ac_cv_prog_cc_c89=$ac_arg
12865 fi
12866 rm -f core conftest.err conftest.$ac_objext
12867   test "x$ac_cv_prog_cc_c89" != "xno" && break
12868 done
12869 rm -f conftest.$ac_ext
12870 CC=$ac_save_CC
12871
12872 fi
12873 # AC_CACHE_VAL
12874 case "x$ac_cv_prog_cc_c89" in
12875   x)
12876     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12877 $as_echo "none needed" >&6; } ;;
12878   xno)
12879     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12880 $as_echo "unsupported" >&6; } ;;
12881   *)
12882     CC="$CC $ac_cv_prog_cc_c89"
12883     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
12884 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
12885 esac
12886 if test "x$ac_cv_prog_cc_c89" != xno; then :
12887
12888 fi
12889
12890 ac_ext=c
12891 ac_cpp='$CPP $CPPFLAGS'
12892 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12893 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12894 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12895
12896 depcc="$CC"   am_compiler_list=
12897
12898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
12899 $as_echo_n "checking dependency style of $depcc... " >&6; }
12900 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
12901   $as_echo_n "(cached) " >&6
12902 else
12903   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12904   # We make a subdir and do the tests there.  Otherwise we can end up
12905   # making bogus files that we don't know about and never remove.  For
12906   # instance it was reported that on HP-UX the gcc test will end up
12907   # making a dummy file named `D' -- because `-MD' means `put the output
12908   # in D'.
12909   mkdir conftest.dir
12910   # Copy depcomp to subdir because otherwise we won't find it if we're
12911   # using a relative directory.
12912   cp "$am_depcomp" conftest.dir
12913   cd conftest.dir
12914   # We will build objects and dependencies in a subdirectory because
12915   # it helps to detect inapplicable dependency modes.  For instance
12916   # both Tru64's cc and ICC support -MD to output dependencies as a
12917   # side effect of compilation, but ICC will put the dependencies in
12918   # the current directory while Tru64 will put them in the object
12919   # directory.
12920   mkdir sub
12921
12922   am_cv_CC_dependencies_compiler_type=none
12923   if test "$am_compiler_list" = ""; then
12924      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12925   fi
12926   for depmode in $am_compiler_list; do
12927     # Setup a source with many dependencies, because some compilers
12928     # like to wrap large dependency lists on column 80 (with \), and
12929     # we should not choose a depcomp mode which is confused by this.
12930     #
12931     # We need to recreate these files for each test, as the compiler may
12932     # overwrite some of them when testing with obscure command lines.
12933     # This happens at least with the AIX C compiler.
12934     : > sub/conftest.c
12935     for i in 1 2 3 4 5 6; do
12936       echo '#include "conftst'$i'.h"' >> sub/conftest.c
12937       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12938       # Solaris 8's {/usr,}/bin/sh.
12939       touch sub/conftst$i.h
12940     done
12941     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12942
12943     case $depmode in
12944     nosideeffect)
12945       # after this tag, mechanisms are not by side-effect, so they'll
12946       # only be used when explicitly requested
12947       if test "x$enable_dependency_tracking" = xyes; then
12948         continue
12949       else
12950         break
12951       fi
12952       ;;
12953     none) break ;;
12954     esac
12955     # We check with `-c' and `-o' for the sake of the "dashmstdout"
12956     # mode.  It turns out that the SunPro C++ compiler does not properly
12957     # handle `-M -o', and we need to detect this.
12958     if depmode=$depmode \
12959        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
12960        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12961        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
12962          >/dev/null 2>conftest.err &&
12963        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12964        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
12965        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12966       # icc doesn't choke on unknown options, it will just issue warnings
12967       # or remarks (even with -Werror).  So we grep stderr for any message
12968       # that says an option was ignored or not supported.
12969       # When given -MP, icc 7.0 and 7.1 complain thusly:
12970       #   icc: Command line warning: ignoring option '-M'; no argument required
12971       # The diagnosis changed in icc 8.0:
12972       #   icc: Command line remark: option '-MP' not supported
12973       if (grep 'ignoring option' conftest.err ||
12974           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12975         am_cv_CC_dependencies_compiler_type=$depmode
12976         break
12977       fi
12978     fi
12979   done
12980
12981   cd ..
12982   rm -rf conftest.dir
12983 else
12984   am_cv_CC_dependencies_compiler_type=none
12985 fi
12986
12987 fi
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
12989 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
12990 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12991
12992
12993
12994 if
12995   test "x$enable_dependency_tracking" != xno \
12996   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
12997   am__fastdepCC_TRUE=
12998   am__fastdepCC_FALSE='#'
12999 else
13000   am__fastdepCC_TRUE='#'
13001   am__fastdepCC_FALSE=
13002 fi
13003
13004
13005 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
13006         as_fn_error "OpenLDAP requires compiler to support STDC constructs." "$LINENO" 5
13007 fi
13008
13009 # test for make depend flag
13010 OL_MKDEP=
13011 OL_MKDEP_FLAGS=
13012 if test -z "${MKDEP}"; then
13013         OL_MKDEP="${CC-cc}"
13014         if test -z "${MKDEP_FLAGS}"; then
13015                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${OL_MKDEP} depend flag" >&5
13016 $as_echo_n "checking for ${OL_MKDEP} depend flag... " >&6; }
13017 if test "${ol_cv_mkdep+set}" = set; then :
13018   $as_echo_n "(cached) " >&6
13019 else
13020
13021                         ol_cv_mkdep=no
13022                         for flag in "-M" "-xM"; do
13023                                 cat > conftest.c <<EOF
13024  noCode;
13025 EOF
13026                                 if { ac_try='$OL_MKDEP $flag conftest.c'
13027   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
13028   (eval $ac_try) 2>&5
13029   ac_status=$?
13030   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13031   test $ac_status = 0; }; } \
13032                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
13033                                 then
13034                                         if test ! -f conftest."${ac_object}" ; then
13035                                                 ol_cv_mkdep=$flag
13036                                                 OL_MKDEP_FLAGS="$flag"
13037                                                 break
13038                                         fi
13039                                 fi
13040                         done
13041                         rm -f conftest*
13042
13043 fi
13044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_mkdep" >&5
13045 $as_echo "$ol_cv_mkdep" >&6; }
13046                 test "$ol_cv_mkdep" = no && OL_MKDEP=":"
13047         else
13048                 cc_cv_mkdep=yes
13049                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13050         fi
13051 else
13052         cc_cv_mkdep=yes
13053         OL_MKDEP="${MKDEP}"
13054         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13055 fi
13056
13057
13058
13059 if test "${ol_cv_mkdep}" = no ; then
13060         # this will soon become an error
13061         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: do not know how to generate dependencies" >&5
13062 $as_echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
13063 fi
13064
13065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for afopen in -ls" >&5
13066 $as_echo_n "checking for afopen in -ls... " >&6; }
13067 if test "${ac_cv_lib_s_afopen+set}" = set; then :
13068   $as_echo_n "(cached) " >&6
13069 else
13070   ac_check_lib_save_LIBS=$LIBS
13071 LIBS="-ls  $LIBS"
13072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13073 /* end confdefs.h.  */
13074
13075 /* Override any GCC internal prototype to avoid an error.
13076    Use char because int might match the return type of a GCC
13077    builtin and then its argument prototype would still apply.  */
13078 #ifdef __cplusplus
13079 extern "C"
13080 #endif
13081 char afopen ();
13082 int
13083 main ()
13084 {
13085 return afopen ();
13086   ;
13087   return 0;
13088 }
13089 _ACEOF
13090 if ac_fn_c_try_link "$LINENO"; then :
13091   ac_cv_lib_s_afopen=yes
13092 else
13093   ac_cv_lib_s_afopen=no
13094 fi
13095 rm -f core conftest.err conftest.$ac_objext \
13096     conftest$ac_exeext conftest.$ac_ext
13097 LIBS=$ac_check_lib_save_LIBS
13098 fi
13099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_afopen" >&5
13100 $as_echo "$ac_cv_lib_s_afopen" >&6; }
13101 if test "x$ac_cv_lib_s_afopen" = x""yes; then :
13102
13103         AUTH_LIBS=-ls
13104
13105 $as_echo "#define HAVE_AIX_SECURITY 1" >>confdefs.h
13106
13107
13108 fi
13109
13110
13111 case "$target" in
13112 *-ibm-openedition)
13113         ac_cv_func_getopt=no
13114
13115 $as_echo "#define BOTH_STRINGS_H 1" >>confdefs.h
13116
13117         ;;
13118 esac
13119
13120 ol_link_modules=no
13121 WITH_MODULES_ENABLED=no
13122 if test $ol_enable_modules != no ; then
13123         for ac_header in ltdl.h
13124 do :
13125   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
13126 if test "x$ac_cv_header_ltdl_h" = x""yes; then :
13127   cat >>confdefs.h <<_ACEOF
13128 #define HAVE_LTDL_H 1
13129 _ACEOF
13130
13131 fi
13132
13133 done
13134
13135
13136         if test $ac_cv_header_ltdl_h = no ; then
13137                 as_fn_error "could not locate libtool ltdl.h" "$LINENO" 5
13138         fi
13139
13140         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
13141 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
13142 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
13143   $as_echo_n "(cached) " >&6
13144 else
13145   ac_check_lib_save_LIBS=$LIBS
13146 LIBS="-lltdl  $LIBS"
13147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13148 /* end confdefs.h.  */
13149
13150 /* Override any GCC internal prototype to avoid an error.
13151    Use char because int might match the return type of a GCC
13152    builtin and then its argument prototype would still apply.  */
13153 #ifdef __cplusplus
13154 extern "C"
13155 #endif
13156 char lt_dlinit ();
13157 int
13158 main ()
13159 {
13160 return lt_dlinit ();
13161   ;
13162   return 0;
13163 }
13164 _ACEOF
13165 if ac_fn_c_try_link "$LINENO"; then :
13166   ac_cv_lib_ltdl_lt_dlinit=yes
13167 else
13168   ac_cv_lib_ltdl_lt_dlinit=no
13169 fi
13170 rm -f core conftest.err conftest.$ac_objext \
13171     conftest$ac_exeext conftest.$ac_ext
13172 LIBS=$ac_check_lib_save_LIBS
13173 fi
13174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13175 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
13176 if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
13177
13178                 MODULES_LIBS=-lltdl
13179
13180 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
13181
13182
13183 fi
13184
13185
13186         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13187                 as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
13188         fi
13189         ol_link_modules=yes
13190         WITH_MODULES_ENABLED=yes
13191
13192 else
13193         for i in $Backends; do
13194                 eval "ol_tmp=\$ol_enable_$i"
13195                 if test $ol_tmp = mod ; then
13196                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i backend" >&5
13197 $as_echo "$as_me: WARNING: building static $i backend" >&2;}
13198                         eval "ol_enable_$i=yes"
13199                 fi
13200         done
13201         for i in $Overlays; do
13202                 eval "ol_tmp=\$ol_enable_$i"
13203                 if test $ol_tmp = mod ; then
13204                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i overlay" >&5
13205 $as_echo "$as_me: WARNING: building static $i overlay" >&2;}
13206                         eval "ol_enable_$i=yes"
13207                 fi
13208         done
13209 fi
13210
13211 # test for EBCDIC
13212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EBCDIC" >&5
13213 $as_echo_n "checking for EBCDIC... " >&6; }
13214 if test "${ol_cv_cpp_ebcdic+set}" = set; then :
13215   $as_echo_n "(cached) " >&6
13216 else
13217
13218         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13219 /* end confdefs.h.  */
13220
13221 #if !('M' == 0xd4)
13222 #include <__ASCII__/generate_error.h>
13223 #endif
13224
13225 _ACEOF
13226 if ac_fn_c_try_cpp "$LINENO"; then :
13227   ol_cv_cpp_ebcdic=yes
13228 else
13229   ol_cv_cpp_ebcdic=no
13230 fi
13231 rm -f conftest.err conftest.$ac_ext
13232 fi
13233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cpp_ebcdic" >&5
13234 $as_echo "$ol_cv_cpp_ebcdic" >&6; }
13235 if test $ol_cv_cpp_ebcdic = yes ; then
13236
13237 $as_echo "#define HAVE_EBCDIC 1" >>confdefs.h
13238
13239 fi
13240
13241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13242 $as_echo_n "checking for ANSI C header files... " >&6; }
13243 if test "${ol_cv_header_stdc+set}" = set; then :
13244   $as_echo_n "(cached) " >&6
13245 else
13246   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247 /* end confdefs.h.  */
13248 #include <stdlib.h>
13249 #include <stdarg.h>
13250 #include <string.h>
13251 #include <float.h>
13252 _ACEOF
13253 if ac_fn_c_try_cpp "$LINENO"; then :
13254   ol_cv_header_stdc=yes
13255 else
13256   ol_cv_header_stdc=no
13257 fi
13258 rm -f conftest.err conftest.$ac_ext
13259
13260 if test $ol_cv_header_stdc = yes; then
13261   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13263 /* end confdefs.h.  */
13264 #include <string.h>
13265
13266 _ACEOF
13267 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13268   $EGREP "memchr" >/dev/null 2>&1; then :
13269
13270 else
13271   ol_cv_header_stdc=no
13272 fi
13273 rm -f conftest*
13274
13275 fi
13276
13277 if test $ol_cv_header_stdc = yes; then
13278   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13280 /* end confdefs.h.  */
13281 #include <stdlib.h>
13282
13283 _ACEOF
13284 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13285   $EGREP "free" >/dev/null 2>&1; then :
13286
13287 else
13288   ol_cv_header_stdc=no
13289 fi
13290 rm -f conftest*
13291
13292 fi
13293
13294 if test $ol_cv_header_stdc = yes; then
13295   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13296 if test "$cross_compiling" = yes; then :
13297   :
13298 else
13299   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13300 /* end confdefs.h.  */
13301 #include <ctype.h>
13302 #ifndef HAVE_EBCDIC
13303 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13304 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13305 #else
13306 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13307                 || ('j' <= (c) && (c) <= 'r') \
13308                 || ('s' <= (c) && (c) <= 'z'))
13309 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13310 #endif
13311 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13312 int main () { int i; for (i = 0; i < 256; i++)
13313 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13314 exit (0); }
13315
13316 _ACEOF
13317 if ac_fn_c_try_run "$LINENO"; then :
13318
13319 else
13320   ol_cv_header_stdc=no
13321 fi
13322 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13323   conftest.$ac_objext conftest.beam conftest.$ac_ext
13324 fi
13325
13326 fi
13327 fi
13328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_stdc" >&5
13329 $as_echo "$ol_cv_header_stdc" >&6; }
13330 if test $ol_cv_header_stdc = yes; then
13331   $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13332
13333 fi
13334 ac_cv_header_stdc=disable
13335
13336
13337 if test $ol_cv_header_stdc != yes; then
13338         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate Standard C compliant headers" >&5
13339 $as_echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13340 fi
13341
13342 ac_header_dirent=no
13343 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13344   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
13346 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
13347 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
13348   $as_echo_n "(cached) " >&6
13349 else
13350   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13351 /* end confdefs.h.  */
13352 #include <sys/types.h>
13353 #include <$ac_hdr>
13354
13355 int
13356 main ()
13357 {
13358 if ((DIR *) 0)
13359 return 0;
13360   ;
13361   return 0;
13362 }
13363 _ACEOF
13364 if ac_fn_c_try_compile "$LINENO"; then :
13365   eval "$as_ac_Header=yes"
13366 else
13367   eval "$as_ac_Header=no"
13368 fi
13369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13370 fi
13371 eval ac_res=\$$as_ac_Header
13372                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13373 $as_echo "$ac_res" >&6; }
13374 eval as_val=\$$as_ac_Header
13375    if test "x$as_val" = x""yes; then :
13376   cat >>confdefs.h <<_ACEOF
13377 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13378 _ACEOF
13379
13380 ac_header_dirent=$ac_hdr; break
13381 fi
13382
13383 done
13384 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13385 if test $ac_header_dirent = dirent.h; then
13386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13387 $as_echo_n "checking for library containing opendir... " >&6; }
13388 if test "${ac_cv_search_opendir+set}" = set; then :
13389   $as_echo_n "(cached) " >&6
13390 else
13391   ac_func_search_save_LIBS=$LIBS
13392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13393 /* end confdefs.h.  */
13394
13395 /* Override any GCC internal prototype to avoid an error.
13396    Use char because int might match the return type of a GCC
13397    builtin and then its argument prototype would still apply.  */
13398 #ifdef __cplusplus
13399 extern "C"
13400 #endif
13401 char opendir ();
13402 int
13403 main ()
13404 {
13405 return opendir ();
13406   ;
13407   return 0;
13408 }
13409 _ACEOF
13410 for ac_lib in '' dir; do
13411   if test -z "$ac_lib"; then
13412     ac_res="none required"
13413   else
13414     ac_res=-l$ac_lib
13415     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13416   fi
13417   if ac_fn_c_try_link "$LINENO"; then :
13418   ac_cv_search_opendir=$ac_res
13419 fi
13420 rm -f core conftest.err conftest.$ac_objext \
13421     conftest$ac_exeext
13422   if test "${ac_cv_search_opendir+set}" = set; then :
13423   break
13424 fi
13425 done
13426 if test "${ac_cv_search_opendir+set}" = set; then :
13427
13428 else
13429   ac_cv_search_opendir=no
13430 fi
13431 rm conftest.$ac_ext
13432 LIBS=$ac_func_search_save_LIBS
13433 fi
13434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13435 $as_echo "$ac_cv_search_opendir" >&6; }
13436 ac_res=$ac_cv_search_opendir
13437 if test "$ac_res" != no; then :
13438   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13439
13440 fi
13441
13442 else
13443   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13444 $as_echo_n "checking for library containing opendir... " >&6; }
13445 if test "${ac_cv_search_opendir+set}" = set; then :
13446   $as_echo_n "(cached) " >&6
13447 else
13448   ac_func_search_save_LIBS=$LIBS
13449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13450 /* end confdefs.h.  */
13451
13452 /* Override any GCC internal prototype to avoid an error.
13453    Use char because int might match the return type of a GCC
13454    builtin and then its argument prototype would still apply.  */
13455 #ifdef __cplusplus
13456 extern "C"
13457 #endif
13458 char opendir ();
13459 int
13460 main ()
13461 {
13462 return opendir ();
13463   ;
13464   return 0;
13465 }
13466 _ACEOF
13467 for ac_lib in '' x; do
13468   if test -z "$ac_lib"; then
13469     ac_res="none required"
13470   else
13471     ac_res=-l$ac_lib
13472     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13473   fi
13474   if ac_fn_c_try_link "$LINENO"; then :
13475   ac_cv_search_opendir=$ac_res
13476 fi
13477 rm -f core conftest.err conftest.$ac_objext \
13478     conftest$ac_exeext
13479   if test "${ac_cv_search_opendir+set}" = set; then :
13480   break
13481 fi
13482 done
13483 if test "${ac_cv_search_opendir+set}" = set; then :
13484
13485 else
13486   ac_cv_search_opendir=no
13487 fi
13488 rm conftest.$ac_ext
13489 LIBS=$ac_func_search_save_LIBS
13490 fi
13491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13492 $as_echo "$ac_cv_search_opendir" >&6; }
13493 ac_res=$ac_cv_search_opendir
13494 if test "$ac_res" != no; then :
13495   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13496
13497 fi
13498
13499 fi
13500
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
13502 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
13503 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
13504   $as_echo_n "(cached) " >&6
13505 else
13506   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13507 /* end confdefs.h.  */
13508 #include <sys/types.h>
13509 #include <sys/wait.h>
13510 #ifndef WEXITSTATUS
13511 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
13512 #endif
13513 #ifndef WIFEXITED
13514 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13515 #endif
13516
13517 int
13518 main ()
13519 {
13520   int s;
13521   wait (&s);
13522   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13523   ;
13524   return 0;
13525 }
13526 _ACEOF
13527 if ac_fn_c_try_compile "$LINENO"; then :
13528   ac_cv_header_sys_wait_h=yes
13529 else
13530   ac_cv_header_sys_wait_h=no
13531 fi
13532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13533 fi
13534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
13535 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
13536 if test $ac_cv_header_sys_wait_h = yes; then
13537
13538 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
13539
13540 fi
13541
13542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
13543 $as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
13544 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then :
13545   $as_echo_n "(cached) " >&6
13546 else
13547   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13548 /* end confdefs.h.  */
13549 #include <sys/types.h>
13550 #include <termios.h>
13551 #ifdef TIOCGWINSZ
13552   yes
13553 #endif
13554
13555 _ACEOF
13556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13557   $EGREP "yes" >/dev/null 2>&1; then :
13558   ac_cv_sys_tiocgwinsz_in_termios_h=yes
13559 else
13560   ac_cv_sys_tiocgwinsz_in_termios_h=no
13561 fi
13562 rm -f conftest*
13563
13564 fi
13565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13566 $as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
13567
13568 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13569   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13570 $as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
13571 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then :
13572   $as_echo_n "(cached) " >&6
13573 else
13574   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13575 /* end confdefs.h.  */
13576 #include <sys/types.h>
13577 #include <sys/ioctl.h>
13578 #ifdef TIOCGWINSZ
13579   yes
13580 #endif
13581
13582 _ACEOF
13583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13584   $EGREP "yes" >/dev/null 2>&1; then :
13585   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13586 else
13587   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13588 fi
13589 rm -f conftest*
13590
13591 fi
13592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13593 $as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
13594
13595   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13596
13597 $as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
13598
13599   fi
13600 fi
13601
13602
13603 for ac_header in \
13604         arpa/inet.h             \
13605         arpa/nameser.h  \
13606         assert.h                \
13607         bits/types.h    \
13608         conio.h                 \
13609         crypt.h                 \
13610         direct.h                \
13611         errno.h                 \
13612         fcntl.h                 \
13613         filio.h                 \
13614         getopt.h                \
13615         grp.h                   \
13616         io.h                    \
13617         libutil.h               \
13618         limits.h                \
13619         locale.h                \
13620         malloc.h                \
13621         memory.h                \
13622         psap.h                  \
13623         pwd.h                   \
13624         process.h               \
13625         sgtty.h                 \
13626         shadow.h                \
13627         stddef.h                \
13628         string.h                \
13629         strings.h               \
13630         sysexits.h              \
13631         sys/file.h              \
13632         sys/filio.h             \
13633         sys/fstyp.h             \
13634         sys/errno.h             \
13635         sys/ioctl.h             \
13636         sys/param.h             \
13637         sys/privgrp.h   \
13638         sys/resource.h  \
13639         sys/select.h    \
13640         sys/socket.h    \
13641         sys/stat.h              \
13642         sys/syslog.h    \
13643         sys/time.h              \
13644         sys/types.h             \
13645         sys/uio.h               \
13646         sys/vmount.h    \
13647         syslog.h                \
13648         termios.h               \
13649         unistd.h                \
13650         utime.h                 \
13651
13652 do :
13653   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13654 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13655 eval as_val=\$$as_ac_Header
13656    if test "x$as_val" = x""yes; then :
13657   cat >>confdefs.h <<_ACEOF
13658 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13659 _ACEOF
13660
13661 fi
13662
13663 done
13664
13665
13666 if test "$ac_cv_mingw32" = yes \
13667         -o "$ac_cv_interix" = yes \
13668         -o "$ol_cv_msvc" = yes
13669 then
13670         for ac_header in winsock.h winsock2.h
13671 do :
13672   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13673 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13674 eval as_val=\$$as_ac_Header
13675    if test "x$as_val" = x""yes; then :
13676   cat >>confdefs.h <<_ACEOF
13677 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13678 _ACEOF
13679
13680 fi
13681
13682 done
13683
13684 fi
13685
13686 for ac_header in resolv.h
13687 do :
13688   ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default
13689 #include <netinet/in.h>
13690
13691 "
13692 if test "x$ac_cv_header_resolv_h" = x""yes; then :
13693   cat >>confdefs.h <<_ACEOF
13694 #define HAVE_RESOLV_H 1
13695 _ACEOF
13696
13697 fi
13698
13699 done
13700
13701
13702 for ac_header in netinet/tcp.h
13703 do :
13704   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13705 #include <netinet/in.h>
13706
13707 "
13708 if test "x$ac_cv_header_netinet_tcp_h" = x""yes; then :
13709   cat >>confdefs.h <<_ACEOF
13710 #define HAVE_NETINET_TCP_H 1
13711 _ACEOF
13712
13713 fi
13714
13715 done
13716
13717
13718 for ac_header in sys/ucred.h
13719 do :
13720   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13721 #ifdef HAVE_SYS_PARAM_H
13722 #include <sys/param.h>
13723 #endif
13724
13725 "
13726 if test "x$ac_cv_header_sys_ucred_h" = x""yes; then :
13727   cat >>confdefs.h <<_ACEOF
13728 #define HAVE_SYS_UCRED_H 1
13729 _ACEOF
13730
13731 fi
13732
13733 done
13734
13735
13736
13737 for ac_func in sigaction sigset
13738 do :
13739   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13740 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13741 eval as_val=\$$as_ac_var
13742    if test "x$as_val" = x""yes; then :
13743   cat >>confdefs.h <<_ACEOF
13744 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13745 _ACEOF
13746
13747 fi
13748 done
13749
13750
13751 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
13752         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset in -lV3" >&5
13753 $as_echo_n "checking for sigset in -lV3... " >&6; }
13754 if test "${ac_cv_lib_V3_sigset+set}" = set; then :
13755   $as_echo_n "(cached) " >&6
13756 else
13757   ac_check_lib_save_LIBS=$LIBS
13758 LIBS="-lV3  $LIBS"
13759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13760 /* end confdefs.h.  */
13761
13762 /* Override any GCC internal prototype to avoid an error.
13763    Use char because int might match the return type of a GCC
13764    builtin and then its argument prototype would still apply.  */
13765 #ifdef __cplusplus
13766 extern "C"
13767 #endif
13768 char sigset ();
13769 int
13770 main ()
13771 {
13772 return sigset ();
13773   ;
13774   return 0;
13775 }
13776 _ACEOF
13777 if ac_fn_c_try_link "$LINENO"; then :
13778   ac_cv_lib_V3_sigset=yes
13779 else
13780   ac_cv_lib_V3_sigset=no
13781 fi
13782 rm -f core conftest.err conftest.$ac_objext \
13783     conftest$ac_exeext conftest.$ac_ext
13784 LIBS=$ac_check_lib_save_LIBS
13785 fi
13786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_V3_sigset" >&5
13787 $as_echo "$ac_cv_lib_V3_sigset" >&6; }
13788 if test "x$ac_cv_lib_V3_sigset" = x""yes; then :
13789   cat >>confdefs.h <<_ACEOF
13790 #define HAVE_LIBV3 1
13791 _ACEOF
13792
13793   LIBS="-lV3 $LIBS"
13794
13795 fi
13796
13797 fi
13798
13799 if test $ol_cv_msvc = yes ; then
13800    ol_cv_winsock=yes
13801 fi
13802
13803 if test "$ac_cv_header_winsock_h" = yes; then
13804         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock" >&5
13805 $as_echo_n "checking for winsock... " >&6; }
13806 if test "${ol_cv_winsock+set}" = set; then :
13807   $as_echo_n "(cached) " >&6
13808 else
13809
13810         save_LIBS="$LIBS"
13811         for curlib in none ws2_32 wsock32; do
13812                 if test $curlib != none ; then
13813                 LIBS="$save_LIBS -l$curlib"
13814                 fi
13815                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13816 /* end confdefs.h.  */
13817 #include <winsock.h>
13818
13819 int
13820 main ()
13821 {
13822
13823                         socket(0,0,0);
13824                         select(0,NULL,NULL,NULL,NULL);
13825                         closesocket(0);
13826                         gethostname(NULL,0);
13827
13828   ;
13829   return 0;
13830 }
13831 _ACEOF
13832 if ac_fn_c_try_link "$LINENO"; then :
13833   ol_cv_winsock=$curlib
13834 else
13835   ol_cv_winsock=no
13836 fi
13837 rm -f core conftest.err conftest.$ac_objext \
13838     conftest$ac_exeext conftest.$ac_ext
13839
13840                 test "$ol_cv_winsock" != no && break
13841         done
13842         LIBS="$save_LIBS"
13843
13844 fi
13845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_winsock" >&5
13846 $as_echo "$ol_cv_winsock" >&6; }
13847
13848         if test $ol_cv_winsock != no ; then
13849
13850 $as_echo "#define HAVE_WINSOCK 1" >>confdefs.h
13851
13852         ac_cv_func_socket=yes
13853         ac_cv_func_select=yes
13854         ac_cv_func_closesocket=yes
13855         ac_cv_func_gethostname=yes
13856
13857                 if test $ol_cv_winsock != none -a $ol_cv_winsock != yes ; then
13858                 LIBS="$LIBS -l$ol_cv_winsock"
13859                 fi
13860
13861         if test $ol_cv_winsock = ws2_32 -o $ol_cv_winsock = yes ; then
13862
13863 $as_echo "#define HAVE_WINSOCK2 1" >>confdefs.h
13864
13865         fi
13866         fi
13867 fi
13868
13869
13870 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13871 if test "x$ac_cv_func_socket" = x""yes; then :
13872   :
13873 else
13874
13875         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
13876 $as_echo_n "checking for main in -lsocket... " >&6; }
13877 if test "${ac_cv_lib_socket_main+set}" = set; then :
13878   $as_echo_n "(cached) " >&6
13879 else
13880   ac_check_lib_save_LIBS=$LIBS
13881 LIBS="-lsocket  $LIBS"
13882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13883 /* end confdefs.h.  */
13884
13885
13886 int
13887 main ()
13888 {
13889 return main ();
13890   ;
13891   return 0;
13892 }
13893 _ACEOF
13894 if ac_fn_c_try_link "$LINENO"; then :
13895   ac_cv_lib_socket_main=yes
13896 else
13897   ac_cv_lib_socket_main=no
13898 fi
13899 rm -f core conftest.err conftest.$ac_objext \
13900     conftest$ac_exeext conftest.$ac_ext
13901 LIBS=$ac_check_lib_save_LIBS
13902 fi
13903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
13904 $as_echo "$ac_cv_lib_socket_main" >&6; }
13905 if test "x$ac_cv_lib_socket_main" = x""yes; then :
13906   cat >>confdefs.h <<_ACEOF
13907 #define HAVE_LIBSOCKET 1
13908 _ACEOF
13909
13910   LIBS="-lsocket $LIBS"
13911
13912 fi
13913
13914         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnet" >&5
13915 $as_echo_n "checking for main in -lnet... " >&6; }
13916 if test "${ac_cv_lib_net_main+set}" = set; then :
13917   $as_echo_n "(cached) " >&6
13918 else
13919   ac_check_lib_save_LIBS=$LIBS
13920 LIBS="-lnet  $LIBS"
13921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13922 /* end confdefs.h.  */
13923
13924
13925 int
13926 main ()
13927 {
13928 return main ();
13929   ;
13930   return 0;
13931 }
13932 _ACEOF
13933 if ac_fn_c_try_link "$LINENO"; then :
13934   ac_cv_lib_net_main=yes
13935 else
13936   ac_cv_lib_net_main=no
13937 fi
13938 rm -f core conftest.err conftest.$ac_objext \
13939     conftest$ac_exeext conftest.$ac_ext
13940 LIBS=$ac_check_lib_save_LIBS
13941 fi
13942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_main" >&5
13943 $as_echo "$ac_cv_lib_net_main" >&6; }
13944 if test "x$ac_cv_lib_net_main" = x""yes; then :
13945   cat >>confdefs.h <<_ACEOF
13946 #define HAVE_LIBNET 1
13947 _ACEOF
13948
13949   LIBS="-lnet $LIBS"
13950
13951 fi
13952
13953         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl_s" >&5
13954 $as_echo_n "checking for main in -lnsl_s... " >&6; }
13955 if test "${ac_cv_lib_nsl_s_main+set}" = set; then :
13956   $as_echo_n "(cached) " >&6
13957 else
13958   ac_check_lib_save_LIBS=$LIBS
13959 LIBS="-lnsl_s  $LIBS"
13960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13961 /* end confdefs.h.  */
13962
13963
13964 int
13965 main ()
13966 {
13967 return main ();
13968   ;
13969   return 0;
13970 }
13971 _ACEOF
13972 if ac_fn_c_try_link "$LINENO"; then :
13973   ac_cv_lib_nsl_s_main=yes
13974 else
13975   ac_cv_lib_nsl_s_main=no
13976 fi
13977 rm -f core conftest.err conftest.$ac_objext \
13978     conftest$ac_exeext conftest.$ac_ext
13979 LIBS=$ac_check_lib_save_LIBS
13980 fi
13981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_s_main" >&5
13982 $as_echo "$ac_cv_lib_nsl_s_main" >&6; }
13983 if test "x$ac_cv_lib_nsl_s_main" = x""yes; then :
13984   cat >>confdefs.h <<_ACEOF
13985 #define HAVE_LIBNSL_S 1
13986 _ACEOF
13987
13988   LIBS="-lnsl_s $LIBS"
13989
13990 fi
13991
13992         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5
13993 $as_echo_n "checking for main in -lnsl... " >&6; }
13994 if test "${ac_cv_lib_nsl_main+set}" = set; then :
13995   $as_echo_n "(cached) " >&6
13996 else
13997   ac_check_lib_save_LIBS=$LIBS
13998 LIBS="-lnsl  $LIBS"
13999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14000 /* end confdefs.h.  */
14001
14002
14003 int
14004 main ()
14005 {
14006 return main ();
14007   ;
14008   return 0;
14009 }
14010 _ACEOF
14011 if ac_fn_c_try_link "$LINENO"; then :
14012   ac_cv_lib_nsl_main=yes
14013 else
14014   ac_cv_lib_nsl_main=no
14015 fi
14016 rm -f core conftest.err conftest.$ac_objext \
14017     conftest$ac_exeext conftest.$ac_ext
14018 LIBS=$ac_check_lib_save_LIBS
14019 fi
14020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5
14021 $as_echo "$ac_cv_lib_nsl_main" >&6; }
14022 if test "x$ac_cv_lib_nsl_main" = x""yes; then :
14023   cat >>confdefs.h <<_ACEOF
14024 #define HAVE_LIBNSL 1
14025 _ACEOF
14026
14027   LIBS="-lnsl $LIBS"
14028
14029 fi
14030
14031         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -linet" >&5
14032 $as_echo_n "checking for socket in -linet... " >&6; }
14033 if test "${ac_cv_lib_inet_socket+set}" = set; then :
14034   $as_echo_n "(cached) " >&6
14035 else
14036   ac_check_lib_save_LIBS=$LIBS
14037 LIBS="-linet  $LIBS"
14038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14039 /* end confdefs.h.  */
14040
14041 /* Override any GCC internal prototype to avoid an error.
14042    Use char because int might match the return type of a GCC
14043    builtin and then its argument prototype would still apply.  */
14044 #ifdef __cplusplus
14045 extern "C"
14046 #endif
14047 char socket ();
14048 int
14049 main ()
14050 {
14051 return socket ();
14052   ;
14053   return 0;
14054 }
14055 _ACEOF
14056 if ac_fn_c_try_link "$LINENO"; then :
14057   ac_cv_lib_inet_socket=yes
14058 else
14059   ac_cv_lib_inet_socket=no
14060 fi
14061 rm -f core conftest.err conftest.$ac_objext \
14062     conftest$ac_exeext conftest.$ac_ext
14063 LIBS=$ac_check_lib_save_LIBS
14064 fi
14065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_socket" >&5
14066 $as_echo "$ac_cv_lib_inet_socket" >&6; }
14067 if test "x$ac_cv_lib_inet_socket" = x""yes; then :
14068   cat >>confdefs.h <<_ACEOF
14069 #define HAVE_LIBINET 1
14070 _ACEOF
14071
14072   LIBS="-linet $LIBS"
14073
14074 fi
14075
14076         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgen" >&5
14077 $as_echo_n "checking for main in -lgen... " >&6; }
14078 if test "${ac_cv_lib_gen_main+set}" = set; then :
14079   $as_echo_n "(cached) " >&6
14080 else
14081   ac_check_lib_save_LIBS=$LIBS
14082 LIBS="-lgen  $LIBS"
14083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14084 /* end confdefs.h.  */
14085
14086
14087 int
14088 main ()
14089 {
14090 return main ();
14091   ;
14092   return 0;
14093 }
14094 _ACEOF
14095 if ac_fn_c_try_link "$LINENO"; then :
14096   ac_cv_lib_gen_main=yes
14097 else
14098   ac_cv_lib_gen_main=no
14099 fi
14100 rm -f core conftest.err conftest.$ac_objext \
14101     conftest$ac_exeext conftest.$ac_ext
14102 LIBS=$ac_check_lib_save_LIBS
14103 fi
14104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_main" >&5
14105 $as_echo "$ac_cv_lib_gen_main" >&6; }
14106 if test "x$ac_cv_lib_gen_main" = x""yes; then :
14107   cat >>confdefs.h <<_ACEOF
14108 #define HAVE_LIBGEN 1
14109 _ACEOF
14110
14111   LIBS="-lgen $LIBS"
14112
14113 fi
14114
14115
14116 fi
14117
14118
14119 ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
14120 if test "x$ac_cv_func_select" = x""yes; then :
14121   :
14122 else
14123   as_fn_error "select() required." "$LINENO" 5
14124 fi
14125
14126
14127 if test "${ac_cv_header_winsock_h}" != yes; then
14128                                 for ac_header in sys/select.h sys/socket.h
14129 do :
14130   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14131 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14132 eval as_val=\$$as_ac_Header
14133    if test "x$as_val" = x""yes; then :
14134   cat >>confdefs.h <<_ACEOF
14135 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14136 _ACEOF
14137
14138 fi
14139
14140 done
14141
14142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
14143 $as_echo_n "checking types of arguments for select... " >&6; }
14144 if test "${ac_cv_func_select_args+set}" = set; then :
14145   $as_echo_n "(cached) " >&6
14146 else
14147   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
14148  for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
14149   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
14150    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14151 /* end confdefs.h.  */
14152 $ac_includes_default
14153 #ifdef HAVE_SYS_SELECT_H
14154 # include <sys/select.h>
14155 #endif
14156 #ifdef HAVE_SYS_SOCKET_H
14157 # include <sys/socket.h>
14158 #endif
14159
14160 int
14161 main ()
14162 {
14163 extern int select ($ac_arg1,
14164                                             $ac_arg234, $ac_arg234, $ac_arg234,
14165                                             $ac_arg5);
14166   ;
14167   return 0;
14168 }
14169 _ACEOF
14170 if ac_fn_c_try_compile "$LINENO"; then :
14171   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
14172 fi
14173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14174   done
14175  done
14176 done
14177 # Provide a safe default value.
14178 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
14179
14180 fi
14181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
14182 $as_echo "$ac_cv_func_select_args" >&6; }
14183 ac_save_IFS=$IFS; IFS=','
14184 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
14185 IFS=$ac_save_IFS
14186 shift
14187
14188 cat >>confdefs.h <<_ACEOF
14189 #define SELECT_TYPE_ARG1 $1
14190 _ACEOF
14191
14192
14193 cat >>confdefs.h <<_ACEOF
14194 #define SELECT_TYPE_ARG234 ($2)
14195 _ACEOF
14196
14197
14198 cat >>confdefs.h <<_ACEOF
14199 #define SELECT_TYPE_ARG5 ($3)
14200 _ACEOF
14201
14202 rm -f conftest*
14203
14204 fi
14205
14206
14207 for ac_func in poll
14208 do :
14209   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14210 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14211 eval as_val=\$$as_ac_var
14212    if test "x$as_val" = x""yes; then :
14213   cat >>confdefs.h <<_ACEOF
14214 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14215 _ACEOF
14216
14217 fi
14218 done
14219
14220 if test $ac_cv_func_poll = yes; then
14221 for ac_header in poll.h sys/poll.h
14222 do :
14223   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14224 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14225 eval as_val=\$$as_ac_Header
14226    if test "x$as_val" = x""yes; then :
14227   cat >>confdefs.h <<_ACEOF
14228 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14229 _ACEOF
14230
14231 fi
14232
14233 done
14234
14235 fi
14236
14237 for ac_header in sys/epoll.h
14238 do :
14239   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14240 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14241 eval as_val=\$$as_ac_Header
14242    if test "x$as_val" = x""yes; then :
14243   cat >>confdefs.h <<_ACEOF
14244 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14245 _ACEOF
14246
14247 fi
14248
14249 done
14250
14251 if test "${ac_cv_header_sys_epoll_h}" = yes; then
14252         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll system call" >&5
14253 $as_echo_n "checking for epoll system call... " >&6; }
14254         if test "$cross_compiling" = yes; then :
14255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14256 $as_echo "no" >&6; }
14257 else
14258   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14259 /* end confdefs.h.  */
14260 int main(int argc, char **argv)
14261 {
14262         int epfd = epoll_create(256);
14263         exit (epfd == -1 ? 1 : 0);
14264 }
14265 _ACEOF
14266 if ac_fn_c_try_run "$LINENO"; then :
14267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14268 $as_echo "yes" >&6; }
14269
14270 $as_echo "#define HAVE_EPOLL 1" >>confdefs.h
14271
14272 else
14273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14274 $as_echo "no" >&6; }
14275 fi
14276 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14277   conftest.$ac_objext conftest.beam conftest.$ac_ext
14278 fi
14279
14280 fi
14281
14282 for ac_header in sys/devpoll.h
14283 do :
14284   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14285 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14286 eval as_val=\$$as_ac_Header
14287    if test "x$as_val" = x""yes; then :
14288   cat >>confdefs.h <<_ACEOF
14289 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14290 _ACEOF
14291
14292 fi
14293
14294 done
14295
14296 if test "${ac_cv_header_sys_devpoll_h}" = yes \
14297                 -a "${ac_cv_header_poll_h}" = yes ; \
14298 then
14299         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/poll" >&5
14300 $as_echo_n "checking for /dev/poll... " >&6; }
14301         if test "$cross_compiling" = yes; then :
14302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14303 $as_echo "no" >&6; }
14304 else
14305   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14306 /* end confdefs.h.  */
14307 int main(int argc, char **argv)
14308 {
14309         int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
14310         exit (devpollfd == -1 ? 1 : 0);
14311 }
14312 _ACEOF
14313 if ac_fn_c_try_run "$LINENO"; then :
14314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14315 $as_echo "yes" >&6; }
14316
14317 $as_echo "#define HAVE_DEVPOLL 1" >>confdefs.h
14318
14319 else
14320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14321 $as_echo "no" >&6; }
14322 fi
14323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14324   conftest.$ac_objext conftest.beam conftest.$ac_ext
14325 fi
14326
14327 fi
14328
14329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14330 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14331 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14332   $as_echo_n "(cached) " >&6
14333 else
14334
14335         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14336 /* end confdefs.h.  */
14337
14338 #include <stdio.h>
14339 #include <sys/types.h>
14340 #include <errno.h>
14341 #ifdef _WIN32
14342 #include <stdlib.h>
14343 #endif
14344 int
14345 main ()
14346 {
14347 char *c = (char *) *sys_errlist
14348   ;
14349   return 0;
14350 }
14351 _ACEOF
14352 if ac_fn_c_try_compile "$LINENO"; then :
14353   ol_cv_dcl_sys_errlist=yes
14354         ol_cv_have_sys_errlist=yes
14355 else
14356   ol_cv_dcl_sys_errlist=no
14357 fi
14358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14359 fi
14360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14361 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14362 #
14363 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14364 if test $ol_cv_dcl_sys_errlist = no ; then
14365
14366 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14367
14368
14369         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14370 $as_echo_n "checking existence of sys_errlist... " >&6; }
14371 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14372   $as_echo_n "(cached) " >&6
14373 else
14374
14375                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14376 /* end confdefs.h.  */
14377 #include <errno.h>
14378 int
14379 main ()
14380 {
14381 char *c = (char *) *sys_errlist
14382   ;
14383   return 0;
14384 }
14385 _ACEOF
14386 if ac_fn_c_try_link "$LINENO"; then :
14387   ol_cv_have_sys_errlist=yes
14388 else
14389   ol_cv_have_sys_errlist=no
14390 fi
14391 rm -f core conftest.err conftest.$ac_objext \
14392     conftest$ac_exeext conftest.$ac_ext
14393 fi
14394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14395 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14396 fi
14397 if test $ol_cv_have_sys_errlist = yes ; then
14398
14399 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14400
14401 fi
14402  for ac_func in strerror strerror_r
14403 do :
14404   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14405 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14406 eval as_val=\$$as_ac_var
14407    if test "x$as_val" = x""yes; then :
14408   cat >>confdefs.h <<_ACEOF
14409 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14410 _ACEOF
14411
14412 fi
14413 done
14414
14415 ol_cv_func_strerror_r=no
14416 if test "${ac_cv_func_strerror_r}" = yes ; then
14417         { $as_echo "$as_me:${as_lineno-$LINENO}: checking non-posix strerror_r" >&5
14418 $as_echo_n "checking non-posix strerror_r... " >&6; }
14419 if test "${ol_cv_nonposix_strerror_r+set}" = set; then :
14420   $as_echo_n "(cached) " >&6
14421 else
14422
14423         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14424 /* end confdefs.h.  */
14425 #include <string.h>
14426 _ACEOF
14427 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14428   $EGREP "strerror_r" >/dev/null 2>&1; then :
14429   ol_decl_strerror_r=yes
14430 else
14431   ol_decl_strerror_r=no
14432 fi
14433 rm -f conftest*
14434
14435         if test $ol_decl_strerror_r = yes ; then
14436                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14437 /* end confdefs.h.  */
14438 #include <string.h>
14439 int
14440 main ()
14441 {
14442    /* from autoconf 2.59 */
14443                                 char buf[100];
14444                                 char x = *strerror_r (0, buf, sizeof buf);
14445                                 char *p = strerror_r (0, buf, sizeof buf);
14446
14447   ;
14448   return 0;
14449 }
14450 _ACEOF
14451 if ac_fn_c_try_compile "$LINENO"; then :
14452   ol_cv_nonposix_strerror_r=yes
14453 else
14454   ol_cv_nonposix_strerror_r=no
14455 fi
14456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14457         else
14458                 if test "$cross_compiling" = yes; then :
14459   ol_cv_nonposix_strerror=no
14460 else
14461   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14462 /* end confdefs.h.  */
14463
14464                         main() {
14465                                 char buf[100];
14466                                 buf[0] = 0;
14467                                 strerror_r( 1, buf, sizeof buf );
14468                                 exit( buf[0] == 0 );
14469                         }
14470
14471 _ACEOF
14472 if ac_fn_c_try_run "$LINENO"; then :
14473   ol_cv_nonposix_strerror_r=yes
14474 else
14475   ol_cv_nonposix_strerror=no
14476 fi
14477 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14478   conftest.$ac_objext conftest.beam conftest.$ac_ext
14479 fi
14480
14481         fi
14482
14483 fi
14484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_nonposix_strerror_r" >&5
14485 $as_echo "$ol_cv_nonposix_strerror_r" >&6; }
14486 if test $ol_cv_nonposix_strerror_r = yes ; then
14487
14488 $as_echo "#define HAVE_NONPOSIX_STRERROR_R 1" >>confdefs.h
14489
14490 fi
14491
14492 elif test "${ac_cv_func_strerror}" = no ; then
14493         { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14494 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14495 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14496   $as_echo_n "(cached) " >&6
14497 else
14498
14499         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14500 /* end confdefs.h.  */
14501
14502 #include <stdio.h>
14503 #include <sys/types.h>
14504 #include <errno.h>
14505 #ifdef _WIN32
14506 #include <stdlib.h>
14507 #endif
14508 int
14509 main ()
14510 {
14511 char *c = (char *) *sys_errlist
14512   ;
14513   return 0;
14514 }
14515 _ACEOF
14516 if ac_fn_c_try_compile "$LINENO"; then :
14517   ol_cv_dcl_sys_errlist=yes
14518         ol_cv_have_sys_errlist=yes
14519 else
14520   ol_cv_dcl_sys_errlist=no
14521 fi
14522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14523 fi
14524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14525 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14526 #
14527 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14528 if test $ol_cv_dcl_sys_errlist = no ; then
14529
14530 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14531
14532
14533         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14534 $as_echo_n "checking existence of sys_errlist... " >&6; }
14535 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14536   $as_echo_n "(cached) " >&6
14537 else
14538
14539                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14540 /* end confdefs.h.  */
14541 #include <errno.h>
14542 int
14543 main ()
14544 {
14545 char *c = (char *) *sys_errlist
14546   ;
14547   return 0;
14548 }
14549 _ACEOF
14550 if ac_fn_c_try_link "$LINENO"; then :
14551   ol_cv_have_sys_errlist=yes
14552 else
14553   ol_cv_have_sys_errlist=no
14554 fi
14555 rm -f core conftest.err conftest.$ac_objext \
14556     conftest$ac_exeext conftest.$ac_ext
14557 fi
14558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14559 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14560 fi
14561 if test $ol_cv_have_sys_errlist = yes ; then
14562
14563 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14564
14565 fi
14566
14567 fi
14568
14569
14570 for ac_header in regex.h
14571 do :
14572   ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default
14573 #ifdef HAVE_SYS_TYPES_H
14574 #include <sys/types.h>
14575 #endif
14576
14577 "
14578 if test "x$ac_cv_header_regex_h" = x""yes; then :
14579   cat >>confdefs.h <<_ACEOF
14580 #define HAVE_REGEX_H 1
14581 _ACEOF
14582
14583 fi
14584
14585 done
14586
14587
14588 if test "$ac_cv_header_regex_h" != yes ; then
14589         as_fn_error "POSIX regex.h required." "$LINENO" 5
14590 fi
14591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing regfree" >&5
14592 $as_echo_n "checking for library containing regfree... " >&6; }
14593 if test "${ac_cv_search_regfree+set}" = set; then :
14594   $as_echo_n "(cached) " >&6
14595 else
14596   ac_func_search_save_LIBS=$LIBS
14597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14598 /* end confdefs.h.  */
14599
14600 /* Override any GCC internal prototype to avoid an error.
14601    Use char because int might match the return type of a GCC
14602    builtin and then its argument prototype would still apply.  */
14603 #ifdef __cplusplus
14604 extern "C"
14605 #endif
14606 char regfree ();
14607 int
14608 main ()
14609 {
14610 return regfree ();
14611   ;
14612   return 0;
14613 }
14614 _ACEOF
14615 for ac_lib in '' regex gnuregex; do
14616   if test -z "$ac_lib"; then
14617     ac_res="none required"
14618   else
14619     ac_res=-l$ac_lib
14620     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14621   fi
14622   if ac_fn_c_try_link "$LINENO"; then :
14623   ac_cv_search_regfree=$ac_res
14624 fi
14625 rm -f core conftest.err conftest.$ac_objext \
14626     conftest$ac_exeext
14627   if test "${ac_cv_search_regfree+set}" = set; then :
14628   break
14629 fi
14630 done
14631 if test "${ac_cv_search_regfree+set}" = set; then :
14632
14633 else
14634   ac_cv_search_regfree=no
14635 fi
14636 rm conftest.$ac_ext
14637 LIBS=$ac_func_search_save_LIBS
14638 fi
14639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_regfree" >&5
14640 $as_echo "$ac_cv_search_regfree" >&6; }
14641 ac_res=$ac_cv_search_regfree
14642 if test "$ac_res" != no; then :
14643   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14644   :
14645 else
14646   as_fn_error "POSIX regex required." "$LINENO" 5
14647 fi
14648
14649
14650
14651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible POSIX regex" >&5
14652 $as_echo_n "checking for compatible POSIX regex... " >&6; }
14653 if test "${ol_cv_c_posix_regex+set}" = set; then :
14654   $as_echo_n "(cached) " >&6
14655 else
14656
14657         if test "$cross_compiling" = yes; then :
14658   ol_cv_c_posix_regex=cross
14659 else
14660   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14661 /* end confdefs.h.  */
14662
14663 #include <sys/types.h>
14664 #include <regex.h>
14665 static char *pattern, *string;
14666 main()
14667 {
14668         int rc;
14669         regex_t re;
14670
14671         pattern = "^A";
14672
14673         if(regcomp(&re, pattern, 0)) {
14674                 return -1;
14675         }
14676
14677         string = "ALL MATCH";
14678
14679         rc = regexec(&re, string, 0, (void*)0, 0);
14680
14681         regfree(&re);
14682
14683         return rc;
14684 }
14685 _ACEOF
14686 if ac_fn_c_try_run "$LINENO"; then :
14687   ol_cv_c_posix_regex=yes
14688 else
14689   ol_cv_c_posix_regex=no
14690 fi
14691 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14692   conftest.$ac_objext conftest.beam conftest.$ac_ext
14693 fi
14694
14695 fi
14696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_posix_regex" >&5
14697 $as_echo "$ol_cv_c_posix_regex" >&6; }
14698
14699 if test "$ol_cv_c_posix_regex" = no ; then
14700         as_fn_error "broken POSIX regex!" "$LINENO" 5
14701 fi
14702
14703
14704 have_uuid=no
14705 for ac_header in sys/uuid.h
14706 do :
14707   ac_fn_c_check_header_mongrel "$LINENO" "sys/uuid.h" "ac_cv_header_sys_uuid_h" "$ac_includes_default"
14708 if test "x$ac_cv_header_sys_uuid_h" = x""yes; then :
14709   cat >>confdefs.h <<_ACEOF
14710 #define HAVE_SYS_UUID_H 1
14711 _ACEOF
14712
14713 fi
14714
14715 done
14716
14717 if test $ac_cv_header_sys_uuid_h = yes ; then
14718         save_LIBS="$LIBS"
14719         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_to_str" >&5
14720 $as_echo_n "checking for library containing uuid_to_str... " >&6; }
14721 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14722   $as_echo_n "(cached) " >&6
14723 else
14724   ac_func_search_save_LIBS=$LIBS
14725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14726 /* end confdefs.h.  */
14727
14728 /* Override any GCC internal prototype to avoid an error.
14729    Use char because int might match the return type of a GCC
14730    builtin and then its argument prototype would still apply.  */
14731 #ifdef __cplusplus
14732 extern "C"
14733 #endif
14734 char uuid_to_str ();
14735 int
14736 main ()
14737 {
14738 return uuid_to_str ();
14739   ;
14740   return 0;
14741 }
14742 _ACEOF
14743 for ac_lib in '' uuid; do
14744   if test -z "$ac_lib"; then
14745     ac_res="none required"
14746   else
14747     ac_res=-l$ac_lib
14748     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14749   fi
14750   if ac_fn_c_try_link "$LINENO"; then :
14751   ac_cv_search_uuid_to_str=$ac_res
14752 fi
14753 rm -f core conftest.err conftest.$ac_objext \
14754     conftest$ac_exeext
14755   if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14756   break
14757 fi
14758 done
14759 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14760
14761 else
14762   ac_cv_search_uuid_to_str=no
14763 fi
14764 rm conftest.$ac_ext
14765 LIBS=$ac_func_search_save_LIBS
14766 fi
14767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_to_str" >&5
14768 $as_echo "$ac_cv_search_uuid_to_str" >&6; }
14769 ac_res=$ac_cv_search_uuid_to_str
14770 if test "$ac_res" != no; then :
14771   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14772   have_uuid=yes
14773 else
14774   :
14775 fi
14776
14777         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_create" >&5
14778 $as_echo_n "checking for library containing uuid_create... " >&6; }
14779 if test "${ac_cv_search_uuid_create+set}" = set; then :
14780   $as_echo_n "(cached) " >&6
14781 else
14782   ac_func_search_save_LIBS=$LIBS
14783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14784 /* end confdefs.h.  */
14785
14786 /* Override any GCC internal prototype to avoid an error.
14787    Use char because int might match the return type of a GCC
14788    builtin and then its argument prototype would still apply.  */
14789 #ifdef __cplusplus
14790 extern "C"
14791 #endif
14792 char uuid_create ();
14793 int
14794 main ()
14795 {
14796 return uuid_create ();
14797   ;
14798   return 0;
14799 }
14800 _ACEOF
14801 for ac_lib in '' uuid; do
14802   if test -z "$ac_lib"; then
14803     ac_res="none required"
14804   else
14805     ac_res=-l$ac_lib
14806     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14807   fi
14808   if ac_fn_c_try_link "$LINENO"; then :
14809   ac_cv_search_uuid_create=$ac_res
14810 fi
14811 rm -f core conftest.err conftest.$ac_objext \
14812     conftest$ac_exeext
14813   if test "${ac_cv_search_uuid_create+set}" = set; then :
14814   break
14815 fi
14816 done
14817 if test "${ac_cv_search_uuid_create+set}" = set; then :
14818
14819 else
14820   ac_cv_search_uuid_create=no
14821 fi
14822 rm conftest.$ac_ext
14823 LIBS=$ac_func_search_save_LIBS
14824 fi
14825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_create" >&5
14826 $as_echo "$ac_cv_search_uuid_create" >&6; }
14827 ac_res=$ac_cv_search_uuid_create
14828 if test "$ac_res" != no; then :
14829   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14830   :
14831 else
14832   have_uuid=no
14833 fi
14834
14835         LIBS="$save_LIBS"
14836
14837         if test $have_uuid = yes ; then
14838
14839 $as_echo "#define HAVE_UUID_TO_STR 1" >>confdefs.h
14840
14841
14842                 test "$ac_cv_search_uuid_to_str" = "none required" || \
14843                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
14844         fi
14845 fi
14846
14847 if test $have_uuid = no ; then
14848         for ac_header in uuid/uuid.h
14849 do :
14850   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14851 if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then :
14852   cat >>confdefs.h <<_ACEOF
14853 #define HAVE_UUID_UUID_H 1
14854 _ACEOF
14855
14856 fi
14857
14858 done
14859
14860         if test $ac_cv_header_uuid_uuid_h = yes ; then
14861                 save_LIBS="$LIBS"
14862                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
14863 $as_echo_n "checking for library containing uuid_generate... " >&6; }
14864 if test "${ac_cv_search_uuid_generate+set}" = set; then :
14865   $as_echo_n "(cached) " >&6
14866 else
14867   ac_func_search_save_LIBS=$LIBS
14868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14869 /* end confdefs.h.  */
14870
14871 /* Override any GCC internal prototype to avoid an error.
14872    Use char because int might match the return type of a GCC
14873    builtin and then its argument prototype would still apply.  */
14874 #ifdef __cplusplus
14875 extern "C"
14876 #endif
14877 char uuid_generate ();
14878 int
14879 main ()
14880 {
14881 return uuid_generate ();
14882   ;
14883   return 0;
14884 }
14885 _ACEOF
14886 for ac_lib in '' uuid; do
14887   if test -z "$ac_lib"; then
14888     ac_res="none required"
14889   else
14890     ac_res=-l$ac_lib
14891     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14892   fi
14893   if ac_fn_c_try_link "$LINENO"; then :
14894   ac_cv_search_uuid_generate=$ac_res
14895 fi
14896 rm -f core conftest.err conftest.$ac_objext \
14897     conftest$ac_exeext
14898   if test "${ac_cv_search_uuid_generate+set}" = set; then :
14899   break
14900 fi
14901 done
14902 if test "${ac_cv_search_uuid_generate+set}" = set; then :
14903
14904 else
14905   ac_cv_search_uuid_generate=no
14906 fi
14907 rm conftest.$ac_ext
14908 LIBS=$ac_func_search_save_LIBS
14909 fi
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
14911 $as_echo "$ac_cv_search_uuid_generate" >&6; }
14912 ac_res=$ac_cv_search_uuid_generate
14913 if test "$ac_res" != no; then :
14914   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14915   have_uuid=yes
14916 else
14917   :
14918 fi
14919
14920                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_unparse_lower" >&5
14921 $as_echo_n "checking for library containing uuid_unparse_lower... " >&6; }
14922 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
14923   $as_echo_n "(cached) " >&6
14924 else
14925   ac_func_search_save_LIBS=$LIBS
14926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14927 /* end confdefs.h.  */
14928
14929 /* Override any GCC internal prototype to avoid an error.
14930    Use char because int might match the return type of a GCC
14931    builtin and then its argument prototype would still apply.  */
14932 #ifdef __cplusplus
14933 extern "C"
14934 #endif
14935 char uuid_unparse_lower ();
14936 int
14937 main ()
14938 {
14939 return uuid_unparse_lower ();
14940   ;
14941   return 0;
14942 }
14943 _ACEOF
14944 for ac_lib in '' uuid; do
14945   if test -z "$ac_lib"; then
14946     ac_res="none required"
14947   else
14948     ac_res=-l$ac_lib
14949     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14950   fi
14951   if ac_fn_c_try_link "$LINENO"; then :
14952   ac_cv_search_uuid_unparse_lower=$ac_res
14953 fi
14954 rm -f core conftest.err conftest.$ac_objext \
14955     conftest$ac_exeext
14956   if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
14957   break
14958 fi
14959 done
14960 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
14961
14962 else
14963   ac_cv_search_uuid_unparse_lower=no
14964 fi
14965 rm conftest.$ac_ext
14966 LIBS=$ac_func_search_save_LIBS
14967 fi
14968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_unparse_lower" >&5
14969 $as_echo "$ac_cv_search_uuid_unparse_lower" >&6; }
14970 ac_res=$ac_cv_search_uuid_unparse_lower
14971 if test "$ac_res" != no; then :
14972   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14973   :
14974 else
14975   have_uuid=no
14976 fi
14977
14978                 LIBS="$save_LIBS"
14979
14980                 if test $have_uuid = yes ; then
14981
14982 $as_echo "#define HAVE_UUID_GENERATE 1" >>confdefs.h
14983
14984
14985                         test "$ac_cv_search_uuid_generate" = "none required" || \
14986                                 SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_generate"
14987                 fi
14988         fi
14989 fi
14990
14991 if test $have_uuid = no ; then
14992         { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
14993 $as_echo_n "checking to see if -lrpcrt4 is needed for win32 UUID support... " >&6; }
14994         save_LIBS="$LIBS"
14995         LIBS="$LIBS -lrpcrt4"
14996         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14997 /* end confdefs.h.  */
14998
14999                 int __stdcall UuidCreate(void *);
15000                 int __stdcall UuidToStringA(void *,void **);
15001
15002 int
15003 main ()
15004 {
15005
15006                 UuidCreate(0);
15007                 UuidToStringA(0,0);
15008
15009   ;
15010   return 0;
15011 }
15012 _ACEOF
15013 if ac_fn_c_try_link "$LINENO"; then :
15014   need_rpcrt=yes
15015 else
15016   need_rpcrt=no
15017 fi
15018 rm -f core conftest.err conftest.$ac_objext \
15019     conftest$ac_exeext conftest.$ac_ext
15020         if test $need_rpcrt = yes; then
15021                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
15022         fi
15023         LIBS="$save_LIBS"
15024         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_rpcrt" >&5
15025 $as_echo "$need_rpcrt" >&6; }
15026 fi
15027
15028 ol_cv_lib_resolver=no
15029 if test $ol_cv_lib_resolver = no ; then
15030         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (default)" >&5
15031 $as_echo_n "checking for resolver link (default)... " >&6; }
15032 if test "${ol_cv_resolver_none+set}" = set; then :
15033   $as_echo_n "(cached) " >&6
15034 else
15035
15036         ol_RESOLVER_LIB=
15037         ol_LIBS=$LIBS
15038         LIBS="$ol_RESOLVER_LIB $LIBS"
15039
15040         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15041 /* end confdefs.h.  */
15042
15043 #ifdef HAVE_SYS_TYPES_H
15044 #       include <sys/types.h>
15045 #endif
15046 #include <netinet/in.h>
15047 #ifdef HAVE_ARPA_NAMESER_H
15048 #       include <arpa/nameser.h>
15049 #endif
15050 #ifdef HAVE_RESOLV_H
15051 #       include <resolv.h>
15052 #endif
15053
15054 int
15055 main ()
15056 {
15057 {
15058         int len, status;
15059         char *request = NULL;
15060         unsigned char reply[64*1024];
15061         unsigned char host[64*1024];
15062         unsigned char *p;
15063
15064 #ifdef NS_HFIXEDSZ
15065         /* Bind 8/9 interface */
15066         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15067 #else
15068         /* Bind 4 interface */
15069 # ifndef T_SRV
15070 #  define T_SRV 33
15071 # endif
15072         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15073 #endif
15074         p = reply;
15075 #ifdef NS_HFIXEDSZ
15076         /* Bind 8/9 interface */
15077         p += NS_HFIXEDSZ;
15078 #elif defined(HFIXEDSZ)
15079         /* Bind 4 interface w/ HFIXEDSZ */
15080         p += HFIXEDSZ;
15081 #else
15082         /* Bind 4 interface w/o HFIXEDSZ */
15083         p += sizeof(HEADER);
15084 #endif
15085         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15086 }
15087   ;
15088   return 0;
15089 }
15090 _ACEOF
15091 if ac_fn_c_try_link "$LINENO"; then :
15092   ol_cv_resolver_none=yes
15093 else
15094   ol_cv_resolver_none=no
15095 fi
15096 rm -f core conftest.err conftest.$ac_objext \
15097     conftest$ac_exeext conftest.$ac_ext
15098
15099         LIBS="$ol_LIBS"
15100
15101 fi
15102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_none" >&5
15103 $as_echo "$ol_cv_resolver_none" >&6; }
15104
15105         if test $ol_cv_resolver_none = yes ; then
15106                 ol_cv_lib_resolver=yes
15107         fi
15108 fi
15109
15110 if test $ol_cv_lib_resolver = no ; then
15111         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lresolv)" >&5
15112 $as_echo_n "checking for resolver link (-lresolv)... " >&6; }
15113 if test "${ol_cv_resolver_resolv+set}" = set; then :
15114   $as_echo_n "(cached) " >&6
15115 else
15116
15117         ol_RESOLVER_LIB=-lresolv
15118         ol_LIBS=$LIBS
15119         LIBS="$ol_RESOLVER_LIB $LIBS"
15120
15121         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15122 /* end confdefs.h.  */
15123
15124 #ifdef HAVE_SYS_TYPES_H
15125 #       include <sys/types.h>
15126 #endif
15127 #include <netinet/in.h>
15128 #ifdef HAVE_ARPA_NAMESER_H
15129 #       include <arpa/nameser.h>
15130 #endif
15131 #ifdef HAVE_RESOLV_H
15132 #       include <resolv.h>
15133 #endif
15134
15135 int
15136 main ()
15137 {
15138 {
15139         int len, status;
15140         char *request = NULL;
15141         unsigned char reply[64*1024];
15142         unsigned char host[64*1024];
15143         unsigned char *p;
15144
15145 #ifdef NS_HFIXEDSZ
15146         /* Bind 8/9 interface */
15147         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15148 #else
15149         /* Bind 4 interface */
15150 # ifndef T_SRV
15151 #  define T_SRV 33
15152 # endif
15153         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15154 #endif
15155         p = reply;
15156 #ifdef NS_HFIXEDSZ
15157         /* Bind 8/9 interface */
15158         p += NS_HFIXEDSZ;
15159 #elif defined(HFIXEDSZ)
15160         /* Bind 4 interface w/ HFIXEDSZ */
15161         p += HFIXEDSZ;
15162 #else
15163         /* Bind 4 interface w/o HFIXEDSZ */
15164         p += sizeof(HEADER);
15165 #endif
15166         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15167 }
15168   ;
15169   return 0;
15170 }
15171 _ACEOF
15172 if ac_fn_c_try_link "$LINENO"; then :
15173   ol_cv_resolver_resolv=yes
15174 else
15175   ol_cv_resolver_resolv=no
15176 fi
15177 rm -f core conftest.err conftest.$ac_objext \
15178     conftest$ac_exeext conftest.$ac_ext
15179
15180         LIBS="$ol_LIBS"
15181
15182 fi
15183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_resolv" >&5
15184 $as_echo "$ol_cv_resolver_resolv" >&6; }
15185
15186         if test $ol_cv_resolver_resolv = yes ; then
15187                 ol_cv_lib_resolver=-lresolv
15188         fi
15189 fi
15190
15191 if test $ol_cv_lib_resolver = no ; then
15192         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lbind)" >&5
15193 $as_echo_n "checking for resolver link (-lbind)... " >&6; }
15194 if test "${ol_cv_resolver_bind+set}" = set; then :
15195   $as_echo_n "(cached) " >&6
15196 else
15197
15198         ol_RESOLVER_LIB=-lbind
15199         ol_LIBS=$LIBS
15200         LIBS="$ol_RESOLVER_LIB $LIBS"
15201
15202         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15203 /* end confdefs.h.  */
15204
15205 #ifdef HAVE_SYS_TYPES_H
15206 #       include <sys/types.h>
15207 #endif
15208 #include <netinet/in.h>
15209 #ifdef HAVE_ARPA_NAMESER_H
15210 #       include <arpa/nameser.h>
15211 #endif
15212 #ifdef HAVE_RESOLV_H
15213 #       include <resolv.h>
15214 #endif
15215
15216 int
15217 main ()
15218 {
15219 {
15220         int len, status;
15221         char *request = NULL;
15222         unsigned char reply[64*1024];
15223         unsigned char host[64*1024];
15224         unsigned char *p;
15225
15226 #ifdef NS_HFIXEDSZ
15227         /* Bind 8/9 interface */
15228         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15229 #else
15230         /* Bind 4 interface */
15231 # ifndef T_SRV
15232 #  define T_SRV 33
15233 # endif
15234         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15235 #endif
15236         p = reply;
15237 #ifdef NS_HFIXEDSZ
15238         /* Bind 8/9 interface */
15239         p += NS_HFIXEDSZ;
15240 #elif defined(HFIXEDSZ)
15241         /* Bind 4 interface w/ HFIXEDSZ */
15242         p += HFIXEDSZ;
15243 #else
15244         /* Bind 4 interface w/o HFIXEDSZ */
15245         p += sizeof(HEADER);
15246 #endif
15247         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15248 }
15249   ;
15250   return 0;
15251 }
15252 _ACEOF
15253 if ac_fn_c_try_link "$LINENO"; then :
15254   ol_cv_resolver_bind=yes
15255 else
15256   ol_cv_resolver_bind=no
15257 fi
15258 rm -f core conftest.err conftest.$ac_objext \
15259     conftest$ac_exeext conftest.$ac_ext
15260
15261         LIBS="$ol_LIBS"
15262
15263 fi
15264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_bind" >&5
15265 $as_echo "$ol_cv_resolver_bind" >&6; }
15266
15267         if test $ol_cv_resolver_bind = yes ; then
15268                 ol_cv_lib_resolver=-lbind
15269         fi
15270 fi
15271
15272
15273
15274 ol_link_dnssrv=no
15275 if test "$ol_cv_lib_resolver" != no ; then
15276
15277 $as_echo "#define HAVE_RES_QUERY 1" >>confdefs.h
15278
15279
15280         if test "$ol_enable_dnssrv" != no ; then
15281                 ol_link_dnssrv=yes
15282         fi
15283
15284         if test "$ol_cv_lib_resolver" != yes ; then
15285                 LIBS="$ol_cv_lib_resolver $LIBS"
15286         fi
15287 fi
15288
15289 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
15290         if test "$ol_link_dnssrv" = no ; then
15291                 as_fn_error "DNSSRV requires res_query()" "$LINENO" 5
15292         fi
15293 else
15294         ol_enable_dnssrv=no
15295 fi
15296
15297 for ac_func in hstrerror
15298 do :
15299   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15300 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15301 eval as_val=\$$as_ac_var
15302    if test "x$as_val" = x""yes; then :
15303   cat >>confdefs.h <<_ACEOF
15304 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15305 _ACEOF
15306
15307 fi
15308 done
15309
15310
15311 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
15312 do :
15313   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15314 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15315 eval as_val=\$$as_ac_var
15316    if test "x$as_val" = x""yes; then :
15317   cat >>confdefs.h <<_ACEOF
15318 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15319 _ACEOF
15320
15321 fi
15322 done
15323
15324
15325 ol_link_ipv6=no
15326 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
15327         if test $ol_enable_ipv6 = yes ; then
15328                 as_fn_error "IPv6 support requires getaddrinfo() and inet_ntop()" "$LINENO" 5
15329         fi
15330 elif test $ol_enable_ipv6 != no ; then
15331         { $as_echo "$as_me:${as_lineno-$LINENO}: checking INET6_ADDRSTRLEN" >&5
15332 $as_echo_n "checking INET6_ADDRSTRLEN... " >&6; }
15333 if test "${ol_cv_inet6_addrstrlen+set}" = set; then :
15334   $as_echo_n "(cached) " >&6
15335 else
15336
15337                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15338 /* end confdefs.h.  */
15339
15340 #                       include <netinet/in.h>
15341 #                       ifdef INET6_ADDRSTRLEN
15342                                 __has_inet6_addrstrlen__;
15343 #                       endif
15344
15345 _ACEOF
15346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15347   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then :
15348   ol_cv_inet6_addrstrlen=yes
15349 else
15350   ol_cv_inet6_addrstrlen=no
15351 fi
15352 rm -f conftest*
15353
15354 fi
15355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_inet6_addrstrlen" >&5
15356 $as_echo "$ol_cv_inet6_addrstrlen" >&6; }
15357
15358
15359         { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr_storage" >&5
15360 $as_echo_n "checking struct sockaddr_storage... " >&6; }
15361 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then :
15362   $as_echo_n "(cached) " >&6
15363 else
15364
15365                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15366 /* end confdefs.h.  */
15367
15368 #include <sys/types.h>
15369 #include <sys/socket.h>
15370
15371 int
15372 main ()
15373 {
15374
15375                         struct sockaddr_storage ss;
15376
15377   ;
15378   return 0;
15379 }
15380 _ACEOF
15381 if ac_fn_c_try_compile "$LINENO"; then :
15382   ol_cv_struct_sockaddr_storage=yes
15383 else
15384   ol_cv_struct_sockaddr_storage=no
15385 fi
15386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15387 fi
15388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_struct_sockaddr_storage" >&5
15389 $as_echo "$ol_cv_struct_sockaddr_storage" >&6; }
15390
15391         if test $ol_cv_inet6_addrstrlen = yes &&
15392            test $ol_cv_struct_sockaddr_storage = yes ; then
15393                 ol_link_ipv6=yes
15394         elif test $ol_enable_ipv6 = yes &&
15395              test $ol_cv_inet6_addrstrlen = no ; then
15396                 as_fn_error "IPv6 support requires INET6_ADDRSTRLEN" "$LINENO" 5
15397         elif test $ol_enable_ipv6 = yes &&
15398              test $ol_cv_struct_sockaddr_storage = no ; then
15399                 as_fn_error "IPv6 support requires struct sockaddr_storage" "$LINENO" 5
15400         fi
15401 fi
15402
15403 if test $ol_enable_local != no ; then
15404         for ac_header in sys/un.h
15405 do :
15406   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15407 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15408 eval as_val=\$$as_ac_Header
15409    if test "x$as_val" = x""yes; then :
15410   cat >>confdefs.h <<_ACEOF
15411 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15412 _ACEOF
15413
15414 fi
15415
15416 done
15417
15418
15419         if test $ol_enable_local = auto ; then
15420                 ol_enable_local=$ac_cv_header_sys_un_h
15421         elif test $ac_cv_header_sys_un_h = no ; then
15422                 as_fn_error "AF_LOCAL domain support requires sys/un.h" "$LINENO" 5
15423         fi
15424 fi
15425
15426
15427 if test $ol_with_tls = yes ; then
15428         ol_with_tls=auto
15429 fi
15430
15431 ol_link_tls=no
15432 if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
15433         for ac_header in openssl/ssl.h
15434 do :
15435   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
15436 if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then :
15437   cat >>confdefs.h <<_ACEOF
15438 #define HAVE_OPENSSL_SSL_H 1
15439 _ACEOF
15440
15441 fi
15442
15443 done
15444
15445
15446         if test $ac_cv_header_openssl_ssl_h = yes ; then
15447                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
15448 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
15449 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then :
15450   $as_echo_n "(cached) " >&6
15451 else
15452   ac_check_lib_save_LIBS=$LIBS
15453 LIBS="-lssl -lcrypto $LIBS"
15454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15455 /* end confdefs.h.  */
15456
15457 /* Override any GCC internal prototype to avoid an error.
15458    Use char because int might match the return type of a GCC
15459    builtin and then its argument prototype would still apply.  */
15460 #ifdef __cplusplus
15461 extern "C"
15462 #endif
15463 char SSL_library_init ();
15464 int
15465 main ()
15466 {
15467 return SSL_library_init ();
15468   ;
15469   return 0;
15470 }
15471 _ACEOF
15472 if ac_fn_c_try_link "$LINENO"; then :
15473   ac_cv_lib_ssl_SSL_library_init=yes
15474 else
15475   ac_cv_lib_ssl_SSL_library_init=no
15476 fi
15477 rm -f core conftest.err conftest.$ac_objext \
15478     conftest$ac_exeext conftest.$ac_ext
15479 LIBS=$ac_check_lib_save_LIBS
15480 fi
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
15482 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
15483 if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then :
15484   have_openssl=yes
15485                         need_rsaref=no
15486 else
15487   have_openssl=no
15488 fi
15489
15490
15491                 if test $have_openssl = no ; then
15492                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl3_accept in -lssl" >&5
15493 $as_echo_n "checking for ssl3_accept in -lssl... " >&6; }
15494 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then :
15495   $as_echo_n "(cached) " >&6
15496 else
15497   ac_check_lib_save_LIBS=$LIBS
15498 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
15499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15500 /* end confdefs.h.  */
15501
15502 /* Override any GCC internal prototype to avoid an error.
15503    Use char because int might match the return type of a GCC
15504    builtin and then its argument prototype would still apply.  */
15505 #ifdef __cplusplus
15506 extern "C"
15507 #endif
15508 char ssl3_accept ();
15509 int
15510 main ()
15511 {
15512 return ssl3_accept ();
15513   ;
15514   return 0;
15515 }
15516 _ACEOF
15517 if ac_fn_c_try_link "$LINENO"; then :
15518   ac_cv_lib_ssl_ssl3_accept=yes
15519 else
15520   ac_cv_lib_ssl_ssl3_accept=no
15521 fi
15522 rm -f core conftest.err conftest.$ac_objext \
15523     conftest$ac_exeext conftest.$ac_ext
15524 LIBS=$ac_check_lib_save_LIBS
15525 fi
15526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_ssl3_accept" >&5
15527 $as_echo "$ac_cv_lib_ssl_ssl3_accept" >&6; }
15528 if test "x$ac_cv_lib_ssl_ssl3_accept" = x""yes; then :
15529   have_openssl=yes
15530                                 need_rsaref=yes
15531 else
15532   have_openssl=no
15533 fi
15534
15535                 fi
15536
15537                 if test $have_openssl = yes ; then
15538                         ol_with_tls=openssl
15539                         ol_link_tls=yes
15540
15541
15542 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
15543
15544
15545                         if test $need_rsaref = yes; then
15546
15547 $as_echo "#define HAVE_RSAREF 1" >>confdefs.h
15548
15549
15550                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
15551                         else
15552                                 TLS_LIBS="-lssl -lcrypto"
15553                         fi
15554
15555                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version (CRL checking capability)" >&5
15556 $as_echo_n "checking OpenSSL library version (CRL checking capability)... " >&6; }
15557 if test "${ol_cv_ssl_crl_compat+set}" = set; then :
15558   $as_echo_n "(cached) " >&6
15559 else
15560
15561                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15562 /* end confdefs.h.  */
15563
15564 #ifdef HAVE_OPENSSL_SSL_H
15565 #include <openssl/ssl.h>
15566 #endif
15567
15568 /* Require 0.9.7d+ */
15569 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
15570         char *__ssl_compat = "0.9.7d";
15571 #endif
15572
15573 _ACEOF
15574 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15575   $EGREP "__ssl_compat" >/dev/null 2>&1; then :
15576   ol_cv_ssl_crl_compat=yes
15577 else
15578   ol_cv_ssl_crl_compat=no
15579 fi
15580 rm -f conftest*
15581
15582 fi
15583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_ssl_crl_compat" >&5
15584 $as_echo "$ol_cv_ssl_crl_compat" >&6; }
15585
15586                         if test $ol_cv_ssl_crl_compat = yes ; then
15587
15588 $as_echo "#define HAVE_OPENSSL_CRL 1" >>confdefs.h
15589
15590                         fi
15591                 fi
15592         fi
15593 fi
15594
15595 if test $ol_link_tls = no ; then
15596         if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then
15597                 for ac_header in gnutls/gnutls.h
15598 do :
15599   ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
15600 if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then :
15601   cat >>confdefs.h <<_ACEOF
15602 #define HAVE_GNUTLS_GNUTLS_H 1
15603 _ACEOF
15604
15605 fi
15606
15607 done
15608
15609
15610                 if test $ac_cv_header_gnutls_gnutls_h = yes ; then
15611                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
15612 $as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
15613 if test "${ac_cv_lib_gnutls_gnutls_init+set}" = set; then :
15614   $as_echo_n "(cached) " >&6
15615 else
15616   ac_check_lib_save_LIBS=$LIBS
15617 LIBS="-lgnutls  $LIBS"
15618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15619 /* end confdefs.h.  */
15620
15621 /* Override any GCC internal prototype to avoid an error.
15622    Use char because int might match the return type of a GCC
15623    builtin and then its argument prototype would still apply.  */
15624 #ifdef __cplusplus
15625 extern "C"
15626 #endif
15627 char gnutls_init ();
15628 int
15629 main ()
15630 {
15631 return gnutls_init ();
15632   ;
15633   return 0;
15634 }
15635 _ACEOF
15636 if ac_fn_c_try_link "$LINENO"; then :
15637   ac_cv_lib_gnutls_gnutls_init=yes
15638 else
15639   ac_cv_lib_gnutls_gnutls_init=no
15640 fi
15641 rm -f core conftest.err conftest.$ac_objext \
15642     conftest$ac_exeext conftest.$ac_ext
15643 LIBS=$ac_check_lib_save_LIBS
15644 fi
15645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_init" >&5
15646 $as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
15647 if test "x$ac_cv_lib_gnutls_gnutls_init" = x""yes; then :
15648   have_gnutls=yes
15649 else
15650   have_gnutls=no
15651 fi
15652
15653
15654                         if test $have_gnutls = yes ; then
15655                                 ol_with_tls=gnutls
15656                                 ol_link_tls=yes
15657
15658                                 TLS_LIBS="-lgnutls"
15659
15660
15661 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
15662
15663                         fi
15664                 fi
15665         fi
15666 fi
15667
15668 if test $ol_link_tls = no ; then
15669         if test $ol_with_tls = moznss || test $ol_with_tls = auto ; then
15670                 have_moznss=no
15671                 for ac_header in nssutil.h
15672 do :
15673   ac_fn_c_check_header_mongrel "$LINENO" "nssutil.h" "ac_cv_header_nssutil_h" "$ac_includes_default"
15674 if test "x$ac_cv_header_nssutil_h" = x""yes; then :
15675   cat >>confdefs.h <<_ACEOF
15676 #define HAVE_NSSUTIL_H 1
15677 _ACEOF
15678
15679 fi
15680
15681 done
15682
15683                 if test "$ac_cv_header_nssutil_h" = yes ; then
15684                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_Initialize in -lnss3" >&5
15685 $as_echo_n "checking for NSS_Initialize in -lnss3... " >&6; }
15686 if test "${ac_cv_lib_nss3_NSS_Initialize+set}" = set; then :
15687   $as_echo_n "(cached) " >&6
15688 else
15689   ac_check_lib_save_LIBS=$LIBS
15690 LIBS="-lnss3  $LIBS"
15691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15692 /* end confdefs.h.  */
15693
15694 /* Override any GCC internal prototype to avoid an error.
15695    Use char because int might match the return type of a GCC
15696    builtin and then its argument prototype would still apply.  */
15697 #ifdef __cplusplus
15698 extern "C"
15699 #endif
15700 char NSS_Initialize ();
15701 int
15702 main ()
15703 {
15704 return NSS_Initialize ();
15705   ;
15706   return 0;
15707 }
15708 _ACEOF
15709 if ac_fn_c_try_link "$LINENO"; then :
15710   ac_cv_lib_nss3_NSS_Initialize=yes
15711 else
15712   ac_cv_lib_nss3_NSS_Initialize=no
15713 fi
15714 rm -f core conftest.err conftest.$ac_objext \
15715     conftest$ac_exeext conftest.$ac_ext
15716 LIBS=$ac_check_lib_save_LIBS
15717 fi
15718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_NSS_Initialize" >&5
15719 $as_echo "$ac_cv_lib_nss3_NSS_Initialize" >&6; }
15720 if test "x$ac_cv_lib_nss3_NSS_Initialize" = x""yes; then :
15721    have_moznss=yes
15722 else
15723    have_moznss=no
15724 fi
15725
15726                 fi
15727
15728                 if test "$have_moznss" = yes ; then
15729                         ol_with_tls=moznss
15730                         ol_link_tls=yes
15731
15732 $as_echo "#define HAVE_MOZNSS 1" >>confdefs.h
15733
15734                         TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
15735                 else
15736                         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
15737                 fi
15738         fi
15739 fi
15740
15741 WITH_TLS=no
15742 if test $ol_link_tls = yes ; then
15743
15744 $as_echo "#define HAVE_TLS 1" >>confdefs.h
15745
15746         WITH_TLS=yes
15747 elif test $ol_with_tls = auto ; then
15748         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate TLS/SSL package" >&5
15749 $as_echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
15750         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15751 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15752 elif test $ol_with_tls != no ; then
15753         as_fn_error "Could not locate TLS/SSL package" "$LINENO" 5
15754 else
15755         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15756 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15757 fi
15758
15759 if test $ol_enable_lmpasswd != no; then
15760         if test $ol_link_tls != yes ; then
15761                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
15762         fi
15763
15764
15765 $as_echo "#define SLAPD_LMHASH 1" >>confdefs.h
15766
15767 fi
15768
15769 ol_link_threads=no
15770
15771 case $ol_with_threads in auto | yes | nt)
15772
15773
15774         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
15775 if test "x$ac_cv_func__beginthread" = x""yes; then :
15776
15777 fi
15778
15779
15780         if test $ac_cv_func__beginthread = yes ; then
15781
15782 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
15783
15784                 ol_cv_nt_threads=yes
15785         fi
15786
15787
15788         if test "$ol_cv_nt_threads" = yes ; then
15789                 ol_link_threads=nt
15790                 ol_with_threads=found
15791                 ol_with_yielding_select=yes
15792
15793
15794 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
15795
15796
15797 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
15798
15799         fi
15800
15801         if test $ol_with_threads = nt ; then
15802                 as_fn_error "could not locate NT Threads" "$LINENO" 5
15803         fi
15804         ;;
15805 esac
15806
15807 case $ol_with_threads in auto | yes | posix)
15808
15809         for ac_header in pthread.h
15810 do :
15811   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15812 if test "x$ac_cv_header_pthread_h" = x""yes; then :
15813   cat >>confdefs.h <<_ACEOF
15814 #define HAVE_PTHREAD_H 1
15815 _ACEOF
15816
15817 fi
15818
15819 done
15820
15821
15822         if test $ac_cv_header_pthread_h = yes ; then
15823                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
15824 $as_echo_n "checking POSIX thread version... " >&6; }
15825 if test "${ol_cv_pthread_version+set}" = set; then :
15826   $as_echo_n "(cached) " >&6
15827 else
15828
15829         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15830 /* end confdefs.h.  */
15831
15832 #               include <pthread.h>
15833
15834 int
15835 main ()
15836 {
15837
15838                 int i = PTHREAD_CREATE_JOINABLE;
15839
15840   ;
15841   return 0;
15842 }
15843 _ACEOF
15844 if ac_fn_c_try_compile "$LINENO"; then :
15845
15846         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15847 /* end confdefs.h.  */
15848 #include <pthread.h>
15849
15850 _ACEOF
15851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15852   $EGREP "pthread_detach" >/dev/null 2>&1; then :
15853   ol_cv_pthread_version=10
15854 else
15855   ol_cv_pthread_version=8
15856 fi
15857 rm -f conftest*
15858
15859 else
15860
15861         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15862 /* end confdefs.h.  */
15863
15864 #               include <pthread.h>
15865 #               ifdef PTHREAD_CREATE_UNDETACHED
15866                 draft7
15867 #               endif
15868
15869 _ACEOF
15870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15871   $EGREP "draft7" >/dev/null 2>&1; then :
15872   ol_cv_pthread_version=7
15873 else
15874
15875         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15876 /* end confdefs.h.  */
15877 #include <pthread.h>
15878
15879 _ACEOF
15880 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15881   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
15882   ol_cv_pthread_version=6
15883 else
15884
15885         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15886 /* end confdefs.h.  */
15887
15888 #               include <pthread.h>
15889 #ifdef          PTHREAD_MUTEX_INITIALIZER
15890                 draft5
15891 #endif
15892
15893 _ACEOF
15894 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15895   $EGREP "draft5" >/dev/null 2>&1; then :
15896   ol_cv_pthread_version=5
15897 else
15898   ol_cv_pthread_version=4
15899 fi
15900 rm -f conftest*
15901
15902 fi
15903 rm -f conftest*
15904
15905 fi
15906 rm -f conftest*
15907
15908 fi
15909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15910
15911 fi
15912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
15913 $as_echo "$ol_cv_pthread_version" >&6; }
15914
15915
15916                 if test $ol_cv_pthread_version != 0 ; then
15917
15918 cat >>confdefs.h <<_ACEOF
15919 #define HAVE_PTHREADS $ol_cv_pthread_version
15920 _ACEOF
15921
15922                 else
15923                         as_fn_error "unknown pthread version" "$LINENO" 5
15924                 fi
15925
15926                 # consider threads found
15927                 ol_with_threads=found
15928
15929
15930         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
15931 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
15932 if test "${ol_cv_header_linux_threads+set}" = set; then :
15933   $as_echo_n "(cached) " >&6
15934 else
15935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15936 /* end confdefs.h.  */
15937 #include <pthread.h>
15938 _ACEOF
15939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15940   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
15941   ol_cv_header_linux_threads=yes
15942 else
15943   ol_cv_header_linux_threads=no
15944 fi
15945 rm -f conftest*
15946
15947
15948 fi
15949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
15950 $as_echo "$ol_cv_header_linux_threads" >&6; }
15951         if test $ol_cv_header_linux_threads = yes; then
15952
15953 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
15954
15955         fi
15956
15957
15958         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
15959 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
15960 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then :
15961   $as_echo_n "(cached) " >&6
15962 else
15963   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15964 /* end confdefs.h.  */
15965 #include <pthread.h>
15966 #ifdef _POSIX_THREAD_IS_GNU_PTH
15967         __gnu_pth__;
15968 #endif
15969
15970 _ACEOF
15971 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15972   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
15973   ol_cv_header_gnu_pth_pthread_h=yes
15974 else
15975   ol_cv_header_gnu_pth_pthread_h=no
15976 fi
15977 rm -f conftest*
15978
15979
15980 fi
15981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
15982 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
15983
15984
15985                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
15986                         for ac_header in sched.h
15987 do :
15988   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
15989 if test "x$ac_cv_header_sched_h" = x""yes; then :
15990   cat >>confdefs.h <<_ACEOF
15991 #define HAVE_SCHED_H 1
15992 _ACEOF
15993
15994 fi
15995
15996 done
15997
15998                 fi
15999
16000
16001                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
16002 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
16003 if test "${ol_cv_pthread_create+set}" = set; then :
16004   $as_echo_n "(cached) " >&6
16005 else
16006
16007                         if test "$cross_compiling" = yes; then :
16008   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16009 /* end confdefs.h.  */
16010
16011 /* pthread test headers */
16012 #include <pthread.h>
16013 #if HAVE_PTHREADS < 7
16014 #include <errno.h>
16015 #endif
16016 #ifndef NULL
16017 #define NULL (void*)0
16018 #endif
16019
16020 static void *task(p)
16021         void *p;
16022 {
16023         return (void *) (p == NULL);
16024 }
16025
16026 int
16027 main ()
16028 {
16029
16030         /* pthread test function */
16031 #ifndef PTHREAD_CREATE_DETACHED
16032 #define PTHREAD_CREATE_DETACHED 1
16033 #endif
16034         pthread_t t;
16035         int status;
16036         int detach = PTHREAD_CREATE_DETACHED;
16037
16038 #if HAVE_PTHREADS > 4
16039         /* Final pthreads */
16040         pthread_attr_t attr;
16041
16042         status = pthread_attr_init(&attr);
16043         if( status ) return status;
16044
16045 #if HAVE_PTHREADS < 7
16046         status = pthread_attr_setdetachstate(&attr, &detach);
16047         if( status < 0 ) status = errno;
16048 #else
16049         status = pthread_attr_setdetachstate(&attr, detach);
16050 #endif
16051         if( status ) return status;
16052         status = pthread_create( &t, &attr, task, NULL );
16053 #if HAVE_PTHREADS < 7
16054         if( status < 0 ) status = errno;
16055 #endif
16056         if( status ) return status;
16057 #else
16058         /* Draft 4 pthreads */
16059         status = pthread_create( &t, pthread_attr_default, task, NULL );
16060         if( status ) return errno;
16061
16062         /* give thread a chance to complete */
16063         /* it should remain joinable and hence detachable */
16064         sleep( 1 );
16065
16066         status = pthread_detach( &t );
16067         if( status ) return errno;
16068 #endif
16069
16070 #ifdef HAVE_LINUX_THREADS
16071         pthread_kill_other_threads_np();
16072 #endif
16073
16074         return 0;
16075
16076   ;
16077   return 0;
16078 }
16079 _ACEOF
16080 if ac_fn_c_try_link "$LINENO"; then :
16081   ol_cv_pthread_create=yes
16082 else
16083   ol_cv_pthread_create=no
16084 fi
16085 rm -f core conftest.err conftest.$ac_objext \
16086     conftest$ac_exeext conftest.$ac_ext
16087 else
16088   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16089 /* end confdefs.h.  */
16090
16091 /* pthread test headers */
16092 #include <pthread.h>
16093 #if HAVE_PTHREADS < 7
16094 #include <errno.h>
16095 #endif
16096 #ifndef NULL
16097 #define NULL (void*)0
16098 #endif
16099
16100 static void *task(p)
16101         void *p;
16102 {
16103         return (void *) (p == NULL);
16104 }
16105
16106
16107 int main(argc, argv)
16108         int argc;
16109         char **argv;
16110 {
16111
16112         /* pthread test function */
16113 #ifndef PTHREAD_CREATE_DETACHED
16114 #define PTHREAD_CREATE_DETACHED 1
16115 #endif
16116         pthread_t t;
16117         int status;
16118         int detach = PTHREAD_CREATE_DETACHED;
16119
16120 #if HAVE_PTHREADS > 4
16121         /* Final pthreads */
16122         pthread_attr_t attr;
16123
16124         status = pthread_attr_init(&attr);
16125         if( status ) return status;
16126
16127 #if HAVE_PTHREADS < 7
16128         status = pthread_attr_setdetachstate(&attr, &detach);
16129         if( status < 0 ) status = errno;
16130 #else
16131         status = pthread_attr_setdetachstate(&attr, detach);
16132 #endif
16133         if( status ) return status;
16134         status = pthread_create( &t, &attr, task, NULL );
16135 #if HAVE_PTHREADS < 7
16136         if( status < 0 ) status = errno;
16137 #endif
16138         if( status ) return status;
16139 #else
16140         /* Draft 4 pthreads */
16141         status = pthread_create( &t, pthread_attr_default, task, NULL );
16142         if( status ) return errno;
16143
16144         /* give thread a chance to complete */
16145         /* it should remain joinable and hence detachable */
16146         sleep( 1 );
16147
16148         status = pthread_detach( &t );
16149         if( status ) return errno;
16150 #endif
16151
16152 #ifdef HAVE_LINUX_THREADS
16153         pthread_kill_other_threads_np();
16154 #endif
16155
16156         return 0;
16157
16158 }
16159
16160 _ACEOF
16161 if ac_fn_c_try_run "$LINENO"; then :
16162   ol_cv_pthread_create=yes
16163 else
16164   ol_cv_pthread_create=no
16165 fi
16166 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16167   conftest.$ac_objext conftest.beam conftest.$ac_ext
16168 fi
16169
16170 fi
16171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
16172 $as_echo "$ol_cv_pthread_create" >&6; }
16173
16174                 if test $ol_cv_pthread_create != no ; then
16175                         ol_link_threads=posix
16176                         ol_link_pthreads=""
16177                 fi
16178
16179                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
16180 if test "$ol_link_threads" = no ; then
16181         # try -kthread
16182         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
16183 $as_echo_n "checking for pthread link with -kthread... " >&6; }
16184 if test "${ol_cv_pthread_kthread+set}" = set; then :
16185   $as_echo_n "(cached) " >&6
16186 else
16187
16188                 # save the flags
16189                 ol_LIBS="$LIBS"
16190                 LIBS="-kthread $LIBS"
16191
16192                 if test "$cross_compiling" = yes; then :
16193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16194 /* end confdefs.h.  */
16195
16196 /* pthread test headers */
16197 #include <pthread.h>
16198 #if HAVE_PTHREADS < 7
16199 #include <errno.h>
16200 #endif
16201 #ifndef NULL
16202 #define NULL (void*)0
16203 #endif
16204
16205 static void *task(p)
16206         void *p;
16207 {
16208         return (void *) (p == NULL);
16209 }
16210
16211 int
16212 main ()
16213 {
16214
16215         /* pthread test function */
16216 #ifndef PTHREAD_CREATE_DETACHED
16217 #define PTHREAD_CREATE_DETACHED 1
16218 #endif
16219         pthread_t t;
16220         int status;
16221         int detach = PTHREAD_CREATE_DETACHED;
16222
16223 #if HAVE_PTHREADS > 4
16224         /* Final pthreads */
16225         pthread_attr_t attr;
16226
16227         status = pthread_attr_init(&attr);
16228         if( status ) return status;
16229
16230 #if HAVE_PTHREADS < 7
16231         status = pthread_attr_setdetachstate(&attr, &detach);
16232         if( status < 0 ) status = errno;
16233 #else
16234         status = pthread_attr_setdetachstate(&attr, detach);
16235 #endif
16236         if( status ) return status;
16237         status = pthread_create( &t, &attr, task, NULL );
16238 #if HAVE_PTHREADS < 7
16239         if( status < 0 ) status = errno;
16240 #endif
16241         if( status ) return status;
16242 #else
16243         /* Draft 4 pthreads */
16244         status = pthread_create( &t, pthread_attr_default, task, NULL );
16245         if( status ) return errno;
16246
16247         /* give thread a chance to complete */
16248         /* it should remain joinable and hence detachable */
16249         sleep( 1 );
16250
16251         status = pthread_detach( &t );
16252         if( status ) return errno;
16253 #endif
16254
16255 #ifdef HAVE_LINUX_THREADS
16256         pthread_kill_other_threads_np();
16257 #endif
16258
16259         return 0;
16260
16261   ;
16262   return 0;
16263 }
16264 _ACEOF
16265 if ac_fn_c_try_link "$LINENO"; then :
16266   ol_cv_pthread_kthread=yes
16267 else
16268   ol_cv_pthread_kthread=no
16269 fi
16270 rm -f core conftest.err conftest.$ac_objext \
16271     conftest$ac_exeext conftest.$ac_ext
16272 else
16273   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16274 /* end confdefs.h.  */
16275
16276 /* pthread test headers */
16277 #include <pthread.h>
16278 #if HAVE_PTHREADS < 7
16279 #include <errno.h>
16280 #endif
16281 #ifndef NULL
16282 #define NULL (void*)0
16283 #endif
16284
16285 static void *task(p)
16286         void *p;
16287 {
16288         return (void *) (p == NULL);
16289 }
16290
16291
16292 int main(argc, argv)
16293         int argc;
16294         char **argv;
16295 {
16296
16297         /* pthread test function */
16298 #ifndef PTHREAD_CREATE_DETACHED
16299 #define PTHREAD_CREATE_DETACHED 1
16300 #endif
16301         pthread_t t;
16302         int status;
16303         int detach = PTHREAD_CREATE_DETACHED;
16304
16305 #if HAVE_PTHREADS > 4
16306         /* Final pthreads */
16307         pthread_attr_t attr;
16308
16309         status = pthread_attr_init(&attr);
16310         if( status ) return status;
16311
16312 #if HAVE_PTHREADS < 7
16313         status = pthread_attr_setdetachstate(&attr, &detach);
16314         if( status < 0 ) status = errno;
16315 #else
16316         status = pthread_attr_setdetachstate(&attr, detach);
16317 #endif
16318         if( status ) return status;
16319         status = pthread_create( &t, &attr, task, NULL );
16320 #if HAVE_PTHREADS < 7
16321         if( status < 0 ) status = errno;
16322 #endif
16323         if( status ) return status;
16324 #else
16325         /* Draft 4 pthreads */
16326         status = pthread_create( &t, pthread_attr_default, task, NULL );
16327         if( status ) return errno;
16328
16329         /* give thread a chance to complete */
16330         /* it should remain joinable and hence detachable */
16331         sleep( 1 );
16332
16333         status = pthread_detach( &t );
16334         if( status ) return errno;
16335 #endif
16336
16337 #ifdef HAVE_LINUX_THREADS
16338         pthread_kill_other_threads_np();
16339 #endif
16340
16341         return 0;
16342
16343 }
16344
16345 _ACEOF
16346 if ac_fn_c_try_run "$LINENO"; then :
16347   ol_cv_pthread_kthread=yes
16348 else
16349   ol_cv_pthread_kthread=no
16350 fi
16351 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16352   conftest.$ac_objext conftest.beam conftest.$ac_ext
16353 fi
16354
16355
16356                 # restore the LIBS
16357                 LIBS="$ol_LIBS"
16358
16359 fi
16360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
16361 $as_echo "$ol_cv_pthread_kthread" >&6; }
16362
16363         if test $ol_cv_pthread_kthread = yes ; then
16364                 ol_link_pthreads="-kthread"
16365                 ol_link_threads=posix
16366         fi
16367 fi
16368
16369                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
16370 if test "$ol_link_threads" = no ; then
16371         # try -pthread
16372         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
16373 $as_echo_n "checking for pthread link with -pthread... " >&6; }
16374 if test "${ol_cv_pthread_pthread+set}" = set; then :
16375   $as_echo_n "(cached) " >&6
16376 else
16377
16378                 # save the flags
16379                 ol_LIBS="$LIBS"
16380                 LIBS="-pthread $LIBS"
16381
16382                 if test "$cross_compiling" = yes; then :
16383   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16384 /* end confdefs.h.  */
16385
16386 /* pthread test headers */
16387 #include <pthread.h>
16388 #if HAVE_PTHREADS < 7
16389 #include <errno.h>
16390 #endif
16391 #ifndef NULL
16392 #define NULL (void*)0
16393 #endif
16394
16395 static void *task(p)
16396         void *p;
16397 {
16398         return (void *) (p == NULL);
16399 }
16400
16401 int
16402 main ()
16403 {
16404
16405         /* pthread test function */
16406 #ifndef PTHREAD_CREATE_DETACHED
16407 #define PTHREAD_CREATE_DETACHED 1
16408 #endif
16409         pthread_t t;
16410         int status;
16411         int detach = PTHREAD_CREATE_DETACHED;
16412
16413 #if HAVE_PTHREADS > 4
16414         /* Final pthreads */
16415         pthread_attr_t attr;
16416
16417         status = pthread_attr_init(&attr);
16418         if( status ) return status;
16419
16420 #if HAVE_PTHREADS < 7
16421         status = pthread_attr_setdetachstate(&attr, &detach);
16422         if( status < 0 ) status = errno;
16423 #else
16424         status = pthread_attr_setdetachstate(&attr, detach);
16425 #endif
16426         if( status ) return status;
16427         status = pthread_create( &t, &attr, task, NULL );
16428 #if HAVE_PTHREADS < 7
16429         if( status < 0 ) status = errno;
16430 #endif
16431         if( status ) return status;
16432 #else
16433         /* Draft 4 pthreads */
16434         status = pthread_create( &t, pthread_attr_default, task, NULL );
16435         if( status ) return errno;
16436
16437         /* give thread a chance to complete */
16438         /* it should remain joinable and hence detachable */
16439         sleep( 1 );
16440
16441         status = pthread_detach( &t );
16442         if( status ) return errno;
16443 #endif
16444
16445 #ifdef HAVE_LINUX_THREADS
16446         pthread_kill_other_threads_np();
16447 #endif
16448
16449         return 0;
16450
16451   ;
16452   return 0;
16453 }
16454 _ACEOF
16455 if ac_fn_c_try_link "$LINENO"; then :
16456   ol_cv_pthread_pthread=yes
16457 else
16458   ol_cv_pthread_pthread=no
16459 fi
16460 rm -f core conftest.err conftest.$ac_objext \
16461     conftest$ac_exeext conftest.$ac_ext
16462 else
16463   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16464 /* end confdefs.h.  */
16465
16466 /* pthread test headers */
16467 #include <pthread.h>
16468 #if HAVE_PTHREADS < 7
16469 #include <errno.h>
16470 #endif
16471 #ifndef NULL
16472 #define NULL (void*)0
16473 #endif
16474
16475 static void *task(p)
16476         void *p;
16477 {
16478         return (void *) (p == NULL);
16479 }
16480
16481
16482 int main(argc, argv)
16483         int argc;
16484         char **argv;
16485 {
16486
16487         /* pthread test function */
16488 #ifndef PTHREAD_CREATE_DETACHED
16489 #define PTHREAD_CREATE_DETACHED 1
16490 #endif
16491         pthread_t t;
16492         int status;
16493         int detach = PTHREAD_CREATE_DETACHED;
16494
16495 #if HAVE_PTHREADS > 4
16496         /* Final pthreads */
16497         pthread_attr_t attr;
16498
16499         status = pthread_attr_init(&attr);
16500         if( status ) return status;
16501
16502 #if HAVE_PTHREADS < 7
16503         status = pthread_attr_setdetachstate(&attr, &detach);
16504         if( status < 0 ) status = errno;
16505 #else
16506         status = pthread_attr_setdetachstate(&attr, detach);
16507 #endif
16508         if( status ) return status;
16509         status = pthread_create( &t, &attr, task, NULL );
16510 #if HAVE_PTHREADS < 7
16511         if( status < 0 ) status = errno;
16512 #endif
16513         if( status ) return status;
16514 #else
16515         /* Draft 4 pthreads */
16516         status = pthread_create( &t, pthread_attr_default, task, NULL );
16517         if( status ) return errno;
16518
16519         /* give thread a chance to complete */
16520         /* it should remain joinable and hence detachable */
16521         sleep( 1 );
16522
16523         status = pthread_detach( &t );
16524         if( status ) return errno;
16525 #endif
16526
16527 #ifdef HAVE_LINUX_THREADS
16528         pthread_kill_other_threads_np();
16529 #endif
16530
16531         return 0;
16532
16533 }
16534
16535 _ACEOF
16536 if ac_fn_c_try_run "$LINENO"; then :
16537   ol_cv_pthread_pthread=yes
16538 else
16539   ol_cv_pthread_pthread=no
16540 fi
16541 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16542   conftest.$ac_objext conftest.beam conftest.$ac_ext
16543 fi
16544
16545
16546                 # restore the LIBS
16547                 LIBS="$ol_LIBS"
16548
16549 fi
16550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
16551 $as_echo "$ol_cv_pthread_pthread" >&6; }
16552
16553         if test $ol_cv_pthread_pthread = yes ; then
16554                 ol_link_pthreads="-pthread"
16555                 ol_link_threads=posix
16556         fi
16557 fi
16558
16559                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
16560 if test "$ol_link_threads" = no ; then
16561         # try -pthreads
16562         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
16563 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
16564 if test "${ol_cv_pthread_pthreads+set}" = set; then :
16565   $as_echo_n "(cached) " >&6
16566 else
16567
16568                 # save the flags
16569                 ol_LIBS="$LIBS"
16570                 LIBS="-pthreads $LIBS"
16571
16572                 if test "$cross_compiling" = yes; then :
16573   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16574 /* end confdefs.h.  */
16575
16576 /* pthread test headers */
16577 #include <pthread.h>
16578 #if HAVE_PTHREADS < 7
16579 #include <errno.h>
16580 #endif
16581 #ifndef NULL
16582 #define NULL (void*)0
16583 #endif
16584
16585 static void *task(p)
16586         void *p;
16587 {
16588         return (void *) (p == NULL);
16589 }
16590
16591 int
16592 main ()
16593 {
16594
16595         /* pthread test function */
16596 #ifndef PTHREAD_CREATE_DETACHED
16597 #define PTHREAD_CREATE_DETACHED 1
16598 #endif
16599         pthread_t t;
16600         int status;
16601         int detach = PTHREAD_CREATE_DETACHED;
16602
16603 #if HAVE_PTHREADS > 4
16604         /* Final pthreads */
16605         pthread_attr_t attr;
16606
16607         status = pthread_attr_init(&attr);
16608         if( status ) return status;
16609
16610 #if HAVE_PTHREADS < 7
16611         status = pthread_attr_setdetachstate(&attr, &detach);
16612         if( status < 0 ) status = errno;
16613 #else
16614         status = pthread_attr_setdetachstate(&attr, detach);
16615 #endif
16616         if( status ) return status;
16617         status = pthread_create( &t, &attr, task, NULL );
16618 #if HAVE_PTHREADS < 7
16619         if( status < 0 ) status = errno;
16620 #endif
16621         if( status ) return status;
16622 #else
16623         /* Draft 4 pthreads */
16624         status = pthread_create( &t, pthread_attr_default, task, NULL );
16625         if( status ) return errno;
16626
16627         /* give thread a chance to complete */
16628         /* it should remain joinable and hence detachable */
16629         sleep( 1 );
16630
16631         status = pthread_detach( &t );
16632         if( status ) return errno;
16633 #endif
16634
16635 #ifdef HAVE_LINUX_THREADS
16636         pthread_kill_other_threads_np();
16637 #endif
16638
16639         return 0;
16640
16641   ;
16642   return 0;
16643 }
16644 _ACEOF
16645 if ac_fn_c_try_link "$LINENO"; then :
16646   ol_cv_pthread_pthreads=yes
16647 else
16648   ol_cv_pthread_pthreads=no
16649 fi
16650 rm -f core conftest.err conftest.$ac_objext \
16651     conftest$ac_exeext conftest.$ac_ext
16652 else
16653   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16654 /* end confdefs.h.  */
16655
16656 /* pthread test headers */
16657 #include <pthread.h>
16658 #if HAVE_PTHREADS < 7
16659 #include <errno.h>
16660 #endif
16661 #ifndef NULL
16662 #define NULL (void*)0
16663 #endif
16664
16665 static void *task(p)
16666         void *p;
16667 {
16668         return (void *) (p == NULL);
16669 }
16670
16671
16672 int main(argc, argv)
16673         int argc;
16674         char **argv;
16675 {
16676
16677         /* pthread test function */
16678 #ifndef PTHREAD_CREATE_DETACHED
16679 #define PTHREAD_CREATE_DETACHED 1
16680 #endif
16681         pthread_t t;
16682         int status;
16683         int detach = PTHREAD_CREATE_DETACHED;
16684
16685 #if HAVE_PTHREADS > 4
16686         /* Final pthreads */
16687         pthread_attr_t attr;
16688
16689         status = pthread_attr_init(&attr);
16690         if( status ) return status;
16691
16692 #if HAVE_PTHREADS < 7
16693         status = pthread_attr_setdetachstate(&attr, &detach);
16694         if( status < 0 ) status = errno;
16695 #else
16696         status = pthread_attr_setdetachstate(&attr, detach);
16697 #endif
16698         if( status ) return status;
16699         status = pthread_create( &t, &attr, task, NULL );
16700 #if HAVE_PTHREADS < 7
16701         if( status < 0 ) status = errno;
16702 #endif
16703         if( status ) return status;
16704 #else
16705         /* Draft 4 pthreads */
16706         status = pthread_create( &t, pthread_attr_default, task, NULL );
16707         if( status ) return errno;
16708
16709         /* give thread a chance to complete */
16710         /* it should remain joinable and hence detachable */
16711         sleep( 1 );
16712
16713         status = pthread_detach( &t );
16714         if( status ) return errno;
16715 #endif
16716
16717 #ifdef HAVE_LINUX_THREADS
16718         pthread_kill_other_threads_np();
16719 #endif
16720
16721         return 0;
16722
16723 }
16724
16725 _ACEOF
16726 if ac_fn_c_try_run "$LINENO"; then :
16727   ol_cv_pthread_pthreads=yes
16728 else
16729   ol_cv_pthread_pthreads=no
16730 fi
16731 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16732   conftest.$ac_objext conftest.beam conftest.$ac_ext
16733 fi
16734
16735
16736                 # restore the LIBS
16737                 LIBS="$ol_LIBS"
16738
16739 fi
16740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
16741 $as_echo "$ol_cv_pthread_pthreads" >&6; }
16742
16743         if test $ol_cv_pthread_pthreads = yes ; then
16744                 ol_link_pthreads="-pthreads"
16745                 ol_link_threads=posix
16746         fi
16747 fi
16748
16749                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
16750 if test "$ol_link_threads" = no ; then
16751         # try -mthreads
16752         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
16753 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
16754 if test "${ol_cv_pthread_mthreads+set}" = set; then :
16755   $as_echo_n "(cached) " >&6
16756 else
16757
16758                 # save the flags
16759                 ol_LIBS="$LIBS"
16760                 LIBS="-mthreads $LIBS"
16761
16762                 if test "$cross_compiling" = yes; then :
16763   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16764 /* end confdefs.h.  */
16765
16766 /* pthread test headers */
16767 #include <pthread.h>
16768 #if HAVE_PTHREADS < 7
16769 #include <errno.h>
16770 #endif
16771 #ifndef NULL
16772 #define NULL (void*)0
16773 #endif
16774
16775 static void *task(p)
16776         void *p;
16777 {
16778         return (void *) (p == NULL);
16779 }
16780
16781 int
16782 main ()
16783 {
16784
16785         /* pthread test function */
16786 #ifndef PTHREAD_CREATE_DETACHED
16787 #define PTHREAD_CREATE_DETACHED 1
16788 #endif
16789         pthread_t t;
16790         int status;
16791         int detach = PTHREAD_CREATE_DETACHED;
16792
16793 #if HAVE_PTHREADS > 4
16794         /* Final pthreads */
16795         pthread_attr_t attr;
16796
16797         status = pthread_attr_init(&attr);
16798         if( status ) return status;
16799
16800 #if HAVE_PTHREADS < 7
16801         status = pthread_attr_setdetachstate(&attr, &detach);
16802         if( status < 0 ) status = errno;
16803 #else
16804         status = pthread_attr_setdetachstate(&attr, detach);
16805 #endif
16806         if( status ) return status;
16807         status = pthread_create( &t, &attr, task, NULL );
16808 #if HAVE_PTHREADS < 7
16809         if( status < 0 ) status = errno;
16810 #endif
16811         if( status ) return status;
16812 #else
16813         /* Draft 4 pthreads */
16814         status = pthread_create( &t, pthread_attr_default, task, NULL );
16815         if( status ) return errno;
16816
16817         /* give thread a chance to complete */
16818         /* it should remain joinable and hence detachable */
16819         sleep( 1 );
16820
16821         status = pthread_detach( &t );
16822         if( status ) return errno;
16823 #endif
16824
16825 #ifdef HAVE_LINUX_THREADS
16826         pthread_kill_other_threads_np();
16827 #endif
16828
16829         return 0;
16830
16831   ;
16832   return 0;
16833 }
16834 _ACEOF
16835 if ac_fn_c_try_link "$LINENO"; then :
16836   ol_cv_pthread_mthreads=yes
16837 else
16838   ol_cv_pthread_mthreads=no
16839 fi
16840 rm -f core conftest.err conftest.$ac_objext \
16841     conftest$ac_exeext conftest.$ac_ext
16842 else
16843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16844 /* end confdefs.h.  */
16845
16846 /* pthread test headers */
16847 #include <pthread.h>
16848 #if HAVE_PTHREADS < 7
16849 #include <errno.h>
16850 #endif
16851 #ifndef NULL
16852 #define NULL (void*)0
16853 #endif
16854
16855 static void *task(p)
16856         void *p;
16857 {
16858         return (void *) (p == NULL);
16859 }
16860
16861
16862 int main(argc, argv)
16863         int argc;
16864         char **argv;
16865 {
16866
16867         /* pthread test function */
16868 #ifndef PTHREAD_CREATE_DETACHED
16869 #define PTHREAD_CREATE_DETACHED 1
16870 #endif
16871         pthread_t t;
16872         int status;
16873         int detach = PTHREAD_CREATE_DETACHED;
16874
16875 #if HAVE_PTHREADS > 4
16876         /* Final pthreads */
16877         pthread_attr_t attr;
16878
16879         status = pthread_attr_init(&attr);
16880         if( status ) return status;
16881
16882 #if HAVE_PTHREADS < 7
16883         status = pthread_attr_setdetachstate(&attr, &detach);
16884         if( status < 0 ) status = errno;
16885 #else
16886         status = pthread_attr_setdetachstate(&attr, detach);
16887 #endif
16888         if( status ) return status;
16889         status = pthread_create( &t, &attr, task, NULL );
16890 #if HAVE_PTHREADS < 7
16891         if( status < 0 ) status = errno;
16892 #endif
16893         if( status ) return status;
16894 #else
16895         /* Draft 4 pthreads */
16896         status = pthread_create( &t, pthread_attr_default, task, NULL );
16897         if( status ) return errno;
16898
16899         /* give thread a chance to complete */
16900         /* it should remain joinable and hence detachable */
16901         sleep( 1 );
16902
16903         status = pthread_detach( &t );
16904         if( status ) return errno;
16905 #endif
16906
16907 #ifdef HAVE_LINUX_THREADS
16908         pthread_kill_other_threads_np();
16909 #endif
16910
16911         return 0;
16912
16913 }
16914
16915 _ACEOF
16916 if ac_fn_c_try_run "$LINENO"; then :
16917   ol_cv_pthread_mthreads=yes
16918 else
16919   ol_cv_pthread_mthreads=no
16920 fi
16921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16922   conftest.$ac_objext conftest.beam conftest.$ac_ext
16923 fi
16924
16925
16926                 # restore the LIBS
16927                 LIBS="$ol_LIBS"
16928
16929 fi
16930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
16931 $as_echo "$ol_cv_pthread_mthreads" >&6; }
16932
16933         if test $ol_cv_pthread_mthreads = yes ; then
16934                 ol_link_pthreads="-mthreads"
16935                 ol_link_threads=posix
16936         fi
16937 fi
16938
16939                 # Pthread try link: -thread (ol_cv_pthread_thread)
16940 if test "$ol_link_threads" = no ; then
16941         # try -thread
16942         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
16943 $as_echo_n "checking for pthread link with -thread... " >&6; }
16944 if test "${ol_cv_pthread_thread+set}" = set; then :
16945   $as_echo_n "(cached) " >&6
16946 else
16947
16948                 # save the flags
16949                 ol_LIBS="$LIBS"
16950                 LIBS="-thread $LIBS"
16951
16952                 if test "$cross_compiling" = yes; then :
16953   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16954 /* end confdefs.h.  */
16955
16956 /* pthread test headers */
16957 #include <pthread.h>
16958 #if HAVE_PTHREADS < 7
16959 #include <errno.h>
16960 #endif
16961 #ifndef NULL
16962 #define NULL (void*)0
16963 #endif
16964
16965 static void *task(p)
16966         void *p;
16967 {
16968         return (void *) (p == NULL);
16969 }
16970
16971 int
16972 main ()
16973 {
16974
16975         /* pthread test function */
16976 #ifndef PTHREAD_CREATE_DETACHED
16977 #define PTHREAD_CREATE_DETACHED 1
16978 #endif
16979         pthread_t t;
16980         int status;
16981         int detach = PTHREAD_CREATE_DETACHED;
16982
16983 #if HAVE_PTHREADS > 4
16984         /* Final pthreads */
16985         pthread_attr_t attr;
16986
16987         status = pthread_attr_init(&attr);
16988         if( status ) return status;
16989
16990 #if HAVE_PTHREADS < 7
16991         status = pthread_attr_setdetachstate(&attr, &detach);
16992         if( status < 0 ) status = errno;
16993 #else
16994         status = pthread_attr_setdetachstate(&attr, detach);
16995 #endif
16996         if( status ) return status;
16997         status = pthread_create( &t, &attr, task, NULL );
16998 #if HAVE_PTHREADS < 7
16999         if( status < 0 ) status = errno;
17000 #endif
17001         if( status ) return status;
17002 #else
17003         /* Draft 4 pthreads */
17004         status = pthread_create( &t, pthread_attr_default, task, NULL );
17005         if( status ) return errno;
17006
17007         /* give thread a chance to complete */
17008         /* it should remain joinable and hence detachable */
17009         sleep( 1 );
17010
17011         status = pthread_detach( &t );
17012         if( status ) return errno;
17013 #endif
17014
17015 #ifdef HAVE_LINUX_THREADS
17016         pthread_kill_other_threads_np();
17017 #endif
17018
17019         return 0;
17020
17021   ;
17022   return 0;
17023 }
17024 _ACEOF
17025 if ac_fn_c_try_link "$LINENO"; then :
17026   ol_cv_pthread_thread=yes
17027 else
17028   ol_cv_pthread_thread=no
17029 fi
17030 rm -f core conftest.err conftest.$ac_objext \
17031     conftest$ac_exeext conftest.$ac_ext
17032 else
17033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17034 /* end confdefs.h.  */
17035
17036 /* pthread test headers */
17037 #include <pthread.h>
17038 #if HAVE_PTHREADS < 7
17039 #include <errno.h>
17040 #endif
17041 #ifndef NULL
17042 #define NULL (void*)0
17043 #endif
17044
17045 static void *task(p)
17046         void *p;
17047 {
17048         return (void *) (p == NULL);
17049 }
17050
17051
17052 int main(argc, argv)
17053         int argc;
17054         char **argv;
17055 {
17056
17057         /* pthread test function */
17058 #ifndef PTHREAD_CREATE_DETACHED
17059 #define PTHREAD_CREATE_DETACHED 1
17060 #endif
17061         pthread_t t;
17062         int status;
17063         int detach = PTHREAD_CREATE_DETACHED;
17064
17065 #if HAVE_PTHREADS > 4
17066         /* Final pthreads */
17067         pthread_attr_t attr;
17068
17069         status = pthread_attr_init(&attr);
17070         if( status ) return status;
17071
17072 #if HAVE_PTHREADS < 7
17073         status = pthread_attr_setdetachstate(&attr, &detach);
17074         if( status < 0 ) status = errno;
17075 #else
17076         status = pthread_attr_setdetachstate(&attr, detach);
17077 #endif
17078         if( status ) return status;
17079         status = pthread_create( &t, &attr, task, NULL );
17080 #if HAVE_PTHREADS < 7
17081         if( status < 0 ) status = errno;
17082 #endif
17083         if( status ) return status;
17084 #else
17085         /* Draft 4 pthreads */
17086         status = pthread_create( &t, pthread_attr_default, task, NULL );
17087         if( status ) return errno;
17088
17089         /* give thread a chance to complete */
17090         /* it should remain joinable and hence detachable */
17091         sleep( 1 );
17092
17093         status = pthread_detach( &t );
17094         if( status ) return errno;
17095 #endif
17096
17097 #ifdef HAVE_LINUX_THREADS
17098         pthread_kill_other_threads_np();
17099 #endif
17100
17101         return 0;
17102
17103 }
17104
17105 _ACEOF
17106 if ac_fn_c_try_run "$LINENO"; then :
17107   ol_cv_pthread_thread=yes
17108 else
17109   ol_cv_pthread_thread=no
17110 fi
17111 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17112   conftest.$ac_objext conftest.beam conftest.$ac_ext
17113 fi
17114
17115
17116                 # restore the LIBS
17117                 LIBS="$ol_LIBS"
17118
17119 fi
17120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
17121 $as_echo "$ol_cv_pthread_thread" >&6; }
17122
17123         if test $ol_cv_pthread_thread = yes ; then
17124                 ol_link_pthreads="-thread"
17125                 ol_link_threads=posix
17126         fi
17127 fi
17128
17129
17130                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
17131 if test "$ol_link_threads" = no ; then
17132         # try -lpthread -lmach -lexc -lc_r
17133         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
17134 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
17135 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then :
17136   $as_echo_n "(cached) " >&6
17137 else
17138
17139                 # save the flags
17140                 ol_LIBS="$LIBS"
17141                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
17142
17143                 if test "$cross_compiling" = yes; then :
17144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17145 /* end confdefs.h.  */
17146
17147 /* pthread test headers */
17148 #include <pthread.h>
17149 #if HAVE_PTHREADS < 7
17150 #include <errno.h>
17151 #endif
17152 #ifndef NULL
17153 #define NULL (void*)0
17154 #endif
17155
17156 static void *task(p)
17157         void *p;
17158 {
17159         return (void *) (p == NULL);
17160 }
17161
17162 int
17163 main ()
17164 {
17165
17166         /* pthread test function */
17167 #ifndef PTHREAD_CREATE_DETACHED
17168 #define PTHREAD_CREATE_DETACHED 1
17169 #endif
17170         pthread_t t;
17171         int status;
17172         int detach = PTHREAD_CREATE_DETACHED;
17173
17174 #if HAVE_PTHREADS > 4
17175         /* Final pthreads */
17176         pthread_attr_t attr;
17177
17178         status = pthread_attr_init(&attr);
17179         if( status ) return status;
17180
17181 #if HAVE_PTHREADS < 7
17182         status = pthread_attr_setdetachstate(&attr, &detach);
17183         if( status < 0 ) status = errno;
17184 #else
17185         status = pthread_attr_setdetachstate(&attr, detach);
17186 #endif
17187         if( status ) return status;
17188         status = pthread_create( &t, &attr, task, NULL );
17189 #if HAVE_PTHREADS < 7
17190         if( status < 0 ) status = errno;
17191 #endif
17192         if( status ) return status;
17193 #else
17194         /* Draft 4 pthreads */
17195         status = pthread_create( &t, pthread_attr_default, task, NULL );
17196         if( status ) return errno;
17197
17198         /* give thread a chance to complete */
17199         /* it should remain joinable and hence detachable */
17200         sleep( 1 );
17201
17202         status = pthread_detach( &t );
17203         if( status ) return errno;
17204 #endif
17205
17206 #ifdef HAVE_LINUX_THREADS
17207         pthread_kill_other_threads_np();
17208 #endif
17209
17210         return 0;
17211
17212   ;
17213   return 0;
17214 }
17215 _ACEOF
17216 if ac_fn_c_try_link "$LINENO"; then :
17217   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17218 else
17219   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17220 fi
17221 rm -f core conftest.err conftest.$ac_objext \
17222     conftest$ac_exeext conftest.$ac_ext
17223 else
17224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17225 /* end confdefs.h.  */
17226
17227 /* pthread test headers */
17228 #include <pthread.h>
17229 #if HAVE_PTHREADS < 7
17230 #include <errno.h>
17231 #endif
17232 #ifndef NULL
17233 #define NULL (void*)0
17234 #endif
17235
17236 static void *task(p)
17237         void *p;
17238 {
17239         return (void *) (p == NULL);
17240 }
17241
17242
17243 int main(argc, argv)
17244         int argc;
17245         char **argv;
17246 {
17247
17248         /* pthread test function */
17249 #ifndef PTHREAD_CREATE_DETACHED
17250 #define PTHREAD_CREATE_DETACHED 1
17251 #endif
17252         pthread_t t;
17253         int status;
17254         int detach = PTHREAD_CREATE_DETACHED;
17255
17256 #if HAVE_PTHREADS > 4
17257         /* Final pthreads */
17258         pthread_attr_t attr;
17259
17260         status = pthread_attr_init(&attr);
17261         if( status ) return status;
17262
17263 #if HAVE_PTHREADS < 7
17264         status = pthread_attr_setdetachstate(&attr, &detach);
17265         if( status < 0 ) status = errno;
17266 #else
17267         status = pthread_attr_setdetachstate(&attr, detach);
17268 #endif
17269         if( status ) return status;
17270         status = pthread_create( &t, &attr, task, NULL );
17271 #if HAVE_PTHREADS < 7
17272         if( status < 0 ) status = errno;
17273 #endif
17274         if( status ) return status;
17275 #else
17276         /* Draft 4 pthreads */
17277         status = pthread_create( &t, pthread_attr_default, task, NULL );
17278         if( status ) return errno;
17279
17280         /* give thread a chance to complete */
17281         /* it should remain joinable and hence detachable */
17282         sleep( 1 );
17283
17284         status = pthread_detach( &t );
17285         if( status ) return errno;
17286 #endif
17287
17288 #ifdef HAVE_LINUX_THREADS
17289         pthread_kill_other_threads_np();
17290 #endif
17291
17292         return 0;
17293
17294 }
17295
17296 _ACEOF
17297 if ac_fn_c_try_run "$LINENO"; then :
17298   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17299 else
17300   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17301 fi
17302 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17303   conftest.$ac_objext conftest.beam conftest.$ac_ext
17304 fi
17305
17306
17307                 # restore the LIBS
17308                 LIBS="$ol_LIBS"
17309
17310 fi
17311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
17312 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
17313
17314         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
17315                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
17316                 ol_link_threads=posix
17317         fi
17318 fi
17319
17320                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
17321 if test "$ol_link_threads" = no ; then
17322         # try -lpthread -lmach -lexc
17323         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
17324 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
17325 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then :
17326   $as_echo_n "(cached) " >&6
17327 else
17328
17329                 # save the flags
17330                 ol_LIBS="$LIBS"
17331                 LIBS="-lpthread -lmach -lexc $LIBS"
17332
17333                 if test "$cross_compiling" = yes; then :
17334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17335 /* end confdefs.h.  */
17336
17337 /* pthread test headers */
17338 #include <pthread.h>
17339 #if HAVE_PTHREADS < 7
17340 #include <errno.h>
17341 #endif
17342 #ifndef NULL
17343 #define NULL (void*)0
17344 #endif
17345
17346 static void *task(p)
17347         void *p;
17348 {
17349         return (void *) (p == NULL);
17350 }
17351
17352 int
17353 main ()
17354 {
17355
17356         /* pthread test function */
17357 #ifndef PTHREAD_CREATE_DETACHED
17358 #define PTHREAD_CREATE_DETACHED 1
17359 #endif
17360         pthread_t t;
17361         int status;
17362         int detach = PTHREAD_CREATE_DETACHED;
17363
17364 #if HAVE_PTHREADS > 4
17365         /* Final pthreads */
17366         pthread_attr_t attr;
17367
17368         status = pthread_attr_init(&attr);
17369         if( status ) return status;
17370
17371 #if HAVE_PTHREADS < 7
17372         status = pthread_attr_setdetachstate(&attr, &detach);
17373         if( status < 0 ) status = errno;
17374 #else
17375         status = pthread_attr_setdetachstate(&attr, detach);
17376 #endif
17377         if( status ) return status;
17378         status = pthread_create( &t, &attr, task, NULL );
17379 #if HAVE_PTHREADS < 7
17380         if( status < 0 ) status = errno;
17381 #endif
17382         if( status ) return status;
17383 #else
17384         /* Draft 4 pthreads */
17385         status = pthread_create( &t, pthread_attr_default, task, NULL );
17386         if( status ) return errno;
17387
17388         /* give thread a chance to complete */
17389         /* it should remain joinable and hence detachable */
17390         sleep( 1 );
17391
17392         status = pthread_detach( &t );
17393         if( status ) return errno;
17394 #endif
17395
17396 #ifdef HAVE_LINUX_THREADS
17397         pthread_kill_other_threads_np();
17398 #endif
17399
17400         return 0;
17401
17402   ;
17403   return 0;
17404 }
17405 _ACEOF
17406 if ac_fn_c_try_link "$LINENO"; then :
17407   ol_cv_pthread_lpthread_lmach_lexc=yes
17408 else
17409   ol_cv_pthread_lpthread_lmach_lexc=no
17410 fi
17411 rm -f core conftest.err conftest.$ac_objext \
17412     conftest$ac_exeext conftest.$ac_ext
17413 else
17414   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17415 /* end confdefs.h.  */
17416
17417 /* pthread test headers */
17418 #include <pthread.h>
17419 #if HAVE_PTHREADS < 7
17420 #include <errno.h>
17421 #endif
17422 #ifndef NULL
17423 #define NULL (void*)0
17424 #endif
17425
17426 static void *task(p)
17427         void *p;
17428 {
17429         return (void *) (p == NULL);
17430 }
17431
17432
17433 int main(argc, argv)
17434         int argc;
17435         char **argv;
17436 {
17437
17438         /* pthread test function */
17439 #ifndef PTHREAD_CREATE_DETACHED
17440 #define PTHREAD_CREATE_DETACHED 1
17441 #endif
17442         pthread_t t;
17443         int status;
17444         int detach = PTHREAD_CREATE_DETACHED;
17445
17446 #if HAVE_PTHREADS > 4
17447         /* Final pthreads */
17448         pthread_attr_t attr;
17449
17450         status = pthread_attr_init(&attr);
17451         if( status ) return status;
17452
17453 #if HAVE_PTHREADS < 7
17454         status = pthread_attr_setdetachstate(&attr, &detach);
17455         if( status < 0 ) status = errno;
17456 #else
17457         status = pthread_attr_setdetachstate(&attr, detach);
17458 #endif
17459         if( status ) return status;
17460         status = pthread_create( &t, &attr, task, NULL );
17461 #if HAVE_PTHREADS < 7
17462         if( status < 0 ) status = errno;
17463 #endif
17464         if( status ) return status;
17465 #else
17466         /* Draft 4 pthreads */
17467         status = pthread_create( &t, pthread_attr_default, task, NULL );
17468         if( status ) return errno;
17469
17470         /* give thread a chance to complete */
17471         /* it should remain joinable and hence detachable */
17472         sleep( 1 );
17473
17474         status = pthread_detach( &t );
17475         if( status ) return errno;
17476 #endif
17477
17478 #ifdef HAVE_LINUX_THREADS
17479         pthread_kill_other_threads_np();
17480 #endif
17481
17482         return 0;
17483
17484 }
17485
17486 _ACEOF
17487 if ac_fn_c_try_run "$LINENO"; then :
17488   ol_cv_pthread_lpthread_lmach_lexc=yes
17489 else
17490   ol_cv_pthread_lpthread_lmach_lexc=no
17491 fi
17492 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17493   conftest.$ac_objext conftest.beam conftest.$ac_ext
17494 fi
17495
17496
17497                 # restore the LIBS
17498                 LIBS="$ol_LIBS"
17499
17500 fi
17501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
17502 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
17503
17504         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
17505                 ol_link_pthreads="-lpthread -lmach -lexc"
17506                 ol_link_threads=posix
17507         fi
17508 fi
17509
17510
17511                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
17512 if test "$ol_link_threads" = no ; then
17513         # try -lpthread -Wl,-woff,85
17514         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
17515 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
17516 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then :
17517   $as_echo_n "(cached) " >&6
17518 else
17519
17520                 # save the flags
17521                 ol_LIBS="$LIBS"
17522                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
17523
17524                 if test "$cross_compiling" = yes; then :
17525   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17526 /* end confdefs.h.  */
17527
17528 /* pthread test headers */
17529 #include <pthread.h>
17530 #if HAVE_PTHREADS < 7
17531 #include <errno.h>
17532 #endif
17533 #ifndef NULL
17534 #define NULL (void*)0
17535 #endif
17536
17537 static void *task(p)
17538         void *p;
17539 {
17540         return (void *) (p == NULL);
17541 }
17542
17543 int
17544 main ()
17545 {
17546
17547         /* pthread test function */
17548 #ifndef PTHREAD_CREATE_DETACHED
17549 #define PTHREAD_CREATE_DETACHED 1
17550 #endif
17551         pthread_t t;
17552         int status;
17553         int detach = PTHREAD_CREATE_DETACHED;
17554
17555 #if HAVE_PTHREADS > 4
17556         /* Final pthreads */
17557         pthread_attr_t attr;
17558
17559         status = pthread_attr_init(&attr);
17560         if( status ) return status;
17561
17562 #if HAVE_PTHREADS < 7
17563         status = pthread_attr_setdetachstate(&attr, &detach);
17564         if( status < 0 ) status = errno;
17565 #else
17566         status = pthread_attr_setdetachstate(&attr, detach);
17567 #endif
17568         if( status ) return status;
17569         status = pthread_create( &t, &attr, task, NULL );
17570 #if HAVE_PTHREADS < 7
17571         if( status < 0 ) status = errno;
17572 #endif
17573         if( status ) return status;
17574 #else
17575         /* Draft 4 pthreads */
17576         status = pthread_create( &t, pthread_attr_default, task, NULL );
17577         if( status ) return errno;
17578
17579         /* give thread a chance to complete */
17580         /* it should remain joinable and hence detachable */
17581         sleep( 1 );
17582
17583         status = pthread_detach( &t );
17584         if( status ) return errno;
17585 #endif
17586
17587 #ifdef HAVE_LINUX_THREADS
17588         pthread_kill_other_threads_np();
17589 #endif
17590
17591         return 0;
17592
17593   ;
17594   return 0;
17595 }
17596 _ACEOF
17597 if ac_fn_c_try_link "$LINENO"; then :
17598   ol_cv_pthread_lib_lpthread_woff=yes
17599 else
17600   ol_cv_pthread_lib_lpthread_woff=no
17601 fi
17602 rm -f core conftest.err conftest.$ac_objext \
17603     conftest$ac_exeext conftest.$ac_ext
17604 else
17605   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17606 /* end confdefs.h.  */
17607
17608 /* pthread test headers */
17609 #include <pthread.h>
17610 #if HAVE_PTHREADS < 7
17611 #include <errno.h>
17612 #endif
17613 #ifndef NULL
17614 #define NULL (void*)0
17615 #endif
17616
17617 static void *task(p)
17618         void *p;
17619 {
17620         return (void *) (p == NULL);
17621 }
17622
17623
17624 int main(argc, argv)
17625         int argc;
17626         char **argv;
17627 {
17628
17629         /* pthread test function */
17630 #ifndef PTHREAD_CREATE_DETACHED
17631 #define PTHREAD_CREATE_DETACHED 1
17632 #endif
17633         pthread_t t;
17634         int status;
17635         int detach = PTHREAD_CREATE_DETACHED;
17636
17637 #if HAVE_PTHREADS > 4
17638         /* Final pthreads */
17639         pthread_attr_t attr;
17640
17641         status = pthread_attr_init(&attr);
17642         if( status ) return status;
17643
17644 #if HAVE_PTHREADS < 7
17645         status = pthread_attr_setdetachstate(&attr, &detach);
17646         if( status < 0 ) status = errno;
17647 #else
17648         status = pthread_attr_setdetachstate(&attr, detach);
17649 #endif
17650         if( status ) return status;
17651         status = pthread_create( &t, &attr, task, NULL );
17652 #if HAVE_PTHREADS < 7
17653         if( status < 0 ) status = errno;
17654 #endif
17655         if( status ) return status;
17656 #else
17657         /* Draft 4 pthreads */
17658         status = pthread_create( &t, pthread_attr_default, task, NULL );
17659         if( status ) return errno;
17660
17661         /* give thread a chance to complete */
17662         /* it should remain joinable and hence detachable */
17663         sleep( 1 );
17664
17665         status = pthread_detach( &t );
17666         if( status ) return errno;
17667 #endif
17668
17669 #ifdef HAVE_LINUX_THREADS
17670         pthread_kill_other_threads_np();
17671 #endif
17672
17673         return 0;
17674
17675 }
17676
17677 _ACEOF
17678 if ac_fn_c_try_run "$LINENO"; then :
17679   ol_cv_pthread_lib_lpthread_woff=yes
17680 else
17681   ol_cv_pthread_lib_lpthread_woff=no
17682 fi
17683 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17684   conftest.$ac_objext conftest.beam conftest.$ac_ext
17685 fi
17686
17687
17688                 # restore the LIBS
17689                 LIBS="$ol_LIBS"
17690
17691 fi
17692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
17693 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
17694
17695         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
17696                 ol_link_pthreads="-lpthread -Wl,-woff,85"
17697                 ol_link_threads=posix
17698         fi
17699 fi
17700
17701
17702                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
17703 if test "$ol_link_threads" = no ; then
17704         # try -lpthread
17705         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
17706 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
17707 if test "${ol_cv_pthread_lpthread+set}" = set; then :
17708   $as_echo_n "(cached) " >&6
17709 else
17710
17711                 # save the flags
17712                 ol_LIBS="$LIBS"
17713                 LIBS="-lpthread $LIBS"
17714
17715                 if test "$cross_compiling" = yes; then :
17716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17717 /* end confdefs.h.  */
17718
17719 /* pthread test headers */
17720 #include <pthread.h>
17721 #if HAVE_PTHREADS < 7
17722 #include <errno.h>
17723 #endif
17724 #ifndef NULL
17725 #define NULL (void*)0
17726 #endif
17727
17728 static void *task(p)
17729         void *p;
17730 {
17731         return (void *) (p == NULL);
17732 }
17733
17734 int
17735 main ()
17736 {
17737
17738         /* pthread test function */
17739 #ifndef PTHREAD_CREATE_DETACHED
17740 #define PTHREAD_CREATE_DETACHED 1
17741 #endif
17742         pthread_t t;
17743         int status;
17744         int detach = PTHREAD_CREATE_DETACHED;
17745
17746 #if HAVE_PTHREADS > 4
17747         /* Final pthreads */
17748         pthread_attr_t attr;
17749
17750         status = pthread_attr_init(&attr);
17751         if( status ) return status;
17752
17753 #if HAVE_PTHREADS < 7
17754         status = pthread_attr_setdetachstate(&attr, &detach);
17755         if( status < 0 ) status = errno;
17756 #else
17757         status = pthread_attr_setdetachstate(&attr, detach);
17758 #endif
17759         if( status ) return status;
17760         status = pthread_create( &t, &attr, task, NULL );
17761 #if HAVE_PTHREADS < 7
17762         if( status < 0 ) status = errno;
17763 #endif
17764         if( status ) return status;
17765 #else
17766         /* Draft 4 pthreads */
17767         status = pthread_create( &t, pthread_attr_default, task, NULL );
17768         if( status ) return errno;
17769
17770         /* give thread a chance to complete */
17771         /* it should remain joinable and hence detachable */
17772         sleep( 1 );
17773
17774         status = pthread_detach( &t );
17775         if( status ) return errno;
17776 #endif
17777
17778 #ifdef HAVE_LINUX_THREADS
17779         pthread_kill_other_threads_np();
17780 #endif
17781
17782         return 0;
17783
17784   ;
17785   return 0;
17786 }
17787 _ACEOF
17788 if ac_fn_c_try_link "$LINENO"; then :
17789   ol_cv_pthread_lpthread=yes
17790 else
17791   ol_cv_pthread_lpthread=no
17792 fi
17793 rm -f core conftest.err conftest.$ac_objext \
17794     conftest$ac_exeext conftest.$ac_ext
17795 else
17796   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17797 /* end confdefs.h.  */
17798
17799 /* pthread test headers */
17800 #include <pthread.h>
17801 #if HAVE_PTHREADS < 7
17802 #include <errno.h>
17803 #endif
17804 #ifndef NULL
17805 #define NULL (void*)0
17806 #endif
17807
17808 static void *task(p)
17809         void *p;
17810 {
17811         return (void *) (p == NULL);
17812 }
17813
17814
17815 int main(argc, argv)
17816         int argc;
17817         char **argv;
17818 {
17819
17820         /* pthread test function */
17821 #ifndef PTHREAD_CREATE_DETACHED
17822 #define PTHREAD_CREATE_DETACHED 1
17823 #endif
17824         pthread_t t;
17825         int status;
17826         int detach = PTHREAD_CREATE_DETACHED;
17827
17828 #if HAVE_PTHREADS > 4
17829         /* Final pthreads */
17830         pthread_attr_t attr;
17831
17832         status = pthread_attr_init(&attr);
17833         if( status ) return status;
17834
17835 #if HAVE_PTHREADS < 7
17836         status = pthread_attr_setdetachstate(&attr, &detach);
17837         if( status < 0 ) status = errno;
17838 #else
17839         status = pthread_attr_setdetachstate(&attr, detach);
17840 #endif
17841         if( status ) return status;
17842         status = pthread_create( &t, &attr, task, NULL );
17843 #if HAVE_PTHREADS < 7
17844         if( status < 0 ) status = errno;
17845 #endif
17846         if( status ) return status;
17847 #else
17848         /* Draft 4 pthreads */
17849         status = pthread_create( &t, pthread_attr_default, task, NULL );
17850         if( status ) return errno;
17851
17852         /* give thread a chance to complete */
17853         /* it should remain joinable and hence detachable */
17854         sleep( 1 );
17855
17856         status = pthread_detach( &t );
17857         if( status ) return errno;
17858 #endif
17859
17860 #ifdef HAVE_LINUX_THREADS
17861         pthread_kill_other_threads_np();
17862 #endif
17863
17864         return 0;
17865
17866 }
17867
17868 _ACEOF
17869 if ac_fn_c_try_run "$LINENO"; then :
17870   ol_cv_pthread_lpthread=yes
17871 else
17872   ol_cv_pthread_lpthread=no
17873 fi
17874 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17875   conftest.$ac_objext conftest.beam conftest.$ac_ext
17876 fi
17877
17878
17879                 # restore the LIBS
17880                 LIBS="$ol_LIBS"
17881
17882 fi
17883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
17884 $as_echo "$ol_cv_pthread_lpthread" >&6; }
17885
17886         if test $ol_cv_pthread_lpthread = yes ; then
17887                 ol_link_pthreads="-lpthread"
17888                 ol_link_threads=posix
17889         fi
17890 fi
17891
17892                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
17893 if test "$ol_link_threads" = no ; then
17894         # try -lc_r
17895         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
17896 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
17897 if test "${ol_cv_pthread_lc_r+set}" = set; then :
17898   $as_echo_n "(cached) " >&6
17899 else
17900
17901                 # save the flags
17902                 ol_LIBS="$LIBS"
17903                 LIBS="-lc_r $LIBS"
17904
17905                 if test "$cross_compiling" = yes; then :
17906   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17907 /* end confdefs.h.  */
17908
17909 /* pthread test headers */
17910 #include <pthread.h>
17911 #if HAVE_PTHREADS < 7
17912 #include <errno.h>
17913 #endif
17914 #ifndef NULL
17915 #define NULL (void*)0
17916 #endif
17917
17918 static void *task(p)
17919         void *p;
17920 {
17921         return (void *) (p == NULL);
17922 }
17923
17924 int
17925 main ()
17926 {
17927
17928         /* pthread test function */
17929 #ifndef PTHREAD_CREATE_DETACHED
17930 #define PTHREAD_CREATE_DETACHED 1
17931 #endif
17932         pthread_t t;
17933         int status;
17934         int detach = PTHREAD_CREATE_DETACHED;
17935
17936 #if HAVE_PTHREADS > 4
17937         /* Final pthreads */
17938         pthread_attr_t attr;
17939
17940         status = pthread_attr_init(&attr);
17941         if( status ) return status;
17942
17943 #if HAVE_PTHREADS < 7
17944         status = pthread_attr_setdetachstate(&attr, &detach);
17945         if( status < 0 ) status = errno;
17946 #else
17947         status = pthread_attr_setdetachstate(&attr, detach);
17948 #endif
17949         if( status ) return status;
17950         status = pthread_create( &t, &attr, task, NULL );
17951 #if HAVE_PTHREADS < 7
17952         if( status < 0 ) status = errno;
17953 #endif
17954         if( status ) return status;
17955 #else
17956         /* Draft 4 pthreads */
17957         status = pthread_create( &t, pthread_attr_default, task, NULL );
17958         if( status ) return errno;
17959
17960         /* give thread a chance to complete */
17961         /* it should remain joinable and hence detachable */
17962         sleep( 1 );
17963
17964         status = pthread_detach( &t );
17965         if( status ) return errno;
17966 #endif
17967
17968 #ifdef HAVE_LINUX_THREADS
17969         pthread_kill_other_threads_np();
17970 #endif
17971
17972         return 0;
17973
17974   ;
17975   return 0;
17976 }
17977 _ACEOF
17978 if ac_fn_c_try_link "$LINENO"; then :
17979   ol_cv_pthread_lc_r=yes
17980 else
17981   ol_cv_pthread_lc_r=no
17982 fi
17983 rm -f core conftest.err conftest.$ac_objext \
17984     conftest$ac_exeext conftest.$ac_ext
17985 else
17986   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17987 /* end confdefs.h.  */
17988
17989 /* pthread test headers */
17990 #include <pthread.h>
17991 #if HAVE_PTHREADS < 7
17992 #include <errno.h>
17993 #endif
17994 #ifndef NULL
17995 #define NULL (void*)0
17996 #endif
17997
17998 static void *task(p)
17999         void *p;
18000 {
18001         return (void *) (p == NULL);
18002 }
18003
18004
18005 int main(argc, argv)
18006         int argc;
18007         char **argv;
18008 {
18009
18010         /* pthread test function */
18011 #ifndef PTHREAD_CREATE_DETACHED
18012 #define PTHREAD_CREATE_DETACHED 1
18013 #endif
18014         pthread_t t;
18015         int status;
18016         int detach = PTHREAD_CREATE_DETACHED;
18017
18018 #if HAVE_PTHREADS > 4
18019         /* Final pthreads */
18020         pthread_attr_t attr;
18021
18022         status = pthread_attr_init(&attr);
18023         if( status ) return status;
18024
18025 #if HAVE_PTHREADS < 7
18026         status = pthread_attr_setdetachstate(&attr, &detach);
18027         if( status < 0 ) status = errno;
18028 #else
18029         status = pthread_attr_setdetachstate(&attr, detach);
18030 #endif
18031         if( status ) return status;
18032         status = pthread_create( &t, &attr, task, NULL );
18033 #if HAVE_PTHREADS < 7
18034         if( status < 0 ) status = errno;
18035 #endif
18036         if( status ) return status;
18037 #else
18038         /* Draft 4 pthreads */
18039         status = pthread_create( &t, pthread_attr_default, task, NULL );
18040         if( status ) return errno;
18041
18042         /* give thread a chance to complete */
18043         /* it should remain joinable and hence detachable */
18044         sleep( 1 );
18045
18046         status = pthread_detach( &t );
18047         if( status ) return errno;
18048 #endif
18049
18050 #ifdef HAVE_LINUX_THREADS
18051         pthread_kill_other_threads_np();
18052 #endif
18053
18054         return 0;
18055
18056 }
18057
18058 _ACEOF
18059 if ac_fn_c_try_run "$LINENO"; then :
18060   ol_cv_pthread_lc_r=yes
18061 else
18062   ol_cv_pthread_lc_r=no
18063 fi
18064 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18065   conftest.$ac_objext conftest.beam conftest.$ac_ext
18066 fi
18067
18068
18069                 # restore the LIBS
18070                 LIBS="$ol_LIBS"
18071
18072 fi
18073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
18074 $as_echo "$ol_cv_pthread_lc_r" >&6; }
18075
18076         if test $ol_cv_pthread_lc_r = yes ; then
18077                 ol_link_pthreads="-lc_r"
18078                 ol_link_threads=posix
18079         fi
18080 fi
18081
18082
18083                 # Pthread try link: -threads (ol_cv_pthread_threads)
18084 if test "$ol_link_threads" = no ; then
18085         # try -threads
18086         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
18087 $as_echo_n "checking for pthread link with -threads... " >&6; }
18088 if test "${ol_cv_pthread_threads+set}" = set; then :
18089   $as_echo_n "(cached) " >&6
18090 else
18091
18092                 # save the flags
18093                 ol_LIBS="$LIBS"
18094                 LIBS="-threads $LIBS"
18095
18096                 if test "$cross_compiling" = yes; then :
18097   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18098 /* end confdefs.h.  */
18099
18100 /* pthread test headers */
18101 #include <pthread.h>
18102 #if HAVE_PTHREADS < 7
18103 #include <errno.h>
18104 #endif
18105 #ifndef NULL
18106 #define NULL (void*)0
18107 #endif
18108
18109 static void *task(p)
18110         void *p;
18111 {
18112         return (void *) (p == NULL);
18113 }
18114
18115 int
18116 main ()
18117 {
18118
18119         /* pthread test function */
18120 #ifndef PTHREAD_CREATE_DETACHED
18121 #define PTHREAD_CREATE_DETACHED 1
18122 #endif
18123         pthread_t t;
18124         int status;
18125         int detach = PTHREAD_CREATE_DETACHED;
18126
18127 #if HAVE_PTHREADS > 4
18128         /* Final pthreads */
18129         pthread_attr_t attr;
18130
18131         status = pthread_attr_init(&attr);
18132         if( status ) return status;
18133
18134 #if HAVE_PTHREADS < 7
18135         status = pthread_attr_setdetachstate(&attr, &detach);
18136         if( status < 0 ) status = errno;
18137 #else
18138         status = pthread_attr_setdetachstate(&attr, detach);
18139 #endif
18140         if( status ) return status;
18141         status = pthread_create( &t, &attr, task, NULL );
18142 #if HAVE_PTHREADS < 7
18143         if( status < 0 ) status = errno;
18144 #endif
18145         if( status ) return status;
18146 #else
18147         /* Draft 4 pthreads */
18148         status = pthread_create( &t, pthread_attr_default, task, NULL );
18149         if( status ) return errno;
18150
18151         /* give thread a chance to complete */
18152         /* it should remain joinable and hence detachable */
18153         sleep( 1 );
18154
18155         status = pthread_detach( &t );
18156         if( status ) return errno;
18157 #endif
18158
18159 #ifdef HAVE_LINUX_THREADS
18160         pthread_kill_other_threads_np();
18161 #endif
18162
18163         return 0;
18164
18165   ;
18166   return 0;
18167 }
18168 _ACEOF
18169 if ac_fn_c_try_link "$LINENO"; then :
18170   ol_cv_pthread_threads=yes
18171 else
18172   ol_cv_pthread_threads=no
18173 fi
18174 rm -f core conftest.err conftest.$ac_objext \
18175     conftest$ac_exeext conftest.$ac_ext
18176 else
18177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18178 /* end confdefs.h.  */
18179
18180 /* pthread test headers */
18181 #include <pthread.h>
18182 #if HAVE_PTHREADS < 7
18183 #include <errno.h>
18184 #endif
18185 #ifndef NULL
18186 #define NULL (void*)0
18187 #endif
18188
18189 static void *task(p)
18190         void *p;
18191 {
18192         return (void *) (p == NULL);
18193 }
18194
18195
18196 int main(argc, argv)
18197         int argc;
18198         char **argv;
18199 {
18200
18201         /* pthread test function */
18202 #ifndef PTHREAD_CREATE_DETACHED
18203 #define PTHREAD_CREATE_DETACHED 1
18204 #endif
18205         pthread_t t;
18206         int status;
18207         int detach = PTHREAD_CREATE_DETACHED;
18208
18209 #if HAVE_PTHREADS > 4
18210         /* Final pthreads */
18211         pthread_attr_t attr;
18212
18213         status = pthread_attr_init(&attr);
18214         if( status ) return status;
18215
18216 #if HAVE_PTHREADS < 7
18217         status = pthread_attr_setdetachstate(&attr, &detach);
18218         if( status < 0 ) status = errno;
18219 #else
18220         status = pthread_attr_setdetachstate(&attr, detach);
18221 #endif
18222         if( status ) return status;
18223         status = pthread_create( &t, &attr, task, NULL );
18224 #if HAVE_PTHREADS < 7
18225         if( status < 0 ) status = errno;
18226 #endif
18227         if( status ) return status;
18228 #else
18229         /* Draft 4 pthreads */
18230         status = pthread_create( &t, pthread_attr_default, task, NULL );
18231         if( status ) return errno;
18232
18233         /* give thread a chance to complete */
18234         /* it should remain joinable and hence detachable */
18235         sleep( 1 );
18236
18237         status = pthread_detach( &t );
18238         if( status ) return errno;
18239 #endif
18240
18241 #ifdef HAVE_LINUX_THREADS
18242         pthread_kill_other_threads_np();
18243 #endif
18244
18245         return 0;
18246
18247 }
18248
18249 _ACEOF
18250 if ac_fn_c_try_run "$LINENO"; then :
18251   ol_cv_pthread_threads=yes
18252 else
18253   ol_cv_pthread_threads=no
18254 fi
18255 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18256   conftest.$ac_objext conftest.beam conftest.$ac_ext
18257 fi
18258
18259
18260                 # restore the LIBS
18261                 LIBS="$ol_LIBS"
18262
18263 fi
18264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
18265 $as_echo "$ol_cv_pthread_threads" >&6; }
18266
18267         if test $ol_cv_pthread_threads = yes ; then
18268                 ol_link_pthreads="-threads"
18269                 ol_link_threads=posix
18270         fi
18271 fi
18272
18273
18274                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
18275 if test "$ol_link_threads" = no ; then
18276         # try -lpthreads -lmach -lexc -lc_r
18277         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
18278 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
18279 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then :
18280   $as_echo_n "(cached) " >&6
18281 else
18282
18283                 # save the flags
18284                 ol_LIBS="$LIBS"
18285                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
18286
18287                 if test "$cross_compiling" = yes; then :
18288   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18289 /* end confdefs.h.  */
18290
18291 /* pthread test headers */
18292 #include <pthread.h>
18293 #if HAVE_PTHREADS < 7
18294 #include <errno.h>
18295 #endif
18296 #ifndef NULL
18297 #define NULL (void*)0
18298 #endif
18299
18300 static void *task(p)
18301         void *p;
18302 {
18303         return (void *) (p == NULL);
18304 }
18305
18306 int
18307 main ()
18308 {
18309
18310         /* pthread test function */
18311 #ifndef PTHREAD_CREATE_DETACHED
18312 #define PTHREAD_CREATE_DETACHED 1
18313 #endif
18314         pthread_t t;
18315         int status;
18316         int detach = PTHREAD_CREATE_DETACHED;
18317
18318 #if HAVE_PTHREADS > 4
18319         /* Final pthreads */
18320         pthread_attr_t attr;
18321
18322         status = pthread_attr_init(&attr);
18323         if( status ) return status;
18324
18325 #if HAVE_PTHREADS < 7
18326         status = pthread_attr_setdetachstate(&attr, &detach);
18327         if( status < 0 ) status = errno;
18328 #else
18329         status = pthread_attr_setdetachstate(&attr, detach);
18330 #endif
18331         if( status ) return status;
18332         status = pthread_create( &t, &attr, task, NULL );
18333 #if HAVE_PTHREADS < 7
18334         if( status < 0 ) status = errno;
18335 #endif
18336         if( status ) return status;
18337 #else
18338         /* Draft 4 pthreads */
18339         status = pthread_create( &t, pthread_attr_default, task, NULL );
18340         if( status ) return errno;
18341
18342         /* give thread a chance to complete */
18343         /* it should remain joinable and hence detachable */
18344         sleep( 1 );
18345
18346         status = pthread_detach( &t );
18347         if( status ) return errno;
18348 #endif
18349
18350 #ifdef HAVE_LINUX_THREADS
18351         pthread_kill_other_threads_np();
18352 #endif
18353
18354         return 0;
18355
18356   ;
18357   return 0;
18358 }
18359 _ACEOF
18360 if ac_fn_c_try_link "$LINENO"; then :
18361   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18362 else
18363   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18364 fi
18365 rm -f core conftest.err conftest.$ac_objext \
18366     conftest$ac_exeext conftest.$ac_ext
18367 else
18368   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18369 /* end confdefs.h.  */
18370
18371 /* pthread test headers */
18372 #include <pthread.h>
18373 #if HAVE_PTHREADS < 7
18374 #include <errno.h>
18375 #endif
18376 #ifndef NULL
18377 #define NULL (void*)0
18378 #endif
18379
18380 static void *task(p)
18381         void *p;
18382 {
18383         return (void *) (p == NULL);
18384 }
18385
18386
18387 int main(argc, argv)
18388         int argc;
18389         char **argv;
18390 {
18391
18392         /* pthread test function */
18393 #ifndef PTHREAD_CREATE_DETACHED
18394 #define PTHREAD_CREATE_DETACHED 1
18395 #endif
18396         pthread_t t;
18397         int status;
18398         int detach = PTHREAD_CREATE_DETACHED;
18399
18400 #if HAVE_PTHREADS > 4
18401         /* Final pthreads */
18402         pthread_attr_t attr;
18403
18404         status = pthread_attr_init(&attr);
18405         if( status ) return status;
18406
18407 #if HAVE_PTHREADS < 7
18408         status = pthread_attr_setdetachstate(&attr, &detach);
18409         if( status < 0 ) status = errno;
18410 #else
18411         status = pthread_attr_setdetachstate(&attr, detach);
18412 #endif
18413         if( status ) return status;
18414         status = pthread_create( &t, &attr, task, NULL );
18415 #if HAVE_PTHREADS < 7
18416         if( status < 0 ) status = errno;
18417 #endif
18418         if( status ) return status;
18419 #else
18420         /* Draft 4 pthreads */
18421         status = pthread_create( &t, pthread_attr_default, task, NULL );
18422         if( status ) return errno;
18423
18424         /* give thread a chance to complete */
18425         /* it should remain joinable and hence detachable */
18426         sleep( 1 );
18427
18428         status = pthread_detach( &t );
18429         if( status ) return errno;
18430 #endif
18431
18432 #ifdef HAVE_LINUX_THREADS
18433         pthread_kill_other_threads_np();
18434 #endif
18435
18436         return 0;
18437
18438 }
18439
18440 _ACEOF
18441 if ac_fn_c_try_run "$LINENO"; then :
18442   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18443 else
18444   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18445 fi
18446 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18447   conftest.$ac_objext conftest.beam conftest.$ac_ext
18448 fi
18449
18450
18451                 # restore the LIBS
18452                 LIBS="$ol_LIBS"
18453
18454 fi
18455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
18456 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
18457
18458         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
18459                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
18460                 ol_link_threads=posix
18461         fi
18462 fi
18463
18464                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
18465 if test "$ol_link_threads" = no ; then
18466         # try -lpthreads -lmach -lexc
18467         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
18468 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
18469 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then :
18470   $as_echo_n "(cached) " >&6
18471 else
18472
18473                 # save the flags
18474                 ol_LIBS="$LIBS"
18475                 LIBS="-lpthreads -lmach -lexc $LIBS"
18476
18477                 if test "$cross_compiling" = yes; then :
18478   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18479 /* end confdefs.h.  */
18480
18481 /* pthread test headers */
18482 #include <pthread.h>
18483 #if HAVE_PTHREADS < 7
18484 #include <errno.h>
18485 #endif
18486 #ifndef NULL
18487 #define NULL (void*)0
18488 #endif
18489
18490 static void *task(p)
18491         void *p;
18492 {
18493         return (void *) (p == NULL);
18494 }
18495
18496 int
18497 main ()
18498 {
18499
18500         /* pthread test function */
18501 #ifndef PTHREAD_CREATE_DETACHED
18502 #define PTHREAD_CREATE_DETACHED 1
18503 #endif
18504         pthread_t t;
18505         int status;
18506         int detach = PTHREAD_CREATE_DETACHED;
18507
18508 #if HAVE_PTHREADS > 4
18509         /* Final pthreads */
18510         pthread_attr_t attr;
18511
18512         status = pthread_attr_init(&attr);
18513         if( status ) return status;
18514
18515 #if HAVE_PTHREADS < 7
18516         status = pthread_attr_setdetachstate(&attr, &detach);
18517         if( status < 0 ) status = errno;
18518 #else
18519         status = pthread_attr_setdetachstate(&attr, detach);
18520 #endif
18521         if( status ) return status;
18522         status = pthread_create( &t, &attr, task, NULL );
18523 #if HAVE_PTHREADS < 7
18524         if( status < 0 ) status = errno;
18525 #endif
18526         if( status ) return status;
18527 #else
18528         /* Draft 4 pthreads */
18529         status = pthread_create( &t, pthread_attr_default, task, NULL );
18530         if( status ) return errno;
18531
18532         /* give thread a chance to complete */
18533         /* it should remain joinable and hence detachable */
18534         sleep( 1 );
18535
18536         status = pthread_detach( &t );
18537         if( status ) return errno;
18538 #endif
18539
18540 #ifdef HAVE_LINUX_THREADS
18541         pthread_kill_other_threads_np();
18542 #endif
18543
18544         return 0;
18545
18546   ;
18547   return 0;
18548 }
18549 _ACEOF
18550 if ac_fn_c_try_link "$LINENO"; then :
18551   ol_cv_pthread_lpthreads_lmach_lexc=yes
18552 else
18553   ol_cv_pthread_lpthreads_lmach_lexc=no
18554 fi
18555 rm -f core conftest.err conftest.$ac_objext \
18556     conftest$ac_exeext conftest.$ac_ext
18557 else
18558   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18559 /* end confdefs.h.  */
18560
18561 /* pthread test headers */
18562 #include <pthread.h>
18563 #if HAVE_PTHREADS < 7
18564 #include <errno.h>
18565 #endif
18566 #ifndef NULL
18567 #define NULL (void*)0
18568 #endif
18569
18570 static void *task(p)
18571         void *p;
18572 {
18573         return (void *) (p == NULL);
18574 }
18575
18576
18577 int main(argc, argv)
18578         int argc;
18579         char **argv;
18580 {
18581
18582         /* pthread test function */
18583 #ifndef PTHREAD_CREATE_DETACHED
18584 #define PTHREAD_CREATE_DETACHED 1
18585 #endif
18586         pthread_t t;
18587         int status;
18588         int detach = PTHREAD_CREATE_DETACHED;
18589
18590 #if HAVE_PTHREADS > 4
18591         /* Final pthreads */
18592         pthread_attr_t attr;
18593
18594         status = pthread_attr_init(&attr);
18595         if( status ) return status;
18596
18597 #if HAVE_PTHREADS < 7
18598         status = pthread_attr_setdetachstate(&attr, &detach);
18599         if( status < 0 ) status = errno;
18600 #else
18601         status = pthread_attr_setdetachstate(&attr, detach);
18602 #endif
18603         if( status ) return status;
18604         status = pthread_create( &t, &attr, task, NULL );
18605 #if HAVE_PTHREADS < 7
18606         if( status < 0 ) status = errno;
18607 #endif
18608         if( status ) return status;
18609 #else
18610         /* Draft 4 pthreads */
18611         status = pthread_create( &t, pthread_attr_default, task, NULL );
18612         if( status ) return errno;
18613
18614         /* give thread a chance to complete */
18615         /* it should remain joinable and hence detachable */
18616         sleep( 1 );
18617
18618         status = pthread_detach( &t );
18619         if( status ) return errno;
18620 #endif
18621
18622 #ifdef HAVE_LINUX_THREADS
18623         pthread_kill_other_threads_np();
18624 #endif
18625
18626         return 0;
18627
18628 }
18629
18630 _ACEOF
18631 if ac_fn_c_try_run "$LINENO"; then :
18632   ol_cv_pthread_lpthreads_lmach_lexc=yes
18633 else
18634   ol_cv_pthread_lpthreads_lmach_lexc=no
18635 fi
18636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18637   conftest.$ac_objext conftest.beam conftest.$ac_ext
18638 fi
18639
18640
18641                 # restore the LIBS
18642                 LIBS="$ol_LIBS"
18643
18644 fi
18645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
18646 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
18647
18648         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
18649                 ol_link_pthreads="-lpthreads -lmach -lexc"
18650                 ol_link_threads=posix
18651         fi
18652 fi
18653
18654                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
18655 if test "$ol_link_threads" = no ; then
18656         # try -lpthreads -lexc
18657         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
18658 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
18659 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then :
18660   $as_echo_n "(cached) " >&6
18661 else
18662
18663                 # save the flags
18664                 ol_LIBS="$LIBS"
18665                 LIBS="-lpthreads -lexc $LIBS"
18666
18667                 if test "$cross_compiling" = yes; then :
18668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18669 /* end confdefs.h.  */
18670
18671 /* pthread test headers */
18672 #include <pthread.h>
18673 #if HAVE_PTHREADS < 7
18674 #include <errno.h>
18675 #endif
18676 #ifndef NULL
18677 #define NULL (void*)0
18678 #endif
18679
18680 static void *task(p)
18681         void *p;
18682 {
18683         return (void *) (p == NULL);
18684 }
18685
18686 int
18687 main ()
18688 {
18689
18690         /* pthread test function */
18691 #ifndef PTHREAD_CREATE_DETACHED
18692 #define PTHREAD_CREATE_DETACHED 1
18693 #endif
18694         pthread_t t;
18695         int status;
18696         int detach = PTHREAD_CREATE_DETACHED;
18697
18698 #if HAVE_PTHREADS > 4
18699         /* Final pthreads */
18700         pthread_attr_t attr;
18701
18702         status = pthread_attr_init(&attr);
18703         if( status ) return status;
18704
18705 #if HAVE_PTHREADS < 7
18706         status = pthread_attr_setdetachstate(&attr, &detach);
18707         if( status < 0 ) status = errno;
18708 #else
18709         status = pthread_attr_setdetachstate(&attr, detach);
18710 #endif
18711         if( status ) return status;
18712         status = pthread_create( &t, &attr, task, NULL );
18713 #if HAVE_PTHREADS < 7
18714         if( status < 0 ) status = errno;
18715 #endif
18716         if( status ) return status;
18717 #else
18718         /* Draft 4 pthreads */
18719         status = pthread_create( &t, pthread_attr_default, task, NULL );
18720         if( status ) return errno;
18721
18722         /* give thread a chance to complete */
18723         /* it should remain joinable and hence detachable */
18724         sleep( 1 );
18725
18726         status = pthread_detach( &t );
18727         if( status ) return errno;
18728 #endif
18729
18730 #ifdef HAVE_LINUX_THREADS
18731         pthread_kill_other_threads_np();
18732 #endif
18733
18734         return 0;
18735
18736   ;
18737   return 0;
18738 }
18739 _ACEOF
18740 if ac_fn_c_try_link "$LINENO"; then :
18741   ol_cv_pthread_lpthreads_lexc=yes
18742 else
18743   ol_cv_pthread_lpthreads_lexc=no
18744 fi
18745 rm -f core conftest.err conftest.$ac_objext \
18746     conftest$ac_exeext conftest.$ac_ext
18747 else
18748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18749 /* end confdefs.h.  */
18750
18751 /* pthread test headers */
18752 #include <pthread.h>
18753 #if HAVE_PTHREADS < 7
18754 #include <errno.h>
18755 #endif
18756 #ifndef NULL
18757 #define NULL (void*)0
18758 #endif
18759
18760 static void *task(p)
18761         void *p;
18762 {
18763         return (void *) (p == NULL);
18764 }
18765
18766
18767 int main(argc, argv)
18768         int argc;
18769         char **argv;
18770 {
18771
18772         /* pthread test function */
18773 #ifndef PTHREAD_CREATE_DETACHED
18774 #define PTHREAD_CREATE_DETACHED 1
18775 #endif
18776         pthread_t t;
18777         int status;
18778         int detach = PTHREAD_CREATE_DETACHED;
18779
18780 #if HAVE_PTHREADS > 4
18781         /* Final pthreads */
18782         pthread_attr_t attr;
18783
18784         status = pthread_attr_init(&attr);
18785         if( status ) return status;
18786
18787 #if HAVE_PTHREADS < 7
18788         status = pthread_attr_setdetachstate(&attr, &detach);
18789         if( status < 0 ) status = errno;
18790 #else
18791         status = pthread_attr_setdetachstate(&attr, detach);
18792 #endif
18793         if( status ) return status;
18794         status = pthread_create( &t, &attr, task, NULL );
18795 #if HAVE_PTHREADS < 7
18796         if( status < 0 ) status = errno;
18797 #endif
18798         if( status ) return status;
18799 #else
18800         /* Draft 4 pthreads */
18801         status = pthread_create( &t, pthread_attr_default, task, NULL );
18802         if( status ) return errno;
18803
18804         /* give thread a chance to complete */
18805         /* it should remain joinable and hence detachable */
18806         sleep( 1 );
18807
18808         status = pthread_detach( &t );
18809         if( status ) return errno;
18810 #endif
18811
18812 #ifdef HAVE_LINUX_THREADS
18813         pthread_kill_other_threads_np();
18814 #endif
18815
18816         return 0;
18817
18818 }
18819
18820 _ACEOF
18821 if ac_fn_c_try_run "$LINENO"; then :
18822   ol_cv_pthread_lpthreads_lexc=yes
18823 else
18824   ol_cv_pthread_lpthreads_lexc=no
18825 fi
18826 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18827   conftest.$ac_objext conftest.beam conftest.$ac_ext
18828 fi
18829
18830
18831                 # restore the LIBS
18832                 LIBS="$ol_LIBS"
18833
18834 fi
18835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
18836 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
18837
18838         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
18839                 ol_link_pthreads="-lpthreads -lexc"
18840                 ol_link_threads=posix
18841         fi
18842 fi
18843
18844
18845                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
18846 if test "$ol_link_threads" = no ; then
18847         # try -lpthreads
18848         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
18849 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
18850 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then :
18851   $as_echo_n "(cached) " >&6
18852 else
18853
18854                 # save the flags
18855                 ol_LIBS="$LIBS"
18856                 LIBS="-lpthreads $LIBS"
18857
18858                 if test "$cross_compiling" = yes; then :
18859   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18860 /* end confdefs.h.  */
18861
18862 /* pthread test headers */
18863 #include <pthread.h>
18864 #if HAVE_PTHREADS < 7
18865 #include <errno.h>
18866 #endif
18867 #ifndef NULL
18868 #define NULL (void*)0
18869 #endif
18870
18871 static void *task(p)
18872         void *p;
18873 {
18874         return (void *) (p == NULL);
18875 }
18876
18877 int
18878 main ()
18879 {
18880
18881         /* pthread test function */
18882 #ifndef PTHREAD_CREATE_DETACHED
18883 #define PTHREAD_CREATE_DETACHED 1
18884 #endif
18885         pthread_t t;
18886         int status;
18887         int detach = PTHREAD_CREATE_DETACHED;
18888
18889 #if HAVE_PTHREADS > 4
18890         /* Final pthreads */
18891         pthread_attr_t attr;
18892
18893         status = pthread_attr_init(&attr);
18894         if( status ) return status;
18895
18896 #if HAVE_PTHREADS < 7
18897         status = pthread_attr_setdetachstate(&attr, &detach);
18898         if( status < 0 ) status = errno;
18899 #else
18900         status = pthread_attr_setdetachstate(&attr, detach);
18901 #endif
18902         if( status ) return status;
18903         status = pthread_create( &t, &attr, task, NULL );
18904 #if HAVE_PTHREADS < 7
18905         if( status < 0 ) status = errno;
18906 #endif
18907         if( status ) return status;
18908 #else
18909         /* Draft 4 pthreads */
18910         status = pthread_create( &t, pthread_attr_default, task, NULL );
18911         if( status ) return errno;
18912
18913         /* give thread a chance to complete */
18914         /* it should remain joinable and hence detachable */
18915         sleep( 1 );
18916
18917         status = pthread_detach( &t );
18918         if( status ) return errno;
18919 #endif
18920
18921 #ifdef HAVE_LINUX_THREADS
18922         pthread_kill_other_threads_np();
18923 #endif
18924
18925         return 0;
18926
18927   ;
18928   return 0;
18929 }
18930 _ACEOF
18931 if ac_fn_c_try_link "$LINENO"; then :
18932   ol_cv_pthread_lib_lpthreads=yes
18933 else
18934   ol_cv_pthread_lib_lpthreads=no
18935 fi
18936 rm -f core conftest.err conftest.$ac_objext \
18937     conftest$ac_exeext conftest.$ac_ext
18938 else
18939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18940 /* end confdefs.h.  */
18941
18942 /* pthread test headers */
18943 #include <pthread.h>
18944 #if HAVE_PTHREADS < 7
18945 #include <errno.h>
18946 #endif
18947 #ifndef NULL
18948 #define NULL (void*)0
18949 #endif
18950
18951 static void *task(p)
18952         void *p;
18953 {
18954         return (void *) (p == NULL);
18955 }
18956
18957
18958 int main(argc, argv)
18959         int argc;
18960         char **argv;
18961 {
18962
18963         /* pthread test function */
18964 #ifndef PTHREAD_CREATE_DETACHED
18965 #define PTHREAD_CREATE_DETACHED 1
18966 #endif
18967         pthread_t t;
18968         int status;
18969         int detach = PTHREAD_CREATE_DETACHED;
18970
18971 #if HAVE_PTHREADS > 4
18972         /* Final pthreads */
18973         pthread_attr_t attr;
18974
18975         status = pthread_attr_init(&attr);
18976         if( status ) return status;
18977
18978 #if HAVE_PTHREADS < 7
18979         status = pthread_attr_setdetachstate(&attr, &detach);
18980         if( status < 0 ) status = errno;
18981 #else
18982         status = pthread_attr_setdetachstate(&attr, detach);
18983 #endif
18984         if( status ) return status;
18985         status = pthread_create( &t, &attr, task, NULL );
18986 #if HAVE_PTHREADS < 7
18987         if( status < 0 ) status = errno;
18988 #endif
18989         if( status ) return status;
18990 #else
18991         /* Draft 4 pthreads */
18992         status = pthread_create( &t, pthread_attr_default, task, NULL );
18993         if( status ) return errno;
18994
18995         /* give thread a chance to complete */
18996         /* it should remain joinable and hence detachable */
18997         sleep( 1 );
18998
18999         status = pthread_detach( &t );
19000         if( status ) return errno;
19001 #endif
19002
19003 #ifdef HAVE_LINUX_THREADS
19004         pthread_kill_other_threads_np();
19005 #endif
19006
19007         return 0;
19008
19009 }
19010
19011 _ACEOF
19012 if ac_fn_c_try_run "$LINENO"; then :
19013   ol_cv_pthread_lib_lpthreads=yes
19014 else
19015   ol_cv_pthread_lib_lpthreads=no
19016 fi
19017 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19018   conftest.$ac_objext conftest.beam conftest.$ac_ext
19019 fi
19020
19021
19022                 # restore the LIBS
19023                 LIBS="$ol_LIBS"
19024
19025 fi
19026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
19027 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
19028
19029         if test $ol_cv_pthread_lib_lpthreads = yes ; then
19030                 ol_link_pthreads="-lpthreads"
19031                 ol_link_threads=posix
19032         fi
19033 fi
19034
19035
19036                 if test $ol_link_threads != no ; then
19037                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
19038
19039                                                 save_CPPFLAGS="$CPPFLAGS"
19040                         save_LIBS="$LIBS"
19041                         LIBS="$LTHREAD_LIBS $LIBS"
19042
19043                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
19044 do :
19045   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19046 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19047 eval as_val=\$$as_ac_var
19048    if test "x$as_val" = x""yes; then :
19049   cat >>confdefs.h <<_ACEOF
19050 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19051 _ACEOF
19052
19053 fi
19054 done
19055
19056
19057                         if test $ac_cv_func_sched_yield = no &&
19058                            test $ac_cv_func_pthread_yield = no &&
19059                            test $ac_cv_func_thr_yield = no ; then
19060                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
19061 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
19062 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
19063   $as_echo_n "(cached) " >&6
19064 else
19065   ac_check_lib_save_LIBS=$LIBS
19066 LIBS="-lrt  $LIBS"
19067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19068 /* end confdefs.h.  */
19069
19070 /* Override any GCC internal prototype to avoid an error.
19071    Use char because int might match the return type of a GCC
19072    builtin and then its argument prototype would still apply.  */
19073 #ifdef __cplusplus
19074 extern "C"
19075 #endif
19076 char sched_yield ();
19077 int
19078 main ()
19079 {
19080 return sched_yield ();
19081   ;
19082   return 0;
19083 }
19084 _ACEOF
19085 if ac_fn_c_try_link "$LINENO"; then :
19086   ac_cv_lib_rt_sched_yield=yes
19087 else
19088   ac_cv_lib_rt_sched_yield=no
19089 fi
19090 rm -f core conftest.err conftest.$ac_objext \
19091     conftest$ac_exeext conftest.$ac_ext
19092 LIBS=$ac_check_lib_save_LIBS
19093 fi
19094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19095 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
19096 if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
19097   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
19098
19099 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
19100
19101                                         ac_cv_func_sched_yield=yes
19102 else
19103   ac_cv_func_sched_yield=no
19104 fi
19105
19106                         fi
19107                         if test $ac_cv_func_sched_yield = no &&
19108                            test $ac_cv_func_pthread_yield = no &&
19109                            test "$ac_cv_func_thr_yield" = no ; then
19110                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
19111 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
19112                         fi
19113
19114                                                 for ac_func in pthread_kill
19115 do :
19116   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
19117 if test "x$ac_cv_func_pthread_kill" = x""yes; then :
19118   cat >>confdefs.h <<_ACEOF
19119 #define HAVE_PTHREAD_KILL 1
19120 _ACEOF
19121
19122 fi
19123 done
19124
19125
19126                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
19127 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
19128 if test "${ol_cv_func_pthread_rwlock_destroy+set}" = set; then :
19129   $as_echo_n "(cached) " >&6
19130 else
19131
19132                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19133 /* end confdefs.h.  */
19134
19135 #include <pthread.h>
19136 pthread_rwlock_t rwlock;
19137
19138 int
19139 main ()
19140 {
19141 pthread_rwlock_destroy(&rwlock);
19142   ;
19143   return 0;
19144 }
19145 _ACEOF
19146 if ac_fn_c_try_link "$LINENO"; then :
19147   ol_cv_func_pthread_rwlock_destroy=yes
19148 else
19149   ol_cv_func_pthread_rwlock_destroy=no
19150 fi
19151 rm -f core conftest.err conftest.$ac_objext \
19152     conftest$ac_exeext conftest.$ac_ext
19153
19154 fi
19155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
19156 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
19157                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
19158
19159 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
19160
19161                         fi
19162
19163                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
19164 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
19165 if test "${ol_cv_func_pthread_detach+set}" = set; then :
19166   $as_echo_n "(cached) " >&6
19167 else
19168
19169                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19170 /* end confdefs.h.  */
19171
19172 #include <pthread.h>
19173 #ifndef NULL
19174 #define NULL (void*)0
19175 #endif
19176
19177 int
19178 main ()
19179 {
19180 pthread_detach(NULL);
19181   ;
19182   return 0;
19183 }
19184 _ACEOF
19185 if ac_fn_c_try_link "$LINENO"; then :
19186   ol_cv_func_pthread_detach=yes
19187 else
19188   ol_cv_func_pthread_detach=no
19189 fi
19190 rm -f core conftest.err conftest.$ac_objext \
19191     conftest$ac_exeext conftest.$ac_ext
19192
19193 fi
19194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
19195 $as_echo "$ol_cv_func_pthread_detach" >&6; }
19196
19197                         if test $ol_cv_func_pthread_detach = no ; then
19198                                 as_fn_error "could not locate pthread_detach()" "$LINENO" 5
19199                         fi
19200
19201
19202 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
19203
19204
19205                                                 for ac_func in \
19206                                 pthread_setconcurrency \
19207                                 pthread_getconcurrency \
19208                                 thr_setconcurrency \
19209                                 thr_getconcurrency \
19210
19211 do :
19212   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19213 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19214 eval as_val=\$$as_ac_var
19215    if test "x$as_val" = x""yes; then :
19216   cat >>confdefs.h <<_ACEOF
19217 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19218 _ACEOF
19219
19220 fi
19221 done
19222
19223
19224
19225         for ac_func in pthread_kill_other_threads_np
19226 do :
19227   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
19228 if test "x$ac_cv_func_pthread_kill_other_threads_np" = x""yes; then :
19229   cat >>confdefs.h <<_ACEOF
19230 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
19231 _ACEOF
19232
19233 fi
19234 done
19235
19236         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
19237 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
19238 if test "${ol_cv_sys_linux_threads+set}" = set; then :
19239   $as_echo_n "(cached) " >&6
19240 else
19241   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
19242 fi
19243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
19244 $as_echo "$ol_cv_sys_linux_threads" >&6; }
19245
19246
19247
19248
19249         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
19250 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
19251 if test "${ol_cv_linux_threads+set}" = set; then :
19252   $as_echo_n "(cached) " >&6
19253 else
19254
19255                 if test $ol_cv_header_linux_threads = yes &&
19256                    test $ol_cv_sys_linux_threads = yes; then
19257                         ol_cv_linux_threads=yes
19258                 elif test $ol_cv_header_linux_threads = no &&
19259                      test $ol_cv_sys_linux_threads = no; then
19260                         ol_cv_linux_threads=no
19261                 else
19262                         ol_cv_linux_threads=error
19263                 fi
19264
19265 fi
19266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
19267 $as_echo "$ol_cv_linux_threads" >&6; }
19268
19269
19270                         if test $ol_cv_linux_threads = error; then
19271                                 as_fn_error "LinuxThreads header/library mismatch" "$LINENO" 5;
19272                         fi
19273
19274                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
19275 $as_echo_n "checking if pthread_create() works... " >&6; }
19276 if test "${ol_cv_pthread_create_works+set}" = set; then :
19277   $as_echo_n "(cached) " >&6
19278 else
19279
19280                         if test "$cross_compiling" = yes; then :
19281                                 ol_cv_pthread_create_works=yes
19282 else
19283   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19284 /* end confdefs.h.  */
19285
19286 /* pthread test headers */
19287 #include <pthread.h>
19288 #if HAVE_PTHREADS < 7
19289 #include <errno.h>
19290 #endif
19291 #ifndef NULL
19292 #define NULL (void*)0
19293 #endif
19294
19295 static void *task(p)
19296         void *p;
19297 {
19298         return (void *) (p == NULL);
19299 }
19300
19301
19302 int main(argc, argv)
19303         int argc;
19304         char **argv;
19305 {
19306
19307         /* pthread test function */
19308 #ifndef PTHREAD_CREATE_DETACHED
19309 #define PTHREAD_CREATE_DETACHED 1
19310 #endif
19311         pthread_t t;
19312         int status;
19313         int detach = PTHREAD_CREATE_DETACHED;
19314
19315 #if HAVE_PTHREADS > 4
19316         /* Final pthreads */
19317         pthread_attr_t attr;
19318
19319         status = pthread_attr_init(&attr);
19320         if( status ) return status;
19321
19322 #if HAVE_PTHREADS < 7
19323         status = pthread_attr_setdetachstate(&attr, &detach);
19324         if( status < 0 ) status = errno;
19325 #else
19326         status = pthread_attr_setdetachstate(&attr, detach);
19327 #endif
19328         if( status ) return status;
19329         status = pthread_create( &t, &attr, task, NULL );
19330 #if HAVE_PTHREADS < 7
19331         if( status < 0 ) status = errno;
19332 #endif
19333         if( status ) return status;
19334 #else
19335         /* Draft 4 pthreads */
19336         status = pthread_create( &t, pthread_attr_default, task, NULL );
19337         if( status ) return errno;
19338
19339         /* give thread a chance to complete */
19340         /* it should remain joinable and hence detachable */
19341         sleep( 1 );
19342
19343         status = pthread_detach( &t );
19344         if( status ) return errno;
19345 #endif
19346
19347 #ifdef HAVE_LINUX_THREADS
19348         pthread_kill_other_threads_np();
19349 #endif
19350
19351         return 0;
19352
19353 }
19354
19355 _ACEOF
19356 if ac_fn_c_try_run "$LINENO"; then :
19357   ol_cv_pthread_create_works=yes
19358 else
19359   ol_cv_pthread_create_works=no
19360 fi
19361 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19362   conftest.$ac_objext conftest.beam conftest.$ac_ext
19363 fi
19364
19365 fi
19366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
19367 $as_echo "$ol_cv_pthread_create_works" >&6; }
19368
19369                         if test $ol_cv_pthread_create_works = no ; then
19370                                 as_fn_error "pthread_create is not usable, check environment settings" "$LINENO" 5
19371                         fi
19372
19373                         ol_replace_broken_yield=no
19374
19375                         if test $ol_replace_broken_yield = yes ; then
19376
19377 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
19378
19379                         fi
19380
19381                                                 if test $ol_with_yielding_select = auto ; then
19382                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
19383 $as_echo_n "checking if select yields when using pthreads... " >&6; }
19384 if test "${ol_cv_pthread_select_yields+set}" = set; then :
19385   $as_echo_n "(cached) " >&6
19386 else
19387
19388                                 if test "$cross_compiling" = yes; then :
19389   ol_cv_pthread_select_yields=cross
19390 else
19391   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19392 /* end confdefs.h.  */
19393
19394 #include <sys/types.h>
19395 #include <sys/time.h>
19396 #include <unistd.h>
19397 #include <pthread.h>
19398 #ifndef NULL
19399 #define NULL (void*) 0
19400 #endif
19401
19402 static int fildes[2];
19403
19404 static void *task(p)
19405         void *p;
19406 {
19407         int i;
19408         struct timeval tv;
19409
19410         fd_set rfds;
19411
19412         tv.tv_sec=10;
19413         tv.tv_usec=0;
19414
19415         FD_ZERO(&rfds);
19416         FD_SET(fildes[0], &rfds);
19417
19418         /* we're not interested in any fds */
19419         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
19420
19421         if(i < 0) {
19422                 perror("select");
19423                 exit(10);
19424         }
19425
19426         exit(0); /* if we exit here, the select blocked the whole process */
19427 }
19428
19429 int main(argc, argv)
19430         int argc;
19431         char **argv;
19432 {
19433         pthread_t t;
19434
19435         /* create a pipe to select */
19436         if(pipe(&fildes[0])) {
19437                 perror("select");
19438                 exit(1);
19439         }
19440
19441 #ifdef HAVE_PTHREAD_SETCONCURRENCY
19442         (void) pthread_setconcurrency(2);
19443 #else
19444 #ifdef HAVE_THR_SETCONCURRENCY
19445         /* Set Solaris LWP concurrency to 2 */
19446         thr_setconcurrency(2);
19447 #endif
19448 #endif
19449
19450 #if HAVE_PTHREADS < 6
19451         pthread_create(&t, pthread_attr_default, task, NULL);
19452 #else
19453         pthread_create(&t, NULL, task, NULL);
19454 #endif
19455
19456         /* make sure task runs first */
19457 #ifdef HAVE_THR_YIELD
19458         thr_yield();
19459 #elif defined( HAVE_SCHED_YIELD )
19460         sched_yield();
19461 #elif defined( HAVE_PTHREAD_YIELD )
19462         pthread_yield();
19463 #endif
19464
19465         exit(2);
19466 }
19467 _ACEOF
19468 if ac_fn_c_try_run "$LINENO"; then :
19469   ol_cv_pthread_select_yields=no
19470 else
19471   ol_cv_pthread_select_yields=yes
19472 fi
19473 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19474   conftest.$ac_objext conftest.beam conftest.$ac_ext
19475 fi
19476
19477 fi
19478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
19479 $as_echo "$ol_cv_pthread_select_yields" >&6; }
19480
19481                                 if test $ol_cv_pthread_select_yields = cross ; then
19482                                         as_fn_error "crossing compiling: use --with-yielding_select=yes|no|manual" "$LINENO" 5
19483                                 fi
19484
19485                                 if test $ol_cv_pthread_select_yields = yes ; then
19486                                         ol_with_yielding_select=yes
19487                                 fi
19488                         fi
19489
19490                                                 CPPFLAGS="$save_CPPFLAGS"
19491                         LIBS="$save_LIBS"
19492                 else
19493                         as_fn_error "could not locate usable POSIX Threads" "$LINENO" 5
19494                 fi
19495         fi
19496
19497         if test $ol_with_threads = posix ; then
19498                 as_fn_error "could not locate POSIX Threads" "$LINENO" 5
19499         fi
19500         ;;
19501 esac
19502
19503 case $ol_with_threads in auto | yes | mach)
19504
19505                 for ac_header in mach/cthreads.h cthreads.h
19506 do :
19507   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19508 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19509 eval as_val=\$$as_ac_Header
19510    if test "x$as_val" = x""yes; then :
19511   cat >>confdefs.h <<_ACEOF
19512 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19513 _ACEOF
19514
19515 fi
19516
19517 done
19518
19519         if test $ac_cv_header_mach_cthreads_h = yes ; then
19520                 ol_with_threads=found
19521
19522                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19523 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19524   ol_link_threads=yes
19525 fi
19526
19527
19528                 if test $ol_link_threads = no ; then
19529                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
19530 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
19531 if test "${ol_cv_cthread_all_load+set}" = set; then :
19532   $as_echo_n "(cached) " >&6
19533 else
19534
19535                                                                 save_LIBS="$LIBS"
19536                                 LIBS="-all_load $LIBS"
19537                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19538 /* end confdefs.h.  */
19539 #include <mach/cthreads.h>
19540 int
19541 main ()
19542 {
19543
19544                                         cthread_fork((void *)0, (void *)0);
19545
19546   ;
19547   return 0;
19548 }
19549 _ACEOF
19550 if ac_fn_c_try_link "$LINENO"; then :
19551   ol_cv_cthread_all_load=yes
19552 else
19553   ol_cv_cthread_all_load=no
19554 fi
19555 rm -f core conftest.err conftest.$ac_objext \
19556     conftest$ac_exeext conftest.$ac_ext
19557                                                                 LIBS="$save_LIBS"
19558
19559 fi
19560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
19561 $as_echo "$ol_cv_cthread_all_load" >&6; }
19562
19563                         if test $ol_cv_cthread_all_load = yes ; then
19564                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
19565                                 ol_link_threads=mach
19566                                 ol_with_threads=found
19567                         fi
19568                 fi
19569
19570         elif test $ac_cv_header_cthreads_h = yes ; then
19571
19572                 ol_with_threads=found
19573
19574                                 save_LIBS="$LIBS"
19575                 LIBS="$LIBS -lthreads"
19576                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19577 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19578   ol_link_threads=yes
19579 fi
19580
19581                 LIBS="$save_LIBS"
19582
19583                 if test $ol_link_threads = yes ; then
19584                         LTHREAD_LIBS="-lthreads"
19585                         ol_link_threads=mach
19586                         ol_with_threads=found
19587                 else
19588                         as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19589                 fi
19590
19591         elif test $ol_with_threads = mach ; then
19592                 as_fn_error "could not locate Mach CThreads" "$LINENO" 5
19593         fi
19594
19595         if test $ol_link_threads = mach ; then
19596
19597 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
19598
19599         elif test $ol_with_threads = found ; then
19600                 as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19601         fi
19602         ;;
19603 esac
19604
19605 case $ol_with_threads in auto | yes | pth)
19606
19607         for ac_header in pth.h
19608 do :
19609   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
19610 if test "x$ac_cv_header_pth_h" = x""yes; then :
19611   cat >>confdefs.h <<_ACEOF
19612 #define HAVE_PTH_H 1
19613 _ACEOF
19614
19615 fi
19616
19617 done
19618
19619
19620         if test $ac_cv_header_pth_h = yes ; then
19621                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
19622 $as_echo_n "checking for pth_version in -lpth... " >&6; }
19623 if test "${ac_cv_lib_pth_pth_version+set}" = set; then :
19624   $as_echo_n "(cached) " >&6
19625 else
19626   ac_check_lib_save_LIBS=$LIBS
19627 LIBS="-lpth  $LIBS"
19628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19629 /* end confdefs.h.  */
19630
19631 /* Override any GCC internal prototype to avoid an error.
19632    Use char because int might match the return type of a GCC
19633    builtin and then its argument prototype would still apply.  */
19634 #ifdef __cplusplus
19635 extern "C"
19636 #endif
19637 char pth_version ();
19638 int
19639 main ()
19640 {
19641 return pth_version ();
19642   ;
19643   return 0;
19644 }
19645 _ACEOF
19646 if ac_fn_c_try_link "$LINENO"; then :
19647   ac_cv_lib_pth_pth_version=yes
19648 else
19649   ac_cv_lib_pth_pth_version=no
19650 fi
19651 rm -f core conftest.err conftest.$ac_objext \
19652     conftest$ac_exeext conftest.$ac_ext
19653 LIBS=$ac_check_lib_save_LIBS
19654 fi
19655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
19656 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
19657 if test "x$ac_cv_lib_pth_pth_version" = x""yes; then :
19658   have_pth=yes
19659 else
19660   have_pth=no
19661 fi
19662
19663
19664                 if test $have_pth = yes ; then
19665
19666 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
19667
19668                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
19669                         ol_link_threads=pth
19670                         ol_with_threads=found
19671
19672                         if test $ol_with_yielding_select = auto ; then
19673                                 ol_with_yielding_select=yes
19674                         fi
19675                 fi
19676         fi
19677         ;;
19678 esac
19679
19680 case $ol_with_threads in auto | yes | lwp)
19681
19682                 for ac_header in thread.h synch.h
19683 do :
19684   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19685 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19686 eval as_val=\$$as_ac_Header
19687    if test "x$as_val" = x""yes; then :
19688   cat >>confdefs.h <<_ACEOF
19689 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19690 _ACEOF
19691
19692 fi
19693
19694 done
19695
19696         if test $ac_cv_header_thread_h = yes &&
19697            test $ac_cv_header_synch_h = yes ; then
19698                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
19699 $as_echo_n "checking for thr_create in -lthread... " >&6; }
19700 if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
19701   $as_echo_n "(cached) " >&6
19702 else
19703   ac_check_lib_save_LIBS=$LIBS
19704 LIBS="-lthread  $LIBS"
19705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19706 /* end confdefs.h.  */
19707
19708 /* Override any GCC internal prototype to avoid an error.
19709    Use char because int might match the return type of a GCC
19710    builtin and then its argument prototype would still apply.  */
19711 #ifdef __cplusplus
19712 extern "C"
19713 #endif
19714 char thr_create ();
19715 int
19716 main ()
19717 {
19718 return thr_create ();
19719   ;
19720   return 0;
19721 }
19722 _ACEOF
19723 if ac_fn_c_try_link "$LINENO"; then :
19724   ac_cv_lib_thread_thr_create=yes
19725 else
19726   ac_cv_lib_thread_thr_create=no
19727 fi
19728 rm -f core conftest.err conftest.$ac_objext \
19729     conftest$ac_exeext conftest.$ac_ext
19730 LIBS=$ac_check_lib_save_LIBS
19731 fi
19732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
19733 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
19734 if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
19735   have_thr=yes
19736 else
19737   have_thr=no
19738 fi
19739
19740
19741                 if test $have_thr = yes ; then
19742
19743 $as_echo "#define HAVE_THR 1" >>confdefs.h
19744
19745                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
19746                         ol_link_threads=thr
19747
19748                         if test $ol_with_yielding_select = auto ; then
19749                                 ol_with_yielding_select=yes
19750                         fi
19751
19752                                                 for ac_func in \
19753                                 thr_setconcurrency \
19754                                 thr_getconcurrency \
19755
19756 do :
19757   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19758 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19759 eval as_val=\$$as_ac_var
19760    if test "x$as_val" = x""yes; then :
19761   cat >>confdefs.h <<_ACEOF
19762 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19763 _ACEOF
19764
19765 fi
19766 done
19767
19768                 fi
19769         fi
19770         ;;
19771 esac
19772
19773 if test $ol_with_yielding_select = yes ; then
19774
19775 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
19776
19777 fi
19778
19779 if test $ol_with_threads = manual ; then
19780                 ol_link_threads=yes
19781
19782         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
19783 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
19784
19785         for ac_header in pthread.h sched.h
19786 do :
19787   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19788 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19789 eval as_val=\$$as_ac_Header
19790    if test "x$as_val" = x""yes; then :
19791   cat >>confdefs.h <<_ACEOF
19792 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19793 _ACEOF
19794
19795 fi
19796
19797 done
19798
19799         for ac_func in sched_yield pthread_yield
19800 do :
19801   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19802 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19803 eval as_val=\$$as_ac_var
19804    if test "x$as_val" = x""yes; then :
19805   cat >>confdefs.h <<_ACEOF
19806 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19807 _ACEOF
19808
19809 fi
19810 done
19811
19812
19813         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
19814 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
19815 if test "${ol_cv_header_linux_threads+set}" = set; then :
19816   $as_echo_n "(cached) " >&6
19817 else
19818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19819 /* end confdefs.h.  */
19820 #include <pthread.h>
19821 _ACEOF
19822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19823   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
19824   ol_cv_header_linux_threads=yes
19825 else
19826   ol_cv_header_linux_threads=no
19827 fi
19828 rm -f conftest*
19829
19830
19831 fi
19832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
19833 $as_echo "$ol_cv_header_linux_threads" >&6; }
19834         if test $ol_cv_header_linux_threads = yes; then
19835
19836 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
19837
19838         fi
19839
19840
19841         for ac_header in mach/cthreads.h
19842 do :
19843   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
19844 if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
19845   cat >>confdefs.h <<_ACEOF
19846 #define HAVE_MACH_CTHREADS_H 1
19847 _ACEOF
19848
19849 fi
19850
19851 done
19852
19853         for ac_header in thread.h synch.h
19854 do :
19855   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19856 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19857 eval as_val=\$$as_ac_Header
19858    if test "x$as_val" = x""yes; then :
19859   cat >>confdefs.h <<_ACEOF
19860 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19861 _ACEOF
19862
19863 fi
19864
19865 done
19866
19867 fi
19868
19869 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
19870                         $as_echo "#define REENTRANT 1" >>confdefs.h
19871
19872         $as_echo "#define _REENTRANT 1" >>confdefs.h
19873
19874         $as_echo "#define THREAD_SAFE 1" >>confdefs.h
19875
19876         $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
19877
19878         $as_echo "#define THREADSAFE 1" >>confdefs.h
19879
19880         $as_echo "#define _THREADSAFE 1" >>confdefs.h
19881
19882         $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
19883
19884
19885                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
19886 $as_echo_n "checking for thread specific errno... " >&6; }
19887 if test "${ol_cv_errno_thread_specific+set}" = set; then :
19888   $as_echo_n "(cached) " >&6
19889 else
19890
19891                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19892 /* end confdefs.h.  */
19893 #include <errno.h>
19894 int
19895 main ()
19896 {
19897 errno = 0;
19898   ;
19899   return 0;
19900 }
19901 _ACEOF
19902 if ac_fn_c_try_link "$LINENO"; then :
19903   ol_cv_errno_thread_specific=yes
19904 else
19905   ol_cv_errno_thread_specific=no
19906 fi
19907 rm -f core conftest.err conftest.$ac_objext \
19908     conftest$ac_exeext conftest.$ac_ext
19909
19910 fi
19911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
19912 $as_echo "$ol_cv_errno_thread_specific" >&6; }
19913
19914                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
19915 $as_echo_n "checking for thread specific h_errno... " >&6; }
19916 if test "${ol_cv_h_errno_thread_specific+set}" = set; then :
19917   $as_echo_n "(cached) " >&6
19918 else
19919
19920                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19921 /* end confdefs.h.  */
19922 #include <netdb.h>
19923 int
19924 main ()
19925 {
19926 h_errno = 0;
19927   ;
19928   return 0;
19929 }
19930 _ACEOF
19931 if ac_fn_c_try_link "$LINENO"; then :
19932   ol_cv_h_errno_thread_specific=yes
19933 else
19934   ol_cv_h_errno_thread_specific=no
19935 fi
19936 rm -f core conftest.err conftest.$ac_objext \
19937     conftest$ac_exeext conftest.$ac_ext
19938
19939 fi
19940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
19941 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
19942
19943         if test $ol_cv_errno_thread_specific != yes ||
19944            test $ol_cv_h_errno_thread_specific != yes ; then
19945                 LIBS="$LTHREAD_LIBS $LIBS"
19946                 LTHREAD_LIBS=""
19947         fi
19948
19949 fi
19950
19951 if test $ol_link_threads = no ; then
19952         if test $ol_with_threads = yes ; then
19953                 as_fn_error "no suitable thread support" "$LINENO" 5
19954         fi
19955
19956         if test $ol_with_threads = auto ; then
19957                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
19958 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
19959                 ol_with_threads=no
19960         fi
19961
19962
19963 $as_echo "#define NO_THREADS 1" >>confdefs.h
19964
19965         LTHREAD_LIBS=""
19966         BUILD_THREAD=no
19967 else
19968         BUILD_THREAD=yes
19969 fi
19970
19971 if test $ol_link_threads != no ; then
19972
19973 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
19974
19975 fi
19976
19977 for ac_func in \
19978         ctime_r                 \
19979         gmtime_r localtime_r \
19980         gethostbyname_r gethostbyaddr_r \
19981
19982 do :
19983   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19984 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19985 eval as_val=\$$as_ac_var
19986    if test "x$as_val" = x""yes; then :
19987   cat >>confdefs.h <<_ACEOF
19988 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19989 _ACEOF
19990
19991 fi
19992 done
19993
19994
19995 if test "$ac_cv_func_ctime_r" = no ; then
19996         ol_cv_func_ctime_r_nargs=0
19997 else
19998         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of ctime_r" >&5
19999 $as_echo_n "checking number of arguments of ctime_r... " >&6; }
20000 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then :
20001   $as_echo_n "(cached) " >&6
20002 else
20003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20004 /* end confdefs.h.  */
20005 #include <time.h>
20006 int
20007 main ()
20008 {
20009 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
20010   ;
20011   return 0;
20012 }
20013 _ACEOF
20014 if ac_fn_c_try_compile "$LINENO"; then :
20015   ol_cv_func_ctime_r_nargs3=yes
20016 else
20017   ol_cv_func_ctime_r_nargs3=no
20018 fi
20019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20020
20021         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20022 /* end confdefs.h.  */
20023 #include <time.h>
20024 int
20025 main ()
20026 {
20027 time_t ti; char *buffer; ctime_r(&ti,buffer);
20028   ;
20029   return 0;
20030 }
20031 _ACEOF
20032 if ac_fn_c_try_compile "$LINENO"; then :
20033   ol_cv_func_ctime_r_nargs2=yes
20034 else
20035   ol_cv_func_ctime_r_nargs2=no
20036 fi
20037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20038
20039         if test $ol_cv_func_ctime_r_nargs3 = yes &&
20040            test $ol_cv_func_ctime_r_nargs2 = no ; then
20041
20042                 ol_cv_func_ctime_r_nargs=3
20043
20044         elif test $ol_cv_func_ctime_r_nargs3 = no &&
20045              test $ol_cv_func_ctime_r_nargs2 = yes ; then
20046
20047                 ol_cv_func_ctime_r_nargs=2
20048
20049         else
20050                 ol_cv_func_ctime_r_nargs=0
20051         fi
20052
20053 fi
20054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_ctime_r_nargs" >&5
20055 $as_echo "$ol_cv_func_ctime_r_nargs" >&6; }
20056
20057   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
20058
20059 cat >>confdefs.h <<_ACEOF
20060 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
20061 _ACEOF
20062
20063   fi
20064
20065 fi
20066
20067 if test "$ac_cv_func_gethostbyname_r" = yes ; then
20068         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyname_r" >&5
20069 $as_echo_n "checking number of arguments of gethostbyname_r... " >&6; }
20070 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then :
20071   $as_echo_n "(cached) " >&6
20072 else
20073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20074 /* end confdefs.h.  */
20075 #include <sys/types.h>
20076 #include <sys/socket.h>
20077 #include <netinet/in.h>
20078 #include <netdb.h>
20079 #define BUFSIZE (sizeof(struct hostent)+10)
20080 int
20081 main ()
20082 {
20083 struct hostent hent; char buffer[BUFSIZE];
20084                 int bufsize=BUFSIZE;int h_errno;
20085                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
20086                         buffer, bufsize, &h_errno);
20087   ;
20088   return 0;
20089 }
20090 _ACEOF
20091 if ac_fn_c_try_compile "$LINENO"; then :
20092   ol_cv_func_gethostbyname_r_nargs5=yes
20093 else
20094   ol_cv_func_gethostbyname_r_nargs5=no
20095 fi
20096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20097
20098         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20099 /* end confdefs.h.  */
20100 #include <sys/types.h>
20101 #include <sys/socket.h>
20102 #include <netinet/in.h>
20103 #include <netdb.h>
20104 #define BUFSIZE (sizeof(struct hostent)+10)
20105 int
20106 main ()
20107 {
20108 struct hostent hent;struct hostent *rhent;
20109                 char buffer[BUFSIZE];
20110                 int bufsize=BUFSIZE;int h_errno;
20111                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
20112                         &rhent, &h_errno);
20113   ;
20114   return 0;
20115 }
20116 _ACEOF
20117 if ac_fn_c_try_compile "$LINENO"; then :
20118   ol_cv_func_gethostbyname_r_nargs6=yes
20119 else
20120   ol_cv_func_gethostbyname_r_nargs6=no
20121 fi
20122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20123
20124         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
20125            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
20126
20127                 ol_cv_func_gethostbyname_r_nargs=5
20128
20129         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
20130              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
20131
20132                 ol_cv_func_gethostbyname_r_nargs=6
20133
20134         else
20135                 ol_cv_func_gethostbyname_r_nargs=0
20136         fi
20137
20138 fi
20139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyname_r_nargs" >&5
20140 $as_echo "$ol_cv_func_gethostbyname_r_nargs" >&6; }
20141   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
20142
20143 cat >>confdefs.h <<_ACEOF
20144 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
20145 _ACEOF
20146
20147   fi
20148
20149 else
20150         ol_cv_func_gethostbyname_r_nargs=0
20151 fi
20152
20153 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
20154         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyaddr_r" >&5
20155 $as_echo_n "checking number of arguments of gethostbyaddr_r... " >&6; }
20156 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then :
20157   $as_echo_n "(cached) " >&6
20158 else
20159   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20160 /* end confdefs.h.  */
20161 #include <sys/types.h>
20162 #include <sys/socket.h>
20163 #include <netinet/in.h>
20164 #include <netdb.h>
20165 #define BUFSIZE (sizeof(struct hostent)+10)
20166 int
20167 main ()
20168 {
20169 struct hostent hent; char buffer[BUFSIZE];
20170             struct in_addr add;
20171             size_t alen=sizeof(struct in_addr);
20172             int bufsize=BUFSIZE;int h_errno;
20173                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20174                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
20175   ;
20176   return 0;
20177 }
20178 _ACEOF
20179 if ac_fn_c_try_compile "$LINENO"; then :
20180   ol_cv_func_gethostbyaddr_r_nargs7=yes
20181 else
20182   ol_cv_func_gethostbyaddr_r_nargs7=no
20183 fi
20184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20185
20186         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20187 /* end confdefs.h.  */
20188 #include <sys/types.h>
20189 #include <sys/socket.h>
20190 #include <netinet/in.h>
20191 #include <netdb.h>
20192 #define BUFSIZE (sizeof(struct hostent)+10)
20193 int
20194 main ()
20195 {
20196 struct hostent hent;
20197                 struct hostent *rhent; char buffer[BUFSIZE];
20198                 struct in_addr add;
20199                 size_t alen=sizeof(struct in_addr);
20200                 int bufsize=BUFSIZE;int h_errno;
20201                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20202                         alen, AF_INET, &hent, buffer, bufsize,
20203                         &rhent, &h_errno);
20204   ;
20205   return 0;
20206 }
20207 _ACEOF
20208 if ac_fn_c_try_compile "$LINENO"; then :
20209   ol_cv_func_gethostbyaddr_r_nargs8=yes
20210 else
20211   ol_cv_func_gethostbyaddr_r_nargs8=no
20212 fi
20213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20214
20215         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
20216            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
20217
20218                 ol_cv_func_gethostbyaddr_r_nargs=7
20219
20220         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
20221              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
20222
20223                 ol_cv_func_gethostbyaddr_r_nargs=8
20224
20225         else
20226                 ol_cv_func_gethostbyaddr_r_nargs=0
20227         fi
20228
20229 fi
20230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
20231 $as_echo "$ol_cv_func_gethostbyaddr_r_nargs" >&6; }
20232   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
20233
20234 cat >>confdefs.h <<_ACEOF
20235 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
20236 _ACEOF
20237
20238   fi
20239
20240 else
20241         ol_cv_func_gethostbyaddr_r_nargs=0
20242 fi
20243
20244 ol_link_bdb=no
20245
20246 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
20247         ol_cv_berkeley_db=no
20248 for ac_header in db.h
20249 do :
20250   ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default"
20251 if test "x$ac_cv_header_db_h" = x""yes; then :
20252   cat >>confdefs.h <<_ACEOF
20253 #define HAVE_DB_H 1
20254 _ACEOF
20255
20256 fi
20257
20258 done
20259
20260 if test $ac_cv_header_db_h = yes; then
20261         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB major version in db.h" >&5
20262 $as_echo_n "checking for Berkeley DB major version in db.h... " >&6; }
20263 if test "${ol_cv_bdb_major+set}" = set; then :
20264   $as_echo_n "(cached) " >&6
20265 else
20266
20267         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20268 /* end confdefs.h.  */
20269
20270 #include <db.h>
20271 #ifndef DB_VERSION_MAJOR
20272 #       define DB_VERSION_MAJOR 1
20273 #endif
20274 __db_version DB_VERSION_MAJOR
20275
20276 _ACEOF
20277         set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
20278         ol_cv_bdb_major=${3}
20279
20280 fi
20281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_major" >&5
20282 $as_echo "$ol_cv_bdb_major" >&6; }
20283 case $ol_cv_bdb_major in [1-9]*) : ;; *)
20284         as_fn_error "Unknown Berkeley DB major version in db.h" "$LINENO" 5 ;;
20285 esac
20286
20287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB minor version in db.h" >&5
20288 $as_echo_n "checking for Berkeley DB minor version in db.h... " >&6; }
20289 if test "${ol_cv_bdb_minor+set}" = set; then :
20290   $as_echo_n "(cached) " >&6
20291 else
20292
20293         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20294 /* end confdefs.h.  */
20295
20296 #include <db.h>
20297 #ifndef DB_VERSION_MINOR
20298 #       define DB_VERSION_MINOR 0
20299 #endif
20300 __db_version DB_VERSION_MINOR
20301
20302 _ACEOF
20303         set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
20304         ol_cv_bdb_minor=${3}
20305
20306 fi
20307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_minor" >&5
20308 $as_echo "$ol_cv_bdb_minor" >&6; }
20309 case $ol_cv_bdb_minor in [0-9]*) : ;; *)
20310         as_fn_error "Unknown Berkeley DB minor version in db.h" "$LINENO" 5 ;;
20311 esac
20312
20313         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Berkeley DB version supported by BDB/HDB backends" >&5
20314 $as_echo_n "checking if Berkeley DB version supported by BDB/HDB backends... " >&6; }
20315 if test "${ol_cv_bdb_compat+set}" = set; then :
20316   $as_echo_n "(cached) " >&6
20317 else
20318
20319         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20320 /* end confdefs.h.  */
20321
20322 #include <db.h>
20323
20324  /* this check could be improved */
20325 #ifndef DB_VERSION_MAJOR
20326 #       define DB_VERSION_MAJOR 1
20327 #endif
20328 #ifndef DB_VERSION_MINOR
20329 #       define DB_VERSION_MINOR 0
20330 #endif
20331
20332 #define DB_VERSION_MM   ((DB_VERSION_MAJOR<<8)|DB_VERSION_MINOR)
20333
20334 /* require 4.4 or later */
20335 #if DB_VERSION_MM >= 0x0404
20336         __db_version_compat
20337 #endif
20338
20339 _ACEOF
20340 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20341   $EGREP "__db_version_compat" >/dev/null 2>&1; then :
20342   ol_cv_bdb_compat=yes
20343 else
20344   ol_cv_bdb_compat=no
20345 fi
20346 rm -f conftest*
20347
20348 fi
20349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_compat" >&5
20350 $as_echo "$ol_cv_bdb_compat" >&6; }
20351
20352
20353         if test $ol_cv_bdb_compat != yes ; then
20354                 as_fn_error "BerkeleyDB version incompatible with BDB/HDB backends" "$LINENO" 5
20355         fi
20356
20357         ol_cv_lib_db=no
20358
20359 if test $ol_cv_bdb_major = 5 ; then
20360         if test $ol_cv_lib_db = no ; then
20361         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)" >&5
20362 $as_echo_n "checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)... " >&6; }
20363 if test "${ol_cv_db_db_5_dot_m+set}" = set; then :
20364   $as_echo_n "(cached) " >&6
20365 else
20366
20367         ol_DB_LIB=-ldb-5.$ol_cv_bdb_minor
20368         ol_LIBS=$LIBS
20369         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20370
20371         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20372 /* end confdefs.h.  */
20373
20374 #ifdef HAVE_DB_185_H
20375 # include <db_185.h>
20376 #else
20377 # include <db.h>
20378 #endif
20379
20380 #ifndef DB_VERSION_MAJOR
20381 # define DB_VERSION_MAJOR 1
20382 #endif
20383
20384 #ifndef NULL
20385 #define NULL ((void*)0)
20386 #endif
20387
20388 int
20389 main ()
20390 {
20391
20392 #if DB_VERSION_MAJOR > 2
20393         db_env_create( NULL, 0 );
20394 #elif DB_VERSION_MAJOR > 1
20395         db_appexit( NULL );
20396 #else
20397         (void) dbopen( NULL, 0, 0, 0, NULL);
20398 #endif
20399
20400   ;
20401   return 0;
20402 }
20403 _ACEOF
20404 if ac_fn_c_try_link "$LINENO"; then :
20405   ol_cv_db_db_5_dot_m=yes
20406 else
20407   ol_cv_db_db_5_dot_m=no
20408 fi
20409 rm -f core conftest.err conftest.$ac_objext \
20410     conftest$ac_exeext conftest.$ac_ext
20411
20412         LIBS="$ol_LIBS"
20413
20414 fi
20415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_dot_m" >&5
20416 $as_echo "$ol_cv_db_db_5_dot_m" >&6; }
20417
20418         if test $ol_cv_db_db_5_dot_m = yes ; then
20419                 ol_cv_lib_db=-ldb-5.$ol_cv_bdb_minor
20420         fi
20421 fi
20422
20423         if test $ol_cv_lib_db = no ; then
20424         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)" >&5
20425 $as_echo_n "checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)... " >&6; }
20426 if test "${ol_cv_db_db5m+set}" = set; then :
20427   $as_echo_n "(cached) " >&6
20428 else
20429
20430         ol_DB_LIB=-ldb5$ol_cv_bdb_minor
20431         ol_LIBS=$LIBS
20432         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20433
20434         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20435 /* end confdefs.h.  */
20436
20437 #ifdef HAVE_DB_185_H
20438 # include <db_185.h>
20439 #else
20440 # include <db.h>
20441 #endif
20442
20443 #ifndef DB_VERSION_MAJOR
20444 # define DB_VERSION_MAJOR 1
20445 #endif
20446
20447 #ifndef NULL
20448 #define NULL ((void*)0)
20449 #endif
20450
20451 int
20452 main ()
20453 {
20454
20455 #if DB_VERSION_MAJOR > 2
20456         db_env_create( NULL, 0 );
20457 #elif DB_VERSION_MAJOR > 1
20458         db_appexit( NULL );
20459 #else
20460         (void) dbopen( NULL, 0, 0, 0, NULL);
20461 #endif
20462
20463   ;
20464   return 0;
20465 }
20466 _ACEOF
20467 if ac_fn_c_try_link "$LINENO"; then :
20468   ol_cv_db_db5m=yes
20469 else
20470   ol_cv_db_db5m=no
20471 fi
20472 rm -f core conftest.err conftest.$ac_objext \
20473     conftest$ac_exeext conftest.$ac_ext
20474
20475         LIBS="$ol_LIBS"
20476
20477 fi
20478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5m" >&5
20479 $as_echo "$ol_cv_db_db5m" >&6; }
20480
20481         if test $ol_cv_db_db5m = yes ; then
20482                 ol_cv_lib_db=-ldb5$ol_cv_bdb_minor
20483         fi
20484 fi
20485
20486         if test $ol_cv_lib_db = no ; then
20487         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)" >&5
20488 $as_echo_n "checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)... " >&6; }
20489 if test "${ol_cv_db_db_5m+set}" = set; then :
20490   $as_echo_n "(cached) " >&6
20491 else
20492
20493         ol_DB_LIB=-ldb-5$ol_cv_bdb_minor
20494         ol_LIBS=$LIBS
20495         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20496
20497         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20498 /* end confdefs.h.  */
20499
20500 #ifdef HAVE_DB_185_H
20501 # include <db_185.h>
20502 #else
20503 # include <db.h>
20504 #endif
20505
20506 #ifndef DB_VERSION_MAJOR
20507 # define DB_VERSION_MAJOR 1
20508 #endif
20509
20510 #ifndef NULL
20511 #define NULL ((void*)0)
20512 #endif
20513
20514 int
20515 main ()
20516 {
20517
20518 #if DB_VERSION_MAJOR > 2
20519         db_env_create( NULL, 0 );
20520 #elif DB_VERSION_MAJOR > 1
20521         db_appexit( NULL );
20522 #else
20523         (void) dbopen( NULL, 0, 0, 0, NULL);
20524 #endif
20525
20526   ;
20527   return 0;
20528 }
20529 _ACEOF
20530 if ac_fn_c_try_link "$LINENO"; then :
20531   ol_cv_db_db_5m=yes
20532 else
20533   ol_cv_db_db_5m=no
20534 fi
20535 rm -f core conftest.err conftest.$ac_objext \
20536     conftest$ac_exeext conftest.$ac_ext
20537
20538         LIBS="$ol_LIBS"
20539
20540 fi
20541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5m" >&5
20542 $as_echo "$ol_cv_db_db_5m" >&6; }
20543
20544         if test $ol_cv_db_db_5m = yes ; then
20545                 ol_cv_lib_db=-ldb-5$ol_cv_bdb_minor
20546         fi
20547 fi
20548
20549         if test $ol_cv_lib_db = no ; then
20550         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)" >&5
20551 $as_echo_n "checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)... " >&6; }
20552 if test "${ol_cv_db_db_5_m+set}" = set; then :
20553   $as_echo_n "(cached) " >&6
20554 else
20555
20556         ol_DB_LIB=-ldb-5-$ol_cv_bdb_minor
20557         ol_LIBS=$LIBS
20558         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20559
20560         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20561 /* end confdefs.h.  */
20562
20563 #ifdef HAVE_DB_185_H
20564 # include <db_185.h>
20565 #else
20566 # include <db.h>
20567 #endif
20568
20569 #ifndef DB_VERSION_MAJOR
20570 # define DB_VERSION_MAJOR 1
20571 #endif
20572
20573 #ifndef NULL
20574 #define NULL ((void*)0)
20575 #endif
20576
20577 int
20578 main ()
20579 {
20580
20581 #if DB_VERSION_MAJOR > 2
20582         db_env_create( NULL, 0 );
20583 #elif DB_VERSION_MAJOR > 1
20584         db_appexit( NULL );
20585 #else
20586         (void) dbopen( NULL, 0, 0, 0, NULL);
20587 #endif
20588
20589   ;
20590   return 0;
20591 }
20592 _ACEOF
20593 if ac_fn_c_try_link "$LINENO"; then :
20594   ol_cv_db_db_5_m=yes
20595 else
20596   ol_cv_db_db_5_m=no
20597 fi
20598 rm -f core conftest.err conftest.$ac_objext \
20599     conftest$ac_exeext conftest.$ac_ext
20600
20601         LIBS="$ol_LIBS"
20602
20603 fi
20604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_m" >&5
20605 $as_echo "$ol_cv_db_db_5_m" >&6; }
20606
20607         if test $ol_cv_db_db_5_m = yes ; then
20608                 ol_cv_lib_db=-ldb-5-$ol_cv_bdb_minor
20609         fi
20610 fi
20611
20612         if test $ol_cv_lib_db = no ; then
20613         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5)" >&5
20614 $as_echo_n "checking for Berkeley DB link (-ldb-5)... " >&6; }
20615 if test "${ol_cv_db_db_5+set}" = set; then :
20616   $as_echo_n "(cached) " >&6
20617 else
20618
20619         ol_DB_LIB=-ldb-5
20620         ol_LIBS=$LIBS
20621         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20622
20623         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20624 /* end confdefs.h.  */
20625
20626 #ifdef HAVE_DB_185_H
20627 # include <db_185.h>
20628 #else
20629 # include <db.h>
20630 #endif
20631
20632 #ifndef DB_VERSION_MAJOR
20633 # define DB_VERSION_MAJOR 1
20634 #endif
20635
20636 #ifndef NULL
20637 #define NULL ((void*)0)
20638 #endif
20639
20640 int
20641 main ()
20642 {
20643
20644 #if DB_VERSION_MAJOR > 2
20645         db_env_create( NULL, 0 );
20646 #elif DB_VERSION_MAJOR > 1
20647         db_appexit( NULL );
20648 #else
20649         (void) dbopen( NULL, 0, 0, 0, NULL);
20650 #endif
20651
20652   ;
20653   return 0;
20654 }
20655 _ACEOF
20656 if ac_fn_c_try_link "$LINENO"; then :
20657   ol_cv_db_db_5=yes
20658 else
20659   ol_cv_db_db_5=no
20660 fi
20661 rm -f core conftest.err conftest.$ac_objext \
20662     conftest$ac_exeext conftest.$ac_ext
20663
20664         LIBS="$ol_LIBS"
20665
20666 fi
20667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5" >&5
20668 $as_echo "$ol_cv_db_db_5" >&6; }
20669
20670         if test $ol_cv_db_db_5 = yes ; then
20671                 ol_cv_lib_db=-ldb-5
20672         fi
20673 fi
20674
20675         if test $ol_cv_lib_db = no ; then
20676         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5)" >&5
20677 $as_echo_n "checking for Berkeley DB link (-ldb5)... " >&6; }
20678 if test "${ol_cv_db_db5+set}" = set; then :
20679   $as_echo_n "(cached) " >&6
20680 else
20681
20682         ol_DB_LIB=-ldb5
20683         ol_LIBS=$LIBS
20684         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20685
20686         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20687 /* end confdefs.h.  */
20688
20689 #ifdef HAVE_DB_185_H
20690 # include <db_185.h>
20691 #else
20692 # include <db.h>
20693 #endif
20694
20695 #ifndef DB_VERSION_MAJOR
20696 # define DB_VERSION_MAJOR 1
20697 #endif
20698
20699 #ifndef NULL
20700 #define NULL ((void*)0)
20701 #endif
20702
20703 int
20704 main ()
20705 {
20706
20707 #if DB_VERSION_MAJOR > 2
20708         db_env_create( NULL, 0 );
20709 #elif DB_VERSION_MAJOR > 1
20710         db_appexit( NULL );
20711 #else
20712         (void) dbopen( NULL, 0, 0, 0, NULL);
20713 #endif
20714
20715   ;
20716   return 0;
20717 }
20718 _ACEOF
20719 if ac_fn_c_try_link "$LINENO"; then :
20720   ol_cv_db_db5=yes
20721 else
20722   ol_cv_db_db5=no
20723 fi
20724 rm -f core conftest.err conftest.$ac_objext \
20725     conftest$ac_exeext conftest.$ac_ext
20726
20727         LIBS="$ol_LIBS"
20728
20729 fi
20730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5" >&5
20731 $as_echo "$ol_cv_db_db5" >&6; }
20732
20733         if test $ol_cv_db_db5 = yes ; then
20734                 ol_cv_lib_db=-ldb5
20735         fi
20736 fi
20737
20738 elif test $ol_cv_bdb_major = 4 ; then
20739         if test $ol_cv_lib_db = no ; then
20740         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)" >&5
20741 $as_echo_n "checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)... " >&6; }
20742 if test "${ol_cv_db_db_4_dot_m+set}" = set; then :
20743   $as_echo_n "(cached) " >&6
20744 else
20745
20746         ol_DB_LIB=-ldb-4.$ol_cv_bdb_minor
20747         ol_LIBS=$LIBS
20748         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20749
20750         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20751 /* end confdefs.h.  */
20752
20753 #ifdef HAVE_DB_185_H
20754 # include <db_185.h>
20755 #else
20756 # include <db.h>
20757 #endif
20758
20759 #ifndef DB_VERSION_MAJOR
20760 # define DB_VERSION_MAJOR 1
20761 #endif
20762
20763 #ifndef NULL
20764 #define NULL ((void*)0)
20765 #endif
20766
20767 int
20768 main ()
20769 {
20770
20771 #if DB_VERSION_MAJOR > 2
20772         db_env_create( NULL, 0 );
20773 #elif DB_VERSION_MAJOR > 1
20774         db_appexit( NULL );
20775 #else
20776         (void) dbopen( NULL, 0, 0, 0, NULL);
20777 #endif
20778
20779   ;
20780   return 0;
20781 }
20782 _ACEOF
20783 if ac_fn_c_try_link "$LINENO"; then :
20784   ol_cv_db_db_4_dot_m=yes
20785 else
20786   ol_cv_db_db_4_dot_m=no
20787 fi
20788 rm -f core conftest.err conftest.$ac_objext \
20789     conftest$ac_exeext conftest.$ac_ext
20790
20791         LIBS="$ol_LIBS"
20792
20793 fi
20794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_dot_m" >&5
20795 $as_echo "$ol_cv_db_db_4_dot_m" >&6; }
20796
20797         if test $ol_cv_db_db_4_dot_m = yes ; then
20798                 ol_cv_lib_db=-ldb-4.$ol_cv_bdb_minor
20799         fi
20800 fi
20801
20802         if test $ol_cv_lib_db = no ; then
20803         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)" >&5
20804 $as_echo_n "checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)... " >&6; }
20805 if test "${ol_cv_db_db4m+set}" = set; then :
20806   $as_echo_n "(cached) " >&6
20807 else
20808
20809         ol_DB_LIB=-ldb4$ol_cv_bdb_minor
20810         ol_LIBS=$LIBS
20811         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20812
20813         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20814 /* end confdefs.h.  */
20815
20816 #ifdef HAVE_DB_185_H
20817 # include <db_185.h>
20818 #else
20819 # include <db.h>
20820 #endif
20821
20822 #ifndef DB_VERSION_MAJOR
20823 # define DB_VERSION_MAJOR 1
20824 #endif
20825
20826 #ifndef NULL
20827 #define NULL ((void*)0)
20828 #endif
20829
20830 int
20831 main ()
20832 {
20833
20834 #if DB_VERSION_MAJOR > 2
20835         db_env_create( NULL, 0 );
20836 #elif DB_VERSION_MAJOR > 1
20837         db_appexit( NULL );
20838 #else
20839         (void) dbopen( NULL, 0, 0, 0, NULL);
20840 #endif
20841
20842   ;
20843   return 0;
20844 }
20845 _ACEOF
20846 if ac_fn_c_try_link "$LINENO"; then :
20847   ol_cv_db_db4m=yes
20848 else
20849   ol_cv_db_db4m=no
20850 fi
20851 rm -f core conftest.err conftest.$ac_objext \
20852     conftest$ac_exeext conftest.$ac_ext
20853
20854         LIBS="$ol_LIBS"
20855
20856 fi
20857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4m" >&5
20858 $as_echo "$ol_cv_db_db4m" >&6; }
20859
20860         if test $ol_cv_db_db4m = yes ; then
20861                 ol_cv_lib_db=-ldb4$ol_cv_bdb_minor
20862         fi
20863 fi
20864
20865         if test $ol_cv_lib_db = no ; then
20866         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)" >&5
20867 $as_echo_n "checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)... " >&6; }
20868 if test "${ol_cv_db_db_4m+set}" = set; then :
20869   $as_echo_n "(cached) " >&6
20870 else
20871
20872         ol_DB_LIB=-ldb-4$ol_cv_bdb_minor
20873         ol_LIBS=$LIBS
20874         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20875
20876         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20877 /* end confdefs.h.  */
20878
20879 #ifdef HAVE_DB_185_H
20880 # include <db_185.h>
20881 #else
20882 # include <db.h>
20883 #endif
20884
20885 #ifndef DB_VERSION_MAJOR
20886 # define DB_VERSION_MAJOR 1
20887 #endif
20888
20889 #ifndef NULL
20890 #define NULL ((void*)0)
20891 #endif
20892
20893 int
20894 main ()
20895 {
20896
20897 #if DB_VERSION_MAJOR > 2
20898         db_env_create( NULL, 0 );
20899 #elif DB_VERSION_MAJOR > 1
20900         db_appexit( NULL );
20901 #else
20902         (void) dbopen( NULL, 0, 0, 0, NULL);
20903 #endif
20904
20905   ;
20906   return 0;
20907 }
20908 _ACEOF
20909 if ac_fn_c_try_link "$LINENO"; then :
20910   ol_cv_db_db_4m=yes
20911 else
20912   ol_cv_db_db_4m=no
20913 fi
20914 rm -f core conftest.err conftest.$ac_objext \
20915     conftest$ac_exeext conftest.$ac_ext
20916
20917         LIBS="$ol_LIBS"
20918
20919 fi
20920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4m" >&5
20921 $as_echo "$ol_cv_db_db_4m" >&6; }
20922
20923         if test $ol_cv_db_db_4m = yes ; then
20924                 ol_cv_lib_db=-ldb-4$ol_cv_bdb_minor
20925         fi
20926 fi
20927
20928         if test $ol_cv_lib_db = no ; then
20929         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)" >&5
20930 $as_echo_n "checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)... " >&6; }
20931 if test "${ol_cv_db_db_4_m+set}" = set; then :
20932   $as_echo_n "(cached) " >&6
20933 else
20934
20935         ol_DB_LIB=-ldb-4-$ol_cv_bdb_minor
20936         ol_LIBS=$LIBS
20937         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20938
20939         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20940 /* end confdefs.h.  */
20941
20942 #ifdef HAVE_DB_185_H
20943 # include <db_185.h>
20944 #else
20945 # include <db.h>
20946 #endif
20947
20948 #ifndef DB_VERSION_MAJOR
20949 # define DB_VERSION_MAJOR 1
20950 #endif
20951
20952 #ifndef NULL
20953 #define NULL ((void*)0)
20954 #endif
20955
20956 int
20957 main ()
20958 {
20959
20960 #if DB_VERSION_MAJOR > 2
20961         db_env_create( NULL, 0 );
20962 #elif DB_VERSION_MAJOR > 1
20963         db_appexit( NULL );
20964 #else
20965         (void) dbopen( NULL, 0, 0, 0, NULL);
20966 #endif
20967
20968   ;
20969   return 0;
20970 }
20971 _ACEOF
20972 if ac_fn_c_try_link "$LINENO"; then :
20973   ol_cv_db_db_4_m=yes
20974 else
20975   ol_cv_db_db_4_m=no
20976 fi
20977 rm -f core conftest.err conftest.$ac_objext \
20978     conftest$ac_exeext conftest.$ac_ext
20979
20980         LIBS="$ol_LIBS"
20981
20982 fi
20983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_m" >&5
20984 $as_echo "$ol_cv_db_db_4_m" >&6; }
20985
20986         if test $ol_cv_db_db_4_m = yes ; then
20987                 ol_cv_lib_db=-ldb-4-$ol_cv_bdb_minor
20988         fi
20989 fi
20990
20991         if test $ol_cv_lib_db = no ; then
20992         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4)" >&5
20993 $as_echo_n "checking for Berkeley DB link (-ldb-4)... " >&6; }
20994 if test "${ol_cv_db_db_4+set}" = set; then :
20995   $as_echo_n "(cached) " >&6
20996 else
20997
20998         ol_DB_LIB=-ldb-4
20999         ol_LIBS=$LIBS
21000         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21001
21002         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21003 /* end confdefs.h.  */
21004
21005 #ifdef HAVE_DB_185_H
21006 # include <db_185.h>
21007 #else
21008 # include <db.h>
21009 #endif
21010
21011 #ifndef DB_VERSION_MAJOR
21012 # define DB_VERSION_MAJOR 1
21013 #endif
21014
21015 #ifndef NULL
21016 #define NULL ((void*)0)
21017 #endif
21018
21019 int
21020 main ()
21021 {
21022
21023 #if DB_VERSION_MAJOR > 2
21024         db_env_create( NULL, 0 );
21025 #elif DB_VERSION_MAJOR > 1
21026         db_appexit( NULL );
21027 #else
21028         (void) dbopen( NULL, 0, 0, 0, NULL);
21029 #endif
21030
21031   ;
21032   return 0;
21033 }
21034 _ACEOF
21035 if ac_fn_c_try_link "$LINENO"; then :
21036   ol_cv_db_db_4=yes
21037 else
21038   ol_cv_db_db_4=no
21039 fi
21040 rm -f core conftest.err conftest.$ac_objext \
21041     conftest$ac_exeext conftest.$ac_ext
21042
21043         LIBS="$ol_LIBS"
21044
21045 fi
21046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4" >&5
21047 $as_echo "$ol_cv_db_db_4" >&6; }
21048
21049         if test $ol_cv_db_db_4 = yes ; then
21050                 ol_cv_lib_db=-ldb-4
21051         fi
21052 fi
21053
21054         if test $ol_cv_lib_db = no ; then
21055         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4)" >&5
21056 $as_echo_n "checking for Berkeley DB link (-ldb4)... " >&6; }
21057 if test "${ol_cv_db_db4+set}" = set; then :
21058   $as_echo_n "(cached) " >&6
21059 else
21060
21061         ol_DB_LIB=-ldb4
21062         ol_LIBS=$LIBS
21063         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21064
21065         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21066 /* end confdefs.h.  */
21067
21068 #ifdef HAVE_DB_185_H
21069 # include <db_185.h>
21070 #else
21071 # include <db.h>
21072 #endif
21073
21074 #ifndef DB_VERSION_MAJOR
21075 # define DB_VERSION_MAJOR 1
21076 #endif
21077
21078 #ifndef NULL
21079 #define NULL ((void*)0)
21080 #endif
21081
21082 int
21083 main ()
21084 {
21085
21086 #if DB_VERSION_MAJOR > 2
21087         db_env_create( NULL, 0 );
21088 #elif DB_VERSION_MAJOR > 1
21089         db_appexit( NULL );
21090 #else
21091         (void) dbopen( NULL, 0, 0, 0, NULL);
21092 #endif
21093
21094   ;
21095   return 0;
21096 }
21097 _ACEOF
21098 if ac_fn_c_try_link "$LINENO"; then :
21099   ol_cv_db_db4=yes
21100 else
21101   ol_cv_db_db4=no
21102 fi
21103 rm -f core conftest.err conftest.$ac_objext \
21104     conftest$ac_exeext conftest.$ac_ext
21105
21106         LIBS="$ol_LIBS"
21107
21108 fi
21109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4" >&5
21110 $as_echo "$ol_cv_db_db4" >&6; }
21111
21112         if test $ol_cv_db_db4 = yes ; then
21113                 ol_cv_lib_db=-ldb4
21114         fi
21115 fi
21116
21117 fi
21118 if test $ol_cv_lib_db = no ; then
21119         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb)" >&5
21120 $as_echo_n "checking for Berkeley DB link (-ldb)... " >&6; }
21121 if test "${ol_cv_db_db+set}" = set; then :
21122   $as_echo_n "(cached) " >&6
21123 else
21124
21125         ol_DB_LIB=-ldb
21126         ol_LIBS=$LIBS
21127         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21128
21129         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21130 /* end confdefs.h.  */
21131
21132 #ifdef HAVE_DB_185_H
21133 # include <db_185.h>
21134 #else
21135 # include <db.h>
21136 #endif
21137
21138 #ifndef DB_VERSION_MAJOR
21139 # define DB_VERSION_MAJOR 1
21140 #endif
21141
21142 #ifndef NULL
21143 #define NULL ((void*)0)
21144 #endif
21145
21146 int
21147 main ()
21148 {
21149
21150 #if DB_VERSION_MAJOR > 2
21151         db_env_create( NULL, 0 );
21152 #elif DB_VERSION_MAJOR > 1
21153         db_appexit( NULL );
21154 #else
21155         (void) dbopen( NULL, 0, 0, 0, NULL);
21156 #endif
21157
21158   ;
21159   return 0;
21160 }
21161 _ACEOF
21162 if ac_fn_c_try_link "$LINENO"; then :
21163   ol_cv_db_db=yes
21164 else
21165   ol_cv_db_db=no
21166 fi
21167 rm -f core conftest.err conftest.$ac_objext \
21168     conftest$ac_exeext conftest.$ac_ext
21169
21170         LIBS="$ol_LIBS"
21171
21172 fi
21173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db" >&5
21174 $as_echo "$ol_cv_db_db" >&6; }
21175
21176         if test $ol_cv_db_db = yes ; then
21177                 ol_cv_lib_db=-ldb
21178         fi
21179 fi
21180
21181 if test $ol_cv_lib_db = no ; then
21182         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (default)" >&5
21183 $as_echo_n "checking for Berkeley DB link (default)... " >&6; }
21184 if test "${ol_cv_db_none+set}" = set; then :
21185   $as_echo_n "(cached) " >&6
21186 else
21187
21188         ol_DB_LIB=
21189         ol_LIBS=$LIBS
21190         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21191
21192         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21193 /* end confdefs.h.  */
21194
21195 #ifdef HAVE_DB_185_H
21196 # include <db_185.h>
21197 #else
21198 # include <db.h>
21199 #endif
21200
21201 #ifndef DB_VERSION_MAJOR
21202 # define DB_VERSION_MAJOR 1
21203 #endif
21204
21205 #ifndef NULL
21206 #define NULL ((void*)0)
21207 #endif
21208
21209 int
21210 main ()
21211 {
21212
21213 #if DB_VERSION_MAJOR > 2
21214         db_env_create( NULL, 0 );
21215 #elif DB_VERSION_MAJOR > 1
21216         db_appexit( NULL );
21217 #else
21218         (void) dbopen( NULL, 0, 0, 0, NULL);
21219 #endif
21220
21221   ;
21222   return 0;
21223 }
21224 _ACEOF
21225 if ac_fn_c_try_link "$LINENO"; then :
21226   ol_cv_db_none=yes
21227 else
21228   ol_cv_db_none=no
21229 fi
21230 rm -f core conftest.err conftest.$ac_objext \
21231     conftest$ac_exeext conftest.$ac_ext
21232
21233         LIBS="$ol_LIBS"
21234
21235 fi
21236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_none" >&5
21237 $as_echo "$ol_cv_db_none" >&6; }
21238
21239         if test $ol_cv_db_none = yes ; then
21240                 ol_cv_lib_db=yes
21241         fi
21242 fi
21243
21244
21245         if test "$ol_cv_lib_db" != no ; then
21246                 ol_cv_berkeley_db=yes
21247                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB library and header version match" >&5
21248 $as_echo_n "checking for Berkeley DB library and header version match... " >&6; }
21249 if test "${ol_cv_berkeley_db_version+set}" = set; then :
21250   $as_echo_n "(cached) " >&6
21251 else
21252
21253         ol_LIBS="$LIBS"
21254         LIBS="$LTHREAD_LIBS $LIBS"
21255         if test $ol_cv_lib_db != yes ; then
21256                 LIBS="$ol_cv_lib_db $LIBS"
21257         fi
21258
21259         if test "$cross_compiling" = yes; then :
21260   ol_cv_berkeley_db_version=cross
21261 else
21262   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21263 /* end confdefs.h.  */
21264
21265 #ifdef HAVE_DB_185_H
21266         choke me;
21267 #else
21268 #include <db.h>
21269 #endif
21270 #ifndef DB_VERSION_MAJOR
21271 # define DB_VERSION_MAJOR 1
21272 #endif
21273 #ifndef NULL
21274 #define NULL ((void *)0)
21275 #endif
21276 main()
21277 {
21278 #if DB_VERSION_MAJOR > 1
21279         char *version;
21280         int major, minor, patch;
21281
21282         version = db_version( &major, &minor, &patch );
21283
21284         if( major != DB_VERSION_MAJOR ||
21285                 minor != DB_VERSION_MINOR ||
21286                 patch != DB_VERSION_PATCH )
21287         {
21288                 printf("Berkeley DB version mismatch\n"
21289                         "\theader: %s\n\tlibrary: %s\n",
21290                         DB_VERSION_STRING, version);
21291                 return 1;
21292         }
21293 #endif
21294
21295         return 0;
21296 }
21297 _ACEOF
21298 if ac_fn_c_try_run "$LINENO"; then :
21299   ol_cv_berkeley_db_version=yes
21300 else
21301   ol_cv_berkeley_db_version=no
21302 fi
21303 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21304   conftest.$ac_objext conftest.beam conftest.$ac_ext
21305 fi
21306
21307
21308         LIBS="$ol_LIBS"
21309
21310 fi
21311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_version" >&5
21312 $as_echo "$ol_cv_berkeley_db_version" >&6; }
21313
21314         if test $ol_cv_berkeley_db_version = no ; then
21315                 as_fn_error "Berkeley DB version mismatch" "$LINENO" 5
21316         fi
21317
21318                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB thread support" >&5
21319 $as_echo_n "checking for Berkeley DB thread support... " >&6; }
21320 if test "${ol_cv_berkeley_db_thread+set}" = set; then :
21321   $as_echo_n "(cached) " >&6
21322 else
21323
21324         ol_LIBS="$LIBS"
21325         LIBS="$LTHREAD_LIBS $LIBS"
21326         if test $ol_cv_lib_db != yes ; then
21327                 LIBS="$ol_cv_lib_db $LIBS"
21328         fi
21329
21330         if test "$cross_compiling" = yes; then :
21331   ol_cv_berkeley_db_thread=cross
21332 else
21333   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21334 /* end confdefs.h.  */
21335
21336 #ifdef HAVE_DB_185_H
21337         choke me;
21338 #else
21339 #include <db.h>
21340 #endif
21341 #ifndef NULL
21342 #define NULL ((void *)0)
21343 #endif
21344 main()
21345 {
21346         int rc;
21347         u_int32_t flags = DB_CREATE |
21348 #ifdef DB_PRIVATE
21349                 DB_PRIVATE |
21350 #endif
21351                 DB_THREAD;
21352
21353 #if DB_VERSION_MAJOR > 2
21354         DB_ENV *env = NULL;
21355
21356         rc = db_env_create( &env, 0 );
21357
21358         flags |= DB_INIT_MPOOL;
21359 #ifdef DB_MPOOL_PRIVATE
21360         flags |= DB_MPOOL_PRIVATE;
21361 #endif
21362
21363         if( rc ) {
21364                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21365                 return rc;
21366         }
21367
21368 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
21369         rc = (env->open)( env, NULL, flags, 0 );
21370 #else
21371         rc = (env->open)( env, NULL, NULL, flags, 0 );
21372 #endif
21373
21374         if ( rc == 0 ) {
21375                 rc = env->close( env, 0 );
21376         }
21377
21378         if( rc ) {
21379                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21380                 return rc;
21381         }
21382
21383 #else
21384         DB_ENV env;
21385         memset( &env, '\0', sizeof(env) );
21386
21387         rc = db_appinit( NULL, NULL, &env, flags );
21388
21389         if( rc == 0 ) {
21390                 db_appexit( &env );
21391         }
21392
21393         unlink("__db_mpool.share");
21394         unlink("__db_lock.share");
21395 #endif
21396
21397         return rc;
21398 }
21399 _ACEOF
21400 if ac_fn_c_try_run "$LINENO"; then :
21401   ol_cv_berkeley_db_thread=yes
21402 else
21403   ol_cv_berkeley_db_thread=no
21404 fi
21405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21406   conftest.$ac_objext conftest.beam conftest.$ac_ext
21407 fi
21408
21409
21410         LIBS="$ol_LIBS"
21411
21412 fi
21413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_thread" >&5
21414 $as_echo "$ol_cv_berkeley_db_thread" >&6; }
21415
21416         if test $ol_cv_berkeley_db_thread != no ; then
21417
21418 $as_echo "#define HAVE_BERKELEY_DB_THREAD 1" >>confdefs.h
21419
21420         fi
21421
21422         fi
21423 fi
21424
21425
21426         if test $ol_cv_berkeley_db = no ; then
21427                 as_fn_error "BDB/HDB: BerkeleyDB not available" "$LINENO" 5
21428         fi
21429
21430
21431 $as_echo "#define HAVE_BERKELEY_DB 1" >>confdefs.h
21432
21433
21434                         if test $ol_cv_lib_db != yes ; then
21435                 BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
21436         fi
21437
21438         SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
21439
21440         ol_link_bdb=yes
21441 fi
21442
21443
21444 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
21445         BUILD_LIBS_DYNAMIC=shared
21446
21447 $as_echo "#define LDAP_LIBS_DYNAMIC 1" >>confdefs.h
21448
21449         LTSTATIC=""
21450 else
21451         BUILD_LIBS_DYNAMIC=static
21452         LTSTATIC="-static"
21453 fi
21454
21455 if test $ol_enable_wrappers != no ; then
21456         for ac_header in tcpd.h
21457 do :
21458   ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
21459 if test "x$ac_cv_header_tcpd_h" = x""yes; then :
21460   cat >>confdefs.h <<_ACEOF
21461 #define HAVE_TCPD_H 1
21462 _ACEOF
21463
21464                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library" >&5
21465 $as_echo_n "checking for TCP wrappers library... " >&6; }
21466                 save_LIBS="$LIBS"
21467                 LIBS="$LIBS -lwrap"
21468                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21469 /* end confdefs.h.  */
21470
21471 #include <tcpd.h>
21472 int allow_severity = 0;
21473 int deny_severity  = 0;
21474
21475 struct request_info *req;
21476
21477 int
21478 main ()
21479 {
21480
21481 hosts_access(req)
21482
21483   ;
21484   return 0;
21485 }
21486 _ACEOF
21487 if ac_fn_c_try_link "$LINENO"; then :
21488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap" >&5
21489 $as_echo "-lwrap" >&6; }
21490                 have_wrappers=yes
21491                 LIBS="$save_LIBS"
21492 else
21493
21494                                 LIBS="$LIBS -lnsl"
21495                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21496 /* end confdefs.h.  */
21497
21498 #include <tcpd.h>
21499 int allow_severity = 0;
21500 int deny_severity  = 0;
21501
21502 struct request_info *req;
21503
21504 int
21505 main ()
21506 {
21507
21508 hosts_access(req)
21509
21510   ;
21511   return 0;
21512 }
21513 _ACEOF
21514 if ac_fn_c_try_link "$LINENO"; then :
21515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap -lnsl" >&5
21516 $as_echo "-lwrap -lnsl" >&6; }
21517                 have_wrappers=yes
21518                 LIBS="$save_LIBS -lnsl"
21519 else
21520
21521                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21522 $as_echo "no" >&6; }
21523                 have_wrappers=no
21524                 LIBS=$save_LIBS
21525 fi
21526 rm -f core conftest.err conftest.$ac_objext \
21527     conftest$ac_exeext conftest.$ac_ext
21528 fi
21529 rm -f core conftest.err conftest.$ac_objext \
21530     conftest$ac_exeext conftest.$ac_ext
21531 else
21532   have_wrappers=no
21533 fi
21534
21535 done
21536
21537
21538         if test $have_wrappers = yes ; then
21539
21540 $as_echo "#define HAVE_TCPD 1" >>confdefs.h
21541
21542                 WRAP_LIBS="-lwrap"
21543         elif test $ol_enable_wrappers = yes ; then
21544                 as_fn_error "could not find TCP wrappers, select apppropriate options or disable" "$LINENO" 5
21545         else
21546                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find TCP wrappers, support disabled" >&5
21547 $as_echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
21548                 WRAP_LIBS=""
21549         fi
21550 fi
21551
21552 if test $ol_enable_syslog != no ; then
21553         ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
21554 if test "x$ac_cv_func_openlog" = x""yes; then :
21555
21556 fi
21557
21558         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
21559                 { as_fn_set_status select appropriate options or disable
21560 as_fn_error "could not find syslog" "$LINENO" 5; }
21561         fi
21562         ol_enable_syslog=$ac_cv_func_openlog
21563 fi
21564
21565 ol_link_sql=no
21566 if test $ol_enable_sql != no ; then
21567         for ac_header in sql.h sqlext.h
21568 do :
21569   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21570 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21571 eval as_val=\$$as_ac_Header
21572    if test "x$as_val" = x""yes; then :
21573   cat >>confdefs.h <<_ACEOF
21574 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21575 _ACEOF
21576
21577 else
21578
21579                 as_fn_error "could not locate SQL headers" "$LINENO" 5
21580
21581 fi
21582
21583 done
21584
21585
21586         sql_LIBS="$LIBS"
21587         LIBS="$LTHREAD_LIBS"
21588
21589         if test $ol_with_odbc = auto ; then
21590                 ol_with_odbc="iodbc unixodbc odbc32"
21591         fi
21592
21593         for odbc in $ol_with_odbc ; do
21594                 if test $ol_link_sql = no ; then
21595                         case $odbc in
21596                         iodbc)
21597                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -liodbc" >&5
21598 $as_echo_n "checking for SQLDriverConnect in -liodbc... " >&6; }
21599 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then :
21600   $as_echo_n "(cached) " >&6
21601 else
21602   ac_check_lib_save_LIBS=$LIBS
21603 LIBS="-liodbc  $LIBS"
21604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21605 /* end confdefs.h.  */
21606
21607 /* Override any GCC internal prototype to avoid an error.
21608    Use char because int might match the return type of a GCC
21609    builtin and then its argument prototype would still apply.  */
21610 #ifdef __cplusplus
21611 extern "C"
21612 #endif
21613 char SQLDriverConnect ();
21614 int
21615 main ()
21616 {
21617 return SQLDriverConnect ();
21618   ;
21619   return 0;
21620 }
21621 _ACEOF
21622 if ac_fn_c_try_link "$LINENO"; then :
21623   ac_cv_lib_iodbc_SQLDriverConnect=yes
21624 else
21625   ac_cv_lib_iodbc_SQLDriverConnect=no
21626 fi
21627 rm -f core conftest.err conftest.$ac_objext \
21628     conftest$ac_exeext conftest.$ac_ext
21629 LIBS=$ac_check_lib_save_LIBS
21630 fi
21631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
21632 $as_echo "$ac_cv_lib_iodbc_SQLDriverConnect" >&6; }
21633 if test "x$ac_cv_lib_iodbc_SQLDriverConnect" = x""yes; then :
21634   have_iodbc=yes
21635 else
21636   have_iodbc=no
21637 fi
21638
21639                                 if test $have_iodbc = yes ; then
21640                                         ol_link_sql="-liodbc"
21641                                 fi
21642                                 ;;
21643
21644                         unixodbc)
21645                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc" >&5
21646 $as_echo_n "checking for SQLDriverConnect in -lodbc... " >&6; }
21647 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then :
21648   $as_echo_n "(cached) " >&6
21649 else
21650   ac_check_lib_save_LIBS=$LIBS
21651 LIBS="-lodbc  $LIBS"
21652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21653 /* end confdefs.h.  */
21654
21655 /* Override any GCC internal prototype to avoid an error.
21656    Use char because int might match the return type of a GCC
21657    builtin and then its argument prototype would still apply.  */
21658 #ifdef __cplusplus
21659 extern "C"
21660 #endif
21661 char SQLDriverConnect ();
21662 int
21663 main ()
21664 {
21665 return SQLDriverConnect ();
21666   ;
21667   return 0;
21668 }
21669 _ACEOF
21670 if ac_fn_c_try_link "$LINENO"; then :
21671   ac_cv_lib_odbc_SQLDriverConnect=yes
21672 else
21673   ac_cv_lib_odbc_SQLDriverConnect=no
21674 fi
21675 rm -f core conftest.err conftest.$ac_objext \
21676     conftest$ac_exeext conftest.$ac_ext
21677 LIBS=$ac_check_lib_save_LIBS
21678 fi
21679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
21680 $as_echo "$ac_cv_lib_odbc_SQLDriverConnect" >&6; }
21681 if test "x$ac_cv_lib_odbc_SQLDriverConnect" = x""yes; then :
21682   have_odbc=yes
21683 else
21684   have_odbc=no
21685 fi
21686
21687                                 if test $have_odbc = yes ; then
21688                                         ol_link_sql="-lodbc"
21689                                 fi
21690                                 ;;
21691
21692                         odbc32)
21693                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32" >&5
21694 $as_echo_n "checking for SQLDriverConnect in -lodbc32... " >&6; }
21695 if test "${ac_cv_lib_odbc32_SQLDriverConnect+set}" = set; then :
21696   $as_echo_n "(cached) " >&6
21697 else
21698   ac_check_lib_save_LIBS=$LIBS
21699 LIBS="-lodbc32  $LIBS"
21700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21701 /* end confdefs.h.  */
21702
21703 /* Override any GCC internal prototype to avoid an error.
21704    Use char because int might match the return type of a GCC
21705    builtin and then its argument prototype would still apply.  */
21706 #ifdef __cplusplus
21707 extern "C"
21708 #endif
21709 char SQLDriverConnect ();
21710 int
21711 main ()
21712 {
21713 return SQLDriverConnect ();
21714   ;
21715   return 0;
21716 }
21717 _ACEOF
21718 if ac_fn_c_try_link "$LINENO"; then :
21719   ac_cv_lib_odbc32_SQLDriverConnect=yes
21720 else
21721   ac_cv_lib_odbc32_SQLDriverConnect=no
21722 fi
21723 rm -f core conftest.err conftest.$ac_objext \
21724     conftest$ac_exeext conftest.$ac_ext
21725 LIBS=$ac_check_lib_save_LIBS
21726 fi
21727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_SQLDriverConnect" >&5
21728 $as_echo "$ac_cv_lib_odbc32_SQLDriverConnect" >&6; }
21729 if test "x$ac_cv_lib_odbc32_SQLDriverConnect" = x""yes; then :
21730   have_odbc32=yes
21731 else
21732   have_odbc32=no
21733 fi
21734
21735
21736                                                                 if test $have_odbc32 = no ; then
21737                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32 with windows.h" >&5
21738 $as_echo_n "checking for SQLDriverConnect in -lodbc32 with windows.h... " >&6; }
21739                                         save_LIBS="$LIBS"
21740                                         LIBS="$LIBS -lodbc32"
21741                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21742 /* end confdefs.h.  */
21743 #include <windows.h>
21744                                         #include <sqlext.h>
21745
21746 int
21747 main ()
21748 {
21749
21750                                                 SQLDriverConnect(NULL,NULL,NULL,0,NULL,0,NULL,0);
21751
21752   ;
21753   return 0;
21754 }
21755 _ACEOF
21756 if ac_fn_c_try_link "$LINENO"; then :
21757   have_odbc32=yes
21758 else
21759   have_odbc32=no
21760 fi
21761 rm -f core conftest.err conftest.$ac_objext \
21762     conftest$ac_exeext conftest.$ac_ext
21763                                         LIBS="$save_LIBS"
21764                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_odbc32" >&5
21765 $as_echo "$have_odbc32" >&6; }
21766                                 fi
21767
21768                                 if test $have_odbc32 = yes ; then
21769                                         ol_link_sql="-lodbc32"
21770                                 fi
21771                                 ;;
21772
21773                         *)
21774                                 as_fn_error "unknown ODBC library" "$LINENO" 5
21775                                 ;;
21776                         esac
21777                 fi
21778         done
21779
21780         LIBS="$sql_LIBS"
21781
21782         if test $ol_link_sql != no ; then
21783                 SLAPD_SQL_LIBS="$ol_link_sql"
21784
21785         elif test $ol_enable_sql != auto ; then
21786                 as_fn_error "could not locate suitable ODBC library" "$LINENO" 5
21787         fi
21788 fi
21789
21790 ol_link_ndb=no
21791 if test $ol_enable_ndb != no ; then
21792         # Extract the first word of "mysql_config", so it can be a program name with args.
21793 set dummy mysql_config; ac_word=$2
21794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21795 $as_echo_n "checking for $ac_word... " >&6; }
21796 if test "${ac_cv_prog_MYSQL+set}" = set; then :
21797   $as_echo_n "(cached) " >&6
21798 else
21799   if test -n "$MYSQL"; then
21800   ac_cv_prog_MYSQL="$MYSQL" # Let the user override the test.
21801 else
21802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21803 for as_dir in $PATH
21804 do
21805   IFS=$as_save_IFS
21806   test -z "$as_dir" && as_dir=.
21807     for ac_exec_ext in '' $ac_executable_extensions; do
21808   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21809     ac_cv_prog_MYSQL="yes"
21810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21811     break 2
21812   fi
21813 done
21814   done
21815 IFS=$as_save_IFS
21816
21817 fi
21818 fi
21819 MYSQL=$ac_cv_prog_MYSQL
21820 if test -n "$MYSQL"; then
21821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL" >&5
21822 $as_echo "$MYSQL" >&6; }
21823 else
21824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21825 $as_echo "no" >&6; }
21826 fi
21827
21828
21829         if test "$MYSQL" != yes ; then
21830                 as_fn_error "could not locate mysql_config" "$LINENO" 5
21831         fi
21832
21833         SQL_INC=`mysql_config --include`
21834         SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi"
21835
21836         save_CPPFLAGS="$CPPFLAGS"
21837         CPPFLAGS="$SLAPD_NDB_INCS"
21838         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NdbApi.hpp" >&5
21839 $as_echo_n "checking for NdbApi.hpp... " >&6; }
21840         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21841 /* end confdefs.h.  */
21842 #include <NdbApi.hpp>
21843 _ACEOF
21844 if ac_fn_c_try_cpp "$LINENO"; then :
21845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21846 $as_echo "yes" >&6; }
21847 else
21848   as_fn_error "could not locate NdbApi headers" "$LINENO" 5
21849
21850 fi
21851 rm -f conftest.err conftest.$ac_ext
21852         CPPFLAGS="$save_CPPFLAGS"
21853
21854         SQL_LIB=`mysql_config --libs_r`
21855         SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++"
21856
21857         save_LDFLAGS="$LDFLAGS"
21858         save_LIBS="$LIBS"
21859         LDFLAGS="$SQL_LIB"
21860         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ndb_init in -lndbclient" >&5
21861 $as_echo_n "checking for ndb_init in -lndbclient... " >&6; }
21862 if test "${ac_cv_lib_ndbclient_ndb_init+set}" = set; then :
21863   $as_echo_n "(cached) " >&6
21864 else
21865   ac_check_lib_save_LIBS=$LIBS
21866 LIBS="-lndbclient -lstdc++ $LIBS"
21867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21868 /* end confdefs.h.  */
21869
21870 /* Override any GCC internal prototype to avoid an error.
21871    Use char because int might match the return type of a GCC
21872    builtin and then its argument prototype would still apply.  */
21873 #ifdef __cplusplus
21874 extern "C"
21875 #endif
21876 char ndb_init ();
21877 int
21878 main ()
21879 {
21880 return ndb_init ();
21881   ;
21882   return 0;
21883 }
21884 _ACEOF
21885 if ac_fn_c_try_link "$LINENO"; then :
21886   ac_cv_lib_ndbclient_ndb_init=yes
21887 else
21888   ac_cv_lib_ndbclient_ndb_init=no
21889 fi
21890 rm -f core conftest.err conftest.$ac_objext \
21891     conftest$ac_exeext conftest.$ac_ext
21892 LIBS=$ac_check_lib_save_LIBS
21893 fi
21894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbclient_ndb_init" >&5
21895 $as_echo "$ac_cv_lib_ndbclient_ndb_init" >&6; }
21896 if test "x$ac_cv_lib_ndbclient_ndb_init" = x""yes; then :
21897   : ok
21898 else
21899
21900                 as_fn_error "could not locate ndbclient library" "$LINENO" 5
21901
21902 fi
21903
21904         LIBS="$save_LIBS"
21905         LDFLAGS="$save_LDFLAGS"
21906
21907         if test "$ol_enable_ndb" = yes ; then
21908                 SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
21909         fi
21910 fi
21911
21912 ol_icu=no
21913 for ac_header in unicode/utypes.h
21914 do :
21915   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21916 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21917 eval as_val=\$$as_ac_Header
21918    if test "x$as_val" = x""yes; then :
21919   cat >>confdefs.h <<_ACEOF
21920 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21921 _ACEOF
21922
21923 fi
21924
21925 done
21926
21927 if test $ac_cv_header_unicode_utypes_h = yes ; then
21928                 OL_ICULIBS="-licuuc -licudata"
21929
21930         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU libraries" >&5
21931 $as_echo_n "checking for ICU libraries... " >&6; }
21932 if test "${ol_cv_lib_icu+set}" = set; then :
21933   $as_echo_n "(cached) " >&6
21934 else
21935
21936                 ol_LIBS="$LIBS"
21937                 LIBS="$OL_ICULIBS $LIBS"
21938                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21939 /* end confdefs.h.  */
21940
21941 #include <unicode/utypes.h>
21942
21943 int
21944 main ()
21945 {
21946
21947 (void) u_errorName(0);
21948
21949   ;
21950   return 0;
21951 }
21952 _ACEOF
21953 if ac_fn_c_try_link "$LINENO"; then :
21954   ol_cv_lib_icu=yes
21955 else
21956   ol_cv_lib_icu=no
21957 fi
21958 rm -f core conftest.err conftest.$ac_objext \
21959     conftest$ac_exeext conftest.$ac_ext
21960                 LIBS="$ol_LIBS"
21961
21962 fi
21963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_icu" >&5
21964 $as_echo "$ol_cv_lib_icu" >&6; }
21965
21966         if test $ol_cv_lib_icu != no ; then
21967                 ol_icu="$OL_ICULIBS"
21968
21969 $as_echo "#define HAVE_ICU 1" >>confdefs.h
21970
21971         fi
21972 fi
21973
21974 if test "$ol_icu" = no ; then
21975         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ICU not available" >&5
21976 $as_echo "$as_me: WARNING: ICU not available" >&2;}
21977 else
21978         ICU_LIBS="$ol_icu"
21979 fi
21980 WITH_SASL=no
21981 ol_link_sasl=no
21982 ol_link_spasswd=no
21983 if test $ol_with_cyrus_sasl != no ; then
21984         for ac_header in sasl/sasl.h sasl.h
21985 do :
21986   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21987 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21988 eval as_val=\$$as_ac_Header
21989    if test "x$as_val" = x""yes; then :
21990   cat >>confdefs.h <<_ACEOF
21991 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21992 _ACEOF
21993
21994 fi
21995
21996 done
21997
21998
21999         if test $ac_cv_header_sasl_sasl_h = yes ||
22000            test $ac_cv_header_sasl_h = yes; then
22001                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
22002 $as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
22003 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then :
22004   $as_echo_n "(cached) " >&6
22005 else
22006   ac_check_lib_save_LIBS=$LIBS
22007 LIBS="-lsasl2  $LIBS"
22008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22009 /* end confdefs.h.  */
22010
22011 /* Override any GCC internal prototype to avoid an error.
22012    Use char because int might match the return type of a GCC
22013    builtin and then its argument prototype would still apply.  */
22014 #ifdef __cplusplus
22015 extern "C"
22016 #endif
22017 char sasl_client_init ();
22018 int
22019 main ()
22020 {
22021 return sasl_client_init ();
22022   ;
22023   return 0;
22024 }
22025 _ACEOF
22026 if ac_fn_c_try_link "$LINENO"; then :
22027   ac_cv_lib_sasl2_sasl_client_init=yes
22028 else
22029   ac_cv_lib_sasl2_sasl_client_init=no
22030 fi
22031 rm -f core conftest.err conftest.$ac_objext \
22032     conftest$ac_exeext conftest.$ac_ext
22033 LIBS=$ac_check_lib_save_LIBS
22034 fi
22035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
22036 $as_echo "$ac_cv_lib_sasl2_sasl_client_init" >&6; }
22037 if test "x$ac_cv_lib_sasl2_sasl_client_init" = x""yes; then :
22038   ol_link_sasl="-lsasl2"
22039 else
22040   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl" >&5
22041 $as_echo_n "checking for sasl_client_init in -lsasl... " >&6; }
22042 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then :
22043   $as_echo_n "(cached) " >&6
22044 else
22045   ac_check_lib_save_LIBS=$LIBS
22046 LIBS="-lsasl  $LIBS"
22047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22048 /* end confdefs.h.  */
22049
22050 /* Override any GCC internal prototype to avoid an error.
22051    Use char because int might match the return type of a GCC
22052    builtin and then its argument prototype would still apply.  */
22053 #ifdef __cplusplus
22054 extern "C"
22055 #endif
22056 char sasl_client_init ();
22057 int
22058 main ()
22059 {
22060 return sasl_client_init ();
22061   ;
22062   return 0;
22063 }
22064 _ACEOF
22065 if ac_fn_c_try_link "$LINENO"; then :
22066   ac_cv_lib_sasl_sasl_client_init=yes
22067 else
22068   ac_cv_lib_sasl_sasl_client_init=no
22069 fi
22070 rm -f core conftest.err conftest.$ac_objext \
22071     conftest$ac_exeext conftest.$ac_ext
22072 LIBS=$ac_check_lib_save_LIBS
22073 fi
22074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl_sasl_client_init" >&5
22075 $as_echo "$ac_cv_lib_sasl_sasl_client_init" >&6; }
22076 if test "x$ac_cv_lib_sasl_sasl_client_init" = x""yes; then :
22077   ol_link_sasl="-lsasl"
22078 fi
22079
22080 fi
22081
22082         fi
22083
22084         if test $ol_link_sasl = no ; then
22085                 if test $ol_with_cyrus_sasl != auto ; then
22086                         as_fn_error "Could not locate Cyrus SASL" "$LINENO" 5
22087                 else
22088                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate Cyrus SASL" >&5
22089 $as_echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
22090                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22091 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22092                         if test $ol_link_tls = no ; then
22093                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22094 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22095                         fi
22096                 fi
22097         else
22098                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Cyrus SASL library version" >&5
22099 $as_echo_n "checking Cyrus SASL library version... " >&6; }
22100 if test "${ol_cv_sasl_compat+set}" = set; then :
22101   $as_echo_n "(cached) " >&6
22102 else
22103
22104         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22105 /* end confdefs.h.  */
22106
22107 #ifdef HAVE_SASL_SASL_H
22108 #include <sasl/sasl.h>
22109 #else
22110 #include <sasl.h>
22111 #endif
22112
22113 /* Require 2.1.15+ */
22114 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22115         char *__sasl_compat = "2.2+ or better okay (we guess)";
22116 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22117         && SASL_VERSION_STEP >=15
22118         char *__sasl_compat = "2.1.15+ or better okay";
22119 #endif
22120
22121 _ACEOF
22122 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22123   $EGREP "__sasl_compat" >/dev/null 2>&1; then :
22124   ol_cv_sasl_compat=yes
22125 else
22126   ol_cv_sasl_compat=no
22127 fi
22128 rm -f conftest*
22129
22130 fi
22131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sasl_compat" >&5
22132 $as_echo "$ol_cv_sasl_compat" >&6; }
22133
22134                 if test $ol_cv_sasl_compat = no ; then
22135                         ol_link_sasl=no
22136                         as_fn_error "Cyrus SASL library located but is incompatible" "$LINENO" 5
22137                 fi
22138
22139
22140 $as_echo "#define HAVE_CYRUS_SASL 1" >>confdefs.h
22141
22142                 SASL_LIBS="$ol_link_sasl"
22143                 if test $ol_enable_spasswd != no ; then
22144                         ol_link_spasswd=yes
22145                 fi
22146
22147                 ac_save_LIBS="$LIBS"
22148                 LIBS="$LIBS $ol_link_sasl"
22149                 ac_fn_c_check_func "$LINENO" "sasl_version" "ac_cv_func_sasl_version"
22150 if test "x$ac_cv_func_sasl_version" = x""yes; then :
22151
22152 $as_echo "#define HAVE_SASL_VERSION 1" >>confdefs.h
22153
22154 fi
22155
22156                 LIBS="$ac_save_LIBS"
22157
22158                 WITH_SASL=yes
22159         fi
22160
22161 else
22162         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22163 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22164         if test $ol_link_tls = no ; then
22165                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22166 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22167         fi
22168 fi
22169
22170 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
22171         dev=no
22172         if test -r /dev/urandom ; then
22173                 dev="/dev/urandom";
22174         elif test -r /idev/urandom ; then
22175                 dev="/idev/urandom";
22176         elif test -r /dev/srandom ; then
22177                 dev="/dev/srandom";
22178         elif test -r /dev/random ; then
22179                 dev="/dev/random";
22180         elif test -r /idev/random ; then
22181                 dev="/idev/random";
22182         fi
22183
22184         if test $dev != no ; then
22185
22186 cat >>confdefs.h <<_ACEOF
22187 #define URANDOM_DEVICE "$dev"
22188 _ACEOF
22189
22190         fi
22191 fi
22192
22193 ol_link_fetch=no
22194 if test $ol_with_fetch != no ; then
22195         ol_LIBS=$LIBS
22196 LIBS="-lfetch -lcom_err $LIBS"
22197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking fetch(3) library" >&5
22198 $as_echo_n "checking fetch(3) library... " >&6; }
22199 if test "${ol_cv_lib_fetch+set}" = set; then :
22200   $as_echo_n "(cached) " >&6
22201 else
22202
22203         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22204 /* end confdefs.h.  */
22205
22206 #ifdef HAVE_SYS_PARAM_H
22207 #include <sys/param.h>
22208 #endif
22209 #include <stdio.h>
22210 #include <fetch.h>
22211 int
22212 main ()
22213 {
22214 struct url *u = fetchParseURL("file:///");
22215   ;
22216   return 0;
22217 }
22218 _ACEOF
22219 if ac_fn_c_try_link "$LINENO"; then :
22220   ol_cv_lib_fetch=yes
22221 else
22222   ol_cv_lib_fetch=no
22223 fi
22224 rm -f core conftest.err conftest.$ac_objext \
22225     conftest$ac_exeext conftest.$ac_ext
22226 fi
22227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_fetch" >&5
22228 $as_echo "$ol_cv_lib_fetch" >&6; }
22229 LIBS=$ol_LIBS
22230 if test $ol_cv_lib_fetch != no ; then
22231         ol_link_fetch="-lfetch -lcom_err"
22232
22233 $as_echo "#define HAVE_FETCH 1" >>confdefs.h
22234
22235 fi
22236
22237
22238         if test $ol_cv_lib_fetch != no ; then
22239                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
22240                 ol_link_fetch=freebsd
22241
22242         elif test $ol_with_fetch != auto ; then
22243                 as_fn_error "no suitable API for --with-fetch=$ol_with_fetch" "$LINENO" 5
22244         fi
22245 fi
22246
22247 if test $ol_enable_crypt != no ; then
22248         save_LIBS="$LIBS"
22249         LIBS="$TLS_LIBS $LIBS"
22250
22251         ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
22252 if test "x$ac_cv_func_crypt" = x""yes; then :
22253   have_crypt=yes
22254 else
22255
22256                 LIBS="$save_LIBS"
22257                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
22258 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
22259 if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
22260   $as_echo_n "(cached) " >&6
22261 else
22262   ac_check_lib_save_LIBS=$LIBS
22263 LIBS="-lcrypt  $LIBS"
22264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22265 /* end confdefs.h.  */
22266
22267 /* Override any GCC internal prototype to avoid an error.
22268    Use char because int might match the return type of a GCC
22269    builtin and then its argument prototype would still apply.  */
22270 #ifdef __cplusplus
22271 extern "C"
22272 #endif
22273 char crypt ();
22274 int
22275 main ()
22276 {
22277 return crypt ();
22278   ;
22279   return 0;
22280 }
22281 _ACEOF
22282 if ac_fn_c_try_link "$LINENO"; then :
22283   ac_cv_lib_crypt_crypt=yes
22284 else
22285   ac_cv_lib_crypt_crypt=no
22286 fi
22287 rm -f core conftest.err conftest.$ac_objext \
22288     conftest$ac_exeext conftest.$ac_ext
22289 LIBS=$ac_check_lib_save_LIBS
22290 fi
22291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
22292 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
22293 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
22294   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22295                         have_crypt=yes
22296 else
22297   have_crypt=no
22298 fi
22299
22300 fi
22301
22302
22303         LIBS="$save_LIBS"
22304
22305         if test $have_crypt = yes ; then
22306
22307 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
22308
22309         else
22310                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find crypt" >&5
22311 $as_echo "$as_me: WARNING: could not find crypt" >&2;}
22312                 if test $ol_enable_crypt = yes ; then
22313                         as_fn_error "could not find crypt, select appropriate options or disable" "$LINENO" 5
22314                 fi
22315
22316                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling crypt support" >&5
22317 $as_echo "$as_me: WARNING: disabling crypt support" >&2;}
22318                 ol_enable_crypt=no
22319         fi
22320 fi
22321
22322 if test $ol_enable_proctitle != no ; then
22323         ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
22324 if test "x$ac_cv_func_setproctitle" = x""yes; then :
22325   have_setproctitle=yes
22326 else
22327
22328                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5
22329 $as_echo_n "checking for setproctitle in -lutil... " >&6; }
22330 if test "${ac_cv_lib_util_setproctitle+set}" = set; then :
22331   $as_echo_n "(cached) " >&6
22332 else
22333   ac_check_lib_save_LIBS=$LIBS
22334 LIBS="-lutil  $LIBS"
22335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22336 /* end confdefs.h.  */
22337
22338 /* Override any GCC internal prototype to avoid an error.
22339    Use char because int might match the return type of a GCC
22340    builtin and then its argument prototype would still apply.  */
22341 #ifdef __cplusplus
22342 extern "C"
22343 #endif
22344 char setproctitle ();
22345 int
22346 main ()
22347 {
22348 return setproctitle ();
22349   ;
22350   return 0;
22351 }
22352 _ACEOF
22353 if ac_fn_c_try_link "$LINENO"; then :
22354   ac_cv_lib_util_setproctitle=yes
22355 else
22356   ac_cv_lib_util_setproctitle=no
22357 fi
22358 rm -f core conftest.err conftest.$ac_objext \
22359     conftest$ac_exeext conftest.$ac_ext
22360 LIBS=$ac_check_lib_save_LIBS
22361 fi
22362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_setproctitle" >&5
22363 $as_echo "$ac_cv_lib_util_setproctitle" >&6; }
22364 if test "x$ac_cv_lib_util_setproctitle" = x""yes; then :
22365   have_setproctitle=yes
22366                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22367 else
22368   have_setproctitle=no
22369                         case " $LIBOBJS " in
22370   *" setproctitle.$ac_objext "* ) ;;
22371   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
22372  ;;
22373 esac
22374
22375                         LIBSRCS="$LIBSRCS setproctitle.c"
22376 fi
22377
22378 fi
22379
22380
22381         if test $have_setproctitle = yes ; then
22382
22383 $as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h
22384
22385         fi
22386 fi
22387
22388 if test $ol_enable_slp != no ; then
22389         for ac_header in slp.h
22390 do :
22391   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22392 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22393 eval as_val=\$$as_ac_Header
22394    if test "x$as_val" = x""yes; then :
22395   cat >>confdefs.h <<_ACEOF
22396 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22397 _ACEOF
22398
22399 fi
22400
22401 done
22402
22403
22404         if test $ac_cv_header_slp_h = yes ; then
22405                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLPOpen in -lslp" >&5
22406 $as_echo_n "checking for SLPOpen in -lslp... " >&6; }
22407 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then :
22408   $as_echo_n "(cached) " >&6
22409 else
22410   ac_check_lib_save_LIBS=$LIBS
22411 LIBS="-lslp  $LIBS"
22412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22413 /* end confdefs.h.  */
22414
22415 /* Override any GCC internal prototype to avoid an error.
22416    Use char because int might match the return type of a GCC
22417    builtin and then its argument prototype would still apply.  */
22418 #ifdef __cplusplus
22419 extern "C"
22420 #endif
22421 char SLPOpen ();
22422 int
22423 main ()
22424 {
22425 return SLPOpen ();
22426   ;
22427   return 0;
22428 }
22429 _ACEOF
22430 if ac_fn_c_try_link "$LINENO"; then :
22431   ac_cv_lib_slp_SLPOpen=yes
22432 else
22433   ac_cv_lib_slp_SLPOpen=no
22434 fi
22435 rm -f core conftest.err conftest.$ac_objext \
22436     conftest$ac_exeext conftest.$ac_ext
22437 LIBS=$ac_check_lib_save_LIBS
22438 fi
22439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slp_SLPOpen" >&5
22440 $as_echo "$ac_cv_lib_slp_SLPOpen" >&6; }
22441 if test "x$ac_cv_lib_slp_SLPOpen" = x""yes; then :
22442   have_slp=yes
22443 else
22444   have_slp=no
22445 fi
22446
22447                 if test $have_slp = yes ; then
22448
22449 $as_echo "#define HAVE_SLP 1" >>confdefs.h
22450
22451                         SLAPD_SLP_LIBS=-lslp
22452                 fi
22453
22454         elif test $ol_enable_slp = yes ; then
22455                 as_fn_error "SLP not found" "$LINENO" 5
22456         fi
22457 fi
22458
22459
22460 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
22461 if test "x$ac_cv_type_mode_t" = x""yes; then :
22462
22463 else
22464
22465 cat >>confdefs.h <<_ACEOF
22466 #define mode_t int
22467 _ACEOF
22468
22469 fi
22470
22471 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
22472 if test "x$ac_cv_type_off_t" = x""yes; then :
22473
22474 else
22475
22476 cat >>confdefs.h <<_ACEOF
22477 #define off_t long
22478 _ACEOF
22479
22480 fi
22481
22482 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
22483 if test "x$ac_cv_type_pid_t" = x""yes; then :
22484
22485 else
22486
22487 cat >>confdefs.h <<_ACEOF
22488 #define pid_t int
22489 _ACEOF
22490
22491 fi
22492
22493 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
22494 if test "x$ac_cv_type_ssize_t" = x""yes; then :
22495
22496 else
22497
22498 cat >>confdefs.h <<_ACEOF
22499 #define ssize_t signed int
22500 _ACEOF
22501
22502 fi
22503
22504 ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
22505 if test "x$ac_cv_type_caddr_t" = x""yes; then :
22506
22507 else
22508
22509 cat >>confdefs.h <<_ACEOF
22510 #define caddr_t char *
22511 _ACEOF
22512
22513 fi
22514
22515 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
22516 if test "x$ac_cv_type_size_t" = x""yes; then :
22517
22518 else
22519
22520 cat >>confdefs.h <<_ACEOF
22521 #define size_t unsigned
22522 _ACEOF
22523
22524 fi
22525
22526
22527 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
22528 if test "x$ac_cv_type_long_long" = x""yes; then :
22529
22530 cat >>confdefs.h <<_ACEOF
22531 #define HAVE_LONG_LONG 1
22532 _ACEOF
22533
22534
22535 fi
22536
22537 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
22538 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
22539
22540 cat >>confdefs.h <<_ACEOF
22541 #define HAVE_PTRDIFF_T 1
22542 _ACEOF
22543
22544
22545 fi
22546
22547
22548
22549 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default
22550 #ifdef HAVE_SYS_SOCKET_H
22551 #include <sys/socket.h>
22552 #endif
22553 "
22554 if test "x$ac_cv_type_socklen_t" = x""yes; then :
22555
22556 fi
22557
22558
22559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the type of arg 3 to accept()" >&5
22560 $as_echo_n "checking the type of arg 3 to accept()... " >&6; }
22561 if test "${ol_cv_type_ber_socklen_t+set}" = set; then :
22562   $as_echo_n "(cached) " >&6
22563 else
22564
22565         set socklen_t int unsigned "unsigned long" long size_t
22566         test "$ac_cv_type_socklen_t" = yes || shift
22567         ol_cv_type_ber_socklen_t=$1 guessing="guessing "
22568         for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
22569                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22570 /* end confdefs.h.  */
22571 $ac_includes_default
22572 #ifdef HAVE_SYS_SOCKET_H
22573 #include <sys/socket.h>
22574 #endif
22575 extern int accept(int s, $addrtype *ap, $lentype *lp);
22576
22577 int
22578 main ()
22579 {
22580
22581 accept(0, (struct sockaddr *) 0, ($lentype *) 0);
22582
22583   ;
22584   return 0;
22585 }
22586 _ACEOF
22587 if ac_fn_c_try_compile "$LINENO"; then :
22588   ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
22589 fi
22590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22591         done ; done
22592 fi
22593
22594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
22595 $as_echo "$guessing$ol_cv_type_ber_socklen_t *" >&6; }
22596
22597 cat >>confdefs.h <<_ACEOF
22598 #define ber_socklen_t $ol_cv_type_ber_socklen_t
22599 _ACEOF
22600
22601
22602 if test "$ac_cv_type_socklen_t" != yes; then
22603
22604 cat >>confdefs.h <<_ACEOF
22605 #define socklen_t $ol_cv_type_ber_socklen_t
22606 _ACEOF
22607
22608 fi
22609
22610
22611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
22612 $as_echo_n "checking return type of signal handlers... " >&6; }
22613 if test "${ac_cv_type_signal+set}" = set; then :
22614   $as_echo_n "(cached) " >&6
22615 else
22616   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22617 /* end confdefs.h.  */
22618 #include <sys/types.h>
22619 #include <signal.h>
22620
22621 int
22622 main ()
22623 {
22624 return *(signal (0, 0)) (0) == 1;
22625   ;
22626   return 0;
22627 }
22628 _ACEOF
22629 if ac_fn_c_try_compile "$LINENO"; then :
22630   ac_cv_type_signal=int
22631 else
22632   ac_cv_type_signal=void
22633 fi
22634 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22635 fi
22636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
22637 $as_echo "$ac_cv_type_signal" >&6; }
22638
22639 cat >>confdefs.h <<_ACEOF
22640 #define RETSIGTYPE $ac_cv_type_signal
22641 _ACEOF
22642
22643
22644
22645 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default
22646 #include <signal.h>
22647
22648 "
22649 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
22650
22651 else
22652
22653 cat >>confdefs.h <<_ACEOF
22654 #define sig_atomic_t int
22655 _ACEOF
22656
22657 fi
22658
22659
22660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
22661 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
22662 if test "${ac_cv_type_uid_t+set}" = set; then :
22663   $as_echo_n "(cached) " >&6
22664 else
22665   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22666 /* end confdefs.h.  */
22667 #include <sys/types.h>
22668
22669 _ACEOF
22670 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22671   $EGREP "uid_t" >/dev/null 2>&1; then :
22672   ac_cv_type_uid_t=yes
22673 else
22674   ac_cv_type_uid_t=no
22675 fi
22676 rm -f conftest*
22677
22678 fi
22679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
22680 $as_echo "$ac_cv_type_uid_t" >&6; }
22681 if test $ac_cv_type_uid_t = no; then
22682
22683 $as_echo "#define uid_t int" >>confdefs.h
22684
22685
22686 $as_echo "#define gid_t int" >>confdefs.h
22687
22688 fi
22689
22690
22691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
22692 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
22693 if test "${ac_cv_header_time+set}" = set; then :
22694   $as_echo_n "(cached) " >&6
22695 else
22696   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22697 /* end confdefs.h.  */
22698 #include <sys/types.h>
22699 #include <sys/time.h>
22700 #include <time.h>
22701
22702 int
22703 main ()
22704 {
22705 if ((struct tm *) 0)
22706 return 0;
22707   ;
22708   return 0;
22709 }
22710 _ACEOF
22711 if ac_fn_c_try_compile "$LINENO"; then :
22712   ac_cv_header_time=yes
22713 else
22714   ac_cv_header_time=no
22715 fi
22716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22717 fi
22718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
22719 $as_echo "$ac_cv_header_time" >&6; }
22720 if test $ac_cv_header_time = yes; then
22721
22722 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
22723
22724 fi
22725
22726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
22727 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
22728 if test "${ac_cv_struct_tm+set}" = set; then :
22729   $as_echo_n "(cached) " >&6
22730 else
22731   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22732 /* end confdefs.h.  */
22733 #include <sys/types.h>
22734 #include <time.h>
22735
22736 int
22737 main ()
22738 {
22739 struct tm tm;
22740                                      int *p = &tm.tm_sec;
22741                                      return !p;
22742   ;
22743   return 0;
22744 }
22745 _ACEOF
22746 if ac_fn_c_try_compile "$LINENO"; then :
22747   ac_cv_struct_tm=time.h
22748 else
22749   ac_cv_struct_tm=sys/time.h
22750 fi
22751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22752 fi
22753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
22754 $as_echo "$ac_cv_struct_tm" >&6; }
22755 if test $ac_cv_struct_tm = sys/time.h; then
22756
22757 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
22758
22759 fi
22760
22761 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
22762 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
22763
22764 cat >>confdefs.h <<_ACEOF
22765 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
22766 _ACEOF
22767
22768
22769 fi
22770
22771 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "$ac_includes_default
22772 #include <pwd.h>
22773 "
22774 if test "x$ac_cv_member_struct_passwd_pw_gecos" = x""yes; then :
22775
22776 cat >>confdefs.h <<_ACEOF
22777 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
22778 _ACEOF
22779
22780
22781 fi
22782
22783 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "$ac_includes_default
22784 #include <pwd.h>
22785 "
22786 if test "x$ac_cv_member_struct_passwd_pw_passwd" = x""yes; then :
22787
22788 cat >>confdefs.h <<_ACEOF
22789 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
22790 _ACEOF
22791
22792
22793 fi
22794
22795
22796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if toupper() requires islower()" >&5
22797 $as_echo_n "checking if toupper() requires islower()... " >&6; }
22798 if test "${ol_cv_c_upper_lower+set}" = set; then :
22799   $as_echo_n "(cached) " >&6
22800 else
22801
22802         if test "$cross_compiling" = yes; then :
22803   ol_cv_c_upper_lower=safe
22804 else
22805   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22806 /* end confdefs.h.  */
22807
22808 #include <ctype.h>
22809 main()
22810 {
22811         if ('C' == toupper('C'))
22812                 exit(0);
22813         else
22814                 exit(1);
22815 }
22816 _ACEOF
22817 if ac_fn_c_try_run "$LINENO"; then :
22818   ol_cv_c_upper_lower=no
22819 else
22820   ol_cv_c_upper_lower=yes
22821 fi
22822 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22823   conftest.$ac_objext conftest.beam conftest.$ac_ext
22824 fi
22825
22826 fi
22827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_upper_lower" >&5
22828 $as_echo "$ol_cv_c_upper_lower" >&6; }
22829 if test $ol_cv_c_upper_lower != no ; then
22830
22831 $as_echo "#define C_UPPER_LOWER 1" >>confdefs.h
22832
22833 fi
22834
22835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
22836 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
22837 if test "${ac_cv_c_const+set}" = set; then :
22838   $as_echo_n "(cached) " >&6
22839 else
22840   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22841 /* end confdefs.h.  */
22842
22843 int
22844 main ()
22845 {
22846 /* FIXME: Include the comments suggested by Paul. */
22847 #ifndef __cplusplus
22848   /* Ultrix mips cc rejects this.  */
22849   typedef int charset[2];
22850   const charset cs;
22851   /* SunOS 4.1.1 cc rejects this.  */
22852   char const *const *pcpcc;
22853   char **ppc;
22854   /* NEC SVR4.0.2 mips cc rejects this.  */
22855   struct point {int x, y;};
22856   static struct point const zero = {0,0};
22857   /* AIX XL C 1.02.0.0 rejects this.
22858      It does not let you subtract one const X* pointer from another in
22859      an arm of an if-expression whose if-part is not a constant
22860      expression */
22861   const char *g = "string";
22862   pcpcc = &g + (g ? g-g : 0);
22863   /* HPUX 7.0 cc rejects these. */
22864   ++pcpcc;
22865   ppc = (char**) pcpcc;
22866   pcpcc = (char const *const *) ppc;
22867   { /* SCO 3.2v4 cc rejects this.  */
22868     char *t;
22869     char const *s = 0 ? (char *) 0 : (char const *) 0;
22870
22871     *t++ = 0;
22872     if (s) return 0;
22873   }
22874   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22875     int x[] = {25, 17};
22876     const int *foo = &x[0];
22877     ++foo;
22878   }
22879   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22880     typedef const int *iptr;
22881     iptr p = 0;
22882     ++p;
22883   }
22884   { /* AIX XL C 1.02.0.0 rejects this saying
22885        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22886     struct s { int j; const int *ap[3]; };
22887     struct s *b; b->j = 5;
22888   }
22889   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22890     const int foo = 10;
22891     if (!foo) return 0;
22892   }
22893   return !cs[0] && !zero.x;
22894 #endif
22895
22896   ;
22897   return 0;
22898 }
22899 _ACEOF
22900 if ac_fn_c_try_compile "$LINENO"; then :
22901   ac_cv_c_const=yes
22902 else
22903   ac_cv_c_const=no
22904 fi
22905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22906 fi
22907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
22908 $as_echo "$ac_cv_c_const" >&6; }
22909 if test $ac_cv_c_const = no; then
22910
22911 $as_echo "#define const /**/" >>confdefs.h
22912
22913 fi
22914
22915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler understands volatile" >&5
22916 $as_echo_n "checking if compiler understands volatile... " >&6; }
22917 if test "${ol_cv_c_volatile+set}" = set; then :
22918   $as_echo_n "(cached) " >&6
22919 else
22920   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22921 /* end confdefs.h.  */
22922 int x, y, z;
22923 int
22924 main ()
22925 {
22926 volatile int a; int * volatile b = x ? &y : &z;
22927       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22928       *b = 0;
22929   ;
22930   return 0;
22931 }
22932 _ACEOF
22933 if ac_fn_c_try_compile "$LINENO"; then :
22934   ol_cv_c_volatile=yes
22935 else
22936   ol_cv_c_volatile=no
22937 fi
22938 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22939 fi
22940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_volatile" >&5
22941 $as_echo "$ol_cv_c_volatile" >&6; }
22942   if test $ol_cv_c_volatile = yes; then
22943     :
22944   else
22945
22946 $as_echo "#define volatile /**/" >>confdefs.h
22947
22948   fi
22949
22950
22951 if test $cross_compiling = yes ; then
22952         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Crossing compiling... all bets are off!" >&5
22953 $as_echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
22954
22955 $as_echo "#define CROSS_COMPILING 1" >>confdefs.h
22956
22957 else
22958          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
22959 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
22960 if test "${ac_cv_c_bigendian+set}" = set; then :
22961   $as_echo_n "(cached) " >&6
22962 else
22963   ac_cv_c_bigendian=unknown
22964     # See if we're dealing with a universal compiler.
22965     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22966 /* end confdefs.h.  */
22967 #ifndef __APPLE_CC__
22968                not a universal capable compiler
22969              #endif
22970              typedef int dummy;
22971
22972 _ACEOF
22973 if ac_fn_c_try_compile "$LINENO"; then :
22974
22975         # Check for potential -arch flags.  It is not universal unless
22976         # there are at least two -arch flags with different values.
22977         ac_arch=
22978         ac_prev=
22979         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
22980          if test -n "$ac_prev"; then
22981            case $ac_word in
22982              i?86 | x86_64 | ppc | ppc64)
22983                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
22984                  ac_arch=$ac_word
22985                else
22986                  ac_cv_c_bigendian=universal
22987                  break
22988                fi
22989                ;;
22990            esac
22991            ac_prev=
22992          elif test "x$ac_word" = "x-arch"; then
22993            ac_prev=arch
22994          fi
22995        done
22996 fi
22997 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22998     if test $ac_cv_c_bigendian = unknown; then
22999       # See if sys/param.h defines the BYTE_ORDER macro.
23000       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23001 /* end confdefs.h.  */
23002 #include <sys/types.h>
23003              #include <sys/param.h>
23004
23005 int
23006 main ()
23007 {
23008 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23009                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23010                      && LITTLE_ENDIAN)
23011               bogus endian macros
23012              #endif
23013
23014   ;
23015   return 0;
23016 }
23017 _ACEOF
23018 if ac_fn_c_try_compile "$LINENO"; then :
23019   # It does; now see whether it defined to BIG_ENDIAN or not.
23020          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23021 /* end confdefs.h.  */
23022 #include <sys/types.h>
23023                 #include <sys/param.h>
23024
23025 int
23026 main ()
23027 {
23028 #if BYTE_ORDER != BIG_ENDIAN
23029                  not big endian
23030                 #endif
23031
23032   ;
23033   return 0;
23034 }
23035 _ACEOF
23036 if ac_fn_c_try_compile "$LINENO"; then :
23037   ac_cv_c_bigendian=yes
23038 else
23039   ac_cv_c_bigendian=no
23040 fi
23041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23042 fi
23043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23044     fi
23045     if test $ac_cv_c_bigendian = unknown; then
23046       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23047       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23048 /* end confdefs.h.  */
23049 #include <limits.h>
23050
23051 int
23052 main ()
23053 {
23054 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23055               bogus endian macros
23056              #endif
23057
23058   ;
23059   return 0;
23060 }
23061 _ACEOF
23062 if ac_fn_c_try_compile "$LINENO"; then :
23063   # It does; now see whether it defined to _BIG_ENDIAN or not.
23064          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23065 /* end confdefs.h.  */
23066 #include <limits.h>
23067
23068 int
23069 main ()
23070 {
23071 #ifndef _BIG_ENDIAN
23072                  not big endian
23073                 #endif
23074
23075   ;
23076   return 0;
23077 }
23078 _ACEOF
23079 if ac_fn_c_try_compile "$LINENO"; then :
23080   ac_cv_c_bigendian=yes
23081 else
23082   ac_cv_c_bigendian=no
23083 fi
23084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23085 fi
23086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23087     fi
23088     if test $ac_cv_c_bigendian = unknown; then
23089       # Compile a test program.
23090       if test "$cross_compiling" = yes; then :
23091   # Try to guess by grepping values from an object file.
23092          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23093 /* end confdefs.h.  */
23094 short int ascii_mm[] =
23095                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23096                 short int ascii_ii[] =
23097                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23098                 int use_ascii (int i) {
23099                   return ascii_mm[i] + ascii_ii[i];
23100                 }
23101                 short int ebcdic_ii[] =
23102                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23103                 short int ebcdic_mm[] =
23104                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23105                 int use_ebcdic (int i) {
23106                   return ebcdic_mm[i] + ebcdic_ii[i];
23107                 }
23108                 extern int foo;
23109
23110 int
23111 main ()
23112 {
23113 return use_ascii (foo) == use_ebcdic (foo);
23114   ;
23115   return 0;
23116 }
23117 _ACEOF
23118 if ac_fn_c_try_compile "$LINENO"; then :
23119   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
23120               ac_cv_c_bigendian=yes
23121             fi
23122             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23123               if test "$ac_cv_c_bigendian" = unknown; then
23124                 ac_cv_c_bigendian=no
23125               else
23126                 # finding both strings is unlikely to happen, but who knows?
23127                 ac_cv_c_bigendian=unknown
23128               fi
23129             fi
23130 fi
23131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23132 else
23133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23134 /* end confdefs.h.  */
23135 $ac_includes_default
23136 int
23137 main ()
23138 {
23139
23140              /* Are we little or big endian?  From Harbison&Steele.  */
23141              union
23142              {
23143                long int l;
23144                char c[sizeof (long int)];
23145              } u;
23146              u.l = 1;
23147              return u.c[sizeof (long int) - 1] == 1;
23148
23149   ;
23150   return 0;
23151 }
23152 _ACEOF
23153 if ac_fn_c_try_run "$LINENO"; then :
23154   ac_cv_c_bigendian=no
23155 else
23156   ac_cv_c_bigendian=yes
23157 fi
23158 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23159   conftest.$ac_objext conftest.beam conftest.$ac_ext
23160 fi
23161
23162     fi
23163 fi
23164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
23165 $as_echo "$ac_cv_c_bigendian" >&6; }
23166  case $ac_cv_c_bigendian in #(
23167    yes)
23168      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
23169 ;; #(
23170    no)
23171       ;; #(
23172    universal)
23173
23174 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
23175
23176      ;; #(
23177    *)
23178      as_fn_error "unknown endianness
23179  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
23180  esac
23181
23182 fi
23183
23184 # The cast to long int works around a bug in the HP C Compiler
23185 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23186 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23187 # This bug is HP SR number 8606223364.
23188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23189 $as_echo_n "checking size of short... " >&6; }
23190 if test "${ac_cv_sizeof_short+set}" = set; then :
23191   $as_echo_n "(cached) " >&6
23192 else
23193   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23194
23195 else
23196   if test "$ac_cv_type_short" = yes; then
23197      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23198 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23199 { as_fn_set_status 77
23200 as_fn_error "cannot compute sizeof (short)
23201 See \`config.log' for more details." "$LINENO" 5; }; }
23202    else
23203      ac_cv_sizeof_short=0
23204    fi
23205 fi
23206
23207 fi
23208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23209 $as_echo "$ac_cv_sizeof_short" >&6; }
23210
23211
23212
23213 cat >>confdefs.h <<_ACEOF
23214 #define SIZEOF_SHORT $ac_cv_sizeof_short
23215 _ACEOF
23216
23217
23218 # The cast to long int works around a bug in the HP C Compiler
23219 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23220 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23221 # This bug is HP SR number 8606223364.
23222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23223 $as_echo_n "checking size of int... " >&6; }
23224 if test "${ac_cv_sizeof_int+set}" = set; then :
23225   $as_echo_n "(cached) " >&6
23226 else
23227   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23228
23229 else
23230   if test "$ac_cv_type_int" = yes; then
23231      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23232 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23233 { as_fn_set_status 77
23234 as_fn_error "cannot compute sizeof (int)
23235 See \`config.log' for more details." "$LINENO" 5; }; }
23236    else
23237      ac_cv_sizeof_int=0
23238    fi
23239 fi
23240
23241 fi
23242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23243 $as_echo "$ac_cv_sizeof_int" >&6; }
23244
23245
23246
23247 cat >>confdefs.h <<_ACEOF
23248 #define SIZEOF_INT $ac_cv_sizeof_int
23249 _ACEOF
23250
23251
23252 # The cast to long int works around a bug in the HP C Compiler
23253 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23254 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23255 # This bug is HP SR number 8606223364.
23256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23257 $as_echo_n "checking size of long... " >&6; }
23258 if test "${ac_cv_sizeof_long+set}" = set; then :
23259   $as_echo_n "(cached) " >&6
23260 else
23261   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23262
23263 else
23264   if test "$ac_cv_type_long" = yes; then
23265      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23266 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23267 { as_fn_set_status 77
23268 as_fn_error "cannot compute sizeof (long)
23269 See \`config.log' for more details." "$LINENO" 5; }; }
23270    else
23271      ac_cv_sizeof_long=0
23272    fi
23273 fi
23274
23275 fi
23276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23277 $as_echo "$ac_cv_sizeof_long" >&6; }
23278
23279
23280
23281 cat >>confdefs.h <<_ACEOF
23282 #define SIZEOF_LONG $ac_cv_sizeof_long
23283 _ACEOF
23284
23285
23286 # The cast to long int works around a bug in the HP C Compiler
23287 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23288 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23289 # This bug is HP SR number 8606223364.
23290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
23291 $as_echo_n "checking size of long long... " >&6; }
23292 if test "${ac_cv_sizeof_long_long+set}" = set; then :
23293   $as_echo_n "(cached) " >&6
23294 else
23295   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
23296
23297 else
23298   if test "$ac_cv_type_long_long" = yes; then
23299      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23300 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23301 { as_fn_set_status 77
23302 as_fn_error "cannot compute sizeof (long long)
23303 See \`config.log' for more details." "$LINENO" 5; }; }
23304    else
23305      ac_cv_sizeof_long_long=0
23306    fi
23307 fi
23308
23309 fi
23310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
23311 $as_echo "$ac_cv_sizeof_long_long" >&6; }
23312
23313
23314
23315 cat >>confdefs.h <<_ACEOF
23316 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
23317 _ACEOF
23318
23319
23320 # The cast to long int works around a bug in the HP C Compiler
23321 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23322 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23323 # This bug is HP SR number 8606223364.
23324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
23325 $as_echo_n "checking size of wchar_t... " >&6; }
23326 if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
23327   $as_echo_n "(cached) " >&6
23328 else
23329   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "$ac_includes_default"; then :
23330
23331 else
23332   if test "$ac_cv_type_wchar_t" = yes; then
23333      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23334 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23335 { as_fn_set_status 77
23336 as_fn_error "cannot compute sizeof (wchar_t)
23337 See \`config.log' for more details." "$LINENO" 5; }; }
23338    else
23339      ac_cv_sizeof_wchar_t=0
23340    fi
23341 fi
23342
23343 fi
23344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
23345 $as_echo "$ac_cv_sizeof_wchar_t" >&6; }
23346
23347
23348
23349 cat >>confdefs.h <<_ACEOF
23350 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23351 _ACEOF
23352
23353
23354
23355 if test "$ac_cv_sizeof_int" -lt 4 ; then
23356         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
23357 $as_echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
23358
23359
23360 $as_echo "#define LBER_INT_T long" >>confdefs.h
23361
23362 else
23363
23364 $as_echo "#define LBER_INT_T int" >>confdefs.h
23365
23366 fi
23367
23368
23369 $as_echo "#define LBER_LEN_T long" >>confdefs.h
23370
23371
23372 $as_echo "#define LBER_SOCKET_T int" >>confdefs.h
23373
23374
23375 $as_echo "#define LBER_TAG_T long" >>confdefs.h
23376
23377
23378 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
23379         if test $ac_cv_sizeof_long_long -gt 4 ; then
23380                 ol_with_mp=longlong
23381
23382 $as_echo "#define USE_MP_LONG_LONG 1" >>confdefs.h
23383
23384         elif test $ol_with_mp = longlong ; then
23385                 as_fn_error "long long unusable for multiple precision" "$LINENO" 5
23386         fi
23387 fi
23388 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
23389         if test $ac_cv_sizeof_long -gt 4 ; then
23390                 ol_with_mp=long
23391
23392 $as_echo "#define USE_MP_LONG 1" >>confdefs.h
23393
23394         elif test $ol_with_mp = long ; then
23395                 as_fn_error "long unusable for multiple precision" "$LINENO" 5
23396         fi
23397 fi
23398 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
23399         for ac_header in openssl/bn.h
23400 do :
23401   ac_fn_c_check_header_mongrel "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default"
23402 if test "x$ac_cv_header_openssl_bn_h" = x""yes; then :
23403   cat >>confdefs.h <<_ACEOF
23404 #define HAVE_OPENSSL_BN_H 1
23405 _ACEOF
23406
23407 fi
23408
23409 done
23410
23411         for ac_header in openssl/crypto.h
23412 do :
23413   ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
23414 if test "x$ac_cv_header_openssl_crypto_h" = x""yes; then :
23415   cat >>confdefs.h <<_ACEOF
23416 #define HAVE_OPENSSL_CRYPTO_H 1
23417 _ACEOF
23418
23419 fi
23420
23421 done
23422
23423         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
23424                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
23425                 test "$ol_with_tls" = "found" ; then
23426                 ol_with_mp=bignum
23427
23428 $as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h
23429
23430         elif test $ol_with_mp = bignum ; then
23431                 as_fn_error "bignum not available" "$LINENO" 5
23432         fi
23433 fi
23434 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
23435         for ac_header in gmp.h
23436 do :
23437   ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
23438 if test "x$ac_cv_header_gmp_h" = x""yes; then :
23439   cat >>confdefs.h <<_ACEOF
23440 #define HAVE_GMP_H 1
23441 _ACEOF
23442
23443 fi
23444
23445 done
23446
23447         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_add_ui in -lgmp" >&5
23448 $as_echo_n "checking for __gmpz_add_ui in -lgmp... " >&6; }
23449 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then :
23450   $as_echo_n "(cached) " >&6
23451 else
23452   ac_check_lib_save_LIBS=$LIBS
23453 LIBS="-lgmp  $LIBS"
23454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23455 /* end confdefs.h.  */
23456
23457 /* Override any GCC internal prototype to avoid an error.
23458    Use char because int might match the return type of a GCC
23459    builtin and then its argument prototype would still apply.  */
23460 #ifdef __cplusplus
23461 extern "C"
23462 #endif
23463 char __gmpz_add_ui ();
23464 int
23465 main ()
23466 {
23467 return __gmpz_add_ui ();
23468   ;
23469   return 0;
23470 }
23471 _ACEOF
23472 if ac_fn_c_try_link "$LINENO"; then :
23473   ac_cv_lib_gmp___gmpz_add_ui=yes
23474 else
23475   ac_cv_lib_gmp___gmpz_add_ui=no
23476 fi
23477 rm -f core conftest.err conftest.$ac_objext \
23478     conftest$ac_exeext conftest.$ac_ext
23479 LIBS=$ac_check_lib_save_LIBS
23480 fi
23481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
23482 $as_echo "$ac_cv_lib_gmp___gmpz_add_ui" >&6; }
23483 if test "x$ac_cv_lib_gmp___gmpz_add_ui" = x""yes; then :
23484   cat >>confdefs.h <<_ACEOF
23485 #define HAVE_LIBGMP 1
23486 _ACEOF
23487
23488   LIBS="-lgmp $LIBS"
23489
23490 fi
23491
23492         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
23493
23494 $as_echo "#define USE_MP_GMP 1" >>confdefs.h
23495
23496                 ol_with_mp=gmp
23497         elif test $ol_with_mp = gmp ; then
23498                 as_fn_error "gmp not available" "$LINENO" 5
23499         fi
23500 fi
23501 if test $ol_with_mp = auto ; then
23502         ol_with_mp=no
23503 fi
23504
23505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
23506 $as_echo_n "checking for working memcmp... " >&6; }
23507 if test "${ac_cv_func_memcmp_working+set}" = set; then :
23508   $as_echo_n "(cached) " >&6
23509 else
23510   if test "$cross_compiling" = yes; then :
23511   ac_cv_func_memcmp_working=no
23512 else
23513   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23514 /* end confdefs.h.  */
23515 $ac_includes_default
23516 int
23517 main ()
23518 {
23519
23520   /* Some versions of memcmp are not 8-bit clean.  */
23521   char c0 = '\100', c1 = '\200', c2 = '\201';
23522   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
23523     return 1;
23524
23525   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
23526      or more and with at least one buffer not starting on a 4-byte boundary.
23527      William Lewis provided this test program.   */
23528   {
23529     char foo[21];
23530     char bar[21];
23531     int i;
23532     for (i = 0; i < 4; i++)
23533       {
23534         char *a = foo + i;
23535         char *b = bar + i;
23536         strcpy (a, "--------01111111");
23537         strcpy (b, "--------10000000");
23538         if (memcmp (a, b, 16) >= 0)
23539           return 1;
23540       }
23541     return 0;
23542   }
23543
23544   ;
23545   return 0;
23546 }
23547 _ACEOF
23548 if ac_fn_c_try_run "$LINENO"; then :
23549   ac_cv_func_memcmp_working=yes
23550 else
23551   ac_cv_func_memcmp_working=no
23552 fi
23553 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23554   conftest.$ac_objext conftest.beam conftest.$ac_ext
23555 fi
23556
23557 fi
23558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
23559 $as_echo "$ac_cv_func_memcmp_working" >&6; }
23560 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
23561   *" memcmp.$ac_objext "* ) ;;
23562   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
23563  ;;
23564 esac
23565
23566
23567
23568 if test $ac_cv_func_memcmp_working = no ; then
23569
23570 $as_echo "#define NEED_MEMCMP_REPLACEMENT 1" >>confdefs.h
23571
23572 fi
23573
23574 for ac_func in strftime
23575 do :
23576   ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23577 if test "x$ac_cv_func_strftime" = x""yes; then :
23578   cat >>confdefs.h <<_ACEOF
23579 #define HAVE_STRFTIME 1
23580 _ACEOF
23581
23582 else
23583   # strftime is in -lintl on SCO UNIX.
23584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
23585 $as_echo_n "checking for strftime in -lintl... " >&6; }
23586 if test "${ac_cv_lib_intl_strftime+set}" = set; then :
23587   $as_echo_n "(cached) " >&6
23588 else
23589   ac_check_lib_save_LIBS=$LIBS
23590 LIBS="-lintl  $LIBS"
23591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23592 /* end confdefs.h.  */
23593
23594 /* Override any GCC internal prototype to avoid an error.
23595    Use char because int might match the return type of a GCC
23596    builtin and then its argument prototype would still apply.  */
23597 #ifdef __cplusplus
23598 extern "C"
23599 #endif
23600 char strftime ();
23601 int
23602 main ()
23603 {
23604 return strftime ();
23605   ;
23606   return 0;
23607 }
23608 _ACEOF
23609 if ac_fn_c_try_link "$LINENO"; then :
23610   ac_cv_lib_intl_strftime=yes
23611 else
23612   ac_cv_lib_intl_strftime=no
23613 fi
23614 rm -f core conftest.err conftest.$ac_objext \
23615     conftest$ac_exeext conftest.$ac_ext
23616 LIBS=$ac_check_lib_save_LIBS
23617 fi
23618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
23619 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
23620 if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
23621   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
23622
23623 LIBS="-lintl $LIBS"
23624 fi
23625
23626 fi
23627 done
23628
23629
23630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton()" >&5
23631 $as_echo_n "checking for inet_aton()... " >&6; }
23632 if test "${ol_cv_func_inet_aton+set}" = set; then :
23633   $as_echo_n "(cached) " >&6
23634 else
23635   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23636 /* end confdefs.h.  */
23637
23638 #ifdef HAVE_SYS_TYPES_H
23639 #       include <sys/types.h>
23640 #endif
23641 #ifdef HAVE_SYS_SOCKET_H
23642 #       include <sys/socket.h>
23643 #       ifdef HAVE_SYS_SELECT_H
23644 #               include <sys/select.h>
23645 #       endif
23646 #       include <netinet/in.h>
23647 #       ifdef HAVE_ARPA_INET_H
23648 #               include <arpa/inet.h>
23649 #       endif
23650 #endif
23651
23652 int
23653 main ()
23654 {
23655 struct in_addr in;
23656 int rc = inet_aton( "255.255.255.255", &in );
23657   ;
23658   return 0;
23659 }
23660 _ACEOF
23661 if ac_fn_c_try_link "$LINENO"; then :
23662   ol_cv_func_inet_aton=yes
23663 else
23664   ol_cv_func_inet_aton=no
23665 fi
23666 rm -f core conftest.err conftest.$ac_objext \
23667     conftest$ac_exeext conftest.$ac_ext
23668 fi
23669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_inet_aton" >&5
23670 $as_echo "$ol_cv_func_inet_aton" >&6; }
23671   if test $ol_cv_func_inet_aton != no; then
23672
23673 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
23674
23675   fi
23676
23677
23678 ac_fn_c_check_func "$LINENO" "_spawnlp" "ac_cv_func__spawnlp"
23679 if test "x$ac_cv_func__spawnlp" = x""yes; then :
23680
23681 $as_echo "#define HAVE_SPAWNLP 1" >>confdefs.h
23682
23683 fi
23684
23685
23686 ac_fn_c_check_func "$LINENO" "_snprintf" "ac_cv_func__snprintf"
23687 if test "x$ac_cv_func__snprintf" = x""yes; then :
23688   ac_cv_func_snprintf=yes
23689
23690 $as_echo "#define snprintf _snprintf" >>confdefs.h
23691
23692
23693 fi
23694
23695
23696 for ac_func in vsnprintf _vsnprintf
23697 do :
23698   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23699 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23700 eval as_val=\$$as_ac_var
23701    if test "x$as_val" = x""yes; then :
23702   cat >>confdefs.h <<_ACEOF
23703 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23704 _ACEOF
23705
23706 fi
23707 done
23708
23709
23710 if test $ac_cv_func_vsnprintf = no -a $ac_cv_func__vsnprintf = yes ; then
23711         ac_cv_func_vsnprintf=yes
23712
23713 $as_echo "#define vsnprintf _vsnprintf" >>confdefs.h
23714
23715 fi
23716
23717 for ac_func in vprintf
23718 do :
23719   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
23720 if test "x$ac_cv_func_vprintf" = x""yes; then :
23721   cat >>confdefs.h <<_ACEOF
23722 #define HAVE_VPRINTF 1
23723 _ACEOF
23724
23725 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
23726 if test "x$ac_cv_func__doprnt" = x""yes; then :
23727
23728 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
23729
23730 fi
23731
23732 fi
23733 done
23734
23735
23736
23737 if test $ac_cv_func_vprintf = yes ; then
23738                 for ac_func in snprintf vsnprintf
23739 do :
23740   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23741 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23742 eval as_val=\$$as_ac_var
23743    if test "x$as_val" = x""yes; then :
23744   cat >>confdefs.h <<_ACEOF
23745 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23746 _ACEOF
23747
23748 fi
23749 done
23750
23751 fi
23752
23753 for ac_func in \
23754         bcopy                   \
23755         closesocket             \
23756         chroot                  \
23757         endgrent                \
23758         endpwent                \
23759         fcntl                   \
23760         flock                   \
23761         fstat                   \
23762         getdtablesize           \
23763         geteuid                 \
23764         getgrgid                \
23765         gethostname             \
23766         getpassphrase           \
23767         getpwuid                \
23768         getpwnam                \
23769         getspnam                \
23770         gettimeofday            \
23771         initgroups              \
23772         inet_ntoa_b             \
23773         ioctl                   \
23774         lockf                   \
23775         memcpy                  \
23776         memmove                 \
23777         memrchr                 \
23778         mkstemp                 \
23779         mktemp                  \
23780         pipe                    \
23781         read                    \
23782         recv                    \
23783         recvfrom                \
23784         setpwfile               \
23785         setgid                  \
23786         setegid                 \
23787         setsid                  \
23788         setuid                  \
23789         seteuid                 \
23790         signal                  \
23791         strdup                  \
23792         strpbrk                 \
23793         strrchr                 \
23794         strsep                  \
23795         strstr                  \
23796         strtol                  \
23797         strtoul                 \
23798         strtoq                  \
23799         strtouq                 \
23800         strtoll                 \
23801         strtoull                \
23802         strspn                  \
23803         sysconf                 \
23804         waitpid                 \
23805         wait4                   \
23806         write                   \
23807         send                    \
23808         sendmsg                 \
23809         sendto                  \
23810
23811 do :
23812   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23813 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23814 eval as_val=\$$as_ac_var
23815    if test "x$as_val" = x""yes; then :
23816   cat >>confdefs.h <<_ACEOF
23817 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23818 _ACEOF
23819
23820 fi
23821 done
23822
23823
23824 for ac_func in getopt getpeereid
23825 do :
23826   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23827 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23828 eval as_val=\$$as_ac_var
23829    if test "x$as_val" = x""yes; then :
23830   cat >>confdefs.h <<_ACEOF
23831 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23832 _ACEOF
23833
23834 else
23835   case " $LIBOBJS " in
23836   *" $ac_func.$ac_objext "* ) ;;
23837   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
23838  ;;
23839 esac
23840
23841 fi
23842 done
23843
23844
23845
23846 if test "$ac_cv_func_getopt" != yes; then
23847         LIBSRCS="$LIBSRCS getopt.c"
23848 fi
23849
23850 if test "$ac_cv_func_getpeereid" != yes; then
23851         for ac_func in getpeerucred
23852 do :
23853   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23854 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23855 eval as_val=\$$as_ac_var
23856    if test "x$as_val" = x""yes; then :
23857   cat >>confdefs.h <<_ACEOF
23858 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23859 _ACEOF
23860
23861 fi
23862 done
23863
23864         if test "$ac_cv_func_getpeerucred" != yes ; then
23865                 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrightslen" "ac_cv_member_struct_msghdr_msg_accrightslen" "$ac_includes_default
23866 #ifdef HAVE_SYS_SOCKET_H
23867 #include <sys/socket.h>
23868 #endif
23869 "
23870 if test "x$ac_cv_member_struct_msghdr_msg_accrightslen" = x""yes; then :
23871
23872 cat >>confdefs.h <<_ACEOF
23873 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
23874 _ACEOF
23875
23876
23877 fi
23878
23879                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
23880                         ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "$ac_includes_default
23881 #ifdef HAVE_SYS_SOCKET_H
23882 #include <sys/socket.h>
23883 #endif
23884 "
23885 if test "x$ac_cv_member_struct_msghdr_msg_control" = x""yes; then :
23886
23887 cat >>confdefs.h <<_ACEOF
23888 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
23889 _ACEOF
23890
23891
23892 fi
23893
23894                 fi
23895                 ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default"
23896 if test "x$ac_cv_member_struct_stat_st_fstype" = x""yes; then :
23897
23898 cat >>confdefs.h <<_ACEOF
23899 #define HAVE_STRUCT_STAT_ST_FSTYPE 1
23900 _ACEOF
23901
23902
23903 fi
23904 ac_fn_c_check_member "$LINENO" "struct stat" "st_vfstype" "ac_cv_member_struct_stat_st_vfstype" "$ac_includes_default"
23905 if test "x$ac_cv_member_struct_stat_st_vfstype" = x""yes; then :
23906
23907 cat >>confdefs.h <<_ACEOF
23908 #define HAVE_STRUCT_STAT_ST_VFSTYPE 1
23909 _ACEOF
23910
23911
23912 fi
23913
23914                 if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
23915                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23916 /* end confdefs.h.  */
23917 struct stat st; char *ptr=st.st_fstype;
23918 _ACEOF
23919 if ac_fn_c_try_compile "$LINENO"; then :
23920
23921 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1" >>confdefs.h
23922
23923 else
23924
23925 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1" >>confdefs.h
23926
23927 fi
23928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23929                 fi
23930         fi
23931         LIBSRCS="$LIBSRCS getpeereid.c"
23932 fi
23933
23934 if test "$ac_cv_func_snprintf" != yes ||
23935    test "$ac_cv_func_vsnprintf" != yes; then
23936         if test "$ac_cv_func_snprintf" != yes; then
23937
23938 $as_echo "#define snprintf ber_pvt_snprintf" >>confdefs.h
23939
23940         fi
23941         if test "$ac_cv_func_vsnprintf" != yes; then
23942
23943 $as_echo "#define vsnprintf ber_pvt_vsnprintf" >>confdefs.h
23944
23945         fi
23946 fi
23947
23948
23949 if test "$ol_enable_slapi" != no ; then
23950                         for ac_header in ltdl.h
23951 do :
23952   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
23953 if test "x$ac_cv_header_ltdl_h" = x""yes; then :
23954   cat >>confdefs.h <<_ACEOF
23955 #define HAVE_LTDL_H 1
23956 _ACEOF
23957
23958 fi
23959
23960 done
23961
23962
23963         if test $ac_cv_header_ltdl_h != yes ; then
23964                 as_fn_error "could not locate <ltdl.h>" "$LINENO" 5
23965         fi
23966         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
23967 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
23968 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
23969   $as_echo_n "(cached) " >&6
23970 else
23971   ac_check_lib_save_LIBS=$LIBS
23972 LIBS="-lltdl  $LIBS"
23973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23974 /* end confdefs.h.  */
23975
23976 /* Override any GCC internal prototype to avoid an error.
23977    Use char because int might match the return type of a GCC
23978    builtin and then its argument prototype would still apply.  */
23979 #ifdef __cplusplus
23980 extern "C"
23981 #endif
23982 char lt_dlinit ();
23983 int
23984 main ()
23985 {
23986 return lt_dlinit ();
23987   ;
23988   return 0;
23989 }
23990 _ACEOF
23991 if ac_fn_c_try_link "$LINENO"; then :
23992   ac_cv_lib_ltdl_lt_dlinit=yes
23993 else
23994   ac_cv_lib_ltdl_lt_dlinit=no
23995 fi
23996 rm -f core conftest.err conftest.$ac_objext \
23997     conftest$ac_exeext conftest.$ac_ext
23998 LIBS=$ac_check_lib_save_LIBS
23999 fi
24000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
24001 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
24002 if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
24003
24004                 SLAPI_LIBS=-lltdl
24005                 LIBSLAPI=libslapi.a
24006                 LIBSLAPITOOLS=../libslapi.a
24007
24008 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
24009
24010
24011 else
24012   as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
24013 fi
24014
24015
24016
24017 $as_echo "#define LDAP_SLAPI 1" >>confdefs.h
24018
24019 fi
24020
24021 if test "$ol_enable_debug" != no ; then
24022         if test "$ol_enable_debug" = traditional; then
24023
24024 $as_echo "#define OLD_DEBUG 1" >>confdefs.h
24025
24026         fi
24027
24028 $as_echo "#define LDAP_DEBUG 1" >>confdefs.h
24029
24030 fi
24031 if test "$ol_enable_syslog" = yes ; then
24032
24033 $as_echo "#define LDAP_SYSLOG 1" >>confdefs.h
24034
24035 fi
24036 if test "$ol_enable_proctitle" != no ; then
24037
24038 $as_echo "#define LDAP_PROCTITLE 1" >>confdefs.h
24039
24040 fi
24041 if test "$ol_enable_referrals" != no ; then
24042
24043 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION" >>confdefs.h
24044
24045 fi
24046 if test "$ol_enable_local" != no; then
24047
24048 $as_echo "#define LDAP_PF_LOCAL 1" >>confdefs.h
24049
24050 fi
24051 if test "$ol_link_ipv6" != no; then
24052
24053 $as_echo "#define LDAP_PF_INET6 1" >>confdefs.h
24054
24055 fi
24056 if test "$ol_enable_cleartext" != no ; then
24057
24058 $as_echo "#define SLAPD_CLEARTEXT 1" >>confdefs.h
24059
24060 fi
24061 if test "$ol_enable_crypt" != no ; then
24062
24063 $as_echo "#define SLAPD_CRYPT 1" >>confdefs.h
24064
24065 fi
24066 if test "$ol_link_spasswd" != no ; then
24067
24068 $as_echo "#define SLAPD_SPASSWD 1" >>confdefs.h
24069
24070 fi
24071 if test "$ol_enable_rlookups" != no ; then
24072
24073 $as_echo "#define SLAPD_RLOOKUPS 1" >>confdefs.h
24074
24075 fi
24076 if test "$ol_enable_aci" != no ; then
24077         if test $ol_enable_dynacl = no ; then
24078                 ol_enable_dynacl=yes
24079                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ACIs need dynacl" >&5
24080 $as_echo "$as_me: WARNING: ACIs need dynacl" >&2;}
24081         fi
24082         if test "$ol_enable_aci" = mod ; then
24083                 MFLAG=SLAPD_MOD_DYNAMIC
24084                                 as_fn_error "ACI build as dynamic module not supported (yet)" "$LINENO" 5
24085         else
24086                 MFLAG=SLAPD_MOD_STATIC
24087         fi
24088         WITH_ACI_ENABLED=$ol_enable_aci
24089
24090 cat >>confdefs.h <<_ACEOF
24091 #define SLAPD_ACI_ENABLED $MFLAG
24092 _ACEOF
24093
24094 else
24095         WITH_ACI_ENABLED=no
24096 fi
24097 if test "$ol_enable_dynacl" != no ; then
24098
24099 $as_echo "#define SLAP_DYNACL 1" >>confdefs.h
24100
24101 fi
24102
24103 if test "$ol_link_modules" != no ; then
24104
24105 $as_echo "#define SLAPD_MODULES 1" >>confdefs.h
24106
24107         BUILD_SLAPD=yes
24108         SLAPD_MODULES_LDFLAGS="-dlopen self"
24109 fi
24110
24111
24112 $as_echo "#define SLAPD_MOD_STATIC 1" >>confdefs.h
24113
24114
24115 $as_echo "#define SLAPD_MOD_DYNAMIC 2" >>confdefs.h
24116
24117
24118 if test "$ol_enable_monitor" != no ; then
24119         BUILD_SLAPD=yes
24120         BUILD_MONITOR=$ol_enable_monitor
24121         if test "$ol_enable_monitor" = mod ; then
24122                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24123                 MFLAG=SLAPD_MOD_DYNAMIC
24124         else
24125                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24126                 MFLAG=SLAPD_MOD_STATIC
24127         fi
24128
24129 cat >>confdefs.h <<_ACEOF
24130 #define SLAPD_MONITOR $MFLAG
24131 _ACEOF
24132
24133 fi
24134
24135 if test "$ol_enable_bdb" != no ; then
24136         BUILD_SLAPD=yes
24137         BUILD_BDB=$ol_enable_bdb
24138         if test "$ol_enable_bdb" = mod ; then
24139                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24140                 MFLAG=SLAPD_MOD_DYNAMIC
24141         else
24142                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24143                 MFLAG=SLAPD_MOD_STATIC
24144         fi
24145
24146 cat >>confdefs.h <<_ACEOF
24147 #define SLAPD_BDB $MFLAG
24148 _ACEOF
24149
24150 fi
24151
24152 if test "$ol_enable_dnssrv" != no ; then
24153         BUILD_SLAPD=yes
24154         BUILD_DNSSRV=$ol_enable_dnssrv
24155         if test "$ol_enable_dnssrv" = mod ; then
24156                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24157                 MFLAG=SLAPD_MOD_DYNAMIC
24158         else
24159                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24160                 MFLAG=SLAPD_MOD_STATIC
24161         fi
24162
24163 cat >>confdefs.h <<_ACEOF
24164 #define SLAPD_DNSSRV $MFLAG
24165 _ACEOF
24166
24167 fi
24168
24169 if test "$ol_enable_hdb" != no ; then
24170         BUILD_SLAPD=yes
24171         BUILD_HDB=$ol_enable_hdb
24172         if test "$ol_enable_hdb" = mod ; then
24173                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24174                 MFLAG=SLAPD_MOD_DYNAMIC
24175         else
24176                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24177                 MFLAG=SLAPD_MOD_STATIC
24178         fi
24179
24180 cat >>confdefs.h <<_ACEOF
24181 #define SLAPD_HDB $MFLAG
24182 _ACEOF
24183
24184 fi
24185
24186 if test "$ol_enable_ldap" != no ; then
24187         BUILD_SLAPD=yes
24188         BUILD_LDAP=$ol_enable_ldap
24189         if test "$ol_enable_ldap" = mod ; then
24190                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24191                 MFLAG=SLAPD_MOD_DYNAMIC
24192         else
24193                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24194                 MFLAG=SLAPD_MOD_STATIC
24195         fi
24196
24197 cat >>confdefs.h <<_ACEOF
24198 #define SLAPD_LDAP $MFLAG
24199 _ACEOF
24200
24201 fi
24202
24203 if test "$ol_enable_meta" != no ; then
24204         BUILD_SLAPD=yes
24205         BUILD_META=$ol_enable_meta
24206         BUILD_REWRITE=yes
24207         if test "$ol_enable_meta" = mod ; then
24208                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24209                 MFLAG=SLAPD_MOD_DYNAMIC
24210         else
24211                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24212                 MFLAG=SLAPD_MOD_STATIC
24213         fi
24214
24215 cat >>confdefs.h <<_ACEOF
24216 #define SLAPD_META $MFLAG
24217 _ACEOF
24218
24219 fi
24220
24221 if test "$ol_enable_ndb" != no ; then
24222         BUILD_SLAPD=yes
24223         BUILD_NDB=$ol_enable_ndb
24224         if test "$ol_enable_ndb" = mod ; then
24225                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ndb"
24226                 MFLAG=SLAPD_MOD_DYNAMIC
24227         else
24228                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ndb"
24229                 MFLAG=SLAPD_MOD_STATIC
24230         fi
24231
24232 cat >>confdefs.h <<_ACEOF
24233 #define SLAPD_NDB $MFLAG
24234 _ACEOF
24235
24236 fi
24237
24238 if test "$ol_enable_null" != no ; then
24239         BUILD_SLAPD=yes
24240         BUILD_NULL=$ol_enable_null
24241         if test "$ol_enable_null" = mod ; then
24242                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24243                 MFLAG=SLAPD_MOD_DYNAMIC
24244         else
24245                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24246                 MFLAG=SLAPD_MOD_STATIC
24247         fi
24248
24249 cat >>confdefs.h <<_ACEOF
24250 #define SLAPD_NULL $MFLAG
24251 _ACEOF
24252
24253 fi
24254
24255 if test "$ol_enable_passwd" != no ; then
24256         BUILD_SLAPD=yes
24257         BUILD_PASSWD=$ol_enable_passwd
24258         if test "$ol_enable_passwd" = mod ; then
24259                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24260                 MFLAG=SLAPD_MOD_DYNAMIC
24261         else
24262                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24263                 MFLAG=SLAPD_MOD_STATIC
24264         fi
24265
24266 cat >>confdefs.h <<_ACEOF
24267 #define SLAPD_PASSWD $MFLAG
24268 _ACEOF
24269
24270 fi
24271
24272 if test "$ol_link_perl" != no ; then
24273         BUILD_SLAPD=yes
24274         BUILD_PERL=$ol_enable_perl
24275         if test "$ol_enable_perl" = mod ; then
24276                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24277                 MFLAG=SLAPD_MOD_DYNAMIC
24278         else
24279                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24280                 MFLAG=SLAPD_MOD_STATIC
24281         fi
24282
24283 cat >>confdefs.h <<_ACEOF
24284 #define SLAPD_PERL $MFLAG
24285 _ACEOF
24286
24287 fi
24288
24289 if test "$ol_enable_relay" != no ; then
24290         BUILD_SLAPD=yes
24291         BUILD_RELAY=$ol_enable_relay
24292         if test "$ol_enable_relay" = mod ; then
24293                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
24294                 MFLAG=SLAPD_MOD_DYNAMIC
24295         else
24296                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
24297                 MFLAG=SLAPD_MOD_STATIC
24298         fi
24299
24300 cat >>confdefs.h <<_ACEOF
24301 #define SLAPD_RELAY $MFLAG
24302 _ACEOF
24303
24304 fi
24305
24306 if test "$ol_enable_shell" != no ; then
24307         if test "$ol_link_threads" != no ; then
24308                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use of --without-threads is recommended with back-shell" >&5
24309 $as_echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
24310         fi
24311         BUILD_SLAPD=yes
24312         BUILD_SHELL=$ol_enable_shell
24313         if test "$ol_enable_shell" = mod ; then
24314                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24315                 MFLAG=SLAPD_MOD_DYNAMIC
24316         else
24317                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24318                 MFLAG=SLAPD_MOD_STATIC
24319         fi
24320
24321 cat >>confdefs.h <<_ACEOF
24322 #define SLAPD_SHELL $MFLAG
24323 _ACEOF
24324
24325 fi
24326
24327 if test "$ol_enable_sock" != no ; then
24328         BUILD_SLAPD=yes
24329         BUILD_SOCK=$ol_enable_sock
24330         if test "$ol_enable_sock" = mod ; then
24331                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sock"
24332                 MFLAG=SLAPD_MOD_DYNAMIC
24333         else
24334                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sock"
24335                 MFLAG=SLAPD_MOD_STATIC
24336         fi
24337
24338 cat >>confdefs.h <<_ACEOF
24339 #define SLAPD_SOCK $MFLAG
24340 _ACEOF
24341
24342 fi
24343
24344 if test "$ol_link_sql" != no ; then
24345         BUILD_SLAPD=yes
24346         BUILD_SQL=$ol_enable_sql
24347         if test "$ol_enable_sql" = mod; then
24348                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24349                 MFLAG=SLAPD_MOD_DYNAMIC
24350         else
24351                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24352                 MFLAG=SLAPD_MOD_STATIC
24353         fi
24354
24355 cat >>confdefs.h <<_ACEOF
24356 #define SLAPD_SQL $MFLAG
24357 _ACEOF
24358
24359 fi
24360
24361 if test "$ol_enable_accesslog" != no ; then
24362         BUILD_ACCESSLOG=$ol_enable_accesslog
24363         if test "$ol_enable_accesslog" = mod ; then
24364                 MFLAG=SLAPD_MOD_DYNAMIC
24365                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
24366         else
24367                 MFLAG=SLAPD_MOD_STATIC
24368                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
24369         fi
24370
24371 cat >>confdefs.h <<_ACEOF
24372 #define SLAPD_OVER_ACCESSLOG $MFLAG
24373 _ACEOF
24374
24375 fi
24376
24377 if test "$ol_enable_auditlog" != no ; then
24378         BUILD_AUDITLOG=$ol_enable_auditlog
24379         if test "$ol_enable_auditlog" = mod ; then
24380                 MFLAG=SLAPD_MOD_DYNAMIC
24381                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
24382         else
24383                 MFLAG=SLAPD_MOD_STATIC
24384                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
24385         fi
24386
24387 cat >>confdefs.h <<_ACEOF
24388 #define SLAPD_OVER_AUDITLOG $MFLAG
24389 _ACEOF
24390
24391 fi
24392
24393 if test "$ol_enable_collect" != no ; then
24394         BUILD_COLLECT=$ol_enable_collect
24395         if test "$ol_enable_collect" = mod ; then
24396                 MFLAG=SLAPD_MOD_DYNAMIC
24397                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS collect.la"
24398         else
24399                 MFLAG=SLAPD_MOD_STATIC
24400                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS collect.o"
24401         fi
24402
24403 cat >>confdefs.h <<_ACEOF
24404 #define SLAPD_OVER_COLLECT $MFLAG
24405 _ACEOF
24406
24407 fi
24408
24409 if test "$ol_enable_constraint" != no ; then
24410         BUILD_CONSTRAINT=$ol_enable_constraint
24411         if test "$ol_enable_constraint" = mod ; then
24412                 MFLAG=SLAPD_MOD_DYNAMIC
24413                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la"
24414         else
24415                 MFLAG=SLAPD_MOD_STATIC
24416                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o"
24417         fi
24418
24419 cat >>confdefs.h <<_ACEOF
24420 #define SLAPD_OVER_CONSTRAINT $MFLAG
24421 _ACEOF
24422
24423 fi
24424
24425 if test "$ol_enable_dds" != no ; then
24426         BUILD_DDS=$ol_enable_dds
24427         if test "$ol_enable_dds" = mod ; then
24428                 MFLAG=SLAPD_MOD_DYNAMIC
24429                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
24430         else
24431                 MFLAG=SLAPD_MOD_STATIC
24432                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
24433         fi
24434
24435 cat >>confdefs.h <<_ACEOF
24436 #define SLAPD_OVER_DDS $MFLAG
24437 _ACEOF
24438
24439 fi
24440
24441 if test "$ol_enable_deref" != no ; then
24442         BUILD_DEREF=$ol_enable_deref
24443         if test "$ol_enable_deref" = mod ; then
24444                 MFLAG=SLAPD_MOD_DYNAMIC
24445                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS deref.la"
24446         else
24447                 MFLAG=SLAPD_MOD_STATIC
24448                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS deref.o"
24449         fi
24450
24451 cat >>confdefs.h <<_ACEOF
24452 #define SLAPD_OVER_DEREF $MFLAG
24453 _ACEOF
24454
24455 fi
24456
24457 if test "$ol_enable_dyngroup" != no ; then
24458         BUILD_DYNGROUP=$ol_enable_dyngroup
24459         if test "$ol_enable_dyngroup" = mod ; then
24460                 MFLAG=SLAPD_MOD_DYNAMIC
24461                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24462         else
24463                 MFLAG=SLAPD_MOD_STATIC
24464                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
24465         fi
24466
24467 cat >>confdefs.h <<_ACEOF
24468 #define SLAPD_OVER_DYNGROUP $MFLAG
24469 _ACEOF
24470
24471 fi
24472
24473 if test "$ol_enable_dynlist" != no ; then
24474         BUILD_DYNLIST=$ol_enable_dynlist
24475         if test "$ol_enable_dynlist" = mod ; then
24476                 MFLAG=SLAPD_MOD_DYNAMIC
24477                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
24478         else
24479                 MFLAG=SLAPD_MOD_STATIC
24480                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
24481         fi
24482
24483 cat >>confdefs.h <<_ACEOF
24484 #define SLAPD_OVER_DYNLIST $MFLAG
24485 _ACEOF
24486
24487 fi
24488
24489 if test "$ol_enable_memberof" != no ; then
24490         BUILD_MEMBEROF=$ol_enable_memberof
24491         if test "$ol_enable_memberof" = mod ; then
24492                 MFLAG=SLAPD_MOD_DYNAMIC
24493                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la"
24494         else
24495                 MFLAG=SLAPD_MOD_STATIC
24496                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o"
24497         fi
24498
24499 cat >>confdefs.h <<_ACEOF
24500 #define SLAPD_OVER_MEMBEROF $MFLAG
24501 _ACEOF
24502
24503 fi
24504
24505 if test "$ol_enable_ppolicy" != no ; then
24506         BUILD_PPOLICY=$ol_enable_ppolicy
24507         if test "$ol_enable_ppolicy" = mod ; then
24508                 MFLAG=SLAPD_MOD_DYNAMIC
24509                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24510         else
24511                 MFLAG=SLAPD_MOD_STATIC
24512                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
24513         fi
24514
24515 cat >>confdefs.h <<_ACEOF
24516 #define SLAPD_OVER_PPOLICY $MFLAG
24517 _ACEOF
24518
24519 fi
24520
24521 if test "$ol_enable_proxycache" != no ; then
24522         BUILD_PROXYCACHE=$ol_enable_proxycache
24523         if test "$ol_enable_proxycache" = mod ; then
24524                 MFLAG=SLAPD_MOD_DYNAMIC
24525                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24526         else
24527                 MFLAG=SLAPD_MOD_STATIC
24528                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
24529         fi
24530
24531 cat >>confdefs.h <<_ACEOF
24532 #define SLAPD_OVER_PROXYCACHE $MFLAG
24533 _ACEOF
24534
24535 fi
24536
24537 if test "$ol_enable_refint" != no ; then
24538         BUILD_REFINT=$ol_enable_refint
24539         if test "$ol_enable_refint" = mod ; then
24540                 MFLAG=SLAPD_MOD_DYNAMIC
24541                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24542         else
24543                 MFLAG=SLAPD_MOD_STATIC
24544                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
24545         fi
24546
24547 cat >>confdefs.h <<_ACEOF
24548 #define SLAPD_OVER_REFINT $MFLAG
24549 _ACEOF
24550
24551 fi
24552
24553 if test "$ol_enable_retcode" != no ; then
24554         BUILD_RETCODE=$ol_enable_retcode
24555         if test "$ol_enable_retcode" = mod ; then
24556                 MFLAG=SLAPD_MOD_DYNAMIC
24557                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
24558         else
24559                 MFLAG=SLAPD_MOD_STATIC
24560                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
24561         fi
24562
24563 cat >>confdefs.h <<_ACEOF
24564 #define SLAPD_OVER_RETCODE $MFLAG
24565 _ACEOF
24566
24567 fi
24568
24569 if test "$ol_enable_rwm" != no ; then
24570         BUILD_REWRITE=yes
24571         BUILD_RWM=$ol_enable_rwm
24572         if test "$ol_enable_rwm" = mod ; then
24573                 MFLAG=SLAPD_MOD_DYNAMIC
24574                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24575         else
24576                 MFLAG=SLAPD_MOD_STATIC
24577                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
24578         fi
24579
24580 cat >>confdefs.h <<_ACEOF
24581 #define SLAPD_OVER_RWM $MFLAG
24582 _ACEOF
24583
24584 fi
24585
24586 if test "$ol_enable_seqmod" != no ; then
24587         BUILD_SEQMOD=$ol_enable_seqmod
24588         if test "$ol_enable_seqmod" = mod ; then
24589                 MFLAG=SLAPD_MOD_DYNAMIC
24590                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
24591         else
24592                 MFLAG=SLAPD_MOD_STATIC
24593                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
24594         fi
24595
24596 cat >>confdefs.h <<_ACEOF
24597 #define SLAPD_OVER_SEQMOD $MFLAG
24598 _ACEOF
24599
24600 fi
24601
24602 if test "$ol_enable_sssvlv" != no ; then
24603         BUILD_SSSVLV=$ol_enable_sssvlv
24604         if test "$ol_enable_sssvlv" = mod ; then
24605                 MFLAG=SLAPD_MOD_DYNAMIC
24606                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS sssvlv.la"
24607         else
24608                 MFLAG=SLAPD_MOD_STATIC
24609                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS sssvlv.o"
24610         fi
24611
24612 cat >>confdefs.h <<_ACEOF
24613 #define SLAPD_OVER_SSSVLV $MFLAG
24614 _ACEOF
24615
24616 fi
24617
24618 if test "$ol_enable_syncprov" != no ; then
24619         BUILD_SYNCPROV=$ol_enable_syncprov
24620         if test "$ol_enable_syncprov" = mod ; then
24621                 MFLAG=SLAPD_MOD_DYNAMIC
24622                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
24623         else
24624                 MFLAG=SLAPD_MOD_STATIC
24625                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
24626         fi
24627
24628 cat >>confdefs.h <<_ACEOF
24629 #define SLAPD_OVER_SYNCPROV $MFLAG
24630 _ACEOF
24631
24632 fi
24633
24634 if test "$ol_enable_translucent" != no ; then
24635         BUILD_TRANSLUCENT=$ol_enable_translucent
24636         if test "$ol_enable_translucent" = mod ; then
24637                 MFLAG=SLAPD_MOD_DYNAMIC
24638                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
24639         else
24640                 MFLAG=SLAPD_MOD_STATIC
24641                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
24642         fi
24643
24644 cat >>confdefs.h <<_ACEOF
24645 #define SLAPD_OVER_TRANSLUCENT $MFLAG
24646 _ACEOF
24647
24648 fi
24649
24650 if test "$ol_enable_unique" != no ; then
24651         BUILD_UNIQUE=$ol_enable_unique
24652         if test "$ol_enable_unique" = mod ; then
24653                 MFLAG=SLAPD_MOD_DYNAMIC
24654                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24655         else
24656                 MFLAG=SLAPD_MOD_STATIC
24657                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
24658         fi
24659
24660 cat >>confdefs.h <<_ACEOF
24661 #define SLAPD_OVER_UNIQUE $MFLAG
24662 _ACEOF
24663
24664 fi
24665
24666 if test "$ol_enable_valsort" != no ; then
24667         BUILD_VALSORT=$ol_enable_valsort
24668         if test "$ol_enable_valsort" = mod ; then
24669                 MFLAG=SLAPD_MOD_DYNAMIC
24670                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
24671         else
24672                 MFLAG=SLAPD_MOD_STATIC
24673                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
24674         fi
24675
24676 cat >>confdefs.h <<_ACEOF
24677 #define SLAPD_OVER_VALSORT $MFLAG
24678 _ACEOF
24679
24680 fi
24681
24682 if test "$ol_enable_rewrite" != no ; then
24683
24684 $as_echo "#define ENABLE_REWRITE 1" >>confdefs.h
24685
24686         BUILD_REWRITE=yes
24687 fi
24688
24689 if test "$ol_enable_slapi" != no ; then
24690
24691 $as_echo "#define ENABLE_SLAPI 1" >>confdefs.h
24692
24693         BUILD_SLAPI=yes
24694         SLAPD_SLAPI_DEPEND=libslapi.a
24695 fi
24696
24697
24698
24699 if test "$ac_cv_mingw32" = yes -o $ol_cv_msvc = yes ; then
24700         PLAT=NT
24701         SLAPD_MODULES_LDFLAGS=
24702 else
24703         PLAT=UNIX
24704 fi
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796 # Check whether --with-xxinstall was given.
24797 if test "${with_xxinstall+set}" = set; then :
24798   withval=$with_xxinstall;
24799 fi
24800
24801
24802
24803 ac_config_files="$ac_config_files Makefile:build/top.mk:Makefile.in:build/dir.mk doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk include/Makefile:build/top.mk:include/Makefile.in libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk servers/slapd/back-ndb/Makefile:build/top.mk:servers/slapd/back-ndb/Makefile.in:build/mod.mk servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk servers/slapd/back-sock/Makefile:build/top.mk:servers/slapd/back-sock/Makefile.in:build/mod.mk servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk tests/run tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk"
24804
24805
24806 ac_config_commands="$ac_config_commands default"
24807
24808
24809
24810 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24811 # Let make expand exec_prefix.
24812 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24813
24814 DEFS=-DHAVE_CONFIG_H
24815
24816 ac_libobjs=
24817 ac_ltlibobjs=
24818 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24819   # 1. Remove the extension, and $U if already installed.
24820   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24821   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24822   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24823   #    will be set to the directory where LIBOBJS objects are built.
24824   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24825   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24826 done
24827 LIBOBJS=$ac_libobjs
24828
24829 LTLIBOBJS=$ac_ltlibobjs
24830
24831
24832 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
24833   as_fn_error "conditional \"AMDEP\" was never defined.
24834 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24835 fi
24836 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24837   as_fn_error "conditional \"am__fastdepCC\" was never defined.
24838 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24839 fi
24840 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24841   as_fn_error "conditional \"am__fastdepCC\" was never defined.
24842 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24843 fi
24844
24845
24846 : ${CONFIG_STATUS=./config.status}
24847 ac_write_fail=0
24848 ac_clean_files_save=$ac_clean_files
24849 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24850 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24851 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24852 as_write_fail=0
24853 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24854 #! $SHELL
24855 # Generated by $as_me.
24856 # Run this file to recreate the current configuration.
24857 # Compiler output produced by configure, useful for debugging
24858 # configure, is in config.log if it exists.
24859
24860 debug=false
24861 ac_cs_recheck=false
24862 ac_cs_silent=false
24863
24864 SHELL=\${CONFIG_SHELL-$SHELL}
24865 export SHELL
24866 _ASEOF
24867 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24868 ## -------------------- ##
24869 ## M4sh Initialization. ##
24870 ## -------------------- ##
24871
24872 # Be more Bourne compatible
24873 DUALCASE=1; export DUALCASE # for MKS sh
24874 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24875   emulate sh
24876   NULLCMD=:
24877   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24878   # is contrary to our usage.  Disable this feature.
24879   alias -g '${1+"$@"}'='"$@"'
24880   setopt NO_GLOB_SUBST
24881 else
24882   case `(set -o) 2>/dev/null` in #(
24883   *posix*) :
24884     set -o posix ;; #(
24885   *) :
24886      ;;
24887 esac
24888 fi
24889
24890
24891 as_nl='
24892 '
24893 export as_nl
24894 # Printing a long string crashes Solaris 7 /usr/bin/printf.
24895 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24896 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24897 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24898 # Prefer a ksh shell builtin over an external printf program on Solaris,
24899 # but without wasting forks for bash or zsh.
24900 if test -z "$BASH_VERSION$ZSH_VERSION" \
24901     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24902   as_echo='print -r --'
24903   as_echo_n='print -rn --'
24904 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24905   as_echo='printf %s\n'
24906   as_echo_n='printf %s'
24907 else
24908   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24909     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24910     as_echo_n='/usr/ucb/echo -n'
24911   else
24912     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24913     as_echo_n_body='eval
24914       arg=$1;
24915       case $arg in #(
24916       *"$as_nl"*)
24917         expr "X$arg" : "X\\(.*\\)$as_nl";
24918         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24919       esac;
24920       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24921     '
24922     export as_echo_n_body
24923     as_echo_n='sh -c $as_echo_n_body as_echo'
24924   fi
24925   export as_echo_body
24926   as_echo='sh -c $as_echo_body as_echo'
24927 fi
24928
24929 # The user is always right.
24930 if test "${PATH_SEPARATOR+set}" != set; then
24931   PATH_SEPARATOR=:
24932   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24933     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24934       PATH_SEPARATOR=';'
24935   }
24936 fi
24937
24938
24939 # IFS
24940 # We need space, tab and new line, in precisely that order.  Quoting is
24941 # there to prevent editors from complaining about space-tab.
24942 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
24943 # splitting by setting IFS to empty value.)
24944 IFS=" ""        $as_nl"
24945
24946 # Find who we are.  Look in the path if we contain no directory separator.
24947 case $0 in #((
24948   *[\\/]* ) as_myself=$0 ;;
24949   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24950 for as_dir in $PATH
24951 do
24952   IFS=$as_save_IFS
24953   test -z "$as_dir" && as_dir=.
24954     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24955   done
24956 IFS=$as_save_IFS
24957
24958      ;;
24959 esac
24960 # We did not find ourselves, most probably we were run as `sh COMMAND'
24961 # in which case we are not to be found in the path.
24962 if test "x$as_myself" = x; then
24963   as_myself=$0
24964 fi
24965 if test ! -f "$as_myself"; then
24966   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24967   exit 1
24968 fi
24969
24970 # Unset variables that we do not need and which cause bugs (e.g. in
24971 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
24972 # suppresses any "Segmentation fault" message there.  '((' could
24973 # trigger a bug in pdksh 5.2.14.
24974 for as_var in BASH_ENV ENV MAIL MAILPATH
24975 do eval test x\${$as_var+set} = xset \
24976   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24977 done
24978 PS1='$ '
24979 PS2='> '
24980 PS4='+ '
24981
24982 # NLS nuisances.
24983 LC_ALL=C
24984 export LC_ALL
24985 LANGUAGE=C
24986 export LANGUAGE
24987
24988 # CDPATH.
24989 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24990
24991
24992 # as_fn_error ERROR [LINENO LOG_FD]
24993 # ---------------------------------
24994 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24995 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24996 # script with status $?, using 1 if that was 0.
24997 as_fn_error ()
24998 {
24999   as_status=$?; test $as_status -eq 0 && as_status=1
25000   if test "$3"; then
25001     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25002     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
25003   fi
25004   $as_echo "$as_me: error: $1" >&2
25005   as_fn_exit $as_status
25006 } # as_fn_error
25007
25008
25009 # as_fn_set_status STATUS
25010 # -----------------------
25011 # Set $? to STATUS, without forking.
25012 as_fn_set_status ()
25013 {
25014   return $1
25015 } # as_fn_set_status
25016
25017 # as_fn_exit STATUS
25018 # -----------------
25019 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25020 as_fn_exit ()
25021 {
25022   set +e
25023   as_fn_set_status $1
25024   exit $1
25025 } # as_fn_exit
25026
25027 # as_fn_unset VAR
25028 # ---------------
25029 # Portably unset VAR.
25030 as_fn_unset ()
25031 {
25032   { eval $1=; unset $1;}
25033 }
25034 as_unset=as_fn_unset
25035 # as_fn_append VAR VALUE
25036 # ----------------------
25037 # Append the text in VALUE to the end of the definition contained in VAR. Take
25038 # advantage of any shell optimizations that allow amortized linear growth over
25039 # repeated appends, instead of the typical quadratic growth present in naive
25040 # implementations.
25041 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25042   eval 'as_fn_append ()
25043   {
25044     eval $1+=\$2
25045   }'
25046 else
25047   as_fn_append ()
25048   {
25049     eval $1=\$$1\$2
25050   }
25051 fi # as_fn_append
25052
25053 # as_fn_arith ARG...
25054 # ------------------
25055 # Perform arithmetic evaluation on the ARGs, and store the result in the
25056 # global $as_val. Take advantage of shells that can avoid forks. The arguments
25057 # must be portable across $(()) and expr.
25058 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25059   eval 'as_fn_arith ()
25060   {
25061     as_val=$(( $* ))
25062   }'
25063 else
25064   as_fn_arith ()
25065   {
25066     as_val=`expr "$@" || test $? -eq 1`
25067   }
25068 fi # as_fn_arith
25069
25070
25071 if expr a : '\(a\)' >/dev/null 2>&1 &&
25072    test "X`expr 00001 : '.*\(...\)'`" = X001; then
25073   as_expr=expr
25074 else
25075   as_expr=false
25076 fi
25077
25078 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25079   as_basename=basename
25080 else
25081   as_basename=false
25082 fi
25083
25084 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25085   as_dirname=dirname
25086 else
25087   as_dirname=false
25088 fi
25089
25090 as_me=`$as_basename -- "$0" ||
25091 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25092          X"$0" : 'X\(//\)$' \| \
25093          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25094 $as_echo X/"$0" |
25095     sed '/^.*\/\([^/][^/]*\)\/*$/{
25096             s//\1/
25097             q
25098           }
25099           /^X\/\(\/\/\)$/{
25100             s//\1/
25101             q
25102           }
25103           /^X\/\(\/\).*/{
25104             s//\1/
25105             q
25106           }
25107           s/.*/./; q'`
25108
25109 # Avoid depending upon Character Ranges.
25110 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25111 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25112 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25113 as_cr_digits='0123456789'
25114 as_cr_alnum=$as_cr_Letters$as_cr_digits
25115
25116 ECHO_C= ECHO_N= ECHO_T=
25117 case `echo -n x` in #(((((
25118 -n*)
25119   case `echo 'xy\c'` in
25120   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
25121   xy)  ECHO_C='\c';;
25122   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
25123        ECHO_T=' ';;
25124   esac;;
25125 *)
25126   ECHO_N='-n';;
25127 esac
25128
25129 rm -f conf$$ conf$$.exe conf$$.file
25130 if test -d conf$$.dir; then
25131   rm -f conf$$.dir/conf$$.file
25132 else
25133   rm -f conf$$.dir
25134   mkdir conf$$.dir 2>/dev/null
25135 fi
25136 if (echo >conf$$.file) 2>/dev/null; then
25137   if ln -s conf$$.file conf$$ 2>/dev/null; then
25138     as_ln_s='ln -s'
25139     # ... but there are two gotchas:
25140     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25141     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25142     # In both cases, we have to default to `cp -p'.
25143     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25144       as_ln_s='cp -p'
25145   elif ln conf$$.file conf$$ 2>/dev/null; then
25146     as_ln_s=ln
25147   else
25148     as_ln_s='cp -p'
25149   fi
25150 else
25151   as_ln_s='cp -p'
25152 fi
25153 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25154 rmdir conf$$.dir 2>/dev/null
25155
25156
25157 # as_fn_mkdir_p
25158 # -------------
25159 # Create "$as_dir" as a directory, including parents if necessary.
25160 as_fn_mkdir_p ()
25161 {
25162
25163   case $as_dir in #(
25164   -*) as_dir=./$as_dir;;
25165   esac
25166   test -d "$as_dir" || eval $as_mkdir_p || {
25167     as_dirs=
25168     while :; do
25169       case $as_dir in #(
25170       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25171       *) as_qdir=$as_dir;;
25172       esac
25173       as_dirs="'$as_qdir' $as_dirs"
25174       as_dir=`$as_dirname -- "$as_dir" ||
25175 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25176          X"$as_dir" : 'X\(//\)[^/]' \| \
25177          X"$as_dir" : 'X\(//\)$' \| \
25178          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25179 $as_echo X"$as_dir" |
25180     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25181             s//\1/
25182             q
25183           }
25184           /^X\(\/\/\)[^/].*/{
25185             s//\1/
25186             q
25187           }
25188           /^X\(\/\/\)$/{
25189             s//\1/
25190             q
25191           }
25192           /^X\(\/\).*/{
25193             s//\1/
25194             q
25195           }
25196           s/.*/./; q'`
25197       test -d "$as_dir" && break
25198     done
25199     test -z "$as_dirs" || eval "mkdir $as_dirs"
25200   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
25201
25202
25203 } # as_fn_mkdir_p
25204 if mkdir -p . 2>/dev/null; then
25205   as_mkdir_p='mkdir -p "$as_dir"'
25206 else
25207   test -d ./-p && rmdir ./-p
25208   as_mkdir_p=false
25209 fi
25210
25211 if test -x / >/dev/null 2>&1; then
25212   as_test_x='test -x'
25213 else
25214   if ls -dL / >/dev/null 2>&1; then
25215     as_ls_L_option=L
25216   else
25217     as_ls_L_option=
25218   fi
25219   as_test_x='
25220     eval sh -c '\''
25221       if test -d "$1"; then
25222         test -d "$1/.";
25223       else
25224         case $1 in #(
25225         -*)set "./$1";;
25226         esac;
25227         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
25228         ???[sx]*):;;*)false;;esac;fi
25229     '\'' sh
25230   '
25231 fi
25232 as_executable_p=$as_test_x
25233
25234 # Sed expression to map a string onto a valid CPP name.
25235 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25236
25237 # Sed expression to map a string onto a valid variable name.
25238 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25239
25240
25241 exec 6>&1
25242 ## ----------------------------------- ##
25243 ## Main body of $CONFIG_STATUS script. ##
25244 ## ----------------------------------- ##
25245 _ASEOF
25246 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25247
25248 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25249 # Save the log message, to keep $0 and so on meaningful, and to
25250 # report actual input values of CONFIG_FILES etc. instead of their
25251 # values after options handling.
25252 ac_log="
25253 This file was extended by $as_me, which was
25254 generated by GNU Autoconf 2.65.  Invocation command line was
25255
25256   CONFIG_FILES    = $CONFIG_FILES
25257   CONFIG_HEADERS  = $CONFIG_HEADERS
25258   CONFIG_LINKS    = $CONFIG_LINKS
25259   CONFIG_COMMANDS = $CONFIG_COMMANDS
25260   $ $0 $@
25261
25262 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25263 "
25264
25265 _ACEOF
25266
25267 case $ac_config_files in *"
25268 "*) set x $ac_config_files; shift; ac_config_files=$*;;
25269 esac
25270
25271 case $ac_config_headers in *"
25272 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25273 esac
25274
25275
25276 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25277 # Files that config.status was made for.
25278 config_files="$ac_config_files"
25279 config_headers="$ac_config_headers"
25280 config_commands="$ac_config_commands"
25281
25282 _ACEOF
25283
25284 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25285 ac_cs_usage="\
25286 \`$as_me' instantiates files and other configuration actions
25287 from templates according to the current configuration.  Unless the files
25288 and actions are specified as TAGs, all are instantiated by default.
25289
25290 Usage: $0 [OPTION]... [TAG]...
25291
25292   -h, --help       print this help, then exit
25293   -V, --version    print version number and configuration settings, then exit
25294       --config     print configuration, then exit
25295   -q, --quiet, --silent
25296                    do not print progress messages
25297   -d, --debug      don't remove temporary files
25298       --recheck    update $as_me by reconfiguring in the same conditions
25299       --file=FILE[:TEMPLATE]
25300                    instantiate the configuration file FILE
25301       --header=FILE[:TEMPLATE]
25302                    instantiate the configuration header FILE
25303
25304 Configuration files:
25305 $config_files
25306
25307 Configuration headers:
25308 $config_headers
25309
25310 Configuration commands:
25311 $config_commands
25312
25313 Report bugs to <<http://www.openldap.org/its/>>."
25314
25315 _ACEOF
25316 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25317 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
25318 ac_cs_version="\\
25319 config.status
25320 configured by $0, generated by GNU Autoconf 2.65,
25321   with options \\"\$ac_cs_config\\"
25322
25323 Copyright (C) 2009 Free Software Foundation, Inc.
25324 This config.status script is free software; the Free Software Foundation
25325 gives unlimited permission to copy, distribute and modify it."
25326
25327 ac_pwd='$ac_pwd'
25328 srcdir='$srcdir'
25329 INSTALL='$INSTALL'
25330 AWK='$AWK'
25331 test -n "\$AWK" || AWK=awk
25332 _ACEOF
25333
25334 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25335 # The default lists apply if the user does not specify any file.
25336 ac_need_defaults=:
25337 while test $# != 0
25338 do
25339   case $1 in
25340   --*=*)
25341     ac_option=`expr "X$1" : 'X\([^=]*\)='`
25342     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25343     ac_shift=:
25344     ;;
25345   *)
25346     ac_option=$1
25347     ac_optarg=$2
25348     ac_shift=shift
25349     ;;
25350   esac
25351
25352   case $ac_option in
25353   # Handling of the options.
25354   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25355     ac_cs_recheck=: ;;
25356   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25357     $as_echo "$ac_cs_version"; exit ;;
25358   --config | --confi | --conf | --con | --co | --c )
25359     $as_echo "$ac_cs_config"; exit ;;
25360   --debug | --debu | --deb | --de | --d | -d )
25361     debug=: ;;
25362   --file | --fil | --fi | --f )
25363     $ac_shift
25364     case $ac_optarg in
25365     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25366     esac
25367     as_fn_append CONFIG_FILES " '$ac_optarg'"
25368     ac_need_defaults=false;;
25369   --header | --heade | --head | --hea )
25370     $ac_shift
25371     case $ac_optarg in
25372     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25373     esac
25374     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25375     ac_need_defaults=false;;
25376   --he | --h)
25377     # Conflict between --help and --header
25378     as_fn_error "ambiguous option: \`$1'
25379 Try \`$0 --help' for more information.";;
25380   --help | --hel | -h )
25381     $as_echo "$ac_cs_usage"; exit ;;
25382   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25383   | -silent | --silent | --silen | --sile | --sil | --si | --s)
25384     ac_cs_silent=: ;;
25385
25386   # This is an error.
25387   -*) as_fn_error "unrecognized option: \`$1'
25388 Try \`$0 --help' for more information." ;;
25389
25390   *) as_fn_append ac_config_targets " $1"
25391      ac_need_defaults=false ;;
25392
25393   esac
25394   shift
25395 done
25396
25397 ac_configure_extra_args=
25398
25399 if $ac_cs_silent; then
25400   exec 6>/dev/null
25401   ac_configure_extra_args="$ac_configure_extra_args --silent"
25402 fi
25403
25404 _ACEOF
25405 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25406 if \$ac_cs_recheck; then
25407   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25408   shift
25409   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25410   CONFIG_SHELL='$SHELL'
25411   export CONFIG_SHELL
25412   exec "\$@"
25413 fi
25414
25415 _ACEOF
25416 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25417 exec 5>>config.log
25418 {
25419   echo
25420   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25421 ## Running $as_me. ##
25422 _ASBOX
25423   $as_echo "$ac_log"
25424 } >&5
25425
25426 _ACEOF
25427 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25428 #
25429 # INIT-COMMANDS
25430 #
25431 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25432
25433 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25434 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
25435
25436
25437 _ACEOF
25438
25439 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25440
25441 # Handling of arguments.
25442 for ac_config_target in $ac_config_targets
25443 do
25444   case $ac_config_target in
25445     "include/portable.h") CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
25446     "include/ldap_features.h") CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
25447     "include/lber_types.h") CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
25448     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25449     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
25450     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
25451     "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
25452     "doc/man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
25453     "doc/man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
25454     "doc/man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
25455     "doc/man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
25456     "clients/Makefile") CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
25457     "clients/tools/Makefile") CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
25458     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
25459     "libraries/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
25460     "libraries/liblber/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25461     "libraries/libldap/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25462     "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" ;;
25463     "libraries/liblunicode/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25464     "libraries/liblutil/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25465     "libraries/librewrite/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25466     "servers/Makefile") CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
25467     "servers/slapd/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
25468     "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" ;;
25469     "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" ;;
25470     "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" ;;
25471     "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" ;;
25472     "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" ;;
25473     "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" ;;
25474     "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" ;;
25475     "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" ;;
25476     "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" ;;
25477     "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" ;;
25478     "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" ;;
25479     "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" ;;
25480     "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" ;;
25481     "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" ;;
25482     "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" ;;
25483     "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" ;;
25484     "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" ;;
25485     "servers/slapd/overlays/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
25486     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
25487     "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;;
25488     "tests/progs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
25489     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25490
25491   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25492   esac
25493 done
25494
25495
25496 # If the user did not use the arguments to specify the items to instantiate,
25497 # then the envvar interface is used.  Set only those that are not.
25498 # We use the long form for the default assignment because of an extremely
25499 # bizarre bug on SunOS 4.1.3.
25500 if $ac_need_defaults; then
25501   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25502   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25503   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25504 fi
25505
25506 # Have a temporary directory for convenience.  Make it in the build tree
25507 # simply because there is no reason against having it here, and in addition,
25508 # creating and moving files from /tmp can sometimes cause problems.
25509 # Hook for its removal unless debugging.
25510 # Note that there is a small window in which the directory will not be cleaned:
25511 # after its creation but before its name has been assigned to `$tmp'.
25512 $debug ||
25513 {
25514   tmp=
25515   trap 'exit_status=$?
25516   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25517 ' 0
25518   trap 'as_fn_exit 1' 1 2 13 15
25519 }
25520 # Create a (secure) tmp directory for tmp files.
25521
25522 {
25523   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25524   test -n "$tmp" && test -d "$tmp"
25525 }  ||
25526 {
25527   tmp=./conf$$-$RANDOM
25528   (umask 077 && mkdir "$tmp")
25529 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25530
25531 # Set up the scripts for CONFIG_FILES section.
25532 # No need to generate them if there are no CONFIG_FILES.
25533 # This happens for instance with `./config.status config.h'.
25534 if test -n "$CONFIG_FILES"; then
25535
25536
25537 ac_cr=`echo X | tr X '\015'`
25538 # On cygwin, bash can eat \r inside `` if the user requested igncr.
25539 # But we know of no other shell where ac_cr would be empty at this
25540 # point, so we can use a bashism as a fallback.
25541 if test "x$ac_cr" = x; then
25542   eval ac_cr=\$\'\\r\'
25543 fi
25544 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25545 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25546   ac_cs_awk_cr='\r'
25547 else
25548   ac_cs_awk_cr=$ac_cr
25549 fi
25550
25551 echo 'BEGIN {' >"$tmp/subs1.awk" &&
25552 _ACEOF
25553
25554
25555 {
25556   echo "cat >conf$$subs.awk <<_ACEOF" &&
25557   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25558   echo "_ACEOF"
25559 } >conf$$subs.sh ||
25560   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25561 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25562 ac_delim='%!_!# '
25563 for ac_last_try in false false false false false :; do
25564   . ./conf$$subs.sh ||
25565     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25566
25567   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25568   if test $ac_delim_n = $ac_delim_num; then
25569     break
25570   elif $ac_last_try; then
25571     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25572   else
25573     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25574   fi
25575 done
25576 rm -f conf$$subs.sh
25577
25578 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25579 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
25580 _ACEOF
25581 sed -n '
25582 h
25583 s/^/S["/; s/!.*/"]=/
25584 p
25585 g
25586 s/^[^!]*!//
25587 :repl
25588 t repl
25589 s/'"$ac_delim"'$//
25590 t delim
25591 :nl
25592 h
25593 s/\(.\{148\}\)..*/\1/
25594 t more1
25595 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25596 p
25597 n
25598 b repl
25599 :more1
25600 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25601 p
25602 g
25603 s/.\{148\}//
25604 t nl
25605 :delim
25606 h
25607 s/\(.\{148\}\)..*/\1/
25608 t more2
25609 s/["\\]/\\&/g; s/^/"/; s/$/"/
25610 p
25611 b
25612 :more2
25613 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25614 p
25615 g
25616 s/.\{148\}//
25617 t delim
25618 ' <conf$$subs.awk | sed '
25619 /^[^""]/{
25620   N
25621   s/\n//
25622 }
25623 ' >>$CONFIG_STATUS || ac_write_fail=1
25624 rm -f conf$$subs.awk
25625 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25626 _ACAWK
25627 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
25628   for (key in S) S_is_set[key] = 1
25629   FS = "\a"
25630
25631 }
25632 {
25633   line = $ 0
25634   nfields = split(line, field, "@")
25635   substed = 0
25636   len = length(field[1])
25637   for (i = 2; i < nfields; i++) {
25638     key = field[i]
25639     keylen = length(key)
25640     if (S_is_set[key]) {
25641       value = S[key]
25642       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25643       len += length(value) + length(field[++i])
25644       substed = 1
25645     } else
25646       len += 1 + keylen
25647   }
25648
25649   print line
25650 }
25651
25652 _ACAWK
25653 _ACEOF
25654 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25655 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25656   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25657 else
25658   cat
25659 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25660   || as_fn_error "could not setup config files machinery" "$LINENO" 5
25661 _ACEOF
25662
25663 # VPATH may cause trouble with some makes, so we remove $(srcdir),
25664 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25665 # trailing colons and then remove the whole line if VPATH becomes empty
25666 # (actually we leave an empty line to preserve line numbers).
25667 if test "x$srcdir" = x.; then
25668   ac_vpsub='/^[  ]*VPATH[        ]*=/{
25669 s/:*\$(srcdir):*/:/
25670 s/:*\${srcdir}:*/:/
25671 s/:*@srcdir@:*/:/
25672 s/^\([^=]*=[     ]*\):*/\1/
25673 s/:*$//
25674 s/^[^=]*=[       ]*$//
25675 }'
25676 fi
25677
25678 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25679 fi # test -n "$CONFIG_FILES"
25680
25681 # Set up the scripts for CONFIG_HEADERS section.
25682 # No need to generate them if there are no CONFIG_HEADERS.
25683 # This happens for instance with `./config.status Makefile'.
25684 if test -n "$CONFIG_HEADERS"; then
25685 cat >"$tmp/defines.awk" <<\_ACAWK ||
25686 BEGIN {
25687 _ACEOF
25688
25689 # Transform confdefs.h into an awk script `defines.awk', embedded as
25690 # here-document in config.status, that substitutes the proper values into
25691 # config.h.in to produce config.h.
25692
25693 # Create a delimiter string that does not exist in confdefs.h, to ease
25694 # handling of long lines.
25695 ac_delim='%!_!# '
25696 for ac_last_try in false false :; do
25697   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
25698   if test -z "$ac_t"; then
25699     break
25700   elif $ac_last_try; then
25701     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
25702   else
25703     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25704   fi
25705 done
25706
25707 # For the awk script, D is an array of macro values keyed by name,
25708 # likewise P contains macro parameters if any.  Preserve backslash
25709 # newline sequences.
25710
25711 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25712 sed -n '
25713 s/.\{148\}/&'"$ac_delim"'/g
25714 t rset
25715 :rset
25716 s/^[     ]*#[    ]*define[       ][      ]*/ /
25717 t def
25718 d
25719 :def
25720 s/\\$//
25721 t bsnl
25722 s/["\\]/\\&/g
25723 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
25724 D["\1"]=" \3"/p
25725 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
25726 d
25727 :bsnl
25728 s/["\\]/\\&/g
25729 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
25730 D["\1"]=" \3\\\\\\n"\\/p
25731 t cont
25732 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25733 t cont
25734 d
25735 :cont
25736 n
25737 s/.\{148\}/&'"$ac_delim"'/g
25738 t clear
25739 :clear
25740 s/\\$//
25741 t bsnlc
25742 s/["\\]/\\&/g; s/^/"/; s/$/"/p
25743 d
25744 :bsnlc
25745 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25746 b cont
25747 ' <confdefs.h | sed '
25748 s/'"$ac_delim"'/"\\\
25749 "/g' >>$CONFIG_STATUS || ac_write_fail=1
25750
25751 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25752   for (key in D) D_is_set[key] = 1
25753   FS = "\a"
25754 }
25755 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25756   line = \$ 0
25757   split(line, arg, " ")
25758   if (arg[1] == "#") {
25759     defundef = arg[2]
25760     mac1 = arg[3]
25761   } else {
25762     defundef = substr(arg[1], 2)
25763     mac1 = arg[2]
25764   }
25765   split(mac1, mac2, "(") #)
25766   macro = mac2[1]
25767   prefix = substr(line, 1, index(line, defundef) - 1)
25768   if (D_is_set[macro]) {
25769     # Preserve the white space surrounding the "#".
25770     print prefix "define", macro P[macro] D[macro]
25771     next
25772   } else {
25773     # Replace #undef with comments.  This is necessary, for example,
25774     # in the case of _POSIX_SOURCE, which is predefined and required
25775     # on some systems where configure will not decide to define it.
25776     if (defundef == "undef") {
25777       print "/*", prefix defundef, macro, "*/"
25778       next
25779     }
25780   }
25781 }
25782 { print }
25783 _ACAWK
25784 _ACEOF
25785 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25786   as_fn_error "could not setup config headers machinery" "$LINENO" 5
25787 fi # test -n "$CONFIG_HEADERS"
25788
25789
25790 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
25791 shift
25792 for ac_tag
25793 do
25794   case $ac_tag in
25795   :[FHLC]) ac_mode=$ac_tag; continue;;
25796   esac
25797   case $ac_mode$ac_tag in
25798   :[FHL]*:*);;
25799   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
25800   :[FH]-) ac_tag=-:-;;
25801   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25802   esac
25803   ac_save_IFS=$IFS
25804   IFS=:
25805   set x $ac_tag
25806   IFS=$ac_save_IFS
25807   shift
25808   ac_file=$1
25809   shift
25810
25811   case $ac_mode in
25812   :L) ac_source=$1;;
25813   :[FH])
25814     ac_file_inputs=
25815     for ac_f
25816     do
25817       case $ac_f in
25818       -) ac_f="$tmp/stdin";;
25819       *) # Look for the file first in the build tree, then in the source tree
25820          # (if the path is not absolute).  The absolute path cannot be DOS-style,
25821          # because $ac_f cannot contain `:'.
25822          test -f "$ac_f" ||
25823            case $ac_f in
25824            [\\/$]*) false;;
25825            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25826            esac ||
25827            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25828       esac
25829       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25830       as_fn_append ac_file_inputs " '$ac_f'"
25831     done
25832
25833     # Let's still pretend it is `configure' which instantiates (i.e., don't
25834     # use $as_me), people would be surprised to read:
25835     #    /* config.h.  Generated by config.status.  */
25836     configure_input='Generated from '`
25837           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25838         `' by configure.'
25839     if test x"$ac_file" != x-; then
25840       configure_input="$ac_file.  $configure_input"
25841       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25842 $as_echo "$as_me: creating $ac_file" >&6;}
25843     fi
25844     # Neutralize special characters interpreted by sed in replacement strings.
25845     case $configure_input in #(
25846     *\&* | *\|* | *\\* )
25847        ac_sed_conf_input=`$as_echo "$configure_input" |
25848        sed 's/[\\\\&|]/\\\\&/g'`;; #(
25849     *) ac_sed_conf_input=$configure_input;;
25850     esac
25851
25852     case $ac_tag in
25853     *:-:* | *:-) cat >"$tmp/stdin" \
25854       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
25855     esac
25856     ;;
25857   esac
25858
25859   ac_dir=`$as_dirname -- "$ac_file" ||
25860 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25861          X"$ac_file" : 'X\(//\)[^/]' \| \
25862          X"$ac_file" : 'X\(//\)$' \| \
25863          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25864 $as_echo X"$ac_file" |
25865     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25866             s//\1/
25867             q
25868           }
25869           /^X\(\/\/\)[^/].*/{
25870             s//\1/
25871             q
25872           }
25873           /^X\(\/\/\)$/{
25874             s//\1/
25875             q
25876           }
25877           /^X\(\/\).*/{
25878             s//\1/
25879             q
25880           }
25881           s/.*/./; q'`
25882   as_dir="$ac_dir"; as_fn_mkdir_p
25883   ac_builddir=.
25884
25885 case "$ac_dir" in
25886 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25887 *)
25888   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25889   # A ".." for each directory in $ac_dir_suffix.
25890   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25891   case $ac_top_builddir_sub in
25892   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25893   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25894   esac ;;
25895 esac
25896 ac_abs_top_builddir=$ac_pwd
25897 ac_abs_builddir=$ac_pwd$ac_dir_suffix
25898 # for backward compatibility:
25899 ac_top_builddir=$ac_top_build_prefix
25900
25901 case $srcdir in
25902   .)  # We are building in place.
25903     ac_srcdir=.
25904     ac_top_srcdir=$ac_top_builddir_sub
25905     ac_abs_top_srcdir=$ac_pwd ;;
25906   [\\/]* | ?:[\\/]* )  # Absolute name.
25907     ac_srcdir=$srcdir$ac_dir_suffix;
25908     ac_top_srcdir=$srcdir
25909     ac_abs_top_srcdir=$srcdir ;;
25910   *) # Relative name.
25911     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25912     ac_top_srcdir=$ac_top_build_prefix$srcdir
25913     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25914 esac
25915 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25916
25917
25918   case $ac_mode in
25919   :F)
25920   #
25921   # CONFIG_FILE
25922   #
25923
25924   case $INSTALL in
25925   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25926   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25927   esac
25928 _ACEOF
25929
25930 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25931 # If the template does not know about datarootdir, expand it.
25932 # FIXME: This hack should be removed a few years after 2.60.
25933 ac_datarootdir_hack=; ac_datarootdir_seen=
25934 ac_sed_dataroot='
25935 /datarootdir/ {
25936   p
25937   q
25938 }
25939 /@datadir@/p
25940 /@docdir@/p
25941 /@infodir@/p
25942 /@localedir@/p
25943 /@mandir@/p'
25944 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25945 *datarootdir*) ac_datarootdir_seen=yes;;
25946 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25947   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25948 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25949 _ACEOF
25950 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25951   ac_datarootdir_hack='
25952   s&@datadir@&$datadir&g
25953   s&@docdir@&$docdir&g
25954   s&@infodir@&$infodir&g
25955   s&@localedir@&$localedir&g
25956   s&@mandir@&$mandir&g
25957   s&\\\${datarootdir}&$datarootdir&g' ;;
25958 esac
25959 _ACEOF
25960
25961 # Neutralize VPATH when `$srcdir' = `.'.
25962 # Shell code in configure.ac might set extrasub.
25963 # FIXME: do we really want to maintain this feature?
25964 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25965 ac_sed_extra="$ac_vpsub
25966 $extrasub
25967 _ACEOF
25968 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25969 :t
25970 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25971 s|@configure_input@|$ac_sed_conf_input|;t t
25972 s&@top_builddir@&$ac_top_builddir_sub&;t t
25973 s&@top_build_prefix@&$ac_top_build_prefix&;t t
25974 s&@srcdir@&$ac_srcdir&;t t
25975 s&@abs_srcdir@&$ac_abs_srcdir&;t t
25976 s&@top_srcdir@&$ac_top_srcdir&;t t
25977 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25978 s&@builddir@&$ac_builddir&;t t
25979 s&@abs_builddir@&$ac_abs_builddir&;t t
25980 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25981 s&@INSTALL@&$ac_INSTALL&;t t
25982 $ac_datarootdir_hack
25983 "
25984 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
25985   || as_fn_error "could not create $ac_file" "$LINENO" 5
25986
25987 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25988   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25989   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25990   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25991 which seems to be undefined.  Please make sure it is defined." >&5
25992 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25993 which seems to be undefined.  Please make sure it is defined." >&2;}
25994
25995   rm -f "$tmp/stdin"
25996   case $ac_file in
25997   -) cat "$tmp/out" && rm -f "$tmp/out";;
25998   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
25999   esac \
26000   || as_fn_error "could not create $ac_file" "$LINENO" 5
26001  ;;
26002   :H)
26003   #
26004   # CONFIG_HEADER
26005   #
26006   if test x"$ac_file" != x-; then
26007     {
26008       $as_echo "/* $configure_input  */" \
26009       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
26010     } >"$tmp/config.h" \
26011       || as_fn_error "could not create $ac_file" "$LINENO" 5
26012     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
26013       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26014 $as_echo "$as_me: $ac_file is unchanged" >&6;}
26015     else
26016       rm -f "$ac_file"
26017       mv "$tmp/config.h" "$ac_file" \
26018         || as_fn_error "could not create $ac_file" "$LINENO" 5
26019     fi
26020   else
26021     $as_echo "/* $configure_input  */" \
26022       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
26023       || as_fn_error "could not create -" "$LINENO" 5
26024   fi
26025 # Compute "$ac_file"'s index in $config_headers.
26026 _am_stamp_count=1
26027 for _am_header in $config_headers :; do
26028   case $_am_header in
26029     "$ac_file" | "$ac_file":* )
26030       break ;;
26031     * )
26032       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26033   esac
26034 done
26035 echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
26036 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26037          X"$ac_file" : 'X\(//\)[^/]' \| \
26038          X"$ac_file" : 'X\(//\)$' \| \
26039          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26040 $as_echo X"$ac_file" |
26041     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26042             s//\1/
26043             q
26044           }
26045           /^X\(\/\/\)[^/].*/{
26046             s//\1/
26047             q
26048           }
26049           /^X\(\/\/\)$/{
26050             s//\1/
26051             q
26052           }
26053           /^X\(\/\).*/{
26054             s//\1/
26055             q
26056           }
26057           s/.*/./; q'`/stamp-h$_am_stamp_count
26058  ;;
26059
26060   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26061 $as_echo "$as_me: executing $ac_file commands" >&6;}
26062  ;;
26063   esac
26064
26065
26066   case $ac_file$ac_mode in
26067     "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
26068   # Strip MF so we end up with the name of the file.
26069   mf=`echo "$mf" | sed -e 's/:.*$//'`
26070   # Check whether this is an Automake generated Makefile or not.
26071   # We used to match only the files named `Makefile.in', but
26072   # some people rename them; so instead we look at the file content.
26073   # Grep'ing the first line is not enough: some people post-process
26074   # each Makefile.in and add a new line on top of each file to say so.
26075   # So let's grep whole file.
26076   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
26077     dirpart=`$as_dirname -- "$mf" ||
26078 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26079          X"$mf" : 'X\(//\)[^/]' \| \
26080          X"$mf" : 'X\(//\)$' \| \
26081          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
26082 $as_echo X"$mf" |
26083     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26084             s//\1/
26085             q
26086           }
26087           /^X\(\/\/\)[^/].*/{
26088             s//\1/
26089             q
26090           }
26091           /^X\(\/\/\)$/{
26092             s//\1/
26093             q
26094           }
26095           /^X\(\/\).*/{
26096             s//\1/
26097             q
26098           }
26099           s/.*/./; q'`
26100   else
26101     continue
26102   fi
26103   # Extract the definition of DEPDIR, am__include, and am__quote
26104   # from the Makefile without running `make'.
26105   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
26106   test -z "$DEPDIR" && continue
26107   am__include=`sed -n 's/^am__include = //p' < "$mf"`
26108   test -z "am__include" && continue
26109   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
26110   # When using ansi2knr, U may be empty or an underscore; expand it
26111   U=`sed -n 's/^U = //p' < "$mf"`
26112   # Find all dependency output files, they are included files with
26113   # $(DEPDIR) in their names.  We invoke sed twice because it is the
26114   # simplest approach to changing $(DEPDIR) to its actual value in the
26115   # expansion.
26116   for file in `sed -n "
26117     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
26118        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
26119     # Make sure the directory exists.
26120     test -f "$dirpart/$file" && continue
26121     fdir=`$as_dirname -- "$file" ||
26122 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26123          X"$file" : 'X\(//\)[^/]' \| \
26124          X"$file" : 'X\(//\)$' \| \
26125          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
26126 $as_echo X"$file" |
26127     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26128             s//\1/
26129             q
26130           }
26131           /^X\(\/\/\)[^/].*/{
26132             s//\1/
26133             q
26134           }
26135           /^X\(\/\/\)$/{
26136             s//\1/
26137             q
26138           }
26139           /^X\(\/\).*/{
26140             s//\1/
26141             q
26142           }
26143           s/.*/./; q'`
26144     as_dir=$dirpart/$fdir; as_fn_mkdir_p
26145     # echo "creating $dirpart/$file"
26146     echo '# dummy' > "$dirpart/$file"
26147   done
26148 done
26149  ;;
26150     "default":C)
26151 chmod +x tests/run
26152 date > stamp-h
26153 BACKENDSC="servers/slapd/backends.c"
26154 echo "Making $BACKENDSC"
26155 rm -f $BACKENDSC
26156 cat > $BACKENDSC << ENDX
26157 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26158  *
26159  * Copyright 1998-2011 The OpenLDAP Foundation.
26160  * All rights reserved.
26161  *
26162  * Redistribution and use in source and binary forms, with or without
26163  * modification, are permitted only as authorized by the OpenLDAP
26164  * Public License.
26165  *
26166  * A copy of this license is available in the file LICENSE in the
26167  * top-level directory of the distribution or, alternatively, at
26168  * <http://www.OpenLDAP.org/license.html>.
26169  */
26170 /* This file is automatically generated by configure; please do not edit. */
26171
26172 #include "portable.h"
26173 #include "slap.h"
26174
26175 ENDX
26176 if test "${STATIC_BACKENDS}"; then
26177         for b in config ${STATIC_BACKENDS}; do
26178                 bb=`echo "${b}" | sed -e 's/back-//'`
26179                 cat >> $BACKENDSC << ENDX
26180 extern BI_init ${bb}_back_initialize;
26181 ENDX
26182         done
26183
26184         cat >> $BACKENDSC << ENDX
26185
26186 BackendInfo slap_binfo[] = {
26187 ENDX
26188
26189         for b in config ${STATIC_BACKENDS}; do
26190                 bb=`echo "${b}" | sed -e 's/back-//'`
26191                 echo "    Add ${bb} ..."
26192                 cat >> $BACKENDSC << ENDX
26193         { "${bb}", ${bb}_back_initialize },
26194 ENDX
26195         done
26196
26197         cat >> $BACKENDSC << ENDX
26198         { NULL, NULL },
26199 };
26200
26201 /* end of generated file */
26202 ENDX
26203 fi
26204 OVERLAYSC="servers/slapd/overlays/statover.c"
26205 echo "Making $OVERLAYSC"
26206 rm -f $OVERLAYSC
26207 cat > $OVERLAYSC << ENDX
26208 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26209  *
26210  * Copyright 1998-2011 The OpenLDAP Foundation.
26211  * All rights reserved.
26212  *
26213  * Redistribution and use in source and binary forms, with or without
26214  * modification, are permitted only as authorized by the OpenLDAP
26215  * Public License.
26216  *
26217  * A copy of this license is available in the file LICENSE in the
26218  * top-level directory of the distribution or, alternatively, at
26219  * <http://www.OpenLDAP.org/license.html>.
26220  */
26221 /* This file is automatically generated by configure; please do not edit. */
26222
26223 #include "portable.h"
26224 #include "slap.h"
26225
26226 ENDX
26227 if test "${STATIC_OVERLAYS}"; then
26228         for o in ${STATIC_OVERLAYS}; do
26229                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26230                 cat >> $OVERLAYSC << ENDX
26231 extern OV_init ${oo}_initialize;
26232 ENDX
26233         done
26234 fi
26235
26236 cat >> $OVERLAYSC << ENDX
26237
26238 OverlayInit slap_oinfo[] = {
26239 ENDX
26240
26241 if test "${STATIC_OVERLAYS}"; then
26242         for o in ${STATIC_OVERLAYS}; do
26243                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26244                 echo "    Add ${oo} ..."
26245                 cat >> $OVERLAYSC << ENDX
26246         { "${oo}", ${oo}_initialize },
26247 ENDX
26248         done
26249 fi
26250
26251         cat >> $OVERLAYSC << ENDX
26252         { NULL, NULL },
26253 };
26254
26255 /* end of generated file */
26256 ENDX
26257
26258 if test "${ol_cv_mkdep}" = no; then
26259         echo '(Do not "make depend"; we do not know how to build dependencies)'
26260 else
26261         echo 'Please run "make depend" to build dependencies'
26262 fi
26263  ;;
26264
26265   esac
26266 done # for ac_tag
26267
26268
26269 as_fn_exit 0
26270 _ACEOF
26271 ac_clean_files=$ac_clean_files_save
26272
26273 test $ac_write_fail = 0 ||
26274   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
26275
26276
26277 # configure is writing to config.log, and then calls config.status.
26278 # config.status does its own redirection, appending to config.log.
26279 # Unfortunately, on DOS this fails, as config.log is still kept open
26280 # by configure, so config.status won't be able to write to it; its
26281 # output is simply discarded.  So we exec the FD to /dev/null,
26282 # effectively closing config.log, so it can be properly (re)opened and
26283 # appended to by config.status.  When coming back to configure, we
26284 # need to make the FD available again.
26285 if test "$no_create" != yes; then
26286   ac_cs_success=:
26287   ac_config_status_args=
26288   test "$silent" = yes &&
26289     ac_config_status_args="$ac_config_status_args --quiet"
26290   exec 5>/dev/null
26291   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26292   exec 5>>config.log
26293   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26294   # would make configure fail if this is the last instruction.
26295   $ac_cs_success || as_fn_exit $?
26296 fi
26297 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26298   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26299 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26300 fi
26301