]> git.sur5r.net Git - openldap/blob - configure
ITS#7877 regenerate configure
[openldap] / configure
1 #! /bin/sh
2 # From configure.in Id: 81bd528fb5194c83d688db355737b7715448b958 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.69.
5 #
6 # Copyright 1998-2014 The OpenLDAP Foundation. All rights reserved.
7 # Restrictions apply, see COPYRIGHT and LICENSE files.
8 #
9 #
10 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 #
12 #
13 # This configure script is free software; the Free Software Foundation
14 # gives unlimited permission to copy, distribute and modify it.
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22   emulate sh
23   NULLCMD=:
24   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25   # is contrary to our usage.  Disable this feature.
26   alias -g '${1+"$@"}'='"$@"'
27   setopt NO_GLOB_SUBST
28 else
29   case `(set -o) 2>/dev/null` in #(
30   *posix*) :
31     set -o posix ;; #(
32   *) :
33      ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49   as_echo='print -r --'
50   as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52   as_echo='printf %s\n'
53   as_echo_n='printf %s'
54 else
55   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57     as_echo_n='/usr/ucb/echo -n'
58   else
59     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60     as_echo_n_body='eval
61       arg=$1;
62       case $arg in #(
63       *"$as_nl"*)
64         expr "X$arg" : "X\\(.*\\)$as_nl";
65         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66       esac;
67       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68     '
69     export as_echo_n_body
70     as_echo_n='sh -c $as_echo_n_body as_echo'
71   fi
72   export as_echo_body
73   as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78   PATH_SEPARATOR=:
79   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81       PATH_SEPARATOR=';'
82   }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order.  Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" ""        $as_nl"
92
93 # Find who we are.  Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96   *[\\/]* ) as_myself=$0 ;;
97   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100   IFS=$as_save_IFS
101   test -z "$as_dir" && as_dir=.
102     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103   done
104 IFS=$as_save_IFS
105
106      ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111   as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115   exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there.  '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 # Use a proper internal environment variable to ensure we don't fall
140   # into an infinite loop, continuously re-executing ourselves.
141   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142     _as_can_reexec=no; export _as_can_reexec;
143     # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151   *v*x* | *x*v* ) as_opts=-vx ;;
152   *v* ) as_opts=-v ;;
153   *x* ) as_opts=-x ;;
154   * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
161   fi
162   # We don't want this to propagate to other subprocesses.
163           { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166   emulate sh
167   NULLCMD=:
168   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169   # is contrary to our usage.  Disable this feature.
170   alias -g '\${1+\"\$@\"}'='\"\$@\"'
171   setopt NO_GLOB_SUBST
172 else
173   case \`(set -o) 2>/dev/null\` in #(
174   *posix*) :
175     set -o posix ;; #(
176   *) :
177      ;;
178 esac
179 fi
180 "
181   as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
186
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194 else
195   exitcode=1; echo positional parameters were not saved.
196 fi
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204   if (eval "$as_required") 2>/dev/null; then :
205   as_have_required=yes
206 else
207   as_have_required=no
208 fi
209   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211 else
212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 do
216   IFS=$as_save_IFS
217   test -z "$as_dir" && as_dir=.
218   as_found=:
219   case $as_dir in #(
220          /*)
221            for as_base in sh bash ksh sh5; do
222              # Try only shells that exist, to save several forks.
223              as_shell=$as_dir/$as_base
224              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226   CONFIG_SHELL=$as_shell as_have_required=yes
227                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228   break 2
229 fi
230 fi
231            done;;
232        esac
233   as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237   CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
240
241
242       if test "x$CONFIG_SHELL" != x; then :
243   export CONFIG_SHELL
244              # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252   *v*x* | *x*v* ) as_opts=-vx ;;
253   *v* ) as_opts=-v ;;
254   *x* ) as_opts=-x ;;
255   * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
262 fi
263
264     if test x$as_have_required = xno; then :
265   $as_echo "$0: This script requires a shell more modern than all"
266   $as_echo "$0: the shells that I found on your system."
267   if test x${ZSH_VERSION+set} = xset ; then
268     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270   else
271     $as_echo "$0: Please tell bug-autoconf@gnu.org and
272 $0: <http://www.openldap.org/its/> about your system,
273 $0: including any error possibly output before this
274 $0: message. Then install a modern shell, or manually run
275 $0: the script under such a shell if you do have one."
276   fi
277   exit 1
278 fi
279 fi
280 fi
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
286
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
294 {
295   { eval $1=; unset $1;}
296 }
297 as_unset=as_fn_unset
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304   return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312   set +e
313   as_fn_set_status $1
314   exit $1
315 } # as_fn_exit
316
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
321 {
322
323   case $as_dir in #(
324   -*) as_dir=./$as_dir;;
325   esac
326   test -d "$as_dir" || eval $as_mkdir_p || {
327     as_dirs=
328     while :; do
329       case $as_dir in #(
330       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331       *) as_qdir=$as_dir;;
332       esac
333       as_dirs="'$as_qdir' $as_dirs"
334       as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336          X"$as_dir" : 'X\(//\)[^/]' \| \
337          X"$as_dir" : 'X\(//\)$' \| \
338          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341             s//\1/
342             q
343           }
344           /^X\(\/\/\)[^/].*/{
345             s//\1/
346             q
347           }
348           /^X\(\/\/\)$/{
349             s//\1/
350             q
351           }
352           /^X\(\/\).*/{
353             s//\1/
354             q
355           }
356           s/.*/./; q'`
357       test -d "$as_dir" && break
358     done
359     test -z "$as_dirs" || eval "mkdir $as_dirs"
360   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363 } # as_fn_mkdir_p
364
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
369 {
370   test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379   eval 'as_fn_append ()
380   {
381     eval $1+=\$2
382   }'
383 else
384   as_fn_append ()
385   {
386     eval $1=\$$1\$2
387   }
388 fi # as_fn_append
389
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396   eval 'as_fn_arith ()
397   {
398     as_val=$(( $* ))
399   }'
400 else
401   as_fn_arith ()
402   {
403     as_val=`expr "$@" || test $? -eq 1`
404   }
405 fi # as_fn_arith
406
407
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
414 {
415   as_status=$1; test $as_status -eq 0 && as_status=1
416   if test "$4"; then
417     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419   fi
420   $as_echo "$as_me: error: $2" >&2
421   as_fn_exit $as_status
422 } # as_fn_error
423
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425    test "X`expr 00001 : '.*\(...\)'`" = X001; then
426   as_expr=expr
427 else
428   as_expr=false
429 fi
430
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432   as_basename=basename
433 else
434   as_basename=false
435 fi
436
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438   as_dirname=dirname
439 else
440   as_dirname=false
441 fi
442
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445          X"$0" : 'X\(//\)$' \| \
446          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448     sed '/^.*\/\([^/][^/]*\)\/*$/{
449             s//\1/
450             q
451           }
452           /^X\/\(\/\/\)$/{
453             s//\1/
454             q
455           }
456           /^X\/\(\/\).*/{
457             s//\1/
458             q
459           }
460           s/.*/./; q'`
461
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
468
469
470   as_lineno_1=$LINENO as_lineno_1a=$LINENO
471   as_lineno_2=$LINENO as_lineno_2a=$LINENO
472   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
475   sed -n '
476     p
477     /[$]LINENO/=
478   ' <$as_myself |
479     sed '
480       s/[$]LINENO.*/&-/
481       t lineno
482       b
483       :lineno
484       N
485       :loop
486       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487       t loop
488       s/-\n.*//
489     ' >$as_me.lineno &&
490   chmod +x "$as_me.lineno" ||
491     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
492
493   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494   # already done that, so ensure we don't try to do so again and fall
495   # in an infinite loop.  This has already happened in practice.
496   _as_can_reexec=no; export _as_can_reexec
497   # Don't try to exec as it changes $[0], causing all sort of problems
498   # (the dirname of $[0] is not the place where we might find the
499   # original and so on.  Autoconf is especially sensitive to this).
500   . "./$as_me.lineno"
501   # Exit status is that of the last command.
502   exit
503 }
504
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508   case `echo 'xy\c'` in
509   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
510   xy)  ECHO_C='\c';;
511   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
512        ECHO_T=' ';;
513   esac;;
514 *)
515   ECHO_N='-n';;
516 esac
517
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520   rm -f conf$$.dir/conf$$.file
521 else
522   rm -f conf$$.dir
523   mkdir conf$$.dir 2>/dev/null
524 fi
525 if (echo >conf$$.file) 2>/dev/null; then
526   if ln -s conf$$.file conf$$ 2>/dev/null; then
527     as_ln_s='ln -s'
528     # ... but there are two gotchas:
529     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531     # In both cases, we have to default to `cp -pR'.
532     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533       as_ln_s='cp -pR'
534   elif ln conf$$.file conf$$ 2>/dev/null; then
535     as_ln_s=ln
536   else
537     as_ln_s='cp -pR'
538   fi
539 else
540   as_ln_s='cp -pR'
541 fi
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
544
545 if mkdir -p . 2>/dev/null; then
546   as_mkdir_p='mkdir -p "$as_dir"'
547 else
548   test -d ./-p && rmdir ./-p
549   as_mkdir_p=false
550 fi
551
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
554
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
562
563 # Check that we are running under the correct shell.
564 SHELL=${CONFIG_SHELL-/bin/sh}
565
566 case X$ECHO in
567 X*--fallback-echo)
568   # Remove one level of quotation (which was required for Make).
569   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
570   ;;
571 esac
572
573 echo=${ECHO-echo}
574 if test "X$1" = X--no-reexec; then
575   # Discard the --no-reexec flag, and continue.
576   shift
577 elif test "X$1" = X--fallback-echo; then
578   # Avoid inline document here, it may be left over
579   :
580 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
581   # Yippee, $echo works!
582   :
583 else
584   # Restart under the correct shell.
585   exec $SHELL "$0" --no-reexec ${1+"$@"}
586 fi
587
588 if test "X$1" = X--fallback-echo; then
589   # used as fallback echo
590   shift
591   cat <<EOF
592 $*
593 EOF
594   exit 0
595 fi
596
597 # The HP-UX ksh and POSIX shell print the target directory to stdout
598 # if CDPATH is set.
599 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
600
601 if test -z "$ECHO"; then
602 if test "X${echo_test_string+set}" != Xset; then
603 # find a string as large as possible, as long as the shell can cope with it
604   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
605     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
606     if (echo_test_string=`eval $cmd`) 2>/dev/null &&
607        echo_test_string=`eval $cmd` &&
608        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
609     then
610       break
611     fi
612   done
613 fi
614
615 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
616    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
617    test "X$echo_testing_string" = "X$echo_test_string"; then
618   :
619 else
620   # The Solaris, AIX, and Digital Unix default echo programs unquote
621   # backslashes.  This makes it impossible to quote backslashes using
622   #   echo "$something" | sed 's/\\/\\\\/g'
623   #
624   # So, first we look for a working echo in the user's PATH.
625
626   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
627   for dir in $PATH /usr/ucb; do
628     IFS="$lt_save_ifs"
629     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
630        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
631        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
632        test "X$echo_testing_string" = "X$echo_test_string"; then
633       echo="$dir/echo"
634       break
635     fi
636   done
637   IFS="$lt_save_ifs"
638
639   if test "X$echo" = Xecho; then
640     # We didn't find a better echo, so look for alternatives.
641     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
642        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
643        test "X$echo_testing_string" = "X$echo_test_string"; then
644       # This shell has a builtin print -r that does the trick.
645       echo='print -r'
646     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
647          test "X$CONFIG_SHELL" != X/bin/ksh; then
648       # If we have ksh, try running configure again with it.
649       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
650       export ORIGINAL_CONFIG_SHELL
651       CONFIG_SHELL=/bin/ksh
652       export CONFIG_SHELL
653       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
654     else
655       # Try using printf.
656       echo='printf %s\n'
657       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
658          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
659          test "X$echo_testing_string" = "X$echo_test_string"; then
660         # Cool, printf works
661         :
662       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
663            test "X$echo_testing_string" = 'X\t' &&
664            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
665            test "X$echo_testing_string" = "X$echo_test_string"; then
666         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
667         export CONFIG_SHELL
668         SHELL="$CONFIG_SHELL"
669         export SHELL
670         echo="$CONFIG_SHELL $0 --fallback-echo"
671       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
672            test "X$echo_testing_string" = 'X\t' &&
673            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
674            test "X$echo_testing_string" = "X$echo_test_string"; then
675         echo="$CONFIG_SHELL $0 --fallback-echo"
676       else
677         # maybe with a smaller string...
678         prev=:
679
680         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
681           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
682           then
683             break
684           fi
685           prev="$cmd"
686         done
687
688         if test "$prev" != 'sed 50q "$0"'; then
689           echo_test_string=`eval $prev`
690           export echo_test_string
691           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
692         else
693           # Oops.  We lost completely, so just stick with echo.
694           echo=echo
695         fi
696       fi
697     fi
698   fi
699 fi
700 fi
701
702 # Copy echo and quote the copy suitably for passing to libtool from
703 # the Makefile, instead of quoting the original, which is used later.
704 ECHO=$echo
705 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
706    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
707 fi
708
709
710
711
712 test -n "$DJDIR" || exec 7<&0 </dev/null
713 exec 6>&1
714
715 # Name of the host.
716 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
717 # so uname gets run too.
718 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
719
720 #
721 # Initializations.
722 #
723 ac_default_prefix=/usr/local
724 ac_clean_files=
725 ac_config_libobj_dir=.
726 LIBOBJS=
727 cross_compiling=no
728 subdirs=
729 MFLAGS=
730 MAKEFLAGS=
731
732 # Identity of this package.
733 PACKAGE_NAME=
734 PACKAGE_TARNAME=
735 PACKAGE_VERSION=
736 PACKAGE_STRING=
737 PACKAGE_BUGREPORT=
738 PACKAGE_URL=
739
740 ac_unique_file="OpenLDAP"
741 ac_unique_file="build/version.sh"
742 ac_default_prefix=/usr/local
743 # Factoring default headers for most tests.
744 ac_includes_default="\
745 #include <stdio.h>
746 #ifdef HAVE_SYS_TYPES_H
747 # include <sys/types.h>
748 #endif
749 #ifdef HAVE_SYS_STAT_H
750 # include <sys/stat.h>
751 #endif
752 #ifdef STDC_HEADERS
753 # include <stdlib.h>
754 # include <stddef.h>
755 #else
756 # ifdef HAVE_STDLIB_H
757 #  include <stdlib.h>
758 # endif
759 #endif
760 #ifdef HAVE_STRING_H
761 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
762 #  include <memory.h>
763 # endif
764 # include <string.h>
765 #endif
766 #ifdef HAVE_STRINGS_H
767 # include <strings.h>
768 #endif
769 #ifdef HAVE_INTTYPES_H
770 # include <inttypes.h>
771 #endif
772 #ifdef HAVE_STDINT_H
773 # include <stdint.h>
774 #endif
775 #ifdef HAVE_UNISTD_H
776 # include <unistd.h>
777 #endif"
778
779 ac_subst_vars='LTLIBOBJS
780 SLAPD_SQL_INCLUDES
781 SLAPD_SQL_LIBS
782 SLAPD_SQL_LDFLAGS
783 SLAPD_GMP_LIBS
784 SLAPD_SLP_LIBS
785 ICU_LIBS
786 AUTH_LIBS
787 LIBSLAPI
788 SLAPI_LIBS
789 MODULES_LIBS
790 TLS_LIBS
791 SASL_LIBS
792 KRB5_LIBS
793 KRB4_LIBS
794 MOD_PERL_LDFLAGS
795 SLAPD_PERL_LDFLAGS
796 PERL_CPPFLAGS
797 SLAPD_DYNAMIC_OVERLAYS
798 SLAPD_STATIC_OVERLAYS
799 SLAPD_DYNAMIC_BACKENDS
800 SLAPD_STATIC_BACKENDS
801 SLAPD_NO_STATIC
802 SLAPD_MODULES_LDFLAGS
803 SLAPD_MODULES_CPPFLAGS
804 WRAP_LIBS
805 LUTIL_LIBS
806 LTHREAD_LIBS
807 SLAPD_NDB_INCS
808 SLAPD_NDB_LIBS
809 BDB_LIBS
810 SLAPD_LIBS
811 LDAP_LIBS
812 BUILD_VALSORT
813 BUILD_UNIQUE
814 BUILD_TRANSLUCENT
815 BUILD_SYNCPROV
816 BUILD_SSSVLV
817 BUILD_SEQMOD
818 BUILD_RWM
819 BUILD_RETCODE
820 BUILD_REFINT
821 BUILD_PROXYCACHE
822 BUILD_PPOLICY
823 BUILD_MEMBEROF
824 BUILD_LASTMOD
825 BUILD_DYNLIST
826 BUILD_DYNGROUP
827 BUILD_DEREF
828 BUILD_DENYOP
829 BUILD_DDS
830 BUILD_CONSTRAINT
831 BUILD_COLLECT
832 BUILD_AUDITLOG
833 BUILD_ACCESSLOG
834 BUILD_SQL
835 BUILD_SOCK
836 BUILD_SHELL
837 BUILD_PERL
838 BUILD_RELAY
839 BUILD_PASSWD
840 BUILD_NULL
841 BUILD_NDB
842 BUILD_MONITOR
843 BUILD_META
844 BUILD_MDB
845 BUILD_LDAP
846 BUILD_HDB
847 BUILD_DNSSRV
848 BUILD_BDB
849 SLAPD_SLAPI_DEPEND
850 BUILD_SLAPI
851 BUILD_SLAPD
852 BUILD_LIBS_DYNAMIC
853 BUILD_THREAD
854 WITH_ACI_ENABLED
855 WITH_MODULES_ENABLED
856 WITH_TLS
857 WITH_SASL
858 PLAT
859 LIBSRCS
860 LIBOBJS
861 MYSQL
862 LTSTATIC
863 OL_MKDEP_FLAGS
864 OL_MKDEP
865 PERLBIN
866 LIBTOOL
867 CPP
868 OBJDUMP
869 AS
870 DLLTOOL
871 RANLIB
872 ECHO
873 LN_S
874 EGREP
875 GREP
876 am__fastdepCC_FALSE
877 am__fastdepCC_TRUE
878 CCDEPMODE
879 AMDEPBACKSLASH
880 AMDEP_FALSE
881 AMDEP_TRUE
882 am__quote
883 am__include
884 DEPDIR
885 OBJEXT
886 EXEEXT
887 ac_ct_CC
888 CPPFLAGS
889 LDFLAGS
890 CFLAGS
891 AR
892 CC
893 ldap_subdir
894 top_builddir
895 OPENLDAP_RELEASE_DATE
896 OPENLDAP_LIBVERSION
897 OPENLDAP_LIBRELEASE
898 am__untar
899 am__tar
900 AMTAR
901 am__leading_dot
902 SET_MAKE
903 AWK
904 mkdir_p
905 INSTALL_STRIP_PROGRAM
906 STRIP
907 install_sh
908 MAKEINFO
909 AUTOHEADER
910 AUTOMAKE
911 AUTOCONF
912 ACLOCAL
913 VERSION
914 PACKAGE
915 CYGPATH_W
916 INSTALL_DATA
917 INSTALL_SCRIPT
918 INSTALL_PROGRAM
919 target_os
920 target_vendor
921 target_cpu
922 target
923 host_os
924 host_vendor
925 host_cpu
926 host
927 build_os
928 build_vendor
929 build_cpu
930 build
931 target_alias
932 host_alias
933 build_alias
934 LIBS
935 ECHO_T
936 ECHO_N
937 ECHO_C
938 DEFS
939 mandir
940 localedir
941 libdir
942 psdir
943 pdfdir
944 dvidir
945 htmldir
946 infodir
947 docdir
948 oldincludedir
949 includedir
950 localstatedir
951 sharedstatedir
952 sysconfdir
953 datadir
954 datarootdir
955 libexecdir
956 sbindir
957 bindir
958 program_transform_name
959 prefix
960 exec_prefix
961 PACKAGE_URL
962 PACKAGE_BUGREPORT
963 PACKAGE_STRING
964 PACKAGE_VERSION
965 PACKAGE_TARNAME
966 PACKAGE_NAME
967 PATH_SEPARATOR
968 SHELL'
969 ac_subst_files=''
970 ac_user_opts='
971 enable_option_checking
972 with_subdir
973 enable_debug
974 enable_dynamic
975 enable_syslog
976 enable_proctitle
977 enable_ipv6
978 enable_local
979 with_cyrus_sasl
980 with_fetch
981 with_threads
982 with_tls
983 with_yielding_select
984 with_mp
985 with_odbc
986 enable_xxslapdoptions
987 enable_slapd
988 enable_dynacl
989 enable_aci
990 enable_cleartext
991 enable_crypt
992 enable_lmpasswd
993 enable_spasswd
994 enable_modules
995 enable_rewrite
996 enable_rlookups
997 enable_slapi
998 enable_slp
999 enable_wrappers
1000 enable_xxslapbackends
1001 enable_backends
1002 enable_bdb
1003 enable_dnssrv
1004 enable_hdb
1005 enable_ldap
1006 enable_mdb
1007 enable_meta
1008 enable_monitor
1009 enable_ndb
1010 enable_null
1011 enable_passwd
1012 enable_perl
1013 enable_relay
1014 enable_shell
1015 enable_sock
1016 enable_sql
1017 enable_xxslapoverlays
1018 enable_overlays
1019 enable_accesslog
1020 enable_auditlog
1021 enable_collect
1022 enable_constraint
1023 enable_dds
1024 enable_deref
1025 enable_dyngroup
1026 enable_dynlist
1027 enable_memberof
1028 enable_ppolicy
1029 enable_proxycache
1030 enable_refint
1031 enable_retcode
1032 enable_rwm
1033 enable_seqmod
1034 enable_sssvlv
1035 enable_syncprov
1036 enable_translucent
1037 enable_unique
1038 enable_valsort
1039 enable_xxliboptions
1040 enable_static
1041 enable_shared
1042 enable_fast_install
1043 enable_dependency_tracking
1044 with_gnu_ld
1045 enable_libtool_lock
1046 with_pic
1047 with_tags
1048 with_xxinstall
1049 '
1050       ac_precious_vars='build_alias
1051 host_alias
1052 target_alias
1053 CC
1054 CFLAGS
1055 LDFLAGS
1056 LIBS
1057 CPPFLAGS
1058 CPP'
1059
1060
1061 # Initialize some variables set by options.
1062 ac_init_help=
1063 ac_init_version=false
1064 ac_unrecognized_opts=
1065 ac_unrecognized_sep=
1066 # The variables have the same names as the options, with
1067 # dashes changed to underlines.
1068 cache_file=/dev/null
1069 exec_prefix=NONE
1070 no_create=
1071 no_recursion=
1072 prefix=NONE
1073 program_prefix=NONE
1074 program_suffix=NONE
1075 program_transform_name=s,x,x,
1076 silent=
1077 site=
1078 srcdir=
1079 verbose=
1080 x_includes=NONE
1081 x_libraries=NONE
1082
1083 # Installation directory options.
1084 # These are left unexpanded so users can "make install exec_prefix=/foo"
1085 # and all the variables that are supposed to be based on exec_prefix
1086 # by default will actually change.
1087 # Use braces instead of parens because sh, perl, etc. also accept them.
1088 # (The list follows the same order as the GNU Coding Standards.)
1089 bindir='${exec_prefix}/bin'
1090 sbindir='${exec_prefix}/sbin'
1091 libexecdir='${exec_prefix}/libexec'
1092 datarootdir='${prefix}/share'
1093 datadir='${datarootdir}'
1094 sysconfdir='${prefix}/etc'
1095 sharedstatedir='${prefix}/com'
1096 localstatedir='${prefix}/var'
1097 includedir='${prefix}/include'
1098 oldincludedir='/usr/include'
1099 docdir='${datarootdir}/doc/${PACKAGE}'
1100 infodir='${datarootdir}/info'
1101 htmldir='${docdir}'
1102 dvidir='${docdir}'
1103 pdfdir='${docdir}'
1104 psdir='${docdir}'
1105 libdir='${exec_prefix}/lib'
1106 localedir='${datarootdir}/locale'
1107 mandir='${datarootdir}/man'
1108
1109 ac_prev=
1110 ac_dashdash=
1111 for ac_option
1112 do
1113   # If the previous option needs an argument, assign it.
1114   if test -n "$ac_prev"; then
1115     eval $ac_prev=\$ac_option
1116     ac_prev=
1117     continue
1118   fi
1119
1120   case $ac_option in
1121   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1122   *=)   ac_optarg= ;;
1123   *)    ac_optarg=yes ;;
1124   esac
1125
1126   # Accept the important Cygnus configure options, so we can diagnose typos.
1127
1128   case $ac_dashdash$ac_option in
1129   --)
1130     ac_dashdash=yes ;;
1131
1132   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1133     ac_prev=bindir ;;
1134   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1135     bindir=$ac_optarg ;;
1136
1137   -build | --build | --buil | --bui | --bu)
1138     ac_prev=build_alias ;;
1139   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1140     build_alias=$ac_optarg ;;
1141
1142   -cache-file | --cache-file | --cache-fil | --cache-fi \
1143   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1144     ac_prev=cache_file ;;
1145   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1146   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1147     cache_file=$ac_optarg ;;
1148
1149   --config-cache | -C)
1150     cache_file=config.cache ;;
1151
1152   -datadir | --datadir | --datadi | --datad)
1153     ac_prev=datadir ;;
1154   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1155     datadir=$ac_optarg ;;
1156
1157   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1158   | --dataroo | --dataro | --datar)
1159     ac_prev=datarootdir ;;
1160   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1161   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1162     datarootdir=$ac_optarg ;;
1163
1164   -disable-* | --disable-*)
1165     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1166     # Reject names that are not valid shell variable names.
1167     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1168       as_fn_error $? "invalid feature name: $ac_useropt"
1169     ac_useropt_orig=$ac_useropt
1170     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171     case $ac_user_opts in
1172       *"
1173 "enable_$ac_useropt"
1174 "*) ;;
1175       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1176          ac_unrecognized_sep=', ';;
1177     esac
1178     eval enable_$ac_useropt=no ;;
1179
1180   -docdir | --docdir | --docdi | --doc | --do)
1181     ac_prev=docdir ;;
1182   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1183     docdir=$ac_optarg ;;
1184
1185   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1186     ac_prev=dvidir ;;
1187   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1188     dvidir=$ac_optarg ;;
1189
1190   -enable-* | --enable-*)
1191     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1192     # Reject names that are not valid shell variable names.
1193     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1194       as_fn_error $? "invalid feature name: $ac_useropt"
1195     ac_useropt_orig=$ac_useropt
1196     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1197     case $ac_user_opts in
1198       *"
1199 "enable_$ac_useropt"
1200 "*) ;;
1201       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1202          ac_unrecognized_sep=', ';;
1203     esac
1204     eval enable_$ac_useropt=\$ac_optarg ;;
1205
1206   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1207   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1208   | --exec | --exe | --ex)
1209     ac_prev=exec_prefix ;;
1210   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1211   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1212   | --exec=* | --exe=* | --ex=*)
1213     exec_prefix=$ac_optarg ;;
1214
1215   -gas | --gas | --ga | --g)
1216     # Obsolete; use --with-gas.
1217     with_gas=yes ;;
1218
1219   -help | --help | --hel | --he | -h)
1220     ac_init_help=long ;;
1221   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1222     ac_init_help=recursive ;;
1223   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1224     ac_init_help=short ;;
1225
1226   -host | --host | --hos | --ho)
1227     ac_prev=host_alias ;;
1228   -host=* | --host=* | --hos=* | --ho=*)
1229     host_alias=$ac_optarg ;;
1230
1231   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1232     ac_prev=htmldir ;;
1233   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1234   | --ht=*)
1235     htmldir=$ac_optarg ;;
1236
1237   -includedir | --includedir | --includedi | --included | --include \
1238   | --includ | --inclu | --incl | --inc)
1239     ac_prev=includedir ;;
1240   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1241   | --includ=* | --inclu=* | --incl=* | --inc=*)
1242     includedir=$ac_optarg ;;
1243
1244   -infodir | --infodir | --infodi | --infod | --info | --inf)
1245     ac_prev=infodir ;;
1246   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1247     infodir=$ac_optarg ;;
1248
1249   -libdir | --libdir | --libdi | --libd)
1250     ac_prev=libdir ;;
1251   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1252     libdir=$ac_optarg ;;
1253
1254   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1255   | --libexe | --libex | --libe)
1256     ac_prev=libexecdir ;;
1257   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1258   | --libexe=* | --libex=* | --libe=*)
1259     libexecdir=$ac_optarg ;;
1260
1261   -localedir | --localedir | --localedi | --localed | --locale)
1262     ac_prev=localedir ;;
1263   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1264     localedir=$ac_optarg ;;
1265
1266   -localstatedir | --localstatedir | --localstatedi | --localstated \
1267   | --localstate | --localstat | --localsta | --localst | --locals)
1268     ac_prev=localstatedir ;;
1269   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1270   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1271     localstatedir=$ac_optarg ;;
1272
1273   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1274     ac_prev=mandir ;;
1275   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1276     mandir=$ac_optarg ;;
1277
1278   -nfp | --nfp | --nf)
1279     # Obsolete; use --without-fp.
1280     with_fp=no ;;
1281
1282   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1283   | --no-cr | --no-c | -n)
1284     no_create=yes ;;
1285
1286   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1287   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1288     no_recursion=yes ;;
1289
1290   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1291   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1292   | --oldin | --oldi | --old | --ol | --o)
1293     ac_prev=oldincludedir ;;
1294   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1295   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1296   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1297     oldincludedir=$ac_optarg ;;
1298
1299   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1300     ac_prev=prefix ;;
1301   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1302     prefix=$ac_optarg ;;
1303
1304   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1305   | --program-pre | --program-pr | --program-p)
1306     ac_prev=program_prefix ;;
1307   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1308   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1309     program_prefix=$ac_optarg ;;
1310
1311   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1312   | --program-suf | --program-su | --program-s)
1313     ac_prev=program_suffix ;;
1314   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1315   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1316     program_suffix=$ac_optarg ;;
1317
1318   -program-transform-name | --program-transform-name \
1319   | --program-transform-nam | --program-transform-na \
1320   | --program-transform-n | --program-transform- \
1321   | --program-transform | --program-transfor \
1322   | --program-transfo | --program-transf \
1323   | --program-trans | --program-tran \
1324   | --progr-tra | --program-tr | --program-t)
1325     ac_prev=program_transform_name ;;
1326   -program-transform-name=* | --program-transform-name=* \
1327   | --program-transform-nam=* | --program-transform-na=* \
1328   | --program-transform-n=* | --program-transform-=* \
1329   | --program-transform=* | --program-transfor=* \
1330   | --program-transfo=* | --program-transf=* \
1331   | --program-trans=* | --program-tran=* \
1332   | --progr-tra=* | --program-tr=* | --program-t=*)
1333     program_transform_name=$ac_optarg ;;
1334
1335   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1336     ac_prev=pdfdir ;;
1337   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1338     pdfdir=$ac_optarg ;;
1339
1340   -psdir | --psdir | --psdi | --psd | --ps)
1341     ac_prev=psdir ;;
1342   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1343     psdir=$ac_optarg ;;
1344
1345   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1346   | -silent | --silent | --silen | --sile | --sil)
1347     silent=yes ;;
1348
1349   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1350     ac_prev=sbindir ;;
1351   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1352   | --sbi=* | --sb=*)
1353     sbindir=$ac_optarg ;;
1354
1355   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1356   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1357   | --sharedst | --shareds | --shared | --share | --shar \
1358   | --sha | --sh)
1359     ac_prev=sharedstatedir ;;
1360   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1361   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1362   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1363   | --sha=* | --sh=*)
1364     sharedstatedir=$ac_optarg ;;
1365
1366   -site | --site | --sit)
1367     ac_prev=site ;;
1368   -site=* | --site=* | --sit=*)
1369     site=$ac_optarg ;;
1370
1371   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1372     ac_prev=srcdir ;;
1373   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1374     srcdir=$ac_optarg ;;
1375
1376   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1377   | --syscon | --sysco | --sysc | --sys | --sy)
1378     ac_prev=sysconfdir ;;
1379   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1380   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1381     sysconfdir=$ac_optarg ;;
1382
1383   -target | --target | --targe | --targ | --tar | --ta | --t)
1384     ac_prev=target_alias ;;
1385   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1386     target_alias=$ac_optarg ;;
1387
1388   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1389     verbose=yes ;;
1390
1391   -version | --version | --versio | --versi | --vers | -V)
1392     ac_init_version=: ;;
1393
1394   -with-* | --with-*)
1395     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1396     # Reject names that are not valid shell variable names.
1397     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1398       as_fn_error $? "invalid package name: $ac_useropt"
1399     ac_useropt_orig=$ac_useropt
1400     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1401     case $ac_user_opts in
1402       *"
1403 "with_$ac_useropt"
1404 "*) ;;
1405       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1406          ac_unrecognized_sep=', ';;
1407     esac
1408     eval with_$ac_useropt=\$ac_optarg ;;
1409
1410   -without-* | --without-*)
1411     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1412     # Reject names that are not valid shell variable names.
1413     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1414       as_fn_error $? "invalid package name: $ac_useropt"
1415     ac_useropt_orig=$ac_useropt
1416     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1417     case $ac_user_opts in
1418       *"
1419 "with_$ac_useropt"
1420 "*) ;;
1421       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1422          ac_unrecognized_sep=', ';;
1423     esac
1424     eval with_$ac_useropt=no ;;
1425
1426   --x)
1427     # Obsolete; use --with-x.
1428     with_x=yes ;;
1429
1430   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1431   | --x-incl | --x-inc | --x-in | --x-i)
1432     ac_prev=x_includes ;;
1433   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1434   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1435     x_includes=$ac_optarg ;;
1436
1437   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1438   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1439     ac_prev=x_libraries ;;
1440   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1441   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1442     x_libraries=$ac_optarg ;;
1443
1444   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1445 Try \`$0 --help' for more information"
1446     ;;
1447
1448   *=*)
1449     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1450     # Reject names that are not valid shell variable names.
1451     case $ac_envvar in #(
1452       '' | [0-9]* | *[!_$as_cr_alnum]* )
1453       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1454     esac
1455     eval $ac_envvar=\$ac_optarg
1456     export $ac_envvar ;;
1457
1458   *)
1459     # FIXME: should be removed in autoconf 3.0.
1460     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1461     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1462       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1463     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1464     ;;
1465
1466   esac
1467 done
1468
1469 if test -n "$ac_prev"; then
1470   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1471   as_fn_error $? "missing argument to $ac_option"
1472 fi
1473
1474 if test -n "$ac_unrecognized_opts"; then
1475   case $enable_option_checking in
1476     no) ;;
1477     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1478     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1479   esac
1480 fi
1481
1482 # Check all directory arguments for consistency.
1483 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1484                 datadir sysconfdir sharedstatedir localstatedir includedir \
1485                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1486                 libdir localedir mandir
1487 do
1488   eval ac_val=\$$ac_var
1489   # Remove trailing slashes.
1490   case $ac_val in
1491     */ )
1492       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1493       eval $ac_var=\$ac_val;;
1494   esac
1495   # Be sure to have absolute directory names.
1496   case $ac_val in
1497     [\\/$]* | ?:[\\/]* )  continue;;
1498     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1499   esac
1500   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1501 done
1502
1503 # There might be people who depend on the old broken behavior: `$host'
1504 # used to hold the argument of --host etc.
1505 # FIXME: To remove some day.
1506 build=$build_alias
1507 host=$host_alias
1508 target=$target_alias
1509
1510 # FIXME: To remove some day.
1511 if test "x$host_alias" != x; then
1512   if test "x$build_alias" = x; then
1513     cross_compiling=maybe
1514   elif test "x$build_alias" != "x$host_alias"; then
1515     cross_compiling=yes
1516   fi
1517 fi
1518
1519 ac_tool_prefix=
1520 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1521
1522 test "$silent" = yes && exec 6>/dev/null
1523
1524
1525 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1526 ac_ls_di=`ls -di .` &&
1527 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1528   as_fn_error $? "working directory cannot be determined"
1529 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1530   as_fn_error $? "pwd does not report name of working directory"
1531
1532
1533 # Find the source files, if location was not specified.
1534 if test -z "$srcdir"; then
1535   ac_srcdir_defaulted=yes
1536   # Try the directory containing this script, then the parent directory.
1537   ac_confdir=`$as_dirname -- "$as_myself" ||
1538 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1539          X"$as_myself" : 'X\(//\)[^/]' \| \
1540          X"$as_myself" : 'X\(//\)$' \| \
1541          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1542 $as_echo X"$as_myself" |
1543     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1544             s//\1/
1545             q
1546           }
1547           /^X\(\/\/\)[^/].*/{
1548             s//\1/
1549             q
1550           }
1551           /^X\(\/\/\)$/{
1552             s//\1/
1553             q
1554           }
1555           /^X\(\/\).*/{
1556             s//\1/
1557             q
1558           }
1559           s/.*/./; q'`
1560   srcdir=$ac_confdir
1561   if test ! -r "$srcdir/$ac_unique_file"; then
1562     srcdir=..
1563   fi
1564 else
1565   ac_srcdir_defaulted=no
1566 fi
1567 if test ! -r "$srcdir/$ac_unique_file"; then
1568   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1569   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1570 fi
1571 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1572 ac_abs_confdir=`(
1573         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1574         pwd)`
1575 # When building in place, set srcdir=.
1576 if test "$ac_abs_confdir" = "$ac_pwd"; then
1577   srcdir=.
1578 fi
1579 # Remove unnecessary trailing slashes from srcdir.
1580 # Double slashes in file names in object file debugging info
1581 # mess up M-x gdb in Emacs.
1582 case $srcdir in
1583 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1584 esac
1585 for ac_var in $ac_precious_vars; do
1586   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1587   eval ac_env_${ac_var}_value=\$${ac_var}
1588   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1589   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1590 done
1591
1592 #
1593 # Report the --help message.
1594 #
1595 if test "$ac_init_help" = "long"; then
1596   # Omit some internal or obsolete options to make the list less imposing.
1597   # This message is too long to be a string in the A/UX 3.1 sh.
1598   cat <<_ACEOF
1599 \`configure' configures this package to adapt to many kinds of systems.
1600
1601 Usage: $0 [OPTION]... [VAR=VALUE]...
1602
1603 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1604 VAR=VALUE.  See below for descriptions of some of the useful variables.
1605
1606 Defaults for the options are specified in brackets.
1607
1608 Configuration:
1609   -h, --help              display this help and exit
1610       --help=short        display options specific to this package
1611       --help=recursive    display the short help of all the included packages
1612   -V, --version           display version information and exit
1613   -q, --quiet, --silent   do not print \`checking ...' messages
1614       --cache-file=FILE   cache test results in FILE [disabled]
1615   -C, --config-cache      alias for \`--cache-file=config.cache'
1616   -n, --no-create         do not create output files
1617       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1618
1619 Installation directories:
1620   --prefix=PREFIX         install architecture-independent files in PREFIX
1621                           [$ac_default_prefix]
1622   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1623                           [PREFIX]
1624
1625 By default, \`make install' will install all the files in
1626 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1627 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1628 for instance \`--prefix=\$HOME'.
1629
1630 For better control, use the options below.
1631
1632 Fine tuning of the installation directories:
1633   --bindir=DIR            user executables [EPREFIX/bin]
1634   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1635   --libexecdir=DIR        program executables [EPREFIX/libexec]
1636   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1637   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1638   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1639   --libdir=DIR            object code libraries [EPREFIX/lib]
1640   --includedir=DIR        C header files [PREFIX/include]
1641   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1642   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1643   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1644   --infodir=DIR           info documentation [DATAROOTDIR/info]
1645   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1646   --mandir=DIR            man documentation [DATAROOTDIR/man]
1647   --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1648   --htmldir=DIR           html documentation [DOCDIR]
1649   --dvidir=DIR            dvi documentation [DOCDIR]
1650   --pdfdir=DIR            pdf documentation [DOCDIR]
1651   --psdir=DIR             ps documentation [DOCDIR]
1652 _ACEOF
1653
1654   cat <<\_ACEOF
1655
1656 Program names:
1657   --program-prefix=PREFIX            prepend PREFIX to installed program names
1658   --program-suffix=SUFFIX            append SUFFIX to installed program names
1659   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1660
1661 System types:
1662   --build=BUILD     configure for building on BUILD [guessed]
1663   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1664   --target=TARGET   configure for building compilers for TARGET [HOST]
1665 _ACEOF
1666 fi
1667
1668 if test -n "$ac_init_help"; then
1669
1670   cat <<\_ACEOF
1671
1672 Optional Features:
1673   --disable-option-checking  ignore unrecognized --enable/--with options
1674   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1675   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1676   --enable-debug          enable debugging no|yes|traditional [yes]
1677   --enable-dynamic        enable linking built binaries with dynamic libs [no]
1678   --enable-syslog         enable syslog support [auto]
1679   --enable-proctitle      enable proctitle support [yes]
1680   --enable-ipv6           enable IPv6 support [auto]
1681   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]
1682
1683 SLAPD (Standalone LDAP Daemon) Options:
1684   --enable-slapd          enable building slapd [yes]
1685     --enable-dynacl       enable run-time loadable ACL support (experimental) [no]
1686     --enable-aci          enable per-object ACIs (experimental) no|yes|mod [no]
1687     --enable-cleartext    enable cleartext passwords [yes]
1688     --enable-crypt        enable crypt(3) passwords [no]
1689     --enable-lmpasswd     enable LAN Manager passwords [no]
1690     --enable-spasswd      enable (Cyrus) SASL password verification [no]
1691     --enable-modules      enable dynamic module support [no]
1692     --enable-rewrite      enable DN rewriting in back-ldap and rwm overlay [auto]
1693     --enable-rlookups     enable reverse lookups of client hostnames [no]
1694     --enable-slapi        enable SLAPI support (experimental) [no]
1695     --enable-slp          enable SLPv2 support [no]
1696     --enable-wrappers     enable tcp wrapper support [no]
1697
1698 SLAPD Backend Options:
1699     --enable-backends     enable all available backends no|yes|mod
1700     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]
1701     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]
1702     --enable-hdb          enable Hierarchical DB backend no|yes|mod [yes]
1703     --enable-ldap         enable ldap backend no|yes|mod [no]
1704     --enable-mdb          enable mdb database backend no|yes|mod [yes]
1705     --enable-meta         enable metadirectory backend no|yes|mod [no]
1706     --enable-monitor      enable monitor backend no|yes|mod [yes]
1707     --enable-ndb          enable MySQL NDB Cluster backend no|yes|mod [no]
1708     --enable-null         enable null backend no|yes|mod [no]
1709     --enable-passwd       enable passwd backend no|yes|mod [no]
1710     --enable-perl         enable perl backend no|yes|mod [no]
1711     --enable-relay        enable relay backend no|yes|mod [yes]
1712     --enable-shell        enable shell backend no|yes|mod [no]
1713     --enable-sock         enable sock backend no|yes|mod [no]
1714     --enable-sql          enable sql backend no|yes|mod [no]
1715
1716 SLAPD Overlay Options:
1717     --enable-overlays     enable all available overlays no|yes|mod
1718     --enable-accesslog    In-Directory Access Logging overlay no|yes|mod [no]
1719     --enable-auditlog     Audit Logging overlay no|yes|mod [no]
1720     --enable-collect      Collect overlay no|yes|mod [no]
1721     --enable-constraint   Attribute Constraint overlay no|yes|mod [no]
1722     --enable-dds          Dynamic Directory Services overlay no|yes|mod [no]
1723     --enable-deref        Dereference overlay no|yes|mod [no]
1724     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]
1725     --enable-dynlist      Dynamic List overlay no|yes|mod [no]
1726     --enable-memberof     Reverse Group Membership overlay no|yes|mod [no]
1727     --enable-ppolicy      Password Policy overlay no|yes|mod [no]
1728     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]
1729     --enable-refint       Referential Integrity overlay no|yes|mod [no]
1730     --enable-retcode      Return Code testing overlay no|yes|mod [no]
1731     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]
1732     --enable-seqmod       Sequential Modify overlay no|yes|mod [no]
1733     --enable-sssvlv       ServerSideSort/VLV overlay no|yes|mod [no]
1734     --enable-syncprov     Syncrepl Provider overlay no|yes|mod [yes]
1735     --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1736     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1737     --enable-valsort      Value Sorting overlay no|yes|mod [no]
1738
1739 Library Generation & Linking Options
1740   --enable-static[=PKGS]  build static libraries [default=yes]
1741   --enable-shared[=PKGS]  build shared libraries [default=yes]
1742   --enable-fast-install[=PKGS]
1743                           optimize for fast installation [default=yes]
1744   --disable-dependency-tracking  speeds up one-time build
1745   --enable-dependency-tracking   do not reject slow dependency extractors
1746   --disable-libtool-lock  avoid locking (might break parallel builds)
1747
1748 Optional Packages:
1749   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1750   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1751   --with-subdir=DIR       change default subdirectory used for installs
1752   --with-cyrus-sasl       with Cyrus SASL support [auto]
1753   --with-fetch            with fetch(3) URL support [auto]
1754   --with-threads          with threads [auto]
1755   --with-tls              with TLS/SSL support auto|openssl|gnutls|moznss [auto]
1756   --with-yielding-select  with implicitly yielding select [auto]
1757   --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1758   --with-odbc             with specific ODBC support iodbc|unixodbc|odbc32|auto [auto]
1759   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1760   --with-pic              try to use only PIC/non-PIC objects [default=use
1761                           both]
1762   --with-tags[=TAGS]      include additional configurations [automatic]
1763
1764 See INSTALL file for further details.
1765
1766 Some influential environment variables:
1767   CC          C compiler command
1768   CFLAGS      C compiler flags
1769   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1770               nonstandard directory <lib dir>
1771   LIBS        libraries to pass to the linker, e.g. -l<library>
1772   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1773               you have headers in a nonstandard directory <include dir>
1774   CPP         C preprocessor
1775
1776 Use these variables to override the choices made by `configure' or to help
1777 it to find libraries and programs with nonstandard names/locations.
1778
1779 Report bugs to the package provider.
1780 _ACEOF
1781 ac_status=$?
1782 fi
1783
1784 if test "$ac_init_help" = "recursive"; then
1785   # If there are subdirs, report their specific --help.
1786   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1787     test -d "$ac_dir" ||
1788       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1789       continue
1790     ac_builddir=.
1791
1792 case "$ac_dir" in
1793 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1794 *)
1795   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1796   # A ".." for each directory in $ac_dir_suffix.
1797   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1798   case $ac_top_builddir_sub in
1799   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1800   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1801   esac ;;
1802 esac
1803 ac_abs_top_builddir=$ac_pwd
1804 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1805 # for backward compatibility:
1806 ac_top_builddir=$ac_top_build_prefix
1807
1808 case $srcdir in
1809   .)  # We are building in place.
1810     ac_srcdir=.
1811     ac_top_srcdir=$ac_top_builddir_sub
1812     ac_abs_top_srcdir=$ac_pwd ;;
1813   [\\/]* | ?:[\\/]* )  # Absolute name.
1814     ac_srcdir=$srcdir$ac_dir_suffix;
1815     ac_top_srcdir=$srcdir
1816     ac_abs_top_srcdir=$srcdir ;;
1817   *) # Relative name.
1818     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1819     ac_top_srcdir=$ac_top_build_prefix$srcdir
1820     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1821 esac
1822 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1823
1824     cd "$ac_dir" || { ac_status=$?; continue; }
1825     # Check for guested configure.
1826     if test -f "$ac_srcdir/configure.gnu"; then
1827       echo &&
1828       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1829     elif test -f "$ac_srcdir/configure"; then
1830       echo &&
1831       $SHELL "$ac_srcdir/configure" --help=recursive
1832     else
1833       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1834     fi || ac_status=$?
1835     cd "$ac_pwd" || { ac_status=$?; break; }
1836   done
1837 fi
1838
1839 test -n "$ac_init_help" && exit $ac_status
1840 if $ac_init_version; then
1841   cat <<\_ACEOF
1842 configure
1843 generated by GNU Autoconf 2.69
1844
1845 Copyright (C) 2012 Free Software Foundation, Inc.
1846 This configure script is free software; the Free Software Foundation
1847 gives unlimited permission to copy, distribute and modify it.
1848
1849 Copyright 1998-2014 The OpenLDAP Foundation. All rights reserved.
1850 Restrictions apply, see COPYRIGHT and LICENSE files.
1851 _ACEOF
1852   exit
1853 fi
1854
1855 ## ------------------------ ##
1856 ## Autoconf initialization. ##
1857 ## ------------------------ ##
1858
1859 # ac_fn_c_try_compile LINENO
1860 # --------------------------
1861 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1862 ac_fn_c_try_compile ()
1863 {
1864   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865   rm -f conftest.$ac_objext
1866   if { { ac_try="$ac_compile"
1867 case "(($ac_try" in
1868   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869   *) ac_try_echo=$ac_try;;
1870 esac
1871 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872 $as_echo "$ac_try_echo"; } >&5
1873   (eval "$ac_compile") 2>conftest.err
1874   ac_status=$?
1875   if test -s conftest.err; then
1876     grep -v '^ *+' conftest.err >conftest.er1
1877     cat conftest.er1 >&5
1878     mv -f conftest.er1 conftest.err
1879   fi
1880   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1881   test $ac_status = 0; } && {
1882          test -z "$ac_c_werror_flag" ||
1883          test ! -s conftest.err
1884        } && test -s conftest.$ac_objext; then :
1885   ac_retval=0
1886 else
1887   $as_echo "$as_me: failed program was:" >&5
1888 sed 's/^/| /' conftest.$ac_ext >&5
1889
1890         ac_retval=1
1891 fi
1892   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1893   as_fn_set_status $ac_retval
1894
1895 } # ac_fn_c_try_compile
1896
1897 # ac_fn_c_try_link LINENO
1898 # -----------------------
1899 # Try to link conftest.$ac_ext, and return whether this succeeded.
1900 ac_fn_c_try_link ()
1901 {
1902   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1903   rm -f conftest.$ac_objext conftest$ac_exeext
1904   if { { ac_try="$ac_link"
1905 case "(($ac_try" in
1906   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1907   *) ac_try_echo=$ac_try;;
1908 esac
1909 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1910 $as_echo "$ac_try_echo"; } >&5
1911   (eval "$ac_link") 2>conftest.err
1912   ac_status=$?
1913   if test -s conftest.err; then
1914     grep -v '^ *+' conftest.err >conftest.er1
1915     cat conftest.er1 >&5
1916     mv -f conftest.er1 conftest.err
1917   fi
1918   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1919   test $ac_status = 0; } && {
1920          test -z "$ac_c_werror_flag" ||
1921          test ! -s conftest.err
1922        } && test -s conftest$ac_exeext && {
1923          test "$cross_compiling" = yes ||
1924          test -x conftest$ac_exeext
1925        }; then :
1926   ac_retval=0
1927 else
1928   $as_echo "$as_me: failed program was:" >&5
1929 sed 's/^/| /' conftest.$ac_ext >&5
1930
1931         ac_retval=1
1932 fi
1933   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1934   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1935   # interfere with the next link command; also delete a directory that is
1936   # left behind by Apple's compiler.  We do this before executing the actions.
1937   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1938   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1939   as_fn_set_status $ac_retval
1940
1941 } # ac_fn_c_try_link
1942
1943 # ac_fn_c_try_cpp LINENO
1944 # ----------------------
1945 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1946 ac_fn_c_try_cpp ()
1947 {
1948   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1949   if { { ac_try="$ac_cpp conftest.$ac_ext"
1950 case "(($ac_try" in
1951   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1952   *) ac_try_echo=$ac_try;;
1953 esac
1954 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1955 $as_echo "$ac_try_echo"; } >&5
1956   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1957   ac_status=$?
1958   if test -s conftest.err; then
1959     grep -v '^ *+' conftest.err >conftest.er1
1960     cat conftest.er1 >&5
1961     mv -f conftest.er1 conftest.err
1962   fi
1963   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1964   test $ac_status = 0; } > conftest.i && {
1965          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1966          test ! -s conftest.err
1967        }; then :
1968   ac_retval=0
1969 else
1970   $as_echo "$as_me: failed program was:" >&5
1971 sed 's/^/| /' conftest.$ac_ext >&5
1972
1973     ac_retval=1
1974 fi
1975   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1976   as_fn_set_status $ac_retval
1977
1978 } # ac_fn_c_try_cpp
1979
1980 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1981 # -------------------------------------------------------
1982 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1983 # the include files in INCLUDES and setting the cache variable VAR
1984 # accordingly.
1985 ac_fn_c_check_header_mongrel ()
1986 {
1987   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1988   if eval \${$3+:} false; then :
1989   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1990 $as_echo_n "checking for $2... " >&6; }
1991 if eval \${$3+:} false; then :
1992   $as_echo_n "(cached) " >&6
1993 fi
1994 eval ac_res=\$$3
1995                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1996 $as_echo "$ac_res" >&6; }
1997 else
1998   # Is the header compilable?
1999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2000 $as_echo_n "checking $2 usability... " >&6; }
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002 /* end confdefs.h.  */
2003 $4
2004 #include <$2>
2005 _ACEOF
2006 if ac_fn_c_try_compile "$LINENO"; then :
2007   ac_header_compiler=yes
2008 else
2009   ac_header_compiler=no
2010 fi
2011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2013 $as_echo "$ac_header_compiler" >&6; }
2014
2015 # Is the header present?
2016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2017 $as_echo_n "checking $2 presence... " >&6; }
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2019 /* end confdefs.h.  */
2020 #include <$2>
2021 _ACEOF
2022 if ac_fn_c_try_cpp "$LINENO"; then :
2023   ac_header_preproc=yes
2024 else
2025   ac_header_preproc=no
2026 fi
2027 rm -f conftest.err conftest.i conftest.$ac_ext
2028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2029 $as_echo "$ac_header_preproc" >&6; }
2030
2031 # So?  What about this header?
2032 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2033   yes:no: )
2034     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2035 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2036     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2037 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2038     ;;
2039   no:yes:* )
2040     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2041 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2042     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2043 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2044     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2045 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2046     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2047 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2048     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2049 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2050 ( $as_echo "## --------------------------------------------- ##
2051 ## Report this to <http://www.openldap.org/its/> ##
2052 ## --------------------------------------------- ##"
2053      ) | sed "s/^/$as_me: WARNING:     /" >&2
2054     ;;
2055 esac
2056   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2057 $as_echo_n "checking for $2... " >&6; }
2058 if eval \${$3+:} false; then :
2059   $as_echo_n "(cached) " >&6
2060 else
2061   eval "$3=\$ac_header_compiler"
2062 fi
2063 eval ac_res=\$$3
2064                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2065 $as_echo "$ac_res" >&6; }
2066 fi
2067   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2068
2069 } # ac_fn_c_check_header_mongrel
2070
2071 # ac_fn_c_try_run LINENO
2072 # ----------------------
2073 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2074 # that executables *can* be run.
2075 ac_fn_c_try_run ()
2076 {
2077   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2078   if { { ac_try="$ac_link"
2079 case "(($ac_try" in
2080   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2081   *) ac_try_echo=$ac_try;;
2082 esac
2083 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2084 $as_echo "$ac_try_echo"; } >&5
2085   (eval "$ac_link") 2>&5
2086   ac_status=$?
2087   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2088   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2089   { { case "(($ac_try" in
2090   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2091   *) ac_try_echo=$ac_try;;
2092 esac
2093 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2094 $as_echo "$ac_try_echo"; } >&5
2095   (eval "$ac_try") 2>&5
2096   ac_status=$?
2097   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2098   test $ac_status = 0; }; }; then :
2099   ac_retval=0
2100 else
2101   $as_echo "$as_me: program exited with status $ac_status" >&5
2102        $as_echo "$as_me: failed program was:" >&5
2103 sed 's/^/| /' conftest.$ac_ext >&5
2104
2105        ac_retval=$ac_status
2106 fi
2107   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2108   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2109   as_fn_set_status $ac_retval
2110
2111 } # ac_fn_c_try_run
2112
2113 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2114 # -------------------------------------------------------
2115 # Tests whether HEADER exists and can be compiled using the include files in
2116 # INCLUDES, setting the cache variable VAR accordingly.
2117 ac_fn_c_check_header_compile ()
2118 {
2119   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2120   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2121 $as_echo_n "checking for $2... " >&6; }
2122 if eval \${$3+:} false; then :
2123   $as_echo_n "(cached) " >&6
2124 else
2125   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2126 /* end confdefs.h.  */
2127 $4
2128 #include <$2>
2129 _ACEOF
2130 if ac_fn_c_try_compile "$LINENO"; then :
2131   eval "$3=yes"
2132 else
2133   eval "$3=no"
2134 fi
2135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2136 fi
2137 eval ac_res=\$$3
2138                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2139 $as_echo "$ac_res" >&6; }
2140   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2141
2142 } # ac_fn_c_check_header_compile
2143
2144 # ac_fn_c_check_func LINENO FUNC VAR
2145 # ----------------------------------
2146 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2147 ac_fn_c_check_func ()
2148 {
2149   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2150   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2151 $as_echo_n "checking for $2... " >&6; }
2152 if eval \${$3+:} false; then :
2153   $as_echo_n "(cached) " >&6
2154 else
2155   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2156 /* end confdefs.h.  */
2157 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2158    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2159 #define $2 innocuous_$2
2160
2161 /* System header to define __stub macros and hopefully few prototypes,
2162     which can conflict with char $2 (); below.
2163     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2164     <limits.h> exists even on freestanding compilers.  */
2165
2166 #ifdef __STDC__
2167 # include <limits.h>
2168 #else
2169 # include <assert.h>
2170 #endif
2171
2172 #undef $2
2173
2174 /* Override any GCC internal prototype to avoid an error.
2175    Use char because int might match the return type of a GCC
2176    builtin and then its argument prototype would still apply.  */
2177 #ifdef __cplusplus
2178 extern "C"
2179 #endif
2180 char $2 ();
2181 /* The GNU C library defines this for functions which it implements
2182     to always fail with ENOSYS.  Some functions are actually named
2183     something starting with __ and the normal name is an alias.  */
2184 #if defined __stub_$2 || defined __stub___$2
2185 choke me
2186 #endif
2187
2188 int
2189 main ()
2190 {
2191 return $2 ();
2192   ;
2193   return 0;
2194 }
2195 _ACEOF
2196 if ac_fn_c_try_link "$LINENO"; then :
2197   eval "$3=yes"
2198 else
2199   eval "$3=no"
2200 fi
2201 rm -f core conftest.err conftest.$ac_objext \
2202     conftest$ac_exeext conftest.$ac_ext
2203 fi
2204 eval ac_res=\$$3
2205                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2206 $as_echo "$ac_res" >&6; }
2207   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2208
2209 } # ac_fn_c_check_func
2210
2211 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2212 # -------------------------------------------
2213 # Tests whether TYPE exists after having included INCLUDES, setting cache
2214 # variable VAR accordingly.
2215 ac_fn_c_check_type ()
2216 {
2217   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2218   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2219 $as_echo_n "checking for $2... " >&6; }
2220 if eval \${$3+:} false; then :
2221   $as_echo_n "(cached) " >&6
2222 else
2223   eval "$3=no"
2224   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225 /* end confdefs.h.  */
2226 $4
2227 int
2228 main ()
2229 {
2230 if (sizeof ($2))
2231          return 0;
2232   ;
2233   return 0;
2234 }
2235 _ACEOF
2236 if ac_fn_c_try_compile "$LINENO"; then :
2237   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2238 /* end confdefs.h.  */
2239 $4
2240 int
2241 main ()
2242 {
2243 if (sizeof (($2)))
2244             return 0;
2245   ;
2246   return 0;
2247 }
2248 _ACEOF
2249 if ac_fn_c_try_compile "$LINENO"; then :
2250
2251 else
2252   eval "$3=yes"
2253 fi
2254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2255 fi
2256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2257 fi
2258 eval ac_res=\$$3
2259                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2260 $as_echo "$ac_res" >&6; }
2261   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2262
2263 } # ac_fn_c_check_type
2264
2265 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2266 # ----------------------------------------------------
2267 # Tries to find if the field MEMBER exists in type AGGR, after including
2268 # INCLUDES, setting cache variable VAR accordingly.
2269 ac_fn_c_check_member ()
2270 {
2271   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2273 $as_echo_n "checking for $2.$3... " >&6; }
2274 if eval \${$4+:} false; then :
2275   $as_echo_n "(cached) " >&6
2276 else
2277   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278 /* end confdefs.h.  */
2279 $5
2280 int
2281 main ()
2282 {
2283 static $2 ac_aggr;
2284 if (ac_aggr.$3)
2285 return 0;
2286   ;
2287   return 0;
2288 }
2289 _ACEOF
2290 if ac_fn_c_try_compile "$LINENO"; then :
2291   eval "$4=yes"
2292 else
2293   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294 /* end confdefs.h.  */
2295 $5
2296 int
2297 main ()
2298 {
2299 static $2 ac_aggr;
2300 if (sizeof ac_aggr.$3)
2301 return 0;
2302   ;
2303   return 0;
2304 }
2305 _ACEOF
2306 if ac_fn_c_try_compile "$LINENO"; then :
2307   eval "$4=yes"
2308 else
2309   eval "$4=no"
2310 fi
2311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312 fi
2313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314 fi
2315 eval ac_res=\$$4
2316                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2317 $as_echo "$ac_res" >&6; }
2318   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2319
2320 } # ac_fn_c_check_member
2321
2322 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2323 # --------------------------------------------
2324 # Tries to find the compile-time value of EXPR in a program that includes
2325 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2326 # computed
2327 ac_fn_c_compute_int ()
2328 {
2329   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2330   if test "$cross_compiling" = yes; then
2331     # Depending upon the size, compute the lo and hi bounds.
2332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333 /* end confdefs.h.  */
2334 $4
2335 int
2336 main ()
2337 {
2338 static int test_array [1 - 2 * !(($2) >= 0)];
2339 test_array [0] = 0;
2340 return test_array [0];
2341
2342   ;
2343   return 0;
2344 }
2345 _ACEOF
2346 if ac_fn_c_try_compile "$LINENO"; then :
2347   ac_lo=0 ac_mid=0
2348   while :; do
2349     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2350 /* end confdefs.h.  */
2351 $4
2352 int
2353 main ()
2354 {
2355 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2356 test_array [0] = 0;
2357 return test_array [0];
2358
2359   ;
2360   return 0;
2361 }
2362 _ACEOF
2363 if ac_fn_c_try_compile "$LINENO"; then :
2364   ac_hi=$ac_mid; break
2365 else
2366   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2367                         if test $ac_lo -le $ac_mid; then
2368                           ac_lo= ac_hi=
2369                           break
2370                         fi
2371                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2372 fi
2373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2374   done
2375 else
2376   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2377 /* end confdefs.h.  */
2378 $4
2379 int
2380 main ()
2381 {
2382 static int test_array [1 - 2 * !(($2) < 0)];
2383 test_array [0] = 0;
2384 return test_array [0];
2385
2386   ;
2387   return 0;
2388 }
2389 _ACEOF
2390 if ac_fn_c_try_compile "$LINENO"; then :
2391   ac_hi=-1 ac_mid=-1
2392   while :; do
2393     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2394 /* end confdefs.h.  */
2395 $4
2396 int
2397 main ()
2398 {
2399 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2400 test_array [0] = 0;
2401 return test_array [0];
2402
2403   ;
2404   return 0;
2405 }
2406 _ACEOF
2407 if ac_fn_c_try_compile "$LINENO"; then :
2408   ac_lo=$ac_mid; break
2409 else
2410   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2411                         if test $ac_mid -le $ac_hi; then
2412                           ac_lo= ac_hi=
2413                           break
2414                         fi
2415                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2416 fi
2417 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2418   done
2419 else
2420   ac_lo= ac_hi=
2421 fi
2422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423 fi
2424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2425 # Binary search between lo and hi bounds.
2426 while test "x$ac_lo" != "x$ac_hi"; do
2427   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2428   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2429 /* end confdefs.h.  */
2430 $4
2431 int
2432 main ()
2433 {
2434 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2435 test_array [0] = 0;
2436 return test_array [0];
2437
2438   ;
2439   return 0;
2440 }
2441 _ACEOF
2442 if ac_fn_c_try_compile "$LINENO"; then :
2443   ac_hi=$ac_mid
2444 else
2445   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2446 fi
2447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2448 done
2449 case $ac_lo in #((
2450 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2451 '') ac_retval=1 ;;
2452 esac
2453   else
2454     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2455 /* end confdefs.h.  */
2456 $4
2457 static long int longval () { return $2; }
2458 static unsigned long int ulongval () { return $2; }
2459 #include <stdio.h>
2460 #include <stdlib.h>
2461 int
2462 main ()
2463 {
2464
2465   FILE *f = fopen ("conftest.val", "w");
2466   if (! f)
2467     return 1;
2468   if (($2) < 0)
2469     {
2470       long int i = longval ();
2471       if (i != ($2))
2472         return 1;
2473       fprintf (f, "%ld", i);
2474     }
2475   else
2476     {
2477       unsigned long int i = ulongval ();
2478       if (i != ($2))
2479         return 1;
2480       fprintf (f, "%lu", i);
2481     }
2482   /* Do not output a trailing newline, as this causes \r\n confusion
2483      on some platforms.  */
2484   return ferror (f) || fclose (f) != 0;
2485
2486   ;
2487   return 0;
2488 }
2489 _ACEOF
2490 if ac_fn_c_try_run "$LINENO"; then :
2491   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2492 else
2493   ac_retval=1
2494 fi
2495 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2496   conftest.$ac_objext conftest.beam conftest.$ac_ext
2497 rm -f conftest.val
2498
2499   fi
2500   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2501   as_fn_set_status $ac_retval
2502
2503 } # ac_fn_c_compute_int
2504 cat >config.log <<_ACEOF
2505 This file contains any messages produced by compilers while
2506 running configure, to aid debugging if configure makes a mistake.
2507
2508 It was created by $as_me, which was
2509 generated by GNU Autoconf 2.69.  Invocation command line was
2510
2511   $ $0 $@
2512
2513 _ACEOF
2514 exec 5>>config.log
2515 {
2516 cat <<_ASUNAME
2517 ## --------- ##
2518 ## Platform. ##
2519 ## --------- ##
2520
2521 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2522 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2523 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2524 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2525 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2526
2527 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2528 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2529
2530 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2531 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2532 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2533 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2534 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2535 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2536 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2537
2538 _ASUNAME
2539
2540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2541 for as_dir in $PATH
2542 do
2543   IFS=$as_save_IFS
2544   test -z "$as_dir" && as_dir=.
2545     $as_echo "PATH: $as_dir"
2546   done
2547 IFS=$as_save_IFS
2548
2549 } >&5
2550
2551 cat >&5 <<_ACEOF
2552
2553
2554 ## ----------- ##
2555 ## Core tests. ##
2556 ## ----------- ##
2557
2558 _ACEOF
2559
2560
2561 # Keep a trace of the command line.
2562 # Strip out --no-create and --no-recursion so they do not pile up.
2563 # Strip out --silent because we don't want to record it for future runs.
2564 # Also quote any args containing shell meta-characters.
2565 # Make two passes to allow for proper duplicate-argument suppression.
2566 ac_configure_args=
2567 ac_configure_args0=
2568 ac_configure_args1=
2569 ac_must_keep_next=false
2570 for ac_pass in 1 2
2571 do
2572   for ac_arg
2573   do
2574     case $ac_arg in
2575     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2576     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2577     | -silent | --silent | --silen | --sile | --sil)
2578       continue ;;
2579     *\'*)
2580       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2581     esac
2582     case $ac_pass in
2583     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2584     2)
2585       as_fn_append ac_configure_args1 " '$ac_arg'"
2586       if test $ac_must_keep_next = true; then
2587         ac_must_keep_next=false # Got value, back to normal.
2588       else
2589         case $ac_arg in
2590           *=* | --config-cache | -C | -disable-* | --disable-* \
2591           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2592           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2593           | -with-* | --with-* | -without-* | --without-* | --x)
2594             case "$ac_configure_args0 " in
2595               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2596             esac
2597             ;;
2598           -* ) ac_must_keep_next=true ;;
2599         esac
2600       fi
2601       as_fn_append ac_configure_args " '$ac_arg'"
2602       ;;
2603     esac
2604   done
2605 done
2606 { ac_configure_args0=; unset ac_configure_args0;}
2607 { ac_configure_args1=; unset ac_configure_args1;}
2608
2609 # When interrupted or exit'd, cleanup temporary files, and complete
2610 # config.log.  We remove comments because anyway the quotes in there
2611 # would cause problems or look ugly.
2612 # WARNING: Use '\'' to represent an apostrophe within the trap.
2613 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2614 trap 'exit_status=$?
2615   # Save into config.log some information that might help in debugging.
2616   {
2617     echo
2618
2619     $as_echo "## ---------------- ##
2620 ## Cache variables. ##
2621 ## ---------------- ##"
2622     echo
2623     # The following way of writing the cache mishandles newlines in values,
2624 (
2625   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2626     eval ac_val=\$$ac_var
2627     case $ac_val in #(
2628     *${as_nl}*)
2629       case $ac_var in #(
2630       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2631 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2632       esac
2633       case $ac_var in #(
2634       _ | IFS | as_nl) ;; #(
2635       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2636       *) { eval $ac_var=; unset $ac_var;} ;;
2637       esac ;;
2638     esac
2639   done
2640   (set) 2>&1 |
2641     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2642     *${as_nl}ac_space=\ *)
2643       sed -n \
2644         "s/'\''/'\''\\\\'\'''\''/g;
2645           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2646       ;; #(
2647     *)
2648       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2649       ;;
2650     esac |
2651     sort
2652 )
2653     echo
2654
2655     $as_echo "## ----------------- ##
2656 ## Output variables. ##
2657 ## ----------------- ##"
2658     echo
2659     for ac_var in $ac_subst_vars
2660     do
2661       eval ac_val=\$$ac_var
2662       case $ac_val in
2663       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2664       esac
2665       $as_echo "$ac_var='\''$ac_val'\''"
2666     done | sort
2667     echo
2668
2669     if test -n "$ac_subst_files"; then
2670       $as_echo "## ------------------- ##
2671 ## File substitutions. ##
2672 ## ------------------- ##"
2673       echo
2674       for ac_var in $ac_subst_files
2675       do
2676         eval ac_val=\$$ac_var
2677         case $ac_val in
2678         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2679         esac
2680         $as_echo "$ac_var='\''$ac_val'\''"
2681       done | sort
2682       echo
2683     fi
2684
2685     if test -s confdefs.h; then
2686       $as_echo "## ----------- ##
2687 ## confdefs.h. ##
2688 ## ----------- ##"
2689       echo
2690       cat confdefs.h
2691       echo
2692     fi
2693     test "$ac_signal" != 0 &&
2694       $as_echo "$as_me: caught signal $ac_signal"
2695     $as_echo "$as_me: exit $exit_status"
2696   } >&5
2697   rm -f core *.core core.conftest.* &&
2698     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2699     exit $exit_status
2700 ' 0
2701 for ac_signal in 1 2 13 15; do
2702   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2703 done
2704 ac_signal=0
2705
2706 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2707 rm -f -r conftest* confdefs.h
2708
2709 $as_echo "/* confdefs.h */" > confdefs.h
2710
2711 # Predefined preprocessor variables.
2712
2713 cat >>confdefs.h <<_ACEOF
2714 #define PACKAGE_NAME "$PACKAGE_NAME"
2715 _ACEOF
2716
2717 cat >>confdefs.h <<_ACEOF
2718 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2719 _ACEOF
2720
2721 cat >>confdefs.h <<_ACEOF
2722 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2723 _ACEOF
2724
2725 cat >>confdefs.h <<_ACEOF
2726 #define PACKAGE_STRING "$PACKAGE_STRING"
2727 _ACEOF
2728
2729 cat >>confdefs.h <<_ACEOF
2730 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2731 _ACEOF
2732
2733 cat >>confdefs.h <<_ACEOF
2734 #define PACKAGE_URL "$PACKAGE_URL"
2735 _ACEOF
2736
2737
2738 # Let the site file select an alternate cache file if it wants to.
2739 # Prefer an explicitly selected file to automatically selected ones.
2740 ac_site_file1=NONE
2741 ac_site_file2=NONE
2742 if test -n "$CONFIG_SITE"; then
2743   # We do not want a PATH search for config.site.
2744   case $CONFIG_SITE in #((
2745     -*)  ac_site_file1=./$CONFIG_SITE;;
2746     */*) ac_site_file1=$CONFIG_SITE;;
2747     *)   ac_site_file1=./$CONFIG_SITE;;
2748   esac
2749 elif test "x$prefix" != xNONE; then
2750   ac_site_file1=$prefix/share/config.site
2751   ac_site_file2=$prefix/etc/config.site
2752 else
2753   ac_site_file1=$ac_default_prefix/share/config.site
2754   ac_site_file2=$ac_default_prefix/etc/config.site
2755 fi
2756 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2757 do
2758   test "x$ac_site_file" = xNONE && continue
2759   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2760     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2761 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2762     sed 's/^/| /' "$ac_site_file" >&5
2763     . "$ac_site_file" \
2764       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2765 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2766 as_fn_error $? "failed to load site script $ac_site_file
2767 See \`config.log' for more details" "$LINENO" 5; }
2768   fi
2769 done
2770
2771
2772 # Check that the precious variables saved in the cache have kept the same
2773 # value.
2774 ac_cache_corrupted=false
2775 for ac_var in $ac_precious_vars; do
2776   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2777   eval ac_new_set=\$ac_env_${ac_var}_set
2778   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2779   eval ac_new_val=\$ac_env_${ac_var}_value
2780   case $ac_old_set,$ac_new_set in
2781     set,)
2782       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2783 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2784       ac_cache_corrupted=: ;;
2785     ,set)
2786       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2787 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2788       ac_cache_corrupted=: ;;
2789     ,);;
2790     *)
2791       if test "x$ac_old_val" != "x$ac_new_val"; then
2792         # differences in whitespace do not lead to failure.
2793         ac_old_val_w=`echo x $ac_old_val`
2794         ac_new_val_w=`echo x $ac_new_val`
2795         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2796           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2797 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2798           ac_cache_corrupted=:
2799         else
2800           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2801 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2802           eval $ac_var=\$ac_old_val
2803         fi
2804         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2805 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2806         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2807 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2808       fi;;
2809   esac
2810   # Pass precious variables to config.status.
2811   if test "$ac_new_set" = set; then
2812     case $ac_new_val in
2813     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2814     *) ac_arg=$ac_var=$ac_new_val ;;
2815     esac
2816     case " $ac_configure_args " in
2817       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2818       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2819     esac
2820   fi
2821 done
2822 if $ac_cache_corrupted; then
2823   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2824 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2825   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2826 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2827   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2828 fi
2829 ## -------------------- ##
2830 ## Main body of script. ##
2831 ## -------------------- ##
2832
2833 ac_ext=c
2834 ac_cpp='$CPP $CPPFLAGS'
2835 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2836 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2837 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866 ac_aux_dir=
2867 for ac_dir in build "$srcdir"/build; do
2868   if test -f "$ac_dir/install-sh"; then
2869     ac_aux_dir=$ac_dir
2870     ac_install_sh="$ac_aux_dir/install-sh -c"
2871     break
2872   elif test -f "$ac_dir/install.sh"; then
2873     ac_aux_dir=$ac_dir
2874     ac_install_sh="$ac_aux_dir/install.sh -c"
2875     break
2876   elif test -f "$ac_dir/shtool"; then
2877     ac_aux_dir=$ac_dir
2878     ac_install_sh="$ac_aux_dir/shtool install -c"
2879     break
2880   fi
2881 done
2882 if test -z "$ac_aux_dir"; then
2883   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5
2884 fi
2885
2886 # These three variables are undocumented and unsupported,
2887 # and are intended to be withdrawn in a future Autoconf release.
2888 # They can cause serious problems if a builder's source tree is in a directory
2889 # whose full name contains unusual characters.
2890 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2891 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2892 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2893
2894
2895 eval `$ac_aux_dir/version.sh`
2896 if test -z "$OL_STRING"; then
2897         as_fn_error $? "could not determine version" "$LINENO" 5
2898 fi
2899
2900 if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
2901         ac_cv_shtool="$ac_aux_dir/shtool"
2902 else
2903         as_fn_error $? "no shtool found in $ac_aux_dir" "$LINENO" 5
2904 fi
2905
2906 SHTOOL="$ac_cv_shtool"
2907
2908 TB="" TN=""
2909 if test -t 1; then
2910         TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
2911         TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
2912 fi
2913
2914 OPENLDAP_REPO=""
2915 if test -d $ac_aux_dir/../.git; then
2916         OPENLDAP_REPO="(from Git clone) "
2917 elif test -d $ac_aux_dir/CVS; then
2918         OPENLDAP_REPO="(from CVS checkout) "
2919 fi
2920
2921 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_REPO}..."
2922
2923 # Make sure we can run config.sub.
2924 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2925   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2926
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2928 $as_echo_n "checking build system type... " >&6; }
2929 if ${ac_cv_build+:} false; then :
2930   $as_echo_n "(cached) " >&6
2931 else
2932   ac_build_alias=$build_alias
2933 test "x$ac_build_alias" = x &&
2934   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2935 test "x$ac_build_alias" = x &&
2936   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2937 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2938   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2939
2940 fi
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2942 $as_echo "$ac_cv_build" >&6; }
2943 case $ac_cv_build in
2944 *-*-*) ;;
2945 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2946 esac
2947 build=$ac_cv_build
2948 ac_save_IFS=$IFS; IFS='-'
2949 set x $ac_cv_build
2950 shift
2951 build_cpu=$1
2952 build_vendor=$2
2953 shift; shift
2954 # Remember, the first character of IFS is used to create $*,
2955 # except with old shells:
2956 build_os=$*
2957 IFS=$ac_save_IFS
2958 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2959
2960
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2962 $as_echo_n "checking host system type... " >&6; }
2963 if ${ac_cv_host+:} false; then :
2964   $as_echo_n "(cached) " >&6
2965 else
2966   if test "x$host_alias" = x; then
2967   ac_cv_host=$ac_cv_build
2968 else
2969   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2970     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2971 fi
2972
2973 fi
2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2975 $as_echo "$ac_cv_host" >&6; }
2976 case $ac_cv_host in
2977 *-*-*) ;;
2978 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2979 esac
2980 host=$ac_cv_host
2981 ac_save_IFS=$IFS; IFS='-'
2982 set x $ac_cv_host
2983 shift
2984 host_cpu=$1
2985 host_vendor=$2
2986 shift; shift
2987 # Remember, the first character of IFS is used to create $*,
2988 # except with old shells:
2989 host_os=$*
2990 IFS=$ac_save_IFS
2991 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2992
2993
2994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2995 $as_echo_n "checking target system type... " >&6; }
2996 if ${ac_cv_target+:} false; then :
2997   $as_echo_n "(cached) " >&6
2998 else
2999   if test "x$target_alias" = x; then
3000   ac_cv_target=$ac_cv_host
3001 else
3002   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
3003     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3004 fi
3005
3006 fi
3007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3008 $as_echo "$ac_cv_target" >&6; }
3009 case $ac_cv_target in
3010 *-*-*) ;;
3011 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3012 esac
3013 target=$ac_cv_target
3014 ac_save_IFS=$IFS; IFS='-'
3015 set x $ac_cv_target
3016 shift
3017 target_cpu=$1
3018 target_vendor=$2
3019 shift; shift
3020 # Remember, the first character of IFS is used to create $*,
3021 # except with old shells:
3022 target_os=$*
3023 IFS=$ac_save_IFS
3024 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
3025
3026
3027 # The aliases save the names the user supplied, while $host etc.
3028 # will get canonicalized.
3029 test -n "$target_alias" &&
3030   test "$program_prefix$program_suffix$program_transform_name" = \
3031     NONENONEs,x,x, &&
3032   program_prefix=${target_alias}-
3033
3034 am__api_version="1.9"
3035 # Find a good install program.  We prefer a C program (faster),
3036 # so one script is as good as another.  But avoid the broken or
3037 # incompatible versions:
3038 # SysV /etc/install, /usr/sbin/install
3039 # SunOS /usr/etc/install
3040 # IRIX /sbin/install
3041 # AIX /bin/install
3042 # AmigaOS /C/install, which installs bootblocks on floppy discs
3043 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3044 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3045 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3046 # OS/2's system install, which has a completely different semantic
3047 # ./install, which can be erroneously created by make from ./install.sh.
3048 # Reject install programs that cannot install multiple files.
3049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3050 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3051 if test -z "$INSTALL"; then
3052 if ${ac_cv_path_install+:} false; then :
3053   $as_echo_n "(cached) " >&6
3054 else
3055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3056 for as_dir in $PATH
3057 do
3058   IFS=$as_save_IFS
3059   test -z "$as_dir" && as_dir=.
3060     # Account for people who put trailing slashes in PATH elements.
3061 case $as_dir/ in #((
3062   ./ | .// | /[cC]/* | \
3063   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3064   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3065   /usr/ucb/* ) ;;
3066   *)
3067     # OSF1 and SCO ODT 3.0 have their own names for install.
3068     # Don't use installbsd from OSF since it installs stuff as root
3069     # by default.
3070     for ac_prog in ginstall scoinst install; do
3071       for ac_exec_ext in '' $ac_executable_extensions; do
3072         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3073           if test $ac_prog = install &&
3074             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3075             # AIX install.  It has an incompatible calling convention.
3076             :
3077           elif test $ac_prog = install &&
3078             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3079             # program-specific install script used by HP pwplus--don't use.
3080             :
3081           else
3082             rm -rf conftest.one conftest.two conftest.dir
3083             echo one > conftest.one
3084             echo two > conftest.two
3085             mkdir conftest.dir
3086             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3087               test -s conftest.one && test -s conftest.two &&
3088               test -s conftest.dir/conftest.one &&
3089               test -s conftest.dir/conftest.two
3090             then
3091               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3092               break 3
3093             fi
3094           fi
3095         fi
3096       done
3097     done
3098     ;;
3099 esac
3100
3101   done
3102 IFS=$as_save_IFS
3103
3104 rm -rf conftest.one conftest.two conftest.dir
3105
3106 fi
3107   if test "${ac_cv_path_install+set}" = set; then
3108     INSTALL=$ac_cv_path_install
3109   else
3110     # As a last resort, use the slow shell script.  Don't cache a
3111     # value for INSTALL within a source directory, because that will
3112     # break other packages using the cache if that directory is
3113     # removed, or if the value is a relative name.
3114     INSTALL=$ac_install_sh
3115   fi
3116 fi
3117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3118 $as_echo "$INSTALL" >&6; }
3119
3120 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3121 # It thinks the first close brace ends the variable substitution.
3122 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3123
3124 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3125
3126 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3127
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3129 $as_echo_n "checking whether build environment is sane... " >&6; }
3130 # Just in case
3131 sleep 1
3132 echo timestamp > conftest.file
3133 # Do `set' in a subshell so we don't clobber the current shell's
3134 # arguments.  Must try -L first in case configure is actually a
3135 # symlink; some systems play weird games with the mod time of symlinks
3136 # (eg FreeBSD returns the mod time of the symlink's containing
3137 # directory).
3138 if (
3139    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
3140    if test "$*" = "X"; then
3141       # -L didn't work.
3142       set X `ls -t $srcdir/configure conftest.file`
3143    fi
3144    rm -f conftest.file
3145    if test "$*" != "X $srcdir/configure conftest.file" \
3146       && test "$*" != "X conftest.file $srcdir/configure"; then
3147
3148       # If neither matched, then we have a broken ls.  This can happen
3149       # if, for instance, CONFIG_SHELL is bash and it inherits a
3150       # broken ls alias from the environment.  This has actually
3151       # happened.  Such a system could not be considered "sane".
3152       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3153 alias in your environment" "$LINENO" 5
3154    fi
3155
3156    test "$2" = conftest.file
3157    )
3158 then
3159    # Ok.
3160    :
3161 else
3162    as_fn_error $? "newly created file is older than distributed files!
3163 Check your system clock" "$LINENO" 5
3164 fi
3165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3166 $as_echo "yes" >&6; }
3167 test "$program_prefix" != NONE &&
3168   program_transform_name="s&^&$program_prefix&;$program_transform_name"
3169 # Use a double $ so make ignores it.
3170 test "$program_suffix" != NONE &&
3171   program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3172 # Double any \ or $.
3173 # By default was `s,x,x', remove it if useless.
3174 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3175 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3176
3177 # expand $ac_aux_dir to an absolute path
3178 am_aux_dir=`cd $ac_aux_dir && pwd`
3179
3180 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3181 # Use eval to expand $SHELL
3182 if eval "$MISSING --run true"; then
3183   am_missing_run="$MISSING --run "
3184 else
3185   am_missing_run=
3186   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3187 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3188 fi
3189
3190 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
3191   # We used to keeping the `.' as first argument, in order to
3192   # allow $(mkdir_p) to be used without argument.  As in
3193   #   $(mkdir_p) $(somedir)
3194   # where $(somedir) is conditionally defined.  However this is wrong
3195   # for two reasons:
3196   #  1. if the package is installed by a user who cannot write `.'
3197   #     make install will fail,
3198   #  2. the above comment should most certainly read
3199   #     $(mkdir_p) $(DESTDIR)$(somedir)
3200   #     so it does not work when $(somedir) is undefined and
3201   #     $(DESTDIR) is not.
3202   #  To support the latter case, we have to write
3203   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
3204   #  so the `.' trick is pointless.
3205   mkdir_p='mkdir -p --'
3206 else
3207   # On NextStep and OpenStep, the `mkdir' command does not
3208   # recognize any option.  It will interpret all options as
3209   # directories to create, and then abort because `.' already
3210   # exists.
3211   for d in ./-p ./--version;
3212   do
3213     test -d $d && rmdir $d
3214   done
3215   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
3216   if test -f "$ac_aux_dir/mkinstalldirs"; then
3217     mkdir_p='$(mkinstalldirs)'
3218   else
3219     mkdir_p='$(install_sh) -d'
3220   fi
3221 fi
3222
3223 for ac_prog in gawk mawk nawk awk
3224 do
3225   # Extract the first word of "$ac_prog", so it can be a program name with args.
3226 set dummy $ac_prog; ac_word=$2
3227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3228 $as_echo_n "checking for $ac_word... " >&6; }
3229 if ${ac_cv_prog_AWK+:} false; then :
3230   $as_echo_n "(cached) " >&6
3231 else
3232   if test -n "$AWK"; then
3233   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3234 else
3235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3236 for as_dir in $PATH
3237 do
3238   IFS=$as_save_IFS
3239   test -z "$as_dir" && as_dir=.
3240     for ac_exec_ext in '' $ac_executable_extensions; do
3241   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3242     ac_cv_prog_AWK="$ac_prog"
3243     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3244     break 2
3245   fi
3246 done
3247   done
3248 IFS=$as_save_IFS
3249
3250 fi
3251 fi
3252 AWK=$ac_cv_prog_AWK
3253 if test -n "$AWK"; then
3254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3255 $as_echo "$AWK" >&6; }
3256 else
3257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3258 $as_echo "no" >&6; }
3259 fi
3260
3261
3262   test -n "$AWK" && break
3263 done
3264
3265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3266 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3267 set x ${MAKE-make}
3268 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3269 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3270   $as_echo_n "(cached) " >&6
3271 else
3272   cat >conftest.make <<\_ACEOF
3273 SHELL = /bin/sh
3274 all:
3275         @echo '@@@%%%=$(MAKE)=@@@%%%'
3276 _ACEOF
3277 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3278 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3279   *@@@%%%=?*=@@@%%%*)
3280     eval ac_cv_prog_make_${ac_make}_set=yes;;
3281   *)
3282     eval ac_cv_prog_make_${ac_make}_set=no;;
3283 esac
3284 rm -f conftest.make
3285 fi
3286 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3288 $as_echo "yes" >&6; }
3289   SET_MAKE=
3290 else
3291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3292 $as_echo "no" >&6; }
3293   SET_MAKE="MAKE=${MAKE-make}"
3294 fi
3295
3296 rm -rf .tst 2>/dev/null
3297 mkdir .tst 2>/dev/null
3298 if test -d .tst; then
3299   am__leading_dot=.
3300 else
3301   am__leading_dot=_
3302 fi
3303 rmdir .tst 2>/dev/null
3304
3305 # test to see if srcdir already configured
3306 if test "`cd $srcdir && pwd`" != "`pwd`" &&
3307    test -f $srcdir/config.status; then
3308   as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3309 fi
3310
3311 # test whether we have cygpath
3312 if test -z "$CYGPATH_W"; then
3313   if (cygpath --version) >/dev/null 2>/dev/null; then
3314     CYGPATH_W='cygpath -w'
3315   else
3316     CYGPATH_W=echo
3317   fi
3318 fi
3319
3320
3321 # Define the identity of the package.
3322  PACKAGE=$OL_PACKAGE
3323  VERSION=$OL_VERSION
3324
3325
3326 # Some tools Automake needs.
3327
3328 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3329
3330
3331 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3332
3333
3334 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3335
3336
3337 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3338
3339
3340 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3341
3342 install_sh=${install_sh-"$am_aux_dir/install-sh"}
3343
3344 # Installed binaries are usually stripped using `strip' when the user
3345 # run `make install-strip'.  However `strip' might not be the right
3346 # tool to use in cross-compilation environments, therefore Automake
3347 # will honor the `STRIP' environment variable to overrule this program.
3348 if test "$cross_compiling" != no; then
3349   if test -n "$ac_tool_prefix"; then
3350   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3351 set dummy ${ac_tool_prefix}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 ${ac_cv_prog_STRIP+:} false; then :
3355   $as_echo_n "(cached) " >&6
3356 else
3357   if test -n "$STRIP"; then
3358   ac_cv_prog_STRIP="$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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3367     ac_cv_prog_STRIP="${ac_tool_prefix}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 STRIP=$ac_cv_prog_STRIP
3378 if test -n "$STRIP"; then
3379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3380 $as_echo "$STRIP" >&6; }
3381 else
3382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3383 $as_echo "no" >&6; }
3384 fi
3385
3386
3387 fi
3388 if test -z "$ac_cv_prog_STRIP"; then
3389   ac_ct_STRIP=$STRIP
3390   # Extract the first word of "strip", so it can be a program name with args.
3391 set dummy strip; ac_word=$2
3392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3393 $as_echo_n "checking for $ac_word... " >&6; }
3394 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3395   $as_echo_n "(cached) " >&6
3396 else
3397   if test -n "$ac_ct_STRIP"; then
3398   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3399 else
3400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3401 for as_dir in $PATH
3402 do
3403   IFS=$as_save_IFS
3404   test -z "$as_dir" && as_dir=.
3405     for ac_exec_ext in '' $ac_executable_extensions; do
3406   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3407     ac_cv_prog_ac_ct_STRIP="strip"
3408     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3409     break 2
3410   fi
3411 done
3412   done
3413 IFS=$as_save_IFS
3414
3415 fi
3416 fi
3417 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3418 if test -n "$ac_ct_STRIP"; then
3419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3420 $as_echo "$ac_ct_STRIP" >&6; }
3421 else
3422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3423 $as_echo "no" >&6; }
3424 fi
3425
3426   if test "x$ac_ct_STRIP" = x; then
3427     STRIP=":"
3428   else
3429     case $cross_compiling:$ac_tool_warned in
3430 yes:)
3431 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3432 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3433 ac_tool_warned=yes ;;
3434 esac
3435     STRIP=$ac_ct_STRIP
3436   fi
3437 else
3438   STRIP="$ac_cv_prog_STRIP"
3439 fi
3440
3441 fi
3442 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
3443
3444 # We need awk for the "check" target.  The system "awk" is bad on
3445 # some platforms.
3446 # Always define AMTAR for backward compatibility.
3447
3448 AMTAR=${AMTAR-"${am_missing_run}tar"}
3449
3450 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3451
3452
3453
3454
3455
3456 cat >>confdefs.h <<_ACEOF
3457 #define OPENLDAP_PACKAGE "$PACKAGE"
3458 _ACEOF
3459
3460
3461 cat >>confdefs.h <<_ACEOF
3462 #define OPENLDAP_VERSION "$VERSION"
3463 _ACEOF
3464
3465
3466
3467 cat >>confdefs.h <<_ACEOF
3468 #define LDAP_VENDOR_VERSION $OL_API_INC
3469 _ACEOF
3470
3471
3472 cat >>confdefs.h <<_ACEOF
3473 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
3474 _ACEOF
3475
3476
3477 cat >>confdefs.h <<_ACEOF
3478 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
3479 _ACEOF
3480
3481
3482 cat >>confdefs.h <<_ACEOF
3483 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
3484 _ACEOF
3485
3486
3487 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
3488
3489 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
3490
3491 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
3492
3493
3494
3495
3496
3497 ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
3498
3499 ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
3500
3501 ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
3502
3503
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking configure arguments" >&5
3505 $as_echo_n "checking configure arguments... " >&6; }
3506
3507
3508 top_builddir=`pwd`
3509
3510 ldap_subdir="/openldap"
3511
3512
3513 # Check whether --with-subdir was given.
3514 if test "${with_subdir+set}" = set; then :
3515   withval=$with_subdir; case "$withval" in
3516         no) ldap_subdir=""
3517                 ;;
3518         yes)
3519                 ;;
3520         /*|\\*)
3521                 ldap_subdir="$withval"
3522                 ;;
3523         *)
3524                 ldap_subdir="/$withval"
3525                 ;;
3526 esac
3527
3528 fi
3529
3530
3531 # OpenLDAP --enable-debug
3532
3533         # Check whether --enable-debug was given.
3534 if test "${enable_debug+set}" = set; then :
3535   enableval=$enable_debug;
3536         ol_arg=invalid
3537         for ol_val in no yes traditional ; do
3538                 if test "$enableval" = "$ol_val" ; then
3539                         ol_arg="$ol_val"
3540                 fi
3541         done
3542         if test "$ol_arg" = "invalid" ; then
3543                 as_fn_error $? "bad value $enableval for --enable-debug" "$LINENO" 5
3544         fi
3545         ol_enable_debug="$ol_arg"
3546
3547 else
3548         ol_enable_debug=yes
3549 fi
3550
3551 # end --enable-debug
3552 # OpenLDAP --enable-dynamic
3553
3554         # Check whether --enable-dynamic was given.
3555 if test "${enable_dynamic+set}" = set; then :
3556   enableval=$enable_dynamic;
3557         ol_arg=invalid
3558         for ol_val in auto yes no ; do
3559                 if test "$enableval" = "$ol_val" ; then
3560                         ol_arg="$ol_val"
3561                 fi
3562         done
3563         if test "$ol_arg" = "invalid" ; then
3564                 as_fn_error $? "bad value $enableval for --enable-dynamic" "$LINENO" 5
3565         fi
3566         ol_enable_dynamic="$ol_arg"
3567
3568 else
3569         ol_enable_dynamic=no
3570 fi
3571
3572 # end --enable-dynamic
3573 # OpenLDAP --enable-syslog
3574
3575         # Check whether --enable-syslog was given.
3576 if test "${enable_syslog+set}" = set; then :
3577   enableval=$enable_syslog;
3578         ol_arg=invalid
3579         for ol_val in auto yes no ; do
3580                 if test "$enableval" = "$ol_val" ; then
3581                         ol_arg="$ol_val"
3582                 fi
3583         done
3584         if test "$ol_arg" = "invalid" ; then
3585                 as_fn_error $? "bad value $enableval for --enable-syslog" "$LINENO" 5
3586         fi
3587         ol_enable_syslog="$ol_arg"
3588
3589 else
3590         ol_enable_syslog=auto
3591 fi
3592
3593 # end --enable-syslog
3594 # OpenLDAP --enable-proctitle
3595
3596         # Check whether --enable-proctitle was given.
3597 if test "${enable_proctitle+set}" = set; then :
3598   enableval=$enable_proctitle;
3599         ol_arg=invalid
3600         for ol_val in auto yes no ; do
3601                 if test "$enableval" = "$ol_val" ; then
3602                         ol_arg="$ol_val"
3603                 fi
3604         done
3605         if test "$ol_arg" = "invalid" ; then
3606                 as_fn_error $? "bad value $enableval for --enable-proctitle" "$LINENO" 5
3607         fi
3608         ol_enable_proctitle="$ol_arg"
3609
3610 else
3611         ol_enable_proctitle=yes
3612 fi
3613
3614 # end --enable-proctitle
3615 ol_enable_referrals=${ol_enable_referrals-no}
3616 # OpenLDAP --enable-ipv6
3617
3618         # Check whether --enable-ipv6 was given.
3619 if test "${enable_ipv6+set}" = set; then :
3620   enableval=$enable_ipv6;
3621         ol_arg=invalid
3622         for ol_val in auto yes no ; do
3623                 if test "$enableval" = "$ol_val" ; then
3624                         ol_arg="$ol_val"
3625                 fi
3626         done
3627         if test "$ol_arg" = "invalid" ; then
3628                 as_fn_error $? "bad value $enableval for --enable-ipv6" "$LINENO" 5
3629         fi
3630         ol_enable_ipv6="$ol_arg"
3631
3632 else
3633         ol_enable_ipv6=auto
3634 fi
3635
3636 # end --enable-ipv6
3637 # OpenLDAP --enable-local
3638
3639         # Check whether --enable-local was given.
3640 if test "${enable_local+set}" = set; then :
3641   enableval=$enable_local;
3642         ol_arg=invalid
3643         for ol_val in auto yes no ; do
3644                 if test "$enableval" = "$ol_val" ; then
3645                         ol_arg="$ol_val"
3646                 fi
3647         done
3648         if test "$ol_arg" = "invalid" ; then
3649                 as_fn_error $? "bad value $enableval for --enable-local" "$LINENO" 5
3650         fi
3651         ol_enable_local="$ol_arg"
3652
3653 else
3654         ol_enable_local=auto
3655 fi
3656
3657 # end --enable-local
3658
3659 # OpenLDAP --with-cyrus_sasl
3660
3661 # Check whether --with-cyrus_sasl was given.
3662 if test "${with_cyrus_sasl+set}" = set; then :
3663   withval=$with_cyrus_sasl;
3664         ol_arg=invalid
3665         for ol_val in auto yes no  ; do
3666                 if test "$withval" = "$ol_val" ; then
3667                         ol_arg="$ol_val"
3668                 fi
3669         done
3670         if test "$ol_arg" = "invalid" ; then
3671                 as_fn_error $? "bad value $withval for --with-cyrus_sasl" "$LINENO" 5
3672         fi
3673         ol_with_cyrus_sasl="$ol_arg"
3674
3675 else
3676         ol_with_cyrus_sasl="auto"
3677 fi
3678 # end --with-cyrus_sasl
3679
3680 # OpenLDAP --with-fetch
3681
3682 # Check whether --with-fetch was given.
3683 if test "${with_fetch+set}" = set; then :
3684   withval=$with_fetch;
3685         ol_arg=invalid
3686         for ol_val in auto yes no  ; do
3687                 if test "$withval" = "$ol_val" ; then
3688                         ol_arg="$ol_val"
3689                 fi
3690         done
3691         if test "$ol_arg" = "invalid" ; then
3692                 as_fn_error $? "bad value $withval for --with-fetch" "$LINENO" 5
3693         fi
3694         ol_with_fetch="$ol_arg"
3695
3696 else
3697         ol_with_fetch="auto"
3698 fi
3699 # end --with-fetch
3700
3701 # OpenLDAP --with-threads
3702
3703 # Check whether --with-threads was given.
3704 if test "${with_threads+set}" = set; then :
3705   withval=$with_threads;
3706         ol_arg=invalid
3707         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
3708                 if test "$withval" = "$ol_val" ; then
3709                         ol_arg="$ol_val"
3710                 fi
3711         done
3712         if test "$ol_arg" = "invalid" ; then
3713                 as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
3714         fi
3715         ol_with_threads="$ol_arg"
3716
3717 else
3718         ol_with_threads="auto"
3719 fi
3720 # end --with-threads
3721
3722 # OpenLDAP --with-tls
3723
3724 # Check whether --with-tls was given.
3725 if test "${with_tls+set}" = set; then :
3726   withval=$with_tls;
3727         ol_arg=invalid
3728         for ol_val in auto openssl gnutls moznss yes no  ; do
3729                 if test "$withval" = "$ol_val" ; then
3730                         ol_arg="$ol_val"
3731                 fi
3732         done
3733         if test "$ol_arg" = "invalid" ; then
3734                 as_fn_error $? "bad value $withval for --with-tls" "$LINENO" 5
3735         fi
3736         ol_with_tls="$ol_arg"
3737
3738 else
3739         ol_with_tls="auto"
3740 fi
3741 # end --with-tls
3742
3743 # OpenLDAP --with-yielding_select
3744
3745 # Check whether --with-yielding_select was given.
3746 if test "${with_yielding_select+set}" = set; then :
3747   withval=$with_yielding_select;
3748         ol_arg=invalid
3749         for ol_val in auto yes no manual  ; do
3750                 if test "$withval" = "$ol_val" ; then
3751                         ol_arg="$ol_val"
3752                 fi
3753         done
3754         if test "$ol_arg" = "invalid" ; then
3755                 as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
3756         fi
3757         ol_with_yielding_select="$ol_arg"
3758
3759 else
3760         ol_with_yielding_select="auto"
3761 fi
3762 # end --with-yielding_select
3763
3764 # OpenLDAP --with-mp
3765
3766 # Check whether --with-mp was given.
3767 if test "${with_mp+set}" = set; then :
3768   withval=$with_mp;
3769         ol_arg=invalid
3770         for ol_val in auto longlong long bignum gmp yes no ; do
3771                 if test "$withval" = "$ol_val" ; then
3772                         ol_arg="$ol_val"
3773                 fi
3774         done
3775         if test "$ol_arg" = "invalid" ; then
3776                 as_fn_error $? "bad value $withval for --with-mp" "$LINENO" 5
3777         fi
3778         ol_with_mp="$ol_arg"
3779
3780 else
3781         ol_with_mp="auto"
3782 fi
3783 # end --with-mp
3784
3785 # OpenLDAP --with-odbc
3786
3787 # Check whether --with-odbc was given.
3788 if test "${with_odbc+set}" = set; then :
3789   withval=$with_odbc;
3790         ol_arg=invalid
3791         for ol_val in auto iodbc unixodbc odbc32  ; do
3792                 if test "$withval" = "$ol_val" ; then
3793                         ol_arg="$ol_val"
3794                 fi
3795         done
3796         if test "$ol_arg" = "invalid" ; then
3797                 as_fn_error $? "bad value $withval for --with-odbc" "$LINENO" 5
3798         fi
3799         ol_with_odbc="$ol_arg"
3800
3801 else
3802         ol_with_odbc="auto"
3803 fi
3804 # end --with-odbc
3805
3806
3807
3808 # Check whether --enable-xxslapdoptions was given.
3809 if test "${enable_xxslapdoptions+set}" = set; then :
3810   enableval=$enable_xxslapdoptions;
3811 fi
3812
3813 # OpenLDAP --enable-slapd
3814
3815         # Check whether --enable-slapd was given.
3816 if test "${enable_slapd+set}" = set; then :
3817   enableval=$enable_slapd;
3818         ol_arg=invalid
3819         for ol_val in auto yes no ; do
3820                 if test "$enableval" = "$ol_val" ; then
3821                         ol_arg="$ol_val"
3822                 fi
3823         done
3824         if test "$ol_arg" = "invalid" ; then
3825                 as_fn_error $? "bad value $enableval for --enable-slapd" "$LINENO" 5
3826         fi
3827         ol_enable_slapd="$ol_arg"
3828
3829 else
3830         ol_enable_slapd=yes
3831 fi
3832
3833 # end --enable-slapd
3834 # OpenLDAP --enable-dynacl
3835
3836         # Check whether --enable-dynacl was given.
3837 if test "${enable_dynacl+set}" = set; then :
3838   enableval=$enable_dynacl;
3839         ol_arg=invalid
3840         for ol_val in auto yes no ; do
3841                 if test "$enableval" = "$ol_val" ; then
3842                         ol_arg="$ol_val"
3843                 fi
3844         done
3845         if test "$ol_arg" = "invalid" ; then
3846                 as_fn_error $? "bad value $enableval for --enable-dynacl" "$LINENO" 5
3847         fi
3848         ol_enable_dynacl="$ol_arg"
3849
3850 else
3851         ol_enable_dynacl=no
3852 fi
3853
3854 # end --enable-dynacl
3855 # OpenLDAP --enable-aci
3856
3857         # Check whether --enable-aci was given.
3858 if test "${enable_aci+set}" = set; then :
3859   enableval=$enable_aci;
3860         ol_arg=invalid
3861         for ol_val in no yes mod ; do
3862                 if test "$enableval" = "$ol_val" ; then
3863                         ol_arg="$ol_val"
3864                 fi
3865         done
3866         if test "$ol_arg" = "invalid" ; then
3867                 as_fn_error $? "bad value $enableval for --enable-aci" "$LINENO" 5
3868         fi
3869         ol_enable_aci="$ol_arg"
3870
3871 else
3872         ol_enable_aci=no
3873 fi
3874
3875 # end --enable-aci
3876 # OpenLDAP --enable-cleartext
3877
3878         # Check whether --enable-cleartext was given.
3879 if test "${enable_cleartext+set}" = set; then :
3880   enableval=$enable_cleartext;
3881         ol_arg=invalid
3882         for ol_val in auto yes no ; do
3883                 if test "$enableval" = "$ol_val" ; then
3884                         ol_arg="$ol_val"
3885                 fi
3886         done
3887         if test "$ol_arg" = "invalid" ; then
3888                 as_fn_error $? "bad value $enableval for --enable-cleartext" "$LINENO" 5
3889         fi
3890         ol_enable_cleartext="$ol_arg"
3891
3892 else
3893         ol_enable_cleartext=yes
3894 fi
3895
3896 # end --enable-cleartext
3897 # OpenLDAP --enable-crypt
3898
3899         # Check whether --enable-crypt was given.
3900 if test "${enable_crypt+set}" = set; then :
3901   enableval=$enable_crypt;
3902         ol_arg=invalid
3903         for ol_val in auto yes no ; do
3904                 if test "$enableval" = "$ol_val" ; then
3905                         ol_arg="$ol_val"
3906                 fi
3907         done
3908         if test "$ol_arg" = "invalid" ; then
3909                 as_fn_error $? "bad value $enableval for --enable-crypt" "$LINENO" 5
3910         fi
3911         ol_enable_crypt="$ol_arg"
3912
3913 else
3914         ol_enable_crypt=no
3915 fi
3916
3917 # end --enable-crypt
3918 # OpenLDAP --enable-lmpasswd
3919
3920         # Check whether --enable-lmpasswd was given.
3921 if test "${enable_lmpasswd+set}" = set; then :
3922   enableval=$enable_lmpasswd;
3923         ol_arg=invalid
3924         for ol_val in auto yes no ; do
3925                 if test "$enableval" = "$ol_val" ; then
3926                         ol_arg="$ol_val"
3927                 fi
3928         done
3929         if test "$ol_arg" = "invalid" ; then
3930                 as_fn_error $? "bad value $enableval for --enable-lmpasswd" "$LINENO" 5
3931         fi
3932         ol_enable_lmpasswd="$ol_arg"
3933
3934 else
3935         ol_enable_lmpasswd=no
3936 fi
3937
3938 # end --enable-lmpasswd
3939 # OpenLDAP --enable-spasswd
3940
3941         # Check whether --enable-spasswd was given.
3942 if test "${enable_spasswd+set}" = set; then :
3943   enableval=$enable_spasswd;
3944         ol_arg=invalid
3945         for ol_val in auto yes no ; do
3946                 if test "$enableval" = "$ol_val" ; then
3947                         ol_arg="$ol_val"
3948                 fi
3949         done
3950         if test "$ol_arg" = "invalid" ; then
3951                 as_fn_error $? "bad value $enableval for --enable-spasswd" "$LINENO" 5
3952         fi
3953         ol_enable_spasswd="$ol_arg"
3954
3955 else
3956         ol_enable_spasswd=no
3957 fi
3958
3959 # end --enable-spasswd
3960 # OpenLDAP --enable-modules
3961
3962         # Check whether --enable-modules was given.
3963 if test "${enable_modules+set}" = set; then :
3964   enableval=$enable_modules;
3965         ol_arg=invalid
3966         for ol_val in auto yes no ; do
3967                 if test "$enableval" = "$ol_val" ; then
3968                         ol_arg="$ol_val"
3969                 fi
3970         done
3971         if test "$ol_arg" = "invalid" ; then
3972                 as_fn_error $? "bad value $enableval for --enable-modules" "$LINENO" 5
3973         fi
3974         ol_enable_modules="$ol_arg"
3975
3976 else
3977         ol_enable_modules=no
3978 fi
3979
3980 # end --enable-modules
3981 # OpenLDAP --enable-rewrite
3982
3983         # Check whether --enable-rewrite was given.
3984 if test "${enable_rewrite+set}" = set; then :
3985   enableval=$enable_rewrite;
3986         ol_arg=invalid
3987         for ol_val in auto yes no ; do
3988                 if test "$enableval" = "$ol_val" ; then
3989                         ol_arg="$ol_val"
3990                 fi
3991         done
3992         if test "$ol_arg" = "invalid" ; then
3993                 as_fn_error $? "bad value $enableval for --enable-rewrite" "$LINENO" 5
3994         fi
3995         ol_enable_rewrite="$ol_arg"
3996
3997 else
3998         ol_enable_rewrite=auto
3999 fi
4000
4001 # end --enable-rewrite
4002 # OpenLDAP --enable-rlookups
4003
4004         # Check whether --enable-rlookups was given.
4005 if test "${enable_rlookups+set}" = set; then :
4006   enableval=$enable_rlookups;
4007         ol_arg=invalid
4008         for ol_val in auto yes no ; do
4009                 if test "$enableval" = "$ol_val" ; then
4010                         ol_arg="$ol_val"
4011                 fi
4012         done
4013         if test "$ol_arg" = "invalid" ; then
4014                 as_fn_error $? "bad value $enableval for --enable-rlookups" "$LINENO" 5
4015         fi
4016         ol_enable_rlookups="$ol_arg"
4017
4018 else
4019         ol_enable_rlookups=no
4020 fi
4021
4022 # end --enable-rlookups
4023 # OpenLDAP --enable-slapi
4024
4025         # Check whether --enable-slapi was given.
4026 if test "${enable_slapi+set}" = set; then :
4027   enableval=$enable_slapi;
4028         ol_arg=invalid
4029         for ol_val in auto yes no ; do
4030                 if test "$enableval" = "$ol_val" ; then
4031                         ol_arg="$ol_val"
4032                 fi
4033         done
4034         if test "$ol_arg" = "invalid" ; then
4035                 as_fn_error $? "bad value $enableval for --enable-slapi" "$LINENO" 5
4036         fi
4037         ol_enable_slapi="$ol_arg"
4038
4039 else
4040         ol_enable_slapi=no
4041 fi
4042
4043 # end --enable-slapi
4044 # OpenLDAP --enable-slp
4045
4046         # Check whether --enable-slp was given.
4047 if test "${enable_slp+set}" = set; then :
4048   enableval=$enable_slp;
4049         ol_arg=invalid
4050         for ol_val in auto yes no ; do
4051                 if test "$enableval" = "$ol_val" ; then
4052                         ol_arg="$ol_val"
4053                 fi
4054         done
4055         if test "$ol_arg" = "invalid" ; then
4056                 as_fn_error $? "bad value $enableval for --enable-slp" "$LINENO" 5
4057         fi
4058         ol_enable_slp="$ol_arg"
4059
4060 else
4061         ol_enable_slp=no
4062 fi
4063
4064 # end --enable-slp
4065 # OpenLDAP --enable-wrappers
4066
4067         # Check whether --enable-wrappers was given.
4068 if test "${enable_wrappers+set}" = set; then :
4069   enableval=$enable_wrappers;
4070         ol_arg=invalid
4071         for ol_val in auto yes no ; do
4072                 if test "$enableval" = "$ol_val" ; then
4073                         ol_arg="$ol_val"
4074                 fi
4075         done
4076         if test "$ol_arg" = "invalid" ; then
4077                 as_fn_error $? "bad value $enableval for --enable-wrappers" "$LINENO" 5
4078         fi
4079         ol_enable_wrappers="$ol_arg"
4080
4081 else
4082         ol_enable_wrappers=no
4083 fi
4084
4085 # end --enable-wrappers
4086
4087 Backends="bdb \
4088         dnssrv \
4089         hdb \
4090         ldap \
4091         mdb \
4092         meta \
4093         monitor \
4094         ndb \
4095         null \
4096         passwd \
4097         perl \
4098         relay \
4099         shell \
4100         sock \
4101         sql"
4102
4103 # Check whether --enable-xxslapbackends was given.
4104 if test "${enable_xxslapbackends+set}" = set; then :
4105   enableval=$enable_xxslapbackends;
4106 fi
4107
4108
4109 # OpenLDAP --enable-backends
4110
4111         # Check whether --enable-backends was given.
4112 if test "${enable_backends+set}" = set; then :
4113   enableval=$enable_backends;
4114         ol_arg=invalid
4115         for ol_val in no yes mod ; do
4116                 if test "$enableval" = "$ol_val" ; then
4117                         ol_arg="$ol_val"
4118                 fi
4119         done
4120         if test "$ol_arg" = "invalid" ; then
4121                 as_fn_error $? "bad value $enableval for --enable-backends" "$LINENO" 5
4122         fi
4123         ol_enable_backends="$ol_arg"
4124
4125 fi
4126
4127 # end --enable-backends
4128 # OpenLDAP --enable-bdb
4129
4130         # Check whether --enable-bdb was given.
4131 if test "${enable_bdb+set}" = set; then :
4132   enableval=$enable_bdb;
4133         ol_arg=invalid
4134         for ol_val in no yes mod ; do
4135                 if test "$enableval" = "$ol_val" ; then
4136                         ol_arg="$ol_val"
4137                 fi
4138         done
4139         if test "$ol_arg" = "invalid" ; then
4140                 as_fn_error $? "bad value $enableval for --enable-bdb" "$LINENO" 5
4141         fi
4142         ol_enable_bdb="$ol_arg"
4143
4144 else
4145         ol_enable_bdb=${ol_enable_backends:-yes}
4146 fi
4147
4148 # end --enable-bdb
4149 # OpenLDAP --enable-dnssrv
4150
4151         # Check whether --enable-dnssrv was given.
4152 if test "${enable_dnssrv+set}" = set; then :
4153   enableval=$enable_dnssrv;
4154         ol_arg=invalid
4155         for ol_val in no yes mod ; do
4156                 if test "$enableval" = "$ol_val" ; then
4157                         ol_arg="$ol_val"
4158                 fi
4159         done
4160         if test "$ol_arg" = "invalid" ; then
4161                 as_fn_error $? "bad value $enableval for --enable-dnssrv" "$LINENO" 5
4162         fi
4163         ol_enable_dnssrv="$ol_arg"
4164
4165 else
4166         ol_enable_dnssrv=${ol_enable_backends:-no}
4167 fi
4168
4169 # end --enable-dnssrv
4170 # OpenLDAP --enable-hdb
4171
4172         # Check whether --enable-hdb was given.
4173 if test "${enable_hdb+set}" = set; then :
4174   enableval=$enable_hdb;
4175         ol_arg=invalid
4176         for ol_val in no yes mod ; do
4177                 if test "$enableval" = "$ol_val" ; then
4178                         ol_arg="$ol_val"
4179                 fi
4180         done
4181         if test "$ol_arg" = "invalid" ; then
4182                 as_fn_error $? "bad value $enableval for --enable-hdb" "$LINENO" 5
4183         fi
4184         ol_enable_hdb="$ol_arg"
4185
4186 else
4187         ol_enable_hdb=${ol_enable_backends:-yes}
4188 fi
4189
4190 # end --enable-hdb
4191 # OpenLDAP --enable-ldap
4192
4193         # Check whether --enable-ldap was given.
4194 if test "${enable_ldap+set}" = set; then :
4195   enableval=$enable_ldap;
4196         ol_arg=invalid
4197         for ol_val in no yes mod ; do
4198                 if test "$enableval" = "$ol_val" ; then
4199                         ol_arg="$ol_val"
4200                 fi
4201         done
4202         if test "$ol_arg" = "invalid" ; then
4203                 as_fn_error $? "bad value $enableval for --enable-ldap" "$LINENO" 5
4204         fi
4205         ol_enable_ldap="$ol_arg"
4206
4207 else
4208         ol_enable_ldap=${ol_enable_backends:-no}
4209 fi
4210
4211 # end --enable-ldap
4212 # OpenLDAP --enable-mdb
4213
4214         # Check whether --enable-mdb was given.
4215 if test "${enable_mdb+set}" = set; then :
4216   enableval=$enable_mdb;
4217         ol_arg=invalid
4218         for ol_val in no yes mod ; do
4219                 if test "$enableval" = "$ol_val" ; then
4220                         ol_arg="$ol_val"
4221                 fi
4222         done
4223         if test "$ol_arg" = "invalid" ; then
4224                 as_fn_error $? "bad value $enableval for --enable-mdb" "$LINENO" 5
4225         fi
4226         ol_enable_mdb="$ol_arg"
4227
4228 else
4229         ol_enable_mdb=${ol_enable_backends:-yes}
4230 fi
4231
4232 # end --enable-mdb
4233 # OpenLDAP --enable-meta
4234
4235         # Check whether --enable-meta was given.
4236 if test "${enable_meta+set}" = set; then :
4237   enableval=$enable_meta;
4238         ol_arg=invalid
4239         for ol_val in no yes mod ; do
4240                 if test "$enableval" = "$ol_val" ; then
4241                         ol_arg="$ol_val"
4242                 fi
4243         done
4244         if test "$ol_arg" = "invalid" ; then
4245                 as_fn_error $? "bad value $enableval for --enable-meta" "$LINENO" 5
4246         fi
4247         ol_enable_meta="$ol_arg"
4248
4249 else
4250         ol_enable_meta=${ol_enable_backends:-no}
4251 fi
4252
4253 # end --enable-meta
4254 # OpenLDAP --enable-monitor
4255
4256         # Check whether --enable-monitor was given.
4257 if test "${enable_monitor+set}" = set; then :
4258   enableval=$enable_monitor;
4259         ol_arg=invalid
4260         for ol_val in no yes mod ; do
4261                 if test "$enableval" = "$ol_val" ; then
4262                         ol_arg="$ol_val"
4263                 fi
4264         done
4265         if test "$ol_arg" = "invalid" ; then
4266                 as_fn_error $? "bad value $enableval for --enable-monitor" "$LINENO" 5
4267         fi
4268         ol_enable_monitor="$ol_arg"
4269
4270 else
4271         ol_enable_monitor=${ol_enable_backends:-yes}
4272 fi
4273
4274 # end --enable-monitor
4275 # OpenLDAP --enable-ndb
4276
4277         # Check whether --enable-ndb was given.
4278 if test "${enable_ndb+set}" = set; then :
4279   enableval=$enable_ndb;
4280         ol_arg=invalid
4281         for ol_val in no yes mod ; do
4282                 if test "$enableval" = "$ol_val" ; then
4283                         ol_arg="$ol_val"
4284                 fi
4285         done
4286         if test "$ol_arg" = "invalid" ; then
4287                 as_fn_error $? "bad value $enableval for --enable-ndb" "$LINENO" 5
4288         fi
4289         ol_enable_ndb="$ol_arg"
4290
4291 else
4292         ol_enable_ndb=${ol_enable_backends:-no}
4293 fi
4294
4295 # end --enable-ndb
4296 # OpenLDAP --enable-null
4297
4298         # Check whether --enable-null was given.
4299 if test "${enable_null+set}" = set; then :
4300   enableval=$enable_null;
4301         ol_arg=invalid
4302         for ol_val in no yes mod ; do
4303                 if test "$enableval" = "$ol_val" ; then
4304                         ol_arg="$ol_val"
4305                 fi
4306         done
4307         if test "$ol_arg" = "invalid" ; then
4308                 as_fn_error $? "bad value $enableval for --enable-null" "$LINENO" 5
4309         fi
4310         ol_enable_null="$ol_arg"
4311
4312 else
4313         ol_enable_null=${ol_enable_backends:-no}
4314 fi
4315
4316 # end --enable-null
4317 # OpenLDAP --enable-passwd
4318
4319         # Check whether --enable-passwd was given.
4320 if test "${enable_passwd+set}" = set; then :
4321   enableval=$enable_passwd;
4322         ol_arg=invalid
4323         for ol_val in no yes mod ; do
4324                 if test "$enableval" = "$ol_val" ; then
4325                         ol_arg="$ol_val"
4326                 fi
4327         done
4328         if test "$ol_arg" = "invalid" ; then
4329                 as_fn_error $? "bad value $enableval for --enable-passwd" "$LINENO" 5
4330         fi
4331         ol_enable_passwd="$ol_arg"
4332
4333 else
4334         ol_enable_passwd=${ol_enable_backends:-no}
4335 fi
4336
4337 # end --enable-passwd
4338 # OpenLDAP --enable-perl
4339
4340         # Check whether --enable-perl was given.
4341 if test "${enable_perl+set}" = set; then :
4342   enableval=$enable_perl;
4343         ol_arg=invalid
4344         for ol_val in no yes mod ; do
4345                 if test "$enableval" = "$ol_val" ; then
4346                         ol_arg="$ol_val"
4347                 fi
4348         done
4349         if test "$ol_arg" = "invalid" ; then
4350                 as_fn_error $? "bad value $enableval for --enable-perl" "$LINENO" 5
4351         fi
4352         ol_enable_perl="$ol_arg"
4353
4354 else
4355         ol_enable_perl=${ol_enable_backends:-no}
4356 fi
4357
4358 # end --enable-perl
4359 # OpenLDAP --enable-relay
4360
4361         # Check whether --enable-relay was given.
4362 if test "${enable_relay+set}" = set; then :
4363   enableval=$enable_relay;
4364         ol_arg=invalid
4365         for ol_val in no yes mod ; do
4366                 if test "$enableval" = "$ol_val" ; then
4367                         ol_arg="$ol_val"
4368                 fi
4369         done
4370         if test "$ol_arg" = "invalid" ; then
4371                 as_fn_error $? "bad value $enableval for --enable-relay" "$LINENO" 5
4372         fi
4373         ol_enable_relay="$ol_arg"
4374
4375 else
4376         ol_enable_relay=${ol_enable_backends:-yes}
4377 fi
4378
4379 # end --enable-relay
4380 # OpenLDAP --enable-shell
4381
4382         # Check whether --enable-shell was given.
4383 if test "${enable_shell+set}" = set; then :
4384   enableval=$enable_shell;
4385         ol_arg=invalid
4386         for ol_val in no yes mod ; do
4387                 if test "$enableval" = "$ol_val" ; then
4388                         ol_arg="$ol_val"
4389                 fi
4390         done
4391         if test "$ol_arg" = "invalid" ; then
4392                 as_fn_error $? "bad value $enableval for --enable-shell" "$LINENO" 5
4393         fi
4394         ol_enable_shell="$ol_arg"
4395
4396 else
4397         ol_enable_shell=${ol_enable_backends:-no}
4398 fi
4399
4400 # end --enable-shell
4401 # OpenLDAP --enable-sock
4402
4403         # Check whether --enable-sock was given.
4404 if test "${enable_sock+set}" = set; then :
4405   enableval=$enable_sock;
4406         ol_arg=invalid
4407         for ol_val in no yes mod ; do
4408                 if test "$enableval" = "$ol_val" ; then
4409                         ol_arg="$ol_val"
4410                 fi
4411         done
4412         if test "$ol_arg" = "invalid" ; then
4413                 as_fn_error $? "bad value $enableval for --enable-sock" "$LINENO" 5
4414         fi
4415         ol_enable_sock="$ol_arg"
4416
4417 else
4418         ol_enable_sock=${ol_enable_backends:-no}
4419 fi
4420
4421 # end --enable-sock
4422 # OpenLDAP --enable-sql
4423
4424         # Check whether --enable-sql was given.
4425 if test "${enable_sql+set}" = set; then :
4426   enableval=$enable_sql;
4427         ol_arg=invalid
4428         for ol_val in no yes mod ; do
4429                 if test "$enableval" = "$ol_val" ; then
4430                         ol_arg="$ol_val"
4431                 fi
4432         done
4433         if test "$ol_arg" = "invalid" ; then
4434                 as_fn_error $? "bad value $enableval for --enable-sql" "$LINENO" 5
4435         fi
4436         ol_enable_sql="$ol_arg"
4437
4438 else
4439         ol_enable_sql=${ol_enable_backends:-no}
4440 fi
4441
4442 # end --enable-sql
4443
4444 Overlays="accesslog \
4445         auditlog \
4446         collect \
4447         constraint \
4448         dds \
4449         deref \
4450         dyngroup \
4451         dynlist \
4452         memberof \
4453         ppolicy \
4454         proxycache \
4455         refint \
4456         retcode \
4457         rwm \
4458         seqmod \
4459         sssvlv \
4460         syncprov \
4461         translucent \
4462         unique \
4463         valsort"
4464
4465 # Check whether --enable-xxslapoverlays was given.
4466 if test "${enable_xxslapoverlays+set}" = set; then :
4467   enableval=$enable_xxslapoverlays;
4468 fi
4469
4470
4471 # OpenLDAP --enable-overlays
4472
4473         # Check whether --enable-overlays was given.
4474 if test "${enable_overlays+set}" = set; then :
4475   enableval=$enable_overlays;
4476         ol_arg=invalid
4477         for ol_val in no yes mod ; do
4478                 if test "$enableval" = "$ol_val" ; then
4479                         ol_arg="$ol_val"
4480                 fi
4481         done
4482         if test "$ol_arg" = "invalid" ; then
4483                 as_fn_error $? "bad value $enableval for --enable-overlays" "$LINENO" 5
4484         fi
4485         ol_enable_overlays="$ol_arg"
4486
4487 fi
4488
4489 # end --enable-overlays
4490 # OpenLDAP --enable-accesslog
4491
4492         # Check whether --enable-accesslog was given.
4493 if test "${enable_accesslog+set}" = set; then :
4494   enableval=$enable_accesslog;
4495         ol_arg=invalid
4496         for ol_val in no yes mod ; do
4497                 if test "$enableval" = "$ol_val" ; then
4498                         ol_arg="$ol_val"
4499                 fi
4500         done
4501         if test "$ol_arg" = "invalid" ; then
4502                 as_fn_error $? "bad value $enableval for --enable-accesslog" "$LINENO" 5
4503         fi
4504         ol_enable_accesslog="$ol_arg"
4505
4506 else
4507         ol_enable_accesslog=${ol_enable_overlays:-no}
4508 fi
4509
4510 # end --enable-accesslog
4511
4512 # OpenLDAP --enable-auditlog
4513
4514         # Check whether --enable-auditlog was given.
4515 if test "${enable_auditlog+set}" = set; then :
4516   enableval=$enable_auditlog;
4517         ol_arg=invalid
4518         for ol_val in no yes mod ; do
4519                 if test "$enableval" = "$ol_val" ; then
4520                         ol_arg="$ol_val"
4521                 fi
4522         done
4523         if test "$ol_arg" = "invalid" ; then
4524                 as_fn_error $? "bad value $enableval for --enable-auditlog" "$LINENO" 5
4525         fi
4526         ol_enable_auditlog="$ol_arg"
4527
4528 else
4529         ol_enable_auditlog=${ol_enable_overlays:-no}
4530 fi
4531
4532 # end --enable-auditlog
4533
4534 # OpenLDAP --enable-collect
4535
4536         # Check whether --enable-collect was given.
4537 if test "${enable_collect+set}" = set; then :
4538   enableval=$enable_collect;
4539         ol_arg=invalid
4540         for ol_val in no yes mod ; do
4541                 if test "$enableval" = "$ol_val" ; then
4542                         ol_arg="$ol_val"
4543                 fi
4544         done
4545         if test "$ol_arg" = "invalid" ; then
4546                 as_fn_error $? "bad value $enableval for --enable-collect" "$LINENO" 5
4547         fi
4548         ol_enable_collect="$ol_arg"
4549
4550 else
4551         ol_enable_collect=${ol_enable_overlays:-no}
4552 fi
4553
4554 # end --enable-collect
4555
4556 # OpenLDAP --enable-constraint
4557
4558         # Check whether --enable-constraint was given.
4559 if test "${enable_constraint+set}" = set; then :
4560   enableval=$enable_constraint;
4561         ol_arg=invalid
4562         for ol_val in no yes mod ; do
4563                 if test "$enableval" = "$ol_val" ; then
4564                         ol_arg="$ol_val"
4565                 fi
4566         done
4567         if test "$ol_arg" = "invalid" ; then
4568                 as_fn_error $? "bad value $enableval for --enable-constraint" "$LINENO" 5
4569         fi
4570         ol_enable_constraint="$ol_arg"
4571
4572 else
4573         ol_enable_constraint=${ol_enable_overlays:-no}
4574 fi
4575
4576 # end --enable-constraint
4577
4578 # OpenLDAP --enable-dds
4579
4580         # Check whether --enable-dds was given.
4581 if test "${enable_dds+set}" = set; then :
4582   enableval=$enable_dds;
4583         ol_arg=invalid
4584         for ol_val in no yes mod ; do
4585                 if test "$enableval" = "$ol_val" ; then
4586                         ol_arg="$ol_val"
4587                 fi
4588         done
4589         if test "$ol_arg" = "invalid" ; then
4590                 as_fn_error $? "bad value $enableval for --enable-dds" "$LINENO" 5
4591         fi
4592         ol_enable_dds="$ol_arg"
4593
4594 else
4595         ol_enable_dds=${ol_enable_overlays:-no}
4596 fi
4597
4598 # end --enable-dds
4599
4600 # OpenLDAP --enable-deref
4601
4602         # Check whether --enable-deref was given.
4603 if test "${enable_deref+set}" = set; then :
4604   enableval=$enable_deref;
4605         ol_arg=invalid
4606         for ol_val in no yes mod ; do
4607                 if test "$enableval" = "$ol_val" ; then
4608                         ol_arg="$ol_val"
4609                 fi
4610         done
4611         if test "$ol_arg" = "invalid" ; then
4612                 as_fn_error $? "bad value $enableval for --enable-deref" "$LINENO" 5
4613         fi
4614         ol_enable_deref="$ol_arg"
4615
4616 else
4617         ol_enable_deref=${ol_enable_overlays:-no}
4618 fi
4619
4620 # end --enable-deref
4621
4622 # OpenLDAP --enable-dyngroup
4623
4624         # Check whether --enable-dyngroup was given.
4625 if test "${enable_dyngroup+set}" = set; then :
4626   enableval=$enable_dyngroup;
4627         ol_arg=invalid
4628         for ol_val in no yes mod ; do
4629                 if test "$enableval" = "$ol_val" ; then
4630                         ol_arg="$ol_val"
4631                 fi
4632         done
4633         if test "$ol_arg" = "invalid" ; then
4634                 as_fn_error $? "bad value $enableval for --enable-dyngroup" "$LINENO" 5
4635         fi
4636         ol_enable_dyngroup="$ol_arg"
4637
4638 else
4639         ol_enable_dyngroup=${ol_enable_overlays:-no}
4640 fi
4641
4642 # end --enable-dyngroup
4643
4644 # OpenLDAP --enable-dynlist
4645
4646         # Check whether --enable-dynlist was given.
4647 if test "${enable_dynlist+set}" = set; then :
4648   enableval=$enable_dynlist;
4649         ol_arg=invalid
4650         for ol_val in no yes mod ; do
4651                 if test "$enableval" = "$ol_val" ; then
4652                         ol_arg="$ol_val"
4653                 fi
4654         done
4655         if test "$ol_arg" = "invalid" ; then
4656                 as_fn_error $? "bad value $enableval for --enable-dynlist" "$LINENO" 5
4657         fi
4658         ol_enable_dynlist="$ol_arg"
4659
4660 else
4661         ol_enable_dynlist=${ol_enable_overlays:-no}
4662 fi
4663
4664 # end --enable-dynlist
4665
4666 # OpenLDAP --enable-memberof
4667
4668         # Check whether --enable-memberof was given.
4669 if test "${enable_memberof+set}" = set; then :
4670   enableval=$enable_memberof;
4671         ol_arg=invalid
4672         for ol_val in no yes mod ; do
4673                 if test "$enableval" = "$ol_val" ; then
4674                         ol_arg="$ol_val"
4675                 fi
4676         done
4677         if test "$ol_arg" = "invalid" ; then
4678                 as_fn_error $? "bad value $enableval for --enable-memberof" "$LINENO" 5
4679         fi
4680         ol_enable_memberof="$ol_arg"
4681
4682 else
4683         ol_enable_memberof=${ol_enable_overlays:-no}
4684 fi
4685
4686 # end --enable-memberof
4687
4688 # OpenLDAP --enable-ppolicy
4689
4690         # Check whether --enable-ppolicy was given.
4691 if test "${enable_ppolicy+set}" = set; then :
4692   enableval=$enable_ppolicy;
4693         ol_arg=invalid
4694         for ol_val in no yes mod ; do
4695                 if test "$enableval" = "$ol_val" ; then
4696                         ol_arg="$ol_val"
4697                 fi
4698         done
4699         if test "$ol_arg" = "invalid" ; then
4700                 as_fn_error $? "bad value $enableval for --enable-ppolicy" "$LINENO" 5
4701         fi
4702         ol_enable_ppolicy="$ol_arg"
4703
4704 else
4705         ol_enable_ppolicy=${ol_enable_overlays:-no}
4706 fi
4707
4708 # end --enable-ppolicy
4709
4710 # OpenLDAP --enable-proxycache
4711
4712         # Check whether --enable-proxycache was given.
4713 if test "${enable_proxycache+set}" = set; then :
4714   enableval=$enable_proxycache;
4715         ol_arg=invalid
4716         for ol_val in no yes mod ; do
4717                 if test "$enableval" = "$ol_val" ; then
4718                         ol_arg="$ol_val"
4719                 fi
4720         done
4721         if test "$ol_arg" = "invalid" ; then
4722                 as_fn_error $? "bad value $enableval for --enable-proxycache" "$LINENO" 5
4723         fi
4724         ol_enable_proxycache="$ol_arg"
4725
4726 else
4727         ol_enable_proxycache=${ol_enable_overlays:-no}
4728 fi
4729
4730 # end --enable-proxycache
4731
4732 # OpenLDAP --enable-refint
4733
4734         # Check whether --enable-refint was given.
4735 if test "${enable_refint+set}" = set; then :
4736   enableval=$enable_refint;
4737         ol_arg=invalid
4738         for ol_val in no yes mod ; do
4739                 if test "$enableval" = "$ol_val" ; then
4740                         ol_arg="$ol_val"
4741                 fi
4742         done
4743         if test "$ol_arg" = "invalid" ; then
4744                 as_fn_error $? "bad value $enableval for --enable-refint" "$LINENO" 5
4745         fi
4746         ol_enable_refint="$ol_arg"
4747
4748 else
4749         ol_enable_refint=${ol_enable_overlays:-no}
4750 fi
4751
4752 # end --enable-refint
4753
4754 # OpenLDAP --enable-retcode
4755
4756         # Check whether --enable-retcode was given.
4757 if test "${enable_retcode+set}" = set; then :
4758   enableval=$enable_retcode;
4759         ol_arg=invalid
4760         for ol_val in no yes mod ; do
4761                 if test "$enableval" = "$ol_val" ; then
4762                         ol_arg="$ol_val"
4763                 fi
4764         done
4765         if test "$ol_arg" = "invalid" ; then
4766                 as_fn_error $? "bad value $enableval for --enable-retcode" "$LINENO" 5
4767         fi
4768         ol_enable_retcode="$ol_arg"
4769
4770 else
4771         ol_enable_retcode=${ol_enable_overlays:-no}
4772 fi
4773
4774 # end --enable-retcode
4775
4776 # OpenLDAP --enable-rwm
4777
4778         # Check whether --enable-rwm was given.
4779 if test "${enable_rwm+set}" = set; then :
4780   enableval=$enable_rwm;
4781         ol_arg=invalid
4782         for ol_val in no yes mod ; do
4783                 if test "$enableval" = "$ol_val" ; then
4784                         ol_arg="$ol_val"
4785                 fi
4786         done
4787         if test "$ol_arg" = "invalid" ; then
4788                 as_fn_error $? "bad value $enableval for --enable-rwm" "$LINENO" 5
4789         fi
4790         ol_enable_rwm="$ol_arg"
4791
4792 else
4793         ol_enable_rwm=${ol_enable_overlays:-no}
4794 fi
4795
4796 # end --enable-rwm
4797
4798 # OpenLDAP --enable-seqmod
4799
4800         # Check whether --enable-seqmod was given.
4801 if test "${enable_seqmod+set}" = set; then :
4802   enableval=$enable_seqmod;
4803         ol_arg=invalid
4804         for ol_val in no yes mod ; do
4805                 if test "$enableval" = "$ol_val" ; then
4806                         ol_arg="$ol_val"
4807                 fi
4808         done
4809         if test "$ol_arg" = "invalid" ; then
4810                 as_fn_error $? "bad value $enableval for --enable-seqmod" "$LINENO" 5
4811         fi
4812         ol_enable_seqmod="$ol_arg"
4813
4814 else
4815         ol_enable_seqmod=${ol_enable_overlays:-no}
4816 fi
4817
4818 # end --enable-seqmod
4819
4820 # OpenLDAP --enable-sssvlv
4821
4822         # Check whether --enable-sssvlv was given.
4823 if test "${enable_sssvlv+set}" = set; then :
4824   enableval=$enable_sssvlv;
4825         ol_arg=invalid
4826         for ol_val in no yes mod ; do
4827                 if test "$enableval" = "$ol_val" ; then
4828                         ol_arg="$ol_val"
4829                 fi
4830         done
4831         if test "$ol_arg" = "invalid" ; then
4832                 as_fn_error $? "bad value $enableval for --enable-sssvlv" "$LINENO" 5
4833         fi
4834         ol_enable_sssvlv="$ol_arg"
4835
4836 else
4837         ol_enable_sssvlv=${ol_enable_overlays:-no}
4838 fi
4839
4840 # end --enable-sssvlv
4841
4842 # OpenLDAP --enable-syncprov
4843
4844         # Check whether --enable-syncprov was given.
4845 if test "${enable_syncprov+set}" = set; then :
4846   enableval=$enable_syncprov;
4847         ol_arg=invalid
4848         for ol_val in no yes mod ; do
4849                 if test "$enableval" = "$ol_val" ; then
4850                         ol_arg="$ol_val"
4851                 fi
4852         done
4853         if test "$ol_arg" = "invalid" ; then
4854                 as_fn_error $? "bad value $enableval for --enable-syncprov" "$LINENO" 5
4855         fi
4856         ol_enable_syncprov="$ol_arg"
4857
4858 else
4859         ol_enable_syncprov=${ol_enable_overlays:-yes}
4860 fi
4861
4862 # end --enable-syncprov
4863
4864 # OpenLDAP --enable-translucent
4865
4866         # Check whether --enable-translucent was given.
4867 if test "${enable_translucent+set}" = set; then :
4868   enableval=$enable_translucent;
4869         ol_arg=invalid
4870         for ol_val in no yes mod ; do
4871                 if test "$enableval" = "$ol_val" ; then
4872                         ol_arg="$ol_val"
4873                 fi
4874         done
4875         if test "$ol_arg" = "invalid" ; then
4876                 as_fn_error $? "bad value $enableval for --enable-translucent" "$LINENO" 5
4877         fi
4878         ol_enable_translucent="$ol_arg"
4879
4880 else
4881         ol_enable_translucent=${ol_enable_overlays:-no}
4882 fi
4883
4884 # end --enable-translucent
4885
4886 # OpenLDAP --enable-unique
4887
4888         # Check whether --enable-unique was given.
4889 if test "${enable_unique+set}" = set; then :
4890   enableval=$enable_unique;
4891         ol_arg=invalid
4892         for ol_val in no yes mod ; do
4893                 if test "$enableval" = "$ol_val" ; then
4894                         ol_arg="$ol_val"
4895                 fi
4896         done
4897         if test "$ol_arg" = "invalid" ; then
4898                 as_fn_error $? "bad value $enableval for --enable-unique" "$LINENO" 5
4899         fi
4900         ol_enable_unique="$ol_arg"
4901
4902 else
4903         ol_enable_unique=${ol_enable_overlays:-no}
4904 fi
4905
4906 # end --enable-unique
4907
4908 # OpenLDAP --enable-valsort
4909
4910         # Check whether --enable-valsort was given.
4911 if test "${enable_valsort+set}" = set; then :
4912   enableval=$enable_valsort;
4913         ol_arg=invalid
4914         for ol_val in no yes mod ; do
4915                 if test "$enableval" = "$ol_val" ; then
4916                         ol_arg="$ol_val"
4917                 fi
4918         done
4919         if test "$ol_arg" = "invalid" ; then
4920                 as_fn_error $? "bad value $enableval for --enable-valsort" "$LINENO" 5
4921         fi
4922         ol_enable_valsort="$ol_arg"
4923
4924 else
4925         ol_enable_valsort=${ol_enable_overlays:-no}
4926 fi
4927
4928 # end --enable-valsort
4929
4930
4931 # Check whether --enable-xxliboptions was given.
4932 if test "${enable_xxliboptions+set}" = set; then :
4933   enableval=$enable_xxliboptions;
4934 fi
4935
4936 # Check whether --enable-static was given.
4937 if test "${enable_static+set}" = set; then :
4938   enableval=$enable_static; p=${PACKAGE-default}
4939     case $enableval in
4940     yes) enable_static=yes ;;
4941     no) enable_static=no ;;
4942     *)
4943      enable_static=no
4944       # Look at the argument we got.  We use all the common list separators.
4945       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4946       for pkg in $enableval; do
4947         IFS="$lt_save_ifs"
4948         if test "X$pkg" = "X$p"; then
4949           enable_static=yes
4950         fi
4951       done
4952       IFS="$lt_save_ifs"
4953       ;;
4954     esac
4955 else
4956   enable_static=yes
4957 fi
4958
4959
4960 # Check whether --enable-shared was given.
4961 if test "${enable_shared+set}" = set; then :
4962   enableval=$enable_shared; p=${PACKAGE-default}
4963     case $enableval in
4964     yes) enable_shared=yes ;;
4965     no) enable_shared=no ;;
4966     *)
4967       enable_shared=no
4968       # Look at the argument we got.  We use all the common list separators.
4969       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4970       for pkg in $enableval; do
4971         IFS="$lt_save_ifs"
4972         if test "X$pkg" = "X$p"; then
4973           enable_shared=yes
4974         fi
4975       done
4976       IFS="$lt_save_ifs"
4977       ;;
4978     esac
4979 else
4980   enable_shared=yes
4981 fi
4982
4983
4984
4985
4986 # validate options
4987 if test $ol_enable_slapd = no ; then
4988                 if test $ol_enable_slapi = yes ; then
4989                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
4990 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
4991         fi
4992         case "$ol_enable_backends" in yes | mod)
4993                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
4994 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
4995         esac
4996         for i in $Backends; do
4997                 eval "ol_tmp=\$ol_enable_$i"
4998                 if test $ol_tmp != no ; then
4999                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
5000 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
5001                         eval "ol_enable_$i=no"
5002                 fi
5003         done
5004         if test $ol_enable_modules = yes ; then
5005                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
5006 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
5007         fi
5008         if test $ol_enable_wrappers = yes ; then
5009                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
5010 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
5011         fi
5012         if test $ol_enable_rlookups = yes ; then
5013                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
5014 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
5015         fi
5016         if test $ol_enable_dynacl = yes ; then
5017                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
5018 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
5019         fi
5020         if test $ol_enable_aci != no ; then
5021                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
5022 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
5023         fi
5024         if test $ol_enable_rewrite = yes ; then
5025                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
5026 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
5027         fi
5028                 case "$ol_enable_overlays" in yes | mod)
5029                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
5030 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
5031         esac
5032         for i in $Overlays; do
5033                 eval "ol_tmp=\$ol_enable_$i"
5034                 if test $ol_tmp != no ; then
5035                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
5036 $as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
5037                         eval "ol_enable_$i=no"
5038                 fi
5039         done
5040
5041         # force settings to no
5042         ol_enable_slapi=no
5043
5044         ol_enable_backends=
5045         ol_enable_overlays=
5046         ol_enable_modules=no
5047         ol_enable_rlookups=no
5048         ol_enable_dynacl=no
5049         ol_enable_aci=no
5050         ol_enable_wrappers=no
5051
5052         ol_enable_rewrite=no
5053
5054 elif test $ol_enable_modules != yes &&
5055         test $ol_enable_bdb = no &&
5056         test $ol_enable_dnssrv = no &&
5057         test $ol_enable_hdb = no &&
5058         test $ol_enable_ldap = no &&
5059         test $ol_enable_mdb = no &&
5060         test $ol_enable_meta = no &&
5061         test $ol_enable_monitor = no &&
5062         test $ol_enable_ndb = no &&
5063         test $ol_enable_null = no &&
5064         test $ol_enable_passwd = no &&
5065         test $ol_enable_perl = no &&
5066         test $ol_enable_relay = no &&
5067         test $ol_enable_shell = no &&
5068         test $ol_enable_sock = no &&
5069         test $ol_enable_sql = no ; then
5070
5071         if test $ol_enable_slapd = yes ; then
5072                 as_fn_error $? "slapd requires a backend" "$LINENO" 5
5073         else
5074                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipping slapd, no backend specified" >&5
5075 $as_echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
5076                 ol_enable_slapd=no
5077         fi
5078 fi
5079
5080 if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
5081         as_fn_error $? "--enable-meta requires --enable-ldap" "$LINENO" 5
5082 fi
5083
5084 if test $ol_enable_lmpasswd = yes ; then
5085         if test $ol_with_tls = no ; then
5086                 as_fn_error $? "LAN Manager passwords require OpenSSL" "$LINENO" 5
5087         fi
5088 fi
5089
5090 if test $ol_enable_spasswd = yes ; then
5091         if test $ol_with_cyrus_sasl = no ; then
5092                 as_fn_error $? "options require --with-cyrus-sasl" "$LINENO" 5
5093         fi
5094         ol_with_cyrus_sasl=yes
5095 fi
5096
5097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
5098 $as_echo "done" >&6; }
5099
5100 LDAP_LIBS=
5101 BDB_LIBS=
5102 SLAPD_NDB_LIBS=
5103 SLAPD_NDB_INCS=
5104 LTHREAD_LIBS=
5105 LUTIL_LIBS=
5106
5107 SLAPD_LIBS=
5108
5109 BUILD_SLAPD=no
5110
5111 BUILD_THREAD=no
5112
5113 BUILD_SLAPI=no
5114 SLAPD_SLAPI_DEPEND=
5115
5116 BUILD_BDB=no
5117 BUILD_DNSSRV=no
5118 BUILD_HDB=no
5119 BUILD_LDAP=no
5120 BUILD_MDB=no
5121 BUILD_META=no
5122 BUILD_MONITOR=no
5123 BUILD_NDB=no
5124 BUILD_NULL=no
5125 BUILD_PASSWD=no
5126 BUILD_PERL=no
5127 BUILD_RELAY=no
5128 BUILD_SHELL=no
5129 BUILD_SOCK=no
5130 BUILD_SQL=no
5131
5132 BUILD_ACCESSLOG=no
5133 BUILD_AUDITLOG=no
5134 BUILD_CONSTRAINT=no
5135 BUILD_DDS=no
5136 BUILD_DENYOP=no
5137 BUILD_DEREF=no
5138 BUILD_DYNGROUP=no
5139 BUILD_DYNLIST=no
5140 BUILD_LASTMOD=no
5141 BUILD_MEMBEROF=no
5142 BUILD_PPOLICY=no
5143 BUILD_PROXYCACHE=no
5144 BUILD_REFINT=no
5145 BUILD_RETCODE=no
5146 BUILD_RWM=no
5147 BUILD_SEQMOD=no
5148 BUILD_SSSVLV=no
5149 BUILD_SYNCPROV=no
5150 BUILD_TRANSLUCENT=no
5151 BUILD_UNIQUE=no
5152 BUILD_VALSORT=no
5153
5154 SLAPD_STATIC_OVERLAYS=
5155 SLAPD_DYNAMIC_OVERLAYS=
5156
5157 SLAPD_MODULES_LDFLAGS=
5158 SLAPD_MODULES_CPPFLAGS=
5159
5160 SLAPD_STATIC_BACKENDS=back-ldif
5161 SLAPD_DYNAMIC_BACKENDS=
5162
5163 SLAPD_PERL_LDFLAGS=
5164 MOD_PERL_LDFLAGS=
5165 PERL_CPPFLAGS=
5166
5167 SLAPD_SQL_LDFLAGS=
5168 SLAPD_SQL_LIBS=
5169 SLAPD_SQL_INCLUDES=
5170
5171 KRB4_LIBS=
5172 KRB5_LIBS=
5173 SASL_LIBS=
5174 TLS_LIBS=
5175 MODULES_LIBS=
5176 SLAPI_LIBS=
5177 LIBSLAPI=
5178 AUTH_LIBS=
5179 ICU_LIBS=
5180
5181 SLAPD_SLP_LIBS=
5182 SLAPD_GMP_LIBS=
5183
5184
5185
5186 $as_echo "#define HAVE_MKVERSION 1" >>confdefs.h
5187
5188
5189
5190
5191 ol_aix_threads=no
5192 case "$target" in
5193 *-*-aix*)       if test -z "$CC" ; then
5194                 case "$ol_with_threads" in
5195                 auto | yes |  posix) ol_aix_threads=yes ;;
5196                 esac
5197         fi
5198 ;;
5199 esac
5200
5201 if test $ol_aix_threads = yes ; then
5202         if test -z "${CC}" ; then
5203                 for ac_prog in cc_r xlc_r cc
5204 do
5205   # Extract the first word of "$ac_prog", so it can be a program name with args.
5206 set dummy $ac_prog; ac_word=$2
5207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5208 $as_echo_n "checking for $ac_word... " >&6; }
5209 if ${ac_cv_prog_CC+:} false; then :
5210   $as_echo_n "(cached) " >&6
5211 else
5212   if test -n "$CC"; then
5213   ac_cv_prog_CC="$CC" # Let the user override the test.
5214 else
5215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5216 for as_dir in $PATH
5217 do
5218   IFS=$as_save_IFS
5219   test -z "$as_dir" && as_dir=.
5220     for ac_exec_ext in '' $ac_executable_extensions; do
5221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5222     ac_cv_prog_CC="$ac_prog"
5223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5224     break 2
5225   fi
5226 done
5227   done
5228 IFS=$as_save_IFS
5229
5230 fi
5231 fi
5232 CC=$ac_cv_prog_CC
5233 if test -n "$CC"; then
5234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5235 $as_echo "$CC" >&6; }
5236 else
5237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238 $as_echo "no" >&6; }
5239 fi
5240
5241
5242   test -n "$CC" && break
5243 done
5244
5245
5246                 if test "$CC" = cc ; then
5247                                                 if test $ol_with_threads != auto ; then
5248                                 as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
5249                         else
5250                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
5251 $as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
5252                         fi
5253                         ol_with_threads=no
5254                 fi
5255         fi
5256
5257         case ${CC} in cc_r | xlc_r)
5258                 ol_with_threads=posix
5259                 ol_cv_pthread_create=yes
5260                 ;;
5261         esac
5262 fi
5263
5264 if test -z "${CC}"; then
5265         for ac_prog in cc gcc
5266 do
5267   # Extract the first word of "$ac_prog", so it can be a program name with args.
5268 set dummy $ac_prog; ac_word=$2
5269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5270 $as_echo_n "checking for $ac_word... " >&6; }
5271 if ${ac_cv_prog_CC+:} false; then :
5272   $as_echo_n "(cached) " >&6
5273 else
5274   if test -n "$CC"; then
5275   ac_cv_prog_CC="$CC" # Let the user override the test.
5276 else
5277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5278 for as_dir in $PATH
5279 do
5280   IFS=$as_save_IFS
5281   test -z "$as_dir" && as_dir=.
5282     for ac_exec_ext in '' $ac_executable_extensions; do
5283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5284     ac_cv_prog_CC="$ac_prog"
5285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5286     break 2
5287   fi
5288 done
5289   done
5290 IFS=$as_save_IFS
5291
5292 fi
5293 fi
5294 CC=$ac_cv_prog_CC
5295 if test -n "$CC"; then
5296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5297 $as_echo "$CC" >&6; }
5298 else
5299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5300 $as_echo "no" >&6; }
5301 fi
5302
5303
5304   test -n "$CC" && break
5305 done
5306 test -n "$CC" || CC="missing"
5307
5308
5309         if test "${CC}" = "missing" ; then
5310                 as_fn_error $? "Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." "$LINENO" 5
5311         fi
5312 fi
5313
5314 if test -z "${AR}"; then
5315         for ac_prog in ar gar
5316 do
5317   # Extract the first word of "$ac_prog", so it can be a program name with args.
5318 set dummy $ac_prog; ac_word=$2
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5320 $as_echo_n "checking for $ac_word... " >&6; }
5321 if ${ac_cv_prog_AR+:} false; then :
5322   $as_echo_n "(cached) " >&6
5323 else
5324   if test -n "$AR"; then
5325   ac_cv_prog_AR="$AR" # Let the user override the test.
5326 else
5327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5328 for as_dir in $PATH
5329 do
5330   IFS=$as_save_IFS
5331   test -z "$as_dir" && as_dir=.
5332     for ac_exec_ext in '' $ac_executable_extensions; do
5333   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5334     ac_cv_prog_AR="$ac_prog"
5335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5336     break 2
5337   fi
5338 done
5339   done
5340 IFS=$as_save_IFS
5341
5342 fi
5343 fi
5344 AR=$ac_cv_prog_AR
5345 if test -n "$AR"; then
5346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5347 $as_echo "$AR" >&6; }
5348 else
5349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350 $as_echo "no" >&6; }
5351 fi
5352
5353
5354   test -n "$AR" && break
5355 done
5356 test -n "$AR" || AR="missing"
5357
5358
5359         if test "${AR}" = "missing" ; then
5360                 as_fn_error $? "Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." "$LINENO" 5
5361         fi
5362 fi
5363
5364
5365
5366
5367
5368 # Check whether --enable-fast-install was given.
5369 if test "${enable_fast_install+set}" = set; then :
5370   enableval=$enable_fast_install; p=${PACKAGE-default}
5371     case $enableval in
5372     yes) enable_fast_install=yes ;;
5373     no) enable_fast_install=no ;;
5374     *)
5375       enable_fast_install=no
5376       # Look at the argument we got.  We use all the common list separators.
5377       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5378       for pkg in $enableval; do
5379         IFS="$lt_save_ifs"
5380         if test "X$pkg" = "X$p"; then
5381           enable_fast_install=yes
5382         fi
5383       done
5384       IFS="$lt_save_ifs"
5385       ;;
5386     esac
5387 else
5388   enable_fast_install=yes
5389 fi
5390
5391
5392 DEPDIR="${am__leading_dot}deps"
5393
5394 ac_config_commands="$ac_config_commands depfiles"
5395
5396
5397 am_make=${MAKE-make}
5398 cat > confinc << 'END'
5399 am__doit:
5400         @echo done
5401 .PHONY: am__doit
5402 END
5403 # If we don't find an include directive, just comment out the code.
5404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5405 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5406 am__include="#"
5407 am__quote=
5408 _am_result=none
5409 # First try GNU make style include.
5410 echo "include confinc" > confmf
5411 # We grep out `Entering directory' and `Leaving directory'
5412 # messages which can occur if `w' ends up in MAKEFLAGS.
5413 # In particular we don't look at `^make:' because GNU make might
5414 # be invoked under some other name (usually "gmake"), in which
5415 # case it prints its new name instead of `make'.
5416 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
5417    am__include=include
5418    am__quote=
5419    _am_result=GNU
5420 fi
5421 # Now try BSD make style include.
5422 if test "$am__include" = "#"; then
5423    echo '.include "confinc"' > confmf
5424    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
5425       am__include=.include
5426       am__quote="\""
5427       _am_result=BSD
5428    fi
5429 fi
5430
5431
5432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5433 $as_echo "$_am_result" >&6; }
5434 rm -f confinc confmf
5435
5436 # Check whether --enable-dependency-tracking was given.
5437 if test "${enable_dependency_tracking+set}" = set; then :
5438   enableval=$enable_dependency_tracking;
5439 fi
5440
5441 if test "x$enable_dependency_tracking" != xno; then
5442   am_depcomp="$ac_aux_dir/depcomp"
5443   AMDEPBACKSLASH='\'
5444 fi
5445
5446
5447 if test "x$enable_dependency_tracking" != xno; then
5448   AMDEP_TRUE=
5449   AMDEP_FALSE='#'
5450 else
5451   AMDEP_TRUE='#'
5452   AMDEP_FALSE=
5453 fi
5454
5455
5456
5457 ac_ext=c
5458 ac_cpp='$CPP $CPPFLAGS'
5459 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5460 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5461 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5462 if test -n "$ac_tool_prefix"; then
5463   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5464 set dummy ${ac_tool_prefix}gcc; ac_word=$2
5465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5466 $as_echo_n "checking for $ac_word... " >&6; }
5467 if ${ac_cv_prog_CC+:} false; then :
5468   $as_echo_n "(cached) " >&6
5469 else
5470   if test -n "$CC"; then
5471   ac_cv_prog_CC="$CC" # Let the user override the test.
5472 else
5473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5474 for as_dir in $PATH
5475 do
5476   IFS=$as_save_IFS
5477   test -z "$as_dir" && as_dir=.
5478     for ac_exec_ext in '' $ac_executable_extensions; do
5479   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5480     ac_cv_prog_CC="${ac_tool_prefix}gcc"
5481     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5482     break 2
5483   fi
5484 done
5485   done
5486 IFS=$as_save_IFS
5487
5488 fi
5489 fi
5490 CC=$ac_cv_prog_CC
5491 if test -n "$CC"; then
5492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5493 $as_echo "$CC" >&6; }
5494 else
5495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5496 $as_echo "no" >&6; }
5497 fi
5498
5499
5500 fi
5501 if test -z "$ac_cv_prog_CC"; then
5502   ac_ct_CC=$CC
5503   # Extract the first word of "gcc", so it can be a program name with args.
5504 set dummy gcc; ac_word=$2
5505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5506 $as_echo_n "checking for $ac_word... " >&6; }
5507 if ${ac_cv_prog_ac_ct_CC+:} false; then :
5508   $as_echo_n "(cached) " >&6
5509 else
5510   if test -n "$ac_ct_CC"; then
5511   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5512 else
5513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5514 for as_dir in $PATH
5515 do
5516   IFS=$as_save_IFS
5517   test -z "$as_dir" && as_dir=.
5518     for ac_exec_ext in '' $ac_executable_extensions; do
5519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5520     ac_cv_prog_ac_ct_CC="gcc"
5521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5522     break 2
5523   fi
5524 done
5525   done
5526 IFS=$as_save_IFS
5527
5528 fi
5529 fi
5530 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5531 if test -n "$ac_ct_CC"; then
5532   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5533 $as_echo "$ac_ct_CC" >&6; }
5534 else
5535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536 $as_echo "no" >&6; }
5537 fi
5538
5539   if test "x$ac_ct_CC" = x; then
5540     CC=""
5541   else
5542     case $cross_compiling:$ac_tool_warned in
5543 yes:)
5544 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5545 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5546 ac_tool_warned=yes ;;
5547 esac
5548     CC=$ac_ct_CC
5549   fi
5550 else
5551   CC="$ac_cv_prog_CC"
5552 fi
5553
5554 if test -z "$CC"; then
5555           if test -n "$ac_tool_prefix"; then
5556     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5557 set dummy ${ac_tool_prefix}cc; ac_word=$2
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5559 $as_echo_n "checking for $ac_word... " >&6; }
5560 if ${ac_cv_prog_CC+:} false; then :
5561   $as_echo_n "(cached) " >&6
5562 else
5563   if test -n "$CC"; then
5564   ac_cv_prog_CC="$CC" # Let the user override the test.
5565 else
5566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5567 for as_dir in $PATH
5568 do
5569   IFS=$as_save_IFS
5570   test -z "$as_dir" && as_dir=.
5571     for ac_exec_ext in '' $ac_executable_extensions; do
5572   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5573     ac_cv_prog_CC="${ac_tool_prefix}cc"
5574     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5575     break 2
5576   fi
5577 done
5578   done
5579 IFS=$as_save_IFS
5580
5581 fi
5582 fi
5583 CC=$ac_cv_prog_CC
5584 if test -n "$CC"; then
5585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5586 $as_echo "$CC" >&6; }
5587 else
5588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5589 $as_echo "no" >&6; }
5590 fi
5591
5592
5593   fi
5594 fi
5595 if test -z "$CC"; then
5596   # Extract the first word of "cc", so it can be a program name with args.
5597 set dummy cc; ac_word=$2
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5599 $as_echo_n "checking for $ac_word... " >&6; }
5600 if ${ac_cv_prog_CC+:} false; then :
5601   $as_echo_n "(cached) " >&6
5602 else
5603   if test -n "$CC"; then
5604   ac_cv_prog_CC="$CC" # Let the user override the test.
5605 else
5606   ac_prog_rejected=no
5607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5608 for as_dir in $PATH
5609 do
5610   IFS=$as_save_IFS
5611   test -z "$as_dir" && as_dir=.
5612     for ac_exec_ext in '' $ac_executable_extensions; do
5613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5614     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5615        ac_prog_rejected=yes
5616        continue
5617      fi
5618     ac_cv_prog_CC="cc"
5619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5620     break 2
5621   fi
5622 done
5623   done
5624 IFS=$as_save_IFS
5625
5626 if test $ac_prog_rejected = yes; then
5627   # We found a bogon in the path, so make sure we never use it.
5628   set dummy $ac_cv_prog_CC
5629   shift
5630   if test $# != 0; then
5631     # We chose a different compiler from the bogus one.
5632     # However, it has the same basename, so the bogon will be chosen
5633     # first if we set CC to just the basename; use the full file name.
5634     shift
5635     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5636   fi
5637 fi
5638 fi
5639 fi
5640 CC=$ac_cv_prog_CC
5641 if test -n "$CC"; then
5642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5643 $as_echo "$CC" >&6; }
5644 else
5645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5646 $as_echo "no" >&6; }
5647 fi
5648
5649
5650 fi
5651 if test -z "$CC"; then
5652   if test -n "$ac_tool_prefix"; then
5653   for ac_prog in cl.exe
5654   do
5655     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5656 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5658 $as_echo_n "checking for $ac_word... " >&6; }
5659 if ${ac_cv_prog_CC+:} false; then :
5660   $as_echo_n "(cached) " >&6
5661 else
5662   if test -n "$CC"; then
5663   ac_cv_prog_CC="$CC" # Let the user override the test.
5664 else
5665 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5666 for as_dir in $PATH
5667 do
5668   IFS=$as_save_IFS
5669   test -z "$as_dir" && as_dir=.
5670     for ac_exec_ext in '' $ac_executable_extensions; do
5671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5672     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5674     break 2
5675   fi
5676 done
5677   done
5678 IFS=$as_save_IFS
5679
5680 fi
5681 fi
5682 CC=$ac_cv_prog_CC
5683 if test -n "$CC"; then
5684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5685 $as_echo "$CC" >&6; }
5686 else
5687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5688 $as_echo "no" >&6; }
5689 fi
5690
5691
5692     test -n "$CC" && break
5693   done
5694 fi
5695 if test -z "$CC"; then
5696   ac_ct_CC=$CC
5697   for ac_prog in cl.exe
5698 do
5699   # Extract the first word of "$ac_prog", so it can be a program name with args.
5700 set dummy $ac_prog; ac_word=$2
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702 $as_echo_n "checking for $ac_word... " >&6; }
5703 if ${ac_cv_prog_ac_ct_CC+:} false; then :
5704   $as_echo_n "(cached) " >&6
5705 else
5706   if test -n "$ac_ct_CC"; then
5707   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5708 else
5709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710 for as_dir in $PATH
5711 do
5712   IFS=$as_save_IFS
5713   test -z "$as_dir" && as_dir=.
5714     for ac_exec_ext in '' $ac_executable_extensions; do
5715   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5716     ac_cv_prog_ac_ct_CC="$ac_prog"
5717     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5718     break 2
5719   fi
5720 done
5721   done
5722 IFS=$as_save_IFS
5723
5724 fi
5725 fi
5726 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5727 if test -n "$ac_ct_CC"; then
5728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5729 $as_echo "$ac_ct_CC" >&6; }
5730 else
5731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5732 $as_echo "no" >&6; }
5733 fi
5734
5735
5736   test -n "$ac_ct_CC" && break
5737 done
5738
5739   if test "x$ac_ct_CC" = x; then
5740     CC=""
5741   else
5742     case $cross_compiling:$ac_tool_warned in
5743 yes:)
5744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5745 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5746 ac_tool_warned=yes ;;
5747 esac
5748     CC=$ac_ct_CC
5749   fi
5750 fi
5751
5752 fi
5753
5754
5755 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5756 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5757 as_fn_error $? "no acceptable C compiler found in \$PATH
5758 See \`config.log' for more details" "$LINENO" 5; }
5759
5760 # Provide some information about the compiler.
5761 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5762 set X $ac_compile
5763 ac_compiler=$2
5764 for ac_option in --version -v -V -qversion; do
5765   { { ac_try="$ac_compiler $ac_option >&5"
5766 case "(($ac_try" in
5767   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5768   *) ac_try_echo=$ac_try;;
5769 esac
5770 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5771 $as_echo "$ac_try_echo"; } >&5
5772   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5773   ac_status=$?
5774   if test -s conftest.err; then
5775     sed '10a\
5776 ... rest of stderr output deleted ...
5777          10q' conftest.err >conftest.er1
5778     cat conftest.er1 >&5
5779   fi
5780   rm -f conftest.er1 conftest.err
5781   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5782   test $ac_status = 0; }
5783 done
5784
5785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5786 /* end confdefs.h.  */
5787
5788 int
5789 main ()
5790 {
5791
5792   ;
5793   return 0;
5794 }
5795 _ACEOF
5796 ac_clean_files_save=$ac_clean_files
5797 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5798 # Try to create an executable without -o first, disregard a.out.
5799 # It will help us diagnose broken compilers, and finding out an intuition
5800 # of exeext.
5801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5802 $as_echo_n "checking whether the C compiler works... " >&6; }
5803 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5804
5805 # The possible output files:
5806 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5807
5808 ac_rmfiles=
5809 for ac_file in $ac_files
5810 do
5811   case $ac_file in
5812     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5813     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5814   esac
5815 done
5816 rm -f $ac_rmfiles
5817
5818 if { { ac_try="$ac_link_default"
5819 case "(($ac_try" in
5820   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5821   *) ac_try_echo=$ac_try;;
5822 esac
5823 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5824 $as_echo "$ac_try_echo"; } >&5
5825   (eval "$ac_link_default") 2>&5
5826   ac_status=$?
5827   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5828   test $ac_status = 0; }; then :
5829   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5830 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5831 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
5832 # so that the user can short-circuit this test for compilers unknown to
5833 # Autoconf.
5834 for ac_file in $ac_files ''
5835 do
5836   test -f "$ac_file" || continue
5837   case $ac_file in
5838     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5839         ;;
5840     [ab].out )
5841         # We found the default executable, but exeext='' is most
5842         # certainly right.
5843         break;;
5844     *.* )
5845         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5846         then :; else
5847            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5848         fi
5849         # We set ac_cv_exeext here because the later test for it is not
5850         # safe: cross compilers may not add the suffix if given an `-o'
5851         # argument, so we may need to know it at that point already.
5852         # Even if this section looks crufty: it has the advantage of
5853         # actually working.
5854         break;;
5855     * )
5856         break;;
5857   esac
5858 done
5859 test "$ac_cv_exeext" = no && ac_cv_exeext=
5860
5861 else
5862   ac_file=''
5863 fi
5864 if test -z "$ac_file"; then :
5865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5866 $as_echo "no" >&6; }
5867 $as_echo "$as_me: failed program was:" >&5
5868 sed 's/^/| /' conftest.$ac_ext >&5
5869
5870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5871 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5872 as_fn_error 77 "C compiler cannot create executables
5873 See \`config.log' for more details" "$LINENO" 5; }
5874 else
5875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5876 $as_echo "yes" >&6; }
5877 fi
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5879 $as_echo_n "checking for C compiler default output file name... " >&6; }
5880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5881 $as_echo "$ac_file" >&6; }
5882 ac_exeext=$ac_cv_exeext
5883
5884 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5885 ac_clean_files=$ac_clean_files_save
5886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5887 $as_echo_n "checking for suffix of executables... " >&6; }
5888 if { { ac_try="$ac_link"
5889 case "(($ac_try" in
5890   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5891   *) ac_try_echo=$ac_try;;
5892 esac
5893 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5894 $as_echo "$ac_try_echo"; } >&5
5895   (eval "$ac_link") 2>&5
5896   ac_status=$?
5897   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5898   test $ac_status = 0; }; then :
5899   # If both `conftest.exe' and `conftest' are `present' (well, observable)
5900 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5901 # work properly (i.e., refer to `conftest.exe'), while it won't with
5902 # `rm'.
5903 for ac_file in conftest.exe conftest conftest.*; do
5904   test -f "$ac_file" || continue
5905   case $ac_file in
5906     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5907     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5908           break;;
5909     * ) break;;
5910   esac
5911 done
5912 else
5913   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5914 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5915 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5916 See \`config.log' for more details" "$LINENO" 5; }
5917 fi
5918 rm -f conftest conftest$ac_cv_exeext
5919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5920 $as_echo "$ac_cv_exeext" >&6; }
5921
5922 rm -f conftest.$ac_ext
5923 EXEEXT=$ac_cv_exeext
5924 ac_exeext=$EXEEXT
5925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5926 /* end confdefs.h.  */
5927 #include <stdio.h>
5928 int
5929 main ()
5930 {
5931 FILE *f = fopen ("conftest.out", "w");
5932  return ferror (f) || fclose (f) != 0;
5933
5934   ;
5935   return 0;
5936 }
5937 _ACEOF
5938 ac_clean_files="$ac_clean_files conftest.out"
5939 # Check that the compiler produces executables we can run.  If not, either
5940 # the compiler is broken, or we cross compile.
5941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5942 $as_echo_n "checking whether we are cross compiling... " >&6; }
5943 if test "$cross_compiling" != yes; then
5944   { { ac_try="$ac_link"
5945 case "(($ac_try" in
5946   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5947   *) ac_try_echo=$ac_try;;
5948 esac
5949 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5950 $as_echo "$ac_try_echo"; } >&5
5951   (eval "$ac_link") 2>&5
5952   ac_status=$?
5953   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5954   test $ac_status = 0; }
5955   if { ac_try='./conftest$ac_cv_exeext'
5956   { { case "(($ac_try" in
5957   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5958   *) ac_try_echo=$ac_try;;
5959 esac
5960 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5961 $as_echo "$ac_try_echo"; } >&5
5962   (eval "$ac_try") 2>&5
5963   ac_status=$?
5964   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5965   test $ac_status = 0; }; }; then
5966     cross_compiling=no
5967   else
5968     if test "$cross_compiling" = maybe; then
5969         cross_compiling=yes
5970     else
5971         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5972 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5973 as_fn_error $? "cannot run C compiled programs.
5974 If you meant to cross compile, use \`--host'.
5975 See \`config.log' for more details" "$LINENO" 5; }
5976     fi
5977   fi
5978 fi
5979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5980 $as_echo "$cross_compiling" >&6; }
5981
5982 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5983 ac_clean_files=$ac_clean_files_save
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5985 $as_echo_n "checking for suffix of object files... " >&6; }
5986 if ${ac_cv_objext+:} false; then :
5987   $as_echo_n "(cached) " >&6
5988 else
5989   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5990 /* end confdefs.h.  */
5991
5992 int
5993 main ()
5994 {
5995
5996   ;
5997   return 0;
5998 }
5999 _ACEOF
6000 rm -f conftest.o conftest.obj
6001 if { { ac_try="$ac_compile"
6002 case "(($ac_try" in
6003   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6004   *) ac_try_echo=$ac_try;;
6005 esac
6006 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6007 $as_echo "$ac_try_echo"; } >&5
6008   (eval "$ac_compile") 2>&5
6009   ac_status=$?
6010   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6011   test $ac_status = 0; }; then :
6012   for ac_file in conftest.o conftest.obj conftest.*; do
6013   test -f "$ac_file" || continue;
6014   case $ac_file in
6015     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
6016     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
6017        break;;
6018   esac
6019 done
6020 else
6021   $as_echo "$as_me: failed program was:" >&5
6022 sed 's/^/| /' conftest.$ac_ext >&5
6023
6024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6025 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6026 as_fn_error $? "cannot compute suffix of object files: cannot compile
6027 See \`config.log' for more details" "$LINENO" 5; }
6028 fi
6029 rm -f conftest.$ac_cv_objext conftest.$ac_ext
6030 fi
6031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
6032 $as_echo "$ac_cv_objext" >&6; }
6033 OBJEXT=$ac_cv_objext
6034 ac_objext=$OBJEXT
6035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
6036 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
6037 if ${ac_cv_c_compiler_gnu+:} false; then :
6038   $as_echo_n "(cached) " >&6
6039 else
6040   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6041 /* end confdefs.h.  */
6042
6043 int
6044 main ()
6045 {
6046 #ifndef __GNUC__
6047        choke me
6048 #endif
6049
6050   ;
6051   return 0;
6052 }
6053 _ACEOF
6054 if ac_fn_c_try_compile "$LINENO"; then :
6055   ac_compiler_gnu=yes
6056 else
6057   ac_compiler_gnu=no
6058 fi
6059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6060 ac_cv_c_compiler_gnu=$ac_compiler_gnu
6061
6062 fi
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6064 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
6065 if test $ac_compiler_gnu = yes; then
6066   GCC=yes
6067 else
6068   GCC=
6069 fi
6070 ac_test_CFLAGS=${CFLAGS+set}
6071 ac_save_CFLAGS=$CFLAGS
6072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6073 $as_echo_n "checking whether $CC accepts -g... " >&6; }
6074 if ${ac_cv_prog_cc_g+:} false; then :
6075   $as_echo_n "(cached) " >&6
6076 else
6077   ac_save_c_werror_flag=$ac_c_werror_flag
6078    ac_c_werror_flag=yes
6079    ac_cv_prog_cc_g=no
6080    CFLAGS="-g"
6081    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6082 /* end confdefs.h.  */
6083
6084 int
6085 main ()
6086 {
6087
6088   ;
6089   return 0;
6090 }
6091 _ACEOF
6092 if ac_fn_c_try_compile "$LINENO"; then :
6093   ac_cv_prog_cc_g=yes
6094 else
6095   CFLAGS=""
6096       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6097 /* end confdefs.h.  */
6098
6099 int
6100 main ()
6101 {
6102
6103   ;
6104   return 0;
6105 }
6106 _ACEOF
6107 if ac_fn_c_try_compile "$LINENO"; then :
6108
6109 else
6110   ac_c_werror_flag=$ac_save_c_werror_flag
6111          CFLAGS="-g"
6112          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6113 /* end confdefs.h.  */
6114
6115 int
6116 main ()
6117 {
6118
6119   ;
6120   return 0;
6121 }
6122 _ACEOF
6123 if ac_fn_c_try_compile "$LINENO"; then :
6124   ac_cv_prog_cc_g=yes
6125 fi
6126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6127 fi
6128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6129 fi
6130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6131    ac_c_werror_flag=$ac_save_c_werror_flag
6132 fi
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6134 $as_echo "$ac_cv_prog_cc_g" >&6; }
6135 if test "$ac_test_CFLAGS" = set; then
6136   CFLAGS=$ac_save_CFLAGS
6137 elif test $ac_cv_prog_cc_g = yes; then
6138   if test "$GCC" = yes; then
6139     CFLAGS="-g -O2"
6140   else
6141     CFLAGS="-g"
6142   fi
6143 else
6144   if test "$GCC" = yes; then
6145     CFLAGS="-O2"
6146   else
6147     CFLAGS=
6148   fi
6149 fi
6150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6151 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6152 if ${ac_cv_prog_cc_c89+:} false; then :
6153   $as_echo_n "(cached) " >&6
6154 else
6155   ac_cv_prog_cc_c89=no
6156 ac_save_CC=$CC
6157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6158 /* end confdefs.h.  */
6159 #include <stdarg.h>
6160 #include <stdio.h>
6161 struct stat;
6162 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6163 struct buf { int x; };
6164 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6165 static char *e (p, i)
6166      char **p;
6167      int i;
6168 {
6169   return p[i];
6170 }
6171 static char *f (char * (*g) (char **, int), char **p, ...)
6172 {
6173   char *s;
6174   va_list v;
6175   va_start (v,p);
6176   s = g (p, va_arg (v,int));
6177   va_end (v);
6178   return s;
6179 }
6180
6181 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6182    function prototypes and stuff, but not '\xHH' hex character constants.
6183    These don't provoke an error unfortunately, instead are silently treated
6184    as 'x'.  The following induces an error, until -std is added to get
6185    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6186    array size at least.  It's necessary to write '\x00'==0 to get something
6187    that's true only with -std.  */
6188 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6189
6190 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6191    inside strings and character constants.  */
6192 #define FOO(x) 'x'
6193 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6194
6195 int test (int i, double x);
6196 struct s1 {int (*f) (int a);};
6197 struct s2 {int (*f) (double a);};
6198 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6199 int argc;
6200 char **argv;
6201 int
6202 main ()
6203 {
6204 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6205   ;
6206   return 0;
6207 }
6208 _ACEOF
6209 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6210         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6211 do
6212   CC="$ac_save_CC $ac_arg"
6213   if ac_fn_c_try_compile "$LINENO"; then :
6214   ac_cv_prog_cc_c89=$ac_arg
6215 fi
6216 rm -f core conftest.err conftest.$ac_objext
6217   test "x$ac_cv_prog_cc_c89" != "xno" && break
6218 done
6219 rm -f conftest.$ac_ext
6220 CC=$ac_save_CC
6221
6222 fi
6223 # AC_CACHE_VAL
6224 case "x$ac_cv_prog_cc_c89" in
6225   x)
6226     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6227 $as_echo "none needed" >&6; } ;;
6228   xno)
6229     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6230 $as_echo "unsupported" >&6; } ;;
6231   *)
6232     CC="$CC $ac_cv_prog_cc_c89"
6233     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6234 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6235 esac
6236 if test "x$ac_cv_prog_cc_c89" != xno; then :
6237
6238 fi
6239
6240 ac_ext=c
6241 ac_cpp='$CPP $CPPFLAGS'
6242 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6243 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6244 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6245
6246 depcc="$CC"   am_compiler_list=
6247
6248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6249 $as_echo_n "checking dependency style of $depcc... " >&6; }
6250 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6251   $as_echo_n "(cached) " >&6
6252 else
6253   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6254   # We make a subdir and do the tests there.  Otherwise we can end up
6255   # making bogus files that we don't know about and never remove.  For
6256   # instance it was reported that on HP-UX the gcc test will end up
6257   # making a dummy file named `D' -- because `-MD' means `put the output
6258   # in D'.
6259   mkdir conftest.dir
6260   # Copy depcomp to subdir because otherwise we won't find it if we're
6261   # using a relative directory.
6262   cp "$am_depcomp" conftest.dir
6263   cd conftest.dir
6264   # We will build objects and dependencies in a subdirectory because
6265   # it helps to detect inapplicable dependency modes.  For instance
6266   # both Tru64's cc and ICC support -MD to output dependencies as a
6267   # side effect of compilation, but ICC will put the dependencies in
6268   # the current directory while Tru64 will put them in the object
6269   # directory.
6270   mkdir sub
6271
6272   am_cv_CC_dependencies_compiler_type=none
6273   if test "$am_compiler_list" = ""; then
6274      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6275   fi
6276   for depmode in $am_compiler_list; do
6277     # Setup a source with many dependencies, because some compilers
6278     # like to wrap large dependency lists on column 80 (with \), and
6279     # we should not choose a depcomp mode which is confused by this.
6280     #
6281     # We need to recreate these files for each test, as the compiler may
6282     # overwrite some of them when testing with obscure command lines.
6283     # This happens at least with the AIX C compiler.
6284     : > sub/conftest.c
6285     for i in 1 2 3 4 5 6; do
6286       echo '#include "conftst'$i'.h"' >> sub/conftest.c
6287       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6288       # Solaris 8's {/usr,}/bin/sh.
6289       touch sub/conftst$i.h
6290     done
6291     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6292
6293     case $depmode in
6294     nosideeffect)
6295       # after this tag, mechanisms are not by side-effect, so they'll
6296       # only be used when explicitly requested
6297       if test "x$enable_dependency_tracking" = xyes; then
6298         continue
6299       else
6300         break
6301       fi
6302       ;;
6303     none) break ;;
6304     esac
6305     # We check with `-c' and `-o' for the sake of the "dashmstdout"
6306     # mode.  It turns out that the SunPro C++ compiler does not properly
6307     # handle `-M -o', and we need to detect this.
6308     if depmode=$depmode \
6309        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6310        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6311        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6312          >/dev/null 2>conftest.err &&
6313        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6314        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6315        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6316       # icc doesn't choke on unknown options, it will just issue warnings
6317       # or remarks (even with -Werror).  So we grep stderr for any message
6318       # that says an option was ignored or not supported.
6319       # When given -MP, icc 7.0 and 7.1 complain thusly:
6320       #   icc: Command line warning: ignoring option '-M'; no argument required
6321       # The diagnosis changed in icc 8.0:
6322       #   icc: Command line remark: option '-MP' not supported
6323       if (grep 'ignoring option' conftest.err ||
6324           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6325         am_cv_CC_dependencies_compiler_type=$depmode
6326         break
6327       fi
6328     fi
6329   done
6330
6331   cd ..
6332   rm -rf conftest.dir
6333 else
6334   am_cv_CC_dependencies_compiler_type=none
6335 fi
6336
6337 fi
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6339 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6340 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6341
6342
6343
6344 if
6345   test "x$enable_dependency_tracking" != xno \
6346   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6347   am__fastdepCC_TRUE=
6348   am__fastdepCC_FALSE='#'
6349 else
6350   am__fastdepCC_TRUE='#'
6351   am__fastdepCC_FALSE=
6352 fi
6353
6354
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6356 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6357 if ${lt_cv_path_SED+:} false; then :
6358   $as_echo_n "(cached) " >&6
6359 else
6360   # Loop through the user's path and test for sed and gsed.
6361 # Then use that list of sed's as ones to test for truncation.
6362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6363 for as_dir in $PATH
6364 do
6365   IFS=$as_save_IFS
6366   test -z "$as_dir" && as_dir=.
6367   for lt_ac_prog in sed gsed; do
6368     for ac_exec_ext in '' $ac_executable_extensions; do
6369       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6370         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6371       fi
6372     done
6373   done
6374 done
6375 lt_ac_max=0
6376 lt_ac_count=0
6377 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6378 # along with /bin/sed that truncates output.
6379 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6380   test ! -f $lt_ac_sed && continue
6381   cat /dev/null > conftest.in
6382   lt_ac_count=0
6383   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6384   # Check for GNU sed and select it if it is found.
6385   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6386     lt_cv_path_SED=$lt_ac_sed
6387     break
6388   fi
6389   while true; do
6390     cat conftest.in conftest.in >conftest.tmp
6391     mv conftest.tmp conftest.in
6392     cp conftest.in conftest.nl
6393     echo >>conftest.nl
6394     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6395     cmp -s conftest.out conftest.nl || break
6396     # 10000 chars as input seems more than enough
6397     test $lt_ac_count -gt 10 && break
6398     lt_ac_count=`expr $lt_ac_count + 1`
6399     if test $lt_ac_count -gt $lt_ac_max; then
6400       lt_ac_max=$lt_ac_count
6401       lt_cv_path_SED=$lt_ac_sed
6402     fi
6403   done
6404 done
6405
6406 fi
6407
6408 SED=$lt_cv_path_SED
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
6410 $as_echo "$SED" >&6; }
6411
6412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6413 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6414 if ${ac_cv_path_GREP+:} false; then :
6415   $as_echo_n "(cached) " >&6
6416 else
6417   if test -z "$GREP"; then
6418   ac_path_GREP_found=false
6419   # Loop through the user's path and test for each of PROGNAME-LIST
6420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6421 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6422 do
6423   IFS=$as_save_IFS
6424   test -z "$as_dir" && as_dir=.
6425     for ac_prog in grep ggrep; do
6426     for ac_exec_ext in '' $ac_executable_extensions; do
6427       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6428       as_fn_executable_p "$ac_path_GREP" || continue
6429 # Check for GNU ac_path_GREP and select it if it is found.
6430   # Check for GNU $ac_path_GREP
6431 case `"$ac_path_GREP" --version 2>&1` in
6432 *GNU*)
6433   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6434 *)
6435   ac_count=0
6436   $as_echo_n 0123456789 >"conftest.in"
6437   while :
6438   do
6439     cat "conftest.in" "conftest.in" >"conftest.tmp"
6440     mv "conftest.tmp" "conftest.in"
6441     cp "conftest.in" "conftest.nl"
6442     $as_echo 'GREP' >> "conftest.nl"
6443     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6444     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6445     as_fn_arith $ac_count + 1 && ac_count=$as_val
6446     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6447       # Best one so far, save it but keep looking for a better one
6448       ac_cv_path_GREP="$ac_path_GREP"
6449       ac_path_GREP_max=$ac_count
6450     fi
6451     # 10*(2^10) chars as input seems more than enough
6452     test $ac_count -gt 10 && break
6453   done
6454   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6455 esac
6456
6457       $ac_path_GREP_found && break 3
6458     done
6459   done
6460   done
6461 IFS=$as_save_IFS
6462   if test -z "$ac_cv_path_GREP"; then
6463     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6464   fi
6465 else
6466   ac_cv_path_GREP=$GREP
6467 fi
6468
6469 fi
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6471 $as_echo "$ac_cv_path_GREP" >&6; }
6472  GREP="$ac_cv_path_GREP"
6473
6474
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6476 $as_echo_n "checking for egrep... " >&6; }
6477 if ${ac_cv_path_EGREP+:} false; then :
6478   $as_echo_n "(cached) " >&6
6479 else
6480   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6481    then ac_cv_path_EGREP="$GREP -E"
6482    else
6483      if test -z "$EGREP"; then
6484   ac_path_EGREP_found=false
6485   # Loop through the user's path and test for each of PROGNAME-LIST
6486   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6487 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6488 do
6489   IFS=$as_save_IFS
6490   test -z "$as_dir" && as_dir=.
6491     for ac_prog in egrep; do
6492     for ac_exec_ext in '' $ac_executable_extensions; do
6493       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6494       as_fn_executable_p "$ac_path_EGREP" || continue
6495 # Check for GNU ac_path_EGREP and select it if it is found.
6496   # Check for GNU $ac_path_EGREP
6497 case `"$ac_path_EGREP" --version 2>&1` in
6498 *GNU*)
6499   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6500 *)
6501   ac_count=0
6502   $as_echo_n 0123456789 >"conftest.in"
6503   while :
6504   do
6505     cat "conftest.in" "conftest.in" >"conftest.tmp"
6506     mv "conftest.tmp" "conftest.in"
6507     cp "conftest.in" "conftest.nl"
6508     $as_echo 'EGREP' >> "conftest.nl"
6509     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6510     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6511     as_fn_arith $ac_count + 1 && ac_count=$as_val
6512     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6513       # Best one so far, save it but keep looking for a better one
6514       ac_cv_path_EGREP="$ac_path_EGREP"
6515       ac_path_EGREP_max=$ac_count
6516     fi
6517     # 10*(2^10) chars as input seems more than enough
6518     test $ac_count -gt 10 && break
6519   done
6520   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6521 esac
6522
6523       $ac_path_EGREP_found && break 3
6524     done
6525   done
6526   done
6527 IFS=$as_save_IFS
6528   if test -z "$ac_cv_path_EGREP"; then
6529     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6530   fi
6531 else
6532   ac_cv_path_EGREP=$EGREP
6533 fi
6534
6535    fi
6536 fi
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6538 $as_echo "$ac_cv_path_EGREP" >&6; }
6539  EGREP="$ac_cv_path_EGREP"
6540
6541
6542
6543 # Check whether --with-gnu-ld was given.
6544 if test "${with_gnu_ld+set}" = set; then :
6545   withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6546 else
6547   with_gnu_ld=no
6548 fi
6549
6550 ac_prog=ld
6551 if test "$GCC" = yes; then
6552   # Check if gcc -print-prog-name=ld gives a path.
6553   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
6554 $as_echo_n "checking for ld used by $CC... " >&6; }
6555   case $host in
6556   *-*-mingw*)
6557     # gcc leaves a trailing carriage return which upsets mingw
6558     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6559   *)
6560     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6561   esac
6562   case $ac_prog in
6563     # Accept absolute paths.
6564     [\\/]* | ?:[\\/]*)
6565       re_direlt='/[^/][^/]*/\.\./'
6566       # Canonicalize the pathname of ld
6567       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
6568       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6569         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
6570       done
6571       test -z "$LD" && LD="$ac_prog"
6572       ;;
6573   "")
6574     # If it fails, then pretend we aren't using GCC.
6575     ac_prog=ld
6576     ;;
6577   *)
6578     # If it is relative, then search for the first ld in PATH.
6579     with_gnu_ld=unknown
6580     ;;
6581   esac
6582 elif test "$with_gnu_ld" = yes; then
6583   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6584 $as_echo_n "checking for GNU ld... " >&6; }
6585 else
6586   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6587 $as_echo_n "checking for non-GNU ld... " >&6; }
6588 fi
6589 if ${lt_cv_path_LD+:} false; then :
6590   $as_echo_n "(cached) " >&6
6591 else
6592   if test -z "$LD"; then
6593   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6594   for ac_dir in $PATH; do
6595     IFS="$lt_save_ifs"
6596     test -z "$ac_dir" && ac_dir=.
6597     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6598       lt_cv_path_LD="$ac_dir/$ac_prog"
6599       # Check to see if the program is GNU ld.  I'd rather use --version,
6600       # but apparently some variants of GNU ld only accept -v.
6601       # Break only if it was the GNU/non-GNU ld that we prefer.
6602       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6603       *GNU* | *'with BFD'*)
6604         test "$with_gnu_ld" != no && break
6605         ;;
6606       *)
6607         test "$with_gnu_ld" != yes && break
6608         ;;
6609       esac
6610     fi
6611   done
6612   IFS="$lt_save_ifs"
6613 else
6614   lt_cv_path_LD="$LD" # Let the user override the test with a path.
6615 fi
6616 fi
6617
6618 LD="$lt_cv_path_LD"
6619 if test -n "$LD"; then
6620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6621 $as_echo "$LD" >&6; }
6622 else
6623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6624 $as_echo "no" >&6; }
6625 fi
6626 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6628 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6629 if ${lt_cv_prog_gnu_ld+:} false; then :
6630   $as_echo_n "(cached) " >&6
6631 else
6632   # I'd rather use --version here, but apparently some GNU lds only accept -v.
6633 case `$LD -v 2>&1 </dev/null` in
6634 *GNU* | *'with BFD'*)
6635   lt_cv_prog_gnu_ld=yes
6636   ;;
6637 *)
6638   lt_cv_prog_gnu_ld=no
6639   ;;
6640 esac
6641 fi
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
6643 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
6644 with_gnu_ld=$lt_cv_prog_gnu_ld
6645
6646
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6648 $as_echo_n "checking for $LD option to reload object files... " >&6; }
6649 if ${lt_cv_ld_reload_flag+:} false; then :
6650   $as_echo_n "(cached) " >&6
6651 else
6652   lt_cv_ld_reload_flag='-r'
6653 fi
6654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6655 $as_echo "$lt_cv_ld_reload_flag" >&6; }
6656 reload_flag=$lt_cv_ld_reload_flag
6657 case $reload_flag in
6658 "" | " "*) ;;
6659 *) reload_flag=" $reload_flag" ;;
6660 esac
6661 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6662 case $host_os in
6663   darwin*)
6664     if test "$GCC" = yes; then
6665       reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
6666     else
6667       reload_cmds='$LD$reload_flag -o $output$reload_objs'
6668     fi
6669     ;;
6670 esac
6671
6672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5
6673 $as_echo_n "checking for BSD-compatible nm... " >&6; }
6674 if ${lt_cv_path_NM+:} false; then :
6675   $as_echo_n "(cached) " >&6
6676 else
6677   if test -n "$NM"; then
6678   # Let the user override the test.
6679   lt_cv_path_NM="$NM"
6680 else
6681   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6682   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
6683     IFS="$lt_save_ifs"
6684     test -z "$ac_dir" && ac_dir=.
6685     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
6686     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6687       # Check to see if the nm accepts a BSD-compat flag.
6688       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
6689       #   nm: unknown option "B" ignored
6690       # Tru64's nm complains that /dev/null is an invalid object file
6691       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
6692       */dev/null* | *'Invalid file or object type'*)
6693         lt_cv_path_NM="$tmp_nm -B"
6694         break
6695         ;;
6696       *)
6697         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
6698         */dev/null*)
6699           lt_cv_path_NM="$tmp_nm -p"
6700           break
6701           ;;
6702         *)
6703           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6704           continue # so that we can try to find one that supports BSD flags
6705           ;;
6706         esac
6707       esac
6708     fi
6709   done
6710   IFS="$lt_save_ifs"
6711   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
6712 fi
6713 fi
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
6715 $as_echo "$lt_cv_path_NM" >&6; }
6716 NM="$lt_cv_path_NM"
6717
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6719 $as_echo_n "checking whether ln -s works... " >&6; }
6720 LN_S=$as_ln_s
6721 if test "$LN_S" = "ln -s"; then
6722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6723 $as_echo "yes" >&6; }
6724 else
6725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6726 $as_echo "no, using $LN_S" >&6; }
6727 fi
6728
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognise dependent libraries" >&5
6730 $as_echo_n "checking how to recognise dependent libraries... " >&6; }
6731 if ${lt_cv_deplibs_check_method+:} false; then :
6732   $as_echo_n "(cached) " >&6
6733 else
6734   lt_cv_file_magic_cmd='$MAGIC_CMD'
6735 lt_cv_file_magic_test_file=
6736 lt_cv_deplibs_check_method='unknown'
6737 # Need to set the preceding variable on all platforms that support
6738 # interlibrary dependencies.
6739 # 'none' -- dependencies not supported.
6740 # `unknown' -- same as none, but documents that we really don't know.
6741 # 'pass_all' -- all dependencies passed with no checks.
6742 # 'test_compile' -- check by making test program.
6743 # 'file_magic [[regex]]' -- check by looking for files in library path
6744 # which responds to the $file_magic_cmd with a given extended regex.
6745 # If you have `file' or equivalent on your system and you're not sure
6746 # whether `pass_all' will *always* work, you probably want this one.
6747
6748 case $host_os in
6749 aix4* | aix5*)
6750   lt_cv_deplibs_check_method=pass_all
6751   ;;
6752
6753 beos*)
6754   lt_cv_deplibs_check_method=pass_all
6755   ;;
6756
6757 bsdi[45]*)
6758   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6759   lt_cv_file_magic_cmd='/usr/bin/file -L'
6760   lt_cv_file_magic_test_file=/shlib/libc.so
6761   ;;
6762
6763 cygwin*)
6764   # func_win32_libid is a shell function defined in ltmain.sh
6765   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6766   lt_cv_file_magic_cmd='func_win32_libid'
6767   ;;
6768
6769 mingw* | pw32*)
6770   # Base MSYS/MinGW do not provide the 'file' command needed by
6771   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
6772   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6773   lt_cv_file_magic_cmd='$OBJDUMP -f'
6774   ;;
6775
6776 darwin* | rhapsody*)
6777   lt_cv_deplibs_check_method=pass_all
6778   ;;
6779
6780 freebsd* | kfreebsd*-gnu | dragonfly*)
6781   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6782     case $host_cpu in
6783     i*86 )
6784       # Not sure whether the presence of OpenBSD here was a mistake.
6785       # Let's accept both of them until this is cleared up.
6786       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6787       lt_cv_file_magic_cmd=/usr/bin/file
6788       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6789       ;;
6790     esac
6791   else
6792     lt_cv_deplibs_check_method=pass_all
6793   fi
6794   ;;
6795
6796 gnu*)
6797   lt_cv_deplibs_check_method=pass_all
6798   ;;
6799
6800 hpux10.20* | hpux11*)
6801   lt_cv_file_magic_cmd=/usr/bin/file
6802   case $host_cpu in
6803   ia64*)
6804     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6805     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6806     ;;
6807   hppa*64*)
6808     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]'
6809     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6810     ;;
6811   *)
6812     lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
6813     lt_cv_file_magic_test_file=/usr/lib/libc.sl
6814     ;;
6815   esac
6816   ;;
6817
6818 irix5* | irix6* | nonstopux*)
6819   case $LD in
6820   *-32|*"-32 ") libmagic=32-bit;;
6821   *-n32|*"-n32 ") libmagic=N32;;
6822   *-64|*"-64 ") libmagic=64-bit;;
6823   *) libmagic=never-match;;
6824   esac
6825   lt_cv_deplibs_check_method=pass_all
6826   ;;
6827
6828 # This must be Linux ELF.
6829 linux*)
6830   lt_cv_deplibs_check_method=pass_all
6831   ;;
6832
6833 netbsd*)
6834   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6835     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6836   else
6837     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6838   fi
6839   ;;
6840
6841 newos6*)
6842   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6843   lt_cv_file_magic_cmd=/usr/bin/file
6844   lt_cv_file_magic_test_file=/usr/lib/libnls.so
6845   ;;
6846
6847 nto-qnx*)
6848   lt_cv_deplibs_check_method=unknown
6849   ;;
6850
6851 openbsd*)
6852   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6853     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6854   else
6855     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6856   fi
6857   ;;
6858
6859 osf3* | osf4* | osf5*)
6860   lt_cv_deplibs_check_method=pass_all
6861   ;;
6862
6863 sco3.2v5*)
6864   lt_cv_deplibs_check_method=pass_all
6865   ;;
6866
6867 solaris*)
6868   lt_cv_deplibs_check_method=pass_all
6869   ;;
6870
6871 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6872   case $host_vendor in
6873   motorola)
6874     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]'
6875     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6876     ;;
6877   ncr)
6878     lt_cv_deplibs_check_method=pass_all
6879     ;;
6880   sequent)
6881     lt_cv_file_magic_cmd='/bin/file'
6882     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6883     ;;
6884   sni)
6885     lt_cv_file_magic_cmd='/bin/file'
6886     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6887     lt_cv_file_magic_test_file=/lib/libc.so
6888     ;;
6889   siemens)
6890     lt_cv_deplibs_check_method=pass_all
6891     ;;
6892   esac
6893   ;;
6894
6895 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
6896   lt_cv_deplibs_check_method=pass_all
6897   ;;
6898 esac
6899
6900 fi
6901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6902 $as_echo "$lt_cv_deplibs_check_method" >&6; }
6903 file_magic_cmd=$lt_cv_file_magic_cmd
6904 deplibs_check_method=$lt_cv_deplibs_check_method
6905 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6906
6907
6908
6909
6910 # If no C compiler was specified, use CC.
6911 LTCC=${LTCC-"$CC"}
6912
6913 # Allow CC to be a program name with arguments.
6914 compiler=$CC
6915
6916
6917 # Check whether --enable-libtool-lock was given.
6918 if test "${enable_libtool_lock+set}" = set; then :
6919   enableval=$enable_libtool_lock;
6920 fi
6921
6922 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6923
6924 # Some flags need to be propagated to the compiler or linker for good
6925 # libtool support.
6926 case $host in
6927 ia64-*-hpux*)
6928   # Find out which ABI we are using.
6929   echo 'int i;' > conftest.$ac_ext
6930   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6931   (eval $ac_compile) 2>&5
6932   ac_status=$?
6933   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6934   test $ac_status = 0; }; then
6935     case `/usr/bin/file conftest.$ac_objext` in
6936     *ELF-32*)
6937       HPUX_IA64_MODE="32"
6938       ;;
6939     *ELF-64*)
6940       HPUX_IA64_MODE="64"
6941       ;;
6942     esac
6943   fi
6944   rm -rf conftest*
6945   ;;
6946 *-*-irix6*)
6947   # Find out which ABI we are using.
6948   echo '#line 6948 "configure"' > conftest.$ac_ext
6949   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6950   (eval $ac_compile) 2>&5
6951   ac_status=$?
6952   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6953   test $ac_status = 0; }; then
6954    if test "$lt_cv_prog_gnu_ld" = yes; then
6955     case `/usr/bin/file conftest.$ac_objext` in
6956     *32-bit*)
6957       LD="${LD-ld} -melf32bsmip"
6958       ;;
6959     *N32*)
6960       LD="${LD-ld} -melf32bmipn32"
6961       ;;
6962     *64-bit*)
6963       LD="${LD-ld} -melf64bmip"
6964       ;;
6965     esac
6966    else
6967     case `/usr/bin/file conftest.$ac_objext` in
6968     *32-bit*)
6969       LD="${LD-ld} -32"
6970       ;;
6971     *N32*)
6972       LD="${LD-ld} -n32"
6973       ;;
6974     *64-bit*)
6975       LD="${LD-ld} -64"
6976       ;;
6977     esac
6978    fi
6979   fi
6980   rm -rf conftest*
6981   ;;
6982
6983 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6984   # Find out which ABI we are using.
6985   echo 'int i;' > conftest.$ac_ext
6986   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6987   (eval $ac_compile) 2>&5
6988   ac_status=$?
6989   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6990   test $ac_status = 0; }; then
6991     case `/usr/bin/file conftest.o` in
6992     *32-bit*)
6993       case $host in
6994         x86_64-*linux*)
6995           LD="${LD-ld} -m elf_i386"
6996           ;;
6997         ppc64-*linux*|powerpc64-*linux*)
6998           LD="${LD-ld} -m elf32ppclinux"
6999           ;;
7000         s390x-*linux*)
7001           LD="${LD-ld} -m elf_s390"
7002           ;;
7003         sparc64-*linux*)
7004           LD="${LD-ld} -m elf32_sparc"
7005           ;;
7006       esac
7007       ;;
7008     *64-bit*)
7009       case $host in
7010         x86_64-*linux*)
7011           LD="${LD-ld} -m elf_x86_64"
7012           ;;
7013         ppc*-*linux*|powerpc*-*linux*)
7014           LD="${LD-ld} -m elf64ppc"
7015           ;;
7016         s390*-*linux*)
7017           LD="${LD-ld} -m elf64_s390"
7018           ;;
7019         sparc*-*linux*)
7020           LD="${LD-ld} -m elf64_sparc"
7021           ;;
7022       esac
7023       ;;
7024     esac
7025   fi
7026   rm -rf conftest*
7027   ;;
7028
7029 *-*-sco3.2v5*)
7030   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
7031   SAVE_CFLAGS="$CFLAGS"
7032   CFLAGS="$CFLAGS -belf"
7033   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
7034 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
7035 if ${lt_cv_cc_needs_belf+:} false; then :
7036   $as_echo_n "(cached) " >&6
7037 else
7038   ac_ext=c
7039 ac_cpp='$CPP $CPPFLAGS'
7040 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7041 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7042 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7043
7044      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7045 /* end confdefs.h.  */
7046
7047 int
7048 main ()
7049 {
7050
7051   ;
7052   return 0;
7053 }
7054 _ACEOF
7055 if ac_fn_c_try_link "$LINENO"; then :
7056   lt_cv_cc_needs_belf=yes
7057 else
7058   lt_cv_cc_needs_belf=no
7059 fi
7060 rm -f core conftest.err conftest.$ac_objext \
7061     conftest$ac_exeext conftest.$ac_ext
7062      ac_ext=c
7063 ac_cpp='$CPP $CPPFLAGS'
7064 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7065 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7066 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7067
7068 fi
7069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7070 $as_echo "$lt_cv_cc_needs_belf" >&6; }
7071   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7072     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7073     CFLAGS="$SAVE_CFLAGS"
7074   fi
7075   ;;
7076 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
7077   if test -n "$ac_tool_prefix"; then
7078   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7079 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7081 $as_echo_n "checking for $ac_word... " >&6; }
7082 if ${ac_cv_prog_DLLTOOL+:} false; then :
7083   $as_echo_n "(cached) " >&6
7084 else
7085   if test -n "$DLLTOOL"; then
7086   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7087 else
7088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7089 for as_dir in $PATH
7090 do
7091   IFS=$as_save_IFS
7092   test -z "$as_dir" && as_dir=.
7093     for ac_exec_ext in '' $ac_executable_extensions; do
7094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7095     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7097     break 2
7098   fi
7099 done
7100   done
7101 IFS=$as_save_IFS
7102
7103 fi
7104 fi
7105 DLLTOOL=$ac_cv_prog_DLLTOOL
7106 if test -n "$DLLTOOL"; then
7107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7108 $as_echo "$DLLTOOL" >&6; }
7109 else
7110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7111 $as_echo "no" >&6; }
7112 fi
7113
7114
7115 fi
7116 if test -z "$ac_cv_prog_DLLTOOL"; then
7117   ac_ct_DLLTOOL=$DLLTOOL
7118   # Extract the first word of "dlltool", so it can be a program name with args.
7119 set dummy dlltool; ac_word=$2
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7121 $as_echo_n "checking for $ac_word... " >&6; }
7122 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7123   $as_echo_n "(cached) " >&6
7124 else
7125   if test -n "$ac_ct_DLLTOOL"; then
7126   ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7127 else
7128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7129 for as_dir in $PATH
7130 do
7131   IFS=$as_save_IFS
7132   test -z "$as_dir" && as_dir=.
7133     for ac_exec_ext in '' $ac_executable_extensions; do
7134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7135     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7137     break 2
7138   fi
7139 done
7140   done
7141 IFS=$as_save_IFS
7142
7143 fi
7144 fi
7145 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7146 if test -n "$ac_ct_DLLTOOL"; then
7147   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7148 $as_echo "$ac_ct_DLLTOOL" >&6; }
7149 else
7150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7151 $as_echo "no" >&6; }
7152 fi
7153
7154   if test "x$ac_ct_DLLTOOL" = x; then
7155     DLLTOOL="false"
7156   else
7157     case $cross_compiling:$ac_tool_warned in
7158 yes:)
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7160 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7161 ac_tool_warned=yes ;;
7162 esac
7163     DLLTOOL=$ac_ct_DLLTOOL
7164   fi
7165 else
7166   DLLTOOL="$ac_cv_prog_DLLTOOL"
7167 fi
7168
7169   if test -n "$ac_tool_prefix"; then
7170   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
7171 set dummy ${ac_tool_prefix}as; ac_word=$2
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7173 $as_echo_n "checking for $ac_word... " >&6; }
7174 if ${ac_cv_prog_AS+:} false; then :
7175   $as_echo_n "(cached) " >&6
7176 else
7177   if test -n "$AS"; then
7178   ac_cv_prog_AS="$AS" # Let the user override the test.
7179 else
7180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7181 for as_dir in $PATH
7182 do
7183   IFS=$as_save_IFS
7184   test -z "$as_dir" && as_dir=.
7185     for ac_exec_ext in '' $ac_executable_extensions; do
7186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7187     ac_cv_prog_AS="${ac_tool_prefix}as"
7188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7189     break 2
7190   fi
7191 done
7192   done
7193 IFS=$as_save_IFS
7194
7195 fi
7196 fi
7197 AS=$ac_cv_prog_AS
7198 if test -n "$AS"; then
7199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
7200 $as_echo "$AS" >&6; }
7201 else
7202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7203 $as_echo "no" >&6; }
7204 fi
7205
7206
7207 fi
7208 if test -z "$ac_cv_prog_AS"; then
7209   ac_ct_AS=$AS
7210   # Extract the first word of "as", so it can be a program name with args.
7211 set dummy as; ac_word=$2
7212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7213 $as_echo_n "checking for $ac_word... " >&6; }
7214 if ${ac_cv_prog_ac_ct_AS+:} false; then :
7215   $as_echo_n "(cached) " >&6
7216 else
7217   if test -n "$ac_ct_AS"; then
7218   ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
7219 else
7220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221 for as_dir in $PATH
7222 do
7223   IFS=$as_save_IFS
7224   test -z "$as_dir" && as_dir=.
7225     for ac_exec_ext in '' $ac_executable_extensions; do
7226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7227     ac_cv_prog_ac_ct_AS="as"
7228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7229     break 2
7230   fi
7231 done
7232   done
7233 IFS=$as_save_IFS
7234
7235 fi
7236 fi
7237 ac_ct_AS=$ac_cv_prog_ac_ct_AS
7238 if test -n "$ac_ct_AS"; then
7239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
7240 $as_echo "$ac_ct_AS" >&6; }
7241 else
7242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7243 $as_echo "no" >&6; }
7244 fi
7245
7246   if test "x$ac_ct_AS" = x; then
7247     AS="false"
7248   else
7249     case $cross_compiling:$ac_tool_warned in
7250 yes:)
7251 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7252 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7253 ac_tool_warned=yes ;;
7254 esac
7255     AS=$ac_ct_AS
7256   fi
7257 else
7258   AS="$ac_cv_prog_AS"
7259 fi
7260
7261   if test -n "$ac_tool_prefix"; then
7262   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7263 set dummy ${ac_tool_prefix}objdump; ac_word=$2
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265 $as_echo_n "checking for $ac_word... " >&6; }
7266 if ${ac_cv_prog_OBJDUMP+:} false; then :
7267   $as_echo_n "(cached) " >&6
7268 else
7269   if test -n "$OBJDUMP"; then
7270   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7271 else
7272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7273 for as_dir in $PATH
7274 do
7275   IFS=$as_save_IFS
7276   test -z "$as_dir" && as_dir=.
7277     for ac_exec_ext in '' $ac_executable_extensions; do
7278   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7279     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7280     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7281     break 2
7282   fi
7283 done
7284   done
7285 IFS=$as_save_IFS
7286
7287 fi
7288 fi
7289 OBJDUMP=$ac_cv_prog_OBJDUMP
7290 if test -n "$OBJDUMP"; then
7291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7292 $as_echo "$OBJDUMP" >&6; }
7293 else
7294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7295 $as_echo "no" >&6; }
7296 fi
7297
7298
7299 fi
7300 if test -z "$ac_cv_prog_OBJDUMP"; then
7301   ac_ct_OBJDUMP=$OBJDUMP
7302   # Extract the first word of "objdump", so it can be a program name with args.
7303 set dummy objdump; ac_word=$2
7304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7305 $as_echo_n "checking for $ac_word... " >&6; }
7306 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
7307   $as_echo_n "(cached) " >&6
7308 else
7309   if test -n "$ac_ct_OBJDUMP"; then
7310   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7311 else
7312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7313 for as_dir in $PATH
7314 do
7315   IFS=$as_save_IFS
7316   test -z "$as_dir" && as_dir=.
7317     for ac_exec_ext in '' $ac_executable_extensions; do
7318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7319     ac_cv_prog_ac_ct_OBJDUMP="objdump"
7320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7321     break 2
7322   fi
7323 done
7324   done
7325 IFS=$as_save_IFS
7326
7327 fi
7328 fi
7329 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7330 if test -n "$ac_ct_OBJDUMP"; then
7331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7332 $as_echo "$ac_ct_OBJDUMP" >&6; }
7333 else
7334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7335 $as_echo "no" >&6; }
7336 fi
7337
7338   if test "x$ac_ct_OBJDUMP" = x; then
7339     OBJDUMP="false"
7340   else
7341     case $cross_compiling:$ac_tool_warned in
7342 yes:)
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7344 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7345 ac_tool_warned=yes ;;
7346 esac
7347     OBJDUMP=$ac_ct_OBJDUMP
7348   fi
7349 else
7350   OBJDUMP="$ac_cv_prog_OBJDUMP"
7351 fi
7352
7353   ;;
7354
7355 esac
7356
7357 need_locks="$enable_libtool_lock"
7358
7359
7360 ac_ext=c
7361 ac_cpp='$CPP $CPPFLAGS'
7362 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7363 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7364 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7366 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7367 # On Suns, sometimes $CPP names a directory.
7368 if test -n "$CPP" && test -d "$CPP"; then
7369   CPP=
7370 fi
7371 if test -z "$CPP"; then
7372   if ${ac_cv_prog_CPP+:} false; then :
7373   $as_echo_n "(cached) " >&6
7374 else
7375       # Double quotes because CPP needs to be expanded
7376     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7377     do
7378       ac_preproc_ok=false
7379 for ac_c_preproc_warn_flag in '' yes
7380 do
7381   # Use a header file that comes with gcc, so configuring glibc
7382   # with a fresh cross-compiler works.
7383   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7384   # <limits.h> exists even on freestanding compilers.
7385   # On the NeXT, cc -E runs the code through the compiler's parser,
7386   # not just through cpp. "Syntax error" is here to catch this case.
7387   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7388 /* end confdefs.h.  */
7389 #ifdef __STDC__
7390 # include <limits.h>
7391 #else
7392 # include <assert.h>
7393 #endif
7394                      Syntax error
7395 _ACEOF
7396 if ac_fn_c_try_cpp "$LINENO"; then :
7397
7398 else
7399   # Broken: fails on valid input.
7400 continue
7401 fi
7402 rm -f conftest.err conftest.i conftest.$ac_ext
7403
7404   # OK, works on sane cases.  Now check whether nonexistent headers
7405   # can be detected and how.
7406   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7407 /* end confdefs.h.  */
7408 #include <ac_nonexistent.h>
7409 _ACEOF
7410 if ac_fn_c_try_cpp "$LINENO"; then :
7411   # Broken: success on invalid input.
7412 continue
7413 else
7414   # Passes both tests.
7415 ac_preproc_ok=:
7416 break
7417 fi
7418 rm -f conftest.err conftest.i conftest.$ac_ext
7419
7420 done
7421 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7422 rm -f conftest.i conftest.err conftest.$ac_ext
7423 if $ac_preproc_ok; then :
7424   break
7425 fi
7426
7427     done
7428     ac_cv_prog_CPP=$CPP
7429
7430 fi
7431   CPP=$ac_cv_prog_CPP
7432 else
7433   ac_cv_prog_CPP=$CPP
7434 fi
7435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7436 $as_echo "$CPP" >&6; }
7437 ac_preproc_ok=false
7438 for ac_c_preproc_warn_flag in '' yes
7439 do
7440   # Use a header file that comes with gcc, so configuring glibc
7441   # with a fresh cross-compiler works.
7442   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7443   # <limits.h> exists even on freestanding compilers.
7444   # On the NeXT, cc -E runs the code through the compiler's parser,
7445   # not just through cpp. "Syntax error" is here to catch this case.
7446   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7447 /* end confdefs.h.  */
7448 #ifdef __STDC__
7449 # include <limits.h>
7450 #else
7451 # include <assert.h>
7452 #endif
7453                      Syntax error
7454 _ACEOF
7455 if ac_fn_c_try_cpp "$LINENO"; then :
7456
7457 else
7458   # Broken: fails on valid input.
7459 continue
7460 fi
7461 rm -f conftest.err conftest.i conftest.$ac_ext
7462
7463   # OK, works on sane cases.  Now check whether nonexistent headers
7464   # can be detected and how.
7465   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7466 /* end confdefs.h.  */
7467 #include <ac_nonexistent.h>
7468 _ACEOF
7469 if ac_fn_c_try_cpp "$LINENO"; then :
7470   # Broken: success on invalid input.
7471 continue
7472 else
7473   # Passes both tests.
7474 ac_preproc_ok=:
7475 break
7476 fi
7477 rm -f conftest.err conftest.i conftest.$ac_ext
7478
7479 done
7480 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7481 rm -f conftest.i conftest.err conftest.$ac_ext
7482 if $ac_preproc_ok; then :
7483
7484 else
7485   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7486 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7487 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7488 See \`config.log' for more details" "$LINENO" 5; }
7489 fi
7490
7491 ac_ext=c
7492 ac_cpp='$CPP $CPPFLAGS'
7493 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7494 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7495 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7496
7497
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7499 $as_echo_n "checking for ANSI C header files... " >&6; }
7500 if ${ac_cv_header_stdc+:} false; then :
7501   $as_echo_n "(cached) " >&6
7502 else
7503   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7504 /* end confdefs.h.  */
7505 #include <stdlib.h>
7506 #include <stdarg.h>
7507 #include <string.h>
7508 #include <float.h>
7509
7510 int
7511 main ()
7512 {
7513
7514   ;
7515   return 0;
7516 }
7517 _ACEOF
7518 if ac_fn_c_try_compile "$LINENO"; then :
7519   ac_cv_header_stdc=yes
7520 else
7521   ac_cv_header_stdc=no
7522 fi
7523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7524
7525 if test $ac_cv_header_stdc = yes; then
7526   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7527   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7528 /* end confdefs.h.  */
7529 #include <string.h>
7530
7531 _ACEOF
7532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7533   $EGREP "memchr" >/dev/null 2>&1; then :
7534
7535 else
7536   ac_cv_header_stdc=no
7537 fi
7538 rm -f conftest*
7539
7540 fi
7541
7542 if test $ac_cv_header_stdc = yes; then
7543   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7544   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7545 /* end confdefs.h.  */
7546 #include <stdlib.h>
7547
7548 _ACEOF
7549 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7550   $EGREP "free" >/dev/null 2>&1; then :
7551
7552 else
7553   ac_cv_header_stdc=no
7554 fi
7555 rm -f conftest*
7556
7557 fi
7558
7559 if test $ac_cv_header_stdc = yes; then
7560   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7561   if test "$cross_compiling" = yes; then :
7562   :
7563 else
7564   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7565 /* end confdefs.h.  */
7566 #include <ctype.h>
7567 #include <stdlib.h>
7568 #if ((' ' & 0x0FF) == 0x020)
7569 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7570 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7571 #else
7572 # define ISLOWER(c) \
7573                    (('a' <= (c) && (c) <= 'i') \
7574                      || ('j' <= (c) && (c) <= 'r') \
7575                      || ('s' <= (c) && (c) <= 'z'))
7576 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7577 #endif
7578
7579 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7580 int
7581 main ()
7582 {
7583   int i;
7584   for (i = 0; i < 256; i++)
7585     if (XOR (islower (i), ISLOWER (i))
7586         || toupper (i) != TOUPPER (i))
7587       return 2;
7588   return 0;
7589 }
7590 _ACEOF
7591 if ac_fn_c_try_run "$LINENO"; then :
7592
7593 else
7594   ac_cv_header_stdc=no
7595 fi
7596 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7597   conftest.$ac_objext conftest.beam conftest.$ac_ext
7598 fi
7599
7600 fi
7601 fi
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7603 $as_echo "$ac_cv_header_stdc" >&6; }
7604 if test $ac_cv_header_stdc = yes; then
7605
7606 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7607
7608 fi
7609
7610 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
7611 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7612                   inttypes.h stdint.h unistd.h
7613 do :
7614   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7615 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7616 "
7617 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7618   cat >>confdefs.h <<_ACEOF
7619 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7620 _ACEOF
7621
7622 fi
7623
7624 done
7625
7626
7627 for ac_header in dlfcn.h
7628 do :
7629   ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
7630 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
7631   cat >>confdefs.h <<_ACEOF
7632 #define HAVE_DLFCN_H 1
7633 _ACEOF
7634
7635 fi
7636
7637 done
7638
7639
7640 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
7641
7642 # find the maximum length of command line arguments
7643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7644 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
7645 if ${lt_cv_sys_max_cmd_len+:} false; then :
7646   $as_echo_n "(cached) " >&6
7647 else
7648     i=0
7649   teststring="ABCD"
7650
7651   case $build_os in
7652   msdosdjgpp*)
7653     # On DJGPP, this test can blow up pretty badly due to problems in libc
7654     # (any single argument exceeding 2000 bytes causes a buffer overrun
7655     # during glob expansion).  Even if it were fixed, the result of this
7656     # check would be larger than it should be.
7657     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7658     ;;
7659
7660   gnu*)
7661     # Under GNU Hurd, this test is not required because there is
7662     # no limit to the length of command line arguments.
7663     # Libtool will interpret -1 as no limit whatsoever
7664     lt_cv_sys_max_cmd_len=-1;
7665     ;;
7666
7667   cygwin* | mingw*)
7668     # On Win9x/ME, this test blows up -- it succeeds, but takes
7669     # about 5 minutes as the teststring grows exponentially.
7670     # Worse, since 9x/ME are not pre-emptively multitasking,
7671     # you end up with a "frozen" computer, even though with patience
7672     # the test eventually succeeds (with a max line length of 256k).
7673     # Instead, let's just punt: use the minimum linelength reported by
7674     # all of the supported platforms: 8192 (on NT/2K/XP).
7675     lt_cv_sys_max_cmd_len=8192;
7676     ;;
7677
7678   amigaos*)
7679     # On AmigaOS with pdksh, this test takes hours, literally.
7680     # So we just punt and use a minimum line length of 8192.
7681     lt_cv_sys_max_cmd_len=8192;
7682     ;;
7683
7684   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7685     # This has been around since 386BSD, at least.  Likely further.
7686     if test -x /sbin/sysctl; then
7687       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7688     elif test -x /usr/sbin/sysctl; then
7689       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7690     else
7691       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
7692     fi
7693     # And add a safety zone
7694     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7695     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7696     ;;
7697   osf*)
7698     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7699     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7700     # nice to cause kernel panics so lets avoid the loop below.
7701     # First set a reasonable default.
7702     lt_cv_sys_max_cmd_len=16384
7703     #
7704     if test -x /sbin/sysconfig; then
7705       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7706         *1*) lt_cv_sys_max_cmd_len=-1 ;;
7707       esac
7708     fi
7709     ;;
7710   *)
7711     # If test is not a shell built-in, we'll probably end up computing a
7712     # maximum length that is only half of the actual maximum length, but
7713     # we can't tell.
7714     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7715     while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
7716                = "XX$teststring") >/dev/null 2>&1 &&
7717             new_result=`expr "X$teststring" : ".*" 2>&1` &&
7718             lt_cv_sys_max_cmd_len=$new_result &&
7719             test $i != 17 # 1/2 MB should be enough
7720     do
7721       i=`expr $i + 1`
7722       teststring=$teststring$teststring
7723     done
7724     teststring=
7725     # Add a significant safety factor because C++ compilers can tack on massive
7726     # amounts of additional arguments before passing them to the linker.
7727     # It appears as though 1/2 is a usable value.
7728     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7729     ;;
7730   esac
7731
7732 fi
7733
7734 if test -n $lt_cv_sys_max_cmd_len ; then
7735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7736 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7737 else
7738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7739 $as_echo "none" >&6; }
7740 fi
7741
7742
7743
7744
7745 # Check for command to grab the raw symbol name followed by C symbol from nm.
7746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7747 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
7748 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
7749   $as_echo_n "(cached) " >&6
7750 else
7751
7752 # These are sane defaults that work on at least a few old systems.
7753 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
7754
7755 # Character class describing NM global symbol codes.
7756 symcode='[BCDEGRST]'
7757
7758 # Regexp to match symbols that can be accessed directly from C.
7759 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7760
7761 # Transform an extracted symbol line into a proper C declaration
7762 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
7763
7764 # Transform an extracted symbol line into symbol name and symbol address
7765 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'"
7766
7767 # Define system-specific variables.
7768 case $host_os in
7769 aix*)
7770   symcode='[BCDT]'
7771   ;;
7772 cygwin* | mingw* | pw32*)
7773   symcode='[ABCDGISTW]'
7774   ;;
7775 hpux*) # Its linker distinguishes data from code symbols
7776   if test "$host_cpu" = ia64; then
7777     symcode='[ABCDEGRST]'
7778   fi
7779   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7780   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'"
7781   ;;
7782 linux*)
7783   if test "$host_cpu" = ia64; then
7784     symcode='[ABCDGIRSTW]'
7785     lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7786     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'"
7787   fi
7788   ;;
7789 irix* | nonstopux*)
7790   symcode='[BCDEGRST]'
7791   ;;
7792 osf*)
7793   symcode='[BCDEGQRST]'
7794   ;;
7795 solaris* | sysv5*)
7796   symcode='[BDRT]'
7797   ;;
7798 sysv4)
7799   symcode='[DFNSTU]'
7800   ;;
7801 esac
7802
7803 # Handle CRLF in mingw tool chain
7804 opt_cr=
7805 case $build_os in
7806 mingw*)
7807   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7808   ;;
7809 esac
7810
7811 # If we're using GNU nm, then use its standard symbol codes.
7812 case `$NM -V 2>&1` in
7813 *GNU* | *'with BFD'*)
7814   symcode='[ABCDGIRSTW]' ;;
7815 esac
7816
7817 # Try without a prefix undercore, then with it.
7818 for ac_symprfx in "" "_"; do
7819
7820   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7821   symxfrm="\\1 $ac_symprfx\\2 \\2"
7822
7823   # Write the raw and C identifiers.
7824   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[       ]\($symcode$symcode*\)[         ][      ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7825
7826   # Check to see that the pipe works correctly.
7827   pipe_works=no
7828
7829   rm -f conftest*
7830   cat > conftest.$ac_ext <<EOF
7831 #ifdef __cplusplus
7832 extern "C" {
7833 #endif
7834 char nm_test_var;
7835 void nm_test_func(){}
7836 #ifdef __cplusplus
7837 }
7838 #endif
7839 int main(){nm_test_var='a';nm_test_func();return(0);}
7840 EOF
7841
7842   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7843   (eval $ac_compile) 2>&5
7844   ac_status=$?
7845   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7846   test $ac_status = 0; }; then
7847     # Now try to grab the symbols.
7848     nlist=conftest.nm
7849     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
7850   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
7851   ac_status=$?
7852   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7853   test $ac_status = 0; } && test -s "$nlist"; then
7854       # Try sorting and uniquifying the output.
7855       if sort "$nlist" | uniq > "$nlist"T; then
7856         mv -f "$nlist"T "$nlist"
7857       else
7858         rm -f "$nlist"T
7859       fi
7860
7861       # Make sure that we snagged all the symbols we need.
7862       if grep ' nm_test_var$' "$nlist" >/dev/null; then
7863         if grep ' nm_test_func$' "$nlist" >/dev/null; then
7864           cat <<EOF > conftest.$ac_ext
7865 #ifdef __cplusplus
7866 extern "C" {
7867 #endif
7868
7869 EOF
7870           # Now generate the symbol file.
7871           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7872
7873           cat <<EOF >> conftest.$ac_ext
7874 #if defined (__STDC__) && __STDC__
7875 # define lt_ptr_t void *
7876 #else
7877 # define lt_ptr_t char *
7878 # define const
7879 #endif
7880
7881 /* The mapping between symbol names and symbols. */
7882 const struct {
7883   const char *name;
7884   lt_ptr_t address;
7885 }
7886 lt_preloaded_symbols[] =
7887 {
7888 EOF
7889           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7890           cat <<\EOF >> conftest.$ac_ext
7891   {0, (lt_ptr_t) 0}
7892 };
7893
7894 #ifdef __cplusplus
7895 }
7896 #endif
7897 EOF
7898           # Now try linking the two files.
7899           mv conftest.$ac_objext conftstm.$ac_objext
7900           lt_save_LIBS="$LIBS"
7901           lt_save_CFLAGS="$CFLAGS"
7902           LIBS="conftstm.$ac_objext"
7903           CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7904           if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7905   (eval $ac_link) 2>&5
7906   ac_status=$?
7907   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7908   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7909             pipe_works=yes
7910           fi
7911           LIBS="$lt_save_LIBS"
7912           CFLAGS="$lt_save_CFLAGS"
7913         else
7914           echo "cannot find nm_test_func in $nlist" >&5
7915         fi
7916       else
7917         echo "cannot find nm_test_var in $nlist" >&5
7918       fi
7919     else
7920       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7921     fi
7922   else
7923     echo "$progname: failed program was:" >&5
7924     cat conftest.$ac_ext >&5
7925   fi
7926   rm -f conftest* conftst*
7927
7928   # Do not use the global_symbol_pipe unless it works.
7929   if test "$pipe_works" = yes; then
7930     break
7931   else
7932     lt_cv_sys_global_symbol_pipe=
7933   fi
7934 done
7935
7936 fi
7937
7938 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7939   lt_cv_sys_global_symbol_to_cdecl=
7940 fi
7941 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7943 $as_echo "failed" >&6; }
7944 else
7945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7946 $as_echo "ok" >&6; }
7947 fi
7948
7949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
7950 $as_echo_n "checking for objdir... " >&6; }
7951 if ${lt_cv_objdir+:} false; then :
7952   $as_echo_n "(cached) " >&6
7953 else
7954   rm -f .libs 2>/dev/null
7955 mkdir .libs 2>/dev/null
7956 if test -d .libs; then
7957   lt_cv_objdir=.libs
7958 else
7959   # MS-DOS does not allow filenames that begin with a dot.
7960   lt_cv_objdir=_libs
7961 fi
7962 rmdir .libs 2>/dev/null
7963 fi
7964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
7965 $as_echo "$lt_cv_objdir" >&6; }
7966 objdir=$lt_cv_objdir
7967
7968
7969
7970
7971
7972 case $host_os in
7973 aix3*)
7974   # AIX sometimes has problems with the GCC collect2 program.  For some
7975   # reason, if we set the COLLECT_NAMES environment variable, the problems
7976   # vanish in a puff of smoke.
7977   if test "X${COLLECT_NAMES+set}" != Xset; then
7978     COLLECT_NAMES=
7979     export COLLECT_NAMES
7980   fi
7981   ;;
7982 esac
7983
7984 # Sed substitution that helps us do robust quoting.  It backslashifies
7985 # metacharacters that are still active within double-quoted strings.
7986 Xsed='sed -e 1s/^X//'
7987 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
7988
7989 # Same as above, but do not quote variable references.
7990 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
7991
7992 # Sed substitution to delay expansion of an escaped shell variable in a
7993 # double_quote_subst'ed string.
7994 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7995
7996 # Sed substitution to avoid accidental globbing in evaled expressions
7997 no_glob_subst='s/\*/\\\*/g'
7998
7999 # Constants:
8000 rm="rm -f"
8001
8002 # Global variables:
8003 default_ofile=libtool
8004 can_build_shared=yes
8005
8006 # All known linkers require a `.a' archive for static linking (except MSVC,
8007 # which needs '.lib').
8008 libext=a
8009 ltmain="$ac_aux_dir/ltmain.sh"
8010 ofile="$default_ofile"
8011 with_gnu_ld="$lt_cv_prog_gnu_ld"
8012
8013 if test -n "$ac_tool_prefix"; then
8014   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8015 set dummy ${ac_tool_prefix}ar; ac_word=$2
8016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8017 $as_echo_n "checking for $ac_word... " >&6; }
8018 if ${ac_cv_prog_AR+:} false; then :
8019   $as_echo_n "(cached) " >&6
8020 else
8021   if test -n "$AR"; then
8022   ac_cv_prog_AR="$AR" # Let the user override the test.
8023 else
8024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8025 for as_dir in $PATH
8026 do
8027   IFS=$as_save_IFS
8028   test -z "$as_dir" && as_dir=.
8029     for ac_exec_ext in '' $ac_executable_extensions; do
8030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8031     ac_cv_prog_AR="${ac_tool_prefix}ar"
8032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8033     break 2
8034   fi
8035 done
8036   done
8037 IFS=$as_save_IFS
8038
8039 fi
8040 fi
8041 AR=$ac_cv_prog_AR
8042 if test -n "$AR"; then
8043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8044 $as_echo "$AR" >&6; }
8045 else
8046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8047 $as_echo "no" >&6; }
8048 fi
8049
8050
8051 fi
8052 if test -z "$ac_cv_prog_AR"; then
8053   ac_ct_AR=$AR
8054   # Extract the first word of "ar", so it can be a program name with args.
8055 set dummy ar; ac_word=$2
8056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8057 $as_echo_n "checking for $ac_word... " >&6; }
8058 if ${ac_cv_prog_ac_ct_AR+:} false; then :
8059   $as_echo_n "(cached) " >&6
8060 else
8061   if test -n "$ac_ct_AR"; then
8062   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8063 else
8064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8065 for as_dir in $PATH
8066 do
8067   IFS=$as_save_IFS
8068   test -z "$as_dir" && as_dir=.
8069     for ac_exec_ext in '' $ac_executable_extensions; do
8070   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8071     ac_cv_prog_ac_ct_AR="ar"
8072     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8073     break 2
8074   fi
8075 done
8076   done
8077 IFS=$as_save_IFS
8078
8079 fi
8080 fi
8081 ac_ct_AR=$ac_cv_prog_ac_ct_AR
8082 if test -n "$ac_ct_AR"; then
8083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8084 $as_echo "$ac_ct_AR" >&6; }
8085 else
8086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8087 $as_echo "no" >&6; }
8088 fi
8089
8090   if test "x$ac_ct_AR" = x; then
8091     AR="false"
8092   else
8093     case $cross_compiling:$ac_tool_warned in
8094 yes:)
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8096 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8097 ac_tool_warned=yes ;;
8098 esac
8099     AR=$ac_ct_AR
8100   fi
8101 else
8102   AR="$ac_cv_prog_AR"
8103 fi
8104
8105 if test -n "$ac_tool_prefix"; then
8106   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8107 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8109 $as_echo_n "checking for $ac_word... " >&6; }
8110 if ${ac_cv_prog_RANLIB+:} false; then :
8111   $as_echo_n "(cached) " >&6
8112 else
8113   if test -n "$RANLIB"; then
8114   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8115 else
8116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8117 for as_dir in $PATH
8118 do
8119   IFS=$as_save_IFS
8120   test -z "$as_dir" && as_dir=.
8121     for ac_exec_ext in '' $ac_executable_extensions; do
8122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8123     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8125     break 2
8126   fi
8127 done
8128   done
8129 IFS=$as_save_IFS
8130
8131 fi
8132 fi
8133 RANLIB=$ac_cv_prog_RANLIB
8134 if test -n "$RANLIB"; then
8135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8136 $as_echo "$RANLIB" >&6; }
8137 else
8138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8139 $as_echo "no" >&6; }
8140 fi
8141
8142
8143 fi
8144 if test -z "$ac_cv_prog_RANLIB"; then
8145   ac_ct_RANLIB=$RANLIB
8146   # Extract the first word of "ranlib", so it can be a program name with args.
8147 set dummy ranlib; ac_word=$2
8148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8149 $as_echo_n "checking for $ac_word... " >&6; }
8150 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8151   $as_echo_n "(cached) " >&6
8152 else
8153   if test -n "$ac_ct_RANLIB"; then
8154   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8155 else
8156 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8157 for as_dir in $PATH
8158 do
8159   IFS=$as_save_IFS
8160   test -z "$as_dir" && as_dir=.
8161     for ac_exec_ext in '' $ac_executable_extensions; do
8162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8163     ac_cv_prog_ac_ct_RANLIB="ranlib"
8164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8165     break 2
8166   fi
8167 done
8168   done
8169 IFS=$as_save_IFS
8170
8171 fi
8172 fi
8173 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8174 if test -n "$ac_ct_RANLIB"; then
8175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8176 $as_echo "$ac_ct_RANLIB" >&6; }
8177 else
8178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8179 $as_echo "no" >&6; }
8180 fi
8181
8182   if test "x$ac_ct_RANLIB" = x; then
8183     RANLIB=":"
8184   else
8185     case $cross_compiling:$ac_tool_warned in
8186 yes:)
8187 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8188 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8189 ac_tool_warned=yes ;;
8190 esac
8191     RANLIB=$ac_ct_RANLIB
8192   fi
8193 else
8194   RANLIB="$ac_cv_prog_RANLIB"
8195 fi
8196
8197 if test -n "$ac_tool_prefix"; then
8198   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8199 set dummy ${ac_tool_prefix}strip; ac_word=$2
8200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8201 $as_echo_n "checking for $ac_word... " >&6; }
8202 if ${ac_cv_prog_STRIP+:} false; then :
8203   $as_echo_n "(cached) " >&6
8204 else
8205   if test -n "$STRIP"; then
8206   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8207 else
8208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8209 for as_dir in $PATH
8210 do
8211   IFS=$as_save_IFS
8212   test -z "$as_dir" && as_dir=.
8213     for ac_exec_ext in '' $ac_executable_extensions; do
8214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8215     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8217     break 2
8218   fi
8219 done
8220   done
8221 IFS=$as_save_IFS
8222
8223 fi
8224 fi
8225 STRIP=$ac_cv_prog_STRIP
8226 if test -n "$STRIP"; then
8227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8228 $as_echo "$STRIP" >&6; }
8229 else
8230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8231 $as_echo "no" >&6; }
8232 fi
8233
8234
8235 fi
8236 if test -z "$ac_cv_prog_STRIP"; then
8237   ac_ct_STRIP=$STRIP
8238   # Extract the first word of "strip", so it can be a program name with args.
8239 set dummy strip; ac_word=$2
8240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8241 $as_echo_n "checking for $ac_word... " >&6; }
8242 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
8243   $as_echo_n "(cached) " >&6
8244 else
8245   if test -n "$ac_ct_STRIP"; then
8246   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8247 else
8248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8249 for as_dir in $PATH
8250 do
8251   IFS=$as_save_IFS
8252   test -z "$as_dir" && as_dir=.
8253     for ac_exec_ext in '' $ac_executable_extensions; do
8254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8255     ac_cv_prog_ac_ct_STRIP="strip"
8256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8257     break 2
8258   fi
8259 done
8260   done
8261 IFS=$as_save_IFS
8262
8263 fi
8264 fi
8265 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8266 if test -n "$ac_ct_STRIP"; then
8267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8268 $as_echo "$ac_ct_STRIP" >&6; }
8269 else
8270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8271 $as_echo "no" >&6; }
8272 fi
8273
8274   if test "x$ac_ct_STRIP" = x; then
8275     STRIP=":"
8276   else
8277     case $cross_compiling:$ac_tool_warned in
8278 yes:)
8279 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8280 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8281 ac_tool_warned=yes ;;
8282 esac
8283     STRIP=$ac_ct_STRIP
8284   fi
8285 else
8286   STRIP="$ac_cv_prog_STRIP"
8287 fi
8288
8289
8290 old_CC="$CC"
8291 old_CFLAGS="$CFLAGS"
8292
8293 # Set sane defaults for various variables
8294 test -z "$AR" && AR=ar
8295 test -z "$AR_FLAGS" && AR_FLAGS=cru
8296 test -z "$AS" && AS=as
8297 test -z "$CC" && CC=cc
8298 test -z "$LTCC" && LTCC=$CC
8299 test -z "$DLLTOOL" && DLLTOOL=dlltool
8300 test -z "$LD" && LD=ld
8301 test -z "$LN_S" && LN_S="ln -s"
8302 test -z "$MAGIC_CMD" && MAGIC_CMD=file
8303 test -z "$NM" && NM=nm
8304 test -z "$SED" && SED=sed
8305 test -z "$OBJDUMP" && OBJDUMP=objdump
8306 test -z "$RANLIB" && RANLIB=:
8307 test -z "$STRIP" && STRIP=:
8308 test -z "$ac_objext" && ac_objext=o
8309
8310 # Determine commands to create old-style static archives.
8311 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
8312 old_postinstall_cmds='chmod 644 $oldlib'
8313 old_postuninstall_cmds=
8314
8315 if test -n "$RANLIB"; then
8316   case $host_os in
8317   openbsd*)
8318     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
8319     ;;
8320   *)
8321     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
8322     ;;
8323   esac
8324   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
8325 fi
8326
8327 for cc_temp in $compiler""; do
8328   case $cc_temp in
8329     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8330     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8331     \-*) ;;
8332     *) break;;
8333   esac
8334 done
8335 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8336
8337
8338 # Only perform the check for file, if the check method requires it
8339 case $deplibs_check_method in
8340 file_magic*)
8341   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8342     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
8343 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8344 if ${lt_cv_path_MAGIC_CMD+:} false; then :
8345   $as_echo_n "(cached) " >&6
8346 else
8347   case $MAGIC_CMD in
8348 [\\/*] |  ?:[\\/]*)
8349   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8350   ;;
8351 *)
8352   lt_save_MAGIC_CMD="$MAGIC_CMD"
8353   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8354   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8355   for ac_dir in $ac_dummy; do
8356     IFS="$lt_save_ifs"
8357     test -z "$ac_dir" && ac_dir=.
8358     if test -f $ac_dir/${ac_tool_prefix}file; then
8359       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8360       if test -n "$file_magic_test_file"; then
8361         case $deplibs_check_method in
8362         "file_magic "*)
8363           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8364           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8365           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8366             $EGREP "$file_magic_regex" > /dev/null; then
8367             :
8368           else
8369             cat <<EOF 1>&2
8370
8371 *** Warning: the command libtool uses to detect shared libraries,
8372 *** $file_magic_cmd, produces output that libtool cannot recognize.
8373 *** The result is that libtool may fail to recognize shared libraries
8374 *** as such.  This will affect the creation of libtool libraries that
8375 *** depend on shared libraries, but programs linked with such libtool
8376 *** libraries will work regardless of this problem.  Nevertheless, you
8377 *** may want to report the problem to your system manager and/or to
8378 *** bug-libtool@gnu.org
8379
8380 EOF
8381           fi ;;
8382         esac
8383       fi
8384       break
8385     fi
8386   done
8387   IFS="$lt_save_ifs"
8388   MAGIC_CMD="$lt_save_MAGIC_CMD"
8389   ;;
8390 esac
8391 fi
8392
8393 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8394 if test -n "$MAGIC_CMD"; then
8395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8396 $as_echo "$MAGIC_CMD" >&6; }
8397 else
8398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8399 $as_echo "no" >&6; }
8400 fi
8401
8402 if test -z "$lt_cv_path_MAGIC_CMD"; then
8403   if test -n "$ac_tool_prefix"; then
8404     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
8405 $as_echo_n "checking for file... " >&6; }
8406 if ${lt_cv_path_MAGIC_CMD+:} false; then :
8407   $as_echo_n "(cached) " >&6
8408 else
8409   case $MAGIC_CMD in
8410 [\\/*] |  ?:[\\/]*)
8411   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8412   ;;
8413 *)
8414   lt_save_MAGIC_CMD="$MAGIC_CMD"
8415   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8416   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8417   for ac_dir in $ac_dummy; do
8418     IFS="$lt_save_ifs"
8419     test -z "$ac_dir" && ac_dir=.
8420     if test -f $ac_dir/file; then
8421       lt_cv_path_MAGIC_CMD="$ac_dir/file"
8422       if test -n "$file_magic_test_file"; then
8423         case $deplibs_check_method in
8424         "file_magic "*)
8425           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8426           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8427           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8428             $EGREP "$file_magic_regex" > /dev/null; then
8429             :
8430           else
8431             cat <<EOF 1>&2
8432
8433 *** Warning: the command libtool uses to detect shared libraries,
8434 *** $file_magic_cmd, produces output that libtool cannot recognize.
8435 *** The result is that libtool may fail to recognize shared libraries
8436 *** as such.  This will affect the creation of libtool libraries that
8437 *** depend on shared libraries, but programs linked with such libtool
8438 *** libraries will work regardless of this problem.  Nevertheless, you
8439 *** may want to report the problem to your system manager and/or to
8440 *** bug-libtool@gnu.org
8441
8442 EOF
8443           fi ;;
8444         esac
8445       fi
8446       break
8447     fi
8448   done
8449   IFS="$lt_save_ifs"
8450   MAGIC_CMD="$lt_save_MAGIC_CMD"
8451   ;;
8452 esac
8453 fi
8454
8455 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8456 if test -n "$MAGIC_CMD"; then
8457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8458 $as_echo "$MAGIC_CMD" >&6; }
8459 else
8460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8461 $as_echo "no" >&6; }
8462 fi
8463
8464   else
8465     MAGIC_CMD=:
8466   fi
8467 fi
8468
8469   fi
8470   ;;
8471 esac
8472
8473 enable_dlopen=yes
8474 enable_win32_dll=yes
8475
8476 # Check whether --enable-libtool-lock was given.
8477 if test "${enable_libtool_lock+set}" = set; then :
8478   enableval=$enable_libtool_lock;
8479 fi
8480
8481 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
8482
8483
8484 # Check whether --with-pic was given.
8485 if test "${with_pic+set}" = set; then :
8486   withval=$with_pic; pic_mode="$withval"
8487 else
8488   pic_mode=default
8489 fi
8490
8491 test -z "$pic_mode" && pic_mode=default
8492
8493 # Use C for the default configuration in the libtool script
8494 tagname=
8495 lt_save_CC="$CC"
8496 ac_ext=c
8497 ac_cpp='$CPP $CPPFLAGS'
8498 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8499 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8500 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8501
8502
8503 # Source file extension for C test sources.
8504 ac_ext=c
8505
8506 # Object file extension for compiled C test sources.
8507 objext=o
8508 objext=$objext
8509
8510 # Code to be used in simple compile tests
8511 lt_simple_compile_test_code="int some_variable = 0;\n"
8512
8513 # Code to be used in simple link tests
8514 lt_simple_link_test_code='int main(){return(0);}\n'
8515
8516
8517 # If no C compiler was specified, use CC.
8518 LTCC=${LTCC-"$CC"}
8519
8520 # Allow CC to be a program name with arguments.
8521 compiler=$CC
8522
8523
8524 # save warnings/boilerplate of simple test code
8525 ac_outfile=conftest.$ac_objext
8526 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
8527 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8528 _lt_compiler_boilerplate=`cat conftest.err`
8529 $rm conftest*
8530
8531 ac_outfile=conftest.$ac_objext
8532 printf "$lt_simple_link_test_code" >conftest.$ac_ext
8533 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8534 _lt_linker_boilerplate=`cat conftest.err`
8535 $rm conftest*
8536
8537
8538 #
8539 # Check for any special shared library compilation flags.
8540 #
8541 lt_prog_cc_shlib=
8542 if test "$GCC" = no; then
8543   case $host_os in
8544   sco3.2v5*)
8545     lt_prog_cc_shlib='-belf'
8546     ;;
8547   esac
8548 fi
8549 if test -n "$lt_prog_cc_shlib"; then
8550   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
8551 $as_echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
8552   if echo "$old_CC $old_CFLAGS " | grep "[      ]$lt_prog_cc_shlib[     ]" >/dev/null; then :
8553   else
8554     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
8555 $as_echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
8556     lt_cv_prog_cc_can_build_shared=no
8557   fi
8558 fi
8559
8560
8561 #
8562 # Check to make sure the static flag actually works.
8563 #
8564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_prog_compiler_static works" >&5
8565 $as_echo_n "checking if $compiler static flag $lt_prog_compiler_static works... " >&6; }
8566 if ${lt_prog_compiler_static_works+:} false; then :
8567   $as_echo_n "(cached) " >&6
8568 else
8569   lt_prog_compiler_static_works=no
8570    save_LDFLAGS="$LDFLAGS"
8571    LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
8572    printf "$lt_simple_link_test_code" > conftest.$ac_ext
8573    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8574      # The linker can only warn and ignore the option if not recognized
8575      # So say no if there are warnings
8576      if test -s conftest.err; then
8577        # Append any errors to the config.log.
8578        cat conftest.err 1>&5
8579        $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
8580        $SED '/^$/d' conftest.err >conftest.er2
8581        if diff conftest.exp conftest.er2 >/dev/null; then
8582          lt_prog_compiler_static_works=yes
8583        fi
8584      else
8585        lt_prog_compiler_static_works=yes
8586      fi
8587    fi
8588    $rm conftest*
8589    LDFLAGS="$save_LDFLAGS"
8590
8591 fi
8592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_static_works" >&5
8593 $as_echo "$lt_prog_compiler_static_works" >&6; }
8594
8595 if test x"$lt_prog_compiler_static_works" = xyes; then
8596     :
8597 else
8598     lt_prog_compiler_static=
8599 fi
8600
8601
8602
8603
8604 lt_prog_compiler_no_builtin_flag=
8605
8606 if test "$GCC" = yes; then
8607   lt_prog_compiler_no_builtin_flag=' -fno-builtin'
8608
8609
8610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
8611 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
8612 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
8613   $as_echo_n "(cached) " >&6
8614 else
8615   lt_cv_prog_compiler_rtti_exceptions=no
8616   ac_outfile=conftest.$ac_objext
8617    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8618    lt_compiler_flag="-fno-rtti -fno-exceptions"
8619    # Insert the option either (1) after the last *FLAGS variable, or
8620    # (2) before a word containing "conftest.", or (3) at the end.
8621    # Note that $ac_compile itself does not contain backslashes and begins
8622    # with a dollar sign (not a hyphen), so the echo should work correctly.
8623    # The option is referenced via a variable to avoid confusing sed.
8624    lt_compile=`echo "$ac_compile" | $SED \
8625    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8626    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8627    -e 's:$: $lt_compiler_flag:'`
8628    (eval echo "\"\$as_me:8628: $lt_compile\"" >&5)
8629    (eval "$lt_compile" 2>conftest.err)
8630    ac_status=$?
8631    cat conftest.err >&5
8632    echo "$as_me:8632: \$? = $ac_status" >&5
8633    if (exit $ac_status) && test -s "$ac_outfile"; then
8634      # The compiler can only warn and ignore the option if not recognized
8635      # So say no if there are warnings other than the usual output.
8636      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8637      $SED '/^$/d' conftest.err >conftest.er2
8638      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8639        lt_cv_prog_compiler_rtti_exceptions=yes
8640      fi
8641    fi
8642    $rm conftest*
8643
8644 fi
8645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
8646 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
8647
8648 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
8649     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
8650 else
8651     :
8652 fi
8653
8654 fi
8655
8656 lt_prog_compiler_wl=
8657 lt_prog_compiler_pic=
8658 lt_prog_compiler_static=
8659
8660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8661 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8662
8663   if test "$GCC" = yes; then
8664     lt_prog_compiler_wl='-Wl,'
8665     lt_prog_compiler_static='-static'
8666
8667     case $host_os in
8668       aix*)
8669       # All AIX code is PIC.
8670       if test "$host_cpu" = ia64; then
8671         # AIX 5 now supports IA64 processor
8672         lt_prog_compiler_static='-Bstatic'
8673       fi
8674       ;;
8675
8676     amigaos*)
8677       # FIXME: we need at least 68020 code to build shared libraries, but
8678       # adding the `-m68020' flag to GCC prevents building anything better,
8679       # like `-m68040'.
8680       lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
8681       ;;
8682
8683     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8684       # PIC is the default for these OSes.
8685       ;;
8686
8687     mingw* | pw32* | os2*)
8688       # This hack is so that the source file can tell whether it is being
8689       # built for inclusion in a dll (and should export symbols for example).
8690       lt_prog_compiler_pic='-DDLL_EXPORT'
8691       ;;
8692
8693     darwin* | rhapsody*)
8694       # PIC is the default on this platform
8695       # Common symbols not allowed in MH_DYLIB files
8696       lt_prog_compiler_pic='-fno-common'
8697       ;;
8698
8699     msdosdjgpp*)
8700       # Just because we use GCC doesn't mean we suddenly get shared libraries
8701       # on systems that don't support them.
8702       lt_prog_compiler_can_build_shared=no
8703       enable_shared=no
8704       ;;
8705
8706     sysv4*MP*)
8707       if test -d /usr/nec; then
8708         lt_prog_compiler_pic=-Kconform_pic
8709       fi
8710       ;;
8711
8712     hpux*)
8713       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8714       # not for PA HP-UX.
8715       case $host_cpu in
8716       hppa*64*|ia64*)
8717         # +Z the default
8718         ;;
8719       *)
8720         lt_prog_compiler_pic='-fPIC'
8721         ;;
8722       esac
8723       ;;
8724
8725     *)
8726       lt_prog_compiler_pic='-fPIC'
8727       ;;
8728     esac
8729   else
8730     # PORTME Check for flag to pass linker flags through the system compiler.
8731     case $host_os in
8732     aix*)
8733       lt_prog_compiler_wl='-Wl,'
8734       if test "$host_cpu" = ia64; then
8735         # AIX 5 now supports IA64 processor
8736         lt_prog_compiler_static='-Bstatic'
8737       else
8738         lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
8739       fi
8740       ;;
8741       darwin*)
8742         # PIC is the default on this platform
8743         # Common symbols not allowed in MH_DYLIB files
8744        case $cc_basename in
8745          xlc*)
8746          lt_prog_compiler_pic='-qnocommon'
8747          lt_prog_compiler_wl='-Wl,'
8748          ;;
8749        esac
8750        ;;
8751
8752     mingw* | pw32* | os2*)
8753       # This hack is so that the source file can tell whether it is being
8754       # built for inclusion in a dll (and should export symbols for example).
8755       lt_prog_compiler_pic='-DDLL_EXPORT'
8756       ;;
8757
8758     hpux9* | hpux10* | hpux11*)
8759       lt_prog_compiler_wl='-Wl,'
8760       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8761       # not for PA HP-UX.
8762       case $host_cpu in
8763       hppa*64*|ia64*)
8764         # +Z the default
8765         ;;
8766       *)
8767         lt_prog_compiler_pic='+Z'
8768         ;;
8769       esac
8770       # Is there a better lt_prog_compiler_static that works with the bundled CC?
8771       lt_prog_compiler_static='${wl}-a ${wl}archive'
8772       ;;
8773
8774     irix5* | irix6* | nonstopux*)
8775       lt_prog_compiler_wl='-Wl,'
8776       # PIC (with -KPIC) is the default.
8777       lt_prog_compiler_static='-non_shared'
8778       ;;
8779
8780     newsos6)
8781       lt_prog_compiler_pic='-KPIC'
8782       lt_prog_compiler_static='-Bstatic'
8783       ;;
8784
8785     linux*)
8786       case $cc_basename in
8787       icc* | ecc*)
8788         lt_prog_compiler_wl='-Wl,'
8789         lt_prog_compiler_pic='-KPIC'
8790         lt_prog_compiler_static='-static'
8791         ;;
8792       pgcc* | pgf77* | pgf90* | pgf95*)
8793         # Portland Group compilers (*not* the Pentium gcc compiler,
8794         # which looks to be a dead project)
8795         lt_prog_compiler_wl='-Wl,'
8796         lt_prog_compiler_pic='-fpic'
8797         lt_prog_compiler_static='-Bstatic'
8798         ;;
8799       ccc*)
8800         lt_prog_compiler_wl='-Wl,'
8801         # All Alpha code is PIC.
8802         lt_prog_compiler_static='-non_shared'
8803         ;;
8804       esac
8805       ;;
8806
8807     osf3* | osf4* | osf5*)
8808       lt_prog_compiler_wl='-Wl,'
8809       # All OSF/1 code is PIC.
8810       lt_prog_compiler_static='-non_shared'
8811       ;;
8812
8813     sco3.2v5*)
8814       lt_prog_compiler_pic='-Kpic'
8815       lt_prog_compiler_static='-dn'
8816       ;;
8817
8818     solaris*)
8819       lt_prog_compiler_pic='-KPIC'
8820       lt_prog_compiler_static='-Bstatic'
8821       case $cc_basename in
8822       f77* | f90* | f95*)
8823         lt_prog_compiler_wl='-Qoption ld ';;
8824       *)
8825         lt_prog_compiler_wl='-Wl,';;
8826       esac
8827       ;;
8828
8829     sunos4*)
8830       lt_prog_compiler_wl='-Qoption ld '
8831       lt_prog_compiler_pic='-PIC'
8832       lt_prog_compiler_static='-Bstatic'
8833       ;;
8834
8835     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8836       lt_prog_compiler_wl='-Wl,'
8837       lt_prog_compiler_pic='-KPIC'
8838       lt_prog_compiler_static='-Bstatic'
8839       ;;
8840
8841     sysv4*MP*)
8842       if test -d /usr/nec ;then
8843         lt_prog_compiler_pic='-Kconform_pic'
8844         lt_prog_compiler_static='-Bstatic'
8845       fi
8846       ;;
8847
8848     unicos*)
8849       lt_prog_compiler_wl='-Wl,'
8850       lt_prog_compiler_can_build_shared=no
8851       ;;
8852
8853     uts4*)
8854       lt_prog_compiler_pic='-pic'
8855       lt_prog_compiler_static='-Bstatic'
8856       ;;
8857
8858     *)
8859       lt_prog_compiler_can_build_shared=no
8860       ;;
8861     esac
8862   fi
8863
8864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
8865 $as_echo "$lt_prog_compiler_pic" >&6; }
8866
8867 #
8868 # Check to make sure the PIC flag actually works.
8869 #
8870 if test -n "$lt_prog_compiler_pic"; then
8871
8872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8873 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
8874 if ${lt_prog_compiler_pic_works+:} false; then :
8875   $as_echo_n "(cached) " >&6
8876 else
8877   lt_prog_compiler_pic_works=no
8878   ac_outfile=conftest.$ac_objext
8879    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8880    lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8881    # Insert the option either (1) after the last *FLAGS variable, or
8882    # (2) before a word containing "conftest.", or (3) at the end.
8883    # Note that $ac_compile itself does not contain backslashes and begins
8884    # with a dollar sign (not a hyphen), so the echo should work correctly.
8885    # The option is referenced via a variable to avoid confusing sed.
8886    lt_compile=`echo "$ac_compile" | $SED \
8887    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8888    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8889    -e 's:$: $lt_compiler_flag:'`
8890    (eval echo "\"\$as_me:8890: $lt_compile\"" >&5)
8891    (eval "$lt_compile" 2>conftest.err)
8892    ac_status=$?
8893    cat conftest.err >&5
8894    echo "$as_me:8894: \$? = $ac_status" >&5
8895    if (exit $ac_status) && test -s "$ac_outfile"; then
8896      # The compiler can only warn and ignore the option if not recognized
8897      # So say no if there are warnings other than the usual output.
8898      $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8899      $SED '/^$/d' conftest.err >conftest.er2
8900      if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8901        lt_prog_compiler_pic_works=yes
8902      fi
8903    fi
8904    $rm conftest*
8905
8906 fi
8907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_works" >&5
8908 $as_echo "$lt_prog_compiler_pic_works" >&6; }
8909
8910 if test x"$lt_prog_compiler_pic_works" = xyes; then
8911     case $lt_prog_compiler_pic in
8912      "" | " "*) ;;
8913      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8914      esac
8915 else
8916     lt_prog_compiler_pic=
8917      lt_prog_compiler_can_build_shared=no
8918 fi
8919
8920 fi
8921 case $host_os in
8922   # For platforms which do not support PIC, -DPIC is meaningless:
8923   *djgpp*)
8924     lt_prog_compiler_pic=
8925     ;;
8926   *)
8927     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8928     ;;
8929 esac
8930
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8932 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8933 if ${lt_cv_prog_compiler_c_o+:} false; then :
8934   $as_echo_n "(cached) " >&6
8935 else
8936   lt_cv_prog_compiler_c_o=no
8937    $rm -r conftest 2>/dev/null
8938    mkdir conftest
8939    cd conftest
8940    mkdir out
8941    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8942
8943    lt_compiler_flag="-o out/conftest2.$ac_objext"
8944    # Insert the option either (1) after the last *FLAGS variable, or
8945    # (2) before a word containing "conftest.", or (3) at the end.
8946    # Note that $ac_compile itself does not contain backslashes and begins
8947    # with a dollar sign (not a hyphen), so the echo should work correctly.
8948    lt_compile=`echo "$ac_compile" | $SED \
8949    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8950    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8951    -e 's:$: $lt_compiler_flag:'`
8952    (eval echo "\"\$as_me:8952: $lt_compile\"" >&5)
8953    (eval "$lt_compile" 2>out/conftest.err)
8954    ac_status=$?
8955    cat out/conftest.err >&5
8956    echo "$as_me:8956: \$? = $ac_status" >&5
8957    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8958    then
8959      # The compiler can only warn and ignore the option if not recognized
8960      # So say no if there are warnings
8961      $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
8962      $SED '/^$/d' out/conftest.err >out/conftest.er2
8963      if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8964        lt_cv_prog_compiler_c_o=yes
8965      fi
8966    fi
8967    chmod u+w . 2>&5
8968    $rm conftest*
8969    # SGI C++ compiler will create directory out/ii_files/ for
8970    # template instantiation
8971    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
8972    $rm out/* && rmdir out
8973    cd ..
8974    rmdir conftest
8975    $rm conftest*
8976
8977 fi
8978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8979 $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8980
8981
8982 hard_links="nottested"
8983 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8984   # do not overwrite the value of need_locks provided by the user
8985   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
8986 $as_echo_n "checking if we can lock with hard links... " >&6; }
8987   hard_links=yes
8988   $rm conftest*
8989   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8990   touch conftest.a
8991   ln conftest.a conftest.b 2>&5 || hard_links=no
8992   ln conftest.a conftest.b 2>/dev/null && hard_links=no
8993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
8994 $as_echo "$hard_links" >&6; }
8995   if test "$hard_links" = no; then
8996     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8997 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8998     need_locks=warn
8999   fi
9000 else
9001   need_locks=no
9002 fi
9003
9004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
9005 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
9006
9007   runpath_var=
9008   allow_undefined_flag=
9009   enable_shared_with_static_runtimes=no
9010   archive_cmds=
9011   archive_expsym_cmds=
9012   old_archive_From_new_cmds=
9013   old_archive_from_expsyms_cmds=
9014   export_dynamic_flag_spec=
9015   whole_archive_flag_spec=
9016   thread_safe_flag_spec=
9017   hardcode_libdir_flag_spec=
9018   hardcode_libdir_flag_spec_ld=
9019   hardcode_libdir_separator=
9020   hardcode_direct=no
9021   hardcode_minus_L=no
9022   hardcode_shlibpath_var=unsupported
9023   link_all_deplibs=unknown
9024   hardcode_automatic=no
9025   module_cmds=
9026   module_expsym_cmds=
9027   always_export_symbols=no
9028   export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
9029   # include_expsyms should be a list of space-separated symbols to be *always*
9030   # included in the symbol list
9031   include_expsyms=
9032   # exclude_expsyms can be an extended regexp of symbols to exclude
9033   # it will be wrapped by ` (' and `)$', so one must not match beginning or
9034   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
9035   # as well as any symbol that contains `d'.
9036   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
9037   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9038   # platforms (ab)use it in PIC code, but their linkers get confused if
9039   # the symbol is explicitly referenced.  Since portable code cannot
9040   # rely on this symbol name, it's probably fine to never include it in
9041   # preloaded symbol tables.
9042   extract_expsyms_cmds=
9043   # Just being paranoid about ensuring that cc_basename is set.
9044   for cc_temp in $compiler""; do
9045   case $cc_temp in
9046     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9047     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9048     \-*) ;;
9049     *) break;;
9050   esac
9051 done
9052 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
9053
9054   case $host_os in
9055   cygwin* | mingw* | pw32*)
9056     # FIXME: the MSVC++ port hasn't been tested in a loooong time
9057     # When not using gcc, we currently assume that we are using
9058     # Microsoft Visual C++.
9059     if test "$GCC" != yes; then
9060       with_gnu_ld=no
9061     fi
9062     ;;
9063   openbsd*)
9064     with_gnu_ld=no
9065     ;;
9066   esac
9067
9068   ld_shlibs=yes
9069   if test "$with_gnu_ld" = yes; then
9070     # If archive_cmds runs LD, not CC, wlarc should be empty
9071     wlarc='${wl}'
9072
9073     # Set some defaults for GNU ld with shared library support. These
9074     # are reset later if shared libraries are not supported. Putting them
9075     # here allows them to be overridden if necessary.
9076     runpath_var=LD_RUN_PATH
9077     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
9078     export_dynamic_flag_spec='${wl}--export-dynamic'
9079     # ancient GNU ld didn't support --whole-archive et. al.
9080     if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
9081         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9082       else
9083         whole_archive_flag_spec=
9084     fi
9085     supports_anon_versioning=no
9086     case `$LD -v 2>/dev/null` in
9087       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9088       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9089       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9090       *\ 2.11.*) ;; # other 2.11 versions
9091       *) supports_anon_versioning=yes ;;
9092     esac
9093
9094     # See if GNU ld supports shared libraries.
9095     case $host_os in
9096     aix3* | aix4* | aix5*)
9097       # On AIX/PPC, the GNU linker is very broken
9098       if test "$host_cpu" != ia64; then
9099         ld_shlibs=no
9100         cat <<EOF 1>&2
9101
9102 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
9103 *** to be unable to reliably create shared libraries on AIX.
9104 *** Therefore, libtool is disabling shared libraries support.  If you
9105 *** really care for shared libraries, you may want to modify your PATH
9106 *** so that a non-GNU linker is found, and then restart.
9107
9108 EOF
9109       fi
9110       ;;
9111
9112     amigaos*)
9113       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)'
9114       hardcode_libdir_flag_spec='-L$libdir'
9115       hardcode_minus_L=yes
9116
9117       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9118       # that the semantics of dynamic libraries on AmigaOS, at least up
9119       # to version 4, is to share data among multiple programs linked
9120       # with the same dynamic library.  Since this doesn't match the
9121       # behavior of shared libraries on other platforms, we can't use
9122       # them.
9123       ld_shlibs=no
9124       ;;
9125
9126     beos*)
9127       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9128         allow_undefined_flag=unsupported
9129         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9130         # support --undefined.  This deserves some investigation.  FIXME
9131         archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9132       else
9133         ld_shlibs=no
9134       fi
9135       ;;
9136
9137     cygwin* | mingw* | pw32*)
9138       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9139       # as there is no search path for DLLs.
9140       hardcode_libdir_flag_spec='-L$libdir'
9141       allow_undefined_flag=unsupported
9142       always_export_symbols=no
9143       enable_shared_with_static_runtimes=yes
9144       export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
9145
9146       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
9147         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
9148         # If the export-symbols file already is a .def file (1st line
9149         # is EXPORTS), use it as is; otherwise, prepend...
9150         archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9151           cp $export_symbols $output_objdir/$soname.def;
9152         else
9153           echo EXPORTS > $output_objdir/$soname.def;
9154           cat $export_symbols >> $output_objdir/$soname.def;
9155         fi~
9156         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
9157       else
9158         ld_shlibs=no
9159       fi
9160       ;;
9161
9162     linux*)
9163       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9164         tmp_addflag=
9165         case $cc_basename,$host_cpu in
9166         pgcc*)                          # Portland Group C compiler
9167           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'
9168           tmp_addflag=' $pic_flag'
9169           ;;
9170         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
9171           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'
9172           tmp_addflag=' $pic_flag -Mnomain' ;;
9173         ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
9174           tmp_addflag=' -i_dynamic' ;;
9175         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
9176           tmp_addflag=' -i_dynamic -nofor_main' ;;
9177         ifc* | ifort*)                  # Intel Fortran compiler
9178           tmp_addflag=' -nofor_main' ;;
9179         esac
9180         archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9181
9182         if test $supports_anon_versioning = yes; then
9183           archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
9184   cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9185   $echo "local: *; };" >> $output_objdir/$libname.ver~
9186           $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9187         fi
9188       else
9189         ld_shlibs=no
9190       fi
9191       ;;
9192
9193     netbsd*)
9194       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9195         archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9196         wlarc=
9197       else
9198         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9199         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9200       fi
9201       ;;
9202
9203     solaris* | sysv5*)
9204       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
9205         ld_shlibs=no
9206         cat <<EOF 1>&2
9207
9208 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
9209 *** create shared libraries on Solaris systems.  Therefore, libtool
9210 *** is disabling shared libraries support.  We urge you to upgrade GNU
9211 *** binutils to release 2.9.1 or newer.  Another option is to modify
9212 *** your PATH or compiler configuration so that the native linker is
9213 *** used, and then restart.
9214
9215 EOF
9216       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9217         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9218         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9219       else
9220         ld_shlibs=no
9221       fi
9222       ;;
9223
9224     sunos4*)
9225       archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9226       wlarc=
9227       hardcode_direct=yes
9228       hardcode_shlibpath_var=no
9229       ;;
9230
9231     *)
9232       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9233         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9234         archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9235       else
9236         ld_shlibs=no
9237       fi
9238       ;;
9239     esac
9240
9241     if test "$ld_shlibs" = no; then
9242       runpath_var=
9243       hardcode_libdir_flag_spec=
9244       export_dynamic_flag_spec=
9245       whole_archive_flag_spec=
9246     fi
9247   else
9248     # PORTME fill in a description of your system's linker (not GNU ld)
9249     case $host_os in
9250     aix3*)
9251       allow_undefined_flag=unsupported
9252       always_export_symbols=yes
9253       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'
9254       # Note: this linker hardcodes the directories in LIBPATH if there
9255       # are no directories specified by -L.
9256       hardcode_minus_L=yes
9257       if test "$GCC" = yes && test -z "$link_static_flag"; then
9258         # Neither direct hardcoding nor static linking is supported with a
9259         # broken collect2.
9260         hardcode_direct=unsupported
9261       fi
9262       ;;
9263
9264     aix4* | aix5*)
9265       if test "$host_cpu" = ia64; then
9266         # On IA64, the linker does run time linking by default, so we don't
9267         # have to do anything special.
9268         aix_use_runtimelinking=no
9269         exp_sym_flag='-Bexport'
9270         no_entry_flag=""
9271       else
9272         # If we're using GNU nm, then we don't want the "-C" option.
9273         # -C means demangle to AIX nm, but means don't demangle with GNU nm
9274         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
9275           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'
9276         else
9277           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'
9278         fi
9279         aix_use_runtimelinking=no
9280
9281         # Test if we are trying to use run time linking or normal
9282         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
9283         # need to do runtime linking.
9284         case $host_os in aix4.[23]|aix4.[23].*|aix5*)
9285           for ld_flag in $LDFLAGS; do
9286           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
9287             aix_use_runtimelinking=yes
9288             break
9289           fi
9290           done
9291         esac
9292
9293         exp_sym_flag='-bexport'
9294         no_entry_flag='-bnoentry'
9295       fi
9296
9297       # When large executables or shared objects are built, AIX ld can
9298       # have problems creating the table of contents.  If linking a library
9299       # or program results in "error TOC overflow" add -mminimal-toc to
9300       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9301       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9302
9303       archive_cmds=''
9304       hardcode_direct=yes
9305       hardcode_libdir_separator=':'
9306       link_all_deplibs=yes
9307
9308       if test "$GCC" = yes; then
9309         case $host_os in aix4.[012]|aix4.[012].*)
9310         # We only want to do this on AIX 4.2 and lower, the check
9311         # below for broken collect2 doesn't work under 4.3+
9312           collect2name=`${CC} -print-prog-name=collect2`
9313           if test -f "$collect2name" && \
9314            strings "$collect2name" | grep resolve_lib_name >/dev/null
9315           then
9316           # We have reworked collect2
9317           hardcode_direct=yes
9318           else
9319           # We have old collect2
9320           hardcode_direct=unsupported
9321           # It fails to find uninstalled libraries when the uninstalled
9322           # path is not listed in the libpath.  Setting hardcode_minus_L
9323           # to unsupported forces relinking
9324           hardcode_minus_L=yes
9325           hardcode_libdir_flag_spec='-L$libdir'
9326           hardcode_libdir_separator=
9327           fi
9328         esac
9329         shared_flag='-shared'
9330         if test "$aix_use_runtimelinking" = yes; then
9331           shared_flag="$shared_flag "'${wl}-G'
9332         fi
9333       else
9334         # not using gcc
9335         if test "$host_cpu" = ia64; then
9336         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9337         # chokes on -Wl,-G. The following line is correct:
9338           shared_flag='-G'
9339         else
9340         if test "$aix_use_runtimelinking" = yes; then
9341             shared_flag='${wl}-G'
9342           else
9343             shared_flag='${wl}-bM:SRE'
9344         fi
9345         fi
9346       fi
9347
9348       # It seems that -bexpall does not export symbols beginning with
9349       # underscore (_), so it is better to generate a list of symbols to export.
9350       always_export_symbols=yes
9351       if test "$aix_use_runtimelinking" = yes; then
9352         # Warning - without using the other runtime loading flags (-brtl),
9353         # -berok will link without error, but may produce a broken library.
9354         allow_undefined_flag='-berok'
9355        # Determine the default libpath from the value encoded in an empty executable.
9356        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9357 /* end confdefs.h.  */
9358
9359 int
9360 main ()
9361 {
9362
9363   ;
9364   return 0;
9365 }
9366 _ACEOF
9367 if ac_fn_c_try_link "$LINENO"; then :
9368
9369 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9370 }'`
9371 # Check for a 64-bit object if we didn't find anything.
9372 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; }
9373 }'`; fi
9374 fi
9375 rm -f core conftest.err conftest.$ac_objext \
9376     conftest$ac_exeext conftest.$ac_ext
9377 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9378
9379        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9380         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"
9381        else
9382         if test "$host_cpu" = ia64; then
9383           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
9384           allow_undefined_flag="-z nodefs"
9385           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"
9386         else
9387          # Determine the default libpath from the value encoded in an empty executable.
9388          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9389 /* end confdefs.h.  */
9390
9391 int
9392 main ()
9393 {
9394
9395   ;
9396   return 0;
9397 }
9398 _ACEOF
9399 if ac_fn_c_try_link "$LINENO"; then :
9400
9401 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9402 }'`
9403 # Check for a 64-bit object if we didn't find anything.
9404 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; }
9405 }'`; fi
9406 fi
9407 rm -f core conftest.err conftest.$ac_objext \
9408     conftest$ac_exeext conftest.$ac_ext
9409 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9410
9411          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9412           # Warning - without using the other run time loading flags,
9413           # -berok will link without error, but may produce a broken library.
9414           no_undefined_flag=' ${wl}-bernotok'
9415           allow_undefined_flag=' ${wl}-berok'
9416           # -bexpall does not export symbols beginning with underscore (_)
9417           always_export_symbols=yes
9418           # Exported symbols can be pulled into shared objects from archives
9419           whole_archive_flag_spec=' '
9420           archive_cmds_need_lc=yes
9421           # This is similar to how AIX traditionally builds its shared libraries.
9422           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'
9423         fi
9424       fi
9425       ;;
9426
9427     amigaos*)
9428       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)'
9429       hardcode_libdir_flag_spec='-L$libdir'
9430       hardcode_minus_L=yes
9431       # see comment about different semantics on the GNU ld section
9432       ld_shlibs=no
9433       ;;
9434
9435     bsdi[45]*)
9436       export_dynamic_flag_spec=-rdynamic
9437       ;;
9438
9439     cygwin* | mingw* | pw32*)
9440       # When not using gcc, we currently assume that we are using
9441       # Microsoft Visual C++.
9442       # hardcode_libdir_flag_spec is actually meaningless, as there is
9443       # no search path for DLLs.
9444       hardcode_libdir_flag_spec=' '
9445       allow_undefined_flag=unsupported
9446       # Tell ltmain to make .lib files, not .a files.
9447       libext=lib
9448       # Tell ltmain to make .dll files, not .so files.
9449       shrext_cmds=".dll"
9450       # FIXME: Setting linknames here is a bad hack.
9451       archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
9452       # The linker will automatically build a .lib file if we build a DLL.
9453       old_archive_From_new_cmds='true'
9454       # FIXME: Should let the user specify the lib program.
9455       old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
9456       fix_srcfile_path='`cygpath -w "$srcfile"`'
9457       enable_shared_with_static_runtimes=yes
9458       ;;
9459
9460     darwin* | rhapsody*)
9461       case $host_os in
9462         rhapsody* | darwin1.[012])
9463          allow_undefined_flag='${wl}-undefined ${wl}suppress'
9464          ;;
9465        *) # Darwin 1.3 on
9466          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
9467            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9468          else
9469            case ${MACOSX_DEPLOYMENT_TARGET} in
9470              10.[012])
9471                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9472                ;;
9473              10.*)
9474                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
9475                ;;
9476            esac
9477          fi
9478          ;;
9479       esac
9480       archive_cmds_need_lc=no
9481       hardcode_direct=no
9482       hardcode_automatic=yes
9483       hardcode_shlibpath_var=unsupported
9484       whole_archive_flag_spec=''
9485       link_all_deplibs=yes
9486     if test "$GCC" = yes ; then
9487         output_verbose_link_cmd='echo'
9488         archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
9489       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9490       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9491       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}'
9492       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}'
9493     else
9494       case $cc_basename in
9495         xlc*)
9496          output_verbose_link_cmd='echo'
9497          archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
9498          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9499           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9500          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}'
9501           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}'
9502           ;;
9503        *)
9504          ld_shlibs=no
9505           ;;
9506       esac
9507     fi
9508       ;;
9509
9510     dgux*)
9511       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9512       hardcode_libdir_flag_spec='-L$libdir'
9513       hardcode_shlibpath_var=no
9514       ;;
9515
9516     freebsd1*)
9517       ld_shlibs=no
9518       ;;
9519
9520     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9521     # support.  Future versions do this automatically, but an explicit c++rt0.o
9522     # does not break anything, and helps significantly (at the cost of a little
9523     # extra space).
9524     freebsd2.2*)
9525       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9526       hardcode_libdir_flag_spec='-R$libdir'
9527       hardcode_direct=yes
9528       hardcode_shlibpath_var=no
9529       ;;
9530
9531     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9532     freebsd2*)
9533       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9534       hardcode_direct=yes
9535       hardcode_minus_L=yes
9536       hardcode_shlibpath_var=no
9537       ;;
9538
9539     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9540     freebsd* | kfreebsd*-gnu | dragonfly*)
9541       archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9542       hardcode_libdir_flag_spec='-R$libdir'
9543       hardcode_direct=yes
9544       hardcode_shlibpath_var=no
9545       ;;
9546
9547     hpux9*)
9548       if test "$GCC" = yes; then
9549         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'
9550       else
9551         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'
9552       fi
9553       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9554       hardcode_libdir_separator=:
9555       hardcode_direct=yes
9556
9557       # hardcode_minus_L: Not really in the search PATH,
9558       # but as the default location of the library.
9559       hardcode_minus_L=yes
9560       export_dynamic_flag_spec='${wl}-E'
9561       ;;
9562
9563     hpux10* | hpux11*)
9564       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9565         case $host_cpu in
9566         hppa*64*|ia64*)
9567           archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9568           ;;
9569         *)
9570           archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9571           ;;
9572         esac
9573       else
9574         case $host_cpu in
9575         hppa*64*|ia64*)
9576           archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
9577           ;;
9578         *)
9579           archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9580           ;;
9581         esac
9582       fi
9583       if test "$with_gnu_ld" = no; then
9584         case $host_cpu in
9585         hppa*64*)
9586           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9587           hardcode_libdir_flag_spec_ld='+b $libdir'
9588           hardcode_libdir_separator=:
9589           hardcode_direct=no
9590           hardcode_shlibpath_var=no
9591           ;;
9592         ia64*)
9593           hardcode_libdir_flag_spec='-L$libdir'
9594           hardcode_direct=no
9595           hardcode_shlibpath_var=no
9596
9597           # hardcode_minus_L: Not really in the search PATH,
9598           # but as the default location of the library.
9599           hardcode_minus_L=yes
9600           ;;
9601         *)
9602           hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9603           hardcode_libdir_separator=:
9604           hardcode_direct=yes
9605           export_dynamic_flag_spec='${wl}-E'
9606
9607           # hardcode_minus_L: Not really in the search PATH,
9608           # but as the default location of the library.
9609           hardcode_minus_L=yes
9610           ;;
9611         esac
9612       fi
9613       ;;
9614
9615     irix5* | irix6* | nonstopux*)
9616       if test "$GCC" = yes; then
9617         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'
9618       else
9619         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'
9620         hardcode_libdir_flag_spec_ld='-rpath $libdir'
9621       fi
9622       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9623       hardcode_libdir_separator=:
9624       link_all_deplibs=yes
9625       ;;
9626
9627     netbsd*)
9628       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9629         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
9630       else
9631         archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
9632       fi
9633       hardcode_libdir_flag_spec='-R$libdir'
9634       hardcode_direct=yes
9635       hardcode_shlibpath_var=no
9636       ;;
9637
9638     newsos6)
9639       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9640       hardcode_direct=yes
9641       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9642       hardcode_libdir_separator=:
9643       hardcode_shlibpath_var=no
9644       ;;
9645
9646     openbsd*)
9647       hardcode_direct=yes
9648       hardcode_shlibpath_var=no
9649       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9650         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9651         archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9652         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9653         export_dynamic_flag_spec='${wl}-E'
9654       else
9655        case $host_os in
9656          openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9657            archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9658            hardcode_libdir_flag_spec='-R$libdir'
9659            ;;
9660          *)
9661            archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9662            hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9663            ;;
9664        esac
9665       fi
9666       ;;
9667
9668     os2*)
9669       hardcode_libdir_flag_spec='-L$libdir'
9670       hardcode_minus_L=yes
9671       allow_undefined_flag=unsupported
9672       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'
9673       old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9674       ;;
9675
9676     osf3*)
9677       if test "$GCC" = yes; then
9678         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9679         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'
9680       else
9681         allow_undefined_flag=' -expect_unresolved \*'
9682         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'
9683       fi
9684       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9685       hardcode_libdir_separator=:
9686       ;;
9687
9688     osf4* | osf5*)      # as osf3* with the addition of -msym flag
9689       if test "$GCC" = yes; then
9690         allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9691         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'
9692         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9693       else
9694         allow_undefined_flag=' -expect_unresolved \*'
9695         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'
9696         archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
9697         $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'
9698
9699         # Both c and cxx compiler support -rpath directly
9700         hardcode_libdir_flag_spec='-rpath $libdir'
9701       fi
9702       hardcode_libdir_separator=:
9703       ;;
9704
9705     sco3.2v5*)
9706       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9707       hardcode_shlibpath_var=no
9708       export_dynamic_flag_spec='${wl}-Bexport'
9709       runpath_var=LD_RUN_PATH
9710       hardcode_runpath_var=yes
9711       ;;
9712
9713     solaris*)
9714       no_undefined_flag=' -z text'
9715       if test "$GCC" = yes; then
9716         wlarc='${wl}'
9717         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9718         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9719           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
9720       else
9721         wlarc=''
9722         archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9723         archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9724         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9725       fi
9726       hardcode_libdir_flag_spec='-R$libdir'
9727       hardcode_shlibpath_var=no
9728       case $host_os in
9729       solaris2.[0-5] | solaris2.[0-5].*) ;;
9730       *)
9731         # The compiler driver will combine linker options so we
9732         # cannot just pass the convience library names through
9733         # without $wl, iff we do not link with $LD.
9734         # Luckily, gcc supports the same syntax we need for Sun Studio.
9735         # Supported since Solaris 2.6 (maybe 2.5.1?)
9736         case $wlarc in
9737         '')
9738           whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
9739         *)
9740           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' ;;
9741         esac ;;
9742       esac
9743       link_all_deplibs=yes
9744       ;;
9745
9746     sunos4*)
9747       if test "x$host_vendor" = xsequent; then
9748         # Use $CC to link under sequent, because it throws in some extra .o
9749         # files that make .init and .fini sections work.
9750         archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9751       else
9752         archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9753       fi
9754       hardcode_libdir_flag_spec='-L$libdir'
9755       hardcode_direct=yes
9756       hardcode_minus_L=yes
9757       hardcode_shlibpath_var=no
9758       ;;
9759
9760     sysv4)
9761       case $host_vendor in
9762         sni)
9763           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9764           hardcode_direct=yes # is this really true???
9765         ;;
9766         siemens)
9767           ## LD is ld it makes a PLAMLIB
9768           ## CC just makes a GrossModule.
9769           archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9770           reload_cmds='$CC -r -o $output$reload_objs'
9771           hardcode_direct=no
9772         ;;
9773         motorola)
9774           archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9775           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9776         ;;
9777       esac
9778       runpath_var='LD_RUN_PATH'
9779       hardcode_shlibpath_var=no
9780       ;;
9781
9782     sysv4.3*)
9783       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9784       hardcode_shlibpath_var=no
9785       export_dynamic_flag_spec='-Bexport'
9786       ;;
9787
9788     sysv4*MP*)
9789       if test -d /usr/nec; then
9790         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9791         hardcode_shlibpath_var=no
9792         runpath_var=LD_RUN_PATH
9793         hardcode_runpath_var=yes
9794         ld_shlibs=yes
9795       fi
9796       ;;
9797
9798     sysv4.2uw2*)
9799       archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9800       hardcode_direct=yes
9801       hardcode_minus_L=no
9802       hardcode_shlibpath_var=no
9803       hardcode_runpath_var=yes
9804       runpath_var=LD_RUN_PATH
9805       ;;
9806
9807    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
9808       no_undefined_flag='${wl}-z ${wl}text'
9809       if test "$GCC" = yes; then
9810         archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9811       else
9812         archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9813       fi
9814       runpath_var='LD_RUN_PATH'
9815       hardcode_shlibpath_var=no
9816       ;;
9817
9818     sysv5*)
9819       no_undefined_flag=' -z text'
9820       # $CC -shared without GNU ld will not create a library from C++
9821       # object files and a static libstdc++, better avoid it by now
9822       archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9823       archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9824                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9825       hardcode_libdir_flag_spec=
9826       hardcode_shlibpath_var=no
9827       runpath_var='LD_RUN_PATH'
9828       ;;
9829
9830     uts4*)
9831       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9832       hardcode_libdir_flag_spec='-L$libdir'
9833       hardcode_shlibpath_var=no
9834       ;;
9835
9836     *)
9837       ld_shlibs=no
9838       ;;
9839     esac
9840   fi
9841
9842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
9843 $as_echo "$ld_shlibs" >&6; }
9844 test "$ld_shlibs" = no && can_build_shared=no
9845
9846 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9847 if test "$GCC" = yes; then
9848   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9849 fi
9850
9851 #
9852 # Do we need to explicitly link libc?
9853 #
9854 case "x$archive_cmds_need_lc" in
9855 x|xyes)
9856   # Assume -lc should be added
9857   archive_cmds_need_lc=yes
9858
9859   if test "$enable_shared" = yes && test "$GCC" = yes; then
9860     case $archive_cmds in
9861     *'~'*)
9862       # FIXME: we may have to deal with multi-command sequences.
9863       ;;
9864     '$CC '*)
9865       # Test whether the compiler implicitly links with -lc since on some
9866       # systems, -lgcc has to come before -lc. If gcc already passes -lc
9867       # to ld, don't add -lc before -lgcc.
9868       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
9869 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
9870       $rm conftest*
9871       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
9872
9873       if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9874   (eval $ac_compile) 2>&5
9875   ac_status=$?
9876   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9877   test $ac_status = 0; } 2>conftest.err; then
9878         soname=conftest
9879         lib=conftest
9880         libobjs=conftest.$ac_objext
9881         deplibs=
9882         wl=$lt_prog_compiler_wl
9883         compiler_flags=-v
9884         linker_flags=-v
9885         verstring=
9886         output_objdir=.
9887         libname=conftest
9888         lt_save_allow_undefined_flag=$allow_undefined_flag
9889         allow_undefined_flag=
9890         if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9891   (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
9892   ac_status=$?
9893   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9894   test $ac_status = 0; }
9895         then
9896           archive_cmds_need_lc=no
9897         else
9898           archive_cmds_need_lc=yes
9899         fi
9900         allow_undefined_flag=$lt_save_allow_undefined_flag
9901       else
9902         cat conftest.err 1>&5
9903       fi
9904       $rm conftest*
9905       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
9906 $as_echo "$archive_cmds_need_lc" >&6; }
9907       ;;
9908     esac
9909   fi
9910   ;;
9911 esac
9912
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
9914 $as_echo_n "checking dynamic linker characteristics... " >&6; }
9915 library_names_spec=
9916 libname_spec='lib$name'
9917 soname_spec=
9918 shrext_cmds=".so"
9919 postinstall_cmds=
9920 postuninstall_cmds=
9921 finish_cmds=
9922 finish_eval=
9923 shlibpath_var=
9924 shlibpath_overrides_runpath=unknown
9925 version_type=none
9926 dynamic_linker="$host_os ld.so"
9927 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9928 if test "$GCC" = yes; then
9929   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9930   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9931     # if the path contains ";" then we assume it to be the separator
9932     # otherwise default to the standard path separator (i.e. ":") - it is
9933     # assumed that no part of a normal pathname contains ";" but that should
9934     # okay in the real world where ";" in dirpaths is itself problematic.
9935     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9936   else
9937     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9938   fi
9939 else
9940   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9941 fi
9942 need_lib_prefix=unknown
9943 hardcode_into_libs=no
9944
9945 # when you set need_version to no, make sure it does not cause -set_version
9946 # flags to be left without arguments
9947 need_version=unknown
9948
9949 case $host_os in
9950 aix3*)
9951   version_type=linux
9952   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9953   shlibpath_var=LIBPATH
9954
9955   # AIX 3 has no versioning support, so we append a major version to the name.
9956   soname_spec='${libname}${release}${shared_ext}$major'
9957   ;;
9958
9959 aix4* | aix5*)
9960   version_type=linux
9961   need_lib_prefix=no
9962   need_version=no
9963   hardcode_into_libs=yes
9964   if test "$host_cpu" = ia64; then
9965     # AIX 5 supports IA64
9966     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9967     shlibpath_var=LD_LIBRARY_PATH
9968   else
9969     # With GCC up to 2.95.x, collect2 would create an import file
9970     # for dependence libraries.  The import file would start with
9971     # the line `#! .'.  This would cause the generated library to
9972     # depend on `.', always an invalid library.  This was fixed in
9973     # development snapshots of GCC prior to 3.0.
9974     case $host_os in
9975       aix4 | aix4.[01] | aix4.[01].*)
9976       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9977            echo ' yes '
9978            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9979         :
9980       else
9981         can_build_shared=no
9982       fi
9983       ;;
9984     esac
9985     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9986     # soname into executable. Probably we can add versioning support to
9987     # collect2, so additional links can be useful in future.
9988     if test "$aix_use_runtimelinking" = yes; then
9989       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9990       # instead of lib<name>.a to let people know that these are not
9991       # typical AIX shared libraries.
9992       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9993     else
9994       # We preserve .a as extension for shared libraries through AIX4.2
9995       # and later when we are not doing run time linking.
9996       library_names_spec='${libname}${release}.a $libname.a'
9997       soname_spec='${libname}${release}${shared_ext}$major'
9998     fi
9999     shlibpath_var=LIBPATH
10000   fi
10001   ;;
10002
10003 amigaos*)
10004   library_names_spec='$libname.ixlibrary $libname.a'
10005   # Create ${libname}_ixlibrary.a entries in /sys/libs.
10006   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'
10007   ;;
10008
10009 beos*)
10010   library_names_spec='${libname}${shared_ext}'
10011   dynamic_linker="$host_os ld.so"
10012   shlibpath_var=LIBRARY_PATH
10013   ;;
10014
10015 bsdi[45]*)
10016   version_type=linux
10017   need_version=no
10018   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10019   soname_spec='${libname}${release}${shared_ext}$major'
10020   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
10021   shlibpath_var=LD_LIBRARY_PATH
10022   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
10023   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
10024   # the default ld.so.conf also contains /usr/contrib/lib and
10025   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
10026   # libtool to hard-code these into programs
10027   ;;
10028
10029 cygwin* | mingw* | pw32*)
10030   version_type=windows
10031   shrext_cmds=".dll"
10032   need_version=no
10033   need_lib_prefix=no
10034
10035   case $GCC,$host_os in
10036   yes,cygwin* | yes,mingw* | yes,pw32*)
10037     library_names_spec='$libname.dll.a'
10038     # DLL is installed to $(libdir)/../bin by postinstall_cmds
10039     postinstall_cmds='base_file=`basename \${file}`~
10040       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
10041       dldir=$destdir/`dirname \$dlpath`~
10042       test -d \$dldir || mkdir -p \$dldir~
10043       $install_prog $dir/$dlname \$dldir/$dlname~
10044       chmod a+x \$dldir/$dlname'
10045     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10046       dlpath=$dir/\$dldll~
10047        $rm \$dlpath'
10048     shlibpath_overrides_runpath=yes
10049
10050     case $host_os in
10051     cygwin*)
10052       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
10053       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10054       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
10055       ;;
10056     mingw*)
10057       # MinGW DLLs use traditional 'lib' prefix
10058       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10059       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
10060       if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
10061         # It is most probably a Windows format PATH printed by
10062         # mingw gcc, but we are running on Cygwin. Gcc prints its search
10063         # path with ; separators, and with drive letters. We can handle the
10064         # drive letters (cygwin fileutils understands them), so leave them,
10065         # especially as we might pass files found there to a mingw objdump,
10066         # which wouldn't understand a cygwinified path. Ahh.
10067         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10068       else
10069         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
10070       fi
10071       ;;
10072     pw32*)
10073       # pw32 DLLs use 'pw' prefix rather than 'lib'
10074       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10075       ;;
10076     esac
10077     ;;
10078
10079   *)
10080     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10081     ;;
10082   esac
10083   dynamic_linker='Win32 ld.exe'
10084   # FIXME: first we should search . and the directory the executable is in
10085   shlibpath_var=PATH
10086   ;;
10087
10088 darwin* | rhapsody*)
10089   dynamic_linker="$host_os dyld"
10090   version_type=darwin
10091   need_lib_prefix=no
10092   need_version=no
10093   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
10094   soname_spec='${libname}${release}${major}$shared_ext'
10095   shlibpath_overrides_runpath=yes
10096   shlibpath_var=DYLD_LIBRARY_PATH
10097   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10098   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
10099   if test "$GCC" = yes; then
10100     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"`
10101   else
10102     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
10103   fi
10104   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10105   ;;
10106
10107 dgux*)
10108   version_type=linux
10109   need_lib_prefix=no
10110   need_version=no
10111   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10112   soname_spec='${libname}${release}${shared_ext}$major'
10113   shlibpath_var=LD_LIBRARY_PATH
10114   ;;
10115
10116 freebsd1*)
10117   dynamic_linker=no
10118   ;;
10119
10120 kfreebsd*-gnu)
10121   version_type=linux
10122   need_lib_prefix=no
10123   need_version=no
10124   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10125   soname_spec='${libname}${release}${shared_ext}$major'
10126   shlibpath_var=LD_LIBRARY_PATH
10127   shlibpath_overrides_runpath=no
10128   hardcode_into_libs=yes
10129   dynamic_linker='GNU ld.so'
10130   ;;
10131
10132 freebsd* | dragonfly*)
10133   # DragonFly does not have aout.  When/if they implement a new
10134   # versioning mechanism, adjust this.
10135   if test -x /usr/bin/objformat; then
10136     objformat=`/usr/bin/objformat`
10137   else
10138     case $host_os in
10139     freebsd[123]*) objformat=aout ;;
10140     *) objformat=elf ;;
10141     esac
10142   fi
10143   version_type=freebsd-$objformat
10144   case $version_type in
10145     freebsd-elf*)
10146       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10147       need_version=no
10148       need_lib_prefix=no
10149       ;;
10150     freebsd-*)
10151       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
10152       need_version=yes
10153       ;;
10154   esac
10155   shlibpath_var=LD_LIBRARY_PATH
10156   case $host_os in
10157   freebsd2*)
10158     shlibpath_overrides_runpath=yes
10159     ;;
10160   freebsd3.[01]* | freebsdelf3.[01]*)
10161     shlibpath_overrides_runpath=yes
10162     hardcode_into_libs=yes
10163     ;;
10164   *) # from 3.2 on
10165     shlibpath_overrides_runpath=no
10166     hardcode_into_libs=yes
10167     ;;
10168   esac
10169   ;;
10170
10171 gnu*)
10172   version_type=linux
10173   need_lib_prefix=no
10174   need_version=no
10175   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10176   soname_spec='${libname}${release}${shared_ext}$major'
10177   shlibpath_var=LD_LIBRARY_PATH
10178   hardcode_into_libs=yes
10179   ;;
10180
10181 hpux9* | hpux10* | hpux11*)
10182   # Give a soname corresponding to the major version so that dld.sl refuses to
10183   # link against other versions.
10184   version_type=sunos
10185   need_lib_prefix=no
10186   need_version=no
10187   case $host_cpu in
10188   ia64*)
10189     shrext_cmds='.so'
10190     hardcode_into_libs=yes
10191     dynamic_linker="$host_os dld.so"
10192     shlibpath_var=LD_LIBRARY_PATH
10193     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10194     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10195     soname_spec='${libname}${release}${shared_ext}$major'
10196     if test "X$HPUX_IA64_MODE" = X32; then
10197       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10198     else
10199       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10200     fi
10201     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10202     ;;
10203    hppa*64*)
10204      shrext_cmds='.sl'
10205      hardcode_into_libs=yes
10206      dynamic_linker="$host_os dld.sl"
10207      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10208      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10209      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10210      soname_spec='${libname}${release}${shared_ext}$major'
10211      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10212      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10213      ;;
10214    *)
10215     shrext_cmds='.sl'
10216     dynamic_linker="$host_os dld.sl"
10217     shlibpath_var=SHLIB_PATH
10218     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10219     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10220     soname_spec='${libname}${release}${shared_ext}$major'
10221     ;;
10222   esac
10223   # HP-UX runs *really* slowly unless shared libraries are mode 555.
10224   postinstall_cmds='chmod 555 $lib'
10225   ;;
10226
10227 irix5* | irix6* | nonstopux*)
10228   case $host_os in
10229     nonstopux*) version_type=nonstopux ;;
10230     *)
10231         if test "$lt_cv_prog_gnu_ld" = yes; then
10232                 version_type=linux
10233         else
10234                 version_type=irix
10235         fi ;;
10236   esac
10237   need_lib_prefix=no
10238   need_version=no
10239   soname_spec='${libname}${release}${shared_ext}$major'
10240   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
10241   case $host_os in
10242   irix5* | nonstopux*)
10243     libsuff= shlibsuff=
10244     ;;
10245   *)
10246     case $LD in # libtool.m4 will add one of these switches to LD
10247     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10248       libsuff= shlibsuff= libmagic=32-bit;;
10249     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10250       libsuff=32 shlibsuff=N32 libmagic=N32;;
10251     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10252       libsuff=64 shlibsuff=64 libmagic=64-bit;;
10253     *) libsuff= shlibsuff= libmagic=never-match;;
10254     esac
10255     ;;
10256   esac
10257   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10258   shlibpath_overrides_runpath=no
10259   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10260   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
10261   hardcode_into_libs=yes
10262   ;;
10263
10264 # No shared lib support for Linux oldld, aout, or coff.
10265 linux*oldld* | linux*aout* | linux*coff*)
10266   dynamic_linker=no
10267   ;;
10268
10269 # This must be Linux ELF.
10270 linux*)
10271   version_type=linux
10272   need_lib_prefix=no
10273   need_version=no
10274   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10275   soname_spec='${libname}${release}${shared_ext}$major'
10276   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10277   shlibpath_var=LD_LIBRARY_PATH
10278   shlibpath_overrides_runpath=no
10279   # This implies no fast_install, which is unacceptable.
10280   # Some rework will be needed to allow for fast_install
10281   # before this can be enabled.
10282   hardcode_into_libs=yes
10283
10284   # Append ld.so.conf contents to the search path
10285   if test -f /etc/ld.so.conf; then
10286     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' ' '`
10287     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10288   fi
10289
10290   # We used to test for /lib/ld.so.1 and disable shared libraries on
10291   # powerpc, because MkLinux only supported shared libraries with the
10292   # GNU dynamic linker.  Since this was broken with cross compilers,
10293   # most powerpc-linux boxes support dynamic linking these days and
10294   # people can always --disable-shared, the test was removed, and we
10295   # assume the GNU/Linux dynamic linker is in use.
10296   dynamic_linker='GNU/Linux ld.so'
10297   ;;
10298
10299 knetbsd*-gnu)
10300   version_type=linux
10301   need_lib_prefix=no
10302   need_version=no
10303   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10304   soname_spec='${libname}${release}${shared_ext}$major'
10305   shlibpath_var=LD_LIBRARY_PATH
10306   shlibpath_overrides_runpath=no
10307   hardcode_into_libs=yes
10308   dynamic_linker='GNU ld.so'
10309   ;;
10310
10311 netbsd*)
10312   version_type=sunos
10313   need_lib_prefix=no
10314   need_version=no
10315   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10316     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10317     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10318     dynamic_linker='NetBSD (a.out) ld.so'
10319   else
10320     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10321     soname_spec='${libname}${release}${shared_ext}$major'
10322     dynamic_linker='NetBSD ld.elf_so'
10323   fi
10324   shlibpath_var=LD_LIBRARY_PATH
10325   shlibpath_overrides_runpath=yes
10326   hardcode_into_libs=yes
10327   ;;
10328
10329 newsos6)
10330   version_type=linux
10331   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10332   shlibpath_var=LD_LIBRARY_PATH
10333   shlibpath_overrides_runpath=yes
10334   ;;
10335
10336 nto-qnx*)
10337   version_type=linux
10338   need_lib_prefix=no
10339   need_version=no
10340   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10341   soname_spec='${libname}${release}${shared_ext}$major'
10342   shlibpath_var=LD_LIBRARY_PATH
10343   shlibpath_overrides_runpath=yes
10344   ;;
10345
10346 openbsd*)
10347   version_type=sunos
10348   need_lib_prefix=no
10349   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10350   case $host_os in
10351     openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10352     *)                         need_version=no  ;;
10353   esac
10354   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10355   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10356   shlibpath_var=LD_LIBRARY_PATH
10357   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10358     case $host_os in
10359       openbsd2.[89] | openbsd2.[89].*)
10360         shlibpath_overrides_runpath=no
10361         ;;
10362       *)
10363         shlibpath_overrides_runpath=yes
10364         ;;
10365       esac
10366   else
10367     shlibpath_overrides_runpath=yes
10368   fi
10369   ;;
10370
10371 os2*)
10372   libname_spec='$name'
10373   shrext_cmds=".dll"
10374   need_lib_prefix=no
10375   library_names_spec='$libname${shared_ext} $libname.a'
10376   dynamic_linker='OS/2 ld.exe'
10377   shlibpath_var=LIBPATH
10378   ;;
10379
10380 osf3* | osf4* | osf5*)
10381   version_type=osf
10382   need_lib_prefix=no
10383   need_version=no
10384   soname_spec='${libname}${release}${shared_ext}$major'
10385   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10386   shlibpath_var=LD_LIBRARY_PATH
10387   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10388   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
10389   ;;
10390
10391 sco3.2v5*)
10392   version_type=osf
10393   soname_spec='${libname}${release}${shared_ext}$major'
10394   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10395   shlibpath_var=LD_LIBRARY_PATH
10396   ;;
10397
10398 solaris*)
10399   version_type=linux
10400   need_lib_prefix=no
10401   need_version=no
10402   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10403   soname_spec='${libname}${release}${shared_ext}$major'
10404   shlibpath_var=LD_LIBRARY_PATH
10405   shlibpath_overrides_runpath=yes
10406   hardcode_into_libs=yes
10407   # ldd complains unless libraries are executable
10408   postinstall_cmds='chmod +x $lib'
10409   ;;
10410
10411 sunos4*)
10412   version_type=sunos
10413   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10414   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10415   shlibpath_var=LD_LIBRARY_PATH
10416   shlibpath_overrides_runpath=yes
10417   if test "$with_gnu_ld" = yes; then
10418     need_lib_prefix=no
10419   fi
10420   need_version=yes
10421   ;;
10422
10423 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10424   version_type=linux
10425   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10426   soname_spec='${libname}${release}${shared_ext}$major'
10427   shlibpath_var=LD_LIBRARY_PATH
10428   case $host_vendor in
10429     sni)
10430       shlibpath_overrides_runpath=no
10431       need_lib_prefix=no
10432       export_dynamic_flag_spec='${wl}-Blargedynsym'
10433       runpath_var=LD_RUN_PATH
10434       ;;
10435     siemens)
10436       need_lib_prefix=no
10437       ;;
10438     motorola)
10439       need_lib_prefix=no
10440       need_version=no
10441       shlibpath_overrides_runpath=no
10442       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10443       ;;
10444   esac
10445   ;;
10446
10447 sysv4*MP*)
10448   if test -d /usr/nec ;then
10449     version_type=linux
10450     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
10451     soname_spec='$libname${shared_ext}.$major'
10452     shlibpath_var=LD_LIBRARY_PATH
10453   fi
10454   ;;
10455
10456 uts4*)
10457   version_type=linux
10458   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10459   soname_spec='${libname}${release}${shared_ext}$major'
10460   shlibpath_var=LD_LIBRARY_PATH
10461   ;;
10462
10463 *)
10464   dynamic_linker=no
10465   ;;
10466 esac
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
10468 $as_echo "$dynamic_linker" >&6; }
10469 test "$dynamic_linker" = no && can_build_shared=no
10470
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
10472 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
10473 hardcode_action=
10474 if test -n "$hardcode_libdir_flag_spec" || \
10475    test -n "$runpath_var" || \
10476    test "X$hardcode_automatic" = "Xyes" ; then
10477
10478   # We can hardcode non-existant directories.
10479   if test "$hardcode_direct" != no &&
10480      # If the only mechanism to avoid hardcoding is shlibpath_var, we
10481      # have to relink, otherwise we might link with an installed library
10482      # when we should be linking with a yet-to-be-installed one
10483      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
10484      test "$hardcode_minus_L" != no; then
10485     # Linking always hardcodes the temporary library directory.
10486     hardcode_action=relink
10487   else
10488     # We can link without hardcoding, and we can hardcode nonexisting dirs.
10489     hardcode_action=immediate
10490   fi
10491 else
10492   # We cannot hardcode anything, or else we can only hardcode existing
10493   # directories.
10494   hardcode_action=unsupported
10495 fi
10496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
10497 $as_echo "$hardcode_action" >&6; }
10498
10499 if test "$hardcode_action" = relink; then
10500   # Fast installation is not supported
10501   enable_fast_install=no
10502 elif test "$shlibpath_overrides_runpath" = yes ||
10503      test "$enable_shared" = no; then
10504   # Fast installation is not necessary
10505   enable_fast_install=needless
10506 fi
10507
10508 striplib=
10509 old_striplib=
10510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
10511 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
10512 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
10513   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
10514   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
10515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10516 $as_echo "yes" >&6; }
10517 else
10518 # FIXME - insert some real tests, host_os isn't really good enough
10519   case $host_os in
10520    darwin*)
10521        if test -n "$STRIP" ; then
10522          striplib="$STRIP -x"
10523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10524 $as_echo "yes" >&6; }
10525        else
10526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10527 $as_echo "no" >&6; }
10528 fi
10529        ;;
10530    *)
10531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10532 $as_echo "no" >&6; }
10533     ;;
10534   esac
10535 fi
10536
10537 if test "x$enable_dlopen" != xyes; then
10538   enable_dlopen=unknown
10539   enable_dlopen_self=unknown
10540   enable_dlopen_self_static=unknown
10541 else
10542   lt_cv_dlopen=no
10543   lt_cv_dlopen_libs=
10544
10545   case $host_os in
10546   beos*)
10547     lt_cv_dlopen="load_add_on"
10548     lt_cv_dlopen_libs=
10549     lt_cv_dlopen_self=yes
10550     ;;
10551
10552   mingw* | pw32*)
10553     lt_cv_dlopen="LoadLibrary"
10554     lt_cv_dlopen_libs=
10555    ;;
10556
10557   cygwin*)
10558     lt_cv_dlopen="dlopen"
10559     lt_cv_dlopen_libs=
10560    ;;
10561
10562   darwin*)
10563   # if libdl is installed we need to link against it
10564     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10565 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10566 if ${ac_cv_lib_dl_dlopen+:} false; then :
10567   $as_echo_n "(cached) " >&6
10568 else
10569   ac_check_lib_save_LIBS=$LIBS
10570 LIBS="-ldl  $LIBS"
10571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10572 /* end confdefs.h.  */
10573
10574 /* Override any GCC internal prototype to avoid an error.
10575    Use char because int might match the return type of a GCC
10576    builtin and then its argument prototype would still apply.  */
10577 #ifdef __cplusplus
10578 extern "C"
10579 #endif
10580 char dlopen ();
10581 int
10582 main ()
10583 {
10584 return dlopen ();
10585   ;
10586   return 0;
10587 }
10588 _ACEOF
10589 if ac_fn_c_try_link "$LINENO"; then :
10590   ac_cv_lib_dl_dlopen=yes
10591 else
10592   ac_cv_lib_dl_dlopen=no
10593 fi
10594 rm -f core conftest.err conftest.$ac_objext \
10595     conftest$ac_exeext conftest.$ac_ext
10596 LIBS=$ac_check_lib_save_LIBS
10597 fi
10598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10599 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10600 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10601   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10602 else
10603
10604     lt_cv_dlopen="dyld"
10605     lt_cv_dlopen_libs=
10606     lt_cv_dlopen_self=yes
10607
10608 fi
10609
10610    ;;
10611
10612   *)
10613     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
10614 if test "x$ac_cv_func_shl_load" = xyes; then :
10615   lt_cv_dlopen="shl_load"
10616 else
10617   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10618 $as_echo_n "checking for shl_load in -ldld... " >&6; }
10619 if ${ac_cv_lib_dld_shl_load+:} false; then :
10620   $as_echo_n "(cached) " >&6
10621 else
10622   ac_check_lib_save_LIBS=$LIBS
10623 LIBS="-ldld  $LIBS"
10624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10625 /* end confdefs.h.  */
10626
10627 /* Override any GCC internal prototype to avoid an error.
10628    Use char because int might match the return type of a GCC
10629    builtin and then its argument prototype would still apply.  */
10630 #ifdef __cplusplus
10631 extern "C"
10632 #endif
10633 char shl_load ();
10634 int
10635 main ()
10636 {
10637 return shl_load ();
10638   ;
10639   return 0;
10640 }
10641 _ACEOF
10642 if ac_fn_c_try_link "$LINENO"; then :
10643   ac_cv_lib_dld_shl_load=yes
10644 else
10645   ac_cv_lib_dld_shl_load=no
10646 fi
10647 rm -f core conftest.err conftest.$ac_objext \
10648     conftest$ac_exeext conftest.$ac_ext
10649 LIBS=$ac_check_lib_save_LIBS
10650 fi
10651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
10652 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
10653 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
10654   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
10655 else
10656   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
10657 if test "x$ac_cv_func_dlopen" = xyes; then :
10658   lt_cv_dlopen="dlopen"
10659 else
10660   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10661 $as_echo_n "checking for dlopen in -ldl... " >&6; }
10662 if ${ac_cv_lib_dl_dlopen+:} false; then :
10663   $as_echo_n "(cached) " >&6
10664 else
10665   ac_check_lib_save_LIBS=$LIBS
10666 LIBS="-ldl  $LIBS"
10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10668 /* end confdefs.h.  */
10669
10670 /* Override any GCC internal prototype to avoid an error.
10671    Use char because int might match the return type of a GCC
10672    builtin and then its argument prototype would still apply.  */
10673 #ifdef __cplusplus
10674 extern "C"
10675 #endif
10676 char dlopen ();
10677 int
10678 main ()
10679 {
10680 return dlopen ();
10681   ;
10682   return 0;
10683 }
10684 _ACEOF
10685 if ac_fn_c_try_link "$LINENO"; then :
10686   ac_cv_lib_dl_dlopen=yes
10687 else
10688   ac_cv_lib_dl_dlopen=no
10689 fi
10690 rm -f core conftest.err conftest.$ac_objext \
10691     conftest$ac_exeext conftest.$ac_ext
10692 LIBS=$ac_check_lib_save_LIBS
10693 fi
10694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10695 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10696 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
10697   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10698 else
10699   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
10700 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
10701 if ${ac_cv_lib_svld_dlopen+:} false; then :
10702   $as_echo_n "(cached) " >&6
10703 else
10704   ac_check_lib_save_LIBS=$LIBS
10705 LIBS="-lsvld  $LIBS"
10706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10707 /* end confdefs.h.  */
10708
10709 /* Override any GCC internal prototype to avoid an error.
10710    Use char because int might match the return type of a GCC
10711    builtin and then its argument prototype would still apply.  */
10712 #ifdef __cplusplus
10713 extern "C"
10714 #endif
10715 char dlopen ();
10716 int
10717 main ()
10718 {
10719 return dlopen ();
10720   ;
10721   return 0;
10722 }
10723 _ACEOF
10724 if ac_fn_c_try_link "$LINENO"; then :
10725   ac_cv_lib_svld_dlopen=yes
10726 else
10727   ac_cv_lib_svld_dlopen=no
10728 fi
10729 rm -f core conftest.err conftest.$ac_objext \
10730     conftest$ac_exeext conftest.$ac_ext
10731 LIBS=$ac_check_lib_save_LIBS
10732 fi
10733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
10734 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
10735 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
10736   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10737 else
10738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
10739 $as_echo_n "checking for dld_link in -ldld... " >&6; }
10740 if ${ac_cv_lib_dld_dld_link+:} false; then :
10741   $as_echo_n "(cached) " >&6
10742 else
10743   ac_check_lib_save_LIBS=$LIBS
10744 LIBS="-ldld  $LIBS"
10745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10746 /* end confdefs.h.  */
10747
10748 /* Override any GCC internal prototype to avoid an error.
10749    Use char because int might match the return type of a GCC
10750    builtin and then its argument prototype would still apply.  */
10751 #ifdef __cplusplus
10752 extern "C"
10753 #endif
10754 char dld_link ();
10755 int
10756 main ()
10757 {
10758 return dld_link ();
10759   ;
10760   return 0;
10761 }
10762 _ACEOF
10763 if ac_fn_c_try_link "$LINENO"; then :
10764   ac_cv_lib_dld_dld_link=yes
10765 else
10766   ac_cv_lib_dld_dld_link=no
10767 fi
10768 rm -f core conftest.err conftest.$ac_objext \
10769     conftest$ac_exeext conftest.$ac_ext
10770 LIBS=$ac_check_lib_save_LIBS
10771 fi
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
10773 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
10774 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
10775   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10776 fi
10777
10778
10779 fi
10780
10781
10782 fi
10783
10784
10785 fi
10786
10787
10788 fi
10789
10790
10791 fi
10792
10793     ;;
10794   esac
10795
10796   if test "x$lt_cv_dlopen" != xno; then
10797     enable_dlopen=yes
10798   else
10799     enable_dlopen=no
10800   fi
10801
10802   case $lt_cv_dlopen in
10803   dlopen)
10804     save_CPPFLAGS="$CPPFLAGS"
10805     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10806
10807     save_LDFLAGS="$LDFLAGS"
10808     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10809
10810     save_LIBS="$LIBS"
10811     LIBS="$lt_cv_dlopen_libs $LIBS"
10812
10813     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
10814 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
10815 if ${lt_cv_dlopen_self+:} false; then :
10816   $as_echo_n "(cached) " >&6
10817 else
10818           if test "$cross_compiling" = yes; then :
10819   lt_cv_dlopen_self=cross
10820 else
10821   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10822   lt_status=$lt_dlunknown
10823   cat > conftest.$ac_ext <<EOF
10824 #line 10824 "configure"
10825 #include "confdefs.h"
10826
10827 #if HAVE_DLFCN_H
10828 #include <dlfcn.h>
10829 #endif
10830
10831 #include <stdio.h>
10832
10833 #ifdef RTLD_GLOBAL
10834 #  define LT_DLGLOBAL           RTLD_GLOBAL
10835 #else
10836 #  ifdef DL_GLOBAL
10837 #    define LT_DLGLOBAL         DL_GLOBAL
10838 #  else
10839 #    define LT_DLGLOBAL         0
10840 #  endif
10841 #endif
10842
10843 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10844    find out it does not work in some platform. */
10845 #ifndef LT_DLLAZY_OR_NOW
10846 #  ifdef RTLD_LAZY
10847 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10848 #  else
10849 #    ifdef DL_LAZY
10850 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10851 #    else
10852 #      ifdef RTLD_NOW
10853 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10854 #      else
10855 #        ifdef DL_NOW
10856 #          define LT_DLLAZY_OR_NOW      DL_NOW
10857 #        else
10858 #          define LT_DLLAZY_OR_NOW      0
10859 #        endif
10860 #      endif
10861 #    endif
10862 #  endif
10863 #endif
10864
10865 #ifdef __cplusplus
10866 extern "C" void exit (int);
10867 #endif
10868
10869 void fnord() { int i=42;}
10870 int main ()
10871 {
10872   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10873   int status = $lt_dlunknown;
10874
10875   if (self)
10876     {
10877       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10878       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10879       /* dlclose (self); */
10880     }
10881
10882     exit (status);
10883 }
10884 EOF
10885   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10886   (eval $ac_link) 2>&5
10887   ac_status=$?
10888   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10889   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10890     (./conftest; exit; ) >&5 2>/dev/null
10891     lt_status=$?
10892     case x$lt_status in
10893       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10894       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10895       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10896     esac
10897   else :
10898     # compilation failed
10899     lt_cv_dlopen_self=no
10900   fi
10901 fi
10902 rm -fr conftest*
10903
10904
10905 fi
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
10907 $as_echo "$lt_cv_dlopen_self" >&6; }
10908
10909     if test "x$lt_cv_dlopen_self" = xyes; then
10910       LDFLAGS="$LDFLAGS $link_static_flag"
10911       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
10912 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
10913 if ${lt_cv_dlopen_self_static+:} false; then :
10914   $as_echo_n "(cached) " >&6
10915 else
10916           if test "$cross_compiling" = yes; then :
10917   lt_cv_dlopen_self_static=cross
10918 else
10919   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10920   lt_status=$lt_dlunknown
10921   cat > conftest.$ac_ext <<EOF
10922 #line 10922 "configure"
10923 #include "confdefs.h"
10924
10925 #if HAVE_DLFCN_H
10926 #include <dlfcn.h>
10927 #endif
10928
10929 #include <stdio.h>
10930
10931 #ifdef RTLD_GLOBAL
10932 #  define LT_DLGLOBAL           RTLD_GLOBAL
10933 #else
10934 #  ifdef DL_GLOBAL
10935 #    define LT_DLGLOBAL         DL_GLOBAL
10936 #  else
10937 #    define LT_DLGLOBAL         0
10938 #  endif
10939 #endif
10940
10941 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10942    find out it does not work in some platform. */
10943 #ifndef LT_DLLAZY_OR_NOW
10944 #  ifdef RTLD_LAZY
10945 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
10946 #  else
10947 #    ifdef DL_LAZY
10948 #      define LT_DLLAZY_OR_NOW          DL_LAZY
10949 #    else
10950 #      ifdef RTLD_NOW
10951 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
10952 #      else
10953 #        ifdef DL_NOW
10954 #          define LT_DLLAZY_OR_NOW      DL_NOW
10955 #        else
10956 #          define LT_DLLAZY_OR_NOW      0
10957 #        endif
10958 #      endif
10959 #    endif
10960 #  endif
10961 #endif
10962
10963 #ifdef __cplusplus
10964 extern "C" void exit (int);
10965 #endif
10966
10967 void fnord() { int i=42;}
10968 int main ()
10969 {
10970   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10971   int status = $lt_dlunknown;
10972
10973   if (self)
10974     {
10975       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10976       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10977       /* dlclose (self); */
10978     }
10979
10980     exit (status);
10981 }
10982 EOF
10983   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10984   (eval $ac_link) 2>&5
10985   ac_status=$?
10986   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10987   test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10988     (./conftest; exit; ) >&5 2>/dev/null
10989     lt_status=$?
10990     case x$lt_status in
10991       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10992       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10993       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
10994     esac
10995   else :
10996     # compilation failed
10997     lt_cv_dlopen_self_static=no
10998   fi
10999 fi
11000 rm -fr conftest*
11001
11002
11003 fi
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
11005 $as_echo "$lt_cv_dlopen_self_static" >&6; }
11006     fi
11007
11008     CPPFLAGS="$save_CPPFLAGS"
11009     LDFLAGS="$save_LDFLAGS"
11010     LIBS="$save_LIBS"
11011     ;;
11012   esac
11013
11014   case $lt_cv_dlopen_self in
11015   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
11016   *) enable_dlopen_self=unknown ;;
11017   esac
11018
11019   case $lt_cv_dlopen_self_static in
11020   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
11021   *) enable_dlopen_self_static=unknown ;;
11022   esac
11023 fi
11024
11025
11026 # Report which librarie types wil actually be built
11027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
11028 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
11029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
11030 $as_echo "$can_build_shared" >&6; }
11031
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
11033 $as_echo_n "checking whether to build shared libraries... " >&6; }
11034 test "$can_build_shared" = "no" && enable_shared=no
11035
11036 # On AIX, shared libraries and static libraries use the same namespace, and
11037 # are all built from PIC.
11038 case $host_os in
11039 aix3*)
11040   test "$enable_shared" = yes && enable_static=no
11041   if test -n "$RANLIB"; then
11042     archive_cmds="$archive_cmds~\$RANLIB \$lib"
11043     postinstall_cmds='$RANLIB $lib'
11044   fi
11045   ;;
11046
11047 aix4* | aix5*)
11048   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
11049     test "$enable_shared" = yes && enable_static=no
11050   fi
11051     ;;
11052 esac
11053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
11054 $as_echo "$enable_shared" >&6; }
11055
11056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
11057 $as_echo_n "checking whether to build static libraries... " >&6; }
11058 # Make sure either enable_shared or enable_static is yes.
11059 test "$enable_shared" = yes || enable_static=yes
11060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
11061 $as_echo "$enable_static" >&6; }
11062
11063 # The else clause should only fire when bootstrapping the
11064 # libtool distribution, otherwise you forgot to ship ltmain.sh
11065 # with your package, and you will get complaints that there are
11066 # no rules to generate ltmain.sh.
11067 if test -f "$ltmain"; then
11068   # See if we are running on zsh, and set the options which allow our commands through
11069   # without removal of \ escapes.
11070   if test -n "${ZSH_VERSION+set}" ; then
11071     setopt NO_GLOB_SUBST
11072   fi
11073   # Now quote all the things that may contain metacharacters while being
11074   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11075   # variables and quote the copies for generation of the libtool script.
11076   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11077     SED SHELL STRIP \
11078     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11079     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11080     deplibs_check_method reload_flag reload_cmds need_locks \
11081     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11082     lt_cv_sys_global_symbol_to_c_name_address \
11083     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11084     old_postinstall_cmds old_postuninstall_cmds \
11085     compiler \
11086     CC \
11087     LD \
11088     lt_prog_compiler_wl \
11089     lt_prog_compiler_pic \
11090     lt_prog_compiler_static \
11091     lt_prog_compiler_no_builtin_flag \
11092     export_dynamic_flag_spec \
11093     thread_safe_flag_spec \
11094     whole_archive_flag_spec \
11095     enable_shared_with_static_runtimes \
11096     old_archive_cmds \
11097     old_archive_from_new_cmds \
11098     predep_objects \
11099     postdep_objects \
11100     predeps \
11101     postdeps \
11102     compiler_lib_search_path \
11103     archive_cmds \
11104     archive_expsym_cmds \
11105     postinstall_cmds \
11106     postuninstall_cmds \
11107     old_archive_from_expsyms_cmds \
11108     allow_undefined_flag \
11109     no_undefined_flag \
11110     export_symbols_cmds \
11111     hardcode_libdir_flag_spec \
11112     hardcode_libdir_flag_spec_ld \
11113     hardcode_libdir_separator \
11114     hardcode_automatic \
11115     module_cmds \
11116     module_expsym_cmds \
11117     lt_cv_prog_compiler_c_o \
11118     exclude_expsyms \
11119     include_expsyms; do
11120
11121     case $var in
11122     old_archive_cmds | \
11123     old_archive_from_new_cmds | \
11124     archive_cmds | \
11125     archive_expsym_cmds | \
11126     module_cmds | \
11127     module_expsym_cmds | \
11128     old_archive_from_expsyms_cmds | \
11129     export_symbols_cmds | \
11130     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11131     postinstall_cmds | postuninstall_cmds | \
11132     old_postinstall_cmds | old_postuninstall_cmds | \
11133     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11134       # Double-quote double-evaled strings.
11135       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11136       ;;
11137     *)
11138       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11139       ;;
11140     esac
11141   done
11142
11143   case $lt_echo in
11144   *'\$0 --fallback-echo"')
11145     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11146     ;;
11147   esac
11148
11149 cfgfile="${ofile}T"
11150   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
11151   $rm -f "$cfgfile"
11152   { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
11153 $as_echo "$as_me: creating $ofile" >&6;}
11154
11155   cat <<__EOF__ >> "$cfgfile"
11156 #! $SHELL
11157
11158 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
11159 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
11160 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
11161 #
11162 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
11163 # Free Software Foundation, Inc.
11164 #
11165 # This file is part of GNU Libtool:
11166 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
11167 #
11168 # This program is free software; you can redistribute it and/or modify
11169 # it under the terms of the GNU General Public License as published by
11170 # the Free Software Foundation; either version 2 of the License, or
11171 # (at your option) any later version.
11172 #
11173 # This program is distributed in the hope that it will be useful, but
11174 # WITHOUT ANY WARRANTY; without even the implied warranty of
11175 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11176 # General Public License for more details.
11177 #
11178 # You should have received a copy of the GNU General Public License
11179 # along with this program; if not, write to the Free Software
11180 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
11181 #
11182 # As a special exception to the GNU General Public License, if you
11183 # distribute this file as part of a program that contains a
11184 # configuration script generated by Autoconf, you may include it under
11185 # the same distribution terms that you use for the rest of that program.
11186
11187 # A sed program that does not truncate output.
11188 SED=$lt_SED
11189
11190 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
11191 Xsed="$SED -e 1s/^X//"
11192
11193 # The HP-UX ksh and POSIX shell print the target directory to stdout
11194 # if CDPATH is set.
11195 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11196
11197 # The names of the tagged configurations supported by this script.
11198 available_tags=
11199
11200 # ### BEGIN LIBTOOL CONFIG
11201
11202 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11203
11204 # Shell to use when invoking shell scripts.
11205 SHELL=$lt_SHELL
11206
11207 # Whether or not to build shared libraries.
11208 build_libtool_libs=$enable_shared
11209
11210 # Whether or not to build static libraries.
11211 build_old_libs=$enable_static
11212
11213 # Whether or not to add -lc for building shared libraries.
11214 build_libtool_need_lc=$archive_cmds_need_lc
11215
11216 # Whether or not to disallow shared libs when runtime libs are static
11217 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
11218
11219 # Whether or not to optimize for fast installation.
11220 fast_install=$enable_fast_install
11221
11222 # The host system.
11223 host_alias=$host_alias
11224 host=$host
11225 host_os=$host_os
11226
11227 # The build system.
11228 build_alias=$build_alias
11229 build=$build
11230 build_os=$build_os
11231
11232 # An echo program that does not interpret backslashes.
11233 echo=$lt_echo
11234
11235 # The archiver.
11236 AR=$lt_AR
11237 AR_FLAGS=$lt_AR_FLAGS
11238
11239 # A C compiler.
11240 LTCC=$lt_LTCC
11241
11242 # A language-specific compiler.
11243 CC=$lt_compiler
11244
11245 # Is the compiler the GNU C compiler?
11246 with_gcc=$GCC
11247
11248 # An ERE matcher.
11249 EGREP=$lt_EGREP
11250
11251 # The linker used to build libraries.
11252 LD=$lt_LD
11253
11254 # Whether we need hard or soft links.
11255 LN_S=$lt_LN_S
11256
11257 # A BSD-compatible nm program.
11258 NM=$lt_NM
11259
11260 # A symbol stripping program
11261 STRIP=$lt_STRIP
11262
11263 # Used to examine libraries when file_magic_cmd begins "file"
11264 MAGIC_CMD=$MAGIC_CMD
11265
11266 # Used on cygwin: DLL creation program.
11267 DLLTOOL="$DLLTOOL"
11268
11269 # Used on cygwin: object dumper.
11270 OBJDUMP="$OBJDUMP"
11271
11272 # Used on cygwin: assembler.
11273 AS="$AS"
11274
11275 # The name of the directory that contains temporary libtool files.
11276 objdir=$objdir
11277
11278 # How to create reloadable object files.
11279 reload_flag=$lt_reload_flag
11280 reload_cmds=$lt_reload_cmds
11281
11282 # How to pass a linker flag through the compiler.
11283 wl=$lt_lt_prog_compiler_wl
11284
11285 # Object file suffix (normally "o").
11286 objext="$ac_objext"
11287
11288 # Old archive suffix (normally "a").
11289 libext="$libext"
11290
11291 # Shared library suffix (normally ".so").
11292 shrext_cmds='$shrext_cmds'
11293
11294 # Executable file suffix (normally "").
11295 exeext="$exeext"
11296
11297 # Additional compiler flags for building library objects.
11298 pic_flag=$lt_lt_prog_compiler_pic
11299 pic_mode=$pic_mode
11300
11301 # What is the maximum length of a command?
11302 max_cmd_len=$lt_cv_sys_max_cmd_len
11303
11304 # Does compiler simultaneously support -c and -o options?
11305 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
11306
11307 # Must we lock files when doing compilation?
11308 need_locks=$lt_need_locks
11309
11310 # Do we need the lib prefix for modules?
11311 need_lib_prefix=$need_lib_prefix
11312
11313 # Do we need a version for libraries?
11314 need_version=$need_version
11315
11316 # Whether dlopen is supported.
11317 dlopen_support=$enable_dlopen
11318
11319 # Whether dlopen of programs is supported.
11320 dlopen_self=$enable_dlopen_self
11321
11322 # Whether dlopen of statically linked programs is supported.
11323 dlopen_self_static=$enable_dlopen_self_static
11324
11325 # Compiler flag to prevent dynamic linking.
11326 link_static_flag=$lt_lt_prog_compiler_static
11327
11328 # Compiler flag to turn off builtin functions.
11329 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
11330
11331 # Compiler flag to allow reflexive dlopens.
11332 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
11333
11334 # Compiler flag to generate shared objects directly from archives.
11335 whole_archive_flag_spec=$lt_whole_archive_flag_spec
11336
11337 # Compiler flag to generate thread-safe objects.
11338 thread_safe_flag_spec=$lt_thread_safe_flag_spec
11339
11340 # Library versioning type.
11341 version_type=$version_type
11342
11343 # Format of library name prefix.
11344 libname_spec=$lt_libname_spec
11345
11346 # List of archive names.  First name is the real one, the rest are links.
11347 # The last name is the one that the linker finds with -lNAME.
11348 library_names_spec=$lt_library_names_spec
11349
11350 # The coded name of the library, if different from the real name.
11351 soname_spec=$lt_soname_spec
11352
11353 # Commands used to build and install an old-style archive.
11354 RANLIB=$lt_RANLIB
11355 old_archive_cmds=$lt_old_archive_cmds
11356 old_postinstall_cmds=$lt_old_postinstall_cmds
11357 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11358
11359 # Create an old-style archive from a shared archive.
11360 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
11361
11362 # Create a temporary old-style archive to link instead of a shared archive.
11363 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
11364
11365 # Commands used to build and install a shared archive.
11366 archive_cmds=$lt_archive_cmds
11367 archive_expsym_cmds=$lt_archive_expsym_cmds
11368 postinstall_cmds=$lt_postinstall_cmds
11369 postuninstall_cmds=$lt_postuninstall_cmds
11370
11371 # Commands used to build a loadable module (assumed same as above if empty)
11372 module_cmds=$lt_module_cmds
11373 module_expsym_cmds=$lt_module_expsym_cmds
11374
11375 # Commands to strip libraries.
11376 old_striplib=$lt_old_striplib
11377 striplib=$lt_striplib
11378
11379 # Dependencies to place before the objects being linked to create a
11380 # shared library.
11381 predep_objects=$lt_predep_objects
11382
11383 # Dependencies to place after the objects being linked to create a
11384 # shared library.
11385 postdep_objects=$lt_postdep_objects
11386
11387 # Dependencies to place before the objects being linked to create a
11388 # shared library.
11389 predeps=$lt_predeps
11390
11391 # Dependencies to place after the objects being linked to create a
11392 # shared library.
11393 postdeps=$lt_postdeps
11394
11395 # The library search path used internally by the compiler when linking
11396 # a shared library.
11397 compiler_lib_search_path=$lt_compiler_lib_search_path
11398
11399 # Method to check whether dependent libraries are shared objects.
11400 deplibs_check_method=$lt_deplibs_check_method
11401
11402 # Command to use when deplibs_check_method == file_magic.
11403 file_magic_cmd=$lt_file_magic_cmd
11404
11405 # Flag that allows shared libraries with undefined symbols to be built.
11406 allow_undefined_flag=$lt_allow_undefined_flag
11407
11408 # Flag that forces no undefined symbols.
11409 no_undefined_flag=$lt_no_undefined_flag
11410
11411 # Commands used to finish a libtool library installation in a directory.
11412 finish_cmds=$lt_finish_cmds
11413
11414 # Same as above, but a single script fragment to be evaled but not shown.
11415 finish_eval=$lt_finish_eval
11416
11417 # Take the output of nm and produce a listing of raw symbols and C names.
11418 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11419
11420 # Transform the output of nm in a proper C declaration
11421 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11422
11423 # Transform the output of nm in a C name address pair
11424 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11425
11426 # This is the shared library runtime path variable.
11427 runpath_var=$runpath_var
11428
11429 # This is the shared library path variable.
11430 shlibpath_var=$shlibpath_var
11431
11432 # Is shlibpath searched before the hard-coded library search path?
11433 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11434
11435 # How to hardcode a shared library path into an executable.
11436 hardcode_action=$hardcode_action
11437
11438 # Whether we should hardcode library paths into libraries.
11439 hardcode_into_libs=$hardcode_into_libs
11440
11441 # Flag to hardcode \$libdir into a binary during linking.
11442 # This must work even if \$libdir does not exist.
11443 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
11444
11445 # If ld is used when linking, flag to hardcode \$libdir into
11446 # a binary during linking. This must work even if \$libdir does
11447 # not exist.
11448 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
11449
11450 # Whether we need a single -rpath flag with a separated argument.
11451 hardcode_libdir_separator=$lt_hardcode_libdir_separator
11452
11453 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11454 # resulting binary.
11455 hardcode_direct=$hardcode_direct
11456
11457 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11458 # resulting binary.
11459 hardcode_minus_L=$hardcode_minus_L
11460
11461 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11462 # the resulting binary.
11463 hardcode_shlibpath_var=$hardcode_shlibpath_var
11464
11465 # Set to yes if building a shared library automatically hardcodes DIR into the library
11466 # and all subsequent libraries and executables linked against it.
11467 hardcode_automatic=$hardcode_automatic
11468
11469 # Variables whose values should be saved in libtool wrapper scripts and
11470 # restored at relink time.
11471 variables_saved_for_relink="$variables_saved_for_relink"
11472
11473 # Whether libtool must link a program against all its dependency libraries.
11474 link_all_deplibs=$link_all_deplibs
11475
11476 # Compile-time system search path for libraries
11477 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11478
11479 # Run-time system search path for libraries
11480 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11481
11482 # Fix the shell variable \$srcfile for the compiler.
11483 fix_srcfile_path="$fix_srcfile_path"
11484
11485 # Set to yes if exported symbols are required.
11486 always_export_symbols=$always_export_symbols
11487
11488 # The commands to list exported symbols.
11489 export_symbols_cmds=$lt_export_symbols_cmds
11490
11491 # The commands to extract the exported symbol list from a shared archive.
11492 extract_expsyms_cmds=$lt_extract_expsyms_cmds
11493
11494 # Symbols that should not be listed in the preloaded symbols.
11495 exclude_expsyms=$lt_exclude_expsyms
11496
11497 # Symbols that must always be exported.
11498 include_expsyms=$lt_include_expsyms
11499
11500 # ### END LIBTOOL CONFIG
11501
11502 __EOF__
11503
11504
11505   case $host_os in
11506   aix3*)
11507     cat <<\EOF >> "$cfgfile"
11508
11509 # AIX sometimes has problems with the GCC collect2 program.  For some
11510 # reason, if we set the COLLECT_NAMES environment variable, the problems
11511 # vanish in a puff of smoke.
11512 if test "X${COLLECT_NAMES+set}" != Xset; then
11513   COLLECT_NAMES=
11514   export COLLECT_NAMES
11515 fi
11516 EOF
11517     ;;
11518   esac
11519
11520   # We use sed instead of cat because bash on DJGPP gets confused if
11521   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
11522   # text mode, it properly converts lines to CR/LF.  This bash problem
11523   # is reportedly fixed, but why not run on old versions too?
11524   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
11525
11526   mv -f "$cfgfile" "$ofile" || \
11527     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
11528   chmod +x "$ofile"
11529
11530 else
11531   # If there is no Makefile yet, we rely on a make rule to execute
11532   # `config.status --recheck' to rerun these tests and create the
11533   # libtool script then.
11534   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11535   if test -f "$ltmain_in"; then
11536     test -f Makefile && make "$ltmain"
11537   fi
11538 fi
11539
11540
11541 ac_ext=c
11542 ac_cpp='$CPP $CPPFLAGS'
11543 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11544 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11545 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11546
11547 CC="$lt_save_CC"
11548
11549
11550 # Check whether --with-tags was given.
11551 if test "${with_tags+set}" = set; then :
11552   withval=$with_tags; tagnames="$withval"
11553 fi
11554
11555
11556 if test -f "$ltmain" && test -n "$tagnames"; then
11557   if test ! -f "${ofile}"; then
11558     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist" >&5
11559 $as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11560   fi
11561
11562   if test -z "$LTCC"; then
11563     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11564     if test -z "$LTCC"; then
11565       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11566 $as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11567     else
11568       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11569 $as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11570     fi
11571   fi
11572
11573   # Extract list of available tagged configurations in $ofile.
11574   # Note that this assumes the entire list is on one line.
11575   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11576
11577   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11578   for tagname in $tagnames; do
11579     IFS="$lt_save_ifs"
11580     # Check whether tagname contains only valid characters
11581     case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11582     "") ;;
11583     *)  as_fn_error $? "invalid tag name: $tagname" "$LINENO" 5
11584         ;;
11585     esac
11586
11587     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11588     then
11589       as_fn_error $? "tag name \"$tagname\" already exists" "$LINENO" 5
11590     fi
11591
11592     # Update the list of available tags.
11593     if test -n "$tagname"; then
11594       echo appending configuration tag \"$tagname\" to $ofile
11595
11596       case $tagname in
11597       CXX)
11598         if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11599             ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11600             (test "X$CXX" != "Xg++"))) ; then
11601           :
11602         else
11603           tagname=""
11604         fi
11605         ;;
11606
11607       F77)
11608         if test -n "$F77" && test "X$F77" != "Xno"; then
11609           :
11610         else
11611           tagname=""
11612         fi
11613         ;;
11614
11615       GCJ)
11616         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11617           :
11618         else
11619           tagname=""
11620         fi
11621         ;;
11622
11623       RC)
11624
11625
11626 # Source file extension for RC test sources.
11627 ac_ext=rc
11628
11629 # Object file extension for compiled RC test sources.
11630 objext=o
11631 objext_RC=$objext
11632
11633 # Code to be used in simple compile tests
11634 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11635
11636 # Code to be used in simple link tests
11637 lt_simple_link_test_code="$lt_simple_compile_test_code"
11638
11639 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11640
11641 # If no C compiler was specified, use CC.
11642 LTCC=${LTCC-"$CC"}
11643
11644 # Allow CC to be a program name with arguments.
11645 compiler=$CC
11646
11647
11648 # save warnings/boilerplate of simple test code
11649 ac_outfile=conftest.$ac_objext
11650 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11651 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11652 _lt_compiler_boilerplate=`cat conftest.err`
11653 $rm conftest*
11654
11655 ac_outfile=conftest.$ac_objext
11656 printf "$lt_simple_link_test_code" >conftest.$ac_ext
11657 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11658 _lt_linker_boilerplate=`cat conftest.err`
11659 $rm conftest*
11660
11661
11662 # Allow CC to be a program name with arguments.
11663 lt_save_CC="$CC"
11664 CC=${RC-"windres"}
11665 compiler=$CC
11666 compiler_RC=$CC
11667 for cc_temp in $compiler""; do
11668   case $cc_temp in
11669     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11670     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11671     \-*) ;;
11672     *) break;;
11673   esac
11674 done
11675 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11676
11677 lt_cv_prog_compiler_c_o_RC=yes
11678
11679 # The else clause should only fire when bootstrapping the
11680 # libtool distribution, otherwise you forgot to ship ltmain.sh
11681 # with your package, and you will get complaints that there are
11682 # no rules to generate ltmain.sh.
11683 if test -f "$ltmain"; then
11684   # See if we are running on zsh, and set the options which allow our commands through
11685   # without removal of \ escapes.
11686   if test -n "${ZSH_VERSION+set}" ; then
11687     setopt NO_GLOB_SUBST
11688   fi
11689   # Now quote all the things that may contain metacharacters while being
11690   # careful not to overquote the AC_SUBSTed values.  We take copies of the
11691   # variables and quote the copies for generation of the libtool script.
11692   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11693     SED SHELL STRIP \
11694     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11695     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11696     deplibs_check_method reload_flag reload_cmds need_locks \
11697     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11698     lt_cv_sys_global_symbol_to_c_name_address \
11699     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11700     old_postinstall_cmds old_postuninstall_cmds \
11701     compiler_RC \
11702     CC_RC \
11703     LD_RC \
11704     lt_prog_compiler_wl_RC \
11705     lt_prog_compiler_pic_RC \
11706     lt_prog_compiler_static_RC \
11707     lt_prog_compiler_no_builtin_flag_RC \
11708     export_dynamic_flag_spec_RC \
11709     thread_safe_flag_spec_RC \
11710     whole_archive_flag_spec_RC \
11711     enable_shared_with_static_runtimes_RC \
11712     old_archive_cmds_RC \
11713     old_archive_from_new_cmds_RC \
11714     predep_objects_RC \
11715     postdep_objects_RC \
11716     predeps_RC \
11717     postdeps_RC \
11718     compiler_lib_search_path_RC \
11719     archive_cmds_RC \
11720     archive_expsym_cmds_RC \
11721     postinstall_cmds_RC \
11722     postuninstall_cmds_RC \
11723     old_archive_from_expsyms_cmds_RC \
11724     allow_undefined_flag_RC \
11725     no_undefined_flag_RC \
11726     export_symbols_cmds_RC \
11727     hardcode_libdir_flag_spec_RC \
11728     hardcode_libdir_flag_spec_ld_RC \
11729     hardcode_libdir_separator_RC \
11730     hardcode_automatic_RC \
11731     module_cmds_RC \
11732     module_expsym_cmds_RC \
11733     lt_cv_prog_compiler_c_o_RC \
11734     exclude_expsyms_RC \
11735     include_expsyms_RC; do
11736
11737     case $var in
11738     old_archive_cmds_RC | \
11739     old_archive_from_new_cmds_RC | \
11740     archive_cmds_RC | \
11741     archive_expsym_cmds_RC | \
11742     module_cmds_RC | \
11743     module_expsym_cmds_RC | \
11744     old_archive_from_expsyms_cmds_RC | \
11745     export_symbols_cmds_RC | \
11746     extract_expsyms_cmds | reload_cmds | finish_cmds | \
11747     postinstall_cmds | postuninstall_cmds | \
11748     old_postinstall_cmds | old_postuninstall_cmds | \
11749     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11750       # Double-quote double-evaled strings.
11751       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11752       ;;
11753     *)
11754       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11755       ;;
11756     esac
11757   done
11758
11759   case $lt_echo in
11760   *'\$0 --fallback-echo"')
11761     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11762     ;;
11763   esac
11764
11765 cfgfile="$ofile"
11766
11767   cat <<__EOF__ >> "$cfgfile"
11768 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
11769
11770 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11771
11772 # Shell to use when invoking shell scripts.
11773 SHELL=$lt_SHELL
11774
11775 # Whether or not to build shared libraries.
11776 build_libtool_libs=$enable_shared
11777
11778 # Whether or not to build static libraries.
11779 build_old_libs=$enable_static
11780
11781 # Whether or not to add -lc for building shared libraries.
11782 build_libtool_need_lc=$archive_cmds_need_lc_RC
11783
11784 # Whether or not to disallow shared libs when runtime libs are static
11785 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11786
11787 # Whether or not to optimize for fast installation.
11788 fast_install=$enable_fast_install
11789
11790 # The host system.
11791 host_alias=$host_alias
11792 host=$host
11793 host_os=$host_os
11794
11795 # The build system.
11796 build_alias=$build_alias
11797 build=$build
11798 build_os=$build_os
11799
11800 # An echo program that does not interpret backslashes.
11801 echo=$lt_echo
11802
11803 # The archiver.
11804 AR=$lt_AR
11805 AR_FLAGS=$lt_AR_FLAGS
11806
11807 # A C compiler.
11808 LTCC=$lt_LTCC
11809
11810 # A language-specific compiler.
11811 CC=$lt_compiler_RC
11812
11813 # Is the compiler the GNU C compiler?
11814 with_gcc=$GCC_RC
11815
11816 # An ERE matcher.
11817 EGREP=$lt_EGREP
11818
11819 # The linker used to build libraries.
11820 LD=$lt_LD_RC
11821
11822 # Whether we need hard or soft links.
11823 LN_S=$lt_LN_S
11824
11825 # A BSD-compatible nm program.
11826 NM=$lt_NM
11827
11828 # A symbol stripping program
11829 STRIP=$lt_STRIP
11830
11831 # Used to examine libraries when file_magic_cmd begins "file"
11832 MAGIC_CMD=$MAGIC_CMD
11833
11834 # Used on cygwin: DLL creation program.
11835 DLLTOOL="$DLLTOOL"
11836
11837 # Used on cygwin: object dumper.
11838 OBJDUMP="$OBJDUMP"
11839
11840 # Used on cygwin: assembler.
11841 AS="$AS"
11842
11843 # The name of the directory that contains temporary libtool files.
11844 objdir=$objdir
11845
11846 # How to create reloadable object files.
11847 reload_flag=$lt_reload_flag
11848 reload_cmds=$lt_reload_cmds
11849
11850 # How to pass a linker flag through the compiler.
11851 wl=$lt_lt_prog_compiler_wl_RC
11852
11853 # Object file suffix (normally "o").
11854 objext="$ac_objext"
11855
11856 # Old archive suffix (normally "a").
11857 libext="$libext"
11858
11859 # Shared library suffix (normally ".so").
11860 shrext_cmds='$shrext_cmds'
11861
11862 # Executable file suffix (normally "").
11863 exeext="$exeext"
11864
11865 # Additional compiler flags for building library objects.
11866 pic_flag=$lt_lt_prog_compiler_pic_RC
11867 pic_mode=$pic_mode
11868
11869 # What is the maximum length of a command?
11870 max_cmd_len=$lt_cv_sys_max_cmd_len
11871
11872 # Does compiler simultaneously support -c and -o options?
11873 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11874
11875 # Must we lock files when doing compilation?
11876 need_locks=$lt_need_locks
11877
11878 # Do we need the lib prefix for modules?
11879 need_lib_prefix=$need_lib_prefix
11880
11881 # Do we need a version for libraries?
11882 need_version=$need_version
11883
11884 # Whether dlopen is supported.
11885 dlopen_support=$enable_dlopen
11886
11887 # Whether dlopen of programs is supported.
11888 dlopen_self=$enable_dlopen_self
11889
11890 # Whether dlopen of statically linked programs is supported.
11891 dlopen_self_static=$enable_dlopen_self_static
11892
11893 # Compiler flag to prevent dynamic linking.
11894 link_static_flag=$lt_lt_prog_compiler_static_RC
11895
11896 # Compiler flag to turn off builtin functions.
11897 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11898
11899 # Compiler flag to allow reflexive dlopens.
11900 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11901
11902 # Compiler flag to generate shared objects directly from archives.
11903 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11904
11905 # Compiler flag to generate thread-safe objects.
11906 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11907
11908 # Library versioning type.
11909 version_type=$version_type
11910
11911 # Format of library name prefix.
11912 libname_spec=$lt_libname_spec
11913
11914 # List of archive names.  First name is the real one, the rest are links.
11915 # The last name is the one that the linker finds with -lNAME.
11916 library_names_spec=$lt_library_names_spec
11917
11918 # The coded name of the library, if different from the real name.
11919 soname_spec=$lt_soname_spec
11920
11921 # Commands used to build and install an old-style archive.
11922 RANLIB=$lt_RANLIB
11923 old_archive_cmds=$lt_old_archive_cmds_RC
11924 old_postinstall_cmds=$lt_old_postinstall_cmds
11925 old_postuninstall_cmds=$lt_old_postuninstall_cmds
11926
11927 # Create an old-style archive from a shared archive.
11928 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11929
11930 # Create a temporary old-style archive to link instead of a shared archive.
11931 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11932
11933 # Commands used to build and install a shared archive.
11934 archive_cmds=$lt_archive_cmds_RC
11935 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11936 postinstall_cmds=$lt_postinstall_cmds
11937 postuninstall_cmds=$lt_postuninstall_cmds
11938
11939 # Commands used to build a loadable module (assumed same as above if empty)
11940 module_cmds=$lt_module_cmds_RC
11941 module_expsym_cmds=$lt_module_expsym_cmds_RC
11942
11943 # Commands to strip libraries.
11944 old_striplib=$lt_old_striplib
11945 striplib=$lt_striplib
11946
11947 # Dependencies to place before the objects being linked to create a
11948 # shared library.
11949 predep_objects=$lt_predep_objects_RC
11950
11951 # Dependencies to place after the objects being linked to create a
11952 # shared library.
11953 postdep_objects=$lt_postdep_objects_RC
11954
11955 # Dependencies to place before the objects being linked to create a
11956 # shared library.
11957 predeps=$lt_predeps_RC
11958
11959 # Dependencies to place after the objects being linked to create a
11960 # shared library.
11961 postdeps=$lt_postdeps_RC
11962
11963 # The library search path used internally by the compiler when linking
11964 # a shared library.
11965 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
11966
11967 # Method to check whether dependent libraries are shared objects.
11968 deplibs_check_method=$lt_deplibs_check_method
11969
11970 # Command to use when deplibs_check_method == file_magic.
11971 file_magic_cmd=$lt_file_magic_cmd
11972
11973 # Flag that allows shared libraries with undefined symbols to be built.
11974 allow_undefined_flag=$lt_allow_undefined_flag_RC
11975
11976 # Flag that forces no undefined symbols.
11977 no_undefined_flag=$lt_no_undefined_flag_RC
11978
11979 # Commands used to finish a libtool library installation in a directory.
11980 finish_cmds=$lt_finish_cmds
11981
11982 # Same as above, but a single script fragment to be evaled but not shown.
11983 finish_eval=$lt_finish_eval
11984
11985 # Take the output of nm and produce a listing of raw symbols and C names.
11986 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11987
11988 # Transform the output of nm in a proper C declaration
11989 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11990
11991 # Transform the output of nm in a C name address pair
11992 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11993
11994 # This is the shared library runtime path variable.
11995 runpath_var=$runpath_var
11996
11997 # This is the shared library path variable.
11998 shlibpath_var=$shlibpath_var
11999
12000 # Is shlibpath searched before the hard-coded library search path?
12001 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
12002
12003 # How to hardcode a shared library path into an executable.
12004 hardcode_action=$hardcode_action_RC
12005
12006 # Whether we should hardcode library paths into libraries.
12007 hardcode_into_libs=$hardcode_into_libs
12008
12009 # Flag to hardcode \$libdir into a binary during linking.
12010 # This must work even if \$libdir does not exist.
12011 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
12012
12013 # If ld is used when linking, flag to hardcode \$libdir into
12014 # a binary during linking. This must work even if \$libdir does
12015 # not exist.
12016 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
12017
12018 # Whether we need a single -rpath flag with a separated argument.
12019 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
12020
12021 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
12022 # resulting binary.
12023 hardcode_direct=$hardcode_direct_RC
12024
12025 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
12026 # resulting binary.
12027 hardcode_minus_L=$hardcode_minus_L_RC
12028
12029 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
12030 # the resulting binary.
12031 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
12032
12033 # Set to yes if building a shared library automatically hardcodes DIR into the library
12034 # and all subsequent libraries and executables linked against it.
12035 hardcode_automatic=$hardcode_automatic_RC
12036
12037 # Variables whose values should be saved in libtool wrapper scripts and
12038 # restored at relink time.
12039 variables_saved_for_relink="$variables_saved_for_relink"
12040
12041 # Whether libtool must link a program against all its dependency libraries.
12042 link_all_deplibs=$link_all_deplibs_RC
12043
12044 # Compile-time system search path for libraries
12045 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
12046
12047 # Run-time system search path for libraries
12048 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
12049
12050 # Fix the shell variable \$srcfile for the compiler.
12051 fix_srcfile_path="$fix_srcfile_path_RC"
12052
12053 # Set to yes if exported symbols are required.
12054 always_export_symbols=$always_export_symbols_RC
12055
12056 # The commands to list exported symbols.
12057 export_symbols_cmds=$lt_export_symbols_cmds_RC
12058
12059 # The commands to extract the exported symbol list from a shared archive.
12060 extract_expsyms_cmds=$lt_extract_expsyms_cmds
12061
12062 # Symbols that should not be listed in the preloaded symbols.
12063 exclude_expsyms=$lt_exclude_expsyms_RC
12064
12065 # Symbols that must always be exported.
12066 include_expsyms=$lt_include_expsyms_RC
12067
12068 # ### END LIBTOOL TAG CONFIG: $tagname
12069
12070 __EOF__
12071
12072
12073 else
12074   # If there is no Makefile yet, we rely on a make rule to execute
12075   # `config.status --recheck' to rerun these tests and create the
12076   # libtool script then.
12077   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
12078   if test -f "$ltmain_in"; then
12079     test -f Makefile && make "$ltmain"
12080   fi
12081 fi
12082
12083
12084 ac_ext=c
12085 ac_cpp='$CPP $CPPFLAGS'
12086 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12087 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12088 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12089
12090 CC="$lt_save_CC"
12091
12092         ;;
12093
12094       *)
12095         as_fn_error $? "Unsupported tag name: $tagname" "$LINENO" 5
12096         ;;
12097       esac
12098
12099       # Append the new tag name to the list of available tags.
12100       if test -n "$tagname" ; then
12101       available_tags="$available_tags $tagname"
12102     fi
12103     fi
12104   done
12105   IFS="$lt_save_ifs"
12106
12107   # Now substitute the updated list of available tags.
12108   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
12109     mv "${ofile}T" "$ofile"
12110     chmod +x "$ofile"
12111   else
12112     rm -f "${ofile}T"
12113     as_fn_error $? "unable to update list of available tagged configurations." "$LINENO" 5
12114   fi
12115 fi
12116
12117
12118
12119 # This can be used to rebuild libtool when needed
12120 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
12121
12122 # Always use our own libtool.
12123 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
12124
12125 # Prevent multiple expansion
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136 ol_link_perl=no
12137 if test $ol_enable_perl != no ; then
12138         # Extract the first word of "perl", so it can be a program name with args.
12139 set dummy perl; ac_word=$2
12140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12141 $as_echo_n "checking for $ac_word... " >&6; }
12142 if ${ac_cv_path_PERLBIN+:} false; then :
12143   $as_echo_n "(cached) " >&6
12144 else
12145   case $PERLBIN in
12146   [\\/]* | ?:[\\/]*)
12147   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
12148   ;;
12149   *)
12150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12151 for as_dir in $PATH
12152 do
12153   IFS=$as_save_IFS
12154   test -z "$as_dir" && as_dir=.
12155     for ac_exec_ext in '' $ac_executable_extensions; do
12156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12157     ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
12158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12159     break 2
12160   fi
12161 done
12162   done
12163 IFS=$as_save_IFS
12164
12165   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
12166   ;;
12167 esac
12168 fi
12169 PERLBIN=$ac_cv_path_PERLBIN
12170 if test -n "$PERLBIN"; then
12171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLBIN" >&5
12172 $as_echo "$PERLBIN" >&6; }
12173 else
12174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12175 $as_echo "no" >&6; }
12176 fi
12177
12178
12179
12180         if test "no$PERLBIN" = "no" ; then
12181                 if test $ol_enable_perl = yes ; then
12182                         as_fn_error $? "could not locate perl" "$LINENO" 5
12183                 fi
12184
12185         else
12186                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
12187                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
12188
12189                 if test x"$ol_enable_perl" = "xyes" ; then
12190                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
12191                 else
12192                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
12193                 fi
12194                                 ol_link_perl=yes
12195         fi
12196 fi
12197
12198 ac_ext=c
12199 ac_cpp='$CPP $CPPFLAGS'
12200 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12201 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12202 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
12204 $as_echo_n "checking how to run the C preprocessor... " >&6; }
12205 # On Suns, sometimes $CPP names a directory.
12206 if test -n "$CPP" && test -d "$CPP"; then
12207   CPP=
12208 fi
12209 if test -z "$CPP"; then
12210   if ${ac_cv_prog_CPP+:} false; then :
12211   $as_echo_n "(cached) " >&6
12212 else
12213       # Double quotes because CPP needs to be expanded
12214     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
12215     do
12216       ac_preproc_ok=false
12217 for ac_c_preproc_warn_flag in '' yes
12218 do
12219   # Use a header file that comes with gcc, so configuring glibc
12220   # with a fresh cross-compiler works.
12221   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12222   # <limits.h> exists even on freestanding compilers.
12223   # On the NeXT, cc -E runs the code through the compiler's parser,
12224   # not just through cpp. "Syntax error" is here to catch this case.
12225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12226 /* end confdefs.h.  */
12227 #ifdef __STDC__
12228 # include <limits.h>
12229 #else
12230 # include <assert.h>
12231 #endif
12232                      Syntax error
12233 _ACEOF
12234 if ac_fn_c_try_cpp "$LINENO"; then :
12235
12236 else
12237   # Broken: fails on valid input.
12238 continue
12239 fi
12240 rm -f conftest.err conftest.i conftest.$ac_ext
12241
12242   # OK, works on sane cases.  Now check whether nonexistent headers
12243   # can be detected and how.
12244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12245 /* end confdefs.h.  */
12246 #include <ac_nonexistent.h>
12247 _ACEOF
12248 if ac_fn_c_try_cpp "$LINENO"; then :
12249   # Broken: success on invalid input.
12250 continue
12251 else
12252   # Passes both tests.
12253 ac_preproc_ok=:
12254 break
12255 fi
12256 rm -f conftest.err conftest.i conftest.$ac_ext
12257
12258 done
12259 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12260 rm -f conftest.i conftest.err conftest.$ac_ext
12261 if $ac_preproc_ok; then :
12262   break
12263 fi
12264
12265     done
12266     ac_cv_prog_CPP=$CPP
12267
12268 fi
12269   CPP=$ac_cv_prog_CPP
12270 else
12271   ac_cv_prog_CPP=$CPP
12272 fi
12273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
12274 $as_echo "$CPP" >&6; }
12275 ac_preproc_ok=false
12276 for ac_c_preproc_warn_flag in '' yes
12277 do
12278   # Use a header file that comes with gcc, so configuring glibc
12279   # with a fresh cross-compiler works.
12280   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12281   # <limits.h> exists even on freestanding compilers.
12282   # On the NeXT, cc -E runs the code through the compiler's parser,
12283   # not just through cpp. "Syntax error" is here to catch this case.
12284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12285 /* end confdefs.h.  */
12286 #ifdef __STDC__
12287 # include <limits.h>
12288 #else
12289 # include <assert.h>
12290 #endif
12291                      Syntax error
12292 _ACEOF
12293 if ac_fn_c_try_cpp "$LINENO"; then :
12294
12295 else
12296   # Broken: fails on valid input.
12297 continue
12298 fi
12299 rm -f conftest.err conftest.i conftest.$ac_ext
12300
12301   # OK, works on sane cases.  Now check whether nonexistent headers
12302   # can be detected and how.
12303   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12304 /* end confdefs.h.  */
12305 #include <ac_nonexistent.h>
12306 _ACEOF
12307 if ac_fn_c_try_cpp "$LINENO"; then :
12308   # Broken: success on invalid input.
12309 continue
12310 else
12311   # Passes both tests.
12312 ac_preproc_ok=:
12313 break
12314 fi
12315 rm -f conftest.err conftest.i conftest.$ac_ext
12316
12317 done
12318 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12319 rm -f conftest.i conftest.err conftest.$ac_ext
12320 if $ac_preproc_ok; then :
12321
12322 else
12323   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12324 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12325 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
12326 See \`config.log' for more details" "$LINENO" 5; }
12327 fi
12328
12329 ac_ext=c
12330 ac_cpp='$CPP $CPPFLAGS'
12331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12334
12335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using MS Visual C++" >&5
12336 $as_echo_n "checking whether we are using MS Visual C++... " >&6; }
12337 if ${ol_cv_msvc+:} false; then :
12338   $as_echo_n "(cached) " >&6
12339 else
12340   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12341 /* end confdefs.h.  */
12342
12343 #ifndef _MSC_VER
12344 #include <__FOO__/generate_error.h>
12345 #endif
12346
12347 _ACEOF
12348 if ac_fn_c_try_cpp "$LINENO"; then :
12349   ol_cv_msvc=yes
12350 else
12351   ol_cv_msvc=no
12352 fi
12353 rm -f conftest.err conftest.i conftest.$ac_ext
12354 fi
12355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_msvc" >&5
12356 $as_echo "$ol_cv_msvc" >&6; }
12357
12358 case $host_os in
12359   *mingw32* ) ac_cv_mingw32=yes ;;
12360   *cygwin* ) ac_cv_cygwin=yes ;;
12361   *interix* ) ac_cv_interix=yes ;;
12362 esac
12363
12364
12365
12366
12367 cat >>confdefs.h <<_ACEOF
12368 #define EXEEXT "${EXEEXT}"
12369 _ACEOF
12370
12371
12372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for be_app in -lbe" >&5
12373 $as_echo_n "checking for be_app in -lbe... " >&6; }
12374 if ${ac_cv_lib_be_be_app+:} false; then :
12375   $as_echo_n "(cached) " >&6
12376 else
12377   ac_check_lib_save_LIBS=$LIBS
12378 LIBS="-lbe -lroot -lnet $LIBS"
12379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12380 /* end confdefs.h.  */
12381
12382 /* Override any GCC internal prototype to avoid an error.
12383    Use char because int might match the return type of a GCC
12384    builtin and then its argument prototype would still apply.  */
12385 #ifdef __cplusplus
12386 extern "C"
12387 #endif
12388 char be_app ();
12389 int
12390 main ()
12391 {
12392 return be_app ();
12393   ;
12394   return 0;
12395 }
12396 _ACEOF
12397 if ac_fn_c_try_link "$LINENO"; then :
12398   ac_cv_lib_be_be_app=yes
12399 else
12400   ac_cv_lib_be_be_app=no
12401 fi
12402 rm -f core conftest.err conftest.$ac_objext \
12403     conftest$ac_exeext conftest.$ac_ext
12404 LIBS=$ac_check_lib_save_LIBS
12405 fi
12406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_be_be_app" >&5
12407 $as_echo "$ac_cv_lib_be_be_app" >&6; }
12408 if test "x$ac_cv_lib_be_be_app" = xyes; then :
12409   LIBS="$LIBS -lbe -lroot -lnet"
12410 else
12411   :
12412 fi
12413
12414
12415 ac_ext=c
12416 ac_cpp='$CPP $CPPFLAGS'
12417 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12418 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12419 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12420 if test -n "$ac_tool_prefix"; then
12421   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
12422 set dummy ${ac_tool_prefix}gcc; ac_word=$2
12423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12424 $as_echo_n "checking for $ac_word... " >&6; }
12425 if ${ac_cv_prog_CC+:} false; then :
12426   $as_echo_n "(cached) " >&6
12427 else
12428   if test -n "$CC"; then
12429   ac_cv_prog_CC="$CC" # Let the user override the test.
12430 else
12431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12432 for as_dir in $PATH
12433 do
12434   IFS=$as_save_IFS
12435   test -z "$as_dir" && as_dir=.
12436     for ac_exec_ext in '' $ac_executable_extensions; do
12437   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12438     ac_cv_prog_CC="${ac_tool_prefix}gcc"
12439     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12440     break 2
12441   fi
12442 done
12443   done
12444 IFS=$as_save_IFS
12445
12446 fi
12447 fi
12448 CC=$ac_cv_prog_CC
12449 if test -n "$CC"; then
12450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12451 $as_echo "$CC" >&6; }
12452 else
12453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12454 $as_echo "no" >&6; }
12455 fi
12456
12457
12458 fi
12459 if test -z "$ac_cv_prog_CC"; then
12460   ac_ct_CC=$CC
12461   # Extract the first word of "gcc", so it can be a program name with args.
12462 set dummy gcc; ac_word=$2
12463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12464 $as_echo_n "checking for $ac_word... " >&6; }
12465 if ${ac_cv_prog_ac_ct_CC+:} false; then :
12466   $as_echo_n "(cached) " >&6
12467 else
12468   if test -n "$ac_ct_CC"; then
12469   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12470 else
12471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12472 for as_dir in $PATH
12473 do
12474   IFS=$as_save_IFS
12475   test -z "$as_dir" && as_dir=.
12476     for ac_exec_ext in '' $ac_executable_extensions; do
12477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12478     ac_cv_prog_ac_ct_CC="gcc"
12479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12480     break 2
12481   fi
12482 done
12483   done
12484 IFS=$as_save_IFS
12485
12486 fi
12487 fi
12488 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12489 if test -n "$ac_ct_CC"; then
12490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12491 $as_echo "$ac_ct_CC" >&6; }
12492 else
12493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12494 $as_echo "no" >&6; }
12495 fi
12496
12497   if test "x$ac_ct_CC" = x; then
12498     CC=""
12499   else
12500     case $cross_compiling:$ac_tool_warned in
12501 yes:)
12502 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12503 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12504 ac_tool_warned=yes ;;
12505 esac
12506     CC=$ac_ct_CC
12507   fi
12508 else
12509   CC="$ac_cv_prog_CC"
12510 fi
12511
12512 if test -z "$CC"; then
12513           if test -n "$ac_tool_prefix"; then
12514     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12515 set dummy ${ac_tool_prefix}cc; ac_word=$2
12516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12517 $as_echo_n "checking for $ac_word... " >&6; }
12518 if ${ac_cv_prog_CC+:} false; then :
12519   $as_echo_n "(cached) " >&6
12520 else
12521   if test -n "$CC"; then
12522   ac_cv_prog_CC="$CC" # Let the user override the test.
12523 else
12524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12525 for as_dir in $PATH
12526 do
12527   IFS=$as_save_IFS
12528   test -z "$as_dir" && as_dir=.
12529     for ac_exec_ext in '' $ac_executable_extensions; do
12530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12531     ac_cv_prog_CC="${ac_tool_prefix}cc"
12532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12533     break 2
12534   fi
12535 done
12536   done
12537 IFS=$as_save_IFS
12538
12539 fi
12540 fi
12541 CC=$ac_cv_prog_CC
12542 if test -n "$CC"; then
12543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12544 $as_echo "$CC" >&6; }
12545 else
12546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12547 $as_echo "no" >&6; }
12548 fi
12549
12550
12551   fi
12552 fi
12553 if test -z "$CC"; then
12554   # Extract the first word of "cc", so it can be a program name with args.
12555 set dummy cc; ac_word=$2
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12557 $as_echo_n "checking for $ac_word... " >&6; }
12558 if ${ac_cv_prog_CC+:} false; then :
12559   $as_echo_n "(cached) " >&6
12560 else
12561   if test -n "$CC"; then
12562   ac_cv_prog_CC="$CC" # Let the user override the test.
12563 else
12564   ac_prog_rejected=no
12565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12566 for as_dir in $PATH
12567 do
12568   IFS=$as_save_IFS
12569   test -z "$as_dir" && as_dir=.
12570     for ac_exec_ext in '' $ac_executable_extensions; do
12571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12572     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12573        ac_prog_rejected=yes
12574        continue
12575      fi
12576     ac_cv_prog_CC="cc"
12577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12578     break 2
12579   fi
12580 done
12581   done
12582 IFS=$as_save_IFS
12583
12584 if test $ac_prog_rejected = yes; then
12585   # We found a bogon in the path, so make sure we never use it.
12586   set dummy $ac_cv_prog_CC
12587   shift
12588   if test $# != 0; then
12589     # We chose a different compiler from the bogus one.
12590     # However, it has the same basename, so the bogon will be chosen
12591     # first if we set CC to just the basename; use the full file name.
12592     shift
12593     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12594   fi
12595 fi
12596 fi
12597 fi
12598 CC=$ac_cv_prog_CC
12599 if test -n "$CC"; then
12600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12601 $as_echo "$CC" >&6; }
12602 else
12603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12604 $as_echo "no" >&6; }
12605 fi
12606
12607
12608 fi
12609 if test -z "$CC"; then
12610   if test -n "$ac_tool_prefix"; then
12611   for ac_prog in cl.exe
12612   do
12613     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12614 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12616 $as_echo_n "checking for $ac_word... " >&6; }
12617 if ${ac_cv_prog_CC+:} false; then :
12618   $as_echo_n "(cached) " >&6
12619 else
12620   if test -n "$CC"; then
12621   ac_cv_prog_CC="$CC" # Let the user override the test.
12622 else
12623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12624 for as_dir in $PATH
12625 do
12626   IFS=$as_save_IFS
12627   test -z "$as_dir" && as_dir=.
12628     for ac_exec_ext in '' $ac_executable_extensions; do
12629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12630     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12632     break 2
12633   fi
12634 done
12635   done
12636 IFS=$as_save_IFS
12637
12638 fi
12639 fi
12640 CC=$ac_cv_prog_CC
12641 if test -n "$CC"; then
12642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12643 $as_echo "$CC" >&6; }
12644 else
12645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12646 $as_echo "no" >&6; }
12647 fi
12648
12649
12650     test -n "$CC" && break
12651   done
12652 fi
12653 if test -z "$CC"; then
12654   ac_ct_CC=$CC
12655   for ac_prog in cl.exe
12656 do
12657   # Extract the first word of "$ac_prog", so it can be a program name with args.
12658 set dummy $ac_prog; ac_word=$2
12659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12660 $as_echo_n "checking for $ac_word... " >&6; }
12661 if ${ac_cv_prog_ac_ct_CC+:} false; then :
12662   $as_echo_n "(cached) " >&6
12663 else
12664   if test -n "$ac_ct_CC"; then
12665   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12666 else
12667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12668 for as_dir in $PATH
12669 do
12670   IFS=$as_save_IFS
12671   test -z "$as_dir" && as_dir=.
12672     for ac_exec_ext in '' $ac_executable_extensions; do
12673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12674     ac_cv_prog_ac_ct_CC="$ac_prog"
12675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12676     break 2
12677   fi
12678 done
12679   done
12680 IFS=$as_save_IFS
12681
12682 fi
12683 fi
12684 ac_ct_CC=$ac_cv_prog_ac_ct_CC
12685 if test -n "$ac_ct_CC"; then
12686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12687 $as_echo "$ac_ct_CC" >&6; }
12688 else
12689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12690 $as_echo "no" >&6; }
12691 fi
12692
12693
12694   test -n "$ac_ct_CC" && break
12695 done
12696
12697   if test "x$ac_ct_CC" = x; then
12698     CC=""
12699   else
12700     case $cross_compiling:$ac_tool_warned in
12701 yes:)
12702 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12703 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12704 ac_tool_warned=yes ;;
12705 esac
12706     CC=$ac_ct_CC
12707   fi
12708 fi
12709
12710 fi
12711
12712
12713 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12714 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12715 as_fn_error $? "no acceptable C compiler found in \$PATH
12716 See \`config.log' for more details" "$LINENO" 5; }
12717
12718 # Provide some information about the compiler.
12719 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
12720 set X $ac_compile
12721 ac_compiler=$2
12722 for ac_option in --version -v -V -qversion; do
12723   { { ac_try="$ac_compiler $ac_option >&5"
12724 case "(($ac_try" in
12725   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12726   *) ac_try_echo=$ac_try;;
12727 esac
12728 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12729 $as_echo "$ac_try_echo"; } >&5
12730   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
12731   ac_status=$?
12732   if test -s conftest.err; then
12733     sed '10a\
12734 ... rest of stderr output deleted ...
12735          10q' conftest.err >conftest.er1
12736     cat conftest.er1 >&5
12737   fi
12738   rm -f conftest.er1 conftest.err
12739   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12740   test $ac_status = 0; }
12741 done
12742
12743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
12744 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
12745 if ${ac_cv_c_compiler_gnu+:} false; then :
12746   $as_echo_n "(cached) " >&6
12747 else
12748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12749 /* end confdefs.h.  */
12750
12751 int
12752 main ()
12753 {
12754 #ifndef __GNUC__
12755        choke me
12756 #endif
12757
12758   ;
12759   return 0;
12760 }
12761 _ACEOF
12762 if ac_fn_c_try_compile "$LINENO"; then :
12763   ac_compiler_gnu=yes
12764 else
12765   ac_compiler_gnu=no
12766 fi
12767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12768 ac_cv_c_compiler_gnu=$ac_compiler_gnu
12769
12770 fi
12771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
12772 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
12773 if test $ac_compiler_gnu = yes; then
12774   GCC=yes
12775 else
12776   GCC=
12777 fi
12778 ac_test_CFLAGS=${CFLAGS+set}
12779 ac_save_CFLAGS=$CFLAGS
12780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
12781 $as_echo_n "checking whether $CC accepts -g... " >&6; }
12782 if ${ac_cv_prog_cc_g+:} false; then :
12783   $as_echo_n "(cached) " >&6
12784 else
12785   ac_save_c_werror_flag=$ac_c_werror_flag
12786    ac_c_werror_flag=yes
12787    ac_cv_prog_cc_g=no
12788    CFLAGS="-g"
12789    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12790 /* end confdefs.h.  */
12791
12792 int
12793 main ()
12794 {
12795
12796   ;
12797   return 0;
12798 }
12799 _ACEOF
12800 if ac_fn_c_try_compile "$LINENO"; then :
12801   ac_cv_prog_cc_g=yes
12802 else
12803   CFLAGS=""
12804       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12805 /* end confdefs.h.  */
12806
12807 int
12808 main ()
12809 {
12810
12811   ;
12812   return 0;
12813 }
12814 _ACEOF
12815 if ac_fn_c_try_compile "$LINENO"; then :
12816
12817 else
12818   ac_c_werror_flag=$ac_save_c_werror_flag
12819          CFLAGS="-g"
12820          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12821 /* end confdefs.h.  */
12822
12823 int
12824 main ()
12825 {
12826
12827   ;
12828   return 0;
12829 }
12830 _ACEOF
12831 if ac_fn_c_try_compile "$LINENO"; then :
12832   ac_cv_prog_cc_g=yes
12833 fi
12834 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12835 fi
12836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12837 fi
12838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12839    ac_c_werror_flag=$ac_save_c_werror_flag
12840 fi
12841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
12842 $as_echo "$ac_cv_prog_cc_g" >&6; }
12843 if test "$ac_test_CFLAGS" = set; then
12844   CFLAGS=$ac_save_CFLAGS
12845 elif test $ac_cv_prog_cc_g = yes; then
12846   if test "$GCC" = yes; then
12847     CFLAGS="-g -O2"
12848   else
12849     CFLAGS="-g"
12850   fi
12851 else
12852   if test "$GCC" = yes; then
12853     CFLAGS="-O2"
12854   else
12855     CFLAGS=
12856   fi
12857 fi
12858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
12859 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
12860 if ${ac_cv_prog_cc_c89+:} false; then :
12861   $as_echo_n "(cached) " >&6
12862 else
12863   ac_cv_prog_cc_c89=no
12864 ac_save_CC=$CC
12865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12866 /* end confdefs.h.  */
12867 #include <stdarg.h>
12868 #include <stdio.h>
12869 struct stat;
12870 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12871 struct buf { int x; };
12872 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12873 static char *e (p, i)
12874      char **p;
12875      int i;
12876 {
12877   return p[i];
12878 }
12879 static char *f (char * (*g) (char **, int), char **p, ...)
12880 {
12881   char *s;
12882   va_list v;
12883   va_start (v,p);
12884   s = g (p, va_arg (v,int));
12885   va_end (v);
12886   return s;
12887 }
12888
12889 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12890    function prototypes and stuff, but not '\xHH' hex character constants.
12891    These don't provoke an error unfortunately, instead are silently treated
12892    as 'x'.  The following induces an error, until -std is added to get
12893    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12894    array size at least.  It's necessary to write '\x00'==0 to get something
12895    that's true only with -std.  */
12896 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12897
12898 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
12899    inside strings and character constants.  */
12900 #define FOO(x) 'x'
12901 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
12902
12903 int test (int i, double x);
12904 struct s1 {int (*f) (int a);};
12905 struct s2 {int (*f) (double a);};
12906 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12907 int argc;
12908 char **argv;
12909 int
12910 main ()
12911 {
12912 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12913   ;
12914   return 0;
12915 }
12916 _ACEOF
12917 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
12918         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12919 do
12920   CC="$ac_save_CC $ac_arg"
12921   if ac_fn_c_try_compile "$LINENO"; then :
12922   ac_cv_prog_cc_c89=$ac_arg
12923 fi
12924 rm -f core conftest.err conftest.$ac_objext
12925   test "x$ac_cv_prog_cc_c89" != "xno" && break
12926 done
12927 rm -f conftest.$ac_ext
12928 CC=$ac_save_CC
12929
12930 fi
12931 # AC_CACHE_VAL
12932 case "x$ac_cv_prog_cc_c89" in
12933   x)
12934     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12935 $as_echo "none needed" >&6; } ;;
12936   xno)
12937     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12938 $as_echo "unsupported" >&6; } ;;
12939   *)
12940     CC="$CC $ac_cv_prog_cc_c89"
12941     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
12942 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
12943 esac
12944 if test "x$ac_cv_prog_cc_c89" != xno; then :
12945
12946 fi
12947
12948 ac_ext=c
12949 ac_cpp='$CPP $CPPFLAGS'
12950 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12951 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12952 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12953
12954 depcc="$CC"   am_compiler_list=
12955
12956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
12957 $as_echo_n "checking dependency style of $depcc... " >&6; }
12958 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
12959   $as_echo_n "(cached) " >&6
12960 else
12961   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12962   # We make a subdir and do the tests there.  Otherwise we can end up
12963   # making bogus files that we don't know about and never remove.  For
12964   # instance it was reported that on HP-UX the gcc test will end up
12965   # making a dummy file named `D' -- because `-MD' means `put the output
12966   # in D'.
12967   mkdir conftest.dir
12968   # Copy depcomp to subdir because otherwise we won't find it if we're
12969   # using a relative directory.
12970   cp "$am_depcomp" conftest.dir
12971   cd conftest.dir
12972   # We will build objects and dependencies in a subdirectory because
12973   # it helps to detect inapplicable dependency modes.  For instance
12974   # both Tru64's cc and ICC support -MD to output dependencies as a
12975   # side effect of compilation, but ICC will put the dependencies in
12976   # the current directory while Tru64 will put them in the object
12977   # directory.
12978   mkdir sub
12979
12980   am_cv_CC_dependencies_compiler_type=none
12981   if test "$am_compiler_list" = ""; then
12982      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12983   fi
12984   for depmode in $am_compiler_list; do
12985     # Setup a source with many dependencies, because some compilers
12986     # like to wrap large dependency lists on column 80 (with \), and
12987     # we should not choose a depcomp mode which is confused by this.
12988     #
12989     # We need to recreate these files for each test, as the compiler may
12990     # overwrite some of them when testing with obscure command lines.
12991     # This happens at least with the AIX C compiler.
12992     : > sub/conftest.c
12993     for i in 1 2 3 4 5 6; do
12994       echo '#include "conftst'$i'.h"' >> sub/conftest.c
12995       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12996       # Solaris 8's {/usr,}/bin/sh.
12997       touch sub/conftst$i.h
12998     done
12999     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
13000
13001     case $depmode in
13002     nosideeffect)
13003       # after this tag, mechanisms are not by side-effect, so they'll
13004       # only be used when explicitly requested
13005       if test "x$enable_dependency_tracking" = xyes; then
13006         continue
13007       else
13008         break
13009       fi
13010       ;;
13011     none) break ;;
13012     esac
13013     # We check with `-c' and `-o' for the sake of the "dashmstdout"
13014     # mode.  It turns out that the SunPro C++ compiler does not properly
13015     # handle `-M -o', and we need to detect this.
13016     if depmode=$depmode \
13017        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
13018        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
13019        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
13020          >/dev/null 2>conftest.err &&
13021        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
13022        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
13023        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
13024       # icc doesn't choke on unknown options, it will just issue warnings
13025       # or remarks (even with -Werror).  So we grep stderr for any message
13026       # that says an option was ignored or not supported.
13027       # When given -MP, icc 7.0 and 7.1 complain thusly:
13028       #   icc: Command line warning: ignoring option '-M'; no argument required
13029       # The diagnosis changed in icc 8.0:
13030       #   icc: Command line remark: option '-MP' not supported
13031       if (grep 'ignoring option' conftest.err ||
13032           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
13033         am_cv_CC_dependencies_compiler_type=$depmode
13034         break
13035       fi
13036     fi
13037   done
13038
13039   cd ..
13040   rm -rf conftest.dir
13041 else
13042   am_cv_CC_dependencies_compiler_type=none
13043 fi
13044
13045 fi
13046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
13047 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
13048 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
13049
13050
13051
13052 if
13053   test "x$enable_dependency_tracking" != xno \
13054   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
13055   am__fastdepCC_TRUE=
13056   am__fastdepCC_FALSE='#'
13057 else
13058   am__fastdepCC_TRUE='#'
13059   am__fastdepCC_FALSE=
13060 fi
13061
13062
13063 if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
13064         as_fn_error $? "OpenLDAP requires compiler to support STDC constructs." "$LINENO" 5
13065 fi
13066
13067 # test for make depend flag
13068 OL_MKDEP=
13069 OL_MKDEP_FLAGS=
13070 if test -z "${MKDEP}"; then
13071         OL_MKDEP="${CC-cc}"
13072         if test -z "${MKDEP_FLAGS}"; then
13073                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${OL_MKDEP} depend flag" >&5
13074 $as_echo_n "checking for ${OL_MKDEP} depend flag... " >&6; }
13075 if ${ol_cv_mkdep+:} false; then :
13076   $as_echo_n "(cached) " >&6
13077 else
13078
13079                         ol_cv_mkdep=no
13080                         for flag in "-M" "-xM"; do
13081                                 cat > conftest.c <<EOF
13082  noCode;
13083 EOF
13084                                 if { ac_try='$OL_MKDEP $flag conftest.c'
13085   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
13086   (eval $ac_try) 2>&5
13087   ac_status=$?
13088   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13089   test $ac_status = 0; }; } \
13090                                         | grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
13091                                 then
13092                                         if test ! -f conftest."${ac_object}" ; then
13093                                                 ol_cv_mkdep=$flag
13094                                                 OL_MKDEP_FLAGS="$flag"
13095                                                 break
13096                                         fi
13097                                 fi
13098                         done
13099                         rm -f conftest*
13100
13101 fi
13102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_mkdep" >&5
13103 $as_echo "$ol_cv_mkdep" >&6; }
13104                 test "$ol_cv_mkdep" = no && OL_MKDEP=":"
13105         else
13106                 cc_cv_mkdep=yes
13107                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13108         fi
13109 else
13110         cc_cv_mkdep=yes
13111         OL_MKDEP="${MKDEP}"
13112         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13113 fi
13114
13115
13116
13117 if test "${ol_cv_mkdep}" = no ; then
13118         # this will soon become an error
13119         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: do not know how to generate dependencies" >&5
13120 $as_echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
13121 fi
13122
13123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for afopen in -ls" >&5
13124 $as_echo_n "checking for afopen in -ls... " >&6; }
13125 if ${ac_cv_lib_s_afopen+:} false; then :
13126   $as_echo_n "(cached) " >&6
13127 else
13128   ac_check_lib_save_LIBS=$LIBS
13129 LIBS="-ls  $LIBS"
13130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13131 /* end confdefs.h.  */
13132
13133 /* Override any GCC internal prototype to avoid an error.
13134    Use char because int might match the return type of a GCC
13135    builtin and then its argument prototype would still apply.  */
13136 #ifdef __cplusplus
13137 extern "C"
13138 #endif
13139 char afopen ();
13140 int
13141 main ()
13142 {
13143 return afopen ();
13144   ;
13145   return 0;
13146 }
13147 _ACEOF
13148 if ac_fn_c_try_link "$LINENO"; then :
13149   ac_cv_lib_s_afopen=yes
13150 else
13151   ac_cv_lib_s_afopen=no
13152 fi
13153 rm -f core conftest.err conftest.$ac_objext \
13154     conftest$ac_exeext conftest.$ac_ext
13155 LIBS=$ac_check_lib_save_LIBS
13156 fi
13157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_afopen" >&5
13158 $as_echo "$ac_cv_lib_s_afopen" >&6; }
13159 if test "x$ac_cv_lib_s_afopen" = xyes; then :
13160
13161         AUTH_LIBS=-ls
13162
13163 $as_echo "#define HAVE_AIX_SECURITY 1" >>confdefs.h
13164
13165
13166 fi
13167
13168
13169 case "$target" in
13170 *-ibm-openedition)
13171         ac_cv_func_getopt=no
13172
13173 $as_echo "#define BOTH_STRINGS_H 1" >>confdefs.h
13174
13175         ;;
13176 esac
13177
13178 ol_link_modules=no
13179 WITH_MODULES_ENABLED=no
13180 if test $ol_enable_modules != no ; then
13181         for ac_header in ltdl.h
13182 do :
13183   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
13184 if test "x$ac_cv_header_ltdl_h" = xyes; then :
13185   cat >>confdefs.h <<_ACEOF
13186 #define HAVE_LTDL_H 1
13187 _ACEOF
13188
13189 fi
13190
13191 done
13192
13193
13194         if test $ac_cv_header_ltdl_h = no ; then
13195                 as_fn_error $? "could not locate libtool ltdl.h" "$LINENO" 5
13196         fi
13197
13198         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
13199 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
13200 if ${ac_cv_lib_ltdl_lt_dlinit+:} false; then :
13201   $as_echo_n "(cached) " >&6
13202 else
13203   ac_check_lib_save_LIBS=$LIBS
13204 LIBS="-lltdl  $LIBS"
13205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13206 /* end confdefs.h.  */
13207
13208 /* Override any GCC internal prototype to avoid an error.
13209    Use char because int might match the return type of a GCC
13210    builtin and then its argument prototype would still apply.  */
13211 #ifdef __cplusplus
13212 extern "C"
13213 #endif
13214 char lt_dlinit ();
13215 int
13216 main ()
13217 {
13218 return lt_dlinit ();
13219   ;
13220   return 0;
13221 }
13222 _ACEOF
13223 if ac_fn_c_try_link "$LINENO"; then :
13224   ac_cv_lib_ltdl_lt_dlinit=yes
13225 else
13226   ac_cv_lib_ltdl_lt_dlinit=no
13227 fi
13228 rm -f core conftest.err conftest.$ac_objext \
13229     conftest$ac_exeext conftest.$ac_ext
13230 LIBS=$ac_check_lib_save_LIBS
13231 fi
13232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13233 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
13234 if test "x$ac_cv_lib_ltdl_lt_dlinit" = xyes; then :
13235
13236                 MODULES_LIBS=-lltdl
13237
13238 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
13239
13240
13241 fi
13242
13243
13244         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13245                 as_fn_error $? "could not locate libtool -lltdl" "$LINENO" 5
13246         fi
13247         ol_link_modules=yes
13248         WITH_MODULES_ENABLED=yes
13249
13250 else
13251         for i in $Backends; do
13252                 eval "ol_tmp=\$ol_enable_$i"
13253                 if test $ol_tmp = mod ; then
13254                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i backend" >&5
13255 $as_echo "$as_me: WARNING: building static $i backend" >&2;}
13256                         eval "ol_enable_$i=yes"
13257                 fi
13258         done
13259         for i in $Overlays; do
13260                 eval "ol_tmp=\$ol_enable_$i"
13261                 if test $ol_tmp = mod ; then
13262                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i overlay" >&5
13263 $as_echo "$as_me: WARNING: building static $i overlay" >&2;}
13264                         eval "ol_enable_$i=yes"
13265                 fi
13266         done
13267 fi
13268
13269 # test for EBCDIC
13270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EBCDIC" >&5
13271 $as_echo_n "checking for EBCDIC... " >&6; }
13272 if ${ol_cv_cpp_ebcdic+:} false; then :
13273   $as_echo_n "(cached) " >&6
13274 else
13275
13276         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13277 /* end confdefs.h.  */
13278
13279 #if !('M' == 0xd4)
13280 #include <__ASCII__/generate_error.h>
13281 #endif
13282
13283 _ACEOF
13284 if ac_fn_c_try_cpp "$LINENO"; then :
13285   ol_cv_cpp_ebcdic=yes
13286 else
13287   ol_cv_cpp_ebcdic=no
13288 fi
13289 rm -f conftest.err conftest.i conftest.$ac_ext
13290 fi
13291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cpp_ebcdic" >&5
13292 $as_echo "$ol_cv_cpp_ebcdic" >&6; }
13293 if test $ol_cv_cpp_ebcdic = yes ; then
13294
13295 $as_echo "#define HAVE_EBCDIC 1" >>confdefs.h
13296
13297 fi
13298
13299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13300 $as_echo_n "checking for ANSI C header files... " >&6; }
13301 if ${ol_cv_header_stdc+:} false; then :
13302   $as_echo_n "(cached) " >&6
13303 else
13304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13305 /* end confdefs.h.  */
13306 #include <stdlib.h>
13307 #include <stdarg.h>
13308 #include <string.h>
13309 #include <float.h>
13310 _ACEOF
13311 if ac_fn_c_try_cpp "$LINENO"; then :
13312   ol_cv_header_stdc=yes
13313 else
13314   ol_cv_header_stdc=no
13315 fi
13316 rm -f conftest.err conftest.i conftest.$ac_ext
13317
13318 if test $ol_cv_header_stdc = yes; then
13319   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13321 /* end confdefs.h.  */
13322 #include <string.h>
13323
13324 _ACEOF
13325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13326   $EGREP "memchr" >/dev/null 2>&1; then :
13327
13328 else
13329   ol_cv_header_stdc=no
13330 fi
13331 rm -f conftest*
13332
13333 fi
13334
13335 if test $ol_cv_header_stdc = yes; then
13336   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13338 /* end confdefs.h.  */
13339 #include <stdlib.h>
13340
13341 _ACEOF
13342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13343   $EGREP "free" >/dev/null 2>&1; then :
13344
13345 else
13346   ol_cv_header_stdc=no
13347 fi
13348 rm -f conftest*
13349
13350 fi
13351
13352 if test $ol_cv_header_stdc = yes; then
13353   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13354 if test "$cross_compiling" = yes; then :
13355   :
13356 else
13357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13358 /* end confdefs.h.  */
13359 #include <ctype.h>
13360 #ifndef HAVE_EBCDIC
13361 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13362 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13363 #else
13364 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13365                 || ('j' <= (c) && (c) <= 'r') \
13366                 || ('s' <= (c) && (c) <= 'z'))
13367 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
13368 #endif
13369 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13370 int main () { int i; for (i = 0; i < 256; i++)
13371 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13372 exit (0); }
13373
13374 _ACEOF
13375 if ac_fn_c_try_run "$LINENO"; then :
13376
13377 else
13378   ol_cv_header_stdc=no
13379 fi
13380 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13381   conftest.$ac_objext conftest.beam conftest.$ac_ext
13382 fi
13383
13384 fi
13385 fi
13386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_stdc" >&5
13387 $as_echo "$ol_cv_header_stdc" >&6; }
13388 if test $ol_cv_header_stdc = yes; then
13389   $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13390
13391 fi
13392 ac_cv_header_stdc=disable
13393
13394
13395 if test $ol_cv_header_stdc != yes; then
13396         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate Standard C compliant headers" >&5
13397 $as_echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13398 fi
13399
13400 ac_header_dirent=no
13401 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13402   as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
13404 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
13405 if eval \${$as_ac_Header+:} false; then :
13406   $as_echo_n "(cached) " >&6
13407 else
13408   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13409 /* end confdefs.h.  */
13410 #include <sys/types.h>
13411 #include <$ac_hdr>
13412
13413 int
13414 main ()
13415 {
13416 if ((DIR *) 0)
13417 return 0;
13418   ;
13419   return 0;
13420 }
13421 _ACEOF
13422 if ac_fn_c_try_compile "$LINENO"; then :
13423   eval "$as_ac_Header=yes"
13424 else
13425   eval "$as_ac_Header=no"
13426 fi
13427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13428 fi
13429 eval ac_res=\$$as_ac_Header
13430                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13431 $as_echo "$ac_res" >&6; }
13432 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13433   cat >>confdefs.h <<_ACEOF
13434 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13435 _ACEOF
13436
13437 ac_header_dirent=$ac_hdr; break
13438 fi
13439
13440 done
13441 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13442 if test $ac_header_dirent = dirent.h; then
13443   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13444 $as_echo_n "checking for library containing opendir... " >&6; }
13445 if ${ac_cv_search_opendir+:} false; then :
13446   $as_echo_n "(cached) " >&6
13447 else
13448   ac_func_search_save_LIBS=$LIBS
13449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13450 /* end confdefs.h.  */
13451
13452 /* Override any GCC internal prototype to avoid an error.
13453    Use char because int might match the return type of a GCC
13454    builtin and then its argument prototype would still apply.  */
13455 #ifdef __cplusplus
13456 extern "C"
13457 #endif
13458 char opendir ();
13459 int
13460 main ()
13461 {
13462 return opendir ();
13463   ;
13464   return 0;
13465 }
13466 _ACEOF
13467 for ac_lib in '' dir; do
13468   if test -z "$ac_lib"; then
13469     ac_res="none required"
13470   else
13471     ac_res=-l$ac_lib
13472     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13473   fi
13474   if ac_fn_c_try_link "$LINENO"; then :
13475   ac_cv_search_opendir=$ac_res
13476 fi
13477 rm -f core conftest.err conftest.$ac_objext \
13478     conftest$ac_exeext
13479   if ${ac_cv_search_opendir+:} false; then :
13480   break
13481 fi
13482 done
13483 if ${ac_cv_search_opendir+:} false; then :
13484
13485 else
13486   ac_cv_search_opendir=no
13487 fi
13488 rm conftest.$ac_ext
13489 LIBS=$ac_func_search_save_LIBS
13490 fi
13491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13492 $as_echo "$ac_cv_search_opendir" >&6; }
13493 ac_res=$ac_cv_search_opendir
13494 if test "$ac_res" != no; then :
13495   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13496
13497 fi
13498
13499 else
13500   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13501 $as_echo_n "checking for library containing opendir... " >&6; }
13502 if ${ac_cv_search_opendir+:} false; then :
13503   $as_echo_n "(cached) " >&6
13504 else
13505   ac_func_search_save_LIBS=$LIBS
13506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13507 /* end confdefs.h.  */
13508
13509 /* Override any GCC internal prototype to avoid an error.
13510    Use char because int might match the return type of a GCC
13511    builtin and then its argument prototype would still apply.  */
13512 #ifdef __cplusplus
13513 extern "C"
13514 #endif
13515 char opendir ();
13516 int
13517 main ()
13518 {
13519 return opendir ();
13520   ;
13521   return 0;
13522 }
13523 _ACEOF
13524 for ac_lib in '' x; do
13525   if test -z "$ac_lib"; then
13526     ac_res="none required"
13527   else
13528     ac_res=-l$ac_lib
13529     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13530   fi
13531   if ac_fn_c_try_link "$LINENO"; then :
13532   ac_cv_search_opendir=$ac_res
13533 fi
13534 rm -f core conftest.err conftest.$ac_objext \
13535     conftest$ac_exeext
13536   if ${ac_cv_search_opendir+:} false; then :
13537   break
13538 fi
13539 done
13540 if ${ac_cv_search_opendir+:} false; then :
13541
13542 else
13543   ac_cv_search_opendir=no
13544 fi
13545 rm conftest.$ac_ext
13546 LIBS=$ac_func_search_save_LIBS
13547 fi
13548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13549 $as_echo "$ac_cv_search_opendir" >&6; }
13550 ac_res=$ac_cv_search_opendir
13551 if test "$ac_res" != no; then :
13552   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13553
13554 fi
13555
13556 fi
13557
13558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
13559 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
13560 if ${ac_cv_header_sys_wait_h+:} false; then :
13561   $as_echo_n "(cached) " >&6
13562 else
13563   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13564 /* end confdefs.h.  */
13565 #include <sys/types.h>
13566 #include <sys/wait.h>
13567 #ifndef WEXITSTATUS
13568 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
13569 #endif
13570 #ifndef WIFEXITED
13571 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13572 #endif
13573
13574 int
13575 main ()
13576 {
13577   int s;
13578   wait (&s);
13579   s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13580   ;
13581   return 0;
13582 }
13583 _ACEOF
13584 if ac_fn_c_try_compile "$LINENO"; then :
13585   ac_cv_header_sys_wait_h=yes
13586 else
13587   ac_cv_header_sys_wait_h=no
13588 fi
13589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13590 fi
13591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
13592 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
13593 if test $ac_cv_header_sys_wait_h = yes; then
13594
13595 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
13596
13597 fi
13598
13599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
13600 $as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
13601 if ${ac_cv_sys_tiocgwinsz_in_termios_h+:} false; then :
13602   $as_echo_n "(cached) " >&6
13603 else
13604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13605 /* end confdefs.h.  */
13606 #include <sys/types.h>
13607 #include <termios.h>
13608 #ifdef TIOCGWINSZ
13609   yes
13610 #endif
13611
13612 _ACEOF
13613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13614   $EGREP "yes" >/dev/null 2>&1; then :
13615   ac_cv_sys_tiocgwinsz_in_termios_h=yes
13616 else
13617   ac_cv_sys_tiocgwinsz_in_termios_h=no
13618 fi
13619 rm -f conftest*
13620
13621 fi
13622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13623 $as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
13624
13625 if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13626   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13627 $as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
13628 if ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+:} false; then :
13629   $as_echo_n "(cached) " >&6
13630 else
13631   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13632 /* end confdefs.h.  */
13633 #include <sys/types.h>
13634 #include <sys/ioctl.h>
13635 #ifdef TIOCGWINSZ
13636   yes
13637 #endif
13638
13639 _ACEOF
13640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13641   $EGREP "yes" >/dev/null 2>&1; then :
13642   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13643 else
13644   ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13645 fi
13646 rm -f conftest*
13647
13648 fi
13649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13650 $as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
13651
13652   if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13653
13654 $as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
13655
13656   fi
13657 fi
13658
13659
13660 for ac_header in \
13661         arpa/inet.h             \
13662         arpa/nameser.h  \
13663         assert.h                \
13664         bits/types.h    \
13665         conio.h                 \
13666         crypt.h                 \
13667         direct.h                \
13668         errno.h                 \
13669         fcntl.h                 \
13670         filio.h                 \
13671         getopt.h                \
13672         grp.h                   \
13673         io.h                    \
13674         libutil.h               \
13675         limits.h                \
13676         locale.h                \
13677         malloc.h                \
13678         memory.h                \
13679         psap.h                  \
13680         pwd.h                   \
13681         process.h               \
13682         sgtty.h                 \
13683         shadow.h                \
13684         stddef.h                \
13685         string.h                \
13686         strings.h               \
13687         sysexits.h              \
13688         sys/file.h              \
13689         sys/filio.h             \
13690         sys/fstyp.h             \
13691         sys/errno.h             \
13692         sys/ioctl.h             \
13693         sys/param.h             \
13694         sys/privgrp.h   \
13695         sys/resource.h  \
13696         sys/select.h    \
13697         sys/socket.h    \
13698         sys/stat.h              \
13699         sys/syslog.h    \
13700         sys/time.h              \
13701         sys/types.h             \
13702         sys/uio.h               \
13703         sys/vmount.h    \
13704         syslog.h                \
13705         termios.h               \
13706         unistd.h                \
13707         utime.h                 \
13708
13709 do :
13710   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13711 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13712 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13713   cat >>confdefs.h <<_ACEOF
13714 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13715 _ACEOF
13716
13717 fi
13718
13719 done
13720
13721
13722 if test "$ac_cv_mingw32" = yes \
13723         -o "$ac_cv_interix" = yes \
13724         -o "$ol_cv_msvc" = yes
13725 then
13726         for ac_header in winsock.h winsock2.h
13727 do :
13728   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13729 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13730 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13731   cat >>confdefs.h <<_ACEOF
13732 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13733 _ACEOF
13734
13735 fi
13736
13737 done
13738
13739 fi
13740
13741 for ac_header in resolv.h
13742 do :
13743   ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default
13744 #include <netinet/in.h>
13745
13746 "
13747 if test "x$ac_cv_header_resolv_h" = xyes; then :
13748   cat >>confdefs.h <<_ACEOF
13749 #define HAVE_RESOLV_H 1
13750 _ACEOF
13751
13752 fi
13753
13754 done
13755
13756
13757 for ac_header in netinet/tcp.h
13758 do :
13759   ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13760 #include <netinet/in.h>
13761
13762 "
13763 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
13764   cat >>confdefs.h <<_ACEOF
13765 #define HAVE_NETINET_TCP_H 1
13766 _ACEOF
13767
13768 fi
13769
13770 done
13771
13772
13773 for ac_header in sys/ucred.h
13774 do :
13775   ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13776 #ifdef HAVE_SYS_PARAM_H
13777 #include <sys/param.h>
13778 #endif
13779
13780 "
13781 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
13782   cat >>confdefs.h <<_ACEOF
13783 #define HAVE_SYS_UCRED_H 1
13784 _ACEOF
13785
13786 fi
13787
13788 done
13789
13790
13791
13792 for ac_func in sigaction sigset
13793 do :
13794   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13795 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13796 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13797   cat >>confdefs.h <<_ACEOF
13798 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13799 _ACEOF
13800
13801 fi
13802 done
13803
13804
13805 if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
13806         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset in -lV3" >&5
13807 $as_echo_n "checking for sigset in -lV3... " >&6; }
13808 if ${ac_cv_lib_V3_sigset+:} false; then :
13809   $as_echo_n "(cached) " >&6
13810 else
13811   ac_check_lib_save_LIBS=$LIBS
13812 LIBS="-lV3  $LIBS"
13813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13814 /* end confdefs.h.  */
13815
13816 /* Override any GCC internal prototype to avoid an error.
13817    Use char because int might match the return type of a GCC
13818    builtin and then its argument prototype would still apply.  */
13819 #ifdef __cplusplus
13820 extern "C"
13821 #endif
13822 char sigset ();
13823 int
13824 main ()
13825 {
13826 return sigset ();
13827   ;
13828   return 0;
13829 }
13830 _ACEOF
13831 if ac_fn_c_try_link "$LINENO"; then :
13832   ac_cv_lib_V3_sigset=yes
13833 else
13834   ac_cv_lib_V3_sigset=no
13835 fi
13836 rm -f core conftest.err conftest.$ac_objext \
13837     conftest$ac_exeext conftest.$ac_ext
13838 LIBS=$ac_check_lib_save_LIBS
13839 fi
13840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_V3_sigset" >&5
13841 $as_echo "$ac_cv_lib_V3_sigset" >&6; }
13842 if test "x$ac_cv_lib_V3_sigset" = xyes; then :
13843   cat >>confdefs.h <<_ACEOF
13844 #define HAVE_LIBV3 1
13845 _ACEOF
13846
13847   LIBS="-lV3 $LIBS"
13848
13849 fi
13850
13851 fi
13852
13853 if test $ol_cv_msvc = yes ; then
13854    ol_cv_winsock=yes
13855 fi
13856
13857 if test "$ac_cv_header_winsock_h" = yes; then
13858         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock" >&5
13859 $as_echo_n "checking for winsock... " >&6; }
13860 if ${ol_cv_winsock+:} false; then :
13861   $as_echo_n "(cached) " >&6
13862 else
13863
13864         save_LIBS="$LIBS"
13865         for curlib in none ws2_32 wsock32; do
13866                 if test $curlib != none ; then
13867                 LIBS="$save_LIBS -l$curlib"
13868                 fi
13869                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13870 /* end confdefs.h.  */
13871 #include <winsock.h>
13872
13873 int
13874 main ()
13875 {
13876
13877                         socket(0,0,0);
13878                         select(0,NULL,NULL,NULL,NULL);
13879                         closesocket(0);
13880                         gethostname(NULL,0);
13881
13882   ;
13883   return 0;
13884 }
13885 _ACEOF
13886 if ac_fn_c_try_link "$LINENO"; then :
13887   ol_cv_winsock=$curlib
13888 else
13889   ol_cv_winsock=no
13890 fi
13891 rm -f core conftest.err conftest.$ac_objext \
13892     conftest$ac_exeext conftest.$ac_ext
13893
13894                 test "$ol_cv_winsock" != no && break
13895         done
13896         LIBS="$save_LIBS"
13897
13898 fi
13899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_winsock" >&5
13900 $as_echo "$ol_cv_winsock" >&6; }
13901
13902         if test $ol_cv_winsock != no ; then
13903
13904 $as_echo "#define HAVE_WINSOCK 1" >>confdefs.h
13905
13906         ac_cv_func_socket=yes
13907         ac_cv_func_select=yes
13908         ac_cv_func_closesocket=yes
13909         ac_cv_func_gethostname=yes
13910
13911                 if test $ol_cv_winsock != none -a $ol_cv_winsock != yes ; then
13912                 LIBS="$LIBS -l$ol_cv_winsock"
13913                 fi
13914
13915         if test $ol_cv_winsock = ws2_32 -o $ol_cv_winsock = yes ; then
13916
13917 $as_echo "#define HAVE_WINSOCK2 1" >>confdefs.h
13918
13919         fi
13920         fi
13921 fi
13922
13923
13924 ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13925 if test "x$ac_cv_func_socket" = xyes; then :
13926   :
13927 else
13928
13929         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
13930 $as_echo_n "checking for main in -lsocket... " >&6; }
13931 if ${ac_cv_lib_socket_main+:} false; then :
13932   $as_echo_n "(cached) " >&6
13933 else
13934   ac_check_lib_save_LIBS=$LIBS
13935 LIBS="-lsocket  $LIBS"
13936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13937 /* end confdefs.h.  */
13938
13939
13940 int
13941 main ()
13942 {
13943 return main ();
13944   ;
13945   return 0;
13946 }
13947 _ACEOF
13948 if ac_fn_c_try_link "$LINENO"; then :
13949   ac_cv_lib_socket_main=yes
13950 else
13951   ac_cv_lib_socket_main=no
13952 fi
13953 rm -f core conftest.err conftest.$ac_objext \
13954     conftest$ac_exeext conftest.$ac_ext
13955 LIBS=$ac_check_lib_save_LIBS
13956 fi
13957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
13958 $as_echo "$ac_cv_lib_socket_main" >&6; }
13959 if test "x$ac_cv_lib_socket_main" = xyes; then :
13960   cat >>confdefs.h <<_ACEOF
13961 #define HAVE_LIBSOCKET 1
13962 _ACEOF
13963
13964   LIBS="-lsocket $LIBS"
13965
13966 fi
13967
13968         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
13969 $as_echo_n "checking for socket in -lnet... " >&6; }
13970 if ${ac_cv_lib_net_socket+:} false; then :
13971   $as_echo_n "(cached) " >&6
13972 else
13973   ac_check_lib_save_LIBS=$LIBS
13974 LIBS="-lnet  $LIBS"
13975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13976 /* end confdefs.h.  */
13977
13978 /* Override any GCC internal prototype to avoid an error.
13979    Use char because int might match the return type of a GCC
13980    builtin and then its argument prototype would still apply.  */
13981 #ifdef __cplusplus
13982 extern "C"
13983 #endif
13984 char socket ();
13985 int
13986 main ()
13987 {
13988 return socket ();
13989   ;
13990   return 0;
13991 }
13992 _ACEOF
13993 if ac_fn_c_try_link "$LINENO"; then :
13994   ac_cv_lib_net_socket=yes
13995 else
13996   ac_cv_lib_net_socket=no
13997 fi
13998 rm -f core conftest.err conftest.$ac_objext \
13999     conftest$ac_exeext conftest.$ac_ext
14000 LIBS=$ac_check_lib_save_LIBS
14001 fi
14002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
14003 $as_echo "$ac_cv_lib_net_socket" >&6; }
14004 if test "x$ac_cv_lib_net_socket" = xyes; then :
14005   cat >>confdefs.h <<_ACEOF
14006 #define HAVE_LIBNET 1
14007 _ACEOF
14008
14009   LIBS="-lnet $LIBS"
14010
14011 fi
14012
14013         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl_s" >&5
14014 $as_echo_n "checking for main in -lnsl_s... " >&6; }
14015 if ${ac_cv_lib_nsl_s_main+:} false; then :
14016   $as_echo_n "(cached) " >&6
14017 else
14018   ac_check_lib_save_LIBS=$LIBS
14019 LIBS="-lnsl_s  $LIBS"
14020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14021 /* end confdefs.h.  */
14022
14023
14024 int
14025 main ()
14026 {
14027 return main ();
14028   ;
14029   return 0;
14030 }
14031 _ACEOF
14032 if ac_fn_c_try_link "$LINENO"; then :
14033   ac_cv_lib_nsl_s_main=yes
14034 else
14035   ac_cv_lib_nsl_s_main=no
14036 fi
14037 rm -f core conftest.err conftest.$ac_objext \
14038     conftest$ac_exeext conftest.$ac_ext
14039 LIBS=$ac_check_lib_save_LIBS
14040 fi
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_s_main" >&5
14042 $as_echo "$ac_cv_lib_nsl_s_main" >&6; }
14043 if test "x$ac_cv_lib_nsl_s_main" = xyes; then :
14044   cat >>confdefs.h <<_ACEOF
14045 #define HAVE_LIBNSL_S 1
14046 _ACEOF
14047
14048   LIBS="-lnsl_s $LIBS"
14049
14050 fi
14051
14052         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5
14053 $as_echo_n "checking for main in -lnsl... " >&6; }
14054 if ${ac_cv_lib_nsl_main+:} false; then :
14055   $as_echo_n "(cached) " >&6
14056 else
14057   ac_check_lib_save_LIBS=$LIBS
14058 LIBS="-lnsl  $LIBS"
14059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14060 /* end confdefs.h.  */
14061
14062
14063 int
14064 main ()
14065 {
14066 return main ();
14067   ;
14068   return 0;
14069 }
14070 _ACEOF
14071 if ac_fn_c_try_link "$LINENO"; then :
14072   ac_cv_lib_nsl_main=yes
14073 else
14074   ac_cv_lib_nsl_main=no
14075 fi
14076 rm -f core conftest.err conftest.$ac_objext \
14077     conftest$ac_exeext conftest.$ac_ext
14078 LIBS=$ac_check_lib_save_LIBS
14079 fi
14080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5
14081 $as_echo "$ac_cv_lib_nsl_main" >&6; }
14082 if test "x$ac_cv_lib_nsl_main" = xyes; then :
14083   cat >>confdefs.h <<_ACEOF
14084 #define HAVE_LIBNSL 1
14085 _ACEOF
14086
14087   LIBS="-lnsl $LIBS"
14088
14089 fi
14090
14091         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -linet" >&5
14092 $as_echo_n "checking for socket in -linet... " >&6; }
14093 if ${ac_cv_lib_inet_socket+:} false; then :
14094   $as_echo_n "(cached) " >&6
14095 else
14096   ac_check_lib_save_LIBS=$LIBS
14097 LIBS="-linet  $LIBS"
14098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14099 /* end confdefs.h.  */
14100
14101 /* Override any GCC internal prototype to avoid an error.
14102    Use char because int might match the return type of a GCC
14103    builtin and then its argument prototype would still apply.  */
14104 #ifdef __cplusplus
14105 extern "C"
14106 #endif
14107 char socket ();
14108 int
14109 main ()
14110 {
14111 return socket ();
14112   ;
14113   return 0;
14114 }
14115 _ACEOF
14116 if ac_fn_c_try_link "$LINENO"; then :
14117   ac_cv_lib_inet_socket=yes
14118 else
14119   ac_cv_lib_inet_socket=no
14120 fi
14121 rm -f core conftest.err conftest.$ac_objext \
14122     conftest$ac_exeext conftest.$ac_ext
14123 LIBS=$ac_check_lib_save_LIBS
14124 fi
14125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_socket" >&5
14126 $as_echo "$ac_cv_lib_inet_socket" >&6; }
14127 if test "x$ac_cv_lib_inet_socket" = xyes; then :
14128   cat >>confdefs.h <<_ACEOF
14129 #define HAVE_LIBINET 1
14130 _ACEOF
14131
14132   LIBS="-linet $LIBS"
14133
14134 fi
14135
14136         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgen" >&5
14137 $as_echo_n "checking for main in -lgen... " >&6; }
14138 if ${ac_cv_lib_gen_main+:} false; then :
14139   $as_echo_n "(cached) " >&6
14140 else
14141   ac_check_lib_save_LIBS=$LIBS
14142 LIBS="-lgen  $LIBS"
14143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14144 /* end confdefs.h.  */
14145
14146
14147 int
14148 main ()
14149 {
14150 return main ();
14151   ;
14152   return 0;
14153 }
14154 _ACEOF
14155 if ac_fn_c_try_link "$LINENO"; then :
14156   ac_cv_lib_gen_main=yes
14157 else
14158   ac_cv_lib_gen_main=no
14159 fi
14160 rm -f core conftest.err conftest.$ac_objext \
14161     conftest$ac_exeext conftest.$ac_ext
14162 LIBS=$ac_check_lib_save_LIBS
14163 fi
14164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_main" >&5
14165 $as_echo "$ac_cv_lib_gen_main" >&6; }
14166 if test "x$ac_cv_lib_gen_main" = xyes; then :
14167   cat >>confdefs.h <<_ACEOF
14168 #define HAVE_LIBGEN 1
14169 _ACEOF
14170
14171   LIBS="-lgen $LIBS"
14172
14173 fi
14174
14175
14176 fi
14177
14178
14179 ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
14180 if test "x$ac_cv_func_select" = xyes; then :
14181   :
14182 else
14183   as_fn_error $? "select() required." "$LINENO" 5
14184 fi
14185
14186
14187 if test "${ac_cv_header_winsock_h}" != yes; then
14188                                 for ac_header in sys/select.h sys/socket.h
14189 do :
14190   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14191 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14192 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14193   cat >>confdefs.h <<_ACEOF
14194 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14195 _ACEOF
14196
14197 fi
14198
14199 done
14200
14201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
14202 $as_echo_n "checking types of arguments for select... " >&6; }
14203 if ${ac_cv_func_select_args+:} false; then :
14204   $as_echo_n "(cached) " >&6
14205 else
14206   for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
14207  for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
14208   for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
14209    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14210 /* end confdefs.h.  */
14211 $ac_includes_default
14212 #ifdef HAVE_SYS_SELECT_H
14213 # include <sys/select.h>
14214 #endif
14215 #ifdef HAVE_SYS_SOCKET_H
14216 # include <sys/socket.h>
14217 #endif
14218
14219 int
14220 main ()
14221 {
14222 extern int select ($ac_arg1,
14223                                             $ac_arg234, $ac_arg234, $ac_arg234,
14224                                             $ac_arg5);
14225   ;
14226   return 0;
14227 }
14228 _ACEOF
14229 if ac_fn_c_try_compile "$LINENO"; then :
14230   ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
14231 fi
14232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14233   done
14234  done
14235 done
14236 # Provide a safe default value.
14237 : "${ac_cv_func_select_args=int,int *,struct timeval *}"
14238
14239 fi
14240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
14241 $as_echo "$ac_cv_func_select_args" >&6; }
14242 ac_save_IFS=$IFS; IFS=','
14243 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
14244 IFS=$ac_save_IFS
14245 shift
14246
14247 cat >>confdefs.h <<_ACEOF
14248 #define SELECT_TYPE_ARG1 $1
14249 _ACEOF
14250
14251
14252 cat >>confdefs.h <<_ACEOF
14253 #define SELECT_TYPE_ARG234 ($2)
14254 _ACEOF
14255
14256
14257 cat >>confdefs.h <<_ACEOF
14258 #define SELECT_TYPE_ARG5 ($3)
14259 _ACEOF
14260
14261 rm -f conftest*
14262
14263 fi
14264
14265
14266 for ac_func in poll
14267 do :
14268   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14269 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14270 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14271   cat >>confdefs.h <<_ACEOF
14272 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14273 _ACEOF
14274
14275 fi
14276 done
14277
14278 if test $ac_cv_func_poll = yes; then
14279 for ac_header in poll.h sys/poll.h
14280 do :
14281   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14282 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14283 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14284   cat >>confdefs.h <<_ACEOF
14285 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14286 _ACEOF
14287
14288 fi
14289
14290 done
14291
14292 fi
14293
14294 for ac_header in sys/epoll.h
14295 do :
14296   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14297 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14298 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14299   cat >>confdefs.h <<_ACEOF
14300 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14301 _ACEOF
14302
14303 fi
14304
14305 done
14306
14307 if test "${ac_cv_header_sys_epoll_h}" = yes; then
14308         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll system call" >&5
14309 $as_echo_n "checking for epoll system call... " >&6; }
14310         if test "$cross_compiling" = yes; then :
14311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14312 $as_echo "no" >&6; }
14313 else
14314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14315 /* end confdefs.h.  */
14316 int main(int argc, char **argv)
14317 {
14318         int epfd = epoll_create(256);
14319         exit (epfd == -1 ? 1 : 0);
14320 }
14321 _ACEOF
14322 if ac_fn_c_try_run "$LINENO"; then :
14323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14324 $as_echo "yes" >&6; }
14325
14326 $as_echo "#define HAVE_EPOLL 1" >>confdefs.h
14327
14328 else
14329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14330 $as_echo "no" >&6; }
14331 fi
14332 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14333   conftest.$ac_objext conftest.beam conftest.$ac_ext
14334 fi
14335
14336 fi
14337
14338 for ac_header in sys/devpoll.h
14339 do :
14340   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14341 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14342 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14343   cat >>confdefs.h <<_ACEOF
14344 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14345 _ACEOF
14346
14347 fi
14348
14349 done
14350
14351 if test "${ac_cv_header_sys_devpoll_h}" = yes \
14352                 -a "${ac_cv_header_poll_h}" = yes ; \
14353 then
14354         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/poll" >&5
14355 $as_echo_n "checking for /dev/poll... " >&6; }
14356         if test "$cross_compiling" = yes; then :
14357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14358 $as_echo "no" >&6; }
14359 else
14360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14361 /* end confdefs.h.  */
14362 int main(int argc, char **argv)
14363 {
14364         int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
14365         exit (devpollfd == -1 ? 1 : 0);
14366 }
14367 _ACEOF
14368 if ac_fn_c_try_run "$LINENO"; then :
14369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14370 $as_echo "yes" >&6; }
14371
14372 $as_echo "#define HAVE_DEVPOLL 1" >>confdefs.h
14373
14374 else
14375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14376 $as_echo "no" >&6; }
14377 fi
14378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14379   conftest.$ac_objext conftest.beam conftest.$ac_ext
14380 fi
14381
14382 fi
14383
14384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14385 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14386 if ${ol_cv_dcl_sys_errlist+:} false; then :
14387   $as_echo_n "(cached) " >&6
14388 else
14389
14390         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14391 /* end confdefs.h.  */
14392
14393 #include <stdio.h>
14394 #include <sys/types.h>
14395 #include <errno.h>
14396 #ifdef _WIN32
14397 #include <stdlib.h>
14398 #endif
14399 int
14400 main ()
14401 {
14402 char *c = (char *) *sys_errlist
14403   ;
14404   return 0;
14405 }
14406 _ACEOF
14407 if ac_fn_c_try_compile "$LINENO"; then :
14408   ol_cv_dcl_sys_errlist=yes
14409         ol_cv_have_sys_errlist=yes
14410 else
14411   ol_cv_dcl_sys_errlist=no
14412 fi
14413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14414 fi
14415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14416 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14417 #
14418 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14419 if test $ol_cv_dcl_sys_errlist = no ; then
14420
14421 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14422
14423
14424         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14425 $as_echo_n "checking existence of sys_errlist... " >&6; }
14426 if ${ol_cv_have_sys_errlist+:} false; then :
14427   $as_echo_n "(cached) " >&6
14428 else
14429
14430                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14431 /* end confdefs.h.  */
14432 #include <errno.h>
14433 int
14434 main ()
14435 {
14436 char *c = (char *) *sys_errlist
14437   ;
14438   return 0;
14439 }
14440 _ACEOF
14441 if ac_fn_c_try_link "$LINENO"; then :
14442   ol_cv_have_sys_errlist=yes
14443 else
14444   ol_cv_have_sys_errlist=no
14445 fi
14446 rm -f core conftest.err conftest.$ac_objext \
14447     conftest$ac_exeext conftest.$ac_ext
14448 fi
14449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14450 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14451 fi
14452 if test $ol_cv_have_sys_errlist = yes ; then
14453
14454 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14455
14456 fi
14457  for ac_func in strerror strerror_r
14458 do :
14459   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14460 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14461 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14462   cat >>confdefs.h <<_ACEOF
14463 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14464 _ACEOF
14465
14466 fi
14467 done
14468
14469 ol_cv_func_strerror_r=no
14470 if test "${ac_cv_func_strerror_r}" = yes ; then
14471         { $as_echo "$as_me:${as_lineno-$LINENO}: checking non-posix strerror_r" >&5
14472 $as_echo_n "checking non-posix strerror_r... " >&6; }
14473 if ${ol_cv_nonposix_strerror_r+:} false; then :
14474   $as_echo_n "(cached) " >&6
14475 else
14476
14477         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14478 /* end confdefs.h.  */
14479 #include <string.h>
14480 _ACEOF
14481 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14482   $EGREP "strerror_r" >/dev/null 2>&1; then :
14483   ol_decl_strerror_r=yes
14484 else
14485   ol_decl_strerror_r=no
14486 fi
14487 rm -f conftest*
14488
14489         if test $ol_decl_strerror_r = yes ; then
14490                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14491 /* end confdefs.h.  */
14492 #include <string.h>
14493 int
14494 main ()
14495 {
14496    /* from autoconf 2.59 */
14497                                 char buf[100];
14498                                 char x = *strerror_r (0, buf, sizeof buf);
14499                                 char *p = strerror_r (0, buf, sizeof buf);
14500
14501   ;
14502   return 0;
14503 }
14504 _ACEOF
14505 if ac_fn_c_try_compile "$LINENO"; then :
14506   ol_cv_nonposix_strerror_r=yes
14507 else
14508   ol_cv_nonposix_strerror_r=no
14509 fi
14510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14511         else
14512                 if test "$cross_compiling" = yes; then :
14513   ol_cv_nonposix_strerror=no
14514 else
14515   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14516 /* end confdefs.h.  */
14517
14518                         main() {
14519                                 char buf[100];
14520                                 buf[0] = 0;
14521                                 strerror_r( 1, buf, sizeof buf );
14522                                 exit( buf[0] == 0 );
14523                         }
14524
14525 _ACEOF
14526 if ac_fn_c_try_run "$LINENO"; then :
14527   ol_cv_nonposix_strerror_r=yes
14528 else
14529   ol_cv_nonposix_strerror=no
14530 fi
14531 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14532   conftest.$ac_objext conftest.beam conftest.$ac_ext
14533 fi
14534
14535         fi
14536
14537 fi
14538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_nonposix_strerror_r" >&5
14539 $as_echo "$ol_cv_nonposix_strerror_r" >&6; }
14540 if test $ol_cv_nonposix_strerror_r = yes ; then
14541
14542 $as_echo "#define HAVE_NONPOSIX_STRERROR_R 1" >>confdefs.h
14543
14544 fi
14545
14546 elif test "${ac_cv_func_strerror}" = no ; then
14547         { $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14548 $as_echo_n "checking declaration of sys_errlist... " >&6; }
14549 if ${ol_cv_dcl_sys_errlist+:} false; then :
14550   $as_echo_n "(cached) " >&6
14551 else
14552
14553         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14554 /* end confdefs.h.  */
14555
14556 #include <stdio.h>
14557 #include <sys/types.h>
14558 #include <errno.h>
14559 #ifdef _WIN32
14560 #include <stdlib.h>
14561 #endif
14562 int
14563 main ()
14564 {
14565 char *c = (char *) *sys_errlist
14566   ;
14567   return 0;
14568 }
14569 _ACEOF
14570 if ac_fn_c_try_compile "$LINENO"; then :
14571   ol_cv_dcl_sys_errlist=yes
14572         ol_cv_have_sys_errlist=yes
14573 else
14574   ol_cv_dcl_sys_errlist=no
14575 fi
14576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14577 fi
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14579 $as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14580 #
14581 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14582 if test $ol_cv_dcl_sys_errlist = no ; then
14583
14584 $as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14585
14586
14587         { $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14588 $as_echo_n "checking existence of sys_errlist... " >&6; }
14589 if ${ol_cv_have_sys_errlist+:} false; then :
14590   $as_echo_n "(cached) " >&6
14591 else
14592
14593                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14594 /* end confdefs.h.  */
14595 #include <errno.h>
14596 int
14597 main ()
14598 {
14599 char *c = (char *) *sys_errlist
14600   ;
14601   return 0;
14602 }
14603 _ACEOF
14604 if ac_fn_c_try_link "$LINENO"; then :
14605   ol_cv_have_sys_errlist=yes
14606 else
14607   ol_cv_have_sys_errlist=no
14608 fi
14609 rm -f core conftest.err conftest.$ac_objext \
14610     conftest$ac_exeext conftest.$ac_ext
14611 fi
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14613 $as_echo "$ol_cv_have_sys_errlist" >&6; }
14614 fi
14615 if test $ol_cv_have_sys_errlist = yes ; then
14616
14617 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14618
14619 fi
14620
14621 fi
14622
14623
14624 for ac_header in regex.h
14625 do :
14626   ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default
14627 #ifdef HAVE_SYS_TYPES_H
14628 #include <sys/types.h>
14629 #endif
14630
14631 "
14632 if test "x$ac_cv_header_regex_h" = xyes; then :
14633   cat >>confdefs.h <<_ACEOF
14634 #define HAVE_REGEX_H 1
14635 _ACEOF
14636
14637 fi
14638
14639 done
14640
14641
14642 if test "$ac_cv_header_regex_h" != yes ; then
14643         as_fn_error $? "POSIX regex.h required." "$LINENO" 5
14644 fi
14645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing regfree" >&5
14646 $as_echo_n "checking for library containing regfree... " >&6; }
14647 if ${ac_cv_search_regfree+:} false; then :
14648   $as_echo_n "(cached) " >&6
14649 else
14650   ac_func_search_save_LIBS=$LIBS
14651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14652 /* end confdefs.h.  */
14653
14654 /* Override any GCC internal prototype to avoid an error.
14655    Use char because int might match the return type of a GCC
14656    builtin and then its argument prototype would still apply.  */
14657 #ifdef __cplusplus
14658 extern "C"
14659 #endif
14660 char regfree ();
14661 int
14662 main ()
14663 {
14664 return regfree ();
14665   ;
14666   return 0;
14667 }
14668 _ACEOF
14669 for ac_lib in '' regex gnuregex; do
14670   if test -z "$ac_lib"; then
14671     ac_res="none required"
14672   else
14673     ac_res=-l$ac_lib
14674     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14675   fi
14676   if ac_fn_c_try_link "$LINENO"; then :
14677   ac_cv_search_regfree=$ac_res
14678 fi
14679 rm -f core conftest.err conftest.$ac_objext \
14680     conftest$ac_exeext
14681   if ${ac_cv_search_regfree+:} false; then :
14682   break
14683 fi
14684 done
14685 if ${ac_cv_search_regfree+:} false; then :
14686
14687 else
14688   ac_cv_search_regfree=no
14689 fi
14690 rm conftest.$ac_ext
14691 LIBS=$ac_func_search_save_LIBS
14692 fi
14693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_regfree" >&5
14694 $as_echo "$ac_cv_search_regfree" >&6; }
14695 ac_res=$ac_cv_search_regfree
14696 if test "$ac_res" != no; then :
14697   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14698   :
14699 else
14700   as_fn_error $? "POSIX regex required." "$LINENO" 5
14701 fi
14702
14703
14704
14705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible POSIX regex" >&5
14706 $as_echo_n "checking for compatible POSIX regex... " >&6; }
14707 if ${ol_cv_c_posix_regex+:} false; then :
14708   $as_echo_n "(cached) " >&6
14709 else
14710
14711         if test "$cross_compiling" = yes; then :
14712   ol_cv_c_posix_regex=cross
14713 else
14714   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14715 /* end confdefs.h.  */
14716
14717 #include <sys/types.h>
14718 #include <regex.h>
14719 static char *pattern, *string;
14720 main()
14721 {
14722         int rc;
14723         regex_t re;
14724
14725         pattern = "^A";
14726
14727         if(regcomp(&re, pattern, 0)) {
14728                 return -1;
14729         }
14730
14731         string = "ALL MATCH";
14732
14733         rc = regexec(&re, string, 0, (void*)0, 0);
14734
14735         regfree(&re);
14736
14737         return rc;
14738 }
14739 _ACEOF
14740 if ac_fn_c_try_run "$LINENO"; then :
14741   ol_cv_c_posix_regex=yes
14742 else
14743   ol_cv_c_posix_regex=no
14744 fi
14745 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14746   conftest.$ac_objext conftest.beam conftest.$ac_ext
14747 fi
14748
14749 fi
14750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_posix_regex" >&5
14751 $as_echo "$ol_cv_c_posix_regex" >&6; }
14752
14753 if test "$ol_cv_c_posix_regex" = no ; then
14754         as_fn_error $? "broken POSIX regex!" "$LINENO" 5
14755 fi
14756
14757
14758 have_uuid=no
14759 for ac_header in sys/uuid.h
14760 do :
14761   ac_fn_c_check_header_mongrel "$LINENO" "sys/uuid.h" "ac_cv_header_sys_uuid_h" "$ac_includes_default"
14762 if test "x$ac_cv_header_sys_uuid_h" = xyes; then :
14763   cat >>confdefs.h <<_ACEOF
14764 #define HAVE_SYS_UUID_H 1
14765 _ACEOF
14766
14767 fi
14768
14769 done
14770
14771 if test $ac_cv_header_sys_uuid_h = yes ; then
14772         save_LIBS="$LIBS"
14773         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_to_str" >&5
14774 $as_echo_n "checking for library containing uuid_to_str... " >&6; }
14775 if ${ac_cv_search_uuid_to_str+:} false; then :
14776   $as_echo_n "(cached) " >&6
14777 else
14778   ac_func_search_save_LIBS=$LIBS
14779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14780 /* end confdefs.h.  */
14781
14782 /* Override any GCC internal prototype to avoid an error.
14783    Use char because int might match the return type of a GCC
14784    builtin and then its argument prototype would still apply.  */
14785 #ifdef __cplusplus
14786 extern "C"
14787 #endif
14788 char uuid_to_str ();
14789 int
14790 main ()
14791 {
14792 return uuid_to_str ();
14793   ;
14794   return 0;
14795 }
14796 _ACEOF
14797 for ac_lib in '' uuid; do
14798   if test -z "$ac_lib"; then
14799     ac_res="none required"
14800   else
14801     ac_res=-l$ac_lib
14802     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14803   fi
14804   if ac_fn_c_try_link "$LINENO"; then :
14805   ac_cv_search_uuid_to_str=$ac_res
14806 fi
14807 rm -f core conftest.err conftest.$ac_objext \
14808     conftest$ac_exeext
14809   if ${ac_cv_search_uuid_to_str+:} false; then :
14810   break
14811 fi
14812 done
14813 if ${ac_cv_search_uuid_to_str+:} false; then :
14814
14815 else
14816   ac_cv_search_uuid_to_str=no
14817 fi
14818 rm conftest.$ac_ext
14819 LIBS=$ac_func_search_save_LIBS
14820 fi
14821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_to_str" >&5
14822 $as_echo "$ac_cv_search_uuid_to_str" >&6; }
14823 ac_res=$ac_cv_search_uuid_to_str
14824 if test "$ac_res" != no; then :
14825   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14826   have_uuid=yes
14827 else
14828   :
14829 fi
14830
14831         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_create" >&5
14832 $as_echo_n "checking for library containing uuid_create... " >&6; }
14833 if ${ac_cv_search_uuid_create+:} false; then :
14834   $as_echo_n "(cached) " >&6
14835 else
14836   ac_func_search_save_LIBS=$LIBS
14837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14838 /* end confdefs.h.  */
14839
14840 /* Override any GCC internal prototype to avoid an error.
14841    Use char because int might match the return type of a GCC
14842    builtin and then its argument prototype would still apply.  */
14843 #ifdef __cplusplus
14844 extern "C"
14845 #endif
14846 char uuid_create ();
14847 int
14848 main ()
14849 {
14850 return uuid_create ();
14851   ;
14852   return 0;
14853 }
14854 _ACEOF
14855 for ac_lib in '' uuid; do
14856   if test -z "$ac_lib"; then
14857     ac_res="none required"
14858   else
14859     ac_res=-l$ac_lib
14860     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14861   fi
14862   if ac_fn_c_try_link "$LINENO"; then :
14863   ac_cv_search_uuid_create=$ac_res
14864 fi
14865 rm -f core conftest.err conftest.$ac_objext \
14866     conftest$ac_exeext
14867   if ${ac_cv_search_uuid_create+:} false; then :
14868   break
14869 fi
14870 done
14871 if ${ac_cv_search_uuid_create+:} false; then :
14872
14873 else
14874   ac_cv_search_uuid_create=no
14875 fi
14876 rm conftest.$ac_ext
14877 LIBS=$ac_func_search_save_LIBS
14878 fi
14879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_create" >&5
14880 $as_echo "$ac_cv_search_uuid_create" >&6; }
14881 ac_res=$ac_cv_search_uuid_create
14882 if test "$ac_res" != no; then :
14883   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14884   :
14885 else
14886   have_uuid=no
14887 fi
14888
14889         LIBS="$save_LIBS"
14890
14891         if test $have_uuid = yes ; then
14892
14893 $as_echo "#define HAVE_UUID_TO_STR 1" >>confdefs.h
14894
14895
14896                 test "$ac_cv_search_uuid_to_str" = "none required" || \
14897                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
14898         fi
14899 fi
14900
14901 if test $have_uuid = no ; then
14902         for ac_header in uuid/uuid.h
14903 do :
14904   ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14905 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
14906   cat >>confdefs.h <<_ACEOF
14907 #define HAVE_UUID_UUID_H 1
14908 _ACEOF
14909
14910 fi
14911
14912 done
14913
14914         if test $ac_cv_header_uuid_uuid_h = yes ; then
14915                 save_LIBS="$LIBS"
14916                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
14917 $as_echo_n "checking for library containing uuid_generate... " >&6; }
14918 if ${ac_cv_search_uuid_generate+:} false; then :
14919   $as_echo_n "(cached) " >&6
14920 else
14921   ac_func_search_save_LIBS=$LIBS
14922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14923 /* end confdefs.h.  */
14924
14925 /* Override any GCC internal prototype to avoid an error.
14926    Use char because int might match the return type of a GCC
14927    builtin and then its argument prototype would still apply.  */
14928 #ifdef __cplusplus
14929 extern "C"
14930 #endif
14931 char uuid_generate ();
14932 int
14933 main ()
14934 {
14935 return uuid_generate ();
14936   ;
14937   return 0;
14938 }
14939 _ACEOF
14940 for ac_lib in '' uuid; do
14941   if test -z "$ac_lib"; then
14942     ac_res="none required"
14943   else
14944     ac_res=-l$ac_lib
14945     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14946   fi
14947   if ac_fn_c_try_link "$LINENO"; then :
14948   ac_cv_search_uuid_generate=$ac_res
14949 fi
14950 rm -f core conftest.err conftest.$ac_objext \
14951     conftest$ac_exeext
14952   if ${ac_cv_search_uuid_generate+:} false; then :
14953   break
14954 fi
14955 done
14956 if ${ac_cv_search_uuid_generate+:} false; then :
14957
14958 else
14959   ac_cv_search_uuid_generate=no
14960 fi
14961 rm conftest.$ac_ext
14962 LIBS=$ac_func_search_save_LIBS
14963 fi
14964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
14965 $as_echo "$ac_cv_search_uuid_generate" >&6; }
14966 ac_res=$ac_cv_search_uuid_generate
14967 if test "$ac_res" != no; then :
14968   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14969   have_uuid=yes
14970 else
14971   :
14972 fi
14973
14974                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_unparse_lower" >&5
14975 $as_echo_n "checking for library containing uuid_unparse_lower... " >&6; }
14976 if ${ac_cv_search_uuid_unparse_lower+:} false; then :
14977   $as_echo_n "(cached) " >&6
14978 else
14979   ac_func_search_save_LIBS=$LIBS
14980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14981 /* end confdefs.h.  */
14982
14983 /* Override any GCC internal prototype to avoid an error.
14984    Use char because int might match the return type of a GCC
14985    builtin and then its argument prototype would still apply.  */
14986 #ifdef __cplusplus
14987 extern "C"
14988 #endif
14989 char uuid_unparse_lower ();
14990 int
14991 main ()
14992 {
14993 return uuid_unparse_lower ();
14994   ;
14995   return 0;
14996 }
14997 _ACEOF
14998 for ac_lib in '' uuid; do
14999   if test -z "$ac_lib"; then
15000     ac_res="none required"
15001   else
15002     ac_res=-l$ac_lib
15003     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15004   fi
15005   if ac_fn_c_try_link "$LINENO"; then :
15006   ac_cv_search_uuid_unparse_lower=$ac_res
15007 fi
15008 rm -f core conftest.err conftest.$ac_objext \
15009     conftest$ac_exeext
15010   if ${ac_cv_search_uuid_unparse_lower+:} false; then :
15011   break
15012 fi
15013 done
15014 if ${ac_cv_search_uuid_unparse_lower+:} false; then :
15015
15016 else
15017   ac_cv_search_uuid_unparse_lower=no
15018 fi
15019 rm conftest.$ac_ext
15020 LIBS=$ac_func_search_save_LIBS
15021 fi
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_unparse_lower" >&5
15023 $as_echo "$ac_cv_search_uuid_unparse_lower" >&6; }
15024 ac_res=$ac_cv_search_uuid_unparse_lower
15025 if test "$ac_res" != no; then :
15026   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15027   :
15028 else
15029   have_uuid=no
15030 fi
15031
15032                 LIBS="$save_LIBS"
15033
15034                 if test $have_uuid = yes ; then
15035
15036 $as_echo "#define HAVE_UUID_GENERATE 1" >>confdefs.h
15037
15038
15039                         test "$ac_cv_search_uuid_generate" = "none required" || \
15040                                 SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_generate"
15041                 fi
15042         fi
15043 fi
15044
15045 if test $have_uuid = no ; then
15046         { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
15047 $as_echo_n "checking to see if -lrpcrt4 is needed for win32 UUID support... " >&6; }
15048         save_LIBS="$LIBS"
15049         LIBS="$LIBS -lrpcrt4"
15050         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15051 /* end confdefs.h.  */
15052
15053                 int __stdcall UuidCreate(void *);
15054                 int __stdcall UuidToStringA(void *,void **);
15055
15056 int
15057 main ()
15058 {
15059
15060                 UuidCreate(0);
15061                 UuidToStringA(0,0);
15062
15063   ;
15064   return 0;
15065 }
15066 _ACEOF
15067 if ac_fn_c_try_link "$LINENO"; then :
15068   need_rpcrt=yes
15069 else
15070   need_rpcrt=no
15071 fi
15072 rm -f core conftest.err conftest.$ac_objext \
15073     conftest$ac_exeext conftest.$ac_ext
15074         if test $need_rpcrt = yes; then
15075                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
15076         fi
15077         LIBS="$save_LIBS"
15078         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_rpcrt" >&5
15079 $as_echo "$need_rpcrt" >&6; }
15080 fi
15081
15082 ol_cv_lib_resolver=no
15083 if test $ol_cv_lib_resolver = no ; then
15084         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (default)" >&5
15085 $as_echo_n "checking for resolver link (default)... " >&6; }
15086 if ${ol_cv_resolver_none+:} false; then :
15087   $as_echo_n "(cached) " >&6
15088 else
15089
15090         ol_RESOLVER_LIB=
15091         ol_LIBS=$LIBS
15092         LIBS="$ol_RESOLVER_LIB $LIBS"
15093
15094         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15095 /* end confdefs.h.  */
15096
15097 #ifdef HAVE_SYS_TYPES_H
15098 #       include <sys/types.h>
15099 #endif
15100 #include <netinet/in.h>
15101 #ifdef HAVE_ARPA_NAMESER_H
15102 #       include <arpa/nameser.h>
15103 #endif
15104 #ifdef HAVE_RESOLV_H
15105 #       include <resolv.h>
15106 #endif
15107
15108 int
15109 main ()
15110 {
15111 {
15112         int len, status;
15113         char *request = NULL;
15114         unsigned char reply[64*1024];
15115         unsigned char host[64*1024];
15116         unsigned char *p;
15117
15118 #ifdef NS_HFIXEDSZ
15119         /* Bind 8/9 interface */
15120         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15121 #else
15122         /* Bind 4 interface */
15123 # ifndef T_SRV
15124 #  define T_SRV 33
15125 # endif
15126         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15127 #endif
15128         p = reply;
15129 #ifdef NS_HFIXEDSZ
15130         /* Bind 8/9 interface */
15131         p += NS_HFIXEDSZ;
15132 #elif defined(HFIXEDSZ)
15133         /* Bind 4 interface w/ HFIXEDSZ */
15134         p += HFIXEDSZ;
15135 #else
15136         /* Bind 4 interface w/o HFIXEDSZ */
15137         p += sizeof(HEADER);
15138 #endif
15139         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15140 }
15141   ;
15142   return 0;
15143 }
15144 _ACEOF
15145 if ac_fn_c_try_link "$LINENO"; then :
15146   ol_cv_resolver_none=yes
15147 else
15148   ol_cv_resolver_none=no
15149 fi
15150 rm -f core conftest.err conftest.$ac_objext \
15151     conftest$ac_exeext conftest.$ac_ext
15152
15153         LIBS="$ol_LIBS"
15154
15155 fi
15156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_none" >&5
15157 $as_echo "$ol_cv_resolver_none" >&6; }
15158
15159         if test $ol_cv_resolver_none = yes ; then
15160                 ol_cv_lib_resolver=yes
15161         fi
15162 fi
15163
15164 if test $ol_cv_lib_resolver = no ; then
15165         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lresolv)" >&5
15166 $as_echo_n "checking for resolver link (-lresolv)... " >&6; }
15167 if ${ol_cv_resolver_resolv+:} false; then :
15168   $as_echo_n "(cached) " >&6
15169 else
15170
15171         ol_RESOLVER_LIB=-lresolv
15172         ol_LIBS=$LIBS
15173         LIBS="$ol_RESOLVER_LIB $LIBS"
15174
15175         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15176 /* end confdefs.h.  */
15177
15178 #ifdef HAVE_SYS_TYPES_H
15179 #       include <sys/types.h>
15180 #endif
15181 #include <netinet/in.h>
15182 #ifdef HAVE_ARPA_NAMESER_H
15183 #       include <arpa/nameser.h>
15184 #endif
15185 #ifdef HAVE_RESOLV_H
15186 #       include <resolv.h>
15187 #endif
15188
15189 int
15190 main ()
15191 {
15192 {
15193         int len, status;
15194         char *request = NULL;
15195         unsigned char reply[64*1024];
15196         unsigned char host[64*1024];
15197         unsigned char *p;
15198
15199 #ifdef NS_HFIXEDSZ
15200         /* Bind 8/9 interface */
15201         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15202 #else
15203         /* Bind 4 interface */
15204 # ifndef T_SRV
15205 #  define T_SRV 33
15206 # endif
15207         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15208 #endif
15209         p = reply;
15210 #ifdef NS_HFIXEDSZ
15211         /* Bind 8/9 interface */
15212         p += NS_HFIXEDSZ;
15213 #elif defined(HFIXEDSZ)
15214         /* Bind 4 interface w/ HFIXEDSZ */
15215         p += HFIXEDSZ;
15216 #else
15217         /* Bind 4 interface w/o HFIXEDSZ */
15218         p += sizeof(HEADER);
15219 #endif
15220         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15221 }
15222   ;
15223   return 0;
15224 }
15225 _ACEOF
15226 if ac_fn_c_try_link "$LINENO"; then :
15227   ol_cv_resolver_resolv=yes
15228 else
15229   ol_cv_resolver_resolv=no
15230 fi
15231 rm -f core conftest.err conftest.$ac_objext \
15232     conftest$ac_exeext conftest.$ac_ext
15233
15234         LIBS="$ol_LIBS"
15235
15236 fi
15237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_resolv" >&5
15238 $as_echo "$ol_cv_resolver_resolv" >&6; }
15239
15240         if test $ol_cv_resolver_resolv = yes ; then
15241                 ol_cv_lib_resolver=-lresolv
15242         fi
15243 fi
15244
15245 if test $ol_cv_lib_resolver = no ; then
15246         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lbind)" >&5
15247 $as_echo_n "checking for resolver link (-lbind)... " >&6; }
15248 if ${ol_cv_resolver_bind+:} false; then :
15249   $as_echo_n "(cached) " >&6
15250 else
15251
15252         ol_RESOLVER_LIB=-lbind
15253         ol_LIBS=$LIBS
15254         LIBS="$ol_RESOLVER_LIB $LIBS"
15255
15256         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15257 /* end confdefs.h.  */
15258
15259 #ifdef HAVE_SYS_TYPES_H
15260 #       include <sys/types.h>
15261 #endif
15262 #include <netinet/in.h>
15263 #ifdef HAVE_ARPA_NAMESER_H
15264 #       include <arpa/nameser.h>
15265 #endif
15266 #ifdef HAVE_RESOLV_H
15267 #       include <resolv.h>
15268 #endif
15269
15270 int
15271 main ()
15272 {
15273 {
15274         int len, status;
15275         char *request = NULL;
15276         unsigned char reply[64*1024];
15277         unsigned char host[64*1024];
15278         unsigned char *p;
15279
15280 #ifdef NS_HFIXEDSZ
15281         /* Bind 8/9 interface */
15282         len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15283 #else
15284         /* Bind 4 interface */
15285 # ifndef T_SRV
15286 #  define T_SRV 33
15287 # endif
15288         len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15289 #endif
15290         p = reply;
15291 #ifdef NS_HFIXEDSZ
15292         /* Bind 8/9 interface */
15293         p += NS_HFIXEDSZ;
15294 #elif defined(HFIXEDSZ)
15295         /* Bind 4 interface w/ HFIXEDSZ */
15296         p += HFIXEDSZ;
15297 #else
15298         /* Bind 4 interface w/o HFIXEDSZ */
15299         p += sizeof(HEADER);
15300 #endif
15301         status = dn_expand( reply, reply+len, p, host, sizeof(host));
15302 }
15303   ;
15304   return 0;
15305 }
15306 _ACEOF
15307 if ac_fn_c_try_link "$LINENO"; then :
15308   ol_cv_resolver_bind=yes
15309 else
15310   ol_cv_resolver_bind=no
15311 fi
15312 rm -f core conftest.err conftest.$ac_objext \
15313     conftest$ac_exeext conftest.$ac_ext
15314
15315         LIBS="$ol_LIBS"
15316
15317 fi
15318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_bind" >&5
15319 $as_echo "$ol_cv_resolver_bind" >&6; }
15320
15321         if test $ol_cv_resolver_bind = yes ; then
15322                 ol_cv_lib_resolver=-lbind
15323         fi
15324 fi
15325
15326
15327
15328 ol_link_dnssrv=no
15329 if test "$ol_cv_lib_resolver" != no ; then
15330
15331 $as_echo "#define HAVE_RES_QUERY 1" >>confdefs.h
15332
15333
15334         if test "$ol_enable_dnssrv" != no ; then
15335                 ol_link_dnssrv=yes
15336         fi
15337
15338         if test "$ol_cv_lib_resolver" != yes ; then
15339                 LIBS="$ol_cv_lib_resolver $LIBS"
15340         fi
15341 fi
15342
15343 if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
15344         if test "$ol_link_dnssrv" = no ; then
15345                 as_fn_error $? "DNSSRV requires res_query()" "$LINENO" 5
15346         fi
15347 else
15348         ol_enable_dnssrv=no
15349 fi
15350
15351 for ac_func in hstrerror
15352 do :
15353   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15354 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15355 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15356   cat >>confdefs.h <<_ACEOF
15357 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15358 _ACEOF
15359
15360 fi
15361 done
15362
15363
15364 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
15365 do :
15366   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15367 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15368 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15369   cat >>confdefs.h <<_ACEOF
15370 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15371 _ACEOF
15372
15373 fi
15374 done
15375
15376
15377 ol_link_ipv6=no
15378 if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
15379         if test $ol_enable_ipv6 = yes ; then
15380                 as_fn_error $? "IPv6 support requires getaddrinfo() and inet_ntop()" "$LINENO" 5
15381         fi
15382 elif test $ol_enable_ipv6 != no ; then
15383         { $as_echo "$as_me:${as_lineno-$LINENO}: checking INET6_ADDRSTRLEN" >&5
15384 $as_echo_n "checking INET6_ADDRSTRLEN... " >&6; }
15385 if ${ol_cv_inet6_addrstrlen+:} false; then :
15386   $as_echo_n "(cached) " >&6
15387 else
15388
15389                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15390 /* end confdefs.h.  */
15391
15392 #                       include <netinet/in.h>
15393 #                       ifdef INET6_ADDRSTRLEN
15394                                 __has_inet6_addrstrlen__;
15395 #                       endif
15396
15397 _ACEOF
15398 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15399   $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then :
15400   ol_cv_inet6_addrstrlen=yes
15401 else
15402   ol_cv_inet6_addrstrlen=no
15403 fi
15404 rm -f conftest*
15405
15406 fi
15407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_inet6_addrstrlen" >&5
15408 $as_echo "$ol_cv_inet6_addrstrlen" >&6; }
15409
15410
15411         { $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr_storage" >&5
15412 $as_echo_n "checking struct sockaddr_storage... " >&6; }
15413 if ${ol_cv_struct_sockaddr_storage+:} false; then :
15414   $as_echo_n "(cached) " >&6
15415 else
15416
15417                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15418 /* end confdefs.h.  */
15419
15420 #include <sys/types.h>
15421 #include <sys/socket.h>
15422
15423 int
15424 main ()
15425 {
15426
15427                         struct sockaddr_storage ss;
15428
15429   ;
15430   return 0;
15431 }
15432 _ACEOF
15433 if ac_fn_c_try_compile "$LINENO"; then :
15434   ol_cv_struct_sockaddr_storage=yes
15435 else
15436   ol_cv_struct_sockaddr_storage=no
15437 fi
15438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15439 fi
15440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_struct_sockaddr_storage" >&5
15441 $as_echo "$ol_cv_struct_sockaddr_storage" >&6; }
15442
15443         if test $ol_cv_inet6_addrstrlen = yes &&
15444            test $ol_cv_struct_sockaddr_storage = yes ; then
15445                 ol_link_ipv6=yes
15446         elif test $ol_enable_ipv6 = yes &&
15447              test $ol_cv_inet6_addrstrlen = no ; then
15448                 as_fn_error $? "IPv6 support requires INET6_ADDRSTRLEN" "$LINENO" 5
15449         elif test $ol_enable_ipv6 = yes &&
15450              test $ol_cv_struct_sockaddr_storage = no ; then
15451                 as_fn_error $? "IPv6 support requires struct sockaddr_storage" "$LINENO" 5
15452         fi
15453 fi
15454
15455 if test $ol_enable_local != no ; then
15456         for ac_header in sys/un.h
15457 do :
15458   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15459 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15460 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15461   cat >>confdefs.h <<_ACEOF
15462 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15463 _ACEOF
15464
15465 fi
15466
15467 done
15468
15469
15470         if test $ol_enable_local = auto ; then
15471                 ol_enable_local=$ac_cv_header_sys_un_h
15472         elif test $ac_cv_header_sys_un_h = no ; then
15473                 as_fn_error $? "AF_LOCAL domain support requires sys/un.h" "$LINENO" 5
15474         fi
15475 fi
15476
15477
15478 if test $ol_with_tls = yes ; then
15479         ol_with_tls=auto
15480 fi
15481
15482 ol_link_tls=no
15483 if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
15484         for ac_header in openssl/ssl.h
15485 do :
15486   ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
15487 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
15488   cat >>confdefs.h <<_ACEOF
15489 #define HAVE_OPENSSL_SSL_H 1
15490 _ACEOF
15491
15492 fi
15493
15494 done
15495
15496
15497         if test $ac_cv_header_openssl_ssl_h = yes ; then
15498                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
15499 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
15500 if ${ac_cv_lib_ssl_SSL_library_init+:} false; then :
15501   $as_echo_n "(cached) " >&6
15502 else
15503   ac_check_lib_save_LIBS=$LIBS
15504 LIBS="-lssl -lcrypto $LIBS"
15505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15506 /* end confdefs.h.  */
15507
15508 /* Override any GCC internal prototype to avoid an error.
15509    Use char because int might match the return type of a GCC
15510    builtin and then its argument prototype would still apply.  */
15511 #ifdef __cplusplus
15512 extern "C"
15513 #endif
15514 char SSL_library_init ();
15515 int
15516 main ()
15517 {
15518 return SSL_library_init ();
15519   ;
15520   return 0;
15521 }
15522 _ACEOF
15523 if ac_fn_c_try_link "$LINENO"; then :
15524   ac_cv_lib_ssl_SSL_library_init=yes
15525 else
15526   ac_cv_lib_ssl_SSL_library_init=no
15527 fi
15528 rm -f core conftest.err conftest.$ac_objext \
15529     conftest$ac_exeext conftest.$ac_ext
15530 LIBS=$ac_check_lib_save_LIBS
15531 fi
15532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5
15533 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; }
15534 if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then :
15535   have_openssl=yes
15536                         need_rsaref=no
15537 else
15538   have_openssl=no
15539 fi
15540
15541
15542                 if test $have_openssl = no ; then
15543                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl3_accept in -lssl" >&5
15544 $as_echo_n "checking for ssl3_accept in -lssl... " >&6; }
15545 if ${ac_cv_lib_ssl_ssl3_accept+:} false; then :
15546   $as_echo_n "(cached) " >&6
15547 else
15548   ac_check_lib_save_LIBS=$LIBS
15549 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
15550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15551 /* end confdefs.h.  */
15552
15553 /* Override any GCC internal prototype to avoid an error.
15554    Use char because int might match the return type of a GCC
15555    builtin and then its argument prototype would still apply.  */
15556 #ifdef __cplusplus
15557 extern "C"
15558 #endif
15559 char ssl3_accept ();
15560 int
15561 main ()
15562 {
15563 return ssl3_accept ();
15564   ;
15565   return 0;
15566 }
15567 _ACEOF
15568 if ac_fn_c_try_link "$LINENO"; then :
15569   ac_cv_lib_ssl_ssl3_accept=yes
15570 else
15571   ac_cv_lib_ssl_ssl3_accept=no
15572 fi
15573 rm -f core conftest.err conftest.$ac_objext \
15574     conftest$ac_exeext conftest.$ac_ext
15575 LIBS=$ac_check_lib_save_LIBS
15576 fi
15577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_ssl3_accept" >&5
15578 $as_echo "$ac_cv_lib_ssl_ssl3_accept" >&6; }
15579 if test "x$ac_cv_lib_ssl_ssl3_accept" = xyes; then :
15580   have_openssl=yes
15581                                 need_rsaref=yes
15582 else
15583   have_openssl=no
15584 fi
15585
15586                 fi
15587
15588                 if test $have_openssl = yes ; then
15589                         ol_with_tls=openssl
15590                         ol_link_tls=yes
15591
15592
15593 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
15594
15595
15596                         if test $need_rsaref = yes; then
15597
15598 $as_echo "#define HAVE_RSAREF 1" >>confdefs.h
15599
15600
15601                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
15602                         else
15603                                 TLS_LIBS="-lssl -lcrypto"
15604                         fi
15605
15606                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version (CRL checking capability)" >&5
15607 $as_echo_n "checking OpenSSL library version (CRL checking capability)... " >&6; }
15608 if ${ol_cv_ssl_crl_compat+:} false; then :
15609   $as_echo_n "(cached) " >&6
15610 else
15611
15612                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15613 /* end confdefs.h.  */
15614
15615 #ifdef HAVE_OPENSSL_SSL_H
15616 #include <openssl/ssl.h>
15617 #endif
15618
15619 /* Require 0.9.7d+ */
15620 #if OPENSSL_VERSION_NUMBER >= 0x0090704fL
15621         char *__ssl_compat = "0.9.7d";
15622 #endif
15623
15624 _ACEOF
15625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15626   $EGREP "__ssl_compat" >/dev/null 2>&1; then :
15627   ol_cv_ssl_crl_compat=yes
15628 else
15629   ol_cv_ssl_crl_compat=no
15630 fi
15631 rm -f conftest*
15632
15633 fi
15634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_ssl_crl_compat" >&5
15635 $as_echo "$ol_cv_ssl_crl_compat" >&6; }
15636
15637                         if test $ol_cv_ssl_crl_compat = yes ; then
15638
15639 $as_echo "#define HAVE_OPENSSL_CRL 1" >>confdefs.h
15640
15641                         fi
15642                 fi
15643         fi
15644 fi
15645
15646 if test $ol_link_tls = no ; then
15647         if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then
15648                 for ac_header in gnutls/gnutls.h
15649 do :
15650   ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
15651 if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then :
15652   cat >>confdefs.h <<_ACEOF
15653 #define HAVE_GNUTLS_GNUTLS_H 1
15654 _ACEOF
15655
15656 fi
15657
15658 done
15659
15660
15661                 if test $ac_cv_header_gnutls_gnutls_h = yes ; then
15662                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15663 /* end confdefs.h.  */
15664 #include <gnutls/gnutls.h>
15665 #if GNUTLS_VERSION_NUMBER < 0x020c00
15666 #error "GnuTLS 2.12.0 or newer required"
15667 #endif
15668 _ACEOF
15669 if ac_fn_c_try_cpp "$LINENO"; then :
15670
15671 else
15672   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15673 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15674 as_fn_error $? "GnuTLS is too old
15675 See \`config.log' for more details" "$LINENO" 5; }
15676 fi
15677 rm -f conftest.err conftest.i conftest.$ac_ext
15678
15679                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
15680 $as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
15681 if ${ac_cv_lib_gnutls_gnutls_init+:} false; then :
15682   $as_echo_n "(cached) " >&6
15683 else
15684   ac_check_lib_save_LIBS=$LIBS
15685 LIBS="-lgnutls  $LIBS"
15686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15687 /* end confdefs.h.  */
15688
15689 /* Override any GCC internal prototype to avoid an error.
15690    Use char because int might match the return type of a GCC
15691    builtin and then its argument prototype would still apply.  */
15692 #ifdef __cplusplus
15693 extern "C"
15694 #endif
15695 char gnutls_init ();
15696 int
15697 main ()
15698 {
15699 return gnutls_init ();
15700   ;
15701   return 0;
15702 }
15703 _ACEOF
15704 if ac_fn_c_try_link "$LINENO"; then :
15705   ac_cv_lib_gnutls_gnutls_init=yes
15706 else
15707   ac_cv_lib_gnutls_gnutls_init=no
15708 fi
15709 rm -f core conftest.err conftest.$ac_objext \
15710     conftest$ac_exeext conftest.$ac_ext
15711 LIBS=$ac_check_lib_save_LIBS
15712 fi
15713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_init" >&5
15714 $as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
15715 if test "x$ac_cv_lib_gnutls_gnutls_init" = xyes; then :
15716   have_gnutls=yes
15717 else
15718   have_gnutls=no
15719 fi
15720
15721
15722                         if test $have_gnutls = yes ; then
15723                                 ol_with_tls=gnutls
15724                                 ol_link_tls=yes
15725
15726                                 TLS_LIBS="-lgnutls"
15727
15728
15729 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
15730
15731                         fi
15732                 fi
15733         fi
15734 fi
15735
15736 if test $ol_link_tls = no ; then
15737         if test $ol_with_tls = moznss || test $ol_with_tls = auto ; then
15738                 have_moznss=no
15739                 for ac_header in nssutil.h
15740 do :
15741   ac_fn_c_check_header_mongrel "$LINENO" "nssutil.h" "ac_cv_header_nssutil_h" "$ac_includes_default"
15742 if test "x$ac_cv_header_nssutil_h" = xyes; then :
15743   cat >>confdefs.h <<_ACEOF
15744 #define HAVE_NSSUTIL_H 1
15745 _ACEOF
15746
15747 fi
15748
15749 done
15750
15751                 if test "$ac_cv_header_nssutil_h" = yes ; then
15752                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_Initialize in -lnss3" >&5
15753 $as_echo_n "checking for NSS_Initialize in -lnss3... " >&6; }
15754 if ${ac_cv_lib_nss3_NSS_Initialize+:} false; then :
15755   $as_echo_n "(cached) " >&6
15756 else
15757   ac_check_lib_save_LIBS=$LIBS
15758 LIBS="-lnss3  $LIBS"
15759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15760 /* end confdefs.h.  */
15761
15762 /* Override any GCC internal prototype to avoid an error.
15763    Use char because int might match the return type of a GCC
15764    builtin and then its argument prototype would still apply.  */
15765 #ifdef __cplusplus
15766 extern "C"
15767 #endif
15768 char NSS_Initialize ();
15769 int
15770 main ()
15771 {
15772 return NSS_Initialize ();
15773   ;
15774   return 0;
15775 }
15776 _ACEOF
15777 if ac_fn_c_try_link "$LINENO"; then :
15778   ac_cv_lib_nss3_NSS_Initialize=yes
15779 else
15780   ac_cv_lib_nss3_NSS_Initialize=no
15781 fi
15782 rm -f core conftest.err conftest.$ac_objext \
15783     conftest$ac_exeext conftest.$ac_ext
15784 LIBS=$ac_check_lib_save_LIBS
15785 fi
15786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_NSS_Initialize" >&5
15787 $as_echo "$ac_cv_lib_nss3_NSS_Initialize" >&6; }
15788 if test "x$ac_cv_lib_nss3_NSS_Initialize" = xyes; then :
15789    have_moznss=yes
15790 else
15791    have_moznss=no
15792 fi
15793
15794                 fi
15795
15796                 if test "$have_moznss" = yes ; then
15797                         ol_with_tls=moznss
15798                         ol_link_tls=yes
15799
15800 $as_echo "#define HAVE_MOZNSS 1" >>confdefs.h
15801
15802                         TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
15803                 else
15804                         if test $ol_with_tls = moznss ; then
15805                         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
15806                         fi
15807                 fi
15808         fi
15809 fi
15810
15811 WITH_TLS=no
15812 if test $ol_link_tls = yes ; then
15813
15814 $as_echo "#define HAVE_TLS 1" >>confdefs.h
15815
15816         WITH_TLS=yes
15817 elif test $ol_with_tls = auto ; then
15818         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate TLS/SSL package" >&5
15819 $as_echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
15820         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15821 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15822 elif test $ol_with_tls != no ; then
15823         as_fn_error $? "Could not locate TLS/SSL package" "$LINENO" 5
15824 else
15825         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15826 $as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15827 fi
15828
15829 if test $ol_enable_lmpasswd != no; then
15830         if test $ol_link_tls != yes ; then
15831                 as_fn_error $? "LAN Manager passwords require OpenSSL" "$LINENO" 5
15832         fi
15833
15834
15835 $as_echo "#define SLAPD_LMHASH 1" >>confdefs.h
15836
15837 fi
15838
15839 ol_link_threads=no
15840
15841 case $ol_with_threads in auto | yes | nt)
15842
15843
15844         ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
15845 if test "x$ac_cv_func__beginthread" = xyes; then :
15846
15847 fi
15848
15849
15850         if test $ac_cv_func__beginthread = yes ; then
15851
15852 $as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
15853
15854                 ol_cv_nt_threads=yes
15855         fi
15856
15857
15858         if test "$ol_cv_nt_threads" = yes ; then
15859                 ol_link_threads=nt
15860                 ol_with_threads=found
15861                 ol_with_yielding_select=yes
15862
15863
15864 $as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
15865
15866
15867 $as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
15868
15869         fi
15870
15871         if test $ol_with_threads = nt ; then
15872                 as_fn_error $? "could not locate NT Threads" "$LINENO" 5
15873         fi
15874         ;;
15875 esac
15876
15877 case $ol_with_threads in auto | yes | posix)
15878
15879         for ac_header in pthread.h
15880 do :
15881   ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15882 if test "x$ac_cv_header_pthread_h" = xyes; then :
15883   cat >>confdefs.h <<_ACEOF
15884 #define HAVE_PTHREAD_H 1
15885 _ACEOF
15886
15887 fi
15888
15889 done
15890
15891
15892         if test $ac_cv_header_pthread_h = yes ; then
15893                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
15894 $as_echo_n "checking POSIX thread version... " >&6; }
15895 if ${ol_cv_pthread_version+:} false; then :
15896   $as_echo_n "(cached) " >&6
15897 else
15898
15899         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15900 /* end confdefs.h.  */
15901
15902 #               include <pthread.h>
15903
15904 int
15905 main ()
15906 {
15907
15908                 int i = PTHREAD_CREATE_JOINABLE;
15909
15910   ;
15911   return 0;
15912 }
15913 _ACEOF
15914 if ac_fn_c_try_compile "$LINENO"; then :
15915
15916         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15917 /* end confdefs.h.  */
15918 #include <pthread.h>
15919
15920 _ACEOF
15921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15922   $EGREP "pthread_detach" >/dev/null 2>&1; then :
15923   ol_cv_pthread_version=10
15924 else
15925   ol_cv_pthread_version=8
15926 fi
15927 rm -f conftest*
15928
15929 else
15930
15931         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15932 /* end confdefs.h.  */
15933
15934 #               include <pthread.h>
15935 #               ifdef PTHREAD_CREATE_UNDETACHED
15936                 draft7
15937 #               endif
15938
15939 _ACEOF
15940 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15941   $EGREP "draft7" >/dev/null 2>&1; then :
15942   ol_cv_pthread_version=7
15943 else
15944
15945         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15946 /* end confdefs.h.  */
15947 #include <pthread.h>
15948
15949 _ACEOF
15950 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15951   $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
15952   ol_cv_pthread_version=6
15953 else
15954
15955         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15956 /* end confdefs.h.  */
15957
15958 #               include <pthread.h>
15959 #ifdef          PTHREAD_MUTEX_INITIALIZER
15960                 draft5
15961 #endif
15962
15963 _ACEOF
15964 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15965   $EGREP "draft5" >/dev/null 2>&1; then :
15966   ol_cv_pthread_version=5
15967 else
15968   ol_cv_pthread_version=4
15969 fi
15970 rm -f conftest*
15971
15972 fi
15973 rm -f conftest*
15974
15975 fi
15976 rm -f conftest*
15977
15978 fi
15979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15980
15981 fi
15982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
15983 $as_echo "$ol_cv_pthread_version" >&6; }
15984
15985
15986                 if test $ol_cv_pthread_version != 0 ; then
15987
15988 cat >>confdefs.h <<_ACEOF
15989 #define HAVE_PTHREADS $ol_cv_pthread_version
15990 _ACEOF
15991
15992                 else
15993                         as_fn_error $? "unknown pthread version" "$LINENO" 5
15994                 fi
15995
15996                 # consider threads found
15997                 ol_with_threads=found
15998
15999
16000         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
16001 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
16002 if ${ol_cv_header_linux_threads+:} false; then :
16003   $as_echo_n "(cached) " >&6
16004 else
16005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16006 /* end confdefs.h.  */
16007 #include <pthread.h>
16008 _ACEOF
16009 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16010   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
16011   ol_cv_header_linux_threads=yes
16012 else
16013   ol_cv_header_linux_threads=no
16014 fi
16015 rm -f conftest*
16016
16017
16018 fi
16019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
16020 $as_echo "$ol_cv_header_linux_threads" >&6; }
16021         if test $ol_cv_header_linux_threads = yes; then
16022
16023 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
16024
16025         fi
16026
16027
16028         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
16029 $as_echo_n "checking for GNU Pth pthread.h... " >&6; }
16030 if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
16031   $as_echo_n "(cached) " >&6
16032 else
16033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16034 /* end confdefs.h.  */
16035 #include <pthread.h>
16036 #ifdef _POSIX_THREAD_IS_GNU_PTH
16037         __gnu_pth__;
16038 #endif
16039
16040 _ACEOF
16041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16042   $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
16043   ol_cv_header_gnu_pth_pthread_h=yes
16044 else
16045   ol_cv_header_gnu_pth_pthread_h=no
16046 fi
16047 rm -f conftest*
16048
16049
16050 fi
16051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
16052 $as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
16053
16054
16055                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
16056                         for ac_header in sched.h
16057 do :
16058   ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
16059 if test "x$ac_cv_header_sched_h" = xyes; then :
16060   cat >>confdefs.h <<_ACEOF
16061 #define HAVE_SCHED_H 1
16062 _ACEOF
16063
16064 fi
16065
16066 done
16067
16068                 fi
16069
16070
16071                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
16072 $as_echo_n "checking for pthread_create in default libraries... " >&6; }
16073 if ${ol_cv_pthread_create+:} false; then :
16074   $as_echo_n "(cached) " >&6
16075 else
16076
16077                         if test "$cross_compiling" = yes; then :
16078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16079 /* end confdefs.h.  */
16080
16081 /* pthread test headers */
16082 #include <pthread.h>
16083 #if HAVE_PTHREADS < 7
16084 #include <errno.h>
16085 #endif
16086 #ifndef NULL
16087 #define NULL (void*)0
16088 #endif
16089
16090 static void *task(p)
16091         void *p;
16092 {
16093         return (void *) (p == NULL);
16094 }
16095
16096 int
16097 main ()
16098 {
16099
16100         /* pthread test function */
16101 #ifndef PTHREAD_CREATE_DETACHED
16102 #define PTHREAD_CREATE_DETACHED 1
16103 #endif
16104         pthread_t t;
16105         int status;
16106         int detach = PTHREAD_CREATE_DETACHED;
16107
16108 #if HAVE_PTHREADS > 4
16109         /* Final pthreads */
16110         pthread_attr_t attr;
16111
16112         status = pthread_attr_init(&attr);
16113         if( status ) return status;
16114
16115 #if HAVE_PTHREADS < 7
16116         status = pthread_attr_setdetachstate(&attr, &detach);
16117         if( status < 0 ) status = errno;
16118 #else
16119         status = pthread_attr_setdetachstate(&attr, detach);
16120 #endif
16121         if( status ) return status;
16122         status = pthread_create( &t, &attr, task, NULL );
16123 #if HAVE_PTHREADS < 7
16124         if( status < 0 ) status = errno;
16125 #endif
16126         if( status ) return status;
16127 #else
16128         /* Draft 4 pthreads */
16129         status = pthread_create( &t, pthread_attr_default, task, NULL );
16130         if( status ) return errno;
16131
16132         /* give thread a chance to complete */
16133         /* it should remain joinable and hence detachable */
16134         sleep( 1 );
16135
16136         status = pthread_detach( &t );
16137         if( status ) return errno;
16138 #endif
16139
16140 #ifdef HAVE_LINUX_THREADS
16141         pthread_kill_other_threads_np();
16142 #endif
16143
16144         return 0;
16145
16146   ;
16147   return 0;
16148 }
16149 _ACEOF
16150 if ac_fn_c_try_link "$LINENO"; then :
16151   ol_cv_pthread_create=yes
16152 else
16153   ol_cv_pthread_create=no
16154 fi
16155 rm -f core conftest.err conftest.$ac_objext \
16156     conftest$ac_exeext conftest.$ac_ext
16157 else
16158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16159 /* end confdefs.h.  */
16160
16161 /* pthread test headers */
16162 #include <pthread.h>
16163 #if HAVE_PTHREADS < 7
16164 #include <errno.h>
16165 #endif
16166 #ifndef NULL
16167 #define NULL (void*)0
16168 #endif
16169
16170 static void *task(p)
16171         void *p;
16172 {
16173         return (void *) (p == NULL);
16174 }
16175
16176
16177 int main(argc, argv)
16178         int argc;
16179         char **argv;
16180 {
16181
16182         /* pthread test function */
16183 #ifndef PTHREAD_CREATE_DETACHED
16184 #define PTHREAD_CREATE_DETACHED 1
16185 #endif
16186         pthread_t t;
16187         int status;
16188         int detach = PTHREAD_CREATE_DETACHED;
16189
16190 #if HAVE_PTHREADS > 4
16191         /* Final pthreads */
16192         pthread_attr_t attr;
16193
16194         status = pthread_attr_init(&attr);
16195         if( status ) return status;
16196
16197 #if HAVE_PTHREADS < 7
16198         status = pthread_attr_setdetachstate(&attr, &detach);
16199         if( status < 0 ) status = errno;
16200 #else
16201         status = pthread_attr_setdetachstate(&attr, detach);
16202 #endif
16203         if( status ) return status;
16204         status = pthread_create( &t, &attr, task, NULL );
16205 #if HAVE_PTHREADS < 7
16206         if( status < 0 ) status = errno;
16207 #endif
16208         if( status ) return status;
16209 #else
16210         /* Draft 4 pthreads */
16211         status = pthread_create( &t, pthread_attr_default, task, NULL );
16212         if( status ) return errno;
16213
16214         /* give thread a chance to complete */
16215         /* it should remain joinable and hence detachable */
16216         sleep( 1 );
16217
16218         status = pthread_detach( &t );
16219         if( status ) return errno;
16220 #endif
16221
16222 #ifdef HAVE_LINUX_THREADS
16223         pthread_kill_other_threads_np();
16224 #endif
16225
16226         return 0;
16227
16228 }
16229
16230 _ACEOF
16231 if ac_fn_c_try_run "$LINENO"; then :
16232   ol_cv_pthread_create=yes
16233 else
16234   ol_cv_pthread_create=no
16235 fi
16236 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16237   conftest.$ac_objext conftest.beam conftest.$ac_ext
16238 fi
16239
16240 fi
16241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
16242 $as_echo "$ol_cv_pthread_create" >&6; }
16243
16244                 if test $ol_cv_pthread_create != no ; then
16245                         ol_link_threads=posix
16246                         ol_link_pthreads=""
16247                 fi
16248
16249                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
16250 if test "$ol_link_threads" = no ; then
16251         # try -kthread
16252         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
16253 $as_echo_n "checking for pthread link with -kthread... " >&6; }
16254 if ${ol_cv_pthread_kthread+:} false; then :
16255   $as_echo_n "(cached) " >&6
16256 else
16257
16258                 # save the flags
16259                 ol_LIBS="$LIBS"
16260                 LIBS="-kthread $LIBS"
16261
16262                 if test "$cross_compiling" = yes; then :
16263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16264 /* end confdefs.h.  */
16265
16266 /* pthread test headers */
16267 #include <pthread.h>
16268 #if HAVE_PTHREADS < 7
16269 #include <errno.h>
16270 #endif
16271 #ifndef NULL
16272 #define NULL (void*)0
16273 #endif
16274
16275 static void *task(p)
16276         void *p;
16277 {
16278         return (void *) (p == NULL);
16279 }
16280
16281 int
16282 main ()
16283 {
16284
16285         /* pthread test function */
16286 #ifndef PTHREAD_CREATE_DETACHED
16287 #define PTHREAD_CREATE_DETACHED 1
16288 #endif
16289         pthread_t t;
16290         int status;
16291         int detach = PTHREAD_CREATE_DETACHED;
16292
16293 #if HAVE_PTHREADS > 4
16294         /* Final pthreads */
16295         pthread_attr_t attr;
16296
16297         status = pthread_attr_init(&attr);
16298         if( status ) return status;
16299
16300 #if HAVE_PTHREADS < 7
16301         status = pthread_attr_setdetachstate(&attr, &detach);
16302         if( status < 0 ) status = errno;
16303 #else
16304         status = pthread_attr_setdetachstate(&attr, detach);
16305 #endif
16306         if( status ) return status;
16307         status = pthread_create( &t, &attr, task, NULL );
16308 #if HAVE_PTHREADS < 7
16309         if( status < 0 ) status = errno;
16310 #endif
16311         if( status ) return status;
16312 #else
16313         /* Draft 4 pthreads */
16314         status = pthread_create( &t, pthread_attr_default, task, NULL );
16315         if( status ) return errno;
16316
16317         /* give thread a chance to complete */
16318         /* it should remain joinable and hence detachable */
16319         sleep( 1 );
16320
16321         status = pthread_detach( &t );
16322         if( status ) return errno;
16323 #endif
16324
16325 #ifdef HAVE_LINUX_THREADS
16326         pthread_kill_other_threads_np();
16327 #endif
16328
16329         return 0;
16330
16331   ;
16332   return 0;
16333 }
16334 _ACEOF
16335 if ac_fn_c_try_link "$LINENO"; then :
16336   ol_cv_pthread_kthread=yes
16337 else
16338   ol_cv_pthread_kthread=no
16339 fi
16340 rm -f core conftest.err conftest.$ac_objext \
16341     conftest$ac_exeext conftest.$ac_ext
16342 else
16343   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16344 /* end confdefs.h.  */
16345
16346 /* pthread test headers */
16347 #include <pthread.h>
16348 #if HAVE_PTHREADS < 7
16349 #include <errno.h>
16350 #endif
16351 #ifndef NULL
16352 #define NULL (void*)0
16353 #endif
16354
16355 static void *task(p)
16356         void *p;
16357 {
16358         return (void *) (p == NULL);
16359 }
16360
16361
16362 int main(argc, argv)
16363         int argc;
16364         char **argv;
16365 {
16366
16367         /* pthread test function */
16368 #ifndef PTHREAD_CREATE_DETACHED
16369 #define PTHREAD_CREATE_DETACHED 1
16370 #endif
16371         pthread_t t;
16372         int status;
16373         int detach = PTHREAD_CREATE_DETACHED;
16374
16375 #if HAVE_PTHREADS > 4
16376         /* Final pthreads */
16377         pthread_attr_t attr;
16378
16379         status = pthread_attr_init(&attr);
16380         if( status ) return status;
16381
16382 #if HAVE_PTHREADS < 7
16383         status = pthread_attr_setdetachstate(&attr, &detach);
16384         if( status < 0 ) status = errno;
16385 #else
16386         status = pthread_attr_setdetachstate(&attr, detach);
16387 #endif
16388         if( status ) return status;
16389         status = pthread_create( &t, &attr, task, NULL );
16390 #if HAVE_PTHREADS < 7
16391         if( status < 0 ) status = errno;
16392 #endif
16393         if( status ) return status;
16394 #else
16395         /* Draft 4 pthreads */
16396         status = pthread_create( &t, pthread_attr_default, task, NULL );
16397         if( status ) return errno;
16398
16399         /* give thread a chance to complete */
16400         /* it should remain joinable and hence detachable */
16401         sleep( 1 );
16402
16403         status = pthread_detach( &t );
16404         if( status ) return errno;
16405 #endif
16406
16407 #ifdef HAVE_LINUX_THREADS
16408         pthread_kill_other_threads_np();
16409 #endif
16410
16411         return 0;
16412
16413 }
16414
16415 _ACEOF
16416 if ac_fn_c_try_run "$LINENO"; then :
16417   ol_cv_pthread_kthread=yes
16418 else
16419   ol_cv_pthread_kthread=no
16420 fi
16421 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16422   conftest.$ac_objext conftest.beam conftest.$ac_ext
16423 fi
16424
16425
16426                 # restore the LIBS
16427                 LIBS="$ol_LIBS"
16428
16429 fi
16430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
16431 $as_echo "$ol_cv_pthread_kthread" >&6; }
16432
16433         if test $ol_cv_pthread_kthread = yes ; then
16434                 ol_link_pthreads="-kthread"
16435                 ol_link_threads=posix
16436         fi
16437 fi
16438
16439                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
16440 if test "$ol_link_threads" = no ; then
16441         # try -pthread
16442         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
16443 $as_echo_n "checking for pthread link with -pthread... " >&6; }
16444 if ${ol_cv_pthread_pthread+:} false; then :
16445   $as_echo_n "(cached) " >&6
16446 else
16447
16448                 # save the flags
16449                 ol_LIBS="$LIBS"
16450                 LIBS="-pthread $LIBS"
16451
16452                 if test "$cross_compiling" = yes; then :
16453   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16454 /* end confdefs.h.  */
16455
16456 /* pthread test headers */
16457 #include <pthread.h>
16458 #if HAVE_PTHREADS < 7
16459 #include <errno.h>
16460 #endif
16461 #ifndef NULL
16462 #define NULL (void*)0
16463 #endif
16464
16465 static void *task(p)
16466         void *p;
16467 {
16468         return (void *) (p == NULL);
16469 }
16470
16471 int
16472 main ()
16473 {
16474
16475         /* pthread test function */
16476 #ifndef PTHREAD_CREATE_DETACHED
16477 #define PTHREAD_CREATE_DETACHED 1
16478 #endif
16479         pthread_t t;
16480         int status;
16481         int detach = PTHREAD_CREATE_DETACHED;
16482
16483 #if HAVE_PTHREADS > 4
16484         /* Final pthreads */
16485         pthread_attr_t attr;
16486
16487         status = pthread_attr_init(&attr);
16488         if( status ) return status;
16489
16490 #if HAVE_PTHREADS < 7
16491         status = pthread_attr_setdetachstate(&attr, &detach);
16492         if( status < 0 ) status = errno;
16493 #else
16494         status = pthread_attr_setdetachstate(&attr, detach);
16495 #endif
16496         if( status ) return status;
16497         status = pthread_create( &t, &attr, task, NULL );
16498 #if HAVE_PTHREADS < 7
16499         if( status < 0 ) status = errno;
16500 #endif
16501         if( status ) return status;
16502 #else
16503         /* Draft 4 pthreads */
16504         status = pthread_create( &t, pthread_attr_default, task, NULL );
16505         if( status ) return errno;
16506
16507         /* give thread a chance to complete */
16508         /* it should remain joinable and hence detachable */
16509         sleep( 1 );
16510
16511         status = pthread_detach( &t );
16512         if( status ) return errno;
16513 #endif
16514
16515 #ifdef HAVE_LINUX_THREADS
16516         pthread_kill_other_threads_np();
16517 #endif
16518
16519         return 0;
16520
16521   ;
16522   return 0;
16523 }
16524 _ACEOF
16525 if ac_fn_c_try_link "$LINENO"; then :
16526   ol_cv_pthread_pthread=yes
16527 else
16528   ol_cv_pthread_pthread=no
16529 fi
16530 rm -f core conftest.err conftest.$ac_objext \
16531     conftest$ac_exeext conftest.$ac_ext
16532 else
16533   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16534 /* end confdefs.h.  */
16535
16536 /* pthread test headers */
16537 #include <pthread.h>
16538 #if HAVE_PTHREADS < 7
16539 #include <errno.h>
16540 #endif
16541 #ifndef NULL
16542 #define NULL (void*)0
16543 #endif
16544
16545 static void *task(p)
16546         void *p;
16547 {
16548         return (void *) (p == NULL);
16549 }
16550
16551
16552 int main(argc, argv)
16553         int argc;
16554         char **argv;
16555 {
16556
16557         /* pthread test function */
16558 #ifndef PTHREAD_CREATE_DETACHED
16559 #define PTHREAD_CREATE_DETACHED 1
16560 #endif
16561         pthread_t t;
16562         int status;
16563         int detach = PTHREAD_CREATE_DETACHED;
16564
16565 #if HAVE_PTHREADS > 4
16566         /* Final pthreads */
16567         pthread_attr_t attr;
16568
16569         status = pthread_attr_init(&attr);
16570         if( status ) return status;
16571
16572 #if HAVE_PTHREADS < 7
16573         status = pthread_attr_setdetachstate(&attr, &detach);
16574         if( status < 0 ) status = errno;
16575 #else
16576         status = pthread_attr_setdetachstate(&attr, detach);
16577 #endif
16578         if( status ) return status;
16579         status = pthread_create( &t, &attr, task, NULL );
16580 #if HAVE_PTHREADS < 7
16581         if( status < 0 ) status = errno;
16582 #endif
16583         if( status ) return status;
16584 #else
16585         /* Draft 4 pthreads */
16586         status = pthread_create( &t, pthread_attr_default, task, NULL );
16587         if( status ) return errno;
16588
16589         /* give thread a chance to complete */
16590         /* it should remain joinable and hence detachable */
16591         sleep( 1 );
16592
16593         status = pthread_detach( &t );
16594         if( status ) return errno;
16595 #endif
16596
16597 #ifdef HAVE_LINUX_THREADS
16598         pthread_kill_other_threads_np();
16599 #endif
16600
16601         return 0;
16602
16603 }
16604
16605 _ACEOF
16606 if ac_fn_c_try_run "$LINENO"; then :
16607   ol_cv_pthread_pthread=yes
16608 else
16609   ol_cv_pthread_pthread=no
16610 fi
16611 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16612   conftest.$ac_objext conftest.beam conftest.$ac_ext
16613 fi
16614
16615
16616                 # restore the LIBS
16617                 LIBS="$ol_LIBS"
16618
16619 fi
16620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
16621 $as_echo "$ol_cv_pthread_pthread" >&6; }
16622
16623         if test $ol_cv_pthread_pthread = yes ; then
16624                 ol_link_pthreads="-pthread"
16625                 ol_link_threads=posix
16626         fi
16627 fi
16628
16629                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
16630 if test "$ol_link_threads" = no ; then
16631         # try -pthreads
16632         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
16633 $as_echo_n "checking for pthread link with -pthreads... " >&6; }
16634 if ${ol_cv_pthread_pthreads+:} false; then :
16635   $as_echo_n "(cached) " >&6
16636 else
16637
16638                 # save the flags
16639                 ol_LIBS="$LIBS"
16640                 LIBS="-pthreads $LIBS"
16641
16642                 if test "$cross_compiling" = yes; then :
16643   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16644 /* end confdefs.h.  */
16645
16646 /* pthread test headers */
16647 #include <pthread.h>
16648 #if HAVE_PTHREADS < 7
16649 #include <errno.h>
16650 #endif
16651 #ifndef NULL
16652 #define NULL (void*)0
16653 #endif
16654
16655 static void *task(p)
16656         void *p;
16657 {
16658         return (void *) (p == NULL);
16659 }
16660
16661 int
16662 main ()
16663 {
16664
16665         /* pthread test function */
16666 #ifndef PTHREAD_CREATE_DETACHED
16667 #define PTHREAD_CREATE_DETACHED 1
16668 #endif
16669         pthread_t t;
16670         int status;
16671         int detach = PTHREAD_CREATE_DETACHED;
16672
16673 #if HAVE_PTHREADS > 4
16674         /* Final pthreads */
16675         pthread_attr_t attr;
16676
16677         status = pthread_attr_init(&attr);
16678         if( status ) return status;
16679
16680 #if HAVE_PTHREADS < 7
16681         status = pthread_attr_setdetachstate(&attr, &detach);
16682         if( status < 0 ) status = errno;
16683 #else
16684         status = pthread_attr_setdetachstate(&attr, detach);
16685 #endif
16686         if( status ) return status;
16687         status = pthread_create( &t, &attr, task, NULL );
16688 #if HAVE_PTHREADS < 7
16689         if( status < 0 ) status = errno;
16690 #endif
16691         if( status ) return status;
16692 #else
16693         /* Draft 4 pthreads */
16694         status = pthread_create( &t, pthread_attr_default, task, NULL );
16695         if( status ) return errno;
16696
16697         /* give thread a chance to complete */
16698         /* it should remain joinable and hence detachable */
16699         sleep( 1 );
16700
16701         status = pthread_detach( &t );
16702         if( status ) return errno;
16703 #endif
16704
16705 #ifdef HAVE_LINUX_THREADS
16706         pthread_kill_other_threads_np();
16707 #endif
16708
16709         return 0;
16710
16711   ;
16712   return 0;
16713 }
16714 _ACEOF
16715 if ac_fn_c_try_link "$LINENO"; then :
16716   ol_cv_pthread_pthreads=yes
16717 else
16718   ol_cv_pthread_pthreads=no
16719 fi
16720 rm -f core conftest.err conftest.$ac_objext \
16721     conftest$ac_exeext conftest.$ac_ext
16722 else
16723   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16724 /* end confdefs.h.  */
16725
16726 /* pthread test headers */
16727 #include <pthread.h>
16728 #if HAVE_PTHREADS < 7
16729 #include <errno.h>
16730 #endif
16731 #ifndef NULL
16732 #define NULL (void*)0
16733 #endif
16734
16735 static void *task(p)
16736         void *p;
16737 {
16738         return (void *) (p == NULL);
16739 }
16740
16741
16742 int main(argc, argv)
16743         int argc;
16744         char **argv;
16745 {
16746
16747         /* pthread test function */
16748 #ifndef PTHREAD_CREATE_DETACHED
16749 #define PTHREAD_CREATE_DETACHED 1
16750 #endif
16751         pthread_t t;
16752         int status;
16753         int detach = PTHREAD_CREATE_DETACHED;
16754
16755 #if HAVE_PTHREADS > 4
16756         /* Final pthreads */
16757         pthread_attr_t attr;
16758
16759         status = pthread_attr_init(&attr);
16760         if( status ) return status;
16761
16762 #if HAVE_PTHREADS < 7
16763         status = pthread_attr_setdetachstate(&attr, &detach);
16764         if( status < 0 ) status = errno;
16765 #else
16766         status = pthread_attr_setdetachstate(&attr, detach);
16767 #endif
16768         if( status ) return status;
16769         status = pthread_create( &t, &attr, task, NULL );
16770 #if HAVE_PTHREADS < 7
16771         if( status < 0 ) status = errno;
16772 #endif
16773         if( status ) return status;
16774 #else
16775         /* Draft 4 pthreads */
16776         status = pthread_create( &t, pthread_attr_default, task, NULL );
16777         if( status ) return errno;
16778
16779         /* give thread a chance to complete */
16780         /* it should remain joinable and hence detachable */
16781         sleep( 1 );
16782
16783         status = pthread_detach( &t );
16784         if( status ) return errno;
16785 #endif
16786
16787 #ifdef HAVE_LINUX_THREADS
16788         pthread_kill_other_threads_np();
16789 #endif
16790
16791         return 0;
16792
16793 }
16794
16795 _ACEOF
16796 if ac_fn_c_try_run "$LINENO"; then :
16797   ol_cv_pthread_pthreads=yes
16798 else
16799   ol_cv_pthread_pthreads=no
16800 fi
16801 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16802   conftest.$ac_objext conftest.beam conftest.$ac_ext
16803 fi
16804
16805
16806                 # restore the LIBS
16807                 LIBS="$ol_LIBS"
16808
16809 fi
16810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
16811 $as_echo "$ol_cv_pthread_pthreads" >&6; }
16812
16813         if test $ol_cv_pthread_pthreads = yes ; then
16814                 ol_link_pthreads="-pthreads"
16815                 ol_link_threads=posix
16816         fi
16817 fi
16818
16819                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
16820 if test "$ol_link_threads" = no ; then
16821         # try -mthreads
16822         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
16823 $as_echo_n "checking for pthread link with -mthreads... " >&6; }
16824 if ${ol_cv_pthread_mthreads+:} false; then :
16825   $as_echo_n "(cached) " >&6
16826 else
16827
16828                 # save the flags
16829                 ol_LIBS="$LIBS"
16830                 LIBS="-mthreads $LIBS"
16831
16832                 if test "$cross_compiling" = yes; then :
16833   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16834 /* end confdefs.h.  */
16835
16836 /* pthread test headers */
16837 #include <pthread.h>
16838 #if HAVE_PTHREADS < 7
16839 #include <errno.h>
16840 #endif
16841 #ifndef NULL
16842 #define NULL (void*)0
16843 #endif
16844
16845 static void *task(p)
16846         void *p;
16847 {
16848         return (void *) (p == NULL);
16849 }
16850
16851 int
16852 main ()
16853 {
16854
16855         /* pthread test function */
16856 #ifndef PTHREAD_CREATE_DETACHED
16857 #define PTHREAD_CREATE_DETACHED 1
16858 #endif
16859         pthread_t t;
16860         int status;
16861         int detach = PTHREAD_CREATE_DETACHED;
16862
16863 #if HAVE_PTHREADS > 4
16864         /* Final pthreads */
16865         pthread_attr_t attr;
16866
16867         status = pthread_attr_init(&attr);
16868         if( status ) return status;
16869
16870 #if HAVE_PTHREADS < 7
16871         status = pthread_attr_setdetachstate(&attr, &detach);
16872         if( status < 0 ) status = errno;
16873 #else
16874         status = pthread_attr_setdetachstate(&attr, detach);
16875 #endif
16876         if( status ) return status;
16877         status = pthread_create( &t, &attr, task, NULL );
16878 #if HAVE_PTHREADS < 7
16879         if( status < 0 ) status = errno;
16880 #endif
16881         if( status ) return status;
16882 #else
16883         /* Draft 4 pthreads */
16884         status = pthread_create( &t, pthread_attr_default, task, NULL );
16885         if( status ) return errno;
16886
16887         /* give thread a chance to complete */
16888         /* it should remain joinable and hence detachable */
16889         sleep( 1 );
16890
16891         status = pthread_detach( &t );
16892         if( status ) return errno;
16893 #endif
16894
16895 #ifdef HAVE_LINUX_THREADS
16896         pthread_kill_other_threads_np();
16897 #endif
16898
16899         return 0;
16900
16901   ;
16902   return 0;
16903 }
16904 _ACEOF
16905 if ac_fn_c_try_link "$LINENO"; then :
16906   ol_cv_pthread_mthreads=yes
16907 else
16908   ol_cv_pthread_mthreads=no
16909 fi
16910 rm -f core conftest.err conftest.$ac_objext \
16911     conftest$ac_exeext conftest.$ac_ext
16912 else
16913   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16914 /* end confdefs.h.  */
16915
16916 /* pthread test headers */
16917 #include <pthread.h>
16918 #if HAVE_PTHREADS < 7
16919 #include <errno.h>
16920 #endif
16921 #ifndef NULL
16922 #define NULL (void*)0
16923 #endif
16924
16925 static void *task(p)
16926         void *p;
16927 {
16928         return (void *) (p == NULL);
16929 }
16930
16931
16932 int main(argc, argv)
16933         int argc;
16934         char **argv;
16935 {
16936
16937         /* pthread test function */
16938 #ifndef PTHREAD_CREATE_DETACHED
16939 #define PTHREAD_CREATE_DETACHED 1
16940 #endif
16941         pthread_t t;
16942         int status;
16943         int detach = PTHREAD_CREATE_DETACHED;
16944
16945 #if HAVE_PTHREADS > 4
16946         /* Final pthreads */
16947         pthread_attr_t attr;
16948
16949         status = pthread_attr_init(&attr);
16950         if( status ) return status;
16951
16952 #if HAVE_PTHREADS < 7
16953         status = pthread_attr_setdetachstate(&attr, &detach);
16954         if( status < 0 ) status = errno;
16955 #else
16956         status = pthread_attr_setdetachstate(&attr, detach);
16957 #endif
16958         if( status ) return status;
16959         status = pthread_create( &t, &attr, task, NULL );
16960 #if HAVE_PTHREADS < 7
16961         if( status < 0 ) status = errno;
16962 #endif
16963         if( status ) return status;
16964 #else
16965         /* Draft 4 pthreads */
16966         status = pthread_create( &t, pthread_attr_default, task, NULL );
16967         if( status ) return errno;
16968
16969         /* give thread a chance to complete */
16970         /* it should remain joinable and hence detachable */
16971         sleep( 1 );
16972
16973         status = pthread_detach( &t );
16974         if( status ) return errno;
16975 #endif
16976
16977 #ifdef HAVE_LINUX_THREADS
16978         pthread_kill_other_threads_np();
16979 #endif
16980
16981         return 0;
16982
16983 }
16984
16985 _ACEOF
16986 if ac_fn_c_try_run "$LINENO"; then :
16987   ol_cv_pthread_mthreads=yes
16988 else
16989   ol_cv_pthread_mthreads=no
16990 fi
16991 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16992   conftest.$ac_objext conftest.beam conftest.$ac_ext
16993 fi
16994
16995
16996                 # restore the LIBS
16997                 LIBS="$ol_LIBS"
16998
16999 fi
17000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
17001 $as_echo "$ol_cv_pthread_mthreads" >&6; }
17002
17003         if test $ol_cv_pthread_mthreads = yes ; then
17004                 ol_link_pthreads="-mthreads"
17005                 ol_link_threads=posix
17006         fi
17007 fi
17008
17009                 # Pthread try link: -thread (ol_cv_pthread_thread)
17010 if test "$ol_link_threads" = no ; then
17011         # try -thread
17012         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
17013 $as_echo_n "checking for pthread link with -thread... " >&6; }
17014 if ${ol_cv_pthread_thread+:} false; then :
17015   $as_echo_n "(cached) " >&6
17016 else
17017
17018                 # save the flags
17019                 ol_LIBS="$LIBS"
17020                 LIBS="-thread $LIBS"
17021
17022                 if test "$cross_compiling" = yes; then :
17023   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17024 /* end confdefs.h.  */
17025
17026 /* pthread test headers */
17027 #include <pthread.h>
17028 #if HAVE_PTHREADS < 7
17029 #include <errno.h>
17030 #endif
17031 #ifndef NULL
17032 #define NULL (void*)0
17033 #endif
17034
17035 static void *task(p)
17036         void *p;
17037 {
17038         return (void *) (p == NULL);
17039 }
17040
17041 int
17042 main ()
17043 {
17044
17045         /* pthread test function */
17046 #ifndef PTHREAD_CREATE_DETACHED
17047 #define PTHREAD_CREATE_DETACHED 1
17048 #endif
17049         pthread_t t;
17050         int status;
17051         int detach = PTHREAD_CREATE_DETACHED;
17052
17053 #if HAVE_PTHREADS > 4
17054         /* Final pthreads */
17055         pthread_attr_t attr;
17056
17057         status = pthread_attr_init(&attr);
17058         if( status ) return status;
17059
17060 #if HAVE_PTHREADS < 7
17061         status = pthread_attr_setdetachstate(&attr, &detach);
17062         if( status < 0 ) status = errno;
17063 #else
17064         status = pthread_attr_setdetachstate(&attr, detach);
17065 #endif
17066         if( status ) return status;
17067         status = pthread_create( &t, &attr, task, NULL );
17068 #if HAVE_PTHREADS < 7
17069         if( status < 0 ) status = errno;
17070 #endif
17071         if( status ) return status;
17072 #else
17073         /* Draft 4 pthreads */
17074         status = pthread_create( &t, pthread_attr_default, task, NULL );
17075         if( status ) return errno;
17076
17077         /* give thread a chance to complete */
17078         /* it should remain joinable and hence detachable */
17079         sleep( 1 );
17080
17081         status = pthread_detach( &t );
17082         if( status ) return errno;
17083 #endif
17084
17085 #ifdef HAVE_LINUX_THREADS
17086         pthread_kill_other_threads_np();
17087 #endif
17088
17089         return 0;
17090
17091   ;
17092   return 0;
17093 }
17094 _ACEOF
17095 if ac_fn_c_try_link "$LINENO"; then :
17096   ol_cv_pthread_thread=yes
17097 else
17098   ol_cv_pthread_thread=no
17099 fi
17100 rm -f core conftest.err conftest.$ac_objext \
17101     conftest$ac_exeext conftest.$ac_ext
17102 else
17103   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17104 /* end confdefs.h.  */
17105
17106 /* pthread test headers */
17107 #include <pthread.h>
17108 #if HAVE_PTHREADS < 7
17109 #include <errno.h>
17110 #endif
17111 #ifndef NULL
17112 #define NULL (void*)0
17113 #endif
17114
17115 static void *task(p)
17116         void *p;
17117 {
17118         return (void *) (p == NULL);
17119 }
17120
17121
17122 int main(argc, argv)
17123         int argc;
17124         char **argv;
17125 {
17126
17127         /* pthread test function */
17128 #ifndef PTHREAD_CREATE_DETACHED
17129 #define PTHREAD_CREATE_DETACHED 1
17130 #endif
17131         pthread_t t;
17132         int status;
17133         int detach = PTHREAD_CREATE_DETACHED;
17134
17135 #if HAVE_PTHREADS > 4
17136         /* Final pthreads */
17137         pthread_attr_t attr;
17138
17139         status = pthread_attr_init(&attr);
17140         if( status ) return status;
17141
17142 #if HAVE_PTHREADS < 7
17143         status = pthread_attr_setdetachstate(&attr, &detach);
17144         if( status < 0 ) status = errno;
17145 #else
17146         status = pthread_attr_setdetachstate(&attr, detach);
17147 #endif
17148         if( status ) return status;
17149         status = pthread_create( &t, &attr, task, NULL );
17150 #if HAVE_PTHREADS < 7
17151         if( status < 0 ) status = errno;
17152 #endif
17153         if( status ) return status;
17154 #else
17155         /* Draft 4 pthreads */
17156         status = pthread_create( &t, pthread_attr_default, task, NULL );
17157         if( status ) return errno;
17158
17159         /* give thread a chance to complete */
17160         /* it should remain joinable and hence detachable */
17161         sleep( 1 );
17162
17163         status = pthread_detach( &t );
17164         if( status ) return errno;
17165 #endif
17166
17167 #ifdef HAVE_LINUX_THREADS
17168         pthread_kill_other_threads_np();
17169 #endif
17170
17171         return 0;
17172
17173 }
17174
17175 _ACEOF
17176 if ac_fn_c_try_run "$LINENO"; then :
17177   ol_cv_pthread_thread=yes
17178 else
17179   ol_cv_pthread_thread=no
17180 fi
17181 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17182   conftest.$ac_objext conftest.beam conftest.$ac_ext
17183 fi
17184
17185
17186                 # restore the LIBS
17187                 LIBS="$ol_LIBS"
17188
17189 fi
17190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
17191 $as_echo "$ol_cv_pthread_thread" >&6; }
17192
17193         if test $ol_cv_pthread_thread = yes ; then
17194                 ol_link_pthreads="-thread"
17195                 ol_link_threads=posix
17196         fi
17197 fi
17198
17199
17200                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
17201 if test "$ol_link_threads" = no ; then
17202         # try -lpthread -lmach -lexc -lc_r
17203         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
17204 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
17205 if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
17206   $as_echo_n "(cached) " >&6
17207 else
17208
17209                 # save the flags
17210                 ol_LIBS="$LIBS"
17211                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
17212
17213                 if test "$cross_compiling" = yes; then :
17214   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17215 /* end confdefs.h.  */
17216
17217 /* pthread test headers */
17218 #include <pthread.h>
17219 #if HAVE_PTHREADS < 7
17220 #include <errno.h>
17221 #endif
17222 #ifndef NULL
17223 #define NULL (void*)0
17224 #endif
17225
17226 static void *task(p)
17227         void *p;
17228 {
17229         return (void *) (p == NULL);
17230 }
17231
17232 int
17233 main ()
17234 {
17235
17236         /* pthread test function */
17237 #ifndef PTHREAD_CREATE_DETACHED
17238 #define PTHREAD_CREATE_DETACHED 1
17239 #endif
17240         pthread_t t;
17241         int status;
17242         int detach = PTHREAD_CREATE_DETACHED;
17243
17244 #if HAVE_PTHREADS > 4
17245         /* Final pthreads */
17246         pthread_attr_t attr;
17247
17248         status = pthread_attr_init(&attr);
17249         if( status ) return status;
17250
17251 #if HAVE_PTHREADS < 7
17252         status = pthread_attr_setdetachstate(&attr, &detach);
17253         if( status < 0 ) status = errno;
17254 #else
17255         status = pthread_attr_setdetachstate(&attr, detach);
17256 #endif
17257         if( status ) return status;
17258         status = pthread_create( &t, &attr, task, NULL );
17259 #if HAVE_PTHREADS < 7
17260         if( status < 0 ) status = errno;
17261 #endif
17262         if( status ) return status;
17263 #else
17264         /* Draft 4 pthreads */
17265         status = pthread_create( &t, pthread_attr_default, task, NULL );
17266         if( status ) return errno;
17267
17268         /* give thread a chance to complete */
17269         /* it should remain joinable and hence detachable */
17270         sleep( 1 );
17271
17272         status = pthread_detach( &t );
17273         if( status ) return errno;
17274 #endif
17275
17276 #ifdef HAVE_LINUX_THREADS
17277         pthread_kill_other_threads_np();
17278 #endif
17279
17280         return 0;
17281
17282   ;
17283   return 0;
17284 }
17285 _ACEOF
17286 if ac_fn_c_try_link "$LINENO"; then :
17287   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17288 else
17289   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17290 fi
17291 rm -f core conftest.err conftest.$ac_objext \
17292     conftest$ac_exeext conftest.$ac_ext
17293 else
17294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17295 /* end confdefs.h.  */
17296
17297 /* pthread test headers */
17298 #include <pthread.h>
17299 #if HAVE_PTHREADS < 7
17300 #include <errno.h>
17301 #endif
17302 #ifndef NULL
17303 #define NULL (void*)0
17304 #endif
17305
17306 static void *task(p)
17307         void *p;
17308 {
17309         return (void *) (p == NULL);
17310 }
17311
17312
17313 int main(argc, argv)
17314         int argc;
17315         char **argv;
17316 {
17317
17318         /* pthread test function */
17319 #ifndef PTHREAD_CREATE_DETACHED
17320 #define PTHREAD_CREATE_DETACHED 1
17321 #endif
17322         pthread_t t;
17323         int status;
17324         int detach = PTHREAD_CREATE_DETACHED;
17325
17326 #if HAVE_PTHREADS > 4
17327         /* Final pthreads */
17328         pthread_attr_t attr;
17329
17330         status = pthread_attr_init(&attr);
17331         if( status ) return status;
17332
17333 #if HAVE_PTHREADS < 7
17334         status = pthread_attr_setdetachstate(&attr, &detach);
17335         if( status < 0 ) status = errno;
17336 #else
17337         status = pthread_attr_setdetachstate(&attr, detach);
17338 #endif
17339         if( status ) return status;
17340         status = pthread_create( &t, &attr, task, NULL );
17341 #if HAVE_PTHREADS < 7
17342         if( status < 0 ) status = errno;
17343 #endif
17344         if( status ) return status;
17345 #else
17346         /* Draft 4 pthreads */
17347         status = pthread_create( &t, pthread_attr_default, task, NULL );
17348         if( status ) return errno;
17349
17350         /* give thread a chance to complete */
17351         /* it should remain joinable and hence detachable */
17352         sleep( 1 );
17353
17354         status = pthread_detach( &t );
17355         if( status ) return errno;
17356 #endif
17357
17358 #ifdef HAVE_LINUX_THREADS
17359         pthread_kill_other_threads_np();
17360 #endif
17361
17362         return 0;
17363
17364 }
17365
17366 _ACEOF
17367 if ac_fn_c_try_run "$LINENO"; then :
17368   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17369 else
17370   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17371 fi
17372 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17373   conftest.$ac_objext conftest.beam conftest.$ac_ext
17374 fi
17375
17376
17377                 # restore the LIBS
17378                 LIBS="$ol_LIBS"
17379
17380 fi
17381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
17382 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
17383
17384         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
17385                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
17386                 ol_link_threads=posix
17387         fi
17388 fi
17389
17390                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
17391 if test "$ol_link_threads" = no ; then
17392         # try -lpthread -lmach -lexc
17393         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
17394 $as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
17395 if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
17396   $as_echo_n "(cached) " >&6
17397 else
17398
17399                 # save the flags
17400                 ol_LIBS="$LIBS"
17401                 LIBS="-lpthread -lmach -lexc $LIBS"
17402
17403                 if test "$cross_compiling" = yes; then :
17404   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17405 /* end confdefs.h.  */
17406
17407 /* pthread test headers */
17408 #include <pthread.h>
17409 #if HAVE_PTHREADS < 7
17410 #include <errno.h>
17411 #endif
17412 #ifndef NULL
17413 #define NULL (void*)0
17414 #endif
17415
17416 static void *task(p)
17417         void *p;
17418 {
17419         return (void *) (p == NULL);
17420 }
17421
17422 int
17423 main ()
17424 {
17425
17426         /* pthread test function */
17427 #ifndef PTHREAD_CREATE_DETACHED
17428 #define PTHREAD_CREATE_DETACHED 1
17429 #endif
17430         pthread_t t;
17431         int status;
17432         int detach = PTHREAD_CREATE_DETACHED;
17433
17434 #if HAVE_PTHREADS > 4
17435         /* Final pthreads */
17436         pthread_attr_t attr;
17437
17438         status = pthread_attr_init(&attr);
17439         if( status ) return status;
17440
17441 #if HAVE_PTHREADS < 7
17442         status = pthread_attr_setdetachstate(&attr, &detach);
17443         if( status < 0 ) status = errno;
17444 #else
17445         status = pthread_attr_setdetachstate(&attr, detach);
17446 #endif
17447         if( status ) return status;
17448         status = pthread_create( &t, &attr, task, NULL );
17449 #if HAVE_PTHREADS < 7
17450         if( status < 0 ) status = errno;
17451 #endif
17452         if( status ) return status;
17453 #else
17454         /* Draft 4 pthreads */
17455         status = pthread_create( &t, pthread_attr_default, task, NULL );
17456         if( status ) return errno;
17457
17458         /* give thread a chance to complete */
17459         /* it should remain joinable and hence detachable */
17460         sleep( 1 );
17461
17462         status = pthread_detach( &t );
17463         if( status ) return errno;
17464 #endif
17465
17466 #ifdef HAVE_LINUX_THREADS
17467         pthread_kill_other_threads_np();
17468 #endif
17469
17470         return 0;
17471
17472   ;
17473   return 0;
17474 }
17475 _ACEOF
17476 if ac_fn_c_try_link "$LINENO"; then :
17477   ol_cv_pthread_lpthread_lmach_lexc=yes
17478 else
17479   ol_cv_pthread_lpthread_lmach_lexc=no
17480 fi
17481 rm -f core conftest.err conftest.$ac_objext \
17482     conftest$ac_exeext conftest.$ac_ext
17483 else
17484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17485 /* end confdefs.h.  */
17486
17487 /* pthread test headers */
17488 #include <pthread.h>
17489 #if HAVE_PTHREADS < 7
17490 #include <errno.h>
17491 #endif
17492 #ifndef NULL
17493 #define NULL (void*)0
17494 #endif
17495
17496 static void *task(p)
17497         void *p;
17498 {
17499         return (void *) (p == NULL);
17500 }
17501
17502
17503 int main(argc, argv)
17504         int argc;
17505         char **argv;
17506 {
17507
17508         /* pthread test function */
17509 #ifndef PTHREAD_CREATE_DETACHED
17510 #define PTHREAD_CREATE_DETACHED 1
17511 #endif
17512         pthread_t t;
17513         int status;
17514         int detach = PTHREAD_CREATE_DETACHED;
17515
17516 #if HAVE_PTHREADS > 4
17517         /* Final pthreads */
17518         pthread_attr_t attr;
17519
17520         status = pthread_attr_init(&attr);
17521         if( status ) return status;
17522
17523 #if HAVE_PTHREADS < 7
17524         status = pthread_attr_setdetachstate(&attr, &detach);
17525         if( status < 0 ) status = errno;
17526 #else
17527         status = pthread_attr_setdetachstate(&attr, detach);
17528 #endif
17529         if( status ) return status;
17530         status = pthread_create( &t, &attr, task, NULL );
17531 #if HAVE_PTHREADS < 7
17532         if( status < 0 ) status = errno;
17533 #endif
17534         if( status ) return status;
17535 #else
17536         /* Draft 4 pthreads */
17537         status = pthread_create( &t, pthread_attr_default, task, NULL );
17538         if( status ) return errno;
17539
17540         /* give thread a chance to complete */
17541         /* it should remain joinable and hence detachable */
17542         sleep( 1 );
17543
17544         status = pthread_detach( &t );
17545         if( status ) return errno;
17546 #endif
17547
17548 #ifdef HAVE_LINUX_THREADS
17549         pthread_kill_other_threads_np();
17550 #endif
17551
17552         return 0;
17553
17554 }
17555
17556 _ACEOF
17557 if ac_fn_c_try_run "$LINENO"; then :
17558   ol_cv_pthread_lpthread_lmach_lexc=yes
17559 else
17560   ol_cv_pthread_lpthread_lmach_lexc=no
17561 fi
17562 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17563   conftest.$ac_objext conftest.beam conftest.$ac_ext
17564 fi
17565
17566
17567                 # restore the LIBS
17568                 LIBS="$ol_LIBS"
17569
17570 fi
17571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
17572 $as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
17573
17574         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
17575                 ol_link_pthreads="-lpthread -lmach -lexc"
17576                 ol_link_threads=posix
17577         fi
17578 fi
17579
17580
17581                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
17582 if test "$ol_link_threads" = no ; then
17583         # try -lpthread -Wl,-woff,85
17584         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
17585 $as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
17586 if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
17587   $as_echo_n "(cached) " >&6
17588 else
17589
17590                 # save the flags
17591                 ol_LIBS="$LIBS"
17592                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
17593
17594                 if test "$cross_compiling" = yes; then :
17595   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17596 /* end confdefs.h.  */
17597
17598 /* pthread test headers */
17599 #include <pthread.h>
17600 #if HAVE_PTHREADS < 7
17601 #include <errno.h>
17602 #endif
17603 #ifndef NULL
17604 #define NULL (void*)0
17605 #endif
17606
17607 static void *task(p)
17608         void *p;
17609 {
17610         return (void *) (p == NULL);
17611 }
17612
17613 int
17614 main ()
17615 {
17616
17617         /* pthread test function */
17618 #ifndef PTHREAD_CREATE_DETACHED
17619 #define PTHREAD_CREATE_DETACHED 1
17620 #endif
17621         pthread_t t;
17622         int status;
17623         int detach = PTHREAD_CREATE_DETACHED;
17624
17625 #if HAVE_PTHREADS > 4
17626         /* Final pthreads */
17627         pthread_attr_t attr;
17628
17629         status = pthread_attr_init(&attr);
17630         if( status ) return status;
17631
17632 #if HAVE_PTHREADS < 7
17633         status = pthread_attr_setdetachstate(&attr, &detach);
17634         if( status < 0 ) status = errno;
17635 #else
17636         status = pthread_attr_setdetachstate(&attr, detach);
17637 #endif
17638         if( status ) return status;
17639         status = pthread_create( &t, &attr, task, NULL );
17640 #if HAVE_PTHREADS < 7
17641         if( status < 0 ) status = errno;
17642 #endif
17643         if( status ) return status;
17644 #else
17645         /* Draft 4 pthreads */
17646         status = pthread_create( &t, pthread_attr_default, task, NULL );
17647         if( status ) return errno;
17648
17649         /* give thread a chance to complete */
17650         /* it should remain joinable and hence detachable */
17651         sleep( 1 );
17652
17653         status = pthread_detach( &t );
17654         if( status ) return errno;
17655 #endif
17656
17657 #ifdef HAVE_LINUX_THREADS
17658         pthread_kill_other_threads_np();
17659 #endif
17660
17661         return 0;
17662
17663   ;
17664   return 0;
17665 }
17666 _ACEOF
17667 if ac_fn_c_try_link "$LINENO"; then :
17668   ol_cv_pthread_lib_lpthread_woff=yes
17669 else
17670   ol_cv_pthread_lib_lpthread_woff=no
17671 fi
17672 rm -f core conftest.err conftest.$ac_objext \
17673     conftest$ac_exeext conftest.$ac_ext
17674 else
17675   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17676 /* end confdefs.h.  */
17677
17678 /* pthread test headers */
17679 #include <pthread.h>
17680 #if HAVE_PTHREADS < 7
17681 #include <errno.h>
17682 #endif
17683 #ifndef NULL
17684 #define NULL (void*)0
17685 #endif
17686
17687 static void *task(p)
17688         void *p;
17689 {
17690         return (void *) (p == NULL);
17691 }
17692
17693
17694 int main(argc, argv)
17695         int argc;
17696         char **argv;
17697 {
17698
17699         /* pthread test function */
17700 #ifndef PTHREAD_CREATE_DETACHED
17701 #define PTHREAD_CREATE_DETACHED 1
17702 #endif
17703         pthread_t t;
17704         int status;
17705         int detach = PTHREAD_CREATE_DETACHED;
17706
17707 #if HAVE_PTHREADS > 4
17708         /* Final pthreads */
17709         pthread_attr_t attr;
17710
17711         status = pthread_attr_init(&attr);
17712         if( status ) return status;
17713
17714 #if HAVE_PTHREADS < 7
17715         status = pthread_attr_setdetachstate(&attr, &detach);
17716         if( status < 0 ) status = errno;
17717 #else
17718         status = pthread_attr_setdetachstate(&attr, detach);
17719 #endif
17720         if( status ) return status;
17721         status = pthread_create( &t, &attr, task, NULL );
17722 #if HAVE_PTHREADS < 7
17723         if( status < 0 ) status = errno;
17724 #endif
17725         if( status ) return status;
17726 #else
17727         /* Draft 4 pthreads */
17728         status = pthread_create( &t, pthread_attr_default, task, NULL );
17729         if( status ) return errno;
17730
17731         /* give thread a chance to complete */
17732         /* it should remain joinable and hence detachable */
17733         sleep( 1 );
17734
17735         status = pthread_detach( &t );
17736         if( status ) return errno;
17737 #endif
17738
17739 #ifdef HAVE_LINUX_THREADS
17740         pthread_kill_other_threads_np();
17741 #endif
17742
17743         return 0;
17744
17745 }
17746
17747 _ACEOF
17748 if ac_fn_c_try_run "$LINENO"; then :
17749   ol_cv_pthread_lib_lpthread_woff=yes
17750 else
17751   ol_cv_pthread_lib_lpthread_woff=no
17752 fi
17753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17754   conftest.$ac_objext conftest.beam conftest.$ac_ext
17755 fi
17756
17757
17758                 # restore the LIBS
17759                 LIBS="$ol_LIBS"
17760
17761 fi
17762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
17763 $as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
17764
17765         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
17766                 ol_link_pthreads="-lpthread -Wl,-woff,85"
17767                 ol_link_threads=posix
17768         fi
17769 fi
17770
17771
17772                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
17773 if test "$ol_link_threads" = no ; then
17774         # try -lpthread
17775         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
17776 $as_echo_n "checking for pthread link with -lpthread... " >&6; }
17777 if ${ol_cv_pthread_lpthread+:} false; then :
17778   $as_echo_n "(cached) " >&6
17779 else
17780
17781                 # save the flags
17782                 ol_LIBS="$LIBS"
17783                 LIBS="-lpthread $LIBS"
17784
17785                 if test "$cross_compiling" = yes; then :
17786   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17787 /* end confdefs.h.  */
17788
17789 /* pthread test headers */
17790 #include <pthread.h>
17791 #if HAVE_PTHREADS < 7
17792 #include <errno.h>
17793 #endif
17794 #ifndef NULL
17795 #define NULL (void*)0
17796 #endif
17797
17798 static void *task(p)
17799         void *p;
17800 {
17801         return (void *) (p == NULL);
17802 }
17803
17804 int
17805 main ()
17806 {
17807
17808         /* pthread test function */
17809 #ifndef PTHREAD_CREATE_DETACHED
17810 #define PTHREAD_CREATE_DETACHED 1
17811 #endif
17812         pthread_t t;
17813         int status;
17814         int detach = PTHREAD_CREATE_DETACHED;
17815
17816 #if HAVE_PTHREADS > 4
17817         /* Final pthreads */
17818         pthread_attr_t attr;
17819
17820         status = pthread_attr_init(&attr);
17821         if( status ) return status;
17822
17823 #if HAVE_PTHREADS < 7
17824         status = pthread_attr_setdetachstate(&attr, &detach);
17825         if( status < 0 ) status = errno;
17826 #else
17827         status = pthread_attr_setdetachstate(&attr, detach);
17828 #endif
17829         if( status ) return status;
17830         status = pthread_create( &t, &attr, task, NULL );
17831 #if HAVE_PTHREADS < 7
17832         if( status < 0 ) status = errno;
17833 #endif
17834         if( status ) return status;
17835 #else
17836         /* Draft 4 pthreads */
17837         status = pthread_create( &t, pthread_attr_default, task, NULL );
17838         if( status ) return errno;
17839
17840         /* give thread a chance to complete */
17841         /* it should remain joinable and hence detachable */
17842         sleep( 1 );
17843
17844         status = pthread_detach( &t );
17845         if( status ) return errno;
17846 #endif
17847
17848 #ifdef HAVE_LINUX_THREADS
17849         pthread_kill_other_threads_np();
17850 #endif
17851
17852         return 0;
17853
17854   ;
17855   return 0;
17856 }
17857 _ACEOF
17858 if ac_fn_c_try_link "$LINENO"; then :
17859   ol_cv_pthread_lpthread=yes
17860 else
17861   ol_cv_pthread_lpthread=no
17862 fi
17863 rm -f core conftest.err conftest.$ac_objext \
17864     conftest$ac_exeext conftest.$ac_ext
17865 else
17866   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17867 /* end confdefs.h.  */
17868
17869 /* pthread test headers */
17870 #include <pthread.h>
17871 #if HAVE_PTHREADS < 7
17872 #include <errno.h>
17873 #endif
17874 #ifndef NULL
17875 #define NULL (void*)0
17876 #endif
17877
17878 static void *task(p)
17879         void *p;
17880 {
17881         return (void *) (p == NULL);
17882 }
17883
17884
17885 int main(argc, argv)
17886         int argc;
17887         char **argv;
17888 {
17889
17890         /* pthread test function */
17891 #ifndef PTHREAD_CREATE_DETACHED
17892 #define PTHREAD_CREATE_DETACHED 1
17893 #endif
17894         pthread_t t;
17895         int status;
17896         int detach = PTHREAD_CREATE_DETACHED;
17897
17898 #if HAVE_PTHREADS > 4
17899         /* Final pthreads */
17900         pthread_attr_t attr;
17901
17902         status = pthread_attr_init(&attr);
17903         if( status ) return status;
17904
17905 #if HAVE_PTHREADS < 7
17906         status = pthread_attr_setdetachstate(&attr, &detach);
17907         if( status < 0 ) status = errno;
17908 #else
17909         status = pthread_attr_setdetachstate(&attr, detach);
17910 #endif
17911         if( status ) return status;
17912         status = pthread_create( &t, &attr, task, NULL );
17913 #if HAVE_PTHREADS < 7
17914         if( status < 0 ) status = errno;
17915 #endif
17916         if( status ) return status;
17917 #else
17918         /* Draft 4 pthreads */
17919         status = pthread_create( &t, pthread_attr_default, task, NULL );
17920         if( status ) return errno;
17921
17922         /* give thread a chance to complete */
17923         /* it should remain joinable and hence detachable */
17924         sleep( 1 );
17925
17926         status = pthread_detach( &t );
17927         if( status ) return errno;
17928 #endif
17929
17930 #ifdef HAVE_LINUX_THREADS
17931         pthread_kill_other_threads_np();
17932 #endif
17933
17934         return 0;
17935
17936 }
17937
17938 _ACEOF
17939 if ac_fn_c_try_run "$LINENO"; then :
17940   ol_cv_pthread_lpthread=yes
17941 else
17942   ol_cv_pthread_lpthread=no
17943 fi
17944 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17945   conftest.$ac_objext conftest.beam conftest.$ac_ext
17946 fi
17947
17948
17949                 # restore the LIBS
17950                 LIBS="$ol_LIBS"
17951
17952 fi
17953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
17954 $as_echo "$ol_cv_pthread_lpthread" >&6; }
17955
17956         if test $ol_cv_pthread_lpthread = yes ; then
17957                 ol_link_pthreads="-lpthread"
17958                 ol_link_threads=posix
17959         fi
17960 fi
17961
17962                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
17963 if test "$ol_link_threads" = no ; then
17964         # try -lc_r
17965         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
17966 $as_echo_n "checking for pthread link with -lc_r... " >&6; }
17967 if ${ol_cv_pthread_lc_r+:} false; then :
17968   $as_echo_n "(cached) " >&6
17969 else
17970
17971                 # save the flags
17972                 ol_LIBS="$LIBS"
17973                 LIBS="-lc_r $LIBS"
17974
17975                 if test "$cross_compiling" = yes; then :
17976   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17977 /* end confdefs.h.  */
17978
17979 /* pthread test headers */
17980 #include <pthread.h>
17981 #if HAVE_PTHREADS < 7
17982 #include <errno.h>
17983 #endif
17984 #ifndef NULL
17985 #define NULL (void*)0
17986 #endif
17987
17988 static void *task(p)
17989         void *p;
17990 {
17991         return (void *) (p == NULL);
17992 }
17993
17994 int
17995 main ()
17996 {
17997
17998         /* pthread test function */
17999 #ifndef PTHREAD_CREATE_DETACHED
18000 #define PTHREAD_CREATE_DETACHED 1
18001 #endif
18002         pthread_t t;
18003         int status;
18004         int detach = PTHREAD_CREATE_DETACHED;
18005
18006 #if HAVE_PTHREADS > 4
18007         /* Final pthreads */
18008         pthread_attr_t attr;
18009
18010         status = pthread_attr_init(&attr);
18011         if( status ) return status;
18012
18013 #if HAVE_PTHREADS < 7
18014         status = pthread_attr_setdetachstate(&attr, &detach);
18015         if( status < 0 ) status = errno;
18016 #else
18017         status = pthread_attr_setdetachstate(&attr, detach);
18018 #endif
18019         if( status ) return status;
18020         status = pthread_create( &t, &attr, task, NULL );
18021 #if HAVE_PTHREADS < 7
18022         if( status < 0 ) status = errno;
18023 #endif
18024         if( status ) return status;
18025 #else
18026         /* Draft 4 pthreads */
18027         status = pthread_create( &t, pthread_attr_default, task, NULL );
18028         if( status ) return errno;
18029
18030         /* give thread a chance to complete */
18031         /* it should remain joinable and hence detachable */
18032         sleep( 1 );
18033
18034         status = pthread_detach( &t );
18035         if( status ) return errno;
18036 #endif
18037
18038 #ifdef HAVE_LINUX_THREADS
18039         pthread_kill_other_threads_np();
18040 #endif
18041
18042         return 0;
18043
18044   ;
18045   return 0;
18046 }
18047 _ACEOF
18048 if ac_fn_c_try_link "$LINENO"; then :
18049   ol_cv_pthread_lc_r=yes
18050 else
18051   ol_cv_pthread_lc_r=no
18052 fi
18053 rm -f core conftest.err conftest.$ac_objext \
18054     conftest$ac_exeext conftest.$ac_ext
18055 else
18056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18057 /* end confdefs.h.  */
18058
18059 /* pthread test headers */
18060 #include <pthread.h>
18061 #if HAVE_PTHREADS < 7
18062 #include <errno.h>
18063 #endif
18064 #ifndef NULL
18065 #define NULL (void*)0
18066 #endif
18067
18068 static void *task(p)
18069         void *p;
18070 {
18071         return (void *) (p == NULL);
18072 }
18073
18074
18075 int main(argc, argv)
18076         int argc;
18077         char **argv;
18078 {
18079
18080         /* pthread test function */
18081 #ifndef PTHREAD_CREATE_DETACHED
18082 #define PTHREAD_CREATE_DETACHED 1
18083 #endif
18084         pthread_t t;
18085         int status;
18086         int detach = PTHREAD_CREATE_DETACHED;
18087
18088 #if HAVE_PTHREADS > 4
18089         /* Final pthreads */
18090         pthread_attr_t attr;
18091
18092         status = pthread_attr_init(&attr);
18093         if( status ) return status;
18094
18095 #if HAVE_PTHREADS < 7
18096         status = pthread_attr_setdetachstate(&attr, &detach);
18097         if( status < 0 ) status = errno;
18098 #else
18099         status = pthread_attr_setdetachstate(&attr, detach);
18100 #endif
18101         if( status ) return status;
18102         status = pthread_create( &t, &attr, task, NULL );
18103 #if HAVE_PTHREADS < 7
18104         if( status < 0 ) status = errno;
18105 #endif
18106         if( status ) return status;
18107 #else
18108         /* Draft 4 pthreads */
18109         status = pthread_create( &t, pthread_attr_default, task, NULL );
18110         if( status ) return errno;
18111
18112         /* give thread a chance to complete */
18113         /* it should remain joinable and hence detachable */
18114         sleep( 1 );
18115
18116         status = pthread_detach( &t );
18117         if( status ) return errno;
18118 #endif
18119
18120 #ifdef HAVE_LINUX_THREADS
18121         pthread_kill_other_threads_np();
18122 #endif
18123
18124         return 0;
18125
18126 }
18127
18128 _ACEOF
18129 if ac_fn_c_try_run "$LINENO"; then :
18130   ol_cv_pthread_lc_r=yes
18131 else
18132   ol_cv_pthread_lc_r=no
18133 fi
18134 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18135   conftest.$ac_objext conftest.beam conftest.$ac_ext
18136 fi
18137
18138
18139                 # restore the LIBS
18140                 LIBS="$ol_LIBS"
18141
18142 fi
18143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
18144 $as_echo "$ol_cv_pthread_lc_r" >&6; }
18145
18146         if test $ol_cv_pthread_lc_r = yes ; then
18147                 ol_link_pthreads="-lc_r"
18148                 ol_link_threads=posix
18149         fi
18150 fi
18151
18152
18153                 # Pthread try link: -threads (ol_cv_pthread_threads)
18154 if test "$ol_link_threads" = no ; then
18155         # try -threads
18156         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
18157 $as_echo_n "checking for pthread link with -threads... " >&6; }
18158 if ${ol_cv_pthread_threads+:} false; then :
18159   $as_echo_n "(cached) " >&6
18160 else
18161
18162                 # save the flags
18163                 ol_LIBS="$LIBS"
18164                 LIBS="-threads $LIBS"
18165
18166                 if test "$cross_compiling" = yes; then :
18167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18168 /* end confdefs.h.  */
18169
18170 /* pthread test headers */
18171 #include <pthread.h>
18172 #if HAVE_PTHREADS < 7
18173 #include <errno.h>
18174 #endif
18175 #ifndef NULL
18176 #define NULL (void*)0
18177 #endif
18178
18179 static void *task(p)
18180         void *p;
18181 {
18182         return (void *) (p == NULL);
18183 }
18184
18185 int
18186 main ()
18187 {
18188
18189         /* pthread test function */
18190 #ifndef PTHREAD_CREATE_DETACHED
18191 #define PTHREAD_CREATE_DETACHED 1
18192 #endif
18193         pthread_t t;
18194         int status;
18195         int detach = PTHREAD_CREATE_DETACHED;
18196
18197 #if HAVE_PTHREADS > 4
18198         /* Final pthreads */
18199         pthread_attr_t attr;
18200
18201         status = pthread_attr_init(&attr);
18202         if( status ) return status;
18203
18204 #if HAVE_PTHREADS < 7
18205         status = pthread_attr_setdetachstate(&attr, &detach);
18206         if( status < 0 ) status = errno;
18207 #else
18208         status = pthread_attr_setdetachstate(&attr, detach);
18209 #endif
18210         if( status ) return status;
18211         status = pthread_create( &t, &attr, task, NULL );
18212 #if HAVE_PTHREADS < 7
18213         if( status < 0 ) status = errno;
18214 #endif
18215         if( status ) return status;
18216 #else
18217         /* Draft 4 pthreads */
18218         status = pthread_create( &t, pthread_attr_default, task, NULL );
18219         if( status ) return errno;
18220
18221         /* give thread a chance to complete */
18222         /* it should remain joinable and hence detachable */
18223         sleep( 1 );
18224
18225         status = pthread_detach( &t );
18226         if( status ) return errno;
18227 #endif
18228
18229 #ifdef HAVE_LINUX_THREADS
18230         pthread_kill_other_threads_np();
18231 #endif
18232
18233         return 0;
18234
18235   ;
18236   return 0;
18237 }
18238 _ACEOF
18239 if ac_fn_c_try_link "$LINENO"; then :
18240   ol_cv_pthread_threads=yes
18241 else
18242   ol_cv_pthread_threads=no
18243 fi
18244 rm -f core conftest.err conftest.$ac_objext \
18245     conftest$ac_exeext conftest.$ac_ext
18246 else
18247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18248 /* end confdefs.h.  */
18249
18250 /* pthread test headers */
18251 #include <pthread.h>
18252 #if HAVE_PTHREADS < 7
18253 #include <errno.h>
18254 #endif
18255 #ifndef NULL
18256 #define NULL (void*)0
18257 #endif
18258
18259 static void *task(p)
18260         void *p;
18261 {
18262         return (void *) (p == NULL);
18263 }
18264
18265
18266 int main(argc, argv)
18267         int argc;
18268         char **argv;
18269 {
18270
18271         /* pthread test function */
18272 #ifndef PTHREAD_CREATE_DETACHED
18273 #define PTHREAD_CREATE_DETACHED 1
18274 #endif
18275         pthread_t t;
18276         int status;
18277         int detach = PTHREAD_CREATE_DETACHED;
18278
18279 #if HAVE_PTHREADS > 4
18280         /* Final pthreads */
18281         pthread_attr_t attr;
18282
18283         status = pthread_attr_init(&attr);
18284         if( status ) return status;
18285
18286 #if HAVE_PTHREADS < 7
18287         status = pthread_attr_setdetachstate(&attr, &detach);
18288         if( status < 0 ) status = errno;
18289 #else
18290         status = pthread_attr_setdetachstate(&attr, detach);
18291 #endif
18292         if( status ) return status;
18293         status = pthread_create( &t, &attr, task, NULL );
18294 #if HAVE_PTHREADS < 7
18295         if( status < 0 ) status = errno;
18296 #endif
18297         if( status ) return status;
18298 #else
18299         /* Draft 4 pthreads */
18300         status = pthread_create( &t, pthread_attr_default, task, NULL );
18301         if( status ) return errno;
18302
18303         /* give thread a chance to complete */
18304         /* it should remain joinable and hence detachable */
18305         sleep( 1 );
18306
18307         status = pthread_detach( &t );
18308         if( status ) return errno;
18309 #endif
18310
18311 #ifdef HAVE_LINUX_THREADS
18312         pthread_kill_other_threads_np();
18313 #endif
18314
18315         return 0;
18316
18317 }
18318
18319 _ACEOF
18320 if ac_fn_c_try_run "$LINENO"; then :
18321   ol_cv_pthread_threads=yes
18322 else
18323   ol_cv_pthread_threads=no
18324 fi
18325 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18326   conftest.$ac_objext conftest.beam conftest.$ac_ext
18327 fi
18328
18329
18330                 # restore the LIBS
18331                 LIBS="$ol_LIBS"
18332
18333 fi
18334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
18335 $as_echo "$ol_cv_pthread_threads" >&6; }
18336
18337         if test $ol_cv_pthread_threads = yes ; then
18338                 ol_link_pthreads="-threads"
18339                 ol_link_threads=posix
18340         fi
18341 fi
18342
18343
18344                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
18345 if test "$ol_link_threads" = no ; then
18346         # try -lpthreads -lmach -lexc -lc_r
18347         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
18348 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
18349 if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
18350   $as_echo_n "(cached) " >&6
18351 else
18352
18353                 # save the flags
18354                 ol_LIBS="$LIBS"
18355                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
18356
18357                 if test "$cross_compiling" = yes; then :
18358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18359 /* end confdefs.h.  */
18360
18361 /* pthread test headers */
18362 #include <pthread.h>
18363 #if HAVE_PTHREADS < 7
18364 #include <errno.h>
18365 #endif
18366 #ifndef NULL
18367 #define NULL (void*)0
18368 #endif
18369
18370 static void *task(p)
18371         void *p;
18372 {
18373         return (void *) (p == NULL);
18374 }
18375
18376 int
18377 main ()
18378 {
18379
18380         /* pthread test function */
18381 #ifndef PTHREAD_CREATE_DETACHED
18382 #define PTHREAD_CREATE_DETACHED 1
18383 #endif
18384         pthread_t t;
18385         int status;
18386         int detach = PTHREAD_CREATE_DETACHED;
18387
18388 #if HAVE_PTHREADS > 4
18389         /* Final pthreads */
18390         pthread_attr_t attr;
18391
18392         status = pthread_attr_init(&attr);
18393         if( status ) return status;
18394
18395 #if HAVE_PTHREADS < 7
18396         status = pthread_attr_setdetachstate(&attr, &detach);
18397         if( status < 0 ) status = errno;
18398 #else
18399         status = pthread_attr_setdetachstate(&attr, detach);
18400 #endif
18401         if( status ) return status;
18402         status = pthread_create( &t, &attr, task, NULL );
18403 #if HAVE_PTHREADS < 7
18404         if( status < 0 ) status = errno;
18405 #endif
18406         if( status ) return status;
18407 #else
18408         /* Draft 4 pthreads */
18409         status = pthread_create( &t, pthread_attr_default, task, NULL );
18410         if( status ) return errno;
18411
18412         /* give thread a chance to complete */
18413         /* it should remain joinable and hence detachable */
18414         sleep( 1 );
18415
18416         status = pthread_detach( &t );
18417         if( status ) return errno;
18418 #endif
18419
18420 #ifdef HAVE_LINUX_THREADS
18421         pthread_kill_other_threads_np();
18422 #endif
18423
18424         return 0;
18425
18426   ;
18427   return 0;
18428 }
18429 _ACEOF
18430 if ac_fn_c_try_link "$LINENO"; then :
18431   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18432 else
18433   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18434 fi
18435 rm -f core conftest.err conftest.$ac_objext \
18436     conftest$ac_exeext conftest.$ac_ext
18437 else
18438   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18439 /* end confdefs.h.  */
18440
18441 /* pthread test headers */
18442 #include <pthread.h>
18443 #if HAVE_PTHREADS < 7
18444 #include <errno.h>
18445 #endif
18446 #ifndef NULL
18447 #define NULL (void*)0
18448 #endif
18449
18450 static void *task(p)
18451         void *p;
18452 {
18453         return (void *) (p == NULL);
18454 }
18455
18456
18457 int main(argc, argv)
18458         int argc;
18459         char **argv;
18460 {
18461
18462         /* pthread test function */
18463 #ifndef PTHREAD_CREATE_DETACHED
18464 #define PTHREAD_CREATE_DETACHED 1
18465 #endif
18466         pthread_t t;
18467         int status;
18468         int detach = PTHREAD_CREATE_DETACHED;
18469
18470 #if HAVE_PTHREADS > 4
18471         /* Final pthreads */
18472         pthread_attr_t attr;
18473
18474         status = pthread_attr_init(&attr);
18475         if( status ) return status;
18476
18477 #if HAVE_PTHREADS < 7
18478         status = pthread_attr_setdetachstate(&attr, &detach);
18479         if( status < 0 ) status = errno;
18480 #else
18481         status = pthread_attr_setdetachstate(&attr, detach);
18482 #endif
18483         if( status ) return status;
18484         status = pthread_create( &t, &attr, task, NULL );
18485 #if HAVE_PTHREADS < 7
18486         if( status < 0 ) status = errno;
18487 #endif
18488         if( status ) return status;
18489 #else
18490         /* Draft 4 pthreads */
18491         status = pthread_create( &t, pthread_attr_default, task, NULL );
18492         if( status ) return errno;
18493
18494         /* give thread a chance to complete */
18495         /* it should remain joinable and hence detachable */
18496         sleep( 1 );
18497
18498         status = pthread_detach( &t );
18499         if( status ) return errno;
18500 #endif
18501
18502 #ifdef HAVE_LINUX_THREADS
18503         pthread_kill_other_threads_np();
18504 #endif
18505
18506         return 0;
18507
18508 }
18509
18510 _ACEOF
18511 if ac_fn_c_try_run "$LINENO"; then :
18512   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18513 else
18514   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18515 fi
18516 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18517   conftest.$ac_objext conftest.beam conftest.$ac_ext
18518 fi
18519
18520
18521                 # restore the LIBS
18522                 LIBS="$ol_LIBS"
18523
18524 fi
18525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
18526 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
18527
18528         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
18529                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
18530                 ol_link_threads=posix
18531         fi
18532 fi
18533
18534                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
18535 if test "$ol_link_threads" = no ; then
18536         # try -lpthreads -lmach -lexc
18537         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
18538 $as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
18539 if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
18540   $as_echo_n "(cached) " >&6
18541 else
18542
18543                 # save the flags
18544                 ol_LIBS="$LIBS"
18545                 LIBS="-lpthreads -lmach -lexc $LIBS"
18546
18547                 if test "$cross_compiling" = yes; then :
18548   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18549 /* end confdefs.h.  */
18550
18551 /* pthread test headers */
18552 #include <pthread.h>
18553 #if HAVE_PTHREADS < 7
18554 #include <errno.h>
18555 #endif
18556 #ifndef NULL
18557 #define NULL (void*)0
18558 #endif
18559
18560 static void *task(p)
18561         void *p;
18562 {
18563         return (void *) (p == NULL);
18564 }
18565
18566 int
18567 main ()
18568 {
18569
18570         /* pthread test function */
18571 #ifndef PTHREAD_CREATE_DETACHED
18572 #define PTHREAD_CREATE_DETACHED 1
18573 #endif
18574         pthread_t t;
18575         int status;
18576         int detach = PTHREAD_CREATE_DETACHED;
18577
18578 #if HAVE_PTHREADS > 4
18579         /* Final pthreads */
18580         pthread_attr_t attr;
18581
18582         status = pthread_attr_init(&attr);
18583         if( status ) return status;
18584
18585 #if HAVE_PTHREADS < 7
18586         status = pthread_attr_setdetachstate(&attr, &detach);
18587         if( status < 0 ) status = errno;
18588 #else
18589         status = pthread_attr_setdetachstate(&attr, detach);
18590 #endif
18591         if( status ) return status;
18592         status = pthread_create( &t, &attr, task, NULL );
18593 #if HAVE_PTHREADS < 7
18594         if( status < 0 ) status = errno;
18595 #endif
18596         if( status ) return status;
18597 #else
18598         /* Draft 4 pthreads */
18599         status = pthread_create( &t, pthread_attr_default, task, NULL );
18600         if( status ) return errno;
18601
18602         /* give thread a chance to complete */
18603         /* it should remain joinable and hence detachable */
18604         sleep( 1 );
18605
18606         status = pthread_detach( &t );
18607         if( status ) return errno;
18608 #endif
18609
18610 #ifdef HAVE_LINUX_THREADS
18611         pthread_kill_other_threads_np();
18612 #endif
18613
18614         return 0;
18615
18616   ;
18617   return 0;
18618 }
18619 _ACEOF
18620 if ac_fn_c_try_link "$LINENO"; then :
18621   ol_cv_pthread_lpthreads_lmach_lexc=yes
18622 else
18623   ol_cv_pthread_lpthreads_lmach_lexc=no
18624 fi
18625 rm -f core conftest.err conftest.$ac_objext \
18626     conftest$ac_exeext conftest.$ac_ext
18627 else
18628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18629 /* end confdefs.h.  */
18630
18631 /* pthread test headers */
18632 #include <pthread.h>
18633 #if HAVE_PTHREADS < 7
18634 #include <errno.h>
18635 #endif
18636 #ifndef NULL
18637 #define NULL (void*)0
18638 #endif
18639
18640 static void *task(p)
18641         void *p;
18642 {
18643         return (void *) (p == NULL);
18644 }
18645
18646
18647 int main(argc, argv)
18648         int argc;
18649         char **argv;
18650 {
18651
18652         /* pthread test function */
18653 #ifndef PTHREAD_CREATE_DETACHED
18654 #define PTHREAD_CREATE_DETACHED 1
18655 #endif
18656         pthread_t t;
18657         int status;
18658         int detach = PTHREAD_CREATE_DETACHED;
18659
18660 #if HAVE_PTHREADS > 4
18661         /* Final pthreads */
18662         pthread_attr_t attr;
18663
18664         status = pthread_attr_init(&attr);
18665         if( status ) return status;
18666
18667 #if HAVE_PTHREADS < 7
18668         status = pthread_attr_setdetachstate(&attr, &detach);
18669         if( status < 0 ) status = errno;
18670 #else
18671         status = pthread_attr_setdetachstate(&attr, detach);
18672 #endif
18673         if( status ) return status;
18674         status = pthread_create( &t, &attr, task, NULL );
18675 #if HAVE_PTHREADS < 7
18676         if( status < 0 ) status = errno;
18677 #endif
18678         if( status ) return status;
18679 #else
18680         /* Draft 4 pthreads */
18681         status = pthread_create( &t, pthread_attr_default, task, NULL );
18682         if( status ) return errno;
18683
18684         /* give thread a chance to complete */
18685         /* it should remain joinable and hence detachable */
18686         sleep( 1 );
18687
18688         status = pthread_detach( &t );
18689         if( status ) return errno;
18690 #endif
18691
18692 #ifdef HAVE_LINUX_THREADS
18693         pthread_kill_other_threads_np();
18694 #endif
18695
18696         return 0;
18697
18698 }
18699
18700 _ACEOF
18701 if ac_fn_c_try_run "$LINENO"; then :
18702   ol_cv_pthread_lpthreads_lmach_lexc=yes
18703 else
18704   ol_cv_pthread_lpthreads_lmach_lexc=no
18705 fi
18706 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18707   conftest.$ac_objext conftest.beam conftest.$ac_ext
18708 fi
18709
18710
18711                 # restore the LIBS
18712                 LIBS="$ol_LIBS"
18713
18714 fi
18715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
18716 $as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
18717
18718         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
18719                 ol_link_pthreads="-lpthreads -lmach -lexc"
18720                 ol_link_threads=posix
18721         fi
18722 fi
18723
18724                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
18725 if test "$ol_link_threads" = no ; then
18726         # try -lpthreads -lexc
18727         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
18728 $as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
18729 if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
18730   $as_echo_n "(cached) " >&6
18731 else
18732
18733                 # save the flags
18734                 ol_LIBS="$LIBS"
18735                 LIBS="-lpthreads -lexc $LIBS"
18736
18737                 if test "$cross_compiling" = yes; then :
18738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18739 /* end confdefs.h.  */
18740
18741 /* pthread test headers */
18742 #include <pthread.h>
18743 #if HAVE_PTHREADS < 7
18744 #include <errno.h>
18745 #endif
18746 #ifndef NULL
18747 #define NULL (void*)0
18748 #endif
18749
18750 static void *task(p)
18751         void *p;
18752 {
18753         return (void *) (p == NULL);
18754 }
18755
18756 int
18757 main ()
18758 {
18759
18760         /* pthread test function */
18761 #ifndef PTHREAD_CREATE_DETACHED
18762 #define PTHREAD_CREATE_DETACHED 1
18763 #endif
18764         pthread_t t;
18765         int status;
18766         int detach = PTHREAD_CREATE_DETACHED;
18767
18768 #if HAVE_PTHREADS > 4
18769         /* Final pthreads */
18770         pthread_attr_t attr;
18771
18772         status = pthread_attr_init(&attr);
18773         if( status ) return status;
18774
18775 #if HAVE_PTHREADS < 7
18776         status = pthread_attr_setdetachstate(&attr, &detach);
18777         if( status < 0 ) status = errno;
18778 #else
18779         status = pthread_attr_setdetachstate(&attr, detach);
18780 #endif
18781         if( status ) return status;
18782         status = pthread_create( &t, &attr, task, NULL );
18783 #if HAVE_PTHREADS < 7
18784         if( status < 0 ) status = errno;
18785 #endif
18786         if( status ) return status;
18787 #else
18788         /* Draft 4 pthreads */
18789         status = pthread_create( &t, pthread_attr_default, task, NULL );
18790         if( status ) return errno;
18791
18792         /* give thread a chance to complete */
18793         /* it should remain joinable and hence detachable */
18794         sleep( 1 );
18795
18796         status = pthread_detach( &t );
18797         if( status ) return errno;
18798 #endif
18799
18800 #ifdef HAVE_LINUX_THREADS
18801         pthread_kill_other_threads_np();
18802 #endif
18803
18804         return 0;
18805
18806   ;
18807   return 0;
18808 }
18809 _ACEOF
18810 if ac_fn_c_try_link "$LINENO"; then :
18811   ol_cv_pthread_lpthreads_lexc=yes
18812 else
18813   ol_cv_pthread_lpthreads_lexc=no
18814 fi
18815 rm -f core conftest.err conftest.$ac_objext \
18816     conftest$ac_exeext conftest.$ac_ext
18817 else
18818   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18819 /* end confdefs.h.  */
18820
18821 /* pthread test headers */
18822 #include <pthread.h>
18823 #if HAVE_PTHREADS < 7
18824 #include <errno.h>
18825 #endif
18826 #ifndef NULL
18827 #define NULL (void*)0
18828 #endif
18829
18830 static void *task(p)
18831         void *p;
18832 {
18833         return (void *) (p == NULL);
18834 }
18835
18836
18837 int main(argc, argv)
18838         int argc;
18839         char **argv;
18840 {
18841
18842         /* pthread test function */
18843 #ifndef PTHREAD_CREATE_DETACHED
18844 #define PTHREAD_CREATE_DETACHED 1
18845 #endif
18846         pthread_t t;
18847         int status;
18848         int detach = PTHREAD_CREATE_DETACHED;
18849
18850 #if HAVE_PTHREADS > 4
18851         /* Final pthreads */
18852         pthread_attr_t attr;
18853
18854         status = pthread_attr_init(&attr);
18855         if( status ) return status;
18856
18857 #if HAVE_PTHREADS < 7
18858         status = pthread_attr_setdetachstate(&attr, &detach);
18859         if( status < 0 ) status = errno;
18860 #else
18861         status = pthread_attr_setdetachstate(&attr, detach);
18862 #endif
18863         if( status ) return status;
18864         status = pthread_create( &t, &attr, task, NULL );
18865 #if HAVE_PTHREADS < 7
18866         if( status < 0 ) status = errno;
18867 #endif
18868         if( status ) return status;
18869 #else
18870         /* Draft 4 pthreads */
18871         status = pthread_create( &t, pthread_attr_default, task, NULL );
18872         if( status ) return errno;
18873
18874         /* give thread a chance to complete */
18875         /* it should remain joinable and hence detachable */
18876         sleep( 1 );
18877
18878         status = pthread_detach( &t );
18879         if( status ) return errno;
18880 #endif
18881
18882 #ifdef HAVE_LINUX_THREADS
18883         pthread_kill_other_threads_np();
18884 #endif
18885
18886         return 0;
18887
18888 }
18889
18890 _ACEOF
18891 if ac_fn_c_try_run "$LINENO"; then :
18892   ol_cv_pthread_lpthreads_lexc=yes
18893 else
18894   ol_cv_pthread_lpthreads_lexc=no
18895 fi
18896 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18897   conftest.$ac_objext conftest.beam conftest.$ac_ext
18898 fi
18899
18900
18901                 # restore the LIBS
18902                 LIBS="$ol_LIBS"
18903
18904 fi
18905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
18906 $as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
18907
18908         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
18909                 ol_link_pthreads="-lpthreads -lexc"
18910                 ol_link_threads=posix
18911         fi
18912 fi
18913
18914
18915                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
18916 if test "$ol_link_threads" = no ; then
18917         # try -lpthreads
18918         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
18919 $as_echo_n "checking for pthread link with -lpthreads... " >&6; }
18920 if ${ol_cv_pthread_lib_lpthreads+:} false; then :
18921   $as_echo_n "(cached) " >&6
18922 else
18923
18924                 # save the flags
18925                 ol_LIBS="$LIBS"
18926                 LIBS="-lpthreads $LIBS"
18927
18928                 if test "$cross_compiling" = yes; then :
18929   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18930 /* end confdefs.h.  */
18931
18932 /* pthread test headers */
18933 #include <pthread.h>
18934 #if HAVE_PTHREADS < 7
18935 #include <errno.h>
18936 #endif
18937 #ifndef NULL
18938 #define NULL (void*)0
18939 #endif
18940
18941 static void *task(p)
18942         void *p;
18943 {
18944         return (void *) (p == NULL);
18945 }
18946
18947 int
18948 main ()
18949 {
18950
18951         /* pthread test function */
18952 #ifndef PTHREAD_CREATE_DETACHED
18953 #define PTHREAD_CREATE_DETACHED 1
18954 #endif
18955         pthread_t t;
18956         int status;
18957         int detach = PTHREAD_CREATE_DETACHED;
18958
18959 #if HAVE_PTHREADS > 4
18960         /* Final pthreads */
18961         pthread_attr_t attr;
18962
18963         status = pthread_attr_init(&attr);
18964         if( status ) return status;
18965
18966 #if HAVE_PTHREADS < 7
18967         status = pthread_attr_setdetachstate(&attr, &detach);
18968         if( status < 0 ) status = errno;
18969 #else
18970         status = pthread_attr_setdetachstate(&attr, detach);
18971 #endif
18972         if( status ) return status;
18973         status = pthread_create( &t, &attr, task, NULL );
18974 #if HAVE_PTHREADS < 7
18975         if( status < 0 ) status = errno;
18976 #endif
18977         if( status ) return status;
18978 #else
18979         /* Draft 4 pthreads */
18980         status = pthread_create( &t, pthread_attr_default, task, NULL );
18981         if( status ) return errno;
18982
18983         /* give thread a chance to complete */
18984         /* it should remain joinable and hence detachable */
18985         sleep( 1 );
18986
18987         status = pthread_detach( &t );
18988         if( status ) return errno;
18989 #endif
18990
18991 #ifdef HAVE_LINUX_THREADS
18992         pthread_kill_other_threads_np();
18993 #endif
18994
18995         return 0;
18996
18997   ;
18998   return 0;
18999 }
19000 _ACEOF
19001 if ac_fn_c_try_link "$LINENO"; then :
19002   ol_cv_pthread_lib_lpthreads=yes
19003 else
19004   ol_cv_pthread_lib_lpthreads=no
19005 fi
19006 rm -f core conftest.err conftest.$ac_objext \
19007     conftest$ac_exeext conftest.$ac_ext
19008 else
19009   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19010 /* end confdefs.h.  */
19011
19012 /* pthread test headers */
19013 #include <pthread.h>
19014 #if HAVE_PTHREADS < 7
19015 #include <errno.h>
19016 #endif
19017 #ifndef NULL
19018 #define NULL (void*)0
19019 #endif
19020
19021 static void *task(p)
19022         void *p;
19023 {
19024         return (void *) (p == NULL);
19025 }
19026
19027
19028 int main(argc, argv)
19029         int argc;
19030         char **argv;
19031 {
19032
19033         /* pthread test function */
19034 #ifndef PTHREAD_CREATE_DETACHED
19035 #define PTHREAD_CREATE_DETACHED 1
19036 #endif
19037         pthread_t t;
19038         int status;
19039         int detach = PTHREAD_CREATE_DETACHED;
19040
19041 #if HAVE_PTHREADS > 4
19042         /* Final pthreads */
19043         pthread_attr_t attr;
19044
19045         status = pthread_attr_init(&attr);
19046         if( status ) return status;
19047
19048 #if HAVE_PTHREADS < 7
19049         status = pthread_attr_setdetachstate(&attr, &detach);
19050         if( status < 0 ) status = errno;
19051 #else
19052         status = pthread_attr_setdetachstate(&attr, detach);
19053 #endif
19054         if( status ) return status;
19055         status = pthread_create( &t, &attr, task, NULL );
19056 #if HAVE_PTHREADS < 7
19057         if( status < 0 ) status = errno;
19058 #endif
19059         if( status ) return status;
19060 #else
19061         /* Draft 4 pthreads */
19062         status = pthread_create( &t, pthread_attr_default, task, NULL );
19063         if( status ) return errno;
19064
19065         /* give thread a chance to complete */
19066         /* it should remain joinable and hence detachable */
19067         sleep( 1 );
19068
19069         status = pthread_detach( &t );
19070         if( status ) return errno;
19071 #endif
19072
19073 #ifdef HAVE_LINUX_THREADS
19074         pthread_kill_other_threads_np();
19075 #endif
19076
19077         return 0;
19078
19079 }
19080
19081 _ACEOF
19082 if ac_fn_c_try_run "$LINENO"; then :
19083   ol_cv_pthread_lib_lpthreads=yes
19084 else
19085   ol_cv_pthread_lib_lpthreads=no
19086 fi
19087 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19088   conftest.$ac_objext conftest.beam conftest.$ac_ext
19089 fi
19090
19091
19092                 # restore the LIBS
19093                 LIBS="$ol_LIBS"
19094
19095 fi
19096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
19097 $as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
19098
19099         if test $ol_cv_pthread_lib_lpthreads = yes ; then
19100                 ol_link_pthreads="-lpthreads"
19101                 ol_link_threads=posix
19102         fi
19103 fi
19104
19105
19106                 if test $ol_link_threads != no ; then
19107                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
19108
19109                                                 save_CPPFLAGS="$CPPFLAGS"
19110                         save_LIBS="$LIBS"
19111                         LIBS="$LTHREAD_LIBS $LIBS"
19112
19113                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
19114 do :
19115   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19116 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19117 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19118   cat >>confdefs.h <<_ACEOF
19119 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19120 _ACEOF
19121
19122 fi
19123 done
19124
19125
19126                         if test $ac_cv_func_sched_yield = no &&
19127                            test $ac_cv_func_pthread_yield = no &&
19128                            test $ac_cv_func_thr_yield = no ; then
19129                                                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
19130 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
19131 if ${ac_cv_lib_rt_sched_yield+:} false; then :
19132   $as_echo_n "(cached) " >&6
19133 else
19134   ac_check_lib_save_LIBS=$LIBS
19135 LIBS="-lrt  $LIBS"
19136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19137 /* end confdefs.h.  */
19138
19139 /* Override any GCC internal prototype to avoid an error.
19140    Use char because int might match the return type of a GCC
19141    builtin and then its argument prototype would still apply.  */
19142 #ifdef __cplusplus
19143 extern "C"
19144 #endif
19145 char sched_yield ();
19146 int
19147 main ()
19148 {
19149 return sched_yield ();
19150   ;
19151   return 0;
19152 }
19153 _ACEOF
19154 if ac_fn_c_try_link "$LINENO"; then :
19155   ac_cv_lib_rt_sched_yield=yes
19156 else
19157   ac_cv_lib_rt_sched_yield=no
19158 fi
19159 rm -f core conftest.err conftest.$ac_objext \
19160     conftest$ac_exeext conftest.$ac_ext
19161 LIBS=$ac_check_lib_save_LIBS
19162 fi
19163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19164 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
19165 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
19166   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
19167
19168 $as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
19169
19170                                         ac_cv_func_sched_yield=yes
19171 else
19172   ac_cv_func_sched_yield=no
19173 fi
19174
19175                         fi
19176                         if test $ac_cv_func_sched_yield = no &&
19177                            test $ac_cv_func_pthread_yield = no &&
19178                            test "$ac_cv_func_thr_yield" = no ; then
19179                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
19180 $as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
19181                         fi
19182
19183                                                 for ac_func in pthread_kill
19184 do :
19185   ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
19186 if test "x$ac_cv_func_pthread_kill" = xyes; then :
19187   cat >>confdefs.h <<_ACEOF
19188 #define HAVE_PTHREAD_KILL 1
19189 _ACEOF
19190
19191 fi
19192 done
19193
19194
19195                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
19196 $as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
19197 if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
19198   $as_echo_n "(cached) " >&6
19199 else
19200
19201                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19202 /* end confdefs.h.  */
19203
19204 #include <pthread.h>
19205 pthread_rwlock_t rwlock;
19206
19207 int
19208 main ()
19209 {
19210 pthread_rwlock_destroy(&rwlock);
19211   ;
19212   return 0;
19213 }
19214 _ACEOF
19215 if ac_fn_c_try_link "$LINENO"; then :
19216   ol_cv_func_pthread_rwlock_destroy=yes
19217 else
19218   ol_cv_func_pthread_rwlock_destroy=no
19219 fi
19220 rm -f core conftest.err conftest.$ac_objext \
19221     conftest$ac_exeext conftest.$ac_ext
19222
19223 fi
19224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
19225 $as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
19226                         if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
19227
19228 $as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
19229
19230                         fi
19231
19232                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
19233 $as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
19234 if ${ol_cv_func_pthread_detach+:} false; then :
19235   $as_echo_n "(cached) " >&6
19236 else
19237
19238                                                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19239 /* end confdefs.h.  */
19240
19241 #include <pthread.h>
19242 #ifndef NULL
19243 #define NULL (void*)0
19244 #endif
19245
19246 int
19247 main ()
19248 {
19249 pthread_detach(NULL);
19250   ;
19251   return 0;
19252 }
19253 _ACEOF
19254 if ac_fn_c_try_link "$LINENO"; then :
19255   ol_cv_func_pthread_detach=yes
19256 else
19257   ol_cv_func_pthread_detach=no
19258 fi
19259 rm -f core conftest.err conftest.$ac_objext \
19260     conftest$ac_exeext conftest.$ac_ext
19261
19262 fi
19263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
19264 $as_echo "$ol_cv_func_pthread_detach" >&6; }
19265
19266                         if test $ol_cv_func_pthread_detach = no ; then
19267                                 as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
19268                         fi
19269
19270
19271 $as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
19272
19273
19274                                                 for ac_func in \
19275                                 pthread_setconcurrency \
19276                                 pthread_getconcurrency \
19277                                 thr_setconcurrency \
19278                                 thr_getconcurrency \
19279
19280 do :
19281   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19282 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19283 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19284   cat >>confdefs.h <<_ACEOF
19285 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19286 _ACEOF
19287
19288 fi
19289 done
19290
19291
19292
19293         for ac_func in pthread_kill_other_threads_np
19294 do :
19295   ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
19296 if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
19297   cat >>confdefs.h <<_ACEOF
19298 #define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
19299 _ACEOF
19300
19301 fi
19302 done
19303
19304         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
19305 $as_echo_n "checking for LinuxThreads implementation... " >&6; }
19306 if ${ol_cv_sys_linux_threads+:} false; then :
19307   $as_echo_n "(cached) " >&6
19308 else
19309   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
19310 fi
19311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
19312 $as_echo "$ol_cv_sys_linux_threads" >&6; }
19313
19314
19315
19316
19317         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
19318 $as_echo_n "checking for LinuxThreads consistency... " >&6; }
19319 if ${ol_cv_linux_threads+:} false; then :
19320   $as_echo_n "(cached) " >&6
19321 else
19322
19323                 if test $ol_cv_header_linux_threads = yes &&
19324                    test $ol_cv_sys_linux_threads = yes; then
19325                         ol_cv_linux_threads=yes
19326                 elif test $ol_cv_header_linux_threads = no &&
19327                      test $ol_cv_sys_linux_threads = no; then
19328                         ol_cv_linux_threads=no
19329                 else
19330                         ol_cv_linux_threads=error
19331                 fi
19332
19333 fi
19334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
19335 $as_echo "$ol_cv_linux_threads" >&6; }
19336
19337
19338                         if test $ol_cv_linux_threads = error; then
19339                                 as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
19340                         fi
19341
19342                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
19343 $as_echo_n "checking if pthread_create() works... " >&6; }
19344 if ${ol_cv_pthread_create_works+:} false; then :
19345   $as_echo_n "(cached) " >&6
19346 else
19347
19348                         if test "$cross_compiling" = yes; then :
19349                                 ol_cv_pthread_create_works=yes
19350 else
19351   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19352 /* end confdefs.h.  */
19353
19354 /* pthread test headers */
19355 #include <pthread.h>
19356 #if HAVE_PTHREADS < 7
19357 #include <errno.h>
19358 #endif
19359 #ifndef NULL
19360 #define NULL (void*)0
19361 #endif
19362
19363 static void *task(p)
19364         void *p;
19365 {
19366         return (void *) (p == NULL);
19367 }
19368
19369
19370 int main(argc, argv)
19371         int argc;
19372         char **argv;
19373 {
19374
19375         /* pthread test function */
19376 #ifndef PTHREAD_CREATE_DETACHED
19377 #define PTHREAD_CREATE_DETACHED 1
19378 #endif
19379         pthread_t t;
19380         int status;
19381         int detach = PTHREAD_CREATE_DETACHED;
19382
19383 #if HAVE_PTHREADS > 4
19384         /* Final pthreads */
19385         pthread_attr_t attr;
19386
19387         status = pthread_attr_init(&attr);
19388         if( status ) return status;
19389
19390 #if HAVE_PTHREADS < 7
19391         status = pthread_attr_setdetachstate(&attr, &detach);
19392         if( status < 0 ) status = errno;
19393 #else
19394         status = pthread_attr_setdetachstate(&attr, detach);
19395 #endif
19396         if( status ) return status;
19397         status = pthread_create( &t, &attr, task, NULL );
19398 #if HAVE_PTHREADS < 7
19399         if( status < 0 ) status = errno;
19400 #endif
19401         if( status ) return status;
19402 #else
19403         /* Draft 4 pthreads */
19404         status = pthread_create( &t, pthread_attr_default, task, NULL );
19405         if( status ) return errno;
19406
19407         /* give thread a chance to complete */
19408         /* it should remain joinable and hence detachable */
19409         sleep( 1 );
19410
19411         status = pthread_detach( &t );
19412         if( status ) return errno;
19413 #endif
19414
19415 #ifdef HAVE_LINUX_THREADS
19416         pthread_kill_other_threads_np();
19417 #endif
19418
19419         return 0;
19420
19421 }
19422
19423 _ACEOF
19424 if ac_fn_c_try_run "$LINENO"; then :
19425   ol_cv_pthread_create_works=yes
19426 else
19427   ol_cv_pthread_create_works=no
19428 fi
19429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19430   conftest.$ac_objext conftest.beam conftest.$ac_ext
19431 fi
19432
19433 fi
19434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
19435 $as_echo "$ol_cv_pthread_create_works" >&6; }
19436
19437                         if test $ol_cv_pthread_create_works = no ; then
19438                                 as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
19439                         fi
19440
19441                         ol_replace_broken_yield=no
19442
19443                         if test $ol_replace_broken_yield = yes ; then
19444
19445 $as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
19446
19447                         fi
19448
19449                                                 if test $ol_with_yielding_select = auto ; then
19450                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
19451 $as_echo_n "checking if select yields when using pthreads... " >&6; }
19452 if ${ol_cv_pthread_select_yields+:} false; then :
19453   $as_echo_n "(cached) " >&6
19454 else
19455
19456                                 if test "$cross_compiling" = yes; then :
19457   ol_cv_pthread_select_yields=cross
19458 else
19459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19460 /* end confdefs.h.  */
19461
19462 #include <sys/types.h>
19463 #include <sys/time.h>
19464 #include <unistd.h>
19465 #include <pthread.h>
19466 #ifndef NULL
19467 #define NULL (void*) 0
19468 #endif
19469
19470 static int fildes[2];
19471
19472 static void *task(p)
19473         void *p;
19474 {
19475         int i;
19476         struct timeval tv;
19477
19478         fd_set rfds;
19479
19480         tv.tv_sec=10;
19481         tv.tv_usec=0;
19482
19483         FD_ZERO(&rfds);
19484         FD_SET(fildes[0], &rfds);
19485
19486         /* we're not interested in any fds */
19487         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
19488
19489         if(i < 0) {
19490                 perror("select");
19491                 exit(10);
19492         }
19493
19494         exit(0); /* if we exit here, the select blocked the whole process */
19495 }
19496
19497 int main(argc, argv)
19498         int argc;
19499         char **argv;
19500 {
19501         pthread_t t;
19502
19503         /* create a pipe to select */
19504         if(pipe(&fildes[0])) {
19505                 perror("select");
19506                 exit(1);
19507         }
19508
19509 #ifdef HAVE_PTHREAD_SETCONCURRENCY
19510         (void) pthread_setconcurrency(2);
19511 #else
19512 #ifdef HAVE_THR_SETCONCURRENCY
19513         /* Set Solaris LWP concurrency to 2 */
19514         thr_setconcurrency(2);
19515 #endif
19516 #endif
19517
19518 #if HAVE_PTHREADS < 6
19519         pthread_create(&t, pthread_attr_default, task, NULL);
19520 #else
19521         pthread_create(&t, NULL, task, NULL);
19522 #endif
19523
19524         /* make sure task runs first */
19525 #ifdef HAVE_THR_YIELD
19526         thr_yield();
19527 #elif defined( HAVE_SCHED_YIELD )
19528         sched_yield();
19529 #elif defined( HAVE_PTHREAD_YIELD )
19530         pthread_yield();
19531 #endif
19532
19533         exit(2);
19534 }
19535 _ACEOF
19536 if ac_fn_c_try_run "$LINENO"; then :
19537   ol_cv_pthread_select_yields=no
19538 else
19539   ol_cv_pthread_select_yields=yes
19540 fi
19541 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19542   conftest.$ac_objext conftest.beam conftest.$ac_ext
19543 fi
19544
19545 fi
19546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
19547 $as_echo "$ol_cv_pthread_select_yields" >&6; }
19548
19549                                 if test $ol_cv_pthread_select_yields = cross ; then
19550                                         as_fn_error $? "crossing compiling: use --with-yielding_select=yes|no|manual" "$LINENO" 5
19551                                 fi
19552
19553                                 if test $ol_cv_pthread_select_yields = yes ; then
19554                                         ol_with_yielding_select=yes
19555                                 fi
19556                         fi
19557
19558                                                 CPPFLAGS="$save_CPPFLAGS"
19559                         LIBS="$save_LIBS"
19560                 else
19561                         as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
19562                 fi
19563         fi
19564
19565         if test $ol_with_threads = posix ; then
19566                 as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
19567         fi
19568         ;;
19569 esac
19570
19571 case $ol_with_threads in auto | yes | mach)
19572
19573                 for ac_header in mach/cthreads.h cthreads.h
19574 do :
19575   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19576 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19577 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
19578   cat >>confdefs.h <<_ACEOF
19579 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19580 _ACEOF
19581
19582 fi
19583
19584 done
19585
19586         if test $ac_cv_header_mach_cthreads_h = yes ; then
19587                 ol_with_threads=found
19588
19589                                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19590 if test "x$ac_cv_func_cthread_fork" = xyes; then :
19591   ol_link_threads=yes
19592 fi
19593
19594
19595                 if test $ol_link_threads = no ; then
19596                                                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
19597 $as_echo_n "checking for cthread_fork with -all_load... " >&6; }
19598 if ${ol_cv_cthread_all_load+:} false; then :
19599   $as_echo_n "(cached) " >&6
19600 else
19601
19602                                                                 save_LIBS="$LIBS"
19603                                 LIBS="-all_load $LIBS"
19604                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19605 /* end confdefs.h.  */
19606 #include <mach/cthreads.h>
19607 int
19608 main ()
19609 {
19610
19611                                         cthread_fork((void *)0, (void *)0);
19612
19613   ;
19614   return 0;
19615 }
19616 _ACEOF
19617 if ac_fn_c_try_link "$LINENO"; then :
19618   ol_cv_cthread_all_load=yes
19619 else
19620   ol_cv_cthread_all_load=no
19621 fi
19622 rm -f core conftest.err conftest.$ac_objext \
19623     conftest$ac_exeext conftest.$ac_ext
19624                                                                 LIBS="$save_LIBS"
19625
19626 fi
19627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
19628 $as_echo "$ol_cv_cthread_all_load" >&6; }
19629
19630                         if test $ol_cv_cthread_all_load = yes ; then
19631                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
19632                                 ol_link_threads=mach
19633                                 ol_with_threads=found
19634                         fi
19635                 fi
19636
19637         elif test $ac_cv_header_cthreads_h = yes ; then
19638
19639                 ol_with_threads=found
19640
19641                                 save_LIBS="$LIBS"
19642                 LIBS="$LIBS -lthreads"
19643                 ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19644 if test "x$ac_cv_func_cthread_fork" = xyes; then :
19645   ol_link_threads=yes
19646 fi
19647
19648                 LIBS="$save_LIBS"
19649
19650                 if test $ol_link_threads = yes ; then
19651                         LTHREAD_LIBS="-lthreads"
19652                         ol_link_threads=mach
19653                         ol_with_threads=found
19654                 else
19655                         as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
19656                 fi
19657
19658         elif test $ol_with_threads = mach ; then
19659                 as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
19660         fi
19661
19662         if test $ol_link_threads = mach ; then
19663
19664 $as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
19665
19666         elif test $ol_with_threads = found ; then
19667                 as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
19668         fi
19669         ;;
19670 esac
19671
19672 case $ol_with_threads in auto | yes | pth)
19673
19674         for ac_header in pth.h
19675 do :
19676   ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
19677 if test "x$ac_cv_header_pth_h" = xyes; then :
19678   cat >>confdefs.h <<_ACEOF
19679 #define HAVE_PTH_H 1
19680 _ACEOF
19681
19682 fi
19683
19684 done
19685
19686
19687         if test $ac_cv_header_pth_h = yes ; then
19688                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
19689 $as_echo_n "checking for pth_version in -lpth... " >&6; }
19690 if ${ac_cv_lib_pth_pth_version+:} false; then :
19691   $as_echo_n "(cached) " >&6
19692 else
19693   ac_check_lib_save_LIBS=$LIBS
19694 LIBS="-lpth  $LIBS"
19695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19696 /* end confdefs.h.  */
19697
19698 /* Override any GCC internal prototype to avoid an error.
19699    Use char because int might match the return type of a GCC
19700    builtin and then its argument prototype would still apply.  */
19701 #ifdef __cplusplus
19702 extern "C"
19703 #endif
19704 char pth_version ();
19705 int
19706 main ()
19707 {
19708 return pth_version ();
19709   ;
19710   return 0;
19711 }
19712 _ACEOF
19713 if ac_fn_c_try_link "$LINENO"; then :
19714   ac_cv_lib_pth_pth_version=yes
19715 else
19716   ac_cv_lib_pth_pth_version=no
19717 fi
19718 rm -f core conftest.err conftest.$ac_objext \
19719     conftest$ac_exeext conftest.$ac_ext
19720 LIBS=$ac_check_lib_save_LIBS
19721 fi
19722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
19723 $as_echo "$ac_cv_lib_pth_pth_version" >&6; }
19724 if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
19725   have_pth=yes
19726 else
19727   have_pth=no
19728 fi
19729
19730
19731                 if test $have_pth = yes ; then
19732
19733 $as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
19734
19735                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
19736                         ol_link_threads=pth
19737                         ol_with_threads=found
19738
19739                         if test $ol_with_yielding_select = auto ; then
19740                                 ol_with_yielding_select=yes
19741                         fi
19742                 fi
19743         fi
19744         ;;
19745 esac
19746
19747 case $ol_with_threads in auto | yes | lwp)
19748
19749                 for ac_header in thread.h synch.h
19750 do :
19751   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19752 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19753 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
19754   cat >>confdefs.h <<_ACEOF
19755 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19756 _ACEOF
19757
19758 fi
19759
19760 done
19761
19762         if test $ac_cv_header_thread_h = yes &&
19763            test $ac_cv_header_synch_h = yes ; then
19764                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
19765 $as_echo_n "checking for thr_create in -lthread... " >&6; }
19766 if ${ac_cv_lib_thread_thr_create+:} false; then :
19767   $as_echo_n "(cached) " >&6
19768 else
19769   ac_check_lib_save_LIBS=$LIBS
19770 LIBS="-lthread  $LIBS"
19771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19772 /* end confdefs.h.  */
19773
19774 /* Override any GCC internal prototype to avoid an error.
19775    Use char because int might match the return type of a GCC
19776    builtin and then its argument prototype would still apply.  */
19777 #ifdef __cplusplus
19778 extern "C"
19779 #endif
19780 char thr_create ();
19781 int
19782 main ()
19783 {
19784 return thr_create ();
19785   ;
19786   return 0;
19787 }
19788 _ACEOF
19789 if ac_fn_c_try_link "$LINENO"; then :
19790   ac_cv_lib_thread_thr_create=yes
19791 else
19792   ac_cv_lib_thread_thr_create=no
19793 fi
19794 rm -f core conftest.err conftest.$ac_objext \
19795     conftest$ac_exeext conftest.$ac_ext
19796 LIBS=$ac_check_lib_save_LIBS
19797 fi
19798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
19799 $as_echo "$ac_cv_lib_thread_thr_create" >&6; }
19800 if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
19801   have_thr=yes
19802 else
19803   have_thr=no
19804 fi
19805
19806
19807                 if test $have_thr = yes ; then
19808
19809 $as_echo "#define HAVE_THR 1" >>confdefs.h
19810
19811                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
19812                         ol_link_threads=thr
19813
19814                         if test $ol_with_yielding_select = auto ; then
19815                                 ol_with_yielding_select=yes
19816                         fi
19817
19818                                                 for ac_func in \
19819                                 thr_setconcurrency \
19820                                 thr_getconcurrency \
19821
19822 do :
19823   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19824 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19825 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19826   cat >>confdefs.h <<_ACEOF
19827 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19828 _ACEOF
19829
19830 fi
19831 done
19832
19833                 fi
19834         fi
19835         ;;
19836 esac
19837
19838 if test $ol_with_yielding_select = yes ; then
19839
19840 $as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
19841
19842 fi
19843
19844 if test $ol_with_threads = manual ; then
19845                 ol_link_threads=yes
19846
19847         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
19848 $as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
19849
19850         for ac_header in pthread.h sched.h
19851 do :
19852   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19853 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19854 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
19855   cat >>confdefs.h <<_ACEOF
19856 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19857 _ACEOF
19858
19859 fi
19860
19861 done
19862
19863         for ac_func in sched_yield pthread_yield
19864 do :
19865   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19866 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19867 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19868   cat >>confdefs.h <<_ACEOF
19869 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19870 _ACEOF
19871
19872 fi
19873 done
19874
19875
19876         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
19877 $as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
19878 if ${ol_cv_header_linux_threads+:} false; then :
19879   $as_echo_n "(cached) " >&6
19880 else
19881   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19882 /* end confdefs.h.  */
19883 #include <pthread.h>
19884 _ACEOF
19885 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19886   $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
19887   ol_cv_header_linux_threads=yes
19888 else
19889   ol_cv_header_linux_threads=no
19890 fi
19891 rm -f conftest*
19892
19893
19894 fi
19895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
19896 $as_echo "$ol_cv_header_linux_threads" >&6; }
19897         if test $ol_cv_header_linux_threads = yes; then
19898
19899 $as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
19900
19901         fi
19902
19903
19904         for ac_header in mach/cthreads.h
19905 do :
19906   ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
19907 if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
19908   cat >>confdefs.h <<_ACEOF
19909 #define HAVE_MACH_CTHREADS_H 1
19910 _ACEOF
19911
19912 fi
19913
19914 done
19915
19916         for ac_header in thread.h synch.h
19917 do :
19918   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19919 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19920 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
19921   cat >>confdefs.h <<_ACEOF
19922 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19923 _ACEOF
19924
19925 fi
19926
19927 done
19928
19929 fi
19930
19931 if test $ol_link_threads != no && test $ol_link_threads != nt ; then
19932                         $as_echo "#define REENTRANT 1" >>confdefs.h
19933
19934         $as_echo "#define _REENTRANT 1" >>confdefs.h
19935
19936         $as_echo "#define THREAD_SAFE 1" >>confdefs.h
19937
19938         $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
19939
19940         $as_echo "#define THREADSAFE 1" >>confdefs.h
19941
19942         $as_echo "#define _THREADSAFE 1" >>confdefs.h
19943
19944         $as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
19945
19946
19947                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
19948 $as_echo_n "checking for thread specific errno... " >&6; }
19949 if ${ol_cv_errno_thread_specific+:} false; then :
19950   $as_echo_n "(cached) " >&6
19951 else
19952
19953                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19954 /* end confdefs.h.  */
19955 #include <errno.h>
19956 int
19957 main ()
19958 {
19959 errno = 0;
19960   ;
19961   return 0;
19962 }
19963 _ACEOF
19964 if ac_fn_c_try_link "$LINENO"; then :
19965   ol_cv_errno_thread_specific=yes
19966 else
19967   ol_cv_errno_thread_specific=no
19968 fi
19969 rm -f core conftest.err conftest.$ac_objext \
19970     conftest$ac_exeext conftest.$ac_ext
19971
19972 fi
19973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
19974 $as_echo "$ol_cv_errno_thread_specific" >&6; }
19975
19976                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
19977 $as_echo_n "checking for thread specific h_errno... " >&6; }
19978 if ${ol_cv_h_errno_thread_specific+:} false; then :
19979   $as_echo_n "(cached) " >&6
19980 else
19981
19982                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19983 /* end confdefs.h.  */
19984 #include <netdb.h>
19985 int
19986 main ()
19987 {
19988 h_errno = 0;
19989   ;
19990   return 0;
19991 }
19992 _ACEOF
19993 if ac_fn_c_try_link "$LINENO"; then :
19994   ol_cv_h_errno_thread_specific=yes
19995 else
19996   ol_cv_h_errno_thread_specific=no
19997 fi
19998 rm -f core conftest.err conftest.$ac_objext \
19999     conftest$ac_exeext conftest.$ac_ext
20000
20001 fi
20002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
20003 $as_echo "$ol_cv_h_errno_thread_specific" >&6; }
20004
20005         if test $ol_cv_errno_thread_specific != yes ||
20006            test $ol_cv_h_errno_thread_specific != yes ; then
20007                 LIBS="$LTHREAD_LIBS $LIBS"
20008                 LTHREAD_LIBS=""
20009         fi
20010
20011 fi
20012
20013 if test $ol_link_threads = no ; then
20014         if test $ol_with_threads = yes ; then
20015                 as_fn_error $? "no suitable thread support" "$LINENO" 5
20016         fi
20017
20018         if test $ol_with_threads = auto ; then
20019                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
20020 $as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
20021                 ol_with_threads=no
20022         fi
20023
20024
20025 $as_echo "#define NO_THREADS 1" >>confdefs.h
20026
20027         LTHREAD_LIBS=""
20028         BUILD_THREAD=no
20029 else
20030         BUILD_THREAD=yes
20031 fi
20032
20033 if test $ol_link_threads != no ; then
20034
20035 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
20036
20037 fi
20038
20039 for ac_func in \
20040         ctime_r                 \
20041         gmtime_r localtime_r \
20042         gethostbyname_r gethostbyaddr_r \
20043
20044 do :
20045   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20046 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20047 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20048   cat >>confdefs.h <<_ACEOF
20049 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20050 _ACEOF
20051
20052 fi
20053 done
20054
20055
20056 if test "$ac_cv_func_ctime_r" = no ; then
20057         ol_cv_func_ctime_r_nargs=0
20058 else
20059         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of ctime_r" >&5
20060 $as_echo_n "checking number of arguments of ctime_r... " >&6; }
20061 if ${ol_cv_func_ctime_r_nargs+:} false; then :
20062   $as_echo_n "(cached) " >&6
20063 else
20064   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20065 /* end confdefs.h.  */
20066 #include <time.h>
20067 int
20068 main ()
20069 {
20070 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
20071   ;
20072   return 0;
20073 }
20074 _ACEOF
20075 if ac_fn_c_try_compile "$LINENO"; then :
20076   ol_cv_func_ctime_r_nargs3=yes
20077 else
20078   ol_cv_func_ctime_r_nargs3=no
20079 fi
20080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20081
20082         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20083 /* end confdefs.h.  */
20084 #include <time.h>
20085 int
20086 main ()
20087 {
20088 time_t ti; char *buffer; ctime_r(&ti,buffer);
20089   ;
20090   return 0;
20091 }
20092 _ACEOF
20093 if ac_fn_c_try_compile "$LINENO"; then :
20094   ol_cv_func_ctime_r_nargs2=yes
20095 else
20096   ol_cv_func_ctime_r_nargs2=no
20097 fi
20098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20099
20100         if test $ol_cv_func_ctime_r_nargs3 = yes &&
20101            test $ol_cv_func_ctime_r_nargs2 = no ; then
20102
20103                 ol_cv_func_ctime_r_nargs=3
20104
20105         elif test $ol_cv_func_ctime_r_nargs3 = no &&
20106              test $ol_cv_func_ctime_r_nargs2 = yes ; then
20107
20108                 ol_cv_func_ctime_r_nargs=2
20109
20110         else
20111                 ol_cv_func_ctime_r_nargs=0
20112         fi
20113
20114 fi
20115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_ctime_r_nargs" >&5
20116 $as_echo "$ol_cv_func_ctime_r_nargs" >&6; }
20117
20118   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
20119
20120 cat >>confdefs.h <<_ACEOF
20121 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
20122 _ACEOF
20123
20124   fi
20125
20126 fi
20127
20128 if test "$ac_cv_func_gethostbyname_r" = yes ; then
20129         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyname_r" >&5
20130 $as_echo_n "checking number of arguments of gethostbyname_r... " >&6; }
20131 if ${ol_cv_func_gethostbyname_r_nargs+:} false; then :
20132   $as_echo_n "(cached) " >&6
20133 else
20134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20135 /* end confdefs.h.  */
20136 #include <sys/types.h>
20137 #include <sys/socket.h>
20138 #include <netinet/in.h>
20139 #include <netdb.h>
20140 #define BUFSIZE (sizeof(struct hostent)+10)
20141 int
20142 main ()
20143 {
20144 struct hostent hent; char buffer[BUFSIZE];
20145                 int bufsize=BUFSIZE;int h_errno;
20146                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
20147                         buffer, bufsize, &h_errno);
20148   ;
20149   return 0;
20150 }
20151 _ACEOF
20152 if ac_fn_c_try_compile "$LINENO"; then :
20153   ol_cv_func_gethostbyname_r_nargs5=yes
20154 else
20155   ol_cv_func_gethostbyname_r_nargs5=no
20156 fi
20157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20158
20159         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20160 /* end confdefs.h.  */
20161 #include <sys/types.h>
20162 #include <sys/socket.h>
20163 #include <netinet/in.h>
20164 #include <netdb.h>
20165 #define BUFSIZE (sizeof(struct hostent)+10)
20166 int
20167 main ()
20168 {
20169 struct hostent hent;struct hostent *rhent;
20170                 char buffer[BUFSIZE];
20171                 int bufsize=BUFSIZE;int h_errno;
20172                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
20173                         &rhent, &h_errno);
20174   ;
20175   return 0;
20176 }
20177 _ACEOF
20178 if ac_fn_c_try_compile "$LINENO"; then :
20179   ol_cv_func_gethostbyname_r_nargs6=yes
20180 else
20181   ol_cv_func_gethostbyname_r_nargs6=no
20182 fi
20183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20184
20185         if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
20186            test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
20187
20188                 ol_cv_func_gethostbyname_r_nargs=5
20189
20190         elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
20191              test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
20192
20193                 ol_cv_func_gethostbyname_r_nargs=6
20194
20195         else
20196                 ol_cv_func_gethostbyname_r_nargs=0
20197         fi
20198
20199 fi
20200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyname_r_nargs" >&5
20201 $as_echo "$ol_cv_func_gethostbyname_r_nargs" >&6; }
20202   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
20203
20204 cat >>confdefs.h <<_ACEOF
20205 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
20206 _ACEOF
20207
20208   fi
20209
20210 else
20211         ol_cv_func_gethostbyname_r_nargs=0
20212 fi
20213
20214 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
20215         { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyaddr_r" >&5
20216 $as_echo_n "checking number of arguments of gethostbyaddr_r... " >&6; }
20217 if ${ol_cv_func_gethostbyaddr_r_nargs+:} false; then :
20218   $as_echo_n "(cached) " >&6
20219 else
20220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20221 /* end confdefs.h.  */
20222 #include <sys/types.h>
20223 #include <sys/socket.h>
20224 #include <netinet/in.h>
20225 #include <netdb.h>
20226 #define BUFSIZE (sizeof(struct hostent)+10)
20227 int
20228 main ()
20229 {
20230 struct hostent hent; char buffer[BUFSIZE];
20231             struct in_addr add;
20232             size_t alen=sizeof(struct in_addr);
20233             int bufsize=BUFSIZE;int h_errno;
20234                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20235                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
20236   ;
20237   return 0;
20238 }
20239 _ACEOF
20240 if ac_fn_c_try_compile "$LINENO"; then :
20241   ol_cv_func_gethostbyaddr_r_nargs7=yes
20242 else
20243   ol_cv_func_gethostbyaddr_r_nargs7=no
20244 fi
20245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20246
20247         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20248 /* end confdefs.h.  */
20249 #include <sys/types.h>
20250 #include <sys/socket.h>
20251 #include <netinet/in.h>
20252 #include <netdb.h>
20253 #define BUFSIZE (sizeof(struct hostent)+10)
20254 int
20255 main ()
20256 {
20257 struct hostent hent;
20258                 struct hostent *rhent; char buffer[BUFSIZE];
20259                 struct in_addr add;
20260                 size_t alen=sizeof(struct in_addr);
20261                 int bufsize=BUFSIZE;int h_errno;
20262                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
20263                         alen, AF_INET, &hent, buffer, bufsize,
20264                         &rhent, &h_errno);
20265   ;
20266   return 0;
20267 }
20268 _ACEOF
20269 if ac_fn_c_try_compile "$LINENO"; then :
20270   ol_cv_func_gethostbyaddr_r_nargs8=yes
20271 else
20272   ol_cv_func_gethostbyaddr_r_nargs8=no
20273 fi
20274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20275
20276         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
20277            test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
20278
20279                 ol_cv_func_gethostbyaddr_r_nargs=7
20280
20281         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
20282              test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
20283
20284                 ol_cv_func_gethostbyaddr_r_nargs=8
20285
20286         else
20287                 ol_cv_func_gethostbyaddr_r_nargs=0
20288         fi
20289
20290 fi
20291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
20292 $as_echo "$ol_cv_func_gethostbyaddr_r_nargs" >&6; }
20293   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
20294
20295 cat >>confdefs.h <<_ACEOF
20296 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
20297 _ACEOF
20298
20299   fi
20300
20301 else
20302         ol_cv_func_gethostbyaddr_r_nargs=0
20303 fi
20304
20305 ol_link_bdb=no
20306
20307 if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
20308         ol_cv_berkeley_db=no
20309 for ac_header in db.h
20310 do :
20311   ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default"
20312 if test "x$ac_cv_header_db_h" = xyes; then :
20313   cat >>confdefs.h <<_ACEOF
20314 #define HAVE_DB_H 1
20315 _ACEOF
20316
20317 fi
20318
20319 done
20320
20321 if test $ac_cv_header_db_h = yes; then
20322         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB major version in db.h" >&5
20323 $as_echo_n "checking for Berkeley DB major version in db.h... " >&6; }
20324 if ${ol_cv_bdb_major+:} false; then :
20325   $as_echo_n "(cached) " >&6
20326 else
20327
20328         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20329 /* end confdefs.h.  */
20330
20331 #include <db.h>
20332 #ifndef DB_VERSION_MAJOR
20333 #       define DB_VERSION_MAJOR 1
20334 #endif
20335 __db_version DB_VERSION_MAJOR
20336
20337 _ACEOF
20338         set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
20339         ol_cv_bdb_major=${3}
20340
20341 fi
20342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_major" >&5
20343 $as_echo "$ol_cv_bdb_major" >&6; }
20344 case $ol_cv_bdb_major in [1-9]*) : ;; *)
20345         as_fn_error $? "Unknown Berkeley DB major version in db.h" "$LINENO" 5 ;;
20346 esac
20347
20348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB minor version in db.h" >&5
20349 $as_echo_n "checking for Berkeley DB minor version in db.h... " >&6; }
20350 if ${ol_cv_bdb_minor+:} false; then :
20351   $as_echo_n "(cached) " >&6
20352 else
20353
20354         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20355 /* end confdefs.h.  */
20356
20357 #include <db.h>
20358 #ifndef DB_VERSION_MINOR
20359 #       define DB_VERSION_MINOR 0
20360 #endif
20361 __db_version DB_VERSION_MINOR
20362
20363 _ACEOF
20364         set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none
20365         ol_cv_bdb_minor=${3}
20366
20367 fi
20368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_minor" >&5
20369 $as_echo "$ol_cv_bdb_minor" >&6; }
20370 case $ol_cv_bdb_minor in [0-9]*) : ;; *)
20371         as_fn_error $? "Unknown Berkeley DB minor version in db.h" "$LINENO" 5 ;;
20372 esac
20373
20374         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Berkeley DB version supported by BDB/HDB backends" >&5
20375 $as_echo_n "checking if Berkeley DB version supported by BDB/HDB backends... " >&6; }
20376 if ${ol_cv_bdb_compat+:} false; then :
20377   $as_echo_n "(cached) " >&6
20378 else
20379
20380         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20381 /* end confdefs.h.  */
20382
20383 #include <db.h>
20384
20385  /* this check could be improved */
20386 #ifndef DB_VERSION_MAJOR
20387 #       define DB_VERSION_MAJOR 1
20388 #endif
20389 #ifndef DB_VERSION_MINOR
20390 #       define DB_VERSION_MINOR 0
20391 #endif
20392
20393 #define DB_VERSION_MM   ((DB_VERSION_MAJOR<<8)|DB_VERSION_MINOR)
20394
20395 /* require 4.4 or later */
20396 #if DB_VERSION_MM >= 0x0404
20397         __db_version_compat
20398 #endif
20399
20400 _ACEOF
20401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20402   $EGREP "__db_version_compat" >/dev/null 2>&1; then :
20403   ol_cv_bdb_compat=yes
20404 else
20405   ol_cv_bdb_compat=no
20406 fi
20407 rm -f conftest*
20408
20409 fi
20410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_compat" >&5
20411 $as_echo "$ol_cv_bdb_compat" >&6; }
20412
20413
20414         if test $ol_cv_bdb_compat != yes ; then
20415                 as_fn_error $? "BerkeleyDB version incompatible with BDB/HDB backends" "$LINENO" 5
20416         fi
20417
20418         ol_cv_lib_db=no
20419
20420 if test $ol_cv_bdb_major = 5 ; then
20421         if test $ol_cv_lib_db = no ; then
20422         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)" >&5
20423 $as_echo_n "checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)... " >&6; }
20424 if ${ol_cv_db_db_5_dot_m+:} false; then :
20425   $as_echo_n "(cached) " >&6
20426 else
20427
20428         ol_DB_LIB=-ldb-5.$ol_cv_bdb_minor
20429         ol_LIBS=$LIBS
20430         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20431
20432         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20433 /* end confdefs.h.  */
20434
20435 #ifdef HAVE_DB_185_H
20436 # include <db_185.h>
20437 #else
20438 # include <db.h>
20439 #endif
20440
20441 #ifndef DB_VERSION_MAJOR
20442 # define DB_VERSION_MAJOR 1
20443 #endif
20444
20445 #ifndef NULL
20446 #define NULL ((void*)0)
20447 #endif
20448
20449 int
20450 main ()
20451 {
20452
20453 #if DB_VERSION_MAJOR > 2
20454         db_env_create( NULL, 0 );
20455 #elif DB_VERSION_MAJOR > 1
20456         db_appexit( NULL );
20457 #else
20458         (void) dbopen( NULL, 0, 0, 0, NULL);
20459 #endif
20460
20461   ;
20462   return 0;
20463 }
20464 _ACEOF
20465 if ac_fn_c_try_link "$LINENO"; then :
20466   ol_cv_db_db_5_dot_m=yes
20467 else
20468   ol_cv_db_db_5_dot_m=no
20469 fi
20470 rm -f core conftest.err conftest.$ac_objext \
20471     conftest$ac_exeext conftest.$ac_ext
20472
20473         LIBS="$ol_LIBS"
20474
20475 fi
20476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_dot_m" >&5
20477 $as_echo "$ol_cv_db_db_5_dot_m" >&6; }
20478
20479         if test $ol_cv_db_db_5_dot_m = yes ; then
20480                 ol_cv_lib_db=-ldb-5.$ol_cv_bdb_minor
20481         fi
20482 fi
20483
20484         if test $ol_cv_lib_db = no ; then
20485         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)" >&5
20486 $as_echo_n "checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)... " >&6; }
20487 if ${ol_cv_db_db5m+:} false; then :
20488   $as_echo_n "(cached) " >&6
20489 else
20490
20491         ol_DB_LIB=-ldb5$ol_cv_bdb_minor
20492         ol_LIBS=$LIBS
20493         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20494
20495         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20496 /* end confdefs.h.  */
20497
20498 #ifdef HAVE_DB_185_H
20499 # include <db_185.h>
20500 #else
20501 # include <db.h>
20502 #endif
20503
20504 #ifndef DB_VERSION_MAJOR
20505 # define DB_VERSION_MAJOR 1
20506 #endif
20507
20508 #ifndef NULL
20509 #define NULL ((void*)0)
20510 #endif
20511
20512 int
20513 main ()
20514 {
20515
20516 #if DB_VERSION_MAJOR > 2
20517         db_env_create( NULL, 0 );
20518 #elif DB_VERSION_MAJOR > 1
20519         db_appexit( NULL );
20520 #else
20521         (void) dbopen( NULL, 0, 0, 0, NULL);
20522 #endif
20523
20524   ;
20525   return 0;
20526 }
20527 _ACEOF
20528 if ac_fn_c_try_link "$LINENO"; then :
20529   ol_cv_db_db5m=yes
20530 else
20531   ol_cv_db_db5m=no
20532 fi
20533 rm -f core conftest.err conftest.$ac_objext \
20534     conftest$ac_exeext conftest.$ac_ext
20535
20536         LIBS="$ol_LIBS"
20537
20538 fi
20539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5m" >&5
20540 $as_echo "$ol_cv_db_db5m" >&6; }
20541
20542         if test $ol_cv_db_db5m = yes ; then
20543                 ol_cv_lib_db=-ldb5$ol_cv_bdb_minor
20544         fi
20545 fi
20546
20547         if test $ol_cv_lib_db = no ; then
20548         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)" >&5
20549 $as_echo_n "checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)... " >&6; }
20550 if ${ol_cv_db_db_5m+:} false; then :
20551   $as_echo_n "(cached) " >&6
20552 else
20553
20554         ol_DB_LIB=-ldb-5$ol_cv_bdb_minor
20555         ol_LIBS=$LIBS
20556         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20557
20558         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20559 /* end confdefs.h.  */
20560
20561 #ifdef HAVE_DB_185_H
20562 # include <db_185.h>
20563 #else
20564 # include <db.h>
20565 #endif
20566
20567 #ifndef DB_VERSION_MAJOR
20568 # define DB_VERSION_MAJOR 1
20569 #endif
20570
20571 #ifndef NULL
20572 #define NULL ((void*)0)
20573 #endif
20574
20575 int
20576 main ()
20577 {
20578
20579 #if DB_VERSION_MAJOR > 2
20580         db_env_create( NULL, 0 );
20581 #elif DB_VERSION_MAJOR > 1
20582         db_appexit( NULL );
20583 #else
20584         (void) dbopen( NULL, 0, 0, 0, NULL);
20585 #endif
20586
20587   ;
20588   return 0;
20589 }
20590 _ACEOF
20591 if ac_fn_c_try_link "$LINENO"; then :
20592   ol_cv_db_db_5m=yes
20593 else
20594   ol_cv_db_db_5m=no
20595 fi
20596 rm -f core conftest.err conftest.$ac_objext \
20597     conftest$ac_exeext conftest.$ac_ext
20598
20599         LIBS="$ol_LIBS"
20600
20601 fi
20602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5m" >&5
20603 $as_echo "$ol_cv_db_db_5m" >&6; }
20604
20605         if test $ol_cv_db_db_5m = yes ; then
20606                 ol_cv_lib_db=-ldb-5$ol_cv_bdb_minor
20607         fi
20608 fi
20609
20610         if test $ol_cv_lib_db = no ; then
20611         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)" >&5
20612 $as_echo_n "checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)... " >&6; }
20613 if ${ol_cv_db_db_5_m+:} false; then :
20614   $as_echo_n "(cached) " >&6
20615 else
20616
20617         ol_DB_LIB=-ldb-5-$ol_cv_bdb_minor
20618         ol_LIBS=$LIBS
20619         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20620
20621         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20622 /* end confdefs.h.  */
20623
20624 #ifdef HAVE_DB_185_H
20625 # include <db_185.h>
20626 #else
20627 # include <db.h>
20628 #endif
20629
20630 #ifndef DB_VERSION_MAJOR
20631 # define DB_VERSION_MAJOR 1
20632 #endif
20633
20634 #ifndef NULL
20635 #define NULL ((void*)0)
20636 #endif
20637
20638 int
20639 main ()
20640 {
20641
20642 #if DB_VERSION_MAJOR > 2
20643         db_env_create( NULL, 0 );
20644 #elif DB_VERSION_MAJOR > 1
20645         db_appexit( NULL );
20646 #else
20647         (void) dbopen( NULL, 0, 0, 0, NULL);
20648 #endif
20649
20650   ;
20651   return 0;
20652 }
20653 _ACEOF
20654 if ac_fn_c_try_link "$LINENO"; then :
20655   ol_cv_db_db_5_m=yes
20656 else
20657   ol_cv_db_db_5_m=no
20658 fi
20659 rm -f core conftest.err conftest.$ac_objext \
20660     conftest$ac_exeext conftest.$ac_ext
20661
20662         LIBS="$ol_LIBS"
20663
20664 fi
20665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_m" >&5
20666 $as_echo "$ol_cv_db_db_5_m" >&6; }
20667
20668         if test $ol_cv_db_db_5_m = yes ; then
20669                 ol_cv_lib_db=-ldb-5-$ol_cv_bdb_minor
20670         fi
20671 fi
20672
20673         if test $ol_cv_lib_db = no ; then
20674         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5)" >&5
20675 $as_echo_n "checking for Berkeley DB link (-ldb-5)... " >&6; }
20676 if ${ol_cv_db_db_5+:} false; then :
20677   $as_echo_n "(cached) " >&6
20678 else
20679
20680         ol_DB_LIB=-ldb-5
20681         ol_LIBS=$LIBS
20682         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20683
20684         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20685 /* end confdefs.h.  */
20686
20687 #ifdef HAVE_DB_185_H
20688 # include <db_185.h>
20689 #else
20690 # include <db.h>
20691 #endif
20692
20693 #ifndef DB_VERSION_MAJOR
20694 # define DB_VERSION_MAJOR 1
20695 #endif
20696
20697 #ifndef NULL
20698 #define NULL ((void*)0)
20699 #endif
20700
20701 int
20702 main ()
20703 {
20704
20705 #if DB_VERSION_MAJOR > 2
20706         db_env_create( NULL, 0 );
20707 #elif DB_VERSION_MAJOR > 1
20708         db_appexit( NULL );
20709 #else
20710         (void) dbopen( NULL, 0, 0, 0, NULL);
20711 #endif
20712
20713   ;
20714   return 0;
20715 }
20716 _ACEOF
20717 if ac_fn_c_try_link "$LINENO"; then :
20718   ol_cv_db_db_5=yes
20719 else
20720   ol_cv_db_db_5=no
20721 fi
20722 rm -f core conftest.err conftest.$ac_objext \
20723     conftest$ac_exeext conftest.$ac_ext
20724
20725         LIBS="$ol_LIBS"
20726
20727 fi
20728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5" >&5
20729 $as_echo "$ol_cv_db_db_5" >&6; }
20730
20731         if test $ol_cv_db_db_5 = yes ; then
20732                 ol_cv_lib_db=-ldb-5
20733         fi
20734 fi
20735
20736         if test $ol_cv_lib_db = no ; then
20737         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5)" >&5
20738 $as_echo_n "checking for Berkeley DB link (-ldb5)... " >&6; }
20739 if ${ol_cv_db_db5+:} false; then :
20740   $as_echo_n "(cached) " >&6
20741 else
20742
20743         ol_DB_LIB=-ldb5
20744         ol_LIBS=$LIBS
20745         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20746
20747         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20748 /* end confdefs.h.  */
20749
20750 #ifdef HAVE_DB_185_H
20751 # include <db_185.h>
20752 #else
20753 # include <db.h>
20754 #endif
20755
20756 #ifndef DB_VERSION_MAJOR
20757 # define DB_VERSION_MAJOR 1
20758 #endif
20759
20760 #ifndef NULL
20761 #define NULL ((void*)0)
20762 #endif
20763
20764 int
20765 main ()
20766 {
20767
20768 #if DB_VERSION_MAJOR > 2
20769         db_env_create( NULL, 0 );
20770 #elif DB_VERSION_MAJOR > 1
20771         db_appexit( NULL );
20772 #else
20773         (void) dbopen( NULL, 0, 0, 0, NULL);
20774 #endif
20775
20776   ;
20777   return 0;
20778 }
20779 _ACEOF
20780 if ac_fn_c_try_link "$LINENO"; then :
20781   ol_cv_db_db5=yes
20782 else
20783   ol_cv_db_db5=no
20784 fi
20785 rm -f core conftest.err conftest.$ac_objext \
20786     conftest$ac_exeext conftest.$ac_ext
20787
20788         LIBS="$ol_LIBS"
20789
20790 fi
20791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5" >&5
20792 $as_echo "$ol_cv_db_db5" >&6; }
20793
20794         if test $ol_cv_db_db5 = yes ; then
20795                 ol_cv_lib_db=-ldb5
20796         fi
20797 fi
20798
20799 elif test $ol_cv_bdb_major = 4 ; then
20800         if test $ol_cv_lib_db = no ; then
20801         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)" >&5
20802 $as_echo_n "checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)... " >&6; }
20803 if ${ol_cv_db_db_4_dot_m+:} false; then :
20804   $as_echo_n "(cached) " >&6
20805 else
20806
20807         ol_DB_LIB=-ldb-4.$ol_cv_bdb_minor
20808         ol_LIBS=$LIBS
20809         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20810
20811         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20812 /* end confdefs.h.  */
20813
20814 #ifdef HAVE_DB_185_H
20815 # include <db_185.h>
20816 #else
20817 # include <db.h>
20818 #endif
20819
20820 #ifndef DB_VERSION_MAJOR
20821 # define DB_VERSION_MAJOR 1
20822 #endif
20823
20824 #ifndef NULL
20825 #define NULL ((void*)0)
20826 #endif
20827
20828 int
20829 main ()
20830 {
20831
20832 #if DB_VERSION_MAJOR > 2
20833         db_env_create( NULL, 0 );
20834 #elif DB_VERSION_MAJOR > 1
20835         db_appexit( NULL );
20836 #else
20837         (void) dbopen( NULL, 0, 0, 0, NULL);
20838 #endif
20839
20840   ;
20841   return 0;
20842 }
20843 _ACEOF
20844 if ac_fn_c_try_link "$LINENO"; then :
20845   ol_cv_db_db_4_dot_m=yes
20846 else
20847   ol_cv_db_db_4_dot_m=no
20848 fi
20849 rm -f core conftest.err conftest.$ac_objext \
20850     conftest$ac_exeext conftest.$ac_ext
20851
20852         LIBS="$ol_LIBS"
20853
20854 fi
20855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_dot_m" >&5
20856 $as_echo "$ol_cv_db_db_4_dot_m" >&6; }
20857
20858         if test $ol_cv_db_db_4_dot_m = yes ; then
20859                 ol_cv_lib_db=-ldb-4.$ol_cv_bdb_minor
20860         fi
20861 fi
20862
20863         if test $ol_cv_lib_db = no ; then
20864         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)" >&5
20865 $as_echo_n "checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)... " >&6; }
20866 if ${ol_cv_db_db4m+:} false; then :
20867   $as_echo_n "(cached) " >&6
20868 else
20869
20870         ol_DB_LIB=-ldb4$ol_cv_bdb_minor
20871         ol_LIBS=$LIBS
20872         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20873
20874         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20875 /* end confdefs.h.  */
20876
20877 #ifdef HAVE_DB_185_H
20878 # include <db_185.h>
20879 #else
20880 # include <db.h>
20881 #endif
20882
20883 #ifndef DB_VERSION_MAJOR
20884 # define DB_VERSION_MAJOR 1
20885 #endif
20886
20887 #ifndef NULL
20888 #define NULL ((void*)0)
20889 #endif
20890
20891 int
20892 main ()
20893 {
20894
20895 #if DB_VERSION_MAJOR > 2
20896         db_env_create( NULL, 0 );
20897 #elif DB_VERSION_MAJOR > 1
20898         db_appexit( NULL );
20899 #else
20900         (void) dbopen( NULL, 0, 0, 0, NULL);
20901 #endif
20902
20903   ;
20904   return 0;
20905 }
20906 _ACEOF
20907 if ac_fn_c_try_link "$LINENO"; then :
20908   ol_cv_db_db4m=yes
20909 else
20910   ol_cv_db_db4m=no
20911 fi
20912 rm -f core conftest.err conftest.$ac_objext \
20913     conftest$ac_exeext conftest.$ac_ext
20914
20915         LIBS="$ol_LIBS"
20916
20917 fi
20918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4m" >&5
20919 $as_echo "$ol_cv_db_db4m" >&6; }
20920
20921         if test $ol_cv_db_db4m = yes ; then
20922                 ol_cv_lib_db=-ldb4$ol_cv_bdb_minor
20923         fi
20924 fi
20925
20926         if test $ol_cv_lib_db = no ; then
20927         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)" >&5
20928 $as_echo_n "checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)... " >&6; }
20929 if ${ol_cv_db_db_4m+:} false; then :
20930   $as_echo_n "(cached) " >&6
20931 else
20932
20933         ol_DB_LIB=-ldb-4$ol_cv_bdb_minor
20934         ol_LIBS=$LIBS
20935         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20936
20937         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20938 /* end confdefs.h.  */
20939
20940 #ifdef HAVE_DB_185_H
20941 # include <db_185.h>
20942 #else
20943 # include <db.h>
20944 #endif
20945
20946 #ifndef DB_VERSION_MAJOR
20947 # define DB_VERSION_MAJOR 1
20948 #endif
20949
20950 #ifndef NULL
20951 #define NULL ((void*)0)
20952 #endif
20953
20954 int
20955 main ()
20956 {
20957
20958 #if DB_VERSION_MAJOR > 2
20959         db_env_create( NULL, 0 );
20960 #elif DB_VERSION_MAJOR > 1
20961         db_appexit( NULL );
20962 #else
20963         (void) dbopen( NULL, 0, 0, 0, NULL);
20964 #endif
20965
20966   ;
20967   return 0;
20968 }
20969 _ACEOF
20970 if ac_fn_c_try_link "$LINENO"; then :
20971   ol_cv_db_db_4m=yes
20972 else
20973   ol_cv_db_db_4m=no
20974 fi
20975 rm -f core conftest.err conftest.$ac_objext \
20976     conftest$ac_exeext conftest.$ac_ext
20977
20978         LIBS="$ol_LIBS"
20979
20980 fi
20981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4m" >&5
20982 $as_echo "$ol_cv_db_db_4m" >&6; }
20983
20984         if test $ol_cv_db_db_4m = yes ; then
20985                 ol_cv_lib_db=-ldb-4$ol_cv_bdb_minor
20986         fi
20987 fi
20988
20989         if test $ol_cv_lib_db = no ; then
20990         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)" >&5
20991 $as_echo_n "checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)... " >&6; }
20992 if ${ol_cv_db_db_4_m+:} false; then :
20993   $as_echo_n "(cached) " >&6
20994 else
20995
20996         ol_DB_LIB=-ldb-4-$ol_cv_bdb_minor
20997         ol_LIBS=$LIBS
20998         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20999
21000         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21001 /* end confdefs.h.  */
21002
21003 #ifdef HAVE_DB_185_H
21004 # include <db_185.h>
21005 #else
21006 # include <db.h>
21007 #endif
21008
21009 #ifndef DB_VERSION_MAJOR
21010 # define DB_VERSION_MAJOR 1
21011 #endif
21012
21013 #ifndef NULL
21014 #define NULL ((void*)0)
21015 #endif
21016
21017 int
21018 main ()
21019 {
21020
21021 #if DB_VERSION_MAJOR > 2
21022         db_env_create( NULL, 0 );
21023 #elif DB_VERSION_MAJOR > 1
21024         db_appexit( NULL );
21025 #else
21026         (void) dbopen( NULL, 0, 0, 0, NULL);
21027 #endif
21028
21029   ;
21030   return 0;
21031 }
21032 _ACEOF
21033 if ac_fn_c_try_link "$LINENO"; then :
21034   ol_cv_db_db_4_m=yes
21035 else
21036   ol_cv_db_db_4_m=no
21037 fi
21038 rm -f core conftest.err conftest.$ac_objext \
21039     conftest$ac_exeext conftest.$ac_ext
21040
21041         LIBS="$ol_LIBS"
21042
21043 fi
21044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_m" >&5
21045 $as_echo "$ol_cv_db_db_4_m" >&6; }
21046
21047         if test $ol_cv_db_db_4_m = yes ; then
21048                 ol_cv_lib_db=-ldb-4-$ol_cv_bdb_minor
21049         fi
21050 fi
21051
21052         if test $ol_cv_lib_db = no ; then
21053         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4)" >&5
21054 $as_echo_n "checking for Berkeley DB link (-ldb-4)... " >&6; }
21055 if ${ol_cv_db_db_4+:} false; then :
21056   $as_echo_n "(cached) " >&6
21057 else
21058
21059         ol_DB_LIB=-ldb-4
21060         ol_LIBS=$LIBS
21061         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21062
21063         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21064 /* end confdefs.h.  */
21065
21066 #ifdef HAVE_DB_185_H
21067 # include <db_185.h>
21068 #else
21069 # include <db.h>
21070 #endif
21071
21072 #ifndef DB_VERSION_MAJOR
21073 # define DB_VERSION_MAJOR 1
21074 #endif
21075
21076 #ifndef NULL
21077 #define NULL ((void*)0)
21078 #endif
21079
21080 int
21081 main ()
21082 {
21083
21084 #if DB_VERSION_MAJOR > 2
21085         db_env_create( NULL, 0 );
21086 #elif DB_VERSION_MAJOR > 1
21087         db_appexit( NULL );
21088 #else
21089         (void) dbopen( NULL, 0, 0, 0, NULL);
21090 #endif
21091
21092   ;
21093   return 0;
21094 }
21095 _ACEOF
21096 if ac_fn_c_try_link "$LINENO"; then :
21097   ol_cv_db_db_4=yes
21098 else
21099   ol_cv_db_db_4=no
21100 fi
21101 rm -f core conftest.err conftest.$ac_objext \
21102     conftest$ac_exeext conftest.$ac_ext
21103
21104         LIBS="$ol_LIBS"
21105
21106 fi
21107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4" >&5
21108 $as_echo "$ol_cv_db_db_4" >&6; }
21109
21110         if test $ol_cv_db_db_4 = yes ; then
21111                 ol_cv_lib_db=-ldb-4
21112         fi
21113 fi
21114
21115         if test $ol_cv_lib_db = no ; then
21116         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4)" >&5
21117 $as_echo_n "checking for Berkeley DB link (-ldb4)... " >&6; }
21118 if ${ol_cv_db_db4+:} false; then :
21119   $as_echo_n "(cached) " >&6
21120 else
21121
21122         ol_DB_LIB=-ldb4
21123         ol_LIBS=$LIBS
21124         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21125
21126         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21127 /* end confdefs.h.  */
21128
21129 #ifdef HAVE_DB_185_H
21130 # include <db_185.h>
21131 #else
21132 # include <db.h>
21133 #endif
21134
21135 #ifndef DB_VERSION_MAJOR
21136 # define DB_VERSION_MAJOR 1
21137 #endif
21138
21139 #ifndef NULL
21140 #define NULL ((void*)0)
21141 #endif
21142
21143 int
21144 main ()
21145 {
21146
21147 #if DB_VERSION_MAJOR > 2
21148         db_env_create( NULL, 0 );
21149 #elif DB_VERSION_MAJOR > 1
21150         db_appexit( NULL );
21151 #else
21152         (void) dbopen( NULL, 0, 0, 0, NULL);
21153 #endif
21154
21155   ;
21156   return 0;
21157 }
21158 _ACEOF
21159 if ac_fn_c_try_link "$LINENO"; then :
21160   ol_cv_db_db4=yes
21161 else
21162   ol_cv_db_db4=no
21163 fi
21164 rm -f core conftest.err conftest.$ac_objext \
21165     conftest$ac_exeext conftest.$ac_ext
21166
21167         LIBS="$ol_LIBS"
21168
21169 fi
21170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4" >&5
21171 $as_echo "$ol_cv_db_db4" >&6; }
21172
21173         if test $ol_cv_db_db4 = yes ; then
21174                 ol_cv_lib_db=-ldb4
21175         fi
21176 fi
21177
21178 fi
21179 if test $ol_cv_lib_db = no ; then
21180         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb)" >&5
21181 $as_echo_n "checking for Berkeley DB link (-ldb)... " >&6; }
21182 if ${ol_cv_db_db+:} false; then :
21183   $as_echo_n "(cached) " >&6
21184 else
21185
21186         ol_DB_LIB=-ldb
21187         ol_LIBS=$LIBS
21188         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21189
21190         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21191 /* end confdefs.h.  */
21192
21193 #ifdef HAVE_DB_185_H
21194 # include <db_185.h>
21195 #else
21196 # include <db.h>
21197 #endif
21198
21199 #ifndef DB_VERSION_MAJOR
21200 # define DB_VERSION_MAJOR 1
21201 #endif
21202
21203 #ifndef NULL
21204 #define NULL ((void*)0)
21205 #endif
21206
21207 int
21208 main ()
21209 {
21210
21211 #if DB_VERSION_MAJOR > 2
21212         db_env_create( NULL, 0 );
21213 #elif DB_VERSION_MAJOR > 1
21214         db_appexit( NULL );
21215 #else
21216         (void) dbopen( NULL, 0, 0, 0, NULL);
21217 #endif
21218
21219   ;
21220   return 0;
21221 }
21222 _ACEOF
21223 if ac_fn_c_try_link "$LINENO"; then :
21224   ol_cv_db_db=yes
21225 else
21226   ol_cv_db_db=no
21227 fi
21228 rm -f core conftest.err conftest.$ac_objext \
21229     conftest$ac_exeext conftest.$ac_ext
21230
21231         LIBS="$ol_LIBS"
21232
21233 fi
21234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db" >&5
21235 $as_echo "$ol_cv_db_db" >&6; }
21236
21237         if test $ol_cv_db_db = yes ; then
21238                 ol_cv_lib_db=-ldb
21239         fi
21240 fi
21241
21242 if test $ol_cv_lib_db = no ; then
21243         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (default)" >&5
21244 $as_echo_n "checking for Berkeley DB link (default)... " >&6; }
21245 if ${ol_cv_db_none+:} false; then :
21246   $as_echo_n "(cached) " >&6
21247 else
21248
21249         ol_DB_LIB=
21250         ol_LIBS=$LIBS
21251         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21252
21253         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21254 /* end confdefs.h.  */
21255
21256 #ifdef HAVE_DB_185_H
21257 # include <db_185.h>
21258 #else
21259 # include <db.h>
21260 #endif
21261
21262 #ifndef DB_VERSION_MAJOR
21263 # define DB_VERSION_MAJOR 1
21264 #endif
21265
21266 #ifndef NULL
21267 #define NULL ((void*)0)
21268 #endif
21269
21270 int
21271 main ()
21272 {
21273
21274 #if DB_VERSION_MAJOR > 2
21275         db_env_create( NULL, 0 );
21276 #elif DB_VERSION_MAJOR > 1
21277         db_appexit( NULL );
21278 #else
21279         (void) dbopen( NULL, 0, 0, 0, NULL);
21280 #endif
21281
21282   ;
21283   return 0;
21284 }
21285 _ACEOF
21286 if ac_fn_c_try_link "$LINENO"; then :
21287   ol_cv_db_none=yes
21288 else
21289   ol_cv_db_none=no
21290 fi
21291 rm -f core conftest.err conftest.$ac_objext \
21292     conftest$ac_exeext conftest.$ac_ext
21293
21294         LIBS="$ol_LIBS"
21295
21296 fi
21297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_none" >&5
21298 $as_echo "$ol_cv_db_none" >&6; }
21299
21300         if test $ol_cv_db_none = yes ; then
21301                 ol_cv_lib_db=yes
21302         fi
21303 fi
21304
21305
21306         if test "$ol_cv_lib_db" != no ; then
21307                 ol_cv_berkeley_db=yes
21308                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB library and header version match" >&5
21309 $as_echo_n "checking for Berkeley DB library and header version match... " >&6; }
21310 if ${ol_cv_berkeley_db_version+:} false; then :
21311   $as_echo_n "(cached) " >&6
21312 else
21313
21314         ol_LIBS="$LIBS"
21315         LIBS="$LTHREAD_LIBS $LIBS"
21316         if test $ol_cv_lib_db != yes ; then
21317                 LIBS="$ol_cv_lib_db $LIBS"
21318         fi
21319
21320         if test "$cross_compiling" = yes; then :
21321   ol_cv_berkeley_db_version=cross
21322 else
21323   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21324 /* end confdefs.h.  */
21325
21326 #ifdef HAVE_DB_185_H
21327         choke me;
21328 #else
21329 #include <db.h>
21330 #endif
21331 #ifndef DB_VERSION_MAJOR
21332 # define DB_VERSION_MAJOR 1
21333 #endif
21334 #ifndef NULL
21335 #define NULL ((void *)0)
21336 #endif
21337 main()
21338 {
21339 #if DB_VERSION_MAJOR > 1
21340         char *version;
21341         int major, minor, patch;
21342
21343         version = db_version( &major, &minor, &patch );
21344
21345         if( major != DB_VERSION_MAJOR ||
21346                 minor != DB_VERSION_MINOR ||
21347                 patch != DB_VERSION_PATCH )
21348         {
21349                 printf("Berkeley DB version mismatch\n"
21350                         "\theader: %s\n\tlibrary: %s\n",
21351                         DB_VERSION_STRING, version);
21352                 return 1;
21353         }
21354 #endif
21355
21356         return 0;
21357 }
21358 _ACEOF
21359 if ac_fn_c_try_run "$LINENO"; then :
21360   ol_cv_berkeley_db_version=yes
21361 else
21362   ol_cv_berkeley_db_version=no
21363 fi
21364 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21365   conftest.$ac_objext conftest.beam conftest.$ac_ext
21366 fi
21367
21368
21369         LIBS="$ol_LIBS"
21370
21371 fi
21372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_version" >&5
21373 $as_echo "$ol_cv_berkeley_db_version" >&6; }
21374
21375         if test $ol_cv_berkeley_db_version = no ; then
21376                 as_fn_error $? "Berkeley DB version mismatch" "$LINENO" 5
21377         fi
21378
21379                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB thread support" >&5
21380 $as_echo_n "checking for Berkeley DB thread support... " >&6; }
21381 if ${ol_cv_berkeley_db_thread+:} false; then :
21382   $as_echo_n "(cached) " >&6
21383 else
21384
21385         ol_LIBS="$LIBS"
21386         LIBS="$LTHREAD_LIBS $LIBS"
21387         if test $ol_cv_lib_db != yes ; then
21388                 LIBS="$ol_cv_lib_db $LIBS"
21389         fi
21390
21391         if test "$cross_compiling" = yes; then :
21392   ol_cv_berkeley_db_thread=cross
21393 else
21394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21395 /* end confdefs.h.  */
21396
21397 #ifdef HAVE_DB_185_H
21398         choke me;
21399 #else
21400 #include <db.h>
21401 #endif
21402 #ifndef NULL
21403 #define NULL ((void *)0)
21404 #endif
21405 main()
21406 {
21407         int rc;
21408         u_int32_t flags = DB_CREATE |
21409 #ifdef DB_PRIVATE
21410                 DB_PRIVATE |
21411 #endif
21412                 DB_THREAD;
21413
21414 #if DB_VERSION_MAJOR > 2
21415         DB_ENV *env = NULL;
21416
21417         rc = db_env_create( &env, 0 );
21418
21419         flags |= DB_INIT_MPOOL;
21420 #ifdef DB_MPOOL_PRIVATE
21421         flags |= DB_MPOOL_PRIVATE;
21422 #endif
21423
21424         if( rc ) {
21425                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21426                 return rc;
21427         }
21428
21429 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
21430         rc = (env->open)( env, NULL, flags, 0 );
21431 #else
21432         rc = (env->open)( env, NULL, NULL, flags, 0 );
21433 #endif
21434
21435         if ( rc == 0 ) {
21436                 rc = env->close( env, 0 );
21437         }
21438
21439         if( rc ) {
21440                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
21441                 return rc;
21442         }
21443
21444 #else
21445         DB_ENV env;
21446         memset( &env, '\0', sizeof(env) );
21447
21448         rc = db_appinit( NULL, NULL, &env, flags );
21449
21450         if( rc == 0 ) {
21451                 db_appexit( &env );
21452         }
21453
21454         unlink("__db_mpool.share");
21455         unlink("__db_lock.share");
21456 #endif
21457
21458         return rc;
21459 }
21460 _ACEOF
21461 if ac_fn_c_try_run "$LINENO"; then :
21462   ol_cv_berkeley_db_thread=yes
21463 else
21464   ol_cv_berkeley_db_thread=no
21465 fi
21466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21467   conftest.$ac_objext conftest.beam conftest.$ac_ext
21468 fi
21469
21470
21471         LIBS="$ol_LIBS"
21472
21473 fi
21474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_thread" >&5
21475 $as_echo "$ol_cv_berkeley_db_thread" >&6; }
21476
21477         if test $ol_cv_berkeley_db_thread != no ; then
21478
21479 $as_echo "#define HAVE_BERKELEY_DB_THREAD 1" >>confdefs.h
21480
21481         fi
21482
21483         fi
21484 fi
21485
21486
21487         if test $ol_cv_berkeley_db = no ; then
21488                 as_fn_error $? "BDB/HDB: BerkeleyDB not available" "$LINENO" 5
21489         fi
21490
21491
21492 $as_echo "#define HAVE_BERKELEY_DB 1" >>confdefs.h
21493
21494
21495                         if test $ol_cv_lib_db != yes ; then
21496                 BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
21497         fi
21498
21499         SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
21500
21501         ol_link_bdb=yes
21502 fi
21503
21504
21505 if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
21506         BUILD_LIBS_DYNAMIC=shared
21507
21508 $as_echo "#define LDAP_LIBS_DYNAMIC 1" >>confdefs.h
21509
21510         LTSTATIC=""
21511 else
21512         BUILD_LIBS_DYNAMIC=static
21513         LTSTATIC="-static"
21514 fi
21515
21516 if test $ol_enable_wrappers != no ; then
21517         for ac_header in tcpd.h
21518 do :
21519   ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
21520 if test "x$ac_cv_header_tcpd_h" = xyes; then :
21521   cat >>confdefs.h <<_ACEOF
21522 #define HAVE_TCPD_H 1
21523 _ACEOF
21524
21525                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library" >&5
21526 $as_echo_n "checking for TCP wrappers library... " >&6; }
21527                 save_LIBS="$LIBS"
21528                 LIBS="$LIBS -lwrap"
21529                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21530 /* end confdefs.h.  */
21531
21532 #include <tcpd.h>
21533 int allow_severity = 0;
21534 int deny_severity  = 0;
21535
21536 struct request_info *req;
21537
21538 int
21539 main ()
21540 {
21541
21542 hosts_access(req)
21543
21544   ;
21545   return 0;
21546 }
21547 _ACEOF
21548 if ac_fn_c_try_link "$LINENO"; then :
21549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap" >&5
21550 $as_echo "-lwrap" >&6; }
21551                 have_wrappers=yes
21552                 LIBS="$save_LIBS"
21553 else
21554
21555                                 LIBS="$LIBS -lnsl"
21556                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21557 /* end confdefs.h.  */
21558
21559 #include <tcpd.h>
21560 int allow_severity = 0;
21561 int deny_severity  = 0;
21562
21563 struct request_info *req;
21564
21565 int
21566 main ()
21567 {
21568
21569 hosts_access(req)
21570
21571   ;
21572   return 0;
21573 }
21574 _ACEOF
21575 if ac_fn_c_try_link "$LINENO"; then :
21576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap -lnsl" >&5
21577 $as_echo "-lwrap -lnsl" >&6; }
21578                 have_wrappers=yes
21579                 LIBS="$save_LIBS -lnsl"
21580 else
21581
21582                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21583 $as_echo "no" >&6; }
21584                 have_wrappers=no
21585                 LIBS=$save_LIBS
21586 fi
21587 rm -f core conftest.err conftest.$ac_objext \
21588     conftest$ac_exeext conftest.$ac_ext
21589 fi
21590 rm -f core conftest.err conftest.$ac_objext \
21591     conftest$ac_exeext conftest.$ac_ext
21592 else
21593   have_wrappers=no
21594 fi
21595
21596 done
21597
21598
21599         if test $have_wrappers = yes ; then
21600
21601 $as_echo "#define HAVE_TCPD 1" >>confdefs.h
21602
21603                 WRAP_LIBS="-lwrap"
21604         elif test $ol_enable_wrappers = yes ; then
21605                 as_fn_error $? "could not find TCP wrappers, select apppropriate options or disable" "$LINENO" 5
21606         else
21607                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find TCP wrappers, support disabled" >&5
21608 $as_echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
21609                 WRAP_LIBS=""
21610         fi
21611 fi
21612
21613 if test $ol_enable_syslog != no ; then
21614         ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
21615 if test "x$ac_cv_func_openlog" = xyes; then :
21616
21617 fi
21618
21619         if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
21620                 as_fn_error select appropriate options or disable "could not find syslog" "$LINENO" 5
21621         fi
21622         ol_enable_syslog=$ac_cv_func_openlog
21623 fi
21624
21625 ol_link_sql=no
21626 if test $ol_enable_sql != no ; then
21627         for ac_header in sql.h sqlext.h
21628 do :
21629   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21630 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21631 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
21632   cat >>confdefs.h <<_ACEOF
21633 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21634 _ACEOF
21635
21636 else
21637
21638                 as_fn_error $? "could not locate SQL headers" "$LINENO" 5
21639
21640 fi
21641
21642 done
21643
21644
21645         sql_LIBS="$LIBS"
21646         LIBS="$LTHREAD_LIBS"
21647
21648         if test $ol_with_odbc = auto ; then
21649                 ol_with_odbc="iodbc unixodbc odbc32"
21650         fi
21651
21652         for odbc in $ol_with_odbc ; do
21653                 if test $ol_link_sql = no ; then
21654                         case $odbc in
21655                         iodbc)
21656                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -liodbc" >&5
21657 $as_echo_n "checking for SQLDriverConnect in -liodbc... " >&6; }
21658 if ${ac_cv_lib_iodbc_SQLDriverConnect+:} false; then :
21659   $as_echo_n "(cached) " >&6
21660 else
21661   ac_check_lib_save_LIBS=$LIBS
21662 LIBS="-liodbc  $LIBS"
21663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21664 /* end confdefs.h.  */
21665
21666 /* Override any GCC internal prototype to avoid an error.
21667    Use char because int might match the return type of a GCC
21668    builtin and then its argument prototype would still apply.  */
21669 #ifdef __cplusplus
21670 extern "C"
21671 #endif
21672 char SQLDriverConnect ();
21673 int
21674 main ()
21675 {
21676 return SQLDriverConnect ();
21677   ;
21678   return 0;
21679 }
21680 _ACEOF
21681 if ac_fn_c_try_link "$LINENO"; then :
21682   ac_cv_lib_iodbc_SQLDriverConnect=yes
21683 else
21684   ac_cv_lib_iodbc_SQLDriverConnect=no
21685 fi
21686 rm -f core conftest.err conftest.$ac_objext \
21687     conftest$ac_exeext conftest.$ac_ext
21688 LIBS=$ac_check_lib_save_LIBS
21689 fi
21690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
21691 $as_echo "$ac_cv_lib_iodbc_SQLDriverConnect" >&6; }
21692 if test "x$ac_cv_lib_iodbc_SQLDriverConnect" = xyes; then :
21693   have_iodbc=yes
21694 else
21695   have_iodbc=no
21696 fi
21697
21698                                 if test $have_iodbc = yes ; then
21699                                         ol_link_sql="-liodbc"
21700                                 fi
21701                                 ;;
21702
21703                         unixodbc)
21704                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc" >&5
21705 $as_echo_n "checking for SQLDriverConnect in -lodbc... " >&6; }
21706 if ${ac_cv_lib_odbc_SQLDriverConnect+:} false; then :
21707   $as_echo_n "(cached) " >&6
21708 else
21709   ac_check_lib_save_LIBS=$LIBS
21710 LIBS="-lodbc  $LIBS"
21711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21712 /* end confdefs.h.  */
21713
21714 /* Override any GCC internal prototype to avoid an error.
21715    Use char because int might match the return type of a GCC
21716    builtin and then its argument prototype would still apply.  */
21717 #ifdef __cplusplus
21718 extern "C"
21719 #endif
21720 char SQLDriverConnect ();
21721 int
21722 main ()
21723 {
21724 return SQLDriverConnect ();
21725   ;
21726   return 0;
21727 }
21728 _ACEOF
21729 if ac_fn_c_try_link "$LINENO"; then :
21730   ac_cv_lib_odbc_SQLDriverConnect=yes
21731 else
21732   ac_cv_lib_odbc_SQLDriverConnect=no
21733 fi
21734 rm -f core conftest.err conftest.$ac_objext \
21735     conftest$ac_exeext conftest.$ac_ext
21736 LIBS=$ac_check_lib_save_LIBS
21737 fi
21738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
21739 $as_echo "$ac_cv_lib_odbc_SQLDriverConnect" >&6; }
21740 if test "x$ac_cv_lib_odbc_SQLDriverConnect" = xyes; then :
21741   have_odbc=yes
21742 else
21743   have_odbc=no
21744 fi
21745
21746                                 if test $have_odbc = yes ; then
21747                                         ol_link_sql="-lodbc"
21748                                 fi
21749                                 ;;
21750
21751                         odbc32)
21752                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32" >&5
21753 $as_echo_n "checking for SQLDriverConnect in -lodbc32... " >&6; }
21754 if ${ac_cv_lib_odbc32_SQLDriverConnect+:} false; then :
21755   $as_echo_n "(cached) " >&6
21756 else
21757   ac_check_lib_save_LIBS=$LIBS
21758 LIBS="-lodbc32  $LIBS"
21759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21760 /* end confdefs.h.  */
21761
21762 /* Override any GCC internal prototype to avoid an error.
21763    Use char because int might match the return type of a GCC
21764    builtin and then its argument prototype would still apply.  */
21765 #ifdef __cplusplus
21766 extern "C"
21767 #endif
21768 char SQLDriverConnect ();
21769 int
21770 main ()
21771 {
21772 return SQLDriverConnect ();
21773   ;
21774   return 0;
21775 }
21776 _ACEOF
21777 if ac_fn_c_try_link "$LINENO"; then :
21778   ac_cv_lib_odbc32_SQLDriverConnect=yes
21779 else
21780   ac_cv_lib_odbc32_SQLDriverConnect=no
21781 fi
21782 rm -f core conftest.err conftest.$ac_objext \
21783     conftest$ac_exeext conftest.$ac_ext
21784 LIBS=$ac_check_lib_save_LIBS
21785 fi
21786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_SQLDriverConnect" >&5
21787 $as_echo "$ac_cv_lib_odbc32_SQLDriverConnect" >&6; }
21788 if test "x$ac_cv_lib_odbc32_SQLDriverConnect" = xyes; then :
21789   have_odbc32=yes
21790 else
21791   have_odbc32=no
21792 fi
21793
21794
21795                                                                 if test $have_odbc32 = no ; then
21796                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32 with windows.h" >&5
21797 $as_echo_n "checking for SQLDriverConnect in -lodbc32 with windows.h... " >&6; }
21798                                         save_LIBS="$LIBS"
21799                                         LIBS="$LIBS -lodbc32"
21800                                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21801 /* end confdefs.h.  */
21802 #include <windows.h>
21803                                         #include <sqlext.h>
21804
21805 int
21806 main ()
21807 {
21808
21809                                                 SQLDriverConnect(NULL,NULL,NULL,0,NULL,0,NULL,0);
21810
21811   ;
21812   return 0;
21813 }
21814 _ACEOF
21815 if ac_fn_c_try_link "$LINENO"; then :
21816   have_odbc32=yes
21817 else
21818   have_odbc32=no
21819 fi
21820 rm -f core conftest.err conftest.$ac_objext \
21821     conftest$ac_exeext conftest.$ac_ext
21822                                         LIBS="$save_LIBS"
21823                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_odbc32" >&5
21824 $as_echo "$have_odbc32" >&6; }
21825                                 fi
21826
21827                                 if test $have_odbc32 = yes ; then
21828                                         ol_link_sql="-lodbc32"
21829                                 fi
21830                                 ;;
21831
21832                         *)
21833                                 as_fn_error $? "unknown ODBC library" "$LINENO" 5
21834                                 ;;
21835                         esac
21836                 fi
21837         done
21838
21839         LIBS="$sql_LIBS"
21840
21841         if test $ol_link_sql != no ; then
21842                 SLAPD_SQL_LIBS="$ol_link_sql"
21843
21844         elif test $ol_enable_sql != auto ; then
21845                 as_fn_error $? "could not locate suitable ODBC library" "$LINENO" 5
21846         fi
21847 fi
21848
21849 ol_link_ndb=no
21850 if test $ol_enable_ndb != no ; then
21851         # Extract the first word of "mysql_config", so it can be a program name with args.
21852 set dummy mysql_config; ac_word=$2
21853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21854 $as_echo_n "checking for $ac_word... " >&6; }
21855 if ${ac_cv_prog_MYSQL+:} false; then :
21856   $as_echo_n "(cached) " >&6
21857 else
21858   if test -n "$MYSQL"; then
21859   ac_cv_prog_MYSQL="$MYSQL" # Let the user override the test.
21860 else
21861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21862 for as_dir in $PATH
21863 do
21864   IFS=$as_save_IFS
21865   test -z "$as_dir" && as_dir=.
21866     for ac_exec_ext in '' $ac_executable_extensions; do
21867   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21868     ac_cv_prog_MYSQL="yes"
21869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21870     break 2
21871   fi
21872 done
21873   done
21874 IFS=$as_save_IFS
21875
21876 fi
21877 fi
21878 MYSQL=$ac_cv_prog_MYSQL
21879 if test -n "$MYSQL"; then
21880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL" >&5
21881 $as_echo "$MYSQL" >&6; }
21882 else
21883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21884 $as_echo "no" >&6; }
21885 fi
21886
21887
21888         if test "$MYSQL" != yes ; then
21889                 as_fn_error $? "could not locate mysql_config" "$LINENO" 5
21890         fi
21891
21892         SQL_INC=`mysql_config --include`
21893         SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi"
21894
21895         save_CPPFLAGS="$CPPFLAGS"
21896         CPPFLAGS="$SLAPD_NDB_INCS"
21897         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NdbApi.hpp" >&5
21898 $as_echo_n "checking for NdbApi.hpp... " >&6; }
21899         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21900 /* end confdefs.h.  */
21901 #include <NdbApi.hpp>
21902 _ACEOF
21903 if ac_fn_c_try_cpp "$LINENO"; then :
21904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21905 $as_echo "yes" >&6; }
21906 else
21907   as_fn_error $? "could not locate NdbApi headers" "$LINENO" 5
21908
21909 fi
21910 rm -f conftest.err conftest.i conftest.$ac_ext
21911         CPPFLAGS="$save_CPPFLAGS"
21912
21913         SQL_LIB=`mysql_config --libs_r`
21914         SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++"
21915
21916         save_LDFLAGS="$LDFLAGS"
21917         save_LIBS="$LIBS"
21918         LDFLAGS="$SQL_LIB"
21919         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ndb_init in -lndbclient" >&5
21920 $as_echo_n "checking for ndb_init in -lndbclient... " >&6; }
21921 if ${ac_cv_lib_ndbclient_ndb_init+:} false; then :
21922   $as_echo_n "(cached) " >&6
21923 else
21924   ac_check_lib_save_LIBS=$LIBS
21925 LIBS="-lndbclient -lstdc++ $LIBS"
21926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21927 /* end confdefs.h.  */
21928
21929 /* Override any GCC internal prototype to avoid an error.
21930    Use char because int might match the return type of a GCC
21931    builtin and then its argument prototype would still apply.  */
21932 #ifdef __cplusplus
21933 extern "C"
21934 #endif
21935 char ndb_init ();
21936 int
21937 main ()
21938 {
21939 return ndb_init ();
21940   ;
21941   return 0;
21942 }
21943 _ACEOF
21944 if ac_fn_c_try_link "$LINENO"; then :
21945   ac_cv_lib_ndbclient_ndb_init=yes
21946 else
21947   ac_cv_lib_ndbclient_ndb_init=no
21948 fi
21949 rm -f core conftest.err conftest.$ac_objext \
21950     conftest$ac_exeext conftest.$ac_ext
21951 LIBS=$ac_check_lib_save_LIBS
21952 fi
21953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbclient_ndb_init" >&5
21954 $as_echo "$ac_cv_lib_ndbclient_ndb_init" >&6; }
21955 if test "x$ac_cv_lib_ndbclient_ndb_init" = xyes; then :
21956   : ok
21957 else
21958
21959                 as_fn_error $? "could not locate ndbclient library" "$LINENO" 5
21960
21961 fi
21962
21963         LIBS="$save_LIBS"
21964         LDFLAGS="$save_LDFLAGS"
21965
21966         if test "$ol_enable_ndb" = yes ; then
21967                 SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
21968         fi
21969 fi
21970
21971 ol_icu=no
21972 for ac_header in unicode/utypes.h
21973 do :
21974   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21975 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21976 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
21977   cat >>confdefs.h <<_ACEOF
21978 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21979 _ACEOF
21980
21981 fi
21982
21983 done
21984
21985 if test $ac_cv_header_unicode_utypes_h = yes ; then
21986                 OL_ICULIBS="-licuuc -licudata"
21987
21988         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU libraries" >&5
21989 $as_echo_n "checking for ICU libraries... " >&6; }
21990 if ${ol_cv_lib_icu+:} false; then :
21991   $as_echo_n "(cached) " >&6
21992 else
21993
21994                 ol_LIBS="$LIBS"
21995                 LIBS="$OL_ICULIBS $LIBS"
21996                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21997 /* end confdefs.h.  */
21998
21999 #include <unicode/utypes.h>
22000
22001 int
22002 main ()
22003 {
22004
22005 (void) u_errorName(0);
22006
22007   ;
22008   return 0;
22009 }
22010 _ACEOF
22011 if ac_fn_c_try_link "$LINENO"; then :
22012   ol_cv_lib_icu=yes
22013 else
22014   ol_cv_lib_icu=no
22015 fi
22016 rm -f core conftest.err conftest.$ac_objext \
22017     conftest$ac_exeext conftest.$ac_ext
22018                 LIBS="$ol_LIBS"
22019
22020 fi
22021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_icu" >&5
22022 $as_echo "$ol_cv_lib_icu" >&6; }
22023
22024         if test $ol_cv_lib_icu != no ; then
22025                 ol_icu="$OL_ICULIBS"
22026
22027 $as_echo "#define HAVE_ICU 1" >>confdefs.h
22028
22029         fi
22030 fi
22031
22032 if test "$ol_icu" = no ; then
22033         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ICU not available" >&5
22034 $as_echo "$as_me: WARNING: ICU not available" >&2;}
22035 else
22036         ICU_LIBS="$ol_icu"
22037 fi
22038 WITH_SASL=no
22039 ol_link_sasl=no
22040 ol_link_spasswd=no
22041 if test $ol_with_cyrus_sasl != no ; then
22042         for ac_header in sasl/sasl.h sasl.h
22043 do :
22044   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22045 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22046 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
22047   cat >>confdefs.h <<_ACEOF
22048 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22049 _ACEOF
22050
22051 fi
22052
22053 done
22054
22055
22056         if test $ac_cv_header_sasl_sasl_h = yes ||
22057            test $ac_cv_header_sasl_h = yes; then
22058                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
22059 $as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
22060 if ${ac_cv_lib_sasl2_sasl_client_init+:} false; then :
22061   $as_echo_n "(cached) " >&6
22062 else
22063   ac_check_lib_save_LIBS=$LIBS
22064 LIBS="-lsasl2  $LIBS"
22065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22066 /* end confdefs.h.  */
22067
22068 /* Override any GCC internal prototype to avoid an error.
22069    Use char because int might match the return type of a GCC
22070    builtin and then its argument prototype would still apply.  */
22071 #ifdef __cplusplus
22072 extern "C"
22073 #endif
22074 char sasl_client_init ();
22075 int
22076 main ()
22077 {
22078 return sasl_client_init ();
22079   ;
22080   return 0;
22081 }
22082 _ACEOF
22083 if ac_fn_c_try_link "$LINENO"; then :
22084   ac_cv_lib_sasl2_sasl_client_init=yes
22085 else
22086   ac_cv_lib_sasl2_sasl_client_init=no
22087 fi
22088 rm -f core conftest.err conftest.$ac_objext \
22089     conftest$ac_exeext conftest.$ac_ext
22090 LIBS=$ac_check_lib_save_LIBS
22091 fi
22092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
22093 $as_echo "$ac_cv_lib_sasl2_sasl_client_init" >&6; }
22094 if test "x$ac_cv_lib_sasl2_sasl_client_init" = xyes; then :
22095   ol_link_sasl="-lsasl2"
22096 else
22097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl" >&5
22098 $as_echo_n "checking for sasl_client_init in -lsasl... " >&6; }
22099 if ${ac_cv_lib_sasl_sasl_client_init+:} false; then :
22100   $as_echo_n "(cached) " >&6
22101 else
22102   ac_check_lib_save_LIBS=$LIBS
22103 LIBS="-lsasl  $LIBS"
22104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22105 /* end confdefs.h.  */
22106
22107 /* Override any GCC internal prototype to avoid an error.
22108    Use char because int might match the return type of a GCC
22109    builtin and then its argument prototype would still apply.  */
22110 #ifdef __cplusplus
22111 extern "C"
22112 #endif
22113 char sasl_client_init ();
22114 int
22115 main ()
22116 {
22117 return sasl_client_init ();
22118   ;
22119   return 0;
22120 }
22121 _ACEOF
22122 if ac_fn_c_try_link "$LINENO"; then :
22123   ac_cv_lib_sasl_sasl_client_init=yes
22124 else
22125   ac_cv_lib_sasl_sasl_client_init=no
22126 fi
22127 rm -f core conftest.err conftest.$ac_objext \
22128     conftest$ac_exeext conftest.$ac_ext
22129 LIBS=$ac_check_lib_save_LIBS
22130 fi
22131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl_sasl_client_init" >&5
22132 $as_echo "$ac_cv_lib_sasl_sasl_client_init" >&6; }
22133 if test "x$ac_cv_lib_sasl_sasl_client_init" = xyes; then :
22134   ol_link_sasl="-lsasl"
22135 fi
22136
22137 fi
22138
22139         fi
22140
22141         if test $ol_link_sasl = no ; then
22142                 if test $ol_with_cyrus_sasl != auto ; then
22143                         as_fn_error $? "Could not locate Cyrus SASL" "$LINENO" 5
22144                 else
22145                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate Cyrus SASL" >&5
22146 $as_echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
22147                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22148 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22149                         if test $ol_link_tls = no ; then
22150                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22151 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22152                         fi
22153                 fi
22154         else
22155                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Cyrus SASL library version" >&5
22156 $as_echo_n "checking Cyrus SASL library version... " >&6; }
22157 if ${ol_cv_sasl_compat+:} false; then :
22158   $as_echo_n "(cached) " >&6
22159 else
22160
22161         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22162 /* end confdefs.h.  */
22163
22164 #ifdef HAVE_SASL_SASL_H
22165 #include <sasl/sasl.h>
22166 #else
22167 #include <sasl.h>
22168 #endif
22169
22170 /* Require 2.1.15+ */
22171 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22172         char *__sasl_compat = "2.2+ or better okay (we guess)";
22173 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22174         && SASL_VERSION_STEP >=15
22175         char *__sasl_compat = "2.1.15+ or better okay";
22176 #endif
22177
22178 _ACEOF
22179 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22180   $EGREP "__sasl_compat" >/dev/null 2>&1; then :
22181   ol_cv_sasl_compat=yes
22182 else
22183   ol_cv_sasl_compat=no
22184 fi
22185 rm -f conftest*
22186
22187 fi
22188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sasl_compat" >&5
22189 $as_echo "$ol_cv_sasl_compat" >&6; }
22190
22191                 if test $ol_cv_sasl_compat = no ; then
22192                         ol_link_sasl=no
22193                         as_fn_error $? "Cyrus SASL library located but is incompatible" "$LINENO" 5
22194                 fi
22195
22196
22197 $as_echo "#define HAVE_CYRUS_SASL 1" >>confdefs.h
22198
22199                 SASL_LIBS="$ol_link_sasl"
22200                 if test $ol_enable_spasswd != no ; then
22201                         ol_link_spasswd=yes
22202                 fi
22203
22204                 ac_save_LIBS="$LIBS"
22205                 LIBS="$LIBS $ol_link_sasl"
22206                 ac_fn_c_check_func "$LINENO" "sasl_version" "ac_cv_func_sasl_version"
22207 if test "x$ac_cv_func_sasl_version" = xyes; then :
22208
22209 $as_echo "#define HAVE_SASL_VERSION 1" >>confdefs.h
22210
22211 fi
22212
22213                 LIBS="$ac_save_LIBS"
22214
22215                 WITH_SASL=yes
22216         fi
22217
22218 else
22219         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22220 $as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22221         if test $ol_link_tls = no ; then
22222                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22223 $as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22224         fi
22225 fi
22226
22227 if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
22228         dev=no
22229         if test -r /dev/urandom ; then
22230                 dev="/dev/urandom";
22231         elif test -r /idev/urandom ; then
22232                 dev="/idev/urandom";
22233         elif test -r /dev/srandom ; then
22234                 dev="/dev/srandom";
22235         elif test -r /dev/random ; then
22236                 dev="/dev/random";
22237         elif test -r /idev/random ; then
22238                 dev="/idev/random";
22239         fi
22240
22241         if test $dev != no ; then
22242
22243 cat >>confdefs.h <<_ACEOF
22244 #define URANDOM_DEVICE "$dev"
22245 _ACEOF
22246
22247         fi
22248 fi
22249
22250 ol_link_fetch=no
22251 if test $ol_with_fetch != no ; then
22252         ol_LIBS=$LIBS
22253 LIBS="-lfetch -lcom_err $LIBS"
22254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking fetch(3) library" >&5
22255 $as_echo_n "checking fetch(3) library... " >&6; }
22256 if ${ol_cv_lib_fetch+:} false; then :
22257   $as_echo_n "(cached) " >&6
22258 else
22259
22260         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22261 /* end confdefs.h.  */
22262
22263 #ifdef HAVE_SYS_PARAM_H
22264 #include <sys/param.h>
22265 #endif
22266 #include <stdio.h>
22267 #include <fetch.h>
22268 int
22269 main ()
22270 {
22271 struct url *u = fetchParseURL("file:///");
22272   ;
22273   return 0;
22274 }
22275 _ACEOF
22276 if ac_fn_c_try_link "$LINENO"; then :
22277   ol_cv_lib_fetch=yes
22278 else
22279   ol_cv_lib_fetch=no
22280 fi
22281 rm -f core conftest.err conftest.$ac_objext \
22282     conftest$ac_exeext conftest.$ac_ext
22283 fi
22284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_fetch" >&5
22285 $as_echo "$ol_cv_lib_fetch" >&6; }
22286 LIBS=$ol_LIBS
22287 if test $ol_cv_lib_fetch != no ; then
22288         ol_link_fetch="-lfetch -lcom_err"
22289
22290 $as_echo "#define HAVE_FETCH 1" >>confdefs.h
22291
22292 fi
22293
22294
22295         if test $ol_cv_lib_fetch != no ; then
22296                 LIBS="$LIBS $ol_link_fetch"
22297                 ol_link_fetch=freebsd
22298
22299         elif test $ol_with_fetch != auto ; then
22300                 as_fn_error $? "no suitable API for --with-fetch=$ol_with_fetch" "$LINENO" 5
22301         fi
22302 fi
22303
22304 if test $ol_enable_crypt != no ; then
22305         save_LIBS="$LIBS"
22306         LIBS="$TLS_LIBS $LIBS"
22307
22308         ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
22309 if test "x$ac_cv_func_crypt" = xyes; then :
22310   have_crypt=yes
22311 else
22312
22313                 LIBS="$save_LIBS"
22314                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
22315 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
22316 if ${ac_cv_lib_crypt_crypt+:} false; then :
22317   $as_echo_n "(cached) " >&6
22318 else
22319   ac_check_lib_save_LIBS=$LIBS
22320 LIBS="-lcrypt  $LIBS"
22321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22322 /* end confdefs.h.  */
22323
22324 /* Override any GCC internal prototype to avoid an error.
22325    Use char because int might match the return type of a GCC
22326    builtin and then its argument prototype would still apply.  */
22327 #ifdef __cplusplus
22328 extern "C"
22329 #endif
22330 char crypt ();
22331 int
22332 main ()
22333 {
22334 return crypt ();
22335   ;
22336   return 0;
22337 }
22338 _ACEOF
22339 if ac_fn_c_try_link "$LINENO"; then :
22340   ac_cv_lib_crypt_crypt=yes
22341 else
22342   ac_cv_lib_crypt_crypt=no
22343 fi
22344 rm -f core conftest.err conftest.$ac_objext \
22345     conftest$ac_exeext conftest.$ac_ext
22346 LIBS=$ac_check_lib_save_LIBS
22347 fi
22348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
22349 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
22350 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
22351   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22352                         have_crypt=yes
22353 else
22354   have_crypt=no
22355 fi
22356
22357 fi
22358
22359
22360         LIBS="$save_LIBS"
22361
22362         if test $have_crypt = yes ; then
22363
22364 $as_echo "#define HAVE_CRYPT 1" >>confdefs.h
22365
22366         else
22367                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find crypt" >&5
22368 $as_echo "$as_me: WARNING: could not find crypt" >&2;}
22369                 if test $ol_enable_crypt = yes ; then
22370                         as_fn_error $? "could not find crypt, select appropriate options or disable" "$LINENO" 5
22371                 fi
22372
22373                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling crypt support" >&5
22374 $as_echo "$as_me: WARNING: disabling crypt support" >&2;}
22375                 ol_enable_crypt=no
22376         fi
22377 fi
22378
22379 if test $ol_enable_proctitle != no ; then
22380         ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
22381 if test "x$ac_cv_func_setproctitle" = xyes; then :
22382   have_setproctitle=yes
22383 else
22384
22385                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5
22386 $as_echo_n "checking for setproctitle in -lutil... " >&6; }
22387 if ${ac_cv_lib_util_setproctitle+:} false; then :
22388   $as_echo_n "(cached) " >&6
22389 else
22390   ac_check_lib_save_LIBS=$LIBS
22391 LIBS="-lutil  $LIBS"
22392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22393 /* end confdefs.h.  */
22394
22395 /* Override any GCC internal prototype to avoid an error.
22396    Use char because int might match the return type of a GCC
22397    builtin and then its argument prototype would still apply.  */
22398 #ifdef __cplusplus
22399 extern "C"
22400 #endif
22401 char setproctitle ();
22402 int
22403 main ()
22404 {
22405 return setproctitle ();
22406   ;
22407   return 0;
22408 }
22409 _ACEOF
22410 if ac_fn_c_try_link "$LINENO"; then :
22411   ac_cv_lib_util_setproctitle=yes
22412 else
22413   ac_cv_lib_util_setproctitle=no
22414 fi
22415 rm -f core conftest.err conftest.$ac_objext \
22416     conftest$ac_exeext conftest.$ac_ext
22417 LIBS=$ac_check_lib_save_LIBS
22418 fi
22419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_setproctitle" >&5
22420 $as_echo "$ac_cv_lib_util_setproctitle" >&6; }
22421 if test "x$ac_cv_lib_util_setproctitle" = xyes; then :
22422   have_setproctitle=yes
22423                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
22424 else
22425   have_setproctitle=no
22426                         case " $LIBOBJS " in
22427   *" setproctitle.$ac_objext "* ) ;;
22428   *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
22429  ;;
22430 esac
22431
22432                         LIBSRCS="$LIBSRCS setproctitle.c"
22433 fi
22434
22435 fi
22436
22437
22438         if test $have_setproctitle = yes ; then
22439
22440 $as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h
22441
22442         fi
22443 fi
22444
22445 if test $ol_enable_slp != no ; then
22446         for ac_header in slp.h
22447 do :
22448   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22449 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22450 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
22451   cat >>confdefs.h <<_ACEOF
22452 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22453 _ACEOF
22454
22455 fi
22456
22457 done
22458
22459
22460         if test $ac_cv_header_slp_h = yes ; then
22461                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLPOpen in -lslp" >&5
22462 $as_echo_n "checking for SLPOpen in -lslp... " >&6; }
22463 if ${ac_cv_lib_slp_SLPOpen+:} false; then :
22464   $as_echo_n "(cached) " >&6
22465 else
22466   ac_check_lib_save_LIBS=$LIBS
22467 LIBS="-lslp  $LIBS"
22468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22469 /* end confdefs.h.  */
22470
22471 /* Override any GCC internal prototype to avoid an error.
22472    Use char because int might match the return type of a GCC
22473    builtin and then its argument prototype would still apply.  */
22474 #ifdef __cplusplus
22475 extern "C"
22476 #endif
22477 char SLPOpen ();
22478 int
22479 main ()
22480 {
22481 return SLPOpen ();
22482   ;
22483   return 0;
22484 }
22485 _ACEOF
22486 if ac_fn_c_try_link "$LINENO"; then :
22487   ac_cv_lib_slp_SLPOpen=yes
22488 else
22489   ac_cv_lib_slp_SLPOpen=no
22490 fi
22491 rm -f core conftest.err conftest.$ac_objext \
22492     conftest$ac_exeext conftest.$ac_ext
22493 LIBS=$ac_check_lib_save_LIBS
22494 fi
22495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slp_SLPOpen" >&5
22496 $as_echo "$ac_cv_lib_slp_SLPOpen" >&6; }
22497 if test "x$ac_cv_lib_slp_SLPOpen" = xyes; then :
22498   have_slp=yes
22499 else
22500   have_slp=no
22501 fi
22502
22503                 if test $have_slp = yes ; then
22504
22505 $as_echo "#define HAVE_SLP 1" >>confdefs.h
22506
22507                         SLAPD_SLP_LIBS=-lslp
22508                 fi
22509
22510         elif test $ol_enable_slp = yes ; then
22511                 as_fn_error $? "SLP not found" "$LINENO" 5
22512         fi
22513 fi
22514
22515
22516 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
22517 if test "x$ac_cv_type_mode_t" = xyes; then :
22518
22519 else
22520
22521 cat >>confdefs.h <<_ACEOF
22522 #define mode_t int
22523 _ACEOF
22524
22525 fi
22526
22527 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
22528 if test "x$ac_cv_type_off_t" = xyes; then :
22529
22530 else
22531
22532 cat >>confdefs.h <<_ACEOF
22533 #define off_t long
22534 _ACEOF
22535
22536 fi
22537
22538 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
22539 if test "x$ac_cv_type_pid_t" = xyes; then :
22540
22541 else
22542
22543 cat >>confdefs.h <<_ACEOF
22544 #define pid_t int
22545 _ACEOF
22546
22547 fi
22548
22549 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
22550 if test "x$ac_cv_type_ssize_t" = xyes; then :
22551
22552 else
22553
22554 cat >>confdefs.h <<_ACEOF
22555 #define ssize_t signed int
22556 _ACEOF
22557
22558 fi
22559
22560 ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
22561 if test "x$ac_cv_type_caddr_t" = xyes; then :
22562
22563 else
22564
22565 cat >>confdefs.h <<_ACEOF
22566 #define caddr_t char *
22567 _ACEOF
22568
22569 fi
22570
22571 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
22572 if test "x$ac_cv_type_size_t" = xyes; then :
22573
22574 else
22575
22576 cat >>confdefs.h <<_ACEOF
22577 #define size_t unsigned
22578 _ACEOF
22579
22580 fi
22581
22582
22583 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
22584 if test "x$ac_cv_type_long_long" = xyes; then :
22585
22586 cat >>confdefs.h <<_ACEOF
22587 #define HAVE_LONG_LONG 1
22588 _ACEOF
22589
22590
22591 fi
22592
22593 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
22594 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
22595
22596 cat >>confdefs.h <<_ACEOF
22597 #define HAVE_PTRDIFF_T 1
22598 _ACEOF
22599
22600
22601 fi
22602
22603
22604
22605 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default
22606 #ifdef HAVE_SYS_SOCKET_H
22607 #include <sys/socket.h>
22608 #endif
22609 "
22610 if test "x$ac_cv_type_socklen_t" = xyes; then :
22611
22612 fi
22613
22614
22615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the type of arg 3 to accept()" >&5
22616 $as_echo_n "checking the type of arg 3 to accept()... " >&6; }
22617 if ${ol_cv_type_ber_socklen_t+:} false; then :
22618   $as_echo_n "(cached) " >&6
22619 else
22620
22621         set socklen_t int unsigned "unsigned long" long size_t
22622         test "$ac_cv_type_socklen_t" = yes || shift
22623         ol_cv_type_ber_socklen_t=$1 guessing="guessing "
22624         for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
22625                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22626 /* end confdefs.h.  */
22627 $ac_includes_default
22628 #ifdef HAVE_SYS_SOCKET_H
22629 #include <sys/socket.h>
22630 #endif
22631 extern int accept(int s, $addrtype *ap, $lentype *lp);
22632
22633 int
22634 main ()
22635 {
22636
22637 accept(0, (struct sockaddr *) 0, ($lentype *) 0);
22638
22639   ;
22640   return 0;
22641 }
22642 _ACEOF
22643 if ac_fn_c_try_compile "$LINENO"; then :
22644   ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
22645 fi
22646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22647         done ; done
22648 fi
22649
22650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
22651 $as_echo "$guessing$ol_cv_type_ber_socklen_t *" >&6; }
22652
22653 cat >>confdefs.h <<_ACEOF
22654 #define ber_socklen_t $ol_cv_type_ber_socklen_t
22655 _ACEOF
22656
22657
22658 if test "$ac_cv_type_socklen_t" != yes; then
22659
22660 cat >>confdefs.h <<_ACEOF
22661 #define socklen_t $ol_cv_type_ber_socklen_t
22662 _ACEOF
22663
22664 fi
22665
22666
22667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
22668 $as_echo_n "checking return type of signal handlers... " >&6; }
22669 if ${ac_cv_type_signal+:} false; then :
22670   $as_echo_n "(cached) " >&6
22671 else
22672   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22673 /* end confdefs.h.  */
22674 #include <sys/types.h>
22675 #include <signal.h>
22676
22677 int
22678 main ()
22679 {
22680 return *(signal (0, 0)) (0) == 1;
22681   ;
22682   return 0;
22683 }
22684 _ACEOF
22685 if ac_fn_c_try_compile "$LINENO"; then :
22686   ac_cv_type_signal=int
22687 else
22688   ac_cv_type_signal=void
22689 fi
22690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22691 fi
22692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
22693 $as_echo "$ac_cv_type_signal" >&6; }
22694
22695 cat >>confdefs.h <<_ACEOF
22696 #define RETSIGTYPE $ac_cv_type_signal
22697 _ACEOF
22698
22699
22700
22701 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default
22702 #include <signal.h>
22703
22704 "
22705 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
22706
22707 else
22708
22709 cat >>confdefs.h <<_ACEOF
22710 #define sig_atomic_t int
22711 _ACEOF
22712
22713 fi
22714
22715
22716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
22717 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
22718 if ${ac_cv_type_uid_t+:} false; then :
22719   $as_echo_n "(cached) " >&6
22720 else
22721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22722 /* end confdefs.h.  */
22723 #include <sys/types.h>
22724
22725 _ACEOF
22726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22727   $EGREP "uid_t" >/dev/null 2>&1; then :
22728   ac_cv_type_uid_t=yes
22729 else
22730   ac_cv_type_uid_t=no
22731 fi
22732 rm -f conftest*
22733
22734 fi
22735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
22736 $as_echo "$ac_cv_type_uid_t" >&6; }
22737 if test $ac_cv_type_uid_t = no; then
22738
22739 $as_echo "#define uid_t int" >>confdefs.h
22740
22741
22742 $as_echo "#define gid_t int" >>confdefs.h
22743
22744 fi
22745
22746
22747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
22748 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
22749 if ${ac_cv_header_time+:} false; then :
22750   $as_echo_n "(cached) " >&6
22751 else
22752   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22753 /* end confdefs.h.  */
22754 #include <sys/types.h>
22755 #include <sys/time.h>
22756 #include <time.h>
22757
22758 int
22759 main ()
22760 {
22761 if ((struct tm *) 0)
22762 return 0;
22763   ;
22764   return 0;
22765 }
22766 _ACEOF
22767 if ac_fn_c_try_compile "$LINENO"; then :
22768   ac_cv_header_time=yes
22769 else
22770   ac_cv_header_time=no
22771 fi
22772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22773 fi
22774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
22775 $as_echo "$ac_cv_header_time" >&6; }
22776 if test $ac_cv_header_time = yes; then
22777
22778 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
22779
22780 fi
22781
22782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
22783 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
22784 if ${ac_cv_struct_tm+:} false; then :
22785   $as_echo_n "(cached) " >&6
22786 else
22787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22788 /* end confdefs.h.  */
22789 #include <sys/types.h>
22790 #include <time.h>
22791
22792 int
22793 main ()
22794 {
22795 struct tm tm;
22796                                      int *p = &tm.tm_sec;
22797                                      return !p;
22798   ;
22799   return 0;
22800 }
22801 _ACEOF
22802 if ac_fn_c_try_compile "$LINENO"; then :
22803   ac_cv_struct_tm=time.h
22804 else
22805   ac_cv_struct_tm=sys/time.h
22806 fi
22807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22808 fi
22809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
22810 $as_echo "$ac_cv_struct_tm" >&6; }
22811 if test $ac_cv_struct_tm = sys/time.h; then
22812
22813 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
22814
22815 fi
22816
22817 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
22818 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
22819
22820 cat >>confdefs.h <<_ACEOF
22821 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
22822 _ACEOF
22823
22824
22825 fi
22826
22827 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "$ac_includes_default
22828 #include <pwd.h>
22829 "
22830 if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
22831
22832 cat >>confdefs.h <<_ACEOF
22833 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
22834 _ACEOF
22835
22836
22837 fi
22838
22839 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "$ac_includes_default
22840 #include <pwd.h>
22841 "
22842 if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
22843
22844 cat >>confdefs.h <<_ACEOF
22845 #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
22846 _ACEOF
22847
22848
22849 fi
22850
22851
22852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if toupper() requires islower()" >&5
22853 $as_echo_n "checking if toupper() requires islower()... " >&6; }
22854 if ${ol_cv_c_upper_lower+:} false; then :
22855   $as_echo_n "(cached) " >&6
22856 else
22857
22858         if test "$cross_compiling" = yes; then :
22859   ol_cv_c_upper_lower=safe
22860 else
22861   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22862 /* end confdefs.h.  */
22863
22864 #include <ctype.h>
22865 main()
22866 {
22867         if ('C' == toupper('C'))
22868                 exit(0);
22869         else
22870                 exit(1);
22871 }
22872 _ACEOF
22873 if ac_fn_c_try_run "$LINENO"; then :
22874   ol_cv_c_upper_lower=no
22875 else
22876   ol_cv_c_upper_lower=yes
22877 fi
22878 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22879   conftest.$ac_objext conftest.beam conftest.$ac_ext
22880 fi
22881
22882 fi
22883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_upper_lower" >&5
22884 $as_echo "$ol_cv_c_upper_lower" >&6; }
22885 if test $ol_cv_c_upper_lower != no ; then
22886
22887 $as_echo "#define C_UPPER_LOWER 1" >>confdefs.h
22888
22889 fi
22890
22891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
22892 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
22893 if ${ac_cv_c_const+:} false; then :
22894   $as_echo_n "(cached) " >&6
22895 else
22896   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22897 /* end confdefs.h.  */
22898
22899 int
22900 main ()
22901 {
22902
22903 #ifndef __cplusplus
22904   /* Ultrix mips cc rejects this sort of thing.  */
22905   typedef int charset[2];
22906   const charset cs = { 0, 0 };
22907   /* SunOS 4.1.1 cc rejects this.  */
22908   char const *const *pcpcc;
22909   char **ppc;
22910   /* NEC SVR4.0.2 mips cc rejects this.  */
22911   struct point {int x, y;};
22912   static struct point const zero = {0,0};
22913   /* AIX XL C 1.02.0.0 rejects this.
22914      It does not let you subtract one const X* pointer from another in
22915      an arm of an if-expression whose if-part is not a constant
22916      expression */
22917   const char *g = "string";
22918   pcpcc = &g + (g ? g-g : 0);
22919   /* HPUX 7.0 cc rejects these. */
22920   ++pcpcc;
22921   ppc = (char**) pcpcc;
22922   pcpcc = (char const *const *) ppc;
22923   { /* SCO 3.2v4 cc rejects this sort of thing.  */
22924     char tx;
22925     char *t = &tx;
22926     char const *s = 0 ? (char *) 0 : (char const *) 0;
22927
22928     *t++ = 0;
22929     if (s) return 0;
22930   }
22931   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22932     int x[] = {25, 17};
22933     const int *foo = &x[0];
22934     ++foo;
22935   }
22936   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22937     typedef const int *iptr;
22938     iptr p = 0;
22939     ++p;
22940   }
22941   { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
22942        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22943     struct s { int j; const int *ap[3]; } bx;
22944     struct s *b = &bx; b->j = 5;
22945   }
22946   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22947     const int foo = 10;
22948     if (!foo) return 0;
22949   }
22950   return !cs[0] && !zero.x;
22951 #endif
22952
22953   ;
22954   return 0;
22955 }
22956 _ACEOF
22957 if ac_fn_c_try_compile "$LINENO"; then :
22958   ac_cv_c_const=yes
22959 else
22960   ac_cv_c_const=no
22961 fi
22962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22963 fi
22964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
22965 $as_echo "$ac_cv_c_const" >&6; }
22966 if test $ac_cv_c_const = no; then
22967
22968 $as_echo "#define const /**/" >>confdefs.h
22969
22970 fi
22971
22972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler understands volatile" >&5
22973 $as_echo_n "checking if compiler understands volatile... " >&6; }
22974 if ${ol_cv_c_volatile+:} false; then :
22975   $as_echo_n "(cached) " >&6
22976 else
22977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22978 /* end confdefs.h.  */
22979 int x, y, z;
22980 int
22981 main ()
22982 {
22983 volatile int a; int * volatile b = x ? &y : &z;
22984       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22985       *b = 0;
22986   ;
22987   return 0;
22988 }
22989 _ACEOF
22990 if ac_fn_c_try_compile "$LINENO"; then :
22991   ol_cv_c_volatile=yes
22992 else
22993   ol_cv_c_volatile=no
22994 fi
22995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22996 fi
22997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_volatile" >&5
22998 $as_echo "$ol_cv_c_volatile" >&6; }
22999   if test $ol_cv_c_volatile = yes; then
23000     :
23001   else
23002
23003 $as_echo "#define volatile /**/" >>confdefs.h
23004
23005   fi
23006
23007
23008 if test $cross_compiling = yes ; then
23009         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Crossing compiling... all bets are off!" >&5
23010 $as_echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
23011
23012 $as_echo "#define CROSS_COMPILING 1" >>confdefs.h
23013
23014 else
23015          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
23016 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
23017 if ${ac_cv_c_bigendian+:} false; then :
23018   $as_echo_n "(cached) " >&6
23019 else
23020   ac_cv_c_bigendian=unknown
23021     # See if we're dealing with a universal compiler.
23022     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23023 /* end confdefs.h.  */
23024 #ifndef __APPLE_CC__
23025                not a universal capable compiler
23026              #endif
23027              typedef int dummy;
23028
23029 _ACEOF
23030 if ac_fn_c_try_compile "$LINENO"; then :
23031
23032         # Check for potential -arch flags.  It is not universal unless
23033         # there are at least two -arch flags with different values.
23034         ac_arch=
23035         ac_prev=
23036         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
23037          if test -n "$ac_prev"; then
23038            case $ac_word in
23039              i?86 | x86_64 | ppc | ppc64)
23040                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
23041                  ac_arch=$ac_word
23042                else
23043                  ac_cv_c_bigendian=universal
23044                  break
23045                fi
23046                ;;
23047            esac
23048            ac_prev=
23049          elif test "x$ac_word" = "x-arch"; then
23050            ac_prev=arch
23051          fi
23052        done
23053 fi
23054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23055     if test $ac_cv_c_bigendian = unknown; then
23056       # See if sys/param.h defines the BYTE_ORDER macro.
23057       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23058 /* end confdefs.h.  */
23059 #include <sys/types.h>
23060              #include <sys/param.h>
23061
23062 int
23063 main ()
23064 {
23065 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23066                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23067                      && LITTLE_ENDIAN)
23068               bogus endian macros
23069              #endif
23070
23071   ;
23072   return 0;
23073 }
23074 _ACEOF
23075 if ac_fn_c_try_compile "$LINENO"; then :
23076   # It does; now see whether it defined to BIG_ENDIAN or not.
23077          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23078 /* end confdefs.h.  */
23079 #include <sys/types.h>
23080                 #include <sys/param.h>
23081
23082 int
23083 main ()
23084 {
23085 #if BYTE_ORDER != BIG_ENDIAN
23086                  not big endian
23087                 #endif
23088
23089   ;
23090   return 0;
23091 }
23092 _ACEOF
23093 if ac_fn_c_try_compile "$LINENO"; then :
23094   ac_cv_c_bigendian=yes
23095 else
23096   ac_cv_c_bigendian=no
23097 fi
23098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23099 fi
23100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23101     fi
23102     if test $ac_cv_c_bigendian = unknown; then
23103       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23104       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23105 /* end confdefs.h.  */
23106 #include <limits.h>
23107
23108 int
23109 main ()
23110 {
23111 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23112               bogus endian macros
23113              #endif
23114
23115   ;
23116   return 0;
23117 }
23118 _ACEOF
23119 if ac_fn_c_try_compile "$LINENO"; then :
23120   # It does; now see whether it defined to _BIG_ENDIAN or not.
23121          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23122 /* end confdefs.h.  */
23123 #include <limits.h>
23124
23125 int
23126 main ()
23127 {
23128 #ifndef _BIG_ENDIAN
23129                  not big endian
23130                 #endif
23131
23132   ;
23133   return 0;
23134 }
23135 _ACEOF
23136 if ac_fn_c_try_compile "$LINENO"; then :
23137   ac_cv_c_bigendian=yes
23138 else
23139   ac_cv_c_bigendian=no
23140 fi
23141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23142 fi
23143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23144     fi
23145     if test $ac_cv_c_bigendian = unknown; then
23146       # Compile a test program.
23147       if test "$cross_compiling" = yes; then :
23148   # Try to guess by grepping values from an object file.
23149          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23150 /* end confdefs.h.  */
23151 short int ascii_mm[] =
23152                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23153                 short int ascii_ii[] =
23154                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23155                 int use_ascii (int i) {
23156                   return ascii_mm[i] + ascii_ii[i];
23157                 }
23158                 short int ebcdic_ii[] =
23159                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23160                 short int ebcdic_mm[] =
23161                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23162                 int use_ebcdic (int i) {
23163                   return ebcdic_mm[i] + ebcdic_ii[i];
23164                 }
23165                 extern int foo;
23166
23167 int
23168 main ()
23169 {
23170 return use_ascii (foo) == use_ebcdic (foo);
23171   ;
23172   return 0;
23173 }
23174 _ACEOF
23175 if ac_fn_c_try_compile "$LINENO"; then :
23176   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
23177               ac_cv_c_bigendian=yes
23178             fi
23179             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23180               if test "$ac_cv_c_bigendian" = unknown; then
23181                 ac_cv_c_bigendian=no
23182               else
23183                 # finding both strings is unlikely to happen, but who knows?
23184                 ac_cv_c_bigendian=unknown
23185               fi
23186             fi
23187 fi
23188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23189 else
23190   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23191 /* end confdefs.h.  */
23192 $ac_includes_default
23193 int
23194 main ()
23195 {
23196
23197              /* Are we little or big endian?  From Harbison&Steele.  */
23198              union
23199              {
23200                long int l;
23201                char c[sizeof (long int)];
23202              } u;
23203              u.l = 1;
23204              return u.c[sizeof (long int) - 1] == 1;
23205
23206   ;
23207   return 0;
23208 }
23209 _ACEOF
23210 if ac_fn_c_try_run "$LINENO"; then :
23211   ac_cv_c_bigendian=no
23212 else
23213   ac_cv_c_bigendian=yes
23214 fi
23215 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23216   conftest.$ac_objext conftest.beam conftest.$ac_ext
23217 fi
23218
23219     fi
23220 fi
23221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
23222 $as_echo "$ac_cv_c_bigendian" >&6; }
23223  case $ac_cv_c_bigendian in #(
23224    yes)
23225      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
23226 ;; #(
23227    no)
23228       ;; #(
23229    universal)
23230
23231 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
23232
23233      ;; #(
23234    *)
23235      as_fn_error $? "unknown endianness
23236  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
23237  esac
23238
23239 fi
23240
23241 # The cast to long int works around a bug in the HP C Compiler
23242 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23243 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23244 # This bug is HP SR number 8606223364.
23245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23246 $as_echo_n "checking size of short... " >&6; }
23247 if ${ac_cv_sizeof_short+:} false; then :
23248   $as_echo_n "(cached) " >&6
23249 else
23250   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23251
23252 else
23253   if test "$ac_cv_type_short" = yes; then
23254      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23255 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23256 as_fn_error 77 "cannot compute sizeof (short)
23257 See \`config.log' for more details" "$LINENO" 5; }
23258    else
23259      ac_cv_sizeof_short=0
23260    fi
23261 fi
23262
23263 fi
23264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23265 $as_echo "$ac_cv_sizeof_short" >&6; }
23266
23267
23268
23269 cat >>confdefs.h <<_ACEOF
23270 #define SIZEOF_SHORT $ac_cv_sizeof_short
23271 _ACEOF
23272
23273
23274 # The cast to long int works around a bug in the HP C Compiler
23275 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23276 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23277 # This bug is HP SR number 8606223364.
23278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23279 $as_echo_n "checking size of int... " >&6; }
23280 if ${ac_cv_sizeof_int+:} false; then :
23281   $as_echo_n "(cached) " >&6
23282 else
23283   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23284
23285 else
23286   if test "$ac_cv_type_int" = yes; then
23287      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23288 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23289 as_fn_error 77 "cannot compute sizeof (int)
23290 See \`config.log' for more details" "$LINENO" 5; }
23291    else
23292      ac_cv_sizeof_int=0
23293    fi
23294 fi
23295
23296 fi
23297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23298 $as_echo "$ac_cv_sizeof_int" >&6; }
23299
23300
23301
23302 cat >>confdefs.h <<_ACEOF
23303 #define SIZEOF_INT $ac_cv_sizeof_int
23304 _ACEOF
23305
23306
23307 # The cast to long int works around a bug in the HP C Compiler
23308 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23309 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23310 # This bug is HP SR number 8606223364.
23311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23312 $as_echo_n "checking size of long... " >&6; }
23313 if ${ac_cv_sizeof_long+:} false; then :
23314   $as_echo_n "(cached) " >&6
23315 else
23316   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23317
23318 else
23319   if test "$ac_cv_type_long" = yes; then
23320      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23321 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23322 as_fn_error 77 "cannot compute sizeof (long)
23323 See \`config.log' for more details" "$LINENO" 5; }
23324    else
23325      ac_cv_sizeof_long=0
23326    fi
23327 fi
23328
23329 fi
23330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23331 $as_echo "$ac_cv_sizeof_long" >&6; }
23332
23333
23334
23335 cat >>confdefs.h <<_ACEOF
23336 #define SIZEOF_LONG $ac_cv_sizeof_long
23337 _ACEOF
23338
23339
23340 # The cast to long int works around a bug in the HP C Compiler
23341 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23342 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23343 # This bug is HP SR number 8606223364.
23344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
23345 $as_echo_n "checking size of long long... " >&6; }
23346 if ${ac_cv_sizeof_long_long+:} false; then :
23347   $as_echo_n "(cached) " >&6
23348 else
23349   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
23350
23351 else
23352   if test "$ac_cv_type_long_long" = yes; then
23353      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23354 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23355 as_fn_error 77 "cannot compute sizeof (long long)
23356 See \`config.log' for more details" "$LINENO" 5; }
23357    else
23358      ac_cv_sizeof_long_long=0
23359    fi
23360 fi
23361
23362 fi
23363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
23364 $as_echo "$ac_cv_sizeof_long_long" >&6; }
23365
23366
23367
23368 cat >>confdefs.h <<_ACEOF
23369 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
23370 _ACEOF
23371
23372
23373 # The cast to long int works around a bug in the HP C Compiler
23374 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23375 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23376 # This bug is HP SR number 8606223364.
23377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
23378 $as_echo_n "checking size of wchar_t... " >&6; }
23379 if ${ac_cv_sizeof_wchar_t+:} false; then :
23380   $as_echo_n "(cached) " >&6
23381 else
23382   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "$ac_includes_default"; then :
23383
23384 else
23385   if test "$ac_cv_type_wchar_t" = yes; then
23386      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23387 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23388 as_fn_error 77 "cannot compute sizeof (wchar_t)
23389 See \`config.log' for more details" "$LINENO" 5; }
23390    else
23391      ac_cv_sizeof_wchar_t=0
23392    fi
23393 fi
23394
23395 fi
23396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
23397 $as_echo "$ac_cv_sizeof_wchar_t" >&6; }
23398
23399
23400
23401 cat >>confdefs.h <<_ACEOF
23402 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23403 _ACEOF
23404
23405
23406
23407 if test "$ac_cv_sizeof_int" -lt 4 ; then
23408         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
23409 $as_echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
23410
23411
23412 $as_echo "#define LBER_INT_T long" >>confdefs.h
23413
23414 else
23415
23416 $as_echo "#define LBER_INT_T int" >>confdefs.h
23417
23418 fi
23419
23420
23421 $as_echo "#define LBER_LEN_T long" >>confdefs.h
23422
23423
23424 $as_echo "#define LBER_SOCKET_T int" >>confdefs.h
23425
23426
23427 $as_echo "#define LBER_TAG_T long" >>confdefs.h
23428
23429
23430 if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
23431         if test $ac_cv_sizeof_long_long -gt 4 ; then
23432                 ol_with_mp=longlong
23433
23434 $as_echo "#define USE_MP_LONG_LONG 1" >>confdefs.h
23435
23436         elif test $ol_with_mp = longlong ; then
23437                 as_fn_error $? "long long unusable for multiple precision" "$LINENO" 5
23438         fi
23439 fi
23440 if test $ol_with_mp = long || test $ol_with_mp = auto ; then
23441         if test $ac_cv_sizeof_long -gt 4 ; then
23442                 ol_with_mp=long
23443
23444 $as_echo "#define USE_MP_LONG 1" >>confdefs.h
23445
23446         elif test $ol_with_mp = long ; then
23447                 as_fn_error $? "long unusable for multiple precision" "$LINENO" 5
23448         fi
23449 fi
23450 if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
23451         for ac_header in openssl/bn.h
23452 do :
23453   ac_fn_c_check_header_mongrel "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default"
23454 if test "x$ac_cv_header_openssl_bn_h" = xyes; then :
23455   cat >>confdefs.h <<_ACEOF
23456 #define HAVE_OPENSSL_BN_H 1
23457 _ACEOF
23458
23459 fi
23460
23461 done
23462
23463         for ac_header in openssl/crypto.h
23464 do :
23465   ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
23466 if test "x$ac_cv_header_openssl_crypto_h" = xyes; then :
23467   cat >>confdefs.h <<_ACEOF
23468 #define HAVE_OPENSSL_CRYPTO_H 1
23469 _ACEOF
23470
23471 fi
23472
23473 done
23474
23475         if test "$ac_cv_header_openssl_bn_h" = "yes" &&
23476                 test "$ac_cv_header_openssl_crypto_h" = "yes" &&
23477                 test "$ol_with_tls" = "found" ; then
23478                 ol_with_mp=bignum
23479
23480 $as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h
23481
23482         elif test $ol_with_mp = bignum ; then
23483                 as_fn_error $? "bignum not available" "$LINENO" 5
23484         fi
23485 fi
23486 if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
23487         for ac_header in gmp.h
23488 do :
23489   ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
23490 if test "x$ac_cv_header_gmp_h" = xyes; then :
23491   cat >>confdefs.h <<_ACEOF
23492 #define HAVE_GMP_H 1
23493 _ACEOF
23494
23495 fi
23496
23497 done
23498
23499         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_add_ui in -lgmp" >&5
23500 $as_echo_n "checking for __gmpz_add_ui in -lgmp... " >&6; }
23501 if ${ac_cv_lib_gmp___gmpz_add_ui+:} false; then :
23502   $as_echo_n "(cached) " >&6
23503 else
23504   ac_check_lib_save_LIBS=$LIBS
23505 LIBS="-lgmp  $LIBS"
23506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23507 /* end confdefs.h.  */
23508
23509 /* Override any GCC internal prototype to avoid an error.
23510    Use char because int might match the return type of a GCC
23511    builtin and then its argument prototype would still apply.  */
23512 #ifdef __cplusplus
23513 extern "C"
23514 #endif
23515 char __gmpz_add_ui ();
23516 int
23517 main ()
23518 {
23519 return __gmpz_add_ui ();
23520   ;
23521   return 0;
23522 }
23523 _ACEOF
23524 if ac_fn_c_try_link "$LINENO"; then :
23525   ac_cv_lib_gmp___gmpz_add_ui=yes
23526 else
23527   ac_cv_lib_gmp___gmpz_add_ui=no
23528 fi
23529 rm -f core conftest.err conftest.$ac_objext \
23530     conftest$ac_exeext conftest.$ac_ext
23531 LIBS=$ac_check_lib_save_LIBS
23532 fi
23533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
23534 $as_echo "$ac_cv_lib_gmp___gmpz_add_ui" >&6; }
23535 if test "x$ac_cv_lib_gmp___gmpz_add_ui" = xyes; then :
23536   cat >>confdefs.h <<_ACEOF
23537 #define HAVE_LIBGMP 1
23538 _ACEOF
23539
23540   LIBS="-lgmp $LIBS"
23541
23542 fi
23543
23544         if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
23545
23546 $as_echo "#define USE_MP_GMP 1" >>confdefs.h
23547
23548                 ol_with_mp=gmp
23549         elif test $ol_with_mp = gmp ; then
23550                 as_fn_error $? "gmp not available" "$LINENO" 5
23551         fi
23552 fi
23553 if test $ol_with_mp = auto ; then
23554         ol_with_mp=no
23555 fi
23556
23557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
23558 $as_echo_n "checking for working memcmp... " >&6; }
23559 if ${ac_cv_func_memcmp_working+:} false; then :
23560   $as_echo_n "(cached) " >&6
23561 else
23562   if test "$cross_compiling" = yes; then :
23563   ac_cv_func_memcmp_working=no
23564 else
23565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23566 /* end confdefs.h.  */
23567 $ac_includes_default
23568 int
23569 main ()
23570 {
23571
23572   /* Some versions of memcmp are not 8-bit clean.  */
23573   char c0 = '\100', c1 = '\200', c2 = '\201';
23574   if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
23575     return 1;
23576
23577   /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
23578      or more and with at least one buffer not starting on a 4-byte boundary.
23579      William Lewis provided this test program.   */
23580   {
23581     char foo[21];
23582     char bar[21];
23583     int i;
23584     for (i = 0; i < 4; i++)
23585       {
23586         char *a = foo + i;
23587         char *b = bar + i;
23588         strcpy (a, "--------01111111");
23589         strcpy (b, "--------10000000");
23590         if (memcmp (a, b, 16) >= 0)
23591           return 1;
23592       }
23593     return 0;
23594   }
23595
23596   ;
23597   return 0;
23598 }
23599 _ACEOF
23600 if ac_fn_c_try_run "$LINENO"; then :
23601   ac_cv_func_memcmp_working=yes
23602 else
23603   ac_cv_func_memcmp_working=no
23604 fi
23605 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23606   conftest.$ac_objext conftest.beam conftest.$ac_ext
23607 fi
23608
23609 fi
23610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
23611 $as_echo "$ac_cv_func_memcmp_working" >&6; }
23612 test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
23613   *" memcmp.$ac_objext "* ) ;;
23614   *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
23615  ;;
23616 esac
23617
23618
23619
23620 if test $ac_cv_func_memcmp_working = no ; then
23621
23622 $as_echo "#define NEED_MEMCMP_REPLACEMENT 1" >>confdefs.h
23623
23624 fi
23625
23626 for ac_func in strftime
23627 do :
23628   ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23629 if test "x$ac_cv_func_strftime" = xyes; then :
23630   cat >>confdefs.h <<_ACEOF
23631 #define HAVE_STRFTIME 1
23632 _ACEOF
23633
23634 else
23635   # strftime is in -lintl on SCO UNIX.
23636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
23637 $as_echo_n "checking for strftime in -lintl... " >&6; }
23638 if ${ac_cv_lib_intl_strftime+:} false; then :
23639   $as_echo_n "(cached) " >&6
23640 else
23641   ac_check_lib_save_LIBS=$LIBS
23642 LIBS="-lintl  $LIBS"
23643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23644 /* end confdefs.h.  */
23645
23646 /* Override any GCC internal prototype to avoid an error.
23647    Use char because int might match the return type of a GCC
23648    builtin and then its argument prototype would still apply.  */
23649 #ifdef __cplusplus
23650 extern "C"
23651 #endif
23652 char strftime ();
23653 int
23654 main ()
23655 {
23656 return strftime ();
23657   ;
23658   return 0;
23659 }
23660 _ACEOF
23661 if ac_fn_c_try_link "$LINENO"; then :
23662   ac_cv_lib_intl_strftime=yes
23663 else
23664   ac_cv_lib_intl_strftime=no
23665 fi
23666 rm -f core conftest.err conftest.$ac_objext \
23667     conftest$ac_exeext conftest.$ac_ext
23668 LIBS=$ac_check_lib_save_LIBS
23669 fi
23670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
23671 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
23672 if test "x$ac_cv_lib_intl_strftime" = xyes; then :
23673   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
23674
23675 LIBS="-lintl $LIBS"
23676 fi
23677
23678 fi
23679 done
23680
23681
23682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton()" >&5
23683 $as_echo_n "checking for inet_aton()... " >&6; }
23684 if ${ol_cv_func_inet_aton+:} false; then :
23685   $as_echo_n "(cached) " >&6
23686 else
23687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23688 /* end confdefs.h.  */
23689
23690 #ifdef HAVE_SYS_TYPES_H
23691 #       include <sys/types.h>
23692 #endif
23693 #ifdef HAVE_SYS_SOCKET_H
23694 #       include <sys/socket.h>
23695 #       ifdef HAVE_SYS_SELECT_H
23696 #               include <sys/select.h>
23697 #       endif
23698 #       include <netinet/in.h>
23699 #       ifdef HAVE_ARPA_INET_H
23700 #               include <arpa/inet.h>
23701 #       endif
23702 #endif
23703
23704 int
23705 main ()
23706 {
23707 struct in_addr in;
23708 int rc = inet_aton( "255.255.255.255", &in );
23709   ;
23710   return 0;
23711 }
23712 _ACEOF
23713 if ac_fn_c_try_link "$LINENO"; then :
23714   ol_cv_func_inet_aton=yes
23715 else
23716   ol_cv_func_inet_aton=no
23717 fi
23718 rm -f core conftest.err conftest.$ac_objext \
23719     conftest$ac_exeext conftest.$ac_ext
23720 fi
23721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_inet_aton" >&5
23722 $as_echo "$ol_cv_func_inet_aton" >&6; }
23723   if test $ol_cv_func_inet_aton != no; then
23724
23725 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
23726
23727   fi
23728
23729
23730 ac_fn_c_check_func "$LINENO" "_spawnlp" "ac_cv_func__spawnlp"
23731 if test "x$ac_cv_func__spawnlp" = xyes; then :
23732
23733 $as_echo "#define HAVE_SPAWNLP 1" >>confdefs.h
23734
23735 fi
23736
23737
23738 ac_fn_c_check_func "$LINENO" "_snprintf" "ac_cv_func__snprintf"
23739 if test "x$ac_cv_func__snprintf" = xyes; then :
23740   ac_cv_func_snprintf=yes
23741
23742 $as_echo "#define snprintf _snprintf" >>confdefs.h
23743
23744
23745 fi
23746
23747
23748 for ac_func in vsnprintf _vsnprintf
23749 do :
23750   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23751 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23752 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23753   cat >>confdefs.h <<_ACEOF
23754 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23755 _ACEOF
23756
23757 fi
23758 done
23759
23760
23761 if test $ac_cv_func_vsnprintf = no -a $ac_cv_func__vsnprintf = yes ; then
23762         ac_cv_func_vsnprintf=yes
23763
23764 $as_echo "#define vsnprintf _vsnprintf" >>confdefs.h
23765
23766 fi
23767
23768 for ac_func in vprintf
23769 do :
23770   ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
23771 if test "x$ac_cv_func_vprintf" = xyes; then :
23772   cat >>confdefs.h <<_ACEOF
23773 #define HAVE_VPRINTF 1
23774 _ACEOF
23775
23776 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
23777 if test "x$ac_cv_func__doprnt" = xyes; then :
23778
23779 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
23780
23781 fi
23782
23783 fi
23784 done
23785
23786
23787
23788 if test $ac_cv_func_vprintf = yes ; then
23789                 for ac_func in snprintf vsnprintf
23790 do :
23791   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23792 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23793 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23794   cat >>confdefs.h <<_ACEOF
23795 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23796 _ACEOF
23797
23798 fi
23799 done
23800
23801 fi
23802
23803 for ac_func in \
23804         bcopy                   \
23805         closesocket             \
23806         chroot                  \
23807         endgrent                \
23808         endpwent                \
23809         fcntl                   \
23810         flock                   \
23811         fstat                   \
23812         getdtablesize           \
23813         geteuid                 \
23814         getgrgid                \
23815         gethostname             \
23816         getpassphrase           \
23817         getpwuid                \
23818         getpwnam                \
23819         getspnam                \
23820         gettimeofday            \
23821         initgroups              \
23822         inet_ntoa_b             \
23823         ioctl                   \
23824         lockf                   \
23825         memcpy                  \
23826         memmove                 \
23827         memrchr                 \
23828         mkstemp                 \
23829         mktemp                  \
23830         pipe                    \
23831         read                    \
23832         recv                    \
23833         recvfrom                \
23834         setpwfile               \
23835         setgid                  \
23836         setegid                 \
23837         setsid                  \
23838         setuid                  \
23839         seteuid                 \
23840         signal                  \
23841         strdup                  \
23842         strpbrk                 \
23843         strrchr                 \
23844         strsep                  \
23845         strstr                  \
23846         strtol                  \
23847         strtoul                 \
23848         strtoq                  \
23849         strtouq                 \
23850         strtoll                 \
23851         strtoull                \
23852         strspn                  \
23853         sysconf                 \
23854         waitpid                 \
23855         wait4                   \
23856         write                   \
23857         send                    \
23858         sendmsg                 \
23859         sendto                  \
23860
23861 do :
23862   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23863 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23864 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23865   cat >>confdefs.h <<_ACEOF
23866 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23867 _ACEOF
23868
23869 fi
23870 done
23871
23872
23873 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
23874 if test "x$ac_cv_func_getopt" = xyes; then :
23875   $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
23876
23877 else
23878   case " $LIBOBJS " in
23879   *" getopt.$ac_objext "* ) ;;
23880   *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
23881  ;;
23882 esac
23883
23884 fi
23885
23886 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
23887 if test "x$ac_cv_func_getpeereid" = xyes; then :
23888   $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
23889
23890 else
23891   case " $LIBOBJS " in
23892   *" getpeereid.$ac_objext "* ) ;;
23893   *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
23894  ;;
23895 esac
23896
23897 fi
23898
23899
23900
23901 if test "$ac_cv_func_getopt" != yes; then
23902         LIBSRCS="$LIBSRCS getopt.c"
23903 fi
23904
23905 if test "$ac_cv_func_getpeereid" != yes; then
23906         for ac_func in getpeerucred
23907 do :
23908   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23909 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23910 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23911   cat >>confdefs.h <<_ACEOF
23912 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23913 _ACEOF
23914
23915 fi
23916 done
23917
23918         if test "$ac_cv_func_getpeerucred" != yes ; then
23919                 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrightslen" "ac_cv_member_struct_msghdr_msg_accrightslen" "$ac_includes_default
23920 #ifdef HAVE_SYS_SOCKET_H
23921 #include <sys/socket.h>
23922 #endif
23923 "
23924 if test "x$ac_cv_member_struct_msghdr_msg_accrightslen" = xyes; then :
23925
23926 cat >>confdefs.h <<_ACEOF
23927 #define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
23928 _ACEOF
23929
23930
23931 fi
23932
23933                 if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
23934                         ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "$ac_includes_default
23935 #ifdef HAVE_SYS_SOCKET_H
23936 #include <sys/socket.h>
23937 #endif
23938 "
23939 if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
23940
23941 cat >>confdefs.h <<_ACEOF
23942 #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
23943 _ACEOF
23944
23945
23946 fi
23947
23948                 fi
23949                 ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default"
23950 if test "x$ac_cv_member_struct_stat_st_fstype" = xyes; then :
23951
23952 cat >>confdefs.h <<_ACEOF
23953 #define HAVE_STRUCT_STAT_ST_FSTYPE 1
23954 _ACEOF
23955
23956
23957 fi
23958 ac_fn_c_check_member "$LINENO" "struct stat" "st_vfstype" "ac_cv_member_struct_stat_st_vfstype" "$ac_includes_default"
23959 if test "x$ac_cv_member_struct_stat_st_vfstype" = xyes; then :
23960
23961 cat >>confdefs.h <<_ACEOF
23962 #define HAVE_STRUCT_STAT_ST_VFSTYPE 1
23963 _ACEOF
23964
23965
23966 fi
23967
23968                 if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
23969                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23970 /* end confdefs.h.  */
23971 struct stat st; char *ptr=st.st_fstype;
23972 _ACEOF
23973 if ac_fn_c_try_compile "$LINENO"; then :
23974
23975 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1" >>confdefs.h
23976
23977 else
23978
23979 $as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1" >>confdefs.h
23980
23981 fi
23982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23983                 fi
23984         fi
23985         LIBSRCS="$LIBSRCS getpeereid.c"
23986 fi
23987
23988 if test "$ac_cv_func_snprintf" != yes ||
23989    test "$ac_cv_func_vsnprintf" != yes; then
23990         if test "$ac_cv_func_snprintf" != yes; then
23991
23992 $as_echo "#define snprintf ber_pvt_snprintf" >>confdefs.h
23993
23994         fi
23995         if test "$ac_cv_func_vsnprintf" != yes; then
23996
23997 $as_echo "#define vsnprintf ber_pvt_vsnprintf" >>confdefs.h
23998
23999         fi
24000 fi
24001
24002
24003 if test "$ol_enable_slapi" != no ; then
24004                         for ac_header in ltdl.h
24005 do :
24006   ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
24007 if test "x$ac_cv_header_ltdl_h" = xyes; then :
24008   cat >>confdefs.h <<_ACEOF
24009 #define HAVE_LTDL_H 1
24010 _ACEOF
24011
24012 fi
24013
24014 done
24015
24016
24017         if test $ac_cv_header_ltdl_h != yes ; then
24018                 as_fn_error $? "could not locate <ltdl.h>" "$LINENO" 5
24019         fi
24020         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
24021 $as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
24022 if ${ac_cv_lib_ltdl_lt_dlinit+:} false; then :
24023   $as_echo_n "(cached) " >&6
24024 else
24025   ac_check_lib_save_LIBS=$LIBS
24026 LIBS="-lltdl  $LIBS"
24027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24028 /* end confdefs.h.  */
24029
24030 /* Override any GCC internal prototype to avoid an error.
24031    Use char because int might match the return type of a GCC
24032    builtin and then its argument prototype would still apply.  */
24033 #ifdef __cplusplus
24034 extern "C"
24035 #endif
24036 char lt_dlinit ();
24037 int
24038 main ()
24039 {
24040 return lt_dlinit ();
24041   ;
24042   return 0;
24043 }
24044 _ACEOF
24045 if ac_fn_c_try_link "$LINENO"; then :
24046   ac_cv_lib_ltdl_lt_dlinit=yes
24047 else
24048   ac_cv_lib_ltdl_lt_dlinit=no
24049 fi
24050 rm -f core conftest.err conftest.$ac_objext \
24051     conftest$ac_exeext conftest.$ac_ext
24052 LIBS=$ac_check_lib_save_LIBS
24053 fi
24054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
24055 $as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
24056 if test "x$ac_cv_lib_ltdl_lt_dlinit" = xyes; then :
24057
24058                 SLAPI_LIBS=-lltdl
24059                 LIBSLAPI=slapi/libslapi.la
24060
24061 $as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
24062
24063
24064 else
24065   as_fn_error $? "could not locate libtool -lltdl" "$LINENO" 5
24066 fi
24067
24068
24069
24070 $as_echo "#define LDAP_SLAPI 1" >>confdefs.h
24071
24072 fi
24073
24074 if test "$ol_enable_debug" != no ; then
24075         if test "$ol_enable_debug" = traditional; then
24076
24077 $as_echo "#define OLD_DEBUG 1" >>confdefs.h
24078
24079         fi
24080
24081 $as_echo "#define LDAP_DEBUG 1" >>confdefs.h
24082
24083 fi
24084 if test "$ol_enable_syslog" = yes ; then
24085
24086 $as_echo "#define LDAP_SYSLOG 1" >>confdefs.h
24087
24088 fi
24089 if test "$ol_enable_proctitle" != no ; then
24090
24091 $as_echo "#define LDAP_PROCTITLE 1" >>confdefs.h
24092
24093 fi
24094 if test "$ol_enable_referrals" != no ; then
24095
24096 $as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION" >>confdefs.h
24097
24098 fi
24099 if test "$ol_enable_local" != no; then
24100
24101 $as_echo "#define LDAP_PF_LOCAL 1" >>confdefs.h
24102
24103 fi
24104 if test "$ol_link_ipv6" != no; then
24105
24106 $as_echo "#define LDAP_PF_INET6 1" >>confdefs.h
24107
24108 fi
24109 if test "$ol_enable_cleartext" != no ; then
24110
24111 $as_echo "#define SLAPD_CLEARTEXT 1" >>confdefs.h
24112
24113 fi
24114 if test "$ol_enable_crypt" != no ; then
24115
24116 $as_echo "#define SLAPD_CRYPT 1" >>confdefs.h
24117
24118 fi
24119 if test "$ol_link_spasswd" != no ; then
24120
24121 $as_echo "#define SLAPD_SPASSWD 1" >>confdefs.h
24122
24123 fi
24124 if test "$ol_enable_rlookups" != no ; then
24125
24126 $as_echo "#define SLAPD_RLOOKUPS 1" >>confdefs.h
24127
24128 fi
24129 if test "$ol_enable_aci" != no ; then
24130         if test $ol_enable_dynacl = no ; then
24131                 ol_enable_dynacl=yes
24132                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ACIs need dynacl" >&5
24133 $as_echo "$as_me: WARNING: ACIs need dynacl" >&2;}
24134         fi
24135         if test "$ol_enable_aci" = mod ; then
24136                 MFLAG=SLAPD_MOD_DYNAMIC
24137                                 as_fn_error $? "ACI build as dynamic module not supported (yet)" "$LINENO" 5
24138         else
24139                 MFLAG=SLAPD_MOD_STATIC
24140         fi
24141         WITH_ACI_ENABLED=$ol_enable_aci
24142
24143 cat >>confdefs.h <<_ACEOF
24144 #define SLAPD_ACI_ENABLED $MFLAG
24145 _ACEOF
24146
24147 else
24148         WITH_ACI_ENABLED=no
24149 fi
24150 if test "$ol_enable_dynacl" != no ; then
24151
24152 $as_echo "#define SLAP_DYNACL 1" >>confdefs.h
24153
24154 fi
24155
24156 if test "$ol_link_modules" != no ; then
24157
24158 $as_echo "#define SLAPD_MODULES 1" >>confdefs.h
24159
24160         BUILD_SLAPD=yes
24161         SLAPD_MODULES_LDFLAGS="-dlopen self"
24162 fi
24163
24164
24165 $as_echo "#define SLAPD_MOD_STATIC 1" >>confdefs.h
24166
24167
24168 $as_echo "#define SLAPD_MOD_DYNAMIC 2" >>confdefs.h
24169
24170
24171 if test "$ol_enable_monitor" != no ; then
24172         BUILD_SLAPD=yes
24173         BUILD_MONITOR=$ol_enable_monitor
24174         if test "$ol_enable_monitor" = mod ; then
24175                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24176                 MFLAG=SLAPD_MOD_DYNAMIC
24177         else
24178                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24179                 MFLAG=SLAPD_MOD_STATIC
24180         fi
24181
24182 cat >>confdefs.h <<_ACEOF
24183 #define SLAPD_MONITOR $MFLAG
24184 _ACEOF
24185
24186 fi
24187
24188 if test "$ol_enable_bdb" != no ; then
24189         BUILD_SLAPD=yes
24190         BUILD_BDB=$ol_enable_bdb
24191         if test "$ol_enable_bdb" = mod ; then
24192                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24193                 MFLAG=SLAPD_MOD_DYNAMIC
24194         else
24195                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24196                 MFLAG=SLAPD_MOD_STATIC
24197         fi
24198
24199 cat >>confdefs.h <<_ACEOF
24200 #define SLAPD_BDB $MFLAG
24201 _ACEOF
24202
24203 fi
24204
24205 if test "$ol_enable_dnssrv" != no ; then
24206         BUILD_SLAPD=yes
24207         BUILD_DNSSRV=$ol_enable_dnssrv
24208         if test "$ol_enable_dnssrv" = mod ; then
24209                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24210                 MFLAG=SLAPD_MOD_DYNAMIC
24211         else
24212                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24213                 MFLAG=SLAPD_MOD_STATIC
24214         fi
24215
24216 cat >>confdefs.h <<_ACEOF
24217 #define SLAPD_DNSSRV $MFLAG
24218 _ACEOF
24219
24220 fi
24221
24222 if test "$ol_enable_hdb" != no ; then
24223         BUILD_SLAPD=yes
24224         BUILD_HDB=$ol_enable_hdb
24225         if test "$ol_enable_hdb" = mod ; then
24226                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24227                 MFLAG=SLAPD_MOD_DYNAMIC
24228         else
24229                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24230                 MFLAG=SLAPD_MOD_STATIC
24231         fi
24232
24233 cat >>confdefs.h <<_ACEOF
24234 #define SLAPD_HDB $MFLAG
24235 _ACEOF
24236
24237 fi
24238
24239 if test "$ol_enable_ldap" != no ; then
24240         BUILD_SLAPD=yes
24241         BUILD_LDAP=$ol_enable_ldap
24242         if test "$ol_enable_ldap" = mod ; then
24243                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24244                 MFLAG=SLAPD_MOD_DYNAMIC
24245         else
24246                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24247                 MFLAG=SLAPD_MOD_STATIC
24248         fi
24249
24250 cat >>confdefs.h <<_ACEOF
24251 #define SLAPD_LDAP $MFLAG
24252 _ACEOF
24253
24254 fi
24255
24256 if test "$ol_enable_mdb" != no ; then
24257         BUILD_SLAPD=yes
24258         BUILD_MDB=$ol_enable_mdb
24259         if test "$ol_enable_mdb" = mod ; then
24260                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-mdb"
24261                 MFLAG=SLAPD_MOD_DYNAMIC
24262         else
24263                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-mdb"
24264                 MFLAG=SLAPD_MOD_STATIC
24265         fi
24266
24267 cat >>confdefs.h <<_ACEOF
24268 #define SLAPD_MDB $MFLAG
24269 _ACEOF
24270
24271 fi
24272
24273 if test "$ol_enable_meta" != no ; then
24274         BUILD_SLAPD=yes
24275         BUILD_META=$ol_enable_meta
24276         BUILD_REWRITE=yes
24277         if test "$ol_enable_meta" = mod ; then
24278                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24279                 MFLAG=SLAPD_MOD_DYNAMIC
24280         else
24281                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24282                 MFLAG=SLAPD_MOD_STATIC
24283         fi
24284
24285 cat >>confdefs.h <<_ACEOF
24286 #define SLAPD_META $MFLAG
24287 _ACEOF
24288
24289 fi
24290
24291 if test "$ol_enable_ndb" != no ; then
24292         BUILD_SLAPD=yes
24293         BUILD_NDB=$ol_enable_ndb
24294         if test "$ol_enable_ndb" = mod ; then
24295                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ndb"
24296                 MFLAG=SLAPD_MOD_DYNAMIC
24297         else
24298                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ndb"
24299                 MFLAG=SLAPD_MOD_STATIC
24300         fi
24301
24302 cat >>confdefs.h <<_ACEOF
24303 #define SLAPD_NDB $MFLAG
24304 _ACEOF
24305
24306 fi
24307
24308 if test "$ol_enable_null" != no ; then
24309         BUILD_SLAPD=yes
24310         BUILD_NULL=$ol_enable_null
24311         if test "$ol_enable_null" = mod ; then
24312                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24313                 MFLAG=SLAPD_MOD_DYNAMIC
24314         else
24315                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24316                 MFLAG=SLAPD_MOD_STATIC
24317         fi
24318
24319 cat >>confdefs.h <<_ACEOF
24320 #define SLAPD_NULL $MFLAG
24321 _ACEOF
24322
24323 fi
24324
24325 if test "$ol_enable_passwd" != no ; then
24326         BUILD_SLAPD=yes
24327         BUILD_PASSWD=$ol_enable_passwd
24328         if test "$ol_enable_passwd" = mod ; then
24329                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24330                 MFLAG=SLAPD_MOD_DYNAMIC
24331         else
24332                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24333                 MFLAG=SLAPD_MOD_STATIC
24334         fi
24335
24336 cat >>confdefs.h <<_ACEOF
24337 #define SLAPD_PASSWD $MFLAG
24338 _ACEOF
24339
24340 fi
24341
24342 if test "$ol_link_perl" != no ; then
24343         BUILD_SLAPD=yes
24344         BUILD_PERL=$ol_enable_perl
24345         if test "$ol_enable_perl" = mod ; then
24346                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24347                 MFLAG=SLAPD_MOD_DYNAMIC
24348         else
24349                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24350                 MFLAG=SLAPD_MOD_STATIC
24351         fi
24352
24353 cat >>confdefs.h <<_ACEOF
24354 #define SLAPD_PERL $MFLAG
24355 _ACEOF
24356
24357 fi
24358
24359 if test "$ol_enable_relay" != no ; then
24360         BUILD_SLAPD=yes
24361         BUILD_RELAY=$ol_enable_relay
24362         if test "$ol_enable_relay" = mod ; then
24363                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
24364                 MFLAG=SLAPD_MOD_DYNAMIC
24365         else
24366                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
24367                 MFLAG=SLAPD_MOD_STATIC
24368         fi
24369
24370 cat >>confdefs.h <<_ACEOF
24371 #define SLAPD_RELAY $MFLAG
24372 _ACEOF
24373
24374 fi
24375
24376 if test "$ol_enable_shell" != no ; then
24377         if test "$ol_link_threads" != no ; then
24378                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use of --without-threads is recommended with back-shell" >&5
24379 $as_echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
24380         fi
24381         BUILD_SLAPD=yes
24382         BUILD_SHELL=$ol_enable_shell
24383         if test "$ol_enable_shell" = mod ; then
24384                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24385                 MFLAG=SLAPD_MOD_DYNAMIC
24386         else
24387                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24388                 MFLAG=SLAPD_MOD_STATIC
24389         fi
24390
24391 cat >>confdefs.h <<_ACEOF
24392 #define SLAPD_SHELL $MFLAG
24393 _ACEOF
24394
24395 fi
24396
24397 if test "$ol_enable_sock" != no ; then
24398         BUILD_SLAPD=yes
24399         BUILD_SOCK=$ol_enable_sock
24400         if test "$ol_enable_sock" = mod ; then
24401                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sock"
24402                 MFLAG=SLAPD_MOD_DYNAMIC
24403         else
24404                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sock"
24405                 MFLAG=SLAPD_MOD_STATIC
24406         fi
24407
24408 cat >>confdefs.h <<_ACEOF
24409 #define SLAPD_SOCK $MFLAG
24410 _ACEOF
24411
24412 fi
24413
24414 if test "$ol_link_sql" != no ; then
24415         BUILD_SLAPD=yes
24416         BUILD_SQL=$ol_enable_sql
24417         if test "$ol_enable_sql" = mod; then
24418                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24419                 MFLAG=SLAPD_MOD_DYNAMIC
24420         else
24421                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24422                 MFLAG=SLAPD_MOD_STATIC
24423         fi
24424
24425 cat >>confdefs.h <<_ACEOF
24426 #define SLAPD_SQL $MFLAG
24427 _ACEOF
24428
24429 fi
24430
24431 if test "$ol_enable_accesslog" != no ; then
24432         BUILD_ACCESSLOG=$ol_enable_accesslog
24433         if test "$ol_enable_accesslog" = mod ; then
24434                 MFLAG=SLAPD_MOD_DYNAMIC
24435                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
24436         else
24437                 MFLAG=SLAPD_MOD_STATIC
24438                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
24439         fi
24440
24441 cat >>confdefs.h <<_ACEOF
24442 #define SLAPD_OVER_ACCESSLOG $MFLAG
24443 _ACEOF
24444
24445 fi
24446
24447 if test "$ol_enable_auditlog" != no ; then
24448         BUILD_AUDITLOG=$ol_enable_auditlog
24449         if test "$ol_enable_auditlog" = mod ; then
24450                 MFLAG=SLAPD_MOD_DYNAMIC
24451                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
24452         else
24453                 MFLAG=SLAPD_MOD_STATIC
24454                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
24455         fi
24456
24457 cat >>confdefs.h <<_ACEOF
24458 #define SLAPD_OVER_AUDITLOG $MFLAG
24459 _ACEOF
24460
24461 fi
24462
24463 if test "$ol_enable_collect" != no ; then
24464         BUILD_COLLECT=$ol_enable_collect
24465         if test "$ol_enable_collect" = mod ; then
24466                 MFLAG=SLAPD_MOD_DYNAMIC
24467                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS collect.la"
24468         else
24469                 MFLAG=SLAPD_MOD_STATIC
24470                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS collect.o"
24471         fi
24472
24473 cat >>confdefs.h <<_ACEOF
24474 #define SLAPD_OVER_COLLECT $MFLAG
24475 _ACEOF
24476
24477 fi
24478
24479 if test "$ol_enable_constraint" != no ; then
24480         BUILD_CONSTRAINT=$ol_enable_constraint
24481         if test "$ol_enable_constraint" = mod ; then
24482                 MFLAG=SLAPD_MOD_DYNAMIC
24483                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la"
24484         else
24485                 MFLAG=SLAPD_MOD_STATIC
24486                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o"
24487         fi
24488
24489 cat >>confdefs.h <<_ACEOF
24490 #define SLAPD_OVER_CONSTRAINT $MFLAG
24491 _ACEOF
24492
24493 fi
24494
24495 if test "$ol_enable_dds" != no ; then
24496         BUILD_DDS=$ol_enable_dds
24497         if test "$ol_enable_dds" = mod ; then
24498                 MFLAG=SLAPD_MOD_DYNAMIC
24499                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
24500         else
24501                 MFLAG=SLAPD_MOD_STATIC
24502                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
24503         fi
24504
24505 cat >>confdefs.h <<_ACEOF
24506 #define SLAPD_OVER_DDS $MFLAG
24507 _ACEOF
24508
24509 fi
24510
24511 if test "$ol_enable_deref" != no ; then
24512         BUILD_DEREF=$ol_enable_deref
24513         if test "$ol_enable_deref" = mod ; then
24514                 MFLAG=SLAPD_MOD_DYNAMIC
24515                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS deref.la"
24516         else
24517                 MFLAG=SLAPD_MOD_STATIC
24518                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS deref.o"
24519         fi
24520
24521 cat >>confdefs.h <<_ACEOF
24522 #define SLAPD_OVER_DEREF $MFLAG
24523 _ACEOF
24524
24525 fi
24526
24527 if test "$ol_enable_dyngroup" != no ; then
24528         BUILD_DYNGROUP=$ol_enable_dyngroup
24529         if test "$ol_enable_dyngroup" = mod ; then
24530                 MFLAG=SLAPD_MOD_DYNAMIC
24531                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24532         else
24533                 MFLAG=SLAPD_MOD_STATIC
24534                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
24535         fi
24536
24537 cat >>confdefs.h <<_ACEOF
24538 #define SLAPD_OVER_DYNGROUP $MFLAG
24539 _ACEOF
24540
24541 fi
24542
24543 if test "$ol_enable_dynlist" != no ; then
24544         BUILD_DYNLIST=$ol_enable_dynlist
24545         if test "$ol_enable_dynlist" = mod ; then
24546                 MFLAG=SLAPD_MOD_DYNAMIC
24547                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
24548         else
24549                 MFLAG=SLAPD_MOD_STATIC
24550                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
24551         fi
24552
24553 cat >>confdefs.h <<_ACEOF
24554 #define SLAPD_OVER_DYNLIST $MFLAG
24555 _ACEOF
24556
24557 fi
24558
24559 if test "$ol_enable_memberof" != no ; then
24560         BUILD_MEMBEROF=$ol_enable_memberof
24561         if test "$ol_enable_memberof" = mod ; then
24562                 MFLAG=SLAPD_MOD_DYNAMIC
24563                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la"
24564         else
24565                 MFLAG=SLAPD_MOD_STATIC
24566                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o"
24567         fi
24568
24569 cat >>confdefs.h <<_ACEOF
24570 #define SLAPD_OVER_MEMBEROF $MFLAG
24571 _ACEOF
24572
24573 fi
24574
24575 if test "$ol_enable_ppolicy" != no ; then
24576         BUILD_PPOLICY=$ol_enable_ppolicy
24577         if test "$ol_enable_ppolicy" = mod ; then
24578                 MFLAG=SLAPD_MOD_DYNAMIC
24579                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24580         else
24581                 MFLAG=SLAPD_MOD_STATIC
24582                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
24583         fi
24584
24585 cat >>confdefs.h <<_ACEOF
24586 #define SLAPD_OVER_PPOLICY $MFLAG
24587 _ACEOF
24588
24589 fi
24590
24591 if test "$ol_enable_proxycache" != no ; then
24592         BUILD_PROXYCACHE=$ol_enable_proxycache
24593         if test "$ol_enable_proxycache" = mod ; then
24594                 MFLAG=SLAPD_MOD_DYNAMIC
24595                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24596         else
24597                 MFLAG=SLAPD_MOD_STATIC
24598                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
24599         fi
24600
24601 cat >>confdefs.h <<_ACEOF
24602 #define SLAPD_OVER_PROXYCACHE $MFLAG
24603 _ACEOF
24604
24605 fi
24606
24607 if test "$ol_enable_refint" != no ; then
24608         BUILD_REFINT=$ol_enable_refint
24609         if test "$ol_enable_refint" = mod ; then
24610                 MFLAG=SLAPD_MOD_DYNAMIC
24611                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24612         else
24613                 MFLAG=SLAPD_MOD_STATIC
24614                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
24615         fi
24616
24617 cat >>confdefs.h <<_ACEOF
24618 #define SLAPD_OVER_REFINT $MFLAG
24619 _ACEOF
24620
24621 fi
24622
24623 if test "$ol_enable_retcode" != no ; then
24624         BUILD_RETCODE=$ol_enable_retcode
24625         if test "$ol_enable_retcode" = mod ; then
24626                 MFLAG=SLAPD_MOD_DYNAMIC
24627                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
24628         else
24629                 MFLAG=SLAPD_MOD_STATIC
24630                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
24631         fi
24632
24633 cat >>confdefs.h <<_ACEOF
24634 #define SLAPD_OVER_RETCODE $MFLAG
24635 _ACEOF
24636
24637 fi
24638
24639 if test "$ol_enable_rwm" != no ; then
24640         BUILD_REWRITE=yes
24641         BUILD_RWM=$ol_enable_rwm
24642         if test "$ol_enable_rwm" = mod ; then
24643                 MFLAG=SLAPD_MOD_DYNAMIC
24644                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24645         else
24646                 MFLAG=SLAPD_MOD_STATIC
24647                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
24648         fi
24649
24650 cat >>confdefs.h <<_ACEOF
24651 #define SLAPD_OVER_RWM $MFLAG
24652 _ACEOF
24653
24654 fi
24655
24656 if test "$ol_enable_seqmod" != no ; then
24657         BUILD_SEQMOD=$ol_enable_seqmod
24658         if test "$ol_enable_seqmod" = mod ; then
24659                 MFLAG=SLAPD_MOD_DYNAMIC
24660                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
24661         else
24662                 MFLAG=SLAPD_MOD_STATIC
24663                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
24664         fi
24665
24666 cat >>confdefs.h <<_ACEOF
24667 #define SLAPD_OVER_SEQMOD $MFLAG
24668 _ACEOF
24669
24670 fi
24671
24672 if test "$ol_enable_sssvlv" != no ; then
24673         BUILD_SSSVLV=$ol_enable_sssvlv
24674         if test "$ol_enable_sssvlv" = mod ; then
24675                 MFLAG=SLAPD_MOD_DYNAMIC
24676                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS sssvlv.la"
24677         else
24678                 MFLAG=SLAPD_MOD_STATIC
24679                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS sssvlv.o"
24680         fi
24681
24682 cat >>confdefs.h <<_ACEOF
24683 #define SLAPD_OVER_SSSVLV $MFLAG
24684 _ACEOF
24685
24686 fi
24687
24688 if test "$ol_enable_syncprov" != no ; then
24689         BUILD_SYNCPROV=$ol_enable_syncprov
24690         if test "$ol_enable_syncprov" = mod ; then
24691                 MFLAG=SLAPD_MOD_DYNAMIC
24692                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
24693         else
24694                 MFLAG=SLAPD_MOD_STATIC
24695                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
24696         fi
24697
24698 cat >>confdefs.h <<_ACEOF
24699 #define SLAPD_OVER_SYNCPROV $MFLAG
24700 _ACEOF
24701
24702 fi
24703
24704 if test "$ol_enable_translucent" != no ; then
24705         BUILD_TRANSLUCENT=$ol_enable_translucent
24706         if test "$ol_enable_translucent" = mod ; then
24707                 MFLAG=SLAPD_MOD_DYNAMIC
24708                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
24709         else
24710                 MFLAG=SLAPD_MOD_STATIC
24711                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
24712         fi
24713
24714 cat >>confdefs.h <<_ACEOF
24715 #define SLAPD_OVER_TRANSLUCENT $MFLAG
24716 _ACEOF
24717
24718 fi
24719
24720 if test "$ol_enable_unique" != no ; then
24721         BUILD_UNIQUE=$ol_enable_unique
24722         if test "$ol_enable_unique" = mod ; then
24723                 MFLAG=SLAPD_MOD_DYNAMIC
24724                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24725         else
24726                 MFLAG=SLAPD_MOD_STATIC
24727                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
24728         fi
24729
24730 cat >>confdefs.h <<_ACEOF
24731 #define SLAPD_OVER_UNIQUE $MFLAG
24732 _ACEOF
24733
24734 fi
24735
24736 if test "$ol_enable_valsort" != no ; then
24737         BUILD_VALSORT=$ol_enable_valsort
24738         if test "$ol_enable_valsort" = mod ; then
24739                 MFLAG=SLAPD_MOD_DYNAMIC
24740                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
24741         else
24742                 MFLAG=SLAPD_MOD_STATIC
24743                 SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
24744         fi
24745
24746 cat >>confdefs.h <<_ACEOF
24747 #define SLAPD_OVER_VALSORT $MFLAG
24748 _ACEOF
24749
24750 fi
24751
24752 if test "$ol_enable_rewrite" != no ; then
24753
24754 $as_echo "#define ENABLE_REWRITE 1" >>confdefs.h
24755
24756         BUILD_REWRITE=yes
24757 fi
24758
24759 if test "$ol_enable_slapi" != no ; then
24760
24761 $as_echo "#define ENABLE_SLAPI 1" >>confdefs.h
24762
24763         BUILD_SLAPI=yes
24764         SLAPD_SLAPI_DEPEND=libslapi.a
24765 fi
24766
24767
24768
24769 if test "$ac_cv_mingw32" = yes -o $ol_cv_msvc = yes ; then
24770         PLAT=NT
24771         SLAPD_MODULES_LDFLAGS=
24772 else
24773         PLAT=UNIX
24774 fi
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866 # Check whether --with-xxinstall was given.
24867 if test "${with_xxinstall+set}" = set; then :
24868   withval=$with_xxinstall;
24869 fi
24870
24871
24872
24873 ac_config_files="$ac_config_files Makefile:build/top.mk:Makefile.in:build/dir.mk doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk include/Makefile:build/top.mk:include/Makefile.in libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk servers/slapd/back-mdb/Makefile:build/top.mk:servers/slapd/back-mdb/Makefile.in:build/mod.mk servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk servers/slapd/back-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"
24874
24875
24876 ac_config_commands="$ac_config_commands default"
24877
24878
24879
24880 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24881 # Let make expand exec_prefix.
24882 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24883
24884 DEFS=-DHAVE_CONFIG_H
24885
24886 ac_libobjs=
24887 ac_ltlibobjs=
24888 U=
24889 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24890   # 1. Remove the extension, and $U if already installed.
24891   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24892   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24893   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24894   #    will be set to the directory where LIBOBJS objects are built.
24895   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24896   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24897 done
24898 LIBOBJS=$ac_libobjs
24899
24900 LTLIBOBJS=$ac_ltlibobjs
24901
24902
24903 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
24904   as_fn_error $? "conditional \"AMDEP\" was never defined.
24905 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24906 fi
24907 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24908   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
24909 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24910 fi
24911 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24912   as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
24913 Usually this means the macro was only invoked conditionally." "$LINENO" 5
24914 fi
24915
24916
24917 : "${CONFIG_STATUS=./config.status}"
24918 ac_write_fail=0
24919 ac_clean_files_save=$ac_clean_files
24920 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24921 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24922 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24923 as_write_fail=0
24924 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24925 #! $SHELL
24926 # Generated by $as_me.
24927 # Run this file to recreate the current configuration.
24928 # Compiler output produced by configure, useful for debugging
24929 # configure, is in config.log if it exists.
24930
24931 debug=false
24932 ac_cs_recheck=false
24933 ac_cs_silent=false
24934
24935 SHELL=\${CONFIG_SHELL-$SHELL}
24936 export SHELL
24937 _ASEOF
24938 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24939 ## -------------------- ##
24940 ## M4sh Initialization. ##
24941 ## -------------------- ##
24942
24943 # Be more Bourne compatible
24944 DUALCASE=1; export DUALCASE # for MKS sh
24945 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24946   emulate sh
24947   NULLCMD=:
24948   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24949   # is contrary to our usage.  Disable this feature.
24950   alias -g '${1+"$@"}'='"$@"'
24951   setopt NO_GLOB_SUBST
24952 else
24953   case `(set -o) 2>/dev/null` in #(
24954   *posix*) :
24955     set -o posix ;; #(
24956   *) :
24957      ;;
24958 esac
24959 fi
24960
24961
24962 as_nl='
24963 '
24964 export as_nl
24965 # Printing a long string crashes Solaris 7 /usr/bin/printf.
24966 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24967 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24968 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24969 # Prefer a ksh shell builtin over an external printf program on Solaris,
24970 # but without wasting forks for bash or zsh.
24971 if test -z "$BASH_VERSION$ZSH_VERSION" \
24972     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24973   as_echo='print -r --'
24974   as_echo_n='print -rn --'
24975 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24976   as_echo='printf %s\n'
24977   as_echo_n='printf %s'
24978 else
24979   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24980     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24981     as_echo_n='/usr/ucb/echo -n'
24982   else
24983     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24984     as_echo_n_body='eval
24985       arg=$1;
24986       case $arg in #(
24987       *"$as_nl"*)
24988         expr "X$arg" : "X\\(.*\\)$as_nl";
24989         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24990       esac;
24991       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24992     '
24993     export as_echo_n_body
24994     as_echo_n='sh -c $as_echo_n_body as_echo'
24995   fi
24996   export as_echo_body
24997   as_echo='sh -c $as_echo_body as_echo'
24998 fi
24999
25000 # The user is always right.
25001 if test "${PATH_SEPARATOR+set}" != set; then
25002   PATH_SEPARATOR=:
25003   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25004     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25005       PATH_SEPARATOR=';'
25006   }
25007 fi
25008
25009
25010 # IFS
25011 # We need space, tab and new line, in precisely that order.  Quoting is
25012 # there to prevent editors from complaining about space-tab.
25013 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
25014 # splitting by setting IFS to empty value.)
25015 IFS=" ""        $as_nl"
25016
25017 # Find who we are.  Look in the path if we contain no directory separator.
25018 as_myself=
25019 case $0 in #((
25020   *[\\/]* ) as_myself=$0 ;;
25021   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25022 for as_dir in $PATH
25023 do
25024   IFS=$as_save_IFS
25025   test -z "$as_dir" && as_dir=.
25026     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25027   done
25028 IFS=$as_save_IFS
25029
25030      ;;
25031 esac
25032 # We did not find ourselves, most probably we were run as `sh COMMAND'
25033 # in which case we are not to be found in the path.
25034 if test "x$as_myself" = x; then
25035   as_myself=$0
25036 fi
25037 if test ! -f "$as_myself"; then
25038   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25039   exit 1
25040 fi
25041
25042 # Unset variables that we do not need and which cause bugs (e.g. in
25043 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
25044 # suppresses any "Segmentation fault" message there.  '((' could
25045 # trigger a bug in pdksh 5.2.14.
25046 for as_var in BASH_ENV ENV MAIL MAILPATH
25047 do eval test x\${$as_var+set} = xset \
25048   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25049 done
25050 PS1='$ '
25051 PS2='> '
25052 PS4='+ '
25053
25054 # NLS nuisances.
25055 LC_ALL=C
25056 export LC_ALL
25057 LANGUAGE=C
25058 export LANGUAGE
25059
25060 # CDPATH.
25061 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25062
25063
25064 # as_fn_error STATUS ERROR [LINENO LOG_FD]
25065 # ----------------------------------------
25066 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25067 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
25068 # script with STATUS, using 1 if that was 0.
25069 as_fn_error ()
25070 {
25071   as_status=$1; test $as_status -eq 0 && as_status=1
25072   if test "$4"; then
25073     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25074     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
25075   fi
25076   $as_echo "$as_me: error: $2" >&2
25077   as_fn_exit $as_status
25078 } # as_fn_error
25079
25080
25081 # as_fn_set_status STATUS
25082 # -----------------------
25083 # Set $? to STATUS, without forking.
25084 as_fn_set_status ()
25085 {
25086   return $1
25087 } # as_fn_set_status
25088
25089 # as_fn_exit STATUS
25090 # -----------------
25091 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25092 as_fn_exit ()
25093 {
25094   set +e
25095   as_fn_set_status $1
25096   exit $1
25097 } # as_fn_exit
25098
25099 # as_fn_unset VAR
25100 # ---------------
25101 # Portably unset VAR.
25102 as_fn_unset ()
25103 {
25104   { eval $1=; unset $1;}
25105 }
25106 as_unset=as_fn_unset
25107 # as_fn_append VAR VALUE
25108 # ----------------------
25109 # Append the text in VALUE to the end of the definition contained in VAR. Take
25110 # advantage of any shell optimizations that allow amortized linear growth over
25111 # repeated appends, instead of the typical quadratic growth present in naive
25112 # implementations.
25113 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25114   eval 'as_fn_append ()
25115   {
25116     eval $1+=\$2
25117   }'
25118 else
25119   as_fn_append ()
25120   {
25121     eval $1=\$$1\$2
25122   }
25123 fi # as_fn_append
25124
25125 # as_fn_arith ARG...
25126 # ------------------
25127 # Perform arithmetic evaluation on the ARGs, and store the result in the
25128 # global $as_val. Take advantage of shells that can avoid forks. The arguments
25129 # must be portable across $(()) and expr.
25130 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25131   eval 'as_fn_arith ()
25132   {
25133     as_val=$(( $* ))
25134   }'
25135 else
25136   as_fn_arith ()
25137   {
25138     as_val=`expr "$@" || test $? -eq 1`
25139   }
25140 fi # as_fn_arith
25141
25142
25143 if expr a : '\(a\)' >/dev/null 2>&1 &&
25144    test "X`expr 00001 : '.*\(...\)'`" = X001; then
25145   as_expr=expr
25146 else
25147   as_expr=false
25148 fi
25149
25150 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25151   as_basename=basename
25152 else
25153   as_basename=false
25154 fi
25155
25156 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25157   as_dirname=dirname
25158 else
25159   as_dirname=false
25160 fi
25161
25162 as_me=`$as_basename -- "$0" ||
25163 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25164          X"$0" : 'X\(//\)$' \| \
25165          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25166 $as_echo X/"$0" |
25167     sed '/^.*\/\([^/][^/]*\)\/*$/{
25168             s//\1/
25169             q
25170           }
25171           /^X\/\(\/\/\)$/{
25172             s//\1/
25173             q
25174           }
25175           /^X\/\(\/\).*/{
25176             s//\1/
25177             q
25178           }
25179           s/.*/./; q'`
25180
25181 # Avoid depending upon Character Ranges.
25182 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25183 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25184 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25185 as_cr_digits='0123456789'
25186 as_cr_alnum=$as_cr_Letters$as_cr_digits
25187
25188 ECHO_C= ECHO_N= ECHO_T=
25189 case `echo -n x` in #(((((
25190 -n*)
25191   case `echo 'xy\c'` in
25192   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
25193   xy)  ECHO_C='\c';;
25194   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
25195        ECHO_T=' ';;
25196   esac;;
25197 *)
25198   ECHO_N='-n';;
25199 esac
25200
25201 rm -f conf$$ conf$$.exe conf$$.file
25202 if test -d conf$$.dir; then
25203   rm -f conf$$.dir/conf$$.file
25204 else
25205   rm -f conf$$.dir
25206   mkdir conf$$.dir 2>/dev/null
25207 fi
25208 if (echo >conf$$.file) 2>/dev/null; then
25209   if ln -s conf$$.file conf$$ 2>/dev/null; then
25210     as_ln_s='ln -s'
25211     # ... but there are two gotchas:
25212     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25213     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25214     # In both cases, we have to default to `cp -pR'.
25215     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25216       as_ln_s='cp -pR'
25217   elif ln conf$$.file conf$$ 2>/dev/null; then
25218     as_ln_s=ln
25219   else
25220     as_ln_s='cp -pR'
25221   fi
25222 else
25223   as_ln_s='cp -pR'
25224 fi
25225 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25226 rmdir conf$$.dir 2>/dev/null
25227
25228
25229 # as_fn_mkdir_p
25230 # -------------
25231 # Create "$as_dir" as a directory, including parents if necessary.
25232 as_fn_mkdir_p ()
25233 {
25234
25235   case $as_dir in #(
25236   -*) as_dir=./$as_dir;;
25237   esac
25238   test -d "$as_dir" || eval $as_mkdir_p || {
25239     as_dirs=
25240     while :; do
25241       case $as_dir in #(
25242       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25243       *) as_qdir=$as_dir;;
25244       esac
25245       as_dirs="'$as_qdir' $as_dirs"
25246       as_dir=`$as_dirname -- "$as_dir" ||
25247 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25248          X"$as_dir" : 'X\(//\)[^/]' \| \
25249          X"$as_dir" : 'X\(//\)$' \| \
25250          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25251 $as_echo X"$as_dir" |
25252     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25253             s//\1/
25254             q
25255           }
25256           /^X\(\/\/\)[^/].*/{
25257             s//\1/
25258             q
25259           }
25260           /^X\(\/\/\)$/{
25261             s//\1/
25262             q
25263           }
25264           /^X\(\/\).*/{
25265             s//\1/
25266             q
25267           }
25268           s/.*/./; q'`
25269       test -d "$as_dir" && break
25270     done
25271     test -z "$as_dirs" || eval "mkdir $as_dirs"
25272   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
25273
25274
25275 } # as_fn_mkdir_p
25276 if mkdir -p . 2>/dev/null; then
25277   as_mkdir_p='mkdir -p "$as_dir"'
25278 else
25279   test -d ./-p && rmdir ./-p
25280   as_mkdir_p=false
25281 fi
25282
25283
25284 # as_fn_executable_p FILE
25285 # -----------------------
25286 # Test if FILE is an executable regular file.
25287 as_fn_executable_p ()
25288 {
25289   test -f "$1" && test -x "$1"
25290 } # as_fn_executable_p
25291 as_test_x='test -x'
25292 as_executable_p=as_fn_executable_p
25293
25294 # Sed expression to map a string onto a valid CPP name.
25295 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25296
25297 # Sed expression to map a string onto a valid variable name.
25298 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25299
25300
25301 exec 6>&1
25302 ## ----------------------------------- ##
25303 ## Main body of $CONFIG_STATUS script. ##
25304 ## ----------------------------------- ##
25305 _ASEOF
25306 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25307
25308 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25309 # Save the log message, to keep $0 and so on meaningful, and to
25310 # report actual input values of CONFIG_FILES etc. instead of their
25311 # values after options handling.
25312 ac_log="
25313 This file was extended by $as_me, which was
25314 generated by GNU Autoconf 2.69.  Invocation command line was
25315
25316   CONFIG_FILES    = $CONFIG_FILES
25317   CONFIG_HEADERS  = $CONFIG_HEADERS
25318   CONFIG_LINKS    = $CONFIG_LINKS
25319   CONFIG_COMMANDS = $CONFIG_COMMANDS
25320   $ $0 $@
25321
25322 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25323 "
25324
25325 _ACEOF
25326
25327 case $ac_config_files in *"
25328 "*) set x $ac_config_files; shift; ac_config_files=$*;;
25329 esac
25330
25331 case $ac_config_headers in *"
25332 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25333 esac
25334
25335
25336 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25337 # Files that config.status was made for.
25338 config_files="$ac_config_files"
25339 config_headers="$ac_config_headers"
25340 config_commands="$ac_config_commands"
25341
25342 _ACEOF
25343
25344 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25345 ac_cs_usage="\
25346 \`$as_me' instantiates files and other configuration actions
25347 from templates according to the current configuration.  Unless the files
25348 and actions are specified as TAGs, all are instantiated by default.
25349
25350 Usage: $0 [OPTION]... [TAG]...
25351
25352   -h, --help       print this help, then exit
25353   -V, --version    print version number and configuration settings, then exit
25354       --config     print configuration, then exit
25355   -q, --quiet, --silent
25356                    do not print progress messages
25357   -d, --debug      don't remove temporary files
25358       --recheck    update $as_me by reconfiguring in the same conditions
25359       --file=FILE[:TEMPLATE]
25360                    instantiate the configuration file FILE
25361       --header=FILE[:TEMPLATE]
25362                    instantiate the configuration header FILE
25363
25364 Configuration files:
25365 $config_files
25366
25367 Configuration headers:
25368 $config_headers
25369
25370 Configuration commands:
25371 $config_commands
25372
25373 Report bugs to <<http://www.openldap.org/its/>>."
25374
25375 _ACEOF
25376 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25377 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
25378 ac_cs_version="\\
25379 config.status
25380 configured by $0, generated by GNU Autoconf 2.69,
25381   with options \\"\$ac_cs_config\\"
25382
25383 Copyright (C) 2012 Free Software Foundation, Inc.
25384 This config.status script is free software; the Free Software Foundation
25385 gives unlimited permission to copy, distribute and modify it."
25386
25387 ac_pwd='$ac_pwd'
25388 srcdir='$srcdir'
25389 INSTALL='$INSTALL'
25390 AWK='$AWK'
25391 test -n "\$AWK" || AWK=awk
25392 _ACEOF
25393
25394 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25395 # The default lists apply if the user does not specify any file.
25396 ac_need_defaults=:
25397 while test $# != 0
25398 do
25399   case $1 in
25400   --*=?*)
25401     ac_option=`expr "X$1" : 'X\([^=]*\)='`
25402     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25403     ac_shift=:
25404     ;;
25405   --*=)
25406     ac_option=`expr "X$1" : 'X\([^=]*\)='`
25407     ac_optarg=
25408     ac_shift=:
25409     ;;
25410   *)
25411     ac_option=$1
25412     ac_optarg=$2
25413     ac_shift=shift
25414     ;;
25415   esac
25416
25417   case $ac_option in
25418   # Handling of the options.
25419   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25420     ac_cs_recheck=: ;;
25421   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25422     $as_echo "$ac_cs_version"; exit ;;
25423   --config | --confi | --conf | --con | --co | --c )
25424     $as_echo "$ac_cs_config"; exit ;;
25425   --debug | --debu | --deb | --de | --d | -d )
25426     debug=: ;;
25427   --file | --fil | --fi | --f )
25428     $ac_shift
25429     case $ac_optarg in
25430     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25431     '') as_fn_error $? "missing file argument" ;;
25432     esac
25433     as_fn_append CONFIG_FILES " '$ac_optarg'"
25434     ac_need_defaults=false;;
25435   --header | --heade | --head | --hea )
25436     $ac_shift
25437     case $ac_optarg in
25438     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25439     esac
25440     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25441     ac_need_defaults=false;;
25442   --he | --h)
25443     # Conflict between --help and --header
25444     as_fn_error $? "ambiguous option: \`$1'
25445 Try \`$0 --help' for more information.";;
25446   --help | --hel | -h )
25447     $as_echo "$ac_cs_usage"; exit ;;
25448   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25449   | -silent | --silent | --silen | --sile | --sil | --si | --s)
25450     ac_cs_silent=: ;;
25451
25452   # This is an error.
25453   -*) as_fn_error $? "unrecognized option: \`$1'
25454 Try \`$0 --help' for more information." ;;
25455
25456   *) as_fn_append ac_config_targets " $1"
25457      ac_need_defaults=false ;;
25458
25459   esac
25460   shift
25461 done
25462
25463 ac_configure_extra_args=
25464
25465 if $ac_cs_silent; then
25466   exec 6>/dev/null
25467   ac_configure_extra_args="$ac_configure_extra_args --silent"
25468 fi
25469
25470 _ACEOF
25471 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25472 if \$ac_cs_recheck; then
25473   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25474   shift
25475   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25476   CONFIG_SHELL='$SHELL'
25477   export CONFIG_SHELL
25478   exec "\$@"
25479 fi
25480
25481 _ACEOF
25482 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25483 exec 5>>config.log
25484 {
25485   echo
25486   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25487 ## Running $as_me. ##
25488 _ASBOX
25489   $as_echo "$ac_log"
25490 } >&5
25491
25492 _ACEOF
25493 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25494 #
25495 # INIT-COMMANDS
25496 #
25497 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25498
25499 STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25500 STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
25501
25502
25503 _ACEOF
25504
25505 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25506
25507 # Handling of arguments.
25508 for ac_config_target in $ac_config_targets
25509 do
25510   case $ac_config_target in
25511     "include/portable.h") CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
25512     "include/ldap_features.h") CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
25513     "include/lber_types.h") CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
25514     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25515     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
25516     "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
25517     "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
25518     "doc/man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
25519     "doc/man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
25520     "doc/man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
25521     "doc/man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
25522     "clients/Makefile") CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
25523     "clients/tools/Makefile") CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
25524     "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
25525     "libraries/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
25526     "libraries/liblber/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25527     "libraries/libldap/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25528     "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" ;;
25529     "libraries/liblunicode/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25530     "libraries/liblutil/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25531     "libraries/librewrite/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25532     "servers/Makefile") CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
25533     "servers/slapd/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
25534     "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" ;;
25535     "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" ;;
25536     "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" ;;
25537     "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" ;;
25538     "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" ;;
25539     "servers/slapd/back-mdb/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/back-mdb/Makefile:build/top.mk:servers/slapd/back-mdb/Makefile.in:build/mod.mk" ;;
25540     "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" ;;
25541     "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" ;;
25542     "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" ;;
25543     "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" ;;
25544     "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" ;;
25545     "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" ;;
25546     "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" ;;
25547     "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" ;;
25548     "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" ;;
25549     "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" ;;
25550     "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" ;;
25551     "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" ;;
25552     "servers/slapd/overlays/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
25553     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
25554     "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;;
25555     "tests/progs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
25556     "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25557
25558   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25559   esac
25560 done
25561
25562
25563 # If the user did not use the arguments to specify the items to instantiate,
25564 # then the envvar interface is used.  Set only those that are not.
25565 # We use the long form for the default assignment because of an extremely
25566 # bizarre bug on SunOS 4.1.3.
25567 if $ac_need_defaults; then
25568   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25569   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25570   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25571 fi
25572
25573 # Have a temporary directory for convenience.  Make it in the build tree
25574 # simply because there is no reason against having it here, and in addition,
25575 # creating and moving files from /tmp can sometimes cause problems.
25576 # Hook for its removal unless debugging.
25577 # Note that there is a small window in which the directory will not be cleaned:
25578 # after its creation but before its name has been assigned to `$tmp'.
25579 $debug ||
25580 {
25581   tmp= ac_tmp=
25582   trap 'exit_status=$?
25583   : "${ac_tmp:=$tmp}"
25584   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
25585 ' 0
25586   trap 'as_fn_exit 1' 1 2 13 15
25587 }
25588 # Create a (secure) tmp directory for tmp files.
25589
25590 {
25591   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25592   test -d "$tmp"
25593 }  ||
25594 {
25595   tmp=./conf$$-$RANDOM
25596   (umask 077 && mkdir "$tmp")
25597 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
25598 ac_tmp=$tmp
25599
25600 # Set up the scripts for CONFIG_FILES section.
25601 # No need to generate them if there are no CONFIG_FILES.
25602 # This happens for instance with `./config.status config.h'.
25603 if test -n "$CONFIG_FILES"; then
25604
25605
25606 ac_cr=`echo X | tr X '\015'`
25607 # On cygwin, bash can eat \r inside `` if the user requested igncr.
25608 # But we know of no other shell where ac_cr would be empty at this
25609 # point, so we can use a bashism as a fallback.
25610 if test "x$ac_cr" = x; then
25611   eval ac_cr=\$\'\\r\'
25612 fi
25613 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25614 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25615   ac_cs_awk_cr='\\r'
25616 else
25617   ac_cs_awk_cr=$ac_cr
25618 fi
25619
25620 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
25621 _ACEOF
25622
25623
25624 {
25625   echo "cat >conf$$subs.awk <<_ACEOF" &&
25626   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25627   echo "_ACEOF"
25628 } >conf$$subs.sh ||
25629   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25630 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
25631 ac_delim='%!_!# '
25632 for ac_last_try in false false false false false :; do
25633   . ./conf$$subs.sh ||
25634     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25635
25636   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25637   if test $ac_delim_n = $ac_delim_num; then
25638     break
25639   elif $ac_last_try; then
25640     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
25641   else
25642     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25643   fi
25644 done
25645 rm -f conf$$subs.sh
25646
25647 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25648 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
25649 _ACEOF
25650 sed -n '
25651 h
25652 s/^/S["/; s/!.*/"]=/
25653 p
25654 g
25655 s/^[^!]*!//
25656 :repl
25657 t repl
25658 s/'"$ac_delim"'$//
25659 t delim
25660 :nl
25661 h
25662 s/\(.\{148\}\)..*/\1/
25663 t more1
25664 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25665 p
25666 n
25667 b repl
25668 :more1
25669 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25670 p
25671 g
25672 s/.\{148\}//
25673 t nl
25674 :delim
25675 h
25676 s/\(.\{148\}\)..*/\1/
25677 t more2
25678 s/["\\]/\\&/g; s/^/"/; s/$/"/
25679 p
25680 b
25681 :more2
25682 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25683 p
25684 g
25685 s/.\{148\}//
25686 t delim
25687 ' <conf$$subs.awk | sed '
25688 /^[^""]/{
25689   N
25690   s/\n//
25691 }
25692 ' >>$CONFIG_STATUS || ac_write_fail=1
25693 rm -f conf$$subs.awk
25694 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25695 _ACAWK
25696 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
25697   for (key in S) S_is_set[key] = 1
25698   FS = "\a"
25699
25700 }
25701 {
25702   line = $ 0
25703   nfields = split(line, field, "@")
25704   substed = 0
25705   len = length(field[1])
25706   for (i = 2; i < nfields; i++) {
25707     key = field[i]
25708     keylen = length(key)
25709     if (S_is_set[key]) {
25710       value = S[key]
25711       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25712       len += length(value) + length(field[++i])
25713       substed = 1
25714     } else
25715       len += 1 + keylen
25716   }
25717
25718   print line
25719 }
25720
25721 _ACAWK
25722 _ACEOF
25723 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25724 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25725   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25726 else
25727   cat
25728 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
25729   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
25730 _ACEOF
25731
25732 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
25733 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
25734 # trailing colons and then remove the whole line if VPATH becomes empty
25735 # (actually we leave an empty line to preserve line numbers).
25736 if test "x$srcdir" = x.; then
25737   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
25738 h
25739 s///
25740 s/^/:/
25741 s/[      ]*$/:/
25742 s/:\$(srcdir):/:/g
25743 s/:\${srcdir}:/:/g
25744 s/:@srcdir@:/:/g
25745 s/^:*//
25746 s/:*$//
25747 x
25748 s/\(=[   ]*\).*/\1/
25749 G
25750 s/\n//
25751 s/^[^=]*=[       ]*$//
25752 }'
25753 fi
25754
25755 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25756 fi # test -n "$CONFIG_FILES"
25757
25758 # Set up the scripts for CONFIG_HEADERS section.
25759 # No need to generate them if there are no CONFIG_HEADERS.
25760 # This happens for instance with `./config.status Makefile'.
25761 if test -n "$CONFIG_HEADERS"; then
25762 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
25763 BEGIN {
25764 _ACEOF
25765
25766 # Transform confdefs.h into an awk script `defines.awk', embedded as
25767 # here-document in config.status, that substitutes the proper values into
25768 # config.h.in to produce config.h.
25769
25770 # Create a delimiter string that does not exist in confdefs.h, to ease
25771 # handling of long lines.
25772 ac_delim='%!_!# '
25773 for ac_last_try in false false :; do
25774   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
25775   if test -z "$ac_tt"; then
25776     break
25777   elif $ac_last_try; then
25778     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
25779   else
25780     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25781   fi
25782 done
25783
25784 # For the awk script, D is an array of macro values keyed by name,
25785 # likewise P contains macro parameters if any.  Preserve backslash
25786 # newline sequences.
25787
25788 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25789 sed -n '
25790 s/.\{148\}/&'"$ac_delim"'/g
25791 t rset
25792 :rset
25793 s/^[     ]*#[    ]*define[       ][      ]*/ /
25794 t def
25795 d
25796 :def
25797 s/\\$//
25798 t bsnl
25799 s/["\\]/\\&/g
25800 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
25801 D["\1"]=" \3"/p
25802 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
25803 d
25804 :bsnl
25805 s/["\\]/\\&/g
25806 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
25807 D["\1"]=" \3\\\\\\n"\\/p
25808 t cont
25809 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25810 t cont
25811 d
25812 :cont
25813 n
25814 s/.\{148\}/&'"$ac_delim"'/g
25815 t clear
25816 :clear
25817 s/\\$//
25818 t bsnlc
25819 s/["\\]/\\&/g; s/^/"/; s/$/"/p
25820 d
25821 :bsnlc
25822 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25823 b cont
25824 ' <confdefs.h | sed '
25825 s/'"$ac_delim"'/"\\\
25826 "/g' >>$CONFIG_STATUS || ac_write_fail=1
25827
25828 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25829   for (key in D) D_is_set[key] = 1
25830   FS = "\a"
25831 }
25832 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25833   line = \$ 0
25834   split(line, arg, " ")
25835   if (arg[1] == "#") {
25836     defundef = arg[2]
25837     mac1 = arg[3]
25838   } else {
25839     defundef = substr(arg[1], 2)
25840     mac1 = arg[2]
25841   }
25842   split(mac1, mac2, "(") #)
25843   macro = mac2[1]
25844   prefix = substr(line, 1, index(line, defundef) - 1)
25845   if (D_is_set[macro]) {
25846     # Preserve the white space surrounding the "#".
25847     print prefix "define", macro P[macro] D[macro]
25848     next
25849   } else {
25850     # Replace #undef with comments.  This is necessary, for example,
25851     # in the case of _POSIX_SOURCE, which is predefined and required
25852     # on some systems where configure will not decide to define it.
25853     if (defundef == "undef") {
25854       print "/*", prefix defundef, macro, "*/"
25855       next
25856     }
25857   }
25858 }
25859 { print }
25860 _ACAWK
25861 _ACEOF
25862 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25863   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
25864 fi # test -n "$CONFIG_HEADERS"
25865
25866
25867 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
25868 shift
25869 for ac_tag
25870 do
25871   case $ac_tag in
25872   :[FHLC]) ac_mode=$ac_tag; continue;;
25873   esac
25874   case $ac_mode$ac_tag in
25875   :[FHL]*:*);;
25876   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
25877   :[FH]-) ac_tag=-:-;;
25878   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25879   esac
25880   ac_save_IFS=$IFS
25881   IFS=:
25882   set x $ac_tag
25883   IFS=$ac_save_IFS
25884   shift
25885   ac_file=$1
25886   shift
25887
25888   case $ac_mode in
25889   :L) ac_source=$1;;
25890   :[FH])
25891     ac_file_inputs=
25892     for ac_f
25893     do
25894       case $ac_f in
25895       -) ac_f="$ac_tmp/stdin";;
25896       *) # Look for the file first in the build tree, then in the source tree
25897          # (if the path is not absolute).  The absolute path cannot be DOS-style,
25898          # because $ac_f cannot contain `:'.
25899          test -f "$ac_f" ||
25900            case $ac_f in
25901            [\\/$]*) false;;
25902            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25903            esac ||
25904            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25905       esac
25906       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25907       as_fn_append ac_file_inputs " '$ac_f'"
25908     done
25909
25910     # Let's still pretend it is `configure' which instantiates (i.e., don't
25911     # use $as_me), people would be surprised to read:
25912     #    /* config.h.  Generated by config.status.  */
25913     configure_input='Generated from '`
25914           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25915         `' by configure.'
25916     if test x"$ac_file" != x-; then
25917       configure_input="$ac_file.  $configure_input"
25918       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25919 $as_echo "$as_me: creating $ac_file" >&6;}
25920     fi
25921     # Neutralize special characters interpreted by sed in replacement strings.
25922     case $configure_input in #(
25923     *\&* | *\|* | *\\* )
25924        ac_sed_conf_input=`$as_echo "$configure_input" |
25925        sed 's/[\\\\&|]/\\\\&/g'`;; #(
25926     *) ac_sed_conf_input=$configure_input;;
25927     esac
25928
25929     case $ac_tag in
25930     *:-:* | *:-) cat >"$ac_tmp/stdin" \
25931       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
25932     esac
25933     ;;
25934   esac
25935
25936   ac_dir=`$as_dirname -- "$ac_file" ||
25937 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25938          X"$ac_file" : 'X\(//\)[^/]' \| \
25939          X"$ac_file" : 'X\(//\)$' \| \
25940          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25941 $as_echo X"$ac_file" |
25942     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25943             s//\1/
25944             q
25945           }
25946           /^X\(\/\/\)[^/].*/{
25947             s//\1/
25948             q
25949           }
25950           /^X\(\/\/\)$/{
25951             s//\1/
25952             q
25953           }
25954           /^X\(\/\).*/{
25955             s//\1/
25956             q
25957           }
25958           s/.*/./; q'`
25959   as_dir="$ac_dir"; as_fn_mkdir_p
25960   ac_builddir=.
25961
25962 case "$ac_dir" in
25963 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25964 *)
25965   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25966   # A ".." for each directory in $ac_dir_suffix.
25967   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25968   case $ac_top_builddir_sub in
25969   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25970   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25971   esac ;;
25972 esac
25973 ac_abs_top_builddir=$ac_pwd
25974 ac_abs_builddir=$ac_pwd$ac_dir_suffix
25975 # for backward compatibility:
25976 ac_top_builddir=$ac_top_build_prefix
25977
25978 case $srcdir in
25979   .)  # We are building in place.
25980     ac_srcdir=.
25981     ac_top_srcdir=$ac_top_builddir_sub
25982     ac_abs_top_srcdir=$ac_pwd ;;
25983   [\\/]* | ?:[\\/]* )  # Absolute name.
25984     ac_srcdir=$srcdir$ac_dir_suffix;
25985     ac_top_srcdir=$srcdir
25986     ac_abs_top_srcdir=$srcdir ;;
25987   *) # Relative name.
25988     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25989     ac_top_srcdir=$ac_top_build_prefix$srcdir
25990     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25991 esac
25992 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25993
25994
25995   case $ac_mode in
25996   :F)
25997   #
25998   # CONFIG_FILE
25999   #
26000
26001   case $INSTALL in
26002   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
26003   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
26004   esac
26005 _ACEOF
26006
26007 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26008 # If the template does not know about datarootdir, expand it.
26009 # FIXME: This hack should be removed a few years after 2.60.
26010 ac_datarootdir_hack=; ac_datarootdir_seen=
26011 ac_sed_dataroot='
26012 /datarootdir/ {
26013   p
26014   q
26015 }
26016 /@datadir@/p
26017 /@docdir@/p
26018 /@infodir@/p
26019 /@localedir@/p
26020 /@mandir@/p'
26021 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
26022 *datarootdir*) ac_datarootdir_seen=yes;;
26023 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
26024   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26025 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
26026 _ACEOF
26027 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26028   ac_datarootdir_hack='
26029   s&@datadir@&$datadir&g
26030   s&@docdir@&$docdir&g
26031   s&@infodir@&$infodir&g
26032   s&@localedir@&$localedir&g
26033   s&@mandir@&$mandir&g
26034   s&\\\${datarootdir}&$datarootdir&g' ;;
26035 esac
26036 _ACEOF
26037
26038 # Neutralize VPATH when `$srcdir' = `.'.
26039 # Shell code in configure.ac might set extrasub.
26040 # FIXME: do we really want to maintain this feature?
26041 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26042 ac_sed_extra="$ac_vpsub
26043 $extrasub
26044 _ACEOF
26045 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26046 :t
26047 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26048 s|@configure_input@|$ac_sed_conf_input|;t t
26049 s&@top_builddir@&$ac_top_builddir_sub&;t t
26050 s&@top_build_prefix@&$ac_top_build_prefix&;t t
26051 s&@srcdir@&$ac_srcdir&;t t
26052 s&@abs_srcdir@&$ac_abs_srcdir&;t t
26053 s&@top_srcdir@&$ac_top_srcdir&;t t
26054 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26055 s&@builddir@&$ac_builddir&;t t
26056 s&@abs_builddir@&$ac_abs_builddir&;t t
26057 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26058 s&@INSTALL@&$ac_INSTALL&;t t
26059 $ac_datarootdir_hack
26060 "
26061 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
26062   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26063
26064 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26065   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
26066   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
26067       "$ac_tmp/out"`; test -z "$ac_out"; } &&
26068   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26069 which seems to be undefined.  Please make sure it is defined" >&5
26070 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26071 which seems to be undefined.  Please make sure it is defined" >&2;}
26072
26073   rm -f "$ac_tmp/stdin"
26074   case $ac_file in
26075   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
26076   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
26077   esac \
26078   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26079  ;;
26080   :H)
26081   #
26082   # CONFIG_HEADER
26083   #
26084   if test x"$ac_file" != x-; then
26085     {
26086       $as_echo "/* $configure_input  */" \
26087       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
26088     } >"$ac_tmp/config.h" \
26089       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26090     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
26091       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26092 $as_echo "$as_me: $ac_file is unchanged" >&6;}
26093     else
26094       rm -f "$ac_file"
26095       mv "$ac_tmp/config.h" "$ac_file" \
26096         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
26097     fi
26098   else
26099     $as_echo "/* $configure_input  */" \
26100       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
26101       || as_fn_error $? "could not create -" "$LINENO" 5
26102   fi
26103 # Compute "$ac_file"'s index in $config_headers.
26104 _am_stamp_count=1
26105 for _am_header in $config_headers :; do
26106   case $_am_header in
26107     "$ac_file" | "$ac_file":* )
26108       break ;;
26109     * )
26110       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26111   esac
26112 done
26113 echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
26114 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26115          X"$ac_file" : 'X\(//\)[^/]' \| \
26116          X"$ac_file" : 'X\(//\)$' \| \
26117          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26118 $as_echo X"$ac_file" |
26119     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26120             s//\1/
26121             q
26122           }
26123           /^X\(\/\/\)[^/].*/{
26124             s//\1/
26125             q
26126           }
26127           /^X\(\/\/\)$/{
26128             s//\1/
26129             q
26130           }
26131           /^X\(\/\).*/{
26132             s//\1/
26133             q
26134           }
26135           s/.*/./; q'`/stamp-h$_am_stamp_count
26136  ;;
26137
26138   :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26139 $as_echo "$as_me: executing $ac_file commands" >&6;}
26140  ;;
26141   esac
26142
26143
26144   case $ac_file$ac_mode in
26145     "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
26146   # Strip MF so we end up with the name of the file.
26147   mf=`echo "$mf" | sed -e 's/:.*$//'`
26148   # Check whether this is an Automake generated Makefile or not.
26149   # We used to match only the files named `Makefile.in', but
26150   # some people rename them; so instead we look at the file content.
26151   # Grep'ing the first line is not enough: some people post-process
26152   # each Makefile.in and add a new line on top of each file to say so.
26153   # So let's grep whole file.
26154   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
26155     dirpart=`$as_dirname -- "$mf" ||
26156 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26157          X"$mf" : 'X\(//\)[^/]' \| \
26158          X"$mf" : 'X\(//\)$' \| \
26159          X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
26160 $as_echo X"$mf" |
26161     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26162             s//\1/
26163             q
26164           }
26165           /^X\(\/\/\)[^/].*/{
26166             s//\1/
26167             q
26168           }
26169           /^X\(\/\/\)$/{
26170             s//\1/
26171             q
26172           }
26173           /^X\(\/\).*/{
26174             s//\1/
26175             q
26176           }
26177           s/.*/./; q'`
26178   else
26179     continue
26180   fi
26181   # Extract the definition of DEPDIR, am__include, and am__quote
26182   # from the Makefile without running `make'.
26183   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
26184   test -z "$DEPDIR" && continue
26185   am__include=`sed -n 's/^am__include = //p' < "$mf"`
26186   test -z "am__include" && continue
26187   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
26188   # When using ansi2knr, U may be empty or an underscore; expand it
26189   U=`sed -n 's/^U = //p' < "$mf"`
26190   # Find all dependency output files, they are included files with
26191   # $(DEPDIR) in their names.  We invoke sed twice because it is the
26192   # simplest approach to changing $(DEPDIR) to its actual value in the
26193   # expansion.
26194   for file in `sed -n "
26195     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
26196        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
26197     # Make sure the directory exists.
26198     test -f "$dirpart/$file" && continue
26199     fdir=`$as_dirname -- "$file" ||
26200 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26201          X"$file" : 'X\(//\)[^/]' \| \
26202          X"$file" : 'X\(//\)$' \| \
26203          X"$file" : 'X\(/\)' \| . 2>/dev/null ||
26204 $as_echo X"$file" |
26205     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26206             s//\1/
26207             q
26208           }
26209           /^X\(\/\/\)[^/].*/{
26210             s//\1/
26211             q
26212           }
26213           /^X\(\/\/\)$/{
26214             s//\1/
26215             q
26216           }
26217           /^X\(\/\).*/{
26218             s//\1/
26219             q
26220           }
26221           s/.*/./; q'`
26222     as_dir=$dirpart/$fdir; as_fn_mkdir_p
26223     # echo "creating $dirpart/$file"
26224     echo '# dummy' > "$dirpart/$file"
26225   done
26226 done
26227  ;;
26228     "default":C)
26229 chmod +x tests/run
26230 date > stamp-h
26231 BACKENDSC="servers/slapd/backends.c"
26232 echo "Making $BACKENDSC"
26233 rm -f $BACKENDSC
26234 cat > $BACKENDSC << ENDX
26235 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26236  *
26237  * Copyright 1998-2014 The OpenLDAP Foundation.
26238  * All rights reserved.
26239  *
26240  * Redistribution and use in source and binary forms, with or without
26241  * modification, are permitted only as authorized by the OpenLDAP
26242  * Public License.
26243  *
26244  * A copy of this license is available in the file LICENSE in the
26245  * top-level directory of the distribution or, alternatively, at
26246  * <http://www.OpenLDAP.org/license.html>.
26247  */
26248 /* This file is automatically generated by configure; please do not edit. */
26249
26250 #include "portable.h"
26251 #include "slap.h"
26252
26253 ENDX
26254 if test "${STATIC_BACKENDS}"; then
26255         for b in config ${STATIC_BACKENDS}; do
26256                 bb=`echo "${b}" | sed -e 's/back-//'`
26257                 cat >> $BACKENDSC << ENDX
26258 extern BI_init ${bb}_back_initialize;
26259 ENDX
26260         done
26261
26262         cat >> $BACKENDSC << ENDX
26263
26264 BackendInfo slap_binfo[] = {
26265 ENDX
26266
26267         for b in config ${STATIC_BACKENDS}; do
26268                 bb=`echo "${b}" | sed -e 's/back-//'`
26269                 echo "    Add ${bb} ..."
26270                 cat >> $BACKENDSC << ENDX
26271         { "${bb}", ${bb}_back_initialize },
26272 ENDX
26273         done
26274
26275         cat >> $BACKENDSC << ENDX
26276         { NULL, NULL },
26277 };
26278
26279 /* end of generated file */
26280 ENDX
26281 fi
26282 OVERLAYSC="servers/slapd/overlays/statover.c"
26283 echo "Making $OVERLAYSC"
26284 rm -f $OVERLAYSC
26285 cat > $OVERLAYSC << ENDX
26286 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26287  *
26288  * Copyright 1998-2014 The OpenLDAP Foundation.
26289  * All rights reserved.
26290  *
26291  * Redistribution and use in source and binary forms, with or without
26292  * modification, are permitted only as authorized by the OpenLDAP
26293  * Public License.
26294  *
26295  * A copy of this license is available in the file LICENSE in the
26296  * top-level directory of the distribution or, alternatively, at
26297  * <http://www.OpenLDAP.org/license.html>.
26298  */
26299 /* This file is automatically generated by configure; please do not edit. */
26300
26301 #include "portable.h"
26302 #include "slap.h"
26303
26304 ENDX
26305 if test "${STATIC_OVERLAYS}"; then
26306         for o in ${STATIC_OVERLAYS}; do
26307                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26308                 cat >> $OVERLAYSC << ENDX
26309 extern OV_init ${oo}_initialize;
26310 ENDX
26311         done
26312 fi
26313
26314 cat >> $OVERLAYSC << ENDX
26315
26316 OverlayInit slap_oinfo[] = {
26317 ENDX
26318
26319 if test "${STATIC_OVERLAYS}"; then
26320         for o in ${STATIC_OVERLAYS}; do
26321                 oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26322                 echo "    Add ${oo} ..."
26323                 cat >> $OVERLAYSC << ENDX
26324         { "${oo}", ${oo}_initialize },
26325 ENDX
26326         done
26327 fi
26328
26329         cat >> $OVERLAYSC << ENDX
26330         { NULL, NULL },
26331 };
26332
26333 /* end of generated file */
26334 ENDX
26335
26336 if test "${ol_cv_mkdep}" = no; then
26337         echo '(Do not "make depend"; we do not know how to build dependencies)'
26338 else
26339         echo 'Please run "make depend" to build dependencies'
26340 fi
26341  ;;
26342
26343   esac
26344 done # for ac_tag
26345
26346
26347 as_fn_exit 0
26348 _ACEOF
26349 ac_clean_files=$ac_clean_files_save
26350
26351 test $ac_write_fail = 0 ||
26352   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
26353
26354
26355 # configure is writing to config.log, and then calls config.status.
26356 # config.status does its own redirection, appending to config.log.
26357 # Unfortunately, on DOS this fails, as config.log is still kept open
26358 # by configure, so config.status won't be able to write to it; its
26359 # output is simply discarded.  So we exec the FD to /dev/null,
26360 # effectively closing config.log, so it can be properly (re)opened and
26361 # appended to by config.status.  When coming back to configure, we
26362 # need to make the FD available again.
26363 if test "$no_create" != yes; then
26364   ac_cs_success=:
26365   ac_config_status_args=
26366   test "$silent" = yes &&
26367     ac_config_status_args="$ac_config_status_args --quiet"
26368   exec 5>/dev/null
26369   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26370   exec 5>>config.log
26371   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26372   # would make configure fail if this is the last instruction.
26373   $ac_cs_success || as_fn_exit 1
26374 fi
26375 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26376   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26377 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26378 fi
26379