]> git.sur5r.net Git - openldap/blob - configure
ITS#6592
[openldap] / configure
1 #! /bin/sh
2 # From configure.in OpenLDAP.
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.65.
5 #
6 # Copyright 1998-2010 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 [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-2010 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_CVS=""
2876 if test -d $ac_aux_dir/CVS; then
2877         OPENLDAP_CVS="(from CVS sources) "
2878 fi
2879
2880 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
2881
2882 # Make sure we can run config.sub.
2883 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2884   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2885
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2887 $as_echo_n "checking build system type... " >&6; }
2888 if test "${ac_cv_build+set}" = set; then :
2889   $as_echo_n "(cached) " >&6
2890 else
2891   ac_build_alias=$build_alias
2892 test "x$ac_build_alias" = x &&
2893   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2894 test "x$ac_build_alias" = x &&
2895   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
2896 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2897   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2898
2899 fi
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2901 $as_echo "$ac_cv_build" >&6; }
2902 case $ac_cv_build in
2903 *-*-*) ;;
2904 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
2905 esac
2906 build=$ac_cv_build
2907 ac_save_IFS=$IFS; IFS='-'
2908 set x $ac_cv_build
2909 shift
2910 build_cpu=$1
2911 build_vendor=$2
2912 shift; shift
2913 # Remember, the first character of IFS is used to create $*,
2914 # except with old shells:
2915 build_os=$*
2916 IFS=$ac_save_IFS
2917 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2918
2919
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2921 $as_echo_n "checking host system type... " >&6; }
2922 if test "${ac_cv_host+set}" = set; then :
2923   $as_echo_n "(cached) " >&6
2924 else
2925   if test "x$host_alias" = x; then
2926   ac_cv_host=$ac_cv_build
2927 else
2928   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2929     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2930 fi
2931
2932 fi
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2934 $as_echo "$ac_cv_host" >&6; }
2935 case $ac_cv_host in
2936 *-*-*) ;;
2937 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
2938 esac
2939 host=$ac_cv_host
2940 ac_save_IFS=$IFS; IFS='-'
2941 set x $ac_cv_host
2942 shift
2943 host_cpu=$1
2944 host_vendor=$2
2945 shift; shift
2946 # Remember, the first character of IFS is used to create $*,
2947 # except with old shells:
2948 host_os=$*
2949 IFS=$ac_save_IFS
2950 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2951
2952
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2954 $as_echo_n "checking target system type... " >&6; }
2955 if test "${ac_cv_target+set}" = set; then :
2956   $as_echo_n "(cached) " >&6
2957 else
2958   if test "x$target_alias" = x; then
2959   ac_cv_target=$ac_cv_host
2960 else
2961   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2962     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2963 fi
2964
2965 fi
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2967 $as_echo "$ac_cv_target" >&6; }
2968 case $ac_cv_target in
2969 *-*-*) ;;
2970 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
2971 esac
2972 target=$ac_cv_target
2973 ac_save_IFS=$IFS; IFS='-'
2974 set x $ac_cv_target
2975 shift
2976 target_cpu=$1
2977 target_vendor=$2
2978 shift; shift
2979 # Remember, the first character of IFS is used to create $*,
2980 # except with old shells:
2981 target_os=$*
2982 IFS=$ac_save_IFS
2983 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2984
2985
2986 # The aliases save the names the user supplied, while $host etc.
2987 # will get canonicalized.
2988 test -n "$target_alias" &&
2989   test "$program_prefix$program_suffix$program_transform_name" = \
2990     NONENONEs,x,x, &&
2991   program_prefix=${target_alias}-
2992
2993 am__api_version="1.9"
2994 # Find a good install program.  We prefer a C program (faster),
2995 # so one script is as good as another.  But avoid the broken or
2996 # incompatible versions:
2997 # SysV /etc/install, /usr/sbin/install
2998 # SunOS /usr/etc/install
2999 # IRIX /sbin/install
3000 # AIX /bin/install
3001 # AmigaOS /C/install, which installs bootblocks on floppy discs
3002 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3003 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3004 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3005 # OS/2's system install, which has a completely different semantic
3006 # ./install, which can be erroneously created by make from ./install.sh.
3007 # Reject install programs that cannot install multiple files.
3008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3009 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3010 if test -z "$INSTALL"; then
3011 if test "${ac_cv_path_install+set}" = set; then :
3012   $as_echo_n "(cached) " >&6
3013 else
3014   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3015 for as_dir in $PATH
3016 do
3017   IFS=$as_save_IFS
3018   test -z "$as_dir" && as_dir=.
3019     # Account for people who put trailing slashes in PATH elements.
3020 case $as_dir/ in #((
3021   ./ | .// | /[cC]/* | \
3022   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3023   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3024   /usr/ucb/* ) ;;
3025   *)
3026     # OSF1 and SCO ODT 3.0 have their own names for install.
3027     # Don't use installbsd from OSF since it installs stuff as root
3028     # by default.
3029     for ac_prog in ginstall scoinst install; do
3030       for ac_exec_ext in '' $ac_executable_extensions; do
3031         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3032           if test $ac_prog = install &&
3033             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3034             # AIX install.  It has an incompatible calling convention.
3035             :
3036           elif test $ac_prog = install &&
3037             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3038             # program-specific install script used by HP pwplus--don't use.
3039             :
3040           else
3041             rm -rf conftest.one conftest.two conftest.dir
3042             echo one > conftest.one
3043             echo two > conftest.two
3044             mkdir conftest.dir
3045             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3046               test -s conftest.one && test -s conftest.two &&
3047               test -s conftest.dir/conftest.one &&
3048               test -s conftest.dir/conftest.two
3049             then
3050               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3051               break 3
3052             fi
3053           fi
3054         fi
3055       done
3056     done
3057     ;;
3058 esac
3059
3060   done
3061 IFS=$as_save_IFS
3062
3063 rm -rf conftest.one conftest.two conftest.dir
3064
3065 fi
3066   if test "${ac_cv_path_install+set}" = set; then
3067     INSTALL=$ac_cv_path_install
3068   else
3069     # As a last resort, use the slow shell script.  Don't cache a
3070     # value for INSTALL within a source directory, because that will
3071     # break other packages using the cache if that directory is
3072     # removed, or if the value is a relative name.
3073     INSTALL=$ac_install_sh
3074   fi
3075 fi
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3077 $as_echo "$INSTALL" >&6; }
3078
3079 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3080 # It thinks the first close brace ends the variable substitution.
3081 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3082
3083 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3084
3085 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3086
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3088 $as_echo_n "checking whether build environment is sane... " >&6; }
3089 # Just in case
3090 sleep 1
3091 echo timestamp > conftest.file
3092 # Do `set' in a subshell so we don't clobber the current shell's
3093 # arguments.  Must try -L first in case configure is actually a
3094 # symlink; some systems play weird games with the mod time of symlinks
3095 # (eg FreeBSD returns the mod time of the symlink's containing
3096 # directory).
3097 if (
3098    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
3099    if test "$*" = "X"; then
3100       # -L didn't work.
3101       set X `ls -t $srcdir/configure conftest.file`
3102    fi
3103    rm -f conftest.file
3104    if test "$*" != "X $srcdir/configure conftest.file" \
3105       && test "$*" != "X conftest.file $srcdir/configure"; then
3106
3107       # If neither matched, then we have a broken ls.  This can happen
3108       # if, for instance, CONFIG_SHELL is bash and it inherits a
3109       # broken ls alias from the environment.  This has actually
3110       # happened.  Such a system could not be considered "sane".
3111       as_fn_error "ls -t appears to fail.  Make sure there is not a broken
3112 alias in your environment" "$LINENO" 5
3113    fi
3114
3115    test "$2" = conftest.file
3116    )
3117 then
3118    # Ok.
3119    :
3120 else
3121    as_fn_error "newly created file is older than distributed files!
3122 Check your system clock" "$LINENO" 5
3123 fi
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3125 $as_echo "yes" >&6; }
3126 test "$program_prefix" != NONE &&
3127   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3128 # Use a double $ so make ignores it.
3129 test "$program_suffix" != NONE &&
3130   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3131 # Double any \ or $.
3132 # By default was `s,x,x', remove it if useless.
3133 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3134 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3135
3136 # expand $ac_aux_dir to an absolute path
3137 am_aux_dir=`cd $ac_aux_dir && pwd`
3138
3139 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3140 # Use eval to expand $SHELL
3141 if eval "$MISSING --run true"; then
3142   am_missing_run="$MISSING --run "
3143 else
3144   am_missing_run=
3145   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3146 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3147 fi
3148
3149 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
3150   # We used to keeping the `.' as first argument, in order to
3151   # allow $(mkdir_p) to be used without argument.  As in
3152   #   $(mkdir_p) $(somedir)
3153   # where $(somedir) is conditionally defined.  However this is wrong
3154   # for two reasons:
3155   #  1. if the package is installed by a user who cannot write `.'
3156   #     make install will fail,
3157   #  2. the above comment should most certainly read
3158   #     $(mkdir_p) $(DESTDIR)$(somedir)
3159   #     so it does not work when $(somedir) is undefined and
3160   #     $(DESTDIR) is not.
3161   #  To support the latter case, we have to write
3162   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
3163   #  so the `.' trick is pointless.
3164   mkdir_p='mkdir -p --'
3165 else
3166   # On NextStep and OpenStep, the `mkdir' command does not
3167   # recognize any option.  It will interpret all options as
3168   # directories to create, and then abort because `.' already
3169   # exists.
3170   for d in ./-p ./--version;
3171   do
3172     test -d $d && rmdir $d
3173   done
3174   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
3175   if test -f "$ac_aux_dir/mkinstalldirs"; then
3176     mkdir_p='$(mkinstalldirs)'
3177   else
3178     mkdir_p='$(install_sh) -d'
3179   fi
3180 fi
3181
3182 for ac_prog in gawk mawk nawk awk
3183 do
3184   # Extract the first word of "$ac_prog", so it can be a program name with args.
3185 set dummy $ac_prog; ac_word=$2
3186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3187 $as_echo_n "checking for $ac_word... " >&6; }
3188 if test "${ac_cv_prog_AWK+set}" = set; then :
3189   $as_echo_n "(cached) " >&6
3190 else
3191   if test -n "$AWK"; then
3192   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3193 else
3194 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3195 for as_dir in $PATH
3196 do
3197   IFS=$as_save_IFS
3198   test -z "$as_dir" && as_dir=.
3199     for ac_exec_ext in '' $ac_executable_extensions; do
3200   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3201     ac_cv_prog_AWK="$ac_prog"
3202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3203     break 2
3204   fi
3205 done
3206   done
3207 IFS=$as_save_IFS
3208
3209 fi
3210 fi
3211 AWK=$ac_cv_prog_AWK
3212 if test -n "$AWK"; then
3213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3214 $as_echo "$AWK" >&6; }
3215 else
3216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3217 $as_echo "no" >&6; }
3218 fi
3219
3220
3221   test -n "$AWK" && break
3222 done
3223
3224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3225 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3226 set x ${MAKE-make}
3227 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3228 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3229   $as_echo_n "(cached) " >&6
3230 else
3231   cat >conftest.make <<\_ACEOF
3232 SHELL = /bin/sh
3233 all:
3234         @echo '@@@%%%=$(MAKE)=@@@%%%'
3235 _ACEOF
3236 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3237 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3238   *@@@%%%=?*=@@@%%%*)
3239     eval ac_cv_prog_make_${ac_make}_set=yes;;
3240   *)
3241     eval ac_cv_prog_make_${ac_make}_set=no;;
3242 esac
3243 rm -f conftest.make
3244 fi
3245 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3247 $as_echo "yes" >&6; }
3248   SET_MAKE=
3249 else
3250   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3251 $as_echo "no" >&6; }
3252   SET_MAKE="MAKE=${MAKE-make}"
3253 fi
3254
3255 rm -rf .tst 2>/dev/null
3256 mkdir .tst 2>/dev/null
3257 if test -d .tst; then
3258   am__leading_dot=.
3259 else
3260   am__leading_dot=_
3261 fi
3262 rmdir .tst 2>/dev/null
3263
3264 # test to see if srcdir already configured
3265 if test "`cd $srcdir && pwd`" != "`pwd`" &&
3266    test -f $srcdir/config.status; then
3267   as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3268 fi
3269
3270 # test whether we have cygpath
3271 if test -z "$CYGPATH_W"; then
3272   if (cygpath --version) >/dev/null 2>/dev/null; then
3273     CYGPATH_W='cygpath -w'
3274   else
3275     CYGPATH_W=echo
3276   fi
3277 fi
3278
3279
3280 # Define the identity of the package.
3281  PACKAGE=$OL_PACKAGE
3282  VERSION=$OL_VERSION
3283
3284
3285 # Some tools Automake needs.
3286
3287 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3288
3289
3290 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3291
3292
3293 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3294
3295
3296 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3297
3298
3299 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3300
3301 install_sh=${install_sh-"$am_aux_dir/install-sh"}
3302
3303 # Installed binaries are usually stripped using `strip' when the user
3304 # run `make install-strip'.  However `strip' might not be the right
3305 # tool to use in cross-compilation environments, therefore Automake
3306 # will honor the `STRIP' environment variable to overrule this program.
3307 if test "$cross_compiling" != no; then
3308   if test -n "$ac_tool_prefix"; then
3309   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3310 set dummy ${ac_tool_prefix}strip; ac_word=$2
3311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3312 $as_echo_n "checking for $ac_word... " >&6; }
3313 if test "${ac_cv_prog_STRIP+set}" = set; then :
3314   $as_echo_n "(cached) " >&6
3315 else
3316   if test -n "$STRIP"; then
3317   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3318 else
3319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3320 for as_dir in $PATH
3321 do
3322   IFS=$as_save_IFS
3323   test -z "$as_dir" && as_dir=.
3324     for ac_exec_ext in '' $ac_executable_extensions; do
3325   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3326     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3328     break 2
3329   fi
3330 done
3331   done
3332 IFS=$as_save_IFS
3333
3334 fi
3335 fi
3336 STRIP=$ac_cv_prog_STRIP
3337 if test -n "$STRIP"; then
3338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3339 $as_echo "$STRIP" >&6; }
3340 else
3341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3342 $as_echo "no" >&6; }
3343 fi
3344
3345
3346 fi
3347 if test -z "$ac_cv_prog_STRIP"; then
3348   ac_ct_STRIP=$STRIP
3349   # Extract the first word of "strip", so it can be a program name with args.
3350 set dummy strip; ac_word=$2
3351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3352 $as_echo_n "checking for $ac_word... " >&6; }
3353 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3354   $as_echo_n "(cached) " >&6
3355 else
3356   if test -n "$ac_ct_STRIP"; then
3357   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3358 else
3359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3360 for as_dir in $PATH
3361 do
3362   IFS=$as_save_IFS
3363   test -z "$as_dir" && as_dir=.
3364     for ac_exec_ext in '' $ac_executable_extensions; do
3365   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3366     ac_cv_prog_ac_ct_STRIP="strip"
3367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3368     break 2
3369   fi
3370 done
3371   done
3372 IFS=$as_save_IFS
3373
3374 fi
3375 fi
3376 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3377 if test -n "$ac_ct_STRIP"; then
3378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3379 $as_echo "$ac_ct_STRIP" >&6; }
3380 else
3381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3382 $as_echo "no" >&6; }
3383 fi
3384
3385   if test "x$ac_ct_STRIP" = x; then
3386     STRIP=":"
3387   else
3388     case $cross_compiling:$ac_tool_warned in
3389 yes:)
3390 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3391 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3392 ac_tool_warned=yes ;;
3393 esac
3394     STRIP=$ac_ct_STRIP
3395   fi
3396 else
3397   STRIP="$ac_cv_prog_STRIP"
3398 fi
3399
3400 fi
3401 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
3402
3403 # We need awk for the "check" target.  The system "awk" is bad on
3404 # some platforms.
3405 # Always define AMTAR for backward compatibility.
3406
3407 AMTAR=${AMTAR-"${am_missing_run}tar"}
3408
3409 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3410
3411
3412
3413
3414
3415 cat >>confdefs.h <<_ACEOF
3416 #define OPENLDAP_PACKAGE "$PACKAGE"
3417 _ACEOF
3418
3419
3420 cat >>confdefs.h <<_ACEOF
3421 #define OPENLDAP_VERSION "$VERSION"
3422 _ACEOF
3423
3424
3425
3426 cat >>confdefs.h <<_ACEOF
3427 #define LDAP_VENDOR_VERSION $OL_API_INC
3428 _ACEOF
3429
3430
3431 cat >>confdefs.h <<_ACEOF
3432 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
3433 _ACEOF
3434
3435
3436 cat >>confdefs.h <<_ACEOF
3437 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
3438 _ACEOF
3439
3440
3441 cat >>confdefs.h <<_ACEOF
3442 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
3443 _ACEOF
3444
3445
3446 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
3447
3448 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
3449
3450 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
3451
3452
3453
3454
3455
3456 ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
3457
3458 ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
3459
3460 ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
3461
3462
3463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking configure arguments" >&5
3464 $as_echo_n "checking configure arguments... " >&6; }
3465
3466
3467 top_builddir=`pwd`
3468
3469 ldap_subdir="/openldap"
3470
3471
3472 # Check whether --with-subdir was given.
3473 if test "${with_subdir+set}" = set; then :
3474   withval=$with_subdir; case "$withval" in
3475         no) ldap_subdir=""
3476                 ;;
3477         yes)
3478                 ;;
3479         /*|\\*)
3480                 ldap_subdir="$withval"
3481                 ;;
3482         *)
3483                 ldap_subdir="/$withval"
3484                 ;;
3485 esac
3486
3487 fi
3488
3489
3490 # OpenLDAP --enable-debug
3491
3492         # Check whether --enable-debug was given.
3493 if test "${enable_debug+set}" = set; then :
3494   enableval=$enable_debug;
3495         ol_arg=invalid
3496         for ol_val in no yes traditional ; do
3497                 if test "$enableval" = "$ol_val" ; then
3498                         ol_arg="$ol_val"
3499                 fi
3500         done
3501         if test "$ol_arg" = "invalid" ; then
3502                 as_fn_error "bad value $enableval for --enable-debug" "$LINENO" 5
3503         fi
3504         ol_enable_debug="$ol_arg"
3505
3506 else
3507         ol_enable_debug=yes
3508 fi
3509
3510 # end --enable-debug
3511 # OpenLDAP --enable-dynamic
3512
3513         # Check whether --enable-dynamic was given.
3514 if test "${enable_dynamic+set}" = set; then :
3515   enableval=$enable_dynamic;
3516         ol_arg=invalid
3517         for ol_val in auto yes no ; do
3518                 if test "$enableval" = "$ol_val" ; then
3519                         ol_arg="$ol_val"
3520                 fi
3521         done
3522         if test "$ol_arg" = "invalid" ; then
3523                 as_fn_error "bad value $enableval for --enable-dynamic" "$LINENO" 5
3524         fi
3525         ol_enable_dynamic="$ol_arg"
3526
3527 else
3528         ol_enable_dynamic=no
3529 fi
3530
3531 # end --enable-dynamic
3532 # OpenLDAP --enable-syslog
3533
3534         # Check whether --enable-syslog was given.
3535 if test "${enable_syslog+set}" = set; then :
3536   enableval=$enable_syslog;
3537         ol_arg=invalid
3538         for ol_val in auto yes no ; do
3539                 if test "$enableval" = "$ol_val" ; then
3540                         ol_arg="$ol_val"
3541                 fi
3542         done
3543         if test "$ol_arg" = "invalid" ; then
3544                 as_fn_error "bad value $enableval for --enable-syslog" "$LINENO" 5
3545         fi
3546         ol_enable_syslog="$ol_arg"
3547
3548 else
3549         ol_enable_syslog=auto
3550 fi
3551
3552 # end --enable-syslog
3553 # OpenLDAP --enable-proctitle
3554
3555         # Check whether --enable-proctitle was given.
3556 if test "${enable_proctitle+set}" = set; then :
3557   enableval=$enable_proctitle;
3558         ol_arg=invalid
3559         for ol_val in auto yes no ; do
3560                 if test "$enableval" = "$ol_val" ; then
3561                         ol_arg="$ol_val"
3562                 fi
3563         done
3564         if test "$ol_arg" = "invalid" ; then
3565                 as_fn_error "bad value $enableval for --enable-proctitle" "$LINENO" 5
3566         fi
3567         ol_enable_proctitle="$ol_arg"
3568
3569 else
3570         ol_enable_proctitle=yes
3571 fi
3572
3573 # end --enable-proctitle
3574 ol_enable_referrals=${ol_enable_referrals-no}
3575 # OpenLDAP --enable-ipv6
3576
3577         # Check whether --enable-ipv6 was given.
3578 if test "${enable_ipv6+set}" = set; then :
3579   enableval=$enable_ipv6;
3580         ol_arg=invalid
3581         for ol_val in auto yes no ; do
3582                 if test "$enableval" = "$ol_val" ; then
3583                         ol_arg="$ol_val"
3584                 fi
3585         done
3586         if test "$ol_arg" = "invalid" ; then
3587                 as_fn_error "bad value $enableval for --enable-ipv6" "$LINENO" 5
3588         fi
3589         ol_enable_ipv6="$ol_arg"
3590
3591 else
3592         ol_enable_ipv6=auto
3593 fi
3594
3595 # end --enable-ipv6
3596 # OpenLDAP --enable-local
3597
3598         # Check whether --enable-local was given.
3599 if test "${enable_local+set}" = set; then :
3600   enableval=$enable_local;
3601         ol_arg=invalid
3602         for ol_val in auto yes no ; do
3603                 if test "$enableval" = "$ol_val" ; then
3604                         ol_arg="$ol_val"
3605                 fi
3606         done
3607         if test "$ol_arg" = "invalid" ; then
3608                 as_fn_error "bad value $enableval for --enable-local" "$LINENO" 5
3609         fi
3610         ol_enable_local="$ol_arg"
3611
3612 else
3613         ol_enable_local=auto
3614 fi
3615
3616 # end --enable-local
3617
3618 # OpenLDAP --with-cyrus_sasl
3619
3620 # Check whether --with-cyrus_sasl was given.
3621 if test "${with_cyrus_sasl+set}" = set; then :
3622   withval=$with_cyrus_sasl;
3623         ol_arg=invalid
3624         for ol_val in auto yes no  ; do
3625                 if test "$withval" = "$ol_val" ; then
3626                         ol_arg="$ol_val"
3627                 fi
3628         done
3629         if test "$ol_arg" = "invalid" ; then
3630                 as_fn_error "bad value $withval for --with-cyrus_sasl" "$LINENO" 5
3631         fi
3632         ol_with_cyrus_sasl="$ol_arg"
3633
3634 else
3635         ol_with_cyrus_sasl="auto"
3636 fi
3637 # end --with-cyrus_sasl
3638
3639 # OpenLDAP --with-fetch
3640
3641 # Check whether --with-fetch was given.
3642 if test "${with_fetch+set}" = set; then :
3643   withval=$with_fetch;
3644         ol_arg=invalid
3645         for ol_val in auto yes no  ; do
3646                 if test "$withval" = "$ol_val" ; then
3647                         ol_arg="$ol_val"
3648                 fi
3649         done
3650         if test "$ol_arg" = "invalid" ; then
3651                 as_fn_error "bad value $withval for --with-fetch" "$LINENO" 5
3652         fi
3653         ol_with_fetch="$ol_arg"
3654
3655 else
3656         ol_with_fetch="auto"
3657 fi
3658 # end --with-fetch
3659
3660 # OpenLDAP --with-threads
3661
3662 # Check whether --with-threads was given.
3663 if test "${with_threads+set}" = set; then :
3664   withval=$with_threads;
3665         ol_arg=invalid
3666         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
3667                 if test "$withval" = "$ol_val" ; then
3668                         ol_arg="$ol_val"
3669                 fi
3670         done
3671         if test "$ol_arg" = "invalid" ; then
3672                 as_fn_error "bad value $withval for --with-threads" "$LINENO" 5
3673         fi
3674         ol_with_threads="$ol_arg"
3675
3676 else
3677         ol_with_threads="auto"
3678 fi
3679 # end --with-threads
3680
3681 # OpenLDAP --with-tls
3682
3683 # Check whether --with-tls was given.
3684 if test "${with_tls+set}" = set; then :
3685   withval=$with_tls;
3686         ol_arg=invalid
3687         for ol_val in auto openssl gnutls yes no  ; do
3688                 if test "$withval" = "$ol_val" ; then
3689                         ol_arg="$ol_val"
3690                 fi
3691         done
3692         if test "$ol_arg" = "invalid" ; then
3693                 as_fn_error "bad value $withval for --with-tls" "$LINENO" 5
3694         fi
3695         ol_with_tls="$ol_arg"
3696
3697 else
3698         ol_with_tls="auto"
3699 fi
3700 # end --with-tls
3701
3702 # OpenLDAP --with-yielding_select
3703
3704 # Check whether --with-yielding_select was given.
3705 if test "${with_yielding_select+set}" = set; then :
3706   withval=$with_yielding_select;
3707         ol_arg=invalid
3708         for ol_val in auto yes no manual  ; do
3709                 if test "$withval" = "$ol_val" ; then
3710                         ol_arg="$ol_val"
3711                 fi
3712         done
3713         if test "$ol_arg" = "invalid" ; then
3714                 as_fn_error "bad value $withval for --with-yielding_select" "$LINENO" 5
3715         fi
3716         ol_with_yielding_select="$ol_arg"
3717
3718 else
3719         ol_with_yielding_select="auto"
3720 fi
3721 # end --with-yielding_select
3722
3723 # OpenLDAP --with-mp
3724
3725 # Check whether --with-mp was given.
3726 if test "${with_mp+set}" = set; then :
3727   withval=$with_mp;
3728         ol_arg=invalid
3729         for ol_val in auto longlong long bignum gmp yes no ; do
3730                 if test "$withval" = "$ol_val" ; then
3731                         ol_arg="$ol_val"
3732                 fi
3733         done
3734         if test "$ol_arg" = "invalid" ; then
3735                 as_fn_error "bad value $withval for --with-mp" "$LINENO" 5
3736         fi
3737         ol_with_mp="$ol_arg"
3738
3739 else
3740         ol_with_mp="auto"
3741 fi
3742 # end --with-mp
3743
3744 # OpenLDAP --with-odbc
3745
3746 # Check whether --with-odbc was given.
3747 if test "${with_odbc+set}" = set; then :
3748   withval=$with_odbc;
3749         ol_arg=invalid
3750         for ol_val in auto iodbc unixodbc odbc32  ; do
3751                 if test "$withval" = "$ol_val" ; then
3752                         ol_arg="$ol_val"
3753                 fi
3754         done
3755         if test "$ol_arg" = "invalid" ; then
3756                 as_fn_error "bad value $withval for --with-odbc" "$LINENO" 5
3757         fi
3758         ol_with_odbc="$ol_arg"
3759
3760 else
3761         ol_with_odbc="auto"
3762 fi
3763 # end --with-odbc
3764
3765
3766
3767 # Check whether --enable-xxslapdoptions was given.
3768 if test "${enable_xxslapdoptions+set}" = set; then :
3769   enableval=$enable_xxslapdoptions;
3770 fi
3771
3772 # OpenLDAP --enable-slapd
3773
3774         # Check whether --enable-slapd was given.
3775 if test "${enable_slapd+set}" = set; then :
3776   enableval=$enable_slapd;
3777         ol_arg=invalid
3778         for ol_val in auto yes no ; do
3779                 if test "$enableval" = "$ol_val" ; then
3780                         ol_arg="$ol_val"
3781                 fi
3782         done
3783         if test "$ol_arg" = "invalid" ; then
3784                 as_fn_error "bad value $enableval for --enable-slapd" "$LINENO" 5
3785         fi
3786         ol_enable_slapd="$ol_arg"
3787
3788 else
3789         ol_enable_slapd=yes
3790 fi
3791
3792 # end --enable-slapd
3793 # OpenLDAP --enable-dynacl
3794
3795         # Check whether --enable-dynacl was given.
3796 if test "${enable_dynacl+set}" = set; then :
3797   enableval=$enable_dynacl;
3798         ol_arg=invalid
3799         for ol_val in auto yes no ; do
3800                 if test "$enableval" = "$ol_val" ; then
3801                         ol_arg="$ol_val"
3802                 fi
3803         done
3804         if test "$ol_arg" = "invalid" ; then
3805                 as_fn_error "bad value $enableval for --enable-dynacl" "$LINENO" 5
3806         fi
3807         ol_enable_dynacl="$ol_arg"
3808
3809 else
3810         ol_enable_dynacl=no
3811 fi
3812
3813 # end --enable-dynacl
3814 # OpenLDAP --enable-aci
3815
3816         # Check whether --enable-aci was given.
3817 if test "${enable_aci+set}" = set; then :
3818   enableval=$enable_aci;
3819         ol_arg=invalid
3820         for ol_val in no yes mod ; do
3821                 if test "$enableval" = "$ol_val" ; then
3822                         ol_arg="$ol_val"
3823                 fi
3824         done
3825         if test "$ol_arg" = "invalid" ; then
3826                 as_fn_error "bad value $enableval for --enable-aci" "$LINENO" 5
3827         fi
3828         ol_enable_aci="$ol_arg"
3829
3830 else
3831         ol_enable_aci=no
3832 fi
3833
3834 # end --enable-aci
3835 # OpenLDAP --enable-cleartext
3836
3837         # Check whether --enable-cleartext was given.
3838 if test "${enable_cleartext+set}" = set; then :
3839   enableval=$enable_cleartext;
3840         ol_arg=invalid
3841         for ol_val in auto yes no ; do
3842                 if test "$enableval" = "$ol_val" ; then
3843                         ol_arg="$ol_val"
3844                 fi
3845         done
3846         if test "$ol_arg" = "invalid" ; then
3847                 as_fn_error "bad value $enableval for --enable-cleartext" "$LINENO" 5
3848         fi
3849         ol_enable_cleartext="$ol_arg"
3850
3851 else
3852         ol_enable_cleartext=yes
3853 fi
3854
3855 # end --enable-cleartext
3856 # OpenLDAP --enable-crypt
3857
3858         # Check whether --enable-crypt was given.
3859 if test "${enable_crypt+set}" = set; then :
3860   enableval=$enable_crypt;
3861         ol_arg=invalid
3862         for ol_val in auto yes no ; do
3863                 if test "$enableval" = "$ol_val" ; then
3864                         ol_arg="$ol_val"
3865                 fi
3866         done
3867         if test "$ol_arg" = "invalid" ; then
3868                 as_fn_error "bad value $enableval for --enable-crypt" "$LINENO" 5
3869         fi
3870         ol_enable_crypt="$ol_arg"
3871
3872 else
3873         ol_enable_crypt=no
3874 fi
3875
3876 # end --enable-crypt
3877 # OpenLDAP --enable-lmpasswd
3878
3879         # Check whether --enable-lmpasswd was given.
3880 if test "${enable_lmpasswd+set}" = set; then :
3881   enableval=$enable_lmpasswd;
3882         ol_arg=invalid
3883         for ol_val in auto yes no ; do
3884                 if test "$enableval" = "$ol_val" ; then
3885                         ol_arg="$ol_val"
3886                 fi
3887         done
3888         if test "$ol_arg" = "invalid" ; then
3889                 as_fn_error "bad value $enableval for --enable-lmpasswd" "$LINENO" 5
3890         fi
3891         ol_enable_lmpasswd="$ol_arg"
3892
3893 else
3894         ol_enable_lmpasswd=no
3895 fi
3896
3897 # end --enable-lmpasswd
3898 # OpenLDAP --enable-spasswd
3899
3900         # Check whether --enable-spasswd was given.
3901 if test "${enable_spasswd+set}" = set; then :
3902   enableval=$enable_spasswd;
3903         ol_arg=invalid
3904         for ol_val in auto yes no ; do
3905                 if test "$enableval" = "$ol_val" ; then
3906                         ol_arg="$ol_val"
3907                 fi
3908         done
3909         if test "$ol_arg" = "invalid" ; then
3910                 as_fn_error "bad value $enableval for --enable-spasswd" "$LINENO" 5
3911         fi
3912         ol_enable_spasswd="$ol_arg"
3913
3914 else
3915         ol_enable_spasswd=no
3916 fi
3917
3918 # end --enable-spasswd
3919 # OpenLDAP --enable-modules
3920
3921         # Check whether --enable-modules was given.
3922 if test "${enable_modules+set}" = set; then :
3923   enableval=$enable_modules;
3924         ol_arg=invalid
3925         for ol_val in auto yes no ; do
3926                 if test "$enableval" = "$ol_val" ; then
3927                         ol_arg="$ol_val"
3928                 fi
3929         done
3930         if test "$ol_arg" = "invalid" ; then
3931                 as_fn_error "bad value $enableval for --enable-modules" "$LINENO" 5
3932         fi
3933         ol_enable_modules="$ol_arg"
3934
3935 else
3936         ol_enable_modules=no
3937 fi
3938
3939 # end --enable-modules
3940 # OpenLDAP --enable-rewrite
3941
3942         # Check whether --enable-rewrite was given.
3943 if test "${enable_rewrite+set}" = set; then :
3944   enableval=$enable_rewrite;
3945         ol_arg=invalid
3946         for ol_val in auto yes no ; do
3947                 if test "$enableval" = "$ol_val" ; then
3948                         ol_arg="$ol_val"
3949                 fi
3950         done
3951         if test "$ol_arg" = "invalid" ; then
3952                 as_fn_error "bad value $enableval for --enable-rewrite" "$LINENO" 5
3953         fi
3954         ol_enable_rewrite="$ol_arg"
3955
3956 else
3957         ol_enable_rewrite=auto
3958 fi
3959
3960 # end --enable-rewrite
3961 # OpenLDAP --enable-rlookups
3962
3963         # Check whether --enable-rlookups was given.
3964 if test "${enable_rlookups+set}" = set; then :
3965   enableval=$enable_rlookups;
3966         ol_arg=invalid
3967         for ol_val in auto yes no ; do
3968                 if test "$enableval" = "$ol_val" ; then
3969                         ol_arg="$ol_val"
3970                 fi
3971         done
3972         if test "$ol_arg" = "invalid" ; then
3973                 as_fn_error "bad value $enableval for --enable-rlookups" "$LINENO" 5
3974         fi
3975         ol_enable_rlookups="$ol_arg"
3976
3977 else
3978         ol_enable_rlookups=no
3979 fi
3980
3981 # end --enable-rlookups
3982 # OpenLDAP --enable-slapi
3983
3984         # Check whether --enable-slapi was given.
3985 if test "${enable_slapi+set}" = set; then :
3986   enableval=$enable_slapi;
3987         ol_arg=invalid
3988         for ol_val in auto yes no ; do
3989                 if test "$enableval" = "$ol_val" ; then
3990                         ol_arg="$ol_val"
3991                 fi
3992         done
3993         if test "$ol_arg" = "invalid" ; then
3994                 as_fn_error "bad value $enableval for --enable-slapi" "$LINENO" 5
3995         fi
3996         ol_enable_slapi="$ol_arg"
3997
3998 else
3999         ol_enable_slapi=no
4000 fi
4001
4002 # end --enable-slapi
4003 # OpenLDAP --enable-slp
4004
4005         # Check whether --enable-slp was given.
4006 if test "${enable_slp+set}" = set; then :
4007   enableval=$enable_slp;
4008         ol_arg=invalid
4009         for ol_val in auto yes no ; do
4010                 if test "$enableval" = "$ol_val" ; then
4011                         ol_arg="$ol_val"
4012                 fi
4013         done
4014         if test "$ol_arg" = "invalid" ; then
4015                 as_fn_error "bad value $enableval for --enable-slp" "$LINENO" 5
4016         fi
4017         ol_enable_slp="$ol_arg"
4018
4019 else
4020         ol_enable_slp=no
4021 fi
4022
4023 # end --enable-slp
4024 # OpenLDAP --enable-wrappers
4025
4026         # Check whether --enable-wrappers was given.
4027 if test "${enable_wrappers+set}" = set; then :
4028   enableval=$enable_wrappers;
4029         ol_arg=invalid
4030         for ol_val in auto yes no ; do
4031                 if test "$enableval" = "$ol_val" ; then
4032                         ol_arg="$ol_val"
4033                 fi
4034         done
4035         if test "$ol_arg" = "invalid" ; then
4036                 as_fn_error "bad value $enableval for --enable-wrappers" "$LINENO" 5
4037         fi
4038         ol_enable_wrappers="$ol_arg"
4039
4040 else
4041         ol_enable_wrappers=no
4042 fi
4043
4044 # end --enable-wrappers
4045
4046 Backends="bdb \
4047         dnssrv \
4048         hdb \
4049         ldap \
4050         meta \
4051         monitor \
4052         ndb \
4053         null \
4054         passwd \
4055         perl \
4056         relay \
4057         shell \
4058         sock \
4059         sql"
4060
4061 # Check whether --enable-xxslapbackends was given.
4062 if test "${enable_xxslapbackends+set}" = set; then :
4063   enableval=$enable_xxslapbackends;
4064 fi
4065
4066
4067 # OpenLDAP --enable-backends
4068
4069         # Check whether --enable-backends was given.
4070 if test "${enable_backends+set}" = set; then :
4071   enableval=$enable_backends;
4072         ol_arg=invalid
4073         for ol_val in no yes mod ; do
4074                 if test "$enableval" = "$ol_val" ; then
4075                         ol_arg="$ol_val"
4076                 fi
4077         done
4078         if test "$ol_arg" = "invalid" ; then
4079                 as_fn_error "bad value $enableval for --enable-backends" "$LINENO" 5
4080         fi
4081         ol_enable_backends="$ol_arg"
4082
4083 fi
4084
4085 # end --enable-backends
4086 # OpenLDAP --enable-bdb
4087
4088         # Check whether --enable-bdb was given.
4089 if test "${enable_bdb+set}" = set; then :
4090   enableval=$enable_bdb;
4091         ol_arg=invalid
4092         for ol_val in no yes mod ; do
4093                 if test "$enableval" = "$ol_val" ; then
4094                         ol_arg="$ol_val"
4095                 fi
4096         done
4097         if test "$ol_arg" = "invalid" ; then
4098                 as_fn_error "bad value $enableval for --enable-bdb" "$LINENO" 5
4099         fi
4100         ol_enable_bdb="$ol_arg"
4101
4102 else
4103         ol_enable_bdb=${ol_enable_backends:-yes}
4104 fi
4105
4106 # end --enable-bdb
4107 # OpenLDAP --enable-dnssrv
4108
4109         # Check whether --enable-dnssrv was given.
4110 if test "${enable_dnssrv+set}" = set; then :
4111   enableval=$enable_dnssrv;
4112         ol_arg=invalid
4113         for ol_val in no yes mod ; do
4114                 if test "$enableval" = "$ol_val" ; then
4115                         ol_arg="$ol_val"
4116                 fi
4117         done
4118         if test "$ol_arg" = "invalid" ; then
4119                 as_fn_error "bad value $enableval for --enable-dnssrv" "$LINENO" 5
4120         fi
4121         ol_enable_dnssrv="$ol_arg"
4122
4123 else
4124         ol_enable_dnssrv=${ol_enable_backends:-no}
4125 fi
4126
4127 # end --enable-dnssrv
4128 # OpenLDAP --enable-hdb
4129
4130         # Check whether --enable-hdb was given.
4131 if test "${enable_hdb+set}" = set; then :
4132   enableval=$enable_hdb;
4133         ol_arg=invalid
4134         for ol_val in no yes mod ; do
4135                 if test "$enableval" = "$ol_val" ; then
4136                         ol_arg="$ol_val"
4137                 fi
4138         done
4139         if test "$ol_arg" = "invalid" ; then
4140                 as_fn_error "bad value $enableval for --enable-hdb" "$LINENO" 5
4141         fi
4142         ol_enable_hdb="$ol_arg"
4143
4144 else
4145         ol_enable_hdb=${ol_enable_backends:-yes}
4146 fi
4147
4148 # end --enable-hdb
4149 # OpenLDAP --enable-ldap
4150
4151         # Check whether --enable-ldap was given.
4152 if test "${enable_ldap+set}" = set; then :
4153   enableval=$enable_ldap;
4154         ol_arg=invalid
4155         for ol_val in no yes mod ; do
4156                 if test "$enableval" = "$ol_val" ; then
4157                         ol_arg="$ol_val"
4158                 fi
4159         done
4160         if test "$ol_arg" = "invalid" ; then
4161                 as_fn_error "bad value $enableval for --enable-ldap" "$LINENO" 5
4162         fi
4163         ol_enable_ldap="$ol_arg"
4164
4165 else
4166         ol_enable_ldap=${ol_enable_backends:-no}
4167 fi
4168
4169 # end --enable-ldap
4170 # OpenLDAP --enable-meta
4171
4172         # Check whether --enable-meta was given.
4173 if test "${enable_meta+set}" = set; then :
4174   enableval=$enable_meta;
4175         ol_arg=invalid
4176         for ol_val in no yes mod ; do
4177                 if test "$enableval" = "$ol_val" ; then
4178                         ol_arg="$ol_val"
4179                 fi
4180         done
4181         if test "$ol_arg" = "invalid" ; then
4182                 as_fn_error "bad value $enableval for --enable-meta" "$LINENO" 5
4183         fi
4184         ol_enable_meta="$ol_arg"
4185
4186 else
4187         ol_enable_meta=${ol_enable_backends:-no}
4188 fi
4189
4190 # end --enable-meta
4191 # OpenLDAP --enable-monitor
4192
4193         # Check whether --enable-monitor was given.
4194 if test "${enable_monitor+set}" = set; then :
4195   enableval=$enable_monitor;
4196         ol_arg=invalid
4197         for ol_val in no yes mod ; do
4198                 if test "$enableval" = "$ol_val" ; then
4199                         ol_arg="$ol_val"
4200                 fi
4201         done
4202         if test "$ol_arg" = "invalid" ; then
4203                 as_fn_error "bad value $enableval for --enable-monitor" "$LINENO" 5
4204         fi
4205         ol_enable_monitor="$ol_arg"
4206
4207 else
4208         ol_enable_monitor=${ol_enable_backends:-yes}
4209 fi
4210
4211 # end --enable-monitor
4212 # OpenLDAP --enable-ndb
4213
4214         # Check whether --enable-ndb was given.
4215 if test "${enable_ndb+set}" = set; then :
4216   enableval=$enable_ndb;
4217         ol_arg=invalid
4218         for ol_val in no yes mod ; do
4219                 if test "$enableval" = "$ol_val" ; then
4220                         ol_arg="$ol_val"
4221                 fi
4222         done
4223         if test "$ol_arg" = "invalid" ; then
4224                 as_fn_error "bad value $enableval for --enable-ndb" "$LINENO" 5
4225         fi
4226         ol_enable_ndb="$ol_arg"
4227
4228 else
4229         ol_enable_ndb=${ol_enable_backends:-no}
4230 fi
4231
4232 # end --enable-ndb
4233 # OpenLDAP --enable-null
4234
4235         # Check whether --enable-null was given.
4236 if test "${enable_null+set}" = set; then :
4237   enableval=$enable_null;
4238         ol_arg=invalid
4239         for ol_val in no yes mod ; do
4240                 if test "$enableval" = "$ol_val" ; then
4241                         ol_arg="$ol_val"
4242                 fi
4243         done
4244         if test "$ol_arg" = "invalid" ; then
4245                 as_fn_error "bad value $enableval for --enable-null" "$LINENO" 5
4246         fi
4247         ol_enable_null="$ol_arg"
4248
4249 else
4250         ol_enable_null=${ol_enable_backends:-no}
4251 fi
4252
4253 # end --enable-null
4254 # OpenLDAP --enable-passwd
4255
4256         # Check whether --enable-passwd was given.
4257 if test "${enable_passwd+set}" = set; then :
4258   enableval=$enable_passwd;
4259         ol_arg=invalid
4260         for ol_val in no yes mod ; do
4261                 if test "$enableval" = "$ol_val" ; then
4262                         ol_arg="$ol_val"
4263                 fi
4264         done
4265         if test "$ol_arg" = "invalid" ; then
4266                 as_fn_error "bad value $enableval for --enable-passwd" "$LINENO" 5
4267         fi
4268         ol_enable_passwd="$ol_arg"
4269
4270 else
4271         ol_enable_passwd=${ol_enable_backends:-no}
4272 fi
4273
4274 # end --enable-passwd
4275 # OpenLDAP --enable-perl
4276
4277         # Check whether --enable-perl was given.
4278 if test "${enable_perl+set}" = set; then :
4279   enableval=$enable_perl;
4280         ol_arg=invalid
4281         for ol_val in no yes mod ; do
4282                 if test "$enableval" = "$ol_val" ; then
4283                         ol_arg="$ol_val"
4284                 fi
4285         done
4286         if test "$ol_arg" = "invalid" ; then
4287                 as_fn_error "bad value $enableval for --enable-perl" "$LINENO" 5
4288         fi
4289         ol_enable_perl="$ol_arg"
4290
4291 else
4292         ol_enable_perl=${ol_enable_backends:-no}
4293 fi
4294
4295 # end --enable-perl
4296 # OpenLDAP --enable-relay
4297
4298         # Check whether --enable-relay was given.
4299 if test "${enable_relay+set}" = set; then :
4300   enableval=$enable_relay;
4301         ol_arg=invalid
4302         for ol_val in no yes mod ; do
4303                 if test "$enableval" = "$ol_val" ; then
4304                         ol_arg="$ol_val"
4305                 fi
4306         done
4307         if test "$ol_arg" = "invalid" ; then
4308                 as_fn_error "bad value $enableval for --enable-relay" "$LINENO" 5
4309         fi
4310         ol_enable_relay="$ol_arg"
4311
4312 else
4313         ol_enable_relay=${ol_enable_backends:-yes}
4314 fi
4315
4316 # end --enable-relay
4317 # OpenLDAP --enable-shell
4318
4319         # Check whether --enable-shell was given.
4320 if test "${enable_shell+set}" = set; then :
4321   enableval=$enable_shell;
4322         ol_arg=invalid
4323         for ol_val in no yes mod ; do
4324                 if test "$enableval" = "$ol_val" ; then
4325                         ol_arg="$ol_val"
4326                 fi
4327         done
4328         if test "$ol_arg" = "invalid" ; then
4329                 as_fn_error "bad value $enableval for --enable-shell" "$LINENO" 5
4330         fi
4331         ol_enable_shell="$ol_arg"
4332
4333 else
4334         ol_enable_shell=${ol_enable_backends:-no}
4335 fi
4336
4337 # end --enable-shell
4338 # OpenLDAP --enable-sock
4339
4340         # Check whether --enable-sock was given.
4341 if test "${enable_sock+set}" = set; then :
4342   enableval=$enable_sock;
4343         ol_arg=invalid
4344         for ol_val in no yes mod ; do
4345                 if test "$enableval" = "$ol_val" ; then
4346                         ol_arg="$ol_val"
4347                 fi
4348         done
4349         if test "$ol_arg" = "invalid" ; then
4350                 as_fn_error "bad value $enableval for --enable-sock" "$LINENO" 5
4351         fi
4352         ol_enable_sock="$ol_arg"
4353
4354 else
4355         ol_enable_sock=${ol_enable_backends:-no}
4356 fi
4357
4358 # end --enable-sock
4359 # OpenLDAP --enable-sql
4360
4361         # Check whether --enable-sql was given.
4362 if test "${enable_sql+set}" = set; then :
4363   enableval=$enable_sql;
4364         ol_arg=invalid
4365         for ol_val in no yes mod ; do
4366                 if test "$enableval" = "$ol_val" ; then
4367                         ol_arg="$ol_val"
4368                 fi
4369         done
4370         if test "$ol_arg" = "invalid" ; then
4371                 as_fn_error "bad value $enableval for --enable-sql" "$LINENO" 5
4372         fi
4373         ol_enable_sql="$ol_arg"
4374
4375 else
4376         ol_enable_sql=${ol_enable_backends:-no}
4377 fi
4378
4379 # end --enable-sql
4380
4381 Overlays="accesslog \
4382         auditlog \
4383         collect \
4384         constraint \
4385         dds \
4386         deref \
4387         dyngroup \
4388         dynlist \
4389         memberof \
4390         ppolicy \
4391         proxycache \
4392         refint \
4393         retcode \
4394         rwm \
4395         seqmod \
4396         sssvlv \
4397         syncprov \
4398         translucent \
4399         unique \
4400         valsort"
4401
4402 # Check whether --enable-xxslapoverlays was given.
4403 if test "${enable_xxslapoverlays+set}" = set; then :
4404   enableval=$enable_xxslapoverlays;
4405 fi
4406
4407
4408 # OpenLDAP --enable-overlays
4409
4410         # Check whether --enable-overlays was given.
4411 if test "${enable_overlays+set}" = set; then :
4412   enableval=$enable_overlays;
4413         ol_arg=invalid
4414         for ol_val in no yes mod ; do
4415                 if test "$enableval" = "$ol_val" ; then
4416                         ol_arg="$ol_val"
4417                 fi
4418         done
4419         if test "$ol_arg" = "invalid" ; then
4420                 as_fn_error "bad value $enableval for --enable-overlays" "$LINENO" 5
4421         fi
4422         ol_enable_overlays="$ol_arg"
4423
4424 fi
4425
4426 # end --enable-overlays
4427 # OpenLDAP --enable-accesslog
4428
4429         # Check whether --enable-accesslog was given.
4430 if test "${enable_accesslog+set}" = set; then :
4431   enableval=$enable_accesslog;
4432         ol_arg=invalid
4433         for ol_val in no yes mod ; do
4434                 if test "$enableval" = "$ol_val" ; then
4435                         ol_arg="$ol_val"
4436                 fi
4437         done
4438         if test "$ol_arg" = "invalid" ; then
4439                 as_fn_error "bad value $enableval for --enable-accesslog" "$LINENO" 5
4440         fi
4441         ol_enable_accesslog="$ol_arg"
4442
4443 else
4444         ol_enable_accesslog=${ol_enable_overlays:-no}
4445 fi
4446
4447 # end --enable-accesslog
4448
4449 # OpenLDAP --enable-auditlog
4450
4451         # Check whether --enable-auditlog was given.
4452 if test "${enable_auditlog+set}" = set; then :
4453   enableval=$enable_auditlog;
4454         ol_arg=invalid
4455         for ol_val in no yes mod ; do
4456                 if test "$enableval" = "$ol_val" ; then
4457                         ol_arg="$ol_val"
4458                 fi
4459         done
4460         if test "$ol_arg" = "invalid" ; then
4461                 as_fn_error "bad value $enableval for --enable-auditlog" "$LINENO" 5
4462         fi
4463         ol_enable_auditlog="$ol_arg"
4464
4465 else
4466         ol_enable_auditlog=${ol_enable_overlays:-no}
4467 fi
4468
4469 # end --enable-auditlog
4470
4471 # OpenLDAP --enable-collect
4472
4473         # Check whether --enable-collect was given.
4474 if test "${enable_collect+set}" = set; then :
4475   enableval=$enable_collect;
4476         ol_arg=invalid
4477         for ol_val in no yes mod ; do
4478                 if test "$enableval" = "$ol_val" ; then
4479                         ol_arg="$ol_val"
4480                 fi
4481         done
4482         if test "$ol_arg" = "invalid" ; then
4483                 as_fn_error "bad value $enableval for --enable-collect" "$LINENO" 5
4484         fi
4485         ol_enable_collect="$ol_arg"
4486
4487 else
4488         ol_enable_collect=${ol_enable_overlays:-no}
4489 fi
4490
4491 # end --enable-collect
4492
4493 # OpenLDAP --enable-constraint
4494
4495         # Check whether --enable-constraint was given.
4496 if test "${enable_constraint+set}" = set; then :
4497   enableval=$enable_constraint;
4498         ol_arg=invalid
4499         for ol_val in no yes mod ; do
4500                 if test "$enableval" = "$ol_val" ; then
4501                         ol_arg="$ol_val"
4502                 fi
4503         done
4504         if test "$ol_arg" = "invalid" ; then
4505                 as_fn_error "bad value $enableval for --enable-constraint" "$LINENO" 5
4506         fi
4507         ol_enable_constraint="$ol_arg"
4508
4509 else
4510         ol_enable_constraint=${ol_enable_overlays:-no}
4511 fi
4512
4513 # end --enable-constraint
4514
4515 # OpenLDAP --enable-dds
4516
4517         # Check whether --enable-dds was given.
4518 if test "${enable_dds+set}" = set; then :
4519   enableval=$enable_dds;
4520         ol_arg=invalid
4521         for ol_val in no yes mod ; do
4522                 if test "$enableval" = "$ol_val" ; then
4523                         ol_arg="$ol_val"
4524                 fi
4525         done
4526         if test "$ol_arg" = "invalid" ; then
4527                 as_fn_error "bad value $enableval for --enable-dds" "$LINENO" 5
4528         fi
4529         ol_enable_dds="$ol_arg"
4530
4531 else
4532         ol_enable_dds=${ol_enable_overlays:-no}
4533 fi
4534
4535 # end --enable-dds
4536
4537 # OpenLDAP --enable-deref
4538
4539         # Check whether --enable-deref was given.
4540 if test "${enable_deref+set}" = set; then :
4541   enableval=$enable_deref;
4542         ol_arg=invalid
4543         for ol_val in no yes mod ; do
4544                 if test "$enableval" = "$ol_val" ; then
4545                         ol_arg="$ol_val"
4546                 fi
4547         done
4548         if test "$ol_arg" = "invalid" ; then
4549                 as_fn_error "bad value $enableval for --enable-deref" "$LINENO" 5
4550         fi
4551         ol_enable_deref="$ol_arg"
4552
4553 else
4554         ol_enable_deref=${ol_enable_overlays:-no}
4555 fi
4556
4557 # end --enable-deref
4558
4559 # OpenLDAP --enable-dyngroup
4560
4561         # Check whether --enable-dyngroup was given.
4562 if test "${enable_dyngroup+set}" = set; then :
4563   enableval=$enable_dyngroup;
4564         ol_arg=invalid
4565         for ol_val in no yes mod ; do
4566                 if test "$enableval" = "$ol_val" ; then
4567                         ol_arg="$ol_val"
4568                 fi
4569         done
4570         if test "$ol_arg" = "invalid" ; then
4571                 as_fn_error "bad value $enableval for --enable-dyngroup" "$LINENO" 5
4572         fi
4573         ol_enable_dyngroup="$ol_arg"
4574
4575 else
4576         ol_enable_dyngroup=${ol_enable_overlays:-no}
4577 fi
4578
4579 # end --enable-dyngroup
4580
4581 # OpenLDAP --enable-dynlist
4582
4583         # Check whether --enable-dynlist was given.
4584 if test "${enable_dynlist+set}" = set; then :
4585   enableval=$enable_dynlist;
4586         ol_arg=invalid
4587         for ol_val in no yes mod ; do
4588                 if test "$enableval" = "$ol_val" ; then
4589                         ol_arg="$ol_val"
4590                 fi
4591         done
4592         if test "$ol_arg" = "invalid" ; then
4593                 as_fn_error "bad value $enableval for --enable-dynlist" "$LINENO" 5
4594         fi
4595         ol_enable_dynlist="$ol_arg"
4596
4597 else
4598         ol_enable_dynlist=${ol_enable_overlays:-no}
4599 fi
4600
4601 # end --enable-dynlist
4602
4603 # OpenLDAP --enable-memberof
4604
4605         # Check whether --enable-memberof was given.
4606 if test "${enable_memberof+set}" = set; then :
4607   enableval=$enable_memberof;
4608         ol_arg=invalid
4609         for ol_val in no yes mod ; do
4610                 if test "$enableval" = "$ol_val" ; then
4611                         ol_arg="$ol_val"
4612                 fi
4613         done
4614         if test "$ol_arg" = "invalid" ; then
4615                 as_fn_error "bad value $enableval for --enable-memberof" "$LINENO" 5
4616         fi
4617         ol_enable_memberof="$ol_arg"
4618
4619 else
4620         ol_enable_memberof=${ol_enable_overlays:-no}
4621 fi
4622
4623 # end --enable-memberof
4624
4625 # OpenLDAP --enable-ppolicy
4626
4627         # Check whether --enable-ppolicy was given.
4628 if test "${enable_ppolicy+set}" = set; then :
4629   enableval=$enable_ppolicy;
4630         ol_arg=invalid
4631         for ol_val in no yes mod ; do
4632                 if test "$enableval" = "$ol_val" ; then
4633                         ol_arg="$ol_val"
4634                 fi
4635         done
4636         if test "$ol_arg" = "invalid" ; then
4637                 as_fn_error "bad value $enableval for --enable-ppolicy" "$LINENO" 5
4638         fi
4639         ol_enable_ppolicy="$ol_arg"
4640
4641 else
4642         ol_enable_ppolicy=${ol_enable_overlays:-no}
4643 fi
4644
4645 # end --enable-ppolicy
4646
4647 # OpenLDAP --enable-proxycache
4648
4649         # Check whether --enable-proxycache was given.
4650 if test "${enable_proxycache+set}" = set; then :
4651   enableval=$enable_proxycache;
4652         ol_arg=invalid
4653         for ol_val in no yes mod ; do
4654                 if test "$enableval" = "$ol_val" ; then
4655                         ol_arg="$ol_val"
4656                 fi
4657         done
4658         if test "$ol_arg" = "invalid" ; then
4659                 as_fn_error "bad value $enableval for --enable-proxycache" "$LINENO" 5
4660         fi
4661         ol_enable_proxycache="$ol_arg"
4662
4663 else
4664         ol_enable_proxycache=${ol_enable_overlays:-no}
4665 fi
4666
4667 # end --enable-proxycache
4668
4669 # OpenLDAP --enable-refint
4670
4671         # Check whether --enable-refint was given.
4672 if test "${enable_refint+set}" = set; then :
4673   enableval=$enable_refint;
4674         ol_arg=invalid
4675         for ol_val in no yes mod ; do
4676                 if test "$enableval" = "$ol_val" ; then
4677                         ol_arg="$ol_val"
4678                 fi
4679         done
4680         if test "$ol_arg" = "invalid" ; then
4681                 as_fn_error "bad value $enableval for --enable-refint" "$LINENO" 5
4682         fi
4683         ol_enable_refint="$ol_arg"
4684
4685 else
4686         ol_enable_refint=${ol_enable_overlays:-no}
4687 fi
4688
4689 # end --enable-refint
4690
4691 # OpenLDAP --enable-retcode
4692
4693         # Check whether --enable-retcode was given.
4694 if test "${enable_retcode+set}" = set; then :
4695   enableval=$enable_retcode;
4696         ol_arg=invalid
4697         for ol_val in no yes mod ; do
4698                 if test "$enableval" = "$ol_val" ; then
4699                         ol_arg="$ol_val"
4700                 fi
4701         done
4702         if test "$ol_arg" = "invalid" ; then
4703                 as_fn_error "bad value $enableval for --enable-retcode" "$LINENO" 5
4704         fi
4705         ol_enable_retcode="$ol_arg"
4706
4707 else
4708         ol_enable_retcode=${ol_enable_overlays:-no}
4709 fi
4710
4711 # end --enable-retcode
4712
4713 # OpenLDAP --enable-rwm
4714
4715         # Check whether --enable-rwm was given.
4716 if test "${enable_rwm+set}" = set; then :
4717   enableval=$enable_rwm;
4718         ol_arg=invalid
4719         for ol_val in no yes mod ; do
4720                 if test "$enableval" = "$ol_val" ; then
4721                         ol_arg="$ol_val"
4722                 fi
4723         done
4724         if test "$ol_arg" = "invalid" ; then
4725                 as_fn_error "bad value $enableval for --enable-rwm" "$LINENO" 5
4726         fi
4727         ol_enable_rwm="$ol_arg"
4728
4729 else
4730         ol_enable_rwm=${ol_enable_overlays:-no}
4731 fi
4732
4733 # end --enable-rwm
4734
4735 # OpenLDAP --enable-seqmod
4736
4737         # Check whether --enable-seqmod was given.
4738 if test "${enable_seqmod+set}" = set; then :
4739   enableval=$enable_seqmod;
4740         ol_arg=invalid
4741         for ol_val in no yes mod ; do
4742                 if test "$enableval" = "$ol_val" ; then
4743                         ol_arg="$ol_val"
4744                 fi
4745         done
4746         if test "$ol_arg" = "invalid" ; then
4747                 as_fn_error "bad value $enableval for --enable-seqmod" "$LINENO" 5
4748         fi
4749         ol_enable_seqmod="$ol_arg"
4750
4751 else
4752         ol_enable_seqmod=${ol_enable_overlays:-no}
4753 fi
4754
4755 # end --enable-seqmod
4756
4757 # OpenLDAP --enable-sssvlv
4758
4759         # Check whether --enable-sssvlv was given.
4760 if test "${enable_sssvlv+set}" = set; then :
4761   enableval=$enable_sssvlv;
4762         ol_arg=invalid
4763         for ol_val in no yes mod ; do
4764                 if test "$enableval" = "$ol_val" ; then
4765                         ol_arg="$ol_val"
4766                 fi
4767         done
4768         if test "$ol_arg" = "invalid" ; then
4769                 as_fn_error "bad value $enableval for --enable-sssvlv" "$LINENO" 5
4770         fi
4771         ol_enable_sssvlv="$ol_arg"
4772
4773 else
4774         ol_enable_sssvlv=${ol_enable_overlays:-no}
4775 fi
4776
4777 # end --enable-sssvlv
4778
4779 # OpenLDAP --enable-syncprov
4780
4781         # Check whether --enable-syncprov was given.
4782 if test "${enable_syncprov+set}" = set; then :
4783   enableval=$enable_syncprov;
4784         ol_arg=invalid
4785         for ol_val in no yes mod ; do
4786                 if test "$enableval" = "$ol_val" ; then
4787                         ol_arg="$ol_val"
4788                 fi
4789         done
4790         if test "$ol_arg" = "invalid" ; then
4791                 as_fn_error "bad value $enableval for --enable-syncprov" "$LINENO" 5
4792         fi
4793         ol_enable_syncprov="$ol_arg"
4794
4795 else
4796         ol_enable_syncprov=${ol_enable_overlays:-yes}
4797 fi
4798
4799 # end --enable-syncprov
4800
4801 # OpenLDAP --enable-translucent
4802
4803         # Check whether --enable-translucent was given.
4804 if test "${enable_translucent+set}" = set; then :
4805   enableval=$enable_translucent;
4806         ol_arg=invalid
4807         for ol_val in no yes mod ; do
4808                 if test "$enableval" = "$ol_val" ; then
4809                         ol_arg="$ol_val"
4810                 fi
4811         done
4812         if test "$ol_arg" = "invalid" ; then
4813                 as_fn_error "bad value $enableval for --enable-translucent" "$LINENO" 5
4814         fi
4815         ol_enable_translucent="$ol_arg"
4816
4817 else
4818         ol_enable_translucent=${ol_enable_overlays:-no}
4819 fi
4820
4821 # end --enable-translucent
4822
4823 # OpenLDAP --enable-unique
4824
4825         # Check whether --enable-unique was given.
4826 if test "${enable_unique+set}" = set; then :
4827   enableval=$enable_unique;
4828         ol_arg=invalid
4829         for ol_val in no yes mod ; do
4830                 if test "$enableval" = "$ol_val" ; then
4831                         ol_arg="$ol_val"
4832                 fi
4833         done
4834         if test "$ol_arg" = "invalid" ; then
4835                 as_fn_error "bad value $enableval for --enable-unique" "$LINENO" 5
4836         fi
4837         ol_enable_unique="$ol_arg"
4838
4839 else
4840         ol_enable_unique=${ol_enable_overlays:-no}
4841 fi
4842
4843 # end --enable-unique
4844
4845 # OpenLDAP --enable-valsort
4846
4847         # Check whether --enable-valsort was given.
4848 if test "${enable_valsort+set}" = set; then :
4849   enableval=$enable_valsort;
4850         ol_arg=invalid
4851         for ol_val in no yes mod ; do
4852                 if test "$enableval" = "$ol_val" ; then
4853                         ol_arg="$ol_val"
4854                 fi
4855         done
4856         if test "$ol_arg" = "invalid" ; then
4857                 as_fn_error "bad value $enableval for --enable-valsort" "$LINENO" 5
4858         fi
4859         ol_enable_valsort="$ol_arg"
4860
4861 else
4862         ol_enable_valsort=${ol_enable_overlays:-no}
4863 fi
4864
4865 # end --enable-valsort
4866
4867
4868 # Check whether --enable-xxliboptions was given.
4869 if test "${enable_xxliboptions+set}" = set; then :
4870   enableval=$enable_xxliboptions;
4871 fi
4872
4873 # Check whether --enable-static was given.
4874 if test "${enable_static+set}" = set; then :
4875   enableval=$enable_static; p=${PACKAGE-default}
4876     case $enableval in
4877     yes) enable_static=yes ;;
4878     no) enable_static=no ;;
4879     *)
4880      enable_static=no
4881       # Look at the argument we got.  We use all the common list separators.
4882       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4883       for pkg in $enableval; do
4884         IFS="$lt_save_ifs"
4885         if test "X$pkg" = "X$p"; then
4886           enable_static=yes
4887         fi
4888       done
4889       IFS="$lt_save_ifs"
4890       ;;
4891     esac
4892 else
4893   enable_static=yes
4894 fi
4895
4896
4897 # Check whether --enable-shared was given.
4898 if test "${enable_shared+set}" = set; then :
4899   enableval=$enable_shared; p=${PACKAGE-default}
4900     case $enableval in
4901     yes) enable_shared=yes ;;
4902     no) enable_shared=no ;;
4903     *)
4904       enable_shared=no
4905       # Look at the argument we got.  We use all the common list separators.
4906       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4907       for pkg in $enableval; do
4908         IFS="$lt_save_ifs"
4909         if test "X$pkg" = "X$p"; then
4910           enable_shared=yes
4911         fi
4912       done
4913       IFS="$lt_save_ifs"
4914       ;;
4915     esac
4916 else
4917   enable_shared=yes
4918 fi
4919
4920
4921
4922
4923 # validate options
4924 if test $ol_enable_slapd = no ; then
4925                 if test $ol_enable_slapi = yes ; then
4926                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
4927 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
4928         fi
4929         case "$ol_enable_backends" in yes | mod)
4930                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
4931 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
4932         esac
4933         for i in $Backends; do
4934                 eval "ol_tmp=\$ol_enable_$i"
4935                 if test $ol_tmp != no ; then
4936                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
4937 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
4938                         eval "ol_enable_$i=no"
4939                 fi
4940         done
4941         if test $ol_enable_modules = yes ; then
4942                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
4943 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
4944         fi
4945         if test $ol_enable_wrappers = yes ; then
4946                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
4947 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
4948         fi
4949         if test $ol_enable_rlookups = yes ; then
4950                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
4951 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
4952         fi
4953         if test $ol_enable_dynacl = yes ; then
4954                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
4955 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
4956         fi
4957         if test $ol_enable_aci != no ; then
4958                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
4959 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
4960         fi
4961         if test $ol_enable_rewrite = yes ; then
4962                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
4963 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
4964         fi
4965                 case "$ol_enable_overlays" in yes | mod)
4966                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
4967 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
4968         esac
4969         for i in $Overlays; do
4970                 eval "ol_tmp=\$ol_enable_$i"
4971                 if test $ol_tmp != no ; then
4972                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
4973 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
4974                         eval "ol_enable_$i=no"
4975                 fi
4976         done
4977
4978         # force settings to no
4979         ol_enable_slapi=no
4980
4981         ol_enable_backends=
4982         ol_enable_overlays=
4983         ol_enable_modules=no
4984         ol_enable_rlookups=no
4985         ol_enable_dynacl=no
4986         ol_enable_aci=no
4987         ol_enable_wrappers=no
4988
4989         ol_enable_rewrite=no
4990
4991 elif test $ol_enable_modules != yes &&
4992         test $ol_enable_bdb = no &&
4993         test $ol_enable_dnssrv = no &&
4994         test $ol_enable_hdb = no &&
4995         test $ol_enable_ldap = no &&
4996         test $ol_enable_meta = no &&
4997         test $ol_enable_monitor = no &&
4998         test $ol_enable_ndb = no &&
4999         test $ol_enable_null = no &&
5000         test $ol_enable_passwd = no &&
5001         test $ol_enable_perl = no &&
5002         test $ol_enable_relay = no &&
5003         test $ol_enable_shell = no &&
5004         test $ol_enable_sock = no &&
5005         test $ol_enable_sql = no ; then
5006
5007         if test $ol_enable_slapd = yes ; then
5008                 as_fn_error "slapd requires a backend" "$LINENO" 5
5009         else
5010                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipping slapd, no backend specified" >&5
5011 $as_echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
5012                 ol_enable_slapd=no
5013         fi
5014 fi
5015
5016 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
5017         as_fn_error "--enable-meta requires --enable-ldap" "$LINENO" 5
5018 fi
5019
5020 if test $ol_enable_lmpasswd = yes ; then
5021         if test $ol_with_tls = no ; then
5022                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
5023         fi
5024 fi
5025
5026 if test $ol_enable_spasswd = yes ; then
5027         if test $ol_with_cyrus_sasl = no ; then
5028                 as_fn_error "options require --with-cyrus-sasl" "$LINENO" 5
5029         fi
5030         ol_with_cyrus_sasl=yes
5031 fi
5032
5033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
5034 $as_echo "done" >&6; }
5035
5036 LDAP_LIBS=
5037 BDB_LIBS=
5038 SLAPD_NDB_LIBS=
5039 SLAPD_NDB_INCS=
5040 LTHREAD_LIBS=
5041 LUTIL_LIBS=
5042
5043 SLAPD_LIBS=
5044
5045 BUILD_SLAPD=no
5046
5047 BUILD_THREAD=no
5048
5049 BUILD_SLAPI=no
5050 SLAPD_SLAPI_DEPEND=
5051
5052 BUILD_BDB=no
5053 BUILD_DNSSRV=no
5054 BUILD_HDB=no
5055 BUILD_LDAP=no
5056 BUILD_META=no
5057 BUILD_MONITOR=no
5058 BUILD_NDB=no
5059 BUILD_NULL=no
5060 BUILD_PASSWD=no
5061 BUILD_PERL=no
5062 BUILD_RELAY=no
5063 BUILD_SHELL=no
5064 BUILD_SOCK=no
5065 BUILD_SQL=no
5066
5067 BUILD_ACCESSLOG=no
5068 BUILD_AUDITLOG=no
5069 BUILD_CONSTRAINT=no
5070 BUILD_DDS=no
5071 BUILD_DENYOP=no
5072 BUILD_DEREF=no
5073 BUILD_DYNGROUP=no
5074 BUILD_DYNLIST=no
5075 BUILD_LASTMOD=no
5076 BUILD_MEMBEROF=no
5077 BUILD_PPOLICY=no
5078 BUILD_PROXYCACHE=no
5079 BUILD_REFINT=no
5080 BUILD_RETCODE=no
5081 BUILD_RWM=no
5082 BUILD_SEQMOD=no
5083 BUILD_SSSVLV=no
5084 BUILD_SYNCPROV=no
5085 BUILD_TRANSLUCENT=no
5086 BUILD_UNIQUE=no
5087 BUILD_VALSORT=no
5088
5089 SLAPD_STATIC_OVERLAYS=
5090 SLAPD_DYNAMIC_OVERLAYS=
5091
5092 SLAPD_MODULES_LDFLAGS=
5093 SLAPD_MODULES_CPPFLAGS=
5094
5095 SLAPD_STATIC_BACKENDS=back-ldif
5096 SLAPD_DYNAMIC_BACKENDS=
5097
5098 SLAPD_PERL_LDFLAGS=
5099 MOD_PERL_LDFLAGS=
5100 PERL_CPPFLAGS=
5101
5102 SLAPD_SQL_LDFLAGS=
5103 SLAPD_SQL_LIBS=
5104 SLAPD_SQL_INCLUDES=
5105
5106 KRB4_LIBS=
5107 KRB5_LIBS=
5108 SASL_LIBS=
5109 TLS_LIBS=
5110 MODULES_LIBS=
5111 SLAPI_LIBS=
5112 LIBSLAPI=
5113 LIBSLAPITOOLS=
5114 AUTH_LIBS=
5115 ICU_LIBS=
5116
5117 SLAPD_SLP_LIBS=
5118 SLAPD_GMP_LIBS=
5119
5120
5121
5122 $as_echo "#define HAVE_MKVERSION 1" >>confdefs.h
5123
5124
5125
5126
5127 ol_aix_threads=no
5128 case "$target" in
5129 *-*-aix*)       if test -z "$CC" ; then
5130                 case "$ol_with_threads" in
5131                 auto | yes |  posix) ol_aix_threads=yes ;;
5132                 esac
5133         fi
5134 ;;
5135 esac
5136
5137 if test $ol_aix_threads = yes ; then
5138         if test -z "${CC}" ; then
5139                 for ac_prog in cc_r xlc_r cc
5140 do
5141   # Extract the first word of "$ac_prog", so it can be a program name with args.
5142 set dummy $ac_prog; ac_word=$2
5143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144 $as_echo_n "checking for $ac_word... " >&6; }
5145 if test "${ac_cv_prog_CC+set}" = set; then :
5146   $as_echo_n "(cached) " >&6
5147 else
5148   if test -n "$CC"; then
5149   ac_cv_prog_CC="$CC" # Let the user override the test.
5150 else
5151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152 for as_dir in $PATH
5153 do
5154   IFS=$as_save_IFS
5155   test -z "$as_dir" && as_dir=.
5156     for ac_exec_ext in '' $ac_executable_extensions; do
5157   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5158     ac_cv_prog_CC="$ac_prog"
5159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160     break 2
5161   fi
5162 done
5163   done
5164 IFS=$as_save_IFS
5165
5166 fi
5167 fi
5168 CC=$ac_cv_prog_CC
5169 if test -n "$CC"; then
5170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5171 $as_echo "$CC" >&6; }
5172 else
5173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5174 $as_echo "no" >&6; }
5175 fi
5176
5177
5178   test -n "$CC" && break
5179 done
5180
5181
5182                 if test "$CC" = cc ; then
5183                                                 if test $ol_with_threads != auto ; then
5184                                 as_fn_error "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
5185                         else
5186                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
5187 $as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
5188                         fi
5189                         ol_with_threads=no
5190                 fi
5191         fi
5192
5193         case ${CC} in cc_r | xlc_r)
5194                 ol_with_threads=posix
5195                 ol_cv_pthread_create=yes
5196                 ;;
5197         esac
5198 fi
5199
5200 if test -z "${CC}"; then
5201         for ac_prog in cc gcc
5202 do
5203   # Extract the first word of "$ac_prog", so it can be a program name with args.
5204 set dummy $ac_prog; ac_word=$2
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5206 $as_echo_n "checking for $ac_word... " >&6; }
5207 if test "${ac_cv_prog_CC+set}" = set; then :
5208   $as_echo_n "(cached) " >&6
5209 else
5210   if test -n "$CC"; then
5211   ac_cv_prog_CC="$CC" # Let the user override the test.
5212 else
5213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5214 for as_dir in $PATH
5215 do
5216   IFS=$as_save_IFS
5217   test -z "$as_dir" && as_dir=.
5218     for ac_exec_ext in '' $ac_executable_extensions; do
5219   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5220     ac_cv_prog_CC="$ac_prog"
5221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5222     break 2
5223   fi
5224 done
5225   done
5226 IFS=$as_save_IFS
5227
5228 fi
5229 fi
5230 CC=$ac_cv_prog_CC
5231 if test -n "$CC"; then
5232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5233 $as_echo "$CC" >&6; }
5234 else
5235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5236 $as_echo "no" >&6; }
5237 fi
5238
5239
5240   test -n "$CC" && break
5241 done
5242 test -n "$CC" || CC="missing"
5243
5244
5245         if test "${CC}" = "missing" ; then
5246                 as_fn_error "Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." "$LINENO" 5
5247         fi
5248 fi
5249
5250 if test -z "${AR}"; then
5251         for ac_prog in ar gar
5252 do
5253   # Extract the first word of "$ac_prog", so it can be a program name with args.
5254 set dummy $ac_prog; ac_word=$2
5255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5256 $as_echo_n "checking for $ac_word... " >&6; }
5257 if test "${ac_cv_prog_AR+set}" = set; then :
5258   $as_echo_n "(cached) " >&6
5259 else
5260   if test -n "$AR"; then
5261   ac_cv_prog_AR="$AR" # Let the user override the test.
5262 else
5263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5264 for as_dir in $PATH
5265 do
5266   IFS=$as_save_IFS
5267   test -z "$as_dir" && as_dir=.
5268     for ac_exec_ext in '' $ac_executable_extensions; do
5269   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5270     ac_cv_prog_AR="$ac_prog"
5271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5272     break 2
5273   fi
5274 done
5275   done
5276 IFS=$as_save_IFS
5277
5278 fi
5279 fi
5280 AR=$ac_cv_prog_AR
5281 if test -n "$AR"; then
5282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5283 $as_echo "$AR" >&6; }
5284 else
5285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5286 $as_echo "no" >&6; }
5287 fi
5288
5289
5290   test -n "$AR" && break
5291 done
5292 test -n "$AR" || AR="missing"
5293
5294
5295         if test "${AR}" = "missing" ; then
5296                 as_fn_error "Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." "$LINENO" 5
5297         fi
5298 fi
5299
5300
5301
5302
5303
5304 # Check whether --enable-fast-install was given.
5305 if test "${enable_fast_install+set}" = set; then :
5306   enableval=$enable_fast_install; p=${PACKAGE-default}
5307     case $enableval in
5308     yes) enable_fast_install=yes ;;
5309     no) enable_fast_install=no ;;
5310     *)
5311       enable_fast_install=no
5312       # Look at the argument we got.  We use all the common list separators.
5313       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5314       for pkg in $enableval; do
5315         IFS="$lt_save_ifs"
5316         if test "X$pkg" = "X$p"; then
5317           enable_fast_install=yes
5318         fi
5319       done
5320       IFS="$lt_save_ifs"
5321       ;;
5322     esac
5323 else
5324   enable_fast_install=yes
5325 fi
5326
5327
5328 DEPDIR="${am__leading_dot}deps"
5329
5330 ac_config_commands="$ac_config_commands depfiles"
5331
5332
5333 am_make=${MAKE-make}
5334 cat > confinc << 'END'
5335 am__doit:
5336         @echo done
5337 .PHONY: am__doit
5338 END
5339 # If we don't find an include directive, just comment out the code.
5340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5341 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5342 am__include="#"
5343 am__quote=
5344 _am_result=none
5345 # First try GNU make style include.
5346 echo "include confinc" > confmf
5347 # We grep out `Entering directory' and `Leaving directory'
5348 # messages which can occur if `w' ends up in MAKEFLAGS.
5349 # In particular we don't look at `^make:' because GNU make might
5350 # be invoked under some other name (usually "gmake"), in which
5351 # case it prints its new name instead of `make'.
5352 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
5353    am__include=include
5354    am__quote=
5355    _am_result=GNU
5356 fi
5357 # Now try BSD make style include.
5358 if test "$am__include" = "#"; then
5359    echo '.include "confinc"' > confmf
5360    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
5361       am__include=.include
5362       am__quote="\""
5363       _am_result=BSD
5364    fi
5365 fi
5366
5367
5368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5369 $as_echo "$_am_result" >&6; }
5370 rm -f confinc confmf
5371
5372 # Check whether --enable-dependency-tracking was given.
5373 if test "${enable_dependency_tracking+set}" = set; then :
5374   enableval=$enable_dependency_tracking;
5375 fi
5376
5377 if test "x$enable_dependency_tracking" != xno; then
5378   am_depcomp="$ac_aux_dir/depcomp"
5379   AMDEPBACKSLASH='\'
5380 fi
5381
5382
5383 if test "x$enable_dependency_tracking" != xno; then
5384   AMDEP_TRUE=
5385   AMDEP_FALSE='#'
5386 else
5387   AMDEP_TRUE='#'
5388   AMDEP_FALSE=
5389 fi
5390
5391
5392
5393 ac_ext=c
5394 ac_cpp='$CPP $CPPFLAGS'
5395 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5396 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5397 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5398 if test -n "$ac_tool_prefix"; then
5399   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5400 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5402 $as_echo_n "checking for $ac_word... " >&6; }
5403 if test "${ac_cv_prog_CC+set}" = set; then :
5404   $as_echo_n "(cached) " >&6
5405 else
5406   if test -n "$CC"; then
5407   ac_cv_prog_CC="$CC" # Let the user override the test.
5408 else
5409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5410 for as_dir in $PATH
5411 do
5412   IFS=$as_save_IFS
5413   test -z "$as_dir" && as_dir=.
5414     for ac_exec_ext in '' $ac_executable_extensions; do
5415   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5416     ac_cv_prog_CC="${ac_tool_prefix}gcc"
5417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5418     break 2
5419   fi
5420 done
5421   done
5422 IFS=$as_save_IFS
5423
5424 fi
5425 fi
5426 CC=$ac_cv_prog_CC
5427 if test -n "$CC"; then
5428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5429 $as_echo "$CC" >&6; }
5430 else
5431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5432 $as_echo "no" >&6; }
5433 fi
5434
5435
5436 fi
5437 if test -z "$ac_cv_prog_CC"; then
5438   ac_ct_CC=$CC
5439   # Extract the first word of "gcc", so it can be a program name with args.
5440 set dummy gcc; ac_word=$2
5441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5442 $as_echo_n "checking for $ac_word... " >&6; }
5443 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5444   $as_echo_n "(cached) " >&6
5445 else
5446   if test -n "$ac_ct_CC"; then
5447   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5448 else
5449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5450 for as_dir in $PATH
5451 do
5452   IFS=$as_save_IFS
5453   test -z "$as_dir" && as_dir=.
5454     for ac_exec_ext in '' $ac_executable_extensions; do
5455   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5456     ac_cv_prog_ac_ct_CC="gcc"
5457     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5458     break 2
5459   fi
5460 done
5461   done
5462 IFS=$as_save_IFS
5463
5464 fi
5465 fi
5466 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5467 if test -n "$ac_ct_CC"; then
5468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5469 $as_echo "$ac_ct_CC" >&6; }
5470 else
5471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5472 $as_echo "no" >&6; }
5473 fi
5474
5475   if test "x$ac_ct_CC" = x; then
5476     CC=""
5477   else
5478     case $cross_compiling:$ac_tool_warned in
5479 yes:)
5480 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5481 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5482 ac_tool_warned=yes ;;
5483 esac
5484     CC=$ac_ct_CC
5485   fi
5486 else
5487   CC="$ac_cv_prog_CC"
5488 fi
5489
5490 if test -z "$CC"; then
5491           if test -n "$ac_tool_prefix"; then
5492     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5493 set dummy ${ac_tool_prefix}cc; ac_word=$2
5494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5495 $as_echo_n "checking for $ac_word... " >&6; }
5496 if test "${ac_cv_prog_CC+set}" = set; then :
5497   $as_echo_n "(cached) " >&6
5498 else
5499   if test -n "$CC"; then
5500   ac_cv_prog_CC="$CC" # Let the user override the test.
5501 else
5502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5503 for as_dir in $PATH
5504 do
5505   IFS=$as_save_IFS
5506   test -z "$as_dir" && as_dir=.
5507     for ac_exec_ext in '' $ac_executable_extensions; do
5508   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5509     ac_cv_prog_CC="${ac_tool_prefix}cc"
5510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5511     break 2
5512   fi
5513 done
5514   done
5515 IFS=$as_save_IFS
5516
5517 fi
5518 fi
5519 CC=$ac_cv_prog_CC
5520 if test -n "$CC"; then
5521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5522 $as_echo "$CC" >&6; }
5523 else
5524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5525 $as_echo "no" >&6; }
5526 fi
5527
5528
5529   fi
5530 fi
5531 if test -z "$CC"; then
5532   # Extract the first word of "cc", so it can be a program name with args.
5533 set dummy cc; ac_word=$2
5534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5535 $as_echo_n "checking for $ac_word... " >&6; }
5536 if test "${ac_cv_prog_CC+set}" = set; then :
5537   $as_echo_n "(cached) " >&6
5538 else
5539   if test -n "$CC"; then
5540   ac_cv_prog_CC="$CC" # Let the user override the test.
5541 else
5542   ac_prog_rejected=no
5543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5544 for as_dir in $PATH
5545 do
5546   IFS=$as_save_IFS
5547   test -z "$as_dir" && as_dir=.
5548     for ac_exec_ext in '' $ac_executable_extensions; do
5549   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5550     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5551        ac_prog_rejected=yes
5552        continue
5553      fi
5554     ac_cv_prog_CC="cc"
5555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5556     break 2
5557   fi
5558 done
5559   done
5560 IFS=$as_save_IFS
5561
5562 if test $ac_prog_rejected = yes; then
5563   # We found a bogon in the path, so make sure we never use it.
5564   set dummy $ac_cv_prog_CC
5565   shift
5566   if test $# != 0; then
5567     # We chose a different compiler from the bogus one.
5568     # However, it has the same basename, so the bogon will be chosen
5569     # first if we set CC to just the basename; use the full file name.
5570     shift
5571     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5572   fi
5573 fi
5574 fi
5575 fi
5576 CC=$ac_cv_prog_CC
5577 if test -n "$CC"; then
5578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5579 $as_echo "$CC" >&6; }
5580 else
5581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5582 $as_echo "no" >&6; }
5583 fi
5584
5585
5586 fi
5587 if test -z "$CC"; then
5588   if test -n "$ac_tool_prefix"; then
5589   for ac_prog in cl.exe
5590   do
5591     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5592 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5594 $as_echo_n "checking for $ac_word... " >&6; }
5595 if test "${ac_cv_prog_CC+set}" = set; then :
5596   $as_echo_n "(cached) " >&6
5597 else
5598   if test -n "$CC"; then
5599   ac_cv_prog_CC="$CC" # Let the user override the test.
5600 else
5601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5602 for as_dir in $PATH
5603 do
5604   IFS=$as_save_IFS
5605   test -z "$as_dir" && as_dir=.
5606     for ac_exec_ext in '' $ac_executable_extensions; do
5607   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5608     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5610     break 2
5611   fi
5612 done
5613   done
5614 IFS=$as_save_IFS
5615
5616 fi
5617 fi
5618 CC=$ac_cv_prog_CC
5619 if test -n "$CC"; then
5620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5621 $as_echo "$CC" >&6; }
5622 else
5623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5624 $as_echo "no" >&6; }
5625 fi
5626
5627
5628     test -n "$CC" && break
5629   done
5630 fi
5631 if test -z "$CC"; then
5632   ac_ct_CC=$CC
5633   for ac_prog in cl.exe
5634 do
5635   # Extract the first word of "$ac_prog", so it can be a program name with args.
5636 set dummy $ac_prog; ac_word=$2
5637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5638 $as_echo_n "checking for $ac_word... " >&6; }
5639 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5640   $as_echo_n "(cached) " >&6
5641 else
5642   if test -n "$ac_ct_CC"; then
5643   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5644 else
5645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5646 for as_dir in $PATH
5647 do
5648   IFS=$as_save_IFS
5649   test -z "$as_dir" && as_dir=.
5650     for ac_exec_ext in '' $ac_executable_extensions; do
5651   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5652     ac_cv_prog_ac_ct_CC="$ac_prog"
5653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5654     break 2
5655   fi
5656 done
5657   done
5658 IFS=$as_save_IFS
5659
5660 fi
5661 fi
5662 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5663 if test -n "$ac_ct_CC"; then
5664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5665 $as_echo "$ac_ct_CC" >&6; }
5666 else
5667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668 $as_echo "no" >&6; }
5669 fi
5670
5671
5672   test -n "$ac_ct_CC" && break
5673 done
5674
5675   if test "x$ac_ct_CC" = x; then
5676     CC=""
5677   else
5678     case $cross_compiling:$ac_tool_warned in
5679 yes:)
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5681 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5682 ac_tool_warned=yes ;;
5683 esac
5684     CC=$ac_ct_CC
5685   fi
5686 fi
5687
5688 fi
5689
5690
5691 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5692 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5693 as_fn_error "no acceptable C compiler found in \$PATH
5694 See \`config.log' for more details." "$LINENO" 5; }
5695
5696 # Provide some information about the compiler.
5697 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5698 set X $ac_compile
5699 ac_compiler=$2
5700 for ac_option in --version -v -V -qversion; do
5701   { { ac_try="$ac_compiler $ac_option >&5"
5702 case "(($ac_try" in
5703   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5704   *) ac_try_echo=$ac_try;;
5705 esac
5706 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5707 $as_echo "$ac_try_echo"; } >&5
5708   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5709   ac_status=$?
5710   if test -s conftest.err; then
5711     sed '10a\
5712 ... rest of stderr output deleted ...
5713          10q' conftest.err >conftest.er1
5714     cat conftest.er1 >&5
5715   fi
5716   rm -f conftest.er1 conftest.err
5717   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5718   test $ac_status = 0; }
5719 done
5720
5721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5722 /* end confdefs.h.  */
5723
5724 int
5725 main ()
5726 {
5727
5728   ;
5729   return 0;
5730 }
5731 _ACEOF
5732 ac_clean_files_save=$ac_clean_files
5733 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5734 # Try to create an executable without -o first, disregard a.out.
5735 # It will help us diagnose broken compilers, and finding out an intuition
5736 # of exeext.
5737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5738 $as_echo_n "checking whether the C compiler works... " >&6; }
5739 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5740
5741 # The possible output files:
5742 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5743
5744 ac_rmfiles=
5745 for ac_file in $ac_files
5746 do
5747   case $ac_file in
5748     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5749     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5750   esac
5751 done
5752 rm -f $ac_rmfiles
5753
5754 if { { ac_try="$ac_link_default"
5755 case "(($ac_try" in
5756   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5757   *) ac_try_echo=$ac_try;;
5758 esac
5759 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5760 $as_echo "$ac_try_echo"; } >&5
5761   (eval "$ac_link_default") 2>&5
5762   ac_status=$?
5763   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5764   test $ac_status = 0; }; then :
5765   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5766 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5767 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
5768 # so that the user can short-circuit this test for compilers unknown to
5769 # Autoconf.
5770 for ac_file in $ac_files ''
5771 do
5772   test -f "$ac_file" || continue
5773   case $ac_file in
5774     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5775         ;;
5776     [ab].out )
5777         # We found the default executable, but exeext='' is most
5778         # certainly right.
5779         break;;
5780     *.* )
5781         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5782         then :; else
5783            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5784         fi
5785         # We set ac_cv_exeext here because the later test for it is not
5786         # safe: cross compilers may not add the suffix if given an `-o'
5787         # argument, so we may need to know it at that point already.
5788         # Even if this section looks crufty: it has the advantage of
5789         # actually working.
5790         break;;
5791     * )
5792         break;;
5793   esac
5794 done
5795 test "$ac_cv_exeext" = no && ac_cv_exeext=
5796
5797 else
5798   ac_file=''
5799 fi
5800 if test -z "$ac_file"; then :
5801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5802 $as_echo "no" >&6; }
5803 $as_echo "$as_me: failed program was:" >&5
5804 sed 's/^/| /' conftest.$ac_ext >&5
5805
5806 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5807 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5808 { as_fn_set_status 77
5809 as_fn_error "C compiler cannot create executables
5810 See \`config.log' for more details." "$LINENO" 5; }; }
5811 else
5812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5813 $as_echo "yes" >&6; }
5814 fi
5815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5816 $as_echo_n "checking for C compiler default output file name... " >&6; }
5817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5818 $as_echo "$ac_file" >&6; }
5819 ac_exeext=$ac_cv_exeext
5820
5821 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5822 ac_clean_files=$ac_clean_files_save
5823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5824 $as_echo_n "checking for suffix of executables... " >&6; }
5825 if { { ac_try="$ac_link"
5826 case "(($ac_try" in
5827   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5828   *) ac_try_echo=$ac_try;;
5829 esac
5830 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5831 $as_echo "$ac_try_echo"; } >&5
5832   (eval "$ac_link") 2>&5
5833   ac_status=$?
5834   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5835   test $ac_status = 0; }; then :
5836   # If both `conftest.exe' and `conftest' are `present' (well, observable)
5837 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5838 # work properly (i.e., refer to `conftest.exe'), while it won't with
5839 # `rm'.
5840 for ac_file in conftest.exe conftest conftest.*; do
5841   test -f "$ac_file" || continue
5842   case $ac_file in
5843     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5844     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5845           break;;
5846     * ) break;;
5847   esac
5848 done
5849 else
5850   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5851 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5852 as_fn_error "cannot compute suffix of executables: cannot compile and link
5853 See \`config.log' for more details." "$LINENO" 5; }
5854 fi
5855 rm -f conftest conftest$ac_cv_exeext
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5857 $as_echo "$ac_cv_exeext" >&6; }
5858
5859 rm -f conftest.$ac_ext
5860 EXEEXT=$ac_cv_exeext
5861 ac_exeext=$EXEEXT
5862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5863 /* end confdefs.h.  */
5864 #include <stdio.h>
5865 int
5866 main ()
5867 {
5868 FILE *f = fopen ("conftest.out", "w");
5869  return ferror (f) || fclose (f) != 0;
5870
5871   ;
5872   return 0;
5873 }
5874 _ACEOF
5875 ac_clean_files="$ac_clean_files conftest.out"
5876 # Check that the compiler produces executables we can run.  If not, either
5877 # the compiler is broken, or we cross compile.
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5879 $as_echo_n "checking whether we are cross compiling... " >&6; }
5880 if test "$cross_compiling" != yes; then
5881   { { ac_try="$ac_link"
5882 case "(($ac_try" in
5883   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5884   *) ac_try_echo=$ac_try;;
5885 esac
5886 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5887 $as_echo "$ac_try_echo"; } >&5
5888   (eval "$ac_link") 2>&5
5889   ac_status=$?
5890   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5891   test $ac_status = 0; }
5892   if { ac_try='./conftest$ac_cv_exeext'
5893   { { case "(($ac_try" in
5894   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5895   *) ac_try_echo=$ac_try;;
5896 esac
5897 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5898 $as_echo "$ac_try_echo"; } >&5
5899   (eval "$ac_try") 2>&5
5900   ac_status=$?
5901   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5902   test $ac_status = 0; }; }; then
5903     cross_compiling=no
5904   else
5905     if test "$cross_compiling" = maybe; then
5906         cross_compiling=yes
5907     else
5908         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5909 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5910 as_fn_error "cannot run C compiled programs.
5911 If you meant to cross compile, use \`--host'.
5912 See \`config.log' for more details." "$LINENO" 5; }
5913     fi
5914   fi
5915 fi
5916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5917 $as_echo "$cross_compiling" >&6; }
5918
5919 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5920 ac_clean_files=$ac_clean_files_save
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5922 $as_echo_n "checking for suffix of object files... " >&6; }
5923 if test "${ac_cv_objext+set}" = set; then :
5924   $as_echo_n "(cached) " >&6
5925 else
5926   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5927 /* end confdefs.h.  */
5928
5929 int
5930 main ()
5931 {
5932
5933   ;
5934   return 0;
5935 }
5936 _ACEOF
5937 rm -f conftest.o conftest.obj
5938 if { { ac_try="$ac_compile"
5939 case "(($ac_try" in
5940   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5941   *) ac_try_echo=$ac_try;;
5942 esac
5943 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5944 $as_echo "$ac_try_echo"; } >&5
5945   (eval "$ac_compile") 2>&5
5946   ac_status=$?
5947   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5948   test $ac_status = 0; }; then :
5949   for ac_file in conftest.o conftest.obj conftest.*; do
5950   test -f "$ac_file" || continue;
5951   case $ac_file in
5952     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5953     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5954        break;;
5955   esac
5956 done
5957 else
5958   $as_echo "$as_me: failed program was:" >&5
5959 sed 's/^/| /' conftest.$ac_ext >&5
5960
5961 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5962 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5963 as_fn_error "cannot compute suffix of object files: cannot compile
5964 See \`config.log' for more details." "$LINENO" 5; }
5965 fi
5966 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5967 fi
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5969 $as_echo "$ac_cv_objext" >&6; }
5970 OBJEXT=$ac_cv_objext
5971 ac_objext=$OBJEXT
5972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5973 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5974 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5975   $as_echo_n "(cached) " >&6
5976 else
5977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5978 /* end confdefs.h.  */
5979
5980 int
5981 main ()
5982 {
5983 #ifndef __GNUC__
5984        choke me
5985 #endif
5986
5987   ;
5988   return 0;
5989 }
5990 _ACEOF
5991 if ac_fn_c_try_compile "$LINENO"; then :
5992   ac_compiler_gnu=yes
5993 else
5994   ac_compiler_gnu=no
5995 fi
5996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5997 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5998
5999 fi
6000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6001 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
6002 if test $ac_compiler_gnu = yes; then
6003   GCC=yes
6004 else
6005   GCC=
6006 fi
6007 ac_test_CFLAGS=${CFLAGS+set}
6008 ac_save_CFLAGS=$CFLAGS
6009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6010 $as_echo_n "checking whether $CC accepts -g... " >&6; }
6011 if test "${ac_cv_prog_cc_g+set}" = set; then :
6012   $as_echo_n "(cached) " >&6
6013 else
6014   ac_save_c_werror_flag=$ac_c_werror_flag
6015    ac_c_werror_flag=yes
6016    ac_cv_prog_cc_g=no
6017    CFLAGS="-g"
6018    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6019 /* end confdefs.h.  */
6020
6021 int
6022 main ()
6023 {
6024
6025   ;
6026   return 0;
6027 }
6028 _ACEOF
6029 if ac_fn_c_try_compile "$LINENO"; then :
6030   ac_cv_prog_cc_g=yes
6031 else
6032   CFLAGS=""
6033       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6034 /* end confdefs.h.  */
6035
6036 int
6037 main ()
6038 {
6039
6040   ;
6041   return 0;
6042 }
6043 _ACEOF
6044 if ac_fn_c_try_compile "$LINENO"; then :
6045
6046 else
6047   ac_c_werror_flag=$ac_save_c_werror_flag
6048          CFLAGS="-g"
6049          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6050 /* end confdefs.h.  */
6051
6052 int
6053 main ()
6054 {
6055
6056   ;
6057   return 0;
6058 }
6059 _ACEOF
6060 if ac_fn_c_try_compile "$LINENO"; then :
6061   ac_cv_prog_cc_g=yes
6062 fi
6063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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    ac_c_werror_flag=$ac_save_c_werror_flag
6069 fi
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6071 $as_echo "$ac_cv_prog_cc_g" >&6; }
6072 if test "$ac_test_CFLAGS" = set; then
6073   CFLAGS=$ac_save_CFLAGS
6074 elif test $ac_cv_prog_cc_g = yes; then
6075   if test "$GCC" = yes; then
6076     CFLAGS="-g -O2"
6077   else
6078     CFLAGS="-g"
6079   fi
6080 else
6081   if test "$GCC" = yes; then
6082     CFLAGS="-O2"
6083   else
6084     CFLAGS=
6085   fi
6086 fi
6087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6088 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6089 if test "${ac_cv_prog_cc_c89+set}" = set; then :
6090   $as_echo_n "(cached) " >&6
6091 else
6092   ac_cv_prog_cc_c89=no
6093 ac_save_CC=$CC
6094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6095 /* end confdefs.h.  */
6096 #include <stdarg.h>
6097 #include <stdio.h>
6098 #include <sys/types.h>
6099 #include <sys/stat.h>
6100 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6101 struct buf { int x; };
6102 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6103 static char *e (p, i)
6104      char **p;
6105      int i;
6106 {
6107   return p[i];
6108 }
6109 static char *f (char * (*g) (char **, int), char **p, ...)
6110 {
6111   char *s;
6112   va_list v;
6113   va_start (v,p);
6114   s = g (p, va_arg (v,int));
6115   va_end (v);
6116   return s;
6117 }
6118
6119 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6120    function prototypes and stuff, but not '\xHH' hex character constants.
6121    These don't provoke an error unfortunately, instead are silently treated
6122    as 'x'.  The following induces an error, until -std is added to get
6123    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6124    array size at least.  It's necessary to write '\x00'==0 to get something
6125    that's true only with -std.  */
6126 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6127
6128 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6129    inside strings and character constants.  */
6130 #define FOO(x) 'x'
6131 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6132
6133 int test (int i, double x);
6134 struct s1 {int (*f) (int a);};
6135 struct s2 {int (*f) (double a);};
6136 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6137 int argc;
6138 char **argv;
6139 int
6140 main ()
6141 {
6142 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6143   ;
6144   return 0;
6145 }
6146 _ACEOF
6147 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6148         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6149 do
6150   CC="$ac_save_CC $ac_arg"
6151   if ac_fn_c_try_compile "$LINENO"; then :
6152   ac_cv_prog_cc_c89=$ac_arg
6153 fi
6154 rm -f core conftest.err conftest.$ac_objext
6155   test "x$ac_cv_prog_cc_c89" != "xno" && break
6156 done
6157 rm -f conftest.$ac_ext
6158 CC=$ac_save_CC
6159
6160 fi
6161 # AC_CACHE_VAL
6162 case "x$ac_cv_prog_cc_c89" in
6163   x)
6164     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6165 $as_echo "none needed" >&6; } ;;
6166   xno)
6167     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6168 $as_echo "unsupported" >&6; } ;;
6169   *)
6170     CC="$CC $ac_cv_prog_cc_c89"
6171     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6172 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6173 esac
6174 if test "x$ac_cv_prog_cc_c89" != xno; then :
6175
6176 fi
6177
6178 ac_ext=c
6179 ac_cpp='$CPP $CPPFLAGS'
6180 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6181 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6182 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6183
6184 depcc="$CC"   am_compiler_list=
6185
6186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6187 $as_echo_n "checking dependency style of $depcc... " >&6; }
6188 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
6189   $as_echo_n "(cached) " >&6
6190 else
6191   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6192   # We make a subdir and do the tests there.  Otherwise we can end up
6193   # making bogus files that we don't know about and never remove.  For
6194   # instance it was reported that on HP-UX the gcc test will end up
6195   # making a dummy file named `D' -- because `-MD' means `put the output
6196   # in D'.
6197   mkdir conftest.dir
6198   # Copy depcomp to subdir because otherwise we won't find it if we're
6199   # using a relative directory.
6200   cp "$am_depcomp" conftest.dir
6201   cd conftest.dir
6202   # We will build objects and dependencies in a subdirectory because
6203   # it helps to detect inapplicable dependency modes.  For instance
6204   # both Tru64's cc and ICC support -MD to output dependencies as a
6205   # side effect of compilation, but ICC will put the dependencies in
6206   # the current directory while Tru64 will put them in the object
6207   # directory.
6208   mkdir sub
6209
6210   am_cv_CC_dependencies_compiler_type=none
6211   if test "$am_compiler_list" = ""; then
6212      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6213   fi
6214   for depmode in $am_compiler_list; do
6215     # Setup a source with many dependencies, because some compilers
6216     # like to wrap large dependency lists on column 80 (with \), and
6217     # we should not choose a depcomp mode which is confused by this.
6218     #
6219     # We need to recreate these files for each test, as the compiler may
6220     # overwrite some of them when testing with obscure command lines.
6221     # This happens at least with the AIX C compiler.
6222     : > sub/conftest.c
6223     for i in 1 2 3 4 5 6; do
6224       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6225       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6226       # Solaris 8's {/usr,}/bin/sh.
6227       touch sub/conftst$i.h
6228     done
6229     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6230
6231     case $depmode in
6232     nosideeffect)
6233       # after this tag, mechanisms are not by side-effect, so they'll
6234       # only be used when explicitly requested
6235       if test "x$enable_dependency_tracking" = xyes; then
6236         continue
6237       else
6238         break
6239       fi
6240       ;;
6241     none) break ;;
6242     esac
6243     # We check with `-c' and `-o' for the sake of the "dashmstdout"
6244     # mode.  It turns out that the SunPro C++ compiler does not properly
6245     # handle `-M -o', and we need to detect this.
6246     if depmode=$depmode \
6247        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6248        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6249        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6250          >/dev/null 2>conftest.err &&
6251        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6252        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6253        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6254       # icc doesn't choke on unknown options, it will just issue warnings
6255       # or remarks (even with -Werror).  So we grep stderr for any message
6256       # that says an option was ignored or not supported.
6257       # When given -MP, icc 7.0 and 7.1 complain thusly:
6258       #   icc: Command line warning: ignoring option '-M'; no argument required
6259       # The diagnosis changed in icc 8.0:
6260       #   icc: Command line remark: option '-MP' not supported
6261       if (grep 'ignoring option' conftest.err ||
6262           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6263         am_cv_CC_dependencies_compiler_type=$depmode
6264         break
6265       fi
6266     fi
6267   done
6268
6269   cd ..
6270   rm -rf conftest.dir
6271 else
6272   am_cv_CC_dependencies_compiler_type=none
6273 fi
6274
6275 fi
6276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6277 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6278 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6279
6280
6281
6282 if
6283   test "x$enable_dependency_tracking" != xno \
6284   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6285   am__fastdepCC_TRUE=
6286   am__fastdepCC_FALSE='#'
6287 else
6288   am__fastdepCC_TRUE='#'
6289   am__fastdepCC_FALSE=
6290 fi
6291
6292
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6294 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6295 if test "${lt_cv_path_SED+set}" = set; then :
6296   $as_echo_n "(cached) " >&6
6297 else
6298   # Loop through the user's path and test for sed and gsed.
6299 # Then use that list of sed's as ones to test for truncation.
6300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6301 for as_dir in $PATH
6302 do
6303   IFS=$as_save_IFS
6304   test -z "$as_dir" && as_dir=.
6305   for lt_ac_prog in sed gsed; do
6306     for ac_exec_ext in '' $ac_executable_extensions; do
6307       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6308         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6309       fi
6310     done
6311   done
6312 done
6313 lt_ac_max=0
6314 lt_ac_count=0
6315 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6316 # along with /bin/sed that truncates output.
6317 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6318   test ! -f $lt_ac_sed && continue
6319   cat /dev/null > conftest.in
6320   lt_ac_count=0
6321   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6322   # Check for GNU sed and select it if it is found.
6323   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6324     lt_cv_path_SED=$lt_ac_sed
6325     break
6326   fi
6327   while true; do
6328     cat conftest.in conftest.in >conftest.tmp
6329     mv conftest.tmp conftest.in
6330     cp conftest.in conftest.nl
6331     echo >>conftest.nl
6332     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6333     cmp -s conftest.out conftest.nl || break
6334     # 10000 chars as input seems more than enough
6335     test $lt_ac_count -gt 10 && break
6336     lt_ac_count=`expr $lt_ac_count + 1`
6337     if test $lt_ac_count -gt $lt_ac_max; then
6338       lt_ac_max=$lt_ac_count
6339       lt_cv_path_SED=$lt_ac_sed
6340     fi
6341   done
6342 done
6343
6344 fi
6345
6346 SED=$lt_cv_path_SED
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
6348 $as_echo "$SED" >&6; }
6349
6350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6351 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6352 if test "${ac_cv_path_GREP+set}" = set; then :
6353   $as_echo_n "(cached) " >&6
6354 else
6355   if test -z "$GREP"; then
6356   ac_path_GREP_found=false
6357   # Loop through the user's path and test for each of PROGNAME-LIST
6358   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6359 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6360 do
6361   IFS=$as_save_IFS
6362   test -z "$as_dir" && as_dir=.
6363     for ac_prog in grep ggrep; do
6364     for ac_exec_ext in '' $ac_executable_extensions; do
6365       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6366       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6367 # Check for GNU ac_path_GREP and select it if it is found.
6368   # Check for GNU $ac_path_GREP
6369 case `"$ac_path_GREP" --version 2>&1` in
6370 *GNU*)
6371   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6372 *)
6373   ac_count=0
6374   $as_echo_n 0123456789 >"conftest.in"
6375   while :
6376   do
6377     cat "conftest.in" "conftest.in" >"conftest.tmp"
6378     mv "conftest.tmp" "conftest.in"
6379     cp "conftest.in" "conftest.nl"
6380     $as_echo 'GREP' >> "conftest.nl"
6381     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6382     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6383     as_fn_arith $ac_count + 1 && ac_count=$as_val
6384     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6385       # Best one so far, save it but keep looking for a better one
6386       ac_cv_path_GREP="$ac_path_GREP"
6387       ac_path_GREP_max=$ac_count
6388     fi
6389     # 10*(2^10) chars as input seems more than enough
6390     test $ac_count -gt 10 && break
6391   done
6392   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6393 esac
6394
6395       $ac_path_GREP_found && break 3
6396     done
6397   done
6398   done
6399 IFS=$as_save_IFS
6400   if test -z "$ac_cv_path_GREP"; then
6401     as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6402   fi
6403 else
6404   ac_cv_path_GREP=$GREP
6405 fi
6406
6407 fi
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6409 $as_echo "$ac_cv_path_GREP" >&6; }
6410  GREP="$ac_cv_path_GREP"
6411
6412
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6414 $as_echo_n "checking for egrep... " >&6; }
6415 if test "${ac_cv_path_EGREP+set}" = set; then :
6416   $as_echo_n "(cached) " >&6
6417 else
6418   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6419    then ac_cv_path_EGREP="$GREP -E"
6420    else
6421      if test -z "$EGREP"; then
6422   ac_path_EGREP_found=false
6423   # Loop through the user's path and test for each of PROGNAME-LIST
6424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6425 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6426 do
6427   IFS=$as_save_IFS
6428   test -z "$as_dir" && as_dir=.
6429     for ac_prog in egrep; do
6430     for ac_exec_ext in '' $ac_executable_extensions; do
6431       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6432       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6433 # Check for GNU ac_path_EGREP and select it if it is found.
6434   # Check for GNU $ac_path_EGREP
6435 case `"$ac_path_EGREP" --version 2>&1` in
6436 *GNU*)
6437   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6438 *)
6439   ac_count=0
6440   $as_echo_n 0123456789 >"conftest.in"
6441   while :
6442   do
6443     cat "conftest.in" "conftest.in" >"conftest.tmp"
6444     mv "conftest.tmp" "conftest.in"
6445     cp "conftest.in" "conftest.nl"
6446     $as_echo 'EGREP' >> "conftest.nl"
6447     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6448     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6449     as_fn_arith $ac_count + 1 && ac_count=$as_val
6450     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6451       # Best one so far, save it but keep looking for a better one
6452       ac_cv_path_EGREP="$ac_path_EGREP"
6453       ac_path_EGREP_max=$ac_count
6454     fi
6455     # 10*(2^10) chars as input seems more than enough
6456     test $ac_count -gt 10 && break
6457   done
6458   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6459 esac
6460
6461       $ac_path_EGREP_found && break 3
6462     done
6463   done
6464   done
6465 IFS=$as_save_IFS
6466   if test -z "$ac_cv_path_EGREP"; then
6467     as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6468   fi
6469 else
6470   ac_cv_path_EGREP=$EGREP
6471 fi
6472
6473    fi
6474 fi
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6476 $as_echo "$ac_cv_path_EGREP" >&6; }
6477  EGREP="$ac_cv_path_EGREP"
6478
6479
6480
6481 # Check whether --with-gnu-ld was given.
6482 if test "${with_gnu_ld+set}" = set; then :
6483   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6484 else
6485   with_gnu_ld=no
6486 fi
6487
6488 ac_prog=ld
6489 if test "$GCC" = yes; then
6490   # Check if gcc -print-prog-name=ld gives a path.
6491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
6492 $as_echo_n "checking for ld used by $CC... " >&6; }
6493   case $host in
6494   *-*-mingw*)
6495     # gcc leaves a trailing carriage return which upsets mingw
6496     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6497   *)
6498     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6499   esac
6500   case $ac_prog in
6501     # Accept absolute paths.
6502     [\\/]* | ?:[\\/]*)
6503       re_direlt='/[^/][^/]*/\.\./'
6504       # Canonicalize the pathname of ld
6505       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
6506       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6507         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
6508       done
6509       test -z "$LD" && LD="$ac_prog"
6510       ;;
6511   "")
6512     # If it fails, then pretend we aren't using GCC.
6513     ac_prog=ld
6514     ;;
6515   *)
6516     # If it is relative, then search for the first ld in PATH.
6517     with_gnu_ld=unknown
6518     ;;
6519   esac
6520 elif test "$with_gnu_ld" = yes; then
6521   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6522 $as_echo_n "checking for GNU ld... " >&6; }
6523 else
6524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6525 $as_echo_n "checking for non-GNU ld... " >&6; }
6526 fi
6527 if test "${lt_cv_path_LD+set}" = set; then :
6528   $as_echo_n "(cached) " >&6
6529 else
6530   if test -z "$LD"; then
6531   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6532   for ac_dir in $PATH; do
6533     IFS="$lt_save_ifs"
6534     test -z "$ac_dir" && ac_dir=.
6535     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6536       lt_cv_path_LD="$ac_dir/$ac_prog"
6537       # Check to see if the program is GNU ld.  I'd rather use --version,
6538       # but apparently some variants of GNU ld only accept -v.
6539       # Break only if it was the GNU/non-GNU ld that we prefer.
6540       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6541       *GNU* | *'with BFD'*)
6542         test "$with_gnu_ld" != no && break
6543         ;;
6544       *)
6545         test "$with_gnu_ld" != yes && break
6546         ;;
6547       esac
6548     fi
6549   done
6550   IFS="$lt_save_ifs"
6551 else
6552   lt_cv_path_LD="$LD" # Let the user override the test with a path.
6553 fi
6554 fi
6555
6556 LD="$lt_cv_path_LD"
6557 if test -n "$LD"; then
6558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6559 $as_echo "$LD" >&6; }
6560 else
6561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6562 $as_echo "no" >&6; }
6563 fi
6564 test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
6565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6566 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6567 if test "${lt_cv_prog_gnu_ld+set}" = set; then :
6568   $as_echo_n "(cached) " >&6
6569 else
6570   # I'd rather use --version here, but apparently some GNU lds only accept -v.
6571 case `$LD -v 2>&1 </dev/null` in
6572 *GNU* | *'with BFD'*)
6573   lt_cv_prog_gnu_ld=yes
6574   ;;
6575 *)
6576   lt_cv_prog_gnu_ld=no
6577   ;;
6578 esac
6579 fi
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
6581 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
6582 with_gnu_ld=$lt_cv_prog_gnu_ld
6583
6584
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6586 $as_echo_n "checking for $LD option to reload object files... " >&6; }
6587 if test "${lt_cv_ld_reload_flag+set}" = set; then :
6588   $as_echo_n "(cached) " >&6
6589 else
6590   lt_cv_ld_reload_flag='-r'
6591 fi
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6593 $as_echo "$lt_cv_ld_reload_flag" >&6; }
6594 reload_flag=$lt_cv_ld_reload_flag
6595 case $reload_flag in
6596 "" | " "*) ;;
6597 *) reload_flag=" $reload_flag" ;;
6598 esac
6599 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6600 case $host_os in
6601   darwin*)
6602     if test "$GCC" = yes; then
6603       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
6604     else
6605       reload_cmds='$LD$reload_flag -o $output$reload_objs'
6606     fi
6607     ;;
6608 esac
6609
6610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5
6611 $as_echo_n "checking for BSD-compatible nm... " >&6; }
6612 if test "${lt_cv_path_NM+set}" = set; then :
6613   $as_echo_n "(cached) " >&6
6614 else
6615   if test -n "$NM"; then
6616   # Let the user override the test.
6617   lt_cv_path_NM="$NM"
6618 else
6619   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6620   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
6621     IFS="$lt_save_ifs"
6622     test -z "$ac_dir" && ac_dir=.
6623     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
6624     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6625       # Check to see if the nm accepts a BSD-compat flag.
6626       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
6627       #   nm: unknown option "B" ignored
6628       # Tru64's nm complains that /dev/null is an invalid object file
6629       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
6630       */dev/null* | *'Invalid file or object type'*)
6631         lt_cv_path_NM="$tmp_nm -B"
6632         break
6633         ;;
6634       *)
6635         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
6636         */dev/null*)
6637           lt_cv_path_NM="$tmp_nm -p"
6638           break
6639           ;;
6640         *)
6641           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6642           continue # so that we can try to find one that supports BSD flags
6643           ;;
6644         esac
6645       esac
6646     fi
6647   done
6648   IFS="$lt_save_ifs"
6649   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
6650 fi
6651 fi
6652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
6653 $as_echo "$lt_cv_path_NM" >&6; }
6654 NM="$lt_cv_path_NM"
6655
6656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6657 $as_echo_n "checking whether ln -s works... " >&6; }
6658 LN_S=$as_ln_s
6659 if test "$LN_S" = "ln -s"; then
6660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6661 $as_echo "yes" >&6; }
6662 else
6663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6664 $as_echo "no, using $LN_S" >&6; }
6665 fi
6666
6667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognise dependent libraries" >&5
6668 $as_echo_n "checking how to recognise dependent libraries... " >&6; }
6669 if test "${lt_cv_deplibs_check_method+set}" = set; then :
6670   $as_echo_n "(cached) " >&6
6671 else
6672   lt_cv_file_magic_cmd='$MAGIC_CMD'
6673 lt_cv_file_magic_test_file=
6674 lt_cv_deplibs_check_method='unknown'
6675 # Need to set the preceding variable on all platforms that support
6676 # interlibrary dependencies.
6677 # 'none' -- dependencies not supported.
6678 # `unknown' -- same as none, but documents that we really don't know.
6679 # 'pass_all' -- all dependencies passed with no checks.
6680 # 'test_compile' -- check by making test program.
6681 # 'file_magic [[regex]]' -- check by looking for files in library path
6682 # which responds to the $file_magic_cmd with a given extended regex.
6683 # If you have `file' or equivalent on your system and you're not sure
6684 # whether `pass_all' will *always* work, you probably want this one.
6685
6686 case $host_os in
6687 aix4* | aix5*)
6688   lt_cv_deplibs_check_method=pass_all
6689   ;;
6690
6691 beos*)
6692   lt_cv_deplibs_check_method=pass_all
6693   ;;
6694
6695 bsdi[45]*)
6696   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6697   lt_cv_file_magic_cmd='/usr/bin/file -L'
6698   lt_cv_file_magic_test_file=/shlib/libc.so
6699   ;;
6700
6701 cygwin*)
6702   # func_win32_libid is a shell function defined in ltmain.sh
6703   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6704   lt_cv_file_magic_cmd='func_win32_libid'
6705   ;;
6706
6707 mingw* | pw32*)
6708   # Base MSYS/MinGW do not provide the 'file' command needed by
6709   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
6710   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6711   lt_cv_file_magic_cmd='$OBJDUMP -f'
6712   ;;
6713
6714 darwin* | rhapsody*)
6715   lt_cv_deplibs_check_method=pass_all
6716   ;;
6717
6718 freebsd* | kfreebsd*-gnu | dragonfly*)
6719   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6720     case $host_cpu in
6721     i*86 )
6722       # Not sure whether the presence of OpenBSD here was a mistake.
6723       # Let's accept both of them until this is cleared up.
6724       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6725       lt_cv_file_magic_cmd=/usr/bin/file
6726       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6727       ;;
6728     esac
6729   else
6730     lt_cv_deplibs_check_method=pass_all
6731   fi
6732   ;;
6733
6734 gnu*)
6735   lt_cv_deplibs_check_method=pass_all
6736   ;;
6737
6738 hpux10.20* | hpux11*)
6739   lt_cv_file_magic_cmd=/usr/bin/file
6740   case $host_cpu in
6741   ia64*)
6742     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6743     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6744     ;;
6745   hppa*64*)
6746     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]'
6747     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6748     ;;
6749   *)
6750     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
6751     lt_cv_file_magic_test_file=/usr/lib/libc.sl
6752     ;;
6753   esac
6754   ;;
6755
6756 irix5* | irix6* | nonstopux*)
6757   case $LD in
6758   *-32|*"-32 ") libmagic=32-bit;;
6759   *-n32|*"-n32 ") libmagic=N32;;
6760   *-64|*"-64 ") libmagic=64-bit;;
6761   *) libmagic=never-match;;
6762   esac
6763   lt_cv_deplibs_check_method=pass_all
6764   ;;
6765
6766 # This must be Linux ELF.
6767 linux*)
6768   lt_cv_deplibs_check_method=pass_all
6769   ;;
6770
6771 netbsd*)
6772   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6773     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6774   else
6775     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6776   fi
6777   ;;
6778
6779 newos6*)
6780   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6781   lt_cv_file_magic_cmd=/usr/bin/file
6782   lt_cv_file_magic_test_file=/usr/lib/libnls.so
6783   ;;
6784
6785 nto-qnx*)
6786   lt_cv_deplibs_check_method=unknown
6787   ;;
6788
6789 openbsd*)
6790   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6791     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6792   else
6793     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6794   fi
6795   ;;
6796
6797 osf3* | osf4* | osf5*)
6798   lt_cv_deplibs_check_method=pass_all
6799   ;;
6800
6801 sco3.2v5*)
6802   lt_cv_deplibs_check_method=pass_all
6803   ;;
6804
6805 solaris*)
6806   lt_cv_deplibs_check_method=pass_all
6807   ;;
6808
6809 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6810   case $host_vendor in
6811   motorola)
6812     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]'
6813     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6814     ;;
6815   ncr)
6816     lt_cv_deplibs_check_method=pass_all
6817     ;;
6818   sequent)
6819     lt_cv_file_magic_cmd='/bin/file'
6820     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6821     ;;
6822   sni)
6823     lt_cv_file_magic_cmd='/bin/file'
6824     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6825     lt_cv_file_magic_test_file=/lib/libc.so
6826     ;;
6827   siemens)
6828     lt_cv_deplibs_check_method=pass_all
6829     ;;
6830   esac
6831   ;;
6832
6833 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
6834   lt_cv_deplibs_check_method=pass_all
6835   ;;
6836 esac
6837
6838 fi
6839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6840 $as_echo "$lt_cv_deplibs_check_method" >&6; }
6841 file_magic_cmd=$lt_cv_file_magic_cmd
6842 deplibs_check_method=$lt_cv_deplibs_check_method
6843 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6844
6845
6846
6847
6848 # If no C compiler was specified, use CC.
6849 LTCC=${LTCC-"$CC"}
6850
6851 # Allow CC to be a program name with arguments.
6852 compiler=$CC
6853
6854
6855 # Check whether --enable-libtool-lock was given.
6856 if test "${enable_libtool_lock+set}" = set; then :
6857   enableval=$enable_libtool_lock;
6858 fi
6859
6860 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6861
6862 # Some flags need to be propagated to the compiler or linker for good
6863 # libtool support.
6864 case $host in
6865 ia64-*-hpux*)
6866   # Find out which ABI we are using.
6867   echo 'int i;' > conftest.$ac_ext
6868   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6869   (eval $ac_compile) 2>&5
6870   ac_status=$?
6871   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6872   test $ac_status = 0; }; then
6873     case `/usr/bin/file conftest.$ac_objext` in
6874     *ELF-32*)
6875       HPUX_IA64_MODE="32"
6876       ;;
6877     *ELF-64*)
6878       HPUX_IA64_MODE="64"
6879       ;;
6880     esac
6881   fi
6882   rm -rf conftest*
6883   ;;
6884 *-*-irix6*)
6885   # Find out which ABI we are using.
6886   echo '#line 6886 "configure"' > conftest.$ac_ext
6887   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6888   (eval $ac_compile) 2>&5
6889   ac_status=$?
6890   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6891   test $ac_status = 0; }; then
6892    if test "$lt_cv_prog_gnu_ld" = yes; then
6893     case `/usr/bin/file conftest.$ac_objext` in
6894     *32-bit*)
6895       LD="${LD-ld} -melf32bsmip"
6896       ;;
6897     *N32*)
6898       LD="${LD-ld} -melf32bmipn32"
6899       ;;
6900     *64-bit*)
6901       LD="${LD-ld} -melf64bmip"
6902       ;;
6903     esac
6904    else
6905     case `/usr/bin/file conftest.$ac_objext` in
6906     *32-bit*)
6907       LD="${LD-ld} -32"
6908       ;;
6909     *N32*)
6910       LD="${LD-ld} -n32"
6911       ;;
6912     *64-bit*)
6913       LD="${LD-ld} -64"
6914       ;;
6915     esac
6916    fi
6917   fi
6918   rm -rf conftest*
6919   ;;
6920
6921 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6922   # Find out which ABI we are using.
6923   echo 'int i;' > conftest.$ac_ext
6924   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6925   (eval $ac_compile) 2>&5
6926   ac_status=$?
6927   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6928   test $ac_status = 0; }; then
6929     case `/usr/bin/file conftest.o` in
6930     *32-bit*)
6931       case $host in
6932         x86_64-*linux*)
6933           LD="${LD-ld} -m elf_i386"
6934           ;;
6935         ppc64-*linux*|powerpc64-*linux*)
6936           LD="${LD-ld} -m elf32ppclinux"
6937           ;;
6938         s390x-*linux*)
6939           LD="${LD-ld} -m elf_s390"
6940           ;;
6941         sparc64-*linux*)
6942           LD="${LD-ld} -m elf32_sparc"
6943           ;;
6944       esac
6945       ;;
6946     *64-bit*)
6947       case $host in
6948         x86_64-*linux*)
6949           LD="${LD-ld} -m elf_x86_64"
6950           ;;
6951         ppc*-*linux*|powerpc*-*linux*)
6952           LD="${LD-ld} -m elf64ppc"
6953           ;;
6954         s390*-*linux*)
6955           LD="${LD-ld} -m elf64_s390"
6956           ;;
6957         sparc*-*linux*)
6958           LD="${LD-ld} -m elf64_sparc"
6959           ;;
6960       esac
6961       ;;
6962     esac
6963   fi
6964   rm -rf conftest*
6965   ;;
6966
6967 *-*-sco3.2v5*)
6968   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6969   SAVE_CFLAGS="$CFLAGS"
6970   CFLAGS="$CFLAGS -belf"
6971   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
6972 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
6973 if test "${lt_cv_cc_needs_belf+set}" = set; then :
6974   $as_echo_n "(cached) " >&6
6975 else
6976   ac_ext=c
6977 ac_cpp='$CPP $CPPFLAGS'
6978 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6979 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6980 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6981
6982      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6983 /* end confdefs.h.  */
6984
6985 int
6986 main ()
6987 {
6988
6989   ;
6990   return 0;
6991 }
6992 _ACEOF
6993 if ac_fn_c_try_link "$LINENO"; then :
6994   lt_cv_cc_needs_belf=yes
6995 else
6996   lt_cv_cc_needs_belf=no
6997 fi
6998 rm -f core conftest.err conftest.$ac_objext \
6999     conftest$ac_exeext conftest.$ac_ext
7000      ac_ext=c
7001 ac_cpp='$CPP $CPPFLAGS'
7002 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7003 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7004 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7005
7006 fi
7007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7008 $as_echo "$lt_cv_cc_needs_belf" >&6; }
7009   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7010     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7011     CFLAGS="$SAVE_CFLAGS"
7012   fi
7013   ;;
7014 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
7015   if test -n "$ac_tool_prefix"; then
7016   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7017 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7019 $as_echo_n "checking for $ac_word... " >&6; }
7020 if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7021   $as_echo_n "(cached) " >&6
7022 else
7023   if test -n "$DLLTOOL"; then
7024   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7025 else
7026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7027 for as_dir in $PATH
7028 do
7029   IFS=$as_save_IFS
7030   test -z "$as_dir" && as_dir=.
7031     for ac_exec_ext in '' $ac_executable_extensions; do
7032   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7033     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7034     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7035     break 2
7036   fi
7037 done
7038   done
7039 IFS=$as_save_IFS
7040
7041 fi
7042 fi
7043 DLLTOOL=$ac_cv_prog_DLLTOOL
7044 if test -n "$DLLTOOL"; then
7045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7046 $as_echo "$DLLTOOL" >&6; }
7047 else
7048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7049 $as_echo "no" >&6; }
7050 fi
7051
7052
7053 fi
7054 if test -z "$ac_cv_prog_DLLTOOL"; then
7055   ac_ct_DLLTOOL=$DLLTOOL
7056   # Extract the first word of "dlltool", so it can be a program name with args.
7057 set dummy dlltool; ac_word=$2
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7059 $as_echo_n "checking for $ac_word... " >&6; }
7060 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7061   $as_echo_n "(cached) " >&6
7062 else
7063   if test -n "$ac_ct_DLLTOOL"; then
7064   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7065 else
7066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7067 for as_dir in $PATH
7068 do
7069   IFS=$as_save_IFS
7070   test -z "$as_dir" && as_dir=.
7071     for ac_exec_ext in '' $ac_executable_extensions; do
7072   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7073     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7075     break 2
7076   fi
7077 done
7078   done
7079 IFS=$as_save_IFS
7080
7081 fi
7082 fi
7083 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7084 if test -n "$ac_ct_DLLTOOL"; then
7085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7086 $as_echo "$ac_ct_DLLTOOL" >&6; }
7087 else
7088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7089 $as_echo "no" >&6; }
7090 fi
7091
7092   if test "x$ac_ct_DLLTOOL" = x; then
7093     DLLTOOL="false"
7094   else
7095     case $cross_compiling:$ac_tool_warned in
7096 yes:)
7097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7098 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7099 ac_tool_warned=yes ;;
7100 esac
7101     DLLTOOL=$ac_ct_DLLTOOL
7102   fi
7103 else
7104   DLLTOOL="$ac_cv_prog_DLLTOOL"
7105 fi
7106
7107   if test -n "$ac_tool_prefix"; then
7108   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
7109 set dummy ${ac_tool_prefix}as; ac_word=$2
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7111 $as_echo_n "checking for $ac_word... " >&6; }
7112 if test "${ac_cv_prog_AS+set}" = set; then :
7113   $as_echo_n "(cached) " >&6
7114 else
7115   if test -n "$AS"; then
7116   ac_cv_prog_AS="$AS" # Let the user override the test.
7117 else
7118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7119 for as_dir in $PATH
7120 do
7121   IFS=$as_save_IFS
7122   test -z "$as_dir" && as_dir=.
7123     for ac_exec_ext in '' $ac_executable_extensions; do
7124   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7125     ac_cv_prog_AS="${ac_tool_prefix}as"
7126     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7127     break 2
7128   fi
7129 done
7130   done
7131 IFS=$as_save_IFS
7132
7133 fi
7134 fi
7135 AS=$ac_cv_prog_AS
7136 if test -n "$AS"; then
7137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
7138 $as_echo "$AS" >&6; }
7139 else
7140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7141 $as_echo "no" >&6; }
7142 fi
7143
7144
7145 fi
7146 if test -z "$ac_cv_prog_AS"; then
7147   ac_ct_AS=$AS
7148   # Extract the first word of "as", so it can be a program name with args.
7149 set dummy as; ac_word=$2
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7151 $as_echo_n "checking for $ac_word... " >&6; }
7152 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
7153   $as_echo_n "(cached) " >&6
7154 else
7155   if test -n "$ac_ct_AS"; then
7156   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
7157 else
7158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7159 for as_dir in $PATH
7160 do
7161   IFS=$as_save_IFS
7162   test -z "$as_dir" && as_dir=.
7163     for ac_exec_ext in '' $ac_executable_extensions; do
7164   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7165     ac_cv_prog_ac_ct_AS="as"
7166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7167     break 2
7168   fi
7169 done
7170   done
7171 IFS=$as_save_IFS
7172
7173 fi
7174 fi
7175 ac_ct_AS=$ac_cv_prog_ac_ct_AS
7176 if test -n "$ac_ct_AS"; then
7177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
7178 $as_echo "$ac_ct_AS" >&6; }
7179 else
7180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7181 $as_echo "no" >&6; }
7182 fi
7183
7184   if test "x$ac_ct_AS" = x; then
7185     AS="false"
7186   else
7187     case $cross_compiling:$ac_tool_warned in
7188 yes:)
7189 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7190 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7191 ac_tool_warned=yes ;;
7192 esac
7193     AS=$ac_ct_AS
7194   fi
7195 else
7196   AS="$ac_cv_prog_AS"
7197 fi
7198
7199   if test -n "$ac_tool_prefix"; then
7200   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7201 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7203 $as_echo_n "checking for $ac_word... " >&6; }
7204 if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
7205   $as_echo_n "(cached) " >&6
7206 else
7207   if test -n "$OBJDUMP"; then
7208   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7209 else
7210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7211 for as_dir in $PATH
7212 do
7213   IFS=$as_save_IFS
7214   test -z "$as_dir" && as_dir=.
7215     for ac_exec_ext in '' $ac_executable_extensions; do
7216   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7217     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7219     break 2
7220   fi
7221 done
7222   done
7223 IFS=$as_save_IFS
7224
7225 fi
7226 fi
7227 OBJDUMP=$ac_cv_prog_OBJDUMP
7228 if test -n "$OBJDUMP"; then
7229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7230 $as_echo "$OBJDUMP" >&6; }
7231 else
7232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7233 $as_echo "no" >&6; }
7234 fi
7235
7236
7237 fi
7238 if test -z "$ac_cv_prog_OBJDUMP"; then
7239   ac_ct_OBJDUMP=$OBJDUMP
7240   # Extract the first word of "objdump", so it can be a program name with args.
7241 set dummy objdump; ac_word=$2
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7243 $as_echo_n "checking for $ac_word... " >&6; }
7244 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
7245   $as_echo_n "(cached) " >&6
7246 else
7247   if test -n "$ac_ct_OBJDUMP"; then
7248   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7249 else
7250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7251 for as_dir in $PATH
7252 do
7253   IFS=$as_save_IFS
7254   test -z "$as_dir" && as_dir=.
7255     for ac_exec_ext in '' $ac_executable_extensions; do
7256   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7257     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7259     break 2
7260   fi
7261 done
7262   done
7263 IFS=$as_save_IFS
7264
7265 fi
7266 fi
7267 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7268 if test -n "$ac_ct_OBJDUMP"; then
7269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7270 $as_echo "$ac_ct_OBJDUMP" >&6; }
7271 else
7272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7273 $as_echo "no" >&6; }
7274 fi
7275
7276   if test "x$ac_ct_OBJDUMP" = x; then
7277     OBJDUMP="false"
7278   else
7279     case $cross_compiling:$ac_tool_warned in
7280 yes:)
7281 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7282 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7283 ac_tool_warned=yes ;;
7284 esac
7285     OBJDUMP=$ac_ct_OBJDUMP
7286   fi
7287 else
7288   OBJDUMP="$ac_cv_prog_OBJDUMP"
7289 fi
7290
7291   ;;
7292
7293 esac
7294
7295 need_locks="$enable_libtool_lock"
7296
7297
7298 ac_ext=c
7299 ac_cpp='$CPP $CPPFLAGS'
7300 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7301 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7302 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7304 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7305 # On Suns, sometimes $CPP names a directory.
7306 if test -n "$CPP" && test -d "$CPP"; then
7307   CPP=
7308 fi
7309 if test -z "$CPP"; then
7310   if test "${ac_cv_prog_CPP+set}" = set; then :
7311   $as_echo_n "(cached) " >&6
7312 else
7313       # Double quotes because CPP needs to be expanded
7314     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7315     do
7316       ac_preproc_ok=false
7317 for ac_c_preproc_warn_flag in '' yes
7318 do
7319   # Use a header file that comes with gcc, so configuring glibc
7320   # with a fresh cross-compiler works.
7321   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7322   # <limits.h> exists even on freestanding compilers.
7323   # On the NeXT, cc -E runs the code through the compiler's parser,
7324   # not just through cpp. "Syntax error" is here to catch this case.
7325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7326 /* end confdefs.h.  */
7327 #ifdef __STDC__
7328 # include <limits.h>
7329 #else
7330 # include <assert.h>
7331 #endif
7332                      Syntax error
7333 _ACEOF
7334 if ac_fn_c_try_cpp "$LINENO"; then :
7335
7336 else
7337   # Broken: fails on valid input.
7338 continue
7339 fi
7340 rm -f conftest.err conftest.$ac_ext
7341
7342   # OK, works on sane cases.  Now check whether nonexistent headers
7343   # can be detected and how.
7344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7345 /* end confdefs.h.  */
7346 #include <ac_nonexistent.h>
7347 _ACEOF
7348 if ac_fn_c_try_cpp "$LINENO"; then :
7349   # Broken: success on invalid input.
7350 continue
7351 else
7352   # Passes both tests.
7353 ac_preproc_ok=:
7354 break
7355 fi
7356 rm -f conftest.err conftest.$ac_ext
7357
7358 done
7359 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7360 rm -f conftest.err conftest.$ac_ext
7361 if $ac_preproc_ok; then :
7362   break
7363 fi
7364
7365     done
7366     ac_cv_prog_CPP=$CPP
7367
7368 fi
7369   CPP=$ac_cv_prog_CPP
7370 else
7371   ac_cv_prog_CPP=$CPP
7372 fi
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7374 $as_echo "$CPP" >&6; }
7375 ac_preproc_ok=false
7376 for ac_c_preproc_warn_flag in '' yes
7377 do
7378   # Use a header file that comes with gcc, so configuring glibc
7379   # with a fresh cross-compiler works.
7380   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7381   # <limits.h> exists even on freestanding compilers.
7382   # On the NeXT, cc -E runs the code through the compiler's parser,
7383   # not just through cpp. "Syntax error" is here to catch this case.
7384   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7385 /* end confdefs.h.  */
7386 #ifdef __STDC__
7387 # include <limits.h>
7388 #else
7389 # include <assert.h>
7390 #endif
7391                      Syntax error
7392 _ACEOF
7393 if ac_fn_c_try_cpp "$LINENO"; then :
7394
7395 else
7396   # Broken: fails on valid input.
7397 continue
7398 fi
7399 rm -f conftest.err conftest.$ac_ext
7400
7401   # OK, works on sane cases.  Now check whether nonexistent headers
7402   # can be detected and how.
7403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7404 /* end confdefs.h.  */
7405 #include <ac_nonexistent.h>
7406 _ACEOF
7407 if ac_fn_c_try_cpp "$LINENO"; then :
7408   # Broken: success on invalid input.
7409 continue
7410 else
7411   # Passes both tests.
7412 ac_preproc_ok=:
7413 break
7414 fi
7415 rm -f conftest.err conftest.$ac_ext
7416
7417 done
7418 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7419 rm -f conftest.err conftest.$ac_ext
7420 if $ac_preproc_ok; then :
7421
7422 else
7423   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7424 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7425 as_fn_error "C preprocessor \"$CPP\" fails sanity check
7426 See \`config.log' for more details." "$LINENO" 5; }
7427 fi
7428
7429 ac_ext=c
7430 ac_cpp='$CPP $CPPFLAGS'
7431 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7432 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7433 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7434
7435
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7437 $as_echo_n "checking for ANSI C header files... " >&6; }
7438 if test "${ac_cv_header_stdc+set}" = set; then :
7439   $as_echo_n "(cached) " >&6
7440 else
7441   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7442 /* end confdefs.h.  */
7443 #include <stdlib.h>
7444 #include <stdarg.h>
7445 #include <string.h>
7446 #include <float.h>
7447
7448 int
7449 main ()
7450 {
7451
7452   ;
7453   return 0;
7454 }
7455 _ACEOF
7456 if ac_fn_c_try_compile "$LINENO"; then :
7457   ac_cv_header_stdc=yes
7458 else
7459   ac_cv_header_stdc=no
7460 fi
7461 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7462
7463 if test $ac_cv_header_stdc = yes; then
7464   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7466 /* end confdefs.h.  */
7467 #include <string.h>
7468
7469 _ACEOF
7470 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7471   $EGREP "memchr" >/dev/null 2>&1; then :
7472
7473 else
7474   ac_cv_header_stdc=no
7475 fi
7476 rm -f conftest*
7477
7478 fi
7479
7480 if test $ac_cv_header_stdc = yes; then
7481   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7482   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7483 /* end confdefs.h.  */
7484 #include <stdlib.h>
7485
7486 _ACEOF
7487 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7488   $EGREP "free" >/dev/null 2>&1; then :
7489
7490 else
7491   ac_cv_header_stdc=no
7492 fi
7493 rm -f conftest*
7494
7495 fi
7496
7497 if test $ac_cv_header_stdc = yes; then
7498   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7499   if test "$cross_compiling" = yes; then :
7500   :
7501 else
7502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7503 /* end confdefs.h.  */
7504 #include <ctype.h>
7505 #include <stdlib.h>
7506 #if ((' ' & 0x0FF) == 0x020)
7507 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7508 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7509 #else
7510 # define ISLOWER(c) \
7511                    (('a' <= (c) && (c) <= 'i') \
7512                      || ('j' <= (c) && (c) <= 'r') \
7513                      || ('s' <= (c) && (c) <= 'z'))
7514 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7515 #endif
7516
7517 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7518 int
7519 main ()
7520 {
7521   int i;
7522   for (i = 0; i < 256; i++)
7523     if (XOR (islower (i), ISLOWER (i))
7524         || toupper (i) != TOUPPER (i))
7525       return 2;
7526   return 0;
7527 }
7528 _ACEOF
7529 if ac_fn_c_try_run "$LINENO"; then :
7530
7531 else
7532   ac_cv_header_stdc=no
7533 fi
7534 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7535   conftest.$ac_objext conftest.beam conftest.$ac_ext
7536 fi
7537
7538 fi
7539 fi
7540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7541 $as_echo "$ac_cv_header_stdc" >&6; }
7542 if test $ac_cv_header_stdc = yes; then
7543
7544 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7545
7546 fi
7547
7548 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7549 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7550                   inttypes.h stdint.h unistd.h
7551 do :
7552   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7553 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7554 "
7555 eval as_val=\$$as_ac_Header
7556    if test "x$as_val" = x""yes; then :
7557   cat >>confdefs.h <<_ACEOF
7558 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7559 _ACEOF
7560
7561 fi
7562
7563 done
7564
7565
7566 for ac_header in dlfcn.h
7567 do :
7568   ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
7569 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
7570   cat >>confdefs.h <<_ACEOF
7571 #define HAVE_DLFCN_H 1
7572 _ACEOF
7573
7574 fi
7575
7576 done
7577
7578
7579 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
7580
7581 # find the maximum length of command line arguments
7582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7583 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7584 if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
7585   $as_echo_n "(cached) " >&6
7586 else
7587     i=0
7588   teststring="ABCD"
7589
7590   case $build_os in
7591   msdosdjgpp*)
7592     # On DJGPP, this test can blow up pretty badly due to problems in libc
7593     # (any single argument exceeding 2000 bytes causes a buffer overrun
7594     # during glob expansion).  Even if it were fixed, the result of this
7595     # check would be larger than it should be.
7596     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7597     ;;
7598
7599   gnu*)
7600     # Under GNU Hurd, this test is not required because there is
7601     # no limit to the length of command line arguments.
7602     # Libtool will interpret -1 as no limit whatsoever
7603     lt_cv_sys_max_cmd_len=-1;
7604     ;;
7605
7606   cygwin* | mingw*)
7607     # On Win9x/ME, this test blows up -- it succeeds, but takes
7608     # about 5 minutes as the teststring grows exponentially.
7609     # Worse, since 9x/ME are not pre-emptively multitasking,
7610     # you end up with a "frozen" computer, even though with patience
7611     # the test eventually succeeds (with a max line length of 256k).
7612     # Instead, let's just punt: use the minimum linelength reported by
7613     # all of the supported platforms: 8192 (on NT/2K/XP).
7614     lt_cv_sys_max_cmd_len=8192;
7615     ;;
7616
7617   amigaos*)
7618     # On AmigaOS with pdksh, this test takes hours, literally.
7619     # So we just punt and use a minimum line length of 8192.
7620     lt_cv_sys_max_cmd_len=8192;
7621     ;;
7622
7623   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7624     # This has been around since 386BSD, at least.  Likely further.
7625     if test -x /sbin/sysctl; then
7626       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7627     elif test -x /usr/sbin/sysctl; then
7628       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7629     else
7630       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7631     fi
7632     # And add a safety zone
7633     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7634     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7635     ;;
7636   osf*)
7637     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7638     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7639     # nice to cause kernel panics so lets avoid the loop below.
7640     # First set a reasonable default.
7641     lt_cv_sys_max_cmd_len=16384
7642     #
7643     if test -x /sbin/sysconfig; then
7644       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7645         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7646       esac
7647     fi
7648     ;;
7649   *)
7650     # If test is not a shell built-in, we'll probably end up computing a
7651     # maximum length that is only half of the actual maximum length, but
7652     # we can't tell.
7653     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7654     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
7655                = "XX$teststring") >/dev/null 2>&1 &&
7656             new_result=`expr "X$teststring" : ".*" 2>&1` &&
7657             lt_cv_sys_max_cmd_len=$new_result &&
7658             test $i != 17 # 1/2 MB should be enough
7659     do
7660       i=`expr $i + 1`
7661       teststring=$teststring$teststring
7662     done
7663     teststring=
7664     # Add a significant safety factor because C++ compilers can tack on massive
7665     # amounts of additional arguments before passing them to the linker.
7666     # It appears as though 1/2 is a usable value.
7667     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7668     ;;
7669   esac
7670
7671 fi
7672
7673 if test -n $lt_cv_sys_max_cmd_len ; then
7674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7675 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7676 else
7677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7678 $as_echo "none" >&6; }
7679 fi
7680
7681
7682
7683
7684 # Check for command to grab the raw symbol name followed by C symbol from nm.
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7686 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
7687 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
7688   $as_echo_n "(cached) " >&6
7689 else
7690
7691 # These are sane defaults that work on at least a few old systems.
7692 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
7693
7694 # Character class describing NM global symbol codes.
7695 symcode='[BCDEGRST]'
7696
7697 # Regexp to match symbols that can be accessed directly from C.
7698 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7699
7700 # Transform an extracted symbol line into a proper C declaration
7701 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
7702
7703 # Transform an extracted symbol line into symbol name and symbol address
7704 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'"
7705
7706 # Define system-specific variables.
7707 case $host_os in
7708 aix*)
7709   symcode='[BCDT]'
7710   ;;
7711 cygwin* | mingw* | pw32*)
7712   symcode='[ABCDGISTW]'
7713   ;;
7714 hpux*) # Its linker distinguishes data from code symbols
7715   if test "$host_cpu" = ia64; then
7716     symcode='[ABCDEGRST]'
7717   fi
7718   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7719   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'"
7720   ;;
7721 linux*)
7722   if test "$host_cpu" = ia64; then
7723     symcode='[ABCDGIRSTW]'
7724     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7725     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'"
7726   fi
7727   ;;
7728 irix* | nonstopux*)
7729   symcode='[BCDEGRST]'
7730   ;;
7731 osf*)
7732   symcode='[BCDEGQRST]'
7733   ;;
7734 solaris* | sysv5*)
7735   symcode='[BDRT]'
7736   ;;
7737 sysv4)
7738   symcode='[DFNSTU]'
7739   ;;
7740 esac
7741
7742 # Handle CRLF in mingw tool chain
7743 opt_cr=
7744 case $build_os in
7745 mingw*)
7746   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7747   ;;
7748 esac
7749
7750 # If we're using GNU nm, then use its standard symbol codes.
7751 case `$NM -V 2>&1` in
7752 *GNU* | *'with BFD'*)
7753   symcode='[ABCDGIRSTW]' ;;
7754 esac
7755
7756 # Try without a prefix undercore, then with it.
7757 for ac_symprfx in "" "_"; do
7758
7759   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7760   symxfrm="\\1 $ac_symprfx\\2 \\2"
7761
7762   # Write the raw and C identifiers.
7763   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7764
7765   # Check to see that the pipe works correctly.
7766   pipe_works=no
7767
7768   rm -f conftest*
7769   cat > conftest.$ac_ext <<EOF
7770 #ifdef __cplusplus
7771 extern "C" {
7772 #endif
7773 char nm_test_var;
7774 void nm_test_func(){}
7775 #ifdef __cplusplus
7776 }
7777 #endif
7778 int main(){nm_test_var='a';nm_test_func();return(0);}
7779 EOF
7780
7781   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7782   (eval $ac_compile) 2>&5
7783   ac_status=$?
7784   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7785   test $ac_status = 0; }; then
7786     # Now try to grab the symbols.
7787     nlist=conftest.nm
7788     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
7789   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
7790   ac_status=$?
7791   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7792   test $ac_status = 0; } && test -s "$nlist"; then
7793       # Try sorting and uniquifying the output.
7794       if sort "$nlist" | uniq > "$nlist"T; then
7795         mv -f "$nlist"T "$nlist"
7796       else
7797         rm -f "$nlist"T
7798       fi
7799
7800       # Make sure that we snagged all the symbols we need.
7801       if grep ' nm_test_var$' "$nlist" >/dev/null; then
7802         if grep ' nm_test_func$' "$nlist" >/dev/null; then
7803           cat <<EOF > conftest.$ac_ext
7804 #ifdef __cplusplus
7805 extern "C" {
7806 #endif
7807
7808 EOF
7809           # Now generate the symbol file.
7810           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7811
7812           cat <<EOF >> conftest.$ac_ext
7813 #if defined (__STDC__) && __STDC__
7814 # define lt_ptr_t void *
7815 #else
7816 # define lt_ptr_t char *
7817 # define const
7818 #endif
7819
7820 /* The mapping between symbol names and symbols. */
7821 const struct {
7822   const char *name;
7823   lt_ptr_t address;
7824 }
7825 lt_preloaded_symbols[] =
7826 {
7827 EOF
7828           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7829           cat <<\EOF >> conftest.$ac_ext
7830   {0, (lt_ptr_t) 0}
7831 };
7832
7833 #ifdef __cplusplus
7834 }
7835 #endif
7836 EOF
7837           # Now try linking the two files.
7838           mv conftest.$ac_objext conftstm.$ac_objext
7839           lt_save_LIBS="$LIBS"
7840           lt_save_CFLAGS="$CFLAGS"
7841           LIBS="conftstm.$ac_objext"
7842           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7843           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7844   (eval $ac_link) 2>&5
7845   ac_status=$?
7846   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7847   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7848             pipe_works=yes
7849           fi
7850           LIBS="$lt_save_LIBS"
7851           CFLAGS="$lt_save_CFLAGS"
7852         else
7853           echo "cannot find nm_test_func in $nlist" >&5
7854         fi
7855       else
7856         echo "cannot find nm_test_var in $nlist" >&5
7857       fi
7858     else
7859       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7860     fi
7861   else
7862     echo "$progname: failed program was:" >&5
7863     cat conftest.$ac_ext >&5
7864   fi
7865   rm -f conftest* conftst*
7866
7867   # Do not use the global_symbol_pipe unless it works.
7868   if test "$pipe_works" = yes; then
7869     break
7870   else
7871     lt_cv_sys_global_symbol_pipe=
7872   fi
7873 done
7874
7875 fi
7876
7877 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7878   lt_cv_sys_global_symbol_to_cdecl=
7879 fi
7880 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7882 $as_echo "failed" >&6; }
7883 else
7884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7885 $as_echo "ok" >&6; }
7886 fi
7887
7888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
7889 $as_echo_n "checking for objdir... " >&6; }
7890 if test "${lt_cv_objdir+set}" = set; then :
7891   $as_echo_n "(cached) " >&6
7892 else
7893   rm -f .libs 2>/dev/null
7894 mkdir .libs 2>/dev/null
7895 if test -d .libs; then
7896   lt_cv_objdir=.libs
7897 else
7898   # MS-DOS does not allow filenames that begin with a dot.
7899   lt_cv_objdir=_libs
7900 fi
7901 rmdir .libs 2>/dev/null
7902 fi
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
7904 $as_echo "$lt_cv_objdir" >&6; }
7905 objdir=$lt_cv_objdir
7906
7907
7908
7909
7910
7911 case $host_os in
7912 aix3*)
7913   # AIX sometimes has problems with the GCC collect2 program.  For some
7914   # reason, if we set the COLLECT_NAMES environment variable, the problems
7915   # vanish in a puff of smoke.
7916   if test "X${COLLECT_NAMES+set}" != Xset; then
7917     COLLECT_NAMES=
7918     export COLLECT_NAMES
7919   fi
7920   ;;
7921 esac
7922
7923 # Sed substitution that helps us do robust quoting.  It backslashifies
7924 # metacharacters that are still active within double-quoted strings.
7925 Xsed='sed -e 1s/^X//'
7926 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
7927
7928 # Same as above, but do not quote variable references.
7929 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
7930
7931 # Sed substitution to delay expansion of an escaped shell variable in a
7932 # double_quote_subst'ed string.
7933 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7934
7935 # Sed substitution to avoid accidental globbing in evaled expressions
7936 no_glob_subst='s/\*/\\\*/g'
7937
7938 # Constants:
7939 rm="rm -f"
7940
7941 # Global variables:
7942 default_ofile=libtool
7943 can_build_shared=yes
7944
7945 # All known linkers require a `.a' archive for static linking (except MSVC,
7946 # which needs '.lib').
7947 libext=a
7948 ltmain="$ac_aux_dir/ltmain.sh"
7949 ofile="$default_ofile"
7950 with_gnu_ld="$lt_cv_prog_gnu_ld"
7951
7952 if test -n "$ac_tool_prefix"; then
7953   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7954 set dummy ${ac_tool_prefix}ar; ac_word=$2
7955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7956 $as_echo_n "checking for $ac_word... " >&6; }
7957 if test "${ac_cv_prog_AR+set}" = set; then :
7958   $as_echo_n "(cached) " >&6
7959 else
7960   if test -n "$AR"; then
7961   ac_cv_prog_AR="$AR" # Let the user override the test.
7962 else
7963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7964 for as_dir in $PATH
7965 do
7966   IFS=$as_save_IFS
7967   test -z "$as_dir" && as_dir=.
7968     for ac_exec_ext in '' $ac_executable_extensions; do
7969   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7970     ac_cv_prog_AR="${ac_tool_prefix}ar"
7971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7972     break 2
7973   fi
7974 done
7975   done
7976 IFS=$as_save_IFS
7977
7978 fi
7979 fi
7980 AR=$ac_cv_prog_AR
7981 if test -n "$AR"; then
7982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7983 $as_echo "$AR" >&6; }
7984 else
7985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7986 $as_echo "no" >&6; }
7987 fi
7988
7989
7990 fi
7991 if test -z "$ac_cv_prog_AR"; then
7992   ac_ct_AR=$AR
7993   # Extract the first word of "ar", so it can be a program name with args.
7994 set dummy ar; ac_word=$2
7995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7996 $as_echo_n "checking for $ac_word... " >&6; }
7997 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
7998   $as_echo_n "(cached) " >&6
7999 else
8000   if test -n "$ac_ct_AR"; then
8001   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8002 else
8003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8004 for as_dir in $PATH
8005 do
8006   IFS=$as_save_IFS
8007   test -z "$as_dir" && as_dir=.
8008     for ac_exec_ext in '' $ac_executable_extensions; do
8009   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8010     ac_cv_prog_ac_ct_AR="ar"
8011     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8012     break 2
8013   fi
8014 done
8015   done
8016 IFS=$as_save_IFS
8017
8018 fi
8019 fi
8020 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8021 if test -n "$ac_ct_AR"; then
8022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8023 $as_echo "$ac_ct_AR" >&6; }
8024 else
8025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8026 $as_echo "no" >&6; }
8027 fi
8028
8029   if test "x$ac_ct_AR" = x; then
8030     AR="false"
8031   else
8032     case $cross_compiling:$ac_tool_warned in
8033 yes:)
8034 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8035 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8036 ac_tool_warned=yes ;;
8037 esac
8038     AR=$ac_ct_AR
8039   fi
8040 else
8041   AR="$ac_cv_prog_AR"
8042 fi
8043
8044 if test -n "$ac_tool_prefix"; then
8045   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8046 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8048 $as_echo_n "checking for $ac_word... " >&6; }
8049 if test "${ac_cv_prog_RANLIB+set}" = set; then :
8050   $as_echo_n "(cached) " >&6
8051 else
8052   if test -n "$RANLIB"; then
8053   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8054 else
8055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8056 for as_dir in $PATH
8057 do
8058   IFS=$as_save_IFS
8059   test -z "$as_dir" && as_dir=.
8060     for ac_exec_ext in '' $ac_executable_extensions; do
8061   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8062     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8064     break 2
8065   fi
8066 done
8067   done
8068 IFS=$as_save_IFS
8069
8070 fi
8071 fi
8072 RANLIB=$ac_cv_prog_RANLIB
8073 if test -n "$RANLIB"; then
8074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8075 $as_echo "$RANLIB" >&6; }
8076 else
8077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8078 $as_echo "no" >&6; }
8079 fi
8080
8081
8082 fi
8083 if test -z "$ac_cv_prog_RANLIB"; then
8084   ac_ct_RANLIB=$RANLIB
8085   # Extract the first word of "ranlib", so it can be a program name with args.
8086 set dummy ranlib; ac_word=$2
8087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8088 $as_echo_n "checking for $ac_word... " >&6; }
8089 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8090   $as_echo_n "(cached) " >&6
8091 else
8092   if test -n "$ac_ct_RANLIB"; then
8093   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8094 else
8095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8096 for as_dir in $PATH
8097 do
8098   IFS=$as_save_IFS
8099   test -z "$as_dir" && as_dir=.
8100     for ac_exec_ext in '' $ac_executable_extensions; do
8101   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8102     ac_cv_prog_ac_ct_RANLIB="ranlib"
8103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8104     break 2
8105   fi
8106 done
8107   done
8108 IFS=$as_save_IFS
8109
8110 fi
8111 fi
8112 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8113 if test -n "$ac_ct_RANLIB"; then
8114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8115 $as_echo "$ac_ct_RANLIB" >&6; }
8116 else
8117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8118 $as_echo "no" >&6; }
8119 fi
8120
8121   if test "x$ac_ct_RANLIB" = x; then
8122     RANLIB=":"
8123   else
8124     case $cross_compiling:$ac_tool_warned in
8125 yes:)
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8127 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8128 ac_tool_warned=yes ;;
8129 esac
8130     RANLIB=$ac_ct_RANLIB
8131   fi
8132 else
8133   RANLIB="$ac_cv_prog_RANLIB"
8134 fi
8135
8136 if test -n "$ac_tool_prefix"; then
8137   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8138 set dummy ${ac_tool_prefix}strip; ac_word=$2
8139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8140 $as_echo_n "checking for $ac_word... " >&6; }
8141 if test "${ac_cv_prog_STRIP+set}" = set; then :
8142   $as_echo_n "(cached) " >&6
8143 else
8144   if test -n "$STRIP"; then
8145   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8146 else
8147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8148 for as_dir in $PATH
8149 do
8150   IFS=$as_save_IFS
8151   test -z "$as_dir" && as_dir=.
8152     for ac_exec_ext in '' $ac_executable_extensions; do
8153   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8154     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8155     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8156     break 2
8157   fi
8158 done
8159   done
8160 IFS=$as_save_IFS
8161
8162 fi
8163 fi
8164 STRIP=$ac_cv_prog_STRIP
8165 if test -n "$STRIP"; then
8166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8167 $as_echo "$STRIP" >&6; }
8168 else
8169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8170 $as_echo "no" >&6; }
8171 fi
8172
8173
8174 fi
8175 if test -z "$ac_cv_prog_STRIP"; then
8176   ac_ct_STRIP=$STRIP
8177   # Extract the first word of "strip", so it can be a program name with args.
8178 set dummy strip; ac_word=$2
8179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8180 $as_echo_n "checking for $ac_word... " >&6; }
8181 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
8182   $as_echo_n "(cached) " >&6
8183 else
8184   if test -n "$ac_ct_STRIP"; then
8185   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8186 else
8187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8188 for as_dir in $PATH
8189 do
8190   IFS=$as_save_IFS
8191   test -z "$as_dir" && as_dir=.
8192     for ac_exec_ext in '' $ac_executable_extensions; do
8193   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8194     ac_cv_prog_ac_ct_STRIP="strip"
8195     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8196     break 2
8197   fi
8198 done
8199   done
8200 IFS=$as_save_IFS
8201
8202 fi
8203 fi
8204 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8205 if test -n "$ac_ct_STRIP"; then
8206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8207 $as_echo "$ac_ct_STRIP" >&6; }
8208 else
8209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8210 $as_echo "no" >&6; }
8211 fi
8212
8213   if test "x$ac_ct_STRIP" = x; then
8214     STRIP=":"
8215   else
8216     case $cross_compiling:$ac_tool_warned in
8217 yes:)
8218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8219 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8220 ac_tool_warned=yes ;;
8221 esac
8222     STRIP=$ac_ct_STRIP
8223   fi
8224 else
8225   STRIP="$ac_cv_prog_STRIP"
8226 fi
8227
8228
8229 old_CC="$CC"
8230 old_CFLAGS="$CFLAGS"
8231
8232 # Set sane defaults for various variables
8233 test -z "$AR" && AR=ar
8234 test -z "$AR_FLAGS" && AR_FLAGS=cru
8235 test -z "$AS" && AS=as
8236 test -z "$CC" && CC=cc
8237 test -z "$LTCC" && LTCC=$CC
8238 test -z "$DLLTOOL" && DLLTOOL=dlltool
8239 test -z "$LD" && LD=ld
8240 test -z "$LN_S" && LN_S="ln -s"
8241 test -z "$MAGIC_CMD" && MAGIC_CMD=file
8242 test -z "$NM" && NM=nm
8243 test -z "$SED" && SED=sed
8244 test -z "$OBJDUMP" && OBJDUMP=objdump
8245 test -z "$RANLIB" && RANLIB=:
8246 test -z "$STRIP" && STRIP=:
8247 test -z "$ac_objext" && ac_objext=o
8248
8249 # Determine commands to create old-style static archives.
8250 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
8251 old_postinstall_cmds='chmod 644 $oldlib'
8252 old_postuninstall_cmds=
8253
8254 if test -n "$RANLIB"; then
8255   case $host_os in
8256   openbsd*)
8257     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
8258     ;;
8259   *)
8260     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
8261     ;;
8262   esac
8263   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
8264 fi
8265
8266 for cc_temp in $compiler""; do
8267   case $cc_temp in
8268     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8269     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8270     \-*) ;;
8271     *) break;;
8272   esac
8273 done
8274 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8275
8276
8277 # Only perform the check for file, if the check method requires it
8278 case $deplibs_check_method in
8279 file_magic*)
8280   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8281     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
8282 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8283 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8284   $as_echo_n "(cached) " >&6
8285 else
8286   case $MAGIC_CMD in
8287 [\\/*] |  ?:[\\/]*)
8288   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8289   ;;
8290 *)
8291   lt_save_MAGIC_CMD="$MAGIC_CMD"
8292   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8293   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8294   for ac_dir in $ac_dummy; do
8295     IFS="$lt_save_ifs"
8296     test -z "$ac_dir" && ac_dir=.
8297     if test -f $ac_dir/${ac_tool_prefix}file; then
8298       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8299       if test -n "$file_magic_test_file"; then
8300         case $deplibs_check_method in
8301         "file_magic "*)
8302           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8303           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8304           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8305             $EGREP "$file_magic_regex" > /dev/null; then
8306             :
8307           else
8308             cat <<EOF 1>&2
8309
8310 *** Warning: the command libtool uses to detect shared libraries,
8311 *** $file_magic_cmd, produces output that libtool cannot recognize.
8312 *** The result is that libtool may fail to recognize shared libraries
8313 *** as such.  This will affect the creation of libtool libraries that
8314 *** depend on shared libraries, but programs linked with such libtool
8315 *** libraries will work regardless of this problem.  Nevertheless, you
8316 *** may want to report the problem to your system manager and/or to
8317 *** bug-libtool@gnu.org
8318
8319 EOF
8320           fi ;;
8321         esac
8322       fi
8323       break
8324     fi
8325   done
8326   IFS="$lt_save_ifs"
8327   MAGIC_CMD="$lt_save_MAGIC_CMD"
8328   ;;
8329 esac
8330 fi
8331
8332 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8333 if test -n "$MAGIC_CMD"; then
8334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8335 $as_echo "$MAGIC_CMD" >&6; }
8336 else
8337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8338 $as_echo "no" >&6; }
8339 fi
8340
8341 if test -z "$lt_cv_path_MAGIC_CMD"; then
8342   if test -n "$ac_tool_prefix"; then
8343     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
8344 $as_echo_n "checking for file... " >&6; }
8345 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8346   $as_echo_n "(cached) " >&6
8347 else
8348   case $MAGIC_CMD in
8349 [\\/*] |  ?:[\\/]*)
8350   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8351   ;;
8352 *)
8353   lt_save_MAGIC_CMD="$MAGIC_CMD"
8354   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8355   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8356   for ac_dir in $ac_dummy; do
8357     IFS="$lt_save_ifs"
8358     test -z "$ac_dir" && ac_dir=.
8359     if test -f $ac_dir/file; then
8360       lt_cv_path_MAGIC_CMD="$ac_dir/file"
8361       if test -n "$file_magic_test_file"; then
8362         case $deplibs_check_method in
8363         "file_magic "*)
8364           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8365           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8366           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8367             $EGREP "$file_magic_regex" > /dev/null; then
8368             :
8369           else
8370             cat <<EOF 1>&2
8371
8372 *** Warning: the command libtool uses to detect shared libraries,
8373 *** $file_magic_cmd, produces output that libtool cannot recognize.
8374 *** The result is that libtool may fail to recognize shared libraries
8375 *** as such.  This will affect the creation of libtool libraries that
8376 *** depend on shared libraries, but programs linked with such libtool
8377 *** libraries will work regardless of this problem.  Nevertheless, you
8378 *** may want to report the problem to your system manager and/or to
8379 *** bug-libtool@gnu.org
8380
8381 EOF
8382           fi ;;
8383         esac
8384       fi
8385       break
8386     fi
8387   done
8388   IFS="$lt_save_ifs"
8389   MAGIC_CMD="$lt_save_MAGIC_CMD"
8390   ;;
8391 esac
8392 fi
8393
8394 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8395 if test -n "$MAGIC_CMD"; then
8396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8397 $as_echo "$MAGIC_CMD" >&6; }
8398 else
8399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8400 $as_echo "no" >&6; }
8401 fi
8402
8403   else
8404     MAGIC_CMD=:
8405   fi
8406 fi
8407
8408   fi
8409   ;;
8410 esac
8411
8412 enable_dlopen=yes
8413 enable_win32_dll=yes
8414
8415 # Check whether --enable-libtool-lock was given.
8416 if test "${enable_libtool_lock+set}" = set; then :
8417   enableval=$enable_libtool_lock;
8418 fi
8419
8420 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
8421
8422
8423 # Check whether --with-pic was given.
8424 if test "${with_pic+set}" = set; then :
8425   withval=$with_pic; pic_mode="$withval"
8426 else
8427   pic_mode=default
8428 fi
8429
8430 test -z "$pic_mode" && pic_mode=default
8431
8432 # Use C for the default configuration in the libtool script
8433 tagname=
8434 lt_save_CC="$CC"
8435 ac_ext=c
8436 ac_cpp='$CPP $CPPFLAGS'
8437 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8438 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8439 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8440
8441
8442 # Source file extension for C test sources.
8443 ac_ext=c
8444
8445 # Object file extension for compiled C test sources.
8446 objext=o
8447 objext=$objext
8448
8449 # Code to be used in simple compile tests
8450 lt_simple_compile_test_code="int some_variable = 0;\n"
8451
8452 # Code to be used in simple link tests
8453 lt_simple_link_test_code='int main(){return(0);}\n'
8454
8455
8456 # If no C compiler was specified, use CC.
8457 LTCC=${LTCC-"$CC"}
8458
8459 # Allow CC to be a program name with arguments.
8460 compiler=$CC
8461
8462
8463 # save warnings/boilerplate of simple test code
8464 ac_outfile=conftest.$ac_objext
8465 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
8466 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8467 _lt_compiler_boilerplate=`cat conftest.err`
8468 $rm conftest*
8469
8470 ac_outfile=conftest.$ac_objext
8471 printf "$lt_simple_link_test_code" >conftest.$ac_ext
8472 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8473 _lt_linker_boilerplate=`cat conftest.err`
8474 $rm conftest*
8475
8476
8477 #
8478 # Check for any special shared library compilation flags.
8479 #
8480 lt_prog_cc_shlib=
8481 if test "$GCC" = no; then
8482   case $host_os in
8483   sco3.2v5*)
8484     lt_prog_cc_shlib='-belf'
8485     ;;
8486   esac
8487 fi
8488 if test -n "$lt_prog_cc_shlib"; then
8489   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
8490 $as_echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
8491   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
8492   else
8493     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
8494 $as_echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
8495     lt_cv_prog_cc_can_build_shared=no
8496   fi
8497 fi
8498
8499
8500 #
8501 # Check to make sure the static flag actually works.
8502 #
8503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_prog_compiler_static works" >&5
8504 $as_echo_n "checking if $compiler static flag $lt_prog_compiler_static works... " >&6; }
8505 if test "${lt_prog_compiler_static_works+set}" = set; then :
8506   $as_echo_n "(cached) " >&6
8507 else
8508   lt_prog_compiler_static_works=no
8509    save_LDFLAGS="$LDFLAGS"
8510    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
8511    printf "$lt_simple_link_test_code" > conftest.$ac_ext
8512    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8513      # The linker can only warn and ignore the option if not recognized
8514      # So say no if there are warnings
8515      if test -s conftest.err; then
8516        # Append any errors to the config.log.
8517        cat conftest.err 1>&5
8518        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
8519        $SED '/^$/d' conftest.err >conftest.er2
8520        if diff conftest.exp conftest.er2 >/dev/null; then
8521          lt_prog_compiler_static_works=yes
8522        fi
8523      else
8524        lt_prog_compiler_static_works=yes
8525      fi
8526    fi
8527    $rm conftest*
8528    LDFLAGS="$save_LDFLAGS"
8529
8530 fi
8531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_static_works" >&5
8532 $as_echo "$lt_prog_compiler_static_works" >&6; }
8533
8534 if test x"$lt_prog_compiler_static_works" = xyes; then
8535     :
8536 else
8537     lt_prog_compiler_static=
8538 fi
8539
8540
8541
8542
8543 lt_prog_compiler_no_builtin_flag=
8544
8545 if test "$GCC" = yes; then
8546   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
8547
8548
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
8550 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
8551 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
8552   $as_echo_n "(cached) " >&6
8553 else
8554   lt_cv_prog_compiler_rtti_exceptions=no
8555   ac_outfile=conftest.$ac_objext
8556    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8557    lt_compiler_flag="-fno-rtti -fno-exceptions"
8558    # Insert the option either (1) after the last *FLAGS variable, or
8559    # (2) before a word containing "conftest.", or (3) at the end.
8560    # Note that $ac_compile itself does not contain backslashes and begins
8561    # with a dollar sign (not a hyphen), so the echo should work correctly.
8562    # The option is referenced via a variable to avoid confusing sed.
8563    lt_compile=`echo "$ac_compile" | $SED \
8564    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8565    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8566    -e 's:$: $lt_compiler_flag:'`
8567    (eval echo "\"\$as_me:8567: $lt_compile\"" >&5)
8568    (eval "$lt_compile" 2>conftest.err)
8569    ac_status=$?
8570    cat conftest.err >&5
8571    echo "$as_me:8571: \$? = $ac_status" >&5
8572    if (exit $ac_status) && test -s "$ac_outfile"; then
8573      # The compiler can only warn and ignore the option if not recognized
8574      # So say no if there are warnings other than the usual output.
8575      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8576      $SED '/^$/d' conftest.err >conftest.er2
8577      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8578        lt_cv_prog_compiler_rtti_exceptions=yes
8579      fi
8580    fi
8581    $rm conftest*
8582
8583 fi
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
8585 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
8586
8587 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
8588     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
8589 else
8590     :
8591 fi
8592
8593 fi
8594
8595 lt_prog_compiler_wl=
8596 lt_prog_compiler_pic=
8597 lt_prog_compiler_static=
8598
8599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8600 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8601
8602   if test "$GCC" = yes; then
8603     lt_prog_compiler_wl='-Wl,'
8604     lt_prog_compiler_static='-static'
8605
8606     case $host_os in
8607       aix*)
8608       # All AIX code is PIC.
8609       if test "$host_cpu" = ia64; then
8610         # AIX 5 now supports IA64 processor
8611         lt_prog_compiler_static='-Bstatic'
8612       fi
8613       ;;
8614
8615     amigaos*)
8616       # FIXME: we need at least 68020 code to build shared libraries, but
8617       # adding the `-m68020' flag to GCC prevents building anything better,
8618       # like `-m68040'.
8619       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
8620       ;;
8621
8622     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8623       # PIC is the default for these OSes.
8624       ;;
8625
8626     mingw* | pw32* | os2*)
8627       # This hack is so that the source file can tell whether it is being
8628       # built for inclusion in a dll (and should export symbols for example).
8629       lt_prog_compiler_pic='-DDLL_EXPORT'
8630       ;;
8631
8632     darwin* | rhapsody*)
8633       # PIC is the default on this platform
8634       # Common symbols not allowed in MH_DYLIB files
8635       lt_prog_compiler_pic='-fno-common'
8636       ;;
8637
8638     msdosdjgpp*)
8639       # Just because we use GCC doesn't mean we suddenly get shared libraries
8640       # on systems that don't support them.
8641       lt_prog_compiler_can_build_shared=no
8642       enable_shared=no
8643       ;;
8644
8645     sysv4*MP*)
8646       if test -d /usr/nec; then
8647         lt_prog_compiler_pic=-Kconform_pic
8648       fi
8649       ;;
8650
8651     hpux*)
8652       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8653       # not for PA HP-UX.
8654       case $host_cpu in
8655       hppa*64*|ia64*)
8656         # +Z the default
8657         ;;
8658       *)
8659         lt_prog_compiler_pic='-fPIC'
8660         ;;
8661       esac
8662       ;;
8663
8664     *)
8665       lt_prog_compiler_pic='-fPIC'
8666       ;;
8667     esac
8668   else
8669     # PORTME Check for flag to pass linker flags through the system compiler.
8670     case $host_os in
8671     aix*)
8672       lt_prog_compiler_wl='-Wl,'
8673       if test "$host_cpu" = ia64; then
8674         # AIX 5 now supports IA64 processor
8675         lt_prog_compiler_static='-Bstatic'
8676       else
8677         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
8678       fi
8679       ;;
8680       darwin*)
8681         # PIC is the default on this platform
8682         # Common symbols not allowed in MH_DYLIB files
8683        case $cc_basename in
8684          xlc*)
8685          lt_prog_compiler_pic='-qnocommon'
8686          lt_prog_compiler_wl='-Wl,'
8687          ;;
8688        esac
8689        ;;
8690
8691     mingw* | pw32* | os2*)
8692       # This hack is so that the source file can tell whether it is being
8693       # built for inclusion in a dll (and should export symbols for example).
8694       lt_prog_compiler_pic='-DDLL_EXPORT'
8695       ;;
8696
8697     hpux9* | hpux10* | hpux11*)
8698       lt_prog_compiler_wl='-Wl,'
8699       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8700       # not for PA HP-UX.
8701       case $host_cpu in
8702       hppa*64*|ia64*)
8703         # +Z the default
8704         ;;
8705       *)
8706         lt_prog_compiler_pic='+Z'
8707         ;;
8708       esac
8709       # Is there a better lt_prog_compiler_static that works with the bundled CC?
8710       lt_prog_compiler_static='${wl}-a ${wl}archive'
8711       ;;
8712
8713     irix5* | irix6* | nonstopux*)
8714       lt_prog_compiler_wl='-Wl,'
8715       # PIC (with -KPIC) is the default.
8716       lt_prog_compiler_static='-non_shared'
8717       ;;
8718
8719     newsos6)
8720       lt_prog_compiler_pic='-KPIC'
8721       lt_prog_compiler_static='-Bstatic'
8722       ;;
8723
8724     linux*)
8725       case $cc_basename in
8726       icc* | ecc*)
8727         lt_prog_compiler_wl='-Wl,'
8728         lt_prog_compiler_pic='-KPIC'
8729         lt_prog_compiler_static='-static'
8730         ;;
8731       pgcc* | pgf77* | pgf90* | pgf95*)
8732         # Portland Group compilers (*not* the Pentium gcc compiler,
8733         # which looks to be a dead project)
8734         lt_prog_compiler_wl='-Wl,'
8735         lt_prog_compiler_pic='-fpic'
8736         lt_prog_compiler_static='-Bstatic'
8737         ;;
8738       ccc*)
8739         lt_prog_compiler_wl='-Wl,'
8740         # All Alpha code is PIC.
8741         lt_prog_compiler_static='-non_shared'
8742         ;;
8743       esac
8744       ;;
8745
8746     osf3* | osf4* | osf5*)
8747       lt_prog_compiler_wl='-Wl,'
8748       # All OSF/1 code is PIC.
8749       lt_prog_compiler_static='-non_shared'
8750       ;;
8751
8752     sco3.2v5*)
8753       lt_prog_compiler_pic='-Kpic'
8754       lt_prog_compiler_static='-dn'
8755       ;;
8756
8757     solaris*)
8758       lt_prog_compiler_pic='-KPIC'
8759       lt_prog_compiler_static='-Bstatic'
8760       case $cc_basename in
8761       f77* | f90* | f95*)
8762         lt_prog_compiler_wl='-Qoption ld ';;
8763       *)
8764         lt_prog_compiler_wl='-Wl,';;
8765       esac
8766       ;;
8767
8768     sunos4*)
8769       lt_prog_compiler_wl='-Qoption ld '
8770       lt_prog_compiler_pic='-PIC'
8771       lt_prog_compiler_static='-Bstatic'
8772       ;;
8773
8774     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8775       lt_prog_compiler_wl='-Wl,'
8776       lt_prog_compiler_pic='-KPIC'
8777       lt_prog_compiler_static='-Bstatic'
8778       ;;
8779
8780     sysv4*MP*)
8781       if test -d /usr/nec ;then
8782         lt_prog_compiler_pic='-Kconform_pic'
8783         lt_prog_compiler_static='-Bstatic'
8784       fi
8785       ;;
8786
8787     unicos*)
8788       lt_prog_compiler_wl='-Wl,'
8789       lt_prog_compiler_can_build_shared=no
8790       ;;
8791
8792     uts4*)
8793       lt_prog_compiler_pic='-pic'
8794       lt_prog_compiler_static='-Bstatic'
8795       ;;
8796
8797     *)
8798       lt_prog_compiler_can_build_shared=no
8799       ;;
8800     esac
8801   fi
8802
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
8804 $as_echo "$lt_prog_compiler_pic" >&6; }
8805
8806 #
8807 # Check to make sure the PIC flag actually works.
8808 #
8809 if test -n "$lt_prog_compiler_pic"; then
8810
8811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8812 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
8813 if test "${lt_prog_compiler_pic_works+set}" = set; then :
8814   $as_echo_n "(cached) " >&6
8815 else
8816   lt_prog_compiler_pic_works=no
8817   ac_outfile=conftest.$ac_objext
8818    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8819    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8820    # Insert the option either (1) after the last *FLAGS variable, or
8821    # (2) before a word containing "conftest.", or (3) at the end.
8822    # Note that $ac_compile itself does not contain backslashes and begins
8823    # with a dollar sign (not a hyphen), so the echo should work correctly.
8824    # The option is referenced via a variable to avoid confusing sed.
8825    lt_compile=`echo "$ac_compile" | $SED \
8826    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8827    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8828    -e 's:$: $lt_compiler_flag:'`
8829    (eval echo "\"\$as_me:8829: $lt_compile\"" >&5)
8830    (eval "$lt_compile" 2>conftest.err)
8831    ac_status=$?
8832    cat conftest.err >&5
8833    echo "$as_me:8833: \$? = $ac_status" >&5
8834    if (exit $ac_status) && test -s "$ac_outfile"; then
8835      # The compiler can only warn and ignore the option if not recognized
8836      # So say no if there are warnings other than the usual output.
8837      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8838      $SED '/^$/d' conftest.err >conftest.er2
8839      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8840        lt_prog_compiler_pic_works=yes
8841      fi
8842    fi
8843    $rm conftest*
8844
8845 fi
8846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_works" >&5
8847 $as_echo "$lt_prog_compiler_pic_works" >&6; }
8848
8849 if test x"$lt_prog_compiler_pic_works" = xyes; then
8850     case $lt_prog_compiler_pic in
8851      "" | " "*) ;;
8852      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8853      esac
8854 else
8855     lt_prog_compiler_pic=
8856      lt_prog_compiler_can_build_shared=no
8857 fi
8858
8859 fi
8860 case $host_os in
8861   # For platforms which do not support PIC, -DPIC is meaningless:
8862   *djgpp*)
8863     lt_prog_compiler_pic=
8864     ;;
8865   *)
8866     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8867     ;;
8868 esac
8869
8870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8871 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8872 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8873   $as_echo_n "(cached) " >&6
8874 else
8875   lt_cv_prog_compiler_c_o=no
8876    $rm -r conftest 2>/dev/null
8877    mkdir conftest
8878    cd conftest
8879    mkdir out
8880    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8881
8882    lt_compiler_flag="-o out/conftest2.$ac_objext"
8883    # Insert the option either (1) after the last *FLAGS variable, or
8884    # (2) before a word containing "conftest.", or (3) at the end.
8885    # Note that $ac_compile itself does not contain backslashes and begins
8886    # with a dollar sign (not a hyphen), so the echo should work correctly.
8887    lt_compile=`echo "$ac_compile" | $SED \
8888    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8889    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8890    -e 's:$: $lt_compiler_flag:'`
8891    (eval echo "\"\$as_me:8891: $lt_compile\"" >&5)
8892    (eval "$lt_compile" 2>out/conftest.err)
8893    ac_status=$?
8894    cat out/conftest.err >&5
8895    echo "$as_me:8895: \$? = $ac_status" >&5
8896    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8897    then
8898      # The compiler can only warn and ignore the option if not recognized
8899      # So say no if there are warnings
8900      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
8901      $SED '/^$/d' out/conftest.err >out/conftest.er2
8902      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8903        lt_cv_prog_compiler_c_o=yes
8904      fi
8905    fi
8906    chmod u+w . 2>&5
8907    $rm conftest*
8908    # SGI C++ compiler will create directory out/ii_files/ for
8909    # template instantiation
8910    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
8911    $rm out/* && rmdir out
8912    cd ..
8913    rmdir conftest
8914    $rm conftest*
8915
8916 fi
8917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8918 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8919
8920
8921 hard_links="nottested"
8922 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8923   # do not overwrite the value of need_locks provided by the user
8924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
8925 $as_echo_n "checking if we can lock with hard links... " >&6; }
8926   hard_links=yes
8927   $rm conftest*
8928   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8929   touch conftest.a
8930   ln conftest.a conftest.b 2>&5 || hard_links=no
8931   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
8933 $as_echo "$hard_links" >&6; }
8934   if test "$hard_links" = no; then
8935     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8936 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8937     need_locks=warn
8938   fi
8939 else
8940   need_locks=no
8941 fi
8942
8943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8944 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
8945
8946   runpath_var=
8947   allow_undefined_flag=
8948   enable_shared_with_static_runtimes=no
8949   archive_cmds=
8950   archive_expsym_cmds=
8951   old_archive_From_new_cmds=
8952   old_archive_from_expsyms_cmds=
8953   export_dynamic_flag_spec=
8954   whole_archive_flag_spec=
8955   thread_safe_flag_spec=
8956   hardcode_libdir_flag_spec=
8957   hardcode_libdir_flag_spec_ld=
8958   hardcode_libdir_separator=
8959   hardcode_direct=no
8960   hardcode_minus_L=no
8961   hardcode_shlibpath_var=unsupported
8962   link_all_deplibs=unknown
8963   hardcode_automatic=no
8964   module_cmds=
8965   module_expsym_cmds=
8966   always_export_symbols=no
8967   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8968   # include_expsyms should be a list of space-separated symbols to be *always*
8969   # included in the symbol list
8970   include_expsyms=
8971   # exclude_expsyms can be an extended regexp of symbols to exclude
8972   # it will be wrapped by ` (' and `)$', so one must not match beginning or
8973   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8974   # as well as any symbol that contains `d'.
8975   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
8976   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8977   # platforms (ab)use it in PIC code, but their linkers get confused if
8978   # the symbol is explicitly referenced.  Since portable code cannot
8979   # rely on this symbol name, it's probably fine to never include it in
8980   # preloaded symbol tables.
8981   extract_expsyms_cmds=
8982   # Just being paranoid about ensuring that cc_basename is set.
8983   for cc_temp in $compiler""; do
8984   case $cc_temp in
8985     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8986     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8987     \-*) ;;
8988     *) break;;
8989   esac
8990 done
8991 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8992
8993   case $host_os in
8994   cygwin* | mingw* | pw32*)
8995     # FIXME: the MSVC++ port hasn't been tested in a loooong time
8996     # When not using gcc, we currently assume that we are using
8997     # Microsoft Visual C++.
8998     if test "$GCC" != yes; then
8999       with_gnu_ld=no
9000     fi
9001     ;;
9002   openbsd*)
9003     with_gnu_ld=no
9004     ;;
9005   esac
9006
9007   ld_shlibs=yes
9008   if test "$with_gnu_ld" = yes; then
9009     # If archive_cmds runs LD, not CC, wlarc should be empty
9010     wlarc='${wl}'
9011
9012     # Set some defaults for GNU ld with shared library support. These
9013     # are reset later if shared libraries are not supported. Putting them
9014     # here allows them to be overridden if necessary.
9015     runpath_var=LD_RUN_PATH
9016     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
9017     export_dynamic_flag_spec='${wl}--export-dynamic'
9018     # ancient GNU ld didn't support --whole-archive et. al.
9019     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
9020         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9021       else
9022         whole_archive_flag_spec=
9023     fi
9024     supports_anon_versioning=no
9025     case `$LD -v 2>/dev/null` in
9026       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9027       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9028       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9029       *\ 2.11.*) ;; # other 2.11 versions
9030       *) supports_anon_versioning=yes ;;
9031     esac
9032
9033     # See if GNU ld supports shared libraries.
9034     case $host_os in
9035     aix3* | aix4* | aix5*)
9036       # On AIX/PPC, the GNU linker is very broken
9037       if test "$host_cpu" != ia64; then
9038         ld_shlibs=no
9039         cat <<EOF 1>&2
9040
9041 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
9042 *** to be unable to reliably create shared libraries on AIX.
9043 *** Therefore, libtool is disabling shared libraries support.  If you
9044 *** really care for shared libraries, you may want to modify your PATH
9045 *** so that a non-GNU linker is found, and then restart.
9046
9047 EOF
9048       fi
9049       ;;
9050
9051     amigaos*)
9052       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)'
9053       hardcode_libdir_flag_spec='-L$libdir'
9054       hardcode_minus_L=yes
9055
9056       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9057       # that the semantics of dynamic libraries on AmigaOS, at least up
9058       # to version 4, is to share data among multiple programs linked
9059       # with the same dynamic library.  Since this doesn't match the
9060       # behavior of shared libraries on other platforms, we can't use
9061       # them.
9062       ld_shlibs=no
9063       ;;
9064
9065     beos*)
9066       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9067         allow_undefined_flag=unsupported
9068         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9069         # support --undefined.  This deserves some investigation.  FIXME
9070         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9071       else
9072         ld_shlibs=no
9073       fi
9074       ;;
9075
9076     cygwin* | mingw* | pw32*)
9077       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9078       # as there is no search path for DLLs.
9079       hardcode_libdir_flag_spec='-L$libdir'
9080       allow_undefined_flag=unsupported
9081       always_export_symbols=no
9082       enable_shared_with_static_runtimes=yes
9083       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
9084
9085       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
9086         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
9087         # If the export-symbols file already is a .def file (1st line
9088         # is EXPORTS), use it as is; otherwise, prepend...
9089         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9090           cp $export_symbols $output_objdir/$soname.def;
9091         else
9092           echo EXPORTS > $output_objdir/$soname.def;
9093           cat $export_symbols >> $output_objdir/$soname.def;
9094         fi~
9095         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
9096       else
9097         ld_shlibs=no
9098       fi
9099       ;;
9100
9101     linux*)
9102       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9103         tmp_addflag=
9104         case $cc_basename,$host_cpu in
9105         pgcc*)                          # Portland Group C compiler
9106           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'
9107           tmp_addflag=' $pic_flag'
9108           ;;
9109         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
9110           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'
9111           tmp_addflag=' $pic_flag -Mnomain' ;;
9112         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
9113           tmp_addflag=' -i_dynamic' ;;
9114         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
9115           tmp_addflag=' -i_dynamic -nofor_main' ;;
9116         ifc* | ifort*)                  # Intel Fortran compiler
9117           tmp_addflag=' -nofor_main' ;;
9118         esac
9119         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9120
9121         if test $supports_anon_versioning = yes; then
9122           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
9123   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9124   $echo "local: *; };" >> $output_objdir/$libname.ver~
9125           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9126         fi
9127       else
9128         ld_shlibs=no
9129       fi
9130       ;;
9131
9132     netbsd*)
9133       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9134         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9135         wlarc=
9136       else
9137         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9138         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9139       fi
9140       ;;
9141
9142     solaris* | sysv5*)
9143       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
9144         ld_shlibs=no
9145         cat <<EOF 1>&2
9146
9147 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
9148 *** create shared libraries on Solaris systems.  Therefore, libtool
9149 *** is disabling shared libraries support.  We urge you to upgrade GNU
9150 *** binutils to release 2.9.1 or newer.  Another option is to modify
9151 *** your PATH or compiler configuration so that the native linker is
9152 *** used, and then restart.
9153
9154 EOF
9155       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9156         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9157         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9158       else
9159         ld_shlibs=no
9160       fi
9161       ;;
9162
9163     sunos4*)
9164       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9165       wlarc=
9166       hardcode_direct=yes
9167       hardcode_shlibpath_var=no
9168       ;;
9169
9170     *)
9171       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9172         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9173         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9174       else
9175         ld_shlibs=no
9176       fi
9177       ;;
9178     esac
9179
9180     if test "$ld_shlibs" = no; then
9181       runpath_var=
9182       hardcode_libdir_flag_spec=
9183       export_dynamic_flag_spec=
9184       whole_archive_flag_spec=
9185     fi
9186   else
9187     # PORTME fill in a description of your system's linker (not GNU ld)
9188     case $host_os in
9189     aix3*)
9190       allow_undefined_flag=unsupported
9191       always_export_symbols=yes
9192       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'
9193       # Note: this linker hardcodes the directories in LIBPATH if there
9194       # are no directories specified by -L.
9195       hardcode_minus_L=yes
9196       if test "$GCC" = yes && test -z "$link_static_flag"; then
9197         # Neither direct hardcoding nor static linking is supported with a
9198         # broken collect2.
9199         hardcode_direct=unsupported
9200       fi
9201       ;;
9202
9203     aix4* | aix5*)
9204       if test "$host_cpu" = ia64; then
9205         # On IA64, the linker does run time linking by default, so we don't
9206         # have to do anything special.
9207         aix_use_runtimelinking=no
9208         exp_sym_flag='-Bexport'
9209         no_entry_flag=""
9210       else
9211         # If we're using GNU nm, then we don't want the "-C" option.
9212         # -C means demangle to AIX nm, but means don't demangle with GNU nm
9213         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
9214           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'
9215         else
9216           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'
9217         fi
9218         aix_use_runtimelinking=no
9219
9220         # Test if we are trying to use run time linking or normal
9221         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9222         # need to do runtime linking.
9223         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
9224           for ld_flag in $LDFLAGS; do
9225           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
9226             aix_use_runtimelinking=yes
9227             break
9228           fi
9229           done
9230         esac
9231
9232         exp_sym_flag='-bexport'
9233         no_entry_flag='-bnoentry'
9234       fi
9235
9236       # When large executables or shared objects are built, AIX ld can
9237       # have problems creating the table of contents.  If linking a library
9238       # or program results in "error TOC overflow" add -mminimal-toc to
9239       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9240       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9241
9242       archive_cmds=''
9243       hardcode_direct=yes
9244       hardcode_libdir_separator=':'
9245       link_all_deplibs=yes
9246
9247       if test "$GCC" = yes; then
9248         case $host_os in aix4.[012]|aix4.[012].*)
9249         # We only want to do this on AIX 4.2 and lower, the check
9250         # below for broken collect2 doesn't work under 4.3+
9251           collect2name=`${CC} -print-prog-name=collect2`
9252           if test -f "$collect2name" && \
9253            strings "$collect2name" | grep resolve_lib_name >/dev/null
9254           then
9255           # We have reworked collect2
9256           hardcode_direct=yes
9257           else
9258           # We have old collect2
9259           hardcode_direct=unsupported
9260           # It fails to find uninstalled libraries when the uninstalled
9261           # path is not listed in the libpath.  Setting hardcode_minus_L
9262           # to unsupported forces relinking
9263           hardcode_minus_L=yes
9264           hardcode_libdir_flag_spec='-L$libdir'
9265           hardcode_libdir_separator=
9266           fi
9267         esac
9268         shared_flag='-shared'
9269         if test "$aix_use_runtimelinking" = yes; then
9270           shared_flag="$shared_flag "'${wl}-G'
9271         fi
9272       else
9273         # not using gcc
9274         if test "$host_cpu" = ia64; then
9275         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9276         # chokes on -Wl,-G. The following line is correct:
9277           shared_flag='-G'
9278         else
9279         if test "$aix_use_runtimelinking" = yes; then
9280             shared_flag='${wl}-G'
9281           else
9282             shared_flag='${wl}-bM:SRE'
9283         fi
9284         fi
9285       fi
9286
9287       # It seems that -bexpall does not export symbols beginning with
9288       # underscore (_), so it is better to generate a list of symbols to export.
9289       always_export_symbols=yes
9290       if test "$aix_use_runtimelinking" = yes; then
9291         # Warning - without using the other runtime loading flags (-brtl),
9292         # -berok will link without error, but may produce a broken library.
9293         allow_undefined_flag='-berok'
9294        # Determine the default libpath from the value encoded in an empty executable.
9295        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9296 /* end confdefs.h.  */
9297
9298 int
9299 main ()
9300 {
9301
9302   ;
9303   return 0;
9304 }
9305 _ACEOF
9306 if ac_fn_c_try_link "$LINENO"; then :
9307
9308 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9309 }'`
9310 # Check for a 64-bit object if we didn't find anything.
9311 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; }
9312 }'`; fi
9313 fi
9314 rm -f core conftest.err conftest.$ac_objext \
9315     conftest$ac_exeext conftest.$ac_ext
9316 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9317
9318        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9319         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"
9320        else
9321         if test "$host_cpu" = ia64; then
9322           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
9323           allow_undefined_flag="-z nodefs"
9324           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"
9325         else
9326          # Determine the default libpath from the value encoded in an empty executable.
9327          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9328 /* end confdefs.h.  */
9329
9330 int
9331 main ()
9332 {
9333
9334   ;
9335   return 0;
9336 }
9337 _ACEOF
9338 if ac_fn_c_try_link "$LINENO"; then :
9339
9340 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9341 }'`
9342 # Check for a 64-bit object if we didn't find anything.
9343 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; }
9344 }'`; fi
9345 fi
9346 rm -f core conftest.err conftest.$ac_objext \
9347     conftest$ac_exeext conftest.$ac_ext
9348 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9349
9350          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9351           # Warning - without using the other run time loading flags,
9352           # -berok will link without error, but may produce a broken library.
9353           no_undefined_flag=' ${wl}-bernotok'
9354           allow_undefined_flag=' ${wl}-berok'
9355           # -bexpall does not export symbols beginning with underscore (_)
9356           always_export_symbols=yes
9357           # Exported symbols can be pulled into shared objects from archives
9358           whole_archive_flag_spec=' '
9359           archive_cmds_need_lc=yes
9360           # This is similar to how AIX traditionally builds its shared libraries.
9361           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'
9362         fi
9363       fi
9364       ;;
9365
9366     amigaos*)
9367       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)'
9368       hardcode_libdir_flag_spec='-L$libdir'
9369       hardcode_minus_L=yes
9370       # see comment about different semantics on the GNU ld section
9371       ld_shlibs=no
9372       ;;
9373
9374     bsdi[45]*)
9375       export_dynamic_flag_spec=-rdynamic
9376       ;;
9377
9378     cygwin* | mingw* | pw32*)
9379       # When not using gcc, we currently assume that we are using
9380       # Microsoft Visual C++.
9381       # hardcode_libdir_flag_spec is actually meaningless, as there is
9382       # no search path for DLLs.
9383       hardcode_libdir_flag_spec=' '
9384       allow_undefined_flag=unsupported
9385       # Tell ltmain to make .lib files, not .a files.
9386       libext=lib
9387       # Tell ltmain to make .dll files, not .so files.
9388       shrext_cmds=".dll"
9389       # FIXME: Setting linknames here is a bad hack.
9390       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
9391       # The linker will automatically build a .lib file if we build a DLL.
9392       old_archive_From_new_cmds='true'
9393       # FIXME: Should let the user specify the lib program.
9394       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
9395       fix_srcfile_path='`cygpath -w "$srcfile"`'
9396       enable_shared_with_static_runtimes=yes
9397       ;;
9398
9399     darwin* | rhapsody*)
9400       case $host_os in
9401         rhapsody* | darwin1.[012])
9402          allow_undefined_flag='${wl}-undefined ${wl}suppress'
9403          ;;
9404        *) # Darwin 1.3 on
9405          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
9406            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9407          else
9408            case ${MACOSX_DEPLOYMENT_TARGET} in
9409              10.[012])
9410                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9411                ;;
9412              10.*)
9413                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
9414                ;;
9415            esac
9416          fi
9417          ;;
9418       esac
9419       archive_cmds_need_lc=no
9420       hardcode_direct=no
9421       hardcode_automatic=yes
9422       hardcode_shlibpath_var=unsupported
9423       whole_archive_flag_spec=''
9424       link_all_deplibs=yes
9425     if test "$GCC" = yes ; then
9426         output_verbose_link_cmd='echo'
9427         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
9428       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9429       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9430       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}'
9431       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}'
9432     else
9433       case $cc_basename in
9434         xlc*)
9435          output_verbose_link_cmd='echo'
9436          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
9437          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9438           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9439          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}'
9440           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}'
9441           ;;
9442        *)
9443          ld_shlibs=no
9444           ;;
9445       esac
9446     fi
9447       ;;
9448
9449     dgux*)
9450       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9451       hardcode_libdir_flag_spec='-L$libdir'
9452       hardcode_shlibpath_var=no
9453       ;;
9454
9455     freebsd1*)
9456       ld_shlibs=no
9457       ;;
9458
9459     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9460     # support.  Future versions do this automatically, but an explicit c++rt0.o
9461     # does not break anything, and helps significantly (at the cost of a little
9462     # extra space).
9463     freebsd2.2*)
9464       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9465       hardcode_libdir_flag_spec='-R$libdir'
9466       hardcode_direct=yes
9467       hardcode_shlibpath_var=no
9468       ;;
9469
9470     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9471     freebsd2*)
9472       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9473       hardcode_direct=yes
9474       hardcode_minus_L=yes
9475       hardcode_shlibpath_var=no
9476       ;;
9477
9478     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9479     freebsd* | kfreebsd*-gnu | dragonfly*)
9480       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9481       hardcode_libdir_flag_spec='-R$libdir'
9482       hardcode_direct=yes
9483       hardcode_shlibpath_var=no
9484       ;;
9485
9486     hpux9*)
9487       if test "$GCC" = yes; then
9488         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'
9489       else
9490         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'
9491       fi
9492       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9493       hardcode_libdir_separator=:
9494       hardcode_direct=yes
9495
9496       # hardcode_minus_L: Not really in the search PATH,
9497       # but as the default location of the library.
9498       hardcode_minus_L=yes
9499       export_dynamic_flag_spec='${wl}-E'
9500       ;;
9501
9502     hpux10* | hpux11*)
9503       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9504         case $host_cpu in
9505         hppa*64*|ia64*)
9506           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9507           ;;
9508         *)
9509           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9510           ;;
9511         esac
9512       else
9513         case $host_cpu in
9514         hppa*64*|ia64*)
9515           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
9516           ;;
9517         *)
9518           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9519           ;;
9520         esac
9521       fi
9522       if test "$with_gnu_ld" = no; then
9523         case $host_cpu in
9524         hppa*64*)
9525           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9526           hardcode_libdir_flag_spec_ld='+b $libdir'
9527           hardcode_libdir_separator=:
9528           hardcode_direct=no
9529           hardcode_shlibpath_var=no
9530           ;;
9531         ia64*)
9532           hardcode_libdir_flag_spec='-L$libdir'
9533           hardcode_direct=no
9534           hardcode_shlibpath_var=no
9535
9536           # hardcode_minus_L: Not really in the search PATH,
9537           # but as the default location of the library.
9538           hardcode_minus_L=yes
9539           ;;
9540         *)
9541           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9542           hardcode_libdir_separator=:
9543           hardcode_direct=yes
9544           export_dynamic_flag_spec='${wl}-E'
9545
9546           # hardcode_minus_L: Not really in the search PATH,
9547           # but as the default location of the library.
9548           hardcode_minus_L=yes
9549           ;;
9550         esac
9551       fi
9552       ;;
9553
9554     irix5* | irix6* | nonstopux*)
9555       if test "$GCC" = yes; then
9556         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'
9557       else
9558         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'
9559         hardcode_libdir_flag_spec_ld='-rpath $libdir'
9560       fi
9561       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9562       hardcode_libdir_separator=:
9563       link_all_deplibs=yes
9564       ;;
9565
9566     netbsd*)
9567       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9568         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
9569       else
9570         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
9571       fi
9572       hardcode_libdir_flag_spec='-R$libdir'
9573       hardcode_direct=yes
9574       hardcode_shlibpath_var=no
9575       ;;
9576
9577     newsos6)
9578       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9579       hardcode_direct=yes
9580       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9581       hardcode_libdir_separator=:
9582       hardcode_shlibpath_var=no
9583       ;;
9584
9585     openbsd*)
9586       hardcode_direct=yes
9587       hardcode_shlibpath_var=no
9588       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9589         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9590         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9591         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9592         export_dynamic_flag_spec='${wl}-E'
9593       else
9594        case $host_os in
9595          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9596            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9597            hardcode_libdir_flag_spec='-R$libdir'
9598            ;;
9599          *)
9600            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9601            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9602            ;;
9603        esac
9604       fi
9605       ;;
9606
9607     os2*)
9608       hardcode_libdir_flag_spec='-L$libdir'
9609       hardcode_minus_L=yes
9610       allow_undefined_flag=unsupported
9611       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'
9612       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9613       ;;
9614
9615     osf3*)
9616       if test "$GCC" = yes; then
9617         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9618         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'
9619       else
9620         allow_undefined_flag=' -expect_unresolved \*'
9621         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'
9622       fi
9623       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9624       hardcode_libdir_separator=:
9625       ;;
9626
9627     osf4* | osf5*)      # as osf3* with the addition of -msym flag
9628       if test "$GCC" = yes; then
9629         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9630         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'
9631         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9632       else
9633         allow_undefined_flag=' -expect_unresolved \*'
9634         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'
9635         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
9636         $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'
9637
9638         # Both c and cxx compiler support -rpath directly
9639         hardcode_libdir_flag_spec='-rpath $libdir'
9640       fi
9641       hardcode_libdir_separator=:
9642       ;;
9643
9644     sco3.2v5*)
9645       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9646       hardcode_shlibpath_var=no
9647       export_dynamic_flag_spec='${wl}-Bexport'
9648       runpath_var=LD_RUN_PATH
9649       hardcode_runpath_var=yes
9650       ;;
9651
9652     solaris*)
9653       no_undefined_flag=' -z text'
9654       if test "$GCC" = yes; then
9655         wlarc='${wl}'
9656         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9657         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9658           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
9659       else
9660         wlarc=''
9661         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9662         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9663         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9664       fi
9665       hardcode_libdir_flag_spec='-R$libdir'
9666       hardcode_shlibpath_var=no
9667       case $host_os in
9668       solaris2.[0-5] | solaris2.[0-5].*) ;;
9669       *)
9670         # The compiler driver will combine linker options so we
9671         # cannot just pass the convience library names through
9672         # without $wl, iff we do not link with $LD.
9673         # Luckily, gcc supports the same syntax we need for Sun Studio.
9674         # Supported since Solaris 2.6 (maybe 2.5.1?)
9675         case $wlarc in
9676         '')
9677           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
9678         *)
9679           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' ;;
9680         esac ;;
9681       esac
9682       link_all_deplibs=yes
9683       ;;
9684
9685     sunos4*)
9686       if test "x$host_vendor" = xsequent; then
9687         # Use $CC to link under sequent, because it throws in some extra .o
9688         # files that make .init and .fini sections work.
9689         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9690       else
9691         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9692       fi
9693       hardcode_libdir_flag_spec='-L$libdir'
9694       hardcode_direct=yes
9695       hardcode_minus_L=yes
9696       hardcode_shlibpath_var=no
9697       ;;
9698
9699     sysv4)
9700       case $host_vendor in
9701         sni)
9702           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9703           hardcode_direct=yes # is this really true???
9704         ;;
9705         siemens)
9706           ## LD is ld it makes a PLAMLIB
9707           ## CC just makes a GrossModule.
9708           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9709           reload_cmds='$CC -r -o $output$reload_objs'
9710           hardcode_direct=no
9711         ;;
9712         motorola)
9713           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9714           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9715         ;;
9716       esac
9717       runpath_var='LD_RUN_PATH'
9718       hardcode_shlibpath_var=no
9719       ;;
9720
9721     sysv4.3*)
9722       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9723       hardcode_shlibpath_var=no
9724       export_dynamic_flag_spec='-Bexport'
9725       ;;
9726
9727     sysv4*MP*)
9728       if test -d /usr/nec; then
9729         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9730         hardcode_shlibpath_var=no
9731         runpath_var=LD_RUN_PATH
9732         hardcode_runpath_var=yes
9733         ld_shlibs=yes
9734       fi
9735       ;;
9736
9737     sysv4.2uw2*)
9738       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9739       hardcode_direct=yes
9740       hardcode_minus_L=no
9741       hardcode_shlibpath_var=no
9742       hardcode_runpath_var=yes
9743       runpath_var=LD_RUN_PATH
9744       ;;
9745
9746    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
9747       no_undefined_flag='${wl}-z ${wl}text'
9748       if test "$GCC" = yes; then
9749         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9750       else
9751         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9752       fi
9753       runpath_var='LD_RUN_PATH'
9754       hardcode_shlibpath_var=no
9755       ;;
9756
9757     sysv5*)
9758       no_undefined_flag=' -z text'
9759       # $CC -shared without GNU ld will not create a library from C++
9760       # object files and a static libstdc++, better avoid it by now
9761       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9762       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9763                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9764       hardcode_libdir_flag_spec=
9765       hardcode_shlibpath_var=no
9766       runpath_var='LD_RUN_PATH'
9767       ;;
9768
9769     uts4*)
9770       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9771       hardcode_libdir_flag_spec='-L$libdir'
9772       hardcode_shlibpath_var=no
9773       ;;
9774
9775     *)
9776       ld_shlibs=no
9777       ;;
9778     esac
9779   fi
9780
9781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
9782 $as_echo "$ld_shlibs" >&6; }
9783 test "$ld_shlibs" = no && can_build_shared=no
9784
9785 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9786 if test "$GCC" = yes; then
9787   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9788 fi
9789
9790 #
9791 # Do we need to explicitly link libc?
9792 #
9793 case "x$archive_cmds_need_lc" in
9794 x|xyes)
9795   # Assume -lc should be added
9796   archive_cmds_need_lc=yes
9797
9798   if test "$enable_shared" = yes && test "$GCC" = yes; then
9799     case $archive_cmds in
9800     *'~'*)
9801       # FIXME: we may have to deal with multi-command sequences.
9802       ;;
9803     '$CC '*)
9804       # Test whether the compiler implicitly links with -lc since on some
9805       # systems, -lgcc has to come before -lc. If gcc already passes -lc
9806       # to ld, don't add -lc before -lgcc.
9807       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
9808 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
9809       $rm conftest*
9810       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
9811
9812       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9813   (eval $ac_compile) 2>&5
9814   ac_status=$?
9815   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9816   test $ac_status = 0; } 2>conftest.err; then
9817         soname=conftest
9818         lib=conftest
9819         libobjs=conftest.$ac_objext
9820         deplibs=
9821         wl=$lt_prog_compiler_wl
9822         compiler_flags=-v
9823         linker_flags=-v
9824         verstring=
9825         output_objdir=.
9826         libname=conftest
9827         lt_save_allow_undefined_flag=$allow_undefined_flag
9828         allow_undefined_flag=
9829         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9830   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
9831   ac_status=$?
9832   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9833   test $ac_status = 0; }
9834         then
9835           archive_cmds_need_lc=no
9836         else
9837           archive_cmds_need_lc=yes
9838         fi
9839         allow_undefined_flag=$lt_save_allow_undefined_flag
9840       else
9841         cat conftest.err 1>&5
9842       fi
9843       $rm conftest*
9844       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
9845 $as_echo "$archive_cmds_need_lc" >&6; }
9846       ;;
9847     esac
9848   fi
9849   ;;
9850 esac
9851
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
9853 $as_echo_n "checking dynamic linker characteristics... " >&6; }
9854 library_names_spec=
9855 libname_spec='lib$name'
9856 soname_spec=
9857 shrext_cmds=".so"
9858 postinstall_cmds=
9859 postuninstall_cmds=
9860 finish_cmds=
9861 finish_eval=
9862 shlibpath_var=
9863 shlibpath_overrides_runpath=unknown
9864 version_type=none
9865 dynamic_linker="$host_os ld.so"
9866 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9867 if test "$GCC" = yes; then
9868   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9869   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9870     # if the path contains ";" then we assume it to be the separator
9871     # otherwise default to the standard path separator (i.e. ":") - it is
9872     # assumed that no part of a normal pathname contains ";" but that should
9873     # okay in the real world where ";" in dirpaths is itself problematic.
9874     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9875   else
9876     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9877   fi
9878 else
9879   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9880 fi
9881 need_lib_prefix=unknown
9882 hardcode_into_libs=no
9883
9884 # when you set need_version to no, make sure it does not cause -set_version
9885 # flags to be left without arguments
9886 need_version=unknown
9887
9888 case $host_os in
9889 aix3*)
9890   version_type=linux
9891   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9892   shlibpath_var=LIBPATH
9893
9894   # AIX 3 has no versioning support, so we append a major version to the name.
9895   soname_spec='${libname}${release}${shared_ext}$major'
9896   ;;
9897
9898 aix4* | aix5*)
9899   version_type=linux
9900   need_lib_prefix=no
9901   need_version=no
9902   hardcode_into_libs=yes
9903   if test "$host_cpu" = ia64; then
9904     # AIX 5 supports IA64
9905     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9906     shlibpath_var=LD_LIBRARY_PATH
9907   else
9908     # With GCC up to 2.95.x, collect2 would create an import file
9909     # for dependence libraries.  The import file would start with
9910     # the line `#! .'.  This would cause the generated library to
9911     # depend on `.', always an invalid library.  This was fixed in
9912     # development snapshots of GCC prior to 3.0.
9913     case $host_os in
9914       aix4 | aix4.[01] | aix4.[01].*)
9915       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9916            echo ' yes '
9917            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9918         :
9919       else
9920         can_build_shared=no
9921       fi
9922       ;;
9923     esac
9924     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9925     # soname into executable. Probably we can add versioning support to
9926     # collect2, so additional links can be useful in future.
9927     if test "$aix_use_runtimelinking" = yes; then
9928       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9929       # instead of lib<name>.a to let people know that these are not
9930       # typical AIX shared libraries.
9931       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9932     else
9933       # We preserve .a as extension for shared libraries through AIX4.2
9934       # and later when we are not doing run time linking.
9935       library_names_spec='${libname}${release}.a $libname.a'
9936       soname_spec='${libname}${release}${shared_ext}$major'
9937     fi
9938     shlibpath_var=LIBPATH
9939   fi
9940   ;;
9941
9942 amigaos*)
9943   library_names_spec='$libname.ixlibrary $libname.a'
9944   # Create ${libname}_ixlibrary.a entries in /sys/libs.
9945   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'
9946   ;;
9947
9948 beos*)
9949   library_names_spec='${libname}${shared_ext}'
9950   dynamic_linker="$host_os ld.so"
9951   shlibpath_var=LIBRARY_PATH
9952   ;;
9953
9954 bsdi[45]*)
9955   version_type=linux
9956   need_version=no
9957   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9958   soname_spec='${libname}${release}${shared_ext}$major'
9959   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9960   shlibpath_var=LD_LIBRARY_PATH
9961   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9962   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9963   # the default ld.so.conf also contains /usr/contrib/lib and
9964   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9965   # libtool to hard-code these into programs
9966   ;;
9967
9968 cygwin* | mingw* | pw32*)
9969   version_type=windows
9970   shrext_cmds=".dll"
9971   need_version=no
9972   need_lib_prefix=no
9973
9974   case $GCC,$host_os in
9975   yes,cygwin* | yes,mingw* | yes,pw32*)
9976     library_names_spec='$libname.dll.a'
9977     # DLL is installed to $(libdir)/../bin by postinstall_cmds
9978     postinstall_cmds='base_file=`basename \${file}`~
9979       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
9980       dldir=$destdir/`dirname \$dlpath`~
9981       test -d \$dldir || mkdir -p \$dldir~
9982       $install_prog $dir/$dlname \$dldir/$dlname~
9983       chmod a+x \$dldir/$dlname'
9984     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9985       dlpath=$dir/\$dldll~
9986        $rm \$dlpath'
9987     shlibpath_overrides_runpath=yes
9988
9989     case $host_os in
9990     cygwin*)
9991       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9992       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9993       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9994       ;;
9995     mingw*)
9996       # MinGW DLLs use traditional 'lib' prefix
9997       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9998       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9999       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
10000         # It is most probably a Windows format PATH printed by
10001         # mingw gcc, but we are running on Cygwin. Gcc prints its search
10002         # path with ; separators, and with drive letters. We can handle the
10003         # drive letters (cygwin fileutils understands them), so leave them,
10004         # especially as we might pass files found there to a mingw objdump,
10005         # which wouldn't understand a cygwinified path. Ahh.
10006         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10007       else
10008         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
10009       fi
10010       ;;
10011     pw32*)
10012       # pw32 DLLs use 'pw' prefix rather than 'lib'
10013       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10014       ;;
10015     esac
10016     ;;
10017
10018   *)
10019     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10020     ;;
10021   esac
10022   dynamic_linker='Win32 ld.exe'
10023   # FIXME: first we should search . and the directory the executable is in
10024   shlibpath_var=PATH
10025   ;;
10026
10027 darwin* | rhapsody*)
10028   dynamic_linker="$host_os dyld"
10029   version_type=darwin
10030   need_lib_prefix=no
10031   need_version=no
10032   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
10033   soname_spec='${libname}${release}${major}$shared_ext'
10034   shlibpath_overrides_runpath=yes
10035   shlibpath_var=DYLD_LIBRARY_PATH
10036   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10037   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
10038   if test "$GCC" = yes; then
10039     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"`
10040   else
10041     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
10042   fi
10043   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10044   ;;
10045
10046 dgux*)
10047   version_type=linux
10048   need_lib_prefix=no
10049   need_version=no
10050   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10051   soname_spec='${libname}${release}${shared_ext}$major'
10052   shlibpath_var=LD_LIBRARY_PATH
10053   ;;
10054
10055 freebsd1*)
10056   dynamic_linker=no
10057   ;;
10058
10059 kfreebsd*-gnu)
10060   version_type=linux
10061   need_lib_prefix=no
10062   need_version=no
10063   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10064   soname_spec='${libname}${release}${shared_ext}$major'
10065   shlibpath_var=LD_LIBRARY_PATH
10066   shlibpath_overrides_runpath=no
10067   hardcode_into_libs=yes
10068   dynamic_linker='GNU ld.so'
10069   ;;
10070
10071 freebsd* | dragonfly*)
10072   # DragonFly does not have aout.  When/if they implement a new
10073   # versioning mechanism, adjust this.
10074   if test -x /usr/bin/objformat; then
10075     objformat=`/usr/bin/objformat`
10076   else
10077     case $host_os in
10078     freebsd[123]*) objformat=aout ;;
10079     *) objformat=elf ;;
10080     esac
10081   fi
10082   version_type=freebsd-$objformat
10083   case $version_type in
10084     freebsd-elf*)
10085       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10086       need_version=no
10087       need_lib_prefix=no
10088       ;;
10089     freebsd-*)
10090       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
10091       need_version=yes
10092       ;;
10093   esac
10094   shlibpath_var=LD_LIBRARY_PATH
10095   case $host_os in
10096   freebsd2*)
10097     shlibpath_overrides_runpath=yes
10098     ;;
10099   freebsd3.[01]* | freebsdelf3.[01]*)
10100     shlibpath_overrides_runpath=yes
10101     hardcode_into_libs=yes
10102     ;;
10103   *) # from 3.2 on
10104     shlibpath_overrides_runpath=no
10105     hardcode_into_libs=yes
10106     ;;
10107   esac
10108   ;;
10109
10110 gnu*)
10111   version_type=linux
10112   need_lib_prefix=no
10113   need_version=no
10114   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10115   soname_spec='${libname}${release}${shared_ext}$major'
10116   shlibpath_var=LD_LIBRARY_PATH
10117   hardcode_into_libs=yes
10118   ;;
10119
10120 hpux9* | hpux10* | hpux11*)
10121   # Give a soname corresponding to the major version so that dld.sl refuses to
10122   # link against other versions.
10123   version_type=sunos
10124   need_lib_prefix=no
10125   need_version=no
10126   case $host_cpu in
10127   ia64*)
10128     shrext_cmds='.so'
10129     hardcode_into_libs=yes
10130     dynamic_linker="$host_os dld.so"
10131     shlibpath_var=LD_LIBRARY_PATH
10132     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10133     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10134     soname_spec='${libname}${release}${shared_ext}$major'
10135     if test "X$HPUX_IA64_MODE" = X32; then
10136       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10137     else
10138       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10139     fi
10140     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10141     ;;
10142    hppa*64*)
10143      shrext_cmds='.sl'
10144      hardcode_into_libs=yes
10145      dynamic_linker="$host_os dld.sl"
10146      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10147      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10148      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10149      soname_spec='${libname}${release}${shared_ext}$major'
10150      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10151      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10152      ;;
10153    *)
10154     shrext_cmds='.sl'
10155     dynamic_linker="$host_os dld.sl"
10156     shlibpath_var=SHLIB_PATH
10157     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10158     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10159     soname_spec='${libname}${release}${shared_ext}$major'
10160     ;;
10161   esac
10162   # HP-UX runs *really* slowly unless shared libraries are mode 555.
10163   postinstall_cmds='chmod 555 $lib'
10164   ;;
10165
10166 irix5* | irix6* | nonstopux*)
10167   case $host_os in
10168     nonstopux*) version_type=nonstopux ;;
10169     *)
10170         if test "$lt_cv_prog_gnu_ld" = yes; then
10171                 version_type=linux
10172         else
10173                 version_type=irix
10174         fi ;;
10175   esac
10176   need_lib_prefix=no
10177   need_version=no
10178   soname_spec='${libname}${release}${shared_ext}$major'
10179   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
10180   case $host_os in
10181   irix5* | nonstopux*)
10182     libsuff= shlibsuff=
10183     ;;
10184   *)
10185     case $LD in # libtool.m4 will add one of these switches to LD
10186     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10187       libsuff= shlibsuff= libmagic=32-bit;;
10188     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10189       libsuff=32 shlibsuff=N32 libmagic=N32;;
10190     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10191       libsuff=64 shlibsuff=64 libmagic=64-bit;;
10192     *) libsuff= shlibsuff= libmagic=never-match;;
10193     esac
10194     ;;
10195   esac
10196   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10197   shlibpath_overrides_runpath=no
10198   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10199   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
10200   hardcode_into_libs=yes
10201   ;;
10202
10203 # No shared lib support for Linux oldld, aout, or coff.
10204 linux*oldld* | linux*aout* | linux*coff*)
10205   dynamic_linker=no
10206   ;;
10207
10208 # This must be Linux ELF.
10209 linux*)
10210   version_type=linux
10211   need_lib_prefix=no
10212   need_version=no
10213   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10214   soname_spec='${libname}${release}${shared_ext}$major'
10215   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10216   shlibpath_var=LD_LIBRARY_PATH
10217   shlibpath_overrides_runpath=no
10218   # This implies no fast_install, which is unacceptable.
10219   # Some rework will be needed to allow for fast_install
10220   # before this can be enabled.
10221   hardcode_into_libs=yes
10222
10223   # Append ld.so.conf contents to the search path
10224   if test -f /etc/ld.so.conf; then
10225     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' ' '`
10226     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10227   fi
10228
10229   # We used to test for /lib/ld.so.1 and disable shared libraries on
10230   # powerpc, because MkLinux only supported shared libraries with the
10231   # GNU dynamic linker.  Since this was broken with cross compilers,
10232   # most powerpc-linux boxes support dynamic linking these days and
10233   # people can always --disable-shared, the test was removed, and we
10234   # assume the GNU/Linux dynamic linker is in use.
10235   dynamic_linker='GNU/Linux ld.so'
10236   ;;
10237
10238 knetbsd*-gnu)
10239   version_type=linux
10240   need_lib_prefix=no
10241   need_version=no
10242   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10243   soname_spec='${libname}${release}${shared_ext}$major'
10244   shlibpath_var=LD_LIBRARY_PATH
10245   shlibpath_overrides_runpath=no
10246   hardcode_into_libs=yes
10247   dynamic_linker='GNU ld.so'
10248   ;;
10249
10250 netbsd*)
10251   version_type=sunos
10252   need_lib_prefix=no
10253   need_version=no
10254   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10255     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10256     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10257     dynamic_linker='NetBSD (a.out) ld.so'
10258   else
10259     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10260     soname_spec='${libname}${release}${shared_ext}$major'
10261     dynamic_linker='NetBSD ld.elf_so'
10262   fi
10263   shlibpath_var=LD_LIBRARY_PATH
10264   shlibpath_overrides_runpath=yes
10265   hardcode_into_libs=yes
10266   ;;
10267
10268 newsos6)
10269   version_type=linux
10270   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10271   shlibpath_var=LD_LIBRARY_PATH
10272   shlibpath_overrides_runpath=yes
10273   ;;
10274
10275 nto-qnx*)
10276   version_type=linux
10277   need_lib_prefix=no
10278   need_version=no
10279   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10280   soname_spec='${libname}${release}${shared_ext}$major'
10281   shlibpath_var=LD_LIBRARY_PATH
10282   shlibpath_overrides_runpath=yes
10283   ;;
10284
10285 openbsd*)
10286   version_type=sunos
10287   need_lib_prefix=no
10288   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10289   case $host_os in
10290     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10291     *)                         need_version=no  ;;
10292   esac
10293   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10294   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10295   shlibpath_var=LD_LIBRARY_PATH
10296   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10297     case $host_os in
10298       openbsd2.[89] | openbsd2.[89].*)
10299         shlibpath_overrides_runpath=no
10300         ;;
10301       *)
10302         shlibpath_overrides_runpath=yes
10303         ;;
10304       esac
10305   else
10306     shlibpath_overrides_runpath=yes
10307   fi
10308   ;;
10309
10310 os2*)
10311   libname_spec='$name'
10312   shrext_cmds=".dll"
10313   need_lib_prefix=no
10314   library_names_spec='$libname${shared_ext} $libname.a'
10315   dynamic_linker='OS/2 ld.exe'
10316   shlibpath_var=LIBPATH
10317   ;;
10318
10319 osf3* | osf4* | osf5*)
10320   version_type=osf
10321   need_lib_prefix=no
10322   need_version=no
10323   soname_spec='${libname}${release}${shared_ext}$major'
10324   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10325   shlibpath_var=LD_LIBRARY_PATH
10326   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10327   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
10328   ;;
10329
10330 sco3.2v5*)
10331   version_type=osf
10332   soname_spec='${libname}${release}${shared_ext}$major'
10333   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10334   shlibpath_var=LD_LIBRARY_PATH
10335   ;;
10336
10337 solaris*)
10338   version_type=linux
10339   need_lib_prefix=no
10340   need_version=no
10341   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10342   soname_spec='${libname}${release}${shared_ext}$major'
10343   shlibpath_var=LD_LIBRARY_PATH
10344   shlibpath_overrides_runpath=yes
10345   hardcode_into_libs=yes
10346   # ldd complains unless libraries are executable
10347   postinstall_cmds='chmod +x $lib'
10348   ;;
10349
10350 sunos4*)
10351   version_type=sunos
10352   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10353   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10354   shlibpath_var=LD_LIBRARY_PATH
10355   shlibpath_overrides_runpath=yes
10356   if test "$with_gnu_ld" = yes; then
10357     need_lib_prefix=no
10358   fi
10359   need_version=yes
10360   ;;
10361
10362 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10363   version_type=linux
10364   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10365   soname_spec='${libname}${release}${shared_ext}$major'
10366   shlibpath_var=LD_LIBRARY_PATH
10367   case $host_vendor in
10368     sni)
10369       shlibpath_overrides_runpath=no
10370       need_lib_prefix=no
10371       export_dynamic_flag_spec='${wl}-Blargedynsym'
10372       runpath_var=LD_RUN_PATH
10373       ;;
10374     siemens)
10375       need_lib_prefix=no
10376       ;;
10377     motorola)
10378       need_lib_prefix=no
10379       need_version=no
10380       shlibpath_overrides_runpath=no
10381       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10382       ;;
10383   esac
10384   ;;
10385
10386 sysv4*MP*)
10387   if test -d /usr/nec ;then
10388     version_type=linux
10389     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
10390     soname_spec='$libname${shared_ext}.$major'
10391     shlibpath_var=LD_LIBRARY_PATH
10392   fi
10393   ;;
10394
10395 uts4*)
10396   version_type=linux
10397   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10398   soname_spec='${libname}${release}${shared_ext}$major'
10399   shlibpath_var=LD_LIBRARY_PATH
10400   ;;
10401
10402 *)
10403   dynamic_linker=no
10404   ;;
10405 esac
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
10407 $as_echo "$dynamic_linker" >&6; }
10408 test "$dynamic_linker" = no && can_build_shared=no
10409
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
10411 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
10412 hardcode_action=
10413 if test -n "$hardcode_libdir_flag_spec" || \
10414    test -n "$runpath_var" || \
10415    test "X$hardcode_automatic" = "Xyes" ; then
10416
10417   # We can hardcode non-existant directories.
10418   if test "$hardcode_direct" != no &&
10419      # If the only mechanism to avoid hardcoding is shlibpath_var, we
10420      # have to relink, otherwise we might link with an installed library
10421      # when we should be linking with a yet-to-be-installed one
10422      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
10423      test "$hardcode_minus_L" != no; then
10424     # Linking always hardcodes the temporary library directory.
10425     hardcode_action=relink
10426   else
10427     # We can link without hardcoding, and we can hardcode nonexisting dirs.
10428     hardcode_action=immediate
10429   fi
10430 else
10431   # We cannot hardcode anything, or else we can only hardcode existing
10432   # directories.
10433   hardcode_action=unsupported
10434 fi
10435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
10436 $as_echo "$hardcode_action" >&6; }
10437
10438 if test "$hardcode_action" = relink; then
10439   # Fast installation is not supported
10440   enable_fast_install=no
10441 elif test "$shlibpath_overrides_runpath" = yes ||
10442      test "$enable_shared" = no; then
10443   # Fast installation is not necessary
10444   enable_fast_install=needless
10445 fi
10446
10447 striplib=
10448 old_striplib=
10449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
10450 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
10451 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
10452   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
10453   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
10454   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10455 $as_echo "yes" >&6; }
10456 else
10457 # FIXME - insert some real tests, host_os isn't really good enough
10458   case $host_os in
10459    darwin*)
10460        if test -n "$STRIP" ; then
10461          striplib="$STRIP -x"
10462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10463 $as_echo "yes" >&6; }
10464        else
10465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10466 $as_echo "no" >&6; }
10467 fi
10468        ;;
10469    *)
10470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10471 $as_echo "no" >&6; }
10472     ;;
10473   esac
10474 fi
10475
10476 if test "x$enable_dlopen" != xyes; then
10477   enable_dlopen=unknown
10478   enable_dlopen_self=unknown
10479   enable_dlopen_self_static=unknown
10480 else
10481   lt_cv_dlopen=no
10482   lt_cv_dlopen_libs=
10483
10484   case $host_os in
10485   beos*)
10486     lt_cv_dlopen="load_add_on"
10487     lt_cv_dlopen_libs=
10488     lt_cv_dlopen_self=yes
10489     ;;
10490
10491   mingw* | pw32*)
10492     lt_cv_dlopen="LoadLibrary"
10493     lt_cv_dlopen_libs=
10494    ;;
10495
10496   cygwin*)
10497     lt_cv_dlopen="dlopen"
10498     lt_cv_dlopen_libs=
10499    ;;
10500
10501   darwin*)
10502   # if libdl is installed we need to link against it
10503     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10504 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10505 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10506   $as_echo_n "(cached) " >&6
10507 else
10508   ac_check_lib_save_LIBS=$LIBS
10509 LIBS="-ldl  $LIBS"
10510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10511 /* end confdefs.h.  */
10512
10513 /* Override any GCC internal prototype to avoid an error.
10514    Use char because int might match the return type of a GCC
10515    builtin and then its argument prototype would still apply.  */
10516 #ifdef __cplusplus
10517 extern "C"
10518 #endif
10519 char dlopen ();
10520 int
10521 main ()
10522 {
10523 return dlopen ();
10524   ;
10525   return 0;
10526 }
10527 _ACEOF
10528 if ac_fn_c_try_link "$LINENO"; then :
10529   ac_cv_lib_dl_dlopen=yes
10530 else
10531   ac_cv_lib_dl_dlopen=no
10532 fi
10533 rm -f core conftest.err conftest.$ac_objext \
10534     conftest$ac_exeext conftest.$ac_ext
10535 LIBS=$ac_check_lib_save_LIBS
10536 fi
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10538 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10539 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10540   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10541 else
10542
10543     lt_cv_dlopen="dyld"
10544     lt_cv_dlopen_libs=
10545     lt_cv_dlopen_self=yes
10546
10547 fi
10548
10549    ;;
10550
10551   *)
10552     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
10553 if test "x$ac_cv_func_shl_load" = x""yes; then :
10554   lt_cv_dlopen="shl_load"
10555 else
10556   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10557 $as_echo_n "checking for shl_load in -ldld... " >&6; }
10558 if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
10559   $as_echo_n "(cached) " >&6
10560 else
10561   ac_check_lib_save_LIBS=$LIBS
10562 LIBS="-ldld  $LIBS"
10563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10564 /* end confdefs.h.  */
10565
10566 /* Override any GCC internal prototype to avoid an error.
10567    Use char because int might match the return type of a GCC
10568    builtin and then its argument prototype would still apply.  */
10569 #ifdef __cplusplus
10570 extern "C"
10571 #endif
10572 char shl_load ();
10573 int
10574 main ()
10575 {
10576 return shl_load ();
10577   ;
10578   return 0;
10579 }
10580 _ACEOF
10581 if ac_fn_c_try_link "$LINENO"; then :
10582   ac_cv_lib_dld_shl_load=yes
10583 else
10584   ac_cv_lib_dld_shl_load=no
10585 fi
10586 rm -f core conftest.err conftest.$ac_objext \
10587     conftest$ac_exeext conftest.$ac_ext
10588 LIBS=$ac_check_lib_save_LIBS
10589 fi
10590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
10591 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
10592 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
10593   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
10594 else
10595   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
10596 if test "x$ac_cv_func_dlopen" = x""yes; then :
10597   lt_cv_dlopen="dlopen"
10598 else
10599   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10600 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10601 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10602   $as_echo_n "(cached) " >&6
10603 else
10604   ac_check_lib_save_LIBS=$LIBS
10605 LIBS="-ldl  $LIBS"
10606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10607 /* end confdefs.h.  */
10608
10609 /* Override any GCC internal prototype to avoid an error.
10610    Use char because int might match the return type of a GCC
10611    builtin and then its argument prototype would still apply.  */
10612 #ifdef __cplusplus
10613 extern "C"
10614 #endif
10615 char dlopen ();
10616 int
10617 main ()
10618 {
10619 return dlopen ();
10620   ;
10621   return 0;
10622 }
10623 _ACEOF
10624 if ac_fn_c_try_link "$LINENO"; then :
10625   ac_cv_lib_dl_dlopen=yes
10626 else
10627   ac_cv_lib_dl_dlopen=no
10628 fi
10629 rm -f core conftest.err conftest.$ac_objext \
10630     conftest$ac_exeext conftest.$ac_ext
10631 LIBS=$ac_check_lib_save_LIBS
10632 fi
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10634 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10635 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10636   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10637 else
10638   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
10639 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
10640 if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
10641   $as_echo_n "(cached) " >&6
10642 else
10643   ac_check_lib_save_LIBS=$LIBS
10644 LIBS="-lsvld  $LIBS"
10645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10646 /* end confdefs.h.  */
10647
10648 /* Override any GCC internal prototype to avoid an error.
10649    Use char because int might match the return type of a GCC
10650    builtin and then its argument prototype would still apply.  */
10651 #ifdef __cplusplus
10652 extern "C"
10653 #endif
10654 char dlopen ();
10655 int
10656 main ()
10657 {
10658 return dlopen ();
10659   ;
10660   return 0;
10661 }
10662 _ACEOF
10663 if ac_fn_c_try_link "$LINENO"; then :
10664   ac_cv_lib_svld_dlopen=yes
10665 else
10666   ac_cv_lib_svld_dlopen=no
10667 fi
10668 rm -f core conftest.err conftest.$ac_objext \
10669     conftest$ac_exeext conftest.$ac_ext
10670 LIBS=$ac_check_lib_save_LIBS
10671 fi
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
10673 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
10674 if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
10675   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10676 else
10677   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
10678 $as_echo_n "checking for dld_link in -ldld... " >&6; }
10679 if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
10680   $as_echo_n "(cached) " >&6
10681 else
10682   ac_check_lib_save_LIBS=$LIBS
10683 LIBS="-ldld  $LIBS"
10684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10685 /* end confdefs.h.  */
10686
10687 /* Override any GCC internal prototype to avoid an error.
10688    Use char because int might match the return type of a GCC
10689    builtin and then its argument prototype would still apply.  */
10690 #ifdef __cplusplus
10691 extern "C"
10692 #endif
10693 char dld_link ();
10694 int
10695 main ()
10696 {
10697 return dld_link ();
10698   ;
10699   return 0;
10700 }
10701 _ACEOF
10702 if ac_fn_c_try_link "$LINENO"; then :
10703   ac_cv_lib_dld_dld_link=yes
10704 else
10705   ac_cv_lib_dld_dld_link=no
10706 fi
10707 rm -f core conftest.err conftest.$ac_objext \
10708     conftest$ac_exeext conftest.$ac_ext
10709 LIBS=$ac_check_lib_save_LIBS
10710 fi
10711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
10712 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
10713 if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
10714   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10715 fi
10716
10717
10718 fi
10719
10720
10721 fi
10722
10723
10724 fi
10725
10726
10727 fi
10728
10729
10730 fi
10731
10732     ;;
10733   esac
10734
10735   if test "x$lt_cv_dlopen" != xno; then
10736     enable_dlopen=yes
10737   else
10738     enable_dlopen=no
10739   fi
10740
10741   case $lt_cv_dlopen in
10742   dlopen)
10743     save_CPPFLAGS="$CPPFLAGS"
10744     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10745
10746     save_LDFLAGS="$LDFLAGS"
10747     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10748
10749     save_LIBS="$LIBS"
10750     LIBS="$lt_cv_dlopen_libs $LIBS"
10751
10752     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
10753 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
10754 if test "${lt_cv_dlopen_self+set}" = set; then :
10755   $as_echo_n "(cached) " >&6
10756 else
10757           if test "$cross_compiling" = yes; then :
10758   lt_cv_dlopen_self=cross
10759 else
10760   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10761   lt_status=$lt_dlunknown
10762   cat > conftest.$ac_ext <<EOF
10763 #line 10763 "configure"
10764 #include "confdefs.h"
10765
10766 #if HAVE_DLFCN_H
10767 #include <dlfcn.h>
10768 #endif
10769
10770 #include <stdio.h>
10771
10772 #ifdef RTLD_GLOBAL
10773 #  define LT_DLGLOBAL           RTLD_GLOBAL
10774 #else
10775 #  ifdef DL_GLOBAL
10776 #    define LT_DLGLOBAL         DL_GLOBAL
10777 #  else
10778 #    define LT_DLGLOBAL         0
10779 #  endif
10780 #endif
10781
10782 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10783    find out it does not work in some platform. */
10784 #ifndef LT_DLLAZY_OR_NOW
10785 #  ifdef RTLD_LAZY
10786 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10787 #  else
10788 #    ifdef DL_LAZY
10789 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10790 #    else
10791 #      ifdef RTLD_NOW
10792 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10793 #      else
10794 #        ifdef DL_NOW
10795 #          define LT_DLLAZY_OR_NOW      DL_NOW
10796 #        else
10797 #          define LT_DLLAZY_OR_NOW      0
10798 #        endif
10799 #      endif
10800 #    endif
10801 #  endif
10802 #endif
10803
10804 #ifdef __cplusplus
10805 extern "C" void exit (int);
10806 #endif
10807
10808 void fnord() { int i=42;}
10809 int main ()
10810 {
10811   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10812   int status = $lt_dlunknown;
10813
10814   if (self)
10815     {
10816       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10817       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10818       /* dlclose (self); */
10819     }
10820
10821     exit (status);
10822 }
10823 EOF
10824   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10825   (eval $ac_link) 2>&5
10826   ac_status=$?
10827   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10828   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10829     (./conftest; exit; ) >&5 2>/dev/null
10830     lt_status=$?
10831     case x$lt_status in
10832       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10833       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10834       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10835     esac
10836   else :
10837     # compilation failed
10838     lt_cv_dlopen_self=no
10839   fi
10840 fi
10841 rm -fr conftest*
10842
10843
10844 fi
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
10846 $as_echo "$lt_cv_dlopen_self" >&6; }
10847
10848     if test "x$lt_cv_dlopen_self" = xyes; then
10849       LDFLAGS="$LDFLAGS $link_static_flag"
10850       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
10851 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
10852 if test "${lt_cv_dlopen_self_static+set}" = set; then :
10853   $as_echo_n "(cached) " >&6
10854 else
10855           if test "$cross_compiling" = yes; then :
10856   lt_cv_dlopen_self_static=cross
10857 else
10858   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10859   lt_status=$lt_dlunknown
10860   cat > conftest.$ac_ext <<EOF
10861 #line 10861 "configure"
10862 #include "confdefs.h"
10863
10864 #if HAVE_DLFCN_H
10865 #include <dlfcn.h>
10866 #endif
10867
10868 #include <stdio.h>
10869
10870 #ifdef RTLD_GLOBAL
10871 #  define LT_DLGLOBAL           RTLD_GLOBAL
10872 #else
10873 #  ifdef DL_GLOBAL
10874 #    define LT_DLGLOBAL         DL_GLOBAL
10875 #  else
10876 #    define LT_DLGLOBAL         0
10877 #  endif
10878 #endif
10879
10880 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10881    find out it does not work in some platform. */
10882 #ifndef LT_DLLAZY_OR_NOW
10883 #  ifdef RTLD_LAZY
10884 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10885 #  else
10886 #    ifdef DL_LAZY
10887 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10888 #    else
10889 #      ifdef RTLD_NOW
10890 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10891 #      else
10892 #        ifdef DL_NOW
10893 #          define LT_DLLAZY_OR_NOW      DL_NOW
10894 #        else
10895 #          define LT_DLLAZY_OR_NOW      0
10896 #        endif
10897 #      endif
10898 #    endif
10899 #  endif
10900 #endif
10901
10902 #ifdef __cplusplus
10903 extern "C" void exit (int);
10904 #endif
10905
10906 void fnord() { int i=42;}
10907 int main ()
10908 {
10909   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10910   int status = $lt_dlunknown;
10911
10912   if (self)
10913     {
10914       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10915       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10916       /* dlclose (self); */
10917     }
10918
10919     exit (status);
10920 }
10921 EOF
10922   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10923   (eval $ac_link) 2>&5
10924   ac_status=$?
10925   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10926   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10927     (./conftest; exit; ) >&5 2>/dev/null
10928     lt_status=$?
10929     case x$lt_status in
10930       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10931       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10932       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
10933     esac
10934   else :
10935     # compilation failed
10936     lt_cv_dlopen_self_static=no
10937   fi
10938 fi
10939 rm -fr conftest*
10940
10941
10942 fi
10943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
10944 $as_echo "$lt_cv_dlopen_self_static" >&6; }
10945     fi
10946
10947     CPPFLAGS="$save_CPPFLAGS"
10948     LDFLAGS="$save_LDFLAGS"
10949     LIBS="$save_LIBS"
10950     ;;
10951   esac
10952
10953   case $lt_cv_dlopen_self in
10954   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10955   *) enable_dlopen_self=unknown ;;
10956   esac
10957
10958   case $lt_cv_dlopen_self_static in
10959   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10960   *) enable_dlopen_self_static=unknown ;;
10961   esac
10962 fi
10963
10964
10965 # Report which librarie types wil actually be built
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
10967 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
10968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
10969 $as_echo "$can_build_shared" >&6; }
10970
10971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
10972 $as_echo_n "checking whether to build shared libraries... " >&6; }
10973 test "$can_build_shared" = "no" && enable_shared=no
10974
10975 # On AIX, shared libraries and static libraries use the same namespace, and
10976 # are all built from PIC.
10977 case $host_os in
10978 aix3*)
10979   test "$enable_shared" = yes && enable_static=no
10980   if test -n "$RANLIB"; then
10981     archive_cmds="$archive_cmds~\$RANLIB \$lib"
10982     postinstall_cmds='$RANLIB $lib'
10983   fi
10984   ;;
10985
10986 aix4* | aix5*)
10987   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10988     test "$enable_shared" = yes && enable_static=no
10989   fi
10990     ;;
10991 esac
10992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
10993 $as_echo "$enable_shared" >&6; }
10994
10995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
10996 $as_echo_n "checking whether to build static libraries... " >&6; }
10997 # Make sure either enable_shared or enable_static is yes.
10998 test "$enable_shared" = yes || enable_static=yes
10999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
11000 $as_echo "$enable_static" >&6; }
11001
11002 # The else clause should only fire when bootstrapping the
11003 # libtool distribution, otherwise you forgot to ship ltmain.sh
11004 # with your package, and you will get complaints that there are
11005 # no rules to generate ltmain.sh.
11006 if test -f "$ltmain"; then
11007   # See if we are running on zsh, and set the options which allow our commands through
11008   # without removal of \ escapes.
11009   if test -n "${ZSH_VERSION+set}" ; then
11010     setopt NO_GLOB_SUBST
11011   fi
11012   # Now quote all the things that may contain metacharacters while being
11013   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11014   # variables and quote the copies for generation of the libtool script.
11015   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11016     SED SHELL STRIP \
11017     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11018     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11019     deplibs_check_method reload_flag reload_cmds need_locks \
11020     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11021     lt_cv_sys_global_symbol_to_c_name_address \
11022     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11023     old_postinstall_cmds old_postuninstall_cmds \
11024     compiler \
11025     CC \
11026     LD \
11027     lt_prog_compiler_wl \
11028     lt_prog_compiler_pic \
11029     lt_prog_compiler_static \
11030     lt_prog_compiler_no_builtin_flag \
11031     export_dynamic_flag_spec \
11032     thread_safe_flag_spec \
11033     whole_archive_flag_spec \
11034     enable_shared_with_static_runtimes \
11035     old_archive_cmds \
11036     old_archive_from_new_cmds \
11037     predep_objects \
11038     postdep_objects \
11039     predeps \
11040     postdeps \
11041     compiler_lib_search_path \
11042     archive_cmds \
11043     archive_expsym_cmds \
11044     postinstall_cmds \
11045     postuninstall_cmds \
11046     old_archive_from_expsyms_cmds \
11047     allow_undefined_flag \
11048     no_undefined_flag \
11049     export_symbols_cmds \
11050     hardcode_libdir_flag_spec \
11051     hardcode_libdir_flag_spec_ld \
11052     hardcode_libdir_separator \
11053     hardcode_automatic \
11054     module_cmds \
11055     module_expsym_cmds \
11056     lt_cv_prog_compiler_c_o \
11057     exclude_expsyms \
11058     include_expsyms; do
11059
11060     case $var in
11061     old_archive_cmds | \
11062     old_archive_from_new_cmds | \
11063     archive_cmds | \
11064     archive_expsym_cmds | \
11065     module_cmds | \
11066     module_expsym_cmds | \
11067     old_archive_from_expsyms_cmds | \
11068     export_symbols_cmds | \
11069     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11070     postinstall_cmds | postuninstall_cmds | \
11071     old_postinstall_cmds | old_postuninstall_cmds | \
11072     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11073       # Double-quote double-evaled strings.
11074       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11075       ;;
11076     *)
11077       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11078       ;;
11079     esac
11080   done
11081
11082   case $lt_echo in
11083   *'\$0 --fallback-echo"')
11084     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11085     ;;
11086   esac
11087
11088 cfgfile="${ofile}T"
11089   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
11090   $rm -f "$cfgfile"
11091   { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
11092 $as_echo "$as_me: creating $ofile" >&6;}
11093
11094   cat <<__EOF__ >> "$cfgfile"
11095 #! $SHELL
11096
11097 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
11098 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
11099 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
11100 #
11101 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
11102 # Free Software Foundation, Inc.
11103 #
11104 # This file is part of GNU Libtool:
11105 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
11106 #
11107 # This program is free software; you can redistribute it and/or modify
11108 # it under the terms of the GNU General Public License as published by
11109 # the Free Software Foundation; either version 2 of the License, or
11110 # (at your option) any later version.
11111 #
11112 # This program is distributed in the hope that it will be useful, but
11113 # WITHOUT ANY WARRANTY; without even the implied warranty of
11114 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11115 # General Public License for more details.
11116 #
11117 # You should have received a copy of the GNU General Public License
11118 # along with this program; if not, write to the Free Software
11119 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
11120 #
11121 # As a special exception to the GNU General Public License, if you
11122 # distribute this file as part of a program that contains a
11123 # configuration script generated by Autoconf, you may include it under
11124 # the same distribution terms that you use for the rest of that program.
11125
11126 # A sed program that does not truncate output.
11127 SED=$lt_SED
11128
11129 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
11130 Xsed="$SED -e 1s/^X//"
11131
11132 # The HP-UX ksh and POSIX shell print the target directory to stdout
11133 # if CDPATH is set.
11134 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11135
11136 # The names of the tagged configurations supported by this script.
11137 available_tags=
11138
11139 # ### BEGIN LIBTOOL CONFIG
11140
11141 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11142
11143 # Shell to use when invoking shell scripts.
11144 SHELL=$lt_SHELL
11145
11146 # Whether or not to build shared libraries.
11147 build_libtool_libs=$enable_shared
11148
11149 # Whether or not to build static libraries.
11150 build_old_libs=$enable_static
11151
11152 # Whether or not to add -lc for building shared libraries.
11153 build_libtool_need_lc=$archive_cmds_need_lc
11154
11155 # Whether or not to disallow shared libs when runtime libs are static
11156 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
11157
11158 # Whether or not to optimize for fast installation.
11159 fast_install=$enable_fast_install
11160
11161 # The host system.
11162 host_alias=$host_alias
11163 host=$host
11164 host_os=$host_os
11165
11166 # The build system.
11167 build_alias=$build_alias
11168 build=$build
11169 build_os=$build_os
11170
11171 # An echo program that does not interpret backslashes.
11172 echo=$lt_echo
11173
11174 # The archiver.
11175 AR=$lt_AR
11176 AR_FLAGS=$lt_AR_FLAGS
11177
11178 # A C compiler.
11179 LTCC=$lt_LTCC
11180
11181 # A language-specific compiler.
11182 CC=$lt_compiler
11183
11184 # Is the compiler the GNU C compiler?
11185 with_gcc=$GCC
11186
11187 # An ERE matcher.
11188 EGREP=$lt_EGREP
11189
11190 # The linker used to build libraries.
11191 LD=$lt_LD
11192
11193 # Whether we need hard or soft links.
11194 LN_S=$lt_LN_S
11195
11196 # A BSD-compatible nm program.
11197 NM=$lt_NM
11198
11199 # A symbol stripping program
11200 STRIP=$lt_STRIP
11201
11202 # Used to examine libraries when file_magic_cmd begins "file"
11203 MAGIC_CMD=$MAGIC_CMD
11204
11205 # Used on cygwin: DLL creation program.
11206 DLLTOOL="$DLLTOOL"
11207
11208 # Used on cygwin: object dumper.
11209 OBJDUMP="$OBJDUMP"
11210
11211 # Used on cygwin: assembler.
11212 AS="$AS"
11213
11214 # The name of the directory that contains temporary libtool files.
11215 objdir=$objdir
11216
11217 # How to create reloadable object files.
11218 reload_flag=$lt_reload_flag
11219 reload_cmds=$lt_reload_cmds
11220
11221 # How to pass a linker flag through the compiler.
11222 wl=$lt_lt_prog_compiler_wl
11223
11224 # Object file suffix (normally "o").
11225 objext="$ac_objext"
11226
11227 # Old archive suffix (normally "a").
11228 libext="$libext"
11229
11230 # Shared library suffix (normally ".so").
11231 shrext_cmds='$shrext_cmds'
11232
11233 # Executable file suffix (normally "").
11234 exeext="$exeext"
11235
11236 # Additional compiler flags for building library objects.
11237 pic_flag=$lt_lt_prog_compiler_pic
11238 pic_mode=$pic_mode
11239
11240 # What is the maximum length of a command?
11241 max_cmd_len=$lt_cv_sys_max_cmd_len
11242
11243 # Does compiler simultaneously support -c and -o options?
11244 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
11245
11246 # Must we lock files when doing compilation?
11247 need_locks=$lt_need_locks
11248
11249 # Do we need the lib prefix for modules?
11250 need_lib_prefix=$need_lib_prefix
11251
11252 # Do we need a version for libraries?
11253 need_version=$need_version
11254
11255 # Whether dlopen is supported.
11256 dlopen_support=$enable_dlopen
11257
11258 # Whether dlopen of programs is supported.
11259 dlopen_self=$enable_dlopen_self
11260
11261 # Whether dlopen of statically linked programs is supported.
11262 dlopen_self_static=$enable_dlopen_self_static
11263
11264 # Compiler flag to prevent dynamic linking.
11265 link_static_flag=$lt_lt_prog_compiler_static
11266
11267 # Compiler flag to turn off builtin functions.
11268 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
11269
11270 # Compiler flag to allow reflexive dlopens.
11271 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
11272
11273 # Compiler flag to generate shared objects directly from archives.
11274 whole_archive_flag_spec=$lt_whole_archive_flag_spec
11275
11276 # Compiler flag to generate thread-safe objects.
11277 thread_safe_flag_spec=$lt_thread_safe_flag_spec
11278
11279 # Library versioning type.
11280 version_type=$version_type
11281
11282 # Format of library name prefix.
11283 libname_spec=$lt_libname_spec
11284
11285 # List of archive names.  First name is the real one, the rest are links.
11286 # The last name is the one that the linker finds with -lNAME.
11287 library_names_spec=$lt_library_names_spec
11288
11289 # The coded name of the library, if different from the real name.
11290 soname_spec=$lt_soname_spec
11291
11292 # Commands used to build and install an old-style archive.
11293 RANLIB=$lt_RANLIB
11294 old_archive_cmds=$lt_old_archive_cmds
11295 old_postinstall_cmds=$lt_old_postinstall_cmds
11296 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11297
11298 # Create an old-style archive from a shared archive.
11299 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
11300
11301 # Create a temporary old-style archive to link instead of a shared archive.
11302 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
11303
11304 # Commands used to build and install a shared archive.
11305 archive_cmds=$lt_archive_cmds
11306 archive_expsym_cmds=$lt_archive_expsym_cmds
11307 postinstall_cmds=$lt_postinstall_cmds
11308 postuninstall_cmds=$lt_postuninstall_cmds
11309
11310 # Commands used to build a loadable module (assumed same as above if empty)
11311 module_cmds=$lt_module_cmds
11312 module_expsym_cmds=$lt_module_expsym_cmds
11313
11314 # Commands to strip libraries.
11315 old_striplib=$lt_old_striplib
11316 striplib=$lt_striplib
11317
11318 # Dependencies to place before the objects being linked to create a
11319 # shared library.
11320 predep_objects=$lt_predep_objects
11321
11322 # Dependencies to place after the objects being linked to create a
11323 # shared library.
11324 postdep_objects=$lt_postdep_objects
11325
11326 # Dependencies to place before the objects being linked to create a
11327 # shared library.
11328 predeps=$lt_predeps
11329
11330 # Dependencies to place after the objects being linked to create a
11331 # shared library.
11332 postdeps=$lt_postdeps
11333
11334 # The library search path used internally by the compiler when linking
11335 # a shared library.
11336 compiler_lib_search_path=$lt_compiler_lib_search_path
11337
11338 # Method to check whether dependent libraries are shared objects.
11339 deplibs_check_method=$lt_deplibs_check_method
11340
11341 # Command to use when deplibs_check_method == file_magic.
11342 file_magic_cmd=$lt_file_magic_cmd
11343
11344 # Flag that allows shared libraries with undefined symbols to be built.
11345 allow_undefined_flag=$lt_allow_undefined_flag
11346
11347 # Flag that forces no undefined symbols.
11348 no_undefined_flag=$lt_no_undefined_flag
11349
11350 # Commands used to finish a libtool library installation in a directory.
11351 finish_cmds=$lt_finish_cmds
11352
11353 # Same as above, but a single script fragment to be evaled but not shown.
11354 finish_eval=$lt_finish_eval
11355
11356 # Take the output of nm and produce a listing of raw symbols and C names.
11357 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11358
11359 # Transform the output of nm in a proper C declaration
11360 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11361
11362 # Transform the output of nm in a C name address pair
11363 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11364
11365 # This is the shared library runtime path variable.
11366 runpath_var=$runpath_var
11367
11368 # This is the shared library path variable.
11369 shlibpath_var=$shlibpath_var
11370
11371 # Is shlibpath searched before the hard-coded library search path?
11372 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11373
11374 # How to hardcode a shared library path into an executable.
11375 hardcode_action=$hardcode_action
11376
11377 # Whether we should hardcode library paths into libraries.
11378 hardcode_into_libs=$hardcode_into_libs
11379
11380 # Flag to hardcode \$libdir into a binary during linking.
11381 # This must work even if \$libdir does not exist.
11382 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
11383
11384 # If ld is used when linking, flag to hardcode \$libdir into
11385 # a binary during linking. This must work even if \$libdir does
11386 # not exist.
11387 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
11388
11389 # Whether we need a single -rpath flag with a separated argument.
11390 hardcode_libdir_separator=$lt_hardcode_libdir_separator
11391
11392 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11393 # resulting binary.
11394 hardcode_direct=$hardcode_direct
11395
11396 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11397 # resulting binary.
11398 hardcode_minus_L=$hardcode_minus_L
11399
11400 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11401 # the resulting binary.
11402 hardcode_shlibpath_var=$hardcode_shlibpath_var
11403
11404 # Set to yes if building a shared library automatically hardcodes DIR into the library
11405 # and all subsequent libraries and executables linked against it.
11406 hardcode_automatic=$hardcode_automatic
11407
11408 # Variables whose values should be saved in libtool wrapper scripts and
11409 # restored at relink time.
11410 variables_saved_for_relink="$variables_saved_for_relink"
11411
11412 # Whether libtool must link a program against all its dependency libraries.
11413 link_all_deplibs=$link_all_deplibs
11414
11415 # Compile-time system search path for libraries
11416 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11417
11418 # Run-time system search path for libraries
11419 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11420
11421 # Fix the shell variable \$srcfile for the compiler.
11422 fix_srcfile_path="$fix_srcfile_path"
11423
11424 # Set to yes if exported symbols are required.
11425 always_export_symbols=$always_export_symbols
11426
11427 # The commands to list exported symbols.
11428 export_symbols_cmds=$lt_export_symbols_cmds
11429
11430 # The commands to extract the exported symbol list from a shared archive.
11431 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11432
11433 # Symbols that should not be listed in the preloaded symbols.
11434 exclude_expsyms=$lt_exclude_expsyms
11435
11436 # Symbols that must always be exported.
11437 include_expsyms=$lt_include_expsyms
11438
11439 # ### END LIBTOOL CONFIG
11440
11441 __EOF__
11442
11443
11444   case $host_os in
11445   aix3*)
11446     cat <<\EOF >> "$cfgfile"
11447
11448 # AIX sometimes has problems with the GCC collect2 program.  For some
11449 # reason, if we set the COLLECT_NAMES environment variable, the problems
11450 # vanish in a puff of smoke.
11451 if test "X${COLLECT_NAMES+set}" != Xset; then
11452   COLLECT_NAMES=
11453   export COLLECT_NAMES
11454 fi
11455 EOF
11456     ;;
11457   esac
11458
11459   # We use sed instead of cat because bash on DJGPP gets confused if
11460   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
11461   # text mode, it properly converts lines to CR/LF.  This bash problem
11462   # is reportedly fixed, but why not run on old versions too?
11463   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
11464
11465   mv -f "$cfgfile" "$ofile" || \
11466     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
11467   chmod +x "$ofile"
11468
11469 else
11470   # If there is no Makefile yet, we rely on a make rule to execute
11471   # `config.status --recheck' to rerun these tests and create the
11472   # libtool script then.
11473   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11474   if test -f "$ltmain_in"; then
11475     test -f Makefile && make "$ltmain"
11476   fi
11477 fi
11478
11479
11480 ac_ext=c
11481 ac_cpp='$CPP $CPPFLAGS'
11482 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11483 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11484 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11485
11486 CC="$lt_save_CC"
11487
11488
11489 # Check whether --with-tags was given.
11490 if test "${with_tags+set}" = set; then :
11491   withval=$with_tags; tagnames="$withval"
11492 fi
11493
11494
11495 if test -f "$ltmain" && test -n "$tagnames"; then
11496   if test ! -f "${ofile}"; then
11497     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist" >&5
11498 $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11499   fi
11500
11501   if test -z "$LTCC"; then
11502     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11503     if test -z "$LTCC"; then
11504       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11505 $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11506     else
11507       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11508 $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11509     fi
11510   fi
11511
11512   # Extract list of available tagged configurations in $ofile.
11513   # Note that this assumes the entire list is on one line.
11514   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11515
11516   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11517   for tagname in $tagnames; do
11518     IFS="$lt_save_ifs"
11519     # Check whether tagname contains only valid characters
11520     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11521     "") ;;
11522     *)  as_fn_error "invalid tag name: $tagname" "$LINENO" 5
11523         ;;
11524     esac
11525
11526     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11527     then
11528       as_fn_error "tag name \"$tagname\" already exists" "$LINENO" 5
11529     fi
11530
11531     # Update the list of available tags.
11532     if test -n "$tagname"; then
11533       echo appending configuration tag \"$tagname\" to $ofile
11534
11535       case $tagname in
11536       CXX)
11537         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11538             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11539             (test "X$CXX" != "Xg++"))) ; then
11540           :
11541         else
11542           tagname=""
11543         fi
11544         ;;
11545
11546       F77)
11547         if test -n "$F77" && test "X$F77" != "Xno"; then
11548           :
11549         else
11550           tagname=""
11551         fi
11552         ;;
11553
11554       GCJ)
11555         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11556           :
11557         else
11558           tagname=""
11559         fi
11560         ;;
11561
11562       RC)
11563
11564
11565 # Source file extension for RC test sources.
11566 ac_ext=rc
11567
11568 # Object file extension for compiled RC test sources.
11569 objext=o
11570 objext_RC=$objext
11571
11572 # Code to be used in simple compile tests
11573 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11574
11575 # Code to be used in simple link tests
11576 lt_simple_link_test_code="$lt_simple_compile_test_code"
11577
11578 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11579
11580 # If no C compiler was specified, use CC.
11581 LTCC=${LTCC-"$CC"}
11582
11583 # Allow CC to be a program name with arguments.
11584 compiler=$CC
11585
11586
11587 # save warnings/boilerplate of simple test code
11588 ac_outfile=conftest.$ac_objext
11589 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11590 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11591 _lt_compiler_boilerplate=`cat conftest.err`
11592 $rm conftest*
11593
11594 ac_outfile=conftest.$ac_objext
11595 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11596 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11597 _lt_linker_boilerplate=`cat conftest.err`
11598 $rm conftest*
11599
11600
11601 # Allow CC to be a program name with arguments.
11602 lt_save_CC="$CC"
11603 CC=${RC-"windres"}
11604 compiler=$CC
11605 compiler_RC=$CC
11606 for cc_temp in $compiler""; do
11607   case $cc_temp in
11608     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11609     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11610     \-*) ;;
11611     *) break;;
11612   esac
11613 done
11614 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11615
11616 lt_cv_prog_compiler_c_o_RC=yes
11617
11618 # The else clause should only fire when bootstrapping the
11619 # libtool distribution, otherwise you forgot to ship ltmain.sh
11620 # with your package, and you will get complaints that there are
11621 # no rules to generate ltmain.sh.
11622 if test -f "$ltmain"; then
11623   # See if we are running on zsh, and set the options which allow our commands through
11624   # without removal of \ escapes.
11625   if test -n "${ZSH_VERSION+set}" ; then
11626     setopt NO_GLOB_SUBST
11627   fi
11628   # Now quote all the things that may contain metacharacters while being
11629   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11630   # variables and quote the copies for generation of the libtool script.
11631   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11632     SED SHELL STRIP \
11633     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11634     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11635     deplibs_check_method reload_flag reload_cmds need_locks \
11636     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11637     lt_cv_sys_global_symbol_to_c_name_address \
11638     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11639     old_postinstall_cmds old_postuninstall_cmds \
11640     compiler_RC \
11641     CC_RC \
11642     LD_RC \
11643     lt_prog_compiler_wl_RC \
11644     lt_prog_compiler_pic_RC \
11645     lt_prog_compiler_static_RC \
11646     lt_prog_compiler_no_builtin_flag_RC \
11647     export_dynamic_flag_spec_RC \
11648     thread_safe_flag_spec_RC \
11649     whole_archive_flag_spec_RC \
11650     enable_shared_with_static_runtimes_RC \
11651     old_archive_cmds_RC \
11652     old_archive_from_new_cmds_RC \
11653     predep_objects_RC \
11654     postdep_objects_RC \
11655     predeps_RC \
11656     postdeps_RC \
11657     compiler_lib_search_path_RC \
11658     archive_cmds_RC \
11659     archive_expsym_cmds_RC \
11660     postinstall_cmds_RC \
11661     postuninstall_cmds_RC \
11662     old_archive_from_expsyms_cmds_RC \
11663     allow_undefined_flag_RC \
11664     no_undefined_flag_RC \
11665     export_symbols_cmds_RC \
11666     hardcode_libdir_flag_spec_RC \
11667     hardcode_libdir_flag_spec_ld_RC \
11668     hardcode_libdir_separator_RC \
11669     hardcode_automatic_RC \
11670     module_cmds_RC \
11671     module_expsym_cmds_RC \
11672     lt_cv_prog_compiler_c_o_RC \
11673     exclude_expsyms_RC \
11674     include_expsyms_RC; do
11675
11676     case $var in
11677     old_archive_cmds_RC | \
11678     old_archive_from_new_cmds_RC | \
11679     archive_cmds_RC | \
11680     archive_expsym_cmds_RC | \
11681     module_cmds_RC | \
11682     module_expsym_cmds_RC | \
11683     old_archive_from_expsyms_cmds_RC | \
11684     export_symbols_cmds_RC | \
11685     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11686     postinstall_cmds | postuninstall_cmds | \
11687     old_postinstall_cmds | old_postuninstall_cmds | \
11688     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11689       # Double-quote double-evaled strings.
11690       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11691       ;;
11692     *)
11693       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11694       ;;
11695     esac
11696   done
11697
11698   case $lt_echo in
11699   *'\$0 --fallback-echo"')
11700     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11701     ;;
11702   esac
11703
11704 cfgfile="$ofile"
11705
11706   cat <<__EOF__ >> "$cfgfile"
11707 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11708
11709 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11710
11711 # Shell to use when invoking shell scripts.
11712 SHELL=$lt_SHELL
11713
11714 # Whether or not to build shared libraries.
11715 build_libtool_libs=$enable_shared
11716
11717 # Whether or not to build static libraries.
11718 build_old_libs=$enable_static
11719
11720 # Whether or not to add -lc for building shared libraries.
11721 build_libtool_need_lc=$archive_cmds_need_lc_RC
11722
11723 # Whether or not to disallow shared libs when runtime libs are static
11724 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11725
11726 # Whether or not to optimize for fast installation.
11727 fast_install=$enable_fast_install
11728
11729 # The host system.
11730 host_alias=$host_alias
11731 host=$host
11732 host_os=$host_os
11733
11734 # The build system.
11735 build_alias=$build_alias
11736 build=$build
11737 build_os=$build_os
11738
11739 # An echo program that does not interpret backslashes.
11740 echo=$lt_echo
11741
11742 # The archiver.
11743 AR=$lt_AR
11744 AR_FLAGS=$lt_AR_FLAGS
11745
11746 # A C compiler.
11747 LTCC=$lt_LTCC
11748
11749 # A language-specific compiler.
11750 CC=$lt_compiler_RC
11751
11752 # Is the compiler the GNU C compiler?
11753 with_gcc=$GCC_RC
11754
11755 # An ERE matcher.
11756 EGREP=$lt_EGREP
11757
11758 # The linker used to build libraries.
11759 LD=$lt_LD_RC
11760
11761 # Whether we need hard or soft links.
11762 LN_S=$lt_LN_S
11763
11764 # A BSD-compatible nm program.
11765 NM=$lt_NM
11766
11767 # A symbol stripping program
11768 STRIP=$lt_STRIP
11769
11770 # Used to examine libraries when file_magic_cmd begins "file"
11771 MAGIC_CMD=$MAGIC_CMD
11772
11773 # Used on cygwin: DLL creation program.
11774 DLLTOOL="$DLLTOOL"
11775
11776 # Used on cygwin: object dumper.
11777 OBJDUMP="$OBJDUMP"
11778
11779 # Used on cygwin: assembler.
11780 AS="$AS"
11781
11782 # The name of the directory that contains temporary libtool files.
11783 objdir=$objdir
11784
11785 # How to create reloadable object files.
11786 reload_flag=$lt_reload_flag
11787 reload_cmds=$lt_reload_cmds
11788
11789 # How to pass a linker flag through the compiler.
11790 wl=$lt_lt_prog_compiler_wl_RC
11791
11792 # Object file suffix (normally "o").
11793 objext="$ac_objext"
11794
11795 # Old archive suffix (normally "a").
11796 libext="$libext"
11797
11798 # Shared library suffix (normally ".so").
11799 shrext_cmds='$shrext_cmds'
11800
11801 # Executable file suffix (normally "").
11802 exeext="$exeext"
11803
11804 # Additional compiler flags for building library objects.
11805 pic_flag=$lt_lt_prog_compiler_pic_RC
11806 pic_mode=$pic_mode
11807
11808 # What is the maximum length of a command?
11809 max_cmd_len=$lt_cv_sys_max_cmd_len
11810
11811 # Does compiler simultaneously support -c and -o options?
11812 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11813
11814 # Must we lock files when doing compilation?
11815 need_locks=$lt_need_locks
11816
11817 # Do we need the lib prefix for modules?
11818 need_lib_prefix=$need_lib_prefix
11819
11820 # Do we need a version for libraries?
11821 need_version=$need_version
11822
11823 # Whether dlopen is supported.
11824 dlopen_support=$enable_dlopen
11825
11826 # Whether dlopen of programs is supported.
11827 dlopen_self=$enable_dlopen_self
11828
11829 # Whether dlopen of statically linked programs is supported.
11830 dlopen_self_static=$enable_dlopen_self_static
11831
11832 # Compiler flag to prevent dynamic linking.
11833 link_static_flag=$lt_lt_prog_compiler_static_RC
11834
11835 # Compiler flag to turn off builtin functions.
11836 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11837
11838 # Compiler flag to allow reflexive dlopens.
11839 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11840
11841 # Compiler flag to generate shared objects directly from archives.
11842 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11843
11844 # Compiler flag to generate thread-safe objects.
11845 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11846
11847 # Library versioning type.
11848 version_type=$version_type
11849
11850 # Format of library name prefix.
11851 libname_spec=$lt_libname_spec
11852
11853 # List of archive names.  First name is the real one, the rest are links.
11854 # The last name is the one that the linker finds with -lNAME.
11855 library_names_spec=$lt_library_names_spec
11856
11857 # The coded name of the library, if different from the real name.
11858 soname_spec=$lt_soname_spec
11859
11860 # Commands used to build and install an old-style archive.
11861 RANLIB=$lt_RANLIB
11862 old_archive_cmds=$lt_old_archive_cmds_RC
11863 old_postinstall_cmds=$lt_old_postinstall_cmds
11864 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11865
11866 # Create an old-style archive from a shared archive.
11867 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11868
11869 # Create a temporary old-style archive to link instead of a shared archive.
11870 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11871
11872 # Commands used to build and install a shared archive.
11873 archive_cmds=$lt_archive_cmds_RC
11874 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11875 postinstall_cmds=$lt_postinstall_cmds
11876 postuninstall_cmds=$lt_postuninstall_cmds
11877
11878 # Commands used to build a loadable module (assumed same as above if empty)
11879 module_cmds=$lt_module_cmds_RC
11880 module_expsym_cmds=$lt_module_expsym_cmds_RC
11881
11882 # Commands to strip libraries.
11883 old_striplib=$lt_old_striplib
11884 striplib=$lt_striplib
11885
11886 # Dependencies to place before the objects being linked to create a
11887 # shared library.
11888 predep_objects=$lt_predep_objects_RC
11889
11890 # Dependencies to place after the objects being linked to create a
11891 # shared library.
11892 postdep_objects=$lt_postdep_objects_RC
11893
11894 # Dependencies to place before the objects being linked to create a
11895 # shared library.
11896 predeps=$lt_predeps_RC
11897
11898 # Dependencies to place after the objects being linked to create a
11899 # shared library.
11900 postdeps=$lt_postdeps_RC
11901
11902 # The library search path used internally by the compiler when linking
11903 # a shared library.
11904 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
11905
11906 # Method to check whether dependent libraries are shared objects.
11907 deplibs_check_method=$lt_deplibs_check_method
11908
11909 # Command to use when deplibs_check_method == file_magic.
11910 file_magic_cmd=$lt_file_magic_cmd
11911
11912 # Flag that allows shared libraries with undefined symbols to be built.
11913 allow_undefined_flag=$lt_allow_undefined_flag_RC
11914
11915 # Flag that forces no undefined symbols.
11916 no_undefined_flag=$lt_no_undefined_flag_RC
11917
11918 # Commands used to finish a libtool library installation in a directory.
11919 finish_cmds=$lt_finish_cmds
11920
11921 # Same as above, but a single script fragment to be evaled but not shown.
11922 finish_eval=$lt_finish_eval
11923
11924 # Take the output of nm and produce a listing of raw symbols and C names.
11925 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11926
11927 # Transform the output of nm in a proper C declaration
11928 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11929
11930 # Transform the output of nm in a C name address pair
11931 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11932
11933 # This is the shared library runtime path variable.
11934 runpath_var=$runpath_var
11935
11936 # This is the shared library path variable.
11937 shlibpath_var=$shlibpath_var
11938
11939 # Is shlibpath searched before the hard-coded library search path?
11940 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11941
11942 # How to hardcode a shared library path into an executable.
11943 hardcode_action=$hardcode_action_RC
11944
11945 # Whether we should hardcode library paths into libraries.
11946 hardcode_into_libs=$hardcode_into_libs
11947
11948 # Flag to hardcode \$libdir into a binary during linking.
11949 # This must work even if \$libdir does not exist.
11950 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
11951
11952 # If ld is used when linking, flag to hardcode \$libdir into
11953 # a binary during linking. This must work even if \$libdir does
11954 # not exist.
11955 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
11956
11957 # Whether we need a single -rpath flag with a separated argument.
11958 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
11959
11960 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11961 # resulting binary.
11962 hardcode_direct=$hardcode_direct_RC
11963
11964 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11965 # resulting binary.
11966 hardcode_minus_L=$hardcode_minus_L_RC
11967
11968 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11969 # the resulting binary.
11970 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
11971
11972 # Set to yes if building a shared library automatically hardcodes DIR into the library
11973 # and all subsequent libraries and executables linked against it.
11974 hardcode_automatic=$hardcode_automatic_RC
11975
11976 # Variables whose values should be saved in libtool wrapper scripts and
11977 # restored at relink time.
11978 variables_saved_for_relink="$variables_saved_for_relink"
11979
11980 # Whether libtool must link a program against all its dependency libraries.
11981 link_all_deplibs=$link_all_deplibs_RC
11982
11983 # Compile-time system search path for libraries
11984 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11985
11986 # Run-time system search path for libraries
11987 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11988
11989 # Fix the shell variable \$srcfile for the compiler.
11990 fix_srcfile_path="$fix_srcfile_path_RC"
11991
11992 # Set to yes if exported symbols are required.
11993 always_export_symbols=$always_export_symbols_RC
11994
11995 # The commands to list exported symbols.
11996 export_symbols_cmds=$lt_export_symbols_cmds_RC
11997
11998 # The commands to extract the exported symbol list from a shared archive.
11999 extract_expsyms_cmds=$lt_extract_expsyms_cmds
12000
12001 # Symbols that should not be listed in the preloaded symbols.
12002 exclude_expsyms=$lt_exclude_expsyms_RC
12003
12004 # Symbols that must always be exported.
12005 include_expsyms=$lt_include_expsyms_RC
12006
12007 # ### END LIBTOOL TAG CONFIG: $tagname
12008
12009 __EOF__
12010
12011
12012 else
12013   # If there is no Makefile yet, we rely on a make rule to execute
12014   # `config.status --recheck' to rerun these tests and create the
12015   # libtool script then.
12016   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
12017   if test -f "$ltmain_in"; then
12018     test -f Makefile && make "$ltmain"
12019   fi
12020 fi
12021
12022
12023 ac_ext=c
12024 ac_cpp='$CPP $CPPFLAGS'
12025 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12026 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12027 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12028
12029 CC="$lt_save_CC"
12030
12031         ;;
12032
12033       *)
12034         as_fn_error "Unsupported tag name: $tagname" "$LINENO" 5
12035         ;;
12036       esac
12037
12038       # Append the new tag name to the list of available tags.
12039       if test -n "$tagname" ; then
12040       available_tags="$available_tags $tagname"
12041     fi
12042     fi
12043   done
12044   IFS="$lt_save_ifs"
12045
12046   # Now substitute the updated list of available tags.
12047   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
12048     mv "${ofile}T" "$ofile"
12049     chmod +x "$ofile"
12050   else
12051     rm -f "${ofile}T"
12052     as_fn_error "unable to update list of available tagged configurations." "$LINENO" 5
12053   fi
12054 fi
12055
12056
12057
12058 # This can be used to rebuild libtool when needed
12059 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
12060
12061 # Always use our own libtool.
12062 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
12063
12064 # Prevent multiple expansion
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075 ol_link_perl=no
12076 if test $ol_enable_perl != no ; then
12077         # Extract the first word of "perl", so it can be a program name with args.
12078 set dummy perl; ac_word=$2
12079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12080 $as_echo_n "checking for $ac_word... " >&6; }
12081 if test "${ac_cv_path_PERLBIN+set}" = set; then :
12082   $as_echo_n "(cached) " >&6
12083 else
12084   case $PERLBIN in
12085   [\\/]* | ?:[\\/]*)
12086   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
12087   ;;
12088   *)
12089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12090 for as_dir in $PATH
12091 do
12092   IFS=$as_save_IFS
12093   test -z "$as_dir" && as_dir=.
12094     for ac_exec_ext in '' $ac_executable_extensions; do
12095   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12096     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
12097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12098     break 2
12099   fi
12100 done
12101   done
12102 IFS=$as_save_IFS
12103
12104   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
12105   ;;
12106 esac
12107 fi
12108 PERLBIN=$ac_cv_path_PERLBIN
12109 if test -n "$PERLBIN"; then
12110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLBIN" >&5
12111 $as_echo "$PERLBIN" >&6; }
12112 else
12113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12114 $as_echo "no" >&6; }
12115 fi
12116
12117
12118
12119         if test "no$PERLBIN" = "no" ; then
12120                 if test $ol_enable_perl = yes ; then
12121                         as_fn_error "could not locate perl" "$LINENO" 5
12122                 fi
12123
12124         else
12125                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
12126                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
12127
12128                 if test x"$ol_enable_perl" = "xyes" ; then
12129                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
12130                 else
12131                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
12132                 fi
12133                                 ol_link_perl=yes
12134         fi
12135 fi
12136
12137 ac_ext=c
12138 ac_cpp='$CPP $CPPFLAGS'
12139 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12140 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12141 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
12143 $as_echo_n "checking how to run the C preprocessor... " >&6; }
12144 # On Suns, sometimes $CPP names a directory.
12145 if test -n "$CPP" && test -d "$CPP"; then
12146   CPP=
12147 fi
12148 if test -z "$CPP"; then
12149   if test "${ac_cv_prog_CPP+set}" = set; then :
12150   $as_echo_n "(cached) " >&6
12151 else
12152       # Double quotes because CPP needs to be expanded
12153     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
12154     do
12155       ac_preproc_ok=false
12156 for ac_c_preproc_warn_flag in '' yes
12157 do
12158   # Use a header file that comes with gcc, so configuring glibc
12159   # with a fresh cross-compiler works.
12160   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12161   # <limits.h> exists even on freestanding compilers.
12162   # On the NeXT, cc -E runs the code through the compiler's parser,
12163   # not just through cpp. "Syntax error" is here to catch this case.
12164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12165 /* end confdefs.h.  */
12166 #ifdef __STDC__
12167 # include <limits.h>
12168 #else
12169 # include <assert.h>
12170 #endif
12171                      Syntax error
12172 _ACEOF
12173 if ac_fn_c_try_cpp "$LINENO"; then :
12174
12175 else
12176   # Broken: fails on valid input.
12177 continue
12178 fi
12179 rm -f conftest.err conftest.$ac_ext
12180
12181   # OK, works on sane cases.  Now check whether nonexistent headers
12182   # can be detected and how.
12183   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12184 /* end confdefs.h.  */
12185 #include <ac_nonexistent.h>
12186 _ACEOF
12187 if ac_fn_c_try_cpp "$LINENO"; then :
12188   # Broken: success on invalid input.
12189 continue
12190 else
12191   # Passes both tests.
12192 ac_preproc_ok=:
12193 break
12194 fi
12195 rm -f conftest.err conftest.$ac_ext
12196
12197 done
12198 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12199 rm -f conftest.err conftest.$ac_ext
12200 if $ac_preproc_ok; then :
12201   break
12202 fi
12203
12204     done
12205     ac_cv_prog_CPP=$CPP
12206
12207 fi
12208   CPP=$ac_cv_prog_CPP
12209 else
12210   ac_cv_prog_CPP=$CPP
12211 fi
12212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
12213 $as_echo "$CPP" >&6; }
12214 ac_preproc_ok=false
12215 for ac_c_preproc_warn_flag in '' yes
12216 do
12217   # Use a header file that comes with gcc, so configuring glibc
12218   # with a fresh cross-compiler works.
12219   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12220   # <limits.h> exists even on freestanding compilers.
12221   # On the NeXT, cc -E runs the code through the compiler's parser,
12222   # not just through cpp. "Syntax error" is here to catch this case.
12223   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12224 /* end confdefs.h.  */
12225 #ifdef __STDC__
12226 # include <limits.h>
12227 #else
12228 # include <assert.h>
12229 #endif
12230                      Syntax error
12231 _ACEOF
12232 if ac_fn_c_try_cpp "$LINENO"; then :
12233
12234 else
12235   # Broken: fails on valid input.
12236 continue
12237 fi
12238 rm -f conftest.err conftest.$ac_ext
12239
12240   # OK, works on sane cases.  Now check whether nonexistent headers
12241   # can be detected and how.
12242   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12243 /* end confdefs.h.  */
12244 #include <ac_nonexistent.h>
12245 _ACEOF
12246 if ac_fn_c_try_cpp "$LINENO"; then :
12247   # Broken: success on invalid input.
12248 continue
12249 else
12250   # Passes both tests.
12251 ac_preproc_ok=:
12252 break
12253 fi
12254 rm -f conftest.err conftest.$ac_ext
12255
12256 done
12257 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12258 rm -f conftest.err conftest.$ac_ext
12259 if $ac_preproc_ok; then :
12260
12261 else
12262   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12263 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12264 as_fn_error "C preprocessor \"$CPP\" fails sanity check
12265 See \`config.log' for more details." "$LINENO" 5; }
12266 fi
12267
12268 ac_ext=c
12269 ac_cpp='$CPP $CPPFLAGS'
12270 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12271 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12272 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12273
12274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using MS Visual C++" >&5
12275 $as_echo_n "checking whether we are using MS Visual C++... " >&6; }
12276 if test "${ol_cv_msvc+set}" = set; then :
12277   $as_echo_n "(cached) " >&6
12278 else
12279   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12280 /* end confdefs.h.  */
12281
12282 #ifndef _MSC_VER
12283 #include <__FOO__/generate_error.h>
12284 #endif
12285
12286 _ACEOF
12287 if ac_fn_c_try_cpp "$LINENO"; then :
12288   ol_cv_msvc=yes
12289 else
12290   ol_cv_msvc=no
12291 fi
12292 rm -f conftest.err conftest.$ac_ext
12293 fi
12294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_msvc" >&5
12295 $as_echo "$ol_cv_msvc" >&6; }
12296
12297 case $host_os in
12298   *mingw32* ) ac_cv_mingw32=yes ;;
12299   *cygwin* ) ac_cv_cygwin=yes ;;
12300   *interix* ) ac_cv_interix=yes ;;
12301 esac
12302
12303
12304
12305
12306 cat >>confdefs.h <<_ACEOF
12307 #define EXEEXT "${EXEEXT}"
12308 _ACEOF
12309
12310
12311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for be_app in -lbe" >&5
12312 $as_echo_n "checking for be_app in -lbe... " >&6; }
12313 if test "${ac_cv_lib_be_be_app+set}" = set; then :
12314   $as_echo_n "(cached) " >&6
12315 else
12316   ac_check_lib_save_LIBS=$LIBS
12317 LIBS="-lbe -lroot -lnet $LIBS"
12318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12319 /* end confdefs.h.  */
12320
12321 /* Override any GCC internal prototype to avoid an error.
12322    Use char because int might match the return type of a GCC
12323    builtin and then its argument prototype would still apply.  */
12324 #ifdef __cplusplus
12325 extern "C"
12326 #endif
12327 char be_app ();
12328 int
12329 main ()
12330 {
12331 return be_app ();
12332   ;
12333   return 0;
12334 }
12335 _ACEOF
12336 if ac_fn_c_try_link "$LINENO"; then :
12337   ac_cv_lib_be_be_app=yes
12338 else
12339   ac_cv_lib_be_be_app=no
12340 fi
12341 rm -f core conftest.err conftest.$ac_objext \
12342     conftest$ac_exeext conftest.$ac_ext
12343 LIBS=$ac_check_lib_save_LIBS
12344 fi
12345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_be_be_app" >&5
12346 $as_echo "$ac_cv_lib_be_be_app" >&6; }
12347 if test "x$ac_cv_lib_be_be_app" = x""yes; then :
12348   LIBS="$LIBS -lbe -lroot -lnet"
12349 else
12350   :
12351 fi
12352
12353
12354 ac_ext=c
12355 ac_cpp='$CPP $CPPFLAGS'
12356 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12357 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12358 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12359 if test -n "$ac_tool_prefix"; then
12360   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
12361 set dummy ${ac_tool_prefix}gcc; ac_word=$2
12362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12363 $as_echo_n "checking for $ac_word... " >&6; }
12364 if test "${ac_cv_prog_CC+set}" = set; then :
12365   $as_echo_n "(cached) " >&6
12366 else
12367   if test -n "$CC"; then
12368   ac_cv_prog_CC="$CC" # Let the user override the test.
12369 else
12370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12371 for as_dir in $PATH
12372 do
12373   IFS=$as_save_IFS
12374   test -z "$as_dir" && as_dir=.
12375     for ac_exec_ext in '' $ac_executable_extensions; do
12376   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12377     ac_cv_prog_CC="${ac_tool_prefix}gcc"
12378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12379     break 2
12380   fi
12381 done
12382   done
12383 IFS=$as_save_IFS
12384
12385 fi
12386 fi
12387 CC=$ac_cv_prog_CC
12388 if test -n "$CC"; then
12389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12390 $as_echo "$CC" >&6; }
12391 else
12392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12393 $as_echo "no" >&6; }
12394 fi
12395
12396
12397 fi
12398 if test -z "$ac_cv_prog_CC"; then
12399   ac_ct_CC=$CC
12400   # Extract the first word of "gcc", so it can be a program name with args.
12401 set dummy gcc; ac_word=$2
12402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12403 $as_echo_n "checking for $ac_word... " >&6; }
12404 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
12405   $as_echo_n "(cached) " >&6
12406 else
12407   if test -n "$ac_ct_CC"; then
12408   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12409 else
12410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12411 for as_dir in $PATH
12412 do
12413   IFS=$as_save_IFS
12414   test -z "$as_dir" && as_dir=.
12415     for ac_exec_ext in '' $ac_executable_extensions; do
12416   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12417     ac_cv_prog_ac_ct_CC="gcc"
12418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12419     break 2
12420   fi
12421 done
12422   done
12423 IFS=$as_save_IFS
12424
12425 fi
12426 fi
12427 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12428 if test -n "$ac_ct_CC"; then
12429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12430 $as_echo "$ac_ct_CC" >&6; }
12431 else
12432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12433 $as_echo "no" >&6; }
12434 fi
12435
12436   if test "x$ac_ct_CC" = x; then
12437     CC=""
12438   else
12439     case $cross_compiling:$ac_tool_warned in
12440 yes:)
12441 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12442 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12443 ac_tool_warned=yes ;;
12444 esac
12445     CC=$ac_ct_CC
12446   fi
12447 else
12448   CC="$ac_cv_prog_CC"
12449 fi
12450
12451 if test -z "$CC"; then
12452           if test -n "$ac_tool_prefix"; then
12453     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12454 set dummy ${ac_tool_prefix}cc; ac_word=$2
12455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12456 $as_echo_n "checking for $ac_word... " >&6; }
12457 if test "${ac_cv_prog_CC+set}" = set; then :
12458   $as_echo_n "(cached) " >&6
12459 else
12460   if test -n "$CC"; then
12461   ac_cv_prog_CC="$CC" # Let the user override the test.
12462 else
12463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12464 for as_dir in $PATH
12465 do
12466   IFS=$as_save_IFS
12467   test -z "$as_dir" && as_dir=.
12468     for ac_exec_ext in '' $ac_executable_extensions; do
12469   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12470     ac_cv_prog_CC="${ac_tool_prefix}cc"
12471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12472     break 2
12473   fi
12474 done
12475   done
12476 IFS=$as_save_IFS
12477
12478 fi
12479 fi
12480 CC=$ac_cv_prog_CC
12481 if test -n "$CC"; then
12482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12483 $as_echo "$CC" >&6; }
12484 else
12485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12486 $as_echo "no" >&6; }
12487 fi
12488
12489
12490   fi
12491 fi
12492 if test -z "$CC"; then
12493   # Extract the first word of "cc", so it can be a program name with args.
12494 set dummy cc; ac_word=$2
12495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12496 $as_echo_n "checking for $ac_word... " >&6; }
12497 if test "${ac_cv_prog_CC+set}" = set; then :
12498   $as_echo_n "(cached) " >&6
12499 else
12500   if test -n "$CC"; then
12501   ac_cv_prog_CC="$CC" # Let the user override the test.
12502 else
12503   ac_prog_rejected=no
12504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12505 for as_dir in $PATH
12506 do
12507   IFS=$as_save_IFS
12508   test -z "$as_dir" && as_dir=.
12509     for ac_exec_ext in '' $ac_executable_extensions; do
12510   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12511     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12512        ac_prog_rejected=yes
12513        continue
12514      fi
12515     ac_cv_prog_CC="cc"
12516     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12517     break 2
12518   fi
12519 done
12520   done
12521 IFS=$as_save_IFS
12522
12523 if test $ac_prog_rejected = yes; then
12524   # We found a bogon in the path, so make sure we never use it.
12525   set dummy $ac_cv_prog_CC
12526   shift
12527   if test $# != 0; then
12528     # We chose a different compiler from the bogus one.
12529     # However, it has the same basename, so the bogon will be chosen
12530     # first if we set CC to just the basename; use the full file name.
12531     shift
12532     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12533   fi
12534 fi
12535 fi
12536 fi
12537 CC=$ac_cv_prog_CC
12538 if test -n "$CC"; then
12539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12540 $as_echo "$CC" >&6; }
12541 else
12542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12543 $as_echo "no" >&6; }
12544 fi
12545
12546
12547 fi
12548 if test -z "$CC"; then
12549   if test -n "$ac_tool_prefix"; then
12550   for ac_prog in cl.exe
12551   do
12552     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12553 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12555 $as_echo_n "checking for $ac_word... " >&6; }
12556 if test "${ac_cv_prog_CC+set}" = set; then :
12557   $as_echo_n "(cached) " >&6
12558 else
12559   if test -n "$CC"; then
12560   ac_cv_prog_CC="$CC" # Let the user override the test.
12561 else
12562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12563 for as_dir in $PATH
12564 do
12565   IFS=$as_save_IFS
12566   test -z "$as_dir" && as_dir=.
12567     for ac_exec_ext in '' $ac_executable_extensions; do
12568   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12569     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12571     break 2
12572   fi
12573 done
12574   done
12575 IFS=$as_save_IFS
12576
12577 fi
12578 fi
12579 CC=$ac_cv_prog_CC
12580 if test -n "$CC"; then
12581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12582 $as_echo "$CC" >&6; }
12583 else
12584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12585 $as_echo "no" >&6; }
12586 fi
12587
12588
12589     test -n "$CC" && break
12590   done
12591 fi
12592 if test -z "$CC"; then
12593   ac_ct_CC=$CC
12594   for ac_prog in cl.exe
12595 do
12596   # Extract the first word of "$ac_prog", so it can be a program name with args.
12597 set dummy $ac_prog; ac_word=$2
12598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12599 $as_echo_n "checking for $ac_word... " >&6; }
12600 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
12601   $as_echo_n "(cached) " >&6
12602 else
12603   if test -n "$ac_ct_CC"; then
12604   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12605 else
12606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12607 for as_dir in $PATH
12608 do
12609   IFS=$as_save_IFS
12610   test -z "$as_dir" && as_dir=.
12611     for ac_exec_ext in '' $ac_executable_extensions; do
12612   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12613     ac_cv_prog_ac_ct_CC="$ac_prog"
12614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12615     break 2
12616   fi
12617 done
12618   done
12619 IFS=$as_save_IFS
12620
12621 fi
12622 fi
12623 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12624 if test -n "$ac_ct_CC"; then
12625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12626 $as_echo "$ac_ct_CC" >&6; }
12627 else
12628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12629 $as_echo "no" >&6; }
12630 fi
12631
12632
12633   test -n "$ac_ct_CC" && break
12634 done
12635
12636   if test "x$ac_ct_CC" = x; then
12637     CC=""
12638   else
12639     case $cross_compiling:$ac_tool_warned in
12640 yes:)
12641 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12642 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12643 ac_tool_warned=yes ;;
12644 esac
12645     CC=$ac_ct_CC
12646   fi
12647 fi
12648
12649 fi
12650
12651
12652 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12653 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12654 as_fn_error "no acceptable C compiler found in \$PATH
12655 See \`config.log' for more details." "$LINENO" 5; }
12656
12657 # Provide some information about the compiler.
12658 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
12659 set X $ac_compile
12660 ac_compiler=$2
12661 for ac_option in --version -v -V -qversion; do
12662   { { ac_try="$ac_compiler $ac_option >&5"
12663 case "(($ac_try" in
12664   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12665   *) ac_try_echo=$ac_try;;
12666 esac
12667 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12668 $as_echo "$ac_try_echo"; } >&5
12669   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
12670   ac_status=$?
12671   if test -s conftest.err; then
12672     sed '10a\
12673 ... rest of stderr output deleted ...
12674          10q' conftest.err >conftest.er1
12675     cat conftest.er1 >&5
12676   fi
12677   rm -f conftest.er1 conftest.err
12678   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12679   test $ac_status = 0; }
12680 done
12681
12682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
12683 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
12684 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
12685   $as_echo_n "(cached) " >&6
12686 else
12687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12688 /* end confdefs.h.  */
12689
12690 int
12691 main ()
12692 {
12693 #ifndef __GNUC__
12694        choke me
12695 #endif
12696
12697   ;
12698   return 0;
12699 }
12700 _ACEOF
12701 if ac_fn_c_try_compile "$LINENO"; then :
12702   ac_compiler_gnu=yes
12703 else
12704   ac_compiler_gnu=no
12705 fi
12706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12707 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12708
12709 fi
12710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
12711 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
12712 if test $ac_compiler_gnu = yes; then
12713   GCC=yes
12714 else
12715   GCC=
12716 fi
12717 ac_test_CFLAGS=${CFLAGS+set}
12718 ac_save_CFLAGS=$CFLAGS
12719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
12720 $as_echo_n "checking whether $CC accepts -g... " >&6; }
12721 if test "${ac_cv_prog_cc_g+set}" = set; then :
12722   $as_echo_n "(cached) " >&6
12723 else
12724   ac_save_c_werror_flag=$ac_c_werror_flag
12725    ac_c_werror_flag=yes
12726    ac_cv_prog_cc_g=no
12727    CFLAGS="-g"
12728    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12729 /* end confdefs.h.  */
12730
12731 int
12732 main ()
12733 {
12734
12735   ;
12736   return 0;
12737 }
12738 _ACEOF
12739 if ac_fn_c_try_compile "$LINENO"; then :
12740   ac_cv_prog_cc_g=yes
12741 else
12742   CFLAGS=""
12743       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12744 /* end confdefs.h.  */
12745
12746 int
12747 main ()
12748 {
12749
12750   ;
12751   return 0;
12752 }
12753 _ACEOF
12754 if ac_fn_c_try_compile "$LINENO"; then :
12755
12756 else
12757   ac_c_werror_flag=$ac_save_c_werror_flag
12758          CFLAGS="-g"
12759          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12760 /* end confdefs.h.  */
12761
12762 int
12763 main ()
12764 {
12765
12766   ;
12767   return 0;
12768 }
12769 _ACEOF
12770 if ac_fn_c_try_compile "$LINENO"; then :
12771   ac_cv_prog_cc_g=yes
12772 fi
12773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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    ac_c_werror_flag=$ac_save_c_werror_flag
12779 fi
12780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
12781 $as_echo "$ac_cv_prog_cc_g" >&6; }
12782 if test "$ac_test_CFLAGS" = set; then
12783   CFLAGS=$ac_save_CFLAGS
12784 elif test $ac_cv_prog_cc_g = yes; then
12785   if test "$GCC" = yes; then
12786     CFLAGS="-g -O2"
12787   else
12788     CFLAGS="-g"
12789   fi
12790 else
12791   if test "$GCC" = yes; then
12792     CFLAGS="-O2"
12793   else
12794     CFLAGS=
12795   fi
12796 fi
12797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
12798 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
12799 if test "${ac_cv_prog_cc_c89+set}" = set; then :
12800   $as_echo_n "(cached) " >&6
12801 else
12802   ac_cv_prog_cc_c89=no
12803 ac_save_CC=$CC
12804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12805 /* end confdefs.h.  */
12806 #include <stdarg.h>
12807 #include <stdio.h>
12808 #include <sys/types.h>
12809 #include <sys/stat.h>
12810 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12811 struct buf { int x; };
12812 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12813 static char *e (p, i)
12814      char **p;
12815      int i;
12816 {
12817   return p[i];
12818 }
12819 static char *f (char * (*g) (char **, int), char **p, ...)
12820 {
12821   char *s;
12822   va_list v;
12823   va_start (v,p);
12824   s = g (p, va_arg (v,int));
12825   va_end (v);
12826   return s;
12827 }
12828
12829 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12830    function prototypes and stuff, but not '\xHH' hex character constants.
12831    These don't provoke an error unfortunately, instead are silently treated
12832    as 'x'.  The following induces an error, until -std is added to get
12833    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12834    array size at least.  It's necessary to write '\x00'==0 to get something
12835    that's true only with -std.  */
12836 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12837
12838 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
12839    inside strings and character constants.  */
12840 #define FOO(x) 'x'
12841 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
12842
12843 int test (int i, double x);
12844 struct s1 {int (*f) (int a);};
12845 struct s2 {int (*f) (double a);};
12846 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12847 int argc;
12848 char **argv;
12849 int
12850 main ()
12851 {
12852 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12853   ;
12854   return 0;
12855 }
12856 _ACEOF
12857 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
12858         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12859 do
12860   CC="$ac_save_CC $ac_arg"
12861   if ac_fn_c_try_compile "$LINENO"; then :
12862   ac_cv_prog_cc_c89=$ac_arg
12863 fi
12864 rm -f core conftest.err conftest.$ac_objext
12865   test "x$ac_cv_prog_cc_c89" != "xno" && break
12866 done
12867 rm -f conftest.$ac_ext
12868 CC=$ac_save_CC
12869
12870 fi
12871 # AC_CACHE_VAL
12872 case "x$ac_cv_prog_cc_c89" in
12873   x)
12874     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12875 $as_echo "none needed" >&6; } ;;
12876   xno)
12877     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12878 $as_echo "unsupported" >&6; } ;;
12879   *)
12880     CC="$CC $ac_cv_prog_cc_c89"
12881     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
12882 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
12883 esac
12884 if test "x$ac_cv_prog_cc_c89" != xno; then :
12885
12886 fi
12887
12888 ac_ext=c
12889 ac_cpp='$CPP $CPPFLAGS'
12890 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12891 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12892 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12893
12894 depcc="$CC"   am_compiler_list=
12895
12896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
12897 $as_echo_n "checking dependency style of $depcc... " >&6; }
12898 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
12899   $as_echo_n "(cached) " >&6
12900 else
12901   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12902   # We make a subdir and do the tests there.  Otherwise we can end up
12903   # making bogus files that we don't know about and never remove.  For
12904   # instance it was reported that on HP-UX the gcc test will end up
12905   # making a dummy file named `D' -- because `-MD' means `put the output
12906   # in D'.
12907   mkdir conftest.dir
12908   # Copy depcomp to subdir because otherwise we won't find it if we're
12909   # using a relative directory.
12910   cp "$am_depcomp" conftest.dir
12911   cd conftest.dir
12912   # We will build objects and dependencies in a subdirectory because
12913   # it helps to detect inapplicable dependency modes.  For instance
12914   # both Tru64's cc and ICC support -MD to output dependencies as a
12915   # side effect of compilation, but ICC will put the dependencies in
12916   # the current directory while Tru64 will put them in the object
12917   # directory.
12918   mkdir sub
12919
12920   am_cv_CC_dependencies_compiler_type=none
12921   if test "$am_compiler_list" = ""; then
12922      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12923   fi
12924   for depmode in $am_compiler_list; do
12925     # Setup a source with many dependencies, because some compilers
12926     # like to wrap large dependency lists on column 80 (with \), and
12927     # we should not choose a depcomp mode which is confused by this.
12928     #
12929     # We need to recreate these files for each test, as the compiler may
12930     # overwrite some of them when testing with obscure command lines.
12931     # This happens at least with the AIX C compiler.
12932     : > sub/conftest.c
12933     for i in 1 2 3 4 5 6; do
12934       echo '#include "conftst'$i'.h"' >> sub/conftest.c
12935       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12936       # Solaris 8's {/usr,}/bin/sh.
12937       touch sub/conftst$i.h
12938     done
12939     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12940
12941     case $depmode in
12942     nosideeffect)
12943       # after this tag, mechanisms are not by side-effect, so they'll
12944       # only be used when explicitly requested
12945       if test "x$enable_dependency_tracking" = xyes; then
12946         continue
12947       else
12948         break
12949       fi
12950       ;;
12951     none) break ;;
12952     esac
12953     # We check with `-c' and `-o' for the sake of the "dashmstdout"
12954     # mode.  It turns out that the SunPro C++ compiler does not properly
12955     # handle `-M -o', and we need to detect this.
12956     if depmode=$depmode \
12957        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
12958        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12959        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
12960          >/dev/null 2>conftest.err &&
12961        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12962        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
12963        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12964       # icc doesn't choke on unknown options, it will just issue warnings
12965       # or remarks (even with -Werror).  So we grep stderr for any message
12966       # that says an option was ignored or not supported.
12967       # When given -MP, icc 7.0 and 7.1 complain thusly:
12968       #   icc: Command line warning: ignoring option '-M'; no argument required
12969       # The diagnosis changed in icc 8.0:
12970       #   icc: Command line remark: option '-MP' not supported
12971       if (grep 'ignoring option' conftest.err ||
12972           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12973         am_cv_CC_dependencies_compiler_type=$depmode
12974         break
12975       fi
12976     fi
12977   done
12978
12979   cd ..
12980   rm -rf conftest.dir
12981 else
12982   am_cv_CC_dependencies_compiler_type=none
12983 fi
12984
12985 fi
12986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
12987 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
12988 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12989
12990
12991
12992 if
12993   test "x$enable_dependency_tracking" != xno \
12994   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
12995   am__fastdepCC_TRUE=
12996   am__fastdepCC_FALSE='#'
12997 else
12998   am__fastdepCC_TRUE='#'
12999   am__fastdepCC_FALSE=
13000 fi
13001
13002
13003 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
13004         as_fn_error "OpenLDAP requires compiler to support STDC constructs." "$LINENO" 5
13005 fi
13006
13007 # test for make depend flag
13008 OL_MKDEP=
13009 OL_MKDEP_FLAGS=
13010 if test -z "${MKDEP}"; then
13011         OL_MKDEP="${CC-cc}"
13012         if test -z "${MKDEP_FLAGS}"; then
13013                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${OL_MKDEP} depend flag" >&5
13014 $as_echo_n "checking for ${OL_MKDEP} depend flag... " >&6; }
13015 if test "${ol_cv_mkdep+set}" = set; then :
13016   $as_echo_n "(cached) " >&6
13017 else
13018
13019                         ol_cv_mkdep=no
13020                         for flag in "-M" "-xM"; do
13021                                 cat > conftest.c <<EOF
13022  noCode;
13023 EOF
13024                                 if { ac_try='$OL_MKDEP $flag conftest.c'
13025   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
13026   (eval $ac_try) 2>&5
13027   ac_status=$?
13028   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13029   test $ac_status = 0; }; } \
13030                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
13031                                 then
13032                                         if test ! -f conftest."${ac_object}" ; then
13033                                                 ol_cv_mkdep=$flag
13034                                                 OL_MKDEP_FLAGS="$flag"
13035                                                 break
13036                                         fi
13037                                 fi
13038                         done
13039                         rm -f conftest*
13040
13041 fi
13042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_mkdep" >&5
13043 $as_echo "$ol_cv_mkdep" >&6; }
13044                 test "$ol_cv_mkdep" = no && OL_MKDEP=":"
13045         else
13046                 cc_cv_mkdep=yes
13047                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13048         fi
13049 else
13050         cc_cv_mkdep=yes
13051         OL_MKDEP="${MKDEP}"
13052         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13053 fi
13054
13055
13056
13057 if test "${ol_cv_mkdep}" = no ; then
13058         # this will soon become an error
13059         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: do not know how to generate dependencies" >&5
13060 $as_echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
13061 fi
13062
13063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for afopen in -ls" >&5
13064 $as_echo_n "checking for afopen in -ls... " >&6; }
13065 if test "${ac_cv_lib_s_afopen+set}" = set; then :
13066   $as_echo_n "(cached) " >&6
13067 else
13068   ac_check_lib_save_LIBS=$LIBS
13069 LIBS="-ls  $LIBS"
13070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13071 /* end confdefs.h.  */
13072
13073 /* Override any GCC internal prototype to avoid an error.
13074    Use char because int might match the return type of a GCC
13075    builtin and then its argument prototype would still apply.  */
13076 #ifdef __cplusplus
13077 extern "C"
13078 #endif
13079 char afopen ();
13080 int
13081 main ()
13082 {
13083 return afopen ();
13084   ;
13085   return 0;
13086 }
13087 _ACEOF
13088 if ac_fn_c_try_link "$LINENO"; then :
13089   ac_cv_lib_s_afopen=yes
13090 else
13091   ac_cv_lib_s_afopen=no
13092 fi
13093 rm -f core conftest.err conftest.$ac_objext \
13094     conftest$ac_exeext conftest.$ac_ext
13095 LIBS=$ac_check_lib_save_LIBS
13096 fi
13097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_afopen" >&5
13098 $as_echo "$ac_cv_lib_s_afopen" >&6; }
13099 if test "x$ac_cv_lib_s_afopen" = x""yes; then :
13100
13101         AUTH_LIBS=-ls
13102
13103 $as_echo "#define HAVE_AIX_SECURITY 1" >>confdefs.h
13104
13105
13106 fi
13107
13108
13109 case "$target" in
13110 *-ibm-openedition)
13111         ac_cv_func_getopt=no
13112
13113 $as_echo "#define BOTH_STRINGS_H 1" >>confdefs.h
13114
13115         ;;
13116 esac
13117
13118 ol_link_modules=no
13119 WITH_MODULES_ENABLED=no
13120 if test $ol_enable_modules != no ; then
13121         for ac_header in ltdl.h
13122 do :
13123   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
13124 if test "x$ac_cv_header_ltdl_h" = x""yes; then :
13125   cat >>confdefs.h <<_ACEOF
13126 #define HAVE_LTDL_H 1
13127 _ACEOF
13128
13129 fi
13130
13131 done
13132
13133
13134         if test $ac_cv_header_ltdl_h = no ; then
13135                 as_fn_error "could not locate libtool ltdl.h" "$LINENO" 5
13136         fi
13137
13138         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
13139 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
13140 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
13141   $as_echo_n "(cached) " >&6
13142 else
13143   ac_check_lib_save_LIBS=$LIBS
13144 LIBS="-lltdl  $LIBS"
13145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13146 /* end confdefs.h.  */
13147
13148 /* Override any GCC internal prototype to avoid an error.
13149    Use char because int might match the return type of a GCC
13150    builtin and then its argument prototype would still apply.  */
13151 #ifdef __cplusplus
13152 extern "C"
13153 #endif
13154 char lt_dlinit ();
13155 int
13156 main ()
13157 {
13158 return lt_dlinit ();
13159   ;
13160   return 0;
13161 }
13162 _ACEOF
13163 if ac_fn_c_try_link "$LINENO"; then :
13164   ac_cv_lib_ltdl_lt_dlinit=yes
13165 else
13166   ac_cv_lib_ltdl_lt_dlinit=no
13167 fi
13168 rm -f core conftest.err conftest.$ac_objext \
13169     conftest$ac_exeext conftest.$ac_ext
13170 LIBS=$ac_check_lib_save_LIBS
13171 fi
13172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13173 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
13174 if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
13175
13176                 MODULES_LIBS=-lltdl
13177
13178 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
13179
13180
13181 fi
13182
13183
13184         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13185                 as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
13186         fi
13187         ol_link_modules=yes
13188         WITH_MODULES_ENABLED=yes
13189
13190 else
13191         for i in $Backends; do
13192                 eval "ol_tmp=\$ol_enable_$i"
13193                 if test $ol_tmp = mod ; then
13194                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i backend" >&5
13195 $as_echo "$as_me: WARNING: building static $i backend" >&2;}
13196                         eval "ol_enable_$i=yes"
13197                 fi
13198         done
13199         for i in $Overlays; do
13200                 eval "ol_tmp=\$ol_enable_$i"
13201                 if test $ol_tmp = mod ; then
13202                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i overlay" >&5
13203 $as_echo "$as_me: WARNING: building static $i overlay" >&2;}
13204                         eval "ol_enable_$i=yes"
13205                 fi
13206         done
13207 fi
13208
13209 # test for EBCDIC
13210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EBCDIC" >&5
13211 $as_echo_n "checking for EBCDIC... " >&6; }
13212 if test "${ol_cv_cpp_ebcdic+set}" = set; then :
13213   $as_echo_n "(cached) " >&6
13214 else
13215
13216         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13217 /* end confdefs.h.  */
13218
13219 #if !('M' == 0xd4)
13220 #include <__ASCII__/generate_error.h>
13221 #endif
13222
13223 _ACEOF
13224 if ac_fn_c_try_cpp "$LINENO"; then :
13225   ol_cv_cpp_ebcdic=yes
13226 else
13227   ol_cv_cpp_ebcdic=no
13228 fi
13229 rm -f conftest.err conftest.$ac_ext
13230 fi
13231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cpp_ebcdic" >&5
13232 $as_echo "$ol_cv_cpp_ebcdic" >&6; }
13233 if test $ol_cv_cpp_ebcdic = yes ; then
13234
13235 $as_echo "#define HAVE_EBCDIC 1" >>confdefs.h
13236
13237 fi
13238
13239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13240 $as_echo_n "checking for ANSI C header files... " >&6; }
13241 if test "${ol_cv_header_stdc+set}" = set; then :
13242   $as_echo_n "(cached) " >&6
13243 else
13244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13245 /* end confdefs.h.  */
13246 #include <stdlib.h>
13247 #include <stdarg.h>
13248 #include <string.h>
13249 #include <float.h>
13250 _ACEOF
13251 if ac_fn_c_try_cpp "$LINENO"; then :
13252   ol_cv_header_stdc=yes
13253 else
13254   ol_cv_header_stdc=no
13255 fi
13256 rm -f conftest.err conftest.$ac_ext
13257
13258 if test $ol_cv_header_stdc = yes; then
13259   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13261 /* end confdefs.h.  */
13262 #include <string.h>
13263
13264 _ACEOF
13265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13266   $EGREP "memchr" >/dev/null 2>&1; then :
13267
13268 else
13269   ol_cv_header_stdc=no
13270 fi
13271 rm -f conftest*
13272
13273 fi
13274
13275 if test $ol_cv_header_stdc = yes; then
13276   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13278 /* end confdefs.h.  */
13279 #include <stdlib.h>
13280
13281 _ACEOF
13282 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13283   $EGREP "free" >/dev/null 2>&1; then :
13284
13285 else
13286   ol_cv_header_stdc=no
13287 fi
13288 rm -f conftest*
13289
13290 fi
13291
13292 if test $ol_cv_header_stdc = yes; then
13293   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13294 if test "$cross_compiling" = yes; then :
13295   :
13296 else
13297   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13298 /* end confdefs.h.  */
13299 #include <ctype.h>
13300 #ifndef HAVE_EBCDIC
13301 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13302 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13303 #else
13304 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13305                 || ('j' <= (c) && (c) <= 'r') \
13306                 || ('s' <= (c) && (c) <= 'z'))
13307 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13308 #endif
13309 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13310 int main () { int i; for (i = 0; i < 256; i++)
13311 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13312 exit (0); }
13313
13314 _ACEOF
13315 if ac_fn_c_try_run "$LINENO"; then :
13316
13317 else
13318   ol_cv_header_stdc=no
13319 fi
13320 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13321   conftest.$ac_objext conftest.beam conftest.$ac_ext
13322 fi
13323
13324 fi
13325 fi
13326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_stdc" >&5
13327 $as_echo "$ol_cv_header_stdc" >&6; }
13328 if test $ol_cv_header_stdc = yes; then
13329   $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13330
13331 fi
13332 ac_cv_header_stdc=disable
13333
13334
13335 if test $ol_cv_header_stdc != yes; then
13336         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate Standard C compliant headers" >&5
13337 $as_echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13338 fi
13339
13340 ac_header_dirent=no
13341 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13342   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
13344 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
13345 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
13346   $as_echo_n "(cached) " >&6
13347 else
13348   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13349 /* end confdefs.h.  */
13350 #include <sys/types.h>
13351 #include <$ac_hdr>
13352
13353 int
13354 main ()
13355 {
13356 if ((DIR *) 0)
13357 return 0;
13358   ;
13359   return 0;
13360 }
13361 _ACEOF
13362 if ac_fn_c_try_compile "$LINENO"; then :
13363   eval "$as_ac_Header=yes"
13364 else
13365   eval "$as_ac_Header=no"
13366 fi
13367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13368 fi
13369 eval ac_res=\$$as_ac_Header
13370                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13371 $as_echo "$ac_res" >&6; }
13372 eval as_val=\$$as_ac_Header
13373    if test "x$as_val" = x""yes; then :
13374   cat >>confdefs.h <<_ACEOF
13375 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13376 _ACEOF
13377
13378 ac_header_dirent=$ac_hdr; break
13379 fi
13380
13381 done
13382 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13383 if test $ac_header_dirent = dirent.h; then
13384   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13385 $as_echo_n "checking for library containing opendir... " >&6; }
13386 if test "${ac_cv_search_opendir+set}" = set; then :
13387   $as_echo_n "(cached) " >&6
13388 else
13389   ac_func_search_save_LIBS=$LIBS
13390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13391 /* end confdefs.h.  */
13392
13393 /* Override any GCC internal prototype to avoid an error.
13394    Use char because int might match the return type of a GCC
13395    builtin and then its argument prototype would still apply.  */
13396 #ifdef __cplusplus
13397 extern "C"
13398 #endif
13399 char opendir ();
13400 int
13401 main ()
13402 {
13403 return opendir ();
13404   ;
13405   return 0;
13406 }
13407 _ACEOF
13408 for ac_lib in '' dir; do
13409   if test -z "$ac_lib"; then
13410     ac_res="none required"
13411   else
13412     ac_res=-l$ac_lib
13413     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13414   fi
13415   if ac_fn_c_try_link "$LINENO"; then :
13416   ac_cv_search_opendir=$ac_res
13417 fi
13418 rm -f core conftest.err conftest.$ac_objext \
13419     conftest$ac_exeext
13420   if test "${ac_cv_search_opendir+set}" = set; then :
13421   break
13422 fi
13423 done
13424 if test "${ac_cv_search_opendir+set}" = set; then :
13425
13426 else
13427   ac_cv_search_opendir=no
13428 fi
13429 rm conftest.$ac_ext
13430 LIBS=$ac_func_search_save_LIBS
13431 fi
13432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13433 $as_echo "$ac_cv_search_opendir" >&6; }
13434 ac_res=$ac_cv_search_opendir
13435 if test "$ac_res" != no; then :
13436   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13437
13438 fi
13439
13440 else
13441   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13442 $as_echo_n "checking for library containing opendir... " >&6; }
13443 if test "${ac_cv_search_opendir+set}" = set; then :
13444   $as_echo_n "(cached) " >&6
13445 else
13446   ac_func_search_save_LIBS=$LIBS
13447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13448 /* end confdefs.h.  */
13449
13450 /* Override any GCC internal prototype to avoid an error.
13451    Use char because int might match the return type of a GCC
13452    builtin and then its argument prototype would still apply.  */
13453 #ifdef __cplusplus
13454 extern "C"
13455 #endif
13456 char opendir ();
13457 int
13458 main ()
13459 {
13460 return opendir ();
13461   ;
13462   return 0;
13463 }
13464 _ACEOF
13465 for ac_lib in '' x; do
13466   if test -z "$ac_lib"; then
13467     ac_res="none required"
13468   else
13469     ac_res=-l$ac_lib
13470     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13471   fi
13472   if ac_fn_c_try_link "$LINENO"; then :
13473   ac_cv_search_opendir=$ac_res
13474 fi
13475 rm -f core conftest.err conftest.$ac_objext \
13476     conftest$ac_exeext
13477   if test "${ac_cv_search_opendir+set}" = set; then :
13478   break
13479 fi
13480 done
13481 if test "${ac_cv_search_opendir+set}" = set; then :
13482
13483 else
13484   ac_cv_search_opendir=no
13485 fi
13486 rm conftest.$ac_ext
13487 LIBS=$ac_func_search_save_LIBS
13488 fi
13489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13490 $as_echo "$ac_cv_search_opendir" >&6; }
13491 ac_res=$ac_cv_search_opendir
13492 if test "$ac_res" != no; then :
13493   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13494
13495 fi
13496
13497 fi
13498
13499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
13500 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
13501 if test "${ac_cv_header_sys_wait_h+set}" = set; then :
13502   $as_echo_n "(cached) " >&6
13503 else
13504   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13505 /* end confdefs.h.  */
13506 #include <sys/types.h>
13507 #include <sys/wait.h>
13508 #ifndef WEXITSTATUS
13509 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
13510 #endif
13511 #ifndef WIFEXITED
13512 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13513 #endif
13514
13515 int
13516 main ()
13517 {
13518   int s;
13519   wait (&s);
13520   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13521   ;
13522   return 0;
13523 }
13524 _ACEOF
13525 if ac_fn_c_try_compile "$LINENO"; then :
13526   ac_cv_header_sys_wait_h=yes
13527 else
13528   ac_cv_header_sys_wait_h=no
13529 fi
13530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13531 fi
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
13533 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
13534 if test $ac_cv_header_sys_wait_h = yes; then
13535
13536 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
13537
13538 fi
13539
13540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
13541 $as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
13542 if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then :
13543   $as_echo_n "(cached) " >&6
13544 else
13545   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13546 /* end confdefs.h.  */
13547 #include <sys/types.h>
13548 #include <termios.h>
13549 #ifdef TIOCGWINSZ
13550   yes
13551 #endif
13552
13553 _ACEOF
13554 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13555   $EGREP "yes" >/dev/null 2>&1; then :
13556   ac_cv_sys_tiocgwinsz_in_termios_h=yes
13557 else
13558   ac_cv_sys_tiocgwinsz_in_termios_h=no
13559 fi
13560 rm -f conftest*
13561
13562 fi
13563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13564 $as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
13565
13566 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13567   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13568 $as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
13569 if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then :
13570   $as_echo_n "(cached) " >&6
13571 else
13572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13573 /* end confdefs.h.  */
13574 #include <sys/types.h>
13575 #include <sys/ioctl.h>
13576 #ifdef TIOCGWINSZ
13577   yes
13578 #endif
13579
13580 _ACEOF
13581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13582   $EGREP "yes" >/dev/null 2>&1; then :
13583   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13584 else
13585   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13586 fi
13587 rm -f conftest*
13588
13589 fi
13590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13591 $as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
13592
13593   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13594
13595 $as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
13596
13597   fi
13598 fi
13599
13600
13601 for ac_header in \
13602         arpa/inet.h             \
13603         arpa/nameser.h  \
13604         assert.h                \
13605         bits/types.h    \
13606         conio.h                 \
13607         crypt.h                 \
13608         direct.h                \
13609         errno.h                 \
13610         fcntl.h                 \
13611         filio.h                 \
13612         getopt.h                \
13613         grp.h                   \
13614         io.h                    \
13615         libutil.h               \
13616         limits.h                \
13617         locale.h                \
13618         malloc.h                \
13619         memory.h                \
13620         psap.h                  \
13621         pwd.h                   \
13622         process.h               \
13623         sgtty.h                 \
13624         shadow.h                \
13625         stddef.h                \
13626         string.h                \
13627         strings.h               \
13628         sysexits.h              \
13629         sys/file.h              \
13630         sys/filio.h             \
13631         sys/fstyp.h             \
13632         sys/errno.h             \
13633         sys/ioctl.h             \
13634         sys/param.h             \
13635         sys/privgrp.h   \
13636         sys/resource.h  \
13637         sys/select.h    \
13638         sys/socket.h    \
13639         sys/stat.h              \
13640         sys/syslog.h    \
13641         sys/time.h              \
13642         sys/types.h             \
13643         sys/uio.h               \
13644         sys/vmount.h    \
13645         syslog.h                \
13646         termios.h               \
13647         unistd.h                \
13648         utime.h                 \
13649
13650 do :
13651   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13652 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13653 eval as_val=\$$as_ac_Header
13654    if test "x$as_val" = x""yes; then :
13655   cat >>confdefs.h <<_ACEOF
13656 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13657 _ACEOF
13658
13659 fi
13660
13661 done
13662
13663
13664 if test "$ac_cv_mingw32" = yes \
13665         -o "$ac_cv_interix" = yes \
13666         -o "$ol_cv_msvc" = yes
13667 then
13668         for ac_header in winsock.h winsock2.h
13669 do :
13670   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13671 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13672 eval as_val=\$$as_ac_Header
13673    if test "x$as_val" = x""yes; then :
13674   cat >>confdefs.h <<_ACEOF
13675 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13676 _ACEOF
13677
13678 fi
13679
13680 done
13681
13682 fi
13683
13684 for ac_header in resolv.h
13685 do :
13686   ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default
13687 #include <netinet/in.h>
13688
13689 "
13690 if test "x$ac_cv_header_resolv_h" = x""yes; then :
13691   cat >>confdefs.h <<_ACEOF
13692 #define HAVE_RESOLV_H 1
13693 _ACEOF
13694
13695 fi
13696
13697 done
13698
13699
13700 for ac_header in netinet/tcp.h
13701 do :
13702   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13703 #include <netinet/in.h>
13704
13705 "
13706 if test "x$ac_cv_header_netinet_tcp_h" = x""yes; then :
13707   cat >>confdefs.h <<_ACEOF
13708 #define HAVE_NETINET_TCP_H 1
13709 _ACEOF
13710
13711 fi
13712
13713 done
13714
13715
13716 for ac_header in sys/ucred.h
13717 do :
13718   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13719 #ifdef HAVE_SYS_PARAM_H
13720 #include <sys/param.h>
13721 #endif
13722
13723 "
13724 if test "x$ac_cv_header_sys_ucred_h" = x""yes; then :
13725   cat >>confdefs.h <<_ACEOF
13726 #define HAVE_SYS_UCRED_H 1
13727 _ACEOF
13728
13729 fi
13730
13731 done
13732
13733
13734
13735 for ac_func in sigaction sigset
13736 do :
13737   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13738 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13739 eval as_val=\$$as_ac_var
13740    if test "x$as_val" = x""yes; then :
13741   cat >>confdefs.h <<_ACEOF
13742 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13743 _ACEOF
13744
13745 fi
13746 done
13747
13748
13749 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
13750         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset in -lV3" >&5
13751 $as_echo_n "checking for sigset in -lV3... " >&6; }
13752 if test "${ac_cv_lib_V3_sigset+set}" = set; then :
13753   $as_echo_n "(cached) " >&6
13754 else
13755   ac_check_lib_save_LIBS=$LIBS
13756 LIBS="-lV3  $LIBS"
13757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13758 /* end confdefs.h.  */
13759
13760 /* Override any GCC internal prototype to avoid an error.
13761    Use char because int might match the return type of a GCC
13762    builtin and then its argument prototype would still apply.  */
13763 #ifdef __cplusplus
13764 extern "C"
13765 #endif
13766 char sigset ();
13767 int
13768 main ()
13769 {
13770 return sigset ();
13771   ;
13772   return 0;
13773 }
13774 _ACEOF
13775 if ac_fn_c_try_link "$LINENO"; then :
13776   ac_cv_lib_V3_sigset=yes
13777 else
13778   ac_cv_lib_V3_sigset=no
13779 fi
13780 rm -f core conftest.err conftest.$ac_objext \
13781     conftest$ac_exeext conftest.$ac_ext
13782 LIBS=$ac_check_lib_save_LIBS
13783 fi
13784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_V3_sigset" >&5
13785 $as_echo "$ac_cv_lib_V3_sigset" >&6; }
13786 if test "x$ac_cv_lib_V3_sigset" = x""yes; then :
13787   cat >>confdefs.h <<_ACEOF
13788 #define HAVE_LIBV3 1
13789 _ACEOF
13790
13791   LIBS="-lV3 $LIBS"
13792
13793 fi
13794
13795 fi
13796
13797 if test $ol_cv_msvc = yes ; then
13798    ol_cv_winsock=yes
13799 fi
13800
13801 if test "$ac_cv_header_winsock_h" = yes; then
13802         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock" >&5
13803 $as_echo_n "checking for winsock... " >&6; }
13804 if test "${ol_cv_winsock+set}" = set; then :
13805   $as_echo_n "(cached) " >&6
13806 else
13807
13808         save_LIBS="$LIBS"
13809         for curlib in none ws2_32 wsock32; do
13810                 if test $curlib != none ; then
13811                 LIBS="$save_LIBS -l$curlib"
13812                 fi
13813                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13814 /* end confdefs.h.  */
13815 #include <winsock.h>
13816
13817 int
13818 main ()
13819 {
13820
13821                         socket(0,0,0);
13822                         select(0,NULL,NULL,NULL,NULL);
13823                         closesocket(0);
13824                         gethostname(NULL,0);
13825
13826   ;
13827   return 0;
13828 }
13829 _ACEOF
13830 if ac_fn_c_try_link "$LINENO"; then :
13831   ol_cv_winsock=$curlib
13832 else
13833   ol_cv_winsock=no
13834 fi
13835 rm -f core conftest.err conftest.$ac_objext \
13836     conftest$ac_exeext conftest.$ac_ext
13837
13838                 test "$ol_cv_winsock" != no && break
13839         done
13840         LIBS="$save_LIBS"
13841
13842 fi
13843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_winsock" >&5
13844 $as_echo "$ol_cv_winsock" >&6; }
13845
13846         if test $ol_cv_winsock != no ; then
13847
13848 $as_echo "#define HAVE_WINSOCK 1" >>confdefs.h
13849
13850         ac_cv_func_socket=yes
13851         ac_cv_func_select=yes
13852         ac_cv_func_closesocket=yes
13853         ac_cv_func_gethostname=yes
13854
13855                 if test $ol_cv_winsock != none -a $ol_cv_winsock != yes ; then
13856                 LIBS="$LIBS -l$ol_cv_winsock"
13857                 fi
13858
13859         if test $ol_cv_winsock = ws2_32 -o $ol_cv_winsock = yes ; then
13860
13861 $as_echo "#define HAVE_WINSOCK2 1" >>confdefs.h
13862
13863         fi
13864         fi
13865 fi
13866
13867
13868 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13869 if test "x$ac_cv_func_socket" = x""yes; then :
13870   :
13871 else
13872
13873         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
13874 $as_echo_n "checking for main in -lsocket... " >&6; }
13875 if test "${ac_cv_lib_socket_main+set}" = set; then :
13876   $as_echo_n "(cached) " >&6
13877 else
13878   ac_check_lib_save_LIBS=$LIBS
13879 LIBS="-lsocket  $LIBS"
13880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13881 /* end confdefs.h.  */
13882
13883
13884 int
13885 main ()
13886 {
13887 return main ();
13888   ;
13889   return 0;
13890 }
13891 _ACEOF
13892 if ac_fn_c_try_link "$LINENO"; then :
13893   ac_cv_lib_socket_main=yes
13894 else
13895   ac_cv_lib_socket_main=no
13896 fi
13897 rm -f core conftest.err conftest.$ac_objext \
13898     conftest$ac_exeext conftest.$ac_ext
13899 LIBS=$ac_check_lib_save_LIBS
13900 fi
13901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
13902 $as_echo "$ac_cv_lib_socket_main" >&6; }
13903 if test "x$ac_cv_lib_socket_main" = x""yes; then :
13904   cat >>confdefs.h <<_ACEOF
13905 #define HAVE_LIBSOCKET 1
13906 _ACEOF
13907
13908   LIBS="-lsocket $LIBS"
13909
13910 fi
13911
13912         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnet" >&5
13913 $as_echo_n "checking for main in -lnet... " >&6; }
13914 if test "${ac_cv_lib_net_main+set}" = set; then :
13915   $as_echo_n "(cached) " >&6
13916 else
13917   ac_check_lib_save_LIBS=$LIBS
13918 LIBS="-lnet  $LIBS"
13919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13920 /* end confdefs.h.  */
13921
13922
13923 int
13924 main ()
13925 {
13926 return main ();
13927   ;
13928   return 0;
13929 }
13930 _ACEOF
13931 if ac_fn_c_try_link "$LINENO"; then :
13932   ac_cv_lib_net_main=yes
13933 else
13934   ac_cv_lib_net_main=no
13935 fi
13936 rm -f core conftest.err conftest.$ac_objext \
13937     conftest$ac_exeext conftest.$ac_ext
13938 LIBS=$ac_check_lib_save_LIBS
13939 fi
13940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_main" >&5
13941 $as_echo "$ac_cv_lib_net_main" >&6; }
13942 if test "x$ac_cv_lib_net_main" = x""yes; then :
13943   cat >>confdefs.h <<_ACEOF
13944 #define HAVE_LIBNET 1
13945 _ACEOF
13946
13947   LIBS="-lnet $LIBS"
13948
13949 fi
13950
13951         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl_s" >&5
13952 $as_echo_n "checking for main in -lnsl_s... " >&6; }
13953 if test "${ac_cv_lib_nsl_s_main+set}" = set; then :
13954   $as_echo_n "(cached) " >&6
13955 else
13956   ac_check_lib_save_LIBS=$LIBS
13957 LIBS="-lnsl_s  $LIBS"
13958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13959 /* end confdefs.h.  */
13960
13961
13962 int
13963 main ()
13964 {
13965 return main ();
13966   ;
13967   return 0;
13968 }
13969 _ACEOF
13970 if ac_fn_c_try_link "$LINENO"; then :
13971   ac_cv_lib_nsl_s_main=yes
13972 else
13973   ac_cv_lib_nsl_s_main=no
13974 fi
13975 rm -f core conftest.err conftest.$ac_objext \
13976     conftest$ac_exeext conftest.$ac_ext
13977 LIBS=$ac_check_lib_save_LIBS
13978 fi
13979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_s_main" >&5
13980 $as_echo "$ac_cv_lib_nsl_s_main" >&6; }
13981 if test "x$ac_cv_lib_nsl_s_main" = x""yes; then :
13982   cat >>confdefs.h <<_ACEOF
13983 #define HAVE_LIBNSL_S 1
13984 _ACEOF
13985
13986   LIBS="-lnsl_s $LIBS"
13987
13988 fi
13989
13990         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5
13991 $as_echo_n "checking for main in -lnsl... " >&6; }
13992 if test "${ac_cv_lib_nsl_main+set}" = set; then :
13993   $as_echo_n "(cached) " >&6
13994 else
13995   ac_check_lib_save_LIBS=$LIBS
13996 LIBS="-lnsl  $LIBS"
13997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13998 /* end confdefs.h.  */
13999
14000
14001 int
14002 main ()
14003 {
14004 return main ();
14005   ;
14006   return 0;
14007 }
14008 _ACEOF
14009 if ac_fn_c_try_link "$LINENO"; then :
14010   ac_cv_lib_nsl_main=yes
14011 else
14012   ac_cv_lib_nsl_main=no
14013 fi
14014 rm -f core conftest.err conftest.$ac_objext \
14015     conftest$ac_exeext conftest.$ac_ext
14016 LIBS=$ac_check_lib_save_LIBS
14017 fi
14018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5
14019 $as_echo "$ac_cv_lib_nsl_main" >&6; }
14020 if test "x$ac_cv_lib_nsl_main" = x""yes; then :
14021   cat >>confdefs.h <<_ACEOF
14022 #define HAVE_LIBNSL 1
14023 _ACEOF
14024
14025   LIBS="-lnsl $LIBS"
14026
14027 fi
14028
14029         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -linet" >&5
14030 $as_echo_n "checking for socket in -linet... " >&6; }
14031 if test "${ac_cv_lib_inet_socket+set}" = set; then :
14032   $as_echo_n "(cached) " >&6
14033 else
14034   ac_check_lib_save_LIBS=$LIBS
14035 LIBS="-linet  $LIBS"
14036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14037 /* end confdefs.h.  */
14038
14039 /* Override any GCC internal prototype to avoid an error.
14040    Use char because int might match the return type of a GCC
14041    builtin and then its argument prototype would still apply.  */
14042 #ifdef __cplusplus
14043 extern "C"
14044 #endif
14045 char socket ();
14046 int
14047 main ()
14048 {
14049 return socket ();
14050   ;
14051   return 0;
14052 }
14053 _ACEOF
14054 if ac_fn_c_try_link "$LINENO"; then :
14055   ac_cv_lib_inet_socket=yes
14056 else
14057   ac_cv_lib_inet_socket=no
14058 fi
14059 rm -f core conftest.err conftest.$ac_objext \
14060     conftest$ac_exeext conftest.$ac_ext
14061 LIBS=$ac_check_lib_save_LIBS
14062 fi
14063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_socket" >&5
14064 $as_echo "$ac_cv_lib_inet_socket" >&6; }
14065 if test "x$ac_cv_lib_inet_socket" = x""yes; then :
14066   cat >>confdefs.h <<_ACEOF
14067 #define HAVE_LIBINET 1
14068 _ACEOF
14069
14070   LIBS="-linet $LIBS"
14071
14072 fi
14073
14074         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgen" >&5
14075 $as_echo_n "checking for main in -lgen... " >&6; }
14076 if test "${ac_cv_lib_gen_main+set}" = set; then :
14077   $as_echo_n "(cached) " >&6
14078 else
14079   ac_check_lib_save_LIBS=$LIBS
14080 LIBS="-lgen  $LIBS"
14081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14082 /* end confdefs.h.  */
14083
14084
14085 int
14086 main ()
14087 {
14088 return main ();
14089   ;
14090   return 0;
14091 }
14092 _ACEOF
14093 if ac_fn_c_try_link "$LINENO"; then :
14094   ac_cv_lib_gen_main=yes
14095 else
14096   ac_cv_lib_gen_main=no
14097 fi
14098 rm -f core conftest.err conftest.$ac_objext \
14099     conftest$ac_exeext conftest.$ac_ext
14100 LIBS=$ac_check_lib_save_LIBS
14101 fi
14102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_main" >&5
14103 $as_echo "$ac_cv_lib_gen_main" >&6; }
14104 if test "x$ac_cv_lib_gen_main" = x""yes; then :
14105   cat >>confdefs.h <<_ACEOF
14106 #define HAVE_LIBGEN 1
14107 _ACEOF
14108
14109   LIBS="-lgen $LIBS"
14110
14111 fi
14112
14113
14114 fi
14115
14116
14117 ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
14118 if test "x$ac_cv_func_select" = x""yes; then :
14119   :
14120 else
14121   as_fn_error "select() required." "$LINENO" 5
14122 fi
14123
14124
14125 if test "${ac_cv_header_winsock_h}" != yes; then
14126                                 for ac_header in sys/select.h sys/socket.h
14127 do :
14128   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14129 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14130 eval as_val=\$$as_ac_Header
14131    if test "x$as_val" = x""yes; then :
14132   cat >>confdefs.h <<_ACEOF
14133 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14134 _ACEOF
14135
14136 fi
14137
14138 done
14139
14140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
14141 $as_echo_n "checking types of arguments for select... " >&6; }
14142 if test "${ac_cv_func_select_args+set}" = set; then :
14143   $as_echo_n "(cached) " >&6
14144 else
14145   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
14146  for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
14147   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
14148    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14149 /* end confdefs.h.  */
14150 $ac_includes_default
14151 #ifdef HAVE_SYS_SELECT_H
14152 # include <sys/select.h>
14153 #endif
14154 #ifdef HAVE_SYS_SOCKET_H
14155 # include <sys/socket.h>
14156 #endif
14157
14158 int
14159 main ()
14160 {
14161 extern int select ($ac_arg1,
14162                                             $ac_arg234, $ac_arg234, $ac_arg234,
14163                                             $ac_arg5);
14164   ;
14165   return 0;
14166 }
14167 _ACEOF
14168 if ac_fn_c_try_compile "$LINENO"; then :
14169   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
14170 fi
14171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14172   done
14173  done
14174 done
14175 # Provide a safe default value.
14176 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
14177
14178 fi
14179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
14180 $as_echo "$ac_cv_func_select_args" >&6; }
14181 ac_save_IFS=$IFS; IFS=','
14182 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
14183 IFS=$ac_save_IFS
14184 shift
14185
14186 cat >>confdefs.h <<_ACEOF
14187 #define SELECT_TYPE_ARG1 $1
14188 _ACEOF
14189
14190
14191 cat >>confdefs.h <<_ACEOF
14192 #define SELECT_TYPE_ARG234 ($2)
14193 _ACEOF
14194
14195
14196 cat >>confdefs.h <<_ACEOF
14197 #define SELECT_TYPE_ARG5 ($3)
14198 _ACEOF
14199
14200 rm -f conftest*
14201
14202 fi
14203
14204
14205 for ac_func in poll
14206 do :
14207   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14208 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14209 eval as_val=\$$as_ac_var
14210    if test "x$as_val" = x""yes; then :
14211   cat >>confdefs.h <<_ACEOF
14212 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14213 _ACEOF
14214
14215 fi
14216 done
14217
14218 if test $ac_cv_func_poll = yes; then
14219 for ac_header in poll.h sys/poll.h
14220 do :
14221   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14222 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14223 eval as_val=\$$as_ac_Header
14224    if test "x$as_val" = x""yes; then :
14225   cat >>confdefs.h <<_ACEOF
14226 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14227 _ACEOF
14228
14229 fi
14230
14231 done
14232
14233 fi
14234
14235 for ac_header in sys/epoll.h
14236 do :
14237   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14238 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14239 eval as_val=\$$as_ac_Header
14240    if test "x$as_val" = x""yes; then :
14241   cat >>confdefs.h <<_ACEOF
14242 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14243 _ACEOF
14244
14245 fi
14246
14247 done
14248
14249 if test "${ac_cv_header_sys_epoll_h}" = yes; then
14250         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll system call" >&5
14251 $as_echo_n "checking for epoll system call... " >&6; }
14252         if test "$cross_compiling" = yes; then :
14253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14254 $as_echo "no" >&6; }
14255 else
14256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14257 /* end confdefs.h.  */
14258 int main(int argc, char **argv)
14259 {
14260         int epfd = epoll_create(256);
14261         exit (epfd == -1 ? 1 : 0);
14262 }
14263 _ACEOF
14264 if ac_fn_c_try_run "$LINENO"; then :
14265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14266 $as_echo "yes" >&6; }
14267
14268 $as_echo "#define HAVE_EPOLL 1" >>confdefs.h
14269
14270 else
14271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14272 $as_echo "no" >&6; }
14273 fi
14274 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14275   conftest.$ac_objext conftest.beam conftest.$ac_ext
14276 fi
14277
14278 fi
14279
14280 for ac_header in sys/devpoll.h
14281 do :
14282   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14283 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14284 eval as_val=\$$as_ac_Header
14285    if test "x$as_val" = x""yes; then :
14286   cat >>confdefs.h <<_ACEOF
14287 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14288 _ACEOF
14289
14290 fi
14291
14292 done
14293
14294 if test "${ac_cv_header_sys_devpoll_h}" = yes \
14295                 -a "${ac_cv_header_poll_h}" = yes ; \
14296 then
14297         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/poll" >&5
14298 $as_echo_n "checking for /dev/poll... " >&6; }
14299         if test "$cross_compiling" = yes; then :
14300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14301 $as_echo "no" >&6; }
14302 else
14303   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14304 /* end confdefs.h.  */
14305 int main(int argc, char **argv)
14306 {
14307         int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
14308         exit (devpollfd == -1 ? 1 : 0);
14309 }
14310 _ACEOF
14311 if ac_fn_c_try_run "$LINENO"; then :
14312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14313 $as_echo "yes" >&6; }
14314
14315 $as_echo "#define HAVE_DEVPOLL 1" >>confdefs.h
14316
14317 else
14318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14319 $as_echo "no" >&6; }
14320 fi
14321 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14322   conftest.$ac_objext conftest.beam conftest.$ac_ext
14323 fi
14324
14325 fi
14326
14327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14328 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14329 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14330   $as_echo_n "(cached) " >&6
14331 else
14332
14333         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14334 /* end confdefs.h.  */
14335
14336 #include <stdio.h>
14337 #include <sys/types.h>
14338 #include <errno.h>
14339 #ifdef _WIN32
14340 #include <stdlib.h>
14341 #endif
14342 int
14343 main ()
14344 {
14345 char *c = (char *) *sys_errlist
14346   ;
14347   return 0;
14348 }
14349 _ACEOF
14350 if ac_fn_c_try_compile "$LINENO"; then :
14351   ol_cv_dcl_sys_errlist=yes
14352         ol_cv_have_sys_errlist=yes
14353 else
14354   ol_cv_dcl_sys_errlist=no
14355 fi
14356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14357 fi
14358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14359 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14360 #
14361 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14362 if test $ol_cv_dcl_sys_errlist = no ; then
14363
14364 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14365
14366
14367         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14368 $as_echo_n "checking existence of sys_errlist... " >&6; }
14369 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14370   $as_echo_n "(cached) " >&6
14371 else
14372
14373                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14374 /* end confdefs.h.  */
14375 #include <errno.h>
14376 int
14377 main ()
14378 {
14379 char *c = (char *) *sys_errlist
14380   ;
14381   return 0;
14382 }
14383 _ACEOF
14384 if ac_fn_c_try_link "$LINENO"; then :
14385   ol_cv_have_sys_errlist=yes
14386 else
14387   ol_cv_have_sys_errlist=no
14388 fi
14389 rm -f core conftest.err conftest.$ac_objext \
14390     conftest$ac_exeext conftest.$ac_ext
14391 fi
14392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14393 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14394 fi
14395 if test $ol_cv_have_sys_errlist = yes ; then
14396
14397 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14398
14399 fi
14400  for ac_func in strerror strerror_r
14401 do :
14402   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14403 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14404 eval as_val=\$$as_ac_var
14405    if test "x$as_val" = x""yes; then :
14406   cat >>confdefs.h <<_ACEOF
14407 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14408 _ACEOF
14409
14410 fi
14411 done
14412
14413 ol_cv_func_strerror_r=no
14414 if test "${ac_cv_func_strerror_r}" = yes ; then
14415         { $as_echo "$as_me:${as_lineno-$LINENO}: checking non-posix strerror_r" >&5
14416 $as_echo_n "checking non-posix strerror_r... " >&6; }
14417 if test "${ol_cv_nonposix_strerror_r+set}" = set; then :
14418   $as_echo_n "(cached) " >&6
14419 else
14420
14421         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14422 /* end confdefs.h.  */
14423 #include <string.h>
14424 _ACEOF
14425 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14426   $EGREP "strerror_r" >/dev/null 2>&1; then :
14427   ol_decl_strerror_r=yes
14428 else
14429   ol_decl_strerror_r=no
14430 fi
14431 rm -f conftest*
14432
14433         if test $ol_decl_strerror_r = yes ; then
14434                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14435 /* end confdefs.h.  */
14436 #include <string.h>
14437 int
14438 main ()
14439 {
14440    /* from autoconf 2.59 */
14441                                 char buf[100];
14442                                 char x = *strerror_r (0, buf, sizeof buf);
14443                                 char *p = strerror_r (0, buf, sizeof buf);
14444
14445   ;
14446   return 0;
14447 }
14448 _ACEOF
14449 if ac_fn_c_try_compile "$LINENO"; then :
14450   ol_cv_nonposix_strerror_r=yes
14451 else
14452   ol_cv_nonposix_strerror_r=no
14453 fi
14454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14455         else
14456                 if test "$cross_compiling" = yes; then :
14457   ol_cv_nonposix_strerror=no
14458 else
14459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14460 /* end confdefs.h.  */
14461
14462                         main() {
14463                                 char buf[100];
14464                                 buf[0] = 0;
14465                                 strerror_r( 1, buf, sizeof buf );
14466                                 exit( buf[0] == 0 );
14467                         }
14468
14469 _ACEOF
14470 if ac_fn_c_try_run "$LINENO"; then :
14471   ol_cv_nonposix_strerror_r=yes
14472 else
14473   ol_cv_nonposix_strerror=no
14474 fi
14475 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14476   conftest.$ac_objext conftest.beam conftest.$ac_ext
14477 fi
14478
14479         fi
14480
14481 fi
14482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_nonposix_strerror_r" >&5
14483 $as_echo "$ol_cv_nonposix_strerror_r" >&6; }
14484 if test $ol_cv_nonposix_strerror_r = yes ; then
14485
14486 $as_echo "#define HAVE_NONPOSIX_STRERROR_R 1" >>confdefs.h
14487
14488 fi
14489
14490 elif test "${ac_cv_func_strerror}" = no ; then
14491         { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14492 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14493 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14494   $as_echo_n "(cached) " >&6
14495 else
14496
14497         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14498 /* end confdefs.h.  */
14499
14500 #include <stdio.h>
14501 #include <sys/types.h>
14502 #include <errno.h>
14503 #ifdef _WIN32
14504 #include <stdlib.h>
14505 #endif
14506 int
14507 main ()
14508 {
14509 char *c = (char *) *sys_errlist
14510   ;
14511   return 0;
14512 }
14513 _ACEOF
14514 if ac_fn_c_try_compile "$LINENO"; then :
14515   ol_cv_dcl_sys_errlist=yes
14516         ol_cv_have_sys_errlist=yes
14517 else
14518   ol_cv_dcl_sys_errlist=no
14519 fi
14520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14521 fi
14522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14523 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14524 #
14525 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14526 if test $ol_cv_dcl_sys_errlist = no ; then
14527
14528 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14529
14530
14531         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14532 $as_echo_n "checking existence of sys_errlist... " >&6; }
14533 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14534   $as_echo_n "(cached) " >&6
14535 else
14536
14537                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14538 /* end confdefs.h.  */
14539 #include <errno.h>
14540 int
14541 main ()
14542 {
14543 char *c = (char *) *sys_errlist
14544   ;
14545   return 0;
14546 }
14547 _ACEOF
14548 if ac_fn_c_try_link "$LINENO"; then :
14549   ol_cv_have_sys_errlist=yes
14550 else
14551   ol_cv_have_sys_errlist=no
14552 fi
14553 rm -f core conftest.err conftest.$ac_objext \
14554     conftest$ac_exeext conftest.$ac_ext
14555 fi
14556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14557 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14558 fi
14559 if test $ol_cv_have_sys_errlist = yes ; then
14560
14561 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14562
14563 fi
14564
14565 fi
14566
14567
14568 for ac_header in regex.h
14569 do :
14570   ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default
14571 #ifdef HAVE_SYS_TYPES_H
14572 #include <sys/types.h>
14573 #endif
14574
14575 "
14576 if test "x$ac_cv_header_regex_h" = x""yes; then :
14577   cat >>confdefs.h <<_ACEOF
14578 #define HAVE_REGEX_H 1
14579 _ACEOF
14580
14581 fi
14582
14583 done
14584
14585
14586 if test "$ac_cv_header_regex_h" != yes ; then
14587         as_fn_error "POSIX regex.h required." "$LINENO" 5
14588 fi
14589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing regfree" >&5
14590 $as_echo_n "checking for library containing regfree... " >&6; }
14591 if test "${ac_cv_search_regfree+set}" = set; then :
14592   $as_echo_n "(cached) " >&6
14593 else
14594   ac_func_search_save_LIBS=$LIBS
14595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14596 /* end confdefs.h.  */
14597
14598 /* Override any GCC internal prototype to avoid an error.
14599    Use char because int might match the return type of a GCC
14600    builtin and then its argument prototype would still apply.  */
14601 #ifdef __cplusplus
14602 extern "C"
14603 #endif
14604 char regfree ();
14605 int
14606 main ()
14607 {
14608 return regfree ();
14609   ;
14610   return 0;
14611 }
14612 _ACEOF
14613 for ac_lib in '' regex gnuregex; do
14614   if test -z "$ac_lib"; then
14615     ac_res="none required"
14616   else
14617     ac_res=-l$ac_lib
14618     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14619   fi
14620   if ac_fn_c_try_link "$LINENO"; then :
14621   ac_cv_search_regfree=$ac_res
14622 fi
14623 rm -f core conftest.err conftest.$ac_objext \
14624     conftest$ac_exeext
14625   if test "${ac_cv_search_regfree+set}" = set; then :
14626   break
14627 fi
14628 done
14629 if test "${ac_cv_search_regfree+set}" = set; then :
14630
14631 else
14632   ac_cv_search_regfree=no
14633 fi
14634 rm conftest.$ac_ext
14635 LIBS=$ac_func_search_save_LIBS
14636 fi
14637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_regfree" >&5
14638 $as_echo "$ac_cv_search_regfree" >&6; }
14639 ac_res=$ac_cv_search_regfree
14640 if test "$ac_res" != no; then :
14641   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14642   :
14643 else
14644   as_fn_error "POSIX regex required." "$LINENO" 5
14645 fi
14646
14647
14648
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible POSIX regex" >&5
14650 $as_echo_n "checking for compatible POSIX regex... " >&6; }
14651 if test "${ol_cv_c_posix_regex+set}" = set; then :
14652   $as_echo_n "(cached) " >&6
14653 else
14654
14655         if test "$cross_compiling" = yes; then :
14656   ol_cv_c_posix_regex=cross
14657 else
14658   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14659 /* end confdefs.h.  */
14660
14661 #include <sys/types.h>
14662 #include <regex.h>
14663 static char *pattern, *string;
14664 main()
14665 {
14666         int rc;
14667         regex_t re;
14668
14669         pattern = "^A";
14670
14671         if(regcomp(&re, pattern, 0)) {
14672                 return -1;
14673         }
14674
14675         string = "ALL MATCH";
14676
14677         rc = regexec(&re, string, 0, (void*)0, 0);
14678
14679         regfree(&re);
14680
14681         return rc;
14682 }
14683 _ACEOF
14684 if ac_fn_c_try_run "$LINENO"; then :
14685   ol_cv_c_posix_regex=yes
14686 else
14687   ol_cv_c_posix_regex=no
14688 fi
14689 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14690   conftest.$ac_objext conftest.beam conftest.$ac_ext
14691 fi
14692
14693 fi
14694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_posix_regex" >&5
14695 $as_echo "$ol_cv_c_posix_regex" >&6; }
14696
14697 if test "$ol_cv_c_posix_regex" = no ; then
14698         as_fn_error "broken POSIX regex!" "$LINENO" 5
14699 fi
14700
14701
14702 have_uuid=no
14703 for ac_header in sys/uuid.h
14704 do :
14705   ac_fn_c_check_header_mongrel "$LINENO" "sys/uuid.h" "ac_cv_header_sys_uuid_h" "$ac_includes_default"
14706 if test "x$ac_cv_header_sys_uuid_h" = x""yes; then :
14707   cat >>confdefs.h <<_ACEOF
14708 #define HAVE_SYS_UUID_H 1
14709 _ACEOF
14710
14711 fi
14712
14713 done
14714
14715 if test $ac_cv_header_sys_uuid_h = yes ; then
14716         save_LIBS="$LIBS"
14717         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_to_str" >&5
14718 $as_echo_n "checking for library containing uuid_to_str... " >&6; }
14719 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14720   $as_echo_n "(cached) " >&6
14721 else
14722   ac_func_search_save_LIBS=$LIBS
14723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14724 /* end confdefs.h.  */
14725
14726 /* Override any GCC internal prototype to avoid an error.
14727    Use char because int might match the return type of a GCC
14728    builtin and then its argument prototype would still apply.  */
14729 #ifdef __cplusplus
14730 extern "C"
14731 #endif
14732 char uuid_to_str ();
14733 int
14734 main ()
14735 {
14736 return uuid_to_str ();
14737   ;
14738   return 0;
14739 }
14740 _ACEOF
14741 for ac_lib in '' uuid; do
14742   if test -z "$ac_lib"; then
14743     ac_res="none required"
14744   else
14745     ac_res=-l$ac_lib
14746     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14747   fi
14748   if ac_fn_c_try_link "$LINENO"; then :
14749   ac_cv_search_uuid_to_str=$ac_res
14750 fi
14751 rm -f core conftest.err conftest.$ac_objext \
14752     conftest$ac_exeext
14753   if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14754   break
14755 fi
14756 done
14757 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14758
14759 else
14760   ac_cv_search_uuid_to_str=no
14761 fi
14762 rm conftest.$ac_ext
14763 LIBS=$ac_func_search_save_LIBS
14764 fi
14765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_to_str" >&5
14766 $as_echo "$ac_cv_search_uuid_to_str" >&6; }
14767 ac_res=$ac_cv_search_uuid_to_str
14768 if test "$ac_res" != no; then :
14769   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14770   have_uuid=yes
14771 else
14772   :
14773 fi
14774
14775         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_create" >&5
14776 $as_echo_n "checking for library containing uuid_create... " >&6; }
14777 if test "${ac_cv_search_uuid_create+set}" = set; then :
14778   $as_echo_n "(cached) " >&6
14779 else
14780   ac_func_search_save_LIBS=$LIBS
14781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14782 /* end confdefs.h.  */
14783
14784 /* Override any GCC internal prototype to avoid an error.
14785    Use char because int might match the return type of a GCC
14786    builtin and then its argument prototype would still apply.  */
14787 #ifdef __cplusplus
14788 extern "C"
14789 #endif
14790 char uuid_create ();
14791 int
14792 main ()
14793 {
14794 return uuid_create ();
14795   ;
14796   return 0;
14797 }
14798 _ACEOF
14799 for ac_lib in '' uuid; do
14800   if test -z "$ac_lib"; then
14801     ac_res="none required"
14802   else
14803     ac_res=-l$ac_lib
14804     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14805   fi
14806   if ac_fn_c_try_link "$LINENO"; then :
14807   ac_cv_search_uuid_create=$ac_res
14808 fi
14809 rm -f core conftest.err conftest.$ac_objext \
14810     conftest$ac_exeext
14811   if test "${ac_cv_search_uuid_create+set}" = set; then :
14812   break
14813 fi
14814 done
14815 if test "${ac_cv_search_uuid_create+set}" = set; then :
14816
14817 else
14818   ac_cv_search_uuid_create=no
14819 fi
14820 rm conftest.$ac_ext
14821 LIBS=$ac_func_search_save_LIBS
14822 fi
14823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_create" >&5
14824 $as_echo "$ac_cv_search_uuid_create" >&6; }
14825 ac_res=$ac_cv_search_uuid_create
14826 if test "$ac_res" != no; then :
14827   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14828   :
14829 else
14830   have_uuid=no
14831 fi
14832
14833         LIBS="$save_LIBS"
14834
14835         if test $have_uuid = yes ; then
14836
14837 $as_echo "#define HAVE_UUID_TO_STR 1" >>confdefs.h
14838
14839
14840                 test "$ac_cv_search_uuid_to_str" = "none required" || \
14841                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
14842         fi
14843 fi
14844
14845 if test $have_uuid = no ; then
14846         for ac_header in uuid/uuid.h
14847 do :
14848   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14849 if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then :
14850   cat >>confdefs.h <<_ACEOF
14851 #define HAVE_UUID_UUID_H 1
14852 _ACEOF
14853
14854 fi
14855
14856 done
14857
14858         if test $ac_cv_header_uuid_uuid_h = yes ; then
14859                 save_LIBS="$LIBS"
14860                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
14861 $as_echo_n "checking for library containing uuid_generate... " >&6; }
14862 if test "${ac_cv_search_uuid_generate+set}" = set; then :
14863   $as_echo_n "(cached) " >&6
14864 else
14865   ac_func_search_save_LIBS=$LIBS
14866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14867 /* end confdefs.h.  */
14868
14869 /* Override any GCC internal prototype to avoid an error.
14870    Use char because int might match the return type of a GCC
14871    builtin and then its argument prototype would still apply.  */
14872 #ifdef __cplusplus
14873 extern "C"
14874 #endif
14875 char uuid_generate ();
14876 int
14877 main ()
14878 {
14879 return uuid_generate ();
14880   ;
14881   return 0;
14882 }
14883 _ACEOF
14884 for ac_lib in '' uuid; do
14885   if test -z "$ac_lib"; then
14886     ac_res="none required"
14887   else
14888     ac_res=-l$ac_lib
14889     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14890   fi
14891   if ac_fn_c_try_link "$LINENO"; then :
14892   ac_cv_search_uuid_generate=$ac_res
14893 fi
14894 rm -f core conftest.err conftest.$ac_objext \
14895     conftest$ac_exeext
14896   if test "${ac_cv_search_uuid_generate+set}" = set; then :
14897   break
14898 fi
14899 done
14900 if test "${ac_cv_search_uuid_generate+set}" = set; then :
14901
14902 else
14903   ac_cv_search_uuid_generate=no
14904 fi
14905 rm conftest.$ac_ext
14906 LIBS=$ac_func_search_save_LIBS
14907 fi
14908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
14909 $as_echo "$ac_cv_search_uuid_generate" >&6; }
14910 ac_res=$ac_cv_search_uuid_generate
14911 if test "$ac_res" != no; then :
14912   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14913   have_uuid=yes
14914 else
14915   :
14916 fi
14917
14918                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_unparse_lower" >&5
14919 $as_echo_n "checking for library containing uuid_unparse_lower... " >&6; }
14920 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
14921   $as_echo_n "(cached) " >&6
14922 else
14923   ac_func_search_save_LIBS=$LIBS
14924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14925 /* end confdefs.h.  */
14926
14927 /* Override any GCC internal prototype to avoid an error.
14928    Use char because int might match the return type of a GCC
14929    builtin and then its argument prototype would still apply.  */
14930 #ifdef __cplusplus
14931 extern "C"
14932 #endif
14933 char uuid_unparse_lower ();
14934 int
14935 main ()
14936 {
14937 return uuid_unparse_lower ();
14938   ;
14939   return 0;
14940 }
14941 _ACEOF
14942 for ac_lib in '' uuid; do
14943   if test -z "$ac_lib"; then
14944     ac_res="none required"
14945   else
14946     ac_res=-l$ac_lib
14947     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14948   fi
14949   if ac_fn_c_try_link "$LINENO"; then :
14950   ac_cv_search_uuid_unparse_lower=$ac_res
14951 fi
14952 rm -f core conftest.err conftest.$ac_objext \
14953     conftest$ac_exeext
14954   if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
14955   break
14956 fi
14957 done
14958 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
14959
14960 else
14961   ac_cv_search_uuid_unparse_lower=no
14962 fi
14963 rm conftest.$ac_ext
14964 LIBS=$ac_func_search_save_LIBS
14965 fi
14966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_unparse_lower" >&5
14967 $as_echo "$ac_cv_search_uuid_unparse_lower" >&6; }
14968 ac_res=$ac_cv_search_uuid_unparse_lower
14969 if test "$ac_res" != no; then :
14970   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14971   :
14972 else
14973   have_uuid=no
14974 fi
14975
14976                 LIBS="$save_LIBS"
14977
14978                 if test $have_uuid = yes ; then
14979
14980 $as_echo "#define HAVE_UUID_GENERATE 1" >>confdefs.h
14981
14982
14983                         test "$ac_cv_search_uuid_generate" = "none required" || \
14984                                 SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_generate"
14985                 fi
14986         fi
14987 fi
14988
14989 if test $have_uuid = no ; then
14990         { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
14991 $as_echo_n "checking to see if -lrpcrt4 is needed for win32 UUID support... " >&6; }
14992         save_LIBS="$LIBS"
14993         LIBS="$LIBS -lrpcrt4"
14994         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14995 /* end confdefs.h.  */
14996
14997                 int __stdcall UuidCreate(void *);
14998                 int __stdcall UuidToStringA(void *,void **);
14999
15000 int
15001 main ()
15002 {
15003
15004                 UuidCreate(0);
15005                 UuidToStringA(0,0);
15006
15007   ;
15008   return 0;
15009 }
15010 _ACEOF
15011 if ac_fn_c_try_link "$LINENO"; then :
15012   need_rpcrt=yes
15013 else
15014   need_rpcrt=no
15015 fi
15016 rm -f core conftest.err conftest.$ac_objext \
15017     conftest$ac_exeext conftest.$ac_ext
15018         if test $need_rpcrt = yes; then
15019                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
15020         fi
15021         LIBS="$save_LIBS"
15022         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_rpcrt" >&5
15023 $as_echo "$need_rpcrt" >&6; }
15024 fi
15025
15026 ol_cv_lib_resolver=no
15027 if test $ol_cv_lib_resolver = no ; then
15028         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (default)" >&5
15029 $as_echo_n "checking for resolver link (default)... " >&6; }
15030 if test "${ol_cv_resolver_none+set}" = set; then :
15031   $as_echo_n "(cached) " >&6
15032 else
15033
15034         ol_RESOLVER_LIB=
15035         ol_LIBS=$LIBS
15036         LIBS="$ol_RESOLVER_LIB $LIBS"
15037
15038         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15039 /* end confdefs.h.  */
15040
15041 #ifdef HAVE_SYS_TYPES_H
15042 #       include <sys/types.h>
15043 #endif
15044 #include <netinet/in.h>
15045 #ifdef HAVE_ARPA_NAMESER_H
15046 #       include <arpa/nameser.h>
15047 #endif
15048 #ifdef HAVE_RESOLV_H
15049 #       include <resolv.h>
15050 #endif
15051
15052 int
15053 main ()
15054 {
15055 {
15056         int len, status;
15057         char *request = NULL;
15058         unsigned char reply[64*1024];
15059         unsigned char host[64*1024];
15060         unsigned char *p;
15061
15062 #ifdef NS_HFIXEDSZ
15063         /* Bind 8/9 interface */
15064         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15065 #else
15066         /* Bind 4 interface */
15067 # ifndef T_SRV
15068 #  define T_SRV 33
15069 # endif
15070         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15071 #endif
15072         p = reply;
15073 #ifdef NS_HFIXEDSZ
15074         /* Bind 8/9 interface */
15075         p += NS_HFIXEDSZ;
15076 #elif defined(HFIXEDSZ)
15077         /* Bind 4 interface w/ HFIXEDSZ */
15078         p += HFIXEDSZ;
15079 #else
15080         /* Bind 4 interface w/o HFIXEDSZ */
15081         p += sizeof(HEADER);
15082 #endif
15083         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15084 }
15085   ;
15086   return 0;
15087 }
15088 _ACEOF
15089 if ac_fn_c_try_link "$LINENO"; then :
15090   ol_cv_resolver_none=yes
15091 else
15092   ol_cv_resolver_none=no
15093 fi
15094 rm -f core conftest.err conftest.$ac_objext \
15095     conftest$ac_exeext conftest.$ac_ext
15096
15097         LIBS="$ol_LIBS"
15098
15099 fi
15100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_none" >&5
15101 $as_echo "$ol_cv_resolver_none" >&6; }
15102
15103         if test $ol_cv_resolver_none = yes ; then
15104                 ol_cv_lib_resolver=yes
15105         fi
15106 fi
15107
15108 if test $ol_cv_lib_resolver = no ; then
15109         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lresolv)" >&5
15110 $as_echo_n "checking for resolver link (-lresolv)... " >&6; }
15111 if test "${ol_cv_resolver_resolv+set}" = set; then :
15112   $as_echo_n "(cached) " >&6
15113 else
15114
15115         ol_RESOLVER_LIB=-lresolv
15116         ol_LIBS=$LIBS
15117         LIBS="$ol_RESOLVER_LIB $LIBS"
15118
15119         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15120 /* end confdefs.h.  */
15121
15122 #ifdef HAVE_SYS_TYPES_H
15123 #       include <sys/types.h>
15124 #endif
15125 #include <netinet/in.h>
15126 #ifdef HAVE_ARPA_NAMESER_H
15127 #       include <arpa/nameser.h>
15128 #endif
15129 #ifdef HAVE_RESOLV_H
15130 #       include <resolv.h>
15131 #endif
15132
15133 int
15134 main ()
15135 {
15136 {
15137         int len, status;
15138         char *request = NULL;
15139         unsigned char reply[64*1024];
15140         unsigned char host[64*1024];
15141         unsigned char *p;
15142
15143 #ifdef NS_HFIXEDSZ
15144         /* Bind 8/9 interface */
15145         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15146 #else
15147         /* Bind 4 interface */
15148 # ifndef T_SRV
15149 #  define T_SRV 33
15150 # endif
15151         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15152 #endif
15153         p = reply;
15154 #ifdef NS_HFIXEDSZ
15155         /* Bind 8/9 interface */
15156         p += NS_HFIXEDSZ;
15157 #elif defined(HFIXEDSZ)
15158         /* Bind 4 interface w/ HFIXEDSZ */
15159         p += HFIXEDSZ;
15160 #else
15161         /* Bind 4 interface w/o HFIXEDSZ */
15162         p += sizeof(HEADER);
15163 #endif
15164         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15165 }
15166   ;
15167   return 0;
15168 }
15169 _ACEOF
15170 if ac_fn_c_try_link "$LINENO"; then :
15171   ol_cv_resolver_resolv=yes
15172 else
15173   ol_cv_resolver_resolv=no
15174 fi
15175 rm -f core conftest.err conftest.$ac_objext \
15176     conftest$ac_exeext conftest.$ac_ext
15177
15178         LIBS="$ol_LIBS"
15179
15180 fi
15181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_resolv" >&5
15182 $as_echo "$ol_cv_resolver_resolv" >&6; }
15183
15184         if test $ol_cv_resolver_resolv = yes ; then
15185                 ol_cv_lib_resolver=-lresolv
15186         fi
15187 fi
15188
15189 if test $ol_cv_lib_resolver = no ; then
15190         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lbind)" >&5
15191 $as_echo_n "checking for resolver link (-lbind)... " >&6; }
15192 if test "${ol_cv_resolver_bind+set}" = set; then :
15193   $as_echo_n "(cached) " >&6
15194 else
15195
15196         ol_RESOLVER_LIB=-lbind
15197         ol_LIBS=$LIBS
15198         LIBS="$ol_RESOLVER_LIB $LIBS"
15199
15200         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15201 /* end confdefs.h.  */
15202
15203 #ifdef HAVE_SYS_TYPES_H
15204 #       include <sys/types.h>
15205 #endif
15206 #include <netinet/in.h>
15207 #ifdef HAVE_ARPA_NAMESER_H
15208 #       include <arpa/nameser.h>
15209 #endif
15210 #ifdef HAVE_RESOLV_H
15211 #       include <resolv.h>
15212 #endif
15213
15214 int
15215 main ()
15216 {
15217 {
15218         int len, status;
15219         char *request = NULL;
15220         unsigned char reply[64*1024];
15221         unsigned char host[64*1024];
15222         unsigned char *p;
15223
15224 #ifdef NS_HFIXEDSZ
15225         /* Bind 8/9 interface */
15226         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15227 #else
15228         /* Bind 4 interface */
15229 # ifndef T_SRV
15230 #  define T_SRV 33
15231 # endif
15232         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15233 #endif
15234         p = reply;
15235 #ifdef NS_HFIXEDSZ
15236         /* Bind 8/9 interface */
15237         p += NS_HFIXEDSZ;
15238 #elif defined(HFIXEDSZ)
15239         /* Bind 4 interface w/ HFIXEDSZ */
15240         p += HFIXEDSZ;
15241 #else
15242         /* Bind 4 interface w/o HFIXEDSZ */
15243         p += sizeof(HEADER);
15244 #endif
15245         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15246 }
15247   ;
15248   return 0;
15249 }
15250 _ACEOF
15251 if ac_fn_c_try_link "$LINENO"; then :
15252   ol_cv_resolver_bind=yes
15253 else
15254   ol_cv_resolver_bind=no
15255 fi
15256 rm -f core conftest.err conftest.$ac_objext \
15257     conftest$ac_exeext conftest.$ac_ext
15258
15259         LIBS="$ol_LIBS"
15260
15261 fi
15262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_bind" >&5
15263 $as_echo "$ol_cv_resolver_bind" >&6; }
15264
15265         if test $ol_cv_resolver_bind = yes ; then
15266                 ol_cv_lib_resolver=-lbind
15267         fi
15268 fi
15269
15270
15271
15272 ol_link_dnssrv=no
15273 if test "$ol_cv_lib_resolver" != no ; then
15274
15275 $as_echo "#define HAVE_RES_QUERY 1" >>confdefs.h
15276
15277
15278         if test "$ol_enable_dnssrv" != no ; then
15279                 ol_link_dnssrv=yes
15280         fi
15281
15282         if test "$ol_cv_lib_resolver" != yes ; then
15283                 LIBS="$ol_cv_lib_resolver $LIBS"
15284         fi
15285 fi
15286
15287 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
15288         if test "$ol_link_dnssrv" = no ; then
15289                 as_fn_error "DNSSRV requires res_query()" "$LINENO" 5
15290         fi
15291 else
15292         ol_enable_dnssrv=no
15293 fi
15294
15295 for ac_func in hstrerror
15296 do :
15297   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15298 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15299 eval as_val=\$$as_ac_var
15300    if test "x$as_val" = x""yes; then :
15301   cat >>confdefs.h <<_ACEOF
15302 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15303 _ACEOF
15304
15305 fi
15306 done
15307
15308
15309 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
15310 do :
15311   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15312 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15313 eval as_val=\$$as_ac_var
15314    if test "x$as_val" = x""yes; then :
15315   cat >>confdefs.h <<_ACEOF
15316 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15317 _ACEOF
15318
15319 fi
15320 done
15321
15322
15323 ol_link_ipv6=no
15324 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
15325         if test $ol_enable_ipv6 = yes ; then
15326                 as_fn_error "IPv6 support requires getaddrinfo() and inet_ntop()" "$LINENO" 5
15327         fi
15328 elif test $ol_enable_ipv6 != no ; then
15329         { $as_echo "$as_me:${as_lineno-$LINENO}: checking INET6_ADDRSTRLEN" >&5
15330 $as_echo_n "checking INET6_ADDRSTRLEN... " >&6; }
15331 if test "${ol_cv_inet6_addrstrlen+set}" = set; then :
15332   $as_echo_n "(cached) " >&6
15333 else
15334
15335                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15336 /* end confdefs.h.  */
15337
15338 #                       include <netinet/in.h>
15339 #                       ifdef INET6_ADDRSTRLEN
15340                                 __has_inet6_addrstrlen__;
15341 #                       endif
15342
15343 _ACEOF
15344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15345   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then :
15346   ol_cv_inet6_addrstrlen=yes
15347 else
15348   ol_cv_inet6_addrstrlen=no
15349 fi
15350 rm -f conftest*
15351
15352 fi
15353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_inet6_addrstrlen" >&5
15354 $as_echo "$ol_cv_inet6_addrstrlen" >&6; }
15355
15356
15357         { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr_storage" >&5
15358 $as_echo_n "checking struct sockaddr_storage... " >&6; }
15359 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then :
15360   $as_echo_n "(cached) " >&6
15361 else
15362
15363                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15364 /* end confdefs.h.  */
15365
15366 #include <sys/types.h>
15367 #include <sys/socket.h>
15368
15369 int
15370 main ()
15371 {
15372
15373                         struct sockaddr_storage ss;
15374
15375   ;
15376   return 0;
15377 }
15378 _ACEOF
15379 if ac_fn_c_try_compile "$LINENO"; then :
15380   ol_cv_struct_sockaddr_storage=yes
15381 else
15382   ol_cv_struct_sockaddr_storage=no
15383 fi
15384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15385 fi
15386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_struct_sockaddr_storage" >&5
15387 $as_echo "$ol_cv_struct_sockaddr_storage" >&6; }
15388
15389         if test $ol_cv_inet6_addrstrlen = yes &&
15390            test $ol_cv_struct_sockaddr_storage = yes ; then
15391                 ol_link_ipv6=yes
15392         elif test $ol_enable_ipv6 = yes &&
15393              test $ol_cv_inet6_addrstrlen = no ; then
15394                 as_fn_error "IPv6 support requires INET6_ADDRSTRLEN" "$LINENO" 5
15395         elif test $ol_enable_ipv6 = yes &&
15396              test $ol_cv_struct_sockaddr_storage = no ; then
15397                 as_fn_error "IPv6 support requires struct sockaddr_storage" "$LINENO" 5
15398         fi
15399 fi
15400
15401 if test $ol_enable_local != no ; then
15402         for ac_header in sys/un.h
15403 do :
15404   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15405 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15406 eval as_val=\$$as_ac_Header
15407    if test "x$as_val" = x""yes; then :
15408   cat >>confdefs.h <<_ACEOF
15409 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15410 _ACEOF
15411
15412 fi
15413
15414 done
15415
15416
15417         if test $ol_enable_local = auto ; then
15418                 ol_enable_local=$ac_cv_header_sys_un_h
15419         elif test $ac_cv_header_sys_un_h = no ; then
15420                 as_fn_error "AF_LOCAL domain support requires sys/un.h" "$LINENO" 5
15421         fi
15422 fi
15423
15424
15425 if test $ol_with_tls = yes ; then
15426         ol_with_tls=auto
15427 fi
15428
15429 ol_link_tls=no
15430 if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
15431         for ac_header in openssl/ssl.h
15432 do :
15433   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
15434 if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then :
15435   cat >>confdefs.h <<_ACEOF
15436 #define HAVE_OPENSSL_SSL_H 1
15437 _ACEOF
15438
15439 fi
15440
15441 done
15442
15443
15444         if test $ac_cv_header_openssl_ssl_h = yes ; then
15445                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
15446 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
15447 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then :
15448   $as_echo_n "(cached) " >&6
15449 else
15450   ac_check_lib_save_LIBS=$LIBS
15451 LIBS="-lssl -lcrypto $LIBS"
15452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15453 /* end confdefs.h.  */
15454
15455 /* Override any GCC internal prototype to avoid an error.
15456    Use char because int might match the return type of a GCC
15457    builtin and then its argument prototype would still apply.  */
15458 #ifdef __cplusplus
15459 extern "C"
15460 #endif
15461 char SSL_library_init ();
15462 int
15463 main ()
15464 {
15465 return SSL_library_init ();
15466   ;
15467   return 0;
15468 }
15469 _ACEOF
15470 if ac_fn_c_try_link "$LINENO"; then :
15471   ac_cv_lib_ssl_SSL_library_init=yes
15472 else
15473   ac_cv_lib_ssl_SSL_library_init=no
15474 fi
15475 rm -f core conftest.err conftest.$ac_objext \
15476     conftest$ac_exeext conftest.$ac_ext
15477 LIBS=$ac_check_lib_save_LIBS
15478 fi
15479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
15480 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
15481 if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then :
15482   have_openssl=yes
15483                         need_rsaref=no
15484 else
15485   have_openssl=no
15486 fi
15487
15488
15489                 if test $have_openssl = no ; then
15490                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl3_accept in -lssl" >&5
15491 $as_echo_n "checking for ssl3_accept in -lssl... " >&6; }
15492 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then :
15493   $as_echo_n "(cached) " >&6
15494 else
15495   ac_check_lib_save_LIBS=$LIBS
15496 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
15497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15498 /* end confdefs.h.  */
15499
15500 /* Override any GCC internal prototype to avoid an error.
15501    Use char because int might match the return type of a GCC
15502    builtin and then its argument prototype would still apply.  */
15503 #ifdef __cplusplus
15504 extern "C"
15505 #endif
15506 char ssl3_accept ();
15507 int
15508 main ()
15509 {
15510 return ssl3_accept ();
15511   ;
15512   return 0;
15513 }
15514 _ACEOF
15515 if ac_fn_c_try_link "$LINENO"; then :
15516   ac_cv_lib_ssl_ssl3_accept=yes
15517 else
15518   ac_cv_lib_ssl_ssl3_accept=no
15519 fi
15520 rm -f core conftest.err conftest.$ac_objext \
15521     conftest$ac_exeext conftest.$ac_ext
15522 LIBS=$ac_check_lib_save_LIBS
15523 fi
15524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_ssl3_accept" >&5
15525 $as_echo "$ac_cv_lib_ssl_ssl3_accept" >&6; }
15526 if test "x$ac_cv_lib_ssl_ssl3_accept" = x""yes; then :
15527   have_openssl=yes
15528                                 need_rsaref=yes
15529 else
15530   have_openssl=no
15531 fi
15532
15533                 fi
15534
15535                 if test $have_openssl = yes ; then
15536                         ol_with_tls=openssl
15537                         ol_link_tls=yes
15538
15539
15540 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
15541
15542
15543                         if test $need_rsaref = yes; then
15544
15545 $as_echo "#define HAVE_RSAREF 1" >>confdefs.h
15546
15547
15548                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
15549                         else
15550                                 TLS_LIBS="-lssl -lcrypto"
15551                         fi
15552
15553                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version (CRL checking capability)" >&5
15554 $as_echo_n "checking OpenSSL library version (CRL checking capability)... " >&6; }
15555 if test "${ol_cv_ssl_crl_compat+set}" = set; then :
15556   $as_echo_n "(cached) " >&6
15557 else
15558
15559                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15560 /* end confdefs.h.  */
15561
15562 #ifdef HAVE_OPENSSL_SSL_H
15563 #include <openssl/ssl.h>
15564 #endif
15565
15566 /* Require 0.9.7d+ */
15567 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
15568         char *__ssl_compat = "0.9.7d";
15569 #endif
15570
15571 _ACEOF
15572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15573   $EGREP "__ssl_compat" >/dev/null 2>&1; then :
15574   ol_cv_ssl_crl_compat=yes
15575 else
15576   ol_cv_ssl_crl_compat=no
15577 fi
15578 rm -f conftest*
15579
15580 fi
15581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_ssl_crl_compat" >&5
15582 $as_echo "$ol_cv_ssl_crl_compat" >&6; }
15583
15584                         if test $ol_cv_ssl_crl_compat = yes ; then
15585
15586 $as_echo "#define HAVE_OPENSSL_CRL 1" >>confdefs.h
15587
15588                         fi
15589                 fi
15590         fi
15591 fi
15592
15593 if test $ol_link_tls = no ; then
15594         if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then
15595                 for ac_header in gnutls/gnutls.h
15596 do :
15597   ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
15598 if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then :
15599   cat >>confdefs.h <<_ACEOF
15600 #define HAVE_GNUTLS_GNUTLS_H 1
15601 _ACEOF
15602
15603 fi
15604
15605 done
15606
15607
15608                 if test $ac_cv_header_gnutls_gnutls_h = yes ; then
15609                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
15610 $as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
15611 if test "${ac_cv_lib_gnutls_gnutls_init+set}" = set; then :
15612   $as_echo_n "(cached) " >&6
15613 else
15614   ac_check_lib_save_LIBS=$LIBS
15615 LIBS="-lgnutls  $LIBS"
15616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15617 /* end confdefs.h.  */
15618
15619 /* Override any GCC internal prototype to avoid an error.
15620    Use char because int might match the return type of a GCC
15621    builtin and then its argument prototype would still apply.  */
15622 #ifdef __cplusplus
15623 extern "C"
15624 #endif
15625 char gnutls_init ();
15626 int
15627 main ()
15628 {
15629 return gnutls_init ();
15630   ;
15631   return 0;
15632 }
15633 _ACEOF
15634 if ac_fn_c_try_link "$LINENO"; then :
15635   ac_cv_lib_gnutls_gnutls_init=yes
15636 else
15637   ac_cv_lib_gnutls_gnutls_init=no
15638 fi
15639 rm -f core conftest.err conftest.$ac_objext \
15640     conftest$ac_exeext conftest.$ac_ext
15641 LIBS=$ac_check_lib_save_LIBS
15642 fi
15643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_init" >&5
15644 $as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
15645 if test "x$ac_cv_lib_gnutls_gnutls_init" = x""yes; then :
15646   have_gnutls=yes
15647 else
15648   have_gnutls=no
15649 fi
15650
15651
15652                         if test $have_gnutls = yes ; then
15653                                 ol_with_tls=gnutls
15654                                 ol_link_tls=yes
15655
15656                                 TLS_LIBS="-lgnutls"
15657
15658
15659 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
15660
15661                         fi
15662                 fi
15663         fi
15664 fi
15665
15666 WITH_TLS=no
15667 if test $ol_link_tls = yes ; then
15668
15669 $as_echo "#define HAVE_TLS 1" >>confdefs.h
15670
15671         WITH_TLS=yes
15672 elif test $ol_with_tls = auto ; then
15673         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate TLS/SSL package" >&5
15674 $as_echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
15675         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15676 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15677 elif test $ol_with_tls != no ; then
15678         as_fn_error "Could not locate TLS/SSL package" "$LINENO" 5
15679 else
15680         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15681 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15682 fi
15683
15684 if test $ol_enable_lmpasswd != no; then
15685         if test $ol_link_tls != yes ; then
15686                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
15687         fi
15688
15689
15690 $as_echo "#define SLAPD_LMHASH 1" >>confdefs.h
15691
15692 fi
15693
15694 ol_link_threads=no
15695
15696 case $ol_with_threads in auto | yes | nt)
15697
15698
15699         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
15700 if test "x$ac_cv_func__beginthread" = x""yes; then :
15701
15702 fi
15703
15704
15705         if test $ac_cv_func__beginthread = yes ; then
15706
15707 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
15708
15709                 ol_cv_nt_threads=yes
15710         fi
15711
15712
15713         if test "$ol_cv_nt_threads" = yes ; then
15714                 ol_link_threads=nt
15715                 ol_with_threads=found
15716                 ol_with_yielding_select=yes
15717
15718
15719 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
15720
15721
15722 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
15723
15724         fi
15725
15726         if test $ol_with_threads = nt ; then
15727                 as_fn_error "could not locate NT Threads" "$LINENO" 5
15728         fi
15729         ;;
15730 esac
15731
15732 case $ol_with_threads in auto | yes | posix)
15733
15734         for ac_header in pthread.h
15735 do :
15736   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15737 if test "x$ac_cv_header_pthread_h" = x""yes; then :
15738   cat >>confdefs.h <<_ACEOF
15739 #define HAVE_PTHREAD_H 1
15740 _ACEOF
15741
15742 fi
15743
15744 done
15745
15746
15747         if test $ac_cv_header_pthread_h = yes ; then
15748                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
15749 $as_echo_n "checking POSIX thread version... " >&6; }
15750 if test "${ol_cv_pthread_version+set}" = set; then :
15751   $as_echo_n "(cached) " >&6
15752 else
15753
15754         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15755 /* end confdefs.h.  */
15756
15757 #               include <pthread.h>
15758
15759 int
15760 main ()
15761 {
15762
15763                 int i = PTHREAD_CREATE_JOINABLE;
15764
15765   ;
15766   return 0;
15767 }
15768 _ACEOF
15769 if ac_fn_c_try_compile "$LINENO"; then :
15770
15771         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15772 /* end confdefs.h.  */
15773 #include <pthread.h>
15774
15775 _ACEOF
15776 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15777   $EGREP "pthread_detach" >/dev/null 2>&1; then :
15778   ol_cv_pthread_version=10
15779 else
15780   ol_cv_pthread_version=8
15781 fi
15782 rm -f conftest*
15783
15784 else
15785
15786         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15787 /* end confdefs.h.  */
15788
15789 #               include <pthread.h>
15790 #               ifdef PTHREAD_CREATE_UNDETACHED
15791                 draft7
15792 #               endif
15793
15794 _ACEOF
15795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15796   $EGREP "draft7" >/dev/null 2>&1; then :
15797   ol_cv_pthread_version=7
15798 else
15799
15800         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15801 /* end confdefs.h.  */
15802 #include <pthread.h>
15803
15804 _ACEOF
15805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15806   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
15807   ol_cv_pthread_version=6
15808 else
15809
15810         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15811 /* end confdefs.h.  */
15812
15813 #               include <pthread.h>
15814 #ifdef          PTHREAD_MUTEX_INITIALIZER
15815                 draft5
15816 #endif
15817
15818 _ACEOF
15819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15820   $EGREP "draft5" >/dev/null 2>&1; then :
15821   ol_cv_pthread_version=5
15822 else
15823   ol_cv_pthread_version=4
15824 fi
15825 rm -f conftest*
15826
15827 fi
15828 rm -f conftest*
15829
15830 fi
15831 rm -f conftest*
15832
15833 fi
15834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15835
15836 fi
15837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
15838 $as_echo "$ol_cv_pthread_version" >&6; }
15839
15840
15841                 if test $ol_cv_pthread_version != 0 ; then
15842
15843 cat >>confdefs.h <<_ACEOF
15844 #define HAVE_PTHREADS $ol_cv_pthread_version
15845 _ACEOF
15846
15847                 else
15848                         as_fn_error "unknown pthread version" "$LINENO" 5
15849                 fi
15850
15851                 # consider threads found
15852                 ol_with_threads=found
15853
15854
15855         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
15856 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
15857 if test "${ol_cv_header_linux_threads+set}" = set; then :
15858   $as_echo_n "(cached) " >&6
15859 else
15860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15861 /* end confdefs.h.  */
15862 #include <pthread.h>
15863 _ACEOF
15864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15865   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
15866   ol_cv_header_linux_threads=yes
15867 else
15868   ol_cv_header_linux_threads=no
15869 fi
15870 rm -f conftest*
15871
15872
15873 fi
15874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
15875 $as_echo "$ol_cv_header_linux_threads" >&6; }
15876         if test $ol_cv_header_linux_threads = yes; then
15877
15878 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
15879
15880         fi
15881
15882
15883         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
15884 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
15885 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then :
15886   $as_echo_n "(cached) " >&6
15887 else
15888   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15889 /* end confdefs.h.  */
15890 #include <pthread.h>
15891 #ifdef _POSIX_THREAD_IS_GNU_PTH
15892         __gnu_pth__;
15893 #endif
15894
15895 _ACEOF
15896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15897   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
15898   ol_cv_header_gnu_pth_pthread_h=yes
15899 else
15900   ol_cv_header_gnu_pth_pthread_h=no
15901 fi
15902 rm -f conftest*
15903
15904
15905 fi
15906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
15907 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
15908
15909
15910                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
15911                         for ac_header in sched.h
15912 do :
15913   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
15914 if test "x$ac_cv_header_sched_h" = x""yes; then :
15915   cat >>confdefs.h <<_ACEOF
15916 #define HAVE_SCHED_H 1
15917 _ACEOF
15918
15919 fi
15920
15921 done
15922
15923                 fi
15924
15925
15926                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
15927 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
15928 if test "${ol_cv_pthread_create+set}" = set; then :
15929   $as_echo_n "(cached) " >&6
15930 else
15931
15932                         if test "$cross_compiling" = yes; then :
15933   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15934 /* end confdefs.h.  */
15935
15936 /* pthread test headers */
15937 #include <pthread.h>
15938 #if HAVE_PTHREADS < 7
15939 #include <errno.h>
15940 #endif
15941 #ifndef NULL
15942 #define NULL (void*)0
15943 #endif
15944
15945 static void *task(p)
15946         void *p;
15947 {
15948         return (void *) (p == NULL);
15949 }
15950
15951 int
15952 main ()
15953 {
15954
15955         /* pthread test function */
15956 #ifndef PTHREAD_CREATE_DETACHED
15957 #define PTHREAD_CREATE_DETACHED 1
15958 #endif
15959         pthread_t t;
15960         int status;
15961         int detach = PTHREAD_CREATE_DETACHED;
15962
15963 #if HAVE_PTHREADS > 4
15964         /* Final pthreads */
15965         pthread_attr_t attr;
15966
15967         status = pthread_attr_init(&attr);
15968         if( status ) return status;
15969
15970 #if HAVE_PTHREADS < 7
15971         status = pthread_attr_setdetachstate(&attr, &detach);
15972         if( status < 0 ) status = errno;
15973 #else
15974         status = pthread_attr_setdetachstate(&attr, detach);
15975 #endif
15976         if( status ) return status;
15977         status = pthread_create( &t, &attr, task, NULL );
15978 #if HAVE_PTHREADS < 7
15979         if( status < 0 ) status = errno;
15980 #endif
15981         if( status ) return status;
15982 #else
15983         /* Draft 4 pthreads */
15984         status = pthread_create( &t, pthread_attr_default, task, NULL );
15985         if( status ) return errno;
15986
15987         /* give thread a chance to complete */
15988         /* it should remain joinable and hence detachable */
15989         sleep( 1 );
15990
15991         status = pthread_detach( &t );
15992         if( status ) return errno;
15993 #endif
15994
15995 #ifdef HAVE_LINUX_THREADS
15996         pthread_kill_other_threads_np();
15997 #endif
15998
15999         return 0;
16000
16001   ;
16002   return 0;
16003 }
16004 _ACEOF
16005 if ac_fn_c_try_link "$LINENO"; then :
16006   ol_cv_pthread_create=yes
16007 else
16008   ol_cv_pthread_create=no
16009 fi
16010 rm -f core conftest.err conftest.$ac_objext \
16011     conftest$ac_exeext conftest.$ac_ext
16012 else
16013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16014 /* end confdefs.h.  */
16015
16016 /* pthread test headers */
16017 #include <pthread.h>
16018 #if HAVE_PTHREADS < 7
16019 #include <errno.h>
16020 #endif
16021 #ifndef NULL
16022 #define NULL (void*)0
16023 #endif
16024
16025 static void *task(p)
16026         void *p;
16027 {
16028         return (void *) (p == NULL);
16029 }
16030
16031
16032 int main(argc, argv)
16033         int argc;
16034         char **argv;
16035 {
16036
16037         /* pthread test function */
16038 #ifndef PTHREAD_CREATE_DETACHED
16039 #define PTHREAD_CREATE_DETACHED 1
16040 #endif
16041         pthread_t t;
16042         int status;
16043         int detach = PTHREAD_CREATE_DETACHED;
16044
16045 #if HAVE_PTHREADS > 4
16046         /* Final pthreads */
16047         pthread_attr_t attr;
16048
16049         status = pthread_attr_init(&attr);
16050         if( status ) return status;
16051
16052 #if HAVE_PTHREADS < 7
16053         status = pthread_attr_setdetachstate(&attr, &detach);
16054         if( status < 0 ) status = errno;
16055 #else
16056         status = pthread_attr_setdetachstate(&attr, detach);
16057 #endif
16058         if( status ) return status;
16059         status = pthread_create( &t, &attr, task, NULL );
16060 #if HAVE_PTHREADS < 7
16061         if( status < 0 ) status = errno;
16062 #endif
16063         if( status ) return status;
16064 #else
16065         /* Draft 4 pthreads */
16066         status = pthread_create( &t, pthread_attr_default, task, NULL );
16067         if( status ) return errno;
16068
16069         /* give thread a chance to complete */
16070         /* it should remain joinable and hence detachable */
16071         sleep( 1 );
16072
16073         status = pthread_detach( &t );
16074         if( status ) return errno;
16075 #endif
16076
16077 #ifdef HAVE_LINUX_THREADS
16078         pthread_kill_other_threads_np();
16079 #endif
16080
16081         return 0;
16082
16083 }
16084
16085 _ACEOF
16086 if ac_fn_c_try_run "$LINENO"; then :
16087   ol_cv_pthread_create=yes
16088 else
16089   ol_cv_pthread_create=no
16090 fi
16091 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16092   conftest.$ac_objext conftest.beam conftest.$ac_ext
16093 fi
16094
16095 fi
16096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
16097 $as_echo "$ol_cv_pthread_create" >&6; }
16098
16099                 if test $ol_cv_pthread_create != no ; then
16100                         ol_link_threads=posix
16101                         ol_link_pthreads=""
16102                 fi
16103
16104                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
16105 if test "$ol_link_threads" = no ; then
16106         # try -kthread
16107         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
16108 $as_echo_n "checking for pthread link with -kthread... " >&6; }
16109 if test "${ol_cv_pthread_kthread+set}" = set; then :
16110   $as_echo_n "(cached) " >&6
16111 else
16112
16113                 # save the flags
16114                 ol_LIBS="$LIBS"
16115                 LIBS="-kthread $LIBS"
16116
16117                 if test "$cross_compiling" = yes; then :
16118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16119 /* end confdefs.h.  */
16120
16121 /* pthread test headers */
16122 #include <pthread.h>
16123 #if HAVE_PTHREADS < 7
16124 #include <errno.h>
16125 #endif
16126 #ifndef NULL
16127 #define NULL (void*)0
16128 #endif
16129
16130 static void *task(p)
16131         void *p;
16132 {
16133         return (void *) (p == NULL);
16134 }
16135
16136 int
16137 main ()
16138 {
16139
16140         /* pthread test function */
16141 #ifndef PTHREAD_CREATE_DETACHED
16142 #define PTHREAD_CREATE_DETACHED 1
16143 #endif
16144         pthread_t t;
16145         int status;
16146         int detach = PTHREAD_CREATE_DETACHED;
16147
16148 #if HAVE_PTHREADS > 4
16149         /* Final pthreads */
16150         pthread_attr_t attr;
16151
16152         status = pthread_attr_init(&attr);
16153         if( status ) return status;
16154
16155 #if HAVE_PTHREADS < 7
16156         status = pthread_attr_setdetachstate(&attr, &detach);
16157         if( status < 0 ) status = errno;
16158 #else
16159         status = pthread_attr_setdetachstate(&attr, detach);
16160 #endif
16161         if( status ) return status;
16162         status = pthread_create( &t, &attr, task, NULL );
16163 #if HAVE_PTHREADS < 7
16164         if( status < 0 ) status = errno;
16165 #endif
16166         if( status ) return status;
16167 #else
16168         /* Draft 4 pthreads */
16169         status = pthread_create( &t, pthread_attr_default, task, NULL );
16170         if( status ) return errno;
16171
16172         /* give thread a chance to complete */
16173         /* it should remain joinable and hence detachable */
16174         sleep( 1 );
16175
16176         status = pthread_detach( &t );
16177         if( status ) return errno;
16178 #endif
16179
16180 #ifdef HAVE_LINUX_THREADS
16181         pthread_kill_other_threads_np();
16182 #endif
16183
16184         return 0;
16185
16186   ;
16187   return 0;
16188 }
16189 _ACEOF
16190 if ac_fn_c_try_link "$LINENO"; then :
16191   ol_cv_pthread_kthread=yes
16192 else
16193   ol_cv_pthread_kthread=no
16194 fi
16195 rm -f core conftest.err conftest.$ac_objext \
16196     conftest$ac_exeext conftest.$ac_ext
16197 else
16198   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16199 /* end confdefs.h.  */
16200
16201 /* pthread test headers */
16202 #include <pthread.h>
16203 #if HAVE_PTHREADS < 7
16204 #include <errno.h>
16205 #endif
16206 #ifndef NULL
16207 #define NULL (void*)0
16208 #endif
16209
16210 static void *task(p)
16211         void *p;
16212 {
16213         return (void *) (p == NULL);
16214 }
16215
16216
16217 int main(argc, argv)
16218         int argc;
16219         char **argv;
16220 {
16221
16222         /* pthread test function */
16223 #ifndef PTHREAD_CREATE_DETACHED
16224 #define PTHREAD_CREATE_DETACHED 1
16225 #endif
16226         pthread_t t;
16227         int status;
16228         int detach = PTHREAD_CREATE_DETACHED;
16229
16230 #if HAVE_PTHREADS > 4
16231         /* Final pthreads */
16232         pthread_attr_t attr;
16233
16234         status = pthread_attr_init(&attr);
16235         if( status ) return status;
16236
16237 #if HAVE_PTHREADS < 7
16238         status = pthread_attr_setdetachstate(&attr, &detach);
16239         if( status < 0 ) status = errno;
16240 #else
16241         status = pthread_attr_setdetachstate(&attr, detach);
16242 #endif
16243         if( status ) return status;
16244         status = pthread_create( &t, &attr, task, NULL );
16245 #if HAVE_PTHREADS < 7
16246         if( status < 0 ) status = errno;
16247 #endif
16248         if( status ) return status;
16249 #else
16250         /* Draft 4 pthreads */
16251         status = pthread_create( &t, pthread_attr_default, task, NULL );
16252         if( status ) return errno;
16253
16254         /* give thread a chance to complete */
16255         /* it should remain joinable and hence detachable */
16256         sleep( 1 );
16257
16258         status = pthread_detach( &t );
16259         if( status ) return errno;
16260 #endif
16261
16262 #ifdef HAVE_LINUX_THREADS
16263         pthread_kill_other_threads_np();
16264 #endif
16265
16266         return 0;
16267
16268 }
16269
16270 _ACEOF
16271 if ac_fn_c_try_run "$LINENO"; then :
16272   ol_cv_pthread_kthread=yes
16273 else
16274   ol_cv_pthread_kthread=no
16275 fi
16276 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16277   conftest.$ac_objext conftest.beam conftest.$ac_ext
16278 fi
16279
16280
16281                 # restore the LIBS
16282                 LIBS="$ol_LIBS"
16283
16284 fi
16285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
16286 $as_echo "$ol_cv_pthread_kthread" >&6; }
16287
16288         if test $ol_cv_pthread_kthread = yes ; then
16289                 ol_link_pthreads="-kthread"
16290                 ol_link_threads=posix
16291         fi
16292 fi
16293
16294                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
16295 if test "$ol_link_threads" = no ; then
16296         # try -pthread
16297         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
16298 $as_echo_n "checking for pthread link with -pthread... " >&6; }
16299 if test "${ol_cv_pthread_pthread+set}" = set; then :
16300   $as_echo_n "(cached) " >&6
16301 else
16302
16303                 # save the flags
16304                 ol_LIBS="$LIBS"
16305                 LIBS="-pthread $LIBS"
16306
16307                 if test "$cross_compiling" = yes; then :
16308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16309 /* end confdefs.h.  */
16310
16311 /* pthread test headers */
16312 #include <pthread.h>
16313 #if HAVE_PTHREADS < 7
16314 #include <errno.h>
16315 #endif
16316 #ifndef NULL
16317 #define NULL (void*)0
16318 #endif
16319
16320 static void *task(p)
16321         void *p;
16322 {
16323         return (void *) (p == NULL);
16324 }
16325
16326 int
16327 main ()
16328 {
16329
16330         /* pthread test function */
16331 #ifndef PTHREAD_CREATE_DETACHED
16332 #define PTHREAD_CREATE_DETACHED 1
16333 #endif
16334         pthread_t t;
16335         int status;
16336         int detach = PTHREAD_CREATE_DETACHED;
16337
16338 #if HAVE_PTHREADS > 4
16339         /* Final pthreads */
16340         pthread_attr_t attr;
16341
16342         status = pthread_attr_init(&attr);
16343         if( status ) return status;
16344
16345 #if HAVE_PTHREADS < 7
16346         status = pthread_attr_setdetachstate(&attr, &detach);
16347         if( status < 0 ) status = errno;
16348 #else
16349         status = pthread_attr_setdetachstate(&attr, detach);
16350 #endif
16351         if( status ) return status;
16352         status = pthread_create( &t, &attr, task, NULL );
16353 #if HAVE_PTHREADS < 7
16354         if( status < 0 ) status = errno;
16355 #endif
16356         if( status ) return status;
16357 #else
16358         /* Draft 4 pthreads */
16359         status = pthread_create( &t, pthread_attr_default, task, NULL );
16360         if( status ) return errno;
16361
16362         /* give thread a chance to complete */
16363         /* it should remain joinable and hence detachable */
16364         sleep( 1 );
16365
16366         status = pthread_detach( &t );
16367         if( status ) return errno;
16368 #endif
16369
16370 #ifdef HAVE_LINUX_THREADS
16371         pthread_kill_other_threads_np();
16372 #endif
16373
16374         return 0;
16375
16376   ;
16377   return 0;
16378 }
16379 _ACEOF
16380 if ac_fn_c_try_link "$LINENO"; then :
16381   ol_cv_pthread_pthread=yes
16382 else
16383   ol_cv_pthread_pthread=no
16384 fi
16385 rm -f core conftest.err conftest.$ac_objext \
16386     conftest$ac_exeext conftest.$ac_ext
16387 else
16388   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16389 /* end confdefs.h.  */
16390
16391 /* pthread test headers */
16392 #include <pthread.h>
16393 #if HAVE_PTHREADS < 7
16394 #include <errno.h>
16395 #endif
16396 #ifndef NULL
16397 #define NULL (void*)0
16398 #endif
16399
16400 static void *task(p)
16401         void *p;
16402 {
16403         return (void *) (p == NULL);
16404 }
16405
16406
16407 int main(argc, argv)
16408         int argc;
16409         char **argv;
16410 {
16411
16412         /* pthread test function */
16413 #ifndef PTHREAD_CREATE_DETACHED
16414 #define PTHREAD_CREATE_DETACHED 1
16415 #endif
16416         pthread_t t;
16417         int status;
16418         int detach = PTHREAD_CREATE_DETACHED;
16419
16420 #if HAVE_PTHREADS > 4
16421         /* Final pthreads */
16422         pthread_attr_t attr;
16423
16424         status = pthread_attr_init(&attr);
16425         if( status ) return status;
16426
16427 #if HAVE_PTHREADS < 7
16428         status = pthread_attr_setdetachstate(&attr, &detach);
16429         if( status < 0 ) status = errno;
16430 #else
16431         status = pthread_attr_setdetachstate(&attr, detach);
16432 #endif
16433         if( status ) return status;
16434         status = pthread_create( &t, &attr, task, NULL );
16435 #if HAVE_PTHREADS < 7
16436         if( status < 0 ) status = errno;
16437 #endif
16438         if( status ) return status;
16439 #else
16440         /* Draft 4 pthreads */
16441         status = pthread_create( &t, pthread_attr_default, task, NULL );
16442         if( status ) return errno;
16443
16444         /* give thread a chance to complete */
16445         /* it should remain joinable and hence detachable */
16446         sleep( 1 );
16447
16448         status = pthread_detach( &t );
16449         if( status ) return errno;
16450 #endif
16451
16452 #ifdef HAVE_LINUX_THREADS
16453         pthread_kill_other_threads_np();
16454 #endif
16455
16456         return 0;
16457
16458 }
16459
16460 _ACEOF
16461 if ac_fn_c_try_run "$LINENO"; then :
16462   ol_cv_pthread_pthread=yes
16463 else
16464   ol_cv_pthread_pthread=no
16465 fi
16466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16467   conftest.$ac_objext conftest.beam conftest.$ac_ext
16468 fi
16469
16470
16471                 # restore the LIBS
16472                 LIBS="$ol_LIBS"
16473
16474 fi
16475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
16476 $as_echo "$ol_cv_pthread_pthread" >&6; }
16477
16478         if test $ol_cv_pthread_pthread = yes ; then
16479                 ol_link_pthreads="-pthread"
16480                 ol_link_threads=posix
16481         fi
16482 fi
16483
16484                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
16485 if test "$ol_link_threads" = no ; then
16486         # try -pthreads
16487         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
16488 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
16489 if test "${ol_cv_pthread_pthreads+set}" = set; then :
16490   $as_echo_n "(cached) " >&6
16491 else
16492
16493                 # save the flags
16494                 ol_LIBS="$LIBS"
16495                 LIBS="-pthreads $LIBS"
16496
16497                 if test "$cross_compiling" = yes; then :
16498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16499 /* end confdefs.h.  */
16500
16501 /* pthread test headers */
16502 #include <pthread.h>
16503 #if HAVE_PTHREADS < 7
16504 #include <errno.h>
16505 #endif
16506 #ifndef NULL
16507 #define NULL (void*)0
16508 #endif
16509
16510 static void *task(p)
16511         void *p;
16512 {
16513         return (void *) (p == NULL);
16514 }
16515
16516 int
16517 main ()
16518 {
16519
16520         /* pthread test function */
16521 #ifndef PTHREAD_CREATE_DETACHED
16522 #define PTHREAD_CREATE_DETACHED 1
16523 #endif
16524         pthread_t t;
16525         int status;
16526         int detach = PTHREAD_CREATE_DETACHED;
16527
16528 #if HAVE_PTHREADS > 4
16529         /* Final pthreads */
16530         pthread_attr_t attr;
16531
16532         status = pthread_attr_init(&attr);
16533         if( status ) return status;
16534
16535 #if HAVE_PTHREADS < 7
16536         status = pthread_attr_setdetachstate(&attr, &detach);
16537         if( status < 0 ) status = errno;
16538 #else
16539         status = pthread_attr_setdetachstate(&attr, detach);
16540 #endif
16541         if( status ) return status;
16542         status = pthread_create( &t, &attr, task, NULL );
16543 #if HAVE_PTHREADS < 7
16544         if( status < 0 ) status = errno;
16545 #endif
16546         if( status ) return status;
16547 #else
16548         /* Draft 4 pthreads */
16549         status = pthread_create( &t, pthread_attr_default, task, NULL );
16550         if( status ) return errno;
16551
16552         /* give thread a chance to complete */
16553         /* it should remain joinable and hence detachable */
16554         sleep( 1 );
16555
16556         status = pthread_detach( &t );
16557         if( status ) return errno;
16558 #endif
16559
16560 #ifdef HAVE_LINUX_THREADS
16561         pthread_kill_other_threads_np();
16562 #endif
16563
16564         return 0;
16565
16566   ;
16567   return 0;
16568 }
16569 _ACEOF
16570 if ac_fn_c_try_link "$LINENO"; then :
16571   ol_cv_pthread_pthreads=yes
16572 else
16573   ol_cv_pthread_pthreads=no
16574 fi
16575 rm -f core conftest.err conftest.$ac_objext \
16576     conftest$ac_exeext conftest.$ac_ext
16577 else
16578   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16579 /* end confdefs.h.  */
16580
16581 /* pthread test headers */
16582 #include <pthread.h>
16583 #if HAVE_PTHREADS < 7
16584 #include <errno.h>
16585 #endif
16586 #ifndef NULL
16587 #define NULL (void*)0
16588 #endif
16589
16590 static void *task(p)
16591         void *p;
16592 {
16593         return (void *) (p == NULL);
16594 }
16595
16596
16597 int main(argc, argv)
16598         int argc;
16599         char **argv;
16600 {
16601
16602         /* pthread test function */
16603 #ifndef PTHREAD_CREATE_DETACHED
16604 #define PTHREAD_CREATE_DETACHED 1
16605 #endif
16606         pthread_t t;
16607         int status;
16608         int detach = PTHREAD_CREATE_DETACHED;
16609
16610 #if HAVE_PTHREADS > 4
16611         /* Final pthreads */
16612         pthread_attr_t attr;
16613
16614         status = pthread_attr_init(&attr);
16615         if( status ) return status;
16616
16617 #if HAVE_PTHREADS < 7
16618         status = pthread_attr_setdetachstate(&attr, &detach);
16619         if( status < 0 ) status = errno;
16620 #else
16621         status = pthread_attr_setdetachstate(&attr, detach);
16622 #endif
16623         if( status ) return status;
16624         status = pthread_create( &t, &attr, task, NULL );
16625 #if HAVE_PTHREADS < 7
16626         if( status < 0 ) status = errno;
16627 #endif
16628         if( status ) return status;
16629 #else
16630         /* Draft 4 pthreads */
16631         status = pthread_create( &t, pthread_attr_default, task, NULL );
16632         if( status ) return errno;
16633
16634         /* give thread a chance to complete */
16635         /* it should remain joinable and hence detachable */
16636         sleep( 1 );
16637
16638         status = pthread_detach( &t );
16639         if( status ) return errno;
16640 #endif
16641
16642 #ifdef HAVE_LINUX_THREADS
16643         pthread_kill_other_threads_np();
16644 #endif
16645
16646         return 0;
16647
16648 }
16649
16650 _ACEOF
16651 if ac_fn_c_try_run "$LINENO"; then :
16652   ol_cv_pthread_pthreads=yes
16653 else
16654   ol_cv_pthread_pthreads=no
16655 fi
16656 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16657   conftest.$ac_objext conftest.beam conftest.$ac_ext
16658 fi
16659
16660
16661                 # restore the LIBS
16662                 LIBS="$ol_LIBS"
16663
16664 fi
16665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
16666 $as_echo "$ol_cv_pthread_pthreads" >&6; }
16667
16668         if test $ol_cv_pthread_pthreads = yes ; then
16669                 ol_link_pthreads="-pthreads"
16670                 ol_link_threads=posix
16671         fi
16672 fi
16673
16674                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
16675 if test "$ol_link_threads" = no ; then
16676         # try -mthreads
16677         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
16678 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
16679 if test "${ol_cv_pthread_mthreads+set}" = set; then :
16680   $as_echo_n "(cached) " >&6
16681 else
16682
16683                 # save the flags
16684                 ol_LIBS="$LIBS"
16685                 LIBS="-mthreads $LIBS"
16686
16687                 if test "$cross_compiling" = yes; then :
16688   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16689 /* end confdefs.h.  */
16690
16691 /* pthread test headers */
16692 #include <pthread.h>
16693 #if HAVE_PTHREADS < 7
16694 #include <errno.h>
16695 #endif
16696 #ifndef NULL
16697 #define NULL (void*)0
16698 #endif
16699
16700 static void *task(p)
16701         void *p;
16702 {
16703         return (void *) (p == NULL);
16704 }
16705
16706 int
16707 main ()
16708 {
16709
16710         /* pthread test function */
16711 #ifndef PTHREAD_CREATE_DETACHED
16712 #define PTHREAD_CREATE_DETACHED 1
16713 #endif
16714         pthread_t t;
16715         int status;
16716         int detach = PTHREAD_CREATE_DETACHED;
16717
16718 #if HAVE_PTHREADS > 4
16719         /* Final pthreads */
16720         pthread_attr_t attr;
16721
16722         status = pthread_attr_init(&attr);
16723         if( status ) return status;
16724
16725 #if HAVE_PTHREADS < 7
16726         status = pthread_attr_setdetachstate(&attr, &detach);
16727         if( status < 0 ) status = errno;
16728 #else
16729         status = pthread_attr_setdetachstate(&attr, detach);
16730 #endif
16731         if( status ) return status;
16732         status = pthread_create( &t, &attr, task, NULL );
16733 #if HAVE_PTHREADS < 7
16734         if( status < 0 ) status = errno;
16735 #endif
16736         if( status ) return status;
16737 #else
16738         /* Draft 4 pthreads */
16739         status = pthread_create( &t, pthread_attr_default, task, NULL );
16740         if( status ) return errno;
16741
16742         /* give thread a chance to complete */
16743         /* it should remain joinable and hence detachable */
16744         sleep( 1 );
16745
16746         status = pthread_detach( &t );
16747         if( status ) return errno;
16748 #endif
16749
16750 #ifdef HAVE_LINUX_THREADS
16751         pthread_kill_other_threads_np();
16752 #endif
16753
16754         return 0;
16755
16756   ;
16757   return 0;
16758 }
16759 _ACEOF
16760 if ac_fn_c_try_link "$LINENO"; then :
16761   ol_cv_pthread_mthreads=yes
16762 else
16763   ol_cv_pthread_mthreads=no
16764 fi
16765 rm -f core conftest.err conftest.$ac_objext \
16766     conftest$ac_exeext conftest.$ac_ext
16767 else
16768   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16769 /* end confdefs.h.  */
16770
16771 /* pthread test headers */
16772 #include <pthread.h>
16773 #if HAVE_PTHREADS < 7
16774 #include <errno.h>
16775 #endif
16776 #ifndef NULL
16777 #define NULL (void*)0
16778 #endif
16779
16780 static void *task(p)
16781         void *p;
16782 {
16783         return (void *) (p == NULL);
16784 }
16785
16786
16787 int main(argc, argv)
16788         int argc;
16789         char **argv;
16790 {
16791
16792         /* pthread test function */
16793 #ifndef PTHREAD_CREATE_DETACHED
16794 #define PTHREAD_CREATE_DETACHED 1
16795 #endif
16796         pthread_t t;
16797         int status;
16798         int detach = PTHREAD_CREATE_DETACHED;
16799
16800 #if HAVE_PTHREADS > 4
16801         /* Final pthreads */
16802         pthread_attr_t attr;
16803
16804         status = pthread_attr_init(&attr);
16805         if( status ) return status;
16806
16807 #if HAVE_PTHREADS < 7
16808         status = pthread_attr_setdetachstate(&attr, &detach);
16809         if( status < 0 ) status = errno;
16810 #else
16811         status = pthread_attr_setdetachstate(&attr, detach);
16812 #endif
16813         if( status ) return status;
16814         status = pthread_create( &t, &attr, task, NULL );
16815 #if HAVE_PTHREADS < 7
16816         if( status < 0 ) status = errno;
16817 #endif
16818         if( status ) return status;
16819 #else
16820         /* Draft 4 pthreads */
16821         status = pthread_create( &t, pthread_attr_default, task, NULL );
16822         if( status ) return errno;
16823
16824         /* give thread a chance to complete */
16825         /* it should remain joinable and hence detachable */
16826         sleep( 1 );
16827
16828         status = pthread_detach( &t );
16829         if( status ) return errno;
16830 #endif
16831
16832 #ifdef HAVE_LINUX_THREADS
16833         pthread_kill_other_threads_np();
16834 #endif
16835
16836         return 0;
16837
16838 }
16839
16840 _ACEOF
16841 if ac_fn_c_try_run "$LINENO"; then :
16842   ol_cv_pthread_mthreads=yes
16843 else
16844   ol_cv_pthread_mthreads=no
16845 fi
16846 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16847   conftest.$ac_objext conftest.beam conftest.$ac_ext
16848 fi
16849
16850
16851                 # restore the LIBS
16852                 LIBS="$ol_LIBS"
16853
16854 fi
16855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
16856 $as_echo "$ol_cv_pthread_mthreads" >&6; }
16857
16858         if test $ol_cv_pthread_mthreads = yes ; then
16859                 ol_link_pthreads="-mthreads"
16860                 ol_link_threads=posix
16861         fi
16862 fi
16863
16864                 # Pthread try link: -thread (ol_cv_pthread_thread)
16865 if test "$ol_link_threads" = no ; then
16866         # try -thread
16867         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
16868 $as_echo_n "checking for pthread link with -thread... " >&6; }
16869 if test "${ol_cv_pthread_thread+set}" = set; then :
16870   $as_echo_n "(cached) " >&6
16871 else
16872
16873                 # save the flags
16874                 ol_LIBS="$LIBS"
16875                 LIBS="-thread $LIBS"
16876
16877                 if test "$cross_compiling" = yes; then :
16878   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16879 /* end confdefs.h.  */
16880
16881 /* pthread test headers */
16882 #include <pthread.h>
16883 #if HAVE_PTHREADS < 7
16884 #include <errno.h>
16885 #endif
16886 #ifndef NULL
16887 #define NULL (void*)0
16888 #endif
16889
16890 static void *task(p)
16891         void *p;
16892 {
16893         return (void *) (p == NULL);
16894 }
16895
16896 int
16897 main ()
16898 {
16899
16900         /* pthread test function */
16901 #ifndef PTHREAD_CREATE_DETACHED
16902 #define PTHREAD_CREATE_DETACHED 1
16903 #endif
16904         pthread_t t;
16905         int status;
16906         int detach = PTHREAD_CREATE_DETACHED;
16907
16908 #if HAVE_PTHREADS > 4
16909         /* Final pthreads */
16910         pthread_attr_t attr;
16911
16912         status = pthread_attr_init(&attr);
16913         if( status ) return status;
16914
16915 #if HAVE_PTHREADS < 7
16916         status = pthread_attr_setdetachstate(&attr, &detach);
16917         if( status < 0 ) status = errno;
16918 #else
16919         status = pthread_attr_setdetachstate(&attr, detach);
16920 #endif
16921         if( status ) return status;
16922         status = pthread_create( &t, &attr, task, NULL );
16923 #if HAVE_PTHREADS < 7
16924         if( status < 0 ) status = errno;
16925 #endif
16926         if( status ) return status;
16927 #else
16928         /* Draft 4 pthreads */
16929         status = pthread_create( &t, pthread_attr_default, task, NULL );
16930         if( status ) return errno;
16931
16932         /* give thread a chance to complete */
16933         /* it should remain joinable and hence detachable */
16934         sleep( 1 );
16935
16936         status = pthread_detach( &t );
16937         if( status ) return errno;
16938 #endif
16939
16940 #ifdef HAVE_LINUX_THREADS
16941         pthread_kill_other_threads_np();
16942 #endif
16943
16944         return 0;
16945
16946   ;
16947   return 0;
16948 }
16949 _ACEOF
16950 if ac_fn_c_try_link "$LINENO"; then :
16951   ol_cv_pthread_thread=yes
16952 else
16953   ol_cv_pthread_thread=no
16954 fi
16955 rm -f core conftest.err conftest.$ac_objext \
16956     conftest$ac_exeext conftest.$ac_ext
16957 else
16958   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16959 /* end confdefs.h.  */
16960
16961 /* pthread test headers */
16962 #include <pthread.h>
16963 #if HAVE_PTHREADS < 7
16964 #include <errno.h>
16965 #endif
16966 #ifndef NULL
16967 #define NULL (void*)0
16968 #endif
16969
16970 static void *task(p)
16971         void *p;
16972 {
16973         return (void *) (p == NULL);
16974 }
16975
16976
16977 int main(argc, argv)
16978         int argc;
16979         char **argv;
16980 {
16981
16982         /* pthread test function */
16983 #ifndef PTHREAD_CREATE_DETACHED
16984 #define PTHREAD_CREATE_DETACHED 1
16985 #endif
16986         pthread_t t;
16987         int status;
16988         int detach = PTHREAD_CREATE_DETACHED;
16989
16990 #if HAVE_PTHREADS > 4
16991         /* Final pthreads */
16992         pthread_attr_t attr;
16993
16994         status = pthread_attr_init(&attr);
16995         if( status ) return status;
16996
16997 #if HAVE_PTHREADS < 7
16998         status = pthread_attr_setdetachstate(&attr, &detach);
16999         if( status < 0 ) status = errno;
17000 #else
17001         status = pthread_attr_setdetachstate(&attr, detach);
17002 #endif
17003         if( status ) return status;
17004         status = pthread_create( &t, &attr, task, NULL );
17005 #if HAVE_PTHREADS < 7
17006         if( status < 0 ) status = errno;
17007 #endif
17008         if( status ) return status;
17009 #else
17010         /* Draft 4 pthreads */
17011         status = pthread_create( &t, pthread_attr_default, task, NULL );
17012         if( status ) return errno;
17013
17014         /* give thread a chance to complete */
17015         /* it should remain joinable and hence detachable */
17016         sleep( 1 );
17017
17018         status = pthread_detach( &t );
17019         if( status ) return errno;
17020 #endif
17021
17022 #ifdef HAVE_LINUX_THREADS
17023         pthread_kill_other_threads_np();
17024 #endif
17025
17026         return 0;
17027
17028 }
17029
17030 _ACEOF
17031 if ac_fn_c_try_run "$LINENO"; then :
17032   ol_cv_pthread_thread=yes
17033 else
17034   ol_cv_pthread_thread=no
17035 fi
17036 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17037   conftest.$ac_objext conftest.beam conftest.$ac_ext
17038 fi
17039
17040
17041                 # restore the LIBS
17042                 LIBS="$ol_LIBS"
17043
17044 fi
17045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
17046 $as_echo "$ol_cv_pthread_thread" >&6; }
17047
17048         if test $ol_cv_pthread_thread = yes ; then
17049                 ol_link_pthreads="-thread"
17050                 ol_link_threads=posix
17051         fi
17052 fi
17053
17054
17055                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
17056 if test "$ol_link_threads" = no ; then
17057         # try -lpthread -lmach -lexc -lc_r
17058         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
17059 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
17060 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then :
17061   $as_echo_n "(cached) " >&6
17062 else
17063
17064                 # save the flags
17065                 ol_LIBS="$LIBS"
17066                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
17067
17068                 if test "$cross_compiling" = yes; then :
17069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17070 /* end confdefs.h.  */
17071
17072 /* pthread test headers */
17073 #include <pthread.h>
17074 #if HAVE_PTHREADS < 7
17075 #include <errno.h>
17076 #endif
17077 #ifndef NULL
17078 #define NULL (void*)0
17079 #endif
17080
17081 static void *task(p)
17082         void *p;
17083 {
17084         return (void *) (p == NULL);
17085 }
17086
17087 int
17088 main ()
17089 {
17090
17091         /* pthread test function */
17092 #ifndef PTHREAD_CREATE_DETACHED
17093 #define PTHREAD_CREATE_DETACHED 1
17094 #endif
17095         pthread_t t;
17096         int status;
17097         int detach = PTHREAD_CREATE_DETACHED;
17098
17099 #if HAVE_PTHREADS > 4
17100         /* Final pthreads */
17101         pthread_attr_t attr;
17102
17103         status = pthread_attr_init(&attr);
17104         if( status ) return status;
17105
17106 #if HAVE_PTHREADS < 7
17107         status = pthread_attr_setdetachstate(&attr, &detach);
17108         if( status < 0 ) status = errno;
17109 #else
17110         status = pthread_attr_setdetachstate(&attr, detach);
17111 #endif
17112         if( status ) return status;
17113         status = pthread_create( &t, &attr, task, NULL );
17114 #if HAVE_PTHREADS < 7
17115         if( status < 0 ) status = errno;
17116 #endif
17117         if( status ) return status;
17118 #else
17119         /* Draft 4 pthreads */
17120         status = pthread_create( &t, pthread_attr_default, task, NULL );
17121         if( status ) return errno;
17122
17123         /* give thread a chance to complete */
17124         /* it should remain joinable and hence detachable */
17125         sleep( 1 );
17126
17127         status = pthread_detach( &t );
17128         if( status ) return errno;
17129 #endif
17130
17131 #ifdef HAVE_LINUX_THREADS
17132         pthread_kill_other_threads_np();
17133 #endif
17134
17135         return 0;
17136
17137   ;
17138   return 0;
17139 }
17140 _ACEOF
17141 if ac_fn_c_try_link "$LINENO"; then :
17142   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17143 else
17144   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17145 fi
17146 rm -f core conftest.err conftest.$ac_objext \
17147     conftest$ac_exeext conftest.$ac_ext
17148 else
17149   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17150 /* end confdefs.h.  */
17151
17152 /* pthread test headers */
17153 #include <pthread.h>
17154 #if HAVE_PTHREADS < 7
17155 #include <errno.h>
17156 #endif
17157 #ifndef NULL
17158 #define NULL (void*)0
17159 #endif
17160
17161 static void *task(p)
17162         void *p;
17163 {
17164         return (void *) (p == NULL);
17165 }
17166
17167
17168 int main(argc, argv)
17169         int argc;
17170         char **argv;
17171 {
17172
17173         /* pthread test function */
17174 #ifndef PTHREAD_CREATE_DETACHED
17175 #define PTHREAD_CREATE_DETACHED 1
17176 #endif
17177         pthread_t t;
17178         int status;
17179         int detach = PTHREAD_CREATE_DETACHED;
17180
17181 #if HAVE_PTHREADS > 4
17182         /* Final pthreads */
17183         pthread_attr_t attr;
17184
17185         status = pthread_attr_init(&attr);
17186         if( status ) return status;
17187
17188 #if HAVE_PTHREADS < 7
17189         status = pthread_attr_setdetachstate(&attr, &detach);
17190         if( status < 0 ) status = errno;
17191 #else
17192         status = pthread_attr_setdetachstate(&attr, detach);
17193 #endif
17194         if( status ) return status;
17195         status = pthread_create( &t, &attr, task, NULL );
17196 #if HAVE_PTHREADS < 7
17197         if( status < 0 ) status = errno;
17198 #endif
17199         if( status ) return status;
17200 #else
17201         /* Draft 4 pthreads */
17202         status = pthread_create( &t, pthread_attr_default, task, NULL );
17203         if( status ) return errno;
17204
17205         /* give thread a chance to complete */
17206         /* it should remain joinable and hence detachable */
17207         sleep( 1 );
17208
17209         status = pthread_detach( &t );
17210         if( status ) return errno;
17211 #endif
17212
17213 #ifdef HAVE_LINUX_THREADS
17214         pthread_kill_other_threads_np();
17215 #endif
17216
17217         return 0;
17218
17219 }
17220
17221 _ACEOF
17222 if ac_fn_c_try_run "$LINENO"; then :
17223   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17224 else
17225   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17226 fi
17227 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17228   conftest.$ac_objext conftest.beam conftest.$ac_ext
17229 fi
17230
17231
17232                 # restore the LIBS
17233                 LIBS="$ol_LIBS"
17234
17235 fi
17236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
17237 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
17238
17239         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
17240                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
17241                 ol_link_threads=posix
17242         fi
17243 fi
17244
17245                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
17246 if test "$ol_link_threads" = no ; then
17247         # try -lpthread -lmach -lexc
17248         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
17249 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
17250 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then :
17251   $as_echo_n "(cached) " >&6
17252 else
17253
17254                 # save the flags
17255                 ol_LIBS="$LIBS"
17256                 LIBS="-lpthread -lmach -lexc $LIBS"
17257
17258                 if test "$cross_compiling" = yes; then :
17259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17260 /* end confdefs.h.  */
17261
17262 /* pthread test headers */
17263 #include <pthread.h>
17264 #if HAVE_PTHREADS < 7
17265 #include <errno.h>
17266 #endif
17267 #ifndef NULL
17268 #define NULL (void*)0
17269 #endif
17270
17271 static void *task(p)
17272         void *p;
17273 {
17274         return (void *) (p == NULL);
17275 }
17276
17277 int
17278 main ()
17279 {
17280
17281         /* pthread test function */
17282 #ifndef PTHREAD_CREATE_DETACHED
17283 #define PTHREAD_CREATE_DETACHED 1
17284 #endif
17285         pthread_t t;
17286         int status;
17287         int detach = PTHREAD_CREATE_DETACHED;
17288
17289 #if HAVE_PTHREADS > 4
17290         /* Final pthreads */
17291         pthread_attr_t attr;
17292
17293         status = pthread_attr_init(&attr);
17294         if( status ) return status;
17295
17296 #if HAVE_PTHREADS < 7
17297         status = pthread_attr_setdetachstate(&attr, &detach);
17298         if( status < 0 ) status = errno;
17299 #else
17300         status = pthread_attr_setdetachstate(&attr, detach);
17301 #endif
17302         if( status ) return status;
17303         status = pthread_create( &t, &attr, task, NULL );
17304 #if HAVE_PTHREADS < 7
17305         if( status < 0 ) status = errno;
17306 #endif
17307         if( status ) return status;
17308 #else
17309         /* Draft 4 pthreads */
17310         status = pthread_create( &t, pthread_attr_default, task, NULL );
17311         if( status ) return errno;
17312
17313         /* give thread a chance to complete */
17314         /* it should remain joinable and hence detachable */
17315         sleep( 1 );
17316
17317         status = pthread_detach( &t );
17318         if( status ) return errno;
17319 #endif
17320
17321 #ifdef HAVE_LINUX_THREADS
17322         pthread_kill_other_threads_np();
17323 #endif
17324
17325         return 0;
17326
17327   ;
17328   return 0;
17329 }
17330 _ACEOF
17331 if ac_fn_c_try_link "$LINENO"; then :
17332   ol_cv_pthread_lpthread_lmach_lexc=yes
17333 else
17334   ol_cv_pthread_lpthread_lmach_lexc=no
17335 fi
17336 rm -f core conftest.err conftest.$ac_objext \
17337     conftest$ac_exeext conftest.$ac_ext
17338 else
17339   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17340 /* end confdefs.h.  */
17341
17342 /* pthread test headers */
17343 #include <pthread.h>
17344 #if HAVE_PTHREADS < 7
17345 #include <errno.h>
17346 #endif
17347 #ifndef NULL
17348 #define NULL (void*)0
17349 #endif
17350
17351 static void *task(p)
17352         void *p;
17353 {
17354         return (void *) (p == NULL);
17355 }
17356
17357
17358 int main(argc, argv)
17359         int argc;
17360         char **argv;
17361 {
17362
17363         /* pthread test function */
17364 #ifndef PTHREAD_CREATE_DETACHED
17365 #define PTHREAD_CREATE_DETACHED 1
17366 #endif
17367         pthread_t t;
17368         int status;
17369         int detach = PTHREAD_CREATE_DETACHED;
17370
17371 #if HAVE_PTHREADS > 4
17372         /* Final pthreads */
17373         pthread_attr_t attr;
17374
17375         status = pthread_attr_init(&attr);
17376         if( status ) return status;
17377
17378 #if HAVE_PTHREADS < 7
17379         status = pthread_attr_setdetachstate(&attr, &detach);
17380         if( status < 0 ) status = errno;
17381 #else
17382         status = pthread_attr_setdetachstate(&attr, detach);
17383 #endif
17384         if( status ) return status;
17385         status = pthread_create( &t, &attr, task, NULL );
17386 #if HAVE_PTHREADS < 7
17387         if( status < 0 ) status = errno;
17388 #endif
17389         if( status ) return status;
17390 #else
17391         /* Draft 4 pthreads */
17392         status = pthread_create( &t, pthread_attr_default, task, NULL );
17393         if( status ) return errno;
17394
17395         /* give thread a chance to complete */
17396         /* it should remain joinable and hence detachable */
17397         sleep( 1 );
17398
17399         status = pthread_detach( &t );
17400         if( status ) return errno;
17401 #endif
17402
17403 #ifdef HAVE_LINUX_THREADS
17404         pthread_kill_other_threads_np();
17405 #endif
17406
17407         return 0;
17408
17409 }
17410
17411 _ACEOF
17412 if ac_fn_c_try_run "$LINENO"; then :
17413   ol_cv_pthread_lpthread_lmach_lexc=yes
17414 else
17415   ol_cv_pthread_lpthread_lmach_lexc=no
17416 fi
17417 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17418   conftest.$ac_objext conftest.beam conftest.$ac_ext
17419 fi
17420
17421
17422                 # restore the LIBS
17423                 LIBS="$ol_LIBS"
17424
17425 fi
17426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
17427 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
17428
17429         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
17430                 ol_link_pthreads="-lpthread -lmach -lexc"
17431                 ol_link_threads=posix
17432         fi
17433 fi
17434
17435
17436                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
17437 if test "$ol_link_threads" = no ; then
17438         # try -lpthread -Wl,-woff,85
17439         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
17440 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
17441 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then :
17442   $as_echo_n "(cached) " >&6
17443 else
17444
17445                 # save the flags
17446                 ol_LIBS="$LIBS"
17447                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
17448
17449                 if test "$cross_compiling" = yes; then :
17450   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17451 /* end confdefs.h.  */
17452
17453 /* pthread test headers */
17454 #include <pthread.h>
17455 #if HAVE_PTHREADS < 7
17456 #include <errno.h>
17457 #endif
17458 #ifndef NULL
17459 #define NULL (void*)0
17460 #endif
17461
17462 static void *task(p)
17463         void *p;
17464 {
17465         return (void *) (p == NULL);
17466 }
17467
17468 int
17469 main ()
17470 {
17471
17472         /* pthread test function */
17473 #ifndef PTHREAD_CREATE_DETACHED
17474 #define PTHREAD_CREATE_DETACHED 1
17475 #endif
17476         pthread_t t;
17477         int status;
17478         int detach = PTHREAD_CREATE_DETACHED;
17479
17480 #if HAVE_PTHREADS > 4
17481         /* Final pthreads */
17482         pthread_attr_t attr;
17483
17484         status = pthread_attr_init(&attr);
17485         if( status ) return status;
17486
17487 #if HAVE_PTHREADS < 7
17488         status = pthread_attr_setdetachstate(&attr, &detach);
17489         if( status < 0 ) status = errno;
17490 #else
17491         status = pthread_attr_setdetachstate(&attr, detach);
17492 #endif
17493         if( status ) return status;
17494         status = pthread_create( &t, &attr, task, NULL );
17495 #if HAVE_PTHREADS < 7
17496         if( status < 0 ) status = errno;
17497 #endif
17498         if( status ) return status;
17499 #else
17500         /* Draft 4 pthreads */
17501         status = pthread_create( &t, pthread_attr_default, task, NULL );
17502         if( status ) return errno;
17503
17504         /* give thread a chance to complete */
17505         /* it should remain joinable and hence detachable */
17506         sleep( 1 );
17507
17508         status = pthread_detach( &t );
17509         if( status ) return errno;
17510 #endif
17511
17512 #ifdef HAVE_LINUX_THREADS
17513         pthread_kill_other_threads_np();
17514 #endif
17515
17516         return 0;
17517
17518   ;
17519   return 0;
17520 }
17521 _ACEOF
17522 if ac_fn_c_try_link "$LINENO"; then :
17523   ol_cv_pthread_lib_lpthread_woff=yes
17524 else
17525   ol_cv_pthread_lib_lpthread_woff=no
17526 fi
17527 rm -f core conftest.err conftest.$ac_objext \
17528     conftest$ac_exeext conftest.$ac_ext
17529 else
17530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17531 /* end confdefs.h.  */
17532
17533 /* pthread test headers */
17534 #include <pthread.h>
17535 #if HAVE_PTHREADS < 7
17536 #include <errno.h>
17537 #endif
17538 #ifndef NULL
17539 #define NULL (void*)0
17540 #endif
17541
17542 static void *task(p)
17543         void *p;
17544 {
17545         return (void *) (p == NULL);
17546 }
17547
17548
17549 int main(argc, argv)
17550         int argc;
17551         char **argv;
17552 {
17553
17554         /* pthread test function */
17555 #ifndef PTHREAD_CREATE_DETACHED
17556 #define PTHREAD_CREATE_DETACHED 1
17557 #endif
17558         pthread_t t;
17559         int status;
17560         int detach = PTHREAD_CREATE_DETACHED;
17561
17562 #if HAVE_PTHREADS > 4
17563         /* Final pthreads */
17564         pthread_attr_t attr;
17565
17566         status = pthread_attr_init(&attr);
17567         if( status ) return status;
17568
17569 #if HAVE_PTHREADS < 7
17570         status = pthread_attr_setdetachstate(&attr, &detach);
17571         if( status < 0 ) status = errno;
17572 #else
17573         status = pthread_attr_setdetachstate(&attr, detach);
17574 #endif
17575         if( status ) return status;
17576         status = pthread_create( &t, &attr, task, NULL );
17577 #if HAVE_PTHREADS < 7
17578         if( status < 0 ) status = errno;
17579 #endif
17580         if( status ) return status;
17581 #else
17582         /* Draft 4 pthreads */
17583         status = pthread_create( &t, pthread_attr_default, task, NULL );
17584         if( status ) return errno;
17585
17586         /* give thread a chance to complete */
17587         /* it should remain joinable and hence detachable */
17588         sleep( 1 );
17589
17590         status = pthread_detach( &t );
17591         if( status ) return errno;
17592 #endif
17593
17594 #ifdef HAVE_LINUX_THREADS
17595         pthread_kill_other_threads_np();
17596 #endif
17597
17598         return 0;
17599
17600 }
17601
17602 _ACEOF
17603 if ac_fn_c_try_run "$LINENO"; then :
17604   ol_cv_pthread_lib_lpthread_woff=yes
17605 else
17606   ol_cv_pthread_lib_lpthread_woff=no
17607 fi
17608 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17609   conftest.$ac_objext conftest.beam conftest.$ac_ext
17610 fi
17611
17612
17613                 # restore the LIBS
17614                 LIBS="$ol_LIBS"
17615
17616 fi
17617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
17618 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
17619
17620         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
17621                 ol_link_pthreads="-lpthread -Wl,-woff,85"
17622                 ol_link_threads=posix
17623         fi
17624 fi
17625
17626
17627                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
17628 if test "$ol_link_threads" = no ; then
17629         # try -lpthread
17630         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
17631 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
17632 if test "${ol_cv_pthread_lpthread+set}" = set; then :
17633   $as_echo_n "(cached) " >&6
17634 else
17635
17636                 # save the flags
17637                 ol_LIBS="$LIBS"
17638                 LIBS="-lpthread $LIBS"
17639
17640                 if test "$cross_compiling" = yes; then :
17641   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17642 /* end confdefs.h.  */
17643
17644 /* pthread test headers */
17645 #include <pthread.h>
17646 #if HAVE_PTHREADS < 7
17647 #include <errno.h>
17648 #endif
17649 #ifndef NULL
17650 #define NULL (void*)0
17651 #endif
17652
17653 static void *task(p)
17654         void *p;
17655 {
17656         return (void *) (p == NULL);
17657 }
17658
17659 int
17660 main ()
17661 {
17662
17663         /* pthread test function */
17664 #ifndef PTHREAD_CREATE_DETACHED
17665 #define PTHREAD_CREATE_DETACHED 1
17666 #endif
17667         pthread_t t;
17668         int status;
17669         int detach = PTHREAD_CREATE_DETACHED;
17670
17671 #if HAVE_PTHREADS > 4
17672         /* Final pthreads */
17673         pthread_attr_t attr;
17674
17675         status = pthread_attr_init(&attr);
17676         if( status ) return status;
17677
17678 #if HAVE_PTHREADS < 7
17679         status = pthread_attr_setdetachstate(&attr, &detach);
17680         if( status < 0 ) status = errno;
17681 #else
17682         status = pthread_attr_setdetachstate(&attr, detach);
17683 #endif
17684         if( status ) return status;
17685         status = pthread_create( &t, &attr, task, NULL );
17686 #if HAVE_PTHREADS < 7
17687         if( status < 0 ) status = errno;
17688 #endif
17689         if( status ) return status;
17690 #else
17691         /* Draft 4 pthreads */
17692         status = pthread_create( &t, pthread_attr_default, task, NULL );
17693         if( status ) return errno;
17694
17695         /* give thread a chance to complete */
17696         /* it should remain joinable and hence detachable */
17697         sleep( 1 );
17698
17699         status = pthread_detach( &t );
17700         if( status ) return errno;
17701 #endif
17702
17703 #ifdef HAVE_LINUX_THREADS
17704         pthread_kill_other_threads_np();
17705 #endif
17706
17707         return 0;
17708
17709   ;
17710   return 0;
17711 }
17712 _ACEOF
17713 if ac_fn_c_try_link "$LINENO"; then :
17714   ol_cv_pthread_lpthread=yes
17715 else
17716   ol_cv_pthread_lpthread=no
17717 fi
17718 rm -f core conftest.err conftest.$ac_objext \
17719     conftest$ac_exeext conftest.$ac_ext
17720 else
17721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17722 /* end confdefs.h.  */
17723
17724 /* pthread test headers */
17725 #include <pthread.h>
17726 #if HAVE_PTHREADS < 7
17727 #include <errno.h>
17728 #endif
17729 #ifndef NULL
17730 #define NULL (void*)0
17731 #endif
17732
17733 static void *task(p)
17734         void *p;
17735 {
17736         return (void *) (p == NULL);
17737 }
17738
17739
17740 int main(argc, argv)
17741         int argc;
17742         char **argv;
17743 {
17744
17745         /* pthread test function */
17746 #ifndef PTHREAD_CREATE_DETACHED
17747 #define PTHREAD_CREATE_DETACHED 1
17748 #endif
17749         pthread_t t;
17750         int status;
17751         int detach = PTHREAD_CREATE_DETACHED;
17752
17753 #if HAVE_PTHREADS > 4
17754         /* Final pthreads */
17755         pthread_attr_t attr;
17756
17757         status = pthread_attr_init(&attr);
17758         if( status ) return status;
17759
17760 #if HAVE_PTHREADS < 7
17761         status = pthread_attr_setdetachstate(&attr, &detach);
17762         if( status < 0 ) status = errno;
17763 #else
17764         status = pthread_attr_setdetachstate(&attr, detach);
17765 #endif
17766         if( status ) return status;
17767         status = pthread_create( &t, &attr, task, NULL );
17768 #if HAVE_PTHREADS < 7
17769         if( status < 0 ) status = errno;
17770 #endif
17771         if( status ) return status;
17772 #else
17773         /* Draft 4 pthreads */
17774         status = pthread_create( &t, pthread_attr_default, task, NULL );
17775         if( status ) return errno;
17776
17777         /* give thread a chance to complete */
17778         /* it should remain joinable and hence detachable */
17779         sleep( 1 );
17780
17781         status = pthread_detach( &t );
17782         if( status ) return errno;
17783 #endif
17784
17785 #ifdef HAVE_LINUX_THREADS
17786         pthread_kill_other_threads_np();
17787 #endif
17788
17789         return 0;
17790
17791 }
17792
17793 _ACEOF
17794 if ac_fn_c_try_run "$LINENO"; then :
17795   ol_cv_pthread_lpthread=yes
17796 else
17797   ol_cv_pthread_lpthread=no
17798 fi
17799 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17800   conftest.$ac_objext conftest.beam conftest.$ac_ext
17801 fi
17802
17803
17804                 # restore the LIBS
17805                 LIBS="$ol_LIBS"
17806
17807 fi
17808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
17809 $as_echo "$ol_cv_pthread_lpthread" >&6; }
17810
17811         if test $ol_cv_pthread_lpthread = yes ; then
17812                 ol_link_pthreads="-lpthread"
17813                 ol_link_threads=posix
17814         fi
17815 fi
17816
17817                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
17818 if test "$ol_link_threads" = no ; then
17819         # try -lc_r
17820         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
17821 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
17822 if test "${ol_cv_pthread_lc_r+set}" = set; then :
17823   $as_echo_n "(cached) " >&6
17824 else
17825
17826                 # save the flags
17827                 ol_LIBS="$LIBS"
17828                 LIBS="-lc_r $LIBS"
17829
17830                 if test "$cross_compiling" = yes; then :
17831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17832 /* end confdefs.h.  */
17833
17834 /* pthread test headers */
17835 #include <pthread.h>
17836 #if HAVE_PTHREADS < 7
17837 #include <errno.h>
17838 #endif
17839 #ifndef NULL
17840 #define NULL (void*)0
17841 #endif
17842
17843 static void *task(p)
17844         void *p;
17845 {
17846         return (void *) (p == NULL);
17847 }
17848
17849 int
17850 main ()
17851 {
17852
17853         /* pthread test function */
17854 #ifndef PTHREAD_CREATE_DETACHED
17855 #define PTHREAD_CREATE_DETACHED 1
17856 #endif
17857         pthread_t t;
17858         int status;
17859         int detach = PTHREAD_CREATE_DETACHED;
17860
17861 #if HAVE_PTHREADS > 4
17862         /* Final pthreads */
17863         pthread_attr_t attr;
17864
17865         status = pthread_attr_init(&attr);
17866         if( status ) return status;
17867
17868 #if HAVE_PTHREADS < 7
17869         status = pthread_attr_setdetachstate(&attr, &detach);
17870         if( status < 0 ) status = errno;
17871 #else
17872         status = pthread_attr_setdetachstate(&attr, detach);
17873 #endif
17874         if( status ) return status;
17875         status = pthread_create( &t, &attr, task, NULL );
17876 #if HAVE_PTHREADS < 7
17877         if( status < 0 ) status = errno;
17878 #endif
17879         if( status ) return status;
17880 #else
17881         /* Draft 4 pthreads */
17882         status = pthread_create( &t, pthread_attr_default, task, NULL );
17883         if( status ) return errno;
17884
17885         /* give thread a chance to complete */
17886         /* it should remain joinable and hence detachable */
17887         sleep( 1 );
17888
17889         status = pthread_detach( &t );
17890         if( status ) return errno;
17891 #endif
17892
17893 #ifdef HAVE_LINUX_THREADS
17894         pthread_kill_other_threads_np();
17895 #endif
17896
17897         return 0;
17898
17899   ;
17900   return 0;
17901 }
17902 _ACEOF
17903 if ac_fn_c_try_link "$LINENO"; then :
17904   ol_cv_pthread_lc_r=yes
17905 else
17906   ol_cv_pthread_lc_r=no
17907 fi
17908 rm -f core conftest.err conftest.$ac_objext \
17909     conftest$ac_exeext conftest.$ac_ext
17910 else
17911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17912 /* end confdefs.h.  */
17913
17914 /* pthread test headers */
17915 #include <pthread.h>
17916 #if HAVE_PTHREADS < 7
17917 #include <errno.h>
17918 #endif
17919 #ifndef NULL
17920 #define NULL (void*)0
17921 #endif
17922
17923 static void *task(p)
17924         void *p;
17925 {
17926         return (void *) (p == NULL);
17927 }
17928
17929
17930 int main(argc, argv)
17931         int argc;
17932         char **argv;
17933 {
17934
17935         /* pthread test function */
17936 #ifndef PTHREAD_CREATE_DETACHED
17937 #define PTHREAD_CREATE_DETACHED 1
17938 #endif
17939         pthread_t t;
17940         int status;
17941         int detach = PTHREAD_CREATE_DETACHED;
17942
17943 #if HAVE_PTHREADS > 4
17944         /* Final pthreads */
17945         pthread_attr_t attr;
17946
17947         status = pthread_attr_init(&attr);
17948         if( status ) return status;
17949
17950 #if HAVE_PTHREADS < 7
17951         status = pthread_attr_setdetachstate(&attr, &detach);
17952         if( status < 0 ) status = errno;
17953 #else
17954         status = pthread_attr_setdetachstate(&attr, detach);
17955 #endif
17956         if( status ) return status;
17957         status = pthread_create( &t, &attr, task, NULL );
17958 #if HAVE_PTHREADS < 7
17959         if( status < 0 ) status = errno;
17960 #endif
17961         if( status ) return status;
17962 #else
17963         /* Draft 4 pthreads */
17964         status = pthread_create( &t, pthread_attr_default, task, NULL );
17965         if( status ) return errno;
17966
17967         /* give thread a chance to complete */
17968         /* it should remain joinable and hence detachable */
17969         sleep( 1 );
17970
17971         status = pthread_detach( &t );
17972         if( status ) return errno;
17973 #endif
17974
17975 #ifdef HAVE_LINUX_THREADS
17976         pthread_kill_other_threads_np();
17977 #endif
17978
17979         return 0;
17980
17981 }
17982
17983 _ACEOF
17984 if ac_fn_c_try_run "$LINENO"; then :
17985   ol_cv_pthread_lc_r=yes
17986 else
17987   ol_cv_pthread_lc_r=no
17988 fi
17989 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17990   conftest.$ac_objext conftest.beam conftest.$ac_ext
17991 fi
17992
17993
17994                 # restore the LIBS
17995                 LIBS="$ol_LIBS"
17996
17997 fi
17998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
17999 $as_echo "$ol_cv_pthread_lc_r" >&6; }
18000
18001         if test $ol_cv_pthread_lc_r = yes ; then
18002                 ol_link_pthreads="-lc_r"
18003                 ol_link_threads=posix
18004         fi
18005 fi
18006
18007
18008                 # Pthread try link: -threads (ol_cv_pthread_threads)
18009 if test "$ol_link_threads" = no ; then
18010         # try -threads
18011         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
18012 $as_echo_n "checking for pthread link with -threads... " >&6; }
18013 if test "${ol_cv_pthread_threads+set}" = set; then :
18014   $as_echo_n "(cached) " >&6
18015 else
18016
18017                 # save the flags
18018                 ol_LIBS="$LIBS"
18019                 LIBS="-threads $LIBS"
18020
18021                 if test "$cross_compiling" = yes; then :
18022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18023 /* end confdefs.h.  */
18024
18025 /* pthread test headers */
18026 #include <pthread.h>
18027 #if HAVE_PTHREADS < 7
18028 #include <errno.h>
18029 #endif
18030 #ifndef NULL
18031 #define NULL (void*)0
18032 #endif
18033
18034 static void *task(p)
18035         void *p;
18036 {
18037         return (void *) (p == NULL);
18038 }
18039
18040 int
18041 main ()
18042 {
18043
18044         /* pthread test function */
18045 #ifndef PTHREAD_CREATE_DETACHED
18046 #define PTHREAD_CREATE_DETACHED 1
18047 #endif
18048         pthread_t t;
18049         int status;
18050         int detach = PTHREAD_CREATE_DETACHED;
18051
18052 #if HAVE_PTHREADS > 4
18053         /* Final pthreads */
18054         pthread_attr_t attr;
18055
18056         status = pthread_attr_init(&attr);
18057         if( status ) return status;
18058
18059 #if HAVE_PTHREADS < 7
18060         status = pthread_attr_setdetachstate(&attr, &detach);
18061         if( status < 0 ) status = errno;
18062 #else
18063         status = pthread_attr_setdetachstate(&attr, detach);
18064 #endif
18065         if( status ) return status;
18066         status = pthread_create( &t, &attr, task, NULL );
18067 #if HAVE_PTHREADS < 7
18068         if( status < 0 ) status = errno;
18069 #endif
18070         if( status ) return status;
18071 #else
18072         /* Draft 4 pthreads */
18073         status = pthread_create( &t, pthread_attr_default, task, NULL );
18074         if( status ) return errno;
18075
18076         /* give thread a chance to complete */
18077         /* it should remain joinable and hence detachable */
18078         sleep( 1 );
18079
18080         status = pthread_detach( &t );
18081         if( status ) return errno;
18082 #endif
18083
18084 #ifdef HAVE_LINUX_THREADS
18085         pthread_kill_other_threads_np();
18086 #endif
18087
18088         return 0;
18089
18090   ;
18091   return 0;
18092 }
18093 _ACEOF
18094 if ac_fn_c_try_link "$LINENO"; then :
18095   ol_cv_pthread_threads=yes
18096 else
18097   ol_cv_pthread_threads=no
18098 fi
18099 rm -f core conftest.err conftest.$ac_objext \
18100     conftest$ac_exeext conftest.$ac_ext
18101 else
18102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18103 /* end confdefs.h.  */
18104
18105 /* pthread test headers */
18106 #include <pthread.h>
18107 #if HAVE_PTHREADS < 7
18108 #include <errno.h>
18109 #endif
18110 #ifndef NULL
18111 #define NULL (void*)0
18112 #endif
18113
18114 static void *task(p)
18115         void *p;
18116 {
18117         return (void *) (p == NULL);
18118 }
18119
18120
18121 int main(argc, argv)
18122         int argc;
18123         char **argv;
18124 {
18125
18126         /* pthread test function */
18127 #ifndef PTHREAD_CREATE_DETACHED
18128 #define PTHREAD_CREATE_DETACHED 1
18129 #endif
18130         pthread_t t;
18131         int status;
18132         int detach = PTHREAD_CREATE_DETACHED;
18133
18134 #if HAVE_PTHREADS > 4
18135         /* Final pthreads */
18136         pthread_attr_t attr;
18137
18138         status = pthread_attr_init(&attr);
18139         if( status ) return status;
18140
18141 #if HAVE_PTHREADS < 7
18142         status = pthread_attr_setdetachstate(&attr, &detach);
18143         if( status < 0 ) status = errno;
18144 #else
18145         status = pthread_attr_setdetachstate(&attr, detach);
18146 #endif
18147         if( status ) return status;
18148         status = pthread_create( &t, &attr, task, NULL );
18149 #if HAVE_PTHREADS < 7
18150         if( status < 0 ) status = errno;
18151 #endif
18152         if( status ) return status;
18153 #else
18154         /* Draft 4 pthreads */
18155         status = pthread_create( &t, pthread_attr_default, task, NULL );
18156         if( status ) return errno;
18157
18158         /* give thread a chance to complete */
18159         /* it should remain joinable and hence detachable */
18160         sleep( 1 );
18161
18162         status = pthread_detach( &t );
18163         if( status ) return errno;
18164 #endif
18165
18166 #ifdef HAVE_LINUX_THREADS
18167         pthread_kill_other_threads_np();
18168 #endif
18169
18170         return 0;
18171
18172 }
18173
18174 _ACEOF
18175 if ac_fn_c_try_run "$LINENO"; then :
18176   ol_cv_pthread_threads=yes
18177 else
18178   ol_cv_pthread_threads=no
18179 fi
18180 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18181   conftest.$ac_objext conftest.beam conftest.$ac_ext
18182 fi
18183
18184
18185                 # restore the LIBS
18186                 LIBS="$ol_LIBS"
18187
18188 fi
18189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
18190 $as_echo "$ol_cv_pthread_threads" >&6; }
18191
18192         if test $ol_cv_pthread_threads = yes ; then
18193                 ol_link_pthreads="-threads"
18194                 ol_link_threads=posix
18195         fi
18196 fi
18197
18198
18199                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
18200 if test "$ol_link_threads" = no ; then
18201         # try -lpthreads -lmach -lexc -lc_r
18202         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
18203 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
18204 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then :
18205   $as_echo_n "(cached) " >&6
18206 else
18207
18208                 # save the flags
18209                 ol_LIBS="$LIBS"
18210                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
18211
18212                 if test "$cross_compiling" = yes; then :
18213   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18214 /* end confdefs.h.  */
18215
18216 /* pthread test headers */
18217 #include <pthread.h>
18218 #if HAVE_PTHREADS < 7
18219 #include <errno.h>
18220 #endif
18221 #ifndef NULL
18222 #define NULL (void*)0
18223 #endif
18224
18225 static void *task(p)
18226         void *p;
18227 {
18228         return (void *) (p == NULL);
18229 }
18230
18231 int
18232 main ()
18233 {
18234
18235         /* pthread test function */
18236 #ifndef PTHREAD_CREATE_DETACHED
18237 #define PTHREAD_CREATE_DETACHED 1
18238 #endif
18239         pthread_t t;
18240         int status;
18241         int detach = PTHREAD_CREATE_DETACHED;
18242
18243 #if HAVE_PTHREADS > 4
18244         /* Final pthreads */
18245         pthread_attr_t attr;
18246
18247         status = pthread_attr_init(&attr);
18248         if( status ) return status;
18249
18250 #if HAVE_PTHREADS < 7
18251         status = pthread_attr_setdetachstate(&attr, &detach);
18252         if( status < 0 ) status = errno;
18253 #else
18254         status = pthread_attr_setdetachstate(&attr, detach);
18255 #endif
18256         if( status ) return status;
18257         status = pthread_create( &t, &attr, task, NULL );
18258 #if HAVE_PTHREADS < 7
18259         if( status < 0 ) status = errno;
18260 #endif
18261         if( status ) return status;
18262 #else
18263         /* Draft 4 pthreads */
18264         status = pthread_create( &t, pthread_attr_default, task, NULL );
18265         if( status ) return errno;
18266
18267         /* give thread a chance to complete */
18268         /* it should remain joinable and hence detachable */
18269         sleep( 1 );
18270
18271         status = pthread_detach( &t );
18272         if( status ) return errno;
18273 #endif
18274
18275 #ifdef HAVE_LINUX_THREADS
18276         pthread_kill_other_threads_np();
18277 #endif
18278
18279         return 0;
18280
18281   ;
18282   return 0;
18283 }
18284 _ACEOF
18285 if ac_fn_c_try_link "$LINENO"; then :
18286   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18287 else
18288   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18289 fi
18290 rm -f core conftest.err conftest.$ac_objext \
18291     conftest$ac_exeext conftest.$ac_ext
18292 else
18293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18294 /* end confdefs.h.  */
18295
18296 /* pthread test headers */
18297 #include <pthread.h>
18298 #if HAVE_PTHREADS < 7
18299 #include <errno.h>
18300 #endif
18301 #ifndef NULL
18302 #define NULL (void*)0
18303 #endif
18304
18305 static void *task(p)
18306         void *p;
18307 {
18308         return (void *) (p == NULL);
18309 }
18310
18311
18312 int main(argc, argv)
18313         int argc;
18314         char **argv;
18315 {
18316
18317         /* pthread test function */
18318 #ifndef PTHREAD_CREATE_DETACHED
18319 #define PTHREAD_CREATE_DETACHED 1
18320 #endif
18321         pthread_t t;
18322         int status;
18323         int detach = PTHREAD_CREATE_DETACHED;
18324
18325 #if HAVE_PTHREADS > 4
18326         /* Final pthreads */
18327         pthread_attr_t attr;
18328
18329         status = pthread_attr_init(&attr);
18330         if( status ) return status;
18331
18332 #if HAVE_PTHREADS < 7
18333         status = pthread_attr_setdetachstate(&attr, &detach);
18334         if( status < 0 ) status = errno;
18335 #else
18336         status = pthread_attr_setdetachstate(&attr, detach);
18337 #endif
18338         if( status ) return status;
18339         status = pthread_create( &t, &attr, task, NULL );
18340 #if HAVE_PTHREADS < 7
18341         if( status < 0 ) status = errno;
18342 #endif
18343         if( status ) return status;
18344 #else
18345         /* Draft 4 pthreads */
18346         status = pthread_create( &t, pthread_attr_default, task, NULL );
18347         if( status ) return errno;
18348
18349         /* give thread a chance to complete */
18350         /* it should remain joinable and hence detachable */
18351         sleep( 1 );
18352
18353         status = pthread_detach( &t );
18354         if( status ) return errno;
18355 #endif
18356
18357 #ifdef HAVE_LINUX_THREADS
18358         pthread_kill_other_threads_np();
18359 #endif
18360
18361         return 0;
18362
18363 }
18364
18365 _ACEOF
18366 if ac_fn_c_try_run "$LINENO"; then :
18367   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18368 else
18369   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18370 fi
18371 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18372   conftest.$ac_objext conftest.beam conftest.$ac_ext
18373 fi
18374
18375
18376                 # restore the LIBS
18377                 LIBS="$ol_LIBS"
18378
18379 fi
18380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
18381 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
18382
18383         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
18384                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
18385                 ol_link_threads=posix
18386         fi
18387 fi
18388
18389                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
18390 if test "$ol_link_threads" = no ; then
18391         # try -lpthreads -lmach -lexc
18392         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
18393 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
18394 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then :
18395   $as_echo_n "(cached) " >&6
18396 else
18397
18398                 # save the flags
18399                 ol_LIBS="$LIBS"
18400                 LIBS="-lpthreads -lmach -lexc $LIBS"
18401
18402                 if test "$cross_compiling" = yes; then :
18403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18404 /* end confdefs.h.  */
18405
18406 /* pthread test headers */
18407 #include <pthread.h>
18408 #if HAVE_PTHREADS < 7
18409 #include <errno.h>
18410 #endif
18411 #ifndef NULL
18412 #define NULL (void*)0
18413 #endif
18414
18415 static void *task(p)
18416         void *p;
18417 {
18418         return (void *) (p == NULL);
18419 }
18420
18421 int
18422 main ()
18423 {
18424
18425         /* pthread test function */
18426 #ifndef PTHREAD_CREATE_DETACHED
18427 #define PTHREAD_CREATE_DETACHED 1
18428 #endif
18429         pthread_t t;
18430         int status;
18431         int detach = PTHREAD_CREATE_DETACHED;
18432
18433 #if HAVE_PTHREADS > 4
18434         /* Final pthreads */
18435         pthread_attr_t attr;
18436
18437         status = pthread_attr_init(&attr);
18438         if( status ) return status;
18439
18440 #if HAVE_PTHREADS < 7
18441         status = pthread_attr_setdetachstate(&attr, &detach);
18442         if( status < 0 ) status = errno;
18443 #else
18444         status = pthread_attr_setdetachstate(&attr, detach);
18445 #endif
18446         if( status ) return status;
18447         status = pthread_create( &t, &attr, task, NULL );
18448 #if HAVE_PTHREADS < 7
18449         if( status < 0 ) status = errno;
18450 #endif
18451         if( status ) return status;
18452 #else
18453         /* Draft 4 pthreads */
18454         status = pthread_create( &t, pthread_attr_default, task, NULL );
18455         if( status ) return errno;
18456
18457         /* give thread a chance to complete */
18458         /* it should remain joinable and hence detachable */
18459         sleep( 1 );
18460
18461         status = pthread_detach( &t );
18462         if( status ) return errno;
18463 #endif
18464
18465 #ifdef HAVE_LINUX_THREADS
18466         pthread_kill_other_threads_np();
18467 #endif
18468
18469         return 0;
18470
18471   ;
18472   return 0;
18473 }
18474 _ACEOF
18475 if ac_fn_c_try_link "$LINENO"; then :
18476   ol_cv_pthread_lpthreads_lmach_lexc=yes
18477 else
18478   ol_cv_pthread_lpthreads_lmach_lexc=no
18479 fi
18480 rm -f core conftest.err conftest.$ac_objext \
18481     conftest$ac_exeext conftest.$ac_ext
18482 else
18483   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18484 /* end confdefs.h.  */
18485
18486 /* pthread test headers */
18487 #include <pthread.h>
18488 #if HAVE_PTHREADS < 7
18489 #include <errno.h>
18490 #endif
18491 #ifndef NULL
18492 #define NULL (void*)0
18493 #endif
18494
18495 static void *task(p)
18496         void *p;
18497 {
18498         return (void *) (p == NULL);
18499 }
18500
18501
18502 int main(argc, argv)
18503         int argc;
18504         char **argv;
18505 {
18506
18507         /* pthread test function */
18508 #ifndef PTHREAD_CREATE_DETACHED
18509 #define PTHREAD_CREATE_DETACHED 1
18510 #endif
18511         pthread_t t;
18512         int status;
18513         int detach = PTHREAD_CREATE_DETACHED;
18514
18515 #if HAVE_PTHREADS > 4
18516         /* Final pthreads */
18517         pthread_attr_t attr;
18518
18519         status = pthread_attr_init(&attr);
18520         if( status ) return status;
18521
18522 #if HAVE_PTHREADS < 7
18523         status = pthread_attr_setdetachstate(&attr, &detach);
18524         if( status < 0 ) status = errno;
18525 #else
18526         status = pthread_attr_setdetachstate(&attr, detach);
18527 #endif
18528         if( status ) return status;
18529         status = pthread_create( &t, &attr, task, NULL );
18530 #if HAVE_PTHREADS < 7
18531         if( status < 0 ) status = errno;
18532 #endif
18533         if( status ) return status;
18534 #else
18535         /* Draft 4 pthreads */
18536         status = pthread_create( &t, pthread_attr_default, task, NULL );
18537         if( status ) return errno;
18538
18539         /* give thread a chance to complete */
18540         /* it should remain joinable and hence detachable */
18541         sleep( 1 );
18542
18543         status = pthread_detach( &t );
18544         if( status ) return errno;
18545 #endif
18546
18547 #ifdef HAVE_LINUX_THREADS
18548         pthread_kill_other_threads_np();
18549 #endif
18550
18551         return 0;
18552
18553 }
18554
18555 _ACEOF
18556 if ac_fn_c_try_run "$LINENO"; then :
18557   ol_cv_pthread_lpthreads_lmach_lexc=yes
18558 else
18559   ol_cv_pthread_lpthreads_lmach_lexc=no
18560 fi
18561 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18562   conftest.$ac_objext conftest.beam conftest.$ac_ext
18563 fi
18564
18565
18566                 # restore the LIBS
18567                 LIBS="$ol_LIBS"
18568
18569 fi
18570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
18571 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
18572
18573         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
18574                 ol_link_pthreads="-lpthreads -lmach -lexc"
18575                 ol_link_threads=posix
18576         fi
18577 fi
18578
18579                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
18580 if test "$ol_link_threads" = no ; then
18581         # try -lpthreads -lexc
18582         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
18583 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
18584 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then :
18585   $as_echo_n "(cached) " >&6
18586 else
18587
18588                 # save the flags
18589                 ol_LIBS="$LIBS"
18590                 LIBS="-lpthreads -lexc $LIBS"
18591
18592                 if test "$cross_compiling" = yes; then :
18593   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18594 /* end confdefs.h.  */
18595
18596 /* pthread test headers */
18597 #include <pthread.h>
18598 #if HAVE_PTHREADS < 7
18599 #include <errno.h>
18600 #endif
18601 #ifndef NULL
18602 #define NULL (void*)0
18603 #endif
18604
18605 static void *task(p)
18606         void *p;
18607 {
18608         return (void *) (p == NULL);
18609 }
18610
18611 int
18612 main ()
18613 {
18614
18615         /* pthread test function */
18616 #ifndef PTHREAD_CREATE_DETACHED
18617 #define PTHREAD_CREATE_DETACHED 1
18618 #endif
18619         pthread_t t;
18620         int status;
18621         int detach = PTHREAD_CREATE_DETACHED;
18622
18623 #if HAVE_PTHREADS > 4
18624         /* Final pthreads */
18625         pthread_attr_t attr;
18626
18627         status = pthread_attr_init(&attr);
18628         if( status ) return status;
18629
18630 #if HAVE_PTHREADS < 7
18631         status = pthread_attr_setdetachstate(&attr, &detach);
18632         if( status < 0 ) status = errno;
18633 #else
18634         status = pthread_attr_setdetachstate(&attr, detach);
18635 #endif
18636         if( status ) return status;
18637         status = pthread_create( &t, &attr, task, NULL );
18638 #if HAVE_PTHREADS < 7
18639         if( status < 0 ) status = errno;
18640 #endif
18641         if( status ) return status;
18642 #else
18643         /* Draft 4 pthreads */
18644         status = pthread_create( &t, pthread_attr_default, task, NULL );
18645         if( status ) return errno;
18646
18647         /* give thread a chance to complete */
18648         /* it should remain joinable and hence detachable */
18649         sleep( 1 );
18650
18651         status = pthread_detach( &t );
18652         if( status ) return errno;
18653 #endif
18654
18655 #ifdef HAVE_LINUX_THREADS
18656         pthread_kill_other_threads_np();
18657 #endif
18658
18659         return 0;
18660
18661   ;
18662   return 0;
18663 }
18664 _ACEOF
18665 if ac_fn_c_try_link "$LINENO"; then :
18666   ol_cv_pthread_lpthreads_lexc=yes
18667 else
18668   ol_cv_pthread_lpthreads_lexc=no
18669 fi
18670 rm -f core conftest.err conftest.$ac_objext \
18671     conftest$ac_exeext conftest.$ac_ext
18672 else
18673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18674 /* end confdefs.h.  */
18675
18676 /* pthread test headers */
18677 #include <pthread.h>
18678 #if HAVE_PTHREADS < 7
18679 #include <errno.h>
18680 #endif
18681 #ifndef NULL
18682 #define NULL (void*)0
18683 #endif
18684
18685 static void *task(p)
18686         void *p;
18687 {
18688         return (void *) (p == NULL);
18689 }
18690
18691
18692 int main(argc, argv)
18693         int argc;
18694         char **argv;
18695 {
18696
18697         /* pthread test function */
18698 #ifndef PTHREAD_CREATE_DETACHED
18699 #define PTHREAD_CREATE_DETACHED 1
18700 #endif
18701         pthread_t t;
18702         int status;
18703         int detach = PTHREAD_CREATE_DETACHED;
18704
18705 #if HAVE_PTHREADS > 4
18706         /* Final pthreads */
18707         pthread_attr_t attr;
18708
18709         status = pthread_attr_init(&attr);
18710         if( status ) return status;
18711
18712 #if HAVE_PTHREADS < 7
18713         status = pthread_attr_setdetachstate(&attr, &detach);
18714         if( status < 0 ) status = errno;
18715 #else
18716         status = pthread_attr_setdetachstate(&attr, detach);
18717 #endif
18718         if( status ) return status;
18719         status = pthread_create( &t, &attr, task, NULL );
18720 #if HAVE_PTHREADS < 7
18721         if( status < 0 ) status = errno;
18722 #endif
18723         if( status ) return status;
18724 #else
18725         /* Draft 4 pthreads */
18726         status = pthread_create( &t, pthread_attr_default, task, NULL );
18727         if( status ) return errno;
18728
18729         /* give thread a chance to complete */
18730         /* it should remain joinable and hence detachable */
18731         sleep( 1 );
18732
18733         status = pthread_detach( &t );
18734         if( status ) return errno;
18735 #endif
18736
18737 #ifdef HAVE_LINUX_THREADS
18738         pthread_kill_other_threads_np();
18739 #endif
18740
18741         return 0;
18742
18743 }
18744
18745 _ACEOF
18746 if ac_fn_c_try_run "$LINENO"; then :
18747   ol_cv_pthread_lpthreads_lexc=yes
18748 else
18749   ol_cv_pthread_lpthreads_lexc=no
18750 fi
18751 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18752   conftest.$ac_objext conftest.beam conftest.$ac_ext
18753 fi
18754
18755
18756                 # restore the LIBS
18757                 LIBS="$ol_LIBS"
18758
18759 fi
18760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
18761 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
18762
18763         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
18764                 ol_link_pthreads="-lpthreads -lexc"
18765                 ol_link_threads=posix
18766         fi
18767 fi
18768
18769
18770                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
18771 if test "$ol_link_threads" = no ; then
18772         # try -lpthreads
18773         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
18774 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
18775 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then :
18776   $as_echo_n "(cached) " >&6
18777 else
18778
18779                 # save the flags
18780                 ol_LIBS="$LIBS"
18781                 LIBS="-lpthreads $LIBS"
18782
18783                 if test "$cross_compiling" = yes; then :
18784   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18785 /* end confdefs.h.  */
18786
18787 /* pthread test headers */
18788 #include <pthread.h>
18789 #if HAVE_PTHREADS < 7
18790 #include <errno.h>
18791 #endif
18792 #ifndef NULL
18793 #define NULL (void*)0
18794 #endif
18795
18796 static void *task(p)
18797         void *p;
18798 {
18799         return (void *) (p == NULL);
18800 }
18801
18802 int
18803 main ()
18804 {
18805
18806         /* pthread test function */
18807 #ifndef PTHREAD_CREATE_DETACHED
18808 #define PTHREAD_CREATE_DETACHED 1
18809 #endif
18810         pthread_t t;
18811         int status;
18812         int detach = PTHREAD_CREATE_DETACHED;
18813
18814 #if HAVE_PTHREADS > 4
18815         /* Final pthreads */
18816         pthread_attr_t attr;
18817
18818         status = pthread_attr_init(&attr);
18819         if( status ) return status;
18820
18821 #if HAVE_PTHREADS < 7
18822         status = pthread_attr_setdetachstate(&attr, &detach);
18823         if( status < 0 ) status = errno;
18824 #else
18825         status = pthread_attr_setdetachstate(&attr, detach);
18826 #endif
18827         if( status ) return status;
18828         status = pthread_create( &t, &attr, task, NULL );
18829 #if HAVE_PTHREADS < 7
18830         if( status < 0 ) status = errno;
18831 #endif
18832         if( status ) return status;
18833 #else
18834         /* Draft 4 pthreads */
18835         status = pthread_create( &t, pthread_attr_default, task, NULL );
18836         if( status ) return errno;
18837
18838         /* give thread a chance to complete */
18839         /* it should remain joinable and hence detachable */
18840         sleep( 1 );
18841
18842         status = pthread_detach( &t );
18843         if( status ) return errno;
18844 #endif
18845
18846 #ifdef HAVE_LINUX_THREADS
18847         pthread_kill_other_threads_np();
18848 #endif
18849
18850         return 0;
18851
18852   ;
18853   return 0;
18854 }
18855 _ACEOF
18856 if ac_fn_c_try_link "$LINENO"; then :
18857   ol_cv_pthread_lib_lpthreads=yes
18858 else
18859   ol_cv_pthread_lib_lpthreads=no
18860 fi
18861 rm -f core conftest.err conftest.$ac_objext \
18862     conftest$ac_exeext conftest.$ac_ext
18863 else
18864   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18865 /* end confdefs.h.  */
18866
18867 /* pthread test headers */
18868 #include <pthread.h>
18869 #if HAVE_PTHREADS < 7
18870 #include <errno.h>
18871 #endif
18872 #ifndef NULL
18873 #define NULL (void*)0
18874 #endif
18875
18876 static void *task(p)
18877         void *p;
18878 {
18879         return (void *) (p == NULL);
18880 }
18881
18882
18883 int main(argc, argv)
18884         int argc;
18885         char **argv;
18886 {
18887
18888         /* pthread test function */
18889 #ifndef PTHREAD_CREATE_DETACHED
18890 #define PTHREAD_CREATE_DETACHED 1
18891 #endif
18892         pthread_t t;
18893         int status;
18894         int detach = PTHREAD_CREATE_DETACHED;
18895
18896 #if HAVE_PTHREADS > 4
18897         /* Final pthreads */
18898         pthread_attr_t attr;
18899
18900         status = pthread_attr_init(&attr);
18901         if( status ) return status;
18902
18903 #if HAVE_PTHREADS < 7
18904         status = pthread_attr_setdetachstate(&attr, &detach);
18905         if( status < 0 ) status = errno;
18906 #else
18907         status = pthread_attr_setdetachstate(&attr, detach);
18908 #endif
18909         if( status ) return status;
18910         status = pthread_create( &t, &attr, task, NULL );
18911 #if HAVE_PTHREADS < 7
18912         if( status < 0 ) status = errno;
18913 #endif
18914         if( status ) return status;
18915 #else
18916         /* Draft 4 pthreads */
18917         status = pthread_create( &t, pthread_attr_default, task, NULL );
18918         if( status ) return errno;
18919
18920         /* give thread a chance to complete */
18921         /* it should remain joinable and hence detachable */
18922         sleep( 1 );
18923
18924         status = pthread_detach( &t );
18925         if( status ) return errno;
18926 #endif
18927
18928 #ifdef HAVE_LINUX_THREADS
18929         pthread_kill_other_threads_np();
18930 #endif
18931
18932         return 0;
18933
18934 }
18935
18936 _ACEOF
18937 if ac_fn_c_try_run "$LINENO"; then :
18938   ol_cv_pthread_lib_lpthreads=yes
18939 else
18940   ol_cv_pthread_lib_lpthreads=no
18941 fi
18942 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18943   conftest.$ac_objext conftest.beam conftest.$ac_ext
18944 fi
18945
18946
18947                 # restore the LIBS
18948                 LIBS="$ol_LIBS"
18949
18950 fi
18951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
18952 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
18953
18954         if test $ol_cv_pthread_lib_lpthreads = yes ; then
18955                 ol_link_pthreads="-lpthreads"
18956                 ol_link_threads=posix
18957         fi
18958 fi
18959
18960
18961                 if test $ol_link_threads != no ; then
18962                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
18963
18964                                                 save_CPPFLAGS="$CPPFLAGS"
18965                         save_LIBS="$LIBS"
18966                         LIBS="$LTHREAD_LIBS $LIBS"
18967
18968                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
18969 do :
18970   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18971 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18972 eval as_val=\$$as_ac_var
18973    if test "x$as_val" = x""yes; then :
18974   cat >>confdefs.h <<_ACEOF
18975 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18976 _ACEOF
18977
18978 fi
18979 done
18980
18981
18982                         if test $ac_cv_func_sched_yield = no &&
18983                            test $ac_cv_func_pthread_yield = no &&
18984                            test $ac_cv_func_thr_yield = no ; then
18985                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
18986 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
18987 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
18988   $as_echo_n "(cached) " >&6
18989 else
18990   ac_check_lib_save_LIBS=$LIBS
18991 LIBS="-lrt  $LIBS"
18992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18993 /* end confdefs.h.  */
18994
18995 /* Override any GCC internal prototype to avoid an error.
18996    Use char because int might match the return type of a GCC
18997    builtin and then its argument prototype would still apply.  */
18998 #ifdef __cplusplus
18999 extern "C"
19000 #endif
19001 char sched_yield ();
19002 int
19003 main ()
19004 {
19005 return sched_yield ();
19006   ;
19007   return 0;
19008 }
19009 _ACEOF
19010 if ac_fn_c_try_link "$LINENO"; then :
19011   ac_cv_lib_rt_sched_yield=yes
19012 else
19013   ac_cv_lib_rt_sched_yield=no
19014 fi
19015 rm -f core conftest.err conftest.$ac_objext \
19016     conftest$ac_exeext conftest.$ac_ext
19017 LIBS=$ac_check_lib_save_LIBS
19018 fi
19019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19020 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
19021 if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
19022   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
19023
19024 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
19025
19026                                         ac_cv_func_sched_yield=yes
19027 else
19028   ac_cv_func_sched_yield=no
19029 fi
19030
19031                         fi
19032                         if test $ac_cv_func_sched_yield = no &&
19033                            test $ac_cv_func_pthread_yield = no &&
19034                            test "$ac_cv_func_thr_yield" = no ; then
19035                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
19036 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
19037                         fi
19038
19039                                                 for ac_func in pthread_kill
19040 do :
19041   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
19042 if test "x$ac_cv_func_pthread_kill" = x""yes; then :
19043   cat >>confdefs.h <<_ACEOF
19044 #define HAVE_PTHREAD_KILL 1
19045 _ACEOF
19046
19047 fi
19048 done
19049
19050
19051                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
19052 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
19053 if test "${ol_cv_func_pthread_rwlock_destroy+set}" = set; then :
19054   $as_echo_n "(cached) " >&6
19055 else
19056
19057                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19058 /* end confdefs.h.  */
19059
19060 #include <pthread.h>
19061 pthread_rwlock_t rwlock;
19062
19063 int
19064 main ()
19065 {
19066 pthread_rwlock_destroy(&rwlock);
19067   ;
19068   return 0;
19069 }
19070 _ACEOF
19071 if ac_fn_c_try_link "$LINENO"; then :
19072   ol_cv_func_pthread_rwlock_destroy=yes
19073 else
19074   ol_cv_func_pthread_rwlock_destroy=no
19075 fi
19076 rm -f core conftest.err conftest.$ac_objext \
19077     conftest$ac_exeext conftest.$ac_ext
19078
19079 fi
19080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
19081 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
19082                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
19083
19084 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
19085
19086                         fi
19087
19088                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
19089 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
19090 if test "${ol_cv_func_pthread_detach+set}" = set; then :
19091   $as_echo_n "(cached) " >&6
19092 else
19093
19094                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19095 /* end confdefs.h.  */
19096
19097 #include <pthread.h>
19098 #ifndef NULL
19099 #define NULL (void*)0
19100 #endif
19101
19102 int
19103 main ()
19104 {
19105 pthread_detach(NULL);
19106   ;
19107   return 0;
19108 }
19109 _ACEOF
19110 if ac_fn_c_try_link "$LINENO"; then :
19111   ol_cv_func_pthread_detach=yes
19112 else
19113   ol_cv_func_pthread_detach=no
19114 fi
19115 rm -f core conftest.err conftest.$ac_objext \
19116     conftest$ac_exeext conftest.$ac_ext
19117
19118 fi
19119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
19120 $as_echo "$ol_cv_func_pthread_detach" >&6; }
19121
19122                         if test $ol_cv_func_pthread_detach = no ; then
19123                                 as_fn_error "could not locate pthread_detach()" "$LINENO" 5
19124                         fi
19125
19126
19127 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
19128
19129
19130                                                 for ac_func in \
19131                                 pthread_setconcurrency \
19132                                 pthread_getconcurrency \
19133                                 thr_setconcurrency \
19134                                 thr_getconcurrency \
19135
19136 do :
19137   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19138 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19139 eval as_val=\$$as_ac_var
19140    if test "x$as_val" = x""yes; then :
19141   cat >>confdefs.h <<_ACEOF
19142 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19143 _ACEOF
19144
19145 fi
19146 done
19147
19148
19149
19150         for ac_func in pthread_kill_other_threads_np
19151 do :
19152   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
19153 if test "x$ac_cv_func_pthread_kill_other_threads_np" = x""yes; then :
19154   cat >>confdefs.h <<_ACEOF
19155 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
19156 _ACEOF
19157
19158 fi
19159 done
19160
19161         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
19162 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
19163 if test "${ol_cv_sys_linux_threads+set}" = set; then :
19164   $as_echo_n "(cached) " >&6
19165 else
19166   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
19167 fi
19168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
19169 $as_echo "$ol_cv_sys_linux_threads" >&6; }
19170
19171
19172
19173
19174         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
19175 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
19176 if test "${ol_cv_linux_threads+set}" = set; then :
19177   $as_echo_n "(cached) " >&6
19178 else
19179
19180                 if test $ol_cv_header_linux_threads = yes &&
19181                    test $ol_cv_sys_linux_threads = yes; then
19182                         ol_cv_linux_threads=yes
19183                 elif test $ol_cv_header_linux_threads = no &&
19184                      test $ol_cv_sys_linux_threads = no; then
19185                         ol_cv_linux_threads=no
19186                 else
19187                         ol_cv_linux_threads=error
19188                 fi
19189
19190 fi
19191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
19192 $as_echo "$ol_cv_linux_threads" >&6; }
19193
19194
19195                         if test $ol_cv_linux_threads = error; then
19196                                 as_fn_error "LinuxThreads header/library mismatch" "$LINENO" 5;
19197                         fi
19198
19199                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
19200 $as_echo_n "checking if pthread_create() works... " >&6; }
19201 if test "${ol_cv_pthread_create_works+set}" = set; then :
19202   $as_echo_n "(cached) " >&6
19203 else
19204
19205                         if test "$cross_compiling" = yes; then :
19206                                 ol_cv_pthread_create_works=yes
19207 else
19208   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19209 /* end confdefs.h.  */
19210
19211 /* pthread test headers */
19212 #include <pthread.h>
19213 #if HAVE_PTHREADS < 7
19214 #include <errno.h>
19215 #endif
19216 #ifndef NULL
19217 #define NULL (void*)0
19218 #endif
19219
19220 static void *task(p)
19221         void *p;
19222 {
19223         return (void *) (p == NULL);
19224 }
19225
19226
19227 int main(argc, argv)
19228         int argc;
19229         char **argv;
19230 {
19231
19232         /* pthread test function */
19233 #ifndef PTHREAD_CREATE_DETACHED
19234 #define PTHREAD_CREATE_DETACHED 1
19235 #endif
19236         pthread_t t;
19237         int status;
19238         int detach = PTHREAD_CREATE_DETACHED;
19239
19240 #if HAVE_PTHREADS > 4
19241         /* Final pthreads */
19242         pthread_attr_t attr;
19243
19244         status = pthread_attr_init(&attr);
19245         if( status ) return status;
19246
19247 #if HAVE_PTHREADS < 7
19248         status = pthread_attr_setdetachstate(&attr, &detach);
19249         if( status < 0 ) status = errno;
19250 #else
19251         status = pthread_attr_setdetachstate(&attr, detach);
19252 #endif
19253         if( status ) return status;
19254         status = pthread_create( &t, &attr, task, NULL );
19255 #if HAVE_PTHREADS < 7
19256         if( status < 0 ) status = errno;
19257 #endif
19258         if( status ) return status;
19259 #else
19260         /* Draft 4 pthreads */
19261         status = pthread_create( &t, pthread_attr_default, task, NULL );
19262         if( status ) return errno;
19263
19264         /* give thread a chance to complete */
19265         /* it should remain joinable and hence detachable */
19266         sleep( 1 );
19267
19268         status = pthread_detach( &t );
19269         if( status ) return errno;
19270 #endif
19271
19272 #ifdef HAVE_LINUX_THREADS
19273         pthread_kill_other_threads_np();
19274 #endif
19275
19276         return 0;
19277
19278 }
19279
19280 _ACEOF
19281 if ac_fn_c_try_run "$LINENO"; then :
19282   ol_cv_pthread_create_works=yes
19283 else
19284   ol_cv_pthread_create_works=no
19285 fi
19286 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19287   conftest.$ac_objext conftest.beam conftest.$ac_ext
19288 fi
19289
19290 fi
19291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
19292 $as_echo "$ol_cv_pthread_create_works" >&6; }
19293
19294                         if test $ol_cv_pthread_create_works = no ; then
19295                                 as_fn_error "pthread_create is not usable, check environment settings" "$LINENO" 5
19296                         fi
19297
19298                         ol_replace_broken_yield=no
19299
19300                         if test $ol_replace_broken_yield = yes ; then
19301
19302 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
19303
19304                         fi
19305
19306                                                 if test $ol_with_yielding_select = auto ; then
19307                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
19308 $as_echo_n "checking if select yields when using pthreads... " >&6; }
19309 if test "${ol_cv_pthread_select_yields+set}" = set; then :
19310   $as_echo_n "(cached) " >&6
19311 else
19312
19313                                 if test "$cross_compiling" = yes; then :
19314   ol_cv_pthread_select_yields=cross
19315 else
19316   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19317 /* end confdefs.h.  */
19318
19319 #include <sys/types.h>
19320 #include <sys/time.h>
19321 #include <unistd.h>
19322 #include <pthread.h>
19323 #ifndef NULL
19324 #define NULL (void*) 0
19325 #endif
19326
19327 static int fildes[2];
19328
19329 static void *task(p)
19330         void *p;
19331 {
19332         int i;
19333         struct timeval tv;
19334
19335         fd_set rfds;
19336
19337         tv.tv_sec=10;
19338         tv.tv_usec=0;
19339
19340         FD_ZERO(&rfds);
19341         FD_SET(fildes[0], &rfds);
19342
19343         /* we're not interested in any fds */
19344         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
19345
19346         if(i < 0) {
19347                 perror("select");
19348                 exit(10);
19349         }
19350
19351         exit(0); /* if we exit here, the select blocked the whole process */
19352 }
19353
19354 int main(argc, argv)
19355         int argc;
19356         char **argv;
19357 {
19358         pthread_t t;
19359
19360         /* create a pipe to select */
19361         if(pipe(&fildes[0])) {
19362                 perror("select");
19363                 exit(1);
19364         }
19365
19366 #ifdef HAVE_PTHREAD_SETCONCURRENCY
19367         (void) pthread_setconcurrency(2);
19368 #else
19369 #ifdef HAVE_THR_SETCONCURRENCY
19370         /* Set Solaris LWP concurrency to 2 */
19371         thr_setconcurrency(2);
19372 #endif
19373 #endif
19374
19375 #if HAVE_PTHREADS < 6
19376         pthread_create(&t, pthread_attr_default, task, NULL);
19377 #else
19378         pthread_create(&t, NULL, task, NULL);
19379 #endif
19380
19381         /* make sure task runs first */
19382 #ifdef HAVE_THR_YIELD
19383         thr_yield();
19384 #elif defined( HAVE_SCHED_YIELD )
19385         sched_yield();
19386 #elif defined( HAVE_PTHREAD_YIELD )
19387         pthread_yield();
19388 #endif
19389
19390         exit(2);
19391 }
19392 _ACEOF
19393 if ac_fn_c_try_run "$LINENO"; then :
19394   ol_cv_pthread_select_yields=no
19395 else
19396   ol_cv_pthread_select_yields=yes
19397 fi
19398 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19399   conftest.$ac_objext conftest.beam conftest.$ac_ext
19400 fi
19401
19402 fi
19403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
19404 $as_echo "$ol_cv_pthread_select_yields" >&6; }
19405
19406                                 if test $ol_cv_pthread_select_yields = cross ; then
19407                                         as_fn_error "crossing compiling: use --with-yielding_select=yes|no|manual" "$LINENO" 5
19408                                 fi
19409
19410                                 if test $ol_cv_pthread_select_yields = yes ; then
19411                                         ol_with_yielding_select=yes
19412                                 fi
19413                         fi
19414
19415                                                 CPPFLAGS="$save_CPPFLAGS"
19416                         LIBS="$save_LIBS"
19417                 else
19418                         as_fn_error "could not locate usable POSIX Threads" "$LINENO" 5
19419                 fi
19420         fi
19421
19422         if test $ol_with_threads = posix ; then
19423                 as_fn_error "could not locate POSIX Threads" "$LINENO" 5
19424         fi
19425         ;;
19426 esac
19427
19428 case $ol_with_threads in auto | yes | mach)
19429
19430                 for ac_header in mach/cthreads.h cthreads.h
19431 do :
19432   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19433 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19434 eval as_val=\$$as_ac_Header
19435    if test "x$as_val" = x""yes; then :
19436   cat >>confdefs.h <<_ACEOF
19437 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19438 _ACEOF
19439
19440 fi
19441
19442 done
19443
19444         if test $ac_cv_header_mach_cthreads_h = yes ; then
19445                 ol_with_threads=found
19446
19447                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19448 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19449   ol_link_threads=yes
19450 fi
19451
19452
19453                 if test $ol_link_threads = no ; then
19454                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
19455 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
19456 if test "${ol_cv_cthread_all_load+set}" = set; then :
19457   $as_echo_n "(cached) " >&6
19458 else
19459
19460                                                                 save_LIBS="$LIBS"
19461                                 LIBS="-all_load $LIBS"
19462                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19463 /* end confdefs.h.  */
19464 #include <mach/cthreads.h>
19465 int
19466 main ()
19467 {
19468
19469                                         cthread_fork((void *)0, (void *)0);
19470
19471   ;
19472   return 0;
19473 }
19474 _ACEOF
19475 if ac_fn_c_try_link "$LINENO"; then :
19476   ol_cv_cthread_all_load=yes
19477 else
19478   ol_cv_cthread_all_load=no
19479 fi
19480 rm -f core conftest.err conftest.$ac_objext \
19481     conftest$ac_exeext conftest.$ac_ext
19482                                                                 LIBS="$save_LIBS"
19483
19484 fi
19485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
19486 $as_echo "$ol_cv_cthread_all_load" >&6; }
19487
19488                         if test $ol_cv_cthread_all_load = yes ; then
19489                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
19490                                 ol_link_threads=mach
19491                                 ol_with_threads=found
19492                         fi
19493                 fi
19494
19495         elif test $ac_cv_header_cthreads_h = yes ; then
19496
19497                 ol_with_threads=found
19498
19499                                 save_LIBS="$LIBS"
19500                 LIBS="$LIBS -lthreads"
19501                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19502 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19503   ol_link_threads=yes
19504 fi
19505
19506                 LIBS="$save_LIBS"
19507
19508                 if test $ol_link_threads = yes ; then
19509                         LTHREAD_LIBS="-lthreads"
19510                         ol_link_threads=mach
19511                         ol_with_threads=found
19512                 else
19513                         as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19514                 fi
19515
19516         elif test $ol_with_threads = mach ; then
19517                 as_fn_error "could not locate Mach CThreads" "$LINENO" 5
19518         fi
19519
19520         if test $ol_link_threads = mach ; then
19521
19522 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
19523
19524         elif test $ol_with_threads = found ; then
19525                 as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19526         fi
19527         ;;
19528 esac
19529
19530 case $ol_with_threads in auto | yes | pth)
19531
19532         for ac_header in pth.h
19533 do :
19534   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
19535 if test "x$ac_cv_header_pth_h" = x""yes; then :
19536   cat >>confdefs.h <<_ACEOF
19537 #define HAVE_PTH_H 1
19538 _ACEOF
19539
19540 fi
19541
19542 done
19543
19544
19545         if test $ac_cv_header_pth_h = yes ; then
19546                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
19547 $as_echo_n "checking for pth_version in -lpth... " >&6; }
19548 if test "${ac_cv_lib_pth_pth_version+set}" = set; then :
19549   $as_echo_n "(cached) " >&6
19550 else
19551   ac_check_lib_save_LIBS=$LIBS
19552 LIBS="-lpth  $LIBS"
19553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19554 /* end confdefs.h.  */
19555
19556 /* Override any GCC internal prototype to avoid an error.
19557    Use char because int might match the return type of a GCC
19558    builtin and then its argument prototype would still apply.  */
19559 #ifdef __cplusplus
19560 extern "C"
19561 #endif
19562 char pth_version ();
19563 int
19564 main ()
19565 {
19566 return pth_version ();
19567   ;
19568   return 0;
19569 }
19570 _ACEOF
19571 if ac_fn_c_try_link "$LINENO"; then :
19572   ac_cv_lib_pth_pth_version=yes
19573 else
19574   ac_cv_lib_pth_pth_version=no
19575 fi
19576 rm -f core conftest.err conftest.$ac_objext \
19577     conftest$ac_exeext conftest.$ac_ext
19578 LIBS=$ac_check_lib_save_LIBS
19579 fi
19580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
19581 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
19582 if test "x$ac_cv_lib_pth_pth_version" = x""yes; then :
19583   have_pth=yes
19584 else
19585   have_pth=no
19586 fi
19587
19588
19589                 if test $have_pth = yes ; then
19590
19591 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
19592
19593                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
19594                         ol_link_threads=pth
19595                         ol_with_threads=found
19596
19597                         if test $ol_with_yielding_select = auto ; then
19598                                 ol_with_yielding_select=yes
19599                         fi
19600                 fi
19601         fi
19602         ;;
19603 esac
19604
19605 case $ol_with_threads in auto | yes | lwp)
19606
19607                 for ac_header in thread.h synch.h
19608 do :
19609   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19610 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19611 eval as_val=\$$as_ac_Header
19612    if test "x$as_val" = x""yes; then :
19613   cat >>confdefs.h <<_ACEOF
19614 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19615 _ACEOF
19616
19617 fi
19618
19619 done
19620
19621         if test $ac_cv_header_thread_h = yes &&
19622            test $ac_cv_header_synch_h = yes ; then
19623                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
19624 $as_echo_n "checking for thr_create in -lthread... " >&6; }
19625 if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
19626   $as_echo_n "(cached) " >&6
19627 else
19628   ac_check_lib_save_LIBS=$LIBS
19629 LIBS="-lthread  $LIBS"
19630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19631 /* end confdefs.h.  */
19632
19633 /* Override any GCC internal prototype to avoid an error.
19634    Use char because int might match the return type of a GCC
19635    builtin and then its argument prototype would still apply.  */
19636 #ifdef __cplusplus
19637 extern "C"
19638 #endif
19639 char thr_create ();
19640 int
19641 main ()
19642 {
19643 return thr_create ();
19644   ;
19645   return 0;
19646 }
19647 _ACEOF
19648 if ac_fn_c_try_link "$LINENO"; then :
19649   ac_cv_lib_thread_thr_create=yes
19650 else
19651   ac_cv_lib_thread_thr_create=no
19652 fi
19653 rm -f core conftest.err conftest.$ac_objext \
19654     conftest$ac_exeext conftest.$ac_ext
19655 LIBS=$ac_check_lib_save_LIBS
19656 fi
19657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
19658 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
19659 if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
19660   have_thr=yes
19661 else
19662   have_thr=no
19663 fi
19664
19665
19666                 if test $have_thr = yes ; then
19667
19668 $as_echo "#define HAVE_THR 1" >>confdefs.h
19669
19670                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
19671                         ol_link_threads=thr
19672
19673                         if test $ol_with_yielding_select = auto ; then
19674                                 ol_with_yielding_select=yes
19675                         fi
19676
19677                                                 for ac_func in \
19678                                 thr_setconcurrency \
19679                                 thr_getconcurrency \
19680
19681 do :
19682   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19683 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19684 eval as_val=\$$as_ac_var
19685    if test "x$as_val" = x""yes; then :
19686   cat >>confdefs.h <<_ACEOF
19687 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19688 _ACEOF
19689
19690 fi
19691 done
19692
19693                 fi
19694         fi
19695
19696                 for ac_header in lwp/lwp.h
19697 do :
19698   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
19699 if test "x$ac_cv_header_lwp_lwp_h" = x""yes; then :
19700   cat >>confdefs.h <<_ACEOF
19701 #define HAVE_LWP_LWP_H 1
19702 _ACEOF
19703
19704 fi
19705
19706 done
19707
19708         if test $ac_cv_header_lwp_lwp_h = yes ; then
19709                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
19710 $as_echo_n "checking for lwp_create in -llwp... " >&6; }
19711 if test "${ac_cv_lib_lwp_lwp_create+set}" = set; then :
19712   $as_echo_n "(cached) " >&6
19713 else
19714   ac_check_lib_save_LIBS=$LIBS
19715 LIBS="-llwp  $LIBS"
19716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19717 /* end confdefs.h.  */
19718
19719 /* Override any GCC internal prototype to avoid an error.
19720    Use char because int might match the return type of a GCC
19721    builtin and then its argument prototype would still apply.  */
19722 #ifdef __cplusplus
19723 extern "C"
19724 #endif
19725 char lwp_create ();
19726 int
19727 main ()
19728 {
19729 return lwp_create ();
19730   ;
19731   return 0;
19732 }
19733 _ACEOF
19734 if ac_fn_c_try_link "$LINENO"; then :
19735   ac_cv_lib_lwp_lwp_create=yes
19736 else
19737   ac_cv_lib_lwp_lwp_create=no
19738 fi
19739 rm -f core conftest.err conftest.$ac_objext \
19740     conftest$ac_exeext conftest.$ac_ext
19741 LIBS=$ac_check_lib_save_LIBS
19742 fi
19743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
19744 $as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
19745 if test "x$ac_cv_lib_lwp_lwp_create" = x""yes; then :
19746   have_lwp=yes
19747 else
19748   have_lwp=no
19749 fi
19750
19751
19752                 if test $have_lwp = yes ; then
19753
19754 $as_echo "#define HAVE_LWP 1" >>confdefs.h
19755
19756                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
19757                         ol_link_threads=lwp
19758
19759                         if test $ol_with_yielding_select = auto ; then
19760                                 ol_with_yielding_select=no
19761                         fi
19762                 fi
19763         fi
19764         ;;
19765 esac
19766
19767 if test $ol_with_yielding_select = yes ; then
19768
19769 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
19770
19771 fi
19772
19773 if test $ol_with_threads = manual ; then
19774                 ol_link_threads=yes
19775
19776         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
19777 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
19778
19779         for ac_header in pthread.h sched.h
19780 do :
19781   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19782 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19783 eval as_val=\$$as_ac_Header
19784    if test "x$as_val" = x""yes; then :
19785   cat >>confdefs.h <<_ACEOF
19786 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19787 _ACEOF
19788
19789 fi
19790
19791 done
19792
19793         for ac_func in sched_yield pthread_yield
19794 do :
19795   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19796 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19797 eval as_val=\$$as_ac_var
19798    if test "x$as_val" = x""yes; then :
19799   cat >>confdefs.h <<_ACEOF
19800 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19801 _ACEOF
19802
19803 fi
19804 done
19805
19806
19807         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
19808 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
19809 if test "${ol_cv_header_linux_threads+set}" = set; then :
19810   $as_echo_n "(cached) " >&6
19811 else
19812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19813 /* end confdefs.h.  */
19814 #include <pthread.h>
19815 _ACEOF
19816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19817   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
19818   ol_cv_header_linux_threads=yes
19819 else
19820   ol_cv_header_linux_threads=no
19821 fi
19822 rm -f conftest*
19823
19824
19825 fi
19826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
19827 $as_echo "$ol_cv_header_linux_threads" >&6; }
19828         if test $ol_cv_header_linux_threads = yes; then
19829
19830 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
19831
19832         fi
19833
19834
19835         for ac_header in mach/cthreads.h
19836 do :
19837   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
19838 if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
19839   cat >>confdefs.h <<_ACEOF
19840 #define HAVE_MACH_CTHREADS_H 1
19841 _ACEOF
19842
19843 fi
19844
19845 done
19846
19847         for ac_header in lwp/lwp.h
19848 do :
19849   ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
19850 if test "x$ac_cv_header_lwp_lwp_h" = x""yes; then :
19851   cat >>confdefs.h <<_ACEOF
19852 #define HAVE_LWP_LWP_H 1
19853 _ACEOF
19854
19855 fi
19856
19857 done
19858
19859         for ac_header in thread.h synch.h
19860 do :
19861   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19862 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19863 eval as_val=\$$as_ac_Header
19864    if test "x$as_val" = x""yes; then :
19865   cat >>confdefs.h <<_ACEOF
19866 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19867 _ACEOF
19868
19869 fi
19870
19871 done
19872
19873 fi
19874
19875 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
19876                         $as_echo "#define REENTRANT 1" >>confdefs.h
19877
19878         $as_echo "#define _REENTRANT 1" >>confdefs.h
19879
19880         $as_echo "#define THREAD_SAFE 1" >>confdefs.h
19881
19882         $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
19883
19884         $as_echo "#define THREADSAFE 1" >>confdefs.h
19885
19886         $as_echo "#define _THREADSAFE 1" >>confdefs.h
19887
19888         $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
19889
19890
19891                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
19892 $as_echo_n "checking for thread specific errno... " >&6; }
19893 if test "${ol_cv_errno_thread_specific+set}" = set; then :
19894   $as_echo_n "(cached) " >&6
19895 else
19896
19897                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19898 /* end confdefs.h.  */
19899 #include <errno.h>
19900 int
19901 main ()
19902 {
19903 errno = 0;
19904   ;
19905   return 0;
19906 }
19907 _ACEOF
19908 if ac_fn_c_try_link "$LINENO"; then :
19909   ol_cv_errno_thread_specific=yes
19910 else
19911   ol_cv_errno_thread_specific=no
19912 fi
19913 rm -f core conftest.err conftest.$ac_objext \
19914     conftest$ac_exeext conftest.$ac_ext
19915
19916 fi
19917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
19918 $as_echo "$ol_cv_errno_thread_specific" >&6; }
19919
19920                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
19921 $as_echo_n "checking for thread specific h_errno... " >&6; }
19922 if test "${ol_cv_h_errno_thread_specific+set}" = set; then :
19923   $as_echo_n "(cached) " >&6
19924 else
19925
19926                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19927 /* end confdefs.h.  */
19928 #include <netdb.h>
19929 int
19930 main ()
19931 {
19932 h_errno = 0;
19933   ;
19934   return 0;
19935 }
19936 _ACEOF
19937 if ac_fn_c_try_link "$LINENO"; then :
19938   ol_cv_h_errno_thread_specific=yes
19939 else
19940   ol_cv_h_errno_thread_specific=no
19941 fi
19942 rm -f core conftest.err conftest.$ac_objext \
19943     conftest$ac_exeext conftest.$ac_ext
19944
19945 fi
19946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
19947 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
19948
19949         if test $ol_cv_errno_thread_specific != yes ||
19950            test $ol_cv_h_errno_thread_specific != yes ; then
19951                 LIBS="$LTHREAD_LIBS $LIBS"
19952                 LTHREAD_LIBS=""
19953         fi
19954
19955 fi
19956
19957 if test $ol_link_threads = no ; then
19958         if test $ol_with_threads = yes ; then
19959                 as_fn_error "no suitable thread support" "$LINENO" 5
19960         fi
19961
19962         if test $ol_with_threads = auto ; then
19963                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
19964 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
19965                 ol_with_threads=no
19966         fi
19967
19968
19969 $as_echo "#define NO_THREADS 1" >>confdefs.h
19970
19971         LTHREAD_LIBS=""
19972         BUILD_THREAD=no
19973 else
19974         BUILD_THREAD=yes
19975 fi
19976
19977 if test $ol_link_threads != no ; then
19978
19979 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
19980
19981 fi
19982
19983 for ac_func in \
19984         ctime_r                 \
19985         gmtime_r localtime_r \
19986         gethostbyname_r gethostbyaddr_r \
19987
19988 do :
19989   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19990 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19991 eval as_val=\$$as_ac_var
19992    if test "x$as_val" = x""yes; then :
19993   cat >>confdefs.h <<_ACEOF
19994 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19995 _ACEOF
19996
19997 fi
19998 done
19999
20000
20001 if test "$ac_cv_func_ctime_r" = no ; then
20002         ol_cv_func_ctime_r_nargs=0
20003 else
20004         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of ctime_r" >&5
20005 $as_echo_n "checking number of arguments of ctime_r... " >&6; }
20006 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then :
20007   $as_echo_n "(cached) " >&6
20008 else
20009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20010 /* end confdefs.h.  */
20011 #include <time.h>
20012 int
20013 main ()
20014 {
20015 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
20016   ;
20017   return 0;
20018 }
20019 _ACEOF
20020 if ac_fn_c_try_compile "$LINENO"; then :
20021   ol_cv_func_ctime_r_nargs3=yes
20022 else
20023   ol_cv_func_ctime_r_nargs3=no
20024 fi
20025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20026
20027         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20028 /* end confdefs.h.  */
20029 #include <time.h>
20030 int
20031 main ()
20032 {
20033 time_t ti; char *buffer; ctime_r(&ti,buffer);
20034   ;
20035   return 0;
20036 }
20037 _ACEOF
20038 if ac_fn_c_try_compile "$LINENO"; then :
20039   ol_cv_func_ctime_r_nargs2=yes
20040 else
20041   ol_cv_func_ctime_r_nargs2=no
20042 fi
20043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20044
20045         if test $ol_cv_func_ctime_r_nargs3 = yes &&
20046            test $ol_cv_func_ctime_r_nargs2 = no ; then
20047
20048                 ol_cv_func_ctime_r_nargs=3
20049
20050         elif test $ol_cv_func_ctime_r_nargs3 = no &&
20051              test $ol_cv_func_ctime_r_nargs2 = yes ; then
20052
20053                 ol_cv_func_ctime_r_nargs=2
20054
20055         else
20056                 ol_cv_func_ctime_r_nargs=0
20057         fi
20058
20059 fi
20060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_ctime_r_nargs" >&5
20061 $as_echo "$ol_cv_func_ctime_r_nargs" >&6; }
20062
20063   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
20064
20065 cat >>confdefs.h <<_ACEOF
20066 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
20067 _ACEOF
20068
20069   fi
20070
20071 fi
20072
20073 if test "$ac_cv_func_gethostbyname_r" = yes ; then
20074         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyname_r" >&5
20075 $as_echo_n "checking number of arguments of gethostbyname_r... " >&6; }
20076 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then :
20077   $as_echo_n "(cached) " >&6
20078 else
20079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20080 /* end confdefs.h.  */
20081 #include <sys/types.h>
20082 #include <sys/socket.h>
20083 #include <netinet/in.h>
20084 #include <netdb.h>
20085 #define BUFSIZE (sizeof(struct hostent)+10)
20086 int
20087 main ()
20088 {
20089 struct hostent hent; char buffer[BUFSIZE];
20090                 int bufsize=BUFSIZE;int h_errno;
20091                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
20092                         buffer, bufsize, &h_errno);
20093   ;
20094   return 0;
20095 }
20096 _ACEOF
20097 if ac_fn_c_try_compile "$LINENO"; then :
20098   ol_cv_func_gethostbyname_r_nargs5=yes
20099 else
20100   ol_cv_func_gethostbyname_r_nargs5=no
20101 fi
20102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20103
20104         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20105 /* end confdefs.h.  */
20106 #include <sys/types.h>
20107 #include <sys/socket.h>
20108 #include <netinet/in.h>
20109 #include <netdb.h>
20110 #define BUFSIZE (sizeof(struct hostent)+10)
20111 int
20112 main ()
20113 {
20114 struct hostent hent;struct hostent *rhent;
20115                 char buffer[BUFSIZE];
20116                 int bufsize=BUFSIZE;int h_errno;
20117                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
20118                         &rhent, &h_errno);
20119   ;
20120   return 0;
20121 }
20122 _ACEOF
20123 if ac_fn_c_try_compile "$LINENO"; then :
20124   ol_cv_func_gethostbyname_r_nargs6=yes
20125 else
20126   ol_cv_func_gethostbyname_r_nargs6=no
20127 fi
20128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20129
20130         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
20131            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
20132
20133                 ol_cv_func_gethostbyname_r_nargs=5
20134
20135         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
20136              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
20137
20138                 ol_cv_func_gethostbyname_r_nargs=6
20139
20140         else
20141                 ol_cv_func_gethostbyname_r_nargs=0
20142         fi
20143
20144 fi
20145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyname_r_nargs" >&5
20146 $as_echo "$ol_cv_func_gethostbyname_r_nargs" >&6; }
20147   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
20148
20149 cat >>confdefs.h <<_ACEOF
20150 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
20151 _ACEOF
20152
20153   fi
20154
20155 else
20156         ol_cv_func_gethostbyname_r_nargs=0
20157 fi
20158
20159 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
20160         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyaddr_r" >&5
20161 $as_echo_n "checking number of arguments of gethostbyaddr_r... " >&6; }
20162 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then :
20163   $as_echo_n "(cached) " >&6
20164 else
20165   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20166 /* end confdefs.h.  */
20167 #include <sys/types.h>
20168 #include <sys/socket.h>
20169 #include <netinet/in.h>
20170 #include <netdb.h>
20171 #define BUFSIZE (sizeof(struct hostent)+10)
20172 int
20173 main ()
20174 {
20175 struct hostent hent; char buffer[BUFSIZE];
20176             struct in_addr add;
20177             size_t alen=sizeof(struct in_addr);
20178             int bufsize=BUFSIZE;int h_errno;
20179                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20180                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
20181   ;
20182   return 0;
20183 }
20184 _ACEOF
20185 if ac_fn_c_try_compile "$LINENO"; then :
20186   ol_cv_func_gethostbyaddr_r_nargs7=yes
20187 else
20188   ol_cv_func_gethostbyaddr_r_nargs7=no
20189 fi
20190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20191
20192         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20193 /* end confdefs.h.  */
20194 #include <sys/types.h>
20195 #include <sys/socket.h>
20196 #include <netinet/in.h>
20197 #include <netdb.h>
20198 #define BUFSIZE (sizeof(struct hostent)+10)
20199 int
20200 main ()
20201 {
20202 struct hostent hent;
20203                 struct hostent *rhent; char buffer[BUFSIZE];
20204                 struct in_addr add;
20205                 size_t alen=sizeof(struct in_addr);
20206                 int bufsize=BUFSIZE;int h_errno;
20207                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20208                         alen, AF_INET, &hent, buffer, bufsize,
20209                         &rhent, &h_errno);
20210   ;
20211   return 0;
20212 }
20213 _ACEOF
20214 if ac_fn_c_try_compile "$LINENO"; then :
20215   ol_cv_func_gethostbyaddr_r_nargs8=yes
20216 else
20217   ol_cv_func_gethostbyaddr_r_nargs8=no
20218 fi
20219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20220
20221         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
20222            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
20223
20224                 ol_cv_func_gethostbyaddr_r_nargs=7
20225
20226         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
20227              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
20228
20229                 ol_cv_func_gethostbyaddr_r_nargs=8
20230
20231         else
20232                 ol_cv_func_gethostbyaddr_r_nargs=0
20233         fi
20234
20235 fi
20236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
20237 $as_echo "$ol_cv_func_gethostbyaddr_r_nargs" >&6; }
20238   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
20239
20240 cat >>confdefs.h <<_ACEOF
20241 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
20242 _ACEOF
20243
20244   fi
20245
20246 else
20247         ol_cv_func_gethostbyaddr_r_nargs=0
20248 fi
20249
20250 ol_link_bdb=no
20251
20252 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
20253         ol_cv_berkeley_db=no
20254 for ac_header in db.h
20255 do :
20256   ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default"
20257 if test "x$ac_cv_header_db_h" = x""yes; then :
20258   cat >>confdefs.h <<_ACEOF
20259 #define HAVE_DB_H 1
20260 _ACEOF
20261
20262 fi
20263
20264 done
20265
20266 if test $ac_cv_header_db_h = yes; then
20267         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB major version in db.h" >&5
20268 $as_echo_n "checking for Berkeley DB major version in db.h... " >&6; }
20269 if test "${ol_cv_bdb_major+set}" = set; then :
20270   $as_echo_n "(cached) " >&6
20271 else
20272
20273         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20274 /* end confdefs.h.  */
20275
20276 #include <db.h>
20277 #ifndef DB_VERSION_MAJOR
20278 #       define DB_VERSION_MAJOR 1
20279 #endif
20280 __db_version DB_VERSION_MAJOR
20281
20282 _ACEOF
20283         set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
20284         ol_cv_bdb_major=${3}
20285
20286 fi
20287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_major" >&5
20288 $as_echo "$ol_cv_bdb_major" >&6; }
20289 case $ol_cv_bdb_major in [1-9]*) : ;; *)
20290         as_fn_error "Unknown Berkeley DB major version in db.h" "$LINENO" 5 ;;
20291 esac
20292
20293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB minor version in db.h" >&5
20294 $as_echo_n "checking for Berkeley DB minor version in db.h... " >&6; }
20295 if test "${ol_cv_bdb_minor+set}" = set; then :
20296   $as_echo_n "(cached) " >&6
20297 else
20298
20299         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20300 /* end confdefs.h.  */
20301
20302 #include <db.h>
20303 #ifndef DB_VERSION_MINOR
20304 #       define DB_VERSION_MINOR 0
20305 #endif
20306 __db_version DB_VERSION_MINOR
20307
20308 _ACEOF
20309         set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
20310         ol_cv_bdb_minor=${3}
20311
20312 fi
20313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_minor" >&5
20314 $as_echo "$ol_cv_bdb_minor" >&6; }
20315 case $ol_cv_bdb_minor in [0-9]*) : ;; *)
20316         as_fn_error "Unknown Berkeley DB minor version in db.h" "$LINENO" 5 ;;
20317 esac
20318
20319         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Berkeley DB version supported by BDB/HDB backends" >&5
20320 $as_echo_n "checking if Berkeley DB version supported by BDB/HDB backends... " >&6; }
20321 if test "${ol_cv_bdb_compat+set}" = set; then :
20322   $as_echo_n "(cached) " >&6
20323 else
20324
20325         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20326 /* end confdefs.h.  */
20327
20328 #include <db.h>
20329
20330  /* this check could be improved */
20331 #ifndef DB_VERSION_MAJOR
20332 #       define DB_VERSION_MAJOR 1
20333 #endif
20334 #ifndef DB_VERSION_MINOR
20335 #       define DB_VERSION_MINOR 0
20336 #endif
20337
20338 #define DB_VERSION_MM   ((DB_VERSION_MAJOR<<8)|DB_VERSION_MINOR)
20339
20340 /* require 4.4 or later */
20341 #if DB_VERSION_MM >= 0x0404
20342         __db_version_compat
20343 #endif
20344
20345 _ACEOF
20346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20347   $EGREP "__db_version_compat" >/dev/null 2>&1; then :
20348   ol_cv_bdb_compat=yes
20349 else
20350   ol_cv_bdb_compat=no
20351 fi
20352 rm -f conftest*
20353
20354 fi
20355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_compat" >&5
20356 $as_echo "$ol_cv_bdb_compat" >&6; }
20357
20358
20359         if test $ol_cv_bdb_compat != yes ; then
20360                 as_fn_error "BerkeleyDB version incompatible with BDB/HDB backends" "$LINENO" 5
20361         fi
20362
20363         ol_cv_lib_db=no
20364
20365 if test $ol_cv_bdb_major = 4 ; then
20366         if test $ol_cv_lib_db = no ; then
20367         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)" >&5
20368 $as_echo_n "checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)... " >&6; }
20369 if test "${ol_cv_db_db_4_dot_m+set}" = set; then :
20370   $as_echo_n "(cached) " >&6
20371 else
20372
20373         ol_DB_LIB=-ldb-4.$ol_cv_bdb_minor
20374         ol_LIBS=$LIBS
20375         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20376
20377         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20378 /* end confdefs.h.  */
20379
20380 #ifdef HAVE_DB_185_H
20381 # include <db_185.h>
20382 #else
20383 # include <db.h>
20384 #endif
20385
20386 #ifndef DB_VERSION_MAJOR
20387 # define DB_VERSION_MAJOR 1
20388 #endif
20389
20390 #ifndef NULL
20391 #define NULL ((void*)0)
20392 #endif
20393
20394 int
20395 main ()
20396 {
20397
20398 #if DB_VERSION_MAJOR > 2
20399         db_env_create( NULL, 0 );
20400 #elif DB_VERSION_MAJOR > 1
20401         db_appexit( NULL );
20402 #else
20403         (void) dbopen( NULL, 0, 0, 0, NULL);
20404 #endif
20405
20406   ;
20407   return 0;
20408 }
20409 _ACEOF
20410 if ac_fn_c_try_link "$LINENO"; then :
20411   ol_cv_db_db_4_dot_m=yes
20412 else
20413   ol_cv_db_db_4_dot_m=no
20414 fi
20415 rm -f core conftest.err conftest.$ac_objext \
20416     conftest$ac_exeext conftest.$ac_ext
20417
20418         LIBS="$ol_LIBS"
20419
20420 fi
20421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_dot_m" >&5
20422 $as_echo "$ol_cv_db_db_4_dot_m" >&6; }
20423
20424         if test $ol_cv_db_db_4_dot_m = yes ; then
20425                 ol_cv_lib_db=-ldb-4.$ol_cv_bdb_minor
20426         fi
20427 fi
20428
20429         if test $ol_cv_lib_db = no ; then
20430         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)" >&5
20431 $as_echo_n "checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)... " >&6; }
20432 if test "${ol_cv_db_db4m+set}" = set; then :
20433   $as_echo_n "(cached) " >&6
20434 else
20435
20436         ol_DB_LIB=-ldb4$ol_cv_bdb_minor
20437         ol_LIBS=$LIBS
20438         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20439
20440         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20441 /* end confdefs.h.  */
20442
20443 #ifdef HAVE_DB_185_H
20444 # include <db_185.h>
20445 #else
20446 # include <db.h>
20447 #endif
20448
20449 #ifndef DB_VERSION_MAJOR
20450 # define DB_VERSION_MAJOR 1
20451 #endif
20452
20453 #ifndef NULL
20454 #define NULL ((void*)0)
20455 #endif
20456
20457 int
20458 main ()
20459 {
20460
20461 #if DB_VERSION_MAJOR > 2
20462         db_env_create( NULL, 0 );
20463 #elif DB_VERSION_MAJOR > 1
20464         db_appexit( NULL );
20465 #else
20466         (void) dbopen( NULL, 0, 0, 0, NULL);
20467 #endif
20468
20469   ;
20470   return 0;
20471 }
20472 _ACEOF
20473 if ac_fn_c_try_link "$LINENO"; then :
20474   ol_cv_db_db4m=yes
20475 else
20476   ol_cv_db_db4m=no
20477 fi
20478 rm -f core conftest.err conftest.$ac_objext \
20479     conftest$ac_exeext conftest.$ac_ext
20480
20481         LIBS="$ol_LIBS"
20482
20483 fi
20484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4m" >&5
20485 $as_echo "$ol_cv_db_db4m" >&6; }
20486
20487         if test $ol_cv_db_db4m = yes ; then
20488                 ol_cv_lib_db=-ldb4$ol_cv_bdb_minor
20489         fi
20490 fi
20491
20492         if test $ol_cv_lib_db = no ; then
20493         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)" >&5
20494 $as_echo_n "checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)... " >&6; }
20495 if test "${ol_cv_db_db_4m+set}" = set; then :
20496   $as_echo_n "(cached) " >&6
20497 else
20498
20499         ol_DB_LIB=-ldb-4$ol_cv_bdb_minor
20500         ol_LIBS=$LIBS
20501         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20502
20503         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20504 /* end confdefs.h.  */
20505
20506 #ifdef HAVE_DB_185_H
20507 # include <db_185.h>
20508 #else
20509 # include <db.h>
20510 #endif
20511
20512 #ifndef DB_VERSION_MAJOR
20513 # define DB_VERSION_MAJOR 1
20514 #endif
20515
20516 #ifndef NULL
20517 #define NULL ((void*)0)
20518 #endif
20519
20520 int
20521 main ()
20522 {
20523
20524 #if DB_VERSION_MAJOR > 2
20525         db_env_create( NULL, 0 );
20526 #elif DB_VERSION_MAJOR > 1
20527         db_appexit( NULL );
20528 #else
20529         (void) dbopen( NULL, 0, 0, 0, NULL);
20530 #endif
20531
20532   ;
20533   return 0;
20534 }
20535 _ACEOF
20536 if ac_fn_c_try_link "$LINENO"; then :
20537   ol_cv_db_db_4m=yes
20538 else
20539   ol_cv_db_db_4m=no
20540 fi
20541 rm -f core conftest.err conftest.$ac_objext \
20542     conftest$ac_exeext conftest.$ac_ext
20543
20544         LIBS="$ol_LIBS"
20545
20546 fi
20547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4m" >&5
20548 $as_echo "$ol_cv_db_db_4m" >&6; }
20549
20550         if test $ol_cv_db_db_4m = yes ; then
20551                 ol_cv_lib_db=-ldb-4$ol_cv_bdb_minor
20552         fi
20553 fi
20554
20555         if test $ol_cv_lib_db = no ; then
20556         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)" >&5
20557 $as_echo_n "checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)... " >&6; }
20558 if test "${ol_cv_db_db_4_m+set}" = set; then :
20559   $as_echo_n "(cached) " >&6
20560 else
20561
20562         ol_DB_LIB=-ldb-4-$ol_cv_bdb_minor
20563         ol_LIBS=$LIBS
20564         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20565
20566         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20567 /* end confdefs.h.  */
20568
20569 #ifdef HAVE_DB_185_H
20570 # include <db_185.h>
20571 #else
20572 # include <db.h>
20573 #endif
20574
20575 #ifndef DB_VERSION_MAJOR
20576 # define DB_VERSION_MAJOR 1
20577 #endif
20578
20579 #ifndef NULL
20580 #define NULL ((void*)0)
20581 #endif
20582
20583 int
20584 main ()
20585 {
20586
20587 #if DB_VERSION_MAJOR > 2
20588         db_env_create( NULL, 0 );
20589 #elif DB_VERSION_MAJOR > 1
20590         db_appexit( NULL );
20591 #else
20592         (void) dbopen( NULL, 0, 0, 0, NULL);
20593 #endif
20594
20595   ;
20596   return 0;
20597 }
20598 _ACEOF
20599 if ac_fn_c_try_link "$LINENO"; then :
20600   ol_cv_db_db_4_m=yes
20601 else
20602   ol_cv_db_db_4_m=no
20603 fi
20604 rm -f core conftest.err conftest.$ac_objext \
20605     conftest$ac_exeext conftest.$ac_ext
20606
20607         LIBS="$ol_LIBS"
20608
20609 fi
20610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_m" >&5
20611 $as_echo "$ol_cv_db_db_4_m" >&6; }
20612
20613         if test $ol_cv_db_db_4_m = yes ; then
20614                 ol_cv_lib_db=-ldb-4-$ol_cv_bdb_minor
20615         fi
20616 fi
20617
20618         if test $ol_cv_lib_db = no ; then
20619         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4)" >&5
20620 $as_echo_n "checking for Berkeley DB link (-ldb-4)... " >&6; }
20621 if test "${ol_cv_db_db_4+set}" = set; then :
20622   $as_echo_n "(cached) " >&6
20623 else
20624
20625         ol_DB_LIB=-ldb-4
20626         ol_LIBS=$LIBS
20627         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20628
20629         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20630 /* end confdefs.h.  */
20631
20632 #ifdef HAVE_DB_185_H
20633 # include <db_185.h>
20634 #else
20635 # include <db.h>
20636 #endif
20637
20638 #ifndef DB_VERSION_MAJOR
20639 # define DB_VERSION_MAJOR 1
20640 #endif
20641
20642 #ifndef NULL
20643 #define NULL ((void*)0)
20644 #endif
20645
20646 int
20647 main ()
20648 {
20649
20650 #if DB_VERSION_MAJOR > 2
20651         db_env_create( NULL, 0 );
20652 #elif DB_VERSION_MAJOR > 1
20653         db_appexit( NULL );
20654 #else
20655         (void) dbopen( NULL, 0, 0, 0, NULL);
20656 #endif
20657
20658   ;
20659   return 0;
20660 }
20661 _ACEOF
20662 if ac_fn_c_try_link "$LINENO"; then :
20663   ol_cv_db_db_4=yes
20664 else
20665   ol_cv_db_db_4=no
20666 fi
20667 rm -f core conftest.err conftest.$ac_objext \
20668     conftest$ac_exeext conftest.$ac_ext
20669
20670         LIBS="$ol_LIBS"
20671
20672 fi
20673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4" >&5
20674 $as_echo "$ol_cv_db_db_4" >&6; }
20675
20676         if test $ol_cv_db_db_4 = yes ; then
20677                 ol_cv_lib_db=-ldb-4
20678         fi
20679 fi
20680
20681         if test $ol_cv_lib_db = no ; then
20682         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4)" >&5
20683 $as_echo_n "checking for Berkeley DB link (-ldb4)... " >&6; }
20684 if test "${ol_cv_db_db4+set}" = set; then :
20685   $as_echo_n "(cached) " >&6
20686 else
20687
20688         ol_DB_LIB=-ldb4
20689         ol_LIBS=$LIBS
20690         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20691
20692         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20693 /* end confdefs.h.  */
20694
20695 #ifdef HAVE_DB_185_H
20696 # include <db_185.h>
20697 #else
20698 # include <db.h>
20699 #endif
20700
20701 #ifndef DB_VERSION_MAJOR
20702 # define DB_VERSION_MAJOR 1
20703 #endif
20704
20705 #ifndef NULL
20706 #define NULL ((void*)0)
20707 #endif
20708
20709 int
20710 main ()
20711 {
20712
20713 #if DB_VERSION_MAJOR > 2
20714         db_env_create( NULL, 0 );
20715 #elif DB_VERSION_MAJOR > 1
20716         db_appexit( NULL );
20717 #else
20718         (void) dbopen( NULL, 0, 0, 0, NULL);
20719 #endif
20720
20721   ;
20722   return 0;
20723 }
20724 _ACEOF
20725 if ac_fn_c_try_link "$LINENO"; then :
20726   ol_cv_db_db4=yes
20727 else
20728   ol_cv_db_db4=no
20729 fi
20730 rm -f core conftest.err conftest.$ac_objext \
20731     conftest$ac_exeext conftest.$ac_ext
20732
20733         LIBS="$ol_LIBS"
20734
20735 fi
20736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4" >&5
20737 $as_echo "$ol_cv_db_db4" >&6; }
20738
20739         if test $ol_cv_db_db4 = yes ; then
20740                 ol_cv_lib_db=-ldb4
20741         fi
20742 fi
20743
20744         if test $ol_cv_lib_db = no ; then
20745         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb)" >&5
20746 $as_echo_n "checking for Berkeley DB link (-ldb)... " >&6; }
20747 if test "${ol_cv_db_db+set}" = set; then :
20748   $as_echo_n "(cached) " >&6
20749 else
20750
20751         ol_DB_LIB=-ldb
20752         ol_LIBS=$LIBS
20753         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20754
20755         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20756 /* end confdefs.h.  */
20757
20758 #ifdef HAVE_DB_185_H
20759 # include <db_185.h>
20760 #else
20761 # include <db.h>
20762 #endif
20763
20764 #ifndef DB_VERSION_MAJOR
20765 # define DB_VERSION_MAJOR 1
20766 #endif
20767
20768 #ifndef NULL
20769 #define NULL ((void*)0)
20770 #endif
20771
20772 int
20773 main ()
20774 {
20775
20776 #if DB_VERSION_MAJOR > 2
20777         db_env_create( NULL, 0 );
20778 #elif DB_VERSION_MAJOR > 1
20779         db_appexit( NULL );
20780 #else
20781         (void) dbopen( NULL, 0, 0, 0, NULL);
20782 #endif
20783
20784   ;
20785   return 0;
20786 }
20787 _ACEOF
20788 if ac_fn_c_try_link "$LINENO"; then :
20789   ol_cv_db_db=yes
20790 else
20791   ol_cv_db_db=no
20792 fi
20793 rm -f core conftest.err conftest.$ac_objext \
20794     conftest$ac_exeext conftest.$ac_ext
20795
20796         LIBS="$ol_LIBS"
20797
20798 fi
20799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db" >&5
20800 $as_echo "$ol_cv_db_db" >&6; }
20801
20802         if test $ol_cv_db_db = yes ; then
20803                 ol_cv_lib_db=-ldb
20804         fi
20805 fi
20806
20807 fi
20808 if test $ol_cv_lib_db = no ; then
20809         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (default)" >&5
20810 $as_echo_n "checking for Berkeley DB link (default)... " >&6; }
20811 if test "${ol_cv_db_none+set}" = set; then :
20812   $as_echo_n "(cached) " >&6
20813 else
20814
20815         ol_DB_LIB=
20816         ol_LIBS=$LIBS
20817         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20818
20819         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20820 /* end confdefs.h.  */
20821
20822 #ifdef HAVE_DB_185_H
20823 # include <db_185.h>
20824 #else
20825 # include <db.h>
20826 #endif
20827
20828 #ifndef DB_VERSION_MAJOR
20829 # define DB_VERSION_MAJOR 1
20830 #endif
20831
20832 #ifndef NULL
20833 #define NULL ((void*)0)
20834 #endif
20835
20836 int
20837 main ()
20838 {
20839
20840 #if DB_VERSION_MAJOR > 2
20841         db_env_create( NULL, 0 );
20842 #elif DB_VERSION_MAJOR > 1
20843         db_appexit( NULL );
20844 #else
20845         (void) dbopen( NULL, 0, 0, 0, NULL);
20846 #endif
20847
20848   ;
20849   return 0;
20850 }
20851 _ACEOF
20852 if ac_fn_c_try_link "$LINENO"; then :
20853   ol_cv_db_none=yes
20854 else
20855   ol_cv_db_none=no
20856 fi
20857 rm -f core conftest.err conftest.$ac_objext \
20858     conftest$ac_exeext conftest.$ac_ext
20859
20860         LIBS="$ol_LIBS"
20861
20862 fi
20863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_none" >&5
20864 $as_echo "$ol_cv_db_none" >&6; }
20865
20866         if test $ol_cv_db_none = yes ; then
20867                 ol_cv_lib_db=yes
20868         fi
20869 fi
20870
20871
20872         if test "$ol_cv_lib_db" != no ; then
20873                 ol_cv_berkeley_db=yes
20874                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB library and header version match" >&5
20875 $as_echo_n "checking for Berkeley DB library and header version match... " >&6; }
20876 if test "${ol_cv_berkeley_db_version+set}" = set; then :
20877   $as_echo_n "(cached) " >&6
20878 else
20879
20880         ol_LIBS="$LIBS"
20881         LIBS="$LTHREAD_LIBS $LIBS"
20882         if test $ol_cv_lib_db != yes ; then
20883                 LIBS="$ol_cv_lib_db $LIBS"
20884         fi
20885
20886         if test "$cross_compiling" = yes; then :
20887   ol_cv_berkeley_db_version=cross
20888 else
20889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20890 /* end confdefs.h.  */
20891
20892 #ifdef HAVE_DB_185_H
20893         choke me;
20894 #else
20895 #include <db.h>
20896 #endif
20897 #ifndef DB_VERSION_MAJOR
20898 # define DB_VERSION_MAJOR 1
20899 #endif
20900 #ifndef NULL
20901 #define NULL ((void *)0)
20902 #endif
20903 main()
20904 {
20905 #if DB_VERSION_MAJOR > 1
20906         char *version;
20907         int major, minor, patch;
20908
20909         version = db_version( &major, &minor, &patch );
20910
20911         if( major != DB_VERSION_MAJOR ||
20912                 minor != DB_VERSION_MINOR ||
20913                 patch != DB_VERSION_PATCH )
20914         {
20915                 printf("Berkeley DB version mismatch\n"
20916                         "\theader: %s\n\tlibrary: %s\n",
20917                         DB_VERSION_STRING, version);
20918                 return 1;
20919         }
20920 #endif
20921
20922         return 0;
20923 }
20924 _ACEOF
20925 if ac_fn_c_try_run "$LINENO"; then :
20926   ol_cv_berkeley_db_version=yes
20927 else
20928   ol_cv_berkeley_db_version=no
20929 fi
20930 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20931   conftest.$ac_objext conftest.beam conftest.$ac_ext
20932 fi
20933
20934
20935         LIBS="$ol_LIBS"
20936
20937 fi
20938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_version" >&5
20939 $as_echo "$ol_cv_berkeley_db_version" >&6; }
20940
20941         if test $ol_cv_berkeley_db_version = no ; then
20942                 as_fn_error "Berkeley DB version mismatch" "$LINENO" 5
20943         fi
20944
20945                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB thread support" >&5
20946 $as_echo_n "checking for Berkeley DB thread support... " >&6; }
20947 if test "${ol_cv_berkeley_db_thread+set}" = set; then :
20948   $as_echo_n "(cached) " >&6
20949 else
20950
20951         ol_LIBS="$LIBS"
20952         LIBS="$LTHREAD_LIBS $LIBS"
20953         if test $ol_cv_lib_db != yes ; then
20954                 LIBS="$ol_cv_lib_db $LIBS"
20955         fi
20956
20957         if test "$cross_compiling" = yes; then :
20958   ol_cv_berkeley_db_thread=cross
20959 else
20960   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20961 /* end confdefs.h.  */
20962
20963 #ifdef HAVE_DB_185_H
20964         choke me;
20965 #else
20966 #include <db.h>
20967 #endif
20968 #ifndef NULL
20969 #define NULL ((void *)0)
20970 #endif
20971 main()
20972 {
20973         int rc;
20974         u_int32_t flags = DB_CREATE |
20975 #ifdef DB_PRIVATE
20976                 DB_PRIVATE |
20977 #endif
20978                 DB_THREAD;
20979
20980 #if DB_VERSION_MAJOR > 2
20981         DB_ENV *env = NULL;
20982
20983         rc = db_env_create( &env, 0 );
20984
20985         flags |= DB_INIT_MPOOL;
20986 #ifdef DB_MPOOL_PRIVATE
20987         flags |= DB_MPOOL_PRIVATE;
20988 #endif
20989
20990         if( rc ) {
20991                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
20992                 return rc;
20993         }
20994
20995 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
20996         rc = (env->open)( env, NULL, flags, 0 );
20997 #else
20998         rc = (env->open)( env, NULL, NULL, flags, 0 );
20999 #endif
21000
21001         if ( rc == 0 ) {
21002                 rc = env->close( env, 0 );
21003         }
21004
21005         if( rc ) {
21006                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21007                 return rc;
21008         }
21009
21010 #else
21011         DB_ENV env;
21012         memset( &env, '\0', sizeof(env) );
21013
21014         rc = db_appinit( NULL, NULL, &env, flags );
21015
21016         if( rc == 0 ) {
21017                 db_appexit( &env );
21018         }
21019
21020         unlink("__db_mpool.share");
21021         unlink("__db_lock.share");
21022 #endif
21023
21024         return rc;
21025 }
21026 _ACEOF
21027 if ac_fn_c_try_run "$LINENO"; then :
21028   ol_cv_berkeley_db_thread=yes
21029 else
21030   ol_cv_berkeley_db_thread=no
21031 fi
21032 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21033   conftest.$ac_objext conftest.beam conftest.$ac_ext
21034 fi
21035
21036
21037         LIBS="$ol_LIBS"
21038
21039 fi
21040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_thread" >&5
21041 $as_echo "$ol_cv_berkeley_db_thread" >&6; }
21042
21043         if test $ol_cv_berkeley_db_thread != no ; then
21044
21045 $as_echo "#define HAVE_BERKELEY_DB_THREAD 1" >>confdefs.h
21046
21047         fi
21048
21049         fi
21050 fi
21051
21052
21053         if test $ol_cv_berkeley_db = no ; then
21054                 as_fn_error "BDB/HDB: BerkeleyDB not available" "$LINENO" 5
21055         fi
21056
21057
21058 $as_echo "#define HAVE_BERKELEY_DB 1" >>confdefs.h
21059
21060
21061                         if test $ol_cv_lib_db != yes ; then
21062                 BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
21063         fi
21064
21065         SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
21066
21067         ol_link_bdb=yes
21068 fi
21069
21070
21071 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
21072         BUILD_LIBS_DYNAMIC=shared
21073
21074 $as_echo "#define LDAP_LIBS_DYNAMIC 1" >>confdefs.h
21075
21076         LTSTATIC=""
21077 else
21078         BUILD_LIBS_DYNAMIC=static
21079         LTSTATIC="-static"
21080 fi
21081
21082 if test $ol_enable_wrappers != no ; then
21083         for ac_header in tcpd.h
21084 do :
21085   ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
21086 if test "x$ac_cv_header_tcpd_h" = x""yes; then :
21087   cat >>confdefs.h <<_ACEOF
21088 #define HAVE_TCPD_H 1
21089 _ACEOF
21090
21091                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library" >&5
21092 $as_echo_n "checking for TCP wrappers library... " >&6; }
21093                 save_LIBS="$LIBS"
21094                 LIBS="$LIBS -lwrap"
21095                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21096 /* end confdefs.h.  */
21097
21098 #include <tcpd.h>
21099 int allow_severity = 0;
21100 int deny_severity  = 0;
21101
21102 struct request_info *req;
21103
21104 int
21105 main ()
21106 {
21107
21108 hosts_access(req)
21109
21110   ;
21111   return 0;
21112 }
21113 _ACEOF
21114 if ac_fn_c_try_link "$LINENO"; then :
21115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap" >&5
21116 $as_echo "-lwrap" >&6; }
21117                 have_wrappers=yes
21118                 LIBS="$save_LIBS"
21119 else
21120
21121                                 LIBS="$LIBS -lnsl"
21122                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21123 /* end confdefs.h.  */
21124
21125 #include <tcpd.h>
21126 int allow_severity = 0;
21127 int deny_severity  = 0;
21128
21129 struct request_info *req;
21130
21131 int
21132 main ()
21133 {
21134
21135 hosts_access(req)
21136
21137   ;
21138   return 0;
21139 }
21140 _ACEOF
21141 if ac_fn_c_try_link "$LINENO"; then :
21142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap -lnsl" >&5
21143 $as_echo "-lwrap -lnsl" >&6; }
21144                 have_wrappers=yes
21145                 LIBS="$save_LIBS -lnsl"
21146 else
21147
21148                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21149 $as_echo "no" >&6; }
21150                 have_wrappers=no
21151                 LIBS=$save_LIBS
21152 fi
21153 rm -f core conftest.err conftest.$ac_objext \
21154     conftest$ac_exeext conftest.$ac_ext
21155 fi
21156 rm -f core conftest.err conftest.$ac_objext \
21157     conftest$ac_exeext conftest.$ac_ext
21158 else
21159   have_wrappers=no
21160 fi
21161
21162 done
21163
21164
21165         if test $have_wrappers = yes ; then
21166
21167 $as_echo "#define HAVE_TCPD 1" >>confdefs.h
21168
21169                 WRAP_LIBS="-lwrap"
21170         elif test $ol_enable_wrappers = yes ; then
21171                 as_fn_error "could not find TCP wrappers, select apppropriate options or disable" "$LINENO" 5
21172         else
21173                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find TCP wrappers, support disabled" >&5
21174 $as_echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
21175                 WRAP_LIBS=""
21176         fi
21177 fi
21178
21179 if test $ol_enable_syslog != no ; then
21180         ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
21181 if test "x$ac_cv_func_openlog" = x""yes; then :
21182
21183 fi
21184
21185         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
21186                 { as_fn_set_status select appropriate options or disable
21187 as_fn_error "could not find syslog" "$LINENO" 5; }
21188         fi
21189         ol_enable_syslog=$ac_cv_func_openlog
21190 fi
21191
21192 ol_link_sql=no
21193 if test $ol_enable_sql != no ; then
21194         for ac_header in sql.h sqlext.h
21195 do :
21196   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21197 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21198 eval as_val=\$$as_ac_Header
21199    if test "x$as_val" = x""yes; then :
21200   cat >>confdefs.h <<_ACEOF
21201 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21202 _ACEOF
21203
21204 else
21205
21206                 as_fn_error "could not locate SQL headers" "$LINENO" 5
21207
21208 fi
21209
21210 done
21211
21212
21213         sql_LIBS="$LIBS"
21214         LIBS="$LTHREAD_LIBS"
21215
21216         if test $ol_with_odbc = auto ; then
21217                 ol_with_odbc="iodbc unixodbc odbc32"
21218         fi
21219
21220         for odbc in $ol_with_odbc ; do
21221                 if test $ol_link_sql = no ; then
21222                         case $odbc in
21223                         iodbc)
21224                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -liodbc" >&5
21225 $as_echo_n "checking for SQLDriverConnect in -liodbc... " >&6; }
21226 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then :
21227   $as_echo_n "(cached) " >&6
21228 else
21229   ac_check_lib_save_LIBS=$LIBS
21230 LIBS="-liodbc  $LIBS"
21231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21232 /* end confdefs.h.  */
21233
21234 /* Override any GCC internal prototype to avoid an error.
21235    Use char because int might match the return type of a GCC
21236    builtin and then its argument prototype would still apply.  */
21237 #ifdef __cplusplus
21238 extern "C"
21239 #endif
21240 char SQLDriverConnect ();
21241 int
21242 main ()
21243 {
21244 return SQLDriverConnect ();
21245   ;
21246   return 0;
21247 }
21248 _ACEOF
21249 if ac_fn_c_try_link "$LINENO"; then :
21250   ac_cv_lib_iodbc_SQLDriverConnect=yes
21251 else
21252   ac_cv_lib_iodbc_SQLDriverConnect=no
21253 fi
21254 rm -f core conftest.err conftest.$ac_objext \
21255     conftest$ac_exeext conftest.$ac_ext
21256 LIBS=$ac_check_lib_save_LIBS
21257 fi
21258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
21259 $as_echo "$ac_cv_lib_iodbc_SQLDriverConnect" >&6; }
21260 if test "x$ac_cv_lib_iodbc_SQLDriverConnect" = x""yes; then :
21261   have_iodbc=yes
21262 else
21263   have_iodbc=no
21264 fi
21265
21266                                 if test $have_iodbc = yes ; then
21267                                         ol_link_sql="-liodbc"
21268                                 fi
21269                                 ;;
21270
21271                         unixodbc)
21272                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc" >&5
21273 $as_echo_n "checking for SQLDriverConnect in -lodbc... " >&6; }
21274 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then :
21275   $as_echo_n "(cached) " >&6
21276 else
21277   ac_check_lib_save_LIBS=$LIBS
21278 LIBS="-lodbc  $LIBS"
21279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21280 /* end confdefs.h.  */
21281
21282 /* Override any GCC internal prototype to avoid an error.
21283    Use char because int might match the return type of a GCC
21284    builtin and then its argument prototype would still apply.  */
21285 #ifdef __cplusplus
21286 extern "C"
21287 #endif
21288 char SQLDriverConnect ();
21289 int
21290 main ()
21291 {
21292 return SQLDriverConnect ();
21293   ;
21294   return 0;
21295 }
21296 _ACEOF
21297 if ac_fn_c_try_link "$LINENO"; then :
21298   ac_cv_lib_odbc_SQLDriverConnect=yes
21299 else
21300   ac_cv_lib_odbc_SQLDriverConnect=no
21301 fi
21302 rm -f core conftest.err conftest.$ac_objext \
21303     conftest$ac_exeext conftest.$ac_ext
21304 LIBS=$ac_check_lib_save_LIBS
21305 fi
21306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
21307 $as_echo "$ac_cv_lib_odbc_SQLDriverConnect" >&6; }
21308 if test "x$ac_cv_lib_odbc_SQLDriverConnect" = x""yes; then :
21309   have_odbc=yes
21310 else
21311   have_odbc=no
21312 fi
21313
21314                                 if test $have_odbc = yes ; then
21315                                         ol_link_sql="-lodbc"
21316                                 fi
21317                                 ;;
21318
21319                         odbc32)
21320                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32" >&5
21321 $as_echo_n "checking for SQLDriverConnect in -lodbc32... " >&6; }
21322 if test "${ac_cv_lib_odbc32_SQLDriverConnect+set}" = set; then :
21323   $as_echo_n "(cached) " >&6
21324 else
21325   ac_check_lib_save_LIBS=$LIBS
21326 LIBS="-lodbc32  $LIBS"
21327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21328 /* end confdefs.h.  */
21329
21330 /* Override any GCC internal prototype to avoid an error.
21331    Use char because int might match the return type of a GCC
21332    builtin and then its argument prototype would still apply.  */
21333 #ifdef __cplusplus
21334 extern "C"
21335 #endif
21336 char SQLDriverConnect ();
21337 int
21338 main ()
21339 {
21340 return SQLDriverConnect ();
21341   ;
21342   return 0;
21343 }
21344 _ACEOF
21345 if ac_fn_c_try_link "$LINENO"; then :
21346   ac_cv_lib_odbc32_SQLDriverConnect=yes
21347 else
21348   ac_cv_lib_odbc32_SQLDriverConnect=no
21349 fi
21350 rm -f core conftest.err conftest.$ac_objext \
21351     conftest$ac_exeext conftest.$ac_ext
21352 LIBS=$ac_check_lib_save_LIBS
21353 fi
21354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_SQLDriverConnect" >&5
21355 $as_echo "$ac_cv_lib_odbc32_SQLDriverConnect" >&6; }
21356 if test "x$ac_cv_lib_odbc32_SQLDriverConnect" = x""yes; then :
21357   have_odbc32=yes
21358 else
21359   have_odbc32=no
21360 fi
21361
21362                                 if test $have_odbc32 = yes ; then
21363                                         ol_link_sql="-lodbc32"
21364                                 fi
21365                                 ;;
21366
21367                         *)
21368                                 as_fn_error "unknown ODBC library" "$LINENO" 5
21369                                 ;;
21370                         esac
21371                 fi
21372         done
21373
21374         LIBS="$sql_LIBS"
21375
21376         if test $ol_link_sql != no ; then
21377                 SLAPD_SQL_LIBS="$ol_link_sql"
21378
21379         elif test $ol_enable_sql != auto ; then
21380                 as_fn_error "could not locate suitable ODBC library" "$LINENO" 5
21381         fi
21382 fi
21383
21384 ol_link_ndb=no
21385 if test $ol_enable_ndb != no ; then
21386         # Extract the first word of "mysql_config", so it can be a program name with args.
21387 set dummy mysql_config; ac_word=$2
21388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21389 $as_echo_n "checking for $ac_word... " >&6; }
21390 if test "${ac_cv_prog_MYSQL+set}" = set; then :
21391   $as_echo_n "(cached) " >&6
21392 else
21393   if test -n "$MYSQL"; then
21394   ac_cv_prog_MYSQL="$MYSQL" # Let the user override the test.
21395 else
21396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21397 for as_dir in $PATH
21398 do
21399   IFS=$as_save_IFS
21400   test -z "$as_dir" && as_dir=.
21401     for ac_exec_ext in '' $ac_executable_extensions; do
21402   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21403     ac_cv_prog_MYSQL="yes"
21404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21405     break 2
21406   fi
21407 done
21408   done
21409 IFS=$as_save_IFS
21410
21411 fi
21412 fi
21413 MYSQL=$ac_cv_prog_MYSQL
21414 if test -n "$MYSQL"; then
21415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL" >&5
21416 $as_echo "$MYSQL" >&6; }
21417 else
21418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21419 $as_echo "no" >&6; }
21420 fi
21421
21422
21423         if test "$MYSQL" != yes ; then
21424                 as_fn_error "could not locate mysql_config" "$LINENO" 5
21425         fi
21426
21427         SQL_INC=`mysql_config --include`
21428         SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi"
21429
21430         save_CPPFLAGS="$CPPFLAGS"
21431         CPPFLAGS="$SLAPD_NDB_INCS"
21432         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NdbApi.hpp" >&5
21433 $as_echo_n "checking for NdbApi.hpp... " >&6; }
21434         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21435 /* end confdefs.h.  */
21436 #include <NdbApi.hpp>
21437 _ACEOF
21438 if ac_fn_c_try_cpp "$LINENO"; then :
21439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21440 $as_echo "yes" >&6; }
21441 else
21442   as_fn_error "could not locate NdbApi headers" "$LINENO" 5
21443
21444 fi
21445 rm -f conftest.err conftest.$ac_ext
21446         CPPFLAGS="$save_CPPFLAGS"
21447
21448         SQL_LIB=`mysql_config --libs_r`
21449         SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++"
21450
21451         save_LDFLAGS="$LDFLAGS"
21452         save_LIBS="$LIBS"
21453         LDFLAGS="$SQL_LIB"
21454         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ndb_init in -lndbclient" >&5
21455 $as_echo_n "checking for ndb_init in -lndbclient... " >&6; }
21456 if test "${ac_cv_lib_ndbclient_ndb_init+set}" = set; then :
21457   $as_echo_n "(cached) " >&6
21458 else
21459   ac_check_lib_save_LIBS=$LIBS
21460 LIBS="-lndbclient -lstdc++ $LIBS"
21461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21462 /* end confdefs.h.  */
21463
21464 /* Override any GCC internal prototype to avoid an error.
21465    Use char because int might match the return type of a GCC
21466    builtin and then its argument prototype would still apply.  */
21467 #ifdef __cplusplus
21468 extern "C"
21469 #endif
21470 char ndb_init ();
21471 int
21472 main ()
21473 {
21474 return ndb_init ();
21475   ;
21476   return 0;
21477 }
21478 _ACEOF
21479 if ac_fn_c_try_link "$LINENO"; then :
21480   ac_cv_lib_ndbclient_ndb_init=yes
21481 else
21482   ac_cv_lib_ndbclient_ndb_init=no
21483 fi
21484 rm -f core conftest.err conftest.$ac_objext \
21485     conftest$ac_exeext conftest.$ac_ext
21486 LIBS=$ac_check_lib_save_LIBS
21487 fi
21488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbclient_ndb_init" >&5
21489 $as_echo "$ac_cv_lib_ndbclient_ndb_init" >&6; }
21490 if test "x$ac_cv_lib_ndbclient_ndb_init" = x""yes; then :
21491   : ok
21492 else
21493
21494                 as_fn_error "could not locate ndbclient library" "$LINENO" 5
21495
21496 fi
21497
21498         LIBS="$save_LIBS"
21499         LDFLAGS="$save_LDFLAGS"
21500
21501         if test "$ol_enable_ndb" = yes ; then
21502                 SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
21503         fi
21504 fi
21505
21506 ol_icu=no
21507 for ac_header in unicode/utypes.h
21508 do :
21509   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21510 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21511 eval as_val=\$$as_ac_Header
21512    if test "x$as_val" = x""yes; then :
21513   cat >>confdefs.h <<_ACEOF
21514 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21515 _ACEOF
21516
21517 fi
21518
21519 done
21520
21521 if test $ac_cv_header_unicode_utypes_h = yes ; then
21522                 OL_ICULIBS="-licuuc -licudata"
21523
21524         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU libraries" >&5
21525 $as_echo_n "checking for ICU libraries... " >&6; }
21526 if test "${ol_cv_lib_icu+set}" = set; then :
21527   $as_echo_n "(cached) " >&6
21528 else
21529
21530                 ol_LIBS="$LIBS"
21531                 LIBS="$OL_ICULIBS $LIBS"
21532                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21533 /* end confdefs.h.  */
21534
21535 #include <unicode/utypes.h>
21536
21537 int
21538 main ()
21539 {
21540
21541 (void) u_errorName(0);
21542
21543   ;
21544   return 0;
21545 }
21546 _ACEOF
21547 if ac_fn_c_try_link "$LINENO"; then :
21548   ol_cv_lib_icu=yes
21549 else
21550   ol_cv_lib_icu=no
21551 fi
21552 rm -f core conftest.err conftest.$ac_objext \
21553     conftest$ac_exeext conftest.$ac_ext
21554                 LIBS="$ol_LIBS"
21555
21556 fi
21557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_icu" >&5
21558 $as_echo "$ol_cv_lib_icu" >&6; }
21559
21560         if test $ol_cv_lib_icu != no ; then
21561                 ol_icu="$OL_ICULIBS"
21562
21563 $as_echo "#define HAVE_ICU 1" >>confdefs.h
21564
21565         fi
21566 fi
21567
21568 if test "$ol_icu" = no ; then
21569         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ICU not available" >&5
21570 $as_echo "$as_me: WARNING: ICU not available" >&2;}
21571 else
21572         ICU_LIBS="$ol_icu"
21573 fi
21574 WITH_SASL=no
21575 ol_link_sasl=no
21576 ol_link_spasswd=no
21577 if test $ol_with_cyrus_sasl != no ; then
21578         for ac_header in sasl/sasl.h sasl.h
21579 do :
21580   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21581 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21582 eval as_val=\$$as_ac_Header
21583    if test "x$as_val" = x""yes; then :
21584   cat >>confdefs.h <<_ACEOF
21585 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21586 _ACEOF
21587
21588 fi
21589
21590 done
21591
21592
21593         if test $ac_cv_header_sasl_sasl_h = yes ||
21594            test $ac_cv_header_sasl_h = yes; then
21595                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
21596 $as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
21597 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then :
21598   $as_echo_n "(cached) " >&6
21599 else
21600   ac_check_lib_save_LIBS=$LIBS
21601 LIBS="-lsasl2  $LIBS"
21602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21603 /* end confdefs.h.  */
21604
21605 /* Override any GCC internal prototype to avoid an error.
21606    Use char because int might match the return type of a GCC
21607    builtin and then its argument prototype would still apply.  */
21608 #ifdef __cplusplus
21609 extern "C"
21610 #endif
21611 char sasl_client_init ();
21612 int
21613 main ()
21614 {
21615 return sasl_client_init ();
21616   ;
21617   return 0;
21618 }
21619 _ACEOF
21620 if ac_fn_c_try_link "$LINENO"; then :
21621   ac_cv_lib_sasl2_sasl_client_init=yes
21622 else
21623   ac_cv_lib_sasl2_sasl_client_init=no
21624 fi
21625 rm -f core conftest.err conftest.$ac_objext \
21626     conftest$ac_exeext conftest.$ac_ext
21627 LIBS=$ac_check_lib_save_LIBS
21628 fi
21629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
21630 $as_echo "$ac_cv_lib_sasl2_sasl_client_init" >&6; }
21631 if test "x$ac_cv_lib_sasl2_sasl_client_init" = x""yes; then :
21632   ol_link_sasl="-lsasl2"
21633 else
21634   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl" >&5
21635 $as_echo_n "checking for sasl_client_init in -lsasl... " >&6; }
21636 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then :
21637   $as_echo_n "(cached) " >&6
21638 else
21639   ac_check_lib_save_LIBS=$LIBS
21640 LIBS="-lsasl  $LIBS"
21641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21642 /* end confdefs.h.  */
21643
21644 /* Override any GCC internal prototype to avoid an error.
21645    Use char because int might match the return type of a GCC
21646    builtin and then its argument prototype would still apply.  */
21647 #ifdef __cplusplus
21648 extern "C"
21649 #endif
21650 char sasl_client_init ();
21651 int
21652 main ()
21653 {
21654 return sasl_client_init ();
21655   ;
21656   return 0;
21657 }
21658 _ACEOF
21659 if ac_fn_c_try_link "$LINENO"; then :
21660   ac_cv_lib_sasl_sasl_client_init=yes
21661 else
21662   ac_cv_lib_sasl_sasl_client_init=no
21663 fi
21664 rm -f core conftest.err conftest.$ac_objext \
21665     conftest$ac_exeext conftest.$ac_ext
21666 LIBS=$ac_check_lib_save_LIBS
21667 fi
21668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl_sasl_client_init" >&5
21669 $as_echo "$ac_cv_lib_sasl_sasl_client_init" >&6; }
21670 if test "x$ac_cv_lib_sasl_sasl_client_init" = x""yes; then :
21671   ol_link_sasl="-lsasl"
21672 fi
21673
21674 fi
21675
21676         fi
21677
21678         if test $ol_link_sasl = no ; then
21679                 if test $ol_with_cyrus_sasl != auto ; then
21680                         as_fn_error "Could not locate Cyrus SASL" "$LINENO" 5
21681                 else
21682                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate Cyrus SASL" >&5
21683 $as_echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
21684                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
21685 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
21686                         if test $ol_link_tls = no ; then
21687                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
21688 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
21689                         fi
21690                 fi
21691         else
21692                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Cyrus SASL library version" >&5
21693 $as_echo_n "checking Cyrus SASL library version... " >&6; }
21694 if test "${ol_cv_sasl_compat+set}" = set; then :
21695   $as_echo_n "(cached) " >&6
21696 else
21697
21698         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21699 /* end confdefs.h.  */
21700
21701 #ifdef HAVE_SASL_SASL_H
21702 #include <sasl/sasl.h>
21703 #else
21704 #include <sasl.h>
21705 #endif
21706
21707 /* Require 2.1.15+ */
21708 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21709         char *__sasl_compat = "2.2+ or better okay (we guess)";
21710 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21711         && SASL_VERSION_STEP >=15
21712         char *__sasl_compat = "2.1.15+ or better okay";
21713 #endif
21714
21715 _ACEOF
21716 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21717   $EGREP "__sasl_compat" >/dev/null 2>&1; then :
21718   ol_cv_sasl_compat=yes
21719 else
21720   ol_cv_sasl_compat=no
21721 fi
21722 rm -f conftest*
21723
21724 fi
21725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sasl_compat" >&5
21726 $as_echo "$ol_cv_sasl_compat" >&6; }
21727
21728                 if test $ol_cv_sasl_compat = no ; then
21729                         ol_link_sasl=no
21730                         as_fn_error "Cyrus SASL library located but is incompatible" "$LINENO" 5
21731                 fi
21732
21733
21734 $as_echo "#define HAVE_CYRUS_SASL 1" >>confdefs.h
21735
21736                 SASL_LIBS="$ol_link_sasl"
21737                 if test $ol_enable_spasswd != no ; then
21738                         ol_link_spasswd=yes
21739                 fi
21740
21741                 ac_save_LIBS="$LIBS"
21742                 LIBS="$LIBS $ol_link_sasl"
21743                 ac_fn_c_check_func "$LINENO" "sasl_version" "ac_cv_func_sasl_version"
21744 if test "x$ac_cv_func_sasl_version" = x""yes; then :
21745
21746 $as_echo "#define HAVE_SASL_VERSION 1" >>confdefs.h
21747
21748 fi
21749
21750                 LIBS="$ac_save_LIBS"
21751
21752                 WITH_SASL=yes
21753         fi
21754
21755 else
21756         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
21757 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
21758         if test $ol_link_tls = no ; then
21759                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
21760 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
21761         fi
21762 fi
21763
21764 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
21765         dev=no
21766         if test -r /dev/urandom ; then
21767                 dev="/dev/urandom";
21768         elif test -r /idev/urandom ; then
21769                 dev="/idev/urandom";
21770         elif test -r /dev/srandom ; then
21771                 dev="/dev/srandom";
21772         elif test -r /dev/random ; then
21773                 dev="/dev/random";
21774         elif test -r /idev/random ; then
21775                 dev="/idev/random";
21776         fi
21777
21778         if test $dev != no ; then
21779
21780 cat >>confdefs.h <<_ACEOF
21781 #define URANDOM_DEVICE "$dev"
21782 _ACEOF
21783
21784         fi
21785 fi
21786
21787 ol_link_fetch=no
21788 if test $ol_with_fetch != no ; then
21789         ol_LIBS=$LIBS
21790 LIBS="-lfetch -lcom_err $LIBS"
21791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking fetch(3) library" >&5
21792 $as_echo_n "checking fetch(3) library... " >&6; }
21793 if test "${ol_cv_lib_fetch+set}" = set; then :
21794   $as_echo_n "(cached) " >&6
21795 else
21796
21797         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21798 /* end confdefs.h.  */
21799
21800 #ifdef HAVE_SYS_PARAM_H
21801 #include <sys/param.h>
21802 #endif
21803 #include <stdio.h>
21804 #include <fetch.h>
21805 int
21806 main ()
21807 {
21808 struct url *u = fetchParseURL("file:///");
21809   ;
21810   return 0;
21811 }
21812 _ACEOF
21813 if ac_fn_c_try_link "$LINENO"; then :
21814   ol_cv_lib_fetch=yes
21815 else
21816   ol_cv_lib_fetch=no
21817 fi
21818 rm -f core conftest.err conftest.$ac_objext \
21819     conftest$ac_exeext conftest.$ac_ext
21820 fi
21821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_fetch" >&5
21822 $as_echo "$ol_cv_lib_fetch" >&6; }
21823 LIBS=$ol_LIBS
21824 if test $ol_cv_lib_fetch != no ; then
21825         ol_link_fetch="-lfetch -lcom_err"
21826
21827 $as_echo "#define HAVE_FETCH 1" >>confdefs.h
21828
21829 fi
21830
21831
21832         if test $ol_cv_lib_fetch != no ; then
21833                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21834                 ol_link_fetch=freebsd
21835
21836         elif test $ol_with_fetch != auto ; then
21837                 as_fn_error "no suitable API for --with-fetch=$ol_with_fetch" "$LINENO" 5
21838         fi
21839 fi
21840
21841 if test $ol_enable_crypt != no ; then
21842         save_LIBS="$LIBS"
21843         LIBS="$TLS_LIBS $LIBS"
21844
21845         ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
21846 if test "x$ac_cv_func_crypt" = x""yes; then :
21847   have_crypt=yes
21848 else
21849
21850                 LIBS="$save_LIBS"
21851                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
21852 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
21853 if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
21854   $as_echo_n "(cached) " >&6
21855 else
21856   ac_check_lib_save_LIBS=$LIBS
21857 LIBS="-lcrypt  $LIBS"
21858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21859 /* end confdefs.h.  */
21860
21861 /* Override any GCC internal prototype to avoid an error.
21862    Use char because int might match the return type of a GCC
21863    builtin and then its argument prototype would still apply.  */
21864 #ifdef __cplusplus
21865 extern "C"
21866 #endif
21867 char crypt ();
21868 int
21869 main ()
21870 {
21871 return crypt ();
21872   ;
21873   return 0;
21874 }
21875 _ACEOF
21876 if ac_fn_c_try_link "$LINENO"; then :
21877   ac_cv_lib_crypt_crypt=yes
21878 else
21879   ac_cv_lib_crypt_crypt=no
21880 fi
21881 rm -f core conftest.err conftest.$ac_objext \
21882     conftest$ac_exeext conftest.$ac_ext
21883 LIBS=$ac_check_lib_save_LIBS
21884 fi
21885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
21886 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
21887 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
21888   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21889                         have_crypt=yes
21890 else
21891   have_crypt=no
21892 fi
21893
21894 fi
21895
21896
21897         LIBS="$save_LIBS"
21898
21899         if test $have_crypt = yes ; then
21900
21901 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
21902
21903         else
21904                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find crypt" >&5
21905 $as_echo "$as_me: WARNING: could not find crypt" >&2;}
21906                 if test $ol_enable_crypt = yes ; then
21907                         as_fn_error "could not find crypt, select appropriate options or disable" "$LINENO" 5
21908                 fi
21909
21910                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling crypt support" >&5
21911 $as_echo "$as_me: WARNING: disabling crypt support" >&2;}
21912                 ol_enable_crypt=no
21913         fi
21914 fi
21915
21916 if test $ol_enable_proctitle != no ; then
21917         ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
21918 if test "x$ac_cv_func_setproctitle" = x""yes; then :
21919   have_setproctitle=yes
21920 else
21921
21922                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5
21923 $as_echo_n "checking for setproctitle in -lutil... " >&6; }
21924 if test "${ac_cv_lib_util_setproctitle+set}" = set; then :
21925   $as_echo_n "(cached) " >&6
21926 else
21927   ac_check_lib_save_LIBS=$LIBS
21928 LIBS="-lutil  $LIBS"
21929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21930 /* end confdefs.h.  */
21931
21932 /* Override any GCC internal prototype to avoid an error.
21933    Use char because int might match the return type of a GCC
21934    builtin and then its argument prototype would still apply.  */
21935 #ifdef __cplusplus
21936 extern "C"
21937 #endif
21938 char setproctitle ();
21939 int
21940 main ()
21941 {
21942 return setproctitle ();
21943   ;
21944   return 0;
21945 }
21946 _ACEOF
21947 if ac_fn_c_try_link "$LINENO"; then :
21948   ac_cv_lib_util_setproctitle=yes
21949 else
21950   ac_cv_lib_util_setproctitle=no
21951 fi
21952 rm -f core conftest.err conftest.$ac_objext \
21953     conftest$ac_exeext conftest.$ac_ext
21954 LIBS=$ac_check_lib_save_LIBS
21955 fi
21956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_setproctitle" >&5
21957 $as_echo "$ac_cv_lib_util_setproctitle" >&6; }
21958 if test "x$ac_cv_lib_util_setproctitle" = x""yes; then :
21959   have_setproctitle=yes
21960                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21961 else
21962   have_setproctitle=no
21963                         case " $LIBOBJS " in
21964   *" setproctitle.$ac_objext "* ) ;;
21965   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
21966  ;;
21967 esac
21968
21969                         LIBSRCS="$LIBSRCS setproctitle.c"
21970 fi
21971
21972 fi
21973
21974
21975         if test $have_setproctitle = yes ; then
21976
21977 $as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h
21978
21979         fi
21980 fi
21981
21982 if test $ol_enable_slp != no ; then
21983         for ac_header in slp.h
21984 do :
21985   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21986 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21987 eval as_val=\$$as_ac_Header
21988    if test "x$as_val" = x""yes; then :
21989   cat >>confdefs.h <<_ACEOF
21990 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21991 _ACEOF
21992
21993 fi
21994
21995 done
21996
21997
21998         if test $ac_cv_header_slp_h = yes ; then
21999                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLPOpen in -lslp" >&5
22000 $as_echo_n "checking for SLPOpen in -lslp... " >&6; }
22001 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then :
22002   $as_echo_n "(cached) " >&6
22003 else
22004   ac_check_lib_save_LIBS=$LIBS
22005 LIBS="-lslp  $LIBS"
22006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22007 /* end confdefs.h.  */
22008
22009 /* Override any GCC internal prototype to avoid an error.
22010    Use char because int might match the return type of a GCC
22011    builtin and then its argument prototype would still apply.  */
22012 #ifdef __cplusplus
22013 extern "C"
22014 #endif
22015 char SLPOpen ();
22016 int
22017 main ()
22018 {
22019 return SLPOpen ();
22020   ;
22021   return 0;
22022 }
22023 _ACEOF
22024 if ac_fn_c_try_link "$LINENO"; then :
22025   ac_cv_lib_slp_SLPOpen=yes
22026 else
22027   ac_cv_lib_slp_SLPOpen=no
22028 fi
22029 rm -f core conftest.err conftest.$ac_objext \
22030     conftest$ac_exeext conftest.$ac_ext
22031 LIBS=$ac_check_lib_save_LIBS
22032 fi
22033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slp_SLPOpen" >&5
22034 $as_echo "$ac_cv_lib_slp_SLPOpen" >&6; }
22035 if test "x$ac_cv_lib_slp_SLPOpen" = x""yes; then :
22036   have_slp=yes
22037 else
22038   have_slp=no
22039 fi
22040
22041                 if test $have_slp = yes ; then
22042
22043 $as_echo "#define HAVE_SLP 1" >>confdefs.h
22044
22045                         SLAPD_SLP_LIBS=-lslp
22046                 fi
22047
22048         elif test $ol_enable_slp = yes ; then
22049                 as_fn_error "SLP not found" "$LINENO" 5
22050         fi
22051 fi
22052
22053
22054 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
22055 if test "x$ac_cv_type_mode_t" = x""yes; then :
22056
22057 else
22058
22059 cat >>confdefs.h <<_ACEOF
22060 #define mode_t int
22061 _ACEOF
22062
22063 fi
22064
22065 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
22066 if test "x$ac_cv_type_off_t" = x""yes; then :
22067
22068 else
22069
22070 cat >>confdefs.h <<_ACEOF
22071 #define off_t long
22072 _ACEOF
22073
22074 fi
22075
22076 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
22077 if test "x$ac_cv_type_pid_t" = x""yes; then :
22078
22079 else
22080
22081 cat >>confdefs.h <<_ACEOF
22082 #define pid_t int
22083 _ACEOF
22084
22085 fi
22086
22087 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
22088 if test "x$ac_cv_type_ssize_t" = x""yes; then :
22089
22090 else
22091
22092 cat >>confdefs.h <<_ACEOF
22093 #define ssize_t signed int
22094 _ACEOF
22095
22096 fi
22097
22098 ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
22099 if test "x$ac_cv_type_caddr_t" = x""yes; then :
22100
22101 else
22102
22103 cat >>confdefs.h <<_ACEOF
22104 #define caddr_t char *
22105 _ACEOF
22106
22107 fi
22108
22109 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
22110 if test "x$ac_cv_type_size_t" = x""yes; then :
22111
22112 else
22113
22114 cat >>confdefs.h <<_ACEOF
22115 #define size_t unsigned
22116 _ACEOF
22117
22118 fi
22119
22120
22121 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
22122 if test "x$ac_cv_type_long_long" = x""yes; then :
22123
22124 cat >>confdefs.h <<_ACEOF
22125 #define HAVE_LONG_LONG 1
22126 _ACEOF
22127
22128
22129 fi
22130
22131 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
22132 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
22133
22134 cat >>confdefs.h <<_ACEOF
22135 #define HAVE_PTRDIFF_T 1
22136 _ACEOF
22137
22138
22139 fi
22140
22141
22142
22143 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default
22144 #ifdef HAVE_SYS_SOCKET_H
22145 #include <sys/socket.h>
22146 #endif
22147 "
22148 if test "x$ac_cv_type_socklen_t" = x""yes; then :
22149
22150 fi
22151
22152
22153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the type of arg 3 to accept()" >&5
22154 $as_echo_n "checking the type of arg 3 to accept()... " >&6; }
22155 if test "${ol_cv_type_ber_socklen_t+set}" = set; then :
22156   $as_echo_n "(cached) " >&6
22157 else
22158
22159         set socklen_t int unsigned "unsigned long" long size_t
22160         test "$ac_cv_type_socklen_t" = yes || shift
22161         ol_cv_type_ber_socklen_t=$1 guessing="guessing "
22162         for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
22163                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22164 /* end confdefs.h.  */
22165 $ac_includes_default
22166 #ifdef HAVE_SYS_SOCKET_H
22167 #include <sys/socket.h>
22168 #endif
22169 extern int accept(int s, $addrtype *ap, $lentype *lp);
22170
22171 int
22172 main ()
22173 {
22174
22175 accept(0, (struct sockaddr *) 0, ($lentype *) 0);
22176
22177   ;
22178   return 0;
22179 }
22180 _ACEOF
22181 if ac_fn_c_try_compile "$LINENO"; then :
22182   ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
22183 fi
22184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22185         done ; done
22186 fi
22187
22188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
22189 $as_echo "$guessing$ol_cv_type_ber_socklen_t *" >&6; }
22190
22191 cat >>confdefs.h <<_ACEOF
22192 #define ber_socklen_t $ol_cv_type_ber_socklen_t
22193 _ACEOF
22194
22195
22196 if test "$ac_cv_type_socklen_t" != yes; then
22197
22198 cat >>confdefs.h <<_ACEOF
22199 #define socklen_t $ol_cv_type_ber_socklen_t
22200 _ACEOF
22201
22202 fi
22203
22204
22205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
22206 $as_echo_n "checking return type of signal handlers... " >&6; }
22207 if test "${ac_cv_type_signal+set}" = set; then :
22208   $as_echo_n "(cached) " >&6
22209 else
22210   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22211 /* end confdefs.h.  */
22212 #include <sys/types.h>
22213 #include <signal.h>
22214
22215 int
22216 main ()
22217 {
22218 return *(signal (0, 0)) (0) == 1;
22219   ;
22220   return 0;
22221 }
22222 _ACEOF
22223 if ac_fn_c_try_compile "$LINENO"; then :
22224   ac_cv_type_signal=int
22225 else
22226   ac_cv_type_signal=void
22227 fi
22228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22229 fi
22230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
22231 $as_echo "$ac_cv_type_signal" >&6; }
22232
22233 cat >>confdefs.h <<_ACEOF
22234 #define RETSIGTYPE $ac_cv_type_signal
22235 _ACEOF
22236
22237
22238
22239 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default
22240 #include <signal.h>
22241
22242 "
22243 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
22244
22245 else
22246
22247 cat >>confdefs.h <<_ACEOF
22248 #define sig_atomic_t int
22249 _ACEOF
22250
22251 fi
22252
22253
22254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
22255 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
22256 if test "${ac_cv_type_uid_t+set}" = set; then :
22257   $as_echo_n "(cached) " >&6
22258 else
22259   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22260 /* end confdefs.h.  */
22261 #include <sys/types.h>
22262
22263 _ACEOF
22264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22265   $EGREP "uid_t" >/dev/null 2>&1; then :
22266   ac_cv_type_uid_t=yes
22267 else
22268   ac_cv_type_uid_t=no
22269 fi
22270 rm -f conftest*
22271
22272 fi
22273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
22274 $as_echo "$ac_cv_type_uid_t" >&6; }
22275 if test $ac_cv_type_uid_t = no; then
22276
22277 $as_echo "#define uid_t int" >>confdefs.h
22278
22279
22280 $as_echo "#define gid_t int" >>confdefs.h
22281
22282 fi
22283
22284
22285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
22286 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
22287 if test "${ac_cv_header_time+set}" = set; then :
22288   $as_echo_n "(cached) " >&6
22289 else
22290   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22291 /* end confdefs.h.  */
22292 #include <sys/types.h>
22293 #include <sys/time.h>
22294 #include <time.h>
22295
22296 int
22297 main ()
22298 {
22299 if ((struct tm *) 0)
22300 return 0;
22301   ;
22302   return 0;
22303 }
22304 _ACEOF
22305 if ac_fn_c_try_compile "$LINENO"; then :
22306   ac_cv_header_time=yes
22307 else
22308   ac_cv_header_time=no
22309 fi
22310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22311 fi
22312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
22313 $as_echo "$ac_cv_header_time" >&6; }
22314 if test $ac_cv_header_time = yes; then
22315
22316 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
22317
22318 fi
22319
22320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
22321 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
22322 if test "${ac_cv_struct_tm+set}" = set; then :
22323   $as_echo_n "(cached) " >&6
22324 else
22325   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22326 /* end confdefs.h.  */
22327 #include <sys/types.h>
22328 #include <time.h>
22329
22330 int
22331 main ()
22332 {
22333 struct tm tm;
22334                                      int *p = &tm.tm_sec;
22335                                      return !p;
22336   ;
22337   return 0;
22338 }
22339 _ACEOF
22340 if ac_fn_c_try_compile "$LINENO"; then :
22341   ac_cv_struct_tm=time.h
22342 else
22343   ac_cv_struct_tm=sys/time.h
22344 fi
22345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22346 fi
22347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
22348 $as_echo "$ac_cv_struct_tm" >&6; }
22349 if test $ac_cv_struct_tm = sys/time.h; then
22350
22351 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
22352
22353 fi
22354
22355 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
22356 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
22357
22358 cat >>confdefs.h <<_ACEOF
22359 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
22360 _ACEOF
22361
22362
22363 fi
22364
22365 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "$ac_includes_default
22366 #include <pwd.h>
22367 "
22368 if test "x$ac_cv_member_struct_passwd_pw_gecos" = x""yes; then :
22369
22370 cat >>confdefs.h <<_ACEOF
22371 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
22372 _ACEOF
22373
22374
22375 fi
22376
22377 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "$ac_includes_default
22378 #include <pwd.h>
22379 "
22380 if test "x$ac_cv_member_struct_passwd_pw_passwd" = x""yes; then :
22381
22382 cat >>confdefs.h <<_ACEOF
22383 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
22384 _ACEOF
22385
22386
22387 fi
22388
22389
22390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if toupper() requires islower()" >&5
22391 $as_echo_n "checking if toupper() requires islower()... " >&6; }
22392 if test "${ol_cv_c_upper_lower+set}" = set; then :
22393   $as_echo_n "(cached) " >&6
22394 else
22395
22396         if test "$cross_compiling" = yes; then :
22397   ol_cv_c_upper_lower=safe
22398 else
22399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22400 /* end confdefs.h.  */
22401
22402 #include <ctype.h>
22403 main()
22404 {
22405         if ('C' == toupper('C'))
22406                 exit(0);
22407         else
22408                 exit(1);
22409 }
22410 _ACEOF
22411 if ac_fn_c_try_run "$LINENO"; then :
22412   ol_cv_c_upper_lower=no
22413 else
22414   ol_cv_c_upper_lower=yes
22415 fi
22416 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22417   conftest.$ac_objext conftest.beam conftest.$ac_ext
22418 fi
22419
22420 fi
22421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_upper_lower" >&5
22422 $as_echo "$ol_cv_c_upper_lower" >&6; }
22423 if test $ol_cv_c_upper_lower != no ; then
22424
22425 $as_echo "#define C_UPPER_LOWER 1" >>confdefs.h
22426
22427 fi
22428
22429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
22430 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
22431 if test "${ac_cv_c_const+set}" = set; then :
22432   $as_echo_n "(cached) " >&6
22433 else
22434   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22435 /* end confdefs.h.  */
22436
22437 int
22438 main ()
22439 {
22440 /* FIXME: Include the comments suggested by Paul. */
22441 #ifndef __cplusplus
22442   /* Ultrix mips cc rejects this.  */
22443   typedef int charset[2];
22444   const charset cs;
22445   /* SunOS 4.1.1 cc rejects this.  */
22446   char const *const *pcpcc;
22447   char **ppc;
22448   /* NEC SVR4.0.2 mips cc rejects this.  */
22449   struct point {int x, y;};
22450   static struct point const zero = {0,0};
22451   /* AIX XL C 1.02.0.0 rejects this.
22452      It does not let you subtract one const X* pointer from another in
22453      an arm of an if-expression whose if-part is not a constant
22454      expression */
22455   const char *g = "string";
22456   pcpcc = &g + (g ? g-g : 0);
22457   /* HPUX 7.0 cc rejects these. */
22458   ++pcpcc;
22459   ppc = (char**) pcpcc;
22460   pcpcc = (char const *const *) ppc;
22461   { /* SCO 3.2v4 cc rejects this.  */
22462     char *t;
22463     char const *s = 0 ? (char *) 0 : (char const *) 0;
22464
22465     *t++ = 0;
22466     if (s) return 0;
22467   }
22468   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22469     int x[] = {25, 17};
22470     const int *foo = &x[0];
22471     ++foo;
22472   }
22473   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22474     typedef const int *iptr;
22475     iptr p = 0;
22476     ++p;
22477   }
22478   { /* AIX XL C 1.02.0.0 rejects this saying
22479        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22480     struct s { int j; const int *ap[3]; };
22481     struct s *b; b->j = 5;
22482   }
22483   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22484     const int foo = 10;
22485     if (!foo) return 0;
22486   }
22487   return !cs[0] && !zero.x;
22488 #endif
22489
22490   ;
22491   return 0;
22492 }
22493 _ACEOF
22494 if ac_fn_c_try_compile "$LINENO"; then :
22495   ac_cv_c_const=yes
22496 else
22497   ac_cv_c_const=no
22498 fi
22499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22500 fi
22501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
22502 $as_echo "$ac_cv_c_const" >&6; }
22503 if test $ac_cv_c_const = no; then
22504
22505 $as_echo "#define const /**/" >>confdefs.h
22506
22507 fi
22508
22509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler understands volatile" >&5
22510 $as_echo_n "checking if compiler understands volatile... " >&6; }
22511 if test "${ol_cv_c_volatile+set}" = set; then :
22512   $as_echo_n "(cached) " >&6
22513 else
22514   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22515 /* end confdefs.h.  */
22516 int x, y, z;
22517 int
22518 main ()
22519 {
22520 volatile int a; int * volatile b = x ? &y : &z;
22521       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22522       *b = 0;
22523   ;
22524   return 0;
22525 }
22526 _ACEOF
22527 if ac_fn_c_try_compile "$LINENO"; then :
22528   ol_cv_c_volatile=yes
22529 else
22530   ol_cv_c_volatile=no
22531 fi
22532 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22533 fi
22534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_volatile" >&5
22535 $as_echo "$ol_cv_c_volatile" >&6; }
22536   if test $ol_cv_c_volatile = yes; then
22537     :
22538   else
22539
22540 $as_echo "#define volatile /**/" >>confdefs.h
22541
22542   fi
22543
22544
22545 if test $cross_compiling = yes ; then
22546         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Crossing compiling... all bets are off!" >&5
22547 $as_echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
22548
22549 $as_echo "#define CROSS_COMPILING 1" >>confdefs.h
22550
22551 else
22552          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
22553 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
22554 if test "${ac_cv_c_bigendian+set}" = set; then :
22555   $as_echo_n "(cached) " >&6
22556 else
22557   ac_cv_c_bigendian=unknown
22558     # See if we're dealing with a universal compiler.
22559     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22560 /* end confdefs.h.  */
22561 #ifndef __APPLE_CC__
22562                not a universal capable compiler
22563              #endif
22564              typedef int dummy;
22565
22566 _ACEOF
22567 if ac_fn_c_try_compile "$LINENO"; then :
22568
22569         # Check for potential -arch flags.  It is not universal unless
22570         # there are at least two -arch flags with different values.
22571         ac_arch=
22572         ac_prev=
22573         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
22574          if test -n "$ac_prev"; then
22575            case $ac_word in
22576              i?86 | x86_64 | ppc | ppc64)
22577                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
22578                  ac_arch=$ac_word
22579                else
22580                  ac_cv_c_bigendian=universal
22581                  break
22582                fi
22583                ;;
22584            esac
22585            ac_prev=
22586          elif test "x$ac_word" = "x-arch"; then
22587            ac_prev=arch
22588          fi
22589        done
22590 fi
22591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22592     if test $ac_cv_c_bigendian = unknown; then
22593       # See if sys/param.h defines the BYTE_ORDER macro.
22594       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22595 /* end confdefs.h.  */
22596 #include <sys/types.h>
22597              #include <sys/param.h>
22598
22599 int
22600 main ()
22601 {
22602 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
22603                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
22604                      && LITTLE_ENDIAN)
22605               bogus endian macros
22606              #endif
22607
22608   ;
22609   return 0;
22610 }
22611 _ACEOF
22612 if ac_fn_c_try_compile "$LINENO"; then :
22613   # It does; now see whether it defined to BIG_ENDIAN or not.
22614          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22615 /* end confdefs.h.  */
22616 #include <sys/types.h>
22617                 #include <sys/param.h>
22618
22619 int
22620 main ()
22621 {
22622 #if BYTE_ORDER != BIG_ENDIAN
22623                  not big endian
22624                 #endif
22625
22626   ;
22627   return 0;
22628 }
22629 _ACEOF
22630 if ac_fn_c_try_compile "$LINENO"; then :
22631   ac_cv_c_bigendian=yes
22632 else
22633   ac_cv_c_bigendian=no
22634 fi
22635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22636 fi
22637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22638     fi
22639     if test $ac_cv_c_bigendian = unknown; then
22640       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
22641       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22642 /* end confdefs.h.  */
22643 #include <limits.h>
22644
22645 int
22646 main ()
22647 {
22648 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
22649               bogus endian macros
22650              #endif
22651
22652   ;
22653   return 0;
22654 }
22655 _ACEOF
22656 if ac_fn_c_try_compile "$LINENO"; then :
22657   # It does; now see whether it defined to _BIG_ENDIAN or not.
22658          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22659 /* end confdefs.h.  */
22660 #include <limits.h>
22661
22662 int
22663 main ()
22664 {
22665 #ifndef _BIG_ENDIAN
22666                  not big endian
22667                 #endif
22668
22669   ;
22670   return 0;
22671 }
22672 _ACEOF
22673 if ac_fn_c_try_compile "$LINENO"; then :
22674   ac_cv_c_bigendian=yes
22675 else
22676   ac_cv_c_bigendian=no
22677 fi
22678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22679 fi
22680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22681     fi
22682     if test $ac_cv_c_bigendian = unknown; then
22683       # Compile a test program.
22684       if test "$cross_compiling" = yes; then :
22685   # Try to guess by grepping values from an object file.
22686          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22687 /* end confdefs.h.  */
22688 short int ascii_mm[] =
22689                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22690                 short int ascii_ii[] =
22691                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
22692                 int use_ascii (int i) {
22693                   return ascii_mm[i] + ascii_ii[i];
22694                 }
22695                 short int ebcdic_ii[] =
22696                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22697                 short int ebcdic_mm[] =
22698                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
22699                 int use_ebcdic (int i) {
22700                   return ebcdic_mm[i] + ebcdic_ii[i];
22701                 }
22702                 extern int foo;
22703
22704 int
22705 main ()
22706 {
22707 return use_ascii (foo) == use_ebcdic (foo);
22708   ;
22709   return 0;
22710 }
22711 _ACEOF
22712 if ac_fn_c_try_compile "$LINENO"; then :
22713   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
22714               ac_cv_c_bigendian=yes
22715             fi
22716             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
22717               if test "$ac_cv_c_bigendian" = unknown; then
22718                 ac_cv_c_bigendian=no
22719               else
22720                 # finding both strings is unlikely to happen, but who knows?
22721                 ac_cv_c_bigendian=unknown
22722               fi
22723             fi
22724 fi
22725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22726 else
22727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22728 /* end confdefs.h.  */
22729 $ac_includes_default
22730 int
22731 main ()
22732 {
22733
22734              /* Are we little or big endian?  From Harbison&Steele.  */
22735              union
22736              {
22737                long int l;
22738                char c[sizeof (long int)];
22739              } u;
22740              u.l = 1;
22741              return u.c[sizeof (long int) - 1] == 1;
22742
22743   ;
22744   return 0;
22745 }
22746 _ACEOF
22747 if ac_fn_c_try_run "$LINENO"; then :
22748   ac_cv_c_bigendian=no
22749 else
22750   ac_cv_c_bigendian=yes
22751 fi
22752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22753   conftest.$ac_objext conftest.beam conftest.$ac_ext
22754 fi
22755
22756     fi
22757 fi
22758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
22759 $as_echo "$ac_cv_c_bigendian" >&6; }
22760  case $ac_cv_c_bigendian in #(
22761    yes)
22762      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
22763 ;; #(
22764    no)
22765       ;; #(
22766    universal)
22767
22768 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
22769
22770      ;; #(
22771    *)
22772      as_fn_error "unknown endianness
22773  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
22774  esac
22775
22776 fi
22777
22778 # The cast to long int works around a bug in the HP C Compiler
22779 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22780 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22781 # This bug is HP SR number 8606223364.
22782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
22783 $as_echo_n "checking size of short... " >&6; }
22784 if test "${ac_cv_sizeof_short+set}" = set; then :
22785   $as_echo_n "(cached) " >&6
22786 else
22787   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
22788
22789 else
22790   if test "$ac_cv_type_short" = yes; then
22791      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22792 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22793 { as_fn_set_status 77
22794 as_fn_error "cannot compute sizeof (short)
22795 See \`config.log' for more details." "$LINENO" 5; }; }
22796    else
22797      ac_cv_sizeof_short=0
22798    fi
22799 fi
22800
22801 fi
22802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
22803 $as_echo "$ac_cv_sizeof_short" >&6; }
22804
22805
22806
22807 cat >>confdefs.h <<_ACEOF
22808 #define SIZEOF_SHORT $ac_cv_sizeof_short
22809 _ACEOF
22810
22811
22812 # The cast to long int works around a bug in the HP C Compiler
22813 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22814 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22815 # This bug is HP SR number 8606223364.
22816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
22817 $as_echo_n "checking size of int... " >&6; }
22818 if test "${ac_cv_sizeof_int+set}" = set; then :
22819   $as_echo_n "(cached) " >&6
22820 else
22821   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
22822
22823 else
22824   if test "$ac_cv_type_int" = yes; then
22825      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22826 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22827 { as_fn_set_status 77
22828 as_fn_error "cannot compute sizeof (int)
22829 See \`config.log' for more details." "$LINENO" 5; }; }
22830    else
22831      ac_cv_sizeof_int=0
22832    fi
22833 fi
22834
22835 fi
22836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
22837 $as_echo "$ac_cv_sizeof_int" >&6; }
22838
22839
22840
22841 cat >>confdefs.h <<_ACEOF
22842 #define SIZEOF_INT $ac_cv_sizeof_int
22843 _ACEOF
22844
22845
22846 # The cast to long int works around a bug in the HP C Compiler
22847 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22848 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22849 # This bug is HP SR number 8606223364.
22850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
22851 $as_echo_n "checking size of long... " >&6; }
22852 if test "${ac_cv_sizeof_long+set}" = set; then :
22853   $as_echo_n "(cached) " >&6
22854 else
22855   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
22856
22857 else
22858   if test "$ac_cv_type_long" = yes; then
22859      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22860 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22861 { as_fn_set_status 77
22862 as_fn_error "cannot compute sizeof (long)
22863 See \`config.log' for more details." "$LINENO" 5; }; }
22864    else
22865      ac_cv_sizeof_long=0
22866    fi
22867 fi
22868
22869 fi
22870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
22871 $as_echo "$ac_cv_sizeof_long" >&6; }
22872
22873
22874
22875 cat >>confdefs.h <<_ACEOF
22876 #define SIZEOF_LONG $ac_cv_sizeof_long
22877 _ACEOF
22878
22879
22880 # The cast to long int works around a bug in the HP C Compiler
22881 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22882 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22883 # This bug is HP SR number 8606223364.
22884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
22885 $as_echo_n "checking size of long long... " >&6; }
22886 if test "${ac_cv_sizeof_long_long+set}" = set; then :
22887   $as_echo_n "(cached) " >&6
22888 else
22889   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
22890
22891 else
22892   if test "$ac_cv_type_long_long" = yes; then
22893      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22894 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22895 { as_fn_set_status 77
22896 as_fn_error "cannot compute sizeof (long long)
22897 See \`config.log' for more details." "$LINENO" 5; }; }
22898    else
22899      ac_cv_sizeof_long_long=0
22900    fi
22901 fi
22902
22903 fi
22904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
22905 $as_echo "$ac_cv_sizeof_long_long" >&6; }
22906
22907
22908
22909 cat >>confdefs.h <<_ACEOF
22910 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
22911 _ACEOF
22912
22913
22914 # The cast to long int works around a bug in the HP C Compiler
22915 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22916 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22917 # This bug is HP SR number 8606223364.
22918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
22919 $as_echo_n "checking size of wchar_t... " >&6; }
22920 if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
22921   $as_echo_n "(cached) " >&6
22922 else
22923   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "$ac_includes_default"; then :
22924
22925 else
22926   if test "$ac_cv_type_wchar_t" = yes; then
22927      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22928 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22929 { as_fn_set_status 77
22930 as_fn_error "cannot compute sizeof (wchar_t)
22931 See \`config.log' for more details." "$LINENO" 5; }; }
22932    else
22933      ac_cv_sizeof_wchar_t=0
22934    fi
22935 fi
22936
22937 fi
22938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
22939 $as_echo "$ac_cv_sizeof_wchar_t" >&6; }
22940
22941
22942
22943 cat >>confdefs.h <<_ACEOF
22944 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22945 _ACEOF
22946
22947
22948
22949 if test "$ac_cv_sizeof_int" -lt 4 ; then
22950         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
22951 $as_echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
22952
22953
22954 $as_echo "#define LBER_INT_T long" >>confdefs.h
22955
22956 else
22957
22958 $as_echo "#define LBER_INT_T int" >>confdefs.h
22959
22960 fi
22961
22962
22963 $as_echo "#define LBER_LEN_T long" >>confdefs.h
22964
22965
22966 $as_echo "#define LBER_SOCKET_T int" >>confdefs.h
22967
22968
22969 $as_echo "#define LBER_TAG_T long" >>confdefs.h
22970
22971
22972 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
22973         if test $ac_cv_sizeof_long_long -gt 4 ; then
22974                 ol_with_mp=longlong
22975
22976 $as_echo "#define USE_MP_LONG_LONG 1" >>confdefs.h
22977
22978         elif test $ol_with_mp = longlong ; then
22979                 as_fn_error "long long unusable for multiple precision" "$LINENO" 5
22980         fi
22981 fi
22982 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
22983         if test $ac_cv_sizeof_long -gt 4 ; then
22984                 ol_with_mp=long
22985
22986 $as_echo "#define USE_MP_LONG 1" >>confdefs.h
22987
22988         elif test $ol_with_mp = long ; then
22989                 as_fn_error "long unusable for multiple precision" "$LINENO" 5
22990         fi
22991 fi
22992 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
22993         for ac_header in openssl/bn.h
22994 do :
22995   ac_fn_c_check_header_mongrel "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default"
22996 if test "x$ac_cv_header_openssl_bn_h" = x""yes; then :
22997   cat >>confdefs.h <<_ACEOF
22998 #define HAVE_OPENSSL_BN_H 1
22999 _ACEOF
23000
23001 fi
23002
23003 done
23004
23005         for ac_header in openssl/crypto.h
23006 do :
23007   ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
23008 if test "x$ac_cv_header_openssl_crypto_h" = x""yes; then :
23009   cat >>confdefs.h <<_ACEOF
23010 #define HAVE_OPENSSL_CRYPTO_H 1
23011 _ACEOF
23012
23013 fi
23014
23015 done
23016
23017         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
23018                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
23019                 test "$ol_with_tls" = "found" ; then
23020                 ol_with_mp=bignum
23021
23022 $as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h
23023
23024         elif test $ol_with_mp = bignum ; then
23025                 as_fn_error "bignum not available" "$LINENO" 5
23026         fi
23027 fi
23028 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
23029         for ac_header in gmp.h
23030 do :
23031   ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
23032 if test "x$ac_cv_header_gmp_h" = x""yes; then :
23033   cat >>confdefs.h <<_ACEOF
23034 #define HAVE_GMP_H 1
23035 _ACEOF
23036
23037 fi
23038
23039 done
23040
23041         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_add_ui in -lgmp" >&5
23042 $as_echo_n "checking for __gmpz_add_ui in -lgmp... " >&6; }
23043 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then :
23044   $as_echo_n "(cached) " >&6
23045 else
23046   ac_check_lib_save_LIBS=$LIBS
23047 LIBS="-lgmp  $LIBS"
23048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23049 /* end confdefs.h.  */
23050
23051 /* Override any GCC internal prototype to avoid an error.
23052    Use char because int might match the return type of a GCC
23053    builtin and then its argument prototype would still apply.  */
23054 #ifdef __cplusplus
23055 extern "C"
23056 #endif
23057 char __gmpz_add_ui ();
23058 int
23059 main ()
23060 {
23061 return __gmpz_add_ui ();
23062   ;
23063   return 0;
23064 }
23065 _ACEOF
23066 if ac_fn_c_try_link "$LINENO"; then :
23067   ac_cv_lib_gmp___gmpz_add_ui=yes
23068 else
23069   ac_cv_lib_gmp___gmpz_add_ui=no
23070 fi
23071 rm -f core conftest.err conftest.$ac_objext \
23072     conftest$ac_exeext conftest.$ac_ext
23073 LIBS=$ac_check_lib_save_LIBS
23074 fi
23075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
23076 $as_echo "$ac_cv_lib_gmp___gmpz_add_ui" >&6; }
23077 if test "x$ac_cv_lib_gmp___gmpz_add_ui" = x""yes; then :
23078   cat >>confdefs.h <<_ACEOF
23079 #define HAVE_LIBGMP 1
23080 _ACEOF
23081
23082   LIBS="-lgmp $LIBS"
23083
23084 fi
23085
23086         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
23087
23088 $as_echo "#define USE_MP_GMP 1" >>confdefs.h
23089
23090                 ol_with_mp=gmp
23091         elif test $ol_with_mp = gmp ; then
23092                 as_fn_error "gmp not available" "$LINENO" 5
23093         fi
23094 fi
23095 if test $ol_with_mp = auto ; then
23096         ol_with_mp=no
23097 fi
23098
23099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
23100 $as_echo_n "checking for working memcmp... " >&6; }
23101 if test "${ac_cv_func_memcmp_working+set}" = set; then :
23102   $as_echo_n "(cached) " >&6
23103 else
23104   if test "$cross_compiling" = yes; then :
23105   ac_cv_func_memcmp_working=no
23106 else
23107   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23108 /* end confdefs.h.  */
23109 $ac_includes_default
23110 int
23111 main ()
23112 {
23113
23114   /* Some versions of memcmp are not 8-bit clean.  */
23115   char c0 = '\100', c1 = '\200', c2 = '\201';
23116   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
23117     return 1;
23118
23119   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
23120      or more and with at least one buffer not starting on a 4-byte boundary.
23121      William Lewis provided this test program.   */
23122   {
23123     char foo[21];
23124     char bar[21];
23125     int i;
23126     for (i = 0; i < 4; i++)
23127       {
23128         char *a = foo + i;
23129         char *b = bar + i;
23130         strcpy (a, "--------01111111");
23131         strcpy (b, "--------10000000");
23132         if (memcmp (a, b, 16) >= 0)
23133           return 1;
23134       }
23135     return 0;
23136   }
23137
23138   ;
23139   return 0;
23140 }
23141 _ACEOF
23142 if ac_fn_c_try_run "$LINENO"; then :
23143   ac_cv_func_memcmp_working=yes
23144 else
23145   ac_cv_func_memcmp_working=no
23146 fi
23147 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23148   conftest.$ac_objext conftest.beam conftest.$ac_ext
23149 fi
23150
23151 fi
23152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
23153 $as_echo "$ac_cv_func_memcmp_working" >&6; }
23154 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
23155   *" memcmp.$ac_objext "* ) ;;
23156   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
23157  ;;
23158 esac
23159
23160
23161
23162 if test $ac_cv_func_memcmp_working = no ; then
23163
23164 $as_echo "#define NEED_MEMCMP_REPLACEMENT 1" >>confdefs.h
23165
23166 fi
23167
23168 for ac_func in strftime
23169 do :
23170   ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23171 if test "x$ac_cv_func_strftime" = x""yes; then :
23172   cat >>confdefs.h <<_ACEOF
23173 #define HAVE_STRFTIME 1
23174 _ACEOF
23175
23176 else
23177   # strftime is in -lintl on SCO UNIX.
23178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
23179 $as_echo_n "checking for strftime in -lintl... " >&6; }
23180 if test "${ac_cv_lib_intl_strftime+set}" = set; then :
23181   $as_echo_n "(cached) " >&6
23182 else
23183   ac_check_lib_save_LIBS=$LIBS
23184 LIBS="-lintl  $LIBS"
23185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23186 /* end confdefs.h.  */
23187
23188 /* Override any GCC internal prototype to avoid an error.
23189    Use char because int might match the return type of a GCC
23190    builtin and then its argument prototype would still apply.  */
23191 #ifdef __cplusplus
23192 extern "C"
23193 #endif
23194 char strftime ();
23195 int
23196 main ()
23197 {
23198 return strftime ();
23199   ;
23200   return 0;
23201 }
23202 _ACEOF
23203 if ac_fn_c_try_link "$LINENO"; then :
23204   ac_cv_lib_intl_strftime=yes
23205 else
23206   ac_cv_lib_intl_strftime=no
23207 fi
23208 rm -f core conftest.err conftest.$ac_objext \
23209     conftest$ac_exeext conftest.$ac_ext
23210 LIBS=$ac_check_lib_save_LIBS
23211 fi
23212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
23213 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
23214 if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
23215   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
23216
23217 LIBS="-lintl $LIBS"
23218 fi
23219
23220 fi
23221 done
23222
23223
23224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton()" >&5
23225 $as_echo_n "checking for inet_aton()... " >&6; }
23226 if test "${ol_cv_func_inet_aton+set}" = set; then :
23227   $as_echo_n "(cached) " >&6
23228 else
23229   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23230 /* end confdefs.h.  */
23231
23232 #ifdef HAVE_SYS_TYPES_H
23233 #       include <sys/types.h>
23234 #endif
23235 #ifdef HAVE_SYS_SOCKET_H
23236 #       include <sys/socket.h>
23237 #       ifdef HAVE_SYS_SELECT_H
23238 #               include <sys/select.h>
23239 #       endif
23240 #       include <netinet/in.h>
23241 #       ifdef HAVE_ARPA_INET_H
23242 #               include <arpa/inet.h>
23243 #       endif
23244 #endif
23245
23246 int
23247 main ()
23248 {
23249 struct in_addr in;
23250 int rc = inet_aton( "255.255.255.255", &in );
23251   ;
23252   return 0;
23253 }
23254 _ACEOF
23255 if ac_fn_c_try_link "$LINENO"; then :
23256   ol_cv_func_inet_aton=yes
23257 else
23258   ol_cv_func_inet_aton=no
23259 fi
23260 rm -f core conftest.err conftest.$ac_objext \
23261     conftest$ac_exeext conftest.$ac_ext
23262 fi
23263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_inet_aton" >&5
23264 $as_echo "$ol_cv_func_inet_aton" >&6; }
23265   if test $ol_cv_func_inet_aton != no; then
23266
23267 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
23268
23269   fi
23270
23271
23272 ac_fn_c_check_func "$LINENO" "_spawnlp" "ac_cv_func__spawnlp"
23273 if test "x$ac_cv_func__spawnlp" = x""yes; then :
23274
23275 $as_echo "#define HAVE_SPAWNLP 1" >>confdefs.h
23276
23277 fi
23278
23279
23280 ac_fn_c_check_func "$LINENO" "_snprintf" "ac_cv_func__snprintf"
23281 if test "x$ac_cv_func__snprintf" = x""yes; then :
23282   ac_cv_func_snprintf=yes
23283
23284 $as_echo "#define snprintf _snprintf" >>confdefs.h
23285
23286
23287 fi
23288
23289
23290 for ac_func in vsnprintf _vsnprintf
23291 do :
23292   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23293 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23294 eval as_val=\$$as_ac_var
23295    if test "x$as_val" = x""yes; then :
23296   cat >>confdefs.h <<_ACEOF
23297 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23298 _ACEOF
23299
23300 fi
23301 done
23302
23303
23304 if test $ac_cv_func_vsnprintf = no -a $ac_cv_func__vsnprintf = yes ; then
23305         ac_cv_func_vsnprintf=yes
23306
23307 $as_echo "#define vsnprintf _vsnprintf" >>confdefs.h
23308
23309 fi
23310
23311 for ac_func in vprintf
23312 do :
23313   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
23314 if test "x$ac_cv_func_vprintf" = x""yes; then :
23315   cat >>confdefs.h <<_ACEOF
23316 #define HAVE_VPRINTF 1
23317 _ACEOF
23318
23319 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
23320 if test "x$ac_cv_func__doprnt" = x""yes; then :
23321
23322 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
23323
23324 fi
23325
23326 fi
23327 done
23328
23329
23330
23331 if test $ac_cv_func_vprintf = yes ; then
23332                 for ac_func in snprintf vsnprintf
23333 do :
23334   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23335 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23336 eval as_val=\$$as_ac_var
23337    if test "x$as_val" = x""yes; then :
23338   cat >>confdefs.h <<_ACEOF
23339 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23340 _ACEOF
23341
23342 fi
23343 done
23344
23345 fi
23346
23347 for ac_func in \
23348         bcopy                   \
23349         closesocket             \
23350         chroot                  \
23351         endgrent                \
23352         endpwent                \
23353         fcntl                   \
23354         flock                   \
23355         fstat                   \
23356         getdtablesize           \
23357         geteuid                 \
23358         getgrgid                \
23359         gethostname             \
23360         getpassphrase           \
23361         getpwuid                \
23362         getpwnam                \
23363         getspnam                \
23364         gettimeofday            \
23365         initgroups              \
23366         inet_ntoa_b             \
23367         ioctl                   \
23368         lockf                   \
23369         memcpy                  \
23370         memmove                 \
23371         memrchr                 \
23372         mkstemp                 \
23373         mktemp                  \
23374         pipe                    \
23375         read                    \
23376         recv                    \
23377         recvfrom                \
23378         setpwfile               \
23379         setgid                  \
23380         setegid                 \
23381         setsid                  \
23382         setuid                  \
23383         seteuid                 \
23384         signal                  \
23385         strdup                  \
23386         strpbrk                 \
23387         strrchr                 \
23388         strsep                  \
23389         strstr                  \
23390         strtol                  \
23391         strtoul                 \
23392         strtoq                  \
23393         strtouq                 \
23394         strtoll                 \
23395         strtoull                \
23396         strspn                  \
23397         sysconf                 \
23398         waitpid                 \
23399         wait4                   \
23400         write                   \
23401         send                    \
23402         sendmsg                 \
23403         sendto                  \
23404
23405 do :
23406   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23407 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23408 eval as_val=\$$as_ac_var
23409    if test "x$as_val" = x""yes; then :
23410   cat >>confdefs.h <<_ACEOF
23411 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23412 _ACEOF
23413
23414 fi
23415 done
23416
23417
23418 for ac_func in getopt getpeereid
23419 do :
23420   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23421 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23422 eval as_val=\$$as_ac_var
23423    if test "x$as_val" = x""yes; then :
23424   cat >>confdefs.h <<_ACEOF
23425 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23426 _ACEOF
23427
23428 else
23429   case " $LIBOBJS " in
23430   *" $ac_func.$ac_objext "* ) ;;
23431   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
23432  ;;
23433 esac
23434
23435 fi
23436 done
23437
23438
23439
23440 if test "$ac_cv_func_getopt" != yes; then
23441         LIBSRCS="$LIBSRCS getopt.c"
23442 fi
23443
23444 if test "$ac_cv_func_getpeereid" != yes; then
23445         for ac_func in getpeerucred
23446 do :
23447   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23448 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23449 eval as_val=\$$as_ac_var
23450    if test "x$as_val" = x""yes; then :
23451   cat >>confdefs.h <<_ACEOF
23452 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23453 _ACEOF
23454
23455 fi
23456 done
23457
23458         if test "$ac_cv_func_getpeerucred" != yes ; then
23459                 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrightslen" "ac_cv_member_struct_msghdr_msg_accrightslen" "$ac_includes_default
23460 #ifdef HAVE_SYS_SOCKET_H
23461 #include <sys/socket.h>
23462 #endif
23463 "
23464 if test "x$ac_cv_member_struct_msghdr_msg_accrightslen" = x""yes; then :
23465
23466 cat >>confdefs.h <<_ACEOF
23467 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
23468 _ACEOF
23469
23470
23471 fi
23472
23473                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
23474                         ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "$ac_includes_default
23475 #ifdef HAVE_SYS_SOCKET_H
23476 #include <sys/socket.h>
23477 #endif
23478 "
23479 if test "x$ac_cv_member_struct_msghdr_msg_control" = x""yes; then :
23480
23481 cat >>confdefs.h <<_ACEOF
23482 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
23483 _ACEOF
23484
23485
23486 fi
23487
23488                 fi
23489                 ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default"
23490 if test "x$ac_cv_member_struct_stat_st_fstype" = x""yes; then :
23491
23492 cat >>confdefs.h <<_ACEOF
23493 #define HAVE_STRUCT_STAT_ST_FSTYPE 1
23494 _ACEOF
23495
23496
23497 fi
23498 ac_fn_c_check_member "$LINENO" "struct stat" "st_vfstype" "ac_cv_member_struct_stat_st_vfstype" "$ac_includes_default"
23499 if test "x$ac_cv_member_struct_stat_st_vfstype" = x""yes; then :
23500
23501 cat >>confdefs.h <<_ACEOF
23502 #define HAVE_STRUCT_STAT_ST_VFSTYPE 1
23503 _ACEOF
23504
23505
23506 fi
23507
23508                 if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
23509                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23510 /* end confdefs.h.  */
23511 struct stat st; char *ptr=st.st_fstype;
23512 _ACEOF
23513 if ac_fn_c_try_compile "$LINENO"; then :
23514
23515 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1" >>confdefs.h
23516
23517 else
23518
23519 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1" >>confdefs.h
23520
23521 fi
23522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23523                 fi
23524         fi
23525         LIBSRCS="$LIBSRCS getpeereid.c"
23526 fi
23527
23528 if test "$ac_cv_func_snprintf" != yes ||
23529    test "$ac_cv_func_vsnprintf" != yes; then
23530         if test "$ac_cv_func_snprintf" != yes; then
23531
23532 $as_echo "#define snprintf ber_pvt_snprintf" >>confdefs.h
23533
23534         fi
23535         if test "$ac_cv_func_vsnprintf" != yes; then
23536
23537 $as_echo "#define vsnprintf ber_pvt_vsnprintf" >>confdefs.h
23538
23539         fi
23540 fi
23541
23542
23543 if test "$ol_enable_slapi" != no ; then
23544                         for ac_header in ltdl.h
23545 do :
23546   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
23547 if test "x$ac_cv_header_ltdl_h" = x""yes; then :
23548   cat >>confdefs.h <<_ACEOF
23549 #define HAVE_LTDL_H 1
23550 _ACEOF
23551
23552 fi
23553
23554 done
23555
23556
23557         if test $ac_cv_header_ltdl_h != yes ; then
23558                 as_fn_error "could not locate <ltdl.h>" "$LINENO" 5
23559         fi
23560         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
23561 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
23562 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
23563   $as_echo_n "(cached) " >&6
23564 else
23565   ac_check_lib_save_LIBS=$LIBS
23566 LIBS="-lltdl  $LIBS"
23567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23568 /* end confdefs.h.  */
23569
23570 /* Override any GCC internal prototype to avoid an error.
23571    Use char because int might match the return type of a GCC
23572    builtin and then its argument prototype would still apply.  */
23573 #ifdef __cplusplus
23574 extern "C"
23575 #endif
23576 char lt_dlinit ();
23577 int
23578 main ()
23579 {
23580 return lt_dlinit ();
23581   ;
23582   return 0;
23583 }
23584 _ACEOF
23585 if ac_fn_c_try_link "$LINENO"; then :
23586   ac_cv_lib_ltdl_lt_dlinit=yes
23587 else
23588   ac_cv_lib_ltdl_lt_dlinit=no
23589 fi
23590 rm -f core conftest.err conftest.$ac_objext \
23591     conftest$ac_exeext conftest.$ac_ext
23592 LIBS=$ac_check_lib_save_LIBS
23593 fi
23594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
23595 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
23596 if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
23597
23598                 SLAPI_LIBS=-lltdl
23599                 LIBSLAPI=libslapi.a
23600                 LIBSLAPITOOLS=../libslapi.a
23601
23602 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
23603
23604
23605 else
23606   as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
23607 fi
23608
23609
23610
23611 $as_echo "#define LDAP_SLAPI 1" >>confdefs.h
23612
23613 fi
23614
23615 if test "$ol_enable_debug" != no ; then
23616         if test "$ol_enable_debug" = traditional; then
23617
23618 $as_echo "#define OLD_DEBUG 1" >>confdefs.h
23619
23620         fi
23621
23622 $as_echo "#define LDAP_DEBUG 1" >>confdefs.h
23623
23624 fi
23625 if test "$ol_enable_syslog" = yes ; then
23626
23627 $as_echo "#define LDAP_SYSLOG 1" >>confdefs.h
23628
23629 fi
23630 if test "$ol_enable_proctitle" != no ; then
23631
23632 $as_echo "#define LDAP_PROCTITLE 1" >>confdefs.h
23633
23634 fi
23635 if test "$ol_enable_referrals" != no ; then
23636
23637 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION" >>confdefs.h
23638
23639 fi
23640 if test "$ol_enable_local" != no; then
23641
23642 $as_echo "#define LDAP_PF_LOCAL 1" >>confdefs.h
23643
23644 fi
23645 if test "$ol_link_ipv6" != no; then
23646
23647 $as_echo "#define LDAP_PF_INET6 1" >>confdefs.h
23648
23649 fi
23650 if test "$ol_enable_cleartext" != no ; then
23651
23652 $as_echo "#define SLAPD_CLEARTEXT 1" >>confdefs.h
23653
23654 fi
23655 if test "$ol_enable_crypt" != no ; then
23656
23657 $as_echo "#define SLAPD_CRYPT 1" >>confdefs.h
23658
23659 fi
23660 if test "$ol_link_spasswd" != no ; then
23661
23662 $as_echo "#define SLAPD_SPASSWD 1" >>confdefs.h
23663
23664 fi
23665 if test "$ol_enable_rlookups" != no ; then
23666
23667 $as_echo "#define SLAPD_RLOOKUPS 1" >>confdefs.h
23668
23669 fi
23670 if test "$ol_enable_aci" != no ; then
23671         if test $ol_enable_dynacl = no ; then
23672                 ol_enable_dynacl=yes
23673                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ACIs need dynacl" >&5
23674 $as_echo "$as_me: WARNING: ACIs need dynacl" >&2;}
23675         fi
23676         if test "$ol_enable_aci" = mod ; then
23677                 MFLAG=SLAPD_MOD_DYNAMIC
23678                                 as_fn_error "ACI build as dynamic module not supported (yet)" "$LINENO" 5
23679         else
23680                 MFLAG=SLAPD_MOD_STATIC
23681         fi
23682         WITH_ACI_ENABLED=$ol_enable_aci
23683
23684 cat >>confdefs.h <<_ACEOF
23685 #define SLAPD_ACI_ENABLED $MFLAG
23686 _ACEOF
23687
23688 else
23689         WITH_ACI_ENABLED=no
23690 fi
23691 if test "$ol_enable_dynacl" != no ; then
23692
23693 $as_echo "#define SLAP_DYNACL 1" >>confdefs.h
23694
23695 fi
23696
23697 if test "$ol_link_modules" != no ; then
23698
23699 $as_echo "#define SLAPD_MODULES 1" >>confdefs.h
23700
23701         BUILD_SLAPD=yes
23702         SLAPD_MODULES_LDFLAGS="-dlopen self"
23703 fi
23704
23705
23706 $as_echo "#define SLAPD_MOD_STATIC 1" >>confdefs.h
23707
23708
23709 $as_echo "#define SLAPD_MOD_DYNAMIC 2" >>confdefs.h
23710
23711
23712 if test "$ol_enable_monitor" != no ; then
23713         BUILD_SLAPD=yes
23714         BUILD_MONITOR=$ol_enable_monitor
23715         if test "$ol_enable_monitor" = mod ; then
23716                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23717                 MFLAG=SLAPD_MOD_DYNAMIC
23718         else
23719                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23720                 MFLAG=SLAPD_MOD_STATIC
23721         fi
23722
23723 cat >>confdefs.h <<_ACEOF
23724 #define SLAPD_MONITOR $MFLAG
23725 _ACEOF
23726
23727 fi
23728
23729 if test "$ol_enable_bdb" != no ; then
23730         BUILD_SLAPD=yes
23731         BUILD_BDB=$ol_enable_bdb
23732         if test "$ol_enable_bdb" = mod ; then
23733                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23734                 MFLAG=SLAPD_MOD_DYNAMIC
23735         else
23736                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23737                 MFLAG=SLAPD_MOD_STATIC
23738         fi
23739
23740 cat >>confdefs.h <<_ACEOF
23741 #define SLAPD_BDB $MFLAG
23742 _ACEOF
23743
23744 fi
23745
23746 if test "$ol_enable_dnssrv" != no ; then
23747         BUILD_SLAPD=yes
23748         BUILD_DNSSRV=$ol_enable_dnssrv
23749         if test "$ol_enable_dnssrv" = mod ; then
23750                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23751                 MFLAG=SLAPD_MOD_DYNAMIC
23752         else
23753                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23754                 MFLAG=SLAPD_MOD_STATIC
23755         fi
23756
23757 cat >>confdefs.h <<_ACEOF
23758 #define SLAPD_DNSSRV $MFLAG
23759 _ACEOF
23760
23761 fi
23762
23763 if test "$ol_enable_hdb" != no ; then
23764         BUILD_SLAPD=yes
23765         BUILD_HDB=$ol_enable_hdb
23766         if test "$ol_enable_hdb" = mod ; then
23767                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23768                 MFLAG=SLAPD_MOD_DYNAMIC
23769         else
23770                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23771                 MFLAG=SLAPD_MOD_STATIC
23772         fi
23773
23774 cat >>confdefs.h <<_ACEOF
23775 #define SLAPD_HDB $MFLAG
23776 _ACEOF
23777
23778 fi
23779
23780 if test "$ol_enable_ldap" != no ; then
23781         BUILD_SLAPD=yes
23782         BUILD_LDAP=$ol_enable_ldap
23783         if test "$ol_enable_ldap" = mod ; then
23784                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23785                 MFLAG=SLAPD_MOD_DYNAMIC
23786         else
23787                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23788                 MFLAG=SLAPD_MOD_STATIC
23789         fi
23790
23791 cat >>confdefs.h <<_ACEOF
23792 #define SLAPD_LDAP $MFLAG
23793 _ACEOF
23794
23795 fi
23796
23797 if test "$ol_enable_meta" != no ; then
23798         BUILD_SLAPD=yes
23799         BUILD_META=$ol_enable_meta
23800         BUILD_REWRITE=yes
23801         if test "$ol_enable_meta" = mod ; then
23802                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23803                 MFLAG=SLAPD_MOD_DYNAMIC
23804         else
23805                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23806                 MFLAG=SLAPD_MOD_STATIC
23807         fi
23808
23809 cat >>confdefs.h <<_ACEOF
23810 #define SLAPD_META $MFLAG
23811 _ACEOF
23812
23813 fi
23814
23815 if test "$ol_enable_ndb" != no ; then
23816         BUILD_SLAPD=yes
23817         BUILD_NDB=$ol_enable_ndb
23818         if test "$ol_enable_ndb" = mod ; then
23819                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ndb"
23820                 MFLAG=SLAPD_MOD_DYNAMIC
23821         else
23822                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ndb"
23823                 MFLAG=SLAPD_MOD_STATIC
23824         fi
23825
23826 cat >>confdefs.h <<_ACEOF
23827 #define SLAPD_NDB $MFLAG
23828 _ACEOF
23829
23830 fi
23831
23832 if test "$ol_enable_null" != no ; then
23833         BUILD_SLAPD=yes
23834         BUILD_NULL=$ol_enable_null
23835         if test "$ol_enable_null" = mod ; then
23836                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23837                 MFLAG=SLAPD_MOD_DYNAMIC
23838         else
23839                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23840                 MFLAG=SLAPD_MOD_STATIC
23841         fi
23842
23843 cat >>confdefs.h <<_ACEOF
23844 #define SLAPD_NULL $MFLAG
23845 _ACEOF
23846
23847 fi
23848
23849 if test "$ol_enable_passwd" != no ; then
23850         BUILD_SLAPD=yes
23851         BUILD_PASSWD=$ol_enable_passwd
23852         if test "$ol_enable_passwd" = mod ; then
23853                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23854                 MFLAG=SLAPD_MOD_DYNAMIC
23855         else
23856                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23857                 MFLAG=SLAPD_MOD_STATIC
23858         fi
23859
23860 cat >>confdefs.h <<_ACEOF
23861 #define SLAPD_PASSWD $MFLAG
23862 _ACEOF
23863
23864 fi
23865
23866 if test "$ol_link_perl" != no ; then
23867         BUILD_SLAPD=yes
23868         BUILD_PERL=$ol_enable_perl
23869         if test "$ol_enable_perl" = mod ; then
23870                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23871                 MFLAG=SLAPD_MOD_DYNAMIC
23872         else
23873                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23874                 MFLAG=SLAPD_MOD_STATIC
23875         fi
23876
23877 cat >>confdefs.h <<_ACEOF
23878 #define SLAPD_PERL $MFLAG
23879 _ACEOF
23880
23881 fi
23882
23883 if test "$ol_enable_relay" != no ; then
23884         BUILD_SLAPD=yes
23885         BUILD_RELAY=$ol_enable_relay
23886         if test "$ol_enable_relay" = mod ; then
23887                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23888                 MFLAG=SLAPD_MOD_DYNAMIC
23889         else
23890                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23891                 MFLAG=SLAPD_MOD_STATIC
23892         fi
23893
23894 cat >>confdefs.h <<_ACEOF
23895 #define SLAPD_RELAY $MFLAG
23896 _ACEOF
23897
23898 fi
23899
23900 if test "$ol_enable_shell" != no ; then
23901         if test "$ol_link_threads" != no ; then
23902                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use of --without-threads is recommended with back-shell" >&5
23903 $as_echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
23904         fi
23905         BUILD_SLAPD=yes
23906         BUILD_SHELL=$ol_enable_shell
23907         if test "$ol_enable_shell" = mod ; then
23908                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23909                 MFLAG=SLAPD_MOD_DYNAMIC
23910         else
23911                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23912                 MFLAG=SLAPD_MOD_STATIC
23913         fi
23914
23915 cat >>confdefs.h <<_ACEOF
23916 #define SLAPD_SHELL $MFLAG
23917 _ACEOF
23918
23919 fi
23920
23921 if test "$ol_enable_sock" != no ; then
23922         BUILD_SLAPD=yes
23923         BUILD_SOCK=$ol_enable_sock
23924         if test "$ol_enable_sock" = mod ; then
23925                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sock"
23926                 MFLAG=SLAPD_MOD_DYNAMIC
23927         else
23928                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sock"
23929                 MFLAG=SLAPD_MOD_STATIC
23930         fi
23931
23932 cat >>confdefs.h <<_ACEOF
23933 #define SLAPD_SOCK $MFLAG
23934 _ACEOF
23935
23936 fi
23937
23938 if test "$ol_link_sql" != no ; then
23939         BUILD_SLAPD=yes
23940         BUILD_SQL=$ol_enable_sql
23941         if test "$ol_enable_sql" = mod; then
23942                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23943                 MFLAG=SLAPD_MOD_DYNAMIC
23944         else
23945                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23946                 MFLAG=SLAPD_MOD_STATIC
23947         fi
23948
23949 cat >>confdefs.h <<_ACEOF
23950 #define SLAPD_SQL $MFLAG
23951 _ACEOF
23952
23953 fi
23954
23955 if test "$ol_enable_accesslog" != no ; then
23956         BUILD_ACCESSLOG=$ol_enable_accesslog
23957         if test "$ol_enable_accesslog" = mod ; then
23958                 MFLAG=SLAPD_MOD_DYNAMIC
23959                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
23960         else
23961                 MFLAG=SLAPD_MOD_STATIC
23962                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
23963         fi
23964
23965 cat >>confdefs.h <<_ACEOF
23966 #define SLAPD_OVER_ACCESSLOG $MFLAG
23967 _ACEOF
23968
23969 fi
23970
23971 if test "$ol_enable_auditlog" != no ; then
23972         BUILD_AUDITLOG=$ol_enable_auditlog
23973         if test "$ol_enable_auditlog" = mod ; then
23974                 MFLAG=SLAPD_MOD_DYNAMIC
23975                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
23976         else
23977                 MFLAG=SLAPD_MOD_STATIC
23978                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
23979         fi
23980
23981 cat >>confdefs.h <<_ACEOF
23982 #define SLAPD_OVER_AUDITLOG $MFLAG
23983 _ACEOF
23984
23985 fi
23986
23987 if test "$ol_enable_collect" != no ; then
23988         BUILD_COLLECT=$ol_enable_collect
23989         if test "$ol_enable_collect" = mod ; then
23990                 MFLAG=SLAPD_MOD_DYNAMIC
23991                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS collect.la"
23992         else
23993                 MFLAG=SLAPD_MOD_STATIC
23994                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS collect.o"
23995         fi
23996
23997 cat >>confdefs.h <<_ACEOF
23998 #define SLAPD_OVER_COLLECT $MFLAG
23999 _ACEOF
24000
24001 fi
24002
24003 if test "$ol_enable_constraint" != no ; then
24004         BUILD_CONSTRAINT=$ol_enable_constraint
24005         if test "$ol_enable_constraint" = mod ; then
24006                 MFLAG=SLAPD_MOD_DYNAMIC
24007                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la"
24008         else
24009                 MFLAG=SLAPD_MOD_STATIC
24010                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o"
24011         fi
24012
24013 cat >>confdefs.h <<_ACEOF
24014 #define SLAPD_OVER_CONSTRAINT $MFLAG
24015 _ACEOF
24016
24017 fi
24018
24019 if test "$ol_enable_dds" != no ; then
24020         BUILD_DDS=$ol_enable_dds
24021         if test "$ol_enable_dds" = mod ; then
24022                 MFLAG=SLAPD_MOD_DYNAMIC
24023                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
24024         else
24025                 MFLAG=SLAPD_MOD_STATIC
24026                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
24027         fi
24028
24029 cat >>confdefs.h <<_ACEOF
24030 #define SLAPD_OVER_DDS $MFLAG
24031 _ACEOF
24032
24033 fi
24034
24035 if test "$ol_enable_deref" != no ; then
24036         BUILD_DEREF=$ol_enable_deref
24037         if test "$ol_enable_deref" = mod ; then
24038                 MFLAG=SLAPD_MOD_DYNAMIC
24039                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS deref.la"
24040         else
24041                 MFLAG=SLAPD_MOD_STATIC
24042                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS deref.o"
24043         fi
24044
24045 cat >>confdefs.h <<_ACEOF
24046 #define SLAPD_OVER_DEREF $MFLAG
24047 _ACEOF
24048
24049 fi
24050
24051 if test "$ol_enable_dyngroup" != no ; then
24052         BUILD_DYNGROUP=$ol_enable_dyngroup
24053         if test "$ol_enable_dyngroup" = mod ; then
24054                 MFLAG=SLAPD_MOD_DYNAMIC
24055                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24056         else
24057                 MFLAG=SLAPD_MOD_STATIC
24058                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
24059         fi
24060
24061 cat >>confdefs.h <<_ACEOF
24062 #define SLAPD_OVER_DYNGROUP $MFLAG
24063 _ACEOF
24064
24065 fi
24066
24067 if test "$ol_enable_dynlist" != no ; then
24068         BUILD_DYNLIST=$ol_enable_dynlist
24069         if test "$ol_enable_dynlist" = mod ; then
24070                 MFLAG=SLAPD_MOD_DYNAMIC
24071                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
24072         else
24073                 MFLAG=SLAPD_MOD_STATIC
24074                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
24075         fi
24076
24077 cat >>confdefs.h <<_ACEOF
24078 #define SLAPD_OVER_DYNLIST $MFLAG
24079 _ACEOF
24080
24081 fi
24082
24083 if test "$ol_enable_memberof" != no ; then
24084         BUILD_MEMBEROF=$ol_enable_memberof
24085         if test "$ol_enable_memberof" = mod ; then
24086                 MFLAG=SLAPD_MOD_DYNAMIC
24087                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la"
24088         else
24089                 MFLAG=SLAPD_MOD_STATIC
24090                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o"
24091         fi
24092
24093 cat >>confdefs.h <<_ACEOF
24094 #define SLAPD_OVER_MEMBEROF $MFLAG
24095 _ACEOF
24096
24097 fi
24098
24099 if test "$ol_enable_ppolicy" != no ; then
24100         BUILD_PPOLICY=$ol_enable_ppolicy
24101         if test "$ol_enable_ppolicy" = mod ; then
24102                 MFLAG=SLAPD_MOD_DYNAMIC
24103                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24104         else
24105                 MFLAG=SLAPD_MOD_STATIC
24106                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
24107         fi
24108
24109 cat >>confdefs.h <<_ACEOF
24110 #define SLAPD_OVER_PPOLICY $MFLAG
24111 _ACEOF
24112
24113 fi
24114
24115 if test "$ol_enable_proxycache" != no ; then
24116         BUILD_PROXYCACHE=$ol_enable_proxycache
24117         if test "$ol_enable_proxycache" = mod ; then
24118                 MFLAG=SLAPD_MOD_DYNAMIC
24119                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24120         else
24121                 MFLAG=SLAPD_MOD_STATIC
24122                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
24123         fi
24124
24125 cat >>confdefs.h <<_ACEOF
24126 #define SLAPD_OVER_PROXYCACHE $MFLAG
24127 _ACEOF
24128
24129 fi
24130
24131 if test "$ol_enable_refint" != no ; then
24132         BUILD_REFINT=$ol_enable_refint
24133         if test "$ol_enable_refint" = mod ; then
24134                 MFLAG=SLAPD_MOD_DYNAMIC
24135                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24136         else
24137                 MFLAG=SLAPD_MOD_STATIC
24138                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
24139         fi
24140
24141 cat >>confdefs.h <<_ACEOF
24142 #define SLAPD_OVER_REFINT $MFLAG
24143 _ACEOF
24144
24145 fi
24146
24147 if test "$ol_enable_retcode" != no ; then
24148         BUILD_RETCODE=$ol_enable_retcode
24149         if test "$ol_enable_retcode" = mod ; then
24150                 MFLAG=SLAPD_MOD_DYNAMIC
24151                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
24152         else
24153                 MFLAG=SLAPD_MOD_STATIC
24154                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
24155         fi
24156
24157 cat >>confdefs.h <<_ACEOF
24158 #define SLAPD_OVER_RETCODE $MFLAG
24159 _ACEOF
24160
24161 fi
24162
24163 if test "$ol_enable_rwm" != no ; then
24164         BUILD_REWRITE=yes
24165         BUILD_RWM=$ol_enable_rwm
24166         if test "$ol_enable_rwm" = mod ; then
24167                 MFLAG=SLAPD_MOD_DYNAMIC
24168                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24169         else
24170                 MFLAG=SLAPD_MOD_STATIC
24171                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
24172         fi
24173
24174 cat >>confdefs.h <<_ACEOF
24175 #define SLAPD_OVER_RWM $MFLAG
24176 _ACEOF
24177
24178 fi
24179
24180 if test "$ol_enable_seqmod" != no ; then
24181         BUILD_SEQMOD=$ol_enable_seqmod
24182         if test "$ol_enable_seqmod" = mod ; then
24183                 MFLAG=SLAPD_MOD_DYNAMIC
24184                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
24185         else
24186                 MFLAG=SLAPD_MOD_STATIC
24187                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
24188         fi
24189
24190 cat >>confdefs.h <<_ACEOF
24191 #define SLAPD_OVER_SEQMOD $MFLAG
24192 _ACEOF
24193
24194 fi
24195
24196 if test "$ol_enable_sssvlv" != no ; then
24197         BUILD_SSSVLV=$ol_enable_sssvlv
24198         if test "$ol_enable_sssvlv" = mod ; then
24199                 MFLAG=SLAPD_MOD_DYNAMIC
24200                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS sssvlv.la"
24201         else
24202                 MFLAG=SLAPD_MOD_STATIC
24203                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS sssvlv.o"
24204         fi
24205
24206 cat >>confdefs.h <<_ACEOF
24207 #define SLAPD_OVER_SSSVLV $MFLAG
24208 _ACEOF
24209
24210 fi
24211
24212 if test "$ol_enable_syncprov" != no ; then
24213         BUILD_SYNCPROV=$ol_enable_syncprov
24214         if test "$ol_enable_syncprov" = mod ; then
24215                 MFLAG=SLAPD_MOD_DYNAMIC
24216                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
24217         else
24218                 MFLAG=SLAPD_MOD_STATIC
24219                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
24220         fi
24221
24222 cat >>confdefs.h <<_ACEOF
24223 #define SLAPD_OVER_SYNCPROV $MFLAG
24224 _ACEOF
24225
24226 fi
24227
24228 if test "$ol_enable_translucent" != no ; then
24229         BUILD_TRANSLUCENT=$ol_enable_translucent
24230         if test "$ol_enable_translucent" = mod ; then
24231                 MFLAG=SLAPD_MOD_DYNAMIC
24232                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
24233         else
24234                 MFLAG=SLAPD_MOD_STATIC
24235                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
24236         fi
24237
24238 cat >>confdefs.h <<_ACEOF
24239 #define SLAPD_OVER_TRANSLUCENT $MFLAG
24240 _ACEOF
24241
24242 fi
24243
24244 if test "$ol_enable_unique" != no ; then
24245         BUILD_UNIQUE=$ol_enable_unique
24246         if test "$ol_enable_unique" = mod ; then
24247                 MFLAG=SLAPD_MOD_DYNAMIC
24248                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24249         else
24250                 MFLAG=SLAPD_MOD_STATIC
24251                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
24252         fi
24253
24254 cat >>confdefs.h <<_ACEOF
24255 #define SLAPD_OVER_UNIQUE $MFLAG
24256 _ACEOF
24257
24258 fi
24259
24260 if test "$ol_enable_valsort" != no ; then
24261         BUILD_VALSORT=$ol_enable_valsort
24262         if test "$ol_enable_valsort" = mod ; then
24263                 MFLAG=SLAPD_MOD_DYNAMIC
24264                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
24265         else
24266                 MFLAG=SLAPD_MOD_STATIC
24267                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
24268         fi
24269
24270 cat >>confdefs.h <<_ACEOF
24271 #define SLAPD_OVER_VALSORT $MFLAG
24272 _ACEOF
24273
24274 fi
24275
24276 if test "$ol_enable_rewrite" != no ; then
24277
24278 $as_echo "#define ENABLE_REWRITE 1" >>confdefs.h
24279
24280         BUILD_REWRITE=yes
24281 fi
24282
24283 if test "$ol_enable_slapi" != no ; then
24284
24285 $as_echo "#define ENABLE_SLAPI 1" >>confdefs.h
24286
24287         BUILD_SLAPI=yes
24288         SLAPD_SLAPI_DEPEND=libslapi.a
24289 fi
24290
24291
24292
24293 if test "$ac_cv_mingw32" = yes -o $ol_cv_msvc = yes ; then
24294         PLAT=NT
24295         SLAPD_MODULES_LDFLAGS=
24296 else
24297         PLAT=UNIX
24298 fi
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390 # Check whether --with-xxinstall was given.
24391 if test "${with_xxinstall+set}" = set; then :
24392   withval=$with_xxinstall;
24393 fi
24394
24395
24396
24397 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"
24398
24399
24400 ac_config_commands="$ac_config_commands default"
24401
24402
24403
24404 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24405 # Let make expand exec_prefix.
24406 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24407
24408 DEFS=-DHAVE_CONFIG_H
24409
24410 ac_libobjs=
24411 ac_ltlibobjs=
24412 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24413   # 1. Remove the extension, and $U if already installed.
24414   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24415   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24416   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24417   #    will be set to the directory where LIBOBJS objects are built.
24418   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24419   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24420 done
24421 LIBOBJS=$ac_libobjs
24422
24423 LTLIBOBJS=$ac_ltlibobjs
24424
24425
24426 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
24427   as_fn_error "conditional \"AMDEP\" was never defined.
24428 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24429 fi
24430 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24431   as_fn_error "conditional \"am__fastdepCC\" was never defined.
24432 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24433 fi
24434 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24435   as_fn_error "conditional \"am__fastdepCC\" was never defined.
24436 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24437 fi
24438
24439
24440 : ${CONFIG_STATUS=./config.status}
24441 ac_write_fail=0
24442 ac_clean_files_save=$ac_clean_files
24443 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24444 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24445 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24446 as_write_fail=0
24447 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24448 #! $SHELL
24449 # Generated by $as_me.
24450 # Run this file to recreate the current configuration.
24451 # Compiler output produced by configure, useful for debugging
24452 # configure, is in config.log if it exists.
24453
24454 debug=false
24455 ac_cs_recheck=false
24456 ac_cs_silent=false
24457
24458 SHELL=\${CONFIG_SHELL-$SHELL}
24459 export SHELL
24460 _ASEOF
24461 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24462 ## -------------------- ##
24463 ## M4sh Initialization. ##
24464 ## -------------------- ##
24465
24466 # Be more Bourne compatible
24467 DUALCASE=1; export DUALCASE # for MKS sh
24468 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24469   emulate sh
24470   NULLCMD=:
24471   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24472   # is contrary to our usage.  Disable this feature.
24473   alias -g '${1+"$@"}'='"$@"'
24474   setopt NO_GLOB_SUBST
24475 else
24476   case `(set -o) 2>/dev/null` in #(
24477   *posix*) :
24478     set -o posix ;; #(
24479   *) :
24480      ;;
24481 esac
24482 fi
24483
24484
24485 as_nl='
24486 '
24487 export as_nl
24488 # Printing a long string crashes Solaris 7 /usr/bin/printf.
24489 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24490 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24491 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24492 # Prefer a ksh shell builtin over an external printf program on Solaris,
24493 # but without wasting forks for bash or zsh.
24494 if test -z "$BASH_VERSION$ZSH_VERSION" \
24495     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24496   as_echo='print -r --'
24497   as_echo_n='print -rn --'
24498 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24499   as_echo='printf %s\n'
24500   as_echo_n='printf %s'
24501 else
24502   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24503     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24504     as_echo_n='/usr/ucb/echo -n'
24505   else
24506     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24507     as_echo_n_body='eval
24508       arg=$1;
24509       case $arg in #(
24510       *"$as_nl"*)
24511         expr "X$arg" : "X\\(.*\\)$as_nl";
24512         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24513       esac;
24514       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24515     '
24516     export as_echo_n_body
24517     as_echo_n='sh -c $as_echo_n_body as_echo'
24518   fi
24519   export as_echo_body
24520   as_echo='sh -c $as_echo_body as_echo'
24521 fi
24522
24523 # The user is always right.
24524 if test "${PATH_SEPARATOR+set}" != set; then
24525   PATH_SEPARATOR=:
24526   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24527     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24528       PATH_SEPARATOR=';'
24529   }
24530 fi
24531
24532
24533 # IFS
24534 # We need space, tab and new line, in precisely that order.  Quoting is
24535 # there to prevent editors from complaining about space-tab.
24536 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
24537 # splitting by setting IFS to empty value.)
24538 IFS=" ""        $as_nl"
24539
24540 # Find who we are.  Look in the path if we contain no directory separator.
24541 case $0 in #((
24542   *[\\/]* ) as_myself=$0 ;;
24543   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24544 for as_dir in $PATH
24545 do
24546   IFS=$as_save_IFS
24547   test -z "$as_dir" && as_dir=.
24548     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24549   done
24550 IFS=$as_save_IFS
24551
24552      ;;
24553 esac
24554 # We did not find ourselves, most probably we were run as `sh COMMAND'
24555 # in which case we are not to be found in the path.
24556 if test "x$as_myself" = x; then
24557   as_myself=$0
24558 fi
24559 if test ! -f "$as_myself"; then
24560   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24561   exit 1
24562 fi
24563
24564 # Unset variables that we do not need and which cause bugs (e.g. in
24565 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
24566 # suppresses any "Segmentation fault" message there.  '((' could
24567 # trigger a bug in pdksh 5.2.14.
24568 for as_var in BASH_ENV ENV MAIL MAILPATH
24569 do eval test x\${$as_var+set} = xset \
24570   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24571 done
24572 PS1='$ '
24573 PS2='> '
24574 PS4='+ '
24575
24576 # NLS nuisances.
24577 LC_ALL=C
24578 export LC_ALL
24579 LANGUAGE=C
24580 export LANGUAGE
24581
24582 # CDPATH.
24583 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24584
24585
24586 # as_fn_error ERROR [LINENO LOG_FD]
24587 # ---------------------------------
24588 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24589 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24590 # script with status $?, using 1 if that was 0.
24591 as_fn_error ()
24592 {
24593   as_status=$?; test $as_status -eq 0 && as_status=1
24594   if test "$3"; then
24595     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24596     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
24597   fi
24598   $as_echo "$as_me: error: $1" >&2
24599   as_fn_exit $as_status
24600 } # as_fn_error
24601
24602
24603 # as_fn_set_status STATUS
24604 # -----------------------
24605 # Set $? to STATUS, without forking.
24606 as_fn_set_status ()
24607 {
24608   return $1
24609 } # as_fn_set_status
24610
24611 # as_fn_exit STATUS
24612 # -----------------
24613 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24614 as_fn_exit ()
24615 {
24616   set +e
24617   as_fn_set_status $1
24618   exit $1
24619 } # as_fn_exit
24620
24621 # as_fn_unset VAR
24622 # ---------------
24623 # Portably unset VAR.
24624 as_fn_unset ()
24625 {
24626   { eval $1=; unset $1;}
24627 }
24628 as_unset=as_fn_unset
24629 # as_fn_append VAR VALUE
24630 # ----------------------
24631 # Append the text in VALUE to the end of the definition contained in VAR. Take
24632 # advantage of any shell optimizations that allow amortized linear growth over
24633 # repeated appends, instead of the typical quadratic growth present in naive
24634 # implementations.
24635 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
24636   eval 'as_fn_append ()
24637   {
24638     eval $1+=\$2
24639   }'
24640 else
24641   as_fn_append ()
24642   {
24643     eval $1=\$$1\$2
24644   }
24645 fi # as_fn_append
24646
24647 # as_fn_arith ARG...
24648 # ------------------
24649 # Perform arithmetic evaluation on the ARGs, and store the result in the
24650 # global $as_val. Take advantage of shells that can avoid forks. The arguments
24651 # must be portable across $(()) and expr.
24652 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
24653   eval 'as_fn_arith ()
24654   {
24655     as_val=$(( $* ))
24656   }'
24657 else
24658   as_fn_arith ()
24659   {
24660     as_val=`expr "$@" || test $? -eq 1`
24661   }
24662 fi # as_fn_arith
24663
24664
24665 if expr a : '\(a\)' >/dev/null 2>&1 &&
24666    test "X`expr 00001 : '.*\(...\)'`" = X001; then
24667   as_expr=expr
24668 else
24669   as_expr=false
24670 fi
24671
24672 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24673   as_basename=basename
24674 else
24675   as_basename=false
24676 fi
24677
24678 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24679   as_dirname=dirname
24680 else
24681   as_dirname=false
24682 fi
24683
24684 as_me=`$as_basename -- "$0" ||
24685 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24686          X"$0" : 'X\(//\)$' \| \
24687          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24688 $as_echo X/"$0" |
24689     sed '/^.*\/\([^/][^/]*\)\/*$/{
24690             s//\1/
24691             q
24692           }
24693           /^X\/\(\/\/\)$/{
24694             s//\1/
24695             q
24696           }
24697           /^X\/\(\/\).*/{
24698             s//\1/
24699             q
24700           }
24701           s/.*/./; q'`
24702
24703 # Avoid depending upon Character Ranges.
24704 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24705 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24706 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24707 as_cr_digits='0123456789'
24708 as_cr_alnum=$as_cr_Letters$as_cr_digits
24709
24710 ECHO_C= ECHO_N= ECHO_T=
24711 case `echo -n x` in #(((((
24712 -n*)
24713   case `echo 'xy\c'` in
24714   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
24715   xy)  ECHO_C='\c';;
24716   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
24717        ECHO_T=' ';;
24718   esac;;
24719 *)
24720   ECHO_N='-n';;
24721 esac
24722
24723 rm -f conf$$ conf$$.exe conf$$.file
24724 if test -d conf$$.dir; then
24725   rm -f conf$$.dir/conf$$.file
24726 else
24727   rm -f conf$$.dir
24728   mkdir conf$$.dir 2>/dev/null
24729 fi
24730 if (echo >conf$$.file) 2>/dev/null; then
24731   if ln -s conf$$.file conf$$ 2>/dev/null; then
24732     as_ln_s='ln -s'
24733     # ... but there are two gotchas:
24734     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24735     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24736     # In both cases, we have to default to `cp -p'.
24737     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24738       as_ln_s='cp -p'
24739   elif ln conf$$.file conf$$ 2>/dev/null; then
24740     as_ln_s=ln
24741   else
24742     as_ln_s='cp -p'
24743   fi
24744 else
24745   as_ln_s='cp -p'
24746 fi
24747 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24748 rmdir conf$$.dir 2>/dev/null
24749
24750
24751 # as_fn_mkdir_p
24752 # -------------
24753 # Create "$as_dir" as a directory, including parents if necessary.
24754 as_fn_mkdir_p ()
24755 {
24756
24757   case $as_dir in #(
24758   -*) as_dir=./$as_dir;;
24759   esac
24760   test -d "$as_dir" || eval $as_mkdir_p || {
24761     as_dirs=
24762     while :; do
24763       case $as_dir in #(
24764       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24765       *) as_qdir=$as_dir;;
24766       esac
24767       as_dirs="'$as_qdir' $as_dirs"
24768       as_dir=`$as_dirname -- "$as_dir" ||
24769 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24770          X"$as_dir" : 'X\(//\)[^/]' \| \
24771          X"$as_dir" : 'X\(//\)$' \| \
24772          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24773 $as_echo X"$as_dir" |
24774     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24775             s//\1/
24776             q
24777           }
24778           /^X\(\/\/\)[^/].*/{
24779             s//\1/
24780             q
24781           }
24782           /^X\(\/\/\)$/{
24783             s//\1/
24784             q
24785           }
24786           /^X\(\/\).*/{
24787             s//\1/
24788             q
24789           }
24790           s/.*/./; q'`
24791       test -d "$as_dir" && break
24792     done
24793     test -z "$as_dirs" || eval "mkdir $as_dirs"
24794   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
24795
24796
24797 } # as_fn_mkdir_p
24798 if mkdir -p . 2>/dev/null; then
24799   as_mkdir_p='mkdir -p "$as_dir"'
24800 else
24801   test -d ./-p && rmdir ./-p
24802   as_mkdir_p=false
24803 fi
24804
24805 if test -x / >/dev/null 2>&1; then
24806   as_test_x='test -x'
24807 else
24808   if ls -dL / >/dev/null 2>&1; then
24809     as_ls_L_option=L
24810   else
24811     as_ls_L_option=
24812   fi
24813   as_test_x='
24814     eval sh -c '\''
24815       if test -d "$1"; then
24816         test -d "$1/.";
24817       else
24818         case $1 in #(
24819         -*)set "./$1";;
24820         esac;
24821         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
24822         ???[sx]*):;;*)false;;esac;fi
24823     '\'' sh
24824   '
24825 fi
24826 as_executable_p=$as_test_x
24827
24828 # Sed expression to map a string onto a valid CPP name.
24829 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24830
24831 # Sed expression to map a string onto a valid variable name.
24832 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24833
24834
24835 exec 6>&1
24836 ## ----------------------------------- ##
24837 ## Main body of $CONFIG_STATUS script. ##
24838 ## ----------------------------------- ##
24839 _ASEOF
24840 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24841
24842 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24843 # Save the log message, to keep $0 and so on meaningful, and to
24844 # report actual input values of CONFIG_FILES etc. instead of their
24845 # values after options handling.
24846 ac_log="
24847 This file was extended by $as_me, which was
24848 generated by GNU Autoconf 2.65.  Invocation command line was
24849
24850   CONFIG_FILES    = $CONFIG_FILES
24851   CONFIG_HEADERS  = $CONFIG_HEADERS
24852   CONFIG_LINKS    = $CONFIG_LINKS
24853   CONFIG_COMMANDS = $CONFIG_COMMANDS
24854   $ $0 $@
24855
24856 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24857 "
24858
24859 _ACEOF
24860
24861 case $ac_config_files in *"
24862 "*) set x $ac_config_files; shift; ac_config_files=$*;;
24863 esac
24864
24865 case $ac_config_headers in *"
24866 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
24867 esac
24868
24869
24870 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24871 # Files that config.status was made for.
24872 config_files="$ac_config_files"
24873 config_headers="$ac_config_headers"
24874 config_commands="$ac_config_commands"
24875
24876 _ACEOF
24877
24878 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24879 ac_cs_usage="\
24880 \`$as_me' instantiates files and other configuration actions
24881 from templates according to the current configuration.  Unless the files
24882 and actions are specified as TAGs, all are instantiated by default.
24883
24884 Usage: $0 [OPTION]... [TAG]...
24885
24886   -h, --help       print this help, then exit
24887   -V, --version    print version number and configuration settings, then exit
24888       --config     print configuration, then exit
24889   -q, --quiet, --silent
24890                    do not print progress messages
24891   -d, --debug      don't remove temporary files
24892       --recheck    update $as_me by reconfiguring in the same conditions
24893       --file=FILE[:TEMPLATE]
24894                    instantiate the configuration file FILE
24895       --header=FILE[:TEMPLATE]
24896                    instantiate the configuration header FILE
24897
24898 Configuration files:
24899 $config_files
24900
24901 Configuration headers:
24902 $config_headers
24903
24904 Configuration commands:
24905 $config_commands
24906
24907 Report bugs to <<http://www.openldap.org/its/>>."
24908
24909 _ACEOF
24910 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24911 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
24912 ac_cs_version="\\
24913 config.status
24914 configured by $0, generated by GNU Autoconf 2.65,
24915   with options \\"\$ac_cs_config\\"
24916
24917 Copyright (C) 2009 Free Software Foundation, Inc.
24918 This config.status script is free software; the Free Software Foundation
24919 gives unlimited permission to copy, distribute and modify it."
24920
24921 ac_pwd='$ac_pwd'
24922 srcdir='$srcdir'
24923 INSTALL='$INSTALL'
24924 AWK='$AWK'
24925 test -n "\$AWK" || AWK=awk
24926 _ACEOF
24927
24928 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24929 # The default lists apply if the user does not specify any file.
24930 ac_need_defaults=:
24931 while test $# != 0
24932 do
24933   case $1 in
24934   --*=*)
24935     ac_option=`expr "X$1" : 'X\([^=]*\)='`
24936     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
24937     ac_shift=:
24938     ;;
24939   *)
24940     ac_option=$1
24941     ac_optarg=$2
24942     ac_shift=shift
24943     ;;
24944   esac
24945
24946   case $ac_option in
24947   # Handling of the options.
24948   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24949     ac_cs_recheck=: ;;
24950   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24951     $as_echo "$ac_cs_version"; exit ;;
24952   --config | --confi | --conf | --con | --co | --c )
24953     $as_echo "$ac_cs_config"; exit ;;
24954   --debug | --debu | --deb | --de | --d | -d )
24955     debug=: ;;
24956   --file | --fil | --fi | --f )
24957     $ac_shift
24958     case $ac_optarg in
24959     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24960     esac
24961     as_fn_append CONFIG_FILES " '$ac_optarg'"
24962     ac_need_defaults=false;;
24963   --header | --heade | --head | --hea )
24964     $ac_shift
24965     case $ac_optarg in
24966     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24967     esac
24968     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
24969     ac_need_defaults=false;;
24970   --he | --h)
24971     # Conflict between --help and --header
24972     as_fn_error "ambiguous option: \`$1'
24973 Try \`$0 --help' for more information.";;
24974   --help | --hel | -h )
24975     $as_echo "$ac_cs_usage"; exit ;;
24976   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24977   | -silent | --silent | --silen | --sile | --sil | --si | --s)
24978     ac_cs_silent=: ;;
24979
24980   # This is an error.
24981   -*) as_fn_error "unrecognized option: \`$1'
24982 Try \`$0 --help' for more information." ;;
24983
24984   *) as_fn_append ac_config_targets " $1"
24985      ac_need_defaults=false ;;
24986
24987   esac
24988   shift
24989 done
24990
24991 ac_configure_extra_args=
24992
24993 if $ac_cs_silent; then
24994   exec 6>/dev/null
24995   ac_configure_extra_args="$ac_configure_extra_args --silent"
24996 fi
24997
24998 _ACEOF
24999 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25000 if \$ac_cs_recheck; then
25001   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25002   shift
25003   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25004   CONFIG_SHELL='$SHELL'
25005   export CONFIG_SHELL
25006   exec "\$@"
25007 fi
25008
25009 _ACEOF
25010 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25011 exec 5>>config.log
25012 {
25013   echo
25014   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25015 ## Running $as_me. ##
25016 _ASBOX
25017   $as_echo "$ac_log"
25018 } >&5
25019
25020 _ACEOF
25021 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25022 #
25023 # INIT-COMMANDS
25024 #
25025 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25026
25027 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25028 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
25029
25030
25031 _ACEOF
25032
25033 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25034
25035 # Handling of arguments.
25036 for ac_config_target in $ac_config_targets
25037 do
25038   case $ac_config_target in
25039     "include/portable.h") CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
25040     "include/ldap_features.h") CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
25041     "include/lber_types.h") CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
25042     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25043     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
25044     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
25045     "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
25046     "doc/man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
25047     "doc/man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
25048     "doc/man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
25049     "doc/man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
25050     "clients/Makefile") CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
25051     "clients/tools/Makefile") CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
25052     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
25053     "libraries/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
25054     "libraries/liblber/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25055     "libraries/libldap/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25056     "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" ;;
25057     "libraries/liblunicode/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25058     "libraries/liblutil/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25059     "libraries/librewrite/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25060     "servers/Makefile") CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
25061     "servers/slapd/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
25062     "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" ;;
25063     "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" ;;
25064     "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" ;;
25065     "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" ;;
25066     "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" ;;
25067     "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" ;;
25068     "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" ;;
25069     "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" ;;
25070     "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" ;;
25071     "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" ;;
25072     "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" ;;
25073     "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" ;;
25074     "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" ;;
25075     "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" ;;
25076     "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" ;;
25077     "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" ;;
25078     "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" ;;
25079     "servers/slapd/overlays/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
25080     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
25081     "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;;
25082     "tests/progs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
25083     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25084
25085   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25086   esac
25087 done
25088
25089
25090 # If the user did not use the arguments to specify the items to instantiate,
25091 # then the envvar interface is used.  Set only those that are not.
25092 # We use the long form for the default assignment because of an extremely
25093 # bizarre bug on SunOS 4.1.3.
25094 if $ac_need_defaults; then
25095   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25096   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25097   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25098 fi
25099
25100 # Have a temporary directory for convenience.  Make it in the build tree
25101 # simply because there is no reason against having it here, and in addition,
25102 # creating and moving files from /tmp can sometimes cause problems.
25103 # Hook for its removal unless debugging.
25104 # Note that there is a small window in which the directory will not be cleaned:
25105 # after its creation but before its name has been assigned to `$tmp'.
25106 $debug ||
25107 {
25108   tmp=
25109   trap 'exit_status=$?
25110   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25111 ' 0
25112   trap 'as_fn_exit 1' 1 2 13 15
25113 }
25114 # Create a (secure) tmp directory for tmp files.
25115
25116 {
25117   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25118   test -n "$tmp" && test -d "$tmp"
25119 }  ||
25120 {
25121   tmp=./conf$$-$RANDOM
25122   (umask 077 && mkdir "$tmp")
25123 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25124
25125 # Set up the scripts for CONFIG_FILES section.
25126 # No need to generate them if there are no CONFIG_FILES.
25127 # This happens for instance with `./config.status config.h'.
25128 if test -n "$CONFIG_FILES"; then
25129
25130
25131 ac_cr=`echo X | tr X '\015'`
25132 # On cygwin, bash can eat \r inside `` if the user requested igncr.
25133 # But we know of no other shell where ac_cr would be empty at this
25134 # point, so we can use a bashism as a fallback.
25135 if test "x$ac_cr" = x; then
25136   eval ac_cr=\$\'\\r\'
25137 fi
25138 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25139 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25140   ac_cs_awk_cr='\r'
25141 else
25142   ac_cs_awk_cr=$ac_cr
25143 fi
25144
25145 echo 'BEGIN {' >"$tmp/subs1.awk" &&
25146 _ACEOF
25147
25148
25149 {
25150   echo "cat >conf$$subs.awk <<_ACEOF" &&
25151   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25152   echo "_ACEOF"
25153 } >conf$$subs.sh ||
25154   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25155 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25156 ac_delim='%!_!# '
25157 for ac_last_try in false false false false false :; do
25158   . ./conf$$subs.sh ||
25159     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25160
25161   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25162   if test $ac_delim_n = $ac_delim_num; then
25163     break
25164   elif $ac_last_try; then
25165     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25166   else
25167     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25168   fi
25169 done
25170 rm -f conf$$subs.sh
25171
25172 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25173 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
25174 _ACEOF
25175 sed -n '
25176 h
25177 s/^/S["/; s/!.*/"]=/
25178 p
25179 g
25180 s/^[^!]*!//
25181 :repl
25182 t repl
25183 s/'"$ac_delim"'$//
25184 t delim
25185 :nl
25186 h
25187 s/\(.\{148\}\)..*/\1/
25188 t more1
25189 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25190 p
25191 n
25192 b repl
25193 :more1
25194 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25195 p
25196 g
25197 s/.\{148\}//
25198 t nl
25199 :delim
25200 h
25201 s/\(.\{148\}\)..*/\1/
25202 t more2
25203 s/["\\]/\\&/g; s/^/"/; s/$/"/
25204 p
25205 b
25206 :more2
25207 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25208 p
25209 g
25210 s/.\{148\}//
25211 t delim
25212 ' <conf$$subs.awk | sed '
25213 /^[^""]/{
25214   N
25215   s/\n//
25216 }
25217 ' >>$CONFIG_STATUS || ac_write_fail=1
25218 rm -f conf$$subs.awk
25219 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25220 _ACAWK
25221 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
25222   for (key in S) S_is_set[key] = 1
25223   FS = "\a"
25224
25225 }
25226 {
25227   line = $ 0
25228   nfields = split(line, field, "@")
25229   substed = 0
25230   len = length(field[1])
25231   for (i = 2; i < nfields; i++) {
25232     key = field[i]
25233     keylen = length(key)
25234     if (S_is_set[key]) {
25235       value = S[key]
25236       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25237       len += length(value) + length(field[++i])
25238       substed = 1
25239     } else
25240       len += 1 + keylen
25241   }
25242
25243   print line
25244 }
25245
25246 _ACAWK
25247 _ACEOF
25248 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25249 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25250   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25251 else
25252   cat
25253 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25254   || as_fn_error "could not setup config files machinery" "$LINENO" 5
25255 _ACEOF
25256
25257 # VPATH may cause trouble with some makes, so we remove $(srcdir),
25258 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25259 # trailing colons and then remove the whole line if VPATH becomes empty
25260 # (actually we leave an empty line to preserve line numbers).
25261 if test "x$srcdir" = x.; then
25262   ac_vpsub='/^[  ]*VPATH[        ]*=/{
25263 s/:*\$(srcdir):*/:/
25264 s/:*\${srcdir}:*/:/
25265 s/:*@srcdir@:*/:/
25266 s/^\([^=]*=[     ]*\):*/\1/
25267 s/:*$//
25268 s/^[^=]*=[       ]*$//
25269 }'
25270 fi
25271
25272 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25273 fi # test -n "$CONFIG_FILES"
25274
25275 # Set up the scripts for CONFIG_HEADERS section.
25276 # No need to generate them if there are no CONFIG_HEADERS.
25277 # This happens for instance with `./config.status Makefile'.
25278 if test -n "$CONFIG_HEADERS"; then
25279 cat >"$tmp/defines.awk" <<\_ACAWK ||
25280 BEGIN {
25281 _ACEOF
25282
25283 # Transform confdefs.h into an awk script `defines.awk', embedded as
25284 # here-document in config.status, that substitutes the proper values into
25285 # config.h.in to produce config.h.
25286
25287 # Create a delimiter string that does not exist in confdefs.h, to ease
25288 # handling of long lines.
25289 ac_delim='%!_!# '
25290 for ac_last_try in false false :; do
25291   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
25292   if test -z "$ac_t"; then
25293     break
25294   elif $ac_last_try; then
25295     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
25296   else
25297     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25298   fi
25299 done
25300
25301 # For the awk script, D is an array of macro values keyed by name,
25302 # likewise P contains macro parameters if any.  Preserve backslash
25303 # newline sequences.
25304
25305 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25306 sed -n '
25307 s/.\{148\}/&'"$ac_delim"'/g
25308 t rset
25309 :rset
25310 s/^[     ]*#[    ]*define[       ][      ]*/ /
25311 t def
25312 d
25313 :def
25314 s/\\$//
25315 t bsnl
25316 s/["\\]/\\&/g
25317 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
25318 D["\1"]=" \3"/p
25319 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
25320 d
25321 :bsnl
25322 s/["\\]/\\&/g
25323 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
25324 D["\1"]=" \3\\\\\\n"\\/p
25325 t cont
25326 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25327 t cont
25328 d
25329 :cont
25330 n
25331 s/.\{148\}/&'"$ac_delim"'/g
25332 t clear
25333 :clear
25334 s/\\$//
25335 t bsnlc
25336 s/["\\]/\\&/g; s/^/"/; s/$/"/p
25337 d
25338 :bsnlc
25339 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25340 b cont
25341 ' <confdefs.h | sed '
25342 s/'"$ac_delim"'/"\\\
25343 "/g' >>$CONFIG_STATUS || ac_write_fail=1
25344
25345 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25346   for (key in D) D_is_set[key] = 1
25347   FS = "\a"
25348 }
25349 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25350   line = \$ 0
25351   split(line, arg, " ")
25352   if (arg[1] == "#") {
25353     defundef = arg[2]
25354     mac1 = arg[3]
25355   } else {
25356     defundef = substr(arg[1], 2)
25357     mac1 = arg[2]
25358   }
25359   split(mac1, mac2, "(") #)
25360   macro = mac2[1]
25361   prefix = substr(line, 1, index(line, defundef) - 1)
25362   if (D_is_set[macro]) {
25363     # Preserve the white space surrounding the "#".
25364     print prefix "define", macro P[macro] D[macro]
25365     next
25366   } else {
25367     # Replace #undef with comments.  This is necessary, for example,
25368     # in the case of _POSIX_SOURCE, which is predefined and required
25369     # on some systems where configure will not decide to define it.
25370     if (defundef == "undef") {
25371       print "/*", prefix defundef, macro, "*/"
25372       next
25373     }
25374   }
25375 }
25376 { print }
25377 _ACAWK
25378 _ACEOF
25379 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25380   as_fn_error "could not setup config headers machinery" "$LINENO" 5
25381 fi # test -n "$CONFIG_HEADERS"
25382
25383
25384 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
25385 shift
25386 for ac_tag
25387 do
25388   case $ac_tag in
25389   :[FHLC]) ac_mode=$ac_tag; continue;;
25390   esac
25391   case $ac_mode$ac_tag in
25392   :[FHL]*:*);;
25393   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
25394   :[FH]-) ac_tag=-:-;;
25395   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25396   esac
25397   ac_save_IFS=$IFS
25398   IFS=:
25399   set x $ac_tag
25400   IFS=$ac_save_IFS
25401   shift
25402   ac_file=$1
25403   shift
25404
25405   case $ac_mode in
25406   :L) ac_source=$1;;
25407   :[FH])
25408     ac_file_inputs=
25409     for ac_f
25410     do
25411       case $ac_f in
25412       -) ac_f="$tmp/stdin";;
25413       *) # Look for the file first in the build tree, then in the source tree
25414          # (if the path is not absolute).  The absolute path cannot be DOS-style,
25415          # because $ac_f cannot contain `:'.
25416          test -f "$ac_f" ||
25417            case $ac_f in
25418            [\\/$]*) false;;
25419            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25420            esac ||
25421            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25422       esac
25423       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25424       as_fn_append ac_file_inputs " '$ac_f'"
25425     done
25426
25427     # Let's still pretend it is `configure' which instantiates (i.e., don't
25428     # use $as_me), people would be surprised to read:
25429     #    /* config.h.  Generated by config.status.  */
25430     configure_input='Generated from '`
25431           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25432         `' by configure.'
25433     if test x"$ac_file" != x-; then
25434       configure_input="$ac_file.  $configure_input"
25435       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25436 $as_echo "$as_me: creating $ac_file" >&6;}
25437     fi
25438     # Neutralize special characters interpreted by sed in replacement strings.
25439     case $configure_input in #(
25440     *\&* | *\|* | *\\* )
25441        ac_sed_conf_input=`$as_echo "$configure_input" |
25442        sed 's/[\\\\&|]/\\\\&/g'`;; #(
25443     *) ac_sed_conf_input=$configure_input;;
25444     esac
25445
25446     case $ac_tag in
25447     *:-:* | *:-) cat >"$tmp/stdin" \
25448       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
25449     esac
25450     ;;
25451   esac
25452
25453   ac_dir=`$as_dirname -- "$ac_file" ||
25454 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25455          X"$ac_file" : 'X\(//\)[^/]' \| \
25456          X"$ac_file" : 'X\(//\)$' \| \
25457          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25458 $as_echo X"$ac_file" |
25459     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25460             s//\1/
25461             q
25462           }
25463           /^X\(\/\/\)[^/].*/{
25464             s//\1/
25465             q
25466           }
25467           /^X\(\/\/\)$/{
25468             s//\1/
25469             q
25470           }
25471           /^X\(\/\).*/{
25472             s//\1/
25473             q
25474           }
25475           s/.*/./; q'`
25476   as_dir="$ac_dir"; as_fn_mkdir_p
25477   ac_builddir=.
25478
25479 case "$ac_dir" in
25480 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25481 *)
25482   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25483   # A ".." for each directory in $ac_dir_suffix.
25484   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25485   case $ac_top_builddir_sub in
25486   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25487   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25488   esac ;;
25489 esac
25490 ac_abs_top_builddir=$ac_pwd
25491 ac_abs_builddir=$ac_pwd$ac_dir_suffix
25492 # for backward compatibility:
25493 ac_top_builddir=$ac_top_build_prefix
25494
25495 case $srcdir in
25496   .)  # We are building in place.
25497     ac_srcdir=.
25498     ac_top_srcdir=$ac_top_builddir_sub
25499     ac_abs_top_srcdir=$ac_pwd ;;
25500   [\\/]* | ?:[\\/]* )  # Absolute name.
25501     ac_srcdir=$srcdir$ac_dir_suffix;
25502     ac_top_srcdir=$srcdir
25503     ac_abs_top_srcdir=$srcdir ;;
25504   *) # Relative name.
25505     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25506     ac_top_srcdir=$ac_top_build_prefix$srcdir
25507     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25508 esac
25509 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25510
25511
25512   case $ac_mode in
25513   :F)
25514   #
25515   # CONFIG_FILE
25516   #
25517
25518   case $INSTALL in
25519   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25520   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25521   esac
25522 _ACEOF
25523
25524 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25525 # If the template does not know about datarootdir, expand it.
25526 # FIXME: This hack should be removed a few years after 2.60.
25527 ac_datarootdir_hack=; ac_datarootdir_seen=
25528 ac_sed_dataroot='
25529 /datarootdir/ {
25530   p
25531   q
25532 }
25533 /@datadir@/p
25534 /@docdir@/p
25535 /@infodir@/p
25536 /@localedir@/p
25537 /@mandir@/p'
25538 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25539 *datarootdir*) ac_datarootdir_seen=yes;;
25540 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25541   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25542 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25543 _ACEOF
25544 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25545   ac_datarootdir_hack='
25546   s&@datadir@&$datadir&g
25547   s&@docdir@&$docdir&g
25548   s&@infodir@&$infodir&g
25549   s&@localedir@&$localedir&g
25550   s&@mandir@&$mandir&g
25551   s&\\\${datarootdir}&$datarootdir&g' ;;
25552 esac
25553 _ACEOF
25554
25555 # Neutralize VPATH when `$srcdir' = `.'.
25556 # Shell code in configure.ac might set extrasub.
25557 # FIXME: do we really want to maintain this feature?
25558 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25559 ac_sed_extra="$ac_vpsub
25560 $extrasub
25561 _ACEOF
25562 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25563 :t
25564 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25565 s|@configure_input@|$ac_sed_conf_input|;t t
25566 s&@top_builddir@&$ac_top_builddir_sub&;t t
25567 s&@top_build_prefix@&$ac_top_build_prefix&;t t
25568 s&@srcdir@&$ac_srcdir&;t t
25569 s&@abs_srcdir@&$ac_abs_srcdir&;t t
25570 s&@top_srcdir@&$ac_top_srcdir&;t t
25571 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25572 s&@builddir@&$ac_builddir&;t t
25573 s&@abs_builddir@&$ac_abs_builddir&;t t
25574 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25575 s&@INSTALL@&$ac_INSTALL&;t t
25576 $ac_datarootdir_hack
25577 "
25578 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
25579   || as_fn_error "could not create $ac_file" "$LINENO" 5
25580
25581 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25582   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25583   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25584   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25585 which seems to be undefined.  Please make sure it is defined." >&5
25586 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25587 which seems to be undefined.  Please make sure it is defined." >&2;}
25588
25589   rm -f "$tmp/stdin"
25590   case $ac_file in
25591   -) cat "$tmp/out" && rm -f "$tmp/out";;
25592   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
25593   esac \
25594   || as_fn_error "could not create $ac_file" "$LINENO" 5
25595  ;;
25596   :H)
25597   #
25598   # CONFIG_HEADER
25599   #
25600   if test x"$ac_file" != x-; then
25601     {
25602       $as_echo "/* $configure_input  */" \
25603       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
25604     } >"$tmp/config.h" \
25605       || as_fn_error "could not create $ac_file" "$LINENO" 5
25606     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
25607       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
25608 $as_echo "$as_me: $ac_file is unchanged" >&6;}
25609     else
25610       rm -f "$ac_file"
25611       mv "$tmp/config.h" "$ac_file" \
25612         || as_fn_error "could not create $ac_file" "$LINENO" 5
25613     fi
25614   else
25615     $as_echo "/* $configure_input  */" \
25616       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
25617       || as_fn_error "could not create -" "$LINENO" 5
25618   fi
25619 # Compute "$ac_file"'s index in $config_headers.
25620 _am_stamp_count=1
25621 for _am_header in $config_headers :; do
25622   case $_am_header in
25623     "$ac_file" | "$ac_file":* )
25624       break ;;
25625     * )
25626       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
25627   esac
25628 done
25629 echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
25630 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25631          X"$ac_file" : 'X\(//\)[^/]' \| \
25632          X"$ac_file" : 'X\(//\)$' \| \
25633          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25634 $as_echo X"$ac_file" |
25635     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25636             s//\1/
25637             q
25638           }
25639           /^X\(\/\/\)[^/].*/{
25640             s//\1/
25641             q
25642           }
25643           /^X\(\/\/\)$/{
25644             s//\1/
25645             q
25646           }
25647           /^X\(\/\).*/{
25648             s//\1/
25649             q
25650           }
25651           s/.*/./; q'`/stamp-h$_am_stamp_count
25652  ;;
25653
25654   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
25655 $as_echo "$as_me: executing $ac_file commands" >&6;}
25656  ;;
25657   esac
25658
25659
25660   case $ac_file$ac_mode in
25661     "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
25662   # Strip MF so we end up with the name of the file.
25663   mf=`echo "$mf" | sed -e 's/:.*$//'`
25664   # Check whether this is an Automake generated Makefile or not.
25665   # We used to match only the files named `Makefile.in', but
25666   # some people rename them; so instead we look at the file content.
25667   # Grep'ing the first line is not enough: some people post-process
25668   # each Makefile.in and add a new line on top of each file to say so.
25669   # So let's grep whole file.
25670   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
25671     dirpart=`$as_dirname -- "$mf" ||
25672 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25673          X"$mf" : 'X\(//\)[^/]' \| \
25674          X"$mf" : 'X\(//\)$' \| \
25675          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
25676 $as_echo X"$mf" |
25677     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25678             s//\1/
25679             q
25680           }
25681           /^X\(\/\/\)[^/].*/{
25682             s//\1/
25683             q
25684           }
25685           /^X\(\/\/\)$/{
25686             s//\1/
25687             q
25688           }
25689           /^X\(\/\).*/{
25690             s//\1/
25691             q
25692           }
25693           s/.*/./; q'`
25694   else
25695     continue
25696   fi
25697   # Extract the definition of DEPDIR, am__include, and am__quote
25698   # from the Makefile without running `make'.
25699   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
25700   test -z "$DEPDIR" && continue
25701   am__include=`sed -n 's/^am__include = //p' < "$mf"`
25702   test -z "am__include" && continue
25703   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
25704   # When using ansi2knr, U may be empty or an underscore; expand it
25705   U=`sed -n 's/^U = //p' < "$mf"`
25706   # Find all dependency output files, they are included files with
25707   # $(DEPDIR) in their names.  We invoke sed twice because it is the
25708   # simplest approach to changing $(DEPDIR) to its actual value in the
25709   # expansion.
25710   for file in `sed -n "
25711     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
25712        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
25713     # Make sure the directory exists.
25714     test -f "$dirpart/$file" && continue
25715     fdir=`$as_dirname -- "$file" ||
25716 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25717          X"$file" : 'X\(//\)[^/]' \| \
25718          X"$file" : 'X\(//\)$' \| \
25719          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
25720 $as_echo X"$file" |
25721     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25722             s//\1/
25723             q
25724           }
25725           /^X\(\/\/\)[^/].*/{
25726             s//\1/
25727             q
25728           }
25729           /^X\(\/\/\)$/{
25730             s//\1/
25731             q
25732           }
25733           /^X\(\/\).*/{
25734             s//\1/
25735             q
25736           }
25737           s/.*/./; q'`
25738     as_dir=$dirpart/$fdir; as_fn_mkdir_p
25739     # echo "creating $dirpart/$file"
25740     echo '# dummy' > "$dirpart/$file"
25741   done
25742 done
25743  ;;
25744     "default":C)
25745 chmod +x tests/run
25746 date > stamp-h
25747 BACKENDSC="servers/slapd/backends.c"
25748 echo "Making $BACKENDSC"
25749 rm -f $BACKENDSC
25750 cat > $BACKENDSC << ENDX
25751 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25752  *
25753  * Copyright 1998-2010 The OpenLDAP Foundation.
25754  * All rights reserved.
25755  *
25756  * Redistribution and use in source and binary forms, with or without
25757  * modification, are permitted only as authorized by the OpenLDAP
25758  * Public License.
25759  *
25760  * A copy of this license is available in the file LICENSE in the
25761  * top-level directory of the distribution or, alternatively, at
25762  * <http://www.OpenLDAP.org/license.html>.
25763  */
25764 /* This file is automatically generated by configure; please do not edit. */
25765
25766 #include "portable.h"
25767 #include "slap.h"
25768
25769 ENDX
25770 if test "${STATIC_BACKENDS}"; then
25771         for b in config ${STATIC_BACKENDS}; do
25772                 bb=`echo "${b}" | sed -e 's/back-//'`
25773                 cat >> $BACKENDSC << ENDX
25774 extern BI_init ${bb}_back_initialize;
25775 ENDX
25776         done
25777
25778         cat >> $BACKENDSC << ENDX
25779
25780 BackendInfo slap_binfo[] = {
25781 ENDX
25782
25783         for b in config ${STATIC_BACKENDS}; do
25784                 bb=`echo "${b}" | sed -e 's/back-//'`
25785                 echo "    Add ${bb} ..."
25786                 cat >> $BACKENDSC << ENDX
25787         { "${bb}", ${bb}_back_initialize },
25788 ENDX
25789         done
25790
25791         cat >> $BACKENDSC << ENDX
25792         { NULL, NULL },
25793 };
25794
25795 /* end of generated file */
25796 ENDX
25797 fi
25798 OVERLAYSC="servers/slapd/overlays/statover.c"
25799 echo "Making $OVERLAYSC"
25800 rm -f $OVERLAYSC
25801 cat > $OVERLAYSC << ENDX
25802 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
25803  *
25804  * Copyright 1998-2010 The OpenLDAP Foundation.
25805  * All rights reserved.
25806  *
25807  * Redistribution and use in source and binary forms, with or without
25808  * modification, are permitted only as authorized by the OpenLDAP
25809  * Public License.
25810  *
25811  * A copy of this license is available in the file LICENSE in the
25812  * top-level directory of the distribution or, alternatively, at
25813  * <http://www.OpenLDAP.org/license.html>.
25814  */
25815 /* This file is automatically generated by configure; please do not edit. */
25816
25817 #include "portable.h"
25818 #include "slap.h"
25819
25820 ENDX
25821 if test "${STATIC_OVERLAYS}"; then
25822         for o in ${STATIC_OVERLAYS}; do
25823                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
25824                 cat >> $OVERLAYSC << ENDX
25825 extern OV_init ${oo}_initialize;
25826 ENDX
25827         done
25828 fi
25829
25830 cat >> $OVERLAYSC << ENDX
25831
25832 OverlayInit slap_oinfo[] = {
25833 ENDX
25834
25835 if test "${STATIC_OVERLAYS}"; then
25836         for o in ${STATIC_OVERLAYS}; do
25837                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
25838                 echo "    Add ${oo} ..."
25839                 cat >> $OVERLAYSC << ENDX
25840         { "${oo}", ${oo}_initialize },
25841 ENDX
25842         done
25843 fi
25844
25845         cat >> $OVERLAYSC << ENDX
25846         { NULL, NULL },
25847 };
25848
25849 /* end of generated file */
25850 ENDX
25851
25852 if test "${ol_cv_mkdep}" = no; then
25853         echo '(Do not "make depend"; we do not know how to build dependencies)'
25854 else
25855         echo 'Please run "make depend" to build dependencies'
25856 fi
25857  ;;
25858
25859   esac
25860 done # for ac_tag
25861
25862
25863 as_fn_exit 0
25864 _ACEOF
25865 ac_clean_files=$ac_clean_files_save
25866
25867 test $ac_write_fail = 0 ||
25868   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
25869
25870
25871 # configure is writing to config.log, and then calls config.status.
25872 # config.status does its own redirection, appending to config.log.
25873 # Unfortunately, on DOS this fails, as config.log is still kept open
25874 # by configure, so config.status won't be able to write to it; its
25875 # output is simply discarded.  So we exec the FD to /dev/null,
25876 # effectively closing config.log, so it can be properly (re)opened and
25877 # appended to by config.status.  When coming back to configure, we
25878 # need to make the FD available again.
25879 if test "$no_create" != yes; then
25880   ac_cs_success=:
25881   ac_config_status_args=
25882   test "$silent" = yes &&
25883     ac_config_status_args="$ac_config_status_args --quiet"
25884   exec 5>/dev/null
25885   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25886   exec 5>>config.log
25887   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25888   # would make configure fail if this is the last instruction.
25889   $ac_cs_success || as_fn_exit $?
25890 fi
25891 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
25892   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
25893 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
25894 fi
25895