]> git.sur5r.net Git - openldap/blob - configure
Merge remote branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
[openldap] / configure
1 #! /bin/sh
2 # From configure.in Id: 5215fe6b61d7a45c15ff92b52bdb0561f48e3d2c .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.65.
5 #
6 # Copyright 1998-2011 The OpenLDAP Foundation. All rights reserved.
7 # Restrictions apply, see COPYRIGHT and LICENSE files.
8 #
9 #
10 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
11 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
12 # Inc.
13 #
14 #
15 # This configure script is free software; the Free Software Foundation
16 # gives unlimited permission to copy, distribute and modify it.
17 ## -------------------- ##
18 ## M4sh Initialization. ##
19 ## -------------------- ##
20
21 # Be more Bourne compatible
22 DUALCASE=1; export DUALCASE # for MKS sh
23 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24   emulate sh
25   NULLCMD=:
26   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
27   # is contrary to our usage.  Disable this feature.
28   alias -g '${1+"$@"}'='"$@"'
29   setopt NO_GLOB_SUBST
30 else
31   case `(set -o) 2>/dev/null` in #(
32   *posix*) :
33     set -o posix ;; #(
34   *) :
35      ;;
36 esac
37 fi
38
39
40 as_nl='
41 '
42 export as_nl
43 # Printing a long string crashes Solaris 7 /usr/bin/printf.
44 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
45 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
46 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
47 # Prefer a ksh shell builtin over an external printf program on Solaris,
48 # but without wasting forks for bash or zsh.
49 if test -z "$BASH_VERSION$ZSH_VERSION" \
50     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51   as_echo='print -r --'
52   as_echo_n='print -rn --'
53 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
54   as_echo='printf %s\n'
55   as_echo_n='printf %s'
56 else
57   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
58     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
59     as_echo_n='/usr/ucb/echo -n'
60   else
61     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
62     as_echo_n_body='eval
63       arg=$1;
64       case $arg in #(
65       *"$as_nl"*)
66         expr "X$arg" : "X\\(.*\\)$as_nl";
67         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
68       esac;
69       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
70     '
71     export as_echo_n_body
72     as_echo_n='sh -c $as_echo_n_body as_echo'
73   fi
74   export as_echo_body
75   as_echo='sh -c $as_echo_body as_echo'
76 fi
77
78 # The user is always right.
79 if test "${PATH_SEPARATOR+set}" != set; then
80   PATH_SEPARATOR=:
81   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
82     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
83       PATH_SEPARATOR=';'
84   }
85 fi
86
87
88 # IFS
89 # We need space, tab and new line, in precisely that order.  Quoting is
90 # there to prevent editors from complaining about space-tab.
91 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
92 # splitting by setting IFS to empty value.)
93 IFS=" ""        $as_nl"
94
95 # Find who we are.  Look in the path if we contain no directory separator.
96 case $0 in #((
97   *[\\/]* ) as_myself=$0 ;;
98   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
99 for as_dir in $PATH
100 do
101   IFS=$as_save_IFS
102   test -z "$as_dir" && as_dir=.
103     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104   done
105 IFS=$as_save_IFS
106
107      ;;
108 esac
109 # We did not find ourselves, most probably we were run as `sh COMMAND'
110 # in which case we are not to be found in the path.
111 if test "x$as_myself" = x; then
112   as_myself=$0
113 fi
114 if test ! -f "$as_myself"; then
115   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116   exit 1
117 fi
118
119 # Unset variables that we do not need and which cause bugs (e.g. in
120 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
121 # suppresses any "Segmentation fault" message there.  '((' could
122 # trigger a bug in pdksh 5.2.14.
123 for as_var in BASH_ENV ENV MAIL MAILPATH
124 do eval test x\${$as_var+set} = xset \
125   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
126 done
127 PS1='$ '
128 PS2='> '
129 PS4='+ '
130
131 # NLS nuisances.
132 LC_ALL=C
133 export LC_ALL
134 LANGUAGE=C
135 export LANGUAGE
136
137 # CDPATH.
138 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140 if test "x$CONFIG_SHELL" = x; then
141   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142   emulate sh
143   NULLCMD=:
144   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145   # is contrary to our usage.  Disable this feature.
146   alias -g '\${1+\"\$@\"}'='\"\$@\"'
147   setopt NO_GLOB_SUBST
148 else
149   case \`(set -o) 2>/dev/null\` in #(
150   *posix*) :
151     set -o posix ;; #(
152   *) :
153      ;;
154 esac
155 fi
156 "
157   as_required="as_fn_return () { (exit \$1); }
158 as_fn_success () { as_fn_return 0; }
159 as_fn_failure () { as_fn_return 1; }
160 as_fn_ret_success () { return 0; }
161 as_fn_ret_failure () { return 1; }
162
163 exitcode=0
164 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170 else
171   exitcode=1; echo positional parameters were not saved.
172 fi
173 test x\$exitcode = x0 || exit 1"
174   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178 test \$(( 1 + 1 )) = 2 || exit 1"
179   if (eval "$as_required") 2>/dev/null; then :
180   as_have_required=yes
181 else
182   as_have_required=no
183 fi
184   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186 else
187   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188 as_found=false
189 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190 do
191   IFS=$as_save_IFS
192   test -z "$as_dir" && as_dir=.
193   as_found=:
194   case $as_dir in #(
195          /*)
196            for as_base in sh bash ksh sh5; do
197              # Try only shells that exist, to save several forks.
198              as_shell=$as_dir/$as_base
199              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201   CONFIG_SHELL=$as_shell as_have_required=yes
202                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203   break 2
204 fi
205 fi
206            done;;
207        esac
208   as_found=false
209 done
210 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
211               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
212   CONFIG_SHELL=$SHELL as_have_required=yes
213 fi; }
214 IFS=$as_save_IFS
215
216
217       if test "x$CONFIG_SHELL" != x; then :
218   # We cannot yet assume a decent shell, so we have to provide a
219         # neutralization value for shells without unset; and this also
220         # works around shells that cannot unset nonexistent variables.
221         BASH_ENV=/dev/null
222         ENV=/dev/null
223         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224         export CONFIG_SHELL
225         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
226 fi
227
228     if test x$as_have_required = xno; then :
229   $as_echo "$0: This script requires a shell more modern than all"
230   $as_echo "$0: the shells that I found on your system."
231   if test x${ZSH_VERSION+set} = xset ; then
232     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
233     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
234   else
235     $as_echo "$0: Please tell bug-autoconf@gnu.org and
236 $0: <http://www.openldap.org/its/> about your system,
237 $0: including any error possibly output before this
238 $0: message. Then install a modern shell, or manually run
239 $0: the script under such a shell if you do have one."
240   fi
241   exit 1
242 fi
243 fi
244 fi
245 SHELL=${CONFIG_SHELL-/bin/sh}
246 export SHELL
247 # Unset more variables known to interfere with behavior of common tools.
248 CLICOLOR_FORCE= GREP_OPTIONS=
249 unset CLICOLOR_FORCE GREP_OPTIONS
250
251 ## --------------------- ##
252 ## M4sh Shell Functions. ##
253 ## --------------------- ##
254 # as_fn_unset VAR
255 # ---------------
256 # Portably unset VAR.
257 as_fn_unset ()
258 {
259   { eval $1=; unset $1;}
260 }
261 as_unset=as_fn_unset
262
263 # as_fn_set_status STATUS
264 # -----------------------
265 # Set $? to STATUS, without forking.
266 as_fn_set_status ()
267 {
268   return $1
269 } # as_fn_set_status
270
271 # as_fn_exit STATUS
272 # -----------------
273 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
274 as_fn_exit ()
275 {
276   set +e
277   as_fn_set_status $1
278   exit $1
279 } # as_fn_exit
280
281 # as_fn_mkdir_p
282 # -------------
283 # Create "$as_dir" as a directory, including parents if necessary.
284 as_fn_mkdir_p ()
285 {
286
287   case $as_dir in #(
288   -*) as_dir=./$as_dir;;
289   esac
290   test -d "$as_dir" || eval $as_mkdir_p || {
291     as_dirs=
292     while :; do
293       case $as_dir in #(
294       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
295       *) as_qdir=$as_dir;;
296       esac
297       as_dirs="'$as_qdir' $as_dirs"
298       as_dir=`$as_dirname -- "$as_dir" ||
299 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
300          X"$as_dir" : 'X\(//\)[^/]' \| \
301          X"$as_dir" : 'X\(//\)$' \| \
302          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
303 $as_echo X"$as_dir" |
304     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
305             s//\1/
306             q
307           }
308           /^X\(\/\/\)[^/].*/{
309             s//\1/
310             q
311           }
312           /^X\(\/\/\)$/{
313             s//\1/
314             q
315           }
316           /^X\(\/\).*/{
317             s//\1/
318             q
319           }
320           s/.*/./; q'`
321       test -d "$as_dir" && break
322     done
323     test -z "$as_dirs" || eval "mkdir $as_dirs"
324   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
325
326
327 } # as_fn_mkdir_p
328 # as_fn_append VAR VALUE
329 # ----------------------
330 # Append the text in VALUE to the end of the definition contained in VAR. Take
331 # advantage of any shell optimizations that allow amortized linear growth over
332 # repeated appends, instead of the typical quadratic growth present in naive
333 # implementations.
334 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
335   eval 'as_fn_append ()
336   {
337     eval $1+=\$2
338   }'
339 else
340   as_fn_append ()
341   {
342     eval $1=\$$1\$2
343   }
344 fi # as_fn_append
345
346 # as_fn_arith ARG...
347 # ------------------
348 # Perform arithmetic evaluation on the ARGs, and store the result in the
349 # global $as_val. Take advantage of shells that can avoid forks. The arguments
350 # must be portable across $(()) and expr.
351 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
352   eval 'as_fn_arith ()
353   {
354     as_val=$(( $* ))
355   }'
356 else
357   as_fn_arith ()
358   {
359     as_val=`expr "$@" || test $? -eq 1`
360   }
361 fi # as_fn_arith
362
363
364 # as_fn_error ERROR [LINENO LOG_FD]
365 # ---------------------------------
366 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
367 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
368 # script with status $?, using 1 if that was 0.
369 as_fn_error ()
370 {
371   as_status=$?; test $as_status -eq 0 && as_status=1
372   if test "$3"; then
373     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
374     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
375   fi
376   $as_echo "$as_me: error: $1" >&2
377   as_fn_exit $as_status
378 } # as_fn_error
379
380 if expr a : '\(a\)' >/dev/null 2>&1 &&
381    test "X`expr 00001 : '.*\(...\)'`" = X001; then
382   as_expr=expr
383 else
384   as_expr=false
385 fi
386
387 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
388   as_basename=basename
389 else
390   as_basename=false
391 fi
392
393 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
394   as_dirname=dirname
395 else
396   as_dirname=false
397 fi
398
399 as_me=`$as_basename -- "$0" ||
400 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
401          X"$0" : 'X\(//\)$' \| \
402          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
403 $as_echo X/"$0" |
404     sed '/^.*\/\([^/][^/]*\)\/*$/{
405             s//\1/
406             q
407           }
408           /^X\/\(\/\/\)$/{
409             s//\1/
410             q
411           }
412           /^X\/\(\/\).*/{
413             s//\1/
414             q
415           }
416           s/.*/./; q'`
417
418 # Avoid depending upon Character Ranges.
419 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
420 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
421 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
422 as_cr_digits='0123456789'
423 as_cr_alnum=$as_cr_Letters$as_cr_digits
424
425
426   as_lineno_1=$LINENO as_lineno_1a=$LINENO
427   as_lineno_2=$LINENO as_lineno_2a=$LINENO
428   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
429   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
430   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
431   sed -n '
432     p
433     /[$]LINENO/=
434   ' <$as_myself |
435     sed '
436       s/[$]LINENO.*/&-/
437       t lineno
438       b
439       :lineno
440       N
441       :loop
442       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
443       t loop
444       s/-\n.*//
445     ' >$as_me.lineno &&
446   chmod +x "$as_me.lineno" ||
447     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
448
449   # Don't try to exec as it changes $[0], causing all sort of problems
450   # (the dirname of $[0] is not the place where we might find the
451   # original and so on.  Autoconf is especially sensitive to this).
452   . "./$as_me.lineno"
453   # Exit status is that of the last command.
454   exit
455 }
456
457 ECHO_C= ECHO_N= ECHO_T=
458 case `echo -n x` in #(((((
459 -n*)
460   case `echo 'xy\c'` in
461   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
462   xy)  ECHO_C='\c';;
463   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
464        ECHO_T=' ';;
465   esac;;
466 *)
467   ECHO_N='-n';;
468 esac
469
470 rm -f conf$$ conf$$.exe conf$$.file
471 if test -d conf$$.dir; then
472   rm -f conf$$.dir/conf$$.file
473 else
474   rm -f conf$$.dir
475   mkdir conf$$.dir 2>/dev/null
476 fi
477 if (echo >conf$$.file) 2>/dev/null; then
478   if ln -s conf$$.file conf$$ 2>/dev/null; then
479     as_ln_s='ln -s'
480     # ... but there are two gotchas:
481     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
482     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
483     # In both cases, we have to default to `cp -p'.
484     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
485       as_ln_s='cp -p'
486   elif ln conf$$.file conf$$ 2>/dev/null; then
487     as_ln_s=ln
488   else
489     as_ln_s='cp -p'
490   fi
491 else
492   as_ln_s='cp -p'
493 fi
494 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
495 rmdir conf$$.dir 2>/dev/null
496
497 if mkdir -p . 2>/dev/null; then
498   as_mkdir_p='mkdir -p "$as_dir"'
499 else
500   test -d ./-p && rmdir ./-p
501   as_mkdir_p=false
502 fi
503
504 if test -x / >/dev/null 2>&1; then
505   as_test_x='test -x'
506 else
507   if ls -dL / >/dev/null 2>&1; then
508     as_ls_L_option=L
509   else
510     as_ls_L_option=
511   fi
512   as_test_x='
513     eval sh -c '\''
514       if test -d "$1"; then
515         test -d "$1/.";
516       else
517         case $1 in #(
518         -*)set "./$1";;
519         esac;
520         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
521         ???[sx]*):;;*)false;;esac;fi
522     '\'' sh
523   '
524 fi
525 as_executable_p=$as_test_x
526
527 # Sed expression to map a string onto a valid CPP name.
528 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
529
530 # Sed expression to map a string onto a valid variable name.
531 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
532
533
534
535 # Check that we are running under the correct shell.
536 SHELL=${CONFIG_SHELL-/bin/sh}
537
538 case X$ECHO in
539 X*--fallback-echo)
540   # Remove one level of quotation (which was required for Make).
541   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
542   ;;
543 esac
544
545 echo=${ECHO-echo}
546 if test "X$1" = X--no-reexec; then
547   # Discard the --no-reexec flag, and continue.
548   shift
549 elif test "X$1" = X--fallback-echo; then
550   # Avoid inline document here, it may be left over
551   :
552 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
553   # Yippee, $echo works!
554   :
555 else
556   # Restart under the correct shell.
557   exec $SHELL "$0" --no-reexec ${1+"$@"}
558 fi
559
560 if test "X$1" = X--fallback-echo; then
561   # used as fallback echo
562   shift
563   cat <<EOF
564 $*
565 EOF
566   exit 0
567 fi
568
569 # The HP-UX ksh and POSIX shell print the target directory to stdout
570 # if CDPATH is set.
571 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
572
573 if test -z "$ECHO"; then
574 if test "X${echo_test_string+set}" != Xset; then
575 # find a string as large as possible, as long as the shell can cope with it
576   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
577     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
578     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
579        echo_test_string=`eval $cmd` &&
580        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
581     then
582       break
583     fi
584   done
585 fi
586
587 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
588    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
589    test "X$echo_testing_string" = "X$echo_test_string"; then
590   :
591 else
592   # The Solaris, AIX, and Digital Unix default echo programs unquote
593   # backslashes.  This makes it impossible to quote backslashes using
594   #   echo "$something" | sed 's/\\/\\\\/g'
595   #
596   # So, first we look for a working echo in the user's PATH.
597
598   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
599   for dir in $PATH /usr/ucb; do
600     IFS="$lt_save_ifs"
601     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
602        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
603        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
604        test "X$echo_testing_string" = "X$echo_test_string"; then
605       echo="$dir/echo"
606       break
607     fi
608   done
609   IFS="$lt_save_ifs"
610
611   if test "X$echo" = Xecho; then
612     # We didn't find a better echo, so look for alternatives.
613     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
614        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
615        test "X$echo_testing_string" = "X$echo_test_string"; then
616       # This shell has a builtin print -r that does the trick.
617       echo='print -r'
618     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
619          test "X$CONFIG_SHELL" != X/bin/ksh; then
620       # If we have ksh, try running configure again with it.
621       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
622       export ORIGINAL_CONFIG_SHELL
623       CONFIG_SHELL=/bin/ksh
624       export CONFIG_SHELL
625       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
626     else
627       # Try using printf.
628       echo='printf %s\n'
629       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
630          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
631          test "X$echo_testing_string" = "X$echo_test_string"; then
632         # Cool, printf works
633         :
634       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
635            test "X$echo_testing_string" = 'X\t' &&
636            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
637            test "X$echo_testing_string" = "X$echo_test_string"; then
638         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
639         export CONFIG_SHELL
640         SHELL="$CONFIG_SHELL"
641         export SHELL
642         echo="$CONFIG_SHELL $0 --fallback-echo"
643       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
644            test "X$echo_testing_string" = 'X\t' &&
645            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
646            test "X$echo_testing_string" = "X$echo_test_string"; then
647         echo="$CONFIG_SHELL $0 --fallback-echo"
648       else
649         # maybe with a smaller string...
650         prev=:
651
652         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
653           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
654           then
655             break
656           fi
657           prev="$cmd"
658         done
659
660         if test "$prev" != 'sed 50q "$0"'; then
661           echo_test_string=`eval $prev`
662           export echo_test_string
663           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
664         else
665           # Oops.  We lost completely, so just stick with echo.
666           echo=echo
667         fi
668       fi
669     fi
670   fi
671 fi
672 fi
673
674 # Copy echo and quote the copy suitably for passing to libtool from
675 # the Makefile, instead of quoting the original, which is used later.
676 ECHO=$echo
677 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
678    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
679 fi
680
681
682
683
684 test -n "$DJDIR" || exec 7<&0 </dev/null
685 exec 6>&1
686
687 # Name of the host.
688 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
689 # so uname gets run too.
690 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
691
692 #
693 # Initializations.
694 #
695 ac_default_prefix=/usr/local
696 ac_clean_files=
697 ac_config_libobj_dir=.
698 LIBOBJS=
699 cross_compiling=no
700 subdirs=
701 MFLAGS=
702 MAKEFLAGS=
703
704 # Identity of this package.
705 PACKAGE_NAME=
706 PACKAGE_TARNAME=
707 PACKAGE_VERSION=
708 PACKAGE_STRING=
709 PACKAGE_BUGREPORT=
710 PACKAGE_URL=
711
712 ac_unique_file="OpenLDAP"
713 ac_unique_file="build/version.sh"
714 ac_default_prefix=/usr/local
715 # Factoring default headers for most tests.
716 ac_includes_default="\
717 #include <stdio.h>
718 #ifdef HAVE_SYS_TYPES_H
719 # include <sys/types.h>
720 #endif
721 #ifdef HAVE_SYS_STAT_H
722 # include <sys/stat.h>
723 #endif
724 #ifdef STDC_HEADERS
725 # include <stdlib.h>
726 # include <stddef.h>
727 #else
728 # ifdef HAVE_STDLIB_H
729 #  include <stdlib.h>
730 # endif
731 #endif
732 #ifdef HAVE_STRING_H
733 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
734 #  include <memory.h>
735 # endif
736 # include <string.h>
737 #endif
738 #ifdef HAVE_STRINGS_H
739 # include <strings.h>
740 #endif
741 #ifdef HAVE_INTTYPES_H
742 # include <inttypes.h>
743 #endif
744 #ifdef HAVE_STDINT_H
745 # include <stdint.h>
746 #endif
747 #ifdef HAVE_UNISTD_H
748 # include <unistd.h>
749 #endif"
750
751 ac_subst_vars='LTLIBOBJS
752 SLAPD_SQL_INCLUDES
753 SLAPD_SQL_LIBS
754 SLAPD_SQL_LDFLAGS
755 SLAPD_GMP_LIBS
756 SLAPD_SLP_LIBS
757 ICU_LIBS
758 AUTH_LIBS
759 LIBSLAPI
760 SLAPI_LIBS
761 MODULES_LIBS
762 TLS_LIBS
763 SASL_LIBS
764 KRB5_LIBS
765 KRB4_LIBS
766 MOD_PERL_LDFLAGS
767 SLAPD_PERL_LDFLAGS
768 PERL_CPPFLAGS
769 SLAPD_DYNAMIC_OVERLAYS
770 SLAPD_STATIC_OVERLAYS
771 SLAPD_DYNAMIC_BACKENDS
772 SLAPD_STATIC_BACKENDS
773 SLAPD_NO_STATIC
774 SLAPD_MODULES_LDFLAGS
775 SLAPD_MODULES_CPPFLAGS
776 WRAP_LIBS
777 LUTIL_LIBS
778 LTHREAD_LIBS
779 SLAPD_NDB_INCS
780 SLAPD_NDB_LIBS
781 BDB_LIBS
782 SLAPD_LIBS
783 LDAP_LIBS
784 BUILD_VALSORT
785 BUILD_UNIQUE
786 BUILD_TRANSLUCENT
787 BUILD_SYNCPROV
788 BUILD_SSSVLV
789 BUILD_SEQMOD
790 BUILD_RWM
791 BUILD_RETCODE
792 BUILD_REFINT
793 BUILD_PROXYCACHE
794 BUILD_PPOLICY
795 BUILD_MEMBEROF
796 BUILD_LASTMOD
797 BUILD_DYNLIST
798 BUILD_DYNGROUP
799 BUILD_DEREF
800 BUILD_DENYOP
801 BUILD_DDS
802 BUILD_CONSTRAINT
803 BUILD_COLLECT
804 BUILD_AUDITLOG
805 BUILD_ACCESSLOG
806 BUILD_SQL
807 BUILD_SOCK
808 BUILD_SHELL
809 BUILD_PERL
810 BUILD_RELAY
811 BUILD_PASSWD
812 BUILD_NULL
813 BUILD_NDB
814 BUILD_MONITOR
815 BUILD_META
816 BUILD_LDAP
817 BUILD_HDB
818 BUILD_DNSSRV
819 BUILD_BDB
820 SLAPD_SLAPI_DEPEND
821 BUILD_SLAPI
822 BUILD_SLAPD
823 BUILD_LIBS_DYNAMIC
824 BUILD_THREAD
825 WITH_ACI_ENABLED
826 WITH_MODULES_ENABLED
827 WITH_TLS
828 WITH_SASL
829 PLAT
830 LIBSRCS
831 LIBOBJS
832 MYSQL
833 LTSTATIC
834 OL_MKDEP_FLAGS
835 OL_MKDEP
836 PERLBIN
837 LIBTOOL
838 CPP
839 OBJDUMP
840 AS
841 DLLTOOL
842 RANLIB
843 ECHO
844 LN_S
845 EGREP
846 GREP
847 am__fastdepCC_FALSE
848 am__fastdepCC_TRUE
849 CCDEPMODE
850 AMDEPBACKSLASH
851 AMDEP_FALSE
852 AMDEP_TRUE
853 am__quote
854 am__include
855 DEPDIR
856 OBJEXT
857 EXEEXT
858 ac_ct_CC
859 CPPFLAGS
860 LDFLAGS
861 CFLAGS
862 AR
863 CC
864 ldap_subdir
865 top_builddir
866 OPENLDAP_RELEASE_DATE
867 OPENLDAP_LIBVERSION
868 OPENLDAP_LIBRELEASE
869 am__untar
870 am__tar
871 AMTAR
872 am__leading_dot
873 SET_MAKE
874 AWK
875 mkdir_p
876 INSTALL_STRIP_PROGRAM
877 STRIP
878 install_sh
879 MAKEINFO
880 AUTOHEADER
881 AUTOMAKE
882 AUTOCONF
883 ACLOCAL
884 VERSION
885 PACKAGE
886 CYGPATH_W
887 INSTALL_DATA
888 INSTALL_SCRIPT
889 INSTALL_PROGRAM
890 target_os
891 target_vendor
892 target_cpu
893 target
894 host_os
895 host_vendor
896 host_cpu
897 host
898 build_os
899 build_vendor
900 build_cpu
901 build
902 target_alias
903 host_alias
904 build_alias
905 LIBS
906 ECHO_T
907 ECHO_N
908 ECHO_C
909 DEFS
910 mandir
911 localedir
912 libdir
913 psdir
914 pdfdir
915 dvidir
916 htmldir
917 infodir
918 docdir
919 oldincludedir
920 includedir
921 localstatedir
922 sharedstatedir
923 sysconfdir
924 datadir
925 datarootdir
926 libexecdir
927 sbindir
928 bindir
929 program_transform_name
930 prefix
931 exec_prefix
932 PACKAGE_URL
933 PACKAGE_BUGREPORT
934 PACKAGE_STRING
935 PACKAGE_VERSION
936 PACKAGE_TARNAME
937 PACKAGE_NAME
938 PATH_SEPARATOR
939 SHELL'
940 ac_subst_files=''
941 ac_user_opts='
942 enable_option_checking
943 with_subdir
944 enable_debug
945 enable_dynamic
946 enable_syslog
947 enable_proctitle
948 enable_ipv6
949 enable_local
950 with_cyrus_sasl
951 with_fetch
952 with_threads
953 with_tls
954 with_yielding_select
955 with_mp
956 with_odbc
957 enable_xxslapdoptions
958 enable_slapd
959 enable_dynacl
960 enable_aci
961 enable_cleartext
962 enable_crypt
963 enable_lmpasswd
964 enable_spasswd
965 enable_modules
966 enable_rewrite
967 enable_rlookups
968 enable_slapi
969 enable_slp
970 enable_wrappers
971 enable_xxslapbackends
972 enable_backends
973 enable_bdb
974 enable_dnssrv
975 enable_hdb
976 enable_ldap
977 enable_meta
978 enable_monitor
979 enable_ndb
980 enable_null
981 enable_passwd
982 enable_perl
983 enable_relay
984 enable_shell
985 enable_sock
986 enable_sql
987 enable_xxslapoverlays
988 enable_overlays
989 enable_accesslog
990 enable_auditlog
991 enable_collect
992 enable_constraint
993 enable_dds
994 enable_deref
995 enable_dyngroup
996 enable_dynlist
997 enable_memberof
998 enable_ppolicy
999 enable_proxycache
1000 enable_refint
1001 enable_retcode
1002 enable_rwm
1003 enable_seqmod
1004 enable_sssvlv
1005 enable_syncprov
1006 enable_translucent
1007 enable_unique
1008 enable_valsort
1009 enable_xxliboptions
1010 enable_static
1011 enable_shared
1012 enable_fast_install
1013 enable_dependency_tracking
1014 with_gnu_ld
1015 enable_libtool_lock
1016 with_pic
1017 with_tags
1018 with_xxinstall
1019 '
1020       ac_precious_vars='build_alias
1021 host_alias
1022 target_alias
1023 CC
1024 CFLAGS
1025 LDFLAGS
1026 LIBS
1027 CPPFLAGS
1028 CPP'
1029
1030
1031 # Initialize some variables set by options.
1032 ac_init_help=
1033 ac_init_version=false
1034 ac_unrecognized_opts=
1035 ac_unrecognized_sep=
1036 # The variables have the same names as the options, with
1037 # dashes changed to underlines.
1038 cache_file=/dev/null
1039 exec_prefix=NONE
1040 no_create=
1041 no_recursion=
1042 prefix=NONE
1043 program_prefix=NONE
1044 program_suffix=NONE
1045 program_transform_name=s,x,x,
1046 silent=
1047 site=
1048 srcdir=
1049 verbose=
1050 x_includes=NONE
1051 x_libraries=NONE
1052
1053 # Installation directory options.
1054 # These are left unexpanded so users can "make install exec_prefix=/foo"
1055 # and all the variables that are supposed to be based on exec_prefix
1056 # by default will actually change.
1057 # Use braces instead of parens because sh, perl, etc. also accept them.
1058 # (The list follows the same order as the GNU Coding Standards.)
1059 bindir='${exec_prefix}/bin'
1060 sbindir='${exec_prefix}/sbin'
1061 libexecdir='${exec_prefix}/libexec'
1062 datarootdir='${prefix}/share'
1063 datadir='${datarootdir}'
1064 sysconfdir='${prefix}/etc'
1065 sharedstatedir='${prefix}/com'
1066 localstatedir='${prefix}/var'
1067 includedir='${prefix}/include'
1068 oldincludedir='/usr/include'
1069 docdir='${datarootdir}/doc/${PACKAGE}'
1070 infodir='${datarootdir}/info'
1071 htmldir='${docdir}'
1072 dvidir='${docdir}'
1073 pdfdir='${docdir}'
1074 psdir='${docdir}'
1075 libdir='${exec_prefix}/lib'
1076 localedir='${datarootdir}/locale'
1077 mandir='${datarootdir}/man'
1078
1079 ac_prev=
1080 ac_dashdash=
1081 for ac_option
1082 do
1083   # If the previous option needs an argument, assign it.
1084   if test -n "$ac_prev"; then
1085     eval $ac_prev=\$ac_option
1086     ac_prev=
1087     continue
1088   fi
1089
1090   case $ac_option in
1091   *=*)  ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1092   *)    ac_optarg=yes ;;
1093   esac
1094
1095   # Accept the important Cygnus configure options, so we can diagnose typos.
1096
1097   case $ac_dashdash$ac_option in
1098   --)
1099     ac_dashdash=yes ;;
1100
1101   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1102     ac_prev=bindir ;;
1103   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1104     bindir=$ac_optarg ;;
1105
1106   -build | --build | --buil | --bui | --bu)
1107     ac_prev=build_alias ;;
1108   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1109     build_alias=$ac_optarg ;;
1110
1111   -cache-file | --cache-file | --cache-fil | --cache-fi \
1112   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1113     ac_prev=cache_file ;;
1114   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1115   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1116     cache_file=$ac_optarg ;;
1117
1118   --config-cache | -C)
1119     cache_file=config.cache ;;
1120
1121   -datadir | --datadir | --datadi | --datad)
1122     ac_prev=datadir ;;
1123   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1124     datadir=$ac_optarg ;;
1125
1126   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1127   | --dataroo | --dataro | --datar)
1128     ac_prev=datarootdir ;;
1129   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1130   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1131     datarootdir=$ac_optarg ;;
1132
1133   -disable-* | --disable-*)
1134     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1135     # Reject names that are not valid shell variable names.
1136     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1137       as_fn_error "invalid feature name: $ac_useropt"
1138     ac_useropt_orig=$ac_useropt
1139     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1140     case $ac_user_opts in
1141       *"
1142 "enable_$ac_useropt"
1143 "*) ;;
1144       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1145          ac_unrecognized_sep=', ';;
1146     esac
1147     eval enable_$ac_useropt=no ;;
1148
1149   -docdir | --docdir | --docdi | --doc | --do)
1150     ac_prev=docdir ;;
1151   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1152     docdir=$ac_optarg ;;
1153
1154   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1155     ac_prev=dvidir ;;
1156   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1157     dvidir=$ac_optarg ;;
1158
1159   -enable-* | --enable-*)
1160     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1161     # Reject names that are not valid shell variable names.
1162     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1163       as_fn_error "invalid feature name: $ac_useropt"
1164     ac_useropt_orig=$ac_useropt
1165     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1166     case $ac_user_opts in
1167       *"
1168 "enable_$ac_useropt"
1169 "*) ;;
1170       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1171          ac_unrecognized_sep=', ';;
1172     esac
1173     eval enable_$ac_useropt=\$ac_optarg ;;
1174
1175   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1176   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1177   | --exec | --exe | --ex)
1178     ac_prev=exec_prefix ;;
1179   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1180   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1181   | --exec=* | --exe=* | --ex=*)
1182     exec_prefix=$ac_optarg ;;
1183
1184   -gas | --gas | --ga | --g)
1185     # Obsolete; use --with-gas.
1186     with_gas=yes ;;
1187
1188   -help | --help | --hel | --he | -h)
1189     ac_init_help=long ;;
1190   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1191     ac_init_help=recursive ;;
1192   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1193     ac_init_help=short ;;
1194
1195   -host | --host | --hos | --ho)
1196     ac_prev=host_alias ;;
1197   -host=* | --host=* | --hos=* | --ho=*)
1198     host_alias=$ac_optarg ;;
1199
1200   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1201     ac_prev=htmldir ;;
1202   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1203   | --ht=*)
1204     htmldir=$ac_optarg ;;
1205
1206   -includedir | --includedir | --includedi | --included | --include \
1207   | --includ | --inclu | --incl | --inc)
1208     ac_prev=includedir ;;
1209   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1210   | --includ=* | --inclu=* | --incl=* | --inc=*)
1211     includedir=$ac_optarg ;;
1212
1213   -infodir | --infodir | --infodi | --infod | --info | --inf)
1214     ac_prev=infodir ;;
1215   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1216     infodir=$ac_optarg ;;
1217
1218   -libdir | --libdir | --libdi | --libd)
1219     ac_prev=libdir ;;
1220   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1221     libdir=$ac_optarg ;;
1222
1223   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1224   | --libexe | --libex | --libe)
1225     ac_prev=libexecdir ;;
1226   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1227   | --libexe=* | --libex=* | --libe=*)
1228     libexecdir=$ac_optarg ;;
1229
1230   -localedir | --localedir | --localedi | --localed | --locale)
1231     ac_prev=localedir ;;
1232   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1233     localedir=$ac_optarg ;;
1234
1235   -localstatedir | --localstatedir | --localstatedi | --localstated \
1236   | --localstate | --localstat | --localsta | --localst | --locals)
1237     ac_prev=localstatedir ;;
1238   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1239   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1240     localstatedir=$ac_optarg ;;
1241
1242   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1243     ac_prev=mandir ;;
1244   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1245     mandir=$ac_optarg ;;
1246
1247   -nfp | --nfp | --nf)
1248     # Obsolete; use --without-fp.
1249     with_fp=no ;;
1250
1251   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1252   | --no-cr | --no-c | -n)
1253     no_create=yes ;;
1254
1255   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1256   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1257     no_recursion=yes ;;
1258
1259   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1260   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1261   | --oldin | --oldi | --old | --ol | --o)
1262     ac_prev=oldincludedir ;;
1263   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1264   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1265   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1266     oldincludedir=$ac_optarg ;;
1267
1268   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1269     ac_prev=prefix ;;
1270   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1271     prefix=$ac_optarg ;;
1272
1273   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1274   | --program-pre | --program-pr | --program-p)
1275     ac_prev=program_prefix ;;
1276   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1277   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1278     program_prefix=$ac_optarg ;;
1279
1280   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1281   | --program-suf | --program-su | --program-s)
1282     ac_prev=program_suffix ;;
1283   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1284   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1285     program_suffix=$ac_optarg ;;
1286
1287   -program-transform-name | --program-transform-name \
1288   | --program-transform-nam | --program-transform-na \
1289   | --program-transform-n | --program-transform- \
1290   | --program-transform | --program-transfor \
1291   | --program-transfo | --program-transf \
1292   | --program-trans | --program-tran \
1293   | --progr-tra | --program-tr | --program-t)
1294     ac_prev=program_transform_name ;;
1295   -program-transform-name=* | --program-transform-name=* \
1296   | --program-transform-nam=* | --program-transform-na=* \
1297   | --program-transform-n=* | --program-transform-=* \
1298   | --program-transform=* | --program-transfor=* \
1299   | --program-transfo=* | --program-transf=* \
1300   | --program-trans=* | --program-tran=* \
1301   | --progr-tra=* | --program-tr=* | --program-t=*)
1302     program_transform_name=$ac_optarg ;;
1303
1304   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1305     ac_prev=pdfdir ;;
1306   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1307     pdfdir=$ac_optarg ;;
1308
1309   -psdir | --psdir | --psdi | --psd | --ps)
1310     ac_prev=psdir ;;
1311   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1312     psdir=$ac_optarg ;;
1313
1314   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1315   | -silent | --silent | --silen | --sile | --sil)
1316     silent=yes ;;
1317
1318   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1319     ac_prev=sbindir ;;
1320   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1321   | --sbi=* | --sb=*)
1322     sbindir=$ac_optarg ;;
1323
1324   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1325   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1326   | --sharedst | --shareds | --shared | --share | --shar \
1327   | --sha | --sh)
1328     ac_prev=sharedstatedir ;;
1329   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1330   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1331   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1332   | --sha=* | --sh=*)
1333     sharedstatedir=$ac_optarg ;;
1334
1335   -site | --site | --sit)
1336     ac_prev=site ;;
1337   -site=* | --site=* | --sit=*)
1338     site=$ac_optarg ;;
1339
1340   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1341     ac_prev=srcdir ;;
1342   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1343     srcdir=$ac_optarg ;;
1344
1345   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1346   | --syscon | --sysco | --sysc | --sys | --sy)
1347     ac_prev=sysconfdir ;;
1348   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1349   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1350     sysconfdir=$ac_optarg ;;
1351
1352   -target | --target | --targe | --targ | --tar | --ta | --t)
1353     ac_prev=target_alias ;;
1354   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1355     target_alias=$ac_optarg ;;
1356
1357   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1358     verbose=yes ;;
1359
1360   -version | --version | --versio | --versi | --vers | -V)
1361     ac_init_version=: ;;
1362
1363   -with-* | --with-*)
1364     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1365     # Reject names that are not valid shell variable names.
1366     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1367       as_fn_error "invalid package name: $ac_useropt"
1368     ac_useropt_orig=$ac_useropt
1369     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1370     case $ac_user_opts in
1371       *"
1372 "with_$ac_useropt"
1373 "*) ;;
1374       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1375          ac_unrecognized_sep=', ';;
1376     esac
1377     eval with_$ac_useropt=\$ac_optarg ;;
1378
1379   -without-* | --without-*)
1380     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1381     # Reject names that are not valid shell variable names.
1382     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1383       as_fn_error "invalid package name: $ac_useropt"
1384     ac_useropt_orig=$ac_useropt
1385     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1386     case $ac_user_opts in
1387       *"
1388 "with_$ac_useropt"
1389 "*) ;;
1390       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1391          ac_unrecognized_sep=', ';;
1392     esac
1393     eval with_$ac_useropt=no ;;
1394
1395   --x)
1396     # Obsolete; use --with-x.
1397     with_x=yes ;;
1398
1399   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1400   | --x-incl | --x-inc | --x-in | --x-i)
1401     ac_prev=x_includes ;;
1402   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1403   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1404     x_includes=$ac_optarg ;;
1405
1406   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1407   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1408     ac_prev=x_libraries ;;
1409   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1410   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1411     x_libraries=$ac_optarg ;;
1412
1413   -*) as_fn_error "unrecognized option: \`$ac_option'
1414 Try \`$0 --help' for more information."
1415     ;;
1416
1417   *=*)
1418     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1419     # Reject names that are not valid shell variable names.
1420     case $ac_envvar in #(
1421       '' | [0-9]* | *[!_$as_cr_alnum]* )
1422       as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1423     esac
1424     eval $ac_envvar=\$ac_optarg
1425     export $ac_envvar ;;
1426
1427   *)
1428     # FIXME: should be removed in autoconf 3.0.
1429     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1430     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1431       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1432     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1433     ;;
1434
1435   esac
1436 done
1437
1438 if test -n "$ac_prev"; then
1439   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1440   as_fn_error "missing argument to $ac_option"
1441 fi
1442
1443 if test -n "$ac_unrecognized_opts"; then
1444   case $enable_option_checking in
1445     no) ;;
1446     fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1447     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1448   esac
1449 fi
1450
1451 # Check all directory arguments for consistency.
1452 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1453                 datadir sysconfdir sharedstatedir localstatedir includedir \
1454                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1455                 libdir localedir mandir
1456 do
1457   eval ac_val=\$$ac_var
1458   # Remove trailing slashes.
1459   case $ac_val in
1460     */ )
1461       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1462       eval $ac_var=\$ac_val;;
1463   esac
1464   # Be sure to have absolute directory names.
1465   case $ac_val in
1466     [\\/$]* | ?:[\\/]* )  continue;;
1467     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1468   esac
1469   as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1470 done
1471
1472 # There might be people who depend on the old broken behavior: `$host'
1473 # used to hold the argument of --host etc.
1474 # FIXME: To remove some day.
1475 build=$build_alias
1476 host=$host_alias
1477 target=$target_alias
1478
1479 # FIXME: To remove some day.
1480 if test "x$host_alias" != x; then
1481   if test "x$build_alias" = x; then
1482     cross_compiling=maybe
1483     $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1484     If a cross compiler is detected then cross compile mode will be used." >&2
1485   elif test "x$build_alias" != "x$host_alias"; then
1486     cross_compiling=yes
1487   fi
1488 fi
1489
1490 ac_tool_prefix=
1491 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1492
1493 test "$silent" = yes && exec 6>/dev/null
1494
1495
1496 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1497 ac_ls_di=`ls -di .` &&
1498 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1499   as_fn_error "working directory cannot be determined"
1500 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1501   as_fn_error "pwd does not report name of working directory"
1502
1503
1504 # Find the source files, if location was not specified.
1505 if test -z "$srcdir"; then
1506   ac_srcdir_defaulted=yes
1507   # Try the directory containing this script, then the parent directory.
1508   ac_confdir=`$as_dirname -- "$as_myself" ||
1509 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1510          X"$as_myself" : 'X\(//\)[^/]' \| \
1511          X"$as_myself" : 'X\(//\)$' \| \
1512          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1513 $as_echo X"$as_myself" |
1514     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1515             s//\1/
1516             q
1517           }
1518           /^X\(\/\/\)[^/].*/{
1519             s//\1/
1520             q
1521           }
1522           /^X\(\/\/\)$/{
1523             s//\1/
1524             q
1525           }
1526           /^X\(\/\).*/{
1527             s//\1/
1528             q
1529           }
1530           s/.*/./; q'`
1531   srcdir=$ac_confdir
1532   if test ! -r "$srcdir/$ac_unique_file"; then
1533     srcdir=..
1534   fi
1535 else
1536   ac_srcdir_defaulted=no
1537 fi
1538 if test ! -r "$srcdir/$ac_unique_file"; then
1539   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1540   as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1541 fi
1542 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1543 ac_abs_confdir=`(
1544         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1545         pwd)`
1546 # When building in place, set srcdir=.
1547 if test "$ac_abs_confdir" = "$ac_pwd"; then
1548   srcdir=.
1549 fi
1550 # Remove unnecessary trailing slashes from srcdir.
1551 # Double slashes in file names in object file debugging info
1552 # mess up M-x gdb in Emacs.
1553 case $srcdir in
1554 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1555 esac
1556 for ac_var in $ac_precious_vars; do
1557   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1558   eval ac_env_${ac_var}_value=\$${ac_var}
1559   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1560   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1561 done
1562
1563 #
1564 # Report the --help message.
1565 #
1566 if test "$ac_init_help" = "long"; then
1567   # Omit some internal or obsolete options to make the list less imposing.
1568   # This message is too long to be a string in the A/UX 3.1 sh.
1569   cat <<_ACEOF
1570 \`configure' configures this package to adapt to many kinds of systems.
1571
1572 Usage: $0 [OPTION]... [VAR=VALUE]...
1573
1574 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1575 VAR=VALUE.  See below for descriptions of some of the useful variables.
1576
1577 Defaults for the options are specified in brackets.
1578
1579 Configuration:
1580   -h, --help              display this help and exit
1581       --help=short        display options specific to this package
1582       --help=recursive    display the short help of all the included packages
1583   -V, --version           display version information and exit
1584   -q, --quiet, --silent   do not print \`checking...' messages
1585       --cache-file=FILE   cache test results in FILE [disabled]
1586   -C, --config-cache      alias for \`--cache-file=config.cache'
1587   -n, --no-create         do not create output files
1588       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1589
1590 Installation directories:
1591   --prefix=PREFIX         install architecture-independent files in PREFIX
1592                           [$ac_default_prefix]
1593   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1594                           [PREFIX]
1595
1596 By default, \`make install' will install all the files in
1597 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1598 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1599 for instance \`--prefix=\$HOME'.
1600
1601 For better control, use the options below.
1602
1603 Fine tuning of the installation directories:
1604   --bindir=DIR            user executables [EPREFIX/bin]
1605   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1606   --libexecdir=DIR        program executables [EPREFIX/libexec]
1607   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1608   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1609   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1610   --libdir=DIR            object code libraries [EPREFIX/lib]
1611   --includedir=DIR        C header files [PREFIX/include]
1612   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1613   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1614   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1615   --infodir=DIR           info documentation [DATAROOTDIR/info]
1616   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1617   --mandir=DIR            man documentation [DATAROOTDIR/man]
1618   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1619   --htmldir=DIR           html documentation [DOCDIR]
1620   --dvidir=DIR            dvi documentation [DOCDIR]
1621   --pdfdir=DIR            pdf documentation [DOCDIR]
1622   --psdir=DIR             ps documentation [DOCDIR]
1623 _ACEOF
1624
1625   cat <<\_ACEOF
1626
1627 Program names:
1628   --program-prefix=PREFIX            prepend PREFIX to installed program names
1629   --program-suffix=SUFFIX            append SUFFIX to installed program names
1630   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1631
1632 System types:
1633   --build=BUILD     configure for building on BUILD [guessed]
1634   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1635   --target=TARGET   configure for building compilers for TARGET [HOST]
1636 _ACEOF
1637 fi
1638
1639 if test -n "$ac_init_help"; then
1640
1641   cat <<\_ACEOF
1642
1643 Optional Features:
1644   --disable-option-checking  ignore unrecognized --enable/--with options
1645   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1646   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1647   --enable-debug          enable debugging no|yes|traditional [yes]
1648   --enable-dynamic        enable linking built binaries with dynamic libs [no]
1649   --enable-syslog         enable syslog support [auto]
1650   --enable-proctitle      enable proctitle support [yes]
1651   --enable-ipv6           enable IPv6 support [auto]
1652   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]
1653
1654 SLAPD (Standalone LDAP Daemon) Options:
1655   --enable-slapd          enable building slapd [yes]
1656     --enable-dynacl       enable run-time loadable ACL support (experimental) [no]
1657     --enable-aci          enable per-object ACIs (experimental) no|yes|mod [no]
1658     --enable-cleartext    enable cleartext passwords [yes]
1659     --enable-crypt        enable crypt(3) passwords [no]
1660     --enable-lmpasswd     enable LAN Manager passwords [no]
1661     --enable-spasswd      enable (Cyrus) SASL password verification [no]
1662     --enable-modules      enable dynamic module support [no]
1663     --enable-rewrite      enable DN rewriting in back-ldap and rwm overlay [auto]
1664     --enable-rlookups     enable reverse lookups of client hostnames [no]
1665     --enable-slapi        enable SLAPI support (experimental) [no]
1666     --enable-slp          enable SLPv2 support [no]
1667     --enable-wrappers     enable tcp wrapper support [no]
1668
1669 SLAPD Backend Options:
1670     --enable-backends     enable all available backends no|yes|mod
1671     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]
1672     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]
1673     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]
1674     --enable-ldap         enable ldap backend no|yes|mod [no]
1675     --enable-meta         enable metadirectory backend no|yes|mod [no]
1676     --enable-monitor      enable monitor backend no|yes|mod [yes]
1677     --enable-ndb          enable MySQL NDB Cluster backend no|yes|mod [no]
1678     --enable-null         enable null backend no|yes|mod [no]
1679     --enable-passwd       enable passwd backend no|yes|mod [no]
1680     --enable-perl         enable perl backend no|yes|mod [no]
1681     --enable-relay        enable relay backend no|yes|mod [yes]
1682     --enable-shell        enable shell backend no|yes|mod [no]
1683     --enable-sock         enable sock backend no|yes|mod [no]
1684     --enable-sql          enable sql backend no|yes|mod [no]
1685
1686 SLAPD Overlay Options:
1687     --enable-overlays     enable all available overlays no|yes|mod
1688     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [no]
1689     --enable-auditlog     Audit Logging overlay no|yes|mod [no]
1690     --enable-collect      Collect overlay no|yes|mod [no]
1691     --enable-constraint   Attribute Constraint overlay no|yes|mod [no]
1692     --enable-dds          Dynamic Directory Services overlay no|yes|mod [no]
1693     --enable-deref        Dereference overlay no|yes|mod [no]
1694     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1695     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1696     --enable-memberof     Reverse Group Membership overlay no|yes|mod [no]
1697     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1698     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1699     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1700     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1701     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1702     --enable-seqmod       Sequential Modify overlay no|yes|mod [no]
1703     --enable-sssvlv       ServerSideSort/VLV overlay no|yes|mod [no]
1704     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1705     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1706     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1707     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1708
1709 Library Generation & Linking Options
1710   --enable-static[=PKGS]  build static libraries [default=yes]
1711   --enable-shared[=PKGS]  build shared libraries [default=yes]
1712   --enable-fast-install[=PKGS]
1713                           optimize for fast installation [default=yes]
1714   --disable-dependency-tracking  speeds up one-time build
1715   --enable-dependency-tracking   do not reject slow dependency extractors
1716   --disable-libtool-lock  avoid locking (might break parallel builds)
1717
1718 Optional Packages:
1719   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1720   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1721   --with-subdir=DIR       change default subdirectory used for installs
1722   --with-cyrus-sasl       with Cyrus SASL support [auto]
1723   --with-fetch            with fetch(3) URL support [auto]
1724   --with-threads          with threads [auto]
1725   --with-tls              with TLS/SSL support auto|openssl|gnutls|moznss [auto]
1726   --with-yielding-select  with implicitly yielding select [auto]
1727   --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1728   --with-odbc             with specific ODBC support iodbc|unixodbc|odbc32|auto [auto]
1729   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1730   --with-pic              try to use only PIC/non-PIC objects [default=use
1731                           both]
1732   --with-tags[=TAGS]      include additional configurations [automatic]
1733
1734 See INSTALL file for further details.
1735
1736 Some influential environment variables:
1737   CC          C compiler command
1738   CFLAGS      C compiler flags
1739   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1740               nonstandard directory <lib dir>
1741   LIBS        libraries to pass to the linker, e.g. -l<library>
1742   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1743               you have headers in a nonstandard directory <include dir>
1744   CPP         C preprocessor
1745
1746 Use these variables to override the choices made by `configure' or to help
1747 it to find libraries and programs with nonstandard names/locations.
1748
1749 Report bugs to the package provider.
1750 _ACEOF
1751 ac_status=$?
1752 fi
1753
1754 if test "$ac_init_help" = "recursive"; then
1755   # If there are subdirs, report their specific --help.
1756   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1757     test -d "$ac_dir" ||
1758       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1759       continue
1760     ac_builddir=.
1761
1762 case "$ac_dir" in
1763 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1764 *)
1765   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1766   # A ".." for each directory in $ac_dir_suffix.
1767   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1768   case $ac_top_builddir_sub in
1769   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1770   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1771   esac ;;
1772 esac
1773 ac_abs_top_builddir=$ac_pwd
1774 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1775 # for backward compatibility:
1776 ac_top_builddir=$ac_top_build_prefix
1777
1778 case $srcdir in
1779   .)  # We are building in place.
1780     ac_srcdir=.
1781     ac_top_srcdir=$ac_top_builddir_sub
1782     ac_abs_top_srcdir=$ac_pwd ;;
1783   [\\/]* | ?:[\\/]* )  # Absolute name.
1784     ac_srcdir=$srcdir$ac_dir_suffix;
1785     ac_top_srcdir=$srcdir
1786     ac_abs_top_srcdir=$srcdir ;;
1787   *) # Relative name.
1788     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1789     ac_top_srcdir=$ac_top_build_prefix$srcdir
1790     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1791 esac
1792 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1793
1794     cd "$ac_dir" || { ac_status=$?; continue; }
1795     # Check for guested configure.
1796     if test -f "$ac_srcdir/configure.gnu"; then
1797       echo &&
1798       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1799     elif test -f "$ac_srcdir/configure"; then
1800       echo &&
1801       $SHELL "$ac_srcdir/configure" --help=recursive
1802     else
1803       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1804     fi || ac_status=$?
1805     cd "$ac_pwd" || { ac_status=$?; break; }
1806   done
1807 fi
1808
1809 test -n "$ac_init_help" && exit $ac_status
1810 if $ac_init_version; then
1811   cat <<\_ACEOF
1812 configure
1813 generated by GNU Autoconf 2.65
1814
1815 Copyright (C) 2009 Free Software Foundation, Inc.
1816 This configure script is free software; the Free Software Foundation
1817 gives unlimited permission to copy, distribute and modify it.
1818
1819 Copyright 1998-2011 The OpenLDAP Foundation. All rights reserved.
1820 Restrictions apply, see COPYRIGHT and LICENSE files.
1821 _ACEOF
1822   exit
1823 fi
1824
1825 ## ------------------------ ##
1826 ## Autoconf initialization. ##
1827 ## ------------------------ ##
1828
1829 # ac_fn_c_try_compile LINENO
1830 # --------------------------
1831 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1832 ac_fn_c_try_compile ()
1833 {
1834   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1835   rm -f conftest.$ac_objext
1836   if { { ac_try="$ac_compile"
1837 case "(($ac_try" in
1838   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1839   *) ac_try_echo=$ac_try;;
1840 esac
1841 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1842 $as_echo "$ac_try_echo"; } >&5
1843   (eval "$ac_compile") 2>conftest.err
1844   ac_status=$?
1845   if test -s conftest.err; then
1846     grep -v '^ *+' conftest.err >conftest.er1
1847     cat conftest.er1 >&5
1848     mv -f conftest.er1 conftest.err
1849   fi
1850   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1851   test $ac_status = 0; } && {
1852          test -z "$ac_c_werror_flag" ||
1853          test ! -s conftest.err
1854        } && test -s conftest.$ac_objext; then :
1855   ac_retval=0
1856 else
1857   $as_echo "$as_me: failed program was:" >&5
1858 sed 's/^/| /' conftest.$ac_ext >&5
1859
1860         ac_retval=1
1861 fi
1862   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1863   as_fn_set_status $ac_retval
1864
1865 } # ac_fn_c_try_compile
1866
1867 # ac_fn_c_try_link LINENO
1868 # -----------------------
1869 # Try to link conftest.$ac_ext, and return whether this succeeded.
1870 ac_fn_c_try_link ()
1871 {
1872   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1873   rm -f conftest.$ac_objext conftest$ac_exeext
1874   if { { ac_try="$ac_link"
1875 case "(($ac_try" in
1876   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1877   *) ac_try_echo=$ac_try;;
1878 esac
1879 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1880 $as_echo "$ac_try_echo"; } >&5
1881   (eval "$ac_link") 2>conftest.err
1882   ac_status=$?
1883   if test -s conftest.err; then
1884     grep -v '^ *+' conftest.err >conftest.er1
1885     cat conftest.er1 >&5
1886     mv -f conftest.er1 conftest.err
1887   fi
1888   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1889   test $ac_status = 0; } && {
1890          test -z "$ac_c_werror_flag" ||
1891          test ! -s conftest.err
1892        } && test -s conftest$ac_exeext && {
1893          test "$cross_compiling" = yes ||
1894          $as_test_x conftest$ac_exeext
1895        }; then :
1896   ac_retval=0
1897 else
1898   $as_echo "$as_me: failed program was:" >&5
1899 sed 's/^/| /' conftest.$ac_ext >&5
1900
1901         ac_retval=1
1902 fi
1903   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1904   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1905   # interfere with the next link command; also delete a directory that is
1906   # left behind by Apple's compiler.  We do this before executing the actions.
1907   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1908   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1909   as_fn_set_status $ac_retval
1910
1911 } # ac_fn_c_try_link
1912
1913 # ac_fn_c_try_cpp LINENO
1914 # ----------------------
1915 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1916 ac_fn_c_try_cpp ()
1917 {
1918   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919   if { { ac_try="$ac_cpp conftest.$ac_ext"
1920 case "(($ac_try" in
1921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1922   *) ac_try_echo=$ac_try;;
1923 esac
1924 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1925 $as_echo "$ac_try_echo"; } >&5
1926   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1927   ac_status=$?
1928   if test -s conftest.err; then
1929     grep -v '^ *+' conftest.err >conftest.er1
1930     cat conftest.er1 >&5
1931     mv -f conftest.er1 conftest.err
1932   fi
1933   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1934   test $ac_status = 0; } >/dev/null && {
1935          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1936          test ! -s conftest.err
1937        }; then :
1938   ac_retval=0
1939 else
1940   $as_echo "$as_me: failed program was:" >&5
1941 sed 's/^/| /' conftest.$ac_ext >&5
1942
1943     ac_retval=1
1944 fi
1945   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1946   as_fn_set_status $ac_retval
1947
1948 } # ac_fn_c_try_cpp
1949
1950 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1951 # -------------------------------------------------------
1952 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1953 # the include files in INCLUDES and setting the cache variable VAR
1954 # accordingly.
1955 ac_fn_c_check_header_mongrel ()
1956 {
1957   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1958   if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1959   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1960 $as_echo_n "checking for $2... " >&6; }
1961 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1962   $as_echo_n "(cached) " >&6
1963 fi
1964 eval ac_res=\$$3
1965                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1966 $as_echo "$ac_res" >&6; }
1967 else
1968   # Is the header compilable?
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1970 $as_echo_n "checking $2 usability... " >&6; }
1971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1972 /* end confdefs.h.  */
1973 $4
1974 #include <$2>
1975 _ACEOF
1976 if ac_fn_c_try_compile "$LINENO"; then :
1977   ac_header_compiler=yes
1978 else
1979   ac_header_compiler=no
1980 fi
1981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1983 $as_echo "$ac_header_compiler" >&6; }
1984
1985 # Is the header present?
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1987 $as_echo_n "checking $2 presence... " >&6; }
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989 /* end confdefs.h.  */
1990 #include <$2>
1991 _ACEOF
1992 if ac_fn_c_try_cpp "$LINENO"; then :
1993   ac_header_preproc=yes
1994 else
1995   ac_header_preproc=no
1996 fi
1997 rm -f conftest.err conftest.$ac_ext
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1999 $as_echo "$ac_header_preproc" >&6; }
2000
2001 # So?  What about this header?
2002 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2003   yes:no: )
2004     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2005 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2006     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2007 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2008     ;;
2009   no:yes:* )
2010     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2011 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2012     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2013 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2014     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2015 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2016     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2017 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2018     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2019 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2020 ( cat <<\_ASBOX
2021 ## --------------------------------------------- ##
2022 ## Report this to <http://www.openldap.org/its/> ##
2023 ## --------------------------------------------- ##
2024 _ASBOX
2025      ) | sed "s/^/$as_me: WARNING:     /" >&2
2026     ;;
2027 esac
2028   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2029 $as_echo_n "checking for $2... " >&6; }
2030 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2031   $as_echo_n "(cached) " >&6
2032 else
2033   eval "$3=\$ac_header_compiler"
2034 fi
2035 eval ac_res=\$$3
2036                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2037 $as_echo "$ac_res" >&6; }
2038 fi
2039   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2040
2041 } # ac_fn_c_check_header_mongrel
2042
2043 # ac_fn_c_try_run LINENO
2044 # ----------------------
2045 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2046 # that executables *can* be run.
2047 ac_fn_c_try_run ()
2048 {
2049   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2050   if { { ac_try="$ac_link"
2051 case "(($ac_try" in
2052   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2053   *) ac_try_echo=$ac_try;;
2054 esac
2055 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2056 $as_echo "$ac_try_echo"; } >&5
2057   (eval "$ac_link") 2>&5
2058   ac_status=$?
2059   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2060   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2061   { { case "(($ac_try" in
2062   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2063   *) ac_try_echo=$ac_try;;
2064 esac
2065 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2066 $as_echo "$ac_try_echo"; } >&5
2067   (eval "$ac_try") 2>&5
2068   ac_status=$?
2069   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2070   test $ac_status = 0; }; }; then :
2071   ac_retval=0
2072 else
2073   $as_echo "$as_me: program exited with status $ac_status" >&5
2074        $as_echo "$as_me: failed program was:" >&5
2075 sed 's/^/| /' conftest.$ac_ext >&5
2076
2077        ac_retval=$ac_status
2078 fi
2079   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2080   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2081   as_fn_set_status $ac_retval
2082
2083 } # ac_fn_c_try_run
2084
2085 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2086 # -------------------------------------------------------
2087 # Tests whether HEADER exists and can be compiled using the include files in
2088 # INCLUDES, setting the cache variable VAR accordingly.
2089 ac_fn_c_check_header_compile ()
2090 {
2091   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2092   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2093 $as_echo_n "checking for $2... " >&6; }
2094 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2095   $as_echo_n "(cached) " >&6
2096 else
2097   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098 /* end confdefs.h.  */
2099 $4
2100 #include <$2>
2101 _ACEOF
2102 if ac_fn_c_try_compile "$LINENO"; then :
2103   eval "$3=yes"
2104 else
2105   eval "$3=no"
2106 fi
2107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108 fi
2109 eval ac_res=\$$3
2110                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2111 $as_echo "$ac_res" >&6; }
2112   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2113
2114 } # ac_fn_c_check_header_compile
2115
2116 # ac_fn_c_check_func LINENO FUNC VAR
2117 # ----------------------------------
2118 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2119 ac_fn_c_check_func ()
2120 {
2121   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2122   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2123 $as_echo_n "checking for $2... " >&6; }
2124 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2125   $as_echo_n "(cached) " >&6
2126 else
2127   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128 /* end confdefs.h.  */
2129 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2130    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2131 #define $2 innocuous_$2
2132
2133 /* System header to define __stub macros and hopefully few prototypes,
2134     which can conflict with char $2 (); below.
2135     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2136     <limits.h> exists even on freestanding compilers.  */
2137
2138 #ifdef __STDC__
2139 # include <limits.h>
2140 #else
2141 # include <assert.h>
2142 #endif
2143
2144 #undef $2
2145
2146 /* Override any GCC internal prototype to avoid an error.
2147    Use char because int might match the return type of a GCC
2148    builtin and then its argument prototype would still apply.  */
2149 #ifdef __cplusplus
2150 extern "C"
2151 #endif
2152 char $2 ();
2153 /* The GNU C library defines this for functions which it implements
2154     to always fail with ENOSYS.  Some functions are actually named
2155     something starting with __ and the normal name is an alias.  */
2156 #if defined __stub_$2 || defined __stub___$2
2157 choke me
2158 #endif
2159
2160 int
2161 main ()
2162 {
2163 return $2 ();
2164   ;
2165   return 0;
2166 }
2167 _ACEOF
2168 if ac_fn_c_try_link "$LINENO"; then :
2169   eval "$3=yes"
2170 else
2171   eval "$3=no"
2172 fi
2173 rm -f core conftest.err conftest.$ac_objext \
2174     conftest$ac_exeext conftest.$ac_ext
2175 fi
2176 eval ac_res=\$$3
2177                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2178 $as_echo "$ac_res" >&6; }
2179   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2180
2181 } # ac_fn_c_check_func
2182
2183 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2184 # -------------------------------------------
2185 # Tests whether TYPE exists after having included INCLUDES, setting cache
2186 # variable VAR accordingly.
2187 ac_fn_c_check_type ()
2188 {
2189   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2190   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2191 $as_echo_n "checking for $2... " >&6; }
2192 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2193   $as_echo_n "(cached) " >&6
2194 else
2195   eval "$3=no"
2196   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197 /* end confdefs.h.  */
2198 $4
2199 int
2200 main ()
2201 {
2202 if (sizeof ($2))
2203          return 0;
2204   ;
2205   return 0;
2206 }
2207 _ACEOF
2208 if ac_fn_c_try_compile "$LINENO"; then :
2209   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210 /* end confdefs.h.  */
2211 $4
2212 int
2213 main ()
2214 {
2215 if (sizeof (($2)))
2216             return 0;
2217   ;
2218   return 0;
2219 }
2220 _ACEOF
2221 if ac_fn_c_try_compile "$LINENO"; then :
2222
2223 else
2224   eval "$3=yes"
2225 fi
2226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2227 fi
2228 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2229 fi
2230 eval ac_res=\$$3
2231                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232 $as_echo "$ac_res" >&6; }
2233   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2234
2235 } # ac_fn_c_check_type
2236
2237 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2238 # ----------------------------------------------------
2239 # Tries to find if the field MEMBER exists in type AGGR, after including
2240 # INCLUDES, setting cache variable VAR accordingly.
2241 ac_fn_c_check_member ()
2242 {
2243   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2245 $as_echo_n "checking for $2.$3... " >&6; }
2246 if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2247   $as_echo_n "(cached) " >&6
2248 else
2249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250 /* end confdefs.h.  */
2251 $5
2252 int
2253 main ()
2254 {
2255 static $2 ac_aggr;
2256 if (ac_aggr.$3)
2257 return 0;
2258   ;
2259   return 0;
2260 }
2261 _ACEOF
2262 if ac_fn_c_try_compile "$LINENO"; then :
2263   eval "$4=yes"
2264 else
2265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266 /* end confdefs.h.  */
2267 $5
2268 int
2269 main ()
2270 {
2271 static $2 ac_aggr;
2272 if (sizeof ac_aggr.$3)
2273 return 0;
2274   ;
2275   return 0;
2276 }
2277 _ACEOF
2278 if ac_fn_c_try_compile "$LINENO"; then :
2279   eval "$4=yes"
2280 else
2281   eval "$4=no"
2282 fi
2283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2284 fi
2285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286 fi
2287 eval ac_res=\$$4
2288                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2289 $as_echo "$ac_res" >&6; }
2290   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2291
2292 } # ac_fn_c_check_member
2293
2294 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2295 # --------------------------------------------
2296 # Tries to find the compile-time value of EXPR in a program that includes
2297 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2298 # computed
2299 ac_fn_c_compute_int ()
2300 {
2301   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302   if test "$cross_compiling" = yes; then
2303     # Depending upon the size, compute the lo and hi bounds.
2304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2305 /* end confdefs.h.  */
2306 $4
2307 int
2308 main ()
2309 {
2310 static int test_array [1 - 2 * !(($2) >= 0)];
2311 test_array [0] = 0
2312
2313   ;
2314   return 0;
2315 }
2316 _ACEOF
2317 if ac_fn_c_try_compile "$LINENO"; then :
2318   ac_lo=0 ac_mid=0
2319   while :; do
2320     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321 /* end confdefs.h.  */
2322 $4
2323 int
2324 main ()
2325 {
2326 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2327 test_array [0] = 0
2328
2329   ;
2330   return 0;
2331 }
2332 _ACEOF
2333 if ac_fn_c_try_compile "$LINENO"; then :
2334   ac_hi=$ac_mid; break
2335 else
2336   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2337                         if test $ac_lo -le $ac_mid; then
2338                           ac_lo= ac_hi=
2339                           break
2340                         fi
2341                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2342 fi
2343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344   done
2345 else
2346   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2347 /* end confdefs.h.  */
2348 $4
2349 int
2350 main ()
2351 {
2352 static int test_array [1 - 2 * !(($2) < 0)];
2353 test_array [0] = 0
2354
2355   ;
2356   return 0;
2357 }
2358 _ACEOF
2359 if ac_fn_c_try_compile "$LINENO"; then :
2360   ac_hi=-1 ac_mid=-1
2361   while :; do
2362     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2363 /* end confdefs.h.  */
2364 $4
2365 int
2366 main ()
2367 {
2368 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2369 test_array [0] = 0
2370
2371   ;
2372   return 0;
2373 }
2374 _ACEOF
2375 if ac_fn_c_try_compile "$LINENO"; then :
2376   ac_lo=$ac_mid; break
2377 else
2378   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2379                         if test $ac_mid -le $ac_hi; then
2380                           ac_lo= ac_hi=
2381                           break
2382                         fi
2383                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2384 fi
2385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2386   done
2387 else
2388   ac_lo= ac_hi=
2389 fi
2390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2391 fi
2392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2393 # Binary search between lo and hi bounds.
2394 while test "x$ac_lo" != "x$ac_hi"; do
2395   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2397 /* end confdefs.h.  */
2398 $4
2399 int
2400 main ()
2401 {
2402 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2403 test_array [0] = 0
2404
2405   ;
2406   return 0;
2407 }
2408 _ACEOF
2409 if ac_fn_c_try_compile "$LINENO"; then :
2410   ac_hi=$ac_mid
2411 else
2412   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2413 fi
2414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2415 done
2416 case $ac_lo in #((
2417 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2418 '') ac_retval=1 ;;
2419 esac
2420   else
2421     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2422 /* end confdefs.h.  */
2423 $4
2424 static long int longval () { return $2; }
2425 static unsigned long int ulongval () { return $2; }
2426 #include <stdio.h>
2427 #include <stdlib.h>
2428 int
2429 main ()
2430 {
2431
2432   FILE *f = fopen ("conftest.val", "w");
2433   if (! f)
2434     return 1;
2435   if (($2) < 0)
2436     {
2437       long int i = longval ();
2438       if (i != ($2))
2439         return 1;
2440       fprintf (f, "%ld", i);
2441     }
2442   else
2443     {
2444       unsigned long int i = ulongval ();
2445       if (i != ($2))
2446         return 1;
2447       fprintf (f, "%lu", i);
2448     }
2449   /* Do not output a trailing newline, as this causes \r\n confusion
2450      on some platforms.  */
2451   return ferror (f) || fclose (f) != 0;
2452
2453   ;
2454   return 0;
2455 }
2456 _ACEOF
2457 if ac_fn_c_try_run "$LINENO"; then :
2458   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2459 else
2460   ac_retval=1
2461 fi
2462 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2463   conftest.$ac_objext conftest.beam conftest.$ac_ext
2464 rm -f conftest.val
2465
2466   fi
2467   eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2468   as_fn_set_status $ac_retval
2469
2470 } # ac_fn_c_compute_int
2471 cat >config.log <<_ACEOF
2472 This file contains any messages produced by compilers while
2473 running configure, to aid debugging if configure makes a mistake.
2474
2475 It was created by $as_me, which was
2476 generated by GNU Autoconf 2.65.  Invocation command line was
2477
2478   $ $0 $@
2479
2480 _ACEOF
2481 exec 5>>config.log
2482 {
2483 cat <<_ASUNAME
2484 ## --------- ##
2485 ## Platform. ##
2486 ## --------- ##
2487
2488 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2489 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2490 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2491 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2492 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2493
2494 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2495 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2496
2497 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2498 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2499 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2500 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2501 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2502 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2503 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2504
2505 _ASUNAME
2506
2507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2508 for as_dir in $PATH
2509 do
2510   IFS=$as_save_IFS
2511   test -z "$as_dir" && as_dir=.
2512     $as_echo "PATH: $as_dir"
2513   done
2514 IFS=$as_save_IFS
2515
2516 } >&5
2517
2518 cat >&5 <<_ACEOF
2519
2520
2521 ## ----------- ##
2522 ## Core tests. ##
2523 ## ----------- ##
2524
2525 _ACEOF
2526
2527
2528 # Keep a trace of the command line.
2529 # Strip out --no-create and --no-recursion so they do not pile up.
2530 # Strip out --silent because we don't want to record it for future runs.
2531 # Also quote any args containing shell meta-characters.
2532 # Make two passes to allow for proper duplicate-argument suppression.
2533 ac_configure_args=
2534 ac_configure_args0=
2535 ac_configure_args1=
2536 ac_must_keep_next=false
2537 for ac_pass in 1 2
2538 do
2539   for ac_arg
2540   do
2541     case $ac_arg in
2542     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2543     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2544     | -silent | --silent | --silen | --sile | --sil)
2545       continue ;;
2546     *\'*)
2547       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2548     esac
2549     case $ac_pass in
2550     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2551     2)
2552       as_fn_append ac_configure_args1 " '$ac_arg'"
2553       if test $ac_must_keep_next = true; then
2554         ac_must_keep_next=false # Got value, back to normal.
2555       else
2556         case $ac_arg in
2557           *=* | --config-cache | -C | -disable-* | --disable-* \
2558           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2559           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2560           | -with-* | --with-* | -without-* | --without-* | --x)
2561             case "$ac_configure_args0 " in
2562               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2563             esac
2564             ;;
2565           -* ) ac_must_keep_next=true ;;
2566         esac
2567       fi
2568       as_fn_append ac_configure_args " '$ac_arg'"
2569       ;;
2570     esac
2571   done
2572 done
2573 { ac_configure_args0=; unset ac_configure_args0;}
2574 { ac_configure_args1=; unset ac_configure_args1;}
2575
2576 # When interrupted or exit'd, cleanup temporary files, and complete
2577 # config.log.  We remove comments because anyway the quotes in there
2578 # would cause problems or look ugly.
2579 # WARNING: Use '\'' to represent an apostrophe within the trap.
2580 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2581 trap 'exit_status=$?
2582   # Save into config.log some information that might help in debugging.
2583   {
2584     echo
2585
2586     cat <<\_ASBOX
2587 ## ---------------- ##
2588 ## Cache variables. ##
2589 ## ---------------- ##
2590 _ASBOX
2591     echo
2592     # The following way of writing the cache mishandles newlines in values,
2593 (
2594   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2595     eval ac_val=\$$ac_var
2596     case $ac_val in #(
2597     *${as_nl}*)
2598       case $ac_var in #(
2599       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2600 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2601       esac
2602       case $ac_var in #(
2603       _ | IFS | as_nl) ;; #(
2604       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2605       *) { eval $ac_var=; unset $ac_var;} ;;
2606       esac ;;
2607     esac
2608   done
2609   (set) 2>&1 |
2610     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2611     *${as_nl}ac_space=\ *)
2612       sed -n \
2613         "s/'\''/'\''\\\\'\'''\''/g;
2614           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2615       ;; #(
2616     *)
2617       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2618       ;;
2619     esac |
2620     sort
2621 )
2622     echo
2623
2624     cat <<\_ASBOX
2625 ## ----------------- ##
2626 ## Output variables. ##
2627 ## ----------------- ##
2628 _ASBOX
2629     echo
2630     for ac_var in $ac_subst_vars
2631     do
2632       eval ac_val=\$$ac_var
2633       case $ac_val in
2634       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2635       esac
2636       $as_echo "$ac_var='\''$ac_val'\''"
2637     done | sort
2638     echo
2639
2640     if test -n "$ac_subst_files"; then
2641       cat <<\_ASBOX
2642 ## ------------------- ##
2643 ## File substitutions. ##
2644 ## ------------------- ##
2645 _ASBOX
2646       echo
2647       for ac_var in $ac_subst_files
2648       do
2649         eval ac_val=\$$ac_var
2650         case $ac_val in
2651         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2652         esac
2653         $as_echo "$ac_var='\''$ac_val'\''"
2654       done | sort
2655       echo
2656     fi
2657
2658     if test -s confdefs.h; then
2659       cat <<\_ASBOX
2660 ## ----------- ##
2661 ## confdefs.h. ##
2662 ## ----------- ##
2663 _ASBOX
2664       echo
2665       cat confdefs.h
2666       echo
2667     fi
2668     test "$ac_signal" != 0 &&
2669       $as_echo "$as_me: caught signal $ac_signal"
2670     $as_echo "$as_me: exit $exit_status"
2671   } >&5
2672   rm -f core *.core core.conftest.* &&
2673     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2674     exit $exit_status
2675 ' 0
2676 for ac_signal in 1 2 13 15; do
2677   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2678 done
2679 ac_signal=0
2680
2681 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2682 rm -f -r conftest* confdefs.h
2683
2684 $as_echo "/* confdefs.h */" > confdefs.h
2685
2686 # Predefined preprocessor variables.
2687
2688 cat >>confdefs.h <<_ACEOF
2689 #define PACKAGE_NAME "$PACKAGE_NAME"
2690 _ACEOF
2691
2692 cat >>confdefs.h <<_ACEOF
2693 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2694 _ACEOF
2695
2696 cat >>confdefs.h <<_ACEOF
2697 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2698 _ACEOF
2699
2700 cat >>confdefs.h <<_ACEOF
2701 #define PACKAGE_STRING "$PACKAGE_STRING"
2702 _ACEOF
2703
2704 cat >>confdefs.h <<_ACEOF
2705 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2706 _ACEOF
2707
2708 cat >>confdefs.h <<_ACEOF
2709 #define PACKAGE_URL "$PACKAGE_URL"
2710 _ACEOF
2711
2712
2713 # Let the site file select an alternate cache file if it wants to.
2714 # Prefer an explicitly selected file to automatically selected ones.
2715 ac_site_file1=NONE
2716 ac_site_file2=NONE
2717 if test -n "$CONFIG_SITE"; then
2718   ac_site_file1=$CONFIG_SITE
2719 elif test "x$prefix" != xNONE; then
2720   ac_site_file1=$prefix/share/config.site
2721   ac_site_file2=$prefix/etc/config.site
2722 else
2723   ac_site_file1=$ac_default_prefix/share/config.site
2724   ac_site_file2=$ac_default_prefix/etc/config.site
2725 fi
2726 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2727 do
2728   test "x$ac_site_file" = xNONE && continue
2729   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2730     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2731 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2732     sed 's/^/| /' "$ac_site_file" >&5
2733     . "$ac_site_file"
2734   fi
2735 done
2736
2737
2738 # Check that the precious variables saved in the cache have kept the same
2739 # value.
2740 ac_cache_corrupted=false
2741 for ac_var in $ac_precious_vars; do
2742   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2743   eval ac_new_set=\$ac_env_${ac_var}_set
2744   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2745   eval ac_new_val=\$ac_env_${ac_var}_value
2746   case $ac_old_set,$ac_new_set in
2747     set,)
2748       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2749 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2750       ac_cache_corrupted=: ;;
2751     ,set)
2752       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2753 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2754       ac_cache_corrupted=: ;;
2755     ,);;
2756     *)
2757       if test "x$ac_old_val" != "x$ac_new_val"; then
2758         # differences in whitespace do not lead to failure.
2759         ac_old_val_w=`echo x $ac_old_val`
2760         ac_new_val_w=`echo x $ac_new_val`
2761         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2762           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2763 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2764           ac_cache_corrupted=:
2765         else
2766           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2767 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2768           eval $ac_var=\$ac_old_val
2769         fi
2770         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2771 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2772         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2773 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2774       fi;;
2775   esac
2776   # Pass precious variables to config.status.
2777   if test "$ac_new_set" = set; then
2778     case $ac_new_val in
2779     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2780     *) ac_arg=$ac_var=$ac_new_val ;;
2781     esac
2782     case " $ac_configure_args " in
2783       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2784       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2785     esac
2786   fi
2787 done
2788 if $ac_cache_corrupted; then
2789   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2790 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2791   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2792 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2793   as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2794 fi
2795 ## -------------------- ##
2796 ## Main body of script. ##
2797 ## -------------------- ##
2798
2799 ac_ext=c
2800 ac_cpp='$CPP $CPPFLAGS'
2801 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2802 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2803 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2804
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 ac_aux_dir=
2833 for ac_dir in build "$srcdir"/build; do
2834   for ac_t in install-sh install.sh shtool; do
2835     if test -f "$ac_dir/$ac_t"; then
2836       ac_aux_dir=$ac_dir
2837       ac_install_sh="$ac_aux_dir/$ac_t -c"
2838       break 2
2839     fi
2840   done
2841 done
2842 if test -z "$ac_aux_dir"; then
2843   as_fn_error "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5
2844 fi
2845
2846 # These three variables are undocumented and unsupported,
2847 # and are intended to be withdrawn in a future Autoconf release.
2848 # They can cause serious problems if a builder's source tree is in a directory
2849 # whose full name contains unusual characters.
2850 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2851 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2852 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2853
2854
2855 eval `$ac_aux_dir/version.sh`
2856 if test -z "$OL_STRING"; then
2857         as_fn_error "could not determine version" "$LINENO" 5
2858 fi
2859
2860 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
2861         ac_cv_shtool="$ac_aux_dir/shtool"
2862 else
2863         as_fn_error "no shtool found in $ac_aux_dir" "$LINENO" 5
2864 fi
2865
2866 SHTOOL="$ac_cv_shtool"
2867
2868 TB="" TN=""
2869 if test -t 1; then
2870         TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
2871         TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
2872 fi
2873
2874 OPENLDAP_REPO=""
2875 if test -d $ac_aux_dir/../.git; then
2876         OPENLDAP_REPO="(from Git clone) "
2877 elif test -d $ac_aux_dir/CVS; then
2878         OPENLDAP_REPO="(from CVS checkout) "
2879 fi
2880
2881 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_REPO}..."
2882
2883 # Make sure we can run config.sub.
2884 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2885   as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2886
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2888 $as_echo_n "checking build system type... " >&6; }
2889 if test "${ac_cv_build+set}" = set; then :
2890   $as_echo_n "(cached) " >&6
2891 else
2892   ac_build_alias=$build_alias
2893 test "x$ac_build_alias" = x &&
2894   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2895 test "x$ac_build_alias" = x &&
2896   as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
2897 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2898   as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2899
2900 fi
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2902 $as_echo "$ac_cv_build" >&6; }
2903 case $ac_cv_build in
2904 *-*-*) ;;
2905 *) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
2906 esac
2907 build=$ac_cv_build
2908 ac_save_IFS=$IFS; IFS='-'
2909 set x $ac_cv_build
2910 shift
2911 build_cpu=$1
2912 build_vendor=$2
2913 shift; shift
2914 # Remember, the first character of IFS is used to create $*,
2915 # except with old shells:
2916 build_os=$*
2917 IFS=$ac_save_IFS
2918 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2919
2920
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2922 $as_echo_n "checking host system type... " >&6; }
2923 if test "${ac_cv_host+set}" = set; then :
2924   $as_echo_n "(cached) " >&6
2925 else
2926   if test "x$host_alias" = x; then
2927   ac_cv_host=$ac_cv_build
2928 else
2929   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2930     as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2931 fi
2932
2933 fi
2934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2935 $as_echo "$ac_cv_host" >&6; }
2936 case $ac_cv_host in
2937 *-*-*) ;;
2938 *) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
2939 esac
2940 host=$ac_cv_host
2941 ac_save_IFS=$IFS; IFS='-'
2942 set x $ac_cv_host
2943 shift
2944 host_cpu=$1
2945 host_vendor=$2
2946 shift; shift
2947 # Remember, the first character of IFS is used to create $*,
2948 # except with old shells:
2949 host_os=$*
2950 IFS=$ac_save_IFS
2951 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2952
2953
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2955 $as_echo_n "checking target system type... " >&6; }
2956 if test "${ac_cv_target+set}" = set; then :
2957   $as_echo_n "(cached) " >&6
2958 else
2959   if test "x$target_alias" = x; then
2960   ac_cv_target=$ac_cv_host
2961 else
2962   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2963     as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2964 fi
2965
2966 fi
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2968 $as_echo "$ac_cv_target" >&6; }
2969 case $ac_cv_target in
2970 *-*-*) ;;
2971 *) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
2972 esac
2973 target=$ac_cv_target
2974 ac_save_IFS=$IFS; IFS='-'
2975 set x $ac_cv_target
2976 shift
2977 target_cpu=$1
2978 target_vendor=$2
2979 shift; shift
2980 # Remember, the first character of IFS is used to create $*,
2981 # except with old shells:
2982 target_os=$*
2983 IFS=$ac_save_IFS
2984 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2985
2986
2987 # The aliases save the names the user supplied, while $host etc.
2988 # will get canonicalized.
2989 test -n "$target_alias" &&
2990   test "$program_prefix$program_suffix$program_transform_name" = \
2991     NONENONEs,x,x, &&
2992   program_prefix=${target_alias}-
2993
2994 am__api_version="1.9"
2995 # Find a good install program.  We prefer a C program (faster),
2996 # so one script is as good as another.  But avoid the broken or
2997 # incompatible versions:
2998 # SysV /etc/install, /usr/sbin/install
2999 # SunOS /usr/etc/install
3000 # IRIX /sbin/install
3001 # AIX /bin/install
3002 # AmigaOS /C/install, which installs bootblocks on floppy discs
3003 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3004 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3005 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3006 # OS/2's system install, which has a completely different semantic
3007 # ./install, which can be erroneously created by make from ./install.sh.
3008 # Reject install programs that cannot install multiple files.
3009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3010 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3011 if test -z "$INSTALL"; then
3012 if test "${ac_cv_path_install+set}" = set; then :
3013   $as_echo_n "(cached) " >&6
3014 else
3015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3016 for as_dir in $PATH
3017 do
3018   IFS=$as_save_IFS
3019   test -z "$as_dir" && as_dir=.
3020     # Account for people who put trailing slashes in PATH elements.
3021 case $as_dir/ in #((
3022   ./ | .// | /[cC]/* | \
3023   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3024   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3025   /usr/ucb/* ) ;;
3026   *)
3027     # OSF1 and SCO ODT 3.0 have their own names for install.
3028     # Don't use installbsd from OSF since it installs stuff as root
3029     # by default.
3030     for ac_prog in ginstall scoinst install; do
3031       for ac_exec_ext in '' $ac_executable_extensions; do
3032         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3033           if test $ac_prog = install &&
3034             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3035             # AIX install.  It has an incompatible calling convention.
3036             :
3037           elif test $ac_prog = install &&
3038             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3039             # program-specific install script used by HP pwplus--don't use.
3040             :
3041           else
3042             rm -rf conftest.one conftest.two conftest.dir
3043             echo one > conftest.one
3044             echo two > conftest.two
3045             mkdir conftest.dir
3046             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3047               test -s conftest.one && test -s conftest.two &&
3048               test -s conftest.dir/conftest.one &&
3049               test -s conftest.dir/conftest.two
3050             then
3051               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3052               break 3
3053             fi
3054           fi
3055         fi
3056       done
3057     done
3058     ;;
3059 esac
3060
3061   done
3062 IFS=$as_save_IFS
3063
3064 rm -rf conftest.one conftest.two conftest.dir
3065
3066 fi
3067   if test "${ac_cv_path_install+set}" = set; then
3068     INSTALL=$ac_cv_path_install
3069   else
3070     # As a last resort, use the slow shell script.  Don't cache a
3071     # value for INSTALL within a source directory, because that will
3072     # break other packages using the cache if that directory is
3073     # removed, or if the value is a relative name.
3074     INSTALL=$ac_install_sh
3075   fi
3076 fi
3077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3078 $as_echo "$INSTALL" >&6; }
3079
3080 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3081 # It thinks the first close brace ends the variable substitution.
3082 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3083
3084 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3085
3086 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3087
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3089 $as_echo_n "checking whether build environment is sane... " >&6; }
3090 # Just in case
3091 sleep 1
3092 echo timestamp > conftest.file
3093 # Do `set' in a subshell so we don't clobber the current shell's
3094 # arguments.  Must try -L first in case configure is actually a
3095 # symlink; some systems play weird games with the mod time of symlinks
3096 # (eg FreeBSD returns the mod time of the symlink's containing
3097 # directory).
3098 if (
3099    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
3100    if test "$*" = "X"; then
3101       # -L didn't work.
3102       set X `ls -t $srcdir/configure conftest.file`
3103    fi
3104    rm -f conftest.file
3105    if test "$*" != "X $srcdir/configure conftest.file" \
3106       && test "$*" != "X conftest.file $srcdir/configure"; then
3107
3108       # If neither matched, then we have a broken ls.  This can happen
3109       # if, for instance, CONFIG_SHELL is bash and it inherits a
3110       # broken ls alias from the environment.  This has actually
3111       # happened.  Such a system could not be considered "sane".
3112       as_fn_error "ls -t appears to fail.  Make sure there is not a broken
3113 alias in your environment" "$LINENO" 5
3114    fi
3115
3116    test "$2" = conftest.file
3117    )
3118 then
3119    # Ok.
3120    :
3121 else
3122    as_fn_error "newly created file is older than distributed files!
3123 Check your system clock" "$LINENO" 5
3124 fi
3125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3126 $as_echo "yes" >&6; }
3127 test "$program_prefix" != NONE &&
3128   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3129 # Use a double $ so make ignores it.
3130 test "$program_suffix" != NONE &&
3131   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3132 # Double any \ or $.
3133 # By default was `s,x,x', remove it if useless.
3134 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3135 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3136
3137 # expand $ac_aux_dir to an absolute path
3138 am_aux_dir=`cd $ac_aux_dir && pwd`
3139
3140 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3141 # Use eval to expand $SHELL
3142 if eval "$MISSING --run true"; then
3143   am_missing_run="$MISSING --run "
3144 else
3145   am_missing_run=
3146   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3147 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3148 fi
3149
3150 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
3151   # We used to keeping the `.' as first argument, in order to
3152   # allow $(mkdir_p) to be used without argument.  As in
3153   #   $(mkdir_p) $(somedir)
3154   # where $(somedir) is conditionally defined.  However this is wrong
3155   # for two reasons:
3156   #  1. if the package is installed by a user who cannot write `.'
3157   #     make install will fail,
3158   #  2. the above comment should most certainly read
3159   #     $(mkdir_p) $(DESTDIR)$(somedir)
3160   #     so it does not work when $(somedir) is undefined and
3161   #     $(DESTDIR) is not.
3162   #  To support the latter case, we have to write
3163   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
3164   #  so the `.' trick is pointless.
3165   mkdir_p='mkdir -p --'
3166 else
3167   # On NextStep and OpenStep, the `mkdir' command does not
3168   # recognize any option.  It will interpret all options as
3169   # directories to create, and then abort because `.' already
3170   # exists.
3171   for d in ./-p ./--version;
3172   do
3173     test -d $d && rmdir $d
3174   done
3175   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
3176   if test -f "$ac_aux_dir/mkinstalldirs"; then
3177     mkdir_p='$(mkinstalldirs)'
3178   else
3179     mkdir_p='$(install_sh) -d'
3180   fi
3181 fi
3182
3183 for ac_prog in gawk mawk nawk awk
3184 do
3185   # Extract the first word of "$ac_prog", so it can be a program name with args.
3186 set dummy $ac_prog; ac_word=$2
3187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3188 $as_echo_n "checking for $ac_word... " >&6; }
3189 if test "${ac_cv_prog_AWK+set}" = set; then :
3190   $as_echo_n "(cached) " >&6
3191 else
3192   if test -n "$AWK"; then
3193   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3194 else
3195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3196 for as_dir in $PATH
3197 do
3198   IFS=$as_save_IFS
3199   test -z "$as_dir" && as_dir=.
3200     for ac_exec_ext in '' $ac_executable_extensions; do
3201   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3202     ac_cv_prog_AWK="$ac_prog"
3203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3204     break 2
3205   fi
3206 done
3207   done
3208 IFS=$as_save_IFS
3209
3210 fi
3211 fi
3212 AWK=$ac_cv_prog_AWK
3213 if test -n "$AWK"; then
3214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3215 $as_echo "$AWK" >&6; }
3216 else
3217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3218 $as_echo "no" >&6; }
3219 fi
3220
3221
3222   test -n "$AWK" && break
3223 done
3224
3225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3226 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3227 set x ${MAKE-make}
3228 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3229 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3230   $as_echo_n "(cached) " >&6
3231 else
3232   cat >conftest.make <<\_ACEOF
3233 SHELL = /bin/sh
3234 all:
3235         @echo '@@@%%%=$(MAKE)=@@@%%%'
3236 _ACEOF
3237 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3238 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3239   *@@@%%%=?*=@@@%%%*)
3240     eval ac_cv_prog_make_${ac_make}_set=yes;;
3241   *)
3242     eval ac_cv_prog_make_${ac_make}_set=no;;
3243 esac
3244 rm -f conftest.make
3245 fi
3246 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3248 $as_echo "yes" >&6; }
3249   SET_MAKE=
3250 else
3251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3252 $as_echo "no" >&6; }
3253   SET_MAKE="MAKE=${MAKE-make}"
3254 fi
3255
3256 rm -rf .tst 2>/dev/null
3257 mkdir .tst 2>/dev/null
3258 if test -d .tst; then
3259   am__leading_dot=.
3260 else
3261   am__leading_dot=_
3262 fi
3263 rmdir .tst 2>/dev/null
3264
3265 # test to see if srcdir already configured
3266 if test "`cd $srcdir && pwd`" != "`pwd`" &&
3267    test -f $srcdir/config.status; then
3268   as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3269 fi
3270
3271 # test whether we have cygpath
3272 if test -z "$CYGPATH_W"; then
3273   if (cygpath --version) >/dev/null 2>/dev/null; then
3274     CYGPATH_W='cygpath -w'
3275   else
3276     CYGPATH_W=echo
3277   fi
3278 fi
3279
3280
3281 # Define the identity of the package.
3282  PACKAGE=$OL_PACKAGE
3283  VERSION=$OL_VERSION
3284
3285
3286 # Some tools Automake needs.
3287
3288 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3289
3290
3291 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3292
3293
3294 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3295
3296
3297 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3298
3299
3300 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3301
3302 install_sh=${install_sh-"$am_aux_dir/install-sh"}
3303
3304 # Installed binaries are usually stripped using `strip' when the user
3305 # run `make install-strip'.  However `strip' might not be the right
3306 # tool to use in cross-compilation environments, therefore Automake
3307 # will honor the `STRIP' environment variable to overrule this program.
3308 if test "$cross_compiling" != no; then
3309   if test -n "$ac_tool_prefix"; then
3310   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3311 set dummy ${ac_tool_prefix}strip; ac_word=$2
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3313 $as_echo_n "checking for $ac_word... " >&6; }
3314 if test "${ac_cv_prog_STRIP+set}" = set; then :
3315   $as_echo_n "(cached) " >&6
3316 else
3317   if test -n "$STRIP"; then
3318   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3319 else
3320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3321 for as_dir in $PATH
3322 do
3323   IFS=$as_save_IFS
3324   test -z "$as_dir" && as_dir=.
3325     for ac_exec_ext in '' $ac_executable_extensions; do
3326   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3327     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3329     break 2
3330   fi
3331 done
3332   done
3333 IFS=$as_save_IFS
3334
3335 fi
3336 fi
3337 STRIP=$ac_cv_prog_STRIP
3338 if test -n "$STRIP"; then
3339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3340 $as_echo "$STRIP" >&6; }
3341 else
3342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3343 $as_echo "no" >&6; }
3344 fi
3345
3346
3347 fi
3348 if test -z "$ac_cv_prog_STRIP"; then
3349   ac_ct_STRIP=$STRIP
3350   # Extract the first word of "strip", so it can be a program name with args.
3351 set dummy strip; ac_word=$2
3352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3353 $as_echo_n "checking for $ac_word... " >&6; }
3354 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3355   $as_echo_n "(cached) " >&6
3356 else
3357   if test -n "$ac_ct_STRIP"; then
3358   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3359 else
3360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3361 for as_dir in $PATH
3362 do
3363   IFS=$as_save_IFS
3364   test -z "$as_dir" && as_dir=.
3365     for ac_exec_ext in '' $ac_executable_extensions; do
3366   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3367     ac_cv_prog_ac_ct_STRIP="strip"
3368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3369     break 2
3370   fi
3371 done
3372   done
3373 IFS=$as_save_IFS
3374
3375 fi
3376 fi
3377 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3378 if test -n "$ac_ct_STRIP"; then
3379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3380 $as_echo "$ac_ct_STRIP" >&6; }
3381 else
3382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3383 $as_echo "no" >&6; }
3384 fi
3385
3386   if test "x$ac_ct_STRIP" = x; then
3387     STRIP=":"
3388   else
3389     case $cross_compiling:$ac_tool_warned in
3390 yes:)
3391 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3392 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3393 ac_tool_warned=yes ;;
3394 esac
3395     STRIP=$ac_ct_STRIP
3396   fi
3397 else
3398   STRIP="$ac_cv_prog_STRIP"
3399 fi
3400
3401 fi
3402 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
3403
3404 # We need awk for the "check" target.  The system "awk" is bad on
3405 # some platforms.
3406 # Always define AMTAR for backward compatibility.
3407
3408 AMTAR=${AMTAR-"${am_missing_run}tar"}
3409
3410 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3411
3412
3413
3414
3415
3416 cat >>confdefs.h <<_ACEOF
3417 #define OPENLDAP_PACKAGE "$PACKAGE"
3418 _ACEOF
3419
3420
3421 cat >>confdefs.h <<_ACEOF
3422 #define OPENLDAP_VERSION "$VERSION"
3423 _ACEOF
3424
3425
3426
3427 cat >>confdefs.h <<_ACEOF
3428 #define LDAP_VENDOR_VERSION $OL_API_INC
3429 _ACEOF
3430
3431
3432 cat >>confdefs.h <<_ACEOF
3433 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
3434 _ACEOF
3435
3436
3437 cat >>confdefs.h <<_ACEOF
3438 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
3439 _ACEOF
3440
3441
3442 cat >>confdefs.h <<_ACEOF
3443 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
3444 _ACEOF
3445
3446
3447 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
3448
3449 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
3450
3451 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
3452
3453
3454
3455
3456
3457 ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
3458
3459 ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
3460
3461 ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
3462
3463
3464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking configure arguments" >&5
3465 $as_echo_n "checking configure arguments... " >&6; }
3466
3467
3468 top_builddir=`pwd`
3469
3470 ldap_subdir="/openldap"
3471
3472
3473 # Check whether --with-subdir was given.
3474 if test "${with_subdir+set}" = set; then :
3475   withval=$with_subdir; case "$withval" in
3476         no) ldap_subdir=""
3477                 ;;
3478         yes)
3479                 ;;
3480         /*|\\*)
3481                 ldap_subdir="$withval"
3482                 ;;
3483         *)
3484                 ldap_subdir="/$withval"
3485                 ;;
3486 esac
3487
3488 fi
3489
3490
3491 # OpenLDAP --enable-debug
3492
3493         # Check whether --enable-debug was given.
3494 if test "${enable_debug+set}" = set; then :
3495   enableval=$enable_debug;
3496         ol_arg=invalid
3497         for ol_val in no yes traditional ; do
3498                 if test "$enableval" = "$ol_val" ; then
3499                         ol_arg="$ol_val"
3500                 fi
3501         done
3502         if test "$ol_arg" = "invalid" ; then
3503                 as_fn_error "bad value $enableval for --enable-debug" "$LINENO" 5
3504         fi
3505         ol_enable_debug="$ol_arg"
3506
3507 else
3508         ol_enable_debug=yes
3509 fi
3510
3511 # end --enable-debug
3512 # OpenLDAP --enable-dynamic
3513
3514         # Check whether --enable-dynamic was given.
3515 if test "${enable_dynamic+set}" = set; then :
3516   enableval=$enable_dynamic;
3517         ol_arg=invalid
3518         for ol_val in auto yes no ; do
3519                 if test "$enableval" = "$ol_val" ; then
3520                         ol_arg="$ol_val"
3521                 fi
3522         done
3523         if test "$ol_arg" = "invalid" ; then
3524                 as_fn_error "bad value $enableval for --enable-dynamic" "$LINENO" 5
3525         fi
3526         ol_enable_dynamic="$ol_arg"
3527
3528 else
3529         ol_enable_dynamic=no
3530 fi
3531
3532 # end --enable-dynamic
3533 # OpenLDAP --enable-syslog
3534
3535         # Check whether --enable-syslog was given.
3536 if test "${enable_syslog+set}" = set; then :
3537   enableval=$enable_syslog;
3538         ol_arg=invalid
3539         for ol_val in auto yes no ; do
3540                 if test "$enableval" = "$ol_val" ; then
3541                         ol_arg="$ol_val"
3542                 fi
3543         done
3544         if test "$ol_arg" = "invalid" ; then
3545                 as_fn_error "bad value $enableval for --enable-syslog" "$LINENO" 5
3546         fi
3547         ol_enable_syslog="$ol_arg"
3548
3549 else
3550         ol_enable_syslog=auto
3551 fi
3552
3553 # end --enable-syslog
3554 # OpenLDAP --enable-proctitle
3555
3556         # Check whether --enable-proctitle was given.
3557 if test "${enable_proctitle+set}" = set; then :
3558   enableval=$enable_proctitle;
3559         ol_arg=invalid
3560         for ol_val in auto yes no ; do
3561                 if test "$enableval" = "$ol_val" ; then
3562                         ol_arg="$ol_val"
3563                 fi
3564         done
3565         if test "$ol_arg" = "invalid" ; then
3566                 as_fn_error "bad value $enableval for --enable-proctitle" "$LINENO" 5
3567         fi
3568         ol_enable_proctitle="$ol_arg"
3569
3570 else
3571         ol_enable_proctitle=yes
3572 fi
3573
3574 # end --enable-proctitle
3575 ol_enable_referrals=${ol_enable_referrals-no}
3576 # OpenLDAP --enable-ipv6
3577
3578         # Check whether --enable-ipv6 was given.
3579 if test "${enable_ipv6+set}" = set; then :
3580   enableval=$enable_ipv6;
3581         ol_arg=invalid
3582         for ol_val in auto yes no ; do
3583                 if test "$enableval" = "$ol_val" ; then
3584                         ol_arg="$ol_val"
3585                 fi
3586         done
3587         if test "$ol_arg" = "invalid" ; then
3588                 as_fn_error "bad value $enableval for --enable-ipv6" "$LINENO" 5
3589         fi
3590         ol_enable_ipv6="$ol_arg"
3591
3592 else
3593         ol_enable_ipv6=auto
3594 fi
3595
3596 # end --enable-ipv6
3597 # OpenLDAP --enable-local
3598
3599         # Check whether --enable-local was given.
3600 if test "${enable_local+set}" = set; then :
3601   enableval=$enable_local;
3602         ol_arg=invalid
3603         for ol_val in auto yes no ; do
3604                 if test "$enableval" = "$ol_val" ; then
3605                         ol_arg="$ol_val"
3606                 fi
3607         done
3608         if test "$ol_arg" = "invalid" ; then
3609                 as_fn_error "bad value $enableval for --enable-local" "$LINENO" 5
3610         fi
3611         ol_enable_local="$ol_arg"
3612
3613 else
3614         ol_enable_local=auto
3615 fi
3616
3617 # end --enable-local
3618
3619 # OpenLDAP --with-cyrus_sasl
3620
3621 # Check whether --with-cyrus_sasl was given.
3622 if test "${with_cyrus_sasl+set}" = set; then :
3623   withval=$with_cyrus_sasl;
3624         ol_arg=invalid
3625         for ol_val in auto yes no  ; do
3626                 if test "$withval" = "$ol_val" ; then
3627                         ol_arg="$ol_val"
3628                 fi
3629         done
3630         if test "$ol_arg" = "invalid" ; then
3631                 as_fn_error "bad value $withval for --with-cyrus_sasl" "$LINENO" 5
3632         fi
3633         ol_with_cyrus_sasl="$ol_arg"
3634
3635 else
3636         ol_with_cyrus_sasl="auto"
3637 fi
3638 # end --with-cyrus_sasl
3639
3640 # OpenLDAP --with-fetch
3641
3642 # Check whether --with-fetch was given.
3643 if test "${with_fetch+set}" = set; then :
3644   withval=$with_fetch;
3645         ol_arg=invalid
3646         for ol_val in auto yes no  ; do
3647                 if test "$withval" = "$ol_val" ; then
3648                         ol_arg="$ol_val"
3649                 fi
3650         done
3651         if test "$ol_arg" = "invalid" ; then
3652                 as_fn_error "bad value $withval for --with-fetch" "$LINENO" 5
3653         fi
3654         ol_with_fetch="$ol_arg"
3655
3656 else
3657         ol_with_fetch="auto"
3658 fi
3659 # end --with-fetch
3660
3661 # OpenLDAP --with-threads
3662
3663 # Check whether --with-threads was given.
3664 if test "${with_threads+set}" = set; then :
3665   withval=$with_threads;
3666         ol_arg=invalid
3667         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
3668                 if test "$withval" = "$ol_val" ; then
3669                         ol_arg="$ol_val"
3670                 fi
3671         done
3672         if test "$ol_arg" = "invalid" ; then
3673                 as_fn_error "bad value $withval for --with-threads" "$LINENO" 5
3674         fi
3675         ol_with_threads="$ol_arg"
3676
3677 else
3678         ol_with_threads="auto"
3679 fi
3680 # end --with-threads
3681
3682 # OpenLDAP --with-tls
3683
3684 # Check whether --with-tls was given.
3685 if test "${with_tls+set}" = set; then :
3686   withval=$with_tls;
3687         ol_arg=invalid
3688         for ol_val in auto openssl gnutls moznss yes no  ; do
3689                 if test "$withval" = "$ol_val" ; then
3690                         ol_arg="$ol_val"
3691                 fi
3692         done
3693         if test "$ol_arg" = "invalid" ; then
3694                 as_fn_error "bad value $withval for --with-tls" "$LINENO" 5
3695         fi
3696         ol_with_tls="$ol_arg"
3697
3698 else
3699         ol_with_tls="auto"
3700 fi
3701 # end --with-tls
3702
3703 # OpenLDAP --with-yielding_select
3704
3705 # Check whether --with-yielding_select was given.
3706 if test "${with_yielding_select+set}" = set; then :
3707   withval=$with_yielding_select;
3708         ol_arg=invalid
3709         for ol_val in auto yes no manual  ; do
3710                 if test "$withval" = "$ol_val" ; then
3711                         ol_arg="$ol_val"
3712                 fi
3713         done
3714         if test "$ol_arg" = "invalid" ; then
3715                 as_fn_error "bad value $withval for --with-yielding_select" "$LINENO" 5
3716         fi
3717         ol_with_yielding_select="$ol_arg"
3718
3719 else
3720         ol_with_yielding_select="auto"
3721 fi
3722 # end --with-yielding_select
3723
3724 # OpenLDAP --with-mp
3725
3726 # Check whether --with-mp was given.
3727 if test "${with_mp+set}" = set; then :
3728   withval=$with_mp;
3729         ol_arg=invalid
3730         for ol_val in auto longlong long bignum gmp yes no ; do
3731                 if test "$withval" = "$ol_val" ; then
3732                         ol_arg="$ol_val"
3733                 fi
3734         done
3735         if test "$ol_arg" = "invalid" ; then
3736                 as_fn_error "bad value $withval for --with-mp" "$LINENO" 5
3737         fi
3738         ol_with_mp="$ol_arg"
3739
3740 else
3741         ol_with_mp="auto"
3742 fi
3743 # end --with-mp
3744
3745 # OpenLDAP --with-odbc
3746
3747 # Check whether --with-odbc was given.
3748 if test "${with_odbc+set}" = set; then :
3749   withval=$with_odbc;
3750         ol_arg=invalid
3751         for ol_val in auto iodbc unixodbc odbc32  ; do
3752                 if test "$withval" = "$ol_val" ; then
3753                         ol_arg="$ol_val"
3754                 fi
3755         done
3756         if test "$ol_arg" = "invalid" ; then
3757                 as_fn_error "bad value $withval for --with-odbc" "$LINENO" 5
3758         fi
3759         ol_with_odbc="$ol_arg"
3760
3761 else
3762         ol_with_odbc="auto"
3763 fi
3764 # end --with-odbc
3765
3766
3767
3768 # Check whether --enable-xxslapdoptions was given.
3769 if test "${enable_xxslapdoptions+set}" = set; then :
3770   enableval=$enable_xxslapdoptions;
3771 fi
3772
3773 # OpenLDAP --enable-slapd
3774
3775         # Check whether --enable-slapd was given.
3776 if test "${enable_slapd+set}" = set; then :
3777   enableval=$enable_slapd;
3778         ol_arg=invalid
3779         for ol_val in auto yes no ; do
3780                 if test "$enableval" = "$ol_val" ; then
3781                         ol_arg="$ol_val"
3782                 fi
3783         done
3784         if test "$ol_arg" = "invalid" ; then
3785                 as_fn_error "bad value $enableval for --enable-slapd" "$LINENO" 5
3786         fi
3787         ol_enable_slapd="$ol_arg"
3788
3789 else
3790         ol_enable_slapd=yes
3791 fi
3792
3793 # end --enable-slapd
3794 # OpenLDAP --enable-dynacl
3795
3796         # Check whether --enable-dynacl was given.
3797 if test "${enable_dynacl+set}" = set; then :
3798   enableval=$enable_dynacl;
3799         ol_arg=invalid
3800         for ol_val in auto yes no ; do
3801                 if test "$enableval" = "$ol_val" ; then
3802                         ol_arg="$ol_val"
3803                 fi
3804         done
3805         if test "$ol_arg" = "invalid" ; then
3806                 as_fn_error "bad value $enableval for --enable-dynacl" "$LINENO" 5
3807         fi
3808         ol_enable_dynacl="$ol_arg"
3809
3810 else
3811         ol_enable_dynacl=no
3812 fi
3813
3814 # end --enable-dynacl
3815 # OpenLDAP --enable-aci
3816
3817         # Check whether --enable-aci was given.
3818 if test "${enable_aci+set}" = set; then :
3819   enableval=$enable_aci;
3820         ol_arg=invalid
3821         for ol_val in no yes mod ; do
3822                 if test "$enableval" = "$ol_val" ; then
3823                         ol_arg="$ol_val"
3824                 fi
3825         done
3826         if test "$ol_arg" = "invalid" ; then
3827                 as_fn_error "bad value $enableval for --enable-aci" "$LINENO" 5
3828         fi
3829         ol_enable_aci="$ol_arg"
3830
3831 else
3832         ol_enable_aci=no
3833 fi
3834
3835 # end --enable-aci
3836 # OpenLDAP --enable-cleartext
3837
3838         # Check whether --enable-cleartext was given.
3839 if test "${enable_cleartext+set}" = set; then :
3840   enableval=$enable_cleartext;
3841         ol_arg=invalid
3842         for ol_val in auto yes no ; do
3843                 if test "$enableval" = "$ol_val" ; then
3844                         ol_arg="$ol_val"
3845                 fi
3846         done
3847         if test "$ol_arg" = "invalid" ; then
3848                 as_fn_error "bad value $enableval for --enable-cleartext" "$LINENO" 5
3849         fi
3850         ol_enable_cleartext="$ol_arg"
3851
3852 else
3853         ol_enable_cleartext=yes
3854 fi
3855
3856 # end --enable-cleartext
3857 # OpenLDAP --enable-crypt
3858
3859         # Check whether --enable-crypt was given.
3860 if test "${enable_crypt+set}" = set; then :
3861   enableval=$enable_crypt;
3862         ol_arg=invalid
3863         for ol_val in auto yes no ; do
3864                 if test "$enableval" = "$ol_val" ; then
3865                         ol_arg="$ol_val"
3866                 fi
3867         done
3868         if test "$ol_arg" = "invalid" ; then
3869                 as_fn_error "bad value $enableval for --enable-crypt" "$LINENO" 5
3870         fi
3871         ol_enable_crypt="$ol_arg"
3872
3873 else
3874         ol_enable_crypt=no
3875 fi
3876
3877 # end --enable-crypt
3878 # OpenLDAP --enable-lmpasswd
3879
3880         # Check whether --enable-lmpasswd was given.
3881 if test "${enable_lmpasswd+set}" = set; then :
3882   enableval=$enable_lmpasswd;
3883         ol_arg=invalid
3884         for ol_val in auto yes no ; do
3885                 if test "$enableval" = "$ol_val" ; then
3886                         ol_arg="$ol_val"
3887                 fi
3888         done
3889         if test "$ol_arg" = "invalid" ; then
3890                 as_fn_error "bad value $enableval for --enable-lmpasswd" "$LINENO" 5
3891         fi
3892         ol_enable_lmpasswd="$ol_arg"
3893
3894 else
3895         ol_enable_lmpasswd=no
3896 fi
3897
3898 # end --enable-lmpasswd
3899 # OpenLDAP --enable-spasswd
3900
3901         # Check whether --enable-spasswd was given.
3902 if test "${enable_spasswd+set}" = set; then :
3903   enableval=$enable_spasswd;
3904         ol_arg=invalid
3905         for ol_val in auto yes no ; do
3906                 if test "$enableval" = "$ol_val" ; then
3907                         ol_arg="$ol_val"
3908                 fi
3909         done
3910         if test "$ol_arg" = "invalid" ; then
3911                 as_fn_error "bad value $enableval for --enable-spasswd" "$LINENO" 5
3912         fi
3913         ol_enable_spasswd="$ol_arg"
3914
3915 else
3916         ol_enable_spasswd=no
3917 fi
3918
3919 # end --enable-spasswd
3920 # OpenLDAP --enable-modules
3921
3922         # Check whether --enable-modules was given.
3923 if test "${enable_modules+set}" = set; then :
3924   enableval=$enable_modules;
3925         ol_arg=invalid
3926         for ol_val in auto yes no ; do
3927                 if test "$enableval" = "$ol_val" ; then
3928                         ol_arg="$ol_val"
3929                 fi
3930         done
3931         if test "$ol_arg" = "invalid" ; then
3932                 as_fn_error "bad value $enableval for --enable-modules" "$LINENO" 5
3933         fi
3934         ol_enable_modules="$ol_arg"
3935
3936 else
3937         ol_enable_modules=no
3938 fi
3939
3940 # end --enable-modules
3941 # OpenLDAP --enable-rewrite
3942
3943         # Check whether --enable-rewrite was given.
3944 if test "${enable_rewrite+set}" = set; then :
3945   enableval=$enable_rewrite;
3946         ol_arg=invalid
3947         for ol_val in auto yes no ; do
3948                 if test "$enableval" = "$ol_val" ; then
3949                         ol_arg="$ol_val"
3950                 fi
3951         done
3952         if test "$ol_arg" = "invalid" ; then
3953                 as_fn_error "bad value $enableval for --enable-rewrite" "$LINENO" 5
3954         fi
3955         ol_enable_rewrite="$ol_arg"
3956
3957 else
3958         ol_enable_rewrite=auto
3959 fi
3960
3961 # end --enable-rewrite
3962 # OpenLDAP --enable-rlookups
3963
3964         # Check whether --enable-rlookups was given.
3965 if test "${enable_rlookups+set}" = set; then :
3966   enableval=$enable_rlookups;
3967         ol_arg=invalid
3968         for ol_val in auto yes no ; do
3969                 if test "$enableval" = "$ol_val" ; then
3970                         ol_arg="$ol_val"
3971                 fi
3972         done
3973         if test "$ol_arg" = "invalid" ; then
3974                 as_fn_error "bad value $enableval for --enable-rlookups" "$LINENO" 5
3975         fi
3976         ol_enable_rlookups="$ol_arg"
3977
3978 else
3979         ol_enable_rlookups=no
3980 fi
3981
3982 # end --enable-rlookups
3983 # OpenLDAP --enable-slapi
3984
3985         # Check whether --enable-slapi was given.
3986 if test "${enable_slapi+set}" = set; then :
3987   enableval=$enable_slapi;
3988         ol_arg=invalid
3989         for ol_val in auto yes no ; do
3990                 if test "$enableval" = "$ol_val" ; then
3991                         ol_arg="$ol_val"
3992                 fi
3993         done
3994         if test "$ol_arg" = "invalid" ; then
3995                 as_fn_error "bad value $enableval for --enable-slapi" "$LINENO" 5
3996         fi
3997         ol_enable_slapi="$ol_arg"
3998
3999 else
4000         ol_enable_slapi=no
4001 fi
4002
4003 # end --enable-slapi
4004 # OpenLDAP --enable-slp
4005
4006         # Check whether --enable-slp was given.
4007 if test "${enable_slp+set}" = set; then :
4008   enableval=$enable_slp;
4009         ol_arg=invalid
4010         for ol_val in auto yes no ; do
4011                 if test "$enableval" = "$ol_val" ; then
4012                         ol_arg="$ol_val"
4013                 fi
4014         done
4015         if test "$ol_arg" = "invalid" ; then
4016                 as_fn_error "bad value $enableval for --enable-slp" "$LINENO" 5
4017         fi
4018         ol_enable_slp="$ol_arg"
4019
4020 else
4021         ol_enable_slp=no
4022 fi
4023
4024 # end --enable-slp
4025 # OpenLDAP --enable-wrappers
4026
4027         # Check whether --enable-wrappers was given.
4028 if test "${enable_wrappers+set}" = set; then :
4029   enableval=$enable_wrappers;
4030         ol_arg=invalid
4031         for ol_val in auto yes no ; do
4032                 if test "$enableval" = "$ol_val" ; then
4033                         ol_arg="$ol_val"
4034                 fi
4035         done
4036         if test "$ol_arg" = "invalid" ; then
4037                 as_fn_error "bad value $enableval for --enable-wrappers" "$LINENO" 5
4038         fi
4039         ol_enable_wrappers="$ol_arg"
4040
4041 else
4042         ol_enable_wrappers=no
4043 fi
4044
4045 # end --enable-wrappers
4046
4047 Backends="bdb \
4048         dnssrv \
4049         hdb \
4050         ldap \
4051         meta \
4052         monitor \
4053         ndb \
4054         null \
4055         passwd \
4056         perl \
4057         relay \
4058         shell \
4059         sock \
4060         sql"
4061
4062 # Check whether --enable-xxslapbackends was given.
4063 if test "${enable_xxslapbackends+set}" = set; then :
4064   enableval=$enable_xxslapbackends;
4065 fi
4066
4067
4068 # OpenLDAP --enable-backends
4069
4070         # Check whether --enable-backends was given.
4071 if test "${enable_backends+set}" = set; then :
4072   enableval=$enable_backends;
4073         ol_arg=invalid
4074         for ol_val in no yes mod ; do
4075                 if test "$enableval" = "$ol_val" ; then
4076                         ol_arg="$ol_val"
4077                 fi
4078         done
4079         if test "$ol_arg" = "invalid" ; then
4080                 as_fn_error "bad value $enableval for --enable-backends" "$LINENO" 5
4081         fi
4082         ol_enable_backends="$ol_arg"
4083
4084 fi
4085
4086 # end --enable-backends
4087 # OpenLDAP --enable-bdb
4088
4089         # Check whether --enable-bdb was given.
4090 if test "${enable_bdb+set}" = set; then :
4091   enableval=$enable_bdb;
4092         ol_arg=invalid
4093         for ol_val in no yes mod ; do
4094                 if test "$enableval" = "$ol_val" ; then
4095                         ol_arg="$ol_val"
4096                 fi
4097         done
4098         if test "$ol_arg" = "invalid" ; then
4099                 as_fn_error "bad value $enableval for --enable-bdb" "$LINENO" 5
4100         fi
4101         ol_enable_bdb="$ol_arg"
4102
4103 else
4104         ol_enable_bdb=${ol_enable_backends:-yes}
4105 fi
4106
4107 # end --enable-bdb
4108 # OpenLDAP --enable-dnssrv
4109
4110         # Check whether --enable-dnssrv was given.
4111 if test "${enable_dnssrv+set}" = set; then :
4112   enableval=$enable_dnssrv;
4113         ol_arg=invalid
4114         for ol_val in no yes mod ; do
4115                 if test "$enableval" = "$ol_val" ; then
4116                         ol_arg="$ol_val"
4117                 fi
4118         done
4119         if test "$ol_arg" = "invalid" ; then
4120                 as_fn_error "bad value $enableval for --enable-dnssrv" "$LINENO" 5
4121         fi
4122         ol_enable_dnssrv="$ol_arg"
4123
4124 else
4125         ol_enable_dnssrv=${ol_enable_backends:-no}
4126 fi
4127
4128 # end --enable-dnssrv
4129 # OpenLDAP --enable-hdb
4130
4131         # Check whether --enable-hdb was given.
4132 if test "${enable_hdb+set}" = set; then :
4133   enableval=$enable_hdb;
4134         ol_arg=invalid
4135         for ol_val in no yes mod ; do
4136                 if test "$enableval" = "$ol_val" ; then
4137                         ol_arg="$ol_val"
4138                 fi
4139         done
4140         if test "$ol_arg" = "invalid" ; then
4141                 as_fn_error "bad value $enableval for --enable-hdb" "$LINENO" 5
4142         fi
4143         ol_enable_hdb="$ol_arg"
4144
4145 else
4146         ol_enable_hdb=${ol_enable_backends:-yes}
4147 fi
4148
4149 # end --enable-hdb
4150 # OpenLDAP --enable-ldap
4151
4152         # Check whether --enable-ldap was given.
4153 if test "${enable_ldap+set}" = set; then :
4154   enableval=$enable_ldap;
4155         ol_arg=invalid
4156         for ol_val in no yes mod ; do
4157                 if test "$enableval" = "$ol_val" ; then
4158                         ol_arg="$ol_val"
4159                 fi
4160         done
4161         if test "$ol_arg" = "invalid" ; then
4162                 as_fn_error "bad value $enableval for --enable-ldap" "$LINENO" 5
4163         fi
4164         ol_enable_ldap="$ol_arg"
4165
4166 else
4167         ol_enable_ldap=${ol_enable_backends:-no}
4168 fi
4169
4170 # end --enable-ldap
4171 # OpenLDAP --enable-meta
4172
4173         # Check whether --enable-meta was given.
4174 if test "${enable_meta+set}" = set; then :
4175   enableval=$enable_meta;
4176         ol_arg=invalid
4177         for ol_val in no yes mod ; do
4178                 if test "$enableval" = "$ol_val" ; then
4179                         ol_arg="$ol_val"
4180                 fi
4181         done
4182         if test "$ol_arg" = "invalid" ; then
4183                 as_fn_error "bad value $enableval for --enable-meta" "$LINENO" 5
4184         fi
4185         ol_enable_meta="$ol_arg"
4186
4187 else
4188         ol_enable_meta=${ol_enable_backends:-no}
4189 fi
4190
4191 # end --enable-meta
4192 # OpenLDAP --enable-monitor
4193
4194         # Check whether --enable-monitor was given.
4195 if test "${enable_monitor+set}" = set; then :
4196   enableval=$enable_monitor;
4197         ol_arg=invalid
4198         for ol_val in no yes mod ; do
4199                 if test "$enableval" = "$ol_val" ; then
4200                         ol_arg="$ol_val"
4201                 fi
4202         done
4203         if test "$ol_arg" = "invalid" ; then
4204                 as_fn_error "bad value $enableval for --enable-monitor" "$LINENO" 5
4205         fi
4206         ol_enable_monitor="$ol_arg"
4207
4208 else
4209         ol_enable_monitor=${ol_enable_backends:-yes}
4210 fi
4211
4212 # end --enable-monitor
4213 # OpenLDAP --enable-ndb
4214
4215         # Check whether --enable-ndb was given.
4216 if test "${enable_ndb+set}" = set; then :
4217   enableval=$enable_ndb;
4218         ol_arg=invalid
4219         for ol_val in no yes mod ; do
4220                 if test "$enableval" = "$ol_val" ; then
4221                         ol_arg="$ol_val"
4222                 fi
4223         done
4224         if test "$ol_arg" = "invalid" ; then
4225                 as_fn_error "bad value $enableval for --enable-ndb" "$LINENO" 5
4226         fi
4227         ol_enable_ndb="$ol_arg"
4228
4229 else
4230         ol_enable_ndb=${ol_enable_backends:-no}
4231 fi
4232
4233 # end --enable-ndb
4234 # OpenLDAP --enable-null
4235
4236         # Check whether --enable-null was given.
4237 if test "${enable_null+set}" = set; then :
4238   enableval=$enable_null;
4239         ol_arg=invalid
4240         for ol_val in no yes mod ; do
4241                 if test "$enableval" = "$ol_val" ; then
4242                         ol_arg="$ol_val"
4243                 fi
4244         done
4245         if test "$ol_arg" = "invalid" ; then
4246                 as_fn_error "bad value $enableval for --enable-null" "$LINENO" 5
4247         fi
4248         ol_enable_null="$ol_arg"
4249
4250 else
4251         ol_enable_null=${ol_enable_backends:-no}
4252 fi
4253
4254 # end --enable-null
4255 # OpenLDAP --enable-passwd
4256
4257         # Check whether --enable-passwd was given.
4258 if test "${enable_passwd+set}" = set; then :
4259   enableval=$enable_passwd;
4260         ol_arg=invalid
4261         for ol_val in no yes mod ; do
4262                 if test "$enableval" = "$ol_val" ; then
4263                         ol_arg="$ol_val"
4264                 fi
4265         done
4266         if test "$ol_arg" = "invalid" ; then
4267                 as_fn_error "bad value $enableval for --enable-passwd" "$LINENO" 5
4268         fi
4269         ol_enable_passwd="$ol_arg"
4270
4271 else
4272         ol_enable_passwd=${ol_enable_backends:-no}
4273 fi
4274
4275 # end --enable-passwd
4276 # OpenLDAP --enable-perl
4277
4278         # Check whether --enable-perl was given.
4279 if test "${enable_perl+set}" = set; then :
4280   enableval=$enable_perl;
4281         ol_arg=invalid
4282         for ol_val in no yes mod ; do
4283                 if test "$enableval" = "$ol_val" ; then
4284                         ol_arg="$ol_val"
4285                 fi
4286         done
4287         if test "$ol_arg" = "invalid" ; then
4288                 as_fn_error "bad value $enableval for --enable-perl" "$LINENO" 5
4289         fi
4290         ol_enable_perl="$ol_arg"
4291
4292 else
4293         ol_enable_perl=${ol_enable_backends:-no}
4294 fi
4295
4296 # end --enable-perl
4297 # OpenLDAP --enable-relay
4298
4299         # Check whether --enable-relay was given.
4300 if test "${enable_relay+set}" = set; then :
4301   enableval=$enable_relay;
4302         ol_arg=invalid
4303         for ol_val in no yes mod ; do
4304                 if test "$enableval" = "$ol_val" ; then
4305                         ol_arg="$ol_val"
4306                 fi
4307         done
4308         if test "$ol_arg" = "invalid" ; then
4309                 as_fn_error "bad value $enableval for --enable-relay" "$LINENO" 5
4310         fi
4311         ol_enable_relay="$ol_arg"
4312
4313 else
4314         ol_enable_relay=${ol_enable_backends:-yes}
4315 fi
4316
4317 # end --enable-relay
4318 # OpenLDAP --enable-shell
4319
4320         # Check whether --enable-shell was given.
4321 if test "${enable_shell+set}" = set; then :
4322   enableval=$enable_shell;
4323         ol_arg=invalid
4324         for ol_val in no yes mod ; do
4325                 if test "$enableval" = "$ol_val" ; then
4326                         ol_arg="$ol_val"
4327                 fi
4328         done
4329         if test "$ol_arg" = "invalid" ; then
4330                 as_fn_error "bad value $enableval for --enable-shell" "$LINENO" 5
4331         fi
4332         ol_enable_shell="$ol_arg"
4333
4334 else
4335         ol_enable_shell=${ol_enable_backends:-no}
4336 fi
4337
4338 # end --enable-shell
4339 # OpenLDAP --enable-sock
4340
4341         # Check whether --enable-sock was given.
4342 if test "${enable_sock+set}" = set; then :
4343   enableval=$enable_sock;
4344         ol_arg=invalid
4345         for ol_val in no yes mod ; do
4346                 if test "$enableval" = "$ol_val" ; then
4347                         ol_arg="$ol_val"
4348                 fi
4349         done
4350         if test "$ol_arg" = "invalid" ; then
4351                 as_fn_error "bad value $enableval for --enable-sock" "$LINENO" 5
4352         fi
4353         ol_enable_sock="$ol_arg"
4354
4355 else
4356         ol_enable_sock=${ol_enable_backends:-no}
4357 fi
4358
4359 # end --enable-sock
4360 # OpenLDAP --enable-sql
4361
4362         # Check whether --enable-sql was given.
4363 if test "${enable_sql+set}" = set; then :
4364   enableval=$enable_sql;
4365         ol_arg=invalid
4366         for ol_val in no yes mod ; do
4367                 if test "$enableval" = "$ol_val" ; then
4368                         ol_arg="$ol_val"
4369                 fi
4370         done
4371         if test "$ol_arg" = "invalid" ; then
4372                 as_fn_error "bad value $enableval for --enable-sql" "$LINENO" 5
4373         fi
4374         ol_enable_sql="$ol_arg"
4375
4376 else
4377         ol_enable_sql=${ol_enable_backends:-no}
4378 fi
4379
4380 # end --enable-sql
4381
4382 Overlays="accesslog \
4383         auditlog \
4384         collect \
4385         constraint \
4386         dds \
4387         deref \
4388         dyngroup \
4389         dynlist \
4390         memberof \
4391         ppolicy \
4392         proxycache \
4393         refint \
4394         retcode \
4395         rwm \
4396         seqmod \
4397         sssvlv \
4398         syncprov \
4399         translucent \
4400         unique \
4401         valsort"
4402
4403 # Check whether --enable-xxslapoverlays was given.
4404 if test "${enable_xxslapoverlays+set}" = set; then :
4405   enableval=$enable_xxslapoverlays;
4406 fi
4407
4408
4409 # OpenLDAP --enable-overlays
4410
4411         # Check whether --enable-overlays was given.
4412 if test "${enable_overlays+set}" = set; then :
4413   enableval=$enable_overlays;
4414         ol_arg=invalid
4415         for ol_val in no yes mod ; do
4416                 if test "$enableval" = "$ol_val" ; then
4417                         ol_arg="$ol_val"
4418                 fi
4419         done
4420         if test "$ol_arg" = "invalid" ; then
4421                 as_fn_error "bad value $enableval for --enable-overlays" "$LINENO" 5
4422         fi
4423         ol_enable_overlays="$ol_arg"
4424
4425 fi
4426
4427 # end --enable-overlays
4428 # OpenLDAP --enable-accesslog
4429
4430         # Check whether --enable-accesslog was given.
4431 if test "${enable_accesslog+set}" = set; then :
4432   enableval=$enable_accesslog;
4433         ol_arg=invalid
4434         for ol_val in no yes mod ; do
4435                 if test "$enableval" = "$ol_val" ; then
4436                         ol_arg="$ol_val"
4437                 fi
4438         done
4439         if test "$ol_arg" = "invalid" ; then
4440                 as_fn_error "bad value $enableval for --enable-accesslog" "$LINENO" 5
4441         fi
4442         ol_enable_accesslog="$ol_arg"
4443
4444 else
4445         ol_enable_accesslog=${ol_enable_overlays:-no}
4446 fi
4447
4448 # end --enable-accesslog
4449
4450 # OpenLDAP --enable-auditlog
4451
4452         # Check whether --enable-auditlog was given.
4453 if test "${enable_auditlog+set}" = set; then :
4454   enableval=$enable_auditlog;
4455         ol_arg=invalid
4456         for ol_val in no yes mod ; do
4457                 if test "$enableval" = "$ol_val" ; then
4458                         ol_arg="$ol_val"
4459                 fi
4460         done
4461         if test "$ol_arg" = "invalid" ; then
4462                 as_fn_error "bad value $enableval for --enable-auditlog" "$LINENO" 5
4463         fi
4464         ol_enable_auditlog="$ol_arg"
4465
4466 else
4467         ol_enable_auditlog=${ol_enable_overlays:-no}
4468 fi
4469
4470 # end --enable-auditlog
4471
4472 # OpenLDAP --enable-collect
4473
4474         # Check whether --enable-collect was given.
4475 if test "${enable_collect+set}" = set; then :
4476   enableval=$enable_collect;
4477         ol_arg=invalid
4478         for ol_val in no yes mod ; do
4479                 if test "$enableval" = "$ol_val" ; then
4480                         ol_arg="$ol_val"
4481                 fi
4482         done
4483         if test "$ol_arg" = "invalid" ; then
4484                 as_fn_error "bad value $enableval for --enable-collect" "$LINENO" 5
4485         fi
4486         ol_enable_collect="$ol_arg"
4487
4488 else
4489         ol_enable_collect=${ol_enable_overlays:-no}
4490 fi
4491
4492 # end --enable-collect
4493
4494 # OpenLDAP --enable-constraint
4495
4496         # Check whether --enable-constraint was given.
4497 if test "${enable_constraint+set}" = set; then :
4498   enableval=$enable_constraint;
4499         ol_arg=invalid
4500         for ol_val in no yes mod ; do
4501                 if test "$enableval" = "$ol_val" ; then
4502                         ol_arg="$ol_val"
4503                 fi
4504         done
4505         if test "$ol_arg" = "invalid" ; then
4506                 as_fn_error "bad value $enableval for --enable-constraint" "$LINENO" 5
4507         fi
4508         ol_enable_constraint="$ol_arg"
4509
4510 else
4511         ol_enable_constraint=${ol_enable_overlays:-no}
4512 fi
4513
4514 # end --enable-constraint
4515
4516 # OpenLDAP --enable-dds
4517
4518         # Check whether --enable-dds was given.
4519 if test "${enable_dds+set}" = set; then :
4520   enableval=$enable_dds;
4521         ol_arg=invalid
4522         for ol_val in no yes mod ; do
4523                 if test "$enableval" = "$ol_val" ; then
4524                         ol_arg="$ol_val"
4525                 fi
4526         done
4527         if test "$ol_arg" = "invalid" ; then
4528                 as_fn_error "bad value $enableval for --enable-dds" "$LINENO" 5
4529         fi
4530         ol_enable_dds="$ol_arg"
4531
4532 else
4533         ol_enable_dds=${ol_enable_overlays:-no}
4534 fi
4535
4536 # end --enable-dds
4537
4538 # OpenLDAP --enable-deref
4539
4540         # Check whether --enable-deref was given.
4541 if test "${enable_deref+set}" = set; then :
4542   enableval=$enable_deref;
4543         ol_arg=invalid
4544         for ol_val in no yes mod ; do
4545                 if test "$enableval" = "$ol_val" ; then
4546                         ol_arg="$ol_val"
4547                 fi
4548         done
4549         if test "$ol_arg" = "invalid" ; then
4550                 as_fn_error "bad value $enableval for --enable-deref" "$LINENO" 5
4551         fi
4552         ol_enable_deref="$ol_arg"
4553
4554 else
4555         ol_enable_deref=${ol_enable_overlays:-no}
4556 fi
4557
4558 # end --enable-deref
4559
4560 # OpenLDAP --enable-dyngroup
4561
4562         # Check whether --enable-dyngroup was given.
4563 if test "${enable_dyngroup+set}" = set; then :
4564   enableval=$enable_dyngroup;
4565         ol_arg=invalid
4566         for ol_val in no yes mod ; do
4567                 if test "$enableval" = "$ol_val" ; then
4568                         ol_arg="$ol_val"
4569                 fi
4570         done
4571         if test "$ol_arg" = "invalid" ; then
4572                 as_fn_error "bad value $enableval for --enable-dyngroup" "$LINENO" 5
4573         fi
4574         ol_enable_dyngroup="$ol_arg"
4575
4576 else
4577         ol_enable_dyngroup=${ol_enable_overlays:-no}
4578 fi
4579
4580 # end --enable-dyngroup
4581
4582 # OpenLDAP --enable-dynlist
4583
4584         # Check whether --enable-dynlist was given.
4585 if test "${enable_dynlist+set}" = set; then :
4586   enableval=$enable_dynlist;
4587         ol_arg=invalid
4588         for ol_val in no yes mod ; do
4589                 if test "$enableval" = "$ol_val" ; then
4590                         ol_arg="$ol_val"
4591                 fi
4592         done
4593         if test "$ol_arg" = "invalid" ; then
4594                 as_fn_error "bad value $enableval for --enable-dynlist" "$LINENO" 5
4595         fi
4596         ol_enable_dynlist="$ol_arg"
4597
4598 else
4599         ol_enable_dynlist=${ol_enable_overlays:-no}
4600 fi
4601
4602 # end --enable-dynlist
4603
4604 # OpenLDAP --enable-memberof
4605
4606         # Check whether --enable-memberof was given.
4607 if test "${enable_memberof+set}" = set; then :
4608   enableval=$enable_memberof;
4609         ol_arg=invalid
4610         for ol_val in no yes mod ; do
4611                 if test "$enableval" = "$ol_val" ; then
4612                         ol_arg="$ol_val"
4613                 fi
4614         done
4615         if test "$ol_arg" = "invalid" ; then
4616                 as_fn_error "bad value $enableval for --enable-memberof" "$LINENO" 5
4617         fi
4618         ol_enable_memberof="$ol_arg"
4619
4620 else
4621         ol_enable_memberof=${ol_enable_overlays:-no}
4622 fi
4623
4624 # end --enable-memberof
4625
4626 # OpenLDAP --enable-ppolicy
4627
4628         # Check whether --enable-ppolicy was given.
4629 if test "${enable_ppolicy+set}" = set; then :
4630   enableval=$enable_ppolicy;
4631         ol_arg=invalid
4632         for ol_val in no yes mod ; do
4633                 if test "$enableval" = "$ol_val" ; then
4634                         ol_arg="$ol_val"
4635                 fi
4636         done
4637         if test "$ol_arg" = "invalid" ; then
4638                 as_fn_error "bad value $enableval for --enable-ppolicy" "$LINENO" 5
4639         fi
4640         ol_enable_ppolicy="$ol_arg"
4641
4642 else
4643         ol_enable_ppolicy=${ol_enable_overlays:-no}
4644 fi
4645
4646 # end --enable-ppolicy
4647
4648 # OpenLDAP --enable-proxycache
4649
4650         # Check whether --enable-proxycache was given.
4651 if test "${enable_proxycache+set}" = set; then :
4652   enableval=$enable_proxycache;
4653         ol_arg=invalid
4654         for ol_val in no yes mod ; do
4655                 if test "$enableval" = "$ol_val" ; then
4656                         ol_arg="$ol_val"
4657                 fi
4658         done
4659         if test "$ol_arg" = "invalid" ; then
4660                 as_fn_error "bad value $enableval for --enable-proxycache" "$LINENO" 5
4661         fi
4662         ol_enable_proxycache="$ol_arg"
4663
4664 else
4665         ol_enable_proxycache=${ol_enable_overlays:-no}
4666 fi
4667
4668 # end --enable-proxycache
4669
4670 # OpenLDAP --enable-refint
4671
4672         # Check whether --enable-refint was given.
4673 if test "${enable_refint+set}" = set; then :
4674   enableval=$enable_refint;
4675         ol_arg=invalid
4676         for ol_val in no yes mod ; do
4677                 if test "$enableval" = "$ol_val" ; then
4678                         ol_arg="$ol_val"
4679                 fi
4680         done
4681         if test "$ol_arg" = "invalid" ; then
4682                 as_fn_error "bad value $enableval for --enable-refint" "$LINENO" 5
4683         fi
4684         ol_enable_refint="$ol_arg"
4685
4686 else
4687         ol_enable_refint=${ol_enable_overlays:-no}
4688 fi
4689
4690 # end --enable-refint
4691
4692 # OpenLDAP --enable-retcode
4693
4694         # Check whether --enable-retcode was given.
4695 if test "${enable_retcode+set}" = set; then :
4696   enableval=$enable_retcode;
4697         ol_arg=invalid
4698         for ol_val in no yes mod ; do
4699                 if test "$enableval" = "$ol_val" ; then
4700                         ol_arg="$ol_val"
4701                 fi
4702         done
4703         if test "$ol_arg" = "invalid" ; then
4704                 as_fn_error "bad value $enableval for --enable-retcode" "$LINENO" 5
4705         fi
4706         ol_enable_retcode="$ol_arg"
4707
4708 else
4709         ol_enable_retcode=${ol_enable_overlays:-no}
4710 fi
4711
4712 # end --enable-retcode
4713
4714 # OpenLDAP --enable-rwm
4715
4716         # Check whether --enable-rwm was given.
4717 if test "${enable_rwm+set}" = set; then :
4718   enableval=$enable_rwm;
4719         ol_arg=invalid
4720         for ol_val in no yes mod ; do
4721                 if test "$enableval" = "$ol_val" ; then
4722                         ol_arg="$ol_val"
4723                 fi
4724         done
4725         if test "$ol_arg" = "invalid" ; then
4726                 as_fn_error "bad value $enableval for --enable-rwm" "$LINENO" 5
4727         fi
4728         ol_enable_rwm="$ol_arg"
4729
4730 else
4731         ol_enable_rwm=${ol_enable_overlays:-no}
4732 fi
4733
4734 # end --enable-rwm
4735
4736 # OpenLDAP --enable-seqmod
4737
4738         # Check whether --enable-seqmod was given.
4739 if test "${enable_seqmod+set}" = set; then :
4740   enableval=$enable_seqmod;
4741         ol_arg=invalid
4742         for ol_val in no yes mod ; do
4743                 if test "$enableval" = "$ol_val" ; then
4744                         ol_arg="$ol_val"
4745                 fi
4746         done
4747         if test "$ol_arg" = "invalid" ; then
4748                 as_fn_error "bad value $enableval for --enable-seqmod" "$LINENO" 5
4749         fi
4750         ol_enable_seqmod="$ol_arg"
4751
4752 else
4753         ol_enable_seqmod=${ol_enable_overlays:-no}
4754 fi
4755
4756 # end --enable-seqmod
4757
4758 # OpenLDAP --enable-sssvlv
4759
4760         # Check whether --enable-sssvlv was given.
4761 if test "${enable_sssvlv+set}" = set; then :
4762   enableval=$enable_sssvlv;
4763         ol_arg=invalid
4764         for ol_val in no yes mod ; do
4765                 if test "$enableval" = "$ol_val" ; then
4766                         ol_arg="$ol_val"
4767                 fi
4768         done
4769         if test "$ol_arg" = "invalid" ; then
4770                 as_fn_error "bad value $enableval for --enable-sssvlv" "$LINENO" 5
4771         fi
4772         ol_enable_sssvlv="$ol_arg"
4773
4774 else
4775         ol_enable_sssvlv=${ol_enable_overlays:-no}
4776 fi
4777
4778 # end --enable-sssvlv
4779
4780 # OpenLDAP --enable-syncprov
4781
4782         # Check whether --enable-syncprov was given.
4783 if test "${enable_syncprov+set}" = set; then :
4784   enableval=$enable_syncprov;
4785         ol_arg=invalid
4786         for ol_val in no yes mod ; do
4787                 if test "$enableval" = "$ol_val" ; then
4788                         ol_arg="$ol_val"
4789                 fi
4790         done
4791         if test "$ol_arg" = "invalid" ; then
4792                 as_fn_error "bad value $enableval for --enable-syncprov" "$LINENO" 5
4793         fi
4794         ol_enable_syncprov="$ol_arg"
4795
4796 else
4797         ol_enable_syncprov=${ol_enable_overlays:-yes}
4798 fi
4799
4800 # end --enable-syncprov
4801
4802 # OpenLDAP --enable-translucent
4803
4804         # Check whether --enable-translucent was given.
4805 if test "${enable_translucent+set}" = set; then :
4806   enableval=$enable_translucent;
4807         ol_arg=invalid
4808         for ol_val in no yes mod ; do
4809                 if test "$enableval" = "$ol_val" ; then
4810                         ol_arg="$ol_val"
4811                 fi
4812         done
4813         if test "$ol_arg" = "invalid" ; then
4814                 as_fn_error "bad value $enableval for --enable-translucent" "$LINENO" 5
4815         fi
4816         ol_enable_translucent="$ol_arg"
4817
4818 else
4819         ol_enable_translucent=${ol_enable_overlays:-no}
4820 fi
4821
4822 # end --enable-translucent
4823
4824 # OpenLDAP --enable-unique
4825
4826         # Check whether --enable-unique was given.
4827 if test "${enable_unique+set}" = set; then :
4828   enableval=$enable_unique;
4829         ol_arg=invalid
4830         for ol_val in no yes mod ; do
4831                 if test "$enableval" = "$ol_val" ; then
4832                         ol_arg="$ol_val"
4833                 fi
4834         done
4835         if test "$ol_arg" = "invalid" ; then
4836                 as_fn_error "bad value $enableval for --enable-unique" "$LINENO" 5
4837         fi
4838         ol_enable_unique="$ol_arg"
4839
4840 else
4841         ol_enable_unique=${ol_enable_overlays:-no}
4842 fi
4843
4844 # end --enable-unique
4845
4846 # OpenLDAP --enable-valsort
4847
4848         # Check whether --enable-valsort was given.
4849 if test "${enable_valsort+set}" = set; then :
4850   enableval=$enable_valsort;
4851         ol_arg=invalid
4852         for ol_val in no yes mod ; do
4853                 if test "$enableval" = "$ol_val" ; then
4854                         ol_arg="$ol_val"
4855                 fi
4856         done
4857         if test "$ol_arg" = "invalid" ; then
4858                 as_fn_error "bad value $enableval for --enable-valsort" "$LINENO" 5
4859         fi
4860         ol_enable_valsort="$ol_arg"
4861
4862 else
4863         ol_enable_valsort=${ol_enable_overlays:-no}
4864 fi
4865
4866 # end --enable-valsort
4867
4868
4869 # Check whether --enable-xxliboptions was given.
4870 if test "${enable_xxliboptions+set}" = set; then :
4871   enableval=$enable_xxliboptions;
4872 fi
4873
4874 # Check whether --enable-static was given.
4875 if test "${enable_static+set}" = set; then :
4876   enableval=$enable_static; p=${PACKAGE-default}
4877     case $enableval in
4878     yes) enable_static=yes ;;
4879     no) enable_static=no ;;
4880     *)
4881      enable_static=no
4882       # Look at the argument we got.  We use all the common list separators.
4883       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4884       for pkg in $enableval; do
4885         IFS="$lt_save_ifs"
4886         if test "X$pkg" = "X$p"; then
4887           enable_static=yes
4888         fi
4889       done
4890       IFS="$lt_save_ifs"
4891       ;;
4892     esac
4893 else
4894   enable_static=yes
4895 fi
4896
4897
4898 # Check whether --enable-shared was given.
4899 if test "${enable_shared+set}" = set; then :
4900   enableval=$enable_shared; p=${PACKAGE-default}
4901     case $enableval in
4902     yes) enable_shared=yes ;;
4903     no) enable_shared=no ;;
4904     *)
4905       enable_shared=no
4906       # Look at the argument we got.  We use all the common list separators.
4907       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4908       for pkg in $enableval; do
4909         IFS="$lt_save_ifs"
4910         if test "X$pkg" = "X$p"; then
4911           enable_shared=yes
4912         fi
4913       done
4914       IFS="$lt_save_ifs"
4915       ;;
4916     esac
4917 else
4918   enable_shared=yes
4919 fi
4920
4921
4922
4923
4924 # validate options
4925 if test $ol_enable_slapd = no ; then
4926                 if test $ol_enable_slapi = yes ; then
4927                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
4928 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
4929         fi
4930         case "$ol_enable_backends" in yes | mod)
4931                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
4932 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
4933         esac
4934         for i in $Backends; do
4935                 eval "ol_tmp=\$ol_enable_$i"
4936                 if test $ol_tmp != no ; then
4937                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
4938 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
4939                         eval "ol_enable_$i=no"
4940                 fi
4941         done
4942         if test $ol_enable_modules = yes ; then
4943                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
4944 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
4945         fi
4946         if test $ol_enable_wrappers = yes ; then
4947                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
4948 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
4949         fi
4950         if test $ol_enable_rlookups = yes ; then
4951                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
4952 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
4953         fi
4954         if test $ol_enable_dynacl = yes ; then
4955                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
4956 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
4957         fi
4958         if test $ol_enable_aci != no ; then
4959                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
4960 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
4961         fi
4962         if test $ol_enable_rewrite = yes ; then
4963                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
4964 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
4965         fi
4966                 case "$ol_enable_overlays" in yes | mod)
4967                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
4968 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
4969         esac
4970         for i in $Overlays; do
4971                 eval "ol_tmp=\$ol_enable_$i"
4972                 if test $ol_tmp != no ; then
4973                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
4974 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
4975                         eval "ol_enable_$i=no"
4976                 fi
4977         done
4978
4979         # force settings to no
4980         ol_enable_slapi=no
4981
4982         ol_enable_backends=
4983         ol_enable_overlays=
4984         ol_enable_modules=no
4985         ol_enable_rlookups=no
4986         ol_enable_dynacl=no
4987         ol_enable_aci=no
4988         ol_enable_wrappers=no
4989
4990         ol_enable_rewrite=no
4991
4992 elif test $ol_enable_modules != yes &&
4993         test $ol_enable_bdb = no &&
4994         test $ol_enable_dnssrv = no &&
4995         test $ol_enable_hdb = no &&
4996         test $ol_enable_ldap = no &&
4997         test $ol_enable_meta = no &&
4998         test $ol_enable_monitor = no &&
4999         test $ol_enable_ndb = no &&
5000         test $ol_enable_null = no &&
5001         test $ol_enable_passwd = no &&
5002         test $ol_enable_perl = no &&
5003         test $ol_enable_relay = no &&
5004         test $ol_enable_shell = no &&
5005         test $ol_enable_sock = no &&
5006         test $ol_enable_sql = no ; then
5007
5008         if test $ol_enable_slapd = yes ; then
5009                 as_fn_error "slapd requires a backend" "$LINENO" 5
5010         else
5011                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipping slapd, no backend specified" >&5
5012 $as_echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
5013                 ol_enable_slapd=no
5014         fi
5015 fi
5016
5017 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
5018         as_fn_error "--enable-meta requires --enable-ldap" "$LINENO" 5
5019 fi
5020
5021 if test $ol_enable_lmpasswd = yes ; then
5022         if test $ol_with_tls = no ; then
5023                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
5024         fi
5025 fi
5026
5027 if test $ol_enable_spasswd = yes ; then
5028         if test $ol_with_cyrus_sasl = no ; then
5029                 as_fn_error "options require --with-cyrus-sasl" "$LINENO" 5
5030         fi
5031         ol_with_cyrus_sasl=yes
5032 fi
5033
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
5035 $as_echo "done" >&6; }
5036
5037 LDAP_LIBS=
5038 BDB_LIBS=
5039 SLAPD_NDB_LIBS=
5040 SLAPD_NDB_INCS=
5041 LTHREAD_LIBS=
5042 LUTIL_LIBS=
5043
5044 SLAPD_LIBS=
5045
5046 BUILD_SLAPD=no
5047
5048 BUILD_THREAD=no
5049
5050 BUILD_SLAPI=no
5051 SLAPD_SLAPI_DEPEND=
5052
5053 BUILD_BDB=no
5054 BUILD_DNSSRV=no
5055 BUILD_HDB=no
5056 BUILD_LDAP=no
5057 BUILD_META=no
5058 BUILD_MONITOR=no
5059 BUILD_NDB=no
5060 BUILD_NULL=no
5061 BUILD_PASSWD=no
5062 BUILD_PERL=no
5063 BUILD_RELAY=no
5064 BUILD_SHELL=no
5065 BUILD_SOCK=no
5066 BUILD_SQL=no
5067
5068 BUILD_ACCESSLOG=no
5069 BUILD_AUDITLOG=no
5070 BUILD_CONSTRAINT=no
5071 BUILD_DDS=no
5072 BUILD_DENYOP=no
5073 BUILD_DEREF=no
5074 BUILD_DYNGROUP=no
5075 BUILD_DYNLIST=no
5076 BUILD_LASTMOD=no
5077 BUILD_MEMBEROF=no
5078 BUILD_PPOLICY=no
5079 BUILD_PROXYCACHE=no
5080 BUILD_REFINT=no
5081 BUILD_RETCODE=no
5082 BUILD_RWM=no
5083 BUILD_SEQMOD=no
5084 BUILD_SSSVLV=no
5085 BUILD_SYNCPROV=no
5086 BUILD_TRANSLUCENT=no
5087 BUILD_UNIQUE=no
5088 BUILD_VALSORT=no
5089
5090 SLAPD_STATIC_OVERLAYS=
5091 SLAPD_DYNAMIC_OVERLAYS=
5092
5093 SLAPD_MODULES_LDFLAGS=
5094 SLAPD_MODULES_CPPFLAGS=
5095
5096 SLAPD_STATIC_BACKENDS=back-ldif
5097 SLAPD_DYNAMIC_BACKENDS=
5098
5099 SLAPD_PERL_LDFLAGS=
5100 MOD_PERL_LDFLAGS=
5101 PERL_CPPFLAGS=
5102
5103 SLAPD_SQL_LDFLAGS=
5104 SLAPD_SQL_LIBS=
5105 SLAPD_SQL_INCLUDES=
5106
5107 KRB4_LIBS=
5108 KRB5_LIBS=
5109 SASL_LIBS=
5110 TLS_LIBS=
5111 MODULES_LIBS=
5112 SLAPI_LIBS=
5113 LIBSLAPI=
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 socket in -lnet" >&5
13913 $as_echo_n "checking for socket in -lnet... " >&6; }
13914 if test "${ac_cv_lib_net_socket+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 /* Override any GCC internal prototype to avoid an error.
13923    Use char because int might match the return type of a GCC
13924    builtin and then its argument prototype would still apply.  */
13925 #ifdef __cplusplus
13926 extern "C"
13927 #endif
13928 char socket ();
13929 int
13930 main ()
13931 {
13932 return socket ();
13933   ;
13934   return 0;
13935 }
13936 _ACEOF
13937 if ac_fn_c_try_link "$LINENO"; then :
13938   ac_cv_lib_net_socket=yes
13939 else
13940   ac_cv_lib_net_socket=no
13941 fi
13942 rm -f core conftest.err conftest.$ac_objext \
13943     conftest$ac_exeext conftest.$ac_ext
13944 LIBS=$ac_check_lib_save_LIBS
13945 fi
13946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
13947 $as_echo "$ac_cv_lib_net_socket" >&6; }
13948 if test "x$ac_cv_lib_net_socket" = x""yes; then :
13949   cat >>confdefs.h <<_ACEOF
13950 #define HAVE_LIBNET 1
13951 _ACEOF
13952
13953   LIBS="-lnet $LIBS"
13954
13955 fi
13956
13957         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl_s" >&5
13958 $as_echo_n "checking for main in -lnsl_s... " >&6; }
13959 if test "${ac_cv_lib_nsl_s_main+set}" = set; then :
13960   $as_echo_n "(cached) " >&6
13961 else
13962   ac_check_lib_save_LIBS=$LIBS
13963 LIBS="-lnsl_s  $LIBS"
13964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13965 /* end confdefs.h.  */
13966
13967
13968 int
13969 main ()
13970 {
13971 return main ();
13972   ;
13973   return 0;
13974 }
13975 _ACEOF
13976 if ac_fn_c_try_link "$LINENO"; then :
13977   ac_cv_lib_nsl_s_main=yes
13978 else
13979   ac_cv_lib_nsl_s_main=no
13980 fi
13981 rm -f core conftest.err conftest.$ac_objext \
13982     conftest$ac_exeext conftest.$ac_ext
13983 LIBS=$ac_check_lib_save_LIBS
13984 fi
13985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_s_main" >&5
13986 $as_echo "$ac_cv_lib_nsl_s_main" >&6; }
13987 if test "x$ac_cv_lib_nsl_s_main" = x""yes; then :
13988   cat >>confdefs.h <<_ACEOF
13989 #define HAVE_LIBNSL_S 1
13990 _ACEOF
13991
13992   LIBS="-lnsl_s $LIBS"
13993
13994 fi
13995
13996         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5
13997 $as_echo_n "checking for main in -lnsl... " >&6; }
13998 if test "${ac_cv_lib_nsl_main+set}" = set; then :
13999   $as_echo_n "(cached) " >&6
14000 else
14001   ac_check_lib_save_LIBS=$LIBS
14002 LIBS="-lnsl  $LIBS"
14003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14004 /* end confdefs.h.  */
14005
14006
14007 int
14008 main ()
14009 {
14010 return main ();
14011   ;
14012   return 0;
14013 }
14014 _ACEOF
14015 if ac_fn_c_try_link "$LINENO"; then :
14016   ac_cv_lib_nsl_main=yes
14017 else
14018   ac_cv_lib_nsl_main=no
14019 fi
14020 rm -f core conftest.err conftest.$ac_objext \
14021     conftest$ac_exeext conftest.$ac_ext
14022 LIBS=$ac_check_lib_save_LIBS
14023 fi
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5
14025 $as_echo "$ac_cv_lib_nsl_main" >&6; }
14026 if test "x$ac_cv_lib_nsl_main" = x""yes; then :
14027   cat >>confdefs.h <<_ACEOF
14028 #define HAVE_LIBNSL 1
14029 _ACEOF
14030
14031   LIBS="-lnsl $LIBS"
14032
14033 fi
14034
14035         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -linet" >&5
14036 $as_echo_n "checking for socket in -linet... " >&6; }
14037 if test "${ac_cv_lib_inet_socket+set}" = set; then :
14038   $as_echo_n "(cached) " >&6
14039 else
14040   ac_check_lib_save_LIBS=$LIBS
14041 LIBS="-linet  $LIBS"
14042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14043 /* end confdefs.h.  */
14044
14045 /* Override any GCC internal prototype to avoid an error.
14046    Use char because int might match the return type of a GCC
14047    builtin and then its argument prototype would still apply.  */
14048 #ifdef __cplusplus
14049 extern "C"
14050 #endif
14051 char socket ();
14052 int
14053 main ()
14054 {
14055 return socket ();
14056   ;
14057   return 0;
14058 }
14059 _ACEOF
14060 if ac_fn_c_try_link "$LINENO"; then :
14061   ac_cv_lib_inet_socket=yes
14062 else
14063   ac_cv_lib_inet_socket=no
14064 fi
14065 rm -f core conftest.err conftest.$ac_objext \
14066     conftest$ac_exeext conftest.$ac_ext
14067 LIBS=$ac_check_lib_save_LIBS
14068 fi
14069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_socket" >&5
14070 $as_echo "$ac_cv_lib_inet_socket" >&6; }
14071 if test "x$ac_cv_lib_inet_socket" = x""yes; then :
14072   cat >>confdefs.h <<_ACEOF
14073 #define HAVE_LIBINET 1
14074 _ACEOF
14075
14076   LIBS="-linet $LIBS"
14077
14078 fi
14079
14080         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgen" >&5
14081 $as_echo_n "checking for main in -lgen... " >&6; }
14082 if test "${ac_cv_lib_gen_main+set}" = set; then :
14083   $as_echo_n "(cached) " >&6
14084 else
14085   ac_check_lib_save_LIBS=$LIBS
14086 LIBS="-lgen  $LIBS"
14087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14088 /* end confdefs.h.  */
14089
14090
14091 int
14092 main ()
14093 {
14094 return main ();
14095   ;
14096   return 0;
14097 }
14098 _ACEOF
14099 if ac_fn_c_try_link "$LINENO"; then :
14100   ac_cv_lib_gen_main=yes
14101 else
14102   ac_cv_lib_gen_main=no
14103 fi
14104 rm -f core conftest.err conftest.$ac_objext \
14105     conftest$ac_exeext conftest.$ac_ext
14106 LIBS=$ac_check_lib_save_LIBS
14107 fi
14108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_main" >&5
14109 $as_echo "$ac_cv_lib_gen_main" >&6; }
14110 if test "x$ac_cv_lib_gen_main" = x""yes; then :
14111   cat >>confdefs.h <<_ACEOF
14112 #define HAVE_LIBGEN 1
14113 _ACEOF
14114
14115   LIBS="-lgen $LIBS"
14116
14117 fi
14118
14119
14120 fi
14121
14122
14123 ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
14124 if test "x$ac_cv_func_select" = x""yes; then :
14125   :
14126 else
14127   as_fn_error "select() required." "$LINENO" 5
14128 fi
14129
14130
14131 if test "${ac_cv_header_winsock_h}" != yes; then
14132                                 for ac_header in sys/select.h sys/socket.h
14133 do :
14134   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14135 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14136 eval as_val=\$$as_ac_Header
14137    if test "x$as_val" = x""yes; then :
14138   cat >>confdefs.h <<_ACEOF
14139 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14140 _ACEOF
14141
14142 fi
14143
14144 done
14145
14146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
14147 $as_echo_n "checking types of arguments for select... " >&6; }
14148 if test "${ac_cv_func_select_args+set}" = set; then :
14149   $as_echo_n "(cached) " >&6
14150 else
14151   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
14152  for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
14153   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
14154    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14155 /* end confdefs.h.  */
14156 $ac_includes_default
14157 #ifdef HAVE_SYS_SELECT_H
14158 # include <sys/select.h>
14159 #endif
14160 #ifdef HAVE_SYS_SOCKET_H
14161 # include <sys/socket.h>
14162 #endif
14163
14164 int
14165 main ()
14166 {
14167 extern int select ($ac_arg1,
14168                                             $ac_arg234, $ac_arg234, $ac_arg234,
14169                                             $ac_arg5);
14170   ;
14171   return 0;
14172 }
14173 _ACEOF
14174 if ac_fn_c_try_compile "$LINENO"; then :
14175   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
14176 fi
14177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14178   done
14179  done
14180 done
14181 # Provide a safe default value.
14182 : ${ac_cv_func_select_args='int,int *,struct timeval *'}
14183
14184 fi
14185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
14186 $as_echo "$ac_cv_func_select_args" >&6; }
14187 ac_save_IFS=$IFS; IFS=','
14188 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
14189 IFS=$ac_save_IFS
14190 shift
14191
14192 cat >>confdefs.h <<_ACEOF
14193 #define SELECT_TYPE_ARG1 $1
14194 _ACEOF
14195
14196
14197 cat >>confdefs.h <<_ACEOF
14198 #define SELECT_TYPE_ARG234 ($2)
14199 _ACEOF
14200
14201
14202 cat >>confdefs.h <<_ACEOF
14203 #define SELECT_TYPE_ARG5 ($3)
14204 _ACEOF
14205
14206 rm -f conftest*
14207
14208 fi
14209
14210
14211 for ac_func in poll
14212 do :
14213   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14214 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14215 eval as_val=\$$as_ac_var
14216    if test "x$as_val" = x""yes; then :
14217   cat >>confdefs.h <<_ACEOF
14218 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14219 _ACEOF
14220
14221 fi
14222 done
14223
14224 if test $ac_cv_func_poll = yes; then
14225 for ac_header in poll.h sys/poll.h
14226 do :
14227   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14228 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14229 eval as_val=\$$as_ac_Header
14230    if test "x$as_val" = x""yes; then :
14231   cat >>confdefs.h <<_ACEOF
14232 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14233 _ACEOF
14234
14235 fi
14236
14237 done
14238
14239 fi
14240
14241 for ac_header in sys/epoll.h
14242 do :
14243   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14244 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14245 eval as_val=\$$as_ac_Header
14246    if test "x$as_val" = x""yes; then :
14247   cat >>confdefs.h <<_ACEOF
14248 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14249 _ACEOF
14250
14251 fi
14252
14253 done
14254
14255 if test "${ac_cv_header_sys_epoll_h}" = yes; then
14256         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll system call" >&5
14257 $as_echo_n "checking for epoll system call... " >&6; }
14258         if test "$cross_compiling" = yes; then :
14259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14260 $as_echo "no" >&6; }
14261 else
14262   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14263 /* end confdefs.h.  */
14264 int main(int argc, char **argv)
14265 {
14266         int epfd = epoll_create(256);
14267         exit (epfd == -1 ? 1 : 0);
14268 }
14269 _ACEOF
14270 if ac_fn_c_try_run "$LINENO"; then :
14271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14272 $as_echo "yes" >&6; }
14273
14274 $as_echo "#define HAVE_EPOLL 1" >>confdefs.h
14275
14276 else
14277   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14278 $as_echo "no" >&6; }
14279 fi
14280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14281   conftest.$ac_objext conftest.beam conftest.$ac_ext
14282 fi
14283
14284 fi
14285
14286 for ac_header in sys/devpoll.h
14287 do :
14288   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14289 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14290 eval as_val=\$$as_ac_Header
14291    if test "x$as_val" = x""yes; then :
14292   cat >>confdefs.h <<_ACEOF
14293 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14294 _ACEOF
14295
14296 fi
14297
14298 done
14299
14300 if test "${ac_cv_header_sys_devpoll_h}" = yes \
14301                 -a "${ac_cv_header_poll_h}" = yes ; \
14302 then
14303         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/poll" >&5
14304 $as_echo_n "checking for /dev/poll... " >&6; }
14305         if test "$cross_compiling" = yes; then :
14306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14307 $as_echo "no" >&6; }
14308 else
14309   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14310 /* end confdefs.h.  */
14311 int main(int argc, char **argv)
14312 {
14313         int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
14314         exit (devpollfd == -1 ? 1 : 0);
14315 }
14316 _ACEOF
14317 if ac_fn_c_try_run "$LINENO"; then :
14318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14319 $as_echo "yes" >&6; }
14320
14321 $as_echo "#define HAVE_DEVPOLL 1" >>confdefs.h
14322
14323 else
14324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14325 $as_echo "no" >&6; }
14326 fi
14327 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14328   conftest.$ac_objext conftest.beam conftest.$ac_ext
14329 fi
14330
14331 fi
14332
14333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14334 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14335 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14336   $as_echo_n "(cached) " >&6
14337 else
14338
14339         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14340 /* end confdefs.h.  */
14341
14342 #include <stdio.h>
14343 #include <sys/types.h>
14344 #include <errno.h>
14345 #ifdef _WIN32
14346 #include <stdlib.h>
14347 #endif
14348 int
14349 main ()
14350 {
14351 char *c = (char *) *sys_errlist
14352   ;
14353   return 0;
14354 }
14355 _ACEOF
14356 if ac_fn_c_try_compile "$LINENO"; then :
14357   ol_cv_dcl_sys_errlist=yes
14358         ol_cv_have_sys_errlist=yes
14359 else
14360   ol_cv_dcl_sys_errlist=no
14361 fi
14362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14363 fi
14364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14365 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14366 #
14367 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14368 if test $ol_cv_dcl_sys_errlist = no ; then
14369
14370 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14371
14372
14373         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14374 $as_echo_n "checking existence of sys_errlist... " >&6; }
14375 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14376   $as_echo_n "(cached) " >&6
14377 else
14378
14379                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14380 /* end confdefs.h.  */
14381 #include <errno.h>
14382 int
14383 main ()
14384 {
14385 char *c = (char *) *sys_errlist
14386   ;
14387   return 0;
14388 }
14389 _ACEOF
14390 if ac_fn_c_try_link "$LINENO"; then :
14391   ol_cv_have_sys_errlist=yes
14392 else
14393   ol_cv_have_sys_errlist=no
14394 fi
14395 rm -f core conftest.err conftest.$ac_objext \
14396     conftest$ac_exeext conftest.$ac_ext
14397 fi
14398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14399 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14400 fi
14401 if test $ol_cv_have_sys_errlist = yes ; then
14402
14403 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14404
14405 fi
14406  for ac_func in strerror strerror_r
14407 do :
14408   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14409 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14410 eval as_val=\$$as_ac_var
14411    if test "x$as_val" = x""yes; then :
14412   cat >>confdefs.h <<_ACEOF
14413 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14414 _ACEOF
14415
14416 fi
14417 done
14418
14419 ol_cv_func_strerror_r=no
14420 if test "${ac_cv_func_strerror_r}" = yes ; then
14421         { $as_echo "$as_me:${as_lineno-$LINENO}: checking non-posix strerror_r" >&5
14422 $as_echo_n "checking non-posix strerror_r... " >&6; }
14423 if test "${ol_cv_nonposix_strerror_r+set}" = set; then :
14424   $as_echo_n "(cached) " >&6
14425 else
14426
14427         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14428 /* end confdefs.h.  */
14429 #include <string.h>
14430 _ACEOF
14431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14432   $EGREP "strerror_r" >/dev/null 2>&1; then :
14433   ol_decl_strerror_r=yes
14434 else
14435   ol_decl_strerror_r=no
14436 fi
14437 rm -f conftest*
14438
14439         if test $ol_decl_strerror_r = yes ; then
14440                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14441 /* end confdefs.h.  */
14442 #include <string.h>
14443 int
14444 main ()
14445 {
14446    /* from autoconf 2.59 */
14447                                 char buf[100];
14448                                 char x = *strerror_r (0, buf, sizeof buf);
14449                                 char *p = strerror_r (0, buf, sizeof buf);
14450
14451   ;
14452   return 0;
14453 }
14454 _ACEOF
14455 if ac_fn_c_try_compile "$LINENO"; then :
14456   ol_cv_nonposix_strerror_r=yes
14457 else
14458   ol_cv_nonposix_strerror_r=no
14459 fi
14460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14461         else
14462                 if test "$cross_compiling" = yes; then :
14463   ol_cv_nonposix_strerror=no
14464 else
14465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14466 /* end confdefs.h.  */
14467
14468                         main() {
14469                                 char buf[100];
14470                                 buf[0] = 0;
14471                                 strerror_r( 1, buf, sizeof buf );
14472                                 exit( buf[0] == 0 );
14473                         }
14474
14475 _ACEOF
14476 if ac_fn_c_try_run "$LINENO"; then :
14477   ol_cv_nonposix_strerror_r=yes
14478 else
14479   ol_cv_nonposix_strerror=no
14480 fi
14481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14482   conftest.$ac_objext conftest.beam conftest.$ac_ext
14483 fi
14484
14485         fi
14486
14487 fi
14488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_nonposix_strerror_r" >&5
14489 $as_echo "$ol_cv_nonposix_strerror_r" >&6; }
14490 if test $ol_cv_nonposix_strerror_r = yes ; then
14491
14492 $as_echo "#define HAVE_NONPOSIX_STRERROR_R 1" >>confdefs.h
14493
14494 fi
14495
14496 elif test "${ac_cv_func_strerror}" = no ; then
14497         { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14498 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14499 if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14500   $as_echo_n "(cached) " >&6
14501 else
14502
14503         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14504 /* end confdefs.h.  */
14505
14506 #include <stdio.h>
14507 #include <sys/types.h>
14508 #include <errno.h>
14509 #ifdef _WIN32
14510 #include <stdlib.h>
14511 #endif
14512 int
14513 main ()
14514 {
14515 char *c = (char *) *sys_errlist
14516   ;
14517   return 0;
14518 }
14519 _ACEOF
14520 if ac_fn_c_try_compile "$LINENO"; then :
14521   ol_cv_dcl_sys_errlist=yes
14522         ol_cv_have_sys_errlist=yes
14523 else
14524   ol_cv_dcl_sys_errlist=no
14525 fi
14526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14527 fi
14528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14529 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14530 #
14531 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14532 if test $ol_cv_dcl_sys_errlist = no ; then
14533
14534 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14535
14536
14537         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14538 $as_echo_n "checking existence of sys_errlist... " >&6; }
14539 if test "${ol_cv_have_sys_errlist+set}" = set; then :
14540   $as_echo_n "(cached) " >&6
14541 else
14542
14543                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14544 /* end confdefs.h.  */
14545 #include <errno.h>
14546 int
14547 main ()
14548 {
14549 char *c = (char *) *sys_errlist
14550   ;
14551   return 0;
14552 }
14553 _ACEOF
14554 if ac_fn_c_try_link "$LINENO"; then :
14555   ol_cv_have_sys_errlist=yes
14556 else
14557   ol_cv_have_sys_errlist=no
14558 fi
14559 rm -f core conftest.err conftest.$ac_objext \
14560     conftest$ac_exeext conftest.$ac_ext
14561 fi
14562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14563 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14564 fi
14565 if test $ol_cv_have_sys_errlist = yes ; then
14566
14567 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14568
14569 fi
14570
14571 fi
14572
14573
14574 for ac_header in regex.h
14575 do :
14576   ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default
14577 #ifdef HAVE_SYS_TYPES_H
14578 #include <sys/types.h>
14579 #endif
14580
14581 "
14582 if test "x$ac_cv_header_regex_h" = x""yes; then :
14583   cat >>confdefs.h <<_ACEOF
14584 #define HAVE_REGEX_H 1
14585 _ACEOF
14586
14587 fi
14588
14589 done
14590
14591
14592 if test "$ac_cv_header_regex_h" != yes ; then
14593         as_fn_error "POSIX regex.h required." "$LINENO" 5
14594 fi
14595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing regfree" >&5
14596 $as_echo_n "checking for library containing regfree... " >&6; }
14597 if test "${ac_cv_search_regfree+set}" = set; then :
14598   $as_echo_n "(cached) " >&6
14599 else
14600   ac_func_search_save_LIBS=$LIBS
14601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14602 /* end confdefs.h.  */
14603
14604 /* Override any GCC internal prototype to avoid an error.
14605    Use char because int might match the return type of a GCC
14606    builtin and then its argument prototype would still apply.  */
14607 #ifdef __cplusplus
14608 extern "C"
14609 #endif
14610 char regfree ();
14611 int
14612 main ()
14613 {
14614 return regfree ();
14615   ;
14616   return 0;
14617 }
14618 _ACEOF
14619 for ac_lib in '' regex gnuregex; do
14620   if test -z "$ac_lib"; then
14621     ac_res="none required"
14622   else
14623     ac_res=-l$ac_lib
14624     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14625   fi
14626   if ac_fn_c_try_link "$LINENO"; then :
14627   ac_cv_search_regfree=$ac_res
14628 fi
14629 rm -f core conftest.err conftest.$ac_objext \
14630     conftest$ac_exeext
14631   if test "${ac_cv_search_regfree+set}" = set; then :
14632   break
14633 fi
14634 done
14635 if test "${ac_cv_search_regfree+set}" = set; then :
14636
14637 else
14638   ac_cv_search_regfree=no
14639 fi
14640 rm conftest.$ac_ext
14641 LIBS=$ac_func_search_save_LIBS
14642 fi
14643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_regfree" >&5
14644 $as_echo "$ac_cv_search_regfree" >&6; }
14645 ac_res=$ac_cv_search_regfree
14646 if test "$ac_res" != no; then :
14647   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14648   :
14649 else
14650   as_fn_error "POSIX regex required." "$LINENO" 5
14651 fi
14652
14653
14654
14655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible POSIX regex" >&5
14656 $as_echo_n "checking for compatible POSIX regex... " >&6; }
14657 if test "${ol_cv_c_posix_regex+set}" = set; then :
14658   $as_echo_n "(cached) " >&6
14659 else
14660
14661         if test "$cross_compiling" = yes; then :
14662   ol_cv_c_posix_regex=cross
14663 else
14664   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14665 /* end confdefs.h.  */
14666
14667 #include <sys/types.h>
14668 #include <regex.h>
14669 static char *pattern, *string;
14670 main()
14671 {
14672         int rc;
14673         regex_t re;
14674
14675         pattern = "^A";
14676
14677         if(regcomp(&re, pattern, 0)) {
14678                 return -1;
14679         }
14680
14681         string = "ALL MATCH";
14682
14683         rc = regexec(&re, string, 0, (void*)0, 0);
14684
14685         regfree(&re);
14686
14687         return rc;
14688 }
14689 _ACEOF
14690 if ac_fn_c_try_run "$LINENO"; then :
14691   ol_cv_c_posix_regex=yes
14692 else
14693   ol_cv_c_posix_regex=no
14694 fi
14695 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14696   conftest.$ac_objext conftest.beam conftest.$ac_ext
14697 fi
14698
14699 fi
14700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_posix_regex" >&5
14701 $as_echo "$ol_cv_c_posix_regex" >&6; }
14702
14703 if test "$ol_cv_c_posix_regex" = no ; then
14704         as_fn_error "broken POSIX regex!" "$LINENO" 5
14705 fi
14706
14707
14708 have_uuid=no
14709 for ac_header in sys/uuid.h
14710 do :
14711   ac_fn_c_check_header_mongrel "$LINENO" "sys/uuid.h" "ac_cv_header_sys_uuid_h" "$ac_includes_default"
14712 if test "x$ac_cv_header_sys_uuid_h" = x""yes; then :
14713   cat >>confdefs.h <<_ACEOF
14714 #define HAVE_SYS_UUID_H 1
14715 _ACEOF
14716
14717 fi
14718
14719 done
14720
14721 if test $ac_cv_header_sys_uuid_h = yes ; then
14722         save_LIBS="$LIBS"
14723         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_to_str" >&5
14724 $as_echo_n "checking for library containing uuid_to_str... " >&6; }
14725 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14726   $as_echo_n "(cached) " >&6
14727 else
14728   ac_func_search_save_LIBS=$LIBS
14729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14730 /* end confdefs.h.  */
14731
14732 /* Override any GCC internal prototype to avoid an error.
14733    Use char because int might match the return type of a GCC
14734    builtin and then its argument prototype would still apply.  */
14735 #ifdef __cplusplus
14736 extern "C"
14737 #endif
14738 char uuid_to_str ();
14739 int
14740 main ()
14741 {
14742 return uuid_to_str ();
14743   ;
14744   return 0;
14745 }
14746 _ACEOF
14747 for ac_lib in '' uuid; do
14748   if test -z "$ac_lib"; then
14749     ac_res="none required"
14750   else
14751     ac_res=-l$ac_lib
14752     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14753   fi
14754   if ac_fn_c_try_link "$LINENO"; then :
14755   ac_cv_search_uuid_to_str=$ac_res
14756 fi
14757 rm -f core conftest.err conftest.$ac_objext \
14758     conftest$ac_exeext
14759   if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14760   break
14761 fi
14762 done
14763 if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14764
14765 else
14766   ac_cv_search_uuid_to_str=no
14767 fi
14768 rm conftest.$ac_ext
14769 LIBS=$ac_func_search_save_LIBS
14770 fi
14771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_to_str" >&5
14772 $as_echo "$ac_cv_search_uuid_to_str" >&6; }
14773 ac_res=$ac_cv_search_uuid_to_str
14774 if test "$ac_res" != no; then :
14775   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14776   have_uuid=yes
14777 else
14778   :
14779 fi
14780
14781         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_create" >&5
14782 $as_echo_n "checking for library containing uuid_create... " >&6; }
14783 if test "${ac_cv_search_uuid_create+set}" = set; then :
14784   $as_echo_n "(cached) " >&6
14785 else
14786   ac_func_search_save_LIBS=$LIBS
14787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14788 /* end confdefs.h.  */
14789
14790 /* Override any GCC internal prototype to avoid an error.
14791    Use char because int might match the return type of a GCC
14792    builtin and then its argument prototype would still apply.  */
14793 #ifdef __cplusplus
14794 extern "C"
14795 #endif
14796 char uuid_create ();
14797 int
14798 main ()
14799 {
14800 return uuid_create ();
14801   ;
14802   return 0;
14803 }
14804 _ACEOF
14805 for ac_lib in '' uuid; do
14806   if test -z "$ac_lib"; then
14807     ac_res="none required"
14808   else
14809     ac_res=-l$ac_lib
14810     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14811   fi
14812   if ac_fn_c_try_link "$LINENO"; then :
14813   ac_cv_search_uuid_create=$ac_res
14814 fi
14815 rm -f core conftest.err conftest.$ac_objext \
14816     conftest$ac_exeext
14817   if test "${ac_cv_search_uuid_create+set}" = set; then :
14818   break
14819 fi
14820 done
14821 if test "${ac_cv_search_uuid_create+set}" = set; then :
14822
14823 else
14824   ac_cv_search_uuid_create=no
14825 fi
14826 rm conftest.$ac_ext
14827 LIBS=$ac_func_search_save_LIBS
14828 fi
14829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_create" >&5
14830 $as_echo "$ac_cv_search_uuid_create" >&6; }
14831 ac_res=$ac_cv_search_uuid_create
14832 if test "$ac_res" != no; then :
14833   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14834   :
14835 else
14836   have_uuid=no
14837 fi
14838
14839         LIBS="$save_LIBS"
14840
14841         if test $have_uuid = yes ; then
14842
14843 $as_echo "#define HAVE_UUID_TO_STR 1" >>confdefs.h
14844
14845
14846                 test "$ac_cv_search_uuid_to_str" = "none required" || \
14847                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
14848         fi
14849 fi
14850
14851 if test $have_uuid = no ; then
14852         for ac_header in uuid/uuid.h
14853 do :
14854   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14855 if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then :
14856   cat >>confdefs.h <<_ACEOF
14857 #define HAVE_UUID_UUID_H 1
14858 _ACEOF
14859
14860 fi
14861
14862 done
14863
14864         if test $ac_cv_header_uuid_uuid_h = yes ; then
14865                 save_LIBS="$LIBS"
14866                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
14867 $as_echo_n "checking for library containing uuid_generate... " >&6; }
14868 if test "${ac_cv_search_uuid_generate+set}" = set; then :
14869   $as_echo_n "(cached) " >&6
14870 else
14871   ac_func_search_save_LIBS=$LIBS
14872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14873 /* end confdefs.h.  */
14874
14875 /* Override any GCC internal prototype to avoid an error.
14876    Use char because int might match the return type of a GCC
14877    builtin and then its argument prototype would still apply.  */
14878 #ifdef __cplusplus
14879 extern "C"
14880 #endif
14881 char uuid_generate ();
14882 int
14883 main ()
14884 {
14885 return uuid_generate ();
14886   ;
14887   return 0;
14888 }
14889 _ACEOF
14890 for ac_lib in '' uuid; do
14891   if test -z "$ac_lib"; then
14892     ac_res="none required"
14893   else
14894     ac_res=-l$ac_lib
14895     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14896   fi
14897   if ac_fn_c_try_link "$LINENO"; then :
14898   ac_cv_search_uuid_generate=$ac_res
14899 fi
14900 rm -f core conftest.err conftest.$ac_objext \
14901     conftest$ac_exeext
14902   if test "${ac_cv_search_uuid_generate+set}" = set; then :
14903   break
14904 fi
14905 done
14906 if test "${ac_cv_search_uuid_generate+set}" = set; then :
14907
14908 else
14909   ac_cv_search_uuid_generate=no
14910 fi
14911 rm conftest.$ac_ext
14912 LIBS=$ac_func_search_save_LIBS
14913 fi
14914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
14915 $as_echo "$ac_cv_search_uuid_generate" >&6; }
14916 ac_res=$ac_cv_search_uuid_generate
14917 if test "$ac_res" != no; then :
14918   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14919   have_uuid=yes
14920 else
14921   :
14922 fi
14923
14924                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_unparse_lower" >&5
14925 $as_echo_n "checking for library containing uuid_unparse_lower... " >&6; }
14926 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
14927   $as_echo_n "(cached) " >&6
14928 else
14929   ac_func_search_save_LIBS=$LIBS
14930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14931 /* end confdefs.h.  */
14932
14933 /* Override any GCC internal prototype to avoid an error.
14934    Use char because int might match the return type of a GCC
14935    builtin and then its argument prototype would still apply.  */
14936 #ifdef __cplusplus
14937 extern "C"
14938 #endif
14939 char uuid_unparse_lower ();
14940 int
14941 main ()
14942 {
14943 return uuid_unparse_lower ();
14944   ;
14945   return 0;
14946 }
14947 _ACEOF
14948 for ac_lib in '' uuid; do
14949   if test -z "$ac_lib"; then
14950     ac_res="none required"
14951   else
14952     ac_res=-l$ac_lib
14953     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14954   fi
14955   if ac_fn_c_try_link "$LINENO"; then :
14956   ac_cv_search_uuid_unparse_lower=$ac_res
14957 fi
14958 rm -f core conftest.err conftest.$ac_objext \
14959     conftest$ac_exeext
14960   if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
14961   break
14962 fi
14963 done
14964 if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
14965
14966 else
14967   ac_cv_search_uuid_unparse_lower=no
14968 fi
14969 rm conftest.$ac_ext
14970 LIBS=$ac_func_search_save_LIBS
14971 fi
14972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_unparse_lower" >&5
14973 $as_echo "$ac_cv_search_uuid_unparse_lower" >&6; }
14974 ac_res=$ac_cv_search_uuid_unparse_lower
14975 if test "$ac_res" != no; then :
14976   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14977   :
14978 else
14979   have_uuid=no
14980 fi
14981
14982                 LIBS="$save_LIBS"
14983
14984                 if test $have_uuid = yes ; then
14985
14986 $as_echo "#define HAVE_UUID_GENERATE 1" >>confdefs.h
14987
14988
14989                         test "$ac_cv_search_uuid_generate" = "none required" || \
14990                                 SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_generate"
14991                 fi
14992         fi
14993 fi
14994
14995 if test $have_uuid = no ; then
14996         { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
14997 $as_echo_n "checking to see if -lrpcrt4 is needed for win32 UUID support... " >&6; }
14998         save_LIBS="$LIBS"
14999         LIBS="$LIBS -lrpcrt4"
15000         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15001 /* end confdefs.h.  */
15002
15003                 int __stdcall UuidCreate(void *);
15004                 int __stdcall UuidToStringA(void *,void **);
15005
15006 int
15007 main ()
15008 {
15009
15010                 UuidCreate(0);
15011                 UuidToStringA(0,0);
15012
15013   ;
15014   return 0;
15015 }
15016 _ACEOF
15017 if ac_fn_c_try_link "$LINENO"; then :
15018   need_rpcrt=yes
15019 else
15020   need_rpcrt=no
15021 fi
15022 rm -f core conftest.err conftest.$ac_objext \
15023     conftest$ac_exeext conftest.$ac_ext
15024         if test $need_rpcrt = yes; then
15025                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
15026         fi
15027         LIBS="$save_LIBS"
15028         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_rpcrt" >&5
15029 $as_echo "$need_rpcrt" >&6; }
15030 fi
15031
15032 ol_cv_lib_resolver=no
15033 if test $ol_cv_lib_resolver = no ; then
15034         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (default)" >&5
15035 $as_echo_n "checking for resolver link (default)... " >&6; }
15036 if test "${ol_cv_resolver_none+set}" = set; then :
15037   $as_echo_n "(cached) " >&6
15038 else
15039
15040         ol_RESOLVER_LIB=
15041         ol_LIBS=$LIBS
15042         LIBS="$ol_RESOLVER_LIB $LIBS"
15043
15044         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15045 /* end confdefs.h.  */
15046
15047 #ifdef HAVE_SYS_TYPES_H
15048 #       include <sys/types.h>
15049 #endif
15050 #include <netinet/in.h>
15051 #ifdef HAVE_ARPA_NAMESER_H
15052 #       include <arpa/nameser.h>
15053 #endif
15054 #ifdef HAVE_RESOLV_H
15055 #       include <resolv.h>
15056 #endif
15057
15058 int
15059 main ()
15060 {
15061 {
15062         int len, status;
15063         char *request = NULL;
15064         unsigned char reply[64*1024];
15065         unsigned char host[64*1024];
15066         unsigned char *p;
15067
15068 #ifdef NS_HFIXEDSZ
15069         /* Bind 8/9 interface */
15070         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15071 #else
15072         /* Bind 4 interface */
15073 # ifndef T_SRV
15074 #  define T_SRV 33
15075 # endif
15076         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15077 #endif
15078         p = reply;
15079 #ifdef NS_HFIXEDSZ
15080         /* Bind 8/9 interface */
15081         p += NS_HFIXEDSZ;
15082 #elif defined(HFIXEDSZ)
15083         /* Bind 4 interface w/ HFIXEDSZ */
15084         p += HFIXEDSZ;
15085 #else
15086         /* Bind 4 interface w/o HFIXEDSZ */
15087         p += sizeof(HEADER);
15088 #endif
15089         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15090 }
15091   ;
15092   return 0;
15093 }
15094 _ACEOF
15095 if ac_fn_c_try_link "$LINENO"; then :
15096   ol_cv_resolver_none=yes
15097 else
15098   ol_cv_resolver_none=no
15099 fi
15100 rm -f core conftest.err conftest.$ac_objext \
15101     conftest$ac_exeext conftest.$ac_ext
15102
15103         LIBS="$ol_LIBS"
15104
15105 fi
15106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_none" >&5
15107 $as_echo "$ol_cv_resolver_none" >&6; }
15108
15109         if test $ol_cv_resolver_none = yes ; then
15110                 ol_cv_lib_resolver=yes
15111         fi
15112 fi
15113
15114 if test $ol_cv_lib_resolver = no ; then
15115         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lresolv)" >&5
15116 $as_echo_n "checking for resolver link (-lresolv)... " >&6; }
15117 if test "${ol_cv_resolver_resolv+set}" = set; then :
15118   $as_echo_n "(cached) " >&6
15119 else
15120
15121         ol_RESOLVER_LIB=-lresolv
15122         ol_LIBS=$LIBS
15123         LIBS="$ol_RESOLVER_LIB $LIBS"
15124
15125         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15126 /* end confdefs.h.  */
15127
15128 #ifdef HAVE_SYS_TYPES_H
15129 #       include <sys/types.h>
15130 #endif
15131 #include <netinet/in.h>
15132 #ifdef HAVE_ARPA_NAMESER_H
15133 #       include <arpa/nameser.h>
15134 #endif
15135 #ifdef HAVE_RESOLV_H
15136 #       include <resolv.h>
15137 #endif
15138
15139 int
15140 main ()
15141 {
15142 {
15143         int len, status;
15144         char *request = NULL;
15145         unsigned char reply[64*1024];
15146         unsigned char host[64*1024];
15147         unsigned char *p;
15148
15149 #ifdef NS_HFIXEDSZ
15150         /* Bind 8/9 interface */
15151         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15152 #else
15153         /* Bind 4 interface */
15154 # ifndef T_SRV
15155 #  define T_SRV 33
15156 # endif
15157         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15158 #endif
15159         p = reply;
15160 #ifdef NS_HFIXEDSZ
15161         /* Bind 8/9 interface */
15162         p += NS_HFIXEDSZ;
15163 #elif defined(HFIXEDSZ)
15164         /* Bind 4 interface w/ HFIXEDSZ */
15165         p += HFIXEDSZ;
15166 #else
15167         /* Bind 4 interface w/o HFIXEDSZ */
15168         p += sizeof(HEADER);
15169 #endif
15170         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15171 }
15172   ;
15173   return 0;
15174 }
15175 _ACEOF
15176 if ac_fn_c_try_link "$LINENO"; then :
15177   ol_cv_resolver_resolv=yes
15178 else
15179   ol_cv_resolver_resolv=no
15180 fi
15181 rm -f core conftest.err conftest.$ac_objext \
15182     conftest$ac_exeext conftest.$ac_ext
15183
15184         LIBS="$ol_LIBS"
15185
15186 fi
15187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_resolv" >&5
15188 $as_echo "$ol_cv_resolver_resolv" >&6; }
15189
15190         if test $ol_cv_resolver_resolv = yes ; then
15191                 ol_cv_lib_resolver=-lresolv
15192         fi
15193 fi
15194
15195 if test $ol_cv_lib_resolver = no ; then
15196         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lbind)" >&5
15197 $as_echo_n "checking for resolver link (-lbind)... " >&6; }
15198 if test "${ol_cv_resolver_bind+set}" = set; then :
15199   $as_echo_n "(cached) " >&6
15200 else
15201
15202         ol_RESOLVER_LIB=-lbind
15203         ol_LIBS=$LIBS
15204         LIBS="$ol_RESOLVER_LIB $LIBS"
15205
15206         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15207 /* end confdefs.h.  */
15208
15209 #ifdef HAVE_SYS_TYPES_H
15210 #       include <sys/types.h>
15211 #endif
15212 #include <netinet/in.h>
15213 #ifdef HAVE_ARPA_NAMESER_H
15214 #       include <arpa/nameser.h>
15215 #endif
15216 #ifdef HAVE_RESOLV_H
15217 #       include <resolv.h>
15218 #endif
15219
15220 int
15221 main ()
15222 {
15223 {
15224         int len, status;
15225         char *request = NULL;
15226         unsigned char reply[64*1024];
15227         unsigned char host[64*1024];
15228         unsigned char *p;
15229
15230 #ifdef NS_HFIXEDSZ
15231         /* Bind 8/9 interface */
15232         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15233 #else
15234         /* Bind 4 interface */
15235 # ifndef T_SRV
15236 #  define T_SRV 33
15237 # endif
15238         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15239 #endif
15240         p = reply;
15241 #ifdef NS_HFIXEDSZ
15242         /* Bind 8/9 interface */
15243         p += NS_HFIXEDSZ;
15244 #elif defined(HFIXEDSZ)
15245         /* Bind 4 interface w/ HFIXEDSZ */
15246         p += HFIXEDSZ;
15247 #else
15248         /* Bind 4 interface w/o HFIXEDSZ */
15249         p += sizeof(HEADER);
15250 #endif
15251         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15252 }
15253   ;
15254   return 0;
15255 }
15256 _ACEOF
15257 if ac_fn_c_try_link "$LINENO"; then :
15258   ol_cv_resolver_bind=yes
15259 else
15260   ol_cv_resolver_bind=no
15261 fi
15262 rm -f core conftest.err conftest.$ac_objext \
15263     conftest$ac_exeext conftest.$ac_ext
15264
15265         LIBS="$ol_LIBS"
15266
15267 fi
15268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_bind" >&5
15269 $as_echo "$ol_cv_resolver_bind" >&6; }
15270
15271         if test $ol_cv_resolver_bind = yes ; then
15272                 ol_cv_lib_resolver=-lbind
15273         fi
15274 fi
15275
15276
15277
15278 ol_link_dnssrv=no
15279 if test "$ol_cv_lib_resolver" != no ; then
15280
15281 $as_echo "#define HAVE_RES_QUERY 1" >>confdefs.h
15282
15283
15284         if test "$ol_enable_dnssrv" != no ; then
15285                 ol_link_dnssrv=yes
15286         fi
15287
15288         if test "$ol_cv_lib_resolver" != yes ; then
15289                 LIBS="$ol_cv_lib_resolver $LIBS"
15290         fi
15291 fi
15292
15293 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
15294         if test "$ol_link_dnssrv" = no ; then
15295                 as_fn_error "DNSSRV requires res_query()" "$LINENO" 5
15296         fi
15297 else
15298         ol_enable_dnssrv=no
15299 fi
15300
15301 for ac_func in hstrerror
15302 do :
15303   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15304 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15305 eval as_val=\$$as_ac_var
15306    if test "x$as_val" = x""yes; then :
15307   cat >>confdefs.h <<_ACEOF
15308 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15309 _ACEOF
15310
15311 fi
15312 done
15313
15314
15315 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
15316 do :
15317   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15318 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15319 eval as_val=\$$as_ac_var
15320    if test "x$as_val" = x""yes; then :
15321   cat >>confdefs.h <<_ACEOF
15322 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15323 _ACEOF
15324
15325 fi
15326 done
15327
15328
15329 ol_link_ipv6=no
15330 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
15331         if test $ol_enable_ipv6 = yes ; then
15332                 as_fn_error "IPv6 support requires getaddrinfo() and inet_ntop()" "$LINENO" 5
15333         fi
15334 elif test $ol_enable_ipv6 != no ; then
15335         { $as_echo "$as_me:${as_lineno-$LINENO}: checking INET6_ADDRSTRLEN" >&5
15336 $as_echo_n "checking INET6_ADDRSTRLEN... " >&6; }
15337 if test "${ol_cv_inet6_addrstrlen+set}" = set; then :
15338   $as_echo_n "(cached) " >&6
15339 else
15340
15341                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15342 /* end confdefs.h.  */
15343
15344 #                       include <netinet/in.h>
15345 #                       ifdef INET6_ADDRSTRLEN
15346                                 __has_inet6_addrstrlen__;
15347 #                       endif
15348
15349 _ACEOF
15350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15351   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then :
15352   ol_cv_inet6_addrstrlen=yes
15353 else
15354   ol_cv_inet6_addrstrlen=no
15355 fi
15356 rm -f conftest*
15357
15358 fi
15359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_inet6_addrstrlen" >&5
15360 $as_echo "$ol_cv_inet6_addrstrlen" >&6; }
15361
15362
15363         { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr_storage" >&5
15364 $as_echo_n "checking struct sockaddr_storage... " >&6; }
15365 if test "${ol_cv_struct_sockaddr_storage+set}" = set; then :
15366   $as_echo_n "(cached) " >&6
15367 else
15368
15369                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15370 /* end confdefs.h.  */
15371
15372 #include <sys/types.h>
15373 #include <sys/socket.h>
15374
15375 int
15376 main ()
15377 {
15378
15379                         struct sockaddr_storage ss;
15380
15381   ;
15382   return 0;
15383 }
15384 _ACEOF
15385 if ac_fn_c_try_compile "$LINENO"; then :
15386   ol_cv_struct_sockaddr_storage=yes
15387 else
15388   ol_cv_struct_sockaddr_storage=no
15389 fi
15390 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15391 fi
15392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_struct_sockaddr_storage" >&5
15393 $as_echo "$ol_cv_struct_sockaddr_storage" >&6; }
15394
15395         if test $ol_cv_inet6_addrstrlen = yes &&
15396            test $ol_cv_struct_sockaddr_storage = yes ; then
15397                 ol_link_ipv6=yes
15398         elif test $ol_enable_ipv6 = yes &&
15399              test $ol_cv_inet6_addrstrlen = no ; then
15400                 as_fn_error "IPv6 support requires INET6_ADDRSTRLEN" "$LINENO" 5
15401         elif test $ol_enable_ipv6 = yes &&
15402              test $ol_cv_struct_sockaddr_storage = no ; then
15403                 as_fn_error "IPv6 support requires struct sockaddr_storage" "$LINENO" 5
15404         fi
15405 fi
15406
15407 if test $ol_enable_local != no ; then
15408         for ac_header in sys/un.h
15409 do :
15410   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15411 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15412 eval as_val=\$$as_ac_Header
15413    if test "x$as_val" = x""yes; then :
15414   cat >>confdefs.h <<_ACEOF
15415 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15416 _ACEOF
15417
15418 fi
15419
15420 done
15421
15422
15423         if test $ol_enable_local = auto ; then
15424                 ol_enable_local=$ac_cv_header_sys_un_h
15425         elif test $ac_cv_header_sys_un_h = no ; then
15426                 as_fn_error "AF_LOCAL domain support requires sys/un.h" "$LINENO" 5
15427         fi
15428 fi
15429
15430
15431 if test $ol_with_tls = yes ; then
15432         ol_with_tls=auto
15433 fi
15434
15435 ol_link_tls=no
15436 if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
15437         for ac_header in openssl/ssl.h
15438 do :
15439   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
15440 if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then :
15441   cat >>confdefs.h <<_ACEOF
15442 #define HAVE_OPENSSL_SSL_H 1
15443 _ACEOF
15444
15445 fi
15446
15447 done
15448
15449
15450         if test $ac_cv_header_openssl_ssl_h = yes ; then
15451                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
15452 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
15453 if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then :
15454   $as_echo_n "(cached) " >&6
15455 else
15456   ac_check_lib_save_LIBS=$LIBS
15457 LIBS="-lssl -lcrypto $LIBS"
15458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15459 /* end confdefs.h.  */
15460
15461 /* Override any GCC internal prototype to avoid an error.
15462    Use char because int might match the return type of a GCC
15463    builtin and then its argument prototype would still apply.  */
15464 #ifdef __cplusplus
15465 extern "C"
15466 #endif
15467 char SSL_library_init ();
15468 int
15469 main ()
15470 {
15471 return SSL_library_init ();
15472   ;
15473   return 0;
15474 }
15475 _ACEOF
15476 if ac_fn_c_try_link "$LINENO"; then :
15477   ac_cv_lib_ssl_SSL_library_init=yes
15478 else
15479   ac_cv_lib_ssl_SSL_library_init=no
15480 fi
15481 rm -f core conftest.err conftest.$ac_objext \
15482     conftest$ac_exeext conftest.$ac_ext
15483 LIBS=$ac_check_lib_save_LIBS
15484 fi
15485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
15486 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
15487 if test "x$ac_cv_lib_ssl_SSL_library_init" = x""yes; then :
15488   have_openssl=yes
15489                         need_rsaref=no
15490 else
15491   have_openssl=no
15492 fi
15493
15494
15495                 if test $have_openssl = no ; then
15496                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl3_accept in -lssl" >&5
15497 $as_echo_n "checking for ssl3_accept in -lssl... " >&6; }
15498 if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then :
15499   $as_echo_n "(cached) " >&6
15500 else
15501   ac_check_lib_save_LIBS=$LIBS
15502 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
15503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15504 /* end confdefs.h.  */
15505
15506 /* Override any GCC internal prototype to avoid an error.
15507    Use char because int might match the return type of a GCC
15508    builtin and then its argument prototype would still apply.  */
15509 #ifdef __cplusplus
15510 extern "C"
15511 #endif
15512 char ssl3_accept ();
15513 int
15514 main ()
15515 {
15516 return ssl3_accept ();
15517   ;
15518   return 0;
15519 }
15520 _ACEOF
15521 if ac_fn_c_try_link "$LINENO"; then :
15522   ac_cv_lib_ssl_ssl3_accept=yes
15523 else
15524   ac_cv_lib_ssl_ssl3_accept=no
15525 fi
15526 rm -f core conftest.err conftest.$ac_objext \
15527     conftest$ac_exeext conftest.$ac_ext
15528 LIBS=$ac_check_lib_save_LIBS
15529 fi
15530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_ssl3_accept" >&5
15531 $as_echo "$ac_cv_lib_ssl_ssl3_accept" >&6; }
15532 if test "x$ac_cv_lib_ssl_ssl3_accept" = x""yes; then :
15533   have_openssl=yes
15534                                 need_rsaref=yes
15535 else
15536   have_openssl=no
15537 fi
15538
15539                 fi
15540
15541                 if test $have_openssl = yes ; then
15542                         ol_with_tls=openssl
15543                         ol_link_tls=yes
15544
15545
15546 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
15547
15548
15549                         if test $need_rsaref = yes; then
15550
15551 $as_echo "#define HAVE_RSAREF 1" >>confdefs.h
15552
15553
15554                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
15555                         else
15556                                 TLS_LIBS="-lssl -lcrypto"
15557                         fi
15558
15559                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version (CRL checking capability)" >&5
15560 $as_echo_n "checking OpenSSL library version (CRL checking capability)... " >&6; }
15561 if test "${ol_cv_ssl_crl_compat+set}" = set; then :
15562   $as_echo_n "(cached) " >&6
15563 else
15564
15565                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15566 /* end confdefs.h.  */
15567
15568 #ifdef HAVE_OPENSSL_SSL_H
15569 #include <openssl/ssl.h>
15570 #endif
15571
15572 /* Require 0.9.7d+ */
15573 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
15574         char *__ssl_compat = "0.9.7d";
15575 #endif
15576
15577 _ACEOF
15578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15579   $EGREP "__ssl_compat" >/dev/null 2>&1; then :
15580   ol_cv_ssl_crl_compat=yes
15581 else
15582   ol_cv_ssl_crl_compat=no
15583 fi
15584 rm -f conftest*
15585
15586 fi
15587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_ssl_crl_compat" >&5
15588 $as_echo "$ol_cv_ssl_crl_compat" >&6; }
15589
15590                         if test $ol_cv_ssl_crl_compat = yes ; then
15591
15592 $as_echo "#define HAVE_OPENSSL_CRL 1" >>confdefs.h
15593
15594                         fi
15595                 fi
15596         fi
15597 fi
15598
15599 if test $ol_link_tls = no ; then
15600         if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then
15601                 for ac_header in gnutls/gnutls.h
15602 do :
15603   ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
15604 if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then :
15605   cat >>confdefs.h <<_ACEOF
15606 #define HAVE_GNUTLS_GNUTLS_H 1
15607 _ACEOF
15608
15609 fi
15610
15611 done
15612
15613
15614                 if test $ac_cv_header_gnutls_gnutls_h = yes ; then
15615                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
15616 $as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
15617 if test "${ac_cv_lib_gnutls_gnutls_init+set}" = set; then :
15618   $as_echo_n "(cached) " >&6
15619 else
15620   ac_check_lib_save_LIBS=$LIBS
15621 LIBS="-lgnutls  $LIBS"
15622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15623 /* end confdefs.h.  */
15624
15625 /* Override any GCC internal prototype to avoid an error.
15626    Use char because int might match the return type of a GCC
15627    builtin and then its argument prototype would still apply.  */
15628 #ifdef __cplusplus
15629 extern "C"
15630 #endif
15631 char gnutls_init ();
15632 int
15633 main ()
15634 {
15635 return gnutls_init ();
15636   ;
15637   return 0;
15638 }
15639 _ACEOF
15640 if ac_fn_c_try_link "$LINENO"; then :
15641   ac_cv_lib_gnutls_gnutls_init=yes
15642 else
15643   ac_cv_lib_gnutls_gnutls_init=no
15644 fi
15645 rm -f core conftest.err conftest.$ac_objext \
15646     conftest$ac_exeext conftest.$ac_ext
15647 LIBS=$ac_check_lib_save_LIBS
15648 fi
15649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_init" >&5
15650 $as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
15651 if test "x$ac_cv_lib_gnutls_gnutls_init" = x""yes; then :
15652   have_gnutls=yes
15653 else
15654   have_gnutls=no
15655 fi
15656
15657
15658                         if test $have_gnutls = yes ; then
15659                                 ol_with_tls=gnutls
15660                                 ol_link_tls=yes
15661
15662                                 TLS_LIBS="-lgnutls"
15663
15664
15665 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
15666
15667                         fi
15668                 fi
15669         fi
15670 fi
15671
15672 if test $ol_link_tls = no ; then
15673         if test $ol_with_tls = moznss || test $ol_with_tls = auto ; then
15674                 have_moznss=no
15675                 for ac_header in nssutil.h
15676 do :
15677   ac_fn_c_check_header_mongrel "$LINENO" "nssutil.h" "ac_cv_header_nssutil_h" "$ac_includes_default"
15678 if test "x$ac_cv_header_nssutil_h" = x""yes; then :
15679   cat >>confdefs.h <<_ACEOF
15680 #define HAVE_NSSUTIL_H 1
15681 _ACEOF
15682
15683 fi
15684
15685 done
15686
15687                 if test "$ac_cv_header_nssutil_h" = yes ; then
15688                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_Initialize in -lnss3" >&5
15689 $as_echo_n "checking for NSS_Initialize in -lnss3... " >&6; }
15690 if test "${ac_cv_lib_nss3_NSS_Initialize+set}" = set; then :
15691   $as_echo_n "(cached) " >&6
15692 else
15693   ac_check_lib_save_LIBS=$LIBS
15694 LIBS="-lnss3  $LIBS"
15695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15696 /* end confdefs.h.  */
15697
15698 /* Override any GCC internal prototype to avoid an error.
15699    Use char because int might match the return type of a GCC
15700    builtin and then its argument prototype would still apply.  */
15701 #ifdef __cplusplus
15702 extern "C"
15703 #endif
15704 char NSS_Initialize ();
15705 int
15706 main ()
15707 {
15708 return NSS_Initialize ();
15709   ;
15710   return 0;
15711 }
15712 _ACEOF
15713 if ac_fn_c_try_link "$LINENO"; then :
15714   ac_cv_lib_nss3_NSS_Initialize=yes
15715 else
15716   ac_cv_lib_nss3_NSS_Initialize=no
15717 fi
15718 rm -f core conftest.err conftest.$ac_objext \
15719     conftest$ac_exeext conftest.$ac_ext
15720 LIBS=$ac_check_lib_save_LIBS
15721 fi
15722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_NSS_Initialize" >&5
15723 $as_echo "$ac_cv_lib_nss3_NSS_Initialize" >&6; }
15724 if test "x$ac_cv_lib_nss3_NSS_Initialize" = x""yes; then :
15725    have_moznss=yes
15726 else
15727    have_moznss=no
15728 fi
15729
15730                 fi
15731
15732                 if test "$have_moznss" = yes ; then
15733                         ol_with_tls=moznss
15734                         ol_link_tls=yes
15735
15736 $as_echo "#define HAVE_MOZNSS 1" >>confdefs.h
15737
15738                         TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
15739                 else
15740                         as_fn_error "MozNSS not found - please specify the location to the NSPR and NSS header files in CPPFLAGS and the location to the NSPR and NSS libraries in LDFLAGS (if not in the system location)" "$LINENO" 5
15741                 fi
15742         fi
15743 fi
15744
15745 WITH_TLS=no
15746 if test $ol_link_tls = yes ; then
15747
15748 $as_echo "#define HAVE_TLS 1" >>confdefs.h
15749
15750         WITH_TLS=yes
15751 elif test $ol_with_tls = auto ; then
15752         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate TLS/SSL package" >&5
15753 $as_echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
15754         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15755 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15756 elif test $ol_with_tls != no ; then
15757         as_fn_error "Could not locate TLS/SSL package" "$LINENO" 5
15758 else
15759         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15760 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15761 fi
15762
15763 if test $ol_enable_lmpasswd != no; then
15764         if test $ol_link_tls != yes ; then
15765                 as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
15766         fi
15767
15768
15769 $as_echo "#define SLAPD_LMHASH 1" >>confdefs.h
15770
15771 fi
15772
15773 ol_link_threads=no
15774
15775 case $ol_with_threads in auto | yes | nt)
15776
15777
15778         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
15779 if test "x$ac_cv_func__beginthread" = x""yes; then :
15780
15781 fi
15782
15783
15784         if test $ac_cv_func__beginthread = yes ; then
15785
15786 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
15787
15788                 ol_cv_nt_threads=yes
15789         fi
15790
15791
15792         if test "$ol_cv_nt_threads" = yes ; then
15793                 ol_link_threads=nt
15794                 ol_with_threads=found
15795                 ol_with_yielding_select=yes
15796
15797
15798 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
15799
15800
15801 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
15802
15803         fi
15804
15805         if test $ol_with_threads = nt ; then
15806                 as_fn_error "could not locate NT Threads" "$LINENO" 5
15807         fi
15808         ;;
15809 esac
15810
15811 case $ol_with_threads in auto | yes | posix)
15812
15813         for ac_header in pthread.h
15814 do :
15815   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15816 if test "x$ac_cv_header_pthread_h" = x""yes; then :
15817   cat >>confdefs.h <<_ACEOF
15818 #define HAVE_PTHREAD_H 1
15819 _ACEOF
15820
15821 fi
15822
15823 done
15824
15825
15826         if test $ac_cv_header_pthread_h = yes ; then
15827                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
15828 $as_echo_n "checking POSIX thread version... " >&6; }
15829 if test "${ol_cv_pthread_version+set}" = set; then :
15830   $as_echo_n "(cached) " >&6
15831 else
15832
15833         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15834 /* end confdefs.h.  */
15835
15836 #               include <pthread.h>
15837
15838 int
15839 main ()
15840 {
15841
15842                 int i = PTHREAD_CREATE_JOINABLE;
15843
15844   ;
15845   return 0;
15846 }
15847 _ACEOF
15848 if ac_fn_c_try_compile "$LINENO"; then :
15849
15850         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15851 /* end confdefs.h.  */
15852 #include <pthread.h>
15853
15854 _ACEOF
15855 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15856   $EGREP "pthread_detach" >/dev/null 2>&1; then :
15857   ol_cv_pthread_version=10
15858 else
15859   ol_cv_pthread_version=8
15860 fi
15861 rm -f conftest*
15862
15863 else
15864
15865         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15866 /* end confdefs.h.  */
15867
15868 #               include <pthread.h>
15869 #               ifdef PTHREAD_CREATE_UNDETACHED
15870                 draft7
15871 #               endif
15872
15873 _ACEOF
15874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15875   $EGREP "draft7" >/dev/null 2>&1; then :
15876   ol_cv_pthread_version=7
15877 else
15878
15879         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15880 /* end confdefs.h.  */
15881 #include <pthread.h>
15882
15883 _ACEOF
15884 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15885   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
15886   ol_cv_pthread_version=6
15887 else
15888
15889         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15890 /* end confdefs.h.  */
15891
15892 #               include <pthread.h>
15893 #ifdef          PTHREAD_MUTEX_INITIALIZER
15894                 draft5
15895 #endif
15896
15897 _ACEOF
15898 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15899   $EGREP "draft5" >/dev/null 2>&1; then :
15900   ol_cv_pthread_version=5
15901 else
15902   ol_cv_pthread_version=4
15903 fi
15904 rm -f conftest*
15905
15906 fi
15907 rm -f conftest*
15908
15909 fi
15910 rm -f conftest*
15911
15912 fi
15913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15914
15915 fi
15916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
15917 $as_echo "$ol_cv_pthread_version" >&6; }
15918
15919
15920                 if test $ol_cv_pthread_version != 0 ; then
15921
15922 cat >>confdefs.h <<_ACEOF
15923 #define HAVE_PTHREADS $ol_cv_pthread_version
15924 _ACEOF
15925
15926                 else
15927                         as_fn_error "unknown pthread version" "$LINENO" 5
15928                 fi
15929
15930                 # consider threads found
15931                 ol_with_threads=found
15932
15933
15934         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
15935 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
15936 if test "${ol_cv_header_linux_threads+set}" = set; then :
15937   $as_echo_n "(cached) " >&6
15938 else
15939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15940 /* end confdefs.h.  */
15941 #include <pthread.h>
15942 _ACEOF
15943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15944   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
15945   ol_cv_header_linux_threads=yes
15946 else
15947   ol_cv_header_linux_threads=no
15948 fi
15949 rm -f conftest*
15950
15951
15952 fi
15953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
15954 $as_echo "$ol_cv_header_linux_threads" >&6; }
15955         if test $ol_cv_header_linux_threads = yes; then
15956
15957 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
15958
15959         fi
15960
15961
15962         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
15963 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
15964 if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then :
15965   $as_echo_n "(cached) " >&6
15966 else
15967   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15968 /* end confdefs.h.  */
15969 #include <pthread.h>
15970 #ifdef _POSIX_THREAD_IS_GNU_PTH
15971         __gnu_pth__;
15972 #endif
15973
15974 _ACEOF
15975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15976   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
15977   ol_cv_header_gnu_pth_pthread_h=yes
15978 else
15979   ol_cv_header_gnu_pth_pthread_h=no
15980 fi
15981 rm -f conftest*
15982
15983
15984 fi
15985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
15986 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
15987
15988
15989                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
15990                         for ac_header in sched.h
15991 do :
15992   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
15993 if test "x$ac_cv_header_sched_h" = x""yes; then :
15994   cat >>confdefs.h <<_ACEOF
15995 #define HAVE_SCHED_H 1
15996 _ACEOF
15997
15998 fi
15999
16000 done
16001
16002                 fi
16003
16004
16005                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
16006 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
16007 if test "${ol_cv_pthread_create+set}" = set; then :
16008   $as_echo_n "(cached) " >&6
16009 else
16010
16011                         if test "$cross_compiling" = yes; then :
16012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16013 /* end confdefs.h.  */
16014
16015 /* pthread test headers */
16016 #include <pthread.h>
16017 #if HAVE_PTHREADS < 7
16018 #include <errno.h>
16019 #endif
16020 #ifndef NULL
16021 #define NULL (void*)0
16022 #endif
16023
16024 static void *task(p)
16025         void *p;
16026 {
16027         return (void *) (p == NULL);
16028 }
16029
16030 int
16031 main ()
16032 {
16033
16034         /* pthread test function */
16035 #ifndef PTHREAD_CREATE_DETACHED
16036 #define PTHREAD_CREATE_DETACHED 1
16037 #endif
16038         pthread_t t;
16039         int status;
16040         int detach = PTHREAD_CREATE_DETACHED;
16041
16042 #if HAVE_PTHREADS > 4
16043         /* Final pthreads */
16044         pthread_attr_t attr;
16045
16046         status = pthread_attr_init(&attr);
16047         if( status ) return status;
16048
16049 #if HAVE_PTHREADS < 7
16050         status = pthread_attr_setdetachstate(&attr, &detach);
16051         if( status < 0 ) status = errno;
16052 #else
16053         status = pthread_attr_setdetachstate(&attr, detach);
16054 #endif
16055         if( status ) return status;
16056         status = pthread_create( &t, &attr, task, NULL );
16057 #if HAVE_PTHREADS < 7
16058         if( status < 0 ) status = errno;
16059 #endif
16060         if( status ) return status;
16061 #else
16062         /* Draft 4 pthreads */
16063         status = pthread_create( &t, pthread_attr_default, task, NULL );
16064         if( status ) return errno;
16065
16066         /* give thread a chance to complete */
16067         /* it should remain joinable and hence detachable */
16068         sleep( 1 );
16069
16070         status = pthread_detach( &t );
16071         if( status ) return errno;
16072 #endif
16073
16074 #ifdef HAVE_LINUX_THREADS
16075         pthread_kill_other_threads_np();
16076 #endif
16077
16078         return 0;
16079
16080   ;
16081   return 0;
16082 }
16083 _ACEOF
16084 if ac_fn_c_try_link "$LINENO"; then :
16085   ol_cv_pthread_create=yes
16086 else
16087   ol_cv_pthread_create=no
16088 fi
16089 rm -f core conftest.err conftest.$ac_objext \
16090     conftest$ac_exeext conftest.$ac_ext
16091 else
16092   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16093 /* end confdefs.h.  */
16094
16095 /* pthread test headers */
16096 #include <pthread.h>
16097 #if HAVE_PTHREADS < 7
16098 #include <errno.h>
16099 #endif
16100 #ifndef NULL
16101 #define NULL (void*)0
16102 #endif
16103
16104 static void *task(p)
16105         void *p;
16106 {
16107         return (void *) (p == NULL);
16108 }
16109
16110
16111 int main(argc, argv)
16112         int argc;
16113         char **argv;
16114 {
16115
16116         /* pthread test function */
16117 #ifndef PTHREAD_CREATE_DETACHED
16118 #define PTHREAD_CREATE_DETACHED 1
16119 #endif
16120         pthread_t t;
16121         int status;
16122         int detach = PTHREAD_CREATE_DETACHED;
16123
16124 #if HAVE_PTHREADS > 4
16125         /* Final pthreads */
16126         pthread_attr_t attr;
16127
16128         status = pthread_attr_init(&attr);
16129         if( status ) return status;
16130
16131 #if HAVE_PTHREADS < 7
16132         status = pthread_attr_setdetachstate(&attr, &detach);
16133         if( status < 0 ) status = errno;
16134 #else
16135         status = pthread_attr_setdetachstate(&attr, detach);
16136 #endif
16137         if( status ) return status;
16138         status = pthread_create( &t, &attr, task, NULL );
16139 #if HAVE_PTHREADS < 7
16140         if( status < 0 ) status = errno;
16141 #endif
16142         if( status ) return status;
16143 #else
16144         /* Draft 4 pthreads */
16145         status = pthread_create( &t, pthread_attr_default, task, NULL );
16146         if( status ) return errno;
16147
16148         /* give thread a chance to complete */
16149         /* it should remain joinable and hence detachable */
16150         sleep( 1 );
16151
16152         status = pthread_detach( &t );
16153         if( status ) return errno;
16154 #endif
16155
16156 #ifdef HAVE_LINUX_THREADS
16157         pthread_kill_other_threads_np();
16158 #endif
16159
16160         return 0;
16161
16162 }
16163
16164 _ACEOF
16165 if ac_fn_c_try_run "$LINENO"; then :
16166   ol_cv_pthread_create=yes
16167 else
16168   ol_cv_pthread_create=no
16169 fi
16170 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16171   conftest.$ac_objext conftest.beam conftest.$ac_ext
16172 fi
16173
16174 fi
16175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
16176 $as_echo "$ol_cv_pthread_create" >&6; }
16177
16178                 if test $ol_cv_pthread_create != no ; then
16179                         ol_link_threads=posix
16180                         ol_link_pthreads=""
16181                 fi
16182
16183                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
16184 if test "$ol_link_threads" = no ; then
16185         # try -kthread
16186         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
16187 $as_echo_n "checking for pthread link with -kthread... " >&6; }
16188 if test "${ol_cv_pthread_kthread+set}" = set; then :
16189   $as_echo_n "(cached) " >&6
16190 else
16191
16192                 # save the flags
16193                 ol_LIBS="$LIBS"
16194                 LIBS="-kthread $LIBS"
16195
16196                 if test "$cross_compiling" = yes; then :
16197   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16198 /* end confdefs.h.  */
16199
16200 /* pthread test headers */
16201 #include <pthread.h>
16202 #if HAVE_PTHREADS < 7
16203 #include <errno.h>
16204 #endif
16205 #ifndef NULL
16206 #define NULL (void*)0
16207 #endif
16208
16209 static void *task(p)
16210         void *p;
16211 {
16212         return (void *) (p == NULL);
16213 }
16214
16215 int
16216 main ()
16217 {
16218
16219         /* pthread test function */
16220 #ifndef PTHREAD_CREATE_DETACHED
16221 #define PTHREAD_CREATE_DETACHED 1
16222 #endif
16223         pthread_t t;
16224         int status;
16225         int detach = PTHREAD_CREATE_DETACHED;
16226
16227 #if HAVE_PTHREADS > 4
16228         /* Final pthreads */
16229         pthread_attr_t attr;
16230
16231         status = pthread_attr_init(&attr);
16232         if( status ) return status;
16233
16234 #if HAVE_PTHREADS < 7
16235         status = pthread_attr_setdetachstate(&attr, &detach);
16236         if( status < 0 ) status = errno;
16237 #else
16238         status = pthread_attr_setdetachstate(&attr, detach);
16239 #endif
16240         if( status ) return status;
16241         status = pthread_create( &t, &attr, task, NULL );
16242 #if HAVE_PTHREADS < 7
16243         if( status < 0 ) status = errno;
16244 #endif
16245         if( status ) return status;
16246 #else
16247         /* Draft 4 pthreads */
16248         status = pthread_create( &t, pthread_attr_default, task, NULL );
16249         if( status ) return errno;
16250
16251         /* give thread a chance to complete */
16252         /* it should remain joinable and hence detachable */
16253         sleep( 1 );
16254
16255         status = pthread_detach( &t );
16256         if( status ) return errno;
16257 #endif
16258
16259 #ifdef HAVE_LINUX_THREADS
16260         pthread_kill_other_threads_np();
16261 #endif
16262
16263         return 0;
16264
16265   ;
16266   return 0;
16267 }
16268 _ACEOF
16269 if ac_fn_c_try_link "$LINENO"; then :
16270   ol_cv_pthread_kthread=yes
16271 else
16272   ol_cv_pthread_kthread=no
16273 fi
16274 rm -f core conftest.err conftest.$ac_objext \
16275     conftest$ac_exeext conftest.$ac_ext
16276 else
16277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16278 /* end confdefs.h.  */
16279
16280 /* pthread test headers */
16281 #include <pthread.h>
16282 #if HAVE_PTHREADS < 7
16283 #include <errno.h>
16284 #endif
16285 #ifndef NULL
16286 #define NULL (void*)0
16287 #endif
16288
16289 static void *task(p)
16290         void *p;
16291 {
16292         return (void *) (p == NULL);
16293 }
16294
16295
16296 int main(argc, argv)
16297         int argc;
16298         char **argv;
16299 {
16300
16301         /* pthread test function */
16302 #ifndef PTHREAD_CREATE_DETACHED
16303 #define PTHREAD_CREATE_DETACHED 1
16304 #endif
16305         pthread_t t;
16306         int status;
16307         int detach = PTHREAD_CREATE_DETACHED;
16308
16309 #if HAVE_PTHREADS > 4
16310         /* Final pthreads */
16311         pthread_attr_t attr;
16312
16313         status = pthread_attr_init(&attr);
16314         if( status ) return status;
16315
16316 #if HAVE_PTHREADS < 7
16317         status = pthread_attr_setdetachstate(&attr, &detach);
16318         if( status < 0 ) status = errno;
16319 #else
16320         status = pthread_attr_setdetachstate(&attr, detach);
16321 #endif
16322         if( status ) return status;
16323         status = pthread_create( &t, &attr, task, NULL );
16324 #if HAVE_PTHREADS < 7
16325         if( status < 0 ) status = errno;
16326 #endif
16327         if( status ) return status;
16328 #else
16329         /* Draft 4 pthreads */
16330         status = pthread_create( &t, pthread_attr_default, task, NULL );
16331         if( status ) return errno;
16332
16333         /* give thread a chance to complete */
16334         /* it should remain joinable and hence detachable */
16335         sleep( 1 );
16336
16337         status = pthread_detach( &t );
16338         if( status ) return errno;
16339 #endif
16340
16341 #ifdef HAVE_LINUX_THREADS
16342         pthread_kill_other_threads_np();
16343 #endif
16344
16345         return 0;
16346
16347 }
16348
16349 _ACEOF
16350 if ac_fn_c_try_run "$LINENO"; then :
16351   ol_cv_pthread_kthread=yes
16352 else
16353   ol_cv_pthread_kthread=no
16354 fi
16355 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16356   conftest.$ac_objext conftest.beam conftest.$ac_ext
16357 fi
16358
16359
16360                 # restore the LIBS
16361                 LIBS="$ol_LIBS"
16362
16363 fi
16364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
16365 $as_echo "$ol_cv_pthread_kthread" >&6; }
16366
16367         if test $ol_cv_pthread_kthread = yes ; then
16368                 ol_link_pthreads="-kthread"
16369                 ol_link_threads=posix
16370         fi
16371 fi
16372
16373                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
16374 if test "$ol_link_threads" = no ; then
16375         # try -pthread
16376         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
16377 $as_echo_n "checking for pthread link with -pthread... " >&6; }
16378 if test "${ol_cv_pthread_pthread+set}" = set; then :
16379   $as_echo_n "(cached) " >&6
16380 else
16381
16382                 # save the flags
16383                 ol_LIBS="$LIBS"
16384                 LIBS="-pthread $LIBS"
16385
16386                 if test "$cross_compiling" = yes; then :
16387   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16388 /* end confdefs.h.  */
16389
16390 /* pthread test headers */
16391 #include <pthread.h>
16392 #if HAVE_PTHREADS < 7
16393 #include <errno.h>
16394 #endif
16395 #ifndef NULL
16396 #define NULL (void*)0
16397 #endif
16398
16399 static void *task(p)
16400         void *p;
16401 {
16402         return (void *) (p == NULL);
16403 }
16404
16405 int
16406 main ()
16407 {
16408
16409         /* pthread test function */
16410 #ifndef PTHREAD_CREATE_DETACHED
16411 #define PTHREAD_CREATE_DETACHED 1
16412 #endif
16413         pthread_t t;
16414         int status;
16415         int detach = PTHREAD_CREATE_DETACHED;
16416
16417 #if HAVE_PTHREADS > 4
16418         /* Final pthreads */
16419         pthread_attr_t attr;
16420
16421         status = pthread_attr_init(&attr);
16422         if( status ) return status;
16423
16424 #if HAVE_PTHREADS < 7
16425         status = pthread_attr_setdetachstate(&attr, &detach);
16426         if( status < 0 ) status = errno;
16427 #else
16428         status = pthread_attr_setdetachstate(&attr, detach);
16429 #endif
16430         if( status ) return status;
16431         status = pthread_create( &t, &attr, task, NULL );
16432 #if HAVE_PTHREADS < 7
16433         if( status < 0 ) status = errno;
16434 #endif
16435         if( status ) return status;
16436 #else
16437         /* Draft 4 pthreads */
16438         status = pthread_create( &t, pthread_attr_default, task, NULL );
16439         if( status ) return errno;
16440
16441         /* give thread a chance to complete */
16442         /* it should remain joinable and hence detachable */
16443         sleep( 1 );
16444
16445         status = pthread_detach( &t );
16446         if( status ) return errno;
16447 #endif
16448
16449 #ifdef HAVE_LINUX_THREADS
16450         pthread_kill_other_threads_np();
16451 #endif
16452
16453         return 0;
16454
16455   ;
16456   return 0;
16457 }
16458 _ACEOF
16459 if ac_fn_c_try_link "$LINENO"; then :
16460   ol_cv_pthread_pthread=yes
16461 else
16462   ol_cv_pthread_pthread=no
16463 fi
16464 rm -f core conftest.err conftest.$ac_objext \
16465     conftest$ac_exeext conftest.$ac_ext
16466 else
16467   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16468 /* end confdefs.h.  */
16469
16470 /* pthread test headers */
16471 #include <pthread.h>
16472 #if HAVE_PTHREADS < 7
16473 #include <errno.h>
16474 #endif
16475 #ifndef NULL
16476 #define NULL (void*)0
16477 #endif
16478
16479 static void *task(p)
16480         void *p;
16481 {
16482         return (void *) (p == NULL);
16483 }
16484
16485
16486 int main(argc, argv)
16487         int argc;
16488         char **argv;
16489 {
16490
16491         /* pthread test function */
16492 #ifndef PTHREAD_CREATE_DETACHED
16493 #define PTHREAD_CREATE_DETACHED 1
16494 #endif
16495         pthread_t t;
16496         int status;
16497         int detach = PTHREAD_CREATE_DETACHED;
16498
16499 #if HAVE_PTHREADS > 4
16500         /* Final pthreads */
16501         pthread_attr_t attr;
16502
16503         status = pthread_attr_init(&attr);
16504         if( status ) return status;
16505
16506 #if HAVE_PTHREADS < 7
16507         status = pthread_attr_setdetachstate(&attr, &detach);
16508         if( status < 0 ) status = errno;
16509 #else
16510         status = pthread_attr_setdetachstate(&attr, detach);
16511 #endif
16512         if( status ) return status;
16513         status = pthread_create( &t, &attr, task, NULL );
16514 #if HAVE_PTHREADS < 7
16515         if( status < 0 ) status = errno;
16516 #endif
16517         if( status ) return status;
16518 #else
16519         /* Draft 4 pthreads */
16520         status = pthread_create( &t, pthread_attr_default, task, NULL );
16521         if( status ) return errno;
16522
16523         /* give thread a chance to complete */
16524         /* it should remain joinable and hence detachable */
16525         sleep( 1 );
16526
16527         status = pthread_detach( &t );
16528         if( status ) return errno;
16529 #endif
16530
16531 #ifdef HAVE_LINUX_THREADS
16532         pthread_kill_other_threads_np();
16533 #endif
16534
16535         return 0;
16536
16537 }
16538
16539 _ACEOF
16540 if ac_fn_c_try_run "$LINENO"; then :
16541   ol_cv_pthread_pthread=yes
16542 else
16543   ol_cv_pthread_pthread=no
16544 fi
16545 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16546   conftest.$ac_objext conftest.beam conftest.$ac_ext
16547 fi
16548
16549
16550                 # restore the LIBS
16551                 LIBS="$ol_LIBS"
16552
16553 fi
16554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
16555 $as_echo "$ol_cv_pthread_pthread" >&6; }
16556
16557         if test $ol_cv_pthread_pthread = yes ; then
16558                 ol_link_pthreads="-pthread"
16559                 ol_link_threads=posix
16560         fi
16561 fi
16562
16563                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
16564 if test "$ol_link_threads" = no ; then
16565         # try -pthreads
16566         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
16567 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
16568 if test "${ol_cv_pthread_pthreads+set}" = set; then :
16569   $as_echo_n "(cached) " >&6
16570 else
16571
16572                 # save the flags
16573                 ol_LIBS="$LIBS"
16574                 LIBS="-pthreads $LIBS"
16575
16576                 if test "$cross_compiling" = yes; then :
16577   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16578 /* end confdefs.h.  */
16579
16580 /* pthread test headers */
16581 #include <pthread.h>
16582 #if HAVE_PTHREADS < 7
16583 #include <errno.h>
16584 #endif
16585 #ifndef NULL
16586 #define NULL (void*)0
16587 #endif
16588
16589 static void *task(p)
16590         void *p;
16591 {
16592         return (void *) (p == NULL);
16593 }
16594
16595 int
16596 main ()
16597 {
16598
16599         /* pthread test function */
16600 #ifndef PTHREAD_CREATE_DETACHED
16601 #define PTHREAD_CREATE_DETACHED 1
16602 #endif
16603         pthread_t t;
16604         int status;
16605         int detach = PTHREAD_CREATE_DETACHED;
16606
16607 #if HAVE_PTHREADS > 4
16608         /* Final pthreads */
16609         pthread_attr_t attr;
16610
16611         status = pthread_attr_init(&attr);
16612         if( status ) return status;
16613
16614 #if HAVE_PTHREADS < 7
16615         status = pthread_attr_setdetachstate(&attr, &detach);
16616         if( status < 0 ) status = errno;
16617 #else
16618         status = pthread_attr_setdetachstate(&attr, detach);
16619 #endif
16620         if( status ) return status;
16621         status = pthread_create( &t, &attr, task, NULL );
16622 #if HAVE_PTHREADS < 7
16623         if( status < 0 ) status = errno;
16624 #endif
16625         if( status ) return status;
16626 #else
16627         /* Draft 4 pthreads */
16628         status = pthread_create( &t, pthread_attr_default, task, NULL );
16629         if( status ) return errno;
16630
16631         /* give thread a chance to complete */
16632         /* it should remain joinable and hence detachable */
16633         sleep( 1 );
16634
16635         status = pthread_detach( &t );
16636         if( status ) return errno;
16637 #endif
16638
16639 #ifdef HAVE_LINUX_THREADS
16640         pthread_kill_other_threads_np();
16641 #endif
16642
16643         return 0;
16644
16645   ;
16646   return 0;
16647 }
16648 _ACEOF
16649 if ac_fn_c_try_link "$LINENO"; then :
16650   ol_cv_pthread_pthreads=yes
16651 else
16652   ol_cv_pthread_pthreads=no
16653 fi
16654 rm -f core conftest.err conftest.$ac_objext \
16655     conftest$ac_exeext conftest.$ac_ext
16656 else
16657   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16658 /* end confdefs.h.  */
16659
16660 /* pthread test headers */
16661 #include <pthread.h>
16662 #if HAVE_PTHREADS < 7
16663 #include <errno.h>
16664 #endif
16665 #ifndef NULL
16666 #define NULL (void*)0
16667 #endif
16668
16669 static void *task(p)
16670         void *p;
16671 {
16672         return (void *) (p == NULL);
16673 }
16674
16675
16676 int main(argc, argv)
16677         int argc;
16678         char **argv;
16679 {
16680
16681         /* pthread test function */
16682 #ifndef PTHREAD_CREATE_DETACHED
16683 #define PTHREAD_CREATE_DETACHED 1
16684 #endif
16685         pthread_t t;
16686         int status;
16687         int detach = PTHREAD_CREATE_DETACHED;
16688
16689 #if HAVE_PTHREADS > 4
16690         /* Final pthreads */
16691         pthread_attr_t attr;
16692
16693         status = pthread_attr_init(&attr);
16694         if( status ) return status;
16695
16696 #if HAVE_PTHREADS < 7
16697         status = pthread_attr_setdetachstate(&attr, &detach);
16698         if( status < 0 ) status = errno;
16699 #else
16700         status = pthread_attr_setdetachstate(&attr, detach);
16701 #endif
16702         if( status ) return status;
16703         status = pthread_create( &t, &attr, task, NULL );
16704 #if HAVE_PTHREADS < 7
16705         if( status < 0 ) status = errno;
16706 #endif
16707         if( status ) return status;
16708 #else
16709         /* Draft 4 pthreads */
16710         status = pthread_create( &t, pthread_attr_default, task, NULL );
16711         if( status ) return errno;
16712
16713         /* give thread a chance to complete */
16714         /* it should remain joinable and hence detachable */
16715         sleep( 1 );
16716
16717         status = pthread_detach( &t );
16718         if( status ) return errno;
16719 #endif
16720
16721 #ifdef HAVE_LINUX_THREADS
16722         pthread_kill_other_threads_np();
16723 #endif
16724
16725         return 0;
16726
16727 }
16728
16729 _ACEOF
16730 if ac_fn_c_try_run "$LINENO"; then :
16731   ol_cv_pthread_pthreads=yes
16732 else
16733   ol_cv_pthread_pthreads=no
16734 fi
16735 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16736   conftest.$ac_objext conftest.beam conftest.$ac_ext
16737 fi
16738
16739
16740                 # restore the LIBS
16741                 LIBS="$ol_LIBS"
16742
16743 fi
16744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
16745 $as_echo "$ol_cv_pthread_pthreads" >&6; }
16746
16747         if test $ol_cv_pthread_pthreads = yes ; then
16748                 ol_link_pthreads="-pthreads"
16749                 ol_link_threads=posix
16750         fi
16751 fi
16752
16753                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
16754 if test "$ol_link_threads" = no ; then
16755         # try -mthreads
16756         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
16757 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
16758 if test "${ol_cv_pthread_mthreads+set}" = set; then :
16759   $as_echo_n "(cached) " >&6
16760 else
16761
16762                 # save the flags
16763                 ol_LIBS="$LIBS"
16764                 LIBS="-mthreads $LIBS"
16765
16766                 if test "$cross_compiling" = yes; then :
16767   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16768 /* end confdefs.h.  */
16769
16770 /* pthread test headers */
16771 #include <pthread.h>
16772 #if HAVE_PTHREADS < 7
16773 #include <errno.h>
16774 #endif
16775 #ifndef NULL
16776 #define NULL (void*)0
16777 #endif
16778
16779 static void *task(p)
16780         void *p;
16781 {
16782         return (void *) (p == NULL);
16783 }
16784
16785 int
16786 main ()
16787 {
16788
16789         /* pthread test function */
16790 #ifndef PTHREAD_CREATE_DETACHED
16791 #define PTHREAD_CREATE_DETACHED 1
16792 #endif
16793         pthread_t t;
16794         int status;
16795         int detach = PTHREAD_CREATE_DETACHED;
16796
16797 #if HAVE_PTHREADS > 4
16798         /* Final pthreads */
16799         pthread_attr_t attr;
16800
16801         status = pthread_attr_init(&attr);
16802         if( status ) return status;
16803
16804 #if HAVE_PTHREADS < 7
16805         status = pthread_attr_setdetachstate(&attr, &detach);
16806         if( status < 0 ) status = errno;
16807 #else
16808         status = pthread_attr_setdetachstate(&attr, detach);
16809 #endif
16810         if( status ) return status;
16811         status = pthread_create( &t, &attr, task, NULL );
16812 #if HAVE_PTHREADS < 7
16813         if( status < 0 ) status = errno;
16814 #endif
16815         if( status ) return status;
16816 #else
16817         /* Draft 4 pthreads */
16818         status = pthread_create( &t, pthread_attr_default, task, NULL );
16819         if( status ) return errno;
16820
16821         /* give thread a chance to complete */
16822         /* it should remain joinable and hence detachable */
16823         sleep( 1 );
16824
16825         status = pthread_detach( &t );
16826         if( status ) return errno;
16827 #endif
16828
16829 #ifdef HAVE_LINUX_THREADS
16830         pthread_kill_other_threads_np();
16831 #endif
16832
16833         return 0;
16834
16835   ;
16836   return 0;
16837 }
16838 _ACEOF
16839 if ac_fn_c_try_link "$LINENO"; then :
16840   ol_cv_pthread_mthreads=yes
16841 else
16842   ol_cv_pthread_mthreads=no
16843 fi
16844 rm -f core conftest.err conftest.$ac_objext \
16845     conftest$ac_exeext conftest.$ac_ext
16846 else
16847   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16848 /* end confdefs.h.  */
16849
16850 /* pthread test headers */
16851 #include <pthread.h>
16852 #if HAVE_PTHREADS < 7
16853 #include <errno.h>
16854 #endif
16855 #ifndef NULL
16856 #define NULL (void*)0
16857 #endif
16858
16859 static void *task(p)
16860         void *p;
16861 {
16862         return (void *) (p == NULL);
16863 }
16864
16865
16866 int main(argc, argv)
16867         int argc;
16868         char **argv;
16869 {
16870
16871         /* pthread test function */
16872 #ifndef PTHREAD_CREATE_DETACHED
16873 #define PTHREAD_CREATE_DETACHED 1
16874 #endif
16875         pthread_t t;
16876         int status;
16877         int detach = PTHREAD_CREATE_DETACHED;
16878
16879 #if HAVE_PTHREADS > 4
16880         /* Final pthreads */
16881         pthread_attr_t attr;
16882
16883         status = pthread_attr_init(&attr);
16884         if( status ) return status;
16885
16886 #if HAVE_PTHREADS < 7
16887         status = pthread_attr_setdetachstate(&attr, &detach);
16888         if( status < 0 ) status = errno;
16889 #else
16890         status = pthread_attr_setdetachstate(&attr, detach);
16891 #endif
16892         if( status ) return status;
16893         status = pthread_create( &t, &attr, task, NULL );
16894 #if HAVE_PTHREADS < 7
16895         if( status < 0 ) status = errno;
16896 #endif
16897         if( status ) return status;
16898 #else
16899         /* Draft 4 pthreads */
16900         status = pthread_create( &t, pthread_attr_default, task, NULL );
16901         if( status ) return errno;
16902
16903         /* give thread a chance to complete */
16904         /* it should remain joinable and hence detachable */
16905         sleep( 1 );
16906
16907         status = pthread_detach( &t );
16908         if( status ) return errno;
16909 #endif
16910
16911 #ifdef HAVE_LINUX_THREADS
16912         pthread_kill_other_threads_np();
16913 #endif
16914
16915         return 0;
16916
16917 }
16918
16919 _ACEOF
16920 if ac_fn_c_try_run "$LINENO"; then :
16921   ol_cv_pthread_mthreads=yes
16922 else
16923   ol_cv_pthread_mthreads=no
16924 fi
16925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16926   conftest.$ac_objext conftest.beam conftest.$ac_ext
16927 fi
16928
16929
16930                 # restore the LIBS
16931                 LIBS="$ol_LIBS"
16932
16933 fi
16934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
16935 $as_echo "$ol_cv_pthread_mthreads" >&6; }
16936
16937         if test $ol_cv_pthread_mthreads = yes ; then
16938                 ol_link_pthreads="-mthreads"
16939                 ol_link_threads=posix
16940         fi
16941 fi
16942
16943                 # Pthread try link: -thread (ol_cv_pthread_thread)
16944 if test "$ol_link_threads" = no ; then
16945         # try -thread
16946         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
16947 $as_echo_n "checking for pthread link with -thread... " >&6; }
16948 if test "${ol_cv_pthread_thread+set}" = set; then :
16949   $as_echo_n "(cached) " >&6
16950 else
16951
16952                 # save the flags
16953                 ol_LIBS="$LIBS"
16954                 LIBS="-thread $LIBS"
16955
16956                 if test "$cross_compiling" = yes; then :
16957   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16958 /* end confdefs.h.  */
16959
16960 /* pthread test headers */
16961 #include <pthread.h>
16962 #if HAVE_PTHREADS < 7
16963 #include <errno.h>
16964 #endif
16965 #ifndef NULL
16966 #define NULL (void*)0
16967 #endif
16968
16969 static void *task(p)
16970         void *p;
16971 {
16972         return (void *) (p == NULL);
16973 }
16974
16975 int
16976 main ()
16977 {
16978
16979         /* pthread test function */
16980 #ifndef PTHREAD_CREATE_DETACHED
16981 #define PTHREAD_CREATE_DETACHED 1
16982 #endif
16983         pthread_t t;
16984         int status;
16985         int detach = PTHREAD_CREATE_DETACHED;
16986
16987 #if HAVE_PTHREADS > 4
16988         /* Final pthreads */
16989         pthread_attr_t attr;
16990
16991         status = pthread_attr_init(&attr);
16992         if( status ) return status;
16993
16994 #if HAVE_PTHREADS < 7
16995         status = pthread_attr_setdetachstate(&attr, &detach);
16996         if( status < 0 ) status = errno;
16997 #else
16998         status = pthread_attr_setdetachstate(&attr, detach);
16999 #endif
17000         if( status ) return status;
17001         status = pthread_create( &t, &attr, task, NULL );
17002 #if HAVE_PTHREADS < 7
17003         if( status < 0 ) status = errno;
17004 #endif
17005         if( status ) return status;
17006 #else
17007         /* Draft 4 pthreads */
17008         status = pthread_create( &t, pthread_attr_default, task, NULL );
17009         if( status ) return errno;
17010
17011         /* give thread a chance to complete */
17012         /* it should remain joinable and hence detachable */
17013         sleep( 1 );
17014
17015         status = pthread_detach( &t );
17016         if( status ) return errno;
17017 #endif
17018
17019 #ifdef HAVE_LINUX_THREADS
17020         pthread_kill_other_threads_np();
17021 #endif
17022
17023         return 0;
17024
17025   ;
17026   return 0;
17027 }
17028 _ACEOF
17029 if ac_fn_c_try_link "$LINENO"; then :
17030   ol_cv_pthread_thread=yes
17031 else
17032   ol_cv_pthread_thread=no
17033 fi
17034 rm -f core conftest.err conftest.$ac_objext \
17035     conftest$ac_exeext conftest.$ac_ext
17036 else
17037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17038 /* end confdefs.h.  */
17039
17040 /* pthread test headers */
17041 #include <pthread.h>
17042 #if HAVE_PTHREADS < 7
17043 #include <errno.h>
17044 #endif
17045 #ifndef NULL
17046 #define NULL (void*)0
17047 #endif
17048
17049 static void *task(p)
17050         void *p;
17051 {
17052         return (void *) (p == NULL);
17053 }
17054
17055
17056 int main(argc, argv)
17057         int argc;
17058         char **argv;
17059 {
17060
17061         /* pthread test function */
17062 #ifndef PTHREAD_CREATE_DETACHED
17063 #define PTHREAD_CREATE_DETACHED 1
17064 #endif
17065         pthread_t t;
17066         int status;
17067         int detach = PTHREAD_CREATE_DETACHED;
17068
17069 #if HAVE_PTHREADS > 4
17070         /* Final pthreads */
17071         pthread_attr_t attr;
17072
17073         status = pthread_attr_init(&attr);
17074         if( status ) return status;
17075
17076 #if HAVE_PTHREADS < 7
17077         status = pthread_attr_setdetachstate(&attr, &detach);
17078         if( status < 0 ) status = errno;
17079 #else
17080         status = pthread_attr_setdetachstate(&attr, detach);
17081 #endif
17082         if( status ) return status;
17083         status = pthread_create( &t, &attr, task, NULL );
17084 #if HAVE_PTHREADS < 7
17085         if( status < 0 ) status = errno;
17086 #endif
17087         if( status ) return status;
17088 #else
17089         /* Draft 4 pthreads */
17090         status = pthread_create( &t, pthread_attr_default, task, NULL );
17091         if( status ) return errno;
17092
17093         /* give thread a chance to complete */
17094         /* it should remain joinable and hence detachable */
17095         sleep( 1 );
17096
17097         status = pthread_detach( &t );
17098         if( status ) return errno;
17099 #endif
17100
17101 #ifdef HAVE_LINUX_THREADS
17102         pthread_kill_other_threads_np();
17103 #endif
17104
17105         return 0;
17106
17107 }
17108
17109 _ACEOF
17110 if ac_fn_c_try_run "$LINENO"; then :
17111   ol_cv_pthread_thread=yes
17112 else
17113   ol_cv_pthread_thread=no
17114 fi
17115 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17116   conftest.$ac_objext conftest.beam conftest.$ac_ext
17117 fi
17118
17119
17120                 # restore the LIBS
17121                 LIBS="$ol_LIBS"
17122
17123 fi
17124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
17125 $as_echo "$ol_cv_pthread_thread" >&6; }
17126
17127         if test $ol_cv_pthread_thread = yes ; then
17128                 ol_link_pthreads="-thread"
17129                 ol_link_threads=posix
17130         fi
17131 fi
17132
17133
17134                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
17135 if test "$ol_link_threads" = no ; then
17136         # try -lpthread -lmach -lexc -lc_r
17137         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
17138 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
17139 if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then :
17140   $as_echo_n "(cached) " >&6
17141 else
17142
17143                 # save the flags
17144                 ol_LIBS="$LIBS"
17145                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
17146
17147                 if test "$cross_compiling" = yes; then :
17148   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17149 /* end confdefs.h.  */
17150
17151 /* pthread test headers */
17152 #include <pthread.h>
17153 #if HAVE_PTHREADS < 7
17154 #include <errno.h>
17155 #endif
17156 #ifndef NULL
17157 #define NULL (void*)0
17158 #endif
17159
17160 static void *task(p)
17161         void *p;
17162 {
17163         return (void *) (p == NULL);
17164 }
17165
17166 int
17167 main ()
17168 {
17169
17170         /* pthread test function */
17171 #ifndef PTHREAD_CREATE_DETACHED
17172 #define PTHREAD_CREATE_DETACHED 1
17173 #endif
17174         pthread_t t;
17175         int status;
17176         int detach = PTHREAD_CREATE_DETACHED;
17177
17178 #if HAVE_PTHREADS > 4
17179         /* Final pthreads */
17180         pthread_attr_t attr;
17181
17182         status = pthread_attr_init(&attr);
17183         if( status ) return status;
17184
17185 #if HAVE_PTHREADS < 7
17186         status = pthread_attr_setdetachstate(&attr, &detach);
17187         if( status < 0 ) status = errno;
17188 #else
17189         status = pthread_attr_setdetachstate(&attr, detach);
17190 #endif
17191         if( status ) return status;
17192         status = pthread_create( &t, &attr, task, NULL );
17193 #if HAVE_PTHREADS < 7
17194         if( status < 0 ) status = errno;
17195 #endif
17196         if( status ) return status;
17197 #else
17198         /* Draft 4 pthreads */
17199         status = pthread_create( &t, pthread_attr_default, task, NULL );
17200         if( status ) return errno;
17201
17202         /* give thread a chance to complete */
17203         /* it should remain joinable and hence detachable */
17204         sleep( 1 );
17205
17206         status = pthread_detach( &t );
17207         if( status ) return errno;
17208 #endif
17209
17210 #ifdef HAVE_LINUX_THREADS
17211         pthread_kill_other_threads_np();
17212 #endif
17213
17214         return 0;
17215
17216   ;
17217   return 0;
17218 }
17219 _ACEOF
17220 if ac_fn_c_try_link "$LINENO"; then :
17221   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17222 else
17223   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17224 fi
17225 rm -f core conftest.err conftest.$ac_objext \
17226     conftest$ac_exeext conftest.$ac_ext
17227 else
17228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17229 /* end confdefs.h.  */
17230
17231 /* pthread test headers */
17232 #include <pthread.h>
17233 #if HAVE_PTHREADS < 7
17234 #include <errno.h>
17235 #endif
17236 #ifndef NULL
17237 #define NULL (void*)0
17238 #endif
17239
17240 static void *task(p)
17241         void *p;
17242 {
17243         return (void *) (p == NULL);
17244 }
17245
17246
17247 int main(argc, argv)
17248         int argc;
17249         char **argv;
17250 {
17251
17252         /* pthread test function */
17253 #ifndef PTHREAD_CREATE_DETACHED
17254 #define PTHREAD_CREATE_DETACHED 1
17255 #endif
17256         pthread_t t;
17257         int status;
17258         int detach = PTHREAD_CREATE_DETACHED;
17259
17260 #if HAVE_PTHREADS > 4
17261         /* Final pthreads */
17262         pthread_attr_t attr;
17263
17264         status = pthread_attr_init(&attr);
17265         if( status ) return status;
17266
17267 #if HAVE_PTHREADS < 7
17268         status = pthread_attr_setdetachstate(&attr, &detach);
17269         if( status < 0 ) status = errno;
17270 #else
17271         status = pthread_attr_setdetachstate(&attr, detach);
17272 #endif
17273         if( status ) return status;
17274         status = pthread_create( &t, &attr, task, NULL );
17275 #if HAVE_PTHREADS < 7
17276         if( status < 0 ) status = errno;
17277 #endif
17278         if( status ) return status;
17279 #else
17280         /* Draft 4 pthreads */
17281         status = pthread_create( &t, pthread_attr_default, task, NULL );
17282         if( status ) return errno;
17283
17284         /* give thread a chance to complete */
17285         /* it should remain joinable and hence detachable */
17286         sleep( 1 );
17287
17288         status = pthread_detach( &t );
17289         if( status ) return errno;
17290 #endif
17291
17292 #ifdef HAVE_LINUX_THREADS
17293         pthread_kill_other_threads_np();
17294 #endif
17295
17296         return 0;
17297
17298 }
17299
17300 _ACEOF
17301 if ac_fn_c_try_run "$LINENO"; then :
17302   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17303 else
17304   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17305 fi
17306 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17307   conftest.$ac_objext conftest.beam conftest.$ac_ext
17308 fi
17309
17310
17311                 # restore the LIBS
17312                 LIBS="$ol_LIBS"
17313
17314 fi
17315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
17316 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
17317
17318         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
17319                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
17320                 ol_link_threads=posix
17321         fi
17322 fi
17323
17324                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
17325 if test "$ol_link_threads" = no ; then
17326         # try -lpthread -lmach -lexc
17327         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
17328 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
17329 if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then :
17330   $as_echo_n "(cached) " >&6
17331 else
17332
17333                 # save the flags
17334                 ol_LIBS="$LIBS"
17335                 LIBS="-lpthread -lmach -lexc $LIBS"
17336
17337                 if test "$cross_compiling" = yes; then :
17338   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17339 /* end confdefs.h.  */
17340
17341 /* pthread test headers */
17342 #include <pthread.h>
17343 #if HAVE_PTHREADS < 7
17344 #include <errno.h>
17345 #endif
17346 #ifndef NULL
17347 #define NULL (void*)0
17348 #endif
17349
17350 static void *task(p)
17351         void *p;
17352 {
17353         return (void *) (p == NULL);
17354 }
17355
17356 int
17357 main ()
17358 {
17359
17360         /* pthread test function */
17361 #ifndef PTHREAD_CREATE_DETACHED
17362 #define PTHREAD_CREATE_DETACHED 1
17363 #endif
17364         pthread_t t;
17365         int status;
17366         int detach = PTHREAD_CREATE_DETACHED;
17367
17368 #if HAVE_PTHREADS > 4
17369         /* Final pthreads */
17370         pthread_attr_t attr;
17371
17372         status = pthread_attr_init(&attr);
17373         if( status ) return status;
17374
17375 #if HAVE_PTHREADS < 7
17376         status = pthread_attr_setdetachstate(&attr, &detach);
17377         if( status < 0 ) status = errno;
17378 #else
17379         status = pthread_attr_setdetachstate(&attr, detach);
17380 #endif
17381         if( status ) return status;
17382         status = pthread_create( &t, &attr, task, NULL );
17383 #if HAVE_PTHREADS < 7
17384         if( status < 0 ) status = errno;
17385 #endif
17386         if( status ) return status;
17387 #else
17388         /* Draft 4 pthreads */
17389         status = pthread_create( &t, pthread_attr_default, task, NULL );
17390         if( status ) return errno;
17391
17392         /* give thread a chance to complete */
17393         /* it should remain joinable and hence detachable */
17394         sleep( 1 );
17395
17396         status = pthread_detach( &t );
17397         if( status ) return errno;
17398 #endif
17399
17400 #ifdef HAVE_LINUX_THREADS
17401         pthread_kill_other_threads_np();
17402 #endif
17403
17404         return 0;
17405
17406   ;
17407   return 0;
17408 }
17409 _ACEOF
17410 if ac_fn_c_try_link "$LINENO"; then :
17411   ol_cv_pthread_lpthread_lmach_lexc=yes
17412 else
17413   ol_cv_pthread_lpthread_lmach_lexc=no
17414 fi
17415 rm -f core conftest.err conftest.$ac_objext \
17416     conftest$ac_exeext conftest.$ac_ext
17417 else
17418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17419 /* end confdefs.h.  */
17420
17421 /* pthread test headers */
17422 #include <pthread.h>
17423 #if HAVE_PTHREADS < 7
17424 #include <errno.h>
17425 #endif
17426 #ifndef NULL
17427 #define NULL (void*)0
17428 #endif
17429
17430 static void *task(p)
17431         void *p;
17432 {
17433         return (void *) (p == NULL);
17434 }
17435
17436
17437 int main(argc, argv)
17438         int argc;
17439         char **argv;
17440 {
17441
17442         /* pthread test function */
17443 #ifndef PTHREAD_CREATE_DETACHED
17444 #define PTHREAD_CREATE_DETACHED 1
17445 #endif
17446         pthread_t t;
17447         int status;
17448         int detach = PTHREAD_CREATE_DETACHED;
17449
17450 #if HAVE_PTHREADS > 4
17451         /* Final pthreads */
17452         pthread_attr_t attr;
17453
17454         status = pthread_attr_init(&attr);
17455         if( status ) return status;
17456
17457 #if HAVE_PTHREADS < 7
17458         status = pthread_attr_setdetachstate(&attr, &detach);
17459         if( status < 0 ) status = errno;
17460 #else
17461         status = pthread_attr_setdetachstate(&attr, detach);
17462 #endif
17463         if( status ) return status;
17464         status = pthread_create( &t, &attr, task, NULL );
17465 #if HAVE_PTHREADS < 7
17466         if( status < 0 ) status = errno;
17467 #endif
17468         if( status ) return status;
17469 #else
17470         /* Draft 4 pthreads */
17471         status = pthread_create( &t, pthread_attr_default, task, NULL );
17472         if( status ) return errno;
17473
17474         /* give thread a chance to complete */
17475         /* it should remain joinable and hence detachable */
17476         sleep( 1 );
17477
17478         status = pthread_detach( &t );
17479         if( status ) return errno;
17480 #endif
17481
17482 #ifdef HAVE_LINUX_THREADS
17483         pthread_kill_other_threads_np();
17484 #endif
17485
17486         return 0;
17487
17488 }
17489
17490 _ACEOF
17491 if ac_fn_c_try_run "$LINENO"; then :
17492   ol_cv_pthread_lpthread_lmach_lexc=yes
17493 else
17494   ol_cv_pthread_lpthread_lmach_lexc=no
17495 fi
17496 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17497   conftest.$ac_objext conftest.beam conftest.$ac_ext
17498 fi
17499
17500
17501                 # restore the LIBS
17502                 LIBS="$ol_LIBS"
17503
17504 fi
17505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
17506 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
17507
17508         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
17509                 ol_link_pthreads="-lpthread -lmach -lexc"
17510                 ol_link_threads=posix
17511         fi
17512 fi
17513
17514
17515                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
17516 if test "$ol_link_threads" = no ; then
17517         # try -lpthread -Wl,-woff,85
17518         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
17519 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
17520 if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then :
17521   $as_echo_n "(cached) " >&6
17522 else
17523
17524                 # save the flags
17525                 ol_LIBS="$LIBS"
17526                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
17527
17528                 if test "$cross_compiling" = yes; then :
17529   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17530 /* end confdefs.h.  */
17531
17532 /* pthread test headers */
17533 #include <pthread.h>
17534 #if HAVE_PTHREADS < 7
17535 #include <errno.h>
17536 #endif
17537 #ifndef NULL
17538 #define NULL (void*)0
17539 #endif
17540
17541 static void *task(p)
17542         void *p;
17543 {
17544         return (void *) (p == NULL);
17545 }
17546
17547 int
17548 main ()
17549 {
17550
17551         /* pthread test function */
17552 #ifndef PTHREAD_CREATE_DETACHED
17553 #define PTHREAD_CREATE_DETACHED 1
17554 #endif
17555         pthread_t t;
17556         int status;
17557         int detach = PTHREAD_CREATE_DETACHED;
17558
17559 #if HAVE_PTHREADS > 4
17560         /* Final pthreads */
17561         pthread_attr_t attr;
17562
17563         status = pthread_attr_init(&attr);
17564         if( status ) return status;
17565
17566 #if HAVE_PTHREADS < 7
17567         status = pthread_attr_setdetachstate(&attr, &detach);
17568         if( status < 0 ) status = errno;
17569 #else
17570         status = pthread_attr_setdetachstate(&attr, detach);
17571 #endif
17572         if( status ) return status;
17573         status = pthread_create( &t, &attr, task, NULL );
17574 #if HAVE_PTHREADS < 7
17575         if( status < 0 ) status = errno;
17576 #endif
17577         if( status ) return status;
17578 #else
17579         /* Draft 4 pthreads */
17580         status = pthread_create( &t, pthread_attr_default, task, NULL );
17581         if( status ) return errno;
17582
17583         /* give thread a chance to complete */
17584         /* it should remain joinable and hence detachable */
17585         sleep( 1 );
17586
17587         status = pthread_detach( &t );
17588         if( status ) return errno;
17589 #endif
17590
17591 #ifdef HAVE_LINUX_THREADS
17592         pthread_kill_other_threads_np();
17593 #endif
17594
17595         return 0;
17596
17597   ;
17598   return 0;
17599 }
17600 _ACEOF
17601 if ac_fn_c_try_link "$LINENO"; then :
17602   ol_cv_pthread_lib_lpthread_woff=yes
17603 else
17604   ol_cv_pthread_lib_lpthread_woff=no
17605 fi
17606 rm -f core conftest.err conftest.$ac_objext \
17607     conftest$ac_exeext conftest.$ac_ext
17608 else
17609   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17610 /* end confdefs.h.  */
17611
17612 /* pthread test headers */
17613 #include <pthread.h>
17614 #if HAVE_PTHREADS < 7
17615 #include <errno.h>
17616 #endif
17617 #ifndef NULL
17618 #define NULL (void*)0
17619 #endif
17620
17621 static void *task(p)
17622         void *p;
17623 {
17624         return (void *) (p == NULL);
17625 }
17626
17627
17628 int main(argc, argv)
17629         int argc;
17630         char **argv;
17631 {
17632
17633         /* pthread test function */
17634 #ifndef PTHREAD_CREATE_DETACHED
17635 #define PTHREAD_CREATE_DETACHED 1
17636 #endif
17637         pthread_t t;
17638         int status;
17639         int detach = PTHREAD_CREATE_DETACHED;
17640
17641 #if HAVE_PTHREADS > 4
17642         /* Final pthreads */
17643         pthread_attr_t attr;
17644
17645         status = pthread_attr_init(&attr);
17646         if( status ) return status;
17647
17648 #if HAVE_PTHREADS < 7
17649         status = pthread_attr_setdetachstate(&attr, &detach);
17650         if( status < 0 ) status = errno;
17651 #else
17652         status = pthread_attr_setdetachstate(&attr, detach);
17653 #endif
17654         if( status ) return status;
17655         status = pthread_create( &t, &attr, task, NULL );
17656 #if HAVE_PTHREADS < 7
17657         if( status < 0 ) status = errno;
17658 #endif
17659         if( status ) return status;
17660 #else
17661         /* Draft 4 pthreads */
17662         status = pthread_create( &t, pthread_attr_default, task, NULL );
17663         if( status ) return errno;
17664
17665         /* give thread a chance to complete */
17666         /* it should remain joinable and hence detachable */
17667         sleep( 1 );
17668
17669         status = pthread_detach( &t );
17670         if( status ) return errno;
17671 #endif
17672
17673 #ifdef HAVE_LINUX_THREADS
17674         pthread_kill_other_threads_np();
17675 #endif
17676
17677         return 0;
17678
17679 }
17680
17681 _ACEOF
17682 if ac_fn_c_try_run "$LINENO"; then :
17683   ol_cv_pthread_lib_lpthread_woff=yes
17684 else
17685   ol_cv_pthread_lib_lpthread_woff=no
17686 fi
17687 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17688   conftest.$ac_objext conftest.beam conftest.$ac_ext
17689 fi
17690
17691
17692                 # restore the LIBS
17693                 LIBS="$ol_LIBS"
17694
17695 fi
17696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
17697 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
17698
17699         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
17700                 ol_link_pthreads="-lpthread -Wl,-woff,85"
17701                 ol_link_threads=posix
17702         fi
17703 fi
17704
17705
17706                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
17707 if test "$ol_link_threads" = no ; then
17708         # try -lpthread
17709         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
17710 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
17711 if test "${ol_cv_pthread_lpthread+set}" = set; then :
17712   $as_echo_n "(cached) " >&6
17713 else
17714
17715                 # save the flags
17716                 ol_LIBS="$LIBS"
17717                 LIBS="-lpthread $LIBS"
17718
17719                 if test "$cross_compiling" = yes; then :
17720   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17721 /* end confdefs.h.  */
17722
17723 /* pthread test headers */
17724 #include <pthread.h>
17725 #if HAVE_PTHREADS < 7
17726 #include <errno.h>
17727 #endif
17728 #ifndef NULL
17729 #define NULL (void*)0
17730 #endif
17731
17732 static void *task(p)
17733         void *p;
17734 {
17735         return (void *) (p == NULL);
17736 }
17737
17738 int
17739 main ()
17740 {
17741
17742         /* pthread test function */
17743 #ifndef PTHREAD_CREATE_DETACHED
17744 #define PTHREAD_CREATE_DETACHED 1
17745 #endif
17746         pthread_t t;
17747         int status;
17748         int detach = PTHREAD_CREATE_DETACHED;
17749
17750 #if HAVE_PTHREADS > 4
17751         /* Final pthreads */
17752         pthread_attr_t attr;
17753
17754         status = pthread_attr_init(&attr);
17755         if( status ) return status;
17756
17757 #if HAVE_PTHREADS < 7
17758         status = pthread_attr_setdetachstate(&attr, &detach);
17759         if( status < 0 ) status = errno;
17760 #else
17761         status = pthread_attr_setdetachstate(&attr, detach);
17762 #endif
17763         if( status ) return status;
17764         status = pthread_create( &t, &attr, task, NULL );
17765 #if HAVE_PTHREADS < 7
17766         if( status < 0 ) status = errno;
17767 #endif
17768         if( status ) return status;
17769 #else
17770         /* Draft 4 pthreads */
17771         status = pthread_create( &t, pthread_attr_default, task, NULL );
17772         if( status ) return errno;
17773
17774         /* give thread a chance to complete */
17775         /* it should remain joinable and hence detachable */
17776         sleep( 1 );
17777
17778         status = pthread_detach( &t );
17779         if( status ) return errno;
17780 #endif
17781
17782 #ifdef HAVE_LINUX_THREADS
17783         pthread_kill_other_threads_np();
17784 #endif
17785
17786         return 0;
17787
17788   ;
17789   return 0;
17790 }
17791 _ACEOF
17792 if ac_fn_c_try_link "$LINENO"; then :
17793   ol_cv_pthread_lpthread=yes
17794 else
17795   ol_cv_pthread_lpthread=no
17796 fi
17797 rm -f core conftest.err conftest.$ac_objext \
17798     conftest$ac_exeext conftest.$ac_ext
17799 else
17800   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17801 /* end confdefs.h.  */
17802
17803 /* pthread test headers */
17804 #include <pthread.h>
17805 #if HAVE_PTHREADS < 7
17806 #include <errno.h>
17807 #endif
17808 #ifndef NULL
17809 #define NULL (void*)0
17810 #endif
17811
17812 static void *task(p)
17813         void *p;
17814 {
17815         return (void *) (p == NULL);
17816 }
17817
17818
17819 int main(argc, argv)
17820         int argc;
17821         char **argv;
17822 {
17823
17824         /* pthread test function */
17825 #ifndef PTHREAD_CREATE_DETACHED
17826 #define PTHREAD_CREATE_DETACHED 1
17827 #endif
17828         pthread_t t;
17829         int status;
17830         int detach = PTHREAD_CREATE_DETACHED;
17831
17832 #if HAVE_PTHREADS > 4
17833         /* Final pthreads */
17834         pthread_attr_t attr;
17835
17836         status = pthread_attr_init(&attr);
17837         if( status ) return status;
17838
17839 #if HAVE_PTHREADS < 7
17840         status = pthread_attr_setdetachstate(&attr, &detach);
17841         if( status < 0 ) status = errno;
17842 #else
17843         status = pthread_attr_setdetachstate(&attr, detach);
17844 #endif
17845         if( status ) return status;
17846         status = pthread_create( &t, &attr, task, NULL );
17847 #if HAVE_PTHREADS < 7
17848         if( status < 0 ) status = errno;
17849 #endif
17850         if( status ) return status;
17851 #else
17852         /* Draft 4 pthreads */
17853         status = pthread_create( &t, pthread_attr_default, task, NULL );
17854         if( status ) return errno;
17855
17856         /* give thread a chance to complete */
17857         /* it should remain joinable and hence detachable */
17858         sleep( 1 );
17859
17860         status = pthread_detach( &t );
17861         if( status ) return errno;
17862 #endif
17863
17864 #ifdef HAVE_LINUX_THREADS
17865         pthread_kill_other_threads_np();
17866 #endif
17867
17868         return 0;
17869
17870 }
17871
17872 _ACEOF
17873 if ac_fn_c_try_run "$LINENO"; then :
17874   ol_cv_pthread_lpthread=yes
17875 else
17876   ol_cv_pthread_lpthread=no
17877 fi
17878 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17879   conftest.$ac_objext conftest.beam conftest.$ac_ext
17880 fi
17881
17882
17883                 # restore the LIBS
17884                 LIBS="$ol_LIBS"
17885
17886 fi
17887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
17888 $as_echo "$ol_cv_pthread_lpthread" >&6; }
17889
17890         if test $ol_cv_pthread_lpthread = yes ; then
17891                 ol_link_pthreads="-lpthread"
17892                 ol_link_threads=posix
17893         fi
17894 fi
17895
17896                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
17897 if test "$ol_link_threads" = no ; then
17898         # try -lc_r
17899         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
17900 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
17901 if test "${ol_cv_pthread_lc_r+set}" = set; then :
17902   $as_echo_n "(cached) " >&6
17903 else
17904
17905                 # save the flags
17906                 ol_LIBS="$LIBS"
17907                 LIBS="-lc_r $LIBS"
17908
17909                 if test "$cross_compiling" = yes; then :
17910   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17911 /* end confdefs.h.  */
17912
17913 /* pthread test headers */
17914 #include <pthread.h>
17915 #if HAVE_PTHREADS < 7
17916 #include <errno.h>
17917 #endif
17918 #ifndef NULL
17919 #define NULL (void*)0
17920 #endif
17921
17922 static void *task(p)
17923         void *p;
17924 {
17925         return (void *) (p == NULL);
17926 }
17927
17928 int
17929 main ()
17930 {
17931
17932         /* pthread test function */
17933 #ifndef PTHREAD_CREATE_DETACHED
17934 #define PTHREAD_CREATE_DETACHED 1
17935 #endif
17936         pthread_t t;
17937         int status;
17938         int detach = PTHREAD_CREATE_DETACHED;
17939
17940 #if HAVE_PTHREADS > 4
17941         /* Final pthreads */
17942         pthread_attr_t attr;
17943
17944         status = pthread_attr_init(&attr);
17945         if( status ) return status;
17946
17947 #if HAVE_PTHREADS < 7
17948         status = pthread_attr_setdetachstate(&attr, &detach);
17949         if( status < 0 ) status = errno;
17950 #else
17951         status = pthread_attr_setdetachstate(&attr, detach);
17952 #endif
17953         if( status ) return status;
17954         status = pthread_create( &t, &attr, task, NULL );
17955 #if HAVE_PTHREADS < 7
17956         if( status < 0 ) status = errno;
17957 #endif
17958         if( status ) return status;
17959 #else
17960         /* Draft 4 pthreads */
17961         status = pthread_create( &t, pthread_attr_default, task, NULL );
17962         if( status ) return errno;
17963
17964         /* give thread a chance to complete */
17965         /* it should remain joinable and hence detachable */
17966         sleep( 1 );
17967
17968         status = pthread_detach( &t );
17969         if( status ) return errno;
17970 #endif
17971
17972 #ifdef HAVE_LINUX_THREADS
17973         pthread_kill_other_threads_np();
17974 #endif
17975
17976         return 0;
17977
17978   ;
17979   return 0;
17980 }
17981 _ACEOF
17982 if ac_fn_c_try_link "$LINENO"; then :
17983   ol_cv_pthread_lc_r=yes
17984 else
17985   ol_cv_pthread_lc_r=no
17986 fi
17987 rm -f core conftest.err conftest.$ac_objext \
17988     conftest$ac_exeext conftest.$ac_ext
17989 else
17990   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17991 /* end confdefs.h.  */
17992
17993 /* pthread test headers */
17994 #include <pthread.h>
17995 #if HAVE_PTHREADS < 7
17996 #include <errno.h>
17997 #endif
17998 #ifndef NULL
17999 #define NULL (void*)0
18000 #endif
18001
18002 static void *task(p)
18003         void *p;
18004 {
18005         return (void *) (p == NULL);
18006 }
18007
18008
18009 int main(argc, argv)
18010         int argc;
18011         char **argv;
18012 {
18013
18014         /* pthread test function */
18015 #ifndef PTHREAD_CREATE_DETACHED
18016 #define PTHREAD_CREATE_DETACHED 1
18017 #endif
18018         pthread_t t;
18019         int status;
18020         int detach = PTHREAD_CREATE_DETACHED;
18021
18022 #if HAVE_PTHREADS > 4
18023         /* Final pthreads */
18024         pthread_attr_t attr;
18025
18026         status = pthread_attr_init(&attr);
18027         if( status ) return status;
18028
18029 #if HAVE_PTHREADS < 7
18030         status = pthread_attr_setdetachstate(&attr, &detach);
18031         if( status < 0 ) status = errno;
18032 #else
18033         status = pthread_attr_setdetachstate(&attr, detach);
18034 #endif
18035         if( status ) return status;
18036         status = pthread_create( &t, &attr, task, NULL );
18037 #if HAVE_PTHREADS < 7
18038         if( status < 0 ) status = errno;
18039 #endif
18040         if( status ) return status;
18041 #else
18042         /* Draft 4 pthreads */
18043         status = pthread_create( &t, pthread_attr_default, task, NULL );
18044         if( status ) return errno;
18045
18046         /* give thread a chance to complete */
18047         /* it should remain joinable and hence detachable */
18048         sleep( 1 );
18049
18050         status = pthread_detach( &t );
18051         if( status ) return errno;
18052 #endif
18053
18054 #ifdef HAVE_LINUX_THREADS
18055         pthread_kill_other_threads_np();
18056 #endif
18057
18058         return 0;
18059
18060 }
18061
18062 _ACEOF
18063 if ac_fn_c_try_run "$LINENO"; then :
18064   ol_cv_pthread_lc_r=yes
18065 else
18066   ol_cv_pthread_lc_r=no
18067 fi
18068 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18069   conftest.$ac_objext conftest.beam conftest.$ac_ext
18070 fi
18071
18072
18073                 # restore the LIBS
18074                 LIBS="$ol_LIBS"
18075
18076 fi
18077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
18078 $as_echo "$ol_cv_pthread_lc_r" >&6; }
18079
18080         if test $ol_cv_pthread_lc_r = yes ; then
18081                 ol_link_pthreads="-lc_r"
18082                 ol_link_threads=posix
18083         fi
18084 fi
18085
18086
18087                 # Pthread try link: -threads (ol_cv_pthread_threads)
18088 if test "$ol_link_threads" = no ; then
18089         # try -threads
18090         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
18091 $as_echo_n "checking for pthread link with -threads... " >&6; }
18092 if test "${ol_cv_pthread_threads+set}" = set; then :
18093   $as_echo_n "(cached) " >&6
18094 else
18095
18096                 # save the flags
18097                 ol_LIBS="$LIBS"
18098                 LIBS="-threads $LIBS"
18099
18100                 if test "$cross_compiling" = yes; then :
18101   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18102 /* end confdefs.h.  */
18103
18104 /* pthread test headers */
18105 #include <pthread.h>
18106 #if HAVE_PTHREADS < 7
18107 #include <errno.h>
18108 #endif
18109 #ifndef NULL
18110 #define NULL (void*)0
18111 #endif
18112
18113 static void *task(p)
18114         void *p;
18115 {
18116         return (void *) (p == NULL);
18117 }
18118
18119 int
18120 main ()
18121 {
18122
18123         /* pthread test function */
18124 #ifndef PTHREAD_CREATE_DETACHED
18125 #define PTHREAD_CREATE_DETACHED 1
18126 #endif
18127         pthread_t t;
18128         int status;
18129         int detach = PTHREAD_CREATE_DETACHED;
18130
18131 #if HAVE_PTHREADS > 4
18132         /* Final pthreads */
18133         pthread_attr_t attr;
18134
18135         status = pthread_attr_init(&attr);
18136         if( status ) return status;
18137
18138 #if HAVE_PTHREADS < 7
18139         status = pthread_attr_setdetachstate(&attr, &detach);
18140         if( status < 0 ) status = errno;
18141 #else
18142         status = pthread_attr_setdetachstate(&attr, detach);
18143 #endif
18144         if( status ) return status;
18145         status = pthread_create( &t, &attr, task, NULL );
18146 #if HAVE_PTHREADS < 7
18147         if( status < 0 ) status = errno;
18148 #endif
18149         if( status ) return status;
18150 #else
18151         /* Draft 4 pthreads */
18152         status = pthread_create( &t, pthread_attr_default, task, NULL );
18153         if( status ) return errno;
18154
18155         /* give thread a chance to complete */
18156         /* it should remain joinable and hence detachable */
18157         sleep( 1 );
18158
18159         status = pthread_detach( &t );
18160         if( status ) return errno;
18161 #endif
18162
18163 #ifdef HAVE_LINUX_THREADS
18164         pthread_kill_other_threads_np();
18165 #endif
18166
18167         return 0;
18168
18169   ;
18170   return 0;
18171 }
18172 _ACEOF
18173 if ac_fn_c_try_link "$LINENO"; then :
18174   ol_cv_pthread_threads=yes
18175 else
18176   ol_cv_pthread_threads=no
18177 fi
18178 rm -f core conftest.err conftest.$ac_objext \
18179     conftest$ac_exeext conftest.$ac_ext
18180 else
18181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18182 /* end confdefs.h.  */
18183
18184 /* pthread test headers */
18185 #include <pthread.h>
18186 #if HAVE_PTHREADS < 7
18187 #include <errno.h>
18188 #endif
18189 #ifndef NULL
18190 #define NULL (void*)0
18191 #endif
18192
18193 static void *task(p)
18194         void *p;
18195 {
18196         return (void *) (p == NULL);
18197 }
18198
18199
18200 int main(argc, argv)
18201         int argc;
18202         char **argv;
18203 {
18204
18205         /* pthread test function */
18206 #ifndef PTHREAD_CREATE_DETACHED
18207 #define PTHREAD_CREATE_DETACHED 1
18208 #endif
18209         pthread_t t;
18210         int status;
18211         int detach = PTHREAD_CREATE_DETACHED;
18212
18213 #if HAVE_PTHREADS > 4
18214         /* Final pthreads */
18215         pthread_attr_t attr;
18216
18217         status = pthread_attr_init(&attr);
18218         if( status ) return status;
18219
18220 #if HAVE_PTHREADS < 7
18221         status = pthread_attr_setdetachstate(&attr, &detach);
18222         if( status < 0 ) status = errno;
18223 #else
18224         status = pthread_attr_setdetachstate(&attr, detach);
18225 #endif
18226         if( status ) return status;
18227         status = pthread_create( &t, &attr, task, NULL );
18228 #if HAVE_PTHREADS < 7
18229         if( status < 0 ) status = errno;
18230 #endif
18231         if( status ) return status;
18232 #else
18233         /* Draft 4 pthreads */
18234         status = pthread_create( &t, pthread_attr_default, task, NULL );
18235         if( status ) return errno;
18236
18237         /* give thread a chance to complete */
18238         /* it should remain joinable and hence detachable */
18239         sleep( 1 );
18240
18241         status = pthread_detach( &t );
18242         if( status ) return errno;
18243 #endif
18244
18245 #ifdef HAVE_LINUX_THREADS
18246         pthread_kill_other_threads_np();
18247 #endif
18248
18249         return 0;
18250
18251 }
18252
18253 _ACEOF
18254 if ac_fn_c_try_run "$LINENO"; then :
18255   ol_cv_pthread_threads=yes
18256 else
18257   ol_cv_pthread_threads=no
18258 fi
18259 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18260   conftest.$ac_objext conftest.beam conftest.$ac_ext
18261 fi
18262
18263
18264                 # restore the LIBS
18265                 LIBS="$ol_LIBS"
18266
18267 fi
18268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
18269 $as_echo "$ol_cv_pthread_threads" >&6; }
18270
18271         if test $ol_cv_pthread_threads = yes ; then
18272                 ol_link_pthreads="-threads"
18273                 ol_link_threads=posix
18274         fi
18275 fi
18276
18277
18278                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
18279 if test "$ol_link_threads" = no ; then
18280         # try -lpthreads -lmach -lexc -lc_r
18281         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
18282 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
18283 if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then :
18284   $as_echo_n "(cached) " >&6
18285 else
18286
18287                 # save the flags
18288                 ol_LIBS="$LIBS"
18289                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
18290
18291                 if test "$cross_compiling" = yes; then :
18292   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18293 /* end confdefs.h.  */
18294
18295 /* pthread test headers */
18296 #include <pthread.h>
18297 #if HAVE_PTHREADS < 7
18298 #include <errno.h>
18299 #endif
18300 #ifndef NULL
18301 #define NULL (void*)0
18302 #endif
18303
18304 static void *task(p)
18305         void *p;
18306 {
18307         return (void *) (p == NULL);
18308 }
18309
18310 int
18311 main ()
18312 {
18313
18314         /* pthread test function */
18315 #ifndef PTHREAD_CREATE_DETACHED
18316 #define PTHREAD_CREATE_DETACHED 1
18317 #endif
18318         pthread_t t;
18319         int status;
18320         int detach = PTHREAD_CREATE_DETACHED;
18321
18322 #if HAVE_PTHREADS > 4
18323         /* Final pthreads */
18324         pthread_attr_t attr;
18325
18326         status = pthread_attr_init(&attr);
18327         if( status ) return status;
18328
18329 #if HAVE_PTHREADS < 7
18330         status = pthread_attr_setdetachstate(&attr, &detach);
18331         if( status < 0 ) status = errno;
18332 #else
18333         status = pthread_attr_setdetachstate(&attr, detach);
18334 #endif
18335         if( status ) return status;
18336         status = pthread_create( &t, &attr, task, NULL );
18337 #if HAVE_PTHREADS < 7
18338         if( status < 0 ) status = errno;
18339 #endif
18340         if( status ) return status;
18341 #else
18342         /* Draft 4 pthreads */
18343         status = pthread_create( &t, pthread_attr_default, task, NULL );
18344         if( status ) return errno;
18345
18346         /* give thread a chance to complete */
18347         /* it should remain joinable and hence detachable */
18348         sleep( 1 );
18349
18350         status = pthread_detach( &t );
18351         if( status ) return errno;
18352 #endif
18353
18354 #ifdef HAVE_LINUX_THREADS
18355         pthread_kill_other_threads_np();
18356 #endif
18357
18358         return 0;
18359
18360   ;
18361   return 0;
18362 }
18363 _ACEOF
18364 if ac_fn_c_try_link "$LINENO"; then :
18365   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18366 else
18367   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18368 fi
18369 rm -f core conftest.err conftest.$ac_objext \
18370     conftest$ac_exeext conftest.$ac_ext
18371 else
18372   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18373 /* end confdefs.h.  */
18374
18375 /* pthread test headers */
18376 #include <pthread.h>
18377 #if HAVE_PTHREADS < 7
18378 #include <errno.h>
18379 #endif
18380 #ifndef NULL
18381 #define NULL (void*)0
18382 #endif
18383
18384 static void *task(p)
18385         void *p;
18386 {
18387         return (void *) (p == NULL);
18388 }
18389
18390
18391 int main(argc, argv)
18392         int argc;
18393         char **argv;
18394 {
18395
18396         /* pthread test function */
18397 #ifndef PTHREAD_CREATE_DETACHED
18398 #define PTHREAD_CREATE_DETACHED 1
18399 #endif
18400         pthread_t t;
18401         int status;
18402         int detach = PTHREAD_CREATE_DETACHED;
18403
18404 #if HAVE_PTHREADS > 4
18405         /* Final pthreads */
18406         pthread_attr_t attr;
18407
18408         status = pthread_attr_init(&attr);
18409         if( status ) return status;
18410
18411 #if HAVE_PTHREADS < 7
18412         status = pthread_attr_setdetachstate(&attr, &detach);
18413         if( status < 0 ) status = errno;
18414 #else
18415         status = pthread_attr_setdetachstate(&attr, detach);
18416 #endif
18417         if( status ) return status;
18418         status = pthread_create( &t, &attr, task, NULL );
18419 #if HAVE_PTHREADS < 7
18420         if( status < 0 ) status = errno;
18421 #endif
18422         if( status ) return status;
18423 #else
18424         /* Draft 4 pthreads */
18425         status = pthread_create( &t, pthread_attr_default, task, NULL );
18426         if( status ) return errno;
18427
18428         /* give thread a chance to complete */
18429         /* it should remain joinable and hence detachable */
18430         sleep( 1 );
18431
18432         status = pthread_detach( &t );
18433         if( status ) return errno;
18434 #endif
18435
18436 #ifdef HAVE_LINUX_THREADS
18437         pthread_kill_other_threads_np();
18438 #endif
18439
18440         return 0;
18441
18442 }
18443
18444 _ACEOF
18445 if ac_fn_c_try_run "$LINENO"; then :
18446   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18447 else
18448   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18449 fi
18450 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18451   conftest.$ac_objext conftest.beam conftest.$ac_ext
18452 fi
18453
18454
18455                 # restore the LIBS
18456                 LIBS="$ol_LIBS"
18457
18458 fi
18459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
18460 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
18461
18462         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
18463                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
18464                 ol_link_threads=posix
18465         fi
18466 fi
18467
18468                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
18469 if test "$ol_link_threads" = no ; then
18470         # try -lpthreads -lmach -lexc
18471         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
18472 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
18473 if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then :
18474   $as_echo_n "(cached) " >&6
18475 else
18476
18477                 # save the flags
18478                 ol_LIBS="$LIBS"
18479                 LIBS="-lpthreads -lmach -lexc $LIBS"
18480
18481                 if test "$cross_compiling" = yes; then :
18482   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18483 /* end confdefs.h.  */
18484
18485 /* pthread test headers */
18486 #include <pthread.h>
18487 #if HAVE_PTHREADS < 7
18488 #include <errno.h>
18489 #endif
18490 #ifndef NULL
18491 #define NULL (void*)0
18492 #endif
18493
18494 static void *task(p)
18495         void *p;
18496 {
18497         return (void *) (p == NULL);
18498 }
18499
18500 int
18501 main ()
18502 {
18503
18504         /* pthread test function */
18505 #ifndef PTHREAD_CREATE_DETACHED
18506 #define PTHREAD_CREATE_DETACHED 1
18507 #endif
18508         pthread_t t;
18509         int status;
18510         int detach = PTHREAD_CREATE_DETACHED;
18511
18512 #if HAVE_PTHREADS > 4
18513         /* Final pthreads */
18514         pthread_attr_t attr;
18515
18516         status = pthread_attr_init(&attr);
18517         if( status ) return status;
18518
18519 #if HAVE_PTHREADS < 7
18520         status = pthread_attr_setdetachstate(&attr, &detach);
18521         if( status < 0 ) status = errno;
18522 #else
18523         status = pthread_attr_setdetachstate(&attr, detach);
18524 #endif
18525         if( status ) return status;
18526         status = pthread_create( &t, &attr, task, NULL );
18527 #if HAVE_PTHREADS < 7
18528         if( status < 0 ) status = errno;
18529 #endif
18530         if( status ) return status;
18531 #else
18532         /* Draft 4 pthreads */
18533         status = pthread_create( &t, pthread_attr_default, task, NULL );
18534         if( status ) return errno;
18535
18536         /* give thread a chance to complete */
18537         /* it should remain joinable and hence detachable */
18538         sleep( 1 );
18539
18540         status = pthread_detach( &t );
18541         if( status ) return errno;
18542 #endif
18543
18544 #ifdef HAVE_LINUX_THREADS
18545         pthread_kill_other_threads_np();
18546 #endif
18547
18548         return 0;
18549
18550   ;
18551   return 0;
18552 }
18553 _ACEOF
18554 if ac_fn_c_try_link "$LINENO"; then :
18555   ol_cv_pthread_lpthreads_lmach_lexc=yes
18556 else
18557   ol_cv_pthread_lpthreads_lmach_lexc=no
18558 fi
18559 rm -f core conftest.err conftest.$ac_objext \
18560     conftest$ac_exeext conftest.$ac_ext
18561 else
18562   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18563 /* end confdefs.h.  */
18564
18565 /* pthread test headers */
18566 #include <pthread.h>
18567 #if HAVE_PTHREADS < 7
18568 #include <errno.h>
18569 #endif
18570 #ifndef NULL
18571 #define NULL (void*)0
18572 #endif
18573
18574 static void *task(p)
18575         void *p;
18576 {
18577         return (void *) (p == NULL);
18578 }
18579
18580
18581 int main(argc, argv)
18582         int argc;
18583         char **argv;
18584 {
18585
18586         /* pthread test function */
18587 #ifndef PTHREAD_CREATE_DETACHED
18588 #define PTHREAD_CREATE_DETACHED 1
18589 #endif
18590         pthread_t t;
18591         int status;
18592         int detach = PTHREAD_CREATE_DETACHED;
18593
18594 #if HAVE_PTHREADS > 4
18595         /* Final pthreads */
18596         pthread_attr_t attr;
18597
18598         status = pthread_attr_init(&attr);
18599         if( status ) return status;
18600
18601 #if HAVE_PTHREADS < 7
18602         status = pthread_attr_setdetachstate(&attr, &detach);
18603         if( status < 0 ) status = errno;
18604 #else
18605         status = pthread_attr_setdetachstate(&attr, detach);
18606 #endif
18607         if( status ) return status;
18608         status = pthread_create( &t, &attr, task, NULL );
18609 #if HAVE_PTHREADS < 7
18610         if( status < 0 ) status = errno;
18611 #endif
18612         if( status ) return status;
18613 #else
18614         /* Draft 4 pthreads */
18615         status = pthread_create( &t, pthread_attr_default, task, NULL );
18616         if( status ) return errno;
18617
18618         /* give thread a chance to complete */
18619         /* it should remain joinable and hence detachable */
18620         sleep( 1 );
18621
18622         status = pthread_detach( &t );
18623         if( status ) return errno;
18624 #endif
18625
18626 #ifdef HAVE_LINUX_THREADS
18627         pthread_kill_other_threads_np();
18628 #endif
18629
18630         return 0;
18631
18632 }
18633
18634 _ACEOF
18635 if ac_fn_c_try_run "$LINENO"; then :
18636   ol_cv_pthread_lpthreads_lmach_lexc=yes
18637 else
18638   ol_cv_pthread_lpthreads_lmach_lexc=no
18639 fi
18640 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18641   conftest.$ac_objext conftest.beam conftest.$ac_ext
18642 fi
18643
18644
18645                 # restore the LIBS
18646                 LIBS="$ol_LIBS"
18647
18648 fi
18649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
18650 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
18651
18652         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
18653                 ol_link_pthreads="-lpthreads -lmach -lexc"
18654                 ol_link_threads=posix
18655         fi
18656 fi
18657
18658                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
18659 if test "$ol_link_threads" = no ; then
18660         # try -lpthreads -lexc
18661         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
18662 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
18663 if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then :
18664   $as_echo_n "(cached) " >&6
18665 else
18666
18667                 # save the flags
18668                 ol_LIBS="$LIBS"
18669                 LIBS="-lpthreads -lexc $LIBS"
18670
18671                 if test "$cross_compiling" = yes; then :
18672   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18673 /* end confdefs.h.  */
18674
18675 /* pthread test headers */
18676 #include <pthread.h>
18677 #if HAVE_PTHREADS < 7
18678 #include <errno.h>
18679 #endif
18680 #ifndef NULL
18681 #define NULL (void*)0
18682 #endif
18683
18684 static void *task(p)
18685         void *p;
18686 {
18687         return (void *) (p == NULL);
18688 }
18689
18690 int
18691 main ()
18692 {
18693
18694         /* pthread test function */
18695 #ifndef PTHREAD_CREATE_DETACHED
18696 #define PTHREAD_CREATE_DETACHED 1
18697 #endif
18698         pthread_t t;
18699         int status;
18700         int detach = PTHREAD_CREATE_DETACHED;
18701
18702 #if HAVE_PTHREADS > 4
18703         /* Final pthreads */
18704         pthread_attr_t attr;
18705
18706         status = pthread_attr_init(&attr);
18707         if( status ) return status;
18708
18709 #if HAVE_PTHREADS < 7
18710         status = pthread_attr_setdetachstate(&attr, &detach);
18711         if( status < 0 ) status = errno;
18712 #else
18713         status = pthread_attr_setdetachstate(&attr, detach);
18714 #endif
18715         if( status ) return status;
18716         status = pthread_create( &t, &attr, task, NULL );
18717 #if HAVE_PTHREADS < 7
18718         if( status < 0 ) status = errno;
18719 #endif
18720         if( status ) return status;
18721 #else
18722         /* Draft 4 pthreads */
18723         status = pthread_create( &t, pthread_attr_default, task, NULL );
18724         if( status ) return errno;
18725
18726         /* give thread a chance to complete */
18727         /* it should remain joinable and hence detachable */
18728         sleep( 1 );
18729
18730         status = pthread_detach( &t );
18731         if( status ) return errno;
18732 #endif
18733
18734 #ifdef HAVE_LINUX_THREADS
18735         pthread_kill_other_threads_np();
18736 #endif
18737
18738         return 0;
18739
18740   ;
18741   return 0;
18742 }
18743 _ACEOF
18744 if ac_fn_c_try_link "$LINENO"; then :
18745   ol_cv_pthread_lpthreads_lexc=yes
18746 else
18747   ol_cv_pthread_lpthreads_lexc=no
18748 fi
18749 rm -f core conftest.err conftest.$ac_objext \
18750     conftest$ac_exeext conftest.$ac_ext
18751 else
18752   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18753 /* end confdefs.h.  */
18754
18755 /* pthread test headers */
18756 #include <pthread.h>
18757 #if HAVE_PTHREADS < 7
18758 #include <errno.h>
18759 #endif
18760 #ifndef NULL
18761 #define NULL (void*)0
18762 #endif
18763
18764 static void *task(p)
18765         void *p;
18766 {
18767         return (void *) (p == NULL);
18768 }
18769
18770
18771 int main(argc, argv)
18772         int argc;
18773         char **argv;
18774 {
18775
18776         /* pthread test function */
18777 #ifndef PTHREAD_CREATE_DETACHED
18778 #define PTHREAD_CREATE_DETACHED 1
18779 #endif
18780         pthread_t t;
18781         int status;
18782         int detach = PTHREAD_CREATE_DETACHED;
18783
18784 #if HAVE_PTHREADS > 4
18785         /* Final pthreads */
18786         pthread_attr_t attr;
18787
18788         status = pthread_attr_init(&attr);
18789         if( status ) return status;
18790
18791 #if HAVE_PTHREADS < 7
18792         status = pthread_attr_setdetachstate(&attr, &detach);
18793         if( status < 0 ) status = errno;
18794 #else
18795         status = pthread_attr_setdetachstate(&attr, detach);
18796 #endif
18797         if( status ) return status;
18798         status = pthread_create( &t, &attr, task, NULL );
18799 #if HAVE_PTHREADS < 7
18800         if( status < 0 ) status = errno;
18801 #endif
18802         if( status ) return status;
18803 #else
18804         /* Draft 4 pthreads */
18805         status = pthread_create( &t, pthread_attr_default, task, NULL );
18806         if( status ) return errno;
18807
18808         /* give thread a chance to complete */
18809         /* it should remain joinable and hence detachable */
18810         sleep( 1 );
18811
18812         status = pthread_detach( &t );
18813         if( status ) return errno;
18814 #endif
18815
18816 #ifdef HAVE_LINUX_THREADS
18817         pthread_kill_other_threads_np();
18818 #endif
18819
18820         return 0;
18821
18822 }
18823
18824 _ACEOF
18825 if ac_fn_c_try_run "$LINENO"; then :
18826   ol_cv_pthread_lpthreads_lexc=yes
18827 else
18828   ol_cv_pthread_lpthreads_lexc=no
18829 fi
18830 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18831   conftest.$ac_objext conftest.beam conftest.$ac_ext
18832 fi
18833
18834
18835                 # restore the LIBS
18836                 LIBS="$ol_LIBS"
18837
18838 fi
18839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
18840 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
18841
18842         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
18843                 ol_link_pthreads="-lpthreads -lexc"
18844                 ol_link_threads=posix
18845         fi
18846 fi
18847
18848
18849                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
18850 if test "$ol_link_threads" = no ; then
18851         # try -lpthreads
18852         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
18853 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
18854 if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then :
18855   $as_echo_n "(cached) " >&6
18856 else
18857
18858                 # save the flags
18859                 ol_LIBS="$LIBS"
18860                 LIBS="-lpthreads $LIBS"
18861
18862                 if test "$cross_compiling" = yes; then :
18863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18864 /* end confdefs.h.  */
18865
18866 /* pthread test headers */
18867 #include <pthread.h>
18868 #if HAVE_PTHREADS < 7
18869 #include <errno.h>
18870 #endif
18871 #ifndef NULL
18872 #define NULL (void*)0
18873 #endif
18874
18875 static void *task(p)
18876         void *p;
18877 {
18878         return (void *) (p == NULL);
18879 }
18880
18881 int
18882 main ()
18883 {
18884
18885         /* pthread test function */
18886 #ifndef PTHREAD_CREATE_DETACHED
18887 #define PTHREAD_CREATE_DETACHED 1
18888 #endif
18889         pthread_t t;
18890         int status;
18891         int detach = PTHREAD_CREATE_DETACHED;
18892
18893 #if HAVE_PTHREADS > 4
18894         /* Final pthreads */
18895         pthread_attr_t attr;
18896
18897         status = pthread_attr_init(&attr);
18898         if( status ) return status;
18899
18900 #if HAVE_PTHREADS < 7
18901         status = pthread_attr_setdetachstate(&attr, &detach);
18902         if( status < 0 ) status = errno;
18903 #else
18904         status = pthread_attr_setdetachstate(&attr, detach);
18905 #endif
18906         if( status ) return status;
18907         status = pthread_create( &t, &attr, task, NULL );
18908 #if HAVE_PTHREADS < 7
18909         if( status < 0 ) status = errno;
18910 #endif
18911         if( status ) return status;
18912 #else
18913         /* Draft 4 pthreads */
18914         status = pthread_create( &t, pthread_attr_default, task, NULL );
18915         if( status ) return errno;
18916
18917         /* give thread a chance to complete */
18918         /* it should remain joinable and hence detachable */
18919         sleep( 1 );
18920
18921         status = pthread_detach( &t );
18922         if( status ) return errno;
18923 #endif
18924
18925 #ifdef HAVE_LINUX_THREADS
18926         pthread_kill_other_threads_np();
18927 #endif
18928
18929         return 0;
18930
18931   ;
18932   return 0;
18933 }
18934 _ACEOF
18935 if ac_fn_c_try_link "$LINENO"; then :
18936   ol_cv_pthread_lib_lpthreads=yes
18937 else
18938   ol_cv_pthread_lib_lpthreads=no
18939 fi
18940 rm -f core conftest.err conftest.$ac_objext \
18941     conftest$ac_exeext conftest.$ac_ext
18942 else
18943   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18944 /* end confdefs.h.  */
18945
18946 /* pthread test headers */
18947 #include <pthread.h>
18948 #if HAVE_PTHREADS < 7
18949 #include <errno.h>
18950 #endif
18951 #ifndef NULL
18952 #define NULL (void*)0
18953 #endif
18954
18955 static void *task(p)
18956         void *p;
18957 {
18958         return (void *) (p == NULL);
18959 }
18960
18961
18962 int main(argc, argv)
18963         int argc;
18964         char **argv;
18965 {
18966
18967         /* pthread test function */
18968 #ifndef PTHREAD_CREATE_DETACHED
18969 #define PTHREAD_CREATE_DETACHED 1
18970 #endif
18971         pthread_t t;
18972         int status;
18973         int detach = PTHREAD_CREATE_DETACHED;
18974
18975 #if HAVE_PTHREADS > 4
18976         /* Final pthreads */
18977         pthread_attr_t attr;
18978
18979         status = pthread_attr_init(&attr);
18980         if( status ) return status;
18981
18982 #if HAVE_PTHREADS < 7
18983         status = pthread_attr_setdetachstate(&attr, &detach);
18984         if( status < 0 ) status = errno;
18985 #else
18986         status = pthread_attr_setdetachstate(&attr, detach);
18987 #endif
18988         if( status ) return status;
18989         status = pthread_create( &t, &attr, task, NULL );
18990 #if HAVE_PTHREADS < 7
18991         if( status < 0 ) status = errno;
18992 #endif
18993         if( status ) return status;
18994 #else
18995         /* Draft 4 pthreads */
18996         status = pthread_create( &t, pthread_attr_default, task, NULL );
18997         if( status ) return errno;
18998
18999         /* give thread a chance to complete */
19000         /* it should remain joinable and hence detachable */
19001         sleep( 1 );
19002
19003         status = pthread_detach( &t );
19004         if( status ) return errno;
19005 #endif
19006
19007 #ifdef HAVE_LINUX_THREADS
19008         pthread_kill_other_threads_np();
19009 #endif
19010
19011         return 0;
19012
19013 }
19014
19015 _ACEOF
19016 if ac_fn_c_try_run "$LINENO"; then :
19017   ol_cv_pthread_lib_lpthreads=yes
19018 else
19019   ol_cv_pthread_lib_lpthreads=no
19020 fi
19021 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19022   conftest.$ac_objext conftest.beam conftest.$ac_ext
19023 fi
19024
19025
19026                 # restore the LIBS
19027                 LIBS="$ol_LIBS"
19028
19029 fi
19030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
19031 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
19032
19033         if test $ol_cv_pthread_lib_lpthreads = yes ; then
19034                 ol_link_pthreads="-lpthreads"
19035                 ol_link_threads=posix
19036         fi
19037 fi
19038
19039
19040                 if test $ol_link_threads != no ; then
19041                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
19042
19043                                                 save_CPPFLAGS="$CPPFLAGS"
19044                         save_LIBS="$LIBS"
19045                         LIBS="$LTHREAD_LIBS $LIBS"
19046
19047                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
19048 do :
19049   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19050 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19051 eval as_val=\$$as_ac_var
19052    if test "x$as_val" = x""yes; then :
19053   cat >>confdefs.h <<_ACEOF
19054 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19055 _ACEOF
19056
19057 fi
19058 done
19059
19060
19061                         if test $ac_cv_func_sched_yield = no &&
19062                            test $ac_cv_func_pthread_yield = no &&
19063                            test $ac_cv_func_thr_yield = no ; then
19064                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
19065 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
19066 if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
19067   $as_echo_n "(cached) " >&6
19068 else
19069   ac_check_lib_save_LIBS=$LIBS
19070 LIBS="-lrt  $LIBS"
19071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19072 /* end confdefs.h.  */
19073
19074 /* Override any GCC internal prototype to avoid an error.
19075    Use char because int might match the return type of a GCC
19076    builtin and then its argument prototype would still apply.  */
19077 #ifdef __cplusplus
19078 extern "C"
19079 #endif
19080 char sched_yield ();
19081 int
19082 main ()
19083 {
19084 return sched_yield ();
19085   ;
19086   return 0;
19087 }
19088 _ACEOF
19089 if ac_fn_c_try_link "$LINENO"; then :
19090   ac_cv_lib_rt_sched_yield=yes
19091 else
19092   ac_cv_lib_rt_sched_yield=no
19093 fi
19094 rm -f core conftest.err conftest.$ac_objext \
19095     conftest$ac_exeext conftest.$ac_ext
19096 LIBS=$ac_check_lib_save_LIBS
19097 fi
19098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19099 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
19100 if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
19101   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
19102
19103 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
19104
19105                                         ac_cv_func_sched_yield=yes
19106 else
19107   ac_cv_func_sched_yield=no
19108 fi
19109
19110                         fi
19111                         if test $ac_cv_func_sched_yield = no &&
19112                            test $ac_cv_func_pthread_yield = no &&
19113                            test "$ac_cv_func_thr_yield" = no ; then
19114                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
19115 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
19116                         fi
19117
19118                                                 for ac_func in pthread_kill
19119 do :
19120   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
19121 if test "x$ac_cv_func_pthread_kill" = x""yes; then :
19122   cat >>confdefs.h <<_ACEOF
19123 #define HAVE_PTHREAD_KILL 1
19124 _ACEOF
19125
19126 fi
19127 done
19128
19129
19130                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
19131 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
19132 if test "${ol_cv_func_pthread_rwlock_destroy+set}" = set; then :
19133   $as_echo_n "(cached) " >&6
19134 else
19135
19136                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19137 /* end confdefs.h.  */
19138
19139 #include <pthread.h>
19140 pthread_rwlock_t rwlock;
19141
19142 int
19143 main ()
19144 {
19145 pthread_rwlock_destroy(&rwlock);
19146   ;
19147   return 0;
19148 }
19149 _ACEOF
19150 if ac_fn_c_try_link "$LINENO"; then :
19151   ol_cv_func_pthread_rwlock_destroy=yes
19152 else
19153   ol_cv_func_pthread_rwlock_destroy=no
19154 fi
19155 rm -f core conftest.err conftest.$ac_objext \
19156     conftest$ac_exeext conftest.$ac_ext
19157
19158 fi
19159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
19160 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
19161                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
19162
19163 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
19164
19165                         fi
19166
19167                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
19168 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
19169 if test "${ol_cv_func_pthread_detach+set}" = set; then :
19170   $as_echo_n "(cached) " >&6
19171 else
19172
19173                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19174 /* end confdefs.h.  */
19175
19176 #include <pthread.h>
19177 #ifndef NULL
19178 #define NULL (void*)0
19179 #endif
19180
19181 int
19182 main ()
19183 {
19184 pthread_detach(NULL);
19185   ;
19186   return 0;
19187 }
19188 _ACEOF
19189 if ac_fn_c_try_link "$LINENO"; then :
19190   ol_cv_func_pthread_detach=yes
19191 else
19192   ol_cv_func_pthread_detach=no
19193 fi
19194 rm -f core conftest.err conftest.$ac_objext \
19195     conftest$ac_exeext conftest.$ac_ext
19196
19197 fi
19198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
19199 $as_echo "$ol_cv_func_pthread_detach" >&6; }
19200
19201                         if test $ol_cv_func_pthread_detach = no ; then
19202                                 as_fn_error "could not locate pthread_detach()" "$LINENO" 5
19203                         fi
19204
19205
19206 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
19207
19208
19209                                                 for ac_func in \
19210                                 pthread_setconcurrency \
19211                                 pthread_getconcurrency \
19212                                 thr_setconcurrency \
19213                                 thr_getconcurrency \
19214
19215 do :
19216   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19217 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19218 eval as_val=\$$as_ac_var
19219    if test "x$as_val" = x""yes; then :
19220   cat >>confdefs.h <<_ACEOF
19221 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19222 _ACEOF
19223
19224 fi
19225 done
19226
19227
19228
19229         for ac_func in pthread_kill_other_threads_np
19230 do :
19231   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
19232 if test "x$ac_cv_func_pthread_kill_other_threads_np" = x""yes; then :
19233   cat >>confdefs.h <<_ACEOF
19234 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
19235 _ACEOF
19236
19237 fi
19238 done
19239
19240         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
19241 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
19242 if test "${ol_cv_sys_linux_threads+set}" = set; then :
19243   $as_echo_n "(cached) " >&6
19244 else
19245   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
19246 fi
19247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
19248 $as_echo "$ol_cv_sys_linux_threads" >&6; }
19249
19250
19251
19252
19253         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
19254 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
19255 if test "${ol_cv_linux_threads+set}" = set; then :
19256   $as_echo_n "(cached) " >&6
19257 else
19258
19259                 if test $ol_cv_header_linux_threads = yes &&
19260                    test $ol_cv_sys_linux_threads = yes; then
19261                         ol_cv_linux_threads=yes
19262                 elif test $ol_cv_header_linux_threads = no &&
19263                      test $ol_cv_sys_linux_threads = no; then
19264                         ol_cv_linux_threads=no
19265                 else
19266                         ol_cv_linux_threads=error
19267                 fi
19268
19269 fi
19270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
19271 $as_echo "$ol_cv_linux_threads" >&6; }
19272
19273
19274                         if test $ol_cv_linux_threads = error; then
19275                                 as_fn_error "LinuxThreads header/library mismatch" "$LINENO" 5;
19276                         fi
19277
19278                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
19279 $as_echo_n "checking if pthread_create() works... " >&6; }
19280 if test "${ol_cv_pthread_create_works+set}" = set; then :
19281   $as_echo_n "(cached) " >&6
19282 else
19283
19284                         if test "$cross_compiling" = yes; then :
19285                                 ol_cv_pthread_create_works=yes
19286 else
19287   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19288 /* end confdefs.h.  */
19289
19290 /* pthread test headers */
19291 #include <pthread.h>
19292 #if HAVE_PTHREADS < 7
19293 #include <errno.h>
19294 #endif
19295 #ifndef NULL
19296 #define NULL (void*)0
19297 #endif
19298
19299 static void *task(p)
19300         void *p;
19301 {
19302         return (void *) (p == NULL);
19303 }
19304
19305
19306 int main(argc, argv)
19307         int argc;
19308         char **argv;
19309 {
19310
19311         /* pthread test function */
19312 #ifndef PTHREAD_CREATE_DETACHED
19313 #define PTHREAD_CREATE_DETACHED 1
19314 #endif
19315         pthread_t t;
19316         int status;
19317         int detach = PTHREAD_CREATE_DETACHED;
19318
19319 #if HAVE_PTHREADS > 4
19320         /* Final pthreads */
19321         pthread_attr_t attr;
19322
19323         status = pthread_attr_init(&attr);
19324         if( status ) return status;
19325
19326 #if HAVE_PTHREADS < 7
19327         status = pthread_attr_setdetachstate(&attr, &detach);
19328         if( status < 0 ) status = errno;
19329 #else
19330         status = pthread_attr_setdetachstate(&attr, detach);
19331 #endif
19332         if( status ) return status;
19333         status = pthread_create( &t, &attr, task, NULL );
19334 #if HAVE_PTHREADS < 7
19335         if( status < 0 ) status = errno;
19336 #endif
19337         if( status ) return status;
19338 #else
19339         /* Draft 4 pthreads */
19340         status = pthread_create( &t, pthread_attr_default, task, NULL );
19341         if( status ) return errno;
19342
19343         /* give thread a chance to complete */
19344         /* it should remain joinable and hence detachable */
19345         sleep( 1 );
19346
19347         status = pthread_detach( &t );
19348         if( status ) return errno;
19349 #endif
19350
19351 #ifdef HAVE_LINUX_THREADS
19352         pthread_kill_other_threads_np();
19353 #endif
19354
19355         return 0;
19356
19357 }
19358
19359 _ACEOF
19360 if ac_fn_c_try_run "$LINENO"; then :
19361   ol_cv_pthread_create_works=yes
19362 else
19363   ol_cv_pthread_create_works=no
19364 fi
19365 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19366   conftest.$ac_objext conftest.beam conftest.$ac_ext
19367 fi
19368
19369 fi
19370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
19371 $as_echo "$ol_cv_pthread_create_works" >&6; }
19372
19373                         if test $ol_cv_pthread_create_works = no ; then
19374                                 as_fn_error "pthread_create is not usable, check environment settings" "$LINENO" 5
19375                         fi
19376
19377                         ol_replace_broken_yield=no
19378
19379                         if test $ol_replace_broken_yield = yes ; then
19380
19381 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
19382
19383                         fi
19384
19385                                                 if test $ol_with_yielding_select = auto ; then
19386                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
19387 $as_echo_n "checking if select yields when using pthreads... " >&6; }
19388 if test "${ol_cv_pthread_select_yields+set}" = set; then :
19389   $as_echo_n "(cached) " >&6
19390 else
19391
19392                                 if test "$cross_compiling" = yes; then :
19393   ol_cv_pthread_select_yields=cross
19394 else
19395   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19396 /* end confdefs.h.  */
19397
19398 #include <sys/types.h>
19399 #include <sys/time.h>
19400 #include <unistd.h>
19401 #include <pthread.h>
19402 #ifndef NULL
19403 #define NULL (void*) 0
19404 #endif
19405
19406 static int fildes[2];
19407
19408 static void *task(p)
19409         void *p;
19410 {
19411         int i;
19412         struct timeval tv;
19413
19414         fd_set rfds;
19415
19416         tv.tv_sec=10;
19417         tv.tv_usec=0;
19418
19419         FD_ZERO(&rfds);
19420         FD_SET(fildes[0], &rfds);
19421
19422         /* we're not interested in any fds */
19423         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
19424
19425         if(i < 0) {
19426                 perror("select");
19427                 exit(10);
19428         }
19429
19430         exit(0); /* if we exit here, the select blocked the whole process */
19431 }
19432
19433 int main(argc, argv)
19434         int argc;
19435         char **argv;
19436 {
19437         pthread_t t;
19438
19439         /* create a pipe to select */
19440         if(pipe(&fildes[0])) {
19441                 perror("select");
19442                 exit(1);
19443         }
19444
19445 #ifdef HAVE_PTHREAD_SETCONCURRENCY
19446         (void) pthread_setconcurrency(2);
19447 #else
19448 #ifdef HAVE_THR_SETCONCURRENCY
19449         /* Set Solaris LWP concurrency to 2 */
19450         thr_setconcurrency(2);
19451 #endif
19452 #endif
19453
19454 #if HAVE_PTHREADS < 6
19455         pthread_create(&t, pthread_attr_default, task, NULL);
19456 #else
19457         pthread_create(&t, NULL, task, NULL);
19458 #endif
19459
19460         /* make sure task runs first */
19461 #ifdef HAVE_THR_YIELD
19462         thr_yield();
19463 #elif defined( HAVE_SCHED_YIELD )
19464         sched_yield();
19465 #elif defined( HAVE_PTHREAD_YIELD )
19466         pthread_yield();
19467 #endif
19468
19469         exit(2);
19470 }
19471 _ACEOF
19472 if ac_fn_c_try_run "$LINENO"; then :
19473   ol_cv_pthread_select_yields=no
19474 else
19475   ol_cv_pthread_select_yields=yes
19476 fi
19477 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19478   conftest.$ac_objext conftest.beam conftest.$ac_ext
19479 fi
19480
19481 fi
19482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
19483 $as_echo "$ol_cv_pthread_select_yields" >&6; }
19484
19485                                 if test $ol_cv_pthread_select_yields = cross ; then
19486                                         as_fn_error "crossing compiling: use --with-yielding_select=yes|no|manual" "$LINENO" 5
19487                                 fi
19488
19489                                 if test $ol_cv_pthread_select_yields = yes ; then
19490                                         ol_with_yielding_select=yes
19491                                 fi
19492                         fi
19493
19494                                                 CPPFLAGS="$save_CPPFLAGS"
19495                         LIBS="$save_LIBS"
19496                 else
19497                         as_fn_error "could not locate usable POSIX Threads" "$LINENO" 5
19498                 fi
19499         fi
19500
19501         if test $ol_with_threads = posix ; then
19502                 as_fn_error "could not locate POSIX Threads" "$LINENO" 5
19503         fi
19504         ;;
19505 esac
19506
19507 case $ol_with_threads in auto | yes | mach)
19508
19509                 for ac_header in mach/cthreads.h cthreads.h
19510 do :
19511   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19512 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19513 eval as_val=\$$as_ac_Header
19514    if test "x$as_val" = x""yes; then :
19515   cat >>confdefs.h <<_ACEOF
19516 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19517 _ACEOF
19518
19519 fi
19520
19521 done
19522
19523         if test $ac_cv_header_mach_cthreads_h = yes ; then
19524                 ol_with_threads=found
19525
19526                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19527 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19528   ol_link_threads=yes
19529 fi
19530
19531
19532                 if test $ol_link_threads = no ; then
19533                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
19534 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
19535 if test "${ol_cv_cthread_all_load+set}" = set; then :
19536   $as_echo_n "(cached) " >&6
19537 else
19538
19539                                                                 save_LIBS="$LIBS"
19540                                 LIBS="-all_load $LIBS"
19541                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19542 /* end confdefs.h.  */
19543 #include <mach/cthreads.h>
19544 int
19545 main ()
19546 {
19547
19548                                         cthread_fork((void *)0, (void *)0);
19549
19550   ;
19551   return 0;
19552 }
19553 _ACEOF
19554 if ac_fn_c_try_link "$LINENO"; then :
19555   ol_cv_cthread_all_load=yes
19556 else
19557   ol_cv_cthread_all_load=no
19558 fi
19559 rm -f core conftest.err conftest.$ac_objext \
19560     conftest$ac_exeext conftest.$ac_ext
19561                                                                 LIBS="$save_LIBS"
19562
19563 fi
19564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
19565 $as_echo "$ol_cv_cthread_all_load" >&6; }
19566
19567                         if test $ol_cv_cthread_all_load = yes ; then
19568                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
19569                                 ol_link_threads=mach
19570                                 ol_with_threads=found
19571                         fi
19572                 fi
19573
19574         elif test $ac_cv_header_cthreads_h = yes ; then
19575
19576                 ol_with_threads=found
19577
19578                                 save_LIBS="$LIBS"
19579                 LIBS="$LIBS -lthreads"
19580                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19581 if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19582   ol_link_threads=yes
19583 fi
19584
19585                 LIBS="$save_LIBS"
19586
19587                 if test $ol_link_threads = yes ; then
19588                         LTHREAD_LIBS="-lthreads"
19589                         ol_link_threads=mach
19590                         ol_with_threads=found
19591                 else
19592                         as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19593                 fi
19594
19595         elif test $ol_with_threads = mach ; then
19596                 as_fn_error "could not locate Mach CThreads" "$LINENO" 5
19597         fi
19598
19599         if test $ol_link_threads = mach ; then
19600
19601 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
19602
19603         elif test $ol_with_threads = found ; then
19604                 as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19605         fi
19606         ;;
19607 esac
19608
19609 case $ol_with_threads in auto | yes | pth)
19610
19611         for ac_header in pth.h
19612 do :
19613   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
19614 if test "x$ac_cv_header_pth_h" = x""yes; then :
19615   cat >>confdefs.h <<_ACEOF
19616 #define HAVE_PTH_H 1
19617 _ACEOF
19618
19619 fi
19620
19621 done
19622
19623
19624         if test $ac_cv_header_pth_h = yes ; then
19625                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
19626 $as_echo_n "checking for pth_version in -lpth... " >&6; }
19627 if test "${ac_cv_lib_pth_pth_version+set}" = set; then :
19628   $as_echo_n "(cached) " >&6
19629 else
19630   ac_check_lib_save_LIBS=$LIBS
19631 LIBS="-lpth  $LIBS"
19632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19633 /* end confdefs.h.  */
19634
19635 /* Override any GCC internal prototype to avoid an error.
19636    Use char because int might match the return type of a GCC
19637    builtin and then its argument prototype would still apply.  */
19638 #ifdef __cplusplus
19639 extern "C"
19640 #endif
19641 char pth_version ();
19642 int
19643 main ()
19644 {
19645 return pth_version ();
19646   ;
19647   return 0;
19648 }
19649 _ACEOF
19650 if ac_fn_c_try_link "$LINENO"; then :
19651   ac_cv_lib_pth_pth_version=yes
19652 else
19653   ac_cv_lib_pth_pth_version=no
19654 fi
19655 rm -f core conftest.err conftest.$ac_objext \
19656     conftest$ac_exeext conftest.$ac_ext
19657 LIBS=$ac_check_lib_save_LIBS
19658 fi
19659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
19660 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
19661 if test "x$ac_cv_lib_pth_pth_version" = x""yes; then :
19662   have_pth=yes
19663 else
19664   have_pth=no
19665 fi
19666
19667
19668                 if test $have_pth = yes ; then
19669
19670 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
19671
19672                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
19673                         ol_link_threads=pth
19674                         ol_with_threads=found
19675
19676                         if test $ol_with_yielding_select = auto ; then
19677                                 ol_with_yielding_select=yes
19678                         fi
19679                 fi
19680         fi
19681         ;;
19682 esac
19683
19684 case $ol_with_threads in auto | yes | lwp)
19685
19686                 for ac_header in thread.h synch.h
19687 do :
19688   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19689 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19690 eval as_val=\$$as_ac_Header
19691    if test "x$as_val" = x""yes; then :
19692   cat >>confdefs.h <<_ACEOF
19693 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19694 _ACEOF
19695
19696 fi
19697
19698 done
19699
19700         if test $ac_cv_header_thread_h = yes &&
19701            test $ac_cv_header_synch_h = yes ; then
19702                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
19703 $as_echo_n "checking for thr_create in -lthread... " >&6; }
19704 if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
19705   $as_echo_n "(cached) " >&6
19706 else
19707   ac_check_lib_save_LIBS=$LIBS
19708 LIBS="-lthread  $LIBS"
19709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19710 /* end confdefs.h.  */
19711
19712 /* Override any GCC internal prototype to avoid an error.
19713    Use char because int might match the return type of a GCC
19714    builtin and then its argument prototype would still apply.  */
19715 #ifdef __cplusplus
19716 extern "C"
19717 #endif
19718 char thr_create ();
19719 int
19720 main ()
19721 {
19722 return thr_create ();
19723   ;
19724   return 0;
19725 }
19726 _ACEOF
19727 if ac_fn_c_try_link "$LINENO"; then :
19728   ac_cv_lib_thread_thr_create=yes
19729 else
19730   ac_cv_lib_thread_thr_create=no
19731 fi
19732 rm -f core conftest.err conftest.$ac_objext \
19733     conftest$ac_exeext conftest.$ac_ext
19734 LIBS=$ac_check_lib_save_LIBS
19735 fi
19736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
19737 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
19738 if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
19739   have_thr=yes
19740 else
19741   have_thr=no
19742 fi
19743
19744
19745                 if test $have_thr = yes ; then
19746
19747 $as_echo "#define HAVE_THR 1" >>confdefs.h
19748
19749                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
19750                         ol_link_threads=thr
19751
19752                         if test $ol_with_yielding_select = auto ; then
19753                                 ol_with_yielding_select=yes
19754                         fi
19755
19756                                                 for ac_func in \
19757                                 thr_setconcurrency \
19758                                 thr_getconcurrency \
19759
19760 do :
19761   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19762 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19763 eval as_val=\$$as_ac_var
19764    if test "x$as_val" = x""yes; then :
19765   cat >>confdefs.h <<_ACEOF
19766 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19767 _ACEOF
19768
19769 fi
19770 done
19771
19772                 fi
19773         fi
19774         ;;
19775 esac
19776
19777 if test $ol_with_yielding_select = yes ; then
19778
19779 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
19780
19781 fi
19782
19783 if test $ol_with_threads = manual ; then
19784                 ol_link_threads=yes
19785
19786         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
19787 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
19788
19789         for ac_header in pthread.h sched.h
19790 do :
19791   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19792 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19793 eval as_val=\$$as_ac_Header
19794    if test "x$as_val" = x""yes; then :
19795   cat >>confdefs.h <<_ACEOF
19796 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19797 _ACEOF
19798
19799 fi
19800
19801 done
19802
19803         for ac_func in sched_yield pthread_yield
19804 do :
19805   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19806 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19807 eval as_val=\$$as_ac_var
19808    if test "x$as_val" = x""yes; then :
19809   cat >>confdefs.h <<_ACEOF
19810 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19811 _ACEOF
19812
19813 fi
19814 done
19815
19816
19817         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
19818 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
19819 if test "${ol_cv_header_linux_threads+set}" = set; then :
19820   $as_echo_n "(cached) " >&6
19821 else
19822   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19823 /* end confdefs.h.  */
19824 #include <pthread.h>
19825 _ACEOF
19826 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19827   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
19828   ol_cv_header_linux_threads=yes
19829 else
19830   ol_cv_header_linux_threads=no
19831 fi
19832 rm -f conftest*
19833
19834
19835 fi
19836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
19837 $as_echo "$ol_cv_header_linux_threads" >&6; }
19838         if test $ol_cv_header_linux_threads = yes; then
19839
19840 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
19841
19842         fi
19843
19844
19845         for ac_header in mach/cthreads.h
19846 do :
19847   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
19848 if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
19849   cat >>confdefs.h <<_ACEOF
19850 #define HAVE_MACH_CTHREADS_H 1
19851 _ACEOF
19852
19853 fi
19854
19855 done
19856
19857         for ac_header in thread.h synch.h
19858 do :
19859   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19860 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19861 eval as_val=\$$as_ac_Header
19862    if test "x$as_val" = x""yes; then :
19863   cat >>confdefs.h <<_ACEOF
19864 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19865 _ACEOF
19866
19867 fi
19868
19869 done
19870
19871 fi
19872
19873 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
19874                         $as_echo "#define REENTRANT 1" >>confdefs.h
19875
19876         $as_echo "#define _REENTRANT 1" >>confdefs.h
19877
19878         $as_echo "#define THREAD_SAFE 1" >>confdefs.h
19879
19880         $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
19881
19882         $as_echo "#define THREADSAFE 1" >>confdefs.h
19883
19884         $as_echo "#define _THREADSAFE 1" >>confdefs.h
19885
19886         $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
19887
19888
19889                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
19890 $as_echo_n "checking for thread specific errno... " >&6; }
19891 if test "${ol_cv_errno_thread_specific+set}" = set; then :
19892   $as_echo_n "(cached) " >&6
19893 else
19894
19895                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19896 /* end confdefs.h.  */
19897 #include <errno.h>
19898 int
19899 main ()
19900 {
19901 errno = 0;
19902   ;
19903   return 0;
19904 }
19905 _ACEOF
19906 if ac_fn_c_try_link "$LINENO"; then :
19907   ol_cv_errno_thread_specific=yes
19908 else
19909   ol_cv_errno_thread_specific=no
19910 fi
19911 rm -f core conftest.err conftest.$ac_objext \
19912     conftest$ac_exeext conftest.$ac_ext
19913
19914 fi
19915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
19916 $as_echo "$ol_cv_errno_thread_specific" >&6; }
19917
19918                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
19919 $as_echo_n "checking for thread specific h_errno... " >&6; }
19920 if test "${ol_cv_h_errno_thread_specific+set}" = set; then :
19921   $as_echo_n "(cached) " >&6
19922 else
19923
19924                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19925 /* end confdefs.h.  */
19926 #include <netdb.h>
19927 int
19928 main ()
19929 {
19930 h_errno = 0;
19931   ;
19932   return 0;
19933 }
19934 _ACEOF
19935 if ac_fn_c_try_link "$LINENO"; then :
19936   ol_cv_h_errno_thread_specific=yes
19937 else
19938   ol_cv_h_errno_thread_specific=no
19939 fi
19940 rm -f core conftest.err conftest.$ac_objext \
19941     conftest$ac_exeext conftest.$ac_ext
19942
19943 fi
19944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
19945 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
19946
19947         if test $ol_cv_errno_thread_specific != yes ||
19948            test $ol_cv_h_errno_thread_specific != yes ; then
19949                 LIBS="$LTHREAD_LIBS $LIBS"
19950                 LTHREAD_LIBS=""
19951         fi
19952
19953 fi
19954
19955 if test $ol_link_threads = no ; then
19956         if test $ol_with_threads = yes ; then
19957                 as_fn_error "no suitable thread support" "$LINENO" 5
19958         fi
19959
19960         if test $ol_with_threads = auto ; then
19961                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
19962 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
19963                 ol_with_threads=no
19964         fi
19965
19966
19967 $as_echo "#define NO_THREADS 1" >>confdefs.h
19968
19969         LTHREAD_LIBS=""
19970         BUILD_THREAD=no
19971 else
19972         BUILD_THREAD=yes
19973 fi
19974
19975 if test $ol_link_threads != no ; then
19976
19977 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
19978
19979 fi
19980
19981 for ac_func in \
19982         ctime_r                 \
19983         gmtime_r localtime_r \
19984         gethostbyname_r gethostbyaddr_r \
19985
19986 do :
19987   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19988 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19989 eval as_val=\$$as_ac_var
19990    if test "x$as_val" = x""yes; then :
19991   cat >>confdefs.h <<_ACEOF
19992 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19993 _ACEOF
19994
19995 fi
19996 done
19997
19998
19999 if test "$ac_cv_func_ctime_r" = no ; then
20000         ol_cv_func_ctime_r_nargs=0
20001 else
20002         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of ctime_r" >&5
20003 $as_echo_n "checking number of arguments of ctime_r... " >&6; }
20004 if test "${ol_cv_func_ctime_r_nargs+set}" = set; then :
20005   $as_echo_n "(cached) " >&6
20006 else
20007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20008 /* end confdefs.h.  */
20009 #include <time.h>
20010 int
20011 main ()
20012 {
20013 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
20014   ;
20015   return 0;
20016 }
20017 _ACEOF
20018 if ac_fn_c_try_compile "$LINENO"; then :
20019   ol_cv_func_ctime_r_nargs3=yes
20020 else
20021   ol_cv_func_ctime_r_nargs3=no
20022 fi
20023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20024
20025         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20026 /* end confdefs.h.  */
20027 #include <time.h>
20028 int
20029 main ()
20030 {
20031 time_t ti; char *buffer; ctime_r(&ti,buffer);
20032   ;
20033   return 0;
20034 }
20035 _ACEOF
20036 if ac_fn_c_try_compile "$LINENO"; then :
20037   ol_cv_func_ctime_r_nargs2=yes
20038 else
20039   ol_cv_func_ctime_r_nargs2=no
20040 fi
20041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20042
20043         if test $ol_cv_func_ctime_r_nargs3 = yes &&
20044            test $ol_cv_func_ctime_r_nargs2 = no ; then
20045
20046                 ol_cv_func_ctime_r_nargs=3
20047
20048         elif test $ol_cv_func_ctime_r_nargs3 = no &&
20049              test $ol_cv_func_ctime_r_nargs2 = yes ; then
20050
20051                 ol_cv_func_ctime_r_nargs=2
20052
20053         else
20054                 ol_cv_func_ctime_r_nargs=0
20055         fi
20056
20057 fi
20058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_ctime_r_nargs" >&5
20059 $as_echo "$ol_cv_func_ctime_r_nargs" >&6; }
20060
20061   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
20062
20063 cat >>confdefs.h <<_ACEOF
20064 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
20065 _ACEOF
20066
20067   fi
20068
20069 fi
20070
20071 if test "$ac_cv_func_gethostbyname_r" = yes ; then
20072         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyname_r" >&5
20073 $as_echo_n "checking number of arguments of gethostbyname_r... " >&6; }
20074 if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then :
20075   $as_echo_n "(cached) " >&6
20076 else
20077   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20078 /* end confdefs.h.  */
20079 #include <sys/types.h>
20080 #include <sys/socket.h>
20081 #include <netinet/in.h>
20082 #include <netdb.h>
20083 #define BUFSIZE (sizeof(struct hostent)+10)
20084 int
20085 main ()
20086 {
20087 struct hostent hent; char buffer[BUFSIZE];
20088                 int bufsize=BUFSIZE;int h_errno;
20089                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
20090                         buffer, bufsize, &h_errno);
20091   ;
20092   return 0;
20093 }
20094 _ACEOF
20095 if ac_fn_c_try_compile "$LINENO"; then :
20096   ol_cv_func_gethostbyname_r_nargs5=yes
20097 else
20098   ol_cv_func_gethostbyname_r_nargs5=no
20099 fi
20100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20101
20102         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20103 /* end confdefs.h.  */
20104 #include <sys/types.h>
20105 #include <sys/socket.h>
20106 #include <netinet/in.h>
20107 #include <netdb.h>
20108 #define BUFSIZE (sizeof(struct hostent)+10)
20109 int
20110 main ()
20111 {
20112 struct hostent hent;struct hostent *rhent;
20113                 char buffer[BUFSIZE];
20114                 int bufsize=BUFSIZE;int h_errno;
20115                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
20116                         &rhent, &h_errno);
20117   ;
20118   return 0;
20119 }
20120 _ACEOF
20121 if ac_fn_c_try_compile "$LINENO"; then :
20122   ol_cv_func_gethostbyname_r_nargs6=yes
20123 else
20124   ol_cv_func_gethostbyname_r_nargs6=no
20125 fi
20126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20127
20128         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
20129            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
20130
20131                 ol_cv_func_gethostbyname_r_nargs=5
20132
20133         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
20134              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
20135
20136                 ol_cv_func_gethostbyname_r_nargs=6
20137
20138         else
20139                 ol_cv_func_gethostbyname_r_nargs=0
20140         fi
20141
20142 fi
20143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyname_r_nargs" >&5
20144 $as_echo "$ol_cv_func_gethostbyname_r_nargs" >&6; }
20145   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
20146
20147 cat >>confdefs.h <<_ACEOF
20148 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
20149 _ACEOF
20150
20151   fi
20152
20153 else
20154         ol_cv_func_gethostbyname_r_nargs=0
20155 fi
20156
20157 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
20158         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyaddr_r" >&5
20159 $as_echo_n "checking number of arguments of gethostbyaddr_r... " >&6; }
20160 if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then :
20161   $as_echo_n "(cached) " >&6
20162 else
20163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20164 /* end confdefs.h.  */
20165 #include <sys/types.h>
20166 #include <sys/socket.h>
20167 #include <netinet/in.h>
20168 #include <netdb.h>
20169 #define BUFSIZE (sizeof(struct hostent)+10)
20170 int
20171 main ()
20172 {
20173 struct hostent hent; char buffer[BUFSIZE];
20174             struct in_addr add;
20175             size_t alen=sizeof(struct in_addr);
20176             int bufsize=BUFSIZE;int h_errno;
20177                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20178                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
20179   ;
20180   return 0;
20181 }
20182 _ACEOF
20183 if ac_fn_c_try_compile "$LINENO"; then :
20184   ol_cv_func_gethostbyaddr_r_nargs7=yes
20185 else
20186   ol_cv_func_gethostbyaddr_r_nargs7=no
20187 fi
20188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20189
20190         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20191 /* end confdefs.h.  */
20192 #include <sys/types.h>
20193 #include <sys/socket.h>
20194 #include <netinet/in.h>
20195 #include <netdb.h>
20196 #define BUFSIZE (sizeof(struct hostent)+10)
20197 int
20198 main ()
20199 {
20200 struct hostent hent;
20201                 struct hostent *rhent; char buffer[BUFSIZE];
20202                 struct in_addr add;
20203                 size_t alen=sizeof(struct in_addr);
20204                 int bufsize=BUFSIZE;int h_errno;
20205                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20206                         alen, AF_INET, &hent, buffer, bufsize,
20207                         &rhent, &h_errno);
20208   ;
20209   return 0;
20210 }
20211 _ACEOF
20212 if ac_fn_c_try_compile "$LINENO"; then :
20213   ol_cv_func_gethostbyaddr_r_nargs8=yes
20214 else
20215   ol_cv_func_gethostbyaddr_r_nargs8=no
20216 fi
20217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20218
20219         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
20220            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
20221
20222                 ol_cv_func_gethostbyaddr_r_nargs=7
20223
20224         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
20225              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
20226
20227                 ol_cv_func_gethostbyaddr_r_nargs=8
20228
20229         else
20230                 ol_cv_func_gethostbyaddr_r_nargs=0
20231         fi
20232
20233 fi
20234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
20235 $as_echo "$ol_cv_func_gethostbyaddr_r_nargs" >&6; }
20236   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
20237
20238 cat >>confdefs.h <<_ACEOF
20239 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
20240 _ACEOF
20241
20242   fi
20243
20244 else
20245         ol_cv_func_gethostbyaddr_r_nargs=0
20246 fi
20247
20248 ol_link_bdb=no
20249
20250 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
20251         ol_cv_berkeley_db=no
20252 for ac_header in db.h
20253 do :
20254   ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default"
20255 if test "x$ac_cv_header_db_h" = x""yes; then :
20256   cat >>confdefs.h <<_ACEOF
20257 #define HAVE_DB_H 1
20258 _ACEOF
20259
20260 fi
20261
20262 done
20263
20264 if test $ac_cv_header_db_h = yes; then
20265         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB major version in db.h" >&5
20266 $as_echo_n "checking for Berkeley DB major version in db.h... " >&6; }
20267 if test "${ol_cv_bdb_major+set}" = set; then :
20268   $as_echo_n "(cached) " >&6
20269 else
20270
20271         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20272 /* end confdefs.h.  */
20273
20274 #include <db.h>
20275 #ifndef DB_VERSION_MAJOR
20276 #       define DB_VERSION_MAJOR 1
20277 #endif
20278 __db_version DB_VERSION_MAJOR
20279
20280 _ACEOF
20281         set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
20282         ol_cv_bdb_major=${3}
20283
20284 fi
20285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_major" >&5
20286 $as_echo "$ol_cv_bdb_major" >&6; }
20287 case $ol_cv_bdb_major in [1-9]*) : ;; *)
20288         as_fn_error "Unknown Berkeley DB major version in db.h" "$LINENO" 5 ;;
20289 esac
20290
20291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB minor version in db.h" >&5
20292 $as_echo_n "checking for Berkeley DB minor version in db.h... " >&6; }
20293 if test "${ol_cv_bdb_minor+set}" = set; then :
20294   $as_echo_n "(cached) " >&6
20295 else
20296
20297         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20298 /* end confdefs.h.  */
20299
20300 #include <db.h>
20301 #ifndef DB_VERSION_MINOR
20302 #       define DB_VERSION_MINOR 0
20303 #endif
20304 __db_version DB_VERSION_MINOR
20305
20306 _ACEOF
20307         set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
20308         ol_cv_bdb_minor=${3}
20309
20310 fi
20311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_minor" >&5
20312 $as_echo "$ol_cv_bdb_minor" >&6; }
20313 case $ol_cv_bdb_minor in [0-9]*) : ;; *)
20314         as_fn_error "Unknown Berkeley DB minor version in db.h" "$LINENO" 5 ;;
20315 esac
20316
20317         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Berkeley DB version supported by BDB/HDB backends" >&5
20318 $as_echo_n "checking if Berkeley DB version supported by BDB/HDB backends... " >&6; }
20319 if test "${ol_cv_bdb_compat+set}" = set; then :
20320   $as_echo_n "(cached) " >&6
20321 else
20322
20323         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20324 /* end confdefs.h.  */
20325
20326 #include <db.h>
20327
20328  /* this check could be improved */
20329 #ifndef DB_VERSION_MAJOR
20330 #       define DB_VERSION_MAJOR 1
20331 #endif
20332 #ifndef DB_VERSION_MINOR
20333 #       define DB_VERSION_MINOR 0
20334 #endif
20335
20336 #define DB_VERSION_MM   ((DB_VERSION_MAJOR<<8)|DB_VERSION_MINOR)
20337
20338 /* require 4.4 or later */
20339 #if DB_VERSION_MM >= 0x0404
20340         __db_version_compat
20341 #endif
20342
20343 _ACEOF
20344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20345   $EGREP "__db_version_compat" >/dev/null 2>&1; then :
20346   ol_cv_bdb_compat=yes
20347 else
20348   ol_cv_bdb_compat=no
20349 fi
20350 rm -f conftest*
20351
20352 fi
20353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_compat" >&5
20354 $as_echo "$ol_cv_bdb_compat" >&6; }
20355
20356
20357         if test $ol_cv_bdb_compat != yes ; then
20358                 as_fn_error "BerkeleyDB version incompatible with BDB/HDB backends" "$LINENO" 5
20359         fi
20360
20361         ol_cv_lib_db=no
20362
20363 if test $ol_cv_bdb_major = 5 ; then
20364         if test $ol_cv_lib_db = no ; then
20365         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)" >&5
20366 $as_echo_n "checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)... " >&6; }
20367 if test "${ol_cv_db_db_5_dot_m+set}" = set; then :
20368   $as_echo_n "(cached) " >&6
20369 else
20370
20371         ol_DB_LIB=-ldb-5.$ol_cv_bdb_minor
20372         ol_LIBS=$LIBS
20373         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20374
20375         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20376 /* end confdefs.h.  */
20377
20378 #ifdef HAVE_DB_185_H
20379 # include <db_185.h>
20380 #else
20381 # include <db.h>
20382 #endif
20383
20384 #ifndef DB_VERSION_MAJOR
20385 # define DB_VERSION_MAJOR 1
20386 #endif
20387
20388 #ifndef NULL
20389 #define NULL ((void*)0)
20390 #endif
20391
20392 int
20393 main ()
20394 {
20395
20396 #if DB_VERSION_MAJOR > 2
20397         db_env_create( NULL, 0 );
20398 #elif DB_VERSION_MAJOR > 1
20399         db_appexit( NULL );
20400 #else
20401         (void) dbopen( NULL, 0, 0, 0, NULL);
20402 #endif
20403
20404   ;
20405   return 0;
20406 }
20407 _ACEOF
20408 if ac_fn_c_try_link "$LINENO"; then :
20409   ol_cv_db_db_5_dot_m=yes
20410 else
20411   ol_cv_db_db_5_dot_m=no
20412 fi
20413 rm -f core conftest.err conftest.$ac_objext \
20414     conftest$ac_exeext conftest.$ac_ext
20415
20416         LIBS="$ol_LIBS"
20417
20418 fi
20419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_dot_m" >&5
20420 $as_echo "$ol_cv_db_db_5_dot_m" >&6; }
20421
20422         if test $ol_cv_db_db_5_dot_m = yes ; then
20423                 ol_cv_lib_db=-ldb-5.$ol_cv_bdb_minor
20424         fi
20425 fi
20426
20427         if test $ol_cv_lib_db = no ; then
20428         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)" >&5
20429 $as_echo_n "checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)... " >&6; }
20430 if test "${ol_cv_db_db5m+set}" = set; then :
20431   $as_echo_n "(cached) " >&6
20432 else
20433
20434         ol_DB_LIB=-ldb5$ol_cv_bdb_minor
20435         ol_LIBS=$LIBS
20436         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20437
20438         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20439 /* end confdefs.h.  */
20440
20441 #ifdef HAVE_DB_185_H
20442 # include <db_185.h>
20443 #else
20444 # include <db.h>
20445 #endif
20446
20447 #ifndef DB_VERSION_MAJOR
20448 # define DB_VERSION_MAJOR 1
20449 #endif
20450
20451 #ifndef NULL
20452 #define NULL ((void*)0)
20453 #endif
20454
20455 int
20456 main ()
20457 {
20458
20459 #if DB_VERSION_MAJOR > 2
20460         db_env_create( NULL, 0 );
20461 #elif DB_VERSION_MAJOR > 1
20462         db_appexit( NULL );
20463 #else
20464         (void) dbopen( NULL, 0, 0, 0, NULL);
20465 #endif
20466
20467   ;
20468   return 0;
20469 }
20470 _ACEOF
20471 if ac_fn_c_try_link "$LINENO"; then :
20472   ol_cv_db_db5m=yes
20473 else
20474   ol_cv_db_db5m=no
20475 fi
20476 rm -f core conftest.err conftest.$ac_objext \
20477     conftest$ac_exeext conftest.$ac_ext
20478
20479         LIBS="$ol_LIBS"
20480
20481 fi
20482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5m" >&5
20483 $as_echo "$ol_cv_db_db5m" >&6; }
20484
20485         if test $ol_cv_db_db5m = yes ; then
20486                 ol_cv_lib_db=-ldb5$ol_cv_bdb_minor
20487         fi
20488 fi
20489
20490         if test $ol_cv_lib_db = no ; then
20491         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)" >&5
20492 $as_echo_n "checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)... " >&6; }
20493 if test "${ol_cv_db_db_5m+set}" = set; then :
20494   $as_echo_n "(cached) " >&6
20495 else
20496
20497         ol_DB_LIB=-ldb-5$ol_cv_bdb_minor
20498         ol_LIBS=$LIBS
20499         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20500
20501         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20502 /* end confdefs.h.  */
20503
20504 #ifdef HAVE_DB_185_H
20505 # include <db_185.h>
20506 #else
20507 # include <db.h>
20508 #endif
20509
20510 #ifndef DB_VERSION_MAJOR
20511 # define DB_VERSION_MAJOR 1
20512 #endif
20513
20514 #ifndef NULL
20515 #define NULL ((void*)0)
20516 #endif
20517
20518 int
20519 main ()
20520 {
20521
20522 #if DB_VERSION_MAJOR > 2
20523         db_env_create( NULL, 0 );
20524 #elif DB_VERSION_MAJOR > 1
20525         db_appexit( NULL );
20526 #else
20527         (void) dbopen( NULL, 0, 0, 0, NULL);
20528 #endif
20529
20530   ;
20531   return 0;
20532 }
20533 _ACEOF
20534 if ac_fn_c_try_link "$LINENO"; then :
20535   ol_cv_db_db_5m=yes
20536 else
20537   ol_cv_db_db_5m=no
20538 fi
20539 rm -f core conftest.err conftest.$ac_objext \
20540     conftest$ac_exeext conftest.$ac_ext
20541
20542         LIBS="$ol_LIBS"
20543
20544 fi
20545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5m" >&5
20546 $as_echo "$ol_cv_db_db_5m" >&6; }
20547
20548         if test $ol_cv_db_db_5m = yes ; then
20549                 ol_cv_lib_db=-ldb-5$ol_cv_bdb_minor
20550         fi
20551 fi
20552
20553         if test $ol_cv_lib_db = no ; then
20554         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)" >&5
20555 $as_echo_n "checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)... " >&6; }
20556 if test "${ol_cv_db_db_5_m+set}" = set; then :
20557   $as_echo_n "(cached) " >&6
20558 else
20559
20560         ol_DB_LIB=-ldb-5-$ol_cv_bdb_minor
20561         ol_LIBS=$LIBS
20562         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20563
20564         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20565 /* end confdefs.h.  */
20566
20567 #ifdef HAVE_DB_185_H
20568 # include <db_185.h>
20569 #else
20570 # include <db.h>
20571 #endif
20572
20573 #ifndef DB_VERSION_MAJOR
20574 # define DB_VERSION_MAJOR 1
20575 #endif
20576
20577 #ifndef NULL
20578 #define NULL ((void*)0)
20579 #endif
20580
20581 int
20582 main ()
20583 {
20584
20585 #if DB_VERSION_MAJOR > 2
20586         db_env_create( NULL, 0 );
20587 #elif DB_VERSION_MAJOR > 1
20588         db_appexit( NULL );
20589 #else
20590         (void) dbopen( NULL, 0, 0, 0, NULL);
20591 #endif
20592
20593   ;
20594   return 0;
20595 }
20596 _ACEOF
20597 if ac_fn_c_try_link "$LINENO"; then :
20598   ol_cv_db_db_5_m=yes
20599 else
20600   ol_cv_db_db_5_m=no
20601 fi
20602 rm -f core conftest.err conftest.$ac_objext \
20603     conftest$ac_exeext conftest.$ac_ext
20604
20605         LIBS="$ol_LIBS"
20606
20607 fi
20608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_m" >&5
20609 $as_echo "$ol_cv_db_db_5_m" >&6; }
20610
20611         if test $ol_cv_db_db_5_m = yes ; then
20612                 ol_cv_lib_db=-ldb-5-$ol_cv_bdb_minor
20613         fi
20614 fi
20615
20616         if test $ol_cv_lib_db = no ; then
20617         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5)" >&5
20618 $as_echo_n "checking for Berkeley DB link (-ldb-5)... " >&6; }
20619 if test "${ol_cv_db_db_5+set}" = set; then :
20620   $as_echo_n "(cached) " >&6
20621 else
20622
20623         ol_DB_LIB=-ldb-5
20624         ol_LIBS=$LIBS
20625         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20626
20627         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20628 /* end confdefs.h.  */
20629
20630 #ifdef HAVE_DB_185_H
20631 # include <db_185.h>
20632 #else
20633 # include <db.h>
20634 #endif
20635
20636 #ifndef DB_VERSION_MAJOR
20637 # define DB_VERSION_MAJOR 1
20638 #endif
20639
20640 #ifndef NULL
20641 #define NULL ((void*)0)
20642 #endif
20643
20644 int
20645 main ()
20646 {
20647
20648 #if DB_VERSION_MAJOR > 2
20649         db_env_create( NULL, 0 );
20650 #elif DB_VERSION_MAJOR > 1
20651         db_appexit( NULL );
20652 #else
20653         (void) dbopen( NULL, 0, 0, 0, NULL);
20654 #endif
20655
20656   ;
20657   return 0;
20658 }
20659 _ACEOF
20660 if ac_fn_c_try_link "$LINENO"; then :
20661   ol_cv_db_db_5=yes
20662 else
20663   ol_cv_db_db_5=no
20664 fi
20665 rm -f core conftest.err conftest.$ac_objext \
20666     conftest$ac_exeext conftest.$ac_ext
20667
20668         LIBS="$ol_LIBS"
20669
20670 fi
20671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5" >&5
20672 $as_echo "$ol_cv_db_db_5" >&6; }
20673
20674         if test $ol_cv_db_db_5 = yes ; then
20675                 ol_cv_lib_db=-ldb-5
20676         fi
20677 fi
20678
20679         if test $ol_cv_lib_db = no ; then
20680         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5)" >&5
20681 $as_echo_n "checking for Berkeley DB link (-ldb5)... " >&6; }
20682 if test "${ol_cv_db_db5+set}" = set; then :
20683   $as_echo_n "(cached) " >&6
20684 else
20685
20686         ol_DB_LIB=-ldb5
20687         ol_LIBS=$LIBS
20688         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20689
20690         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20691 /* end confdefs.h.  */
20692
20693 #ifdef HAVE_DB_185_H
20694 # include <db_185.h>
20695 #else
20696 # include <db.h>
20697 #endif
20698
20699 #ifndef DB_VERSION_MAJOR
20700 # define DB_VERSION_MAJOR 1
20701 #endif
20702
20703 #ifndef NULL
20704 #define NULL ((void*)0)
20705 #endif
20706
20707 int
20708 main ()
20709 {
20710
20711 #if DB_VERSION_MAJOR > 2
20712         db_env_create( NULL, 0 );
20713 #elif DB_VERSION_MAJOR > 1
20714         db_appexit( NULL );
20715 #else
20716         (void) dbopen( NULL, 0, 0, 0, NULL);
20717 #endif
20718
20719   ;
20720   return 0;
20721 }
20722 _ACEOF
20723 if ac_fn_c_try_link "$LINENO"; then :
20724   ol_cv_db_db5=yes
20725 else
20726   ol_cv_db_db5=no
20727 fi
20728 rm -f core conftest.err conftest.$ac_objext \
20729     conftest$ac_exeext conftest.$ac_ext
20730
20731         LIBS="$ol_LIBS"
20732
20733 fi
20734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5" >&5
20735 $as_echo "$ol_cv_db_db5" >&6; }
20736
20737         if test $ol_cv_db_db5 = yes ; then
20738                 ol_cv_lib_db=-ldb5
20739         fi
20740 fi
20741
20742 elif test $ol_cv_bdb_major = 4 ; then
20743         if test $ol_cv_lib_db = no ; then
20744         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)" >&5
20745 $as_echo_n "checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)... " >&6; }
20746 if test "${ol_cv_db_db_4_dot_m+set}" = set; then :
20747   $as_echo_n "(cached) " >&6
20748 else
20749
20750         ol_DB_LIB=-ldb-4.$ol_cv_bdb_minor
20751         ol_LIBS=$LIBS
20752         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20753
20754         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20755 /* end confdefs.h.  */
20756
20757 #ifdef HAVE_DB_185_H
20758 # include <db_185.h>
20759 #else
20760 # include <db.h>
20761 #endif
20762
20763 #ifndef DB_VERSION_MAJOR
20764 # define DB_VERSION_MAJOR 1
20765 #endif
20766
20767 #ifndef NULL
20768 #define NULL ((void*)0)
20769 #endif
20770
20771 int
20772 main ()
20773 {
20774
20775 #if DB_VERSION_MAJOR > 2
20776         db_env_create( NULL, 0 );
20777 #elif DB_VERSION_MAJOR > 1
20778         db_appexit( NULL );
20779 #else
20780         (void) dbopen( NULL, 0, 0, 0, NULL);
20781 #endif
20782
20783   ;
20784   return 0;
20785 }
20786 _ACEOF
20787 if ac_fn_c_try_link "$LINENO"; then :
20788   ol_cv_db_db_4_dot_m=yes
20789 else
20790   ol_cv_db_db_4_dot_m=no
20791 fi
20792 rm -f core conftest.err conftest.$ac_objext \
20793     conftest$ac_exeext conftest.$ac_ext
20794
20795         LIBS="$ol_LIBS"
20796
20797 fi
20798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_dot_m" >&5
20799 $as_echo "$ol_cv_db_db_4_dot_m" >&6; }
20800
20801         if test $ol_cv_db_db_4_dot_m = yes ; then
20802                 ol_cv_lib_db=-ldb-4.$ol_cv_bdb_minor
20803         fi
20804 fi
20805
20806         if test $ol_cv_lib_db = no ; then
20807         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)" >&5
20808 $as_echo_n "checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)... " >&6; }
20809 if test "${ol_cv_db_db4m+set}" = set; then :
20810   $as_echo_n "(cached) " >&6
20811 else
20812
20813         ol_DB_LIB=-ldb4$ol_cv_bdb_minor
20814         ol_LIBS=$LIBS
20815         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20816
20817         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20818 /* end confdefs.h.  */
20819
20820 #ifdef HAVE_DB_185_H
20821 # include <db_185.h>
20822 #else
20823 # include <db.h>
20824 #endif
20825
20826 #ifndef DB_VERSION_MAJOR
20827 # define DB_VERSION_MAJOR 1
20828 #endif
20829
20830 #ifndef NULL
20831 #define NULL ((void*)0)
20832 #endif
20833
20834 int
20835 main ()
20836 {
20837
20838 #if DB_VERSION_MAJOR > 2
20839         db_env_create( NULL, 0 );
20840 #elif DB_VERSION_MAJOR > 1
20841         db_appexit( NULL );
20842 #else
20843         (void) dbopen( NULL, 0, 0, 0, NULL);
20844 #endif
20845
20846   ;
20847   return 0;
20848 }
20849 _ACEOF
20850 if ac_fn_c_try_link "$LINENO"; then :
20851   ol_cv_db_db4m=yes
20852 else
20853   ol_cv_db_db4m=no
20854 fi
20855 rm -f core conftest.err conftest.$ac_objext \
20856     conftest$ac_exeext conftest.$ac_ext
20857
20858         LIBS="$ol_LIBS"
20859
20860 fi
20861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4m" >&5
20862 $as_echo "$ol_cv_db_db4m" >&6; }
20863
20864         if test $ol_cv_db_db4m = yes ; then
20865                 ol_cv_lib_db=-ldb4$ol_cv_bdb_minor
20866         fi
20867 fi
20868
20869         if test $ol_cv_lib_db = no ; then
20870         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)" >&5
20871 $as_echo_n "checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)... " >&6; }
20872 if test "${ol_cv_db_db_4m+set}" = set; then :
20873   $as_echo_n "(cached) " >&6
20874 else
20875
20876         ol_DB_LIB=-ldb-4$ol_cv_bdb_minor
20877         ol_LIBS=$LIBS
20878         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20879
20880         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20881 /* end confdefs.h.  */
20882
20883 #ifdef HAVE_DB_185_H
20884 # include <db_185.h>
20885 #else
20886 # include <db.h>
20887 #endif
20888
20889 #ifndef DB_VERSION_MAJOR
20890 # define DB_VERSION_MAJOR 1
20891 #endif
20892
20893 #ifndef NULL
20894 #define NULL ((void*)0)
20895 #endif
20896
20897 int
20898 main ()
20899 {
20900
20901 #if DB_VERSION_MAJOR > 2
20902         db_env_create( NULL, 0 );
20903 #elif DB_VERSION_MAJOR > 1
20904         db_appexit( NULL );
20905 #else
20906         (void) dbopen( NULL, 0, 0, 0, NULL);
20907 #endif
20908
20909   ;
20910   return 0;
20911 }
20912 _ACEOF
20913 if ac_fn_c_try_link "$LINENO"; then :
20914   ol_cv_db_db_4m=yes
20915 else
20916   ol_cv_db_db_4m=no
20917 fi
20918 rm -f core conftest.err conftest.$ac_objext \
20919     conftest$ac_exeext conftest.$ac_ext
20920
20921         LIBS="$ol_LIBS"
20922
20923 fi
20924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4m" >&5
20925 $as_echo "$ol_cv_db_db_4m" >&6; }
20926
20927         if test $ol_cv_db_db_4m = yes ; then
20928                 ol_cv_lib_db=-ldb-4$ol_cv_bdb_minor
20929         fi
20930 fi
20931
20932         if test $ol_cv_lib_db = no ; then
20933         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)" >&5
20934 $as_echo_n "checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)... " >&6; }
20935 if test "${ol_cv_db_db_4_m+set}" = set; then :
20936   $as_echo_n "(cached) " >&6
20937 else
20938
20939         ol_DB_LIB=-ldb-4-$ol_cv_bdb_minor
20940         ol_LIBS=$LIBS
20941         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20942
20943         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20944 /* end confdefs.h.  */
20945
20946 #ifdef HAVE_DB_185_H
20947 # include <db_185.h>
20948 #else
20949 # include <db.h>
20950 #endif
20951
20952 #ifndef DB_VERSION_MAJOR
20953 # define DB_VERSION_MAJOR 1
20954 #endif
20955
20956 #ifndef NULL
20957 #define NULL ((void*)0)
20958 #endif
20959
20960 int
20961 main ()
20962 {
20963
20964 #if DB_VERSION_MAJOR > 2
20965         db_env_create( NULL, 0 );
20966 #elif DB_VERSION_MAJOR > 1
20967         db_appexit( NULL );
20968 #else
20969         (void) dbopen( NULL, 0, 0, 0, NULL);
20970 #endif
20971
20972   ;
20973   return 0;
20974 }
20975 _ACEOF
20976 if ac_fn_c_try_link "$LINENO"; then :
20977   ol_cv_db_db_4_m=yes
20978 else
20979   ol_cv_db_db_4_m=no
20980 fi
20981 rm -f core conftest.err conftest.$ac_objext \
20982     conftest$ac_exeext conftest.$ac_ext
20983
20984         LIBS="$ol_LIBS"
20985
20986 fi
20987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_m" >&5
20988 $as_echo "$ol_cv_db_db_4_m" >&6; }
20989
20990         if test $ol_cv_db_db_4_m = yes ; then
20991                 ol_cv_lib_db=-ldb-4-$ol_cv_bdb_minor
20992         fi
20993 fi
20994
20995         if test $ol_cv_lib_db = no ; then
20996         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4)" >&5
20997 $as_echo_n "checking for Berkeley DB link (-ldb-4)... " >&6; }
20998 if test "${ol_cv_db_db_4+set}" = set; then :
20999   $as_echo_n "(cached) " >&6
21000 else
21001
21002         ol_DB_LIB=-ldb-4
21003         ol_LIBS=$LIBS
21004         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21005
21006         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21007 /* end confdefs.h.  */
21008
21009 #ifdef HAVE_DB_185_H
21010 # include <db_185.h>
21011 #else
21012 # include <db.h>
21013 #endif
21014
21015 #ifndef DB_VERSION_MAJOR
21016 # define DB_VERSION_MAJOR 1
21017 #endif
21018
21019 #ifndef NULL
21020 #define NULL ((void*)0)
21021 #endif
21022
21023 int
21024 main ()
21025 {
21026
21027 #if DB_VERSION_MAJOR > 2
21028         db_env_create( NULL, 0 );
21029 #elif DB_VERSION_MAJOR > 1
21030         db_appexit( NULL );
21031 #else
21032         (void) dbopen( NULL, 0, 0, 0, NULL);
21033 #endif
21034
21035   ;
21036   return 0;
21037 }
21038 _ACEOF
21039 if ac_fn_c_try_link "$LINENO"; then :
21040   ol_cv_db_db_4=yes
21041 else
21042   ol_cv_db_db_4=no
21043 fi
21044 rm -f core conftest.err conftest.$ac_objext \
21045     conftest$ac_exeext conftest.$ac_ext
21046
21047         LIBS="$ol_LIBS"
21048
21049 fi
21050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4" >&5
21051 $as_echo "$ol_cv_db_db_4" >&6; }
21052
21053         if test $ol_cv_db_db_4 = yes ; then
21054                 ol_cv_lib_db=-ldb-4
21055         fi
21056 fi
21057
21058         if test $ol_cv_lib_db = no ; then
21059         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4)" >&5
21060 $as_echo_n "checking for Berkeley DB link (-ldb4)... " >&6; }
21061 if test "${ol_cv_db_db4+set}" = set; then :
21062   $as_echo_n "(cached) " >&6
21063 else
21064
21065         ol_DB_LIB=-ldb4
21066         ol_LIBS=$LIBS
21067         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21068
21069         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21070 /* end confdefs.h.  */
21071
21072 #ifdef HAVE_DB_185_H
21073 # include <db_185.h>
21074 #else
21075 # include <db.h>
21076 #endif
21077
21078 #ifndef DB_VERSION_MAJOR
21079 # define DB_VERSION_MAJOR 1
21080 #endif
21081
21082 #ifndef NULL
21083 #define NULL ((void*)0)
21084 #endif
21085
21086 int
21087 main ()
21088 {
21089
21090 #if DB_VERSION_MAJOR > 2
21091         db_env_create( NULL, 0 );
21092 #elif DB_VERSION_MAJOR > 1
21093         db_appexit( NULL );
21094 #else
21095         (void) dbopen( NULL, 0, 0, 0, NULL);
21096 #endif
21097
21098   ;
21099   return 0;
21100 }
21101 _ACEOF
21102 if ac_fn_c_try_link "$LINENO"; then :
21103   ol_cv_db_db4=yes
21104 else
21105   ol_cv_db_db4=no
21106 fi
21107 rm -f core conftest.err conftest.$ac_objext \
21108     conftest$ac_exeext conftest.$ac_ext
21109
21110         LIBS="$ol_LIBS"
21111
21112 fi
21113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4" >&5
21114 $as_echo "$ol_cv_db_db4" >&6; }
21115
21116         if test $ol_cv_db_db4 = yes ; then
21117                 ol_cv_lib_db=-ldb4
21118         fi
21119 fi
21120
21121 fi
21122 if test $ol_cv_lib_db = no ; then
21123         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb)" >&5
21124 $as_echo_n "checking for Berkeley DB link (-ldb)... " >&6; }
21125 if test "${ol_cv_db_db+set}" = set; then :
21126   $as_echo_n "(cached) " >&6
21127 else
21128
21129         ol_DB_LIB=-ldb
21130         ol_LIBS=$LIBS
21131         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21132
21133         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21134 /* end confdefs.h.  */
21135
21136 #ifdef HAVE_DB_185_H
21137 # include <db_185.h>
21138 #else
21139 # include <db.h>
21140 #endif
21141
21142 #ifndef DB_VERSION_MAJOR
21143 # define DB_VERSION_MAJOR 1
21144 #endif
21145
21146 #ifndef NULL
21147 #define NULL ((void*)0)
21148 #endif
21149
21150 int
21151 main ()
21152 {
21153
21154 #if DB_VERSION_MAJOR > 2
21155         db_env_create( NULL, 0 );
21156 #elif DB_VERSION_MAJOR > 1
21157         db_appexit( NULL );
21158 #else
21159         (void) dbopen( NULL, 0, 0, 0, NULL);
21160 #endif
21161
21162   ;
21163   return 0;
21164 }
21165 _ACEOF
21166 if ac_fn_c_try_link "$LINENO"; then :
21167   ol_cv_db_db=yes
21168 else
21169   ol_cv_db_db=no
21170 fi
21171 rm -f core conftest.err conftest.$ac_objext \
21172     conftest$ac_exeext conftest.$ac_ext
21173
21174         LIBS="$ol_LIBS"
21175
21176 fi
21177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db" >&5
21178 $as_echo "$ol_cv_db_db" >&6; }
21179
21180         if test $ol_cv_db_db = yes ; then
21181                 ol_cv_lib_db=-ldb
21182         fi
21183 fi
21184
21185 if test $ol_cv_lib_db = no ; then
21186         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (default)" >&5
21187 $as_echo_n "checking for Berkeley DB link (default)... " >&6; }
21188 if test "${ol_cv_db_none+set}" = set; then :
21189   $as_echo_n "(cached) " >&6
21190 else
21191
21192         ol_DB_LIB=
21193         ol_LIBS=$LIBS
21194         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21195
21196         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21197 /* end confdefs.h.  */
21198
21199 #ifdef HAVE_DB_185_H
21200 # include <db_185.h>
21201 #else
21202 # include <db.h>
21203 #endif
21204
21205 #ifndef DB_VERSION_MAJOR
21206 # define DB_VERSION_MAJOR 1
21207 #endif
21208
21209 #ifndef NULL
21210 #define NULL ((void*)0)
21211 #endif
21212
21213 int
21214 main ()
21215 {
21216
21217 #if DB_VERSION_MAJOR > 2
21218         db_env_create( NULL, 0 );
21219 #elif DB_VERSION_MAJOR > 1
21220         db_appexit( NULL );
21221 #else
21222         (void) dbopen( NULL, 0, 0, 0, NULL);
21223 #endif
21224
21225   ;
21226   return 0;
21227 }
21228 _ACEOF
21229 if ac_fn_c_try_link "$LINENO"; then :
21230   ol_cv_db_none=yes
21231 else
21232   ol_cv_db_none=no
21233 fi
21234 rm -f core conftest.err conftest.$ac_objext \
21235     conftest$ac_exeext conftest.$ac_ext
21236
21237         LIBS="$ol_LIBS"
21238
21239 fi
21240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_none" >&5
21241 $as_echo "$ol_cv_db_none" >&6; }
21242
21243         if test $ol_cv_db_none = yes ; then
21244                 ol_cv_lib_db=yes
21245         fi
21246 fi
21247
21248
21249         if test "$ol_cv_lib_db" != no ; then
21250                 ol_cv_berkeley_db=yes
21251                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB library and header version match" >&5
21252 $as_echo_n "checking for Berkeley DB library and header version match... " >&6; }
21253 if test "${ol_cv_berkeley_db_version+set}" = set; then :
21254   $as_echo_n "(cached) " >&6
21255 else
21256
21257         ol_LIBS="$LIBS"
21258         LIBS="$LTHREAD_LIBS $LIBS"
21259         if test $ol_cv_lib_db != yes ; then
21260                 LIBS="$ol_cv_lib_db $LIBS"
21261         fi
21262
21263         if test "$cross_compiling" = yes; then :
21264   ol_cv_berkeley_db_version=cross
21265 else
21266   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21267 /* end confdefs.h.  */
21268
21269 #ifdef HAVE_DB_185_H
21270         choke me;
21271 #else
21272 #include <db.h>
21273 #endif
21274 #ifndef DB_VERSION_MAJOR
21275 # define DB_VERSION_MAJOR 1
21276 #endif
21277 #ifndef NULL
21278 #define NULL ((void *)0)
21279 #endif
21280 main()
21281 {
21282 #if DB_VERSION_MAJOR > 1
21283         char *version;
21284         int major, minor, patch;
21285
21286         version = db_version( &major, &minor, &patch );
21287
21288         if( major != DB_VERSION_MAJOR ||
21289                 minor != DB_VERSION_MINOR ||
21290                 patch != DB_VERSION_PATCH )
21291         {
21292                 printf("Berkeley DB version mismatch\n"
21293                         "\theader: %s\n\tlibrary: %s\n",
21294                         DB_VERSION_STRING, version);
21295                 return 1;
21296         }
21297 #endif
21298
21299         return 0;
21300 }
21301 _ACEOF
21302 if ac_fn_c_try_run "$LINENO"; then :
21303   ol_cv_berkeley_db_version=yes
21304 else
21305   ol_cv_berkeley_db_version=no
21306 fi
21307 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21308   conftest.$ac_objext conftest.beam conftest.$ac_ext
21309 fi
21310
21311
21312         LIBS="$ol_LIBS"
21313
21314 fi
21315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_version" >&5
21316 $as_echo "$ol_cv_berkeley_db_version" >&6; }
21317
21318         if test $ol_cv_berkeley_db_version = no ; then
21319                 as_fn_error "Berkeley DB version mismatch" "$LINENO" 5
21320         fi
21321
21322                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB thread support" >&5
21323 $as_echo_n "checking for Berkeley DB thread support... " >&6; }
21324 if test "${ol_cv_berkeley_db_thread+set}" = set; then :
21325   $as_echo_n "(cached) " >&6
21326 else
21327
21328         ol_LIBS="$LIBS"
21329         LIBS="$LTHREAD_LIBS $LIBS"
21330         if test $ol_cv_lib_db != yes ; then
21331                 LIBS="$ol_cv_lib_db $LIBS"
21332         fi
21333
21334         if test "$cross_compiling" = yes; then :
21335   ol_cv_berkeley_db_thread=cross
21336 else
21337   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21338 /* end confdefs.h.  */
21339
21340 #ifdef HAVE_DB_185_H
21341         choke me;
21342 #else
21343 #include <db.h>
21344 #endif
21345 #ifndef NULL
21346 #define NULL ((void *)0)
21347 #endif
21348 main()
21349 {
21350         int rc;
21351         u_int32_t flags = DB_CREATE |
21352 #ifdef DB_PRIVATE
21353                 DB_PRIVATE |
21354 #endif
21355                 DB_THREAD;
21356
21357 #if DB_VERSION_MAJOR > 2
21358         DB_ENV *env = NULL;
21359
21360         rc = db_env_create( &env, 0 );
21361
21362         flags |= DB_INIT_MPOOL;
21363 #ifdef DB_MPOOL_PRIVATE
21364         flags |= DB_MPOOL_PRIVATE;
21365 #endif
21366
21367         if( rc ) {
21368                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21369                 return rc;
21370         }
21371
21372 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
21373         rc = (env->open)( env, NULL, flags, 0 );
21374 #else
21375         rc = (env->open)( env, NULL, NULL, flags, 0 );
21376 #endif
21377
21378         if ( rc == 0 ) {
21379                 rc = env->close( env, 0 );
21380         }
21381
21382         if( rc ) {
21383                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21384                 return rc;
21385         }
21386
21387 #else
21388         DB_ENV env;
21389         memset( &env, '\0', sizeof(env) );
21390
21391         rc = db_appinit( NULL, NULL, &env, flags );
21392
21393         if( rc == 0 ) {
21394                 db_appexit( &env );
21395         }
21396
21397         unlink("__db_mpool.share");
21398         unlink("__db_lock.share");
21399 #endif
21400
21401         return rc;
21402 }
21403 _ACEOF
21404 if ac_fn_c_try_run "$LINENO"; then :
21405   ol_cv_berkeley_db_thread=yes
21406 else
21407   ol_cv_berkeley_db_thread=no
21408 fi
21409 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21410   conftest.$ac_objext conftest.beam conftest.$ac_ext
21411 fi
21412
21413
21414         LIBS="$ol_LIBS"
21415
21416 fi
21417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_thread" >&5
21418 $as_echo "$ol_cv_berkeley_db_thread" >&6; }
21419
21420         if test $ol_cv_berkeley_db_thread != no ; then
21421
21422 $as_echo "#define HAVE_BERKELEY_DB_THREAD 1" >>confdefs.h
21423
21424         fi
21425
21426         fi
21427 fi
21428
21429
21430         if test $ol_cv_berkeley_db = no ; then
21431                 as_fn_error "BDB/HDB: BerkeleyDB not available" "$LINENO" 5
21432         fi
21433
21434
21435 $as_echo "#define HAVE_BERKELEY_DB 1" >>confdefs.h
21436
21437
21438                         if test $ol_cv_lib_db != yes ; then
21439                 BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
21440         fi
21441
21442         SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
21443
21444         ol_link_bdb=yes
21445 fi
21446
21447
21448 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
21449         BUILD_LIBS_DYNAMIC=shared
21450
21451 $as_echo "#define LDAP_LIBS_DYNAMIC 1" >>confdefs.h
21452
21453         LTSTATIC=""
21454 else
21455         BUILD_LIBS_DYNAMIC=static
21456         LTSTATIC="-static"
21457 fi
21458
21459 if test $ol_enable_wrappers != no ; then
21460         for ac_header in tcpd.h
21461 do :
21462   ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
21463 if test "x$ac_cv_header_tcpd_h" = x""yes; then :
21464   cat >>confdefs.h <<_ACEOF
21465 #define HAVE_TCPD_H 1
21466 _ACEOF
21467
21468                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library" >&5
21469 $as_echo_n "checking for TCP wrappers library... " >&6; }
21470                 save_LIBS="$LIBS"
21471                 LIBS="$LIBS -lwrap"
21472                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21473 /* end confdefs.h.  */
21474
21475 #include <tcpd.h>
21476 int allow_severity = 0;
21477 int deny_severity  = 0;
21478
21479 struct request_info *req;
21480
21481 int
21482 main ()
21483 {
21484
21485 hosts_access(req)
21486
21487   ;
21488   return 0;
21489 }
21490 _ACEOF
21491 if ac_fn_c_try_link "$LINENO"; then :
21492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap" >&5
21493 $as_echo "-lwrap" >&6; }
21494                 have_wrappers=yes
21495                 LIBS="$save_LIBS"
21496 else
21497
21498                                 LIBS="$LIBS -lnsl"
21499                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21500 /* end confdefs.h.  */
21501
21502 #include <tcpd.h>
21503 int allow_severity = 0;
21504 int deny_severity  = 0;
21505
21506 struct request_info *req;
21507
21508 int
21509 main ()
21510 {
21511
21512 hosts_access(req)
21513
21514   ;
21515   return 0;
21516 }
21517 _ACEOF
21518 if ac_fn_c_try_link "$LINENO"; then :
21519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap -lnsl" >&5
21520 $as_echo "-lwrap -lnsl" >&6; }
21521                 have_wrappers=yes
21522                 LIBS="$save_LIBS -lnsl"
21523 else
21524
21525                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21526 $as_echo "no" >&6; }
21527                 have_wrappers=no
21528                 LIBS=$save_LIBS
21529 fi
21530 rm -f core conftest.err conftest.$ac_objext \
21531     conftest$ac_exeext conftest.$ac_ext
21532 fi
21533 rm -f core conftest.err conftest.$ac_objext \
21534     conftest$ac_exeext conftest.$ac_ext
21535 else
21536   have_wrappers=no
21537 fi
21538
21539 done
21540
21541
21542         if test $have_wrappers = yes ; then
21543
21544 $as_echo "#define HAVE_TCPD 1" >>confdefs.h
21545
21546                 WRAP_LIBS="-lwrap"
21547         elif test $ol_enable_wrappers = yes ; then
21548                 as_fn_error "could not find TCP wrappers, select apppropriate options or disable" "$LINENO" 5
21549         else
21550                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find TCP wrappers, support disabled" >&5
21551 $as_echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
21552                 WRAP_LIBS=""
21553         fi
21554 fi
21555
21556 if test $ol_enable_syslog != no ; then
21557         ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
21558 if test "x$ac_cv_func_openlog" = x""yes; then :
21559
21560 fi
21561
21562         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
21563                 { as_fn_set_status select appropriate options or disable
21564 as_fn_error "could not find syslog" "$LINENO" 5; }
21565         fi
21566         ol_enable_syslog=$ac_cv_func_openlog
21567 fi
21568
21569 ol_link_sql=no
21570 if test $ol_enable_sql != no ; then
21571         for ac_header in sql.h sqlext.h
21572 do :
21573   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21574 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21575 eval as_val=\$$as_ac_Header
21576    if test "x$as_val" = x""yes; then :
21577   cat >>confdefs.h <<_ACEOF
21578 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21579 _ACEOF
21580
21581 else
21582
21583                 as_fn_error "could not locate SQL headers" "$LINENO" 5
21584
21585 fi
21586
21587 done
21588
21589
21590         sql_LIBS="$LIBS"
21591         LIBS="$LTHREAD_LIBS"
21592
21593         if test $ol_with_odbc = auto ; then
21594                 ol_with_odbc="iodbc unixodbc odbc32"
21595         fi
21596
21597         for odbc in $ol_with_odbc ; do
21598                 if test $ol_link_sql = no ; then
21599                         case $odbc in
21600                         iodbc)
21601                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -liodbc" >&5
21602 $as_echo_n "checking for SQLDriverConnect in -liodbc... " >&6; }
21603 if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then :
21604   $as_echo_n "(cached) " >&6
21605 else
21606   ac_check_lib_save_LIBS=$LIBS
21607 LIBS="-liodbc  $LIBS"
21608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21609 /* end confdefs.h.  */
21610
21611 /* Override any GCC internal prototype to avoid an error.
21612    Use char because int might match the return type of a GCC
21613    builtin and then its argument prototype would still apply.  */
21614 #ifdef __cplusplus
21615 extern "C"
21616 #endif
21617 char SQLDriverConnect ();
21618 int
21619 main ()
21620 {
21621 return SQLDriverConnect ();
21622   ;
21623   return 0;
21624 }
21625 _ACEOF
21626 if ac_fn_c_try_link "$LINENO"; then :
21627   ac_cv_lib_iodbc_SQLDriverConnect=yes
21628 else
21629   ac_cv_lib_iodbc_SQLDriverConnect=no
21630 fi
21631 rm -f core conftest.err conftest.$ac_objext \
21632     conftest$ac_exeext conftest.$ac_ext
21633 LIBS=$ac_check_lib_save_LIBS
21634 fi
21635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
21636 $as_echo "$ac_cv_lib_iodbc_SQLDriverConnect" >&6; }
21637 if test "x$ac_cv_lib_iodbc_SQLDriverConnect" = x""yes; then :
21638   have_iodbc=yes
21639 else
21640   have_iodbc=no
21641 fi
21642
21643                                 if test $have_iodbc = yes ; then
21644                                         ol_link_sql="-liodbc"
21645                                 fi
21646                                 ;;
21647
21648                         unixodbc)
21649                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc" >&5
21650 $as_echo_n "checking for SQLDriverConnect in -lodbc... " >&6; }
21651 if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then :
21652   $as_echo_n "(cached) " >&6
21653 else
21654   ac_check_lib_save_LIBS=$LIBS
21655 LIBS="-lodbc  $LIBS"
21656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21657 /* end confdefs.h.  */
21658
21659 /* Override any GCC internal prototype to avoid an error.
21660    Use char because int might match the return type of a GCC
21661    builtin and then its argument prototype would still apply.  */
21662 #ifdef __cplusplus
21663 extern "C"
21664 #endif
21665 char SQLDriverConnect ();
21666 int
21667 main ()
21668 {
21669 return SQLDriverConnect ();
21670   ;
21671   return 0;
21672 }
21673 _ACEOF
21674 if ac_fn_c_try_link "$LINENO"; then :
21675   ac_cv_lib_odbc_SQLDriverConnect=yes
21676 else
21677   ac_cv_lib_odbc_SQLDriverConnect=no
21678 fi
21679 rm -f core conftest.err conftest.$ac_objext \
21680     conftest$ac_exeext conftest.$ac_ext
21681 LIBS=$ac_check_lib_save_LIBS
21682 fi
21683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
21684 $as_echo "$ac_cv_lib_odbc_SQLDriverConnect" >&6; }
21685 if test "x$ac_cv_lib_odbc_SQLDriverConnect" = x""yes; then :
21686   have_odbc=yes
21687 else
21688   have_odbc=no
21689 fi
21690
21691                                 if test $have_odbc = yes ; then
21692                                         ol_link_sql="-lodbc"
21693                                 fi
21694                                 ;;
21695
21696                         odbc32)
21697                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32" >&5
21698 $as_echo_n "checking for SQLDriverConnect in -lodbc32... " >&6; }
21699 if test "${ac_cv_lib_odbc32_SQLDriverConnect+set}" = set; then :
21700   $as_echo_n "(cached) " >&6
21701 else
21702   ac_check_lib_save_LIBS=$LIBS
21703 LIBS="-lodbc32  $LIBS"
21704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21705 /* end confdefs.h.  */
21706
21707 /* Override any GCC internal prototype to avoid an error.
21708    Use char because int might match the return type of a GCC
21709    builtin and then its argument prototype would still apply.  */
21710 #ifdef __cplusplus
21711 extern "C"
21712 #endif
21713 char SQLDriverConnect ();
21714 int
21715 main ()
21716 {
21717 return SQLDriverConnect ();
21718   ;
21719   return 0;
21720 }
21721 _ACEOF
21722 if ac_fn_c_try_link "$LINENO"; then :
21723   ac_cv_lib_odbc32_SQLDriverConnect=yes
21724 else
21725   ac_cv_lib_odbc32_SQLDriverConnect=no
21726 fi
21727 rm -f core conftest.err conftest.$ac_objext \
21728     conftest$ac_exeext conftest.$ac_ext
21729 LIBS=$ac_check_lib_save_LIBS
21730 fi
21731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_SQLDriverConnect" >&5
21732 $as_echo "$ac_cv_lib_odbc32_SQLDriverConnect" >&6; }
21733 if test "x$ac_cv_lib_odbc32_SQLDriverConnect" = x""yes; then :
21734   have_odbc32=yes
21735 else
21736   have_odbc32=no
21737 fi
21738
21739
21740                                                                 if test $have_odbc32 = no ; then
21741                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32 with windows.h" >&5
21742 $as_echo_n "checking for SQLDriverConnect in -lodbc32 with windows.h... " >&6; }
21743                                         save_LIBS="$LIBS"
21744                                         LIBS="$LIBS -lodbc32"
21745                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21746 /* end confdefs.h.  */
21747 #include <windows.h>
21748                                         #include <sqlext.h>
21749
21750 int
21751 main ()
21752 {
21753
21754                                                 SQLDriverConnect(NULL,NULL,NULL,0,NULL,0,NULL,0);
21755
21756   ;
21757   return 0;
21758 }
21759 _ACEOF
21760 if ac_fn_c_try_link "$LINENO"; then :
21761   have_odbc32=yes
21762 else
21763   have_odbc32=no
21764 fi
21765 rm -f core conftest.err conftest.$ac_objext \
21766     conftest$ac_exeext conftest.$ac_ext
21767                                         LIBS="$save_LIBS"
21768                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_odbc32" >&5
21769 $as_echo "$have_odbc32" >&6; }
21770                                 fi
21771
21772                                 if test $have_odbc32 = yes ; then
21773                                         ol_link_sql="-lodbc32"
21774                                 fi
21775                                 ;;
21776
21777                         *)
21778                                 as_fn_error "unknown ODBC library" "$LINENO" 5
21779                                 ;;
21780                         esac
21781                 fi
21782         done
21783
21784         LIBS="$sql_LIBS"
21785
21786         if test $ol_link_sql != no ; then
21787                 SLAPD_SQL_LIBS="$ol_link_sql"
21788
21789         elif test $ol_enable_sql != auto ; then
21790                 as_fn_error "could not locate suitable ODBC library" "$LINENO" 5
21791         fi
21792 fi
21793
21794 ol_link_ndb=no
21795 if test $ol_enable_ndb != no ; then
21796         # Extract the first word of "mysql_config", so it can be a program name with args.
21797 set dummy mysql_config; ac_word=$2
21798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21799 $as_echo_n "checking for $ac_word... " >&6; }
21800 if test "${ac_cv_prog_MYSQL+set}" = set; then :
21801   $as_echo_n "(cached) " >&6
21802 else
21803   if test -n "$MYSQL"; then
21804   ac_cv_prog_MYSQL="$MYSQL" # Let the user override the test.
21805 else
21806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21807 for as_dir in $PATH
21808 do
21809   IFS=$as_save_IFS
21810   test -z "$as_dir" && as_dir=.
21811     for ac_exec_ext in '' $ac_executable_extensions; do
21812   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21813     ac_cv_prog_MYSQL="yes"
21814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21815     break 2
21816   fi
21817 done
21818   done
21819 IFS=$as_save_IFS
21820
21821 fi
21822 fi
21823 MYSQL=$ac_cv_prog_MYSQL
21824 if test -n "$MYSQL"; then
21825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL" >&5
21826 $as_echo "$MYSQL" >&6; }
21827 else
21828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21829 $as_echo "no" >&6; }
21830 fi
21831
21832
21833         if test "$MYSQL" != yes ; then
21834                 as_fn_error "could not locate mysql_config" "$LINENO" 5
21835         fi
21836
21837         SQL_INC=`mysql_config --include`
21838         SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi"
21839
21840         save_CPPFLAGS="$CPPFLAGS"
21841         CPPFLAGS="$SLAPD_NDB_INCS"
21842         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NdbApi.hpp" >&5
21843 $as_echo_n "checking for NdbApi.hpp... " >&6; }
21844         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21845 /* end confdefs.h.  */
21846 #include <NdbApi.hpp>
21847 _ACEOF
21848 if ac_fn_c_try_cpp "$LINENO"; then :
21849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21850 $as_echo "yes" >&6; }
21851 else
21852   as_fn_error "could not locate NdbApi headers" "$LINENO" 5
21853
21854 fi
21855 rm -f conftest.err conftest.$ac_ext
21856         CPPFLAGS="$save_CPPFLAGS"
21857
21858         SQL_LIB=`mysql_config --libs_r`
21859         SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++"
21860
21861         save_LDFLAGS="$LDFLAGS"
21862         save_LIBS="$LIBS"
21863         LDFLAGS="$SQL_LIB"
21864         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ndb_init in -lndbclient" >&5
21865 $as_echo_n "checking for ndb_init in -lndbclient... " >&6; }
21866 if test "${ac_cv_lib_ndbclient_ndb_init+set}" = set; then :
21867   $as_echo_n "(cached) " >&6
21868 else
21869   ac_check_lib_save_LIBS=$LIBS
21870 LIBS="-lndbclient -lstdc++ $LIBS"
21871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21872 /* end confdefs.h.  */
21873
21874 /* Override any GCC internal prototype to avoid an error.
21875    Use char because int might match the return type of a GCC
21876    builtin and then its argument prototype would still apply.  */
21877 #ifdef __cplusplus
21878 extern "C"
21879 #endif
21880 char ndb_init ();
21881 int
21882 main ()
21883 {
21884 return ndb_init ();
21885   ;
21886   return 0;
21887 }
21888 _ACEOF
21889 if ac_fn_c_try_link "$LINENO"; then :
21890   ac_cv_lib_ndbclient_ndb_init=yes
21891 else
21892   ac_cv_lib_ndbclient_ndb_init=no
21893 fi
21894 rm -f core conftest.err conftest.$ac_objext \
21895     conftest$ac_exeext conftest.$ac_ext
21896 LIBS=$ac_check_lib_save_LIBS
21897 fi
21898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbclient_ndb_init" >&5
21899 $as_echo "$ac_cv_lib_ndbclient_ndb_init" >&6; }
21900 if test "x$ac_cv_lib_ndbclient_ndb_init" = x""yes; then :
21901   : ok
21902 else
21903
21904                 as_fn_error "could not locate ndbclient library" "$LINENO" 5
21905
21906 fi
21907
21908         LIBS="$save_LIBS"
21909         LDFLAGS="$save_LDFLAGS"
21910
21911         if test "$ol_enable_ndb" = yes ; then
21912                 SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
21913         fi
21914 fi
21915
21916 ol_icu=no
21917 for ac_header in unicode/utypes.h
21918 do :
21919   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21920 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21921 eval as_val=\$$as_ac_Header
21922    if test "x$as_val" = x""yes; then :
21923   cat >>confdefs.h <<_ACEOF
21924 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21925 _ACEOF
21926
21927 fi
21928
21929 done
21930
21931 if test $ac_cv_header_unicode_utypes_h = yes ; then
21932                 OL_ICULIBS="-licuuc -licudata"
21933
21934         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU libraries" >&5
21935 $as_echo_n "checking for ICU libraries... " >&6; }
21936 if test "${ol_cv_lib_icu+set}" = set; then :
21937   $as_echo_n "(cached) " >&6
21938 else
21939
21940                 ol_LIBS="$LIBS"
21941                 LIBS="$OL_ICULIBS $LIBS"
21942                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21943 /* end confdefs.h.  */
21944
21945 #include <unicode/utypes.h>
21946
21947 int
21948 main ()
21949 {
21950
21951 (void) u_errorName(0);
21952
21953   ;
21954   return 0;
21955 }
21956 _ACEOF
21957 if ac_fn_c_try_link "$LINENO"; then :
21958   ol_cv_lib_icu=yes
21959 else
21960   ol_cv_lib_icu=no
21961 fi
21962 rm -f core conftest.err conftest.$ac_objext \
21963     conftest$ac_exeext conftest.$ac_ext
21964                 LIBS="$ol_LIBS"
21965
21966 fi
21967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_icu" >&5
21968 $as_echo "$ol_cv_lib_icu" >&6; }
21969
21970         if test $ol_cv_lib_icu != no ; then
21971                 ol_icu="$OL_ICULIBS"
21972
21973 $as_echo "#define HAVE_ICU 1" >>confdefs.h
21974
21975         fi
21976 fi
21977
21978 if test "$ol_icu" = no ; then
21979         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ICU not available" >&5
21980 $as_echo "$as_me: WARNING: ICU not available" >&2;}
21981 else
21982         ICU_LIBS="$ol_icu"
21983 fi
21984 WITH_SASL=no
21985 ol_link_sasl=no
21986 ol_link_spasswd=no
21987 if test $ol_with_cyrus_sasl != no ; then
21988         for ac_header in sasl/sasl.h sasl.h
21989 do :
21990   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21991 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21992 eval as_val=\$$as_ac_Header
21993    if test "x$as_val" = x""yes; then :
21994   cat >>confdefs.h <<_ACEOF
21995 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21996 _ACEOF
21997
21998 fi
21999
22000 done
22001
22002
22003         if test $ac_cv_header_sasl_sasl_h = yes ||
22004            test $ac_cv_header_sasl_h = yes; then
22005                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
22006 $as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
22007 if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then :
22008   $as_echo_n "(cached) " >&6
22009 else
22010   ac_check_lib_save_LIBS=$LIBS
22011 LIBS="-lsasl2  $LIBS"
22012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22013 /* end confdefs.h.  */
22014
22015 /* Override any GCC internal prototype to avoid an error.
22016    Use char because int might match the return type of a GCC
22017    builtin and then its argument prototype would still apply.  */
22018 #ifdef __cplusplus
22019 extern "C"
22020 #endif
22021 char sasl_client_init ();
22022 int
22023 main ()
22024 {
22025 return sasl_client_init ();
22026   ;
22027   return 0;
22028 }
22029 _ACEOF
22030 if ac_fn_c_try_link "$LINENO"; then :
22031   ac_cv_lib_sasl2_sasl_client_init=yes
22032 else
22033   ac_cv_lib_sasl2_sasl_client_init=no
22034 fi
22035 rm -f core conftest.err conftest.$ac_objext \
22036     conftest$ac_exeext conftest.$ac_ext
22037 LIBS=$ac_check_lib_save_LIBS
22038 fi
22039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
22040 $as_echo "$ac_cv_lib_sasl2_sasl_client_init" >&6; }
22041 if test "x$ac_cv_lib_sasl2_sasl_client_init" = x""yes; then :
22042   ol_link_sasl="-lsasl2"
22043 else
22044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl" >&5
22045 $as_echo_n "checking for sasl_client_init in -lsasl... " >&6; }
22046 if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then :
22047   $as_echo_n "(cached) " >&6
22048 else
22049   ac_check_lib_save_LIBS=$LIBS
22050 LIBS="-lsasl  $LIBS"
22051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22052 /* end confdefs.h.  */
22053
22054 /* Override any GCC internal prototype to avoid an error.
22055    Use char because int might match the return type of a GCC
22056    builtin and then its argument prototype would still apply.  */
22057 #ifdef __cplusplus
22058 extern "C"
22059 #endif
22060 char sasl_client_init ();
22061 int
22062 main ()
22063 {
22064 return sasl_client_init ();
22065   ;
22066   return 0;
22067 }
22068 _ACEOF
22069 if ac_fn_c_try_link "$LINENO"; then :
22070   ac_cv_lib_sasl_sasl_client_init=yes
22071 else
22072   ac_cv_lib_sasl_sasl_client_init=no
22073 fi
22074 rm -f core conftest.err conftest.$ac_objext \
22075     conftest$ac_exeext conftest.$ac_ext
22076 LIBS=$ac_check_lib_save_LIBS
22077 fi
22078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl_sasl_client_init" >&5
22079 $as_echo "$ac_cv_lib_sasl_sasl_client_init" >&6; }
22080 if test "x$ac_cv_lib_sasl_sasl_client_init" = x""yes; then :
22081   ol_link_sasl="-lsasl"
22082 fi
22083
22084 fi
22085
22086         fi
22087
22088         if test $ol_link_sasl = no ; then
22089                 if test $ol_with_cyrus_sasl != auto ; then
22090                         as_fn_error "Could not locate Cyrus SASL" "$LINENO" 5
22091                 else
22092                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate Cyrus SASL" >&5
22093 $as_echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
22094                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22095 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22096                         if test $ol_link_tls = no ; then
22097                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22098 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22099                         fi
22100                 fi
22101         else
22102                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Cyrus SASL library version" >&5
22103 $as_echo_n "checking Cyrus SASL library version... " >&6; }
22104 if test "${ol_cv_sasl_compat+set}" = set; then :
22105   $as_echo_n "(cached) " >&6
22106 else
22107
22108         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22109 /* end confdefs.h.  */
22110
22111 #ifdef HAVE_SASL_SASL_H
22112 #include <sasl/sasl.h>
22113 #else
22114 #include <sasl.h>
22115 #endif
22116
22117 /* Require 2.1.15+ */
22118 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22119         char *__sasl_compat = "2.2+ or better okay (we guess)";
22120 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22121         && SASL_VERSION_STEP >=15
22122         char *__sasl_compat = "2.1.15+ or better okay";
22123 #endif
22124
22125 _ACEOF
22126 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22127   $EGREP "__sasl_compat" >/dev/null 2>&1; then :
22128   ol_cv_sasl_compat=yes
22129 else
22130   ol_cv_sasl_compat=no
22131 fi
22132 rm -f conftest*
22133
22134 fi
22135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sasl_compat" >&5
22136 $as_echo "$ol_cv_sasl_compat" >&6; }
22137
22138                 if test $ol_cv_sasl_compat = no ; then
22139                         ol_link_sasl=no
22140                         as_fn_error "Cyrus SASL library located but is incompatible" "$LINENO" 5
22141                 fi
22142
22143
22144 $as_echo "#define HAVE_CYRUS_SASL 1" >>confdefs.h
22145
22146                 SASL_LIBS="$ol_link_sasl"
22147                 if test $ol_enable_spasswd != no ; then
22148                         ol_link_spasswd=yes
22149                 fi
22150
22151                 ac_save_LIBS="$LIBS"
22152                 LIBS="$LIBS $ol_link_sasl"
22153                 ac_fn_c_check_func "$LINENO" "sasl_version" "ac_cv_func_sasl_version"
22154 if test "x$ac_cv_func_sasl_version" = x""yes; then :
22155
22156 $as_echo "#define HAVE_SASL_VERSION 1" >>confdefs.h
22157
22158 fi
22159
22160                 LIBS="$ac_save_LIBS"
22161
22162                 WITH_SASL=yes
22163         fi
22164
22165 else
22166         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22167 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22168         if test $ol_link_tls = no ; then
22169                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22170 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22171         fi
22172 fi
22173
22174 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
22175         dev=no
22176         if test -r /dev/urandom ; then
22177                 dev="/dev/urandom";
22178         elif test -r /idev/urandom ; then
22179                 dev="/idev/urandom";
22180         elif test -r /dev/srandom ; then
22181                 dev="/dev/srandom";
22182         elif test -r /dev/random ; then
22183                 dev="/dev/random";
22184         elif test -r /idev/random ; then
22185                 dev="/idev/random";
22186         fi
22187
22188         if test $dev != no ; then
22189
22190 cat >>confdefs.h <<_ACEOF
22191 #define URANDOM_DEVICE "$dev"
22192 _ACEOF
22193
22194         fi
22195 fi
22196
22197 ol_link_fetch=no
22198 if test $ol_with_fetch != no ; then
22199         ol_LIBS=$LIBS
22200 LIBS="-lfetch -lcom_err $LIBS"
22201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking fetch(3) library" >&5
22202 $as_echo_n "checking fetch(3) library... " >&6; }
22203 if test "${ol_cv_lib_fetch+set}" = set; then :
22204   $as_echo_n "(cached) " >&6
22205 else
22206
22207         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22208 /* end confdefs.h.  */
22209
22210 #ifdef HAVE_SYS_PARAM_H
22211 #include <sys/param.h>
22212 #endif
22213 #include <stdio.h>
22214 #include <fetch.h>
22215 int
22216 main ()
22217 {
22218 struct url *u = fetchParseURL("file:///");
22219   ;
22220   return 0;
22221 }
22222 _ACEOF
22223 if ac_fn_c_try_link "$LINENO"; then :
22224   ol_cv_lib_fetch=yes
22225 else
22226   ol_cv_lib_fetch=no
22227 fi
22228 rm -f core conftest.err conftest.$ac_objext \
22229     conftest$ac_exeext conftest.$ac_ext
22230 fi
22231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_fetch" >&5
22232 $as_echo "$ol_cv_lib_fetch" >&6; }
22233 LIBS=$ol_LIBS
22234 if test $ol_cv_lib_fetch != no ; then
22235         ol_link_fetch="-lfetch -lcom_err"
22236
22237 $as_echo "#define HAVE_FETCH 1" >>confdefs.h
22238
22239 fi
22240
22241
22242         if test $ol_cv_lib_fetch != no ; then
22243                 LIBS="$LIBS $ol_link_fetch"
22244                 ol_link_fetch=freebsd
22245
22246         elif test $ol_with_fetch != auto ; then
22247                 as_fn_error "no suitable API for --with-fetch=$ol_with_fetch" "$LINENO" 5
22248         fi
22249 fi
22250
22251 if test $ol_enable_crypt != no ; then
22252         save_LIBS="$LIBS"
22253         LIBS="$TLS_LIBS $LIBS"
22254
22255         ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
22256 if test "x$ac_cv_func_crypt" = x""yes; then :
22257   have_crypt=yes
22258 else
22259
22260                 LIBS="$save_LIBS"
22261                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
22262 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
22263 if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
22264   $as_echo_n "(cached) " >&6
22265 else
22266   ac_check_lib_save_LIBS=$LIBS
22267 LIBS="-lcrypt  $LIBS"
22268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22269 /* end confdefs.h.  */
22270
22271 /* Override any GCC internal prototype to avoid an error.
22272    Use char because int might match the return type of a GCC
22273    builtin and then its argument prototype would still apply.  */
22274 #ifdef __cplusplus
22275 extern "C"
22276 #endif
22277 char crypt ();
22278 int
22279 main ()
22280 {
22281 return crypt ();
22282   ;
22283   return 0;
22284 }
22285 _ACEOF
22286 if ac_fn_c_try_link "$LINENO"; then :
22287   ac_cv_lib_crypt_crypt=yes
22288 else
22289   ac_cv_lib_crypt_crypt=no
22290 fi
22291 rm -f core conftest.err conftest.$ac_objext \
22292     conftest$ac_exeext conftest.$ac_ext
22293 LIBS=$ac_check_lib_save_LIBS
22294 fi
22295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
22296 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
22297 if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
22298   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22299                         have_crypt=yes
22300 else
22301   have_crypt=no
22302 fi
22303
22304 fi
22305
22306
22307         LIBS="$save_LIBS"
22308
22309         if test $have_crypt = yes ; then
22310
22311 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
22312
22313         else
22314                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find crypt" >&5
22315 $as_echo "$as_me: WARNING: could not find crypt" >&2;}
22316                 if test $ol_enable_crypt = yes ; then
22317                         as_fn_error "could not find crypt, select appropriate options or disable" "$LINENO" 5
22318                 fi
22319
22320                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling crypt support" >&5
22321 $as_echo "$as_me: WARNING: disabling crypt support" >&2;}
22322                 ol_enable_crypt=no
22323         fi
22324 fi
22325
22326 if test $ol_enable_proctitle != no ; then
22327         ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
22328 if test "x$ac_cv_func_setproctitle" = x""yes; then :
22329   have_setproctitle=yes
22330 else
22331
22332                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5
22333 $as_echo_n "checking for setproctitle in -lutil... " >&6; }
22334 if test "${ac_cv_lib_util_setproctitle+set}" = set; then :
22335   $as_echo_n "(cached) " >&6
22336 else
22337   ac_check_lib_save_LIBS=$LIBS
22338 LIBS="-lutil  $LIBS"
22339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22340 /* end confdefs.h.  */
22341
22342 /* Override any GCC internal prototype to avoid an error.
22343    Use char because int might match the return type of a GCC
22344    builtin and then its argument prototype would still apply.  */
22345 #ifdef __cplusplus
22346 extern "C"
22347 #endif
22348 char setproctitle ();
22349 int
22350 main ()
22351 {
22352 return setproctitle ();
22353   ;
22354   return 0;
22355 }
22356 _ACEOF
22357 if ac_fn_c_try_link "$LINENO"; then :
22358   ac_cv_lib_util_setproctitle=yes
22359 else
22360   ac_cv_lib_util_setproctitle=no
22361 fi
22362 rm -f core conftest.err conftest.$ac_objext \
22363     conftest$ac_exeext conftest.$ac_ext
22364 LIBS=$ac_check_lib_save_LIBS
22365 fi
22366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_setproctitle" >&5
22367 $as_echo "$ac_cv_lib_util_setproctitle" >&6; }
22368 if test "x$ac_cv_lib_util_setproctitle" = x""yes; then :
22369   have_setproctitle=yes
22370                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22371 else
22372   have_setproctitle=no
22373                         case " $LIBOBJS " in
22374   *" setproctitle.$ac_objext "* ) ;;
22375   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
22376  ;;
22377 esac
22378
22379                         LIBSRCS="$LIBSRCS setproctitle.c"
22380 fi
22381
22382 fi
22383
22384
22385         if test $have_setproctitle = yes ; then
22386
22387 $as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h
22388
22389         fi
22390 fi
22391
22392 if test $ol_enable_slp != no ; then
22393         for ac_header in slp.h
22394 do :
22395   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22396 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22397 eval as_val=\$$as_ac_Header
22398    if test "x$as_val" = x""yes; then :
22399   cat >>confdefs.h <<_ACEOF
22400 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22401 _ACEOF
22402
22403 fi
22404
22405 done
22406
22407
22408         if test $ac_cv_header_slp_h = yes ; then
22409                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLPOpen in -lslp" >&5
22410 $as_echo_n "checking for SLPOpen in -lslp... " >&6; }
22411 if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then :
22412   $as_echo_n "(cached) " >&6
22413 else
22414   ac_check_lib_save_LIBS=$LIBS
22415 LIBS="-lslp  $LIBS"
22416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22417 /* end confdefs.h.  */
22418
22419 /* Override any GCC internal prototype to avoid an error.
22420    Use char because int might match the return type of a GCC
22421    builtin and then its argument prototype would still apply.  */
22422 #ifdef __cplusplus
22423 extern "C"
22424 #endif
22425 char SLPOpen ();
22426 int
22427 main ()
22428 {
22429 return SLPOpen ();
22430   ;
22431   return 0;
22432 }
22433 _ACEOF
22434 if ac_fn_c_try_link "$LINENO"; then :
22435   ac_cv_lib_slp_SLPOpen=yes
22436 else
22437   ac_cv_lib_slp_SLPOpen=no
22438 fi
22439 rm -f core conftest.err conftest.$ac_objext \
22440     conftest$ac_exeext conftest.$ac_ext
22441 LIBS=$ac_check_lib_save_LIBS
22442 fi
22443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slp_SLPOpen" >&5
22444 $as_echo "$ac_cv_lib_slp_SLPOpen" >&6; }
22445 if test "x$ac_cv_lib_slp_SLPOpen" = x""yes; then :
22446   have_slp=yes
22447 else
22448   have_slp=no
22449 fi
22450
22451                 if test $have_slp = yes ; then
22452
22453 $as_echo "#define HAVE_SLP 1" >>confdefs.h
22454
22455                         SLAPD_SLP_LIBS=-lslp
22456                 fi
22457
22458         elif test $ol_enable_slp = yes ; then
22459                 as_fn_error "SLP not found" "$LINENO" 5
22460         fi
22461 fi
22462
22463
22464 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
22465 if test "x$ac_cv_type_mode_t" = x""yes; then :
22466
22467 else
22468
22469 cat >>confdefs.h <<_ACEOF
22470 #define mode_t int
22471 _ACEOF
22472
22473 fi
22474
22475 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
22476 if test "x$ac_cv_type_off_t" = x""yes; then :
22477
22478 else
22479
22480 cat >>confdefs.h <<_ACEOF
22481 #define off_t long
22482 _ACEOF
22483
22484 fi
22485
22486 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
22487 if test "x$ac_cv_type_pid_t" = x""yes; then :
22488
22489 else
22490
22491 cat >>confdefs.h <<_ACEOF
22492 #define pid_t int
22493 _ACEOF
22494
22495 fi
22496
22497 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
22498 if test "x$ac_cv_type_ssize_t" = x""yes; then :
22499
22500 else
22501
22502 cat >>confdefs.h <<_ACEOF
22503 #define ssize_t signed int
22504 _ACEOF
22505
22506 fi
22507
22508 ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
22509 if test "x$ac_cv_type_caddr_t" = x""yes; then :
22510
22511 else
22512
22513 cat >>confdefs.h <<_ACEOF
22514 #define caddr_t char *
22515 _ACEOF
22516
22517 fi
22518
22519 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
22520 if test "x$ac_cv_type_size_t" = x""yes; then :
22521
22522 else
22523
22524 cat >>confdefs.h <<_ACEOF
22525 #define size_t unsigned
22526 _ACEOF
22527
22528 fi
22529
22530
22531 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
22532 if test "x$ac_cv_type_long_long" = x""yes; then :
22533
22534 cat >>confdefs.h <<_ACEOF
22535 #define HAVE_LONG_LONG 1
22536 _ACEOF
22537
22538
22539 fi
22540
22541 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
22542 if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
22543
22544 cat >>confdefs.h <<_ACEOF
22545 #define HAVE_PTRDIFF_T 1
22546 _ACEOF
22547
22548
22549 fi
22550
22551
22552
22553 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default
22554 #ifdef HAVE_SYS_SOCKET_H
22555 #include <sys/socket.h>
22556 #endif
22557 "
22558 if test "x$ac_cv_type_socklen_t" = x""yes; then :
22559
22560 fi
22561
22562
22563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the type of arg 3 to accept()" >&5
22564 $as_echo_n "checking the type of arg 3 to accept()... " >&6; }
22565 if test "${ol_cv_type_ber_socklen_t+set}" = set; then :
22566   $as_echo_n "(cached) " >&6
22567 else
22568
22569         set socklen_t int unsigned "unsigned long" long size_t
22570         test "$ac_cv_type_socklen_t" = yes || shift
22571         ol_cv_type_ber_socklen_t=$1 guessing="guessing "
22572         for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
22573                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22574 /* end confdefs.h.  */
22575 $ac_includes_default
22576 #ifdef HAVE_SYS_SOCKET_H
22577 #include <sys/socket.h>
22578 #endif
22579 extern int accept(int s, $addrtype *ap, $lentype *lp);
22580
22581 int
22582 main ()
22583 {
22584
22585 accept(0, (struct sockaddr *) 0, ($lentype *) 0);
22586
22587   ;
22588   return 0;
22589 }
22590 _ACEOF
22591 if ac_fn_c_try_compile "$LINENO"; then :
22592   ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
22593 fi
22594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22595         done ; done
22596 fi
22597
22598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
22599 $as_echo "$guessing$ol_cv_type_ber_socklen_t *" >&6; }
22600
22601 cat >>confdefs.h <<_ACEOF
22602 #define ber_socklen_t $ol_cv_type_ber_socklen_t
22603 _ACEOF
22604
22605
22606 if test "$ac_cv_type_socklen_t" != yes; then
22607
22608 cat >>confdefs.h <<_ACEOF
22609 #define socklen_t $ol_cv_type_ber_socklen_t
22610 _ACEOF
22611
22612 fi
22613
22614
22615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
22616 $as_echo_n "checking return type of signal handlers... " >&6; }
22617 if test "${ac_cv_type_signal+set}" = set; then :
22618   $as_echo_n "(cached) " >&6
22619 else
22620   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22621 /* end confdefs.h.  */
22622 #include <sys/types.h>
22623 #include <signal.h>
22624
22625 int
22626 main ()
22627 {
22628 return *(signal (0, 0)) (0) == 1;
22629   ;
22630   return 0;
22631 }
22632 _ACEOF
22633 if ac_fn_c_try_compile "$LINENO"; then :
22634   ac_cv_type_signal=int
22635 else
22636   ac_cv_type_signal=void
22637 fi
22638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22639 fi
22640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
22641 $as_echo "$ac_cv_type_signal" >&6; }
22642
22643 cat >>confdefs.h <<_ACEOF
22644 #define RETSIGTYPE $ac_cv_type_signal
22645 _ACEOF
22646
22647
22648
22649 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default
22650 #include <signal.h>
22651
22652 "
22653 if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
22654
22655 else
22656
22657 cat >>confdefs.h <<_ACEOF
22658 #define sig_atomic_t int
22659 _ACEOF
22660
22661 fi
22662
22663
22664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
22665 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
22666 if test "${ac_cv_type_uid_t+set}" = set; then :
22667   $as_echo_n "(cached) " >&6
22668 else
22669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22670 /* end confdefs.h.  */
22671 #include <sys/types.h>
22672
22673 _ACEOF
22674 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22675   $EGREP "uid_t" >/dev/null 2>&1; then :
22676   ac_cv_type_uid_t=yes
22677 else
22678   ac_cv_type_uid_t=no
22679 fi
22680 rm -f conftest*
22681
22682 fi
22683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
22684 $as_echo "$ac_cv_type_uid_t" >&6; }
22685 if test $ac_cv_type_uid_t = no; then
22686
22687 $as_echo "#define uid_t int" >>confdefs.h
22688
22689
22690 $as_echo "#define gid_t int" >>confdefs.h
22691
22692 fi
22693
22694
22695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
22696 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
22697 if test "${ac_cv_header_time+set}" = set; then :
22698   $as_echo_n "(cached) " >&6
22699 else
22700   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22701 /* end confdefs.h.  */
22702 #include <sys/types.h>
22703 #include <sys/time.h>
22704 #include <time.h>
22705
22706 int
22707 main ()
22708 {
22709 if ((struct tm *) 0)
22710 return 0;
22711   ;
22712   return 0;
22713 }
22714 _ACEOF
22715 if ac_fn_c_try_compile "$LINENO"; then :
22716   ac_cv_header_time=yes
22717 else
22718   ac_cv_header_time=no
22719 fi
22720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22721 fi
22722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
22723 $as_echo "$ac_cv_header_time" >&6; }
22724 if test $ac_cv_header_time = yes; then
22725
22726 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
22727
22728 fi
22729
22730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
22731 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
22732 if test "${ac_cv_struct_tm+set}" = set; then :
22733   $as_echo_n "(cached) " >&6
22734 else
22735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22736 /* end confdefs.h.  */
22737 #include <sys/types.h>
22738 #include <time.h>
22739
22740 int
22741 main ()
22742 {
22743 struct tm tm;
22744                                      int *p = &tm.tm_sec;
22745                                      return !p;
22746   ;
22747   return 0;
22748 }
22749 _ACEOF
22750 if ac_fn_c_try_compile "$LINENO"; then :
22751   ac_cv_struct_tm=time.h
22752 else
22753   ac_cv_struct_tm=sys/time.h
22754 fi
22755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22756 fi
22757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
22758 $as_echo "$ac_cv_struct_tm" >&6; }
22759 if test $ac_cv_struct_tm = sys/time.h; then
22760
22761 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
22762
22763 fi
22764
22765 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
22766 if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
22767
22768 cat >>confdefs.h <<_ACEOF
22769 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
22770 _ACEOF
22771
22772
22773 fi
22774
22775 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "$ac_includes_default
22776 #include <pwd.h>
22777 "
22778 if test "x$ac_cv_member_struct_passwd_pw_gecos" = x""yes; then :
22779
22780 cat >>confdefs.h <<_ACEOF
22781 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
22782 _ACEOF
22783
22784
22785 fi
22786
22787 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "$ac_includes_default
22788 #include <pwd.h>
22789 "
22790 if test "x$ac_cv_member_struct_passwd_pw_passwd" = x""yes; then :
22791
22792 cat >>confdefs.h <<_ACEOF
22793 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
22794 _ACEOF
22795
22796
22797 fi
22798
22799
22800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if toupper() requires islower()" >&5
22801 $as_echo_n "checking if toupper() requires islower()... " >&6; }
22802 if test "${ol_cv_c_upper_lower+set}" = set; then :
22803   $as_echo_n "(cached) " >&6
22804 else
22805
22806         if test "$cross_compiling" = yes; then :
22807   ol_cv_c_upper_lower=safe
22808 else
22809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22810 /* end confdefs.h.  */
22811
22812 #include <ctype.h>
22813 main()
22814 {
22815         if ('C' == toupper('C'))
22816                 exit(0);
22817         else
22818                 exit(1);
22819 }
22820 _ACEOF
22821 if ac_fn_c_try_run "$LINENO"; then :
22822   ol_cv_c_upper_lower=no
22823 else
22824   ol_cv_c_upper_lower=yes
22825 fi
22826 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22827   conftest.$ac_objext conftest.beam conftest.$ac_ext
22828 fi
22829
22830 fi
22831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_upper_lower" >&5
22832 $as_echo "$ol_cv_c_upper_lower" >&6; }
22833 if test $ol_cv_c_upper_lower != no ; then
22834
22835 $as_echo "#define C_UPPER_LOWER 1" >>confdefs.h
22836
22837 fi
22838
22839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
22840 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
22841 if test "${ac_cv_c_const+set}" = set; then :
22842   $as_echo_n "(cached) " >&6
22843 else
22844   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22845 /* end confdefs.h.  */
22846
22847 int
22848 main ()
22849 {
22850 /* FIXME: Include the comments suggested by Paul. */
22851 #ifndef __cplusplus
22852   /* Ultrix mips cc rejects this.  */
22853   typedef int charset[2];
22854   const charset cs;
22855   /* SunOS 4.1.1 cc rejects this.  */
22856   char const *const *pcpcc;
22857   char **ppc;
22858   /* NEC SVR4.0.2 mips cc rejects this.  */
22859   struct point {int x, y;};
22860   static struct point const zero = {0,0};
22861   /* AIX XL C 1.02.0.0 rejects this.
22862      It does not let you subtract one const X* pointer from another in
22863      an arm of an if-expression whose if-part is not a constant
22864      expression */
22865   const char *g = "string";
22866   pcpcc = &g + (g ? g-g : 0);
22867   /* HPUX 7.0 cc rejects these. */
22868   ++pcpcc;
22869   ppc = (char**) pcpcc;
22870   pcpcc = (char const *const *) ppc;
22871   { /* SCO 3.2v4 cc rejects this.  */
22872     char *t;
22873     char const *s = 0 ? (char *) 0 : (char const *) 0;
22874
22875     *t++ = 0;
22876     if (s) return 0;
22877   }
22878   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22879     int x[] = {25, 17};
22880     const int *foo = &x[0];
22881     ++foo;
22882   }
22883   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22884     typedef const int *iptr;
22885     iptr p = 0;
22886     ++p;
22887   }
22888   { /* AIX XL C 1.02.0.0 rejects this saying
22889        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22890     struct s { int j; const int *ap[3]; };
22891     struct s *b; b->j = 5;
22892   }
22893   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22894     const int foo = 10;
22895     if (!foo) return 0;
22896   }
22897   return !cs[0] && !zero.x;
22898 #endif
22899
22900   ;
22901   return 0;
22902 }
22903 _ACEOF
22904 if ac_fn_c_try_compile "$LINENO"; then :
22905   ac_cv_c_const=yes
22906 else
22907   ac_cv_c_const=no
22908 fi
22909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22910 fi
22911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
22912 $as_echo "$ac_cv_c_const" >&6; }
22913 if test $ac_cv_c_const = no; then
22914
22915 $as_echo "#define const /**/" >>confdefs.h
22916
22917 fi
22918
22919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler understands volatile" >&5
22920 $as_echo_n "checking if compiler understands volatile... " >&6; }
22921 if test "${ol_cv_c_volatile+set}" = set; then :
22922   $as_echo_n "(cached) " >&6
22923 else
22924   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22925 /* end confdefs.h.  */
22926 int x, y, z;
22927 int
22928 main ()
22929 {
22930 volatile int a; int * volatile b = x ? &y : &z;
22931       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22932       *b = 0;
22933   ;
22934   return 0;
22935 }
22936 _ACEOF
22937 if ac_fn_c_try_compile "$LINENO"; then :
22938   ol_cv_c_volatile=yes
22939 else
22940   ol_cv_c_volatile=no
22941 fi
22942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22943 fi
22944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_volatile" >&5
22945 $as_echo "$ol_cv_c_volatile" >&6; }
22946   if test $ol_cv_c_volatile = yes; then
22947     :
22948   else
22949
22950 $as_echo "#define volatile /**/" >>confdefs.h
22951
22952   fi
22953
22954
22955 if test $cross_compiling = yes ; then
22956         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Crossing compiling... all bets are off!" >&5
22957 $as_echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
22958
22959 $as_echo "#define CROSS_COMPILING 1" >>confdefs.h
22960
22961 else
22962          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
22963 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
22964 if test "${ac_cv_c_bigendian+set}" = set; then :
22965   $as_echo_n "(cached) " >&6
22966 else
22967   ac_cv_c_bigendian=unknown
22968     # See if we're dealing with a universal compiler.
22969     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22970 /* end confdefs.h.  */
22971 #ifndef __APPLE_CC__
22972                not a universal capable compiler
22973              #endif
22974              typedef int dummy;
22975
22976 _ACEOF
22977 if ac_fn_c_try_compile "$LINENO"; then :
22978
22979         # Check for potential -arch flags.  It is not universal unless
22980         # there are at least two -arch flags with different values.
22981         ac_arch=
22982         ac_prev=
22983         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
22984          if test -n "$ac_prev"; then
22985            case $ac_word in
22986              i?86 | x86_64 | ppc | ppc64)
22987                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
22988                  ac_arch=$ac_word
22989                else
22990                  ac_cv_c_bigendian=universal
22991                  break
22992                fi
22993                ;;
22994            esac
22995            ac_prev=
22996          elif test "x$ac_word" = "x-arch"; then
22997            ac_prev=arch
22998          fi
22999        done
23000 fi
23001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23002     if test $ac_cv_c_bigendian = unknown; then
23003       # See if sys/param.h defines the BYTE_ORDER macro.
23004       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23005 /* end confdefs.h.  */
23006 #include <sys/types.h>
23007              #include <sys/param.h>
23008
23009 int
23010 main ()
23011 {
23012 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23013                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23014                      && LITTLE_ENDIAN)
23015               bogus endian macros
23016              #endif
23017
23018   ;
23019   return 0;
23020 }
23021 _ACEOF
23022 if ac_fn_c_try_compile "$LINENO"; then :
23023   # It does; now see whether it defined to BIG_ENDIAN or not.
23024          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23025 /* end confdefs.h.  */
23026 #include <sys/types.h>
23027                 #include <sys/param.h>
23028
23029 int
23030 main ()
23031 {
23032 #if BYTE_ORDER != BIG_ENDIAN
23033                  not big endian
23034                 #endif
23035
23036   ;
23037   return 0;
23038 }
23039 _ACEOF
23040 if ac_fn_c_try_compile "$LINENO"; then :
23041   ac_cv_c_bigendian=yes
23042 else
23043   ac_cv_c_bigendian=no
23044 fi
23045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23046 fi
23047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23048     fi
23049     if test $ac_cv_c_bigendian = unknown; then
23050       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23051       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23052 /* end confdefs.h.  */
23053 #include <limits.h>
23054
23055 int
23056 main ()
23057 {
23058 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23059               bogus endian macros
23060              #endif
23061
23062   ;
23063   return 0;
23064 }
23065 _ACEOF
23066 if ac_fn_c_try_compile "$LINENO"; then :
23067   # It does; now see whether it defined to _BIG_ENDIAN or not.
23068          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23069 /* end confdefs.h.  */
23070 #include <limits.h>
23071
23072 int
23073 main ()
23074 {
23075 #ifndef _BIG_ENDIAN
23076                  not big endian
23077                 #endif
23078
23079   ;
23080   return 0;
23081 }
23082 _ACEOF
23083 if ac_fn_c_try_compile "$LINENO"; then :
23084   ac_cv_c_bigendian=yes
23085 else
23086   ac_cv_c_bigendian=no
23087 fi
23088 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23089 fi
23090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23091     fi
23092     if test $ac_cv_c_bigendian = unknown; then
23093       # Compile a test program.
23094       if test "$cross_compiling" = yes; then :
23095   # Try to guess by grepping values from an object file.
23096          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23097 /* end confdefs.h.  */
23098 short int ascii_mm[] =
23099                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23100                 short int ascii_ii[] =
23101                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23102                 int use_ascii (int i) {
23103                   return ascii_mm[i] + ascii_ii[i];
23104                 }
23105                 short int ebcdic_ii[] =
23106                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23107                 short int ebcdic_mm[] =
23108                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23109                 int use_ebcdic (int i) {
23110                   return ebcdic_mm[i] + ebcdic_ii[i];
23111                 }
23112                 extern int foo;
23113
23114 int
23115 main ()
23116 {
23117 return use_ascii (foo) == use_ebcdic (foo);
23118   ;
23119   return 0;
23120 }
23121 _ACEOF
23122 if ac_fn_c_try_compile "$LINENO"; then :
23123   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
23124               ac_cv_c_bigendian=yes
23125             fi
23126             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23127               if test "$ac_cv_c_bigendian" = unknown; then
23128                 ac_cv_c_bigendian=no
23129               else
23130                 # finding both strings is unlikely to happen, but who knows?
23131                 ac_cv_c_bigendian=unknown
23132               fi
23133             fi
23134 fi
23135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23136 else
23137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23138 /* end confdefs.h.  */
23139 $ac_includes_default
23140 int
23141 main ()
23142 {
23143
23144              /* Are we little or big endian?  From Harbison&Steele.  */
23145              union
23146              {
23147                long int l;
23148                char c[sizeof (long int)];
23149              } u;
23150              u.l = 1;
23151              return u.c[sizeof (long int) - 1] == 1;
23152
23153   ;
23154   return 0;
23155 }
23156 _ACEOF
23157 if ac_fn_c_try_run "$LINENO"; then :
23158   ac_cv_c_bigendian=no
23159 else
23160   ac_cv_c_bigendian=yes
23161 fi
23162 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23163   conftest.$ac_objext conftest.beam conftest.$ac_ext
23164 fi
23165
23166     fi
23167 fi
23168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
23169 $as_echo "$ac_cv_c_bigendian" >&6; }
23170  case $ac_cv_c_bigendian in #(
23171    yes)
23172      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
23173 ;; #(
23174    no)
23175       ;; #(
23176    universal)
23177
23178 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
23179
23180      ;; #(
23181    *)
23182      as_fn_error "unknown endianness
23183  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
23184  esac
23185
23186 fi
23187
23188 # The cast to long int works around a bug in the HP C Compiler
23189 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23190 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23191 # This bug is HP SR number 8606223364.
23192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23193 $as_echo_n "checking size of short... " >&6; }
23194 if test "${ac_cv_sizeof_short+set}" = set; then :
23195   $as_echo_n "(cached) " >&6
23196 else
23197   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23198
23199 else
23200   if test "$ac_cv_type_short" = yes; then
23201      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23202 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23203 { as_fn_set_status 77
23204 as_fn_error "cannot compute sizeof (short)
23205 See \`config.log' for more details." "$LINENO" 5; }; }
23206    else
23207      ac_cv_sizeof_short=0
23208    fi
23209 fi
23210
23211 fi
23212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23213 $as_echo "$ac_cv_sizeof_short" >&6; }
23214
23215
23216
23217 cat >>confdefs.h <<_ACEOF
23218 #define SIZEOF_SHORT $ac_cv_sizeof_short
23219 _ACEOF
23220
23221
23222 # The cast to long int works around a bug in the HP C Compiler
23223 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23224 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23225 # This bug is HP SR number 8606223364.
23226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23227 $as_echo_n "checking size of int... " >&6; }
23228 if test "${ac_cv_sizeof_int+set}" = set; then :
23229   $as_echo_n "(cached) " >&6
23230 else
23231   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23232
23233 else
23234   if test "$ac_cv_type_int" = yes; then
23235      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23236 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23237 { as_fn_set_status 77
23238 as_fn_error "cannot compute sizeof (int)
23239 See \`config.log' for more details." "$LINENO" 5; }; }
23240    else
23241      ac_cv_sizeof_int=0
23242    fi
23243 fi
23244
23245 fi
23246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23247 $as_echo "$ac_cv_sizeof_int" >&6; }
23248
23249
23250
23251 cat >>confdefs.h <<_ACEOF
23252 #define SIZEOF_INT $ac_cv_sizeof_int
23253 _ACEOF
23254
23255
23256 # The cast to long int works around a bug in the HP C Compiler
23257 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23258 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23259 # This bug is HP SR number 8606223364.
23260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23261 $as_echo_n "checking size of long... " >&6; }
23262 if test "${ac_cv_sizeof_long+set}" = set; then :
23263   $as_echo_n "(cached) " >&6
23264 else
23265   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23266
23267 else
23268   if test "$ac_cv_type_long" = yes; then
23269      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23270 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23271 { as_fn_set_status 77
23272 as_fn_error "cannot compute sizeof (long)
23273 See \`config.log' for more details." "$LINENO" 5; }; }
23274    else
23275      ac_cv_sizeof_long=0
23276    fi
23277 fi
23278
23279 fi
23280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23281 $as_echo "$ac_cv_sizeof_long" >&6; }
23282
23283
23284
23285 cat >>confdefs.h <<_ACEOF
23286 #define SIZEOF_LONG $ac_cv_sizeof_long
23287 _ACEOF
23288
23289
23290 # The cast to long int works around a bug in the HP C Compiler
23291 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23292 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23293 # This bug is HP SR number 8606223364.
23294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
23295 $as_echo_n "checking size of long long... " >&6; }
23296 if test "${ac_cv_sizeof_long_long+set}" = set; then :
23297   $as_echo_n "(cached) " >&6
23298 else
23299   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
23300
23301 else
23302   if test "$ac_cv_type_long_long" = yes; then
23303      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23304 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23305 { as_fn_set_status 77
23306 as_fn_error "cannot compute sizeof (long long)
23307 See \`config.log' for more details." "$LINENO" 5; }; }
23308    else
23309      ac_cv_sizeof_long_long=0
23310    fi
23311 fi
23312
23313 fi
23314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
23315 $as_echo "$ac_cv_sizeof_long_long" >&6; }
23316
23317
23318
23319 cat >>confdefs.h <<_ACEOF
23320 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
23321 _ACEOF
23322
23323
23324 # The cast to long int works around a bug in the HP C Compiler
23325 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23326 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23327 # This bug is HP SR number 8606223364.
23328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
23329 $as_echo_n "checking size of wchar_t... " >&6; }
23330 if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
23331   $as_echo_n "(cached) " >&6
23332 else
23333   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "$ac_includes_default"; then :
23334
23335 else
23336   if test "$ac_cv_type_wchar_t" = yes; then
23337      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23338 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23339 { as_fn_set_status 77
23340 as_fn_error "cannot compute sizeof (wchar_t)
23341 See \`config.log' for more details." "$LINENO" 5; }; }
23342    else
23343      ac_cv_sizeof_wchar_t=0
23344    fi
23345 fi
23346
23347 fi
23348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
23349 $as_echo "$ac_cv_sizeof_wchar_t" >&6; }
23350
23351
23352
23353 cat >>confdefs.h <<_ACEOF
23354 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23355 _ACEOF
23356
23357
23358
23359 if test "$ac_cv_sizeof_int" -lt 4 ; then
23360         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
23361 $as_echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
23362
23363
23364 $as_echo "#define LBER_INT_T long" >>confdefs.h
23365
23366 else
23367
23368 $as_echo "#define LBER_INT_T int" >>confdefs.h
23369
23370 fi
23371
23372
23373 $as_echo "#define LBER_LEN_T long" >>confdefs.h
23374
23375
23376 $as_echo "#define LBER_SOCKET_T int" >>confdefs.h
23377
23378
23379 $as_echo "#define LBER_TAG_T long" >>confdefs.h
23380
23381
23382 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
23383         if test $ac_cv_sizeof_long_long -gt 4 ; then
23384                 ol_with_mp=longlong
23385
23386 $as_echo "#define USE_MP_LONG_LONG 1" >>confdefs.h
23387
23388         elif test $ol_with_mp = longlong ; then
23389                 as_fn_error "long long unusable for multiple precision" "$LINENO" 5
23390         fi
23391 fi
23392 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
23393         if test $ac_cv_sizeof_long -gt 4 ; then
23394                 ol_with_mp=long
23395
23396 $as_echo "#define USE_MP_LONG 1" >>confdefs.h
23397
23398         elif test $ol_with_mp = long ; then
23399                 as_fn_error "long unusable for multiple precision" "$LINENO" 5
23400         fi
23401 fi
23402 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
23403         for ac_header in openssl/bn.h
23404 do :
23405   ac_fn_c_check_header_mongrel "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default"
23406 if test "x$ac_cv_header_openssl_bn_h" = x""yes; then :
23407   cat >>confdefs.h <<_ACEOF
23408 #define HAVE_OPENSSL_BN_H 1
23409 _ACEOF
23410
23411 fi
23412
23413 done
23414
23415         for ac_header in openssl/crypto.h
23416 do :
23417   ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
23418 if test "x$ac_cv_header_openssl_crypto_h" = x""yes; then :
23419   cat >>confdefs.h <<_ACEOF
23420 #define HAVE_OPENSSL_CRYPTO_H 1
23421 _ACEOF
23422
23423 fi
23424
23425 done
23426
23427         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
23428                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
23429                 test "$ol_with_tls" = "found" ; then
23430                 ol_with_mp=bignum
23431
23432 $as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h
23433
23434         elif test $ol_with_mp = bignum ; then
23435                 as_fn_error "bignum not available" "$LINENO" 5
23436         fi
23437 fi
23438 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
23439         for ac_header in gmp.h
23440 do :
23441   ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
23442 if test "x$ac_cv_header_gmp_h" = x""yes; then :
23443   cat >>confdefs.h <<_ACEOF
23444 #define HAVE_GMP_H 1
23445 _ACEOF
23446
23447 fi
23448
23449 done
23450
23451         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_add_ui in -lgmp" >&5
23452 $as_echo_n "checking for __gmpz_add_ui in -lgmp... " >&6; }
23453 if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then :
23454   $as_echo_n "(cached) " >&6
23455 else
23456   ac_check_lib_save_LIBS=$LIBS
23457 LIBS="-lgmp  $LIBS"
23458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23459 /* end confdefs.h.  */
23460
23461 /* Override any GCC internal prototype to avoid an error.
23462    Use char because int might match the return type of a GCC
23463    builtin and then its argument prototype would still apply.  */
23464 #ifdef __cplusplus
23465 extern "C"
23466 #endif
23467 char __gmpz_add_ui ();
23468 int
23469 main ()
23470 {
23471 return __gmpz_add_ui ();
23472   ;
23473   return 0;
23474 }
23475 _ACEOF
23476 if ac_fn_c_try_link "$LINENO"; then :
23477   ac_cv_lib_gmp___gmpz_add_ui=yes
23478 else
23479   ac_cv_lib_gmp___gmpz_add_ui=no
23480 fi
23481 rm -f core conftest.err conftest.$ac_objext \
23482     conftest$ac_exeext conftest.$ac_ext
23483 LIBS=$ac_check_lib_save_LIBS
23484 fi
23485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
23486 $as_echo "$ac_cv_lib_gmp___gmpz_add_ui" >&6; }
23487 if test "x$ac_cv_lib_gmp___gmpz_add_ui" = x""yes; then :
23488   cat >>confdefs.h <<_ACEOF
23489 #define HAVE_LIBGMP 1
23490 _ACEOF
23491
23492   LIBS="-lgmp $LIBS"
23493
23494 fi
23495
23496         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
23497
23498 $as_echo "#define USE_MP_GMP 1" >>confdefs.h
23499
23500                 ol_with_mp=gmp
23501         elif test $ol_with_mp = gmp ; then
23502                 as_fn_error "gmp not available" "$LINENO" 5
23503         fi
23504 fi
23505 if test $ol_with_mp = auto ; then
23506         ol_with_mp=no
23507 fi
23508
23509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
23510 $as_echo_n "checking for working memcmp... " >&6; }
23511 if test "${ac_cv_func_memcmp_working+set}" = set; then :
23512   $as_echo_n "(cached) " >&6
23513 else
23514   if test "$cross_compiling" = yes; then :
23515   ac_cv_func_memcmp_working=no
23516 else
23517   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23518 /* end confdefs.h.  */
23519 $ac_includes_default
23520 int
23521 main ()
23522 {
23523
23524   /* Some versions of memcmp are not 8-bit clean.  */
23525   char c0 = '\100', c1 = '\200', c2 = '\201';
23526   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
23527     return 1;
23528
23529   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
23530      or more and with at least one buffer not starting on a 4-byte boundary.
23531      William Lewis provided this test program.   */
23532   {
23533     char foo[21];
23534     char bar[21];
23535     int i;
23536     for (i = 0; i < 4; i++)
23537       {
23538         char *a = foo + i;
23539         char *b = bar + i;
23540         strcpy (a, "--------01111111");
23541         strcpy (b, "--------10000000");
23542         if (memcmp (a, b, 16) >= 0)
23543           return 1;
23544       }
23545     return 0;
23546   }
23547
23548   ;
23549   return 0;
23550 }
23551 _ACEOF
23552 if ac_fn_c_try_run "$LINENO"; then :
23553   ac_cv_func_memcmp_working=yes
23554 else
23555   ac_cv_func_memcmp_working=no
23556 fi
23557 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23558   conftest.$ac_objext conftest.beam conftest.$ac_ext
23559 fi
23560
23561 fi
23562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
23563 $as_echo "$ac_cv_func_memcmp_working" >&6; }
23564 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
23565   *" memcmp.$ac_objext "* ) ;;
23566   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
23567  ;;
23568 esac
23569
23570
23571
23572 if test $ac_cv_func_memcmp_working = no ; then
23573
23574 $as_echo "#define NEED_MEMCMP_REPLACEMENT 1" >>confdefs.h
23575
23576 fi
23577
23578 for ac_func in strftime
23579 do :
23580   ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23581 if test "x$ac_cv_func_strftime" = x""yes; then :
23582   cat >>confdefs.h <<_ACEOF
23583 #define HAVE_STRFTIME 1
23584 _ACEOF
23585
23586 else
23587   # strftime is in -lintl on SCO UNIX.
23588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
23589 $as_echo_n "checking for strftime in -lintl... " >&6; }
23590 if test "${ac_cv_lib_intl_strftime+set}" = set; then :
23591   $as_echo_n "(cached) " >&6
23592 else
23593   ac_check_lib_save_LIBS=$LIBS
23594 LIBS="-lintl  $LIBS"
23595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23596 /* end confdefs.h.  */
23597
23598 /* Override any GCC internal prototype to avoid an error.
23599    Use char because int might match the return type of a GCC
23600    builtin and then its argument prototype would still apply.  */
23601 #ifdef __cplusplus
23602 extern "C"
23603 #endif
23604 char strftime ();
23605 int
23606 main ()
23607 {
23608 return strftime ();
23609   ;
23610   return 0;
23611 }
23612 _ACEOF
23613 if ac_fn_c_try_link "$LINENO"; then :
23614   ac_cv_lib_intl_strftime=yes
23615 else
23616   ac_cv_lib_intl_strftime=no
23617 fi
23618 rm -f core conftest.err conftest.$ac_objext \
23619     conftest$ac_exeext conftest.$ac_ext
23620 LIBS=$ac_check_lib_save_LIBS
23621 fi
23622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
23623 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
23624 if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
23625   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
23626
23627 LIBS="-lintl $LIBS"
23628 fi
23629
23630 fi
23631 done
23632
23633
23634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton()" >&5
23635 $as_echo_n "checking for inet_aton()... " >&6; }
23636 if test "${ol_cv_func_inet_aton+set}" = set; then :
23637   $as_echo_n "(cached) " >&6
23638 else
23639   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23640 /* end confdefs.h.  */
23641
23642 #ifdef HAVE_SYS_TYPES_H
23643 #       include <sys/types.h>
23644 #endif
23645 #ifdef HAVE_SYS_SOCKET_H
23646 #       include <sys/socket.h>
23647 #       ifdef HAVE_SYS_SELECT_H
23648 #               include <sys/select.h>
23649 #       endif
23650 #       include <netinet/in.h>
23651 #       ifdef HAVE_ARPA_INET_H
23652 #               include <arpa/inet.h>
23653 #       endif
23654 #endif
23655
23656 int
23657 main ()
23658 {
23659 struct in_addr in;
23660 int rc = inet_aton( "255.255.255.255", &in );
23661   ;
23662   return 0;
23663 }
23664 _ACEOF
23665 if ac_fn_c_try_link "$LINENO"; then :
23666   ol_cv_func_inet_aton=yes
23667 else
23668   ol_cv_func_inet_aton=no
23669 fi
23670 rm -f core conftest.err conftest.$ac_objext \
23671     conftest$ac_exeext conftest.$ac_ext
23672 fi
23673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_inet_aton" >&5
23674 $as_echo "$ol_cv_func_inet_aton" >&6; }
23675   if test $ol_cv_func_inet_aton != no; then
23676
23677 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
23678
23679   fi
23680
23681
23682 ac_fn_c_check_func "$LINENO" "_spawnlp" "ac_cv_func__spawnlp"
23683 if test "x$ac_cv_func__spawnlp" = x""yes; then :
23684
23685 $as_echo "#define HAVE_SPAWNLP 1" >>confdefs.h
23686
23687 fi
23688
23689
23690 ac_fn_c_check_func "$LINENO" "_snprintf" "ac_cv_func__snprintf"
23691 if test "x$ac_cv_func__snprintf" = x""yes; then :
23692   ac_cv_func_snprintf=yes
23693
23694 $as_echo "#define snprintf _snprintf" >>confdefs.h
23695
23696
23697 fi
23698
23699
23700 for ac_func in vsnprintf _vsnprintf
23701 do :
23702   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23703 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23704 eval as_val=\$$as_ac_var
23705    if test "x$as_val" = x""yes; then :
23706   cat >>confdefs.h <<_ACEOF
23707 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23708 _ACEOF
23709
23710 fi
23711 done
23712
23713
23714 if test $ac_cv_func_vsnprintf = no -a $ac_cv_func__vsnprintf = yes ; then
23715         ac_cv_func_vsnprintf=yes
23716
23717 $as_echo "#define vsnprintf _vsnprintf" >>confdefs.h
23718
23719 fi
23720
23721 for ac_func in vprintf
23722 do :
23723   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
23724 if test "x$ac_cv_func_vprintf" = x""yes; then :
23725   cat >>confdefs.h <<_ACEOF
23726 #define HAVE_VPRINTF 1
23727 _ACEOF
23728
23729 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
23730 if test "x$ac_cv_func__doprnt" = x""yes; then :
23731
23732 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
23733
23734 fi
23735
23736 fi
23737 done
23738
23739
23740
23741 if test $ac_cv_func_vprintf = yes ; then
23742                 for ac_func in snprintf vsnprintf
23743 do :
23744   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23745 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23746 eval as_val=\$$as_ac_var
23747    if test "x$as_val" = x""yes; then :
23748   cat >>confdefs.h <<_ACEOF
23749 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23750 _ACEOF
23751
23752 fi
23753 done
23754
23755 fi
23756
23757 for ac_func in \
23758         bcopy                   \
23759         closesocket             \
23760         chroot                  \
23761         endgrent                \
23762         endpwent                \
23763         fcntl                   \
23764         flock                   \
23765         fstat                   \
23766         getdtablesize           \
23767         geteuid                 \
23768         getgrgid                \
23769         gethostname             \
23770         getpassphrase           \
23771         getpwuid                \
23772         getpwnam                \
23773         getspnam                \
23774         gettimeofday            \
23775         initgroups              \
23776         inet_ntoa_b             \
23777         ioctl                   \
23778         lockf                   \
23779         memcpy                  \
23780         memmove                 \
23781         memrchr                 \
23782         mkstemp                 \
23783         mktemp                  \
23784         pipe                    \
23785         read                    \
23786         recv                    \
23787         recvfrom                \
23788         setpwfile               \
23789         setgid                  \
23790         setegid                 \
23791         setsid                  \
23792         setuid                  \
23793         seteuid                 \
23794         signal                  \
23795         strdup                  \
23796         strpbrk                 \
23797         strrchr                 \
23798         strsep                  \
23799         strstr                  \
23800         strtol                  \
23801         strtoul                 \
23802         strtoq                  \
23803         strtouq                 \
23804         strtoll                 \
23805         strtoull                \
23806         strspn                  \
23807         sysconf                 \
23808         waitpid                 \
23809         wait4                   \
23810         write                   \
23811         send                    \
23812         sendmsg                 \
23813         sendto                  \
23814
23815 do :
23816   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23817 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23818 eval as_val=\$$as_ac_var
23819    if test "x$as_val" = x""yes; then :
23820   cat >>confdefs.h <<_ACEOF
23821 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23822 _ACEOF
23823
23824 fi
23825 done
23826
23827
23828 for ac_func in getopt getpeereid
23829 do :
23830   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23831 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23832 eval as_val=\$$as_ac_var
23833    if test "x$as_val" = x""yes; then :
23834   cat >>confdefs.h <<_ACEOF
23835 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23836 _ACEOF
23837
23838 else
23839   case " $LIBOBJS " in
23840   *" $ac_func.$ac_objext "* ) ;;
23841   *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
23842  ;;
23843 esac
23844
23845 fi
23846 done
23847
23848
23849
23850 if test "$ac_cv_func_getopt" != yes; then
23851         LIBSRCS="$LIBSRCS getopt.c"
23852 fi
23853
23854 if test "$ac_cv_func_getpeereid" != yes; then
23855         for ac_func in getpeerucred
23856 do :
23857   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23858 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23859 eval as_val=\$$as_ac_var
23860    if test "x$as_val" = x""yes; then :
23861   cat >>confdefs.h <<_ACEOF
23862 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23863 _ACEOF
23864
23865 fi
23866 done
23867
23868         if test "$ac_cv_func_getpeerucred" != yes ; then
23869                 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrightslen" "ac_cv_member_struct_msghdr_msg_accrightslen" "$ac_includes_default
23870 #ifdef HAVE_SYS_SOCKET_H
23871 #include <sys/socket.h>
23872 #endif
23873 "
23874 if test "x$ac_cv_member_struct_msghdr_msg_accrightslen" = x""yes; then :
23875
23876 cat >>confdefs.h <<_ACEOF
23877 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
23878 _ACEOF
23879
23880
23881 fi
23882
23883                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
23884                         ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "$ac_includes_default
23885 #ifdef HAVE_SYS_SOCKET_H
23886 #include <sys/socket.h>
23887 #endif
23888 "
23889 if test "x$ac_cv_member_struct_msghdr_msg_control" = x""yes; then :
23890
23891 cat >>confdefs.h <<_ACEOF
23892 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
23893 _ACEOF
23894
23895
23896 fi
23897
23898                 fi
23899                 ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default"
23900 if test "x$ac_cv_member_struct_stat_st_fstype" = x""yes; then :
23901
23902 cat >>confdefs.h <<_ACEOF
23903 #define HAVE_STRUCT_STAT_ST_FSTYPE 1
23904 _ACEOF
23905
23906
23907 fi
23908 ac_fn_c_check_member "$LINENO" "struct stat" "st_vfstype" "ac_cv_member_struct_stat_st_vfstype" "$ac_includes_default"
23909 if test "x$ac_cv_member_struct_stat_st_vfstype" = x""yes; then :
23910
23911 cat >>confdefs.h <<_ACEOF
23912 #define HAVE_STRUCT_STAT_ST_VFSTYPE 1
23913 _ACEOF
23914
23915
23916 fi
23917
23918                 if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
23919                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23920 /* end confdefs.h.  */
23921 struct stat st; char *ptr=st.st_fstype;
23922 _ACEOF
23923 if ac_fn_c_try_compile "$LINENO"; then :
23924
23925 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1" >>confdefs.h
23926
23927 else
23928
23929 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1" >>confdefs.h
23930
23931 fi
23932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23933                 fi
23934         fi
23935         LIBSRCS="$LIBSRCS getpeereid.c"
23936 fi
23937
23938 if test "$ac_cv_func_snprintf" != yes ||
23939    test "$ac_cv_func_vsnprintf" != yes; then
23940         if test "$ac_cv_func_snprintf" != yes; then
23941
23942 $as_echo "#define snprintf ber_pvt_snprintf" >>confdefs.h
23943
23944         fi
23945         if test "$ac_cv_func_vsnprintf" != yes; then
23946
23947 $as_echo "#define vsnprintf ber_pvt_vsnprintf" >>confdefs.h
23948
23949         fi
23950 fi
23951
23952
23953 if test "$ol_enable_slapi" != no ; then
23954                         for ac_header in ltdl.h
23955 do :
23956   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
23957 if test "x$ac_cv_header_ltdl_h" = x""yes; then :
23958   cat >>confdefs.h <<_ACEOF
23959 #define HAVE_LTDL_H 1
23960 _ACEOF
23961
23962 fi
23963
23964 done
23965
23966
23967         if test $ac_cv_header_ltdl_h != yes ; then
23968                 as_fn_error "could not locate <ltdl.h>" "$LINENO" 5
23969         fi
23970         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
23971 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
23972 if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
23973   $as_echo_n "(cached) " >&6
23974 else
23975   ac_check_lib_save_LIBS=$LIBS
23976 LIBS="-lltdl  $LIBS"
23977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23978 /* end confdefs.h.  */
23979
23980 /* Override any GCC internal prototype to avoid an error.
23981    Use char because int might match the return type of a GCC
23982    builtin and then its argument prototype would still apply.  */
23983 #ifdef __cplusplus
23984 extern "C"
23985 #endif
23986 char lt_dlinit ();
23987 int
23988 main ()
23989 {
23990 return lt_dlinit ();
23991   ;
23992   return 0;
23993 }
23994 _ACEOF
23995 if ac_fn_c_try_link "$LINENO"; then :
23996   ac_cv_lib_ltdl_lt_dlinit=yes
23997 else
23998   ac_cv_lib_ltdl_lt_dlinit=no
23999 fi
24000 rm -f core conftest.err conftest.$ac_objext \
24001     conftest$ac_exeext conftest.$ac_ext
24002 LIBS=$ac_check_lib_save_LIBS
24003 fi
24004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
24005 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
24006 if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
24007
24008                 SLAPI_LIBS=-lltdl
24009                 LIBSLAPI=slapi/libslapi.la
24010
24011 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
24012
24013
24014 else
24015   as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
24016 fi
24017
24018
24019
24020 $as_echo "#define LDAP_SLAPI 1" >>confdefs.h
24021
24022 fi
24023
24024 if test "$ol_enable_debug" != no ; then
24025         if test "$ol_enable_debug" = traditional; then
24026
24027 $as_echo "#define OLD_DEBUG 1" >>confdefs.h
24028
24029         fi
24030
24031 $as_echo "#define LDAP_DEBUG 1" >>confdefs.h
24032
24033 fi
24034 if test "$ol_enable_syslog" = yes ; then
24035
24036 $as_echo "#define LDAP_SYSLOG 1" >>confdefs.h
24037
24038 fi
24039 if test "$ol_enable_proctitle" != no ; then
24040
24041 $as_echo "#define LDAP_PROCTITLE 1" >>confdefs.h
24042
24043 fi
24044 if test "$ol_enable_referrals" != no ; then
24045
24046 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION" >>confdefs.h
24047
24048 fi
24049 if test "$ol_enable_local" != no; then
24050
24051 $as_echo "#define LDAP_PF_LOCAL 1" >>confdefs.h
24052
24053 fi
24054 if test "$ol_link_ipv6" != no; then
24055
24056 $as_echo "#define LDAP_PF_INET6 1" >>confdefs.h
24057
24058 fi
24059 if test "$ol_enable_cleartext" != no ; then
24060
24061 $as_echo "#define SLAPD_CLEARTEXT 1" >>confdefs.h
24062
24063 fi
24064 if test "$ol_enable_crypt" != no ; then
24065
24066 $as_echo "#define SLAPD_CRYPT 1" >>confdefs.h
24067
24068 fi
24069 if test "$ol_link_spasswd" != no ; then
24070
24071 $as_echo "#define SLAPD_SPASSWD 1" >>confdefs.h
24072
24073 fi
24074 if test "$ol_enable_rlookups" != no ; then
24075
24076 $as_echo "#define SLAPD_RLOOKUPS 1" >>confdefs.h
24077
24078 fi
24079 if test "$ol_enable_aci" != no ; then
24080         if test $ol_enable_dynacl = no ; then
24081                 ol_enable_dynacl=yes
24082                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ACIs need dynacl" >&5
24083 $as_echo "$as_me: WARNING: ACIs need dynacl" >&2;}
24084         fi
24085         if test "$ol_enable_aci" = mod ; then
24086                 MFLAG=SLAPD_MOD_DYNAMIC
24087                                 as_fn_error "ACI build as dynamic module not supported (yet)" "$LINENO" 5
24088         else
24089                 MFLAG=SLAPD_MOD_STATIC
24090         fi
24091         WITH_ACI_ENABLED=$ol_enable_aci
24092
24093 cat >>confdefs.h <<_ACEOF
24094 #define SLAPD_ACI_ENABLED $MFLAG
24095 _ACEOF
24096
24097 else
24098         WITH_ACI_ENABLED=no
24099 fi
24100 if test "$ol_enable_dynacl" != no ; then
24101
24102 $as_echo "#define SLAP_DYNACL 1" >>confdefs.h
24103
24104 fi
24105
24106 if test "$ol_link_modules" != no ; then
24107
24108 $as_echo "#define SLAPD_MODULES 1" >>confdefs.h
24109
24110         BUILD_SLAPD=yes
24111         SLAPD_MODULES_LDFLAGS="-dlopen self"
24112 fi
24113
24114
24115 $as_echo "#define SLAPD_MOD_STATIC 1" >>confdefs.h
24116
24117
24118 $as_echo "#define SLAPD_MOD_DYNAMIC 2" >>confdefs.h
24119
24120
24121 if test "$ol_enable_monitor" != no ; then
24122         BUILD_SLAPD=yes
24123         BUILD_MONITOR=$ol_enable_monitor
24124         if test "$ol_enable_monitor" = mod ; then
24125                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24126                 MFLAG=SLAPD_MOD_DYNAMIC
24127         else
24128                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24129                 MFLAG=SLAPD_MOD_STATIC
24130         fi
24131
24132 cat >>confdefs.h <<_ACEOF
24133 #define SLAPD_MONITOR $MFLAG
24134 _ACEOF
24135
24136 fi
24137
24138 if test "$ol_enable_bdb" != no ; then
24139         BUILD_SLAPD=yes
24140         BUILD_BDB=$ol_enable_bdb
24141         if test "$ol_enable_bdb" = mod ; then
24142                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24143                 MFLAG=SLAPD_MOD_DYNAMIC
24144         else
24145                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24146                 MFLAG=SLAPD_MOD_STATIC
24147         fi
24148
24149 cat >>confdefs.h <<_ACEOF
24150 #define SLAPD_BDB $MFLAG
24151 _ACEOF
24152
24153 fi
24154
24155 if test "$ol_enable_dnssrv" != no ; then
24156         BUILD_SLAPD=yes
24157         BUILD_DNSSRV=$ol_enable_dnssrv
24158         if test "$ol_enable_dnssrv" = mod ; then
24159                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24160                 MFLAG=SLAPD_MOD_DYNAMIC
24161         else
24162                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24163                 MFLAG=SLAPD_MOD_STATIC
24164         fi
24165
24166 cat >>confdefs.h <<_ACEOF
24167 #define SLAPD_DNSSRV $MFLAG
24168 _ACEOF
24169
24170 fi
24171
24172 if test "$ol_enable_hdb" != no ; then
24173         BUILD_SLAPD=yes
24174         BUILD_HDB=$ol_enable_hdb
24175         if test "$ol_enable_hdb" = mod ; then
24176                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24177                 MFLAG=SLAPD_MOD_DYNAMIC
24178         else
24179                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24180                 MFLAG=SLAPD_MOD_STATIC
24181         fi
24182
24183 cat >>confdefs.h <<_ACEOF
24184 #define SLAPD_HDB $MFLAG
24185 _ACEOF
24186
24187 fi
24188
24189 if test "$ol_enable_ldap" != no ; then
24190         BUILD_SLAPD=yes
24191         BUILD_LDAP=$ol_enable_ldap
24192         if test "$ol_enable_ldap" = mod ; then
24193                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24194                 MFLAG=SLAPD_MOD_DYNAMIC
24195         else
24196                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24197                 MFLAG=SLAPD_MOD_STATIC
24198         fi
24199
24200 cat >>confdefs.h <<_ACEOF
24201 #define SLAPD_LDAP $MFLAG
24202 _ACEOF
24203
24204 fi
24205
24206 if test "$ol_enable_meta" != no ; then
24207         BUILD_SLAPD=yes
24208         BUILD_META=$ol_enable_meta
24209         BUILD_REWRITE=yes
24210         if test "$ol_enable_meta" = mod ; then
24211                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24212                 MFLAG=SLAPD_MOD_DYNAMIC
24213         else
24214                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24215                 MFLAG=SLAPD_MOD_STATIC
24216         fi
24217
24218 cat >>confdefs.h <<_ACEOF
24219 #define SLAPD_META $MFLAG
24220 _ACEOF
24221
24222 fi
24223
24224 if test "$ol_enable_ndb" != no ; then
24225         BUILD_SLAPD=yes
24226         BUILD_NDB=$ol_enable_ndb
24227         if test "$ol_enable_ndb" = mod ; then
24228                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ndb"
24229                 MFLAG=SLAPD_MOD_DYNAMIC
24230         else
24231                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ndb"
24232                 MFLAG=SLAPD_MOD_STATIC
24233         fi
24234
24235 cat >>confdefs.h <<_ACEOF
24236 #define SLAPD_NDB $MFLAG
24237 _ACEOF
24238
24239 fi
24240
24241 if test "$ol_enable_null" != no ; then
24242         BUILD_SLAPD=yes
24243         BUILD_NULL=$ol_enable_null
24244         if test "$ol_enable_null" = mod ; then
24245                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24246                 MFLAG=SLAPD_MOD_DYNAMIC
24247         else
24248                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24249                 MFLAG=SLAPD_MOD_STATIC
24250         fi
24251
24252 cat >>confdefs.h <<_ACEOF
24253 #define SLAPD_NULL $MFLAG
24254 _ACEOF
24255
24256 fi
24257
24258 if test "$ol_enable_passwd" != no ; then
24259         BUILD_SLAPD=yes
24260         BUILD_PASSWD=$ol_enable_passwd
24261         if test "$ol_enable_passwd" = mod ; then
24262                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24263                 MFLAG=SLAPD_MOD_DYNAMIC
24264         else
24265                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24266                 MFLAG=SLAPD_MOD_STATIC
24267         fi
24268
24269 cat >>confdefs.h <<_ACEOF
24270 #define SLAPD_PASSWD $MFLAG
24271 _ACEOF
24272
24273 fi
24274
24275 if test "$ol_link_perl" != no ; then
24276         BUILD_SLAPD=yes
24277         BUILD_PERL=$ol_enable_perl
24278         if test "$ol_enable_perl" = mod ; then
24279                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24280                 MFLAG=SLAPD_MOD_DYNAMIC
24281         else
24282                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24283                 MFLAG=SLAPD_MOD_STATIC
24284         fi
24285
24286 cat >>confdefs.h <<_ACEOF
24287 #define SLAPD_PERL $MFLAG
24288 _ACEOF
24289
24290 fi
24291
24292 if test "$ol_enable_relay" != no ; then
24293         BUILD_SLAPD=yes
24294         BUILD_RELAY=$ol_enable_relay
24295         if test "$ol_enable_relay" = mod ; then
24296                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
24297                 MFLAG=SLAPD_MOD_DYNAMIC
24298         else
24299                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
24300                 MFLAG=SLAPD_MOD_STATIC
24301         fi
24302
24303 cat >>confdefs.h <<_ACEOF
24304 #define SLAPD_RELAY $MFLAG
24305 _ACEOF
24306
24307 fi
24308
24309 if test "$ol_enable_shell" != no ; then
24310         if test "$ol_link_threads" != no ; then
24311                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use of --without-threads is recommended with back-shell" >&5
24312 $as_echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
24313         fi
24314         BUILD_SLAPD=yes
24315         BUILD_SHELL=$ol_enable_shell
24316         if test "$ol_enable_shell" = mod ; then
24317                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24318                 MFLAG=SLAPD_MOD_DYNAMIC
24319         else
24320                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24321                 MFLAG=SLAPD_MOD_STATIC
24322         fi
24323
24324 cat >>confdefs.h <<_ACEOF
24325 #define SLAPD_SHELL $MFLAG
24326 _ACEOF
24327
24328 fi
24329
24330 if test "$ol_enable_sock" != no ; then
24331         BUILD_SLAPD=yes
24332         BUILD_SOCK=$ol_enable_sock
24333         if test "$ol_enable_sock" = mod ; then
24334                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sock"
24335                 MFLAG=SLAPD_MOD_DYNAMIC
24336         else
24337                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sock"
24338                 MFLAG=SLAPD_MOD_STATIC
24339         fi
24340
24341 cat >>confdefs.h <<_ACEOF
24342 #define SLAPD_SOCK $MFLAG
24343 _ACEOF
24344
24345 fi
24346
24347 if test "$ol_link_sql" != no ; then
24348         BUILD_SLAPD=yes
24349         BUILD_SQL=$ol_enable_sql
24350         if test "$ol_enable_sql" = mod; then
24351                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24352                 MFLAG=SLAPD_MOD_DYNAMIC
24353         else
24354                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24355                 MFLAG=SLAPD_MOD_STATIC
24356         fi
24357
24358 cat >>confdefs.h <<_ACEOF
24359 #define SLAPD_SQL $MFLAG
24360 _ACEOF
24361
24362 fi
24363
24364 if test "$ol_enable_accesslog" != no ; then
24365         BUILD_ACCESSLOG=$ol_enable_accesslog
24366         if test "$ol_enable_accesslog" = mod ; then
24367                 MFLAG=SLAPD_MOD_DYNAMIC
24368                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
24369         else
24370                 MFLAG=SLAPD_MOD_STATIC
24371                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
24372         fi
24373
24374 cat >>confdefs.h <<_ACEOF
24375 #define SLAPD_OVER_ACCESSLOG $MFLAG
24376 _ACEOF
24377
24378 fi
24379
24380 if test "$ol_enable_auditlog" != no ; then
24381         BUILD_AUDITLOG=$ol_enable_auditlog
24382         if test "$ol_enable_auditlog" = mod ; then
24383                 MFLAG=SLAPD_MOD_DYNAMIC
24384                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
24385         else
24386                 MFLAG=SLAPD_MOD_STATIC
24387                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
24388         fi
24389
24390 cat >>confdefs.h <<_ACEOF
24391 #define SLAPD_OVER_AUDITLOG $MFLAG
24392 _ACEOF
24393
24394 fi
24395
24396 if test "$ol_enable_collect" != no ; then
24397         BUILD_COLLECT=$ol_enable_collect
24398         if test "$ol_enable_collect" = mod ; then
24399                 MFLAG=SLAPD_MOD_DYNAMIC
24400                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS collect.la"
24401         else
24402                 MFLAG=SLAPD_MOD_STATIC
24403                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS collect.o"
24404         fi
24405
24406 cat >>confdefs.h <<_ACEOF
24407 #define SLAPD_OVER_COLLECT $MFLAG
24408 _ACEOF
24409
24410 fi
24411
24412 if test "$ol_enable_constraint" != no ; then
24413         BUILD_CONSTRAINT=$ol_enable_constraint
24414         if test "$ol_enable_constraint" = mod ; then
24415                 MFLAG=SLAPD_MOD_DYNAMIC
24416                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la"
24417         else
24418                 MFLAG=SLAPD_MOD_STATIC
24419                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o"
24420         fi
24421
24422 cat >>confdefs.h <<_ACEOF
24423 #define SLAPD_OVER_CONSTRAINT $MFLAG
24424 _ACEOF
24425
24426 fi
24427
24428 if test "$ol_enable_dds" != no ; then
24429         BUILD_DDS=$ol_enable_dds
24430         if test "$ol_enable_dds" = mod ; then
24431                 MFLAG=SLAPD_MOD_DYNAMIC
24432                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
24433         else
24434                 MFLAG=SLAPD_MOD_STATIC
24435                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
24436         fi
24437
24438 cat >>confdefs.h <<_ACEOF
24439 #define SLAPD_OVER_DDS $MFLAG
24440 _ACEOF
24441
24442 fi
24443
24444 if test "$ol_enable_deref" != no ; then
24445         BUILD_DEREF=$ol_enable_deref
24446         if test "$ol_enable_deref" = mod ; then
24447                 MFLAG=SLAPD_MOD_DYNAMIC
24448                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS deref.la"
24449         else
24450                 MFLAG=SLAPD_MOD_STATIC
24451                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS deref.o"
24452         fi
24453
24454 cat >>confdefs.h <<_ACEOF
24455 #define SLAPD_OVER_DEREF $MFLAG
24456 _ACEOF
24457
24458 fi
24459
24460 if test "$ol_enable_dyngroup" != no ; then
24461         BUILD_DYNGROUP=$ol_enable_dyngroup
24462         if test "$ol_enable_dyngroup" = mod ; then
24463                 MFLAG=SLAPD_MOD_DYNAMIC
24464                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24465         else
24466                 MFLAG=SLAPD_MOD_STATIC
24467                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
24468         fi
24469
24470 cat >>confdefs.h <<_ACEOF
24471 #define SLAPD_OVER_DYNGROUP $MFLAG
24472 _ACEOF
24473
24474 fi
24475
24476 if test "$ol_enable_dynlist" != no ; then
24477         BUILD_DYNLIST=$ol_enable_dynlist
24478         if test "$ol_enable_dynlist" = mod ; then
24479                 MFLAG=SLAPD_MOD_DYNAMIC
24480                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
24481         else
24482                 MFLAG=SLAPD_MOD_STATIC
24483                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
24484         fi
24485
24486 cat >>confdefs.h <<_ACEOF
24487 #define SLAPD_OVER_DYNLIST $MFLAG
24488 _ACEOF
24489
24490 fi
24491
24492 if test "$ol_enable_memberof" != no ; then
24493         BUILD_MEMBEROF=$ol_enable_memberof
24494         if test "$ol_enable_memberof" = mod ; then
24495                 MFLAG=SLAPD_MOD_DYNAMIC
24496                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la"
24497         else
24498                 MFLAG=SLAPD_MOD_STATIC
24499                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o"
24500         fi
24501
24502 cat >>confdefs.h <<_ACEOF
24503 #define SLAPD_OVER_MEMBEROF $MFLAG
24504 _ACEOF
24505
24506 fi
24507
24508 if test "$ol_enable_ppolicy" != no ; then
24509         BUILD_PPOLICY=$ol_enable_ppolicy
24510         if test "$ol_enable_ppolicy" = mod ; then
24511                 MFLAG=SLAPD_MOD_DYNAMIC
24512                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24513         else
24514                 MFLAG=SLAPD_MOD_STATIC
24515                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
24516         fi
24517
24518 cat >>confdefs.h <<_ACEOF
24519 #define SLAPD_OVER_PPOLICY $MFLAG
24520 _ACEOF
24521
24522 fi
24523
24524 if test "$ol_enable_proxycache" != no ; then
24525         BUILD_PROXYCACHE=$ol_enable_proxycache
24526         if test "$ol_enable_proxycache" = mod ; then
24527                 MFLAG=SLAPD_MOD_DYNAMIC
24528                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24529         else
24530                 MFLAG=SLAPD_MOD_STATIC
24531                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
24532         fi
24533
24534 cat >>confdefs.h <<_ACEOF
24535 #define SLAPD_OVER_PROXYCACHE $MFLAG
24536 _ACEOF
24537
24538 fi
24539
24540 if test "$ol_enable_refint" != no ; then
24541         BUILD_REFINT=$ol_enable_refint
24542         if test "$ol_enable_refint" = mod ; then
24543                 MFLAG=SLAPD_MOD_DYNAMIC
24544                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24545         else
24546                 MFLAG=SLAPD_MOD_STATIC
24547                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
24548         fi
24549
24550 cat >>confdefs.h <<_ACEOF
24551 #define SLAPD_OVER_REFINT $MFLAG
24552 _ACEOF
24553
24554 fi
24555
24556 if test "$ol_enable_retcode" != no ; then
24557         BUILD_RETCODE=$ol_enable_retcode
24558         if test "$ol_enable_retcode" = mod ; then
24559                 MFLAG=SLAPD_MOD_DYNAMIC
24560                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
24561         else
24562                 MFLAG=SLAPD_MOD_STATIC
24563                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
24564         fi
24565
24566 cat >>confdefs.h <<_ACEOF
24567 #define SLAPD_OVER_RETCODE $MFLAG
24568 _ACEOF
24569
24570 fi
24571
24572 if test "$ol_enable_rwm" != no ; then
24573         BUILD_REWRITE=yes
24574         BUILD_RWM=$ol_enable_rwm
24575         if test "$ol_enable_rwm" = mod ; then
24576                 MFLAG=SLAPD_MOD_DYNAMIC
24577                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24578         else
24579                 MFLAG=SLAPD_MOD_STATIC
24580                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
24581         fi
24582
24583 cat >>confdefs.h <<_ACEOF
24584 #define SLAPD_OVER_RWM $MFLAG
24585 _ACEOF
24586
24587 fi
24588
24589 if test "$ol_enable_seqmod" != no ; then
24590         BUILD_SEQMOD=$ol_enable_seqmod
24591         if test "$ol_enable_seqmod" = mod ; then
24592                 MFLAG=SLAPD_MOD_DYNAMIC
24593                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
24594         else
24595                 MFLAG=SLAPD_MOD_STATIC
24596                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
24597         fi
24598
24599 cat >>confdefs.h <<_ACEOF
24600 #define SLAPD_OVER_SEQMOD $MFLAG
24601 _ACEOF
24602
24603 fi
24604
24605 if test "$ol_enable_sssvlv" != no ; then
24606         BUILD_SSSVLV=$ol_enable_sssvlv
24607         if test "$ol_enable_sssvlv" = mod ; then
24608                 MFLAG=SLAPD_MOD_DYNAMIC
24609                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS sssvlv.la"
24610         else
24611                 MFLAG=SLAPD_MOD_STATIC
24612                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS sssvlv.o"
24613         fi
24614
24615 cat >>confdefs.h <<_ACEOF
24616 #define SLAPD_OVER_SSSVLV $MFLAG
24617 _ACEOF
24618
24619 fi
24620
24621 if test "$ol_enable_syncprov" != no ; then
24622         BUILD_SYNCPROV=$ol_enable_syncprov
24623         if test "$ol_enable_syncprov" = mod ; then
24624                 MFLAG=SLAPD_MOD_DYNAMIC
24625                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
24626         else
24627                 MFLAG=SLAPD_MOD_STATIC
24628                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
24629         fi
24630
24631 cat >>confdefs.h <<_ACEOF
24632 #define SLAPD_OVER_SYNCPROV $MFLAG
24633 _ACEOF
24634
24635 fi
24636
24637 if test "$ol_enable_translucent" != no ; then
24638         BUILD_TRANSLUCENT=$ol_enable_translucent
24639         if test "$ol_enable_translucent" = mod ; then
24640                 MFLAG=SLAPD_MOD_DYNAMIC
24641                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
24642         else
24643                 MFLAG=SLAPD_MOD_STATIC
24644                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
24645         fi
24646
24647 cat >>confdefs.h <<_ACEOF
24648 #define SLAPD_OVER_TRANSLUCENT $MFLAG
24649 _ACEOF
24650
24651 fi
24652
24653 if test "$ol_enable_unique" != no ; then
24654         BUILD_UNIQUE=$ol_enable_unique
24655         if test "$ol_enable_unique" = mod ; then
24656                 MFLAG=SLAPD_MOD_DYNAMIC
24657                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24658         else
24659                 MFLAG=SLAPD_MOD_STATIC
24660                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
24661         fi
24662
24663 cat >>confdefs.h <<_ACEOF
24664 #define SLAPD_OVER_UNIQUE $MFLAG
24665 _ACEOF
24666
24667 fi
24668
24669 if test "$ol_enable_valsort" != no ; then
24670         BUILD_VALSORT=$ol_enable_valsort
24671         if test "$ol_enable_valsort" = mod ; then
24672                 MFLAG=SLAPD_MOD_DYNAMIC
24673                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
24674         else
24675                 MFLAG=SLAPD_MOD_STATIC
24676                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
24677         fi
24678
24679 cat >>confdefs.h <<_ACEOF
24680 #define SLAPD_OVER_VALSORT $MFLAG
24681 _ACEOF
24682
24683 fi
24684
24685 if test "$ol_enable_rewrite" != no ; then
24686
24687 $as_echo "#define ENABLE_REWRITE 1" >>confdefs.h
24688
24689         BUILD_REWRITE=yes
24690 fi
24691
24692 if test "$ol_enable_slapi" != no ; then
24693
24694 $as_echo "#define ENABLE_SLAPI 1" >>confdefs.h
24695
24696         BUILD_SLAPI=yes
24697         SLAPD_SLAPI_DEPEND=libslapi.a
24698 fi
24699
24700
24701
24702 if test "$ac_cv_mingw32" = yes -o $ol_cv_msvc = yes ; then
24703         PLAT=NT
24704         SLAPD_MODULES_LDFLAGS=
24705 else
24706         PLAT=UNIX
24707 fi
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798 # Check whether --with-xxinstall was given.
24799 if test "${with_xxinstall+set}" = set; then :
24800   withval=$with_xxinstall;
24801 fi
24802
24803
24804
24805 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"
24806
24807
24808 ac_config_commands="$ac_config_commands default"
24809
24810
24811
24812 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24813 # Let make expand exec_prefix.
24814 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24815
24816 DEFS=-DHAVE_CONFIG_H
24817
24818 ac_libobjs=
24819 ac_ltlibobjs=
24820 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24821   # 1. Remove the extension, and $U if already installed.
24822   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24823   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24824   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24825   #    will be set to the directory where LIBOBJS objects are built.
24826   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24827   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24828 done
24829 LIBOBJS=$ac_libobjs
24830
24831 LTLIBOBJS=$ac_ltlibobjs
24832
24833
24834 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
24835   as_fn_error "conditional \"AMDEP\" was never defined.
24836 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24837 fi
24838 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24839   as_fn_error "conditional \"am__fastdepCC\" was never defined.
24840 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24841 fi
24842 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24843   as_fn_error "conditional \"am__fastdepCC\" was never defined.
24844 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24845 fi
24846
24847
24848 : ${CONFIG_STATUS=./config.status}
24849 ac_write_fail=0
24850 ac_clean_files_save=$ac_clean_files
24851 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24852 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24853 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24854 as_write_fail=0
24855 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24856 #! $SHELL
24857 # Generated by $as_me.
24858 # Run this file to recreate the current configuration.
24859 # Compiler output produced by configure, useful for debugging
24860 # configure, is in config.log if it exists.
24861
24862 debug=false
24863 ac_cs_recheck=false
24864 ac_cs_silent=false
24865
24866 SHELL=\${CONFIG_SHELL-$SHELL}
24867 export SHELL
24868 _ASEOF
24869 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24870 ## -------------------- ##
24871 ## M4sh Initialization. ##
24872 ## -------------------- ##
24873
24874 # Be more Bourne compatible
24875 DUALCASE=1; export DUALCASE # for MKS sh
24876 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24877   emulate sh
24878   NULLCMD=:
24879   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24880   # is contrary to our usage.  Disable this feature.
24881   alias -g '${1+"$@"}'='"$@"'
24882   setopt NO_GLOB_SUBST
24883 else
24884   case `(set -o) 2>/dev/null` in #(
24885   *posix*) :
24886     set -o posix ;; #(
24887   *) :
24888      ;;
24889 esac
24890 fi
24891
24892
24893 as_nl='
24894 '
24895 export as_nl
24896 # Printing a long string crashes Solaris 7 /usr/bin/printf.
24897 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24898 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24899 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24900 # Prefer a ksh shell builtin over an external printf program on Solaris,
24901 # but without wasting forks for bash or zsh.
24902 if test -z "$BASH_VERSION$ZSH_VERSION" \
24903     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24904   as_echo='print -r --'
24905   as_echo_n='print -rn --'
24906 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24907   as_echo='printf %s\n'
24908   as_echo_n='printf %s'
24909 else
24910   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24911     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24912     as_echo_n='/usr/ucb/echo -n'
24913   else
24914     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24915     as_echo_n_body='eval
24916       arg=$1;
24917       case $arg in #(
24918       *"$as_nl"*)
24919         expr "X$arg" : "X\\(.*\\)$as_nl";
24920         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24921       esac;
24922       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24923     '
24924     export as_echo_n_body
24925     as_echo_n='sh -c $as_echo_n_body as_echo'
24926   fi
24927   export as_echo_body
24928   as_echo='sh -c $as_echo_body as_echo'
24929 fi
24930
24931 # The user is always right.
24932 if test "${PATH_SEPARATOR+set}" != set; then
24933   PATH_SEPARATOR=:
24934   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24935     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24936       PATH_SEPARATOR=';'
24937   }
24938 fi
24939
24940
24941 # IFS
24942 # We need space, tab and new line, in precisely that order.  Quoting is
24943 # there to prevent editors from complaining about space-tab.
24944 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
24945 # splitting by setting IFS to empty value.)
24946 IFS=" ""        $as_nl"
24947
24948 # Find who we are.  Look in the path if we contain no directory separator.
24949 case $0 in #((
24950   *[\\/]* ) as_myself=$0 ;;
24951   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24952 for as_dir in $PATH
24953 do
24954   IFS=$as_save_IFS
24955   test -z "$as_dir" && as_dir=.
24956     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24957   done
24958 IFS=$as_save_IFS
24959
24960      ;;
24961 esac
24962 # We did not find ourselves, most probably we were run as `sh COMMAND'
24963 # in which case we are not to be found in the path.
24964 if test "x$as_myself" = x; then
24965   as_myself=$0
24966 fi
24967 if test ! -f "$as_myself"; then
24968   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24969   exit 1
24970 fi
24971
24972 # Unset variables that we do not need and which cause bugs (e.g. in
24973 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
24974 # suppresses any "Segmentation fault" message there.  '((' could
24975 # trigger a bug in pdksh 5.2.14.
24976 for as_var in BASH_ENV ENV MAIL MAILPATH
24977 do eval test x\${$as_var+set} = xset \
24978   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24979 done
24980 PS1='$ '
24981 PS2='> '
24982 PS4='+ '
24983
24984 # NLS nuisances.
24985 LC_ALL=C
24986 export LC_ALL
24987 LANGUAGE=C
24988 export LANGUAGE
24989
24990 # CDPATH.
24991 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24992
24993
24994 # as_fn_error ERROR [LINENO LOG_FD]
24995 # ---------------------------------
24996 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24997 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24998 # script with status $?, using 1 if that was 0.
24999 as_fn_error ()
25000 {
25001   as_status=$?; test $as_status -eq 0 && as_status=1
25002   if test "$3"; then
25003     as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25004     $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
25005   fi
25006   $as_echo "$as_me: error: $1" >&2
25007   as_fn_exit $as_status
25008 } # as_fn_error
25009
25010
25011 # as_fn_set_status STATUS
25012 # -----------------------
25013 # Set $? to STATUS, without forking.
25014 as_fn_set_status ()
25015 {
25016   return $1
25017 } # as_fn_set_status
25018
25019 # as_fn_exit STATUS
25020 # -----------------
25021 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25022 as_fn_exit ()
25023 {
25024   set +e
25025   as_fn_set_status $1
25026   exit $1
25027 } # as_fn_exit
25028
25029 # as_fn_unset VAR
25030 # ---------------
25031 # Portably unset VAR.
25032 as_fn_unset ()
25033 {
25034   { eval $1=; unset $1;}
25035 }
25036 as_unset=as_fn_unset
25037 # as_fn_append VAR VALUE
25038 # ----------------------
25039 # Append the text in VALUE to the end of the definition contained in VAR. Take
25040 # advantage of any shell optimizations that allow amortized linear growth over
25041 # repeated appends, instead of the typical quadratic growth present in naive
25042 # implementations.
25043 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25044   eval 'as_fn_append ()
25045   {
25046     eval $1+=\$2
25047   }'
25048 else
25049   as_fn_append ()
25050   {
25051     eval $1=\$$1\$2
25052   }
25053 fi # as_fn_append
25054
25055 # as_fn_arith ARG...
25056 # ------------------
25057 # Perform arithmetic evaluation on the ARGs, and store the result in the
25058 # global $as_val. Take advantage of shells that can avoid forks. The arguments
25059 # must be portable across $(()) and expr.
25060 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25061   eval 'as_fn_arith ()
25062   {
25063     as_val=$(( $* ))
25064   }'
25065 else
25066   as_fn_arith ()
25067   {
25068     as_val=`expr "$@" || test $? -eq 1`
25069   }
25070 fi # as_fn_arith
25071
25072
25073 if expr a : '\(a\)' >/dev/null 2>&1 &&
25074    test "X`expr 00001 : '.*\(...\)'`" = X001; then
25075   as_expr=expr
25076 else
25077   as_expr=false
25078 fi
25079
25080 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25081   as_basename=basename
25082 else
25083   as_basename=false
25084 fi
25085
25086 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25087   as_dirname=dirname
25088 else
25089   as_dirname=false
25090 fi
25091
25092 as_me=`$as_basename -- "$0" ||
25093 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25094          X"$0" : 'X\(//\)$' \| \
25095          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25096 $as_echo X/"$0" |
25097     sed '/^.*\/\([^/][^/]*\)\/*$/{
25098             s//\1/
25099             q
25100           }
25101           /^X\/\(\/\/\)$/{
25102             s//\1/
25103             q
25104           }
25105           /^X\/\(\/\).*/{
25106             s//\1/
25107             q
25108           }
25109           s/.*/./; q'`
25110
25111 # Avoid depending upon Character Ranges.
25112 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25113 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25114 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25115 as_cr_digits='0123456789'
25116 as_cr_alnum=$as_cr_Letters$as_cr_digits
25117
25118 ECHO_C= ECHO_N= ECHO_T=
25119 case `echo -n x` in #(((((
25120 -n*)
25121   case `echo 'xy\c'` in
25122   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
25123   xy)  ECHO_C='\c';;
25124   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
25125        ECHO_T=' ';;
25126   esac;;
25127 *)
25128   ECHO_N='-n';;
25129 esac
25130
25131 rm -f conf$$ conf$$.exe conf$$.file
25132 if test -d conf$$.dir; then
25133   rm -f conf$$.dir/conf$$.file
25134 else
25135   rm -f conf$$.dir
25136   mkdir conf$$.dir 2>/dev/null
25137 fi
25138 if (echo >conf$$.file) 2>/dev/null; then
25139   if ln -s conf$$.file conf$$ 2>/dev/null; then
25140     as_ln_s='ln -s'
25141     # ... but there are two gotchas:
25142     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25143     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25144     # In both cases, we have to default to `cp -p'.
25145     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25146       as_ln_s='cp -p'
25147   elif ln conf$$.file conf$$ 2>/dev/null; then
25148     as_ln_s=ln
25149   else
25150     as_ln_s='cp -p'
25151   fi
25152 else
25153   as_ln_s='cp -p'
25154 fi
25155 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25156 rmdir conf$$.dir 2>/dev/null
25157
25158
25159 # as_fn_mkdir_p
25160 # -------------
25161 # Create "$as_dir" as a directory, including parents if necessary.
25162 as_fn_mkdir_p ()
25163 {
25164
25165   case $as_dir in #(
25166   -*) as_dir=./$as_dir;;
25167   esac
25168   test -d "$as_dir" || eval $as_mkdir_p || {
25169     as_dirs=
25170     while :; do
25171       case $as_dir in #(
25172       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25173       *) as_qdir=$as_dir;;
25174       esac
25175       as_dirs="'$as_qdir' $as_dirs"
25176       as_dir=`$as_dirname -- "$as_dir" ||
25177 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25178          X"$as_dir" : 'X\(//\)[^/]' \| \
25179          X"$as_dir" : 'X\(//\)$' \| \
25180          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25181 $as_echo X"$as_dir" |
25182     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25183             s//\1/
25184             q
25185           }
25186           /^X\(\/\/\)[^/].*/{
25187             s//\1/
25188             q
25189           }
25190           /^X\(\/\/\)$/{
25191             s//\1/
25192             q
25193           }
25194           /^X\(\/\).*/{
25195             s//\1/
25196             q
25197           }
25198           s/.*/./; q'`
25199       test -d "$as_dir" && break
25200     done
25201     test -z "$as_dirs" || eval "mkdir $as_dirs"
25202   } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
25203
25204
25205 } # as_fn_mkdir_p
25206 if mkdir -p . 2>/dev/null; then
25207   as_mkdir_p='mkdir -p "$as_dir"'
25208 else
25209   test -d ./-p && rmdir ./-p
25210   as_mkdir_p=false
25211 fi
25212
25213 if test -x / >/dev/null 2>&1; then
25214   as_test_x='test -x'
25215 else
25216   if ls -dL / >/dev/null 2>&1; then
25217     as_ls_L_option=L
25218   else
25219     as_ls_L_option=
25220   fi
25221   as_test_x='
25222     eval sh -c '\''
25223       if test -d "$1"; then
25224         test -d "$1/.";
25225       else
25226         case $1 in #(
25227         -*)set "./$1";;
25228         esac;
25229         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
25230         ???[sx]*):;;*)false;;esac;fi
25231     '\'' sh
25232   '
25233 fi
25234 as_executable_p=$as_test_x
25235
25236 # Sed expression to map a string onto a valid CPP name.
25237 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25238
25239 # Sed expression to map a string onto a valid variable name.
25240 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25241
25242
25243 exec 6>&1
25244 ## ----------------------------------- ##
25245 ## Main body of $CONFIG_STATUS script. ##
25246 ## ----------------------------------- ##
25247 _ASEOF
25248 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25249
25250 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25251 # Save the log message, to keep $0 and so on meaningful, and to
25252 # report actual input values of CONFIG_FILES etc. instead of their
25253 # values after options handling.
25254 ac_log="
25255 This file was extended by $as_me, which was
25256 generated by GNU Autoconf 2.65.  Invocation command line was
25257
25258   CONFIG_FILES    = $CONFIG_FILES
25259   CONFIG_HEADERS  = $CONFIG_HEADERS
25260   CONFIG_LINKS    = $CONFIG_LINKS
25261   CONFIG_COMMANDS = $CONFIG_COMMANDS
25262   $ $0 $@
25263
25264 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25265 "
25266
25267 _ACEOF
25268
25269 case $ac_config_files in *"
25270 "*) set x $ac_config_files; shift; ac_config_files=$*;;
25271 esac
25272
25273 case $ac_config_headers in *"
25274 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25275 esac
25276
25277
25278 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25279 # Files that config.status was made for.
25280 config_files="$ac_config_files"
25281 config_headers="$ac_config_headers"
25282 config_commands="$ac_config_commands"
25283
25284 _ACEOF
25285
25286 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25287 ac_cs_usage="\
25288 \`$as_me' instantiates files and other configuration actions
25289 from templates according to the current configuration.  Unless the files
25290 and actions are specified as TAGs, all are instantiated by default.
25291
25292 Usage: $0 [OPTION]... [TAG]...
25293
25294   -h, --help       print this help, then exit
25295   -V, --version    print version number and configuration settings, then exit
25296       --config     print configuration, then exit
25297   -q, --quiet, --silent
25298                    do not print progress messages
25299   -d, --debug      don't remove temporary files
25300       --recheck    update $as_me by reconfiguring in the same conditions
25301       --file=FILE[:TEMPLATE]
25302                    instantiate the configuration file FILE
25303       --header=FILE[:TEMPLATE]
25304                    instantiate the configuration header FILE
25305
25306 Configuration files:
25307 $config_files
25308
25309 Configuration headers:
25310 $config_headers
25311
25312 Configuration commands:
25313 $config_commands
25314
25315 Report bugs to <<http://www.openldap.org/its/>>."
25316
25317 _ACEOF
25318 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25319 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
25320 ac_cs_version="\\
25321 config.status
25322 configured by $0, generated by GNU Autoconf 2.65,
25323   with options \\"\$ac_cs_config\\"
25324
25325 Copyright (C) 2009 Free Software Foundation, Inc.
25326 This config.status script is free software; the Free Software Foundation
25327 gives unlimited permission to copy, distribute and modify it."
25328
25329 ac_pwd='$ac_pwd'
25330 srcdir='$srcdir'
25331 INSTALL='$INSTALL'
25332 AWK='$AWK'
25333 test -n "\$AWK" || AWK=awk
25334 _ACEOF
25335
25336 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25337 # The default lists apply if the user does not specify any file.
25338 ac_need_defaults=:
25339 while test $# != 0
25340 do
25341   case $1 in
25342   --*=*)
25343     ac_option=`expr "X$1" : 'X\([^=]*\)='`
25344     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25345     ac_shift=:
25346     ;;
25347   *)
25348     ac_option=$1
25349     ac_optarg=$2
25350     ac_shift=shift
25351     ;;
25352   esac
25353
25354   case $ac_option in
25355   # Handling of the options.
25356   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25357     ac_cs_recheck=: ;;
25358   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25359     $as_echo "$ac_cs_version"; exit ;;
25360   --config | --confi | --conf | --con | --co | --c )
25361     $as_echo "$ac_cs_config"; exit ;;
25362   --debug | --debu | --deb | --de | --d | -d )
25363     debug=: ;;
25364   --file | --fil | --fi | --f )
25365     $ac_shift
25366     case $ac_optarg in
25367     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25368     esac
25369     as_fn_append CONFIG_FILES " '$ac_optarg'"
25370     ac_need_defaults=false;;
25371   --header | --heade | --head | --hea )
25372     $ac_shift
25373     case $ac_optarg in
25374     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25375     esac
25376     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25377     ac_need_defaults=false;;
25378   --he | --h)
25379     # Conflict between --help and --header
25380     as_fn_error "ambiguous option: \`$1'
25381 Try \`$0 --help' for more information.";;
25382   --help | --hel | -h )
25383     $as_echo "$ac_cs_usage"; exit ;;
25384   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25385   | -silent | --silent | --silen | --sile | --sil | --si | --s)
25386     ac_cs_silent=: ;;
25387
25388   # This is an error.
25389   -*) as_fn_error "unrecognized option: \`$1'
25390 Try \`$0 --help' for more information." ;;
25391
25392   *) as_fn_append ac_config_targets " $1"
25393      ac_need_defaults=false ;;
25394
25395   esac
25396   shift
25397 done
25398
25399 ac_configure_extra_args=
25400
25401 if $ac_cs_silent; then
25402   exec 6>/dev/null
25403   ac_configure_extra_args="$ac_configure_extra_args --silent"
25404 fi
25405
25406 _ACEOF
25407 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25408 if \$ac_cs_recheck; then
25409   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25410   shift
25411   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25412   CONFIG_SHELL='$SHELL'
25413   export CONFIG_SHELL
25414   exec "\$@"
25415 fi
25416
25417 _ACEOF
25418 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25419 exec 5>>config.log
25420 {
25421   echo
25422   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25423 ## Running $as_me. ##
25424 _ASBOX
25425   $as_echo "$ac_log"
25426 } >&5
25427
25428 _ACEOF
25429 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25430 #
25431 # INIT-COMMANDS
25432 #
25433 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25434
25435 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25436 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
25437
25438
25439 _ACEOF
25440
25441 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25442
25443 # Handling of arguments.
25444 for ac_config_target in $ac_config_targets
25445 do
25446   case $ac_config_target in
25447     "include/portable.h") CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
25448     "include/ldap_features.h") CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
25449     "include/lber_types.h") CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
25450     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25451     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
25452     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
25453     "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
25454     "doc/man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
25455     "doc/man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
25456     "doc/man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
25457     "doc/man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
25458     "clients/Makefile") CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
25459     "clients/tools/Makefile") CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
25460     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
25461     "libraries/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
25462     "libraries/liblber/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25463     "libraries/libldap/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25464     "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" ;;
25465     "libraries/liblunicode/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25466     "libraries/liblutil/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25467     "libraries/librewrite/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25468     "servers/Makefile") CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
25469     "servers/slapd/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
25470     "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" ;;
25471     "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" ;;
25472     "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" ;;
25473     "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" ;;
25474     "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" ;;
25475     "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" ;;
25476     "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" ;;
25477     "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" ;;
25478     "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" ;;
25479     "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" ;;
25480     "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" ;;
25481     "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" ;;
25482     "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" ;;
25483     "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" ;;
25484     "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" ;;
25485     "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" ;;
25486     "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" ;;
25487     "servers/slapd/overlays/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
25488     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
25489     "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;;
25490     "tests/progs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
25491     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25492
25493   *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25494   esac
25495 done
25496
25497
25498 # If the user did not use the arguments to specify the items to instantiate,
25499 # then the envvar interface is used.  Set only those that are not.
25500 # We use the long form for the default assignment because of an extremely
25501 # bizarre bug on SunOS 4.1.3.
25502 if $ac_need_defaults; then
25503   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25504   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25505   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25506 fi
25507
25508 # Have a temporary directory for convenience.  Make it in the build tree
25509 # simply because there is no reason against having it here, and in addition,
25510 # creating and moving files from /tmp can sometimes cause problems.
25511 # Hook for its removal unless debugging.
25512 # Note that there is a small window in which the directory will not be cleaned:
25513 # after its creation but before its name has been assigned to `$tmp'.
25514 $debug ||
25515 {
25516   tmp=
25517   trap 'exit_status=$?
25518   { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25519 ' 0
25520   trap 'as_fn_exit 1' 1 2 13 15
25521 }
25522 # Create a (secure) tmp directory for tmp files.
25523
25524 {
25525   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25526   test -n "$tmp" && test -d "$tmp"
25527 }  ||
25528 {
25529   tmp=./conf$$-$RANDOM
25530   (umask 077 && mkdir "$tmp")
25531 } || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25532
25533 # Set up the scripts for CONFIG_FILES section.
25534 # No need to generate them if there are no CONFIG_FILES.
25535 # This happens for instance with `./config.status config.h'.
25536 if test -n "$CONFIG_FILES"; then
25537
25538
25539 ac_cr=`echo X | tr X '\015'`
25540 # On cygwin, bash can eat \r inside `` if the user requested igncr.
25541 # But we know of no other shell where ac_cr would be empty at this
25542 # point, so we can use a bashism as a fallback.
25543 if test "x$ac_cr" = x; then
25544   eval ac_cr=\$\'\\r\'
25545 fi
25546 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25547 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25548   ac_cs_awk_cr='\r'
25549 else
25550   ac_cs_awk_cr=$ac_cr
25551 fi
25552
25553 echo 'BEGIN {' >"$tmp/subs1.awk" &&
25554 _ACEOF
25555
25556
25557 {
25558   echo "cat >conf$$subs.awk <<_ACEOF" &&
25559   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25560   echo "_ACEOF"
25561 } >conf$$subs.sh ||
25562   as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25563 ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25564 ac_delim='%!_!# '
25565 for ac_last_try in false false false false false :; do
25566   . ./conf$$subs.sh ||
25567     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25568
25569   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25570   if test $ac_delim_n = $ac_delim_num; then
25571     break
25572   elif $ac_last_try; then
25573     as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25574   else
25575     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25576   fi
25577 done
25578 rm -f conf$$subs.sh
25579
25580 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25581 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
25582 _ACEOF
25583 sed -n '
25584 h
25585 s/^/S["/; s/!.*/"]=/
25586 p
25587 g
25588 s/^[^!]*!//
25589 :repl
25590 t repl
25591 s/'"$ac_delim"'$//
25592 t delim
25593 :nl
25594 h
25595 s/\(.\{148\}\)..*/\1/
25596 t more1
25597 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25598 p
25599 n
25600 b repl
25601 :more1
25602 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25603 p
25604 g
25605 s/.\{148\}//
25606 t nl
25607 :delim
25608 h
25609 s/\(.\{148\}\)..*/\1/
25610 t more2
25611 s/["\\]/\\&/g; s/^/"/; s/$/"/
25612 p
25613 b
25614 :more2
25615 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25616 p
25617 g
25618 s/.\{148\}//
25619 t delim
25620 ' <conf$$subs.awk | sed '
25621 /^[^""]/{
25622   N
25623   s/\n//
25624 }
25625 ' >>$CONFIG_STATUS || ac_write_fail=1
25626 rm -f conf$$subs.awk
25627 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25628 _ACAWK
25629 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
25630   for (key in S) S_is_set[key] = 1
25631   FS = "\a"
25632
25633 }
25634 {
25635   line = $ 0
25636   nfields = split(line, field, "@")
25637   substed = 0
25638   len = length(field[1])
25639   for (i = 2; i < nfields; i++) {
25640     key = field[i]
25641     keylen = length(key)
25642     if (S_is_set[key]) {
25643       value = S[key]
25644       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25645       len += length(value) + length(field[++i])
25646       substed = 1
25647     } else
25648       len += 1 + keylen
25649   }
25650
25651   print line
25652 }
25653
25654 _ACAWK
25655 _ACEOF
25656 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25657 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25658   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25659 else
25660   cat
25661 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25662   || as_fn_error "could not setup config files machinery" "$LINENO" 5
25663 _ACEOF
25664
25665 # VPATH may cause trouble with some makes, so we remove $(srcdir),
25666 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25667 # trailing colons and then remove the whole line if VPATH becomes empty
25668 # (actually we leave an empty line to preserve line numbers).
25669 if test "x$srcdir" = x.; then
25670   ac_vpsub='/^[  ]*VPATH[        ]*=/{
25671 s/:*\$(srcdir):*/:/
25672 s/:*\${srcdir}:*/:/
25673 s/:*@srcdir@:*/:/
25674 s/^\([^=]*=[     ]*\):*/\1/
25675 s/:*$//
25676 s/^[^=]*=[       ]*$//
25677 }'
25678 fi
25679
25680 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25681 fi # test -n "$CONFIG_FILES"
25682
25683 # Set up the scripts for CONFIG_HEADERS section.
25684 # No need to generate them if there are no CONFIG_HEADERS.
25685 # This happens for instance with `./config.status Makefile'.
25686 if test -n "$CONFIG_HEADERS"; then
25687 cat >"$tmp/defines.awk" <<\_ACAWK ||
25688 BEGIN {
25689 _ACEOF
25690
25691 # Transform confdefs.h into an awk script `defines.awk', embedded as
25692 # here-document in config.status, that substitutes the proper values into
25693 # config.h.in to produce config.h.
25694
25695 # Create a delimiter string that does not exist in confdefs.h, to ease
25696 # handling of long lines.
25697 ac_delim='%!_!# '
25698 for ac_last_try in false false :; do
25699   ac_t=`sed -n "/$ac_delim/p" confdefs.h`
25700   if test -z "$ac_t"; then
25701     break
25702   elif $ac_last_try; then
25703     as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
25704   else
25705     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25706   fi
25707 done
25708
25709 # For the awk script, D is an array of macro values keyed by name,
25710 # likewise P contains macro parameters if any.  Preserve backslash
25711 # newline sequences.
25712
25713 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25714 sed -n '
25715 s/.\{148\}/&'"$ac_delim"'/g
25716 t rset
25717 :rset
25718 s/^[     ]*#[    ]*define[       ][      ]*/ /
25719 t def
25720 d
25721 :def
25722 s/\\$//
25723 t bsnl
25724 s/["\\]/\\&/g
25725 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
25726 D["\1"]=" \3"/p
25727 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
25728 d
25729 :bsnl
25730 s/["\\]/\\&/g
25731 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
25732 D["\1"]=" \3\\\\\\n"\\/p
25733 t cont
25734 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25735 t cont
25736 d
25737 :cont
25738 n
25739 s/.\{148\}/&'"$ac_delim"'/g
25740 t clear
25741 :clear
25742 s/\\$//
25743 t bsnlc
25744 s/["\\]/\\&/g; s/^/"/; s/$/"/p
25745 d
25746 :bsnlc
25747 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25748 b cont
25749 ' <confdefs.h | sed '
25750 s/'"$ac_delim"'/"\\\
25751 "/g' >>$CONFIG_STATUS || ac_write_fail=1
25752
25753 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25754   for (key in D) D_is_set[key] = 1
25755   FS = "\a"
25756 }
25757 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25758   line = \$ 0
25759   split(line, arg, " ")
25760   if (arg[1] == "#") {
25761     defundef = arg[2]
25762     mac1 = arg[3]
25763   } else {
25764     defundef = substr(arg[1], 2)
25765     mac1 = arg[2]
25766   }
25767   split(mac1, mac2, "(") #)
25768   macro = mac2[1]
25769   prefix = substr(line, 1, index(line, defundef) - 1)
25770   if (D_is_set[macro]) {
25771     # Preserve the white space surrounding the "#".
25772     print prefix "define", macro P[macro] D[macro]
25773     next
25774   } else {
25775     # Replace #undef with comments.  This is necessary, for example,
25776     # in the case of _POSIX_SOURCE, which is predefined and required
25777     # on some systems where configure will not decide to define it.
25778     if (defundef == "undef") {
25779       print "/*", prefix defundef, macro, "*/"
25780       next
25781     }
25782   }
25783 }
25784 { print }
25785 _ACAWK
25786 _ACEOF
25787 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25788   as_fn_error "could not setup config headers machinery" "$LINENO" 5
25789 fi # test -n "$CONFIG_HEADERS"
25790
25791
25792 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
25793 shift
25794 for ac_tag
25795 do
25796   case $ac_tag in
25797   :[FHLC]) ac_mode=$ac_tag; continue;;
25798   esac
25799   case $ac_mode$ac_tag in
25800   :[FHL]*:*);;
25801   :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
25802   :[FH]-) ac_tag=-:-;;
25803   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25804   esac
25805   ac_save_IFS=$IFS
25806   IFS=:
25807   set x $ac_tag
25808   IFS=$ac_save_IFS
25809   shift
25810   ac_file=$1
25811   shift
25812
25813   case $ac_mode in
25814   :L) ac_source=$1;;
25815   :[FH])
25816     ac_file_inputs=
25817     for ac_f
25818     do
25819       case $ac_f in
25820       -) ac_f="$tmp/stdin";;
25821       *) # Look for the file first in the build tree, then in the source tree
25822          # (if the path is not absolute).  The absolute path cannot be DOS-style,
25823          # because $ac_f cannot contain `:'.
25824          test -f "$ac_f" ||
25825            case $ac_f in
25826            [\\/$]*) false;;
25827            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25828            esac ||
25829            as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25830       esac
25831       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25832       as_fn_append ac_file_inputs " '$ac_f'"
25833     done
25834
25835     # Let's still pretend it is `configure' which instantiates (i.e., don't
25836     # use $as_me), people would be surprised to read:
25837     #    /* config.h.  Generated by config.status.  */
25838     configure_input='Generated from '`
25839           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25840         `' by configure.'
25841     if test x"$ac_file" != x-; then
25842       configure_input="$ac_file.  $configure_input"
25843       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25844 $as_echo "$as_me: creating $ac_file" >&6;}
25845     fi
25846     # Neutralize special characters interpreted by sed in replacement strings.
25847     case $configure_input in #(
25848     *\&* | *\|* | *\\* )
25849        ac_sed_conf_input=`$as_echo "$configure_input" |
25850        sed 's/[\\\\&|]/\\\\&/g'`;; #(
25851     *) ac_sed_conf_input=$configure_input;;
25852     esac
25853
25854     case $ac_tag in
25855     *:-:* | *:-) cat >"$tmp/stdin" \
25856       || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
25857     esac
25858     ;;
25859   esac
25860
25861   ac_dir=`$as_dirname -- "$ac_file" ||
25862 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25863          X"$ac_file" : 'X\(//\)[^/]' \| \
25864          X"$ac_file" : 'X\(//\)$' \| \
25865          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25866 $as_echo X"$ac_file" |
25867     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25868             s//\1/
25869             q
25870           }
25871           /^X\(\/\/\)[^/].*/{
25872             s//\1/
25873             q
25874           }
25875           /^X\(\/\/\)$/{
25876             s//\1/
25877             q
25878           }
25879           /^X\(\/\).*/{
25880             s//\1/
25881             q
25882           }
25883           s/.*/./; q'`
25884   as_dir="$ac_dir"; as_fn_mkdir_p
25885   ac_builddir=.
25886
25887 case "$ac_dir" in
25888 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25889 *)
25890   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25891   # A ".." for each directory in $ac_dir_suffix.
25892   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25893   case $ac_top_builddir_sub in
25894   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25895   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25896   esac ;;
25897 esac
25898 ac_abs_top_builddir=$ac_pwd
25899 ac_abs_builddir=$ac_pwd$ac_dir_suffix
25900 # for backward compatibility:
25901 ac_top_builddir=$ac_top_build_prefix
25902
25903 case $srcdir in
25904   .)  # We are building in place.
25905     ac_srcdir=.
25906     ac_top_srcdir=$ac_top_builddir_sub
25907     ac_abs_top_srcdir=$ac_pwd ;;
25908   [\\/]* | ?:[\\/]* )  # Absolute name.
25909     ac_srcdir=$srcdir$ac_dir_suffix;
25910     ac_top_srcdir=$srcdir
25911     ac_abs_top_srcdir=$srcdir ;;
25912   *) # Relative name.
25913     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25914     ac_top_srcdir=$ac_top_build_prefix$srcdir
25915     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25916 esac
25917 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25918
25919
25920   case $ac_mode in
25921   :F)
25922   #
25923   # CONFIG_FILE
25924   #
25925
25926   case $INSTALL in
25927   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25928   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25929   esac
25930 _ACEOF
25931
25932 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25933 # If the template does not know about datarootdir, expand it.
25934 # FIXME: This hack should be removed a few years after 2.60.
25935 ac_datarootdir_hack=; ac_datarootdir_seen=
25936 ac_sed_dataroot='
25937 /datarootdir/ {
25938   p
25939   q
25940 }
25941 /@datadir@/p
25942 /@docdir@/p
25943 /@infodir@/p
25944 /@localedir@/p
25945 /@mandir@/p'
25946 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25947 *datarootdir*) ac_datarootdir_seen=yes;;
25948 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25949   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25950 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25951 _ACEOF
25952 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25953   ac_datarootdir_hack='
25954   s&@datadir@&$datadir&g
25955   s&@docdir@&$docdir&g
25956   s&@infodir@&$infodir&g
25957   s&@localedir@&$localedir&g
25958   s&@mandir@&$mandir&g
25959   s&\\\${datarootdir}&$datarootdir&g' ;;
25960 esac
25961 _ACEOF
25962
25963 # Neutralize VPATH when `$srcdir' = `.'.
25964 # Shell code in configure.ac might set extrasub.
25965 # FIXME: do we really want to maintain this feature?
25966 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25967 ac_sed_extra="$ac_vpsub
25968 $extrasub
25969 _ACEOF
25970 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25971 :t
25972 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25973 s|@configure_input@|$ac_sed_conf_input|;t t
25974 s&@top_builddir@&$ac_top_builddir_sub&;t t
25975 s&@top_build_prefix@&$ac_top_build_prefix&;t t
25976 s&@srcdir@&$ac_srcdir&;t t
25977 s&@abs_srcdir@&$ac_abs_srcdir&;t t
25978 s&@top_srcdir@&$ac_top_srcdir&;t t
25979 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25980 s&@builddir@&$ac_builddir&;t t
25981 s&@abs_builddir@&$ac_abs_builddir&;t t
25982 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25983 s&@INSTALL@&$ac_INSTALL&;t t
25984 $ac_datarootdir_hack
25985 "
25986 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
25987   || as_fn_error "could not create $ac_file" "$LINENO" 5
25988
25989 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25990   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25991   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25992   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25993 which seems to be undefined.  Please make sure it is defined." >&5
25994 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25995 which seems to be undefined.  Please make sure it is defined." >&2;}
25996
25997   rm -f "$tmp/stdin"
25998   case $ac_file in
25999   -) cat "$tmp/out" && rm -f "$tmp/out";;
26000   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
26001   esac \
26002   || as_fn_error "could not create $ac_file" "$LINENO" 5
26003  ;;
26004   :H)
26005   #
26006   # CONFIG_HEADER
26007   #
26008   if test x"$ac_file" != x-; then
26009     {
26010       $as_echo "/* $configure_input  */" \
26011       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
26012     } >"$tmp/config.h" \
26013       || as_fn_error "could not create $ac_file" "$LINENO" 5
26014     if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
26015       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26016 $as_echo "$as_me: $ac_file is unchanged" >&6;}
26017     else
26018       rm -f "$ac_file"
26019       mv "$tmp/config.h" "$ac_file" \
26020         || as_fn_error "could not create $ac_file" "$LINENO" 5
26021     fi
26022   else
26023     $as_echo "/* $configure_input  */" \
26024       && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
26025       || as_fn_error "could not create -" "$LINENO" 5
26026   fi
26027 # Compute "$ac_file"'s index in $config_headers.
26028 _am_stamp_count=1
26029 for _am_header in $config_headers :; do
26030   case $_am_header in
26031     "$ac_file" | "$ac_file":* )
26032       break ;;
26033     * )
26034       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26035   esac
26036 done
26037 echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
26038 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26039          X"$ac_file" : 'X\(//\)[^/]' \| \
26040          X"$ac_file" : 'X\(//\)$' \| \
26041          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26042 $as_echo X"$ac_file" |
26043     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26044             s//\1/
26045             q
26046           }
26047           /^X\(\/\/\)[^/].*/{
26048             s//\1/
26049             q
26050           }
26051           /^X\(\/\/\)$/{
26052             s//\1/
26053             q
26054           }
26055           /^X\(\/\).*/{
26056             s//\1/
26057             q
26058           }
26059           s/.*/./; q'`/stamp-h$_am_stamp_count
26060  ;;
26061
26062   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26063 $as_echo "$as_me: executing $ac_file commands" >&6;}
26064  ;;
26065   esac
26066
26067
26068   case $ac_file$ac_mode in
26069     "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
26070   # Strip MF so we end up with the name of the file.
26071   mf=`echo "$mf" | sed -e 's/:.*$//'`
26072   # Check whether this is an Automake generated Makefile or not.
26073   # We used to match only the files named `Makefile.in', but
26074   # some people rename them; so instead we look at the file content.
26075   # Grep'ing the first line is not enough: some people post-process
26076   # each Makefile.in and add a new line on top of each file to say so.
26077   # So let's grep whole file.
26078   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
26079     dirpart=`$as_dirname -- "$mf" ||
26080 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26081          X"$mf" : 'X\(//\)[^/]' \| \
26082          X"$mf" : 'X\(//\)$' \| \
26083          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
26084 $as_echo X"$mf" |
26085     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26086             s//\1/
26087             q
26088           }
26089           /^X\(\/\/\)[^/].*/{
26090             s//\1/
26091             q
26092           }
26093           /^X\(\/\/\)$/{
26094             s//\1/
26095             q
26096           }
26097           /^X\(\/\).*/{
26098             s//\1/
26099             q
26100           }
26101           s/.*/./; q'`
26102   else
26103     continue
26104   fi
26105   # Extract the definition of DEPDIR, am__include, and am__quote
26106   # from the Makefile without running `make'.
26107   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
26108   test -z "$DEPDIR" && continue
26109   am__include=`sed -n 's/^am__include = //p' < "$mf"`
26110   test -z "am__include" && continue
26111   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
26112   # When using ansi2knr, U may be empty or an underscore; expand it
26113   U=`sed -n 's/^U = //p' < "$mf"`
26114   # Find all dependency output files, they are included files with
26115   # $(DEPDIR) in their names.  We invoke sed twice because it is the
26116   # simplest approach to changing $(DEPDIR) to its actual value in the
26117   # expansion.
26118   for file in `sed -n "
26119     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
26120        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
26121     # Make sure the directory exists.
26122     test -f "$dirpart/$file" && continue
26123     fdir=`$as_dirname -- "$file" ||
26124 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26125          X"$file" : 'X\(//\)[^/]' \| \
26126          X"$file" : 'X\(//\)$' \| \
26127          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
26128 $as_echo X"$file" |
26129     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26130             s//\1/
26131             q
26132           }
26133           /^X\(\/\/\)[^/].*/{
26134             s//\1/
26135             q
26136           }
26137           /^X\(\/\/\)$/{
26138             s//\1/
26139             q
26140           }
26141           /^X\(\/\).*/{
26142             s//\1/
26143             q
26144           }
26145           s/.*/./; q'`
26146     as_dir=$dirpart/$fdir; as_fn_mkdir_p
26147     # echo "creating $dirpart/$file"
26148     echo '# dummy' > "$dirpart/$file"
26149   done
26150 done
26151  ;;
26152     "default":C)
26153 chmod +x tests/run
26154 date > stamp-h
26155 BACKENDSC="servers/slapd/backends.c"
26156 echo "Making $BACKENDSC"
26157 rm -f $BACKENDSC
26158 cat > $BACKENDSC << ENDX
26159 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26160  *
26161  * Copyright 1998-2011 The OpenLDAP Foundation.
26162  * All rights reserved.
26163  *
26164  * Redistribution and use in source and binary forms, with or without
26165  * modification, are permitted only as authorized by the OpenLDAP
26166  * Public License.
26167  *
26168  * A copy of this license is available in the file LICENSE in the
26169  * top-level directory of the distribution or, alternatively, at
26170  * <http://www.OpenLDAP.org/license.html>.
26171  */
26172 /* This file is automatically generated by configure; please do not edit. */
26173
26174 #include "portable.h"
26175 #include "slap.h"
26176
26177 ENDX
26178 if test "${STATIC_BACKENDS}"; then
26179         for b in config ${STATIC_BACKENDS}; do
26180                 bb=`echo "${b}" | sed -e 's/back-//'`
26181                 cat >> $BACKENDSC << ENDX
26182 extern BI_init ${bb}_back_initialize;
26183 ENDX
26184         done
26185
26186         cat >> $BACKENDSC << ENDX
26187
26188 BackendInfo slap_binfo[] = {
26189 ENDX
26190
26191         for b in config ${STATIC_BACKENDS}; do
26192                 bb=`echo "${b}" | sed -e 's/back-//'`
26193                 echo "    Add ${bb} ..."
26194                 cat >> $BACKENDSC << ENDX
26195         { "${bb}", ${bb}_back_initialize },
26196 ENDX
26197         done
26198
26199         cat >> $BACKENDSC << ENDX
26200         { NULL, NULL },
26201 };
26202
26203 /* end of generated file */
26204 ENDX
26205 fi
26206 OVERLAYSC="servers/slapd/overlays/statover.c"
26207 echo "Making $OVERLAYSC"
26208 rm -f $OVERLAYSC
26209 cat > $OVERLAYSC << ENDX
26210 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26211  *
26212  * Copyright 1998-2011 The OpenLDAP Foundation.
26213  * All rights reserved.
26214  *
26215  * Redistribution and use in source and binary forms, with or without
26216  * modification, are permitted only as authorized by the OpenLDAP
26217  * Public License.
26218  *
26219  * A copy of this license is available in the file LICENSE in the
26220  * top-level directory of the distribution or, alternatively, at
26221  * <http://www.OpenLDAP.org/license.html>.
26222  */
26223 /* This file is automatically generated by configure; please do not edit. */
26224
26225 #include "portable.h"
26226 #include "slap.h"
26227
26228 ENDX
26229 if test "${STATIC_OVERLAYS}"; then
26230         for o in ${STATIC_OVERLAYS}; do
26231                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26232                 cat >> $OVERLAYSC << ENDX
26233 extern OV_init ${oo}_initialize;
26234 ENDX
26235         done
26236 fi
26237
26238 cat >> $OVERLAYSC << ENDX
26239
26240 OverlayInit slap_oinfo[] = {
26241 ENDX
26242
26243 if test "${STATIC_OVERLAYS}"; then
26244         for o in ${STATIC_OVERLAYS}; do
26245                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26246                 echo "    Add ${oo} ..."
26247                 cat >> $OVERLAYSC << ENDX
26248         { "${oo}", ${oo}_initialize },
26249 ENDX
26250         done
26251 fi
26252
26253         cat >> $OVERLAYSC << ENDX
26254         { NULL, NULL },
26255 };
26256
26257 /* end of generated file */
26258 ENDX
26259
26260 if test "${ol_cv_mkdep}" = no; then
26261         echo '(Do not "make depend"; we do not know how to build dependencies)'
26262 else
26263         echo 'Please run "make depend" to build dependencies'
26264 fi
26265  ;;
26266
26267   esac
26268 done # for ac_tag
26269
26270
26271 as_fn_exit 0
26272 _ACEOF
26273 ac_clean_files=$ac_clean_files_save
26274
26275 test $ac_write_fail = 0 ||
26276   as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
26277
26278
26279 # configure is writing to config.log, and then calls config.status.
26280 # config.status does its own redirection, appending to config.log.
26281 # Unfortunately, on DOS this fails, as config.log is still kept open
26282 # by configure, so config.status won't be able to write to it; its
26283 # output is simply discarded.  So we exec the FD to /dev/null,
26284 # effectively closing config.log, so it can be properly (re)opened and
26285 # appended to by config.status.  When coming back to configure, we
26286 # need to make the FD available again.
26287 if test "$no_create" != yes; then
26288   ac_cs_success=:
26289   ac_config_status_args=
26290   test "$silent" = yes &&
26291     ac_config_status_args="$ac_config_status_args --quiet"
26292   exec 5>/dev/null
26293   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26294   exec 5>>config.log
26295   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26296   # would make configure fail if this is the last instruction.
26297   $ac_cs_success || as_fn_exit $?
26298 fi
26299 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26300   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26301 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26302 fi
26303